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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] Is skip_prologue_using_sal actually usable?


> It defenitely has bugs; if the compiler only generates a single line
> table entry for a function, it will skip the entire function.  

fwiw hppa-tdep.c has this workaround/bugfix as well....

> Back in the old days, when prologues were fixed, 1 and 2 were pretty
> much equivalent.  However, these days, with compilers migrating many
> instructions into the prologue, the difference can be huge, and making
> the wrong choice can be very annoying.

i was just debugging a problem today with stack unwinding on hppa when i
saw this... this is exactly the problem! :-(

> The drawback of implementation 1 is mainly that the prologue isn't
> completely finished when GDB stops.  This means that GDB might not
> print function arguments correctly because the stack frame hasn't been
> fully setup yet.

it will also not unwind properly (on hppa) because we cannot find the
previous functions pc and sp. the hppa target has some code to skip the
prologue in a different way if line number information is not available,
but when it is available we use it, causing unwinding to fail.

randolph
-- 
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/


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