This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: gdb-6.5 produces infinite backtrace on ARM
Daniel Jacobowitz wrote:
> On Mon, Aug 21, 2006 at 01:32:04PM +0200, Zarges, Olav wrote:
>> Sounds pretty good. Good job! I can't wait to lay my hands on the patch...
>>
>> Another question arose from you answer: what is a gdb/mi front-end supposed
>> to do when a message like
>>
>> "Backtrace stopped: frame did not save the PC" or
>> "Previous frame identical to this frame (corrupt stack?)" or
>> ...
>>
>> is returned at the end of the backtrace? Eclipse just throws away the
>> complete backtrace for the corresponding thread.
>
> What other versions of GDB are you looking at? With older versions, it was an
> ^error; with newer it's a ~"console output message". I would not
> expect Eclipse to throw away the backtrace if there's a console output
> message.
I just verified it with gdb-6.3 which doesn't show any backtrace at all when
setting backtrace limit (--> Backtrace limit of 20 exceeded, see dump-6.3.txt).
The current version gdb-6.5 shows backtrace and the message "Previous frame
identical to this frame (corrupt stack?)" (see dump-6.5.txt). Eclipse then
fails to show any bt info at all for this thread (I can supply a screenshot
of this behaviour, 109 KByte PNG).
btw: I'm using the latest Eclipse and CDT release.
(gdb) t a all bt
Thread 4 (thread 32771):
#0 0x402a319c in nanosleep ()
from /opt/crosstool/gcc-3.4.4-glibc-2.3.5-linux-2.6.12/arm-softfloat-linux-gnu/arm-softfloat-linux-gnu/lib/libc.so.6
#1 0x402a3078 in sleep ()
from /opt/crosstool/gcc-3.4.4-glibc-2.3.5-linux-2.6.12/arm-softfloat-linux-gnu/arm-softfloat-linux-gnu/lib/libc.so.6
#2 0x00008784 in f2 () at ../threads.cpp:31
#3 0x000087a4 in thread_function2 () at ../threads.cpp:36
#4 0x40024410 in pthread_start_thread ()
from /opt/crosstool/gcc-3.4.4-glibc-2.3.5-linux-2.6.12/arm-softfloat-linux-gnu/arm-softfloat-linux-gnu/lib/libpthread.so.0
#5 0x40024410 in pthread_start_thread ()
from /opt/crosstool/gcc-3.4.4-glibc-2.3.5-linux-2.6.12/arm-softfloat-linux-gnu/arm-softfloat-linux-gnu/lib/libpthread.so.0
#6 0x40024410 in pthread_start_thread ()
from /opt/crosstool/gcc-3.4.4-glibc-2.3.5-linux-2.6.12/arm-softfloat-linux-gnu/arm-softfloat-linux-gnu/lib/libpthread.so.0
#7 0x40024410 in pthread_start_thread ()
from /opt/crosstool/gcc-3.4.4-glibc-2.3.5-linux-2.6.12/arm-softfloat-linux-gnu/arm-softfloat-linux-gnu/lib/libpthread.so.0
#8 0x40024410 in pthread_start_thread ()
from /opt/crosstool/gcc-3.4.4-glibc-2.3.5-linux-2.6.12/arm-softfloat-linux-gnu/arm-softfloat-linux-gnu/lib/libpthread.so.0
#9 0x40024410 in pthread_start_thread ()
from /opt/crosstool/gcc-3.4.4-glibc-2.3.5-linux-2.6.12/arm-softfloat-linux-gnu/arm-softfloat-linux-gnu/lib/libpthread.so.0
#10 0x40024410 in pthread_start_thread ()
from /opt/crosstool/gcc-3.4.4-glibc-2.3.5-linux-2.6.12/arm-softfloat-linux-gnu/arm-softfloat-linux-gnu/lib/libpthread.so.0
#11 0x40024410 in pthread_start_thread ()
from /opt/crosstool/gcc-3.4.4-glibc-2.3.5-linux-2.6.12/arm-softfloat-linux-gnu/arm-softfloat-linux-gnu/lib/libpthread.so.0
---Type <return> to continue, or q <return> to quit---
#12 0x40024410 in pthread_start_thread ()
from /opt/crosstool/gcc-3.4.4-glibc-2.3.5-linux-2.6.12/arm-softfloat-linux-gnu/arm-softfloat-linux-gnu/lib/libpthread.so.0
#13 0x40024410 in pthread_start_thread ()
from /opt/crosstool/gcc-3.4.4-glibc-2.3.5-linux-2.6.12/arm-softfloat-linux-gnu/arm-softfloat-linux-gnu/lib/libpthread.so.0
#14 0x40024410 in pthread_start_thread ()
from /opt/crosstool/gcc-3.4.4-glibc-2.3.5-linux-2.6.12/arm-softfloat-linux-gnu/arm-softfloat-linux-gnu/lib/libpthread.so.0
#15 0x40024410 in pthread_start_thread ()
from /opt/crosstool/gcc-3.4.4-glibc-2.3.5-linux-2.6.12/arm-softfloat-linux-gnu/arm-softfloat-linux-gnu/lib/libpthread.so.0
#16 0x40024410 in pthread_start_thread ()
from /opt/crosstool/gcc-3.4.4-glibc-2.3.5-linux-2.6.12/arm-softfloat-linux-gnu/arm-softfloat-linux-gnu/lib/libpthread.so.0
#17 0x40024410 in pthread_start_thread ()
from /opt/crosstool/gcc-3.4.4-glibc-2.3.5-linux-2.6.12/arm-softfloat-linux-gnu/arm-softfloat-linux-gnu/lib/libpthread.so.0
#18 0x40024410 in pthread_start_thread ()
from /opt/crosstool/gcc-3.4.4-glibc-2.3.5-linux-2.6.12/arm-softfloat-linux-gnu/arm-softfloat-linux-gnu/lib/libpthread.so.0
#19 0x40024410 in pthread_start_thread ()
from /opt/crosstool/gcc-3.4.4-glibc-2.3.5-linux-2.6.12/arm-softfloat-linux-gnu/arm-softfloat-linux-gnu/lib/libpthread.so.0
Thread 3 (thread 32769):
#0 0x402c8d60 in poll ()
from /opt/crosstool/gcc-3.4.4-glibc-2.3.5-linux-2.6.12/arm-softfloat-linux-gnu/arm-softfloat-linux-gnu/lib/libc.so.6
#1 0x40024114 in __pthread_manager ()
from /opt/crosstool/gcc-3.4.4-glibc-2.3.5-linux-2.6.12/arm-softfloat-linux-gnu/arm-softfloat-linux-gnu/lib/libpthread.so.0
#2 0x40024304 in __pthread_manager_event ()
from /opt/crosstool/gcc-3.4.4-glibc-2.3.5-linux-2.6.12/arm-softfloat-linux-gnu/arm-softfloat-lin-ux-gnu/lib/libpthread.so.0
--Type <return> to continue, or q <return> to quit---
#3 0x40024304 in __pthread_manager_event ()
from /opt/crosstool/gcc-3.4.4-glibc-2.3.5-linux-2.6.12/arm-softfloat-linux-gnu/arm-softfloat-linux-gnu/lib/libpthread.so.0
Previous frame identical to this frame (corrupt stack?)
Thread 2 (thread 16386):
#0 f1 () at ../threads.cpp:13
#1 0x0000870c in thread_function1 () at ../threads.cpp:18
#2 0x40024410 in pthread_start_thread ()
from /opt/crosstool/gcc-3.4.4-glibc-2.3.5-linux-2.6.12/arm-softfloat-linux-gnu/arm-softfloat-linux-gnu/lib/libpthread.so.0
#3 0x40024410 in pthread_start_thread ()
from /opt/crosstool/gcc-3.4.4-glibc-2.3.5-linux-2.6.12/arm-softfloat-linux-gnu/arm-softfloat-linux-gnu/lib/libpthread.so.0
#4 0x40024410 in pthread_start_thread ()
from /opt/crosstool/gcc-3.4.4-glibc-2.3.5-linux-2.6.12/arm-softfloat-linux-gnu/arm-softfloat-linux-gnu/lib/libpthread.so.0
#5 0x40024410 in pthread_start_thread ()
from /opt/crosstool/gcc-3.4.4-glibc-2.3.5-linux-2.6.12/arm-softfloat-linux-gnu/arm-softfloat-linux-gnu/lib/libpthread.so.0
#6 0x40024410 in pthread_start_thread ()
from /opt/crosstool/gcc-3.4.4-glibc-2.3.5-linux-2.6.12/arm-softfloat-linux-gnu/arm-softfloat-linux-gnu/lib/libpthread.so.0
#7 0x40024410 in pthread_start_thread ()
from /opt/crosstool/gcc-3.4.4-glibc-2.3.5-linux-2.6.12/arm-softfloat-linux-gnu/arm-softfloat-linux-gnu/lib/libpthread.so.0
#8 0x40024410 in pthread_start_thread ()
from /opt/crosstool/gcc-3.4.4-glibc-2.3.5-linux-2.6.12/arm-softfloat-linux-gnu/arm-softfloat-linux-gnu/lib/libpthread.so.0
#9 0x40024410 in pthread_start_thread ()
from /opt/crosstool/gcc-3.4.4-glibc-2.3.5-linux-2.6.12/arm-softfloat-linux-gnu/arm-softfloat-linux-gnu/lib/libpthread.so.0
#10 0x40024410 in pthread_start_thread ()
from /opt/crosstool/gcc-3.4.4-glibc-2.3.5-linux-2.6.12/arm-softfloat-linux-gnu/arm-softfloat-linux-gnu/lib/libpthread.so.0
--Type <return> to continue, or q <return> to quit---
#11 0x40024410 in pthread_start_thread ()
from /opt/crosstool/gcc-3.4.4-glibc-2.3.5-linux-2.6.12/arm-softfloat-linux-gnu/arm-softfloat-linux-gnu/lib/libpthread.so.0
#12 0x40024410 in pthread_start_thread ()
from /opt/crosstool/gcc-3.4.4-glibc-2.3.5-linux-2.6.12/arm-softfloat-linux-gnu/arm-softfloat-linux-gnu/lib/libpthread.so.0
#13 0x40024410 in pthread_start_thread ()
from /opt/crosstool/gcc-3.4.4-glibc-2.3.5-linux-2.6.12/arm-softfloat-linux-gnu/arm-softfloat-linux-gnu/lib/libpthread.so.0
#14 0x40024410 in pthread_start_thread ()
from /opt/crosstool/gcc-3.4.4-glibc-2.3.5-linux-2.6.12/arm-softfloat-linux-gnu/arm-softfloat-linux-gnu/lib/libpthread.so.0
#15 0x40024410 in pthread_start_thread ()
from /opt/crosstool/gcc-3.4.4-glibc-2.3.5-linux-2.6.12/arm-softfloat-linux-gnu/arm-softfloat-linux-gnu/lib/libpthread.so.0
#16 0x40024410 in pthread_start_thread ()
from /opt/crosstool/gcc-3.4.4-glibc-2.3.5-linux-2.6.12/arm-softfloat-linux-gnu/arm-softfloat-linux-gnu/lib/libpthread.so.0
#17 0x40024410 in pthread_start_thread ()
from /opt/crosstool/gcc-3.4.4-glibc-2.3.5-linux-2.6.12/arm-softfloat-linux-gnu/arm-softfloat-linux-gnu/lib/libpthread.so.0
#18 0x40024410 in pthread_start_thread ()
from /opt/crosstool/gcc-3.4.4-glibc-2.3.5-linux-2.6.12/arm-softfloat-linux-gnu/arm-softfloat-linux-gnu/lib/libpthread.so.0
#19 0x40024410 in pthread_start_thread ()
from /opt/crosstool/gcc-3.4.4-glibc-2.3.5-linux-2.6.12/arm-softfloat-linux-gnu/arm-softfloat-linux-gnu/lib/libpthread.so.0
Thread 1 (thread 16384):
#0 0x40027148 in __pthread_sigsuspend ()
from /opt/crosstool/gcc-3.4.4-glibc-2.3.5-linux-2.6.12/arm-softfloat-linux-gnu/arm-softfloat-linux-gnu/lib/libpthread.so.0
#1 0x40026fcc in __pthread_wait_for_restart_signal ()
---Type <return> to continue, or q <return> to quit---
from /opt/crosstool/gcc-3.4.4-glibc-2.3.5-linux-2.6.12/arm-softfloat-linux-gnu/arm-softfloat-linux-gnu/lib/libpthread.so.0
#2 0x40023cfc in pthread_join ()
from /opt/crosstool/gcc-3.4.4-glibc-2.3.5-linux-2.6.12/arm-softfloat-linux-gnu/arm-softfloat-linux-gnu/lib/libpthread.so.0
#3 0x00008818 in main (argc=1, argv=0xbeb71ea4) at ../threads.cpp:50
13 sleep(3);
(gdb)
(gdb) t a all bt
Backtrace limit of 20 exceeded
Thread 4 (Thread 32771):
#-1 0x402a319c in nanosleep ()
from /opt/crosstool/gcc-3.4.4-glibc-2.3.5-linux-2.6.12/arm-softfloat-linux-gnu/arm-softfloat-linux-gnu/lib/libc.so.6
Backtrace limit of 20 exceeded
Backtrace limit of 20 exceeded
13 sleep(3);
(gdb)