Hi,
I'm using GDB to debug an application on a remote ARM target, compiled in Thumb
mode (16-bit).
When the size of the locals is too big (apparently something close to 512
bytes), GDB is unable to display the call stack.
See sample code below:
void NoBugStack(void)
{
char buf[508];
buf[0] = 0;
}
void BugStack(void)
{
char buf[509];
buf[0] = 0;
}
When you set a breakpoint at line 5 (function "NoBugStack"), everything's fine.
On the other hand, when you set a breakpoint at line 12 (function "BugStack"),
GDB is unable to display the call stack (the command "bt" returns an error).
The only difference between the 2 functions is
the size of the locals.
The file was compiled with GCC 3.4.3, with the following command line:
arm-elf-gcc.exe -g -c -Wall -Wcast-align -mthumb-interwork -mlittle-endian
-msoft-float -pipe -mcpu=arm920t -fomit-frame-pointer -fshort-enums
-mstructure-size-boundary=8 -mthumb
Additional notes:
- This does not happen when the application is compiled in ARM mode (32-bit)
- I've reproduced the problem with 2 different types of ARM target, so it does
not seem caused by the target itself.
Thanks for your help,
Thierry
P.S.: I’ve filled a bug report
http://sourceware.org/bugzilla/show_bug.cgi?id=9742