Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
77 user(s) are online (51 user(s) are browsing Forums)

Members: 1
Guests: 76

Hypex, more...

Headlines

 
  Register To Post  

Addr2Line doesn't work
Home away from home
Home away from home


See User information
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?

Author of the PortablE programming language.
Go to top
Re: Addr2Line doesn't work
Home away from home
Home away from home


See User information
@ChrisH

Quote:

addr2line -e foobar --section=.text 0xc9b70r


And i always use "-g" , not "-ggdb". Maybe addr2line support -ggdb, but its different in compare with plain -g , and in my case i always use -g + add --section=.text to addr2line itself, and all is works.

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: Addr2Line doesn't work
Just can't stay away
Just can't stay away


See User information
@ChrisH
An article at HDR Lab recommends a different debug option but I think -g works as kas1e has stated.

Go to top
Re: Addr2Line doesn't work
Home away from home
Home away from home


See User information
@kas1e
Thanks you! Adding "--section=.text" got it working

Author of the PortablE programming language.
Go to top
Re: Addr2Line doesn't work
Quite a regular
Quite a regular


See User information
It's changes in elf.library that have made the difference.

I use the alias "whereis", as in:

"whereis 5689" (you don't need the "0x" prefix)

The alias is "Alias whereis addr2line -j.text -sfe currimage []",

...which gives the name/line number of the source module and the name of the function.

cheers
tony
Go to top
Re: Addr2Line doesn't work
Amigans Defender
Amigans Defender


See User information
ISTR -gstabs is the recommended debug option to use.

Go to top
Re: Addr2Line doesn't work
Home away from home
Home away from home


See User information
Quote:

xenic wrote:
@ChrisH
An article at HDR Lab recommends a different debug option but I think -g works as kas1e has stated.


Thanks for the link to Hans' page
Easy to use even for a non-coder

People are dying.
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project