public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* Re: [RFA] Fix regression introduced in "break *<EXPR>" by explicit location patches (was: "Re: [PATCH v6 4/9] Explicit locations: introduce address locations")
@ 2016-01-20 23:39 Doug Evans
  2016-01-21 10:40 ` Joel Brobecker
  0 siblings, 1 reply; 3+ messages in thread
From: Doug Evans @ 2016-01-20 23:39 UTC (permalink / raw)
  To: Joel Brobecker; +Cc: Keith Seitz, gdb-patches

Joel Brobecker writes:
  > Hi Keith,
  >
  > What do you think of the attached patch? There is also a testcase,
  > which is slightly different from the scenario that triggered this
  > exchange, but which also has the advantage of not requiring PIE,
  > which makes the test a little more universal, I think.
  >
  > gdb/ChangeLog:
  >
  >         * location.h (new_address_location): Add new parameters
  >         "addr_string" and "addr_string_len".
  >         (get_address_string_location): Add declaration.
  >         * location.c (new_address_location): Add new parameters
  >         "addr_string" and "addr_string_len".  If not NULL, store
  >         a copy of the addr_string in the new location as well.
  >         (get_address_string_location): New function.
  >         (string_to_event_location): Update call to new_address_location.
  >         * linespec.c (event_location_to_sals) <ADDRESS_LOCATION>:
  >         Save the event location in the parser's state before
  >         passing it to convert_address_location_to_sals.
  >         * breakpoint.c (create_thread_event_breakpoint): Update call
  >         to new_address_location.
  >         (init_breakpoint_sal): Get the event location's string, if any,
  >         and use it to update call to new_address_location.
  >         * python/py-finishbreakpoint.c (bpfinishpy_init):
  >         Update call to new_address_location.
  >         * spu-tdep.c (spu_catch_start): Likewise.
  >
  >         * config/djgpp/fnchange.lst: Add entries for
  >         gdb/testsuite/gdb.base/break-fun-addr1.c and
  >         gdb/testsuite/gdb.base/break-fun-addr2.c.
  >
  > gdb/testsuite/ChangeLog:
  >
  >         * gdb.base/break-fun-addr.exp: New file.
  >         * gdb.base/break-fun-addr1.c: New file.
  >         * gdb.base/break-fun-addr2.c: New file.
  >
  > Tested on x86_64-linux.

Hi.
One nit.

  >...
  > diff --git a/gdb/location.c b/gdb/location.c
  > index 37285f3..e43ebf1 100644
  > --- a/gdb/location.c
  > +++ b/gdb/location.c
  >...
  > @@ -134,6 +137,15 @@ get_address_location (const struct event_location  
*location)
  >
  >  /* See description in location.h.  */
  >
  > +const char *
  > +get_address_string_location (const struct event_location *location)
  > +{
  > +  gdb_assert (EL_TYPE (location) == ADDRESS_LOCATION);
  > +  return EL_STRING (location);
  > +}
  > +
  > +/* See description in location.h.  */
  > +

Given that the argument must be an address location,
"get_address_location_string" reads better to me.

LGTM with that change.

^ permalink raw reply	[flat|nested] 3+ messages in thread
* [PATCH v6 0/9] Series short description
@ 2015-08-05 23:28 Keith Seitz
  2015-08-05 23:30 ` [PATCH v6 4/9] Explicit locations: introduce address locations Keith Seitz
  0 siblings, 1 reply; 3+ messages in thread
From: Keith Seitz @ 2015-08-05 23:28 UTC (permalink / raw)
  To: gdb-patches

This series is the latest revision of the locations API redesign
which introduces the concept of explicit locations (in addition to
address, linespec, and probe locations).

Several of the patches have already been approved, but I am reposting
the entire (rebased) series.

---

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                    |   23 +
 gdb/breakpoint.c                           |  788 ++++++++++++++++------------
 gdb/breakpoint.h                           |   51 +-
 gdb/cli/cli-cmds.c                         |   47 +-
 gdb/completer.c                            |  218 +++++++-
 gdb/doc/gdb.texinfo                        |  244 ++++++---
 gdb/elfread.c                              |    4 
 gdb/guile/scm-breakpoint.c                 |   23 +
 gdb/linespec.c                             |  582 ++++++++++++---------
 gdb/linespec.h                             |   42 +
 gdb/location.c                             |  727 ++++++++++++++++++++++++++
 gdb/location.h                             |  238 ++++++++
 gdb/mi/mi-cmd-break.c                      |   76 ++-
 gdb/probe.c                                |   20 -
 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/dprintf-pending.exp |   10 
 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  |  112 ++++
 gdb/testsuite/gdb.linespec/explicit.c      |   56 ++
 gdb/testsuite/gdb.linespec/explicit.exp    |  410 +++++++++++++++
 gdb/testsuite/gdb.linespec/explicit2.c     |   24 +
 gdb/testsuite/gdb.linespec/ls-errs.exp     |   57 ++
 gdb/testsuite/gdb.mi/mi-break.exp          |   82 +++
 gdb/testsuite/gdb.mi/mi-dprintf.exp        |   12 
 gdb/testsuite/lib/gdb.exp                  |    6 
 gdb/testsuite/lib/mi-support.exp           |   16 -
 gdb/tracepoint.c                           |   16 -
 gdb/tracepoint.h                           |    2 
 38 files changed, 3285 insertions(+), 793 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

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

end of thread, other threads:[~2016-01-21 10:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-20 23:39 [RFA] Fix regression introduced in "break *<EXPR>" by explicit location patches (was: "Re: [PATCH v6 4/9] Explicit locations: introduce address locations") Doug Evans
2016-01-21 10:40 ` Joel Brobecker
  -- strict thread matches above, loose matches on Subject: below --
2015-08-05 23:28 [PATCH v6 0/9] Series short description Keith Seitz
2015-08-05 23:30 ` [PATCH v6 4/9] Explicit locations: introduce address locations Keith Seitz
2015-12-14  7:11   ` Joel Brobecker
2015-12-14 20:56     ` Keith Seitz
2015-12-15 13:40       ` Joel Brobecker
2016-01-17 15:32         ` [RFA] Fix regression introduced in "break *<EXPR>" by explicit location patches (was: "Re: [PATCH v6 4/9] Explicit locations: introduce address locations") Joel Brobecker

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