Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/c/55.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
pthread_create中遇到错误_C_Linux_Gdb_Pthreads - Fatal编程技术网

pthread_create中遇到错误

pthread_create中遇到错误,c,linux,gdb,pthreads,C,Linux,Gdb,Pthreads,当我在Linux中使用gdb一步一步地运行代码时,出现了这样一个错误。在(gdb)s之后, 我收到了这些信息: __pthread_create_2_1 (newthread=0x7fffffffdcc0, attr=0x0, start_routine=0x400cdf <sendMessage>, arg=0x7fffffffdcd0) at pthread_create.c:472 472 pthread_create.c: No such file or directory.

当我在Linux中使用
gdb
一步一步地运行代码时,出现了这样一个错误。在
(gdb)s
之后, 我收到了这些信息:

__pthread_create_2_1 (newthread=0x7fffffffdcc0, attr=0x0,
start_routine=0x400cdf <sendMessage>, arg=0x7fffffffdcd0)
at pthread_create.c:472
472 pthread_create.c: No such file or directory.
\uuuu pthread\uu create\u2\u1(newthread=0x7fffffffdcc0,attr=0x0,
启动(例程=0x400cdf,参数=0x7fffffffdcd0)
在pthread_create.c:472
472 pthread_create.c:没有这样的文件或目录。
我使用“
gcc-pthread-Wall-o
”来构建和链接我的C源文件,除了一些警告之外,没有发生任何错误。 我不知道怎么处理它。 

我看这里没有问题

您启动了程序,并在调用
pthread\u create
之前设置了一个断点,因此调试器暂停在那里

然后您尝试进入
pthread\u create
。调试器对此没有问题

调试器知道
pthread\u create
是在
pthread\u create.c
的第472行定义的-但是,它实际上没有
pthread\u create.c
的副本。因此,它让您知道它无法显示源代码,这就是此消息的含义:

472     pthread_create.c: No such file or directory.

您可能希望使用
n
next
)而不是
s
step
)跳过
pthread\u create
调用。

@AlterMann
-pthread
是正确的。具体问题是什么?键入
s
后您希望发生什么?非常感谢!我现在就试试~~明白了!非常感谢~~