Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Doug Evans <dje@google.com>
To: Siva Chandra <sivachandra@google.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFC - Python Scripting] Add 'end' attribute to gdb.Symtab_and_line
Date: Wed, 13 Jun 2012 17:08:00 -0000	[thread overview]
Message-ID: <CADPb22QCCUPNKHGPTNrAN_ZMynSAKnVxeQVRc-Mdkod6xWO--g@mail.gmail.com> (raw)
In-Reply-To: <CAGyQ6gwy+cKQ2oGUOfEMSPRx+=Jt4H8zHEH0tbUbywZBR8Ggog@mail.gmail.com>

On Wed, Jun 13, 2012 at 6:29 AM, Siva Chandra <sivachandra@google.com> wrote:
> On Wed, Jun 13, 2012 at 12:10 AM, Siva Chandra <sivachandra@google.com> wrote:
>> I have changed the behavior to [pc, end_pc] as this (at least the
>> name) feels more meaningful to me. But, why was right open behavior
>> chosen for internal code? Even the two-argument flavor of the
>> 'disassemble' command has right open behavior.
>
> Actually, I would like to take this back. I think, wrt 'disassemble'
> command, it is essentially disassembling all instructions which fully
> fall in the range provided as argument. Wrt symtab_and_line.end, if we
> were to expose it as end_pc in the Python API, then I think it should
> correspond to the PC value for the last instruction of that line of
> source and not the last address in the range. And, if that were to be
> the case, I do not think it is very practical as it does not indicate
> where the next instruction starts. With the other choice, where in
> end_pc indicates the last address in the range, the name end_pc
> becomes a misnomer.
>
> From my personal point of view, I see two options:
>
> 1. Call this new attribute 'last' and let it indicate the last address
> in the range.
>   or
> 2. Call this new attribute 'next_start' and let it indicate the start
> PC of the next instruction after the last instruction of the current
> source line.
>
> Either of the above is good enough for the use case I have in mind.
>
> Thanks,
> Siva Chandra

I like "last".
So the range would be [pc,last]  ?


  reply	other threads:[~2012-06-13 17:08 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-21  8:40 Siva Chandra
2012-05-21 16:27 ` Eli Zaretskii
2012-06-01 19:57 ` Siva Chandra
2012-06-11  9:17 ` Siva Chandra
2012-06-11 21:22 ` Doug Evans
2012-06-12 18:41   ` Siva Chandra
2012-06-12 19:43     ` Eli Zaretskii
2012-06-13  7:24       ` Siva Chandra
2012-06-13 15:15         ` Eli Zaretskii
2012-06-13 13:29     ` Siva Chandra
2012-06-13 17:08       ` Doug Evans [this message]
2012-06-13 18:15         ` Siva Chandra
2012-06-22  9:21           ` Siva Chandra
2012-06-22 17:12           ` Tom Tromey
2012-06-22 21:12             ` Doug Evans
2012-06-24 17:03             ` Siva Chandra
2012-06-26 22:12               ` Doug Evans
2012-06-27  0:23                 ` Siva Chandra
2012-06-22 17:10 ` Tom Tromey
2012-06-22 18:43   ` Siva Chandra

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=CADPb22QCCUPNKHGPTNrAN_ZMynSAKnVxeQVRc-Mdkod6xWO--g@mail.gmail.com \
    --to=dje@google.com \
    --cc=gdb-patches@sourceware.org \
    --cc=sivachandra@google.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