color-backtrace icon indicating copy to clipboard operation
color-backtrace copied to clipboard

Is it possible to print addresses?

Open s1341 opened this issue 3 years ago • 5 comments

Is it possible to print the addresses for each line of backtrace?

s1341 avatar Apr 20 '21 16:04 s1341

Currently, this is not supported. In which situations would you consider this useful? When no symbols are available?

athre0z avatar Apr 21 '21 06:04 athre0z

Both when no symbols are available and when debugging third-party closed-source stuff, where you might not have source line numbers, so you need the address to tell in a disassembler where the frame actually is. Any chance you could add this feature?

s1341 avatar Apr 21 '21 15:04 s1341

I personally don't have much use for this, so it's somewhat unlikely that I'd add this myself. I tend to just attach a debugger for cases like this and bt (because the address without a debugger is rather useless anyway). But I'd accept a PR that introduces this in an opt-in way, if you're interested.

athre0z avatar Apr 22 '21 20:04 athre0z

For my use case, just attaching a debugger is not an option. I'll submit a PR.

s1341 avatar Apr 23 '21 06:04 s1341

Opened PR #44

s1341 avatar Apr 23 '21 08:04 s1341