On 2011-10-27 21:38, Tom Tromey wrote: >>>>>> "Jan" == Jan Kiszka writes: > > Jan> [1] http://permalink.gmane.org/gmane.comp.gdb.devel/25898 > > Nice. > > To answer your question there: > > Jan> (does someone know how to switch of the add-symbol-file output?) > > From Python you can to gdb.execute(..., to_string = True). > I forget when we added this parameter. > > From the CLI you can use the 'set logging' family of commands to > temporarily disable output. > > > From the code: > > def offset_of(type, field): > return gdb.parse_and_eval('(unsigned long)&( (' + str(type) + ' *)0)->' + str(field)) > > You can look up the field in the type and get the offset more directly. > But this works too. Yeah, works nicely. Was unfortunately not yet available in 7.1. Thanks, Jan