Skip to content
Advertisement

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:

How can I set up launch.json in Visual Code to debbug C

I’m newbie about Visual Code. I’d like to use Debbuging function with Visual Code. But There is a probelm to do it. It may happen by wrong launch.json setting(In my opnion) I’m using mac os newest version. I refered to some pages to do it myself. https://code.visualstudio.com/docs/languages/cpp https://github.com/Microsoft/vscode-cpptools/blob/master/launch.md https://code.visualstudio.com/docs/python/debugging However I saw same error. It said “launch: program ‘${/Users/bpk/Documents/Study/C/Study}/study’ does

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 looking for is a hex dump side

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[‘member’]). The problem is,

Advertisement