Pandora Debugging on the Pandora (And full screen/FB issues)


ZXDunny

Deep avatar
Joined
Oct 12, 2010
Messages
2,585
Ok, Got stuff compiling and more surprisingly running well here. My previous demos have been with an incomplete BASIC interpreter, and now I'm getting ready to release this thing.


I'm compiling with FPC 2.4.2 currently and due to differences in behaviour with pointers as opposed to the x86 version of the compiler, I'm running into bugs. Problem is, I'm used to coding in Delphi and the debugging suite is just fantastic in that IDE. Not so on the Pandora, however. So...


Given that this is (currently) a full-screen SDL app, how do I debug when things go wrong? I can generate GDB files and include debug info, but how do I get it? All I get is an Access Violation at such-and-such an address. Delphi will halt the program and jump to the source line that caused the error, but I'm forced to run in a terminal on the Pandora, as it's not capable of running Lazarus :(


I've tried GDB, and that runs the app but when it causes the access violation the whole pandora locks up to the point that all I can do is hard-reboot.


So now I'm reduced to inserting log entries at strategic points :( Oh, and as I'm in windows, having to swap SD cards to get the new binary onto the pandora is a pain. I've tried wifi networking, but the speed is incredibly slow (about 30 secs to transfer a 2.8mb file!). Any suggestions? I've also tried using SD Mass-Storage mode, but it's a gamble as to whether or not the card will be visible to the main PC when it's active :(


The other thing is this: SDL is bloody slow - is there any way to access the screen directly (bearing in mind I'm not coding in C)?


Cheers,


D.
 
ihmo the best strategy is to ssh to your pandora, then :



Code:
export DISPLAY=:0;xauth merge $HOME/.Xauthority

cd /to/your/working/dir

gdb binary

break main

...

run

or you could use gdb deamon, but I know no gdb frontend that support this feature
 
Last edited by a moderator:
ihmo the best strategy is to ssh to your pandora, then :



Code:
export DISPLAY=:0;xauth merge $HOME/.Xauthority

cd /to/your/working/dir

gdb binary

break main

...

run

or you could use gdb deamon, but I know no gdb frontend that support this feature

Nemiver?

Nemiver Features

Robust. Its maintainers hate seeing it crashing. A debugger really should never crash. If you experience a crash, please please please, report it!. We'll take pride in fixing it.


Fast. We hate splash screens. We prefer trying hard to make the damn thing start fast


Reasonable memory consumption. We want to give a chance to people with humble machines to debug their native applications


GTK+ standalone graphical debugger. No need to setup a project just to debug a binary that you already have


GNOME integration: options are stored in GConf or GSettings. We use the same text engine as GEdit (we have the same code syntax highlighting), and more generally, we heavily rely on the GNOME platform


Breakpoints are saved when you close Nemiver: when you restart it on the same binary you don't have to re-set the breakpoints


Support for debugging applications running on remote machines (using gdbserver)Emphasis mine


Support attaching to running processes by just giving the name of the process (not necessarily needed to specify the PID of the process to attach to)


Basic stuff: breakpoint, conditional breakpoints, next, step into, jump to arbitrary execution addresses, inspecting of variables, calling an arbitrary functions in the inferior, etc...


Watchpoints


Ability to change the value of a variable


Ability to copy the content of a variable into the GTK clipboard


Ability to copy the call stack into the GTK clipboard


Advanced tooltips to show the content of variables ( see the screencast)


Ability to inspect or set the memory of the inferior program


Ability to inspect and set the registers of the inferior program


Integrated disassembler:


switches the source view to disassembly mode and automatically disassembles instructions around the current instruction pointer - this is useful e.g, when debugging a binary that doesn't have debug info installed; in that case, Nemiver automatically switches to disassembly mode.


supports mixed source and assembly mode


If the underlying GDB crashes, no need to re-launch Nemiver. Just re-starting the inferior should transparently bring up a new GDB
 
Back
Top