Skip to contentSkip to conversation

Debugging , Tracing...

DISCUSSION Auge Mike 2 participants 2 messages Jul 6, 2003 – Jul 7, 2003

lore
Share & tools
lore

Auge Mike

author
#0 lore raw

Hi all,

I have asked before few weeks about tracing the execution of the
kernel or debugging it. Unfortunately, I faced some problems in using Kgdb, especially that the patch was not successful on my redhat 7.3.
Whatever, lets say that kgdb worked successfully, how can I trace the
execution of �a specific system call� (lets say printf), so I can see how it works internally. Is there any other utility for that? How can I do that with kgdb?

Thanx for your help in advance.

Yours,

_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus

#1 lore raw
Quoted 10 lines · Auge Mike

Hi all,

I have asked before few weeks about tracing the execution of the
kernel or debugging it. Unfortunately, I faced some problems in using Kgdb, especially that the patch was not successful on my redhat 7.3.
Whatever, lets say that kgdb worked successfully, how can I trace the
execution of �a specific system call� (lets say printf), so I can see how it works internally. Is there any other utility for that? How can I do that with kgdb?

Quoted 3 lines

Thanx for your help in advance.

Yours,

printf() is not a system call. It is some procedure within the 'C' runtime library. Eventually, that library makes a call to write() which is a kernel system call. You can use strace to see the execution of all the system calls.

If you want to single-step through the 'C' runtime library, you need to get their sources and compile them with the '-g' parameter (for debugging). I don't know why you would want to do that, because you would then have the sources so you can actually read the source of what happens with a particular call.

Cheers,
Dick Johnson
Penguin : Linux version 2.4.20 on an i686 machine (797.90 BogoMips). Why is the government concerned about the lunatic fringe? Think about it.