Non riesco a fare GDB stampa correcly alcuni numeri in virgola mobile in stile C esadecimali, si veda:GDB può analizzare correttamente i numeri esadecimali in virgola mobile in stile C?
GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
(gdb) p 0xa.0p-4
$1 = 6
Qui $1
dovrebbe essere 0.625
ma il mio GDB sembra di vedere 0xa.0p
come decimali 10
e fa un successiva aggiunta con -4
. Cosa c'è di sbagliato in ciò che chiedo a GDB di stampare? Non sono riuscito a trovare alcuna documentazione pertinente su come GDB gestisce i float esadecimali.
@hdl Non riesco a trovare alcun bug aperto su gdb Bugzilla https://www.sourceware.org/bugzilla ti piacerebbe aprirne uno? Altrimenti posso salvarlo da solo. – ouah
Per l'errore "Numero non valido", vedere http://stackoverflow.com/questions/24865689/change-decimal-separator-in-gdb#comment38649027_24865689 – hdl
@hdl buon punto, rimuovo questo punto della mia risposta per evitare il rumore non necessario – ouah