From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29700 invoked by alias); 11 Apr 2007 02:06:45 -0000 Received: (qmail 29692 invoked by uid 22791); 11 Apr 2007 02:06:44 -0000 X-Spam-Check-By: sourceware.org Received: from hq.tensilica.com (HELO mailapp.tensilica.com) (65.205.227.29) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 11 Apr 2007 03:06:40 +0100 Received: from localhost ([127.0.0.1]) by mailapp.tensilica.com with esmtp (Exim 4.34) id 1HbSEH-0006vv-Vs; Tue, 10 Apr 2007 19:06:38 -0700 Received: from mailapp.tensilica.com ([127.0.0.1]) by localhost (mailapp [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 20295-09; Tue, 10 Apr 2007 19:06:37 -0700 (PDT) Received: from maxim_fc5.hq.tensilica.com ([192.168.11.68]) by mailapp.tensilica.com with esmtp (Exim 4.34) id 1HbSEH-0006vo-HH; Tue, 10 Apr 2007 19:06:37 -0700 Message-ID: <461C42AD.8030905@hq.tensilica.com> Date: Wed, 11 Apr 2007 02:06:00 -0000 From: Maxim Grigoriev User-Agent: Thunderbird 1.5.0.9 (X11/20070102) MIME-Version: 1.0 To: Maxim Grigoriev CC: gdb-patches@sources.redhat.com, Daniel Jacobowitz Subject: Re: Handling corner case in building symbol table when "debug_line" includes compilation directory References: <45F8A771.2060008@hq.tensilica.com> <20070315022735.GA9613@caradoc.them.org> <45F8CBDF.9090501@hq.tensilica.com> <20070410210346.GD2056@caradoc.them.org> <461C1EE8.2090600@hq.tensilica.com> In-Reply-To: <461C1EE8.2090600@hq.tensilica.com> Content-Type: multipart/mixed; boundary="------------050007010602050203050406" 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: 2007-04/txt/msg00125.txt.bz2 This is a multi-part message in MIME format. --------------050007010602050203050406 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 256 I think I missed one important detail in my patch. Here is an improved version: 2007-04-10 Maxim Grigoriev * buildsym.c (start_subfile): Add handling missing case while building symbol table for a compilation unit. --------------050007010602050203050406 Content-Type: text/x-patch; name="PATCH3.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="PATCH3.diff" Content-length: 1007 Index: gdb/buildsym.c =================================================================== RCS file: /cvs/src/src/gdb/buildsym.c,v retrieving revision 1.47 diff -u -r1.47 buildsym.c --- gdb/buildsym.c 27 Feb 2007 22:57:42 -0000 1.47 +++ gdb/buildsym.c 11 Apr 2007 02:02:37 -0000 @@ -549,11 +549,23 @@ for (subfile = subfiles; subfile; subfile = subfile->next) { - if (FILENAME_CMP (subfile->name, name) == 0) + char *subfile_name; + if (IS_ABSOLUTE_PATH(name) && + !IS_ABSOLUTE_PATH (subfile->name) && + (subfile->dirname != NULL)) + subfile_name = concat (subfile->dirname, SLASH_STRING, + subfile->name, NULL); + else + subfile_name = subfile->name; + if (FILENAME_CMP (subfile_name, name) == 0) { current_subfile = subfile; + if (subfile_name != subfile->name) + xfree (subfile_name); return; } + if (subfile_name != subfile->name) + xfree (subfile_name); } /* This subfile is not known. Add an entry for it. Make an entry --------------050007010602050203050406--