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 2/2, 7.3] Fix 7.1->7.2 regression: info sources


Hi,

https://bugzilla.redhat.com/show_bug.cgi?id=712117
724d4482b9db1aced5ae391ad624f76877991232 is the first bad commit
[PATCH] Fix regression in -file-list-exec-source-files command.
http://sourceware.org/ml/gdb-patches/2010-08/msg00333.html
http://sourceware.org/ml/gdb-patches/2010-09/msg00090.html

`info sources' no longer displays the pathname.  Fix it.

Source files for which symbols will be read in on demand:
file1.txt
(gdb) FAIL: gdb.dwarf2/dw2-filename.exp: info sources
->
Source files for which symbols will be read in on demand:
/home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.dwarf2/file1.txt
(gdb) PASS: gdb.dwarf2/dw2-filename.exp: info sources

No regressions on {x86_64,x86_64-m32,i686}-fedora15-linux-gnu.

I believe it should go for 7.3, I will check it in there.


Thanks,
Jan


gdb/
2011-06-10  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* symtab.c (output_partial_symbol_filename): Exchange the filename and
	fullname parameters order.

gdb/testsuite/
2011-06-10  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* gdb.dwarf2/dw2-filename.exp (info sources): New testcase.

--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -2837,7 +2837,7 @@ output_source_filename (const char *name, int *first)
 
 /* A callback for map_partial_symbol_filenames.  */
 static void
-output_partial_symbol_filename (const char *fullname, const char *filename,
+output_partial_symbol_filename (const char *filename, const char *fullname,
 				void *data)
 {
   output_source_filename (fullname ? fullname : filename, data);
--- a/gdb/testsuite/gdb.dwarf2/dw2-filename.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-filename.exp
@@ -38,3 +38,6 @@ clean_restart ${testfile}.x
 # is that the file and fullname fields are now inverted.
 gdb_test "interpreter-exec mi -file-list-exec-source-files" \
          ".*{file=\"file1\\.txt\",fullname=\".+file1\\.txt\"}.*"
+
+# And `info sources' should return the fullname incl. the directories.
+gdb_test "info sources" {/file1\.txt}


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