Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Andrew Burgess <andrew.burgess@embecosm.com>
Cc: Kevin Buettner <kevinb@redhat.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] gdb: Don't skip prologue for explicit line breakpoints in assembler
Date: Mon, 24 Jun 2019 19:16:00 -0000	[thread overview]
Message-ID: <1a421f8d-069b-fbd6-4a56-2464dd3e5a15@redhat.com> (raw)
In-Reply-To: <20190622112333.GL23204@embecosm.com>

On 6/22/19 12:23 PM, Andrew Burgess wrote:

>> The problem seems to be that when the explicit_line flag was first
>> added there was just function for decoding linespec line numbers
>> 'decode_all_digits'.  At some point in time this split into
>> decode_digits_ordinary and decode_digits_list_mode, when this happened
>> the explicit_line flag was only ever being set in one path.
>>
>> I suspect that if the behaviour you discussed above ever existed, then
>> it was before the split in how digits were decoded.

I'm like, 98.64% sure older gdbs behave like that.  But I can't rule out
misremembering without trying an old gdb, which I don't have built handy
at the moment either.

>>
>> I'm running out of time to investigate this today, but when I get some
>> more time I'll dig a little more on this line of enquiry to see if I
>> can confirm or deny the above theory.
> 
> The decode_all_digits function split into decode_digits_ordinary and
> decode_digits_list_mode with commit f8eba3c61629b3c03a back in Dec
> 2011, I suspect that the behaviour you recall would have stopped
> working then.  Though I haven't confirmed this (building such old
> versions of GDB is time consuming).

Indeed.

> 
> Related to what we're discussing seems to be commit a9e408182d2faaed5
> from Jan 2018, where we appear to double down on having the breakpoint
> file and line update to reflect where the breakpoint was placed, not
> where the breakpoint ended up.

Indeed.  Thanks for digging that up.

> 
> The question then would be if we can confirm GDB did used to behave
> the way you recall some time ago, do we want to go back to that
> behaviour now?  

No, I don't think we want to go back.

I've thought for a few years that "info breakpoints" should show
BOTH the canonical spec behind each breakpoint, and the actual
location(s) where the breakpoint is inserted.  It wouldn't
be that hard, even.  I cooked up a prototype patch for that.
I'll post it as a follow up.

> And is that a blocker for my change going in?  Yes if
> we did want to go back to the old behaviour then part of my patch
> would probably end up being reverted - as I suspect would
> a9e408182d2faaed5.  I'm happy to keep digging on this to see if I can
> confirm if/when the behaviour changed if that helps bring clarity to
> this issue.

Thanks,
Pedro Alves


  reply	other threads:[~2019-06-24 19:16 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-12 12:34 Andrew Burgess
2019-06-20  1:11 ` Kevin Buettner
2019-06-20 20:58   ` Andrew Burgess
2019-06-20 23:23     ` Andrew Burgess
2019-06-21  3:20       ` Kevin Buettner
2019-06-21 13:43       ` Pedro Alves
2019-06-22 11:06         ` Andrew Burgess
2019-06-22 11:23           ` Andrew Burgess
2019-06-24 19:16             ` Pedro Alves [this message]
2019-06-24 19:54               ` [PROTOTYPE] Make "info breakpoints" show breakpoint's specs (Re: [PATCH] gdb: Don't skip prologue for explicit line breakpoints in assembler) Pedro Alves
2019-07-03 22:37                 ` Pedro Alves
2019-06-24 19:16           ` [PATCH] gdb: Don't skip prologue for explicit line breakpoints in assembler Pedro Alves
2019-07-01 17:12             ` Andrew Burgess
2019-07-01 18:03               ` [PATCHv2 2/2] " Andrew Burgess
2019-07-03 22:13                 ` Pedro Alves
2019-07-01 18:03               ` [PATCHv2 0/2] Changes for explicit_line tracking, and prologue skipping Andrew Burgess
2019-07-01 18:03               ` [PATCHv2 1/2] gdb: Remove unneeded parameter from set_breakpoint_location_function Andrew Burgess
2019-07-03 22:13                 ` Pedro Alves
2019-07-01 18:21               ` [PATCH] gdb: Don't skip prologue for explicit line breakpoints in assembler Pedro Alves
2019-07-02  8:28                 ` Andrew Burgess

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=1a421f8d-069b-fbd6-4a56-2464dd3e5a15@redhat.com \
    --to=palves@redhat.com \
    --cc=andrew.burgess@embecosm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=kevinb@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