From: Daniel Jacobowitz <drow@false.org>
To: gdb-patches@sources.redhat.com
Subject: Re: [rfa/mips] Stop backtraces when we've lost the PC
Date: Fri, 19 Mar 2004 00:09:00 -0000 [thread overview]
Message-ID: <20040312000027.GA990@nevyn.them.org> (raw)
In-Reply-To: <4050FA78.7020904@gnu.org>
On Thu, Mar 11, 2004 at 06:47:04PM -0500, Andrew Cagney wrote:
> >On Thu, Mar 11, 2004 at 03:51:11PM -0500, Andrew Cagney wrote:
> >
> >>>>>I hypothesize that if two consecutive frames, regardless of their type,
> >>>>>claim to save the PC register at the same location, then unwinding is
> >>>>>hosed.
> >>
> >>>
> >>>It would need to do a deep analysis of the location (think about a
> >>>register window architecture), hence I don't know that there's that much
> >>>cost benefit.
>
> >>> Something simpler such as a list of functions known to
> >>>terminate the stack might be more useful.
> >
> >
> >Er, no. frame_unwind_register tells us where, relative to the current
> >machine state, the register is saved. If it returns lval_register and
> >real_regnum == O7_REGNUM, then that means it leaves in
> >read_register(O7_REGNUM) at this moment, not that it did at some point
> >in the past. Isn't that the point of the recursive unwinder?
>
> "Er, no". to which part? I'll assume the first half of the first half.
>
> I suspect you're violently agreeing with me here - you're describing
> what I ment by a deep analysis of the location - tracking things all the
> way back to where in the inferior the value is. The architecture
> vector will need to be changed, the existing function deprecated, and
> new methods implemented. The introduction of "struct location" (or
> whatever) would then see it changed again. Given it is all for a
> marginal edge case (and to cover up breakage in glibc), I don't see any
> cost benefit in doing this.
OK. It was just a thought :) It seems reasonable that whatever kind
of location frame_unwind_register returns (which you're right, is
likely to change) could naturally be returned by frame_unwind_pc also.
But it would require playing with the interfaces pretty severely, so
I'll just table the idea unless I run into this again somewhere else.
> I think a more useful mechanism is for there to be a table of "start"
> functions that the user could manipulate (but would default to values
> specified by the OSABI).
I'm not sure how useful that would really be; we seem to handle the
entry points OK at the moment. And it couldn't be used for this case
since we do want to backtrace past clone in some circumstances.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
WARNING: multiple messages have this Message-ID
From: Daniel Jacobowitz <drow@false.org>
To: gdb-patches@sources.redhat.com
Subject: Re: [rfa/mips] Stop backtraces when we've lost the PC
Date: Fri, 12 Mar 2004 00:00:00 -0000 [thread overview]
Message-ID: <20040312000027.GA990@nevyn.them.org> (raw)
Message-ID: <20040312000000.nk0lDcDDHx3qz_a3BrIuLBZOXRantXAyhQxYPITmJTc@z> (raw)
In-Reply-To: <4050FA78.7020904@gnu.org>
On Thu, Mar 11, 2004 at 06:47:04PM -0500, Andrew Cagney wrote:
> >On Thu, Mar 11, 2004 at 03:51:11PM -0500, Andrew Cagney wrote:
> >
> >>>>>I hypothesize that if two consecutive frames, regardless of their type,
> >>>>>claim to save the PC register at the same location, then unwinding is
> >>>>>hosed.
> >>
> >>>
> >>>It would need to do a deep analysis of the location (think about a
> >>>register window architecture), hence I don't know that there's that much
> >>>cost benefit.
>
> >>> Something simpler such as a list of functions known to
> >>>terminate the stack might be more useful.
> >
> >
> >Er, no. frame_unwind_register tells us where, relative to the current
> >machine state, the register is saved. If it returns lval_register and
> >real_regnum == O7_REGNUM, then that means it leaves in
> >read_register(O7_REGNUM) at this moment, not that it did at some point
> >in the past. Isn't that the point of the recursive unwinder?
>
> "Er, no". to which part? I'll assume the first half of the first half.
>
> I suspect you're violently agreeing with me here - you're describing
> what I ment by a deep analysis of the location - tracking things all the
> way back to where in the inferior the value is. The architecture
> vector will need to be changed, the existing function deprecated, and
> new methods implemented. The introduction of "struct location" (or
> whatever) would then see it changed again. Given it is all for a
> marginal edge case (and to cover up breakage in glibc), I don't see any
> cost benefit in doing this.
OK. It was just a thought :) It seems reasonable that whatever kind
of location frame_unwind_register returns (which you're right, is
likely to change) could naturally be returned by frame_unwind_pc also.
But it would require playing with the interfaces pretty severely, so
I'll just table the idea unless I run into this again somewhere else.
> I think a more useful mechanism is for there to be a table of "start"
> functions that the user could manipulate (but would default to values
> specified by the OSABI).
I'm not sure how useful that would really be; we seem to handle the
entry points OK at the moment. And it couldn't be used for this case
since we do want to backtrace past clone in some circumstances.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
next prev parent reply other threads:[~2004-03-12 0:00 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-19 0:09 Daniel Jacobowitz
2004-03-06 23:17 ` Daniel Jacobowitz
2004-03-08 0:56 ` Andrew Cagney
2004-03-08 3:23 ` Daniel Jacobowitz
2004-03-19 0:09 ` Daniel Jacobowitz
2004-03-19 0:09 ` Daniel Jacobowitz
2004-03-08 15:48 ` Daniel Jacobowitz
2004-03-08 20:26 ` Daniel Jacobowitz
2004-03-19 0:09 ` Daniel Jacobowitz
2004-03-19 0:09 ` Andrew Cagney
2004-03-17 22:11 ` Andrew Cagney
2004-03-22 21:07 ` Daniel Jacobowitz
2004-03-11 20:51 ` Andrew Cagney
2004-03-19 0:09 ` Andrew Cagney
2004-03-19 0:09 ` Daniel Jacobowitz
2004-03-11 20:57 ` Daniel Jacobowitz
2004-03-19 0:09 ` Andrew Cagney
2004-03-11 23:47 ` Andrew Cagney
2004-03-19 0:09 ` Daniel Jacobowitz [this message]
2004-03-12 0:00 ` Daniel Jacobowitz
2004-03-19 0:09 ` Daniel Jacobowitz
2004-03-08 17:41 ` Daniel Jacobowitz
2004-03-19 0:09 ` Andrew Cagney
2004-03-08 16:33 ` Andrew Cagney
2004-03-19 0:09 ` Andrew Cagney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040312000027.GA990@nevyn.them.org \
--to=drow@false.org \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox