Byron Hawkins
Byron Hawkins

Reputation: 2705

Can a gdb backtrace somehow omit the argument values?

I'm working on some modifications to DynamoRIO, which uses byte* for pointers into the code cache. When I'm debugging in gdb, the backtrace command thinks every byte* is null terminated, so it prints this massive spew of byte values all over the backtrace. I need a way to either:

  1. Turn off the display of arguments in the backtrace, or
  2. Change the way gdb prints a byte* (preferably just the pointer value as a hex number)

Upvotes: 2

Views: 1829

Answers (1)

scottt
scottt

Reputation: 7238

  1. Use "set print frame-arguments none" to turn off display of arguments in backtraces. See GDB Manual: Print Settings.
  2. You can also write a pretty printer in Python and register it with GDB to change how byte * are displayed.

Upvotes: 4

Related Questions