Tôi chỉ đang cố gắng gỡ lỗi mã bằng gdb trên Mac OSX Phiên bản 10.12 nhưng luôn nhận được lỗi không xác định này khi khởi chạy chương trình của tôi trong gdb.gdb chấm dứt với tín hiệu ?, không rõ tín hiệu
Tôi đã mã hóa gdb sau khi cài đặt và biên dịch mã của tôi bằng cờ -g.
Đây là những gì đang xảy ra:
computer:hello user$ gdb a.out
GNU gdb (GDB) 7.12
Copyright (C) 2016 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-apple-darwin16.0.0".
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"...
Reading symbols from a.out...Reading symbols from /Users/user/Documents/Programming/hello/a.out.dSYM/Contents/Resources/DWARF/a.out...done.
done.
(gdb) r
Starting program: /Users/user/Documents/Programming/hello/a.out
During startup program terminated with signal ?, Unknown signal.
Tạm thời tôi có tín hiệu SIGTRAP, nhưng tôi không thể tìm ra lý do tại sao nó bây giờ ném các tín hiệu không rõ nữa.
đây là mechod cho gdb trong OSX 10.12.5 – lakeslove