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