This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH v3 0/9] Locations API


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]