This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

command line gdb debugging symbols/stack trace

Using the pure-gcc makefiles, at present I only see this for a stack trace in the command line gdb client:

(gdb) bt
#0  0xfffffffe in ?? ()
#1  <signal handler called>
#2  0x00000000 in ?? ()

This is weird because I do have symbols:

(gdb) info break
Num     Type           Disp Enb Address    What
1       breakpoint     keep y   0x00017512 in main at ../main.c:100
2       breakpoint     keep y   0x00016c92 in gsm_uart_connect at ../gsm_ublox_sara.c:239

I'm using -ggdb in my CLFAGS:

CFLAGS += -DDEBUG -ggdb -O0

but have also tried with -g3:

CFLAGS += -DDEBUG -g3 -O0

I start the gdb server with:

JLinkGDBServer -if swd -device nrf51822 -speed 1000 -port 2331

and the client with:

/Users/Eliot/dev/gcc-arm-none-eabi-4_8-2013q4/bin/arm-none-eabi-gdb _build/device-nordic_s110.elf

My .gdbinit is just the one generated by the makefiles:

target remote localhost:2331
break main

(As an aside, it would be helpful to have a value for TERMINAL in the Makefiles for Mac so that I can simply run 'make startdebug', but I haven't been able to find one that works.)

Related