在一个巨大的遗留C代码中跟踪dbx中的子进程时,我遇到了一些问题。我在下面介绍正在调查的代码部分:

#include<stdio.h>
#include<stdlib.h>
#include<unistd.h>
int main()
{
    if(fork()) exit(0);
    return 0;
}

当我在Solaris 10中运行dbx时,得到以下输出:
Running: a.out
(process id 28193)
stopped in main at line 5 in file "a.c"
    5           if(fork()) exit(0);
(dbx) next
dbx: detected a fork(). Do you want to follow parent, child or stop to investigate?
> child
Following child ...
detaching from process 28193
Attached to process 28197
stopped in __fork1 at 0xfeefc6b7
0xfeefc6b7: __fork1+0x0007:     jb       __cerror       [ 0xfee70a40, .-0x8bc77 ]
Current function is main
    5           if(fork()) exit(0);
dbx: warning: stepping up to a function with srcline info

为什么我会收到这个警告?
有人能帮我解决这个问题吗?我被困在这一点上。

最佳答案

dbx试图跟踪的函数是uuFork1(),它提供了
由伦敦银行同业拆借。甲骨文没有提供用-g构建的libc,这就是
需要以便在调试器中具有源行信息。

关于c - dbx:警告:使用srcline info增强功能,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/32382488/

10-12 14:26