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]

[patch] Fix absolute filenames for MI fullname of non-existing files


Hi,

I am sorry for another bug.  But it normally does not happen.

No testcase provided (there could be one).


Thanks,
Jan


gdb/
2013-01-06  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* source.c (symtab_to_fullname): Do not prepend DIRNAME for
	non-existing files if FILENAME is already absolute.

diff --git a/gdb/source.c b/gdb/source.c
index ca6b4f3..54d5693 100644
--- a/gdb/source.c
+++ b/gdb/source.c
@@ -1102,7 +1102,7 @@ symtab_to_fullname (struct symtab *s)
 	  /* rewrite_source_path would be applied by find_and_open_source, we
 	     should report the pathname where GDB tried to find the file.  */
 
-	  if (s->dirname == NULL)
+	  if (s->dirname == NULL || IS_ABSOLUTE_PATH (s->filename))
 	    fullname = xstrdup (s->filename);
 	  else
 	    fullname = concat (s->dirname, SLASH_STRING, s->filename, NULL);


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