From owner-freebsd-current@FreeBSD.ORG Tue Mar 30 03:29:44 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8EEA6106567A for ; Tue, 30 Mar 2010 03:29:44 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: from mail-ew0-f224.google.com (mail-ew0-f224.google.com [209.85.219.224]) by mx1.freebsd.org (Postfix) with ESMTP id E77C18FC19 for ; Tue, 30 Mar 2010 03:29:43 +0000 (UTC) Received: by ewy24 with SMTP id 24so1626675ewy.33 for ; Mon, 29 Mar 2010 20:29:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:received:message-id:subject:from:to:cc:content-type; bh=oRyKSoiCvcPqNunhEzy8unwZih86Sz2URlV6dgZmJjg=; b=nuNonIOTpxY7ApoouHUbPr5UevGmrP+v7/ffNZJYFthFbBGCiv8+HjwDLtYhGuX0UX y7p5Fr2EbPLbOwfqoviWKYIiwpzpIFsDTMNSj9NcjL58c07pAne0Lw0QVFKm5xJOSD6N gZ5eyH+PBSS4nYZvneKX9L7vH5Be0wsplGBf8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=rJVskAV/fPfcfFNTcpoxlgnH3GLPhyl+SbuMwZhN4mCmTWPaqZYzfsWZjQ95tcXjl2 7Rsnxa2npet1v6joBON8KGz1RwSDVHd216nRcDTSQbeO4Ckalk6y+dbLAV68Zh4REAw9 vwqQ++Zh7pC87fzfMdhnHqdcrnqAmXDbfF4gc= MIME-Version: 1.0 Received: by 10.213.9.20 with HTTP; Mon, 29 Mar 2010 20:29:42 -0700 (PDT) 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> Date: Mon, 29 Mar 2010 23:29:42 -0400 Received: by 10.213.78.141 with SMTP id l13mr3027296ebk.21.1269919782905; Mon, 29 Mar 2010 20:29:42 -0700 (PDT) Message-ID: From: Ryan Stone To: Bruce Evans Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Kostik Belousov , freebsd-current@freebsd.org, Bruce Evans , Andriy Gapon , Andriy Gapon Subject: Re: newfs_msdos and DVD-RAM X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2010 03:29:44 -0000 > > 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.