Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Maxim Grigoriev <maxim@tensilica.com>
To: Maxim Grigoriev <maxim@tensilica.com>
Cc: gdb-patches@sources.redhat.com, Daniel Jacobowitz <drow@false.org>
Subject: Re: Handling corner case in building symbol table when "debug_line"  includes  compilation directory
Date: Wed, 11 Apr 2007 02:06:00 -0000	[thread overview]
Message-ID: <461C42AD.8030905@hq.tensilica.com> (raw)
In-Reply-To: <461C1EE8.2090600@hq.tensilica.com>

[-- Attachment #1: Type: text/plain, Size: 256 bytes --]

I think I missed one important detail in my patch.
Here is an improved version:

2007-04-10 Maxim Grigoriev <maxim2405@gmail.com>

        * buildsym.c (start_subfile): Add handling missing case while
        building symbol table for a compilation unit.


[-- Attachment #2: PATCH3.diff --]
[-- Type: text/x-patch, Size: 1007 bytes --]

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

  reply	other threads:[~2007-04-11  2:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-15  1:55 Maxim Grigoriev
2007-03-15  2:27 ` Daniel Jacobowitz
2007-03-15  4:30   ` Maxim Grigoriev
2007-04-10 21:03     ` Daniel Jacobowitz
2007-04-10 23:34       ` Maxim Grigoriev
2007-04-11  2:06         ` Maxim Grigoriev [this message]
2007-05-14 14:11           ` Daniel Jacobowitz
2007-05-14 19:01             ` Maxim Grigoriev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=461C42AD.8030905@hq.tensilica.com \
    --to=maxim@tensilica.com \
    --cc=drow@false.org \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox