为什么当我尝试打印余弦时 gdb 中止?
这是我与它的互动。我首先启动gdb,设置一个断点,运行程序gdb在断点处暂停。然后:
<code>
(gdb) b 89
Breakpoint 1 at 0x18cc: file parseGaia3DataToSqDeg.c, line 89.
(gdb) r
Starting program: /sixTB/astro/catalogs/gaia3/shSqDeg/fj
Star 0.0281655 -89.857 not found in 0 tries.
Breakpoint 1, main (argc=1, argv=0x7fffffffe5c8) at parseGaia3DataToSqDeg.c:89
89 exit(0); //TEST
(gdb) p cos(.333)
Abort
</code>
Gdb 就退出了,我又回到了命令行。
gdb 上的数据:
gdb --version
GNU gdb (Debian 10.1-1.7) 10.1.90.20210103-git
My machine:
total used free shared buff/cache available
Mem: 27Gi 3.1Gi 1.2Gi 123Mi 23Gi 23Gi
Swap: 976Mi 3.0Mi 973Mi
CPU family: 25
AMD Ryzen 5 5600G with Radeon Graphics
CPU MHz: 1397.031
CPU max MHz: 5000.6831
CPU min MHz: 1400.0000
BogoMIPS: 7784.71
CPU cache size: 512 KB
No brand USB OPTICAL MOUSE
Microsoft Corp. Microsoft Ergonomic Keyboard
Filesystem Size Used Avail Use% Mounted on
udev 14G 0 14G 0% /dev
tmpfs 2.8G 1.5M 2.8G 1% /run
/dev/nvme0n1p2 233G 22G 199G 10% /
tmpfs 14G 0 14G 0% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
/dev/nvme0n1p1 511M 3.5M 508M 1% /boot/efi
/dev/sdb1 3.6T 93G 3.4T 3% /fourTB
/dev/sda1 5.5T 2.3T 2.9T 45% /sixTB
tmpfs 2.8G 132K 2.8G 1% /run/user/1000
FWIW,在以前版本的 gdb 中,我总是可以打印余弦或其他数学函数。
Here's my interaction with it. I first start gdb, set a breakpoint, run the program gdb halts at the breakpoint. Then:
<code>
(gdb) b 89
Breakpoint 1 at 0x18cc: file parseGaia3DataToSqDeg.c, line 89.
(gdb) r
Starting program: /sixTB/astro/catalogs/gaia3/shSqDeg/fj
Star 0.0281655 -89.857 not found in 0 tries.
Breakpoint 1, main (argc=1, argv=0x7fffffffe5c8) at parseGaia3DataToSqDeg.c:89
89 exit(0); //TEST
(gdb) p cos(.333)
Abort
</code>
Gdb simply quits, and I'm back at my command line.
Data on gdb:
gdb --version
GNU gdb (Debian 10.1-1.7) 10.1.90.20210103-git
My machine:
total used free shared buff/cache available
Mem: 27Gi 3.1Gi 1.2Gi 123Mi 23Gi 23Gi
Swap: 976Mi 3.0Mi 973Mi
CPU family: 25
AMD Ryzen 5 5600G with Radeon Graphics
CPU MHz: 1397.031
CPU max MHz: 5000.6831
CPU min MHz: 1400.0000
BogoMIPS: 7784.71
CPU cache size: 512 KB
No brand USB OPTICAL MOUSE
Microsoft Corp. Microsoft Ergonomic Keyboard
Filesystem Size Used Avail Use% Mounted on
udev 14G 0 14G 0% /dev
tmpfs 2.8G 1.5M 2.8G 1% /run
/dev/nvme0n1p2 233G 22G 199G 10% /
tmpfs 14G 0 14G 0% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
/dev/nvme0n1p1 511M 3.5M 508M 1% /boot/efi
/dev/sdb1 3.6T 93G 3.4T 3% /fourTB
/dev/sda1 5.5T 2.3T 2.9T 45% /sixTB
tmpfs 2.8G 132K 2.8G 1% /run/user/1000
FWIW, in previous versions of gdb, I could always print a cosine or other math function.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,上面评论的解决方案曾经有效过一次,然后就退出了。 cos(.333) 中止了 gdb。哦,好吧...我想知道这是 gdb 或 Debian 的问题,还是我机器的硬件很奇怪。我还忽略了在上面的评论中包含命令“install”该命令应为:
OK, the above comment's solution worked once, and then quit. cos(.333) aborted gdb. Oh well... I'm wondering if it's a gdb or Debian problem, or that my machine's hardware is simply weird. I also neglected to include in the above comment's command "install" The command should read: