Re: newfs_msdos and DVD-RAM

From: Ryan Stone <rysto32_at_gmail.com>
Date: Mon, 29 Mar 2010 23:29:42 -0400
>
> 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.
Received on Tue Mar 30 2010 - 01:29:44 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:02 UTC