* `chain-frame'
@ 2003-01-09 2:11 Andrew Cagney
2003-01-09 2:38 ` `chain-frame' Daniel Jacobowitz
0 siblings, 1 reply; 10+ messages in thread
From: Andrew Cagney @ 2003-01-09 2:11 UTC (permalink / raw)
To: gdb
I've been looking for a better name for the mechanism the targets
currently use when unwinding a frame. I've been using saved-regs frame,
but that is pretty pervasive - all frames contain saved regs.
I'm thinking of instead calling it a `chain-frame' since the existing
mechanism relies not just on the frame->saved_regs[] array but also the
FRAME_CHAIN() method.
This means that there are so far potentially:
dummy-frame:
Created when doing an inferior function call.
regcache-frame (regs-frame?):
A frame that maps directly onto the register cache.
cfi-frame:
Implemented using dwarf2cfi (this is the holy grail)
sigtramp-frame:
Corresponds to a signal trampoline.
fake-frame (?):
Recently discussed, would also use dwarf2cfi but with fake debug
information.
Andrew
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: `chain-frame'
2003-01-09 2:11 `chain-frame' Andrew Cagney
@ 2003-01-09 2:38 ` Daniel Jacobowitz
2003-01-09 3:06 ` `chain-frame' Andrew Cagney
0 siblings, 1 reply; 10+ messages in thread
From: Daniel Jacobowitz @ 2003-01-09 2:38 UTC (permalink / raw)
To: gdb
I'm trying, but I still don't quite see how you're laying this out.
All help welcomed! Maybe I should look over your WIP again; has it
changed since you last posted it?
I think I understand now why you want fake-frame different from
cfi-frame. I'll probably wrap my head around it better when I take a
good look at the code, eventually.
On Wed, Jan 08, 2003 at 09:09:57PM -0500, Andrew Cagney wrote:
> I've been looking for a better name for the mechanism the targets
> currently use when unwinding a frame. I've been using saved-regs frame,
> but that is pretty pervasive - all frames contain saved regs.
>
> I'm thinking of instead calling it a `chain-frame' since the existing
> mechanism relies not just on the frame->saved_regs[] array but also the
> FRAME_CHAIN() method.
>
> This means that there are so far potentially:
>
> dummy-frame:
> Created when doing an inferior function call.
Unwinds from the dummy register cache...
> regcache-frame (regs-frame?):
> A frame that maps directly onto the register cache.
Doesn't unwind, since we're at the top.
> cfi-frame:
> Implemented using dwarf2cfi (this is the holy grail)
Unwinds using the CFI reader and the DWARF-2 CFI data.
> sigtramp-frame:
> Corresponds to a signal trampoline.
Unwinds using the sigtramp handler.
> fake-frame (?):
> Recently discussed, would also use dwarf2cfi but with fake debug
> information.
Unwinds using the CFI reader and fake DWARF-2 CFI information. Someday
maybe have a more generalized "unwind language"; that's my hope,
anyway. So we don't have to encode and decode the CFI gunk.
And the other group of frames just use the current frame chain code,
and poke at the stack to find the saved registers; maybe
"stack-chain-frame"?
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: `chain-frame'
2003-01-09 2:38 ` `chain-frame' Daniel Jacobowitz
@ 2003-01-09 3:06 ` Andrew Cagney
2003-01-09 3:12 ` `chain-frame' Daniel Jacobowitz
0 siblings, 1 reply; 10+ messages in thread
From: Andrew Cagney @ 2003-01-09 3:06 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb
> I'm trying, but I still don't quite see how you're laying this out.
> All help welcomed! Maybe I should look over your WIP again; has it
> changed since you last posted it?
It's changed. I'm going to cut a branch.
> regcache-frame (regs-frame?):
>> A frame that maps directly onto the register cache.
>
>
> Doesn't unwind, since we're at the top.
Nope! At the bottom, and it does unwind.
This unwinds to the ``inner most frame''. Instead of calling
create_new_frame(), get_current_frame() creates this frame and then
unwinds it.
If get_current_frame()'s attempt at unwinding this frame fails. A fake
frame is created (or even the regs-frame) and returned This guarentees
that `there is always a frame'.
For the moment it unwinds the FP/PC using read_fp() and read_pc(), and
the registers by reading the register cache. Eventually, it can use
methods that: don't suffer from decr-pc-after-break; don't assume global
state; and also refer to the thread's stop reason when determining the
pc/fp.
Another name for this one is:
sentinal-frame
since it acts as the sentinal one beyond the inner most frame.
> fake-frame (?):
>> Recently discussed, would also use dwarf2cfi but with fake debug
>> information.
>
>
> Unwinds using the CFI reader and fake DWARF-2 CFI information. Someday
> maybe have a more generalized "unwind language"; that's my hope,
> anyway. So we don't have to encode and decode the CFI gunk.
Yes, and Yes. The later can just plug in.
> And the other group of frames just use the current frame chain code,
> and poke at the stack to find the saved registers; maybe
> "stack-chain-frame"?
Oops, yes. Just:
chain-frame:
though I think.
Andrew
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: `chain-frame'
2003-01-09 3:06 ` `chain-frame' Andrew Cagney
@ 2003-01-09 3:12 ` Daniel Jacobowitz
2003-01-09 16:04 ` `chain-frame' Andrew Cagney
2003-01-10 15:47 ` `chain-frame' Andrew Cagney
0 siblings, 2 replies; 10+ messages in thread
From: Daniel Jacobowitz @ 2003-01-09 3:12 UTC (permalink / raw)
To: Andrew Cagney; +Cc: gdb
On Wed, Jan 08, 2003 at 10:06:12PM -0500, Andrew Cagney wrote:
> >I'm trying, but I still don't quite see how you're laying this out.
> >All help welcomed! Maybe I should look over your WIP again; has it
> >changed since you last posted it?
>
> It's changed. I'm going to cut a branch.
>
> >regcache-frame (regs-frame?):
> >>A frame that maps directly onto the register cache.
> >
> >
> >Doesn't unwind, since we're at the top.
>
> Nope! At the bottom, and it does unwind.
>
> This unwinds to the ``inner most frame''. Instead of calling
> create_new_frame(), get_current_frame() creates this frame and then
> unwinds it.
Oh, er. Right, I should have understood that by now. Thank you.
> Another name for this one is:
>
> sentinal-frame
>
> since it acts as the sentinal one beyond the inner most frame.
Great. (Sentinel btw).
> >fake-frame (?):
> >>Recently discussed, would also use dwarf2cfi but with fake debug
> >>information.
> >
> >
> >Unwinds using the CFI reader and fake DWARF-2 CFI information. Someday
> >maybe have a more generalized "unwind language"; that's my hope,
> >anyway. So we don't have to encode and decode the CFI gunk.
>
> Yes, and Yes. The later can just plug in.
>
> >And the other group of frames just use the current frame chain code,
> >and poke at the stack to find the saved registers; maybe
> >"stack-chain-frame"?
>
> Oops, yes. Just:
>
> chain-frame:
>
> though I think.
This'll require playing around with my vocabulary a little to get used
to it, but I can buy it. The general action is "unwinding"; looking
for the "chain" is one mechanism. I like it.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: `chain-frame'
2003-01-09 3:12 ` `chain-frame' Daniel Jacobowitz
@ 2003-01-09 16:04 ` Andrew Cagney
2003-01-10 15:47 ` `chain-frame' Andrew Cagney
1 sibling, 0 replies; 10+ messages in thread
From: Andrew Cagney @ 2003-01-09 16:04 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb
> Great. (Sentinel btw).
Thanks, mozilla (or at least this version) still doesn't have a spelling
checker :-(
> This'll require playing around with my vocabulary a little to get used
> to it, but I can buy it. The general action is "unwinding"; looking
> for the "chain" is one mechanism. I like it.
And another one, they just keep comming:
libunwind-frame:
That -lunwind library code that is lurking in the wings (for the ia64
but it is apparently generic). The last time I saw the patch it had its
paws all over the ia64 code. That is no longer necessary. It, to, can
be a separate module.
Andrew
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: `chain-frame'
2003-01-09 3:12 ` `chain-frame' Daniel Jacobowitz
2003-01-09 16:04 ` `chain-frame' Andrew Cagney
@ 2003-01-10 15:47 ` Andrew Cagney
2003-01-10 15:52 ` `chain-frame' Daniel Jacobowitz
1 sibling, 1 reply; 10+ messages in thread
From: Andrew Cagney @ 2003-01-10 15:47 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb
>> This unwinds to the ``inner most frame''. Instead of calling
>> create_new_frame(), get_current_frame() creates this frame and then
>> unwinds it.
>
>
> Oh, er. Right, I should have understood that by now. Thank you.
If I was ever granted a wish allowing me to change one (pair) of gdb
commands, up/down would be it.
>> Oops, yes. Just:
>>
>> chain-frame:
>>
>> though I think.
>
>
> This'll require playing around with my vocabulary a little to get used
> to it, but I can buy it. The general action is "unwinding"; looking
> for the "chain" is one mechanism. I like it.
Er, actually, I've, hopefully, got a beter idea:
extras-frame
It reflects how the original frame code would use INIT_EXTRA_FRAME_INFO
during initialization.
Thing is, the phrase `frame chain' is just too useful when describing
the [er] frame chain (all the frames strung together).
Andrew
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: `chain-frame'
2003-01-10 15:47 ` `chain-frame' Andrew Cagney
@ 2003-01-10 15:52 ` Daniel Jacobowitz
2003-01-10 16:18 ` `chain-frame' Andrew Cagney
0 siblings, 1 reply; 10+ messages in thread
From: Daniel Jacobowitz @ 2003-01-10 15:52 UTC (permalink / raw)
To: gdb
On Fri, Jan 10, 2003 at 10:47:09AM -0500, Andrew Cagney wrote:
>
> >>This unwinds to the ``inner most frame''. Instead of calling
> >>create_new_frame(), get_current_frame() creates this frame and then
> >>unwinds it.
> >
> >
> >Oh, er. Right, I should have understood that by now. Thank you.
>
> If I was ever granted a wish allowing me to change one (pair) of gdb
> commands, up/down would be it.
Lord, yes. Well, maybe that and "until".... :)
> >>Oops, yes. Just:
> >>
> >> chain-frame:
> >>
> >>though I think.
> >
> >
> >This'll require playing around with my vocabulary a little to get used
> >to it, but I can buy it. The general action is "unwinding"; looking
> >for the "chain" is one mechanism. I like it.
>
> Er, actually, I've, hopefully, got a beter idea:
>
> extras-frame
>
> It reflects how the original frame code would use INIT_EXTRA_FRAME_INFO
> during initialization.
>
> Thing is, the phrase `frame chain' is just too useful when describing
> the [er] frame chain (all the frames strung together).
I don't like "extras-frame" - it has no context outside of the
mechanism, which will hopefully go away, right? But this kind of frame
isn't going to go away, since we have to cope without CFI data.
saved-frame-chain?
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: `chain-frame'
2003-01-10 15:52 ` `chain-frame' Daniel Jacobowitz
@ 2003-01-10 16:18 ` Andrew Cagney
2003-01-10 16:21 ` `chain-frame' Daniel Jacobowitz
0 siblings, 1 reply; 10+ messages in thread
From: Andrew Cagney @ 2003-01-10 16:18 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb
>> Er, actually, I've, hopefully, got a beter idea:
>>
>> extras-frame
>>
>> It reflects how the original frame code would use INIT_EXTRA_FRAME_INFO
>> during initialization.
>>
>> Thing is, the phrase `frame chain' is just too useful when describing
>> the [er] frame chain (all the frames strung together).
>
>
> I don't like "extras-frame" - it has no context outside of the
> mechanism, which will hopefully go away, right? But this kind of frame
> isn't going to go away, since we have to cope without CFI data.
True. On the other hand, no one, other than the GDB developer is going
to know about it, and it reflects the underlying implementation, so I
don't know that it needs any additional context.
As for it going away, actually, yes it will. New architectures will
hopefully want to implement the three unwind methods directly. It
should lead to a more efficient implementation. See my post to JimI
(cc'd gdb@).
> saved-frame-chain?
That's got the same problem as `saved-regs-frame'. Every frame has a
saved frame chain ...
Andrew
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: `chain-frame'
2003-01-10 16:18 ` `chain-frame' Andrew Cagney
@ 2003-01-10 16:21 ` Daniel Jacobowitz
2003-01-10 18:40 ` `chain-frame' Andrew Cagney
0 siblings, 1 reply; 10+ messages in thread
From: Daniel Jacobowitz @ 2003-01-10 16:21 UTC (permalink / raw)
To: gdb
On Fri, Jan 10, 2003 at 11:17:49AM -0500, Andrew Cagney wrote:
>
> >>Er, actually, I've, hopefully, got a beter idea:
> >>
> >> extras-frame
> >>
> >>It reflects how the original frame code would use INIT_EXTRA_FRAME_INFO
> >>during initialization.
> >>
> >>Thing is, the phrase `frame chain' is just too useful when describing
> >>the [er] frame chain (all the frames strung together).
> >
> >
> >I don't like "extras-frame" - it has no context outside of the
> >mechanism, which will hopefully go away, right? But this kind of frame
> >isn't going to go away, since we have to cope without CFI data.
>
> True. On the other hand, no one, other than the GDB developer is going
> to know about it, and it reflects the underlying implementation, so I
> don't know that it needs any additional context.
>
> As for it going away, actually, yes it will. New architectures will
> hopefully want to implement the three unwind methods directly. It
> should lead to a more efficient implementation. See my post to JimI
> (cc'd gdb@).
Maybe legacy-chain or generic-chain? Hmm, I kind of like
generic-chain. Then the architecture can provide arch-chain.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: `chain-frame'
2003-01-10 16:21 ` `chain-frame' Daniel Jacobowitz
@ 2003-01-10 18:40 ` Andrew Cagney
0 siblings, 0 replies; 10+ messages in thread
From: Andrew Cagney @ 2003-01-10 18:40 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb
> Maybe legacy-chain or generic-chain? Hmm, I kind of like
> generic-chain. Then the architecture can provide arch-chain.
I think generic frame is to close to generic dummy frames (and the're
not generic :-) I was going to say ya, to legacy frames, but I think
we're going to end up with multiple legacy frames, however, ...
Andrew
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2003-01-10 18:40 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-09 2:11 `chain-frame' Andrew Cagney
2003-01-09 2:38 ` `chain-frame' Daniel Jacobowitz
2003-01-09 3:06 ` `chain-frame' Andrew Cagney
2003-01-09 3:12 ` `chain-frame' Daniel Jacobowitz
2003-01-09 16:04 ` `chain-frame' Andrew Cagney
2003-01-10 15:47 ` `chain-frame' Andrew Cagney
2003-01-10 15:52 ` `chain-frame' Daniel Jacobowitz
2003-01-10 16:18 ` `chain-frame' Andrew Cagney
2003-01-10 16:21 ` `chain-frame' Daniel Jacobowitz
2003-01-10 18:40 ` `chain-frame' Andrew Cagney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox