Measuring argument offset in gRPC classes

11 views
Skip to first unread message

Youssef Esseddiq

unread,
Apr 19, 2024, 4:37:32 PM4/19/24
to grpc.io
Hi,
As a simple example of my problem, I'm trying to measure the offset of the argument 'send_initial_metadata' in the 'grpc_chttp2_stream' class. This has been done for older versions of gRPC < v1.41.1 but as you know the grpc codebase keeps changing and the offset calculation needs to be redone for most of the newer versions. 
 
I have tried instrumenting the grpc codebase using things like 'offset_of' from 'stddef.h' but I did not get accurate offsets. For example, the offset of the argument 'send_initial_metadata' in the 'grpc_chttp2_stream' class in v1.41.1 is 0x140 from prior work. However, using 'offset_of' for the same version yields a 0x190.

Any idea of a reliable way to measure that offset? 
Thank you!
Reply all
Reply to author
Forward
0 new messages