Skip to content

Tag: gdb

unable to source user defined python gdb command

I’ve been following this amazing (video) tutorial to create custom user defined GDB command using python here is my code but when I try to source this code inside gdb I get following error: what I’m doing wrong? Answer what I’m doing wrong? Python is indentation-sensitive. You want:

Memory dump formatted like xxd from gdb

I’m trying to inspect a buffer which contains a binary formatted message, but also contains string data. As an example, I’m using this C code: I’d like to get a hex dump of what’s in buf, of a format similar to xxd (I don’t care if it’s an exact match, what I’m really…

How to access the keys or values of Python GDB Value

I have a struct in GDB and want to run a script which examines this struct. In Python GDB you can easily access the struct via Now I got this variable called mystruct which is a GDB.Value object. And I can access all the members of the struct by simply using this object as a dictionary (likemystruct[‘me…