public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Dump values from FPU after each operation
@ 2011-11-04  8:15 Thomas Baruchel
  2011-11-04  9:18 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Baruchel @ 2011-11-04  8:15 UTC (permalink / raw)
  To: gdb

Hi, I have a compiled program with no debugging symbol (and no source if
you want to ask). I would like to know how some floating point value is
made of, and since I know what value I am looking for, I think one easy
way would be to lauch the program and to have on the standard output the
content of the FPU after each operation; I am aware it will be a huge
amount of value, but since I know which value is expected, I could
probably parse this output to grep (with -A / -B options in order to extract
100 lines around the exact matching). But is it possible to do such a thing?

I am aware that dumping these registers will not tell me the operations,
but this is not a big issue; I can probably guess it once I know the
involved floating-point values.

If the data can't be redirect to standard output, I can save it, this is not
the most important. Regards,

-- 
Thomas Baruchel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Dump values from FPU after each operation
  2011-11-04  8:15 Dump values from FPU after each operation Thomas Baruchel
@ 2011-11-04  9:18 ` Eli Zaretskii
  2011-11-04 16:46   ` Thomas Baruchel
  0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2011-11-04  9:18 UTC (permalink / raw)
  To: baruchel; +Cc: gdb

> Date: Fri, 4 Nov 2011 09:14:35 +0100 (CET)
> From: Thomas Baruchel <baruchel@gmx.com>
> 
> Hi, I have a compiled program with no debugging symbol (and no source if
> you want to ask). I would like to know how some floating point value is
> made of, and since I know what value I am looking for, I think one easy
> way would be to lauch the program and to have on the standard output the
> content of the FPU after each operation; I am aware it will be a huge
> amount of value, but since I know which value is expected, I could
> probably parse this output to grep (with -A / -B options in order to extract
> 100 lines around the exact matching). But is it possible to do such a thing?
> 
> I am aware that dumping these registers will not tell me the operations,
> but this is not a big issue; I can probably guess it once I know the
> involved floating-point values.
> 
> If the data can't be redirect to standard output, I can save it, this is not
> the most important. Regards,

I think you want "info float" and/or "info all-registers", and you
want to turn on logging, so GDB writes everything to a log file you
can later process.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Dump values from FPU after each operation
  2011-11-04  9:18 ` Eli Zaretskii
@ 2011-11-04 16:46   ` Thomas Baruchel
  2011-11-04 17:34     ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Baruchel @ 2011-11-04 16:46 UTC (permalink / raw)
  To: gdb

On Fri, 4 Nov 2011, Eli Zaretskii wrote:
> I think you want "info float" and/or "info all-registers", and you
> want to turn on logging, so GDB writes everything to a log file you
> can later process.

OK, is there a way to have the content of the floating point registers
printed as float rather than in hexadecimal? Regards,

-- 
Thomas Baruchel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Dump values from FPU after each operation
  2011-11-04 16:46   ` Thomas Baruchel
@ 2011-11-04 17:34     ` Eli Zaretskii
  0 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2011-11-04 17:34 UTC (permalink / raw)
  To: baruchel; +Cc: gdb

> Date: Fri, 4 Nov 2011 17:46:16 +0100 (CET)
> From: Thomas Baruchel <baruchel@gmx.com>
> 
> On Fri, 4 Nov 2011, Eli Zaretskii wrote:
> > I think you want "info float" and/or "info all-registers", and you
> > want to turn on logging, so GDB writes everything to a log file you
> > can later process.
> 
> OK, is there a way to have the content of the floating point registers
> printed as float rather than in hexadecimal? Regards,

"info all-registers" does that.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-11-04 17:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-04  8:15 Dump values from FPU after each operation Thomas Baruchel
2011-11-04  9:18 ` Eli Zaretskii
2011-11-04 16:46   ` Thomas Baruchel
2011-11-04 17:34     ` Eli Zaretskii

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).