Author
Topic: [QUESTION] How to debug application? (Read 983 times)

I'm working on porting an app for the gcw0. I'm using a debian distro (wheezy) running through vmware, I have already installed the gcw0 toolchain, compiled the app and built an opk using the OpenPackageCreator program.

I copy the opk to the sdcard and it runs fine, but I found some bugs when using the program. Does anybody know how to get some debug info?, even something basic like reading stderr output would be fine for me .

Can I use telnet for that purpose? It would be great if I could launch the app directly from debian (vmware), is that posible?

Yes, you can use telnet for that. GDB and other tools are available for development/debugging, and they're all present on the rootfs already.In case your application requires binding the framebuffer (if it uses video) you can run the "terminal" application before, so it leaves the framebuffer available.

You can read the output of the program opening the "Log viewer" in the "Settings" tab (it was available in the A320, so I guess it's still there in the Zero). It shows you the output of the last program you used.

Hi, ok I trying to debug an app I'm working on. As I said earlier I'm using a debian distro running through vmware, I have already installed the rndis drivers in windows 7 and I can telnet to 10.1.1.2 to connect to the zero.

But now I'm a bit lost, do I have to copy the executable file to the zero to launch it?

Could someone be kind enough to post the necessary steps to launch an app from telnet? What I want to achieve is simply, browse to the folder where I built the app and run it in the zero, and get the console output in the pc.

I remember I did something similar with the dingoo and the psp. But I forgot how to do it ;P.

[EDIT]

Ok, I managed to launch the app from telnet . It was quite easy after all, just sent the executable to the sdcard through ftp. Then telnet to 10.1.1.2 and launched the app, and I get the printf output to the telnet window. Excelent.

If you're making a graphical application, run the "Terminal" application in gmenu2x to make gmenu2x release its control of the screen so the application launched from telnet can access the screen instead.

If you want to debug crashes, you can run your application in gdb ("gdb appname" on the command line in telnet, then "run" at the gdb prompt) and use the gdb "bt" command to see a stack trace of where the crash happened.