Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jim Blandy <jimb@redhat.com>
To: Joel Brobecker <brobecker@gnat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFC] breakpoints and function prologues...
Date: Mon, 29 Jul 2002 23:57:00 -0000	[thread overview]
Message-ID: <np1y9lwvv9.fsf@zwingli.cygnus.com> (raw)
In-Reply-To: <20020726053320.GB10000@gnat.com>


Joel Brobecker <brobecker@gnat.com> writes:
> Another alternative that has been discussed at ACT is to move the line
> where the function declaration is located to an address immediately
> past the function prologue. And the prologue would get a separate line
> info entry with a line number set to 0. The rationale behind modifying
> the compiler is that the compiler knows much better than GDB what part
> of the code is the prologue, and therefore should be in a better
> position of to provide accurate line information.

There's already a convention for this, I think.  Now, where was it
described???  Here it is:

int
in_prologue (CORE_ADDR pc, CORE_ADDR func_start)
{
  struct symtab_and_line sal;
  CORE_ADDR func_addr, func_end;

  /* We have several sources of information we can consult to figure
     this out.
     - Compilers usually emit line number info that marks the prologue
       as its own "source line".  So the ending address of that "line"
       is the end of the prologue.  If available, this is the most
       reliable method.
     - The minimal symbols and partial symbols, which can usually tell
       us the starting and ending addresses of a function.
     - If we know the function's start address, we can call the
       architecture-defined SKIP_PROLOGUE function to analyze the
       instruction stream and guess where the prologue ends.
     - Our `func_start' argument; if non-zero, this is the caller's
       best guess as to the function's entry point.  At the time of
       this writing, handle_inferior_event doesn't get this right, so
       it should be our last resort.  */

So, just emit an extra line entry for the prologue.


  parent reply	other threads:[~2002-07-30  6:52 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-22 17:36 Joel Brobecker
2002-07-23 16:53 ` Jim Blandy
2002-07-26  6:12   ` Joel Brobecker
2002-07-29 13:34     ` Daniel Jacobowitz
2002-07-29 23:57     ` Jim Blandy [this message]
2002-07-30 20:18       ` Joel Brobecker
2002-07-31 13:55         ` Jim Blandy
2002-08-01 15:44           ` Michael Snyder
2002-08-02 23:48             ` Jim Blandy
     [not found] <1027384602.26926.ezmlm@sources.redhat.com>
2002-07-22 18:54 ` Jim Ingham
2002-07-22 22:49   ` Joel Brobecker
     [not found] <1028439120.16228.ezmlm@sources.redhat.com>
2002-08-06 13:37 ` Jim Ingham
2002-08-14 22:57   ` Andrew Cagney
2002-08-15  6:53     ` Daniel Jacobowitz
2002-08-22 15:33       ` Michael Snyder
2002-08-22 16:19         ` Joel Brobecker
2002-08-23 11:27         ` Daniel Jacobowitz
     [not found] <1029446396.15888.ezmlm@sources.redhat.com>
2002-08-15 15:26 ` Jim Ingham
2002-08-15 18:05   ` Andrew Cagney
2002-08-15 19:11     ` Joel Brobecker
2002-08-16 10:02       ` Jim Blandy
2002-08-16 10:17         ` Joel Brobecker
2002-08-15 19:18     ` Daniel Jacobowitz
2002-08-16  9:34     ` Jim Blandy
2002-08-16 11:34     ` Jim Ingham
2002-08-22 15:38     ` Michael Snyder
2002-08-22 15:56       ` Andrew Cagney
2002-08-22 16:34         ` Michael Snyder
     [not found] <1030059293.13128.ezmlm@sources.redhat.com>
2002-08-23 10:50 ` Jim Ingham
2002-08-23 11:34   ` Andrew Cagney
2002-08-24 18:31     ` Jim Ingham
2002-08-25  7:45       ` Andrew Cagney
2002-08-25  8:21         ` Daniel Jacobowitz
2002-08-25 15:24         ` Jim Ingham
2002-08-23 11:45   ` Michael Snyder
2002-08-23 11:48     ` Daniel Jacobowitz

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=np1y9lwvv9.fsf@zwingli.cygnus.com \
    --to=jimb@redhat.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