Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Jeffrey A Law <law@cygnus.com>
To: Jim Blandy <jimb@cygnus.com>
Cc: egcs@egcs.cygnus.com, gdb@sourceware.cygnus.com
Subject: Re: IA32: printing FP register variables
Date: Thu, 08 Jul 1999 22:12:00 -0000	[thread overview]
Message-ID: <4264.931496789@upchuck.cygnus.com> (raw)
In-Reply-To: <199907090356.WAA01337@zwingli.cygnus.com>

  In message < 199907090356.WAA01337@zwingli.cygnus.com >you write:
  > On IA32 processors, how should GDB find the values of variables which
  > live in floating-point registers?  At the moment, it can't do this
  > reliably, which must be a royal pain for people doing numeric work.
To say the least :-)  It's not just folks doing numeric work -- it's a 
pain for those of us who have to analyze bug reports on ia32 which perform
FP computations ;-)


  > What does the register number which GCC emits now mean?  If an N_RSYM
  > stab has a value of 8, what does that mean?  ST(0)?  When?  Every
  > variable is ST(0) when it's just been pushed.
I have some guesses about what it might mean ;-)

gcc works by initially pretending it has a flat register file with 8 FP regs.
It assigns user variables, temporaries, etc to those 8 FP regs.  I suspect
the number gcc emits corresponds to the index into the flat register file.

After allocation is finished, gcc converts the flat register file into a 
stacked register file.  I do not think it tries to update any debug info
when converting to a stacked register file.

I believe gcc will have to emit more debug info for gdb to be able to find
FP variables on the regstack.


  > Should GDB derive this info on its own?  It could disassemble the
  > function, starting from the end of the prologue, and count pushes and
  > pops, building a table mapping PC values onto stack depths.  (This
  > assumes that the stack depth is constant at a given PC.)  That would
  > require no debug info, but would be a pain to implement.
Not only would it be a pain, I believe gcc already has this information handy,
just not in a good place for emitting debugging symbols.
jeff


  reply	other threads:[~1999-07-08 22:12 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-07-08 20:56 Jim Blandy
1999-07-08 22:12 ` Jeffrey A Law [this message]
     [not found] ` <000d01bec9c2$06f4fdb0$3404010a@metrowerks.com>
1999-07-08 22:04   ` Jeffrey A Law
1999-07-09  7:04     ` Michael Meissner
1999-07-10 11:00       ` Tom Tromey
1999-07-09 10:53   ` Jim Blandy
     [not found] <199907091724.SAA31114@phal.cygnus.co.uk>
     [not found] ` <00d401beca31$3d752c10$3404010a@metrowerks.com>
1999-07-09 10:52   ` Jeffrey A Law
1999-07-09 13:50   ` Jim Blandy
1999-07-09 14:00 Michael Meissner
     [not found] <400.931648196@upchuck.cygnus.com>
     [not found] ` <np908ljwht.fsf@zwingli.cygnus.com>
     [not found]   ` <9209.931822541@upchuck.cygnus.com>
1999-07-12 16:50     ` Joern Rennecke
1999-07-12 17:18     ` Robert Lipe
1999-07-12 19:40   ` Richard Henderson
     [not found]     ` <np3dysi9gh.fsf@zwingli.cygnus.com>
1999-07-13 16:05       ` Richard Henderson
     [not found] <9500.931826533@upchuck.cygnus.com>
     [not found] ` <np1zeci6tm.fsf@zwingli.cygnus.com>
     [not found]   ` <npn1ws2xp1.fsf@zwingli.cygnus.com>
1999-07-19 23:41     ` Richard Henderson
1999-07-26 11:43       ` Jim Blandy
1999-07-26 13:15         ` Richard Henderson

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=4264.931496789@upchuck.cygnus.com \
    --to=law@cygnus.com \
    --cc=egcs@egcs.cygnus.com \
    --cc=gdb@sourceware.cygnus.com \
    --cc=jimb@cygnus.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