Thanks! Okay I'll give that a try.
I tried ulimit initially and it told me that the GP2X was already set to "unlimited".
I'd read that in some casees, the system won't produce a core dump when a floating point exception is generated.
______________
Okay, I've run "ulimit -c unlimited" and produced a core file. Previously to this I'd done a "make clean" to clear out all my *.o and then added "-ggdb" so that "arm-linux-g++" will include debugging info.
Since this is a threaded app, I backed up /lib/libpthread-0.9.so and copied the non-stripped version to this location.
I then ran "gdb prog.gpe core". The resulting backtrace is disappointing:
(gdb) bt
#0 0x0029e020 in ?? ()
Cannot access memory at address 0xff
Am I still doing something wrong? Or is this the limit to gdb's ability?
Here's the full story:
QUOTE
[root@gp2x mamegp2x_3.8]$./gdb --exec=mame_gp2x_test.gpe --core=core.103
warning: Symbol "td_init" not found in libthread_db: ./gdb: undefined symbol: td
_init
GNU gdb 6.4
Copyright 2005 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "arm-gp2x-linux".
warning: core file may not match specified executable file.
Core was generated by `./mame_gp2x_test.gpe polepos'.
Program terminated with signal 8, Arithmetic exception.
#0 0x0029e020 in ?? ()
(gdb)
(gdb) bt
#0 0x0029e020 in ?? ()
(gdb)
#0 0x0029e020 in ?? ()
(gdb)
Any further assistance?
EDIT:
Okay found it, I was removing the symbol table using "-s" option when calling g++
EDIT AGAIN:
Still having problems. Even with a symbol table I'm only getting this:
QUOTE
GNU gdb 6.4
Copyright 2005 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "arm-gp2x-linux"...Using host libthread_db library "/
lib/libthread_db.so.1".
warning: core file may not match specified executable file.
Core was generated by `./mame_gp2x_test.gpe'.
Program terminated with signal 8, Arithmetic exception.
#0 0x0029e020 in __div0 ()
(gdb)
(gdb) bt all
No symbol "all" in current context.
(gdb)
Still need some help in tracking where this div by 0 is occuring...