Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Joel Brobecker <brobecker@adacore.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFC/RFA/sparc] problem with prologue analyzer
Date: Sun, 28 Nov 2004 17:53:00 -0000	[thread overview]
Message-ID: <20041128175240.GE24639@nevyn.them.org> (raw)
In-Reply-To: <20041126223410.GZ908@adacore.com>

On Fri, Nov 26, 2004 at 02:34:10PM -0800, Joel Brobecker wrote:
> Hello,
> 
> Using break.exp, we have a function marker2 defined in break1.c as
> follow (sic):
> 
>         int marker2 (a) int a; { return (1); }  /* set breakpoint 9 here */
> 
> Because the entire declaration is on one single line, the function
> that skips prologue can not use the line number information from
> debugging data (sparc32_skip_prologue()):
> 
>   /* This is the preferred method, find the end of the prologue by
>      using the debugging information.  */
>   if (find_pc_partial_function (start_pc, NULL, &func_start, &func_end))
>     {
>       sal = find_pc_line (func_start, 0);
> 
>       if (sal.end < func_end
>           && start_pc <= sal.end)
>         return sal.end;
>     }

"Normally", when using GCC, there are two line number entries in the
debug information in this case.  Whether they've got the same line
number or not doesn't make a difference; the presence of two lets GDB
find the end of the prologue.  What does the debug information look
like?

> This test used to pass with 5.3. Doing a bit of archeology, I discovered
> that the code analyzing problogues has been heavily rewritten at the end
> of 2003, and that the piece of code that handles these store insns got
> lost during one large code rewrite.
> 
> Assuming this was an accident, I put the code back more or less blindly.
> I did exclude the part of the code that recognizes an instruction adding
> and offset to sp, as I haven't seen evidences that this is needed, and
> removed one if block that could only be executed in that case. But I'd
> be happy to put the entire code back, if it is felt more appropriate.

The rest of this I'm not qualified to review; Mark rewrote it, so maybe
he can.

-- 
Daniel Jacobowitz


  reply	other threads:[~2004-11-28 17:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-26 22:34 Joel Brobecker
2004-11-28 17:53 ` Daniel Jacobowitz [this message]
2004-11-28 19:02 ` Mark Kettenis
2004-11-29  9:04 ` Mark Kettenis
2004-11-29 19:17   ` Joel Brobecker
2004-11-29 19:57     ` Mark Kettenis

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=20041128175240.GE24639@nevyn.them.org \
    --to=drow@false.org \
    --cc=brobecker@adacore.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