Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH 0/9] Changes to frame selection.
@ 2015-09-11 18:49 Andrew Burgess
  2015-09-11 18:49 ` [PATCH 2/9] gdb: Select a frame for frame_info Andrew Burgess
                   ` (9 more replies)
  0 siblings, 10 replies; 25+ messages in thread
From: Andrew Burgess @ 2015-09-11 18:49 UTC (permalink / raw)
  To: gdb-patches; +Cc: Andrew Burgess

This series of patches makes changes to how frames are selected.  This
effects the 'frame', 'select-frame', and 'info frame' commands.

If you only select frame by the gdb assigned frame number then nothing
should change for you.

If you select frames by frame address, or create temporary frames by
specifying addresses then you'll need to use a slightly longer command
in the future.

These changes have been discussed before at a high level:
  https://sourceware.org/ml/gdb-patches/2015-07/msg00241.html
  https://sourceware.org/ml/gdb/2014-11/msg00028.html

There's even a related bug:
  https://sourceware.org/bugzilla/show_bug.cgi?id=18074

The idea is to remove some of the over-loading in the frame selection
of the commands like 'frame'.  Currently the parameters passed to
'frame' are first treated as a frame number, then as an address to
look for, and finally, if that all fails, a frame is created using the
parameter as an address.

After this patch series we now have the following commands:

  (gdb) frame level NUMBER           # Find frame at level NUMBER
  (gdb) frame NUMBER                 # Same as 'frame level NUMBER'
  (gdb) frame address ADDRESS        # Find frame by stack ADDRESS
  (gdb) frame function NAME          # Find frame by function NAME
  (gdb) frame create STACK-ADDRESS   # Create frame at STACK-ADDRESS
  (gdb) frame create STACK-ADDRESS PC-ADDRESS
                                     # Create frame at STACK-ADDRESS
                                     # and PC-ADDRESS

[ The use of 'frame level' made sense to me, but I can change this to
  'frame number' if folk feel strongly. ]

The functions that find a frame will now error if a matching frame
can't be found.

This patch series includes two patches posted here:
  https://sourceware.org/ml/gdb-patches/2015-07/msg00626.html
they never got reviewed, and the versions in this patch series replace
the older versions.

All feedback welcome.

Thanks,
Andrew

---

Andrew Burgess (9):
  gdb: Check the selected-frame in frame_find_by_id.
  gdb: Select a frame for frame_info.
  gdb: Make use of safe-ctype.h header.
  gdb/doc: Restructure frame command documentation.
  gdb: Fix bug with dbx style func command.
  gdb: Avoid unneeded calls to parse_frame_specification.
  gdb: Simplify parse_frame_specification.
  gdb: Split func_command into two parts.
  gdb: Change how frames are selected for 'frame' and 'info frame'.

 gdb/ChangeLog                         |  76 ++++++
 gdb/NEWS                              |   6 +
 gdb/doc/ChangeLog                     |  14 +
 gdb/doc/gdb.texinfo                   | 349 +++++++++++++------------
 gdb/frame.c                           |  39 ++-
 gdb/frame.h                           |   4 +
 gdb/mi/mi-cmd-stack.c                 |  16 +-
 gdb/stack.c                           | 476 ++++++++++++++++++++++++----------
 gdb/stack.h                           |   2 +-
 gdb/testsuite/ChangeLog               |  23 ++
 gdb/testsuite/gdb.base/dbx.exp        |   6 +-
 gdb/testsuite/gdb.base/frame-cmds.c   |  52 ++++
 gdb/testsuite/gdb.base/frame-cmds.exp |  36 +++
 gdb/testsuite/gdb.mi/mi-var-frame.c   |  34 +++
 gdb/testsuite/gdb.mi/mi-var-frame.exp |  81 ++++++
 15 files changed, 902 insertions(+), 312 deletions(-)
 create mode 100644 gdb/testsuite/gdb.base/frame-cmds.c
 create mode 100644 gdb/testsuite/gdb.base/frame-cmds.exp
 create mode 100644 gdb/testsuite/gdb.mi/mi-var-frame.c
 create mode 100644 gdb/testsuite/gdb.mi/mi-var-frame.exp

-- 
2.5.1


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

end of thread, other threads:[~2015-10-26 13:40 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-11 18:49 [PATCH 0/9] Changes to frame selection Andrew Burgess
2015-09-11 18:49 ` [PATCH 2/9] gdb: Select a frame for frame_info Andrew Burgess
2015-09-11 18:50 ` [PATCH 7/9] gdb: Simplify parse_frame_specification Andrew Burgess
2015-09-30 13:50   ` Pedro Alves
2015-09-11 18:50 ` [PATCH 6/9] gdb: Avoid unneeded calls to parse_frame_specification Andrew Burgess
2015-09-30 13:48   ` Pedro Alves
2015-09-11 18:50 ` [PATCH 9/9] gdb: Change how frames are selected for 'frame' and 'info frame' Andrew Burgess
2015-09-11 20:21   ` Eli Zaretskii
2015-09-15 10:41     ` Andrew Burgess
2015-09-15 10:50       ` Eli Zaretskii
2015-09-17 11:36         ` Andrew Burgess
2015-09-30 14:00   ` Pedro Alves
2015-09-11 18:50 ` [PATCH 4/9] gdb/doc: Restructure frame command documentation Andrew Burgess
2015-09-11 20:17   ` Eli Zaretskii
2015-09-11 18:50 ` [PATCH 3/9] gdb: Make use of safe-ctype.h header Andrew Burgess
2015-09-30 13:43   ` Pedro Alves
2015-09-11 18:50 ` [PATCH 8/9] gdb: Split func_command into two parts Andrew Burgess
2015-09-30 13:52   ` Pedro Alves
2015-09-11 18:50 ` [PATCH 1/9] gdb: Check the selected-frame in frame_find_by_id Andrew Burgess
2015-09-30 13:40   ` Pedro Alves
2015-09-11 18:50 ` [PATCH 5/9] gdb: Fix bug with dbx style func command Andrew Burgess
2015-09-30 13:47   ` Pedro Alves
2015-10-26 13:40     ` Thomas Preud'homme
2015-10-26 16:33       ` Andrew Burgess
2015-10-12 21:43 ` [PATCH 0/9] Changes to frame selection Andrew Burgess

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox