From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31016 invoked by alias); 25 Mar 2012 21:23:17 -0000 Received: (qmail 31008 invoked by uid 22791); 25 Mar 2012 21:23:17 -0000 X-SWARE-Spam-Status: No, hits=-1.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout22.012.net.il (HELO mtaout22.012.net.il) (80.179.55.172) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 25 Mar 2012 21:23:03 +0000 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0M1G00A00LWWVF00@a-mtaout22.012.net.il> for gdb-patches@sourceware.org; Sun, 25 Mar 2012 23:22:20 +0200 (IST) Received: from HOME-C4E4A596F7 ([84.229.240.24]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M1G00AQAM15LX40@a-mtaout22.012.net.il>; Sun, 25 Mar 2012 23:22:19 +0200 (IST) Date: Sun, 25 Mar 2012 21:23:00 -0000 From: Eli Zaretskii Subject: Re: [patch] GDB 7.2: new feature for "backtrace" that cuts path to file (remain filename) In-reply-to: To: iam ahal Cc: tromey@redhat.com, jan.kratochvil@redhat.com, palves@redhat.com, dje@google.com, gdb-patches@sourceware.org, pmuldoon@redhat.com, brobecker@adacore.com, drow@false.org, asmwarrior@gmail.com Reply-to: Eli Zaretskii Message-id: <838vios7ec.fsf@gnu.org> References: <83fwgzbrp9.fsf@gnu.org> <201112061249.47758.pedro@codesourcery.com> <20120315224504.GA24829@host2.jankratochvil.net> <831uop3aen.fsf@gnu.org> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-03/txt/msg00860.txt.bz2 > Date: Sun, 25 Mar 2012 23:26:50 +0400 > From: iam ahal > Cc: tromey@redhat.com, jan.kratochvil@redhat.com, palves@redhat.com, > dje@google.com, gdb-patches@sourceware.org, pmuldoon@redhat.com, > brobecker@adacore.com, drow@false.org, asmwarrior@gmail.com > > The difference between "basename" and "relative" is: > > "basename" option just cuts directory part from 'DW_AT_name'. > "relative" option cuts 'DW_AT_comp_dir' part from 'DW_AT_name' If and > only if 'DW_AT_name' contains 'DW_AT_comp_dir' part at the beginning. > > Quite frankly, I don't know how exactly make records like this: > > <11> DW_AT_name : (indirect string, offset: 0x1e): > /home/username/contrib/test/prog.c > <15> DW_AT_comp_dir : (indirect string, offset: 0x0): > /home/username/contrib/ Thanks. So I understand that my guess was correct, and "relative" is relative to the compilation directory. That is, in the example above, "basename" will give you prog.c, while "relative" will give "test/prog.c". Is that correct?