我在dbx中使用庞大的遗留C代码中的子进程时遇到了一些问题。我在调查的代码部分下面提出:
#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: warning: stepping up to a function with srcline info
?
对不起我重新发布了这个问题,因为我没有得到任何答复。
我非常需要这项工作。
有人可以帮我解决这个问题吗?