Welcome! Log In Create A New Profile

Advanced

Help with Code Dump debugging!

Posted by mdbrim 
Help with Code Dump debugging!
August 31, 2009 05:09AM
So i've done some searching of the forum and google and discovered the addr2line feature in devkitpro. But when i run it with my stack dump code in there, all i get are the ??:0 (like many others i've found)

I've done what Tantric mentions about putting all the addresses in at the same time (....addr2line.exe -e program.elf 8133883c 8133a0 813a373c .......)

I've also made sure my make file has the -g in the CFLAGS part too.

I looked at my .elf.map file and noticed none of the addresses in my code dump show up in the map file... there aren't even what i would consider close.

Is my crash happening outside my code? (saw that mentioned in a post but not sure what it means)
Any other ways to debug this code dump other than addr2line (since that seem to no workie for me)?

NOTE: My code only creates the code dump one in 15 times that i play andd exit. MOST of the time it exits fine... but once every 15 or 20 times exit, it'll randomly do it.

I can live with this ratio but i hate to release this brew and have someone get bugged by it (nice pun!)
Re: Help with Code Dump debugging!
August 31, 2009 07:58AM
Possibly not the neatest but one another way is open your program's dol file in ida pro and search for the first few words out of code dump you see on screen.

Though you need to be able to use ida pro, system menu section has some guides about it : [forum.wiibrew.org]
Re: Help with Code Dump debugging!
August 31, 2009 01:06PM
Quote
mdbrim
So i've done some searching of the forum and google and discovered the addr2line feature in devkitpro. But when i run it with my stack dump code in there, all i get are the ??:0 (like many others i've found)
This tends to mean a nulled pointer is being used, has happened to me a lot but after learning about pointers its stopped occuring.

Also, are there any really odd occurences in addresses something like "000000xx" or repeats of addresses.
Re: Help with Code Dump debugging!
August 31, 2009 06:10PM
if you are using pointer arrays, exchange them with strings and vector classes;)
Re: Help with Code Dump debugging!
September 01, 2009 11:55AM
Quote
YoshiParty
if you are using pointer arrays, exchange them with strings and vector classes;)
or learn as much as possible from this link [www.eskimo.com]
Re: Help with Code Dump debugging!
September 13, 2009 11:03PM
thanks for the ideas guys but it isn't a null pointer issue.

If i could just find a way to successfully translate this dump!

any other ideas?
Re: Help with Code Dump debugging!
September 15, 2009 09:00AM
It's possible that you enter the wrong numbers... The first number in the line is the address, it is followed by a colon and some other numbers which represent the commands executed at that address. If you gave us the full code dump it would be much easier for us to help you.
Re: Help with Code Dump debugging!
September 16, 2009 02:24AM
I don't think so.

Link to Image

That's what it spits out at me... things to note:

It has been the same dump even thought the code as gone thru many many changes... ie the address remains the same and i can't find any of those addresses when i look at the elf file or run the addr2line

Appreciate all the help...
Re: Help with Code Dump debugging!
September 16, 2009 10:13AM
From the first post it seems like you're entering the right numbers (the second one is missing a few digits though). If you're still unable to find the right line, why don't u just upload the .elf file so we can try it ourselves and see what we get?
Re: Help with Code Dump debugging!
September 16, 2009 12:01PM
Sounds more like something is writing on your stack, and thus overwrites your return pointers and making the backtrace useless. This can be hack to track down.

See: [en.wikipedia.org]
Re: Help with Code Dump debugging!
September 16, 2009 07:30PM
AmitR... i'll be happy to upload the elf file... i'll throw it up on google code when i get back to home computer.

Daid... an interesting read... i do have a number of buffers that change during the game and one may be overflowing every once and a while... this may also explain why it only happens at random exits (1 in 15 times)... i'll take a look at my buffers when i get home...

But is that something that would continue to work during the game and then display the crash on exit? It never crashes during the game... only when i leave.

i'm hopefully making progress on fixing this annoying bug!
Sorry, only registered users may post in this forum.

Click here to login