This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[commit] (dw2_lookup_symtab): Remove duplicate call to gdb_realpath


Hi.

fyi, I committed this.

Regression tested on amd64-linux with

$ runtest gdb.base/*.exp CC_FOR_TARGET="/bin/sh $(pwd)/../../../../src/gdb/cc-with-index.sh gcc"

2010-12-07  Doug Evans  <dje@google.com>

	* dwarf2read.c (dw2_lookup_symtab): Remove duplicate call to
	gdb_realpath.

Index: dwarf2read.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2read.c,v
retrieving revision 1.482
diff -u -p -r1.482 dwarf2read.c
--- dwarf2read.c	1 Dec 2010 19:37:36 -0000	1.482
+++ dwarf2read.c	7 Dec 2010 17:04:45 -0000
@@ -2199,16 +2199,11 @@ dw2_lookup_symtab (struct objfile *objfi
 	      const char *this_full_name = dw2_require_full_path (objfile,
 								  per_cu, j);
 
-	      if (this_full_name != NULL)
+	      if (this_full_name != NULL
+		  && FILENAME_CMP (real_path, this_full_name) == 0)
 		{
-		  char *rp = gdb_realpath (this_full_name);
-		  if (rp != NULL && FILENAME_CMP (real_path, rp) == 0)
-		    {
-		      xfree (rp);
-		      *result = dw2_instantiate_symtab (objfile, per_cu);
-		      return 1;
-		    }
-		  xfree (rp);
+		  *result = dw2_instantiate_symtab (objfile, per_cu);
+		  return 1;
 		}
 	    }
 	}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]