Posted: Fri Jul 07, 2023 3:25 pm Post subject: Locating the End of a Struct/Class?
Hello everyone,
I have a question regarding the use of the dissect data structure on a struct/class. How can I determine the precise location of the end of the class or struct? It's not reliable to assume that reaching values of 0 indicates the end, as there may be padding within the struct. Is there a way to accurately find the actual end of a struct without resorting to guessing or making assumptions?
There's no definitive way of doing that without some debugging information: e.g. mono.
You could look at what accesses an address, and the offset will probably indicate where the beginning of a struct is. This might also give you an upper bound to the size of the structure located immediately before that in memory. However, structures can be composed of other structures (directly: not just by pointers), so this is at best a guess.
If there are several instances laid out in a contiguous array, you can get an almost exact guess from that. _________________
I don't know where I'm going, but I'll figure it out when I get there.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum