1

在大量遗留 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: warning: stepping up to a function with srcline info

对不起。我重新发布了这个问题,因为我没有得到任何回复。

我非常需要这个工作。

谁能帮我解决这个问题?

4

0 回答 0