1

I'd like to run gdb (or gdb-peda) with ltrace like info on each syscall. How can I do that?

I know that, as per ltrace and gdb attach to same process , you can't actually attach ltrace and gdb to the same process. But, once a process is under gdb, it should be fairly straightforward to catch each lib call and print out its args and return vals, just like ltrace does.

In fact, it would be possible, and valuable, to go a step further: run gdb or gdb-peda, and print out every call (not just lib calls, with params and return val. How can I do this?

1 Answer 1

1

If you really want to use GDB to do this, the best option may be scripting it via its Python API.

Examples:

Not the answer you're looking for? Browse other questions tagged or ask your own question.