public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Fix "info frame" in the outermost frame.
@ 2013-11-29 20:16 Pedro Alves
  2013-11-29 20:20 ` [PATCH 2/2] " Pedro Alves
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Pedro Alves @ 2013-11-29 20:16 UTC (permalink / raw)
  To: gdb-patches

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-12-09 10:58 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-29 20:16 [PATCH 0/2] Fix "info frame" in the outermost frame Pedro Alves
2013-11-29 20:20 ` [PATCH 2/2] " Pedro Alves
2013-12-02  9:04   ` Yao Qi
2013-12-02 10:05     ` Pedro Alves
2013-12-08  2:40   ` Yao Qi
2013-12-09 10:58     ` Pedro Alves
2013-11-29 20:39 ` [PATCH 1/2] New OPTIMIZED_OUT_ERROR error code Pedro Alves
2013-12-02 13:53   ` Andrew Burgess
2013-12-06 20:01 ` [PATCH 0/2] Fix "info frame" in the outermost frame Pedro Alves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).