* Re: Debugging , Tracing...
[not found] <20030707110001.734.6504.Mailman@lists.us.dell.com>
@ 2003-07-07 23:30 ` Slack Ware
0 siblings, 0 replies; 3+ messages in thread
From: Slack Ware @ 2003-07-07 23:30 UTC (permalink / raw)
To: linux-kernel
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=us-ascii, Size: 1543 bytes --]
From: "Auge Mike"
To: linux-kernel@vger.kernel.org
Subject: Debugging , Tracing...
On Sun, 06 Jul 2003 23:48:17 +0400, Auge Mike wrote:
>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.
Hi, Auge. I think that the kernel execution cannot be
debugged nor traced by gdb (kgdb is just a frontend
for the GNU DeBugger), it can be used to trace/debug
the execution of any other program, including modules.
> 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?
Other thing, printf() is not a system call, you use
write() (syscall #4) for printing things in screen.
A recommendation: don't use gdb or kgdb for tracing
programs execution, use "strace [program] [arguments]"
in your console, instead. GDB is useful for debugging
things, like when a program received a SIGSEGV (it
generates a coredump) in a file "core", and you can
debug it for searching the error that caused that
signal.
Strace is a tool that you use for tracing programs
syscalls during it execution.
I hope this will be useful for you.
Regards,
Slack
__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Debugging , Tracing...
2003-07-06 19:48 Auge Mike
@ 2003-07-07 11:13 ` Richard B. Johnson
0 siblings, 0 replies; 3+ messages in thread
From: Richard B. Johnson @ 2003-07-07 11:13 UTC (permalink / raw)
To: Auge Mike; +Cc: linux-kernel
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: TEXT/PLAIN; charset=X-UNKNOWN, Size: 1268 bytes --]
On Sun, 6 Jul 2003, Auge Mike wrote:
> 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,
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Debugging , Tracing...
@ 2003-07-06 19:48 Auge Mike
2003-07-07 11:13 ` Richard B. Johnson
0 siblings, 1 reply; 3+ messages in thread
From: Auge Mike @ 2003-07-06 19:48 UTC (permalink / raw)
To: linux-kernel
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-07-07 23:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20030707110001.734.6504.Mailman@lists.us.dell.com>
2003-07-07 23:30 ` Debugging , Tracing Slack Ware
2003-07-06 19:48 Auge Mike
2003-07-07 11:13 ` Richard B. Johnson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).