[patch/rfc] The off again, on again, PC == 0 in get_prev_frame

Andrew Cagney cagney@gnu.org
Fri Feb 20 21:27:00 GMT 2004


Ref: [PATCH] Don't try to unwind the PC in frame.c:get_prev_frame()
http://sources.redhat.com/ml/gdb-patches/2004-01/msg00104.html

Having only recently posted:
> Can just you add a -ve comment stating why a test for PC==0 does not belong in that function? I'm pretty much certain that someone will eventually try to re-add a very similar test (via inside_entry_func for instance).

the attached adds a conditionalized check for "PC == 0" to 
get_prev_frame.  If there's a zero PC, _and_ it isn't the inner most 
frame, stop unwinding.  That should let mark's original case through.

Turns out that the old removed test was stopping this problem on amd64:

(gdb) PASS: gdb.threads/linux-dp.exp: continue to breakpoint: thread 5's 
print
where
#0  print_philosopher (n=3, left=33 '!', right=33 '!') at 
/home/cygnus/cagney/GD
B/src/gdb/testsuite/gdb.threads/linux-dp.c:105
#1  0x0000000000400e4a in philosopher (data=0x50177c) at 
/home/cygnus/cagney/GDB
/src/gdb/testsuite/gdb.threads/linux-dp.c:148
#2  0x0000002a95671c2b in start_thread () from /lib64/tls/libpthread.so.0
#3  0x0000002a959de040 in thread_start () from /lib64/tls/libc.so.6
#4  0x0000000000000000 in ?? ()
#5  0x0000000000000000 in ?? ()
#6  0x0000000000000000 in ?? ()
#7  0x0000000000000000 in ?? ()
#8  0x0000000000000000 in ?? ()
#9  0x0000000000000000 in ?? ()
#10 0x0000000000000000 in ?? ()
#11 0x0000000000000000 in ?? ()
#12 0x0000000000000000 in ?? ()
#13 0x0000000000000000 in ?? ()
#14 0x0000000000000000 in ?? ()
#15 0x0000000000000000 in ?? ()
#16 0x0000002a95b41580 in _nl_C_locobj () from /lib64/tls/libc.so.6
#17 0x00000000427ffdc8 in ?? ()

comments (...)
Andrew
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: diffs
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20040220/53d04278/attachment.ksh>


More information about the Gdb-patches mailing list