From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1973 invoked by alias); 16 Jul 2006 14:08:55 -0000 Received: (qmail 1959 invoked by uid 22791); 16 Jul 2006 14:08:55 -0000 X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO sibelius.xs4all.nl) (82.92.89.47) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 16 Jul 2006 14:08:49 +0000 Received: from elgar.sibelius.xs4all.nl (root@elgar.sibelius.xs4all.nl [192.168.0.2]) by sibelius.xs4all.nl (8.13.4/8.13.4) with ESMTP id k6GE8EB7027053; Sun, 16 Jul 2006 16:08:14 +0200 (CEST) Received: from elgar.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by elgar.sibelius.xs4all.nl (8.13.6/8.13.6) with ESMTP id k6GE8ErU025470; Sun, 16 Jul 2006 16:08:14 +0200 (CEST) Received: (from kettenis@localhost) by elgar.sibelius.xs4all.nl (8.13.6/8.13.6/Submit) id k6GE8ChA009499; Sun, 16 Jul 2006 16:08:12 +0200 (CEST) Date: Sun, 16 Jul 2006 16:48:00 -0000 Message-Id: <200607161408.k6GE8ChA009499@elgar.sibelius.xs4all.nl> From: Mark Kettenis To: drow@false.org CC: gdb@sourceware.org In-reply-to: <20060712163910.GB22834@nevyn.them.org> (message from Daniel Jacobowitz on Wed, 12 Jul 2006 12:39:10 -0400) Subject: Re: How to portably print out Env of a Process References: <5f3d30900605222046t810dd4cue180cba7b0541fa7@mail.gmail.com> <200606171914.k5HJEJGY032428@elgar.sibelius.xs4all.nl> <20060712163910.GB22834@nevyn.them.org> Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-07/txt/msg00106.txt.bz2 > Date: Wed, 12 Jul 2006 12:39:10 -0400 > From: Daniel Jacobowitz > > On Sat, Jun 17, 2006 at 09:14:19PM +0200, Mark Kettenis wrote: > > Make sure you install libc with full debug info. It looks like you're > > using Linux. Debian has packages with the necessary debug info. > > Other distros might not. If your distro does not provide such > > packages please complain. > > Actually, we (Debian) don't by default. Well, you *do* give the user the opportunity to install those packages and use them. Many other distros don't seem to do this. The example was: > > p (char *) getenv("HOME") > > We ship two sets of debug libraries, both in the libc6-dbg package. > One set are used automatically by GDB (via set debug-file-directory); > these have only .debug_frame in them, and are used only for backtraces. > The other includes symbolic debug info and is not used unless you > specify LD_LIBRARY_PATH=/usr/lib/debug. They aren't the default > because GDB takes a large amount of RAM and is much slower when given > that much debug information, for an otherwise small program. Hmm, yes, I'm noticing that on our (OpenBSD) slower platforms the testsuite sometimes times out loading a program. > I wonder if guessing "long" for return values might be more overall > useful than guessing "int", for this exact reason? Is that likely to > break anything not already broken? I don't think that'd be a terribly good idea; the usage of "int" as the default return value for unprototyped functions is pretty much engrined in the C language. Mark