tôi không thể quản lý để làm cho GDB in correcly một số con số dấu chấm động C-phong cách thập lục phân, xem:GDB có thể phân tích cú pháp các số dấu phẩy thập lục phân kiểu C theo chiều thập phân không?
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
Đây $1
nên 0.625
nhưng GDB của tôi dường như thấy 0xa.0p
như thập phân 10
và làm một bổ sung tiếp theo với -4
. Điều gì xảy ra với những gì tôi yêu cầu GDB in? Tôi không thể tìm thấy bất kỳ tài liệu liên quan nào về cách GDB xử lý các số thập lục phân.
@hdl Tôi không thể tìm thấy bất kỳ lỗi mở nào trên gdb Bugzilla https://www.sourceware.org/bugzilla bạn có muốn mở một tài khoản không? Nếu không, tôi có thể tự mình nộp nó. – ouah
Đối với lỗi 'Invalid number', hãy xem http://stackoverflow.com/questions/24865689/change-decimal-separator-in-gdb#comment38649027_24865689 – hdl
@hdl điểm tốt, tôi loại bỏ điểm này của câu trả lời của tôi để tránh nhiễu không cần thiết – ouah