为什么当我尝试打印余弦时 gdb 中止?

发布于 2025-01-12 12:25:41 字数 1510 浏览 0 评论 0原文

这是我与它的互动。我首先启动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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

被翻牌 2025-01-19 12:25:42

好吧,上面评论的解决方案曾经有效过一次,然后就退出了。 cos(.333) 中止了 gdb。哦,好吧...我想知道这是 gdb 或 Debian 的问题,还是我机器的硬件很奇怪。我还忽略了在上面的评论中包含命令“install”该命令应为:

apg-get install gdb gdb-doc build-essential devscript

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:

apg-get install gdb gdb-doc build-essential devscript
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文