From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,a858a20a7f681de3 X-Google-Attributes: gidfa528,public X-Google-ArrivalTime: 2001-07-25 07:43:52 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!paloalto-snf1.gtei.net!news.gtei.net!news.compaq.com!news.cpqcorp.net!harris Subject: Re: Kernel debugging .. From: Bob Harris Newsgroups: comp.unix.tru64 Posted-And-Mailed: yes Message-ID: <250720011043497535%harris@zk3.dec.com> References: <2f6bec0a.0107250034.3f8a3a2e@posting.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: 8bit User-Agent: YA-NewsWatcher/5.0.1 Date: Wed, 25 Jul 2001 10:43:49 -0400 NNTP-Posting-Host: 16.140.32.194 X-Complaints-To: abuse@Compaq.com X-Trace: news.cpqcorp.net 996072231 16.140.32.194 (Wed, 25 Jul 2001 07:43:51 PDT) NNTP-Posting-Date: Wed, 25 Jul 2001 07:43:51 PDT Organization: Compaq Computer Corporation Xref: archiver1.google.com comp.unix.tru64:3831 [[ This message was both posted and mailed: see the "To," "Cc," and "Newsgroups" headers for details. ]] In article <2f6bec0a.0107250034.3f8a3a2e@posting.google.com>, Ginny E. Kim wrote: X I got following message while I am willing to debugging kernel.. X X [/]#dbx -k /vmunix X dbx version 5.1 X Type 'help' for help. X X main: Source not available X X warning: Files compiled -g3: parameter values probably wrong X (dbx) X X X How can I do to use -g compiling option? The kernel sources would need to be recompiled to change this. If you have a source license, then that is a different issue. For what it is worth, the developers (or at least most of them) do not recompile to change the -g option either. We just debug using what is provided by the development build environment. At most we might recompile a module we are activily working on with different options just for testing. And the part about parameter values probably wrong is refering to function calling parameters displayed in dbx call stack listings. Because of the compiler optimizations and passing parameters via registers, it is difficult for dbx to accurately display what the calling parameters look like (expecially if the compiler has reused the register for another call and did had already used the current functions parameter so it did not need to save it anywhere. When analyzing a crash dump, it can be a lot of fun trying to find out just what values a function was called with. I've sometimes had to go up several levels of function, and disassemble the code to find where a value might have originated from. And sometimes it is just not possible to find the value of a function parameter. Bob Harris