Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jim Blandy <jimb@redhat.com>
To: Andrew Cagney <ac131313@cygnus.com>
Cc: Joel Brobecker <brobecker@gnat.com>, gdb-patches@sources.redhat.com
Subject: Re: [RFA] block_innermost_frame tweak
Date: Fri, 21 Jun 2002 15:33:00 -0000	[thread overview]
Message-ID: <npelf0s1mc.fsf@zwingli.cygnus.com> (raw)
In-Reply-To: <3D138B65.8070401@cygnus.com>


Andrew Cagney <ac131313@cygnus.com> writes:
> Except for a small window in WFI, a ``PC'' refers to the address of
> the instruction that will be executed next.  It is just unfortunate
> that no one has found the time to zap DECR_PC_AFTER_BREAK and hence
> eliminate that small window.  Please don't add to this confusion.

What about all the prologue analyzers?

    /* Return PC of first real instruction.  */

    int
    i386_skip_prologue (int pc)
    {
      unsigned char op;
      int i;

    static CORE_ADDR
    mn10300_analyze_prologue (struct frame_info *fi, CORE_ADDR pc)
    {

What about the line table entries?

    /* Each item represents a line-->pc (or the reverse) mapping.  This is
       somewhat more wasteful of space than one might wish, but since only
       the files which are actually debugged are read in to core, we don't
       waste much space.  */

    struct linetable_entry
      {
        int line;
        CORE_ADDR pc;
      };

I'm all for choosing conventions and sticking to them, but in everyday
speech (well, everyday speech for debugger people), a `pc' is just any
kind of pointer to an instruction.  And it just looks to me like
that's the way GDB uses it, too.

Why is this distinction so urgent to maintain?  I think I've shown
that it has some cost.

> > But if I'm the only one who has this reaction, then I don't mind the
> > renaming.
> > Is there some third terse term that indicates (or could indicate, by
> > establishing a convention) "pointer into the instruction stream that
> > isn't necessarily an instruction address or the value of a register"?
> 
> The reason for suggesting ``block'' was that it hopefully implies a
> code block. frame_address_within_code_block()?

This is getting worse.


  reply	other threads:[~2002-06-21 22:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-20 13:14 Joel Brobecker
2002-06-20 14:09 ` Jim Blandy
2002-06-20 15:21   ` Joel Brobecker
2002-06-20 17:04   ` Andrew Cagney
2002-06-21 10:31     ` Joel Brobecker
2002-06-21 12:14     ` Jim Blandy
2002-06-21 13:24       ` Andrew Cagney
2002-06-21 15:33         ` Jim Blandy [this message]
2002-06-21 15:55           ` Andrew Cagney
2002-06-21 16:22             ` Jim Blandy
2002-07-02 10:41               ` Joel Brobecker
2002-07-02 11:05                 ` Jim Blandy
2002-07-02 12:12                   ` 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=npelf0s1mc.fsf@zwingli.cygnus.com \
    --to=jimb@redhat.com \
    --cc=ac131313@cygnus.com \
    --cc=brobecker@gnat.com \
    --cc=gdb-patches@sources.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