public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH v3 0/9] Locations API
@ 2015-02-17 22:06 Keith Seitz
  2015-02-17 22:06 ` [PATCH v3 4/9] Explicit locations: introduce address locations Keith Seitz
                   ` (9 more replies)
  0 siblings, 10 replies; 25+ messages in thread
From: Keith Seitz @ 2015-02-17 22:06 UTC (permalink / raw)
  To: gdb-patches

This is the next revision of the locations/explicit locations mega-API
change on which I've been working. The most important change in this
revision is the removal of some previous ugliness introduced by the
patch set to deal with advancing the input pointer for the CLI.

In this version, all of this has been removed (even from decode_line*).
This is now done (easily) by adding a new lexing function to find the
end of the linespec.

Thus, string_to_event_location can now treat all location types the same
and advance the input pointer past the first terminated location string.

General API usage now looks like:

void
my_command (char *arg, int from_tty)
{
  struct event_location *location;
  struct cleanup *cleanup;

  location = string_to_event_location (&arg, current_language);
  cleanup = make_cleanup_delete_event_location (location);
  if (*arg)
    error ("junk at end of command");
  /* do whatever with location, e.g., create_breakpoint (location, ...);  */
  do_cleanups (cleanup);
}

One note on this series... explicit-ui-cli will introduce a failing
test because of gdb/17960 (internal-error when completing "source.c:func").
This is trivially fixable after that patch has been committed.

I figure there's no harm in delaying further review. There's still quite
a way to go.


---

Keith Seitz (9):
      Explicit locations: rename "address string"/"addr_string" to "location"
      Explicit locations: introduce new struct event_location-based API
      Explicit locations: use new location API
      Explicit locations: introduce address locations
      Explicit locations: introduce probe locations
      Explicit locations: introduce explicit locations
      Explicit locations: add UI features for CLI
      Explicit locations: MI support for explicit locations
      Explicit locations: documentation updates


 gdb/Makefile.in                           |    6 
 gdb/NEWS                                  |    4 
 gdb/ax-gdb.c                              |    8 
 gdb/break-catch-throw.c                   |   20 +
 gdb/breakpoint.c                          |  773 +++++++++++++++++------------
 gdb/breakpoint.h                          |   30 +
 gdb/cli/cli-cmds.c                        |   47 +-
 gdb/completer.c                           |  211 +++++++-
 gdb/doc/gdb.texinfo                       |  234 ++++++---
 gdb/elfread.c                             |    4 
 gdb/linespec.c                            |  605 ++++++++++++++---------
 gdb/linespec.h                            |   51 ++
 gdb/location.c                            |  733 +++++++++++++++++++++++++++
 gdb/location.h                            |  238 +++++++++
 gdb/mi/mi-cmd-break.c                     |   76 +++
 gdb/probe.c                               |   21 +
 gdb/probe.h                               |    6 
 gdb/python/py-breakpoint.c                |   12 
 gdb/python/py-finishbreakpoint.c          |   16 -
 gdb/python/python.c                       |   26 -
 gdb/remote.c                              |   10 
 gdb/spu-tdep.c                            |   11 
 gdb/testsuite/gdb.base/help.exp           |    2 
 gdb/testsuite/gdb.linespec/3explicit.c    |   28 +
 gdb/testsuite/gdb.linespec/cpexplicit.cc  |   63 ++
 gdb/testsuite/gdb.linespec/cpexplicit.exp |  104 ++++
 gdb/testsuite/gdb.linespec/explicit.c     |   56 ++
 gdb/testsuite/gdb.linespec/explicit.exp   |  366 ++++++++++++++
 gdb/testsuite/gdb.linespec/explicit2.c    |   24 +
 gdb/testsuite/gdb.linespec/ls-errs.exp    |   45 +-
 gdb/testsuite/gdb.mi/mi-break.exp         |   82 +++
 gdb/testsuite/gdb.mi/mi-dprintf.exp       |   12 
 gdb/testsuite/lib/mi-support.exp          |   16 -
 gdb/tracepoint.c                          |   16 -
 gdb/tracepoint.h                          |    2 
 35 files changed, 3192 insertions(+), 766 deletions(-)
 create mode 100644 gdb/location.c
 create mode 100644 gdb/location.h
 create mode 100644 gdb/testsuite/gdb.linespec/3explicit.c
 create mode 100644 gdb/testsuite/gdb.linespec/cpexplicit.cc
 create mode 100644 gdb/testsuite/gdb.linespec/cpexplicit.exp
 create mode 100644 gdb/testsuite/gdb.linespec/explicit.c
 create mode 100644 gdb/testsuite/gdb.linespec/explicit.exp
 create mode 100644 gdb/testsuite/gdb.linespec/explicit2.c

--
Signature

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

end of thread, other threads:[~2015-05-07 17:07 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-17 22:06 [PATCH v3 0/9] Locations API Keith Seitz
2015-02-17 22:06 ` [PATCH v3 4/9] Explicit locations: introduce address locations Keith Seitz
2015-03-01 21:03   ` Doug Evans
2015-05-07 17:05     ` Keith Seitz
2015-02-17 22:06 ` [PATCH v3 1/9] Explicit locations: rename "address string"/"addr_string" to "location" Keith Seitz
2015-03-01 20:08   ` Doug Evans
2015-02-17 22:06 ` [PATCH v3 2/9] Explicit locations: introduce new struct event_location-based API Keith Seitz
2015-03-01 20:14   ` Doug Evans
2015-05-07 16:59     ` Keith Seitz
2015-02-17 22:07 ` [PATCH v3 5/9] Explicit locations: introduce probe locations Keith Seitz
2015-03-01 21:03   ` Doug Evans
2015-02-17 22:07 ` [PATCH v3 6/9] Explicit locations: introduce explicit locations Keith Seitz
2015-03-01 21:04   ` Doug Evans
2015-02-17 22:07 ` [PATCH v3 8/9] Explicit locations: MI support for " Keith Seitz
2015-03-01 21:15   ` Doug Evans
2015-02-17 22:07 ` [PATCH v3 7/9] Explicit locations: add UI features for CLI Keith Seitz
2015-03-01 21:14   ` Doug Evans
2015-05-07 17:07     ` Keith Seitz
2015-02-17 22:07 ` [PATCH v3 3/9] Explicit locations: use new location API Keith Seitz
2015-03-01 20:54   ` Doug Evans
2015-05-07 17:03     ` Keith Seitz
2015-02-17 22:50 ` [PATCH v3 9/9] Explicit locations: documentation updates Keith Seitz
2015-03-01 21:25   ` Doug Evans
2015-05-07 17:07     ` Keith Seitz
2015-02-23  4:17 ` [PATCH v3 0/9] Locations API Doug Evans

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).