Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S264888AbTGGK5J (ORCPT ); Mon, 7 Jul 2003 06:57:09 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S264891AbTGGK5I (ORCPT ); Mon, 7 Jul 2003 06:57:08 -0400 Received: from chaos.analogic.com ([204.178.40.224]:25987 "EHLO chaos.analogic.com") by vger.kernel.org with ESMTP id S264888AbTGGK5G convert rfc822-to-8bit (ORCPT ); Mon, 7 Jul 2003 06:57:06 -0400 Date: Mon, 7 Jul 2003 07:13:03 -0400 (EDT) From: "Richard B. Johnson" X-X-Sender: root@chaos Reply-To: root@chaos.analogic.com To: Auge Mike cc: linux-kernel@vger.kernel.org Subject: Re: Debugging , Tracing... In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1512 Lines: 38 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. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/