Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Doug Evans <dje@google.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: Keith Seitz <keiths@redhat.com>, gdb-patches@sourceware.org
Subject: Re: [RFA] Fix regression introduced in "break *<EXPR>" by explicit location patches (was: "Re: [PATCH v6 4/9] Explicit locations: introduce address locations")
Date: Wed, 20 Jan 2016 23:39:00 -0000	[thread overview]
Message-ID: <047d7bd91664ac4a4a0529cc80a6@google.com> (raw)

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.


             reply	other threads:[~2016-01-20 23:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-20 23:39 Doug Evans [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=047d7bd91664ac4a4a0529cc80a6@google.com \
    --to=dje@google.com \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=keiths@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox