This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: gdb & arm
- To: Keith Seitz <keiths at cygnus dot com>
- Subject: Re: gdb & arm
- From: Fernando Nasser <fnasser at redhat dot com>
- Date: Fri, 05 Oct 2001 12:32:16 -0400
- CC: Quality Quorum <qqi at world dot std dot com>, gdb at sources dot redhat dot com
- Organization: Red Hat Canada
- References: <Pine.GSO.4.33.0110041134580.13231-100000@makita.cygnus.com>
Keith Seitz wrote:
>
> On Thu, 4 Oct 2001, Quality Quorum wrote:
>
> > It call to arm_skip_prologue call find_pc_partial_function and
> > it succeeds.
>
> So:
>
> if (find_pc_partial_function (pc, NULL, &func_addr, &func_end))
> {
> sal = find_pc_line (func_addr, 0);
> if ((sal.line != 0) && (sal.end < func_end))
> return sal.end;
> }
>
> find_pc_partial_function and find_pc_line succeed, but sal.end=func_end,
> right? This is the problem I had. Line table problems from gcc was my
> determination.
>
Yes, I have seen something like this. The reason was some bogus
optimization
that would remove duplicate line number info from the debug information
and
gdb needs the two first ones to determine the end of the prologue.
Try changing the debug format with the -g option of gcc. If I am not
mistaken
this would only affect one of the formats (I can't remember if it was
stabs or
dwarf2).
P.S.: The fix is in the compiler/linker land --GDB does not get enough
info so
there is nothing much that can be done there except forcing a prologue
scan
(which suffers from constant compiler generation changes and some
insufficient
information in some cases).
--
Fernando Nasser
Red Hat Canada Ltd. E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9