Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Mar 2010 23:29:42 -0400
From:      Ryan Stone <rysto32@gmail.com>
To:        Bruce Evans <brde@optusnet.com.au>
Cc:        Kostik Belousov <kostikbel@gmail.com>, freebsd-current@freebsd.org, Bruce Evans <bde@zeta.org.au>, Andriy Gapon <avg@freebsd.org>, Andriy Gapon <avg@icyb.net.ua>
Subject:   Re: newfs_msdos and DVD-RAM
Message-ID:  <p2nbc2d971003292029l2c3aea21p23d62aa2f9c2cc89@mail.gmail.com>
In-Reply-To: <20100330101734.R5158@delplex.bde.org>
References:  <3a142e751003190508x6a06868ene2e8fd9ddd977f66@mail.gmail.com> <3a142e751003191021p141af009m6acf7d160c890cbb@mail.gmail.com> <20100319191133.46fe271c@r500.local> <3a142e751003191126j331e525fwb9e5573bbf6f7d58@mail.gmail.com> <4BAA30CB.1070707@icyb.net.ua> <20100328172537.501ed3d1@r500.local> <4BB0A053.9060007@freebsd.org> <20100330101734.R5158@delplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
>
> BTW, why can't gdb find any variables?  They are just stack variables whose
> address is easy to find.
>
>  ...
>>>
>>> #14 0xffffffff8042f24e in bread (vp=Variable "vp" is not available.
>>> ) at /usr/src/sys/kern/vfs_bio.c:748
>>>
>>
> ... and isn't vp a variable?  Maybe the bad default -O2 is destroying
> debugging.  Kernels intended for being debugged (and that is almost all
> kernels) shouldn't be compiled with many optimizations.  Post-gcc-3, -O2
> breaks even backtraces by inlining static functions that are called only
> once.
>
>
On amd64 those parameters aren't stack variables.  They're passed in
registers, and gdb is horrible at figuring things out from there.  I'm not
sure if the problem actually exists in gdb or if the debug info provided by
gcc is incomplete.  Sometimes gdb is unable to print the value of the
parameter because the register has been reused and the argument's value has
been lost.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?p2nbc2d971003292029l2c3aea21p23d62aa2f9c2cc89>