* Kernel debugging ..
@ 2001-07-25 8:34 Ginny E. Kim
2001-07-25 14:43 ` Bob Harris
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Ginny E. Kim @ 2001-07-25 8:34 UTC (permalink / raw)
I got following message while I am willing to debugging kernel..
[/]#dbx -k /vmunix
dbx version 5.1
Type 'help' for help.
main: Source not available
warning: Files compiled -g3: parameter values probably wrong
(dbx)
How can I do to use -g compiling option?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Kernel debugging ..
2001-07-25 8:34 Kernel debugging Ginny E. Kim
@ 2001-07-25 14:43 ` Bob Harris
2001-07-27 13:33 ` Andrew Duane USG
2001-08-01 1:41 ` Ric Werme
2 siblings, 0 replies; 6+ messages in thread
From: Bob Harris @ 2001-07-25 14:43 UTC (permalink / raw)
[[ 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 <banny52@yahoo.com> 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Kernel debugging ..
2001-07-25 8:34 Kernel debugging Ginny E. Kim
2001-07-25 14:43 ` Bob Harris
@ 2001-07-27 13:33 ` Andrew Duane USG
2001-08-02 4:02 ` Ginny E. Kim
2001-08-01 1:41 ` Ric Werme
2 siblings, 1 reply; 6+ messages in thread
From: Andrew Duane USG @ 2001-07-27 13:33 UTC (permalink / raw)
In article <2f6bec0a.0107250034.3f8a3a2e@posting.google.com> banny52@yahoo.com (Ginny E. Kim) writes:
>I got following message while I am willing to debugging kernel..
>
>[/]#dbx -k /vmunix
>dbx version 5.1
>Type 'help' for help.
>
>main: Source not available
>
>warning: Files compiled -g3: parameter values probably wrong
>(dbx)
>
>
>How can I do to use -g compiling option?
Unless you have a source license and distribution, you can't.
Most (98% or so) of the kernel is compiled at Compaq and shipped
as object files. There is no way to recompile them with -g.
Also, using -g would increase the space required at least 100%,
and (due to the extra code needed to preserve everything) slow
the kernel down considerably.
-g3 is sufficient for almost all debugging needs. See the documentation
on kernel debugging for more information on how to work around some of
the few issues.
--
Andrew L. Duane (JOT-7) duane@zk3.dec.com
Compaq Computer Corporation (603)-884-1294
110 Spit Brook Road
M/S ZKO3-3/U14
Nashua, NH 03062-2698
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Kernel debugging ..
2001-07-25 8:34 Kernel debugging Ginny E. Kim
2001-07-25 14:43 ` Bob Harris
2001-07-27 13:33 ` Andrew Duane USG
@ 2001-08-01 1:41 ` Ric Werme
2 siblings, 0 replies; 6+ messages in thread
From: Ric Werme @ 2001-08-01 1:41 UTC (permalink / raw)
banny52@yahoo.com (Ginny E. Kim) writes:
>I got following message while I am willing to debugging kernel..
>[/]#dbx -k /vmunix
>dbx version 5.1
>Type 'help' for help.
>main: Source not available
>warning: Files compiled -g3: parameter values probably wrong
>(dbx)
>How can I do to use -g compiling option?
The basic answer is that you need the source code license. Expensive.
The meaning behind the message is to say that whenever you look at
stack traces or local variables, you may not get the right data or
dbx will say that they have been optimised away.
You should get the same message debugging user applications that were
compiled with -g3. (-g3 says to generate debugging information, but
optimize the code anyway.)
--
Ric Werme | werme@nospam.mediaone.net
http://people.ne.mediaone.net/werme | ^^^^^^^ delete
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Kernel debugging ..
2001-07-27 13:33 ` Andrew Duane USG
@ 2001-08-02 4:02 ` Ginny E. Kim
2001-08-02 14:23 ` Tony Verhulst
0 siblings, 1 reply; 6+ messages in thread
From: Ginny E. Kim @ 2001-08-02 4:02 UTC (permalink / raw)
duane@hunch.zk3.dec.com (Andrew Duane USG) wrote in message news:<9jrqif$7le1$1@lead.zk3.dec.com>...
> In article <2f6bec0a.0107250034.3f8a3a2e@posting.google.com> banny52@yahoo.com (Ginny E. Kim) writes:
> >I got following message while I am willing to debugging kernel..
> >
> >[/]#dbx -k /vmunix
> >dbx version 5.1
> >Type 'help' for help.
> >
> >main: Source not available
> >
> >warning: Files compiled -g3: parameter values probably wrong
> >(dbx)
> >
> >
> >How can I do to use -g compiling option?
>
> Unless you have a source license and distribution, you can't.
> Most (98% or so) of the kernel is compiled at Compaq and shipped
> as object files. There is no way to recompile them with -g.
>
> Also, using -g would increase the space required at least 100%,
> and (due to the extra code needed to preserve everything) slow
> the kernel down considerably.
>
> -g3 is sufficient for almost all debugging needs. See the documentation
> on kernel debugging for more information on how to work around some of
> the few issues.
I've already read the documentation on kernel debugging.. They
sugguest 3 methods, local kernel debugging using "ladebug -k /vmunix
/dev/mem", crash dump analysis using "ladebug -k vmunix.1 vmcore.1",
and remote kernel debugging using "ladebug -remote /vmunix".
About first method, I commented .. With second method, I can't trace..
Is it possible to trace my loadable module using third method without
-g kernel compiling option?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Kernel debugging ..
2001-08-02 4:02 ` Ginny E. Kim
@ 2001-08-02 14:23 ` Tony Verhulst
0 siblings, 0 replies; 6+ messages in thread
From: Tony Verhulst @ 2001-08-02 14:23 UTC (permalink / raw)
"Ginny E. Kim" wrote:
>
> duane@hunch.zk3.dec.com (Andrew Duane USG) wrote in message news:<9jrqif$7le1$1@lead.zk3.dec.com>...
> > In article <2f6bec0a.0107250034.3f8a3a2e@posting.google.com> banny52@yahoo.com (Ginny E. Kim)
> I've already read the documentation on kernel debugging.. They
> sugguest 3 methods, local kernel debugging using "ladebug -k /vmunix
> /dev/mem", crash dump analysis using "ladebug -k vmunix.1 vmcore.1",
> and remote kernel debugging using "ladebug -remote /vmunix".
> About first method, I commented .. With second method, I can't trace..
> Is it possible to trace my loadable module using third method without
> -g kernel compiling option?
Yeah, you can trace, you can't trust the values listed for the arguments
to the functions. Also, you may not be able to symbolically access
local variables within a function. You can get all this info by looking
at the register usage and.or where things are stored on the stack -
painful, but it works.
Tony
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2001-08-02 14:23 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-07-25 8:34 Kernel debugging Ginny E. Kim
2001-07-25 14:43 ` Bob Harris
2001-07-27 13:33 ` Andrew Duane USG
2001-08-02 4:02 ` Ginny E. Kim
2001-08-02 14:23 ` Tony Verhulst
2001-08-01 1:41 ` Ric Werme
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox