I remember that with an old SDK I could get Addr2Line to work, but since some SDK (or OS4?) update I've never had any success. All it outputs is:
??
??:0
I am compiling my C++ program with the -ggdb option. When it crashes, I am taking the offset from the Grim Reaper, and passing it to Addr2Line along the lines of:
ppc-amigaos-addr2line -e program_name -f offset2
Or just:
addr2line -e program_name -f offset2
For example:
addr2line -e FooBar -f 0xc9b70r
Does anyone have any suggestions?
I see you've been answered elsewhere, but for the sak of completeness, I'll answer here too.
Later SDKs changed slightly, and addr2line needs to be told which section to use, rather than just guessing. The command to use is:
addr2line -e --section=.text
That works just fine. Don't forget to compile with the -g or -gstabs option. -ggdb adds extra debug info that is specific to gdb, and will take longer to compile. This extra debug is not used by addr2line.
Simon
@Rigo
Thanks for the clarification. I will only use -g in the future.
Author of the PortablE programming language.
I love using Amiga OS4.1 on my X1000 & Sam440 :-D
That should, of course, be:
addr2line -e <bin> --section=.text <addr>
(The htmlparser filtered the bin and addr as tags)
Simon