似乎无法让gdb在我的mac上工作

时间:2015-05-22 11:20:23

标签: macos gcc gdb

我一直试图让gdb在我的mac上运行,但是唉。这是问题日志。

| => gdb ./src admin
GNU gdb (GDB) 7.9
Copyright (C) 2015 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-darwin14.1.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 ./src...Reading symbols from /Users/home/CTCI-C/Chapter1/1.1/src.dSYM/Contents/Resources/DWARF/src...done.
done.
/Users/home/CTCI-C/Chapter1/1.1/admin: No such file or directory.
(gdb) b main
Breakpoint 1 at 0x100000e76: file src.c, line 17.
(gdb) c
The program is not being run.
(gdb) 

gdb和gcc都是使用自制软件安装的

| => which gdb
/usr/local/bin/gdb



which gcc
/usr/local/bin/gcc

当我做一个r时,这就是我得到的

(gdb) r
Starting program: /Users/home/CTCI-C/Chapter1/1.1/src 
warning: Could not open OSO archive file "/BinaryCache/corecrypto/corecrypto-233.1.2~26/Symbols/BuiltProducts/libcorecrypto_static.a"
warning: `/BinaryCache/coreTLS/coreTLS-35.20.2~10/Objects/coretls.build/coretls.build/Objects-normal/x86_64/system_coretls_vers.o': can't open to read symbols: No such file or directory.
warning: Could not open OSO archive file "/BinaryCache/coreTLS/coreTLS-35.20.2~10/Symbols/BuiltProducts/libcoretls_ciphersuites.a"
warning: Could not open OSO archive file "/BinaryCache/coreTLS/coreTLS-35.20.2~10/Symbols/BuiltProducts/libcoretls_handshake.a"
warning: Could not open OSO archive file "/BinaryCache/coreTLS/coreTLS-35.20.2~10/Symbols/BuiltProducts/libcoretls_record.a"
warning: Could not open OSO archive file "/BinaryCache/coreTLS/coreTLS-35.20.2~10/Symbols/BuiltProducts/libcoretls_stream_parser.a"

Breakpoint 1, main (argc=1, argv=0x7fff5fbffac8) at src.c:17
17      char* str= argv[1];
(gdb) 

这里可能出现的问题。任何指针。

0 个答案:

没有答案
相关问题