This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 0/2] Fix "info frame" in the outermost frame.
- From: Pedro Alves <palves at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Fri, 29 Nov 2013 20:15:47 +0000
- Subject: [PATCH 0/2] Fix "info frame" in the outermost frame.
- Authentication-results: sourceware.org; auth=none
Doing "info frame" in the outermost frame, when that was indicated by
the next frame saying the unwound PC is undefined/not saved, results
in error and incomplete output:
(gdb) bt
#0 thread_function0 (arg=0x0) at threads.c:63
#1 0x00000034cf407d14 in start_thread (arg=0x7ffff7fcb700) at pthread_create.c:309
#2 0x000000323d4f168d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115
(gdb) frame 2
#2 0x000000323d4f168d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115
115 call *%rax
(gdb) info frame
Stack level 2, frame at 0x0:
rip = 0x323d4f168d in clone (../sysdeps/unix/sysv/linux/x86_64/clone.S:115); saved rip Register 16 was not saved
(gdb)
This mini-series fixes it. Afterwards, we get:
(gdb) info frame
Stack level 2, frame at 0x0:
rip = 0x323d4f168d in clone (../sysdeps/unix/sysv/linux/x86_64/clone.S:115); saved rip = <not saved>
Outermost frame: outermost
caller of frame at 0x7ffff7fcafc0
source language asm.
Arglist at 0x7ffff7fcafb8, args:
Locals at 0x7ffff7fcafb8, Previous frame's sp is 0x7ffff7fcafc8
(gdb)
Pedro Alves (2):
New OPTIMIZED_OUT_ERROR error code.
Fix "info frame" in the outermost frame.
gdb/dwarf2loc.c | 7 +-
gdb/exceptions.h | 4 +
gdb/frame.c | 111 +++--
gdb/frame.h | 8 -
gdb/spu-tdep.c | 5 +-
gdb/stack.c | 27 +-
gdb/testsuite/gdb.dwarf2/dw2-undefined-ret-addr.S | 508 +++++++++++++++++++++
gdb/testsuite/gdb.dwarf2/dw2-undefined-ret-addr.c | 36 ++
.../gdb.dwarf2/dw2-undefined-ret-addr.exp | 58 +++
gdb/valops.c | 3 +-
gdb/valprint.c | 8 +-
gdb/valprint.h | 3 +
12 files changed, 712 insertions(+), 66 deletions(-)
create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-undefined-ret-addr.S
create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-undefined-ret-addr.c
create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-undefined-ret-addr.exp
--
1.7.11.7