Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Mark Kettenis <kettenis@gnu.org>
To: randolph@tausq.org
Cc: gdb@sources.redhat.com
Subject: Re: dwarf2 and frame bases
Date: Thu, 11 Nov 2004 19:47:00 -0000	[thread overview]
Message-ID: <200411111941.iABJfeuD098483@elgar.sibelius.xs4all.nl> (raw)
In-Reply-To: <20041111164852.GS15714@tausq.org> (message from Randolph Chung on Thu, 11 Nov 2004 08:48:52 -0800)

   Date: Thu, 11 Nov 2004 08:48:52 -0800
   From: Randolph Chung <randolph@tausq.org>

   sounds like it should still work (i.e it should still be a valid
   address), except the hppa targer has an explicit check for when we
   expect r3 to be modified but we may be in the process of changing it
   (since it's a 3 insn sequence). In that case, we zero the register to
   tell the unwinder not to use the value in the r3 to calculate the frame
   base (it uses the stack pointer and other unwind information in that
   case)

   See http://sources.redhat.com/ml/gdb-patches/2004-06/msg00108.html for
   more details.

   i know it is kind of hacky, but the frame unwinding code is explicitly
   asking "what is the frame base of this frame", and the target code is
   especially tuned for that..... 

It is certainly hacky, and defenitely wrong.  "Thou shallt not lie
about your register contents".  

   i see two possible solutions:
   1) perhaps the hppa target should use some other mechanism (instead of 
      mucking with r3) to tell the next frame that the frame pointer is 
      not available.....

Why does the next frame need that frame pointer?

   2) in the dwarf code, when trying to get the frame base, should we
      explicitly ask for the frame base instead of using the dwarf 
      expression? perhaps this could be something that can be overridden
      by the target, so that the default still uses the dwarf information.

The problem here is that the debug information provided my the
compiler is wrong, or at least incomplete.  This should be fixed in
the compiler, not in GDB.  Unfortunately this probably means we need
to have proper support for location expressions in GDB.

Mark


  parent reply	other threads:[~2004-11-11 19:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-10 23:57 Randolph Chung
2004-11-10 23:58 ` Daniel Jacobowitz
2004-11-11  3:09   ` Randolph Chung
2004-11-11  9:57     ` Daniel Jacobowitz
2004-11-11 17:12       ` Randolph Chung
2004-11-11 19:42         ` Daniel Jacobowitz
2004-11-11 22:58           ` Randolph Chung
2004-11-11 19:47         ` Mark Kettenis [this message]
2004-11-11 21:18           ` Daniel Jacobowitz

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=200411111941.iABJfeuD098483@elgar.sibelius.xs4all.nl \
    --to=kettenis@gnu.org \
    --cc=gdb@sources.redhat.com \
    --cc=randolph@tausq.org \
    /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