[commit] Convert pop() to a per-frame method

Andrew Cagney ac131313@redhat.com
Sun Jan 19 17:56:00 GMT 2003


Hello,

The attached changes POP_FRAME() into a per-frame pop method 
frame_pop().  It keeps the old code working by providing a default that 
calls the existing POP_FRAME().

Several things to note:

- The code retains a long standing problem with the register cache.
Since the pop code is simultaneously reading/writing to the same cache, 
it is pretty easy to override a regcache entry that is needed to restore 
another register.

- The command `return' could be greatly simplified.
At present it does a separate pop for each frame back to the selected 
frame.  It could (I suspect if the SPARC is ignored) just directly pop 
the last frame.  Things to investigate one day....  Wonder if SIGTRAMP 
frames hit this theory for six.

- It might be possible to (again if the SPARC is ignored) simply 
implement pop() using a scratch register cache and the register unwind 
method.  I think this is one to worry about after all the frame rewrite 
mess has been cleaned up.  However, does anyone feel lucky?

This change also means that POP_FRAME is going to be deprecated.

Tested on i386 and PPC.

committed,
Andrew
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: diffs
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20030119/e482633a/attachment.ksh>


More information about the Gdb-patches mailing list