From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19317 invoked by alias); 30 Dec 2011 19:44:35 -0000 Received: (qmail 19308 invoked by uid 22791); 30 Dec 2011 19:44:35 -0000 X-SWARE-Spam-Status: No, hits=-0.2 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from a92.chasque.net (HELO zcs-mail.inconcertcc.com) (200.40.135.92) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 30 Dec 2011 19:44:22 +0000 Received: from localhost (localhost [127.0.0.1]) by zcs-mail.inconcertcc.com (Postfix) with ESMTP id 8129C3042AA for ; Fri, 30 Dec 2011 17:44:17 -0200 (UYST) Received: from zcs-mail.inconcertcc.com ([127.0.0.1]) by localhost (zcs-mail.inconcertcc.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id A6HbEG1bzOQ1 for ; Fri, 30 Dec 2011 17:44:15 -0200 (UYST) Received: from mail-pw0-f47.google.com (mail-pw0-f47.google.com [209.85.160.47]) by zcs-mail.inconcertcc.com (Postfix) with ESMTPSA id E4FA23042A9 for ; Fri, 30 Dec 2011 17:44:14 -0200 (UYST) Received: by pbcc11 with SMTP id c11so8588936pbc.20 for ; Fri, 30 Dec 2011 11:44:13 -0800 (PST) Received: by 10.68.72.230 with SMTP id g6mr98902401pbv.119.1325274253279; Fri, 30 Dec 2011 11:44:13 -0800 (PST) MIME-Version: 1.0 Received: by 10.68.23.136 with HTTP; Fri, 30 Dec 2011 11:43:42 -0800 (PST) In-Reply-To: <33044253.post@talk.nabble.com> References: <33044253.post@talk.nabble.com> From: =?UTF-8?Q?Juan_Ram=C3=ADrez?= Date: Sat, 31 Dec 2011 02:05:00 -0000 Message-ID: Subject: Re: control debug information source path To: nixahn Cc: gcc-help@gcc.gnu.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2011-12/txt/msg00277.txt.bz2 I think that if you use relative paths in the compilation line, the debug information will have relative paths. I use varios versions of GCC (from 4.1 to 4.6) and, a least using the full path in the compilation line, the stored debug information has always included full paths. Anyway, you could try -fdebug-prefix-map: -fdebug-prefix-map=3D$relativedir=3D$(readlink -f $relativedir) Saludos! =C2=A0 =C2=A0=C2=A0 Juan On Wed, Dec 28, 2011 at 1:56 AM, nixahn wrote: > > Hi, this is my first post in this forum; I am having problems with the st= ored > debugging information; I have 2 different platforms running gcc 4.1 and 4= .6 > which behave differently. In one, when I compile a binary using a static > library, the source files for the library are stored with their absolute > paths. this is useful because gdb then finds the source files automatical= ly. > in the 4.1 platform (a rocks cluster with redhat) the source files info is > stored only by name, without paths. I know I could try to add the directo= ry > for the source files with gdb, the problem is that the library is gsl and > the source files are in many subdirectories, making it problematic to > specify all of them to gdb. it would be great if I knew how to control > whether gcc stores absoulute source paths in the debugging information. is > this related to the debug format? when building my binary and gsl, I alwa= ys > use the -g option, but since both platforms are linux they should be using > stabs according to the little I read. > > Anyhow, I hope someone can point me in the right direction... thanks in > advance > -- > View this message in context: http://old.nabble.com/control-debug-informa= tion-source-path-tp33044253p33044253.html > Sent from the gcc - Help mailing list archive at Nabble.com. >