gdb
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem to backtrace the stack on an ARM target


From: Thierry
Subject: Problem to backtrace the stack on an ARM target
Date: Mon, 2 Feb 2009 13:44:50 +0000 (GMT)

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







reply via email to

[Prev in Thread] Current Thread [Next in Thread]