This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: arm-aout vs arm-elf




On Mon, 15 Oct 2001, David Korn wrote:

> >Second example is compiled by gcc-3.0.1 and it prints correct values,
> >first example is compiled by gcc-2.95.3 and it prints garbage, so I
> >suppose that it should be considered a bug in gcc-2.95.3.
>
>   Well, as I've explained, it's not printing garbage values, it's more
> that it is printing garbage labels when it says those values correspond
> to the function args because they don't.... yet.  In 3.0.1 there must be
> some workround that folds the prolog into the first line of code, so for it
> to be able to display the values correctly, I would guess that someone has
> improved gcc to output liveness/register info for the prolog as well as the
> function, so that as you enter the prolog it knows the incoming args are
> in the regs, and after the stack frame is created it knows they are there.

No, 301 does not make changes in prologue code it simply accociates
the first operator of the function with the first line number
of the function - so you have the best of two words:

(1) First line of function corresponds to the function entry address
(2) gdb (its arm_skip_prologure() function ) is able to find the end of
    prologue correctly.
(3) Hence, parameters a printed correctly.

>   Incidentally, it might be relevant to know which version of gdb you're
> using.  Is it one that was more-or-less contemporary with 2.95.x, or is it
> a more recent one that is up-to-date with whatever debug info 3.0.1 emits
> these days ?

No, it is not related to the version of gdb.

> >BTW, I see nothing wrong in stopping before argument copying is
> >complete, the only thing to worry about in order to properly print
> >arguments will be an ability of gdb to interperet apcs-32.
>
>   It would indeed be useful, and 3.0.1 does seem to offer the best of both
> worlds, but it might well be the case that the ability to include liveness
> info in the prolog wasn't included in the earlier versions of gdb that
> were contemporary with 2.95.x, and so it would have been a bug had gcc
> been designed to emit debug info that gdb couldn't understand.

It seems to me that it is reasonable to make 2.95.3 patch, unfortunately,
I am not versed enough to do it myself.

>       DaveK

Thanks,

Aleksey



------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]