This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFC/RFA/sparc] problem with prologue analyzer
- From: Daniel Jacobowitz <drow at false dot org>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Sun, 28 Nov 2004 12:52:40 -0500
- Subject: Re: [RFC/RFA/sparc] problem with prologue analyzer
- References: <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