This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: container_of equivalent in gdb-python script


Tom Tromey wrote:
>>>>>> "Jan" == Jan Kiszka <jan.kiszka@web.de> writes:
> 
> Jan> Yeah, seen this (in the testsuite). But such objects neither have
> Jan> addresses, nor do they help with non-constant objects I'm interested in.
> 
> Yeah.  You can use this for "offsetof" but it sounds like you wanted
> more.

Yep, essentially instantiate a gdb.Value object of arbitrary type at an
arbitrary address.

> 
> Tom> Whoops, this seems to be undocumented.
> 
> Jan> Not the only piece... :)
> 
> Please report anything you think is missing.  We try very hard to
> document the entirety of the Python API; anything missing is due to an
> oversight.  I will write doc patches for anything you "don't" find ;)
> 

I have to correct myself: Actually looking at the right documentation, I
find all the latest features described (I was probably still starring at
6.8 docs...).

Jan

Attachment: signature.asc
Description: OpenPGP digital signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]