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: Multiple breakpoint issue when debugging loadable kernel module


>>>>> "Jan" == Jan Kiszka <jan.kiszka@web.de> 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.

Tom


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