I am using arm cortex M3 (LPC1833 controller), I created manually stack overflow in code and trying to debug through GDB I am facing below issue of the corrupted stack in GDB tool on windows platform. My output of GDB is as shown below in that instead of the function name its showing "?? ()". Could anyone help to figure out why it's not showing function name?
My output:-
C:\HardFault_LLC>arm-none-eabi-gdb OpImage_BC.axf -ex "set target-charset ASCII" -ex "target remote | CrashDebug --elf OpImage_BC.axf --dump MainCrashDump.txt"GNU gdb (GNU Tools for ARM Embedded Processors) 7.3.1.20121016-cvsCopyright (C) 2011 Free Software Foundation, Inc.License GPLv3+: GNU GPL version 3 or later <gnu.org/.../gpl.html>This is free software: you are free to change and redistribute it.There is NO WARRANTY, to the extent permitted by law. Type "show copying"and "show warranty" for details.This GDB was configured as "--host=i586-mingw32 --target=arm-none-eabi".For bug reporting instructions, please see:<www.gnu.org/.../>...Reading symbols from C:\HardFault_LLC/OpImage_BC.axf...done.Remote debugging using | CrashDebug --elf OpImage_BC.axf --dump MainCrashDump.txt0x08070604 in ?? ()(gdb) BT#0 0x08070604 in ?? ()#1 0x1b00f65a in i2cRead () at ../src/AP/system/common_cli.c:176#2 0x00010f14 in ?? ()#3 0x00010f14 in ?? ()Backtrace stopped: previous frame identical to this frame (corrupt stack?)(gdb)
(gdb) info registers
r0 0x0 0r1 0x0 0r2 0x80063 524387r3 0x4030201 67305985r4 0x10080c1a 268962842r5 0x10080052 268959826r6 0x1b03e938 453241144r7 0x10080c1a 268962842r8 0xa5a5a5a5 -1515870811r9 0xa5a5a5a5 -1515870811r10 0xa5a5a5a5 -1515870811r11 0xa5a5a5a5 -1515870811r12 0x10080052 268959826sp 0x100058f8 0x100058f8lr 0x1b00f65b 453047899pc 0x8070604 0x8070604xpsr 0x61000000 1627389952msp 0x10089fc8 269000648psp 0x100058d8 268458200(gdb)