Shop OBEX P1 Docs P2 Docs Learn Events
Another GDB attempt — Parallax Forums

Another GDB attempt

I thought I'd starting playing with GDB again and see where it goes. I didn't get very far :(
$ propeller-elf-gcc -m32bit-doubles -Wall -save-temps --std=gnu++0x -fno-exceptions -fno-rtti -fno-threadsafe-statics -mlmm -O0 -g -I"Tons/of/includes/here"  -o CMakeFiles/Blinky_Demo.dir/Blinky_Demo.cpp.obj -c <project root>/PropWare/Examples/PropWare_Blinky/Blinky_Demo.cpp
$ propeller-elf-gcc    -mlmm -oBlinky_Demo.elf CMakeFiles/Blinky_Demo.dir/Blinky_Demo.cpp.obj ../../PropWare/models/lmm/libPropWare.a ../../external_libs/lmm/libLibpropeller.a ../../external_libs/lmm/libSimple.a 
Code size  = 5332
Total size = 5504
$ propeller-elf-gdb -b 460800 Blinky_Demo.elf
Propeller Version 1 on /dev/ttyUSB0
error: unable to debug this ELF file: __ccr__ symbol missing
error: load failed
$ nm Blinky_Demo.elf | grep ccr
$

Any idea why the ccr symbol is missing?

Comments

  • At a minimum you should add "-g" to both your compile and link command lines. I think __ccr__ is a symbol that's only defined in the debug versions of the kernel (I'm not certain of that, it's been a while since I looked at it; but I do remember that on the propeller gdb needs some symbols that are only defined when -g is given).
  • The link line was it, thanks. It is indeed needed in both compile and links steps.
  • Okay, with that hurdle passed, I've run into another problem. GDB seems to require that gdbstub be found via $PATH. I made some changes to PropWare not too long ago which allows it to run without modifying the PATH variable, which means I no longer have PropGCC (or gdbstub) in PATH. Should I log an issue on GitHub, or is there a way around this? Maybe a command line switch to gdb that allows me to specify gdbstub's location?
Sign In or Register to comment.