Welcome! Log In Create A New Profile

Advanced

Strange bug reported by powerpc-gekko-addr2line

Posted by SteelSLasher 
Strange bug reported by powerpc-gekko-addr2line
April 16, 2009 03:33PM
I got powerpc-gekko-addr2line working fine now but the bugs it showed were a bit strange.

C:\Users\Sameh>C:\DevkitPro\devkitPPC\bin\powerpc-gekko-addr2line.exe -e C:\WiiB
rowse\WiiBrowse.elf 800555d0 80062e78 8000666e 80006980 800043a4 8008f3d0
??:0
c:\devkitpro\devkitppc\bin\../lib/gcc/powerpc-gekko/4.2.4/../../../../powerpc-ge
kko/include/c++/4.2.4/ext/new_allocator.h:107
c:/WiiBrowse/source/main.cpp:60
c:/WiiBrowse/source/main.cpp:163
e:/projects/devkitPro/buildscripts/newlib-1.16.0/libgloss/rs6000/crtmain.c:18
lwp_threads.c:0

line 60 is
s32 ip;

and the lines after are
while ((ip = net_init()) == -EAGAIN)
	{
		mainwindow->Draw();
		splash.Draw();
	}

The entire source of main.cpp is at [onsinch.pastebin.com] note that net_init() is a C function not C++



Ignore all below!
I need some help using the powerpc-gekko-addr2line to debug my app.

I made a batch file to run the app:
C:\devkitPro\devkitPPC\bin\powerpc-gekko-addr2line.exe -e C:\WiiBrowse\WiiBrowse.elf

But when i run it it shows a blank line, i assumed you type the address line here but if i do then on the next line this is shown
??:00

I then altered the batch file to this:
C:\devkitPro\devkitPPC\bin\powerpc-gekko-addr2line.exe -e C:\WiiBrowse\WiiBrowse.elf 0x800555d0

When i run it just closes the window instantly.



Edited 1 time(s). Last edit at 04/16/2009 10:03PM by SteelSLasher.
Re: Help using powerpc-gekko-addr2line to debug apps
April 16, 2009 06:01PM
You should run it like this:

C:\devkitPro\devkitPPC\bin\powerpc-gekko-addr2line.exe -e C:\WiiBrowse\WiiBrowse.elf 800555d0 80409595 80299933

Where you have included all the addresses under STACK DUMP (the ones separated by -->)

Then you will get output like this:

??:00
video.cpp:93
stuff.cpp:203
main.cpp:402

Which is showing you it went from main.cpp line 402, to stuff.cpp line 203, to video.cpp line 93, to an unrecorded file line ??
You'll just have to live with looking at the other lines and hope they help you (especially the last one, ie: video.cpp:93)

P.S.: I would put C:\devkitPro\devkitPPC\bin\ in your windows path so you don't need to type that part out every time.
Re: Help using powerpc-gekko-addr2line to debug apps
April 16, 2009 08:06PM
thanks for that, also setting it as a windows path, is that by any chance setting a global system variable

also while i have your attention, why can't images be inserted into windows as elements (libwiigui) and will a future release involve built in threads or is there some material describing how threads should be used considering a GUI. I am finding it a bit hard to grasp how threads should be used in libwiigui by looking at the demo.cpp functions

Will reply on success or failure



Edited 1 time(s). Last edit at 04/16/2009 08:12PM by SteelSLasher.
Re: Strange bug reported by powerpc-gekko-addr2line
April 16, 2009 10:05PM
Success but read first post again
Re: Help using powerpc-gekko-addr2line to debug apps
April 16, 2009 10:46PM
Quote
SteelSLasher
thanks for that, also setting it as a windows path, is that by any chance setting a global system variable

also while i have your attention, why can't images be inserted into windows as elements (libwiigui) and will a future release involve built in threads or is there some material describing how threads should be used considering a GUI. I am finding it a bit hard to grasp how threads should be used in libwiigui by looking at the demo.cpp functions

Will reply on success or failure

Images can be inserted as elements, that's what the GuiImage class is for (inherited from GuiElement). I'm personally not going to explain basic threading concepts or write a tutorial on that. Threading is actually not required. The reason it's not in libwiigui is because I've avoided adding any implementation-specific code to the core. The template works perfectly fine and shows how to use libwiigui with threading. By no means is it the only way to use libwiigui.
Re: Strange bug reported by powerpc-gekko-addr2line
April 17, 2009 12:54PM
When i tried to insert an image into a window it doesnt compile, will try again
Sorry, only registered users may post in this forum.

Click here to login