This is the mail archive of the gdb-patches@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: [patch/rfa/hppa] Use frame pointer for unwinding


> >+    if (frame_pc_unwind (next_frame) >= prologue_end
> >+        && u->Save_SP && fp != 0)
> 
> fp will effectively always be non-zero here, so the ``fp != 0'' is a 
> just-in-case?  Suggest adding that, and the GCC bug-number, as additions 
> to the comments.

ok. there is no gcc bug yet, but i will file one.

the fp != 0 is there probably because i don't understand correctly how
the unwinder is working. if you have three frames:

frame 3 - unwind from here
frame 2 - doesn't save fp; fp should be constant in this function
frame 1 - saves fp

frame 3 gets frame 2 as next_frame, will it be able to get the value of
fp (from what is saved in frame 1)? it seems to work in my tests, but 
i haven't yet figured out how it works in the code. if frame 2 doesn't
save a register in its cache, is there some code that by default 
propagates the values from the next frame?

thanks,
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]