Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: gdb-patches@sourceware.org
Cc: Joel Brobecker <brobecker@adacore.com>
Subject: [patch 2/2, 7.3] Fix 7.1->7.2 regression: info sources
Date: Fri, 10 Jun 2011 20:33:00 -0000	[thread overview]
Message-ID: <20110610203300.GB31746@host1.jankratochvil.net> (raw)

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}


             reply	other threads:[~2011-06-10 20:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-10 20:33 Jan Kratochvil [this message]
2011-06-10 20:56 ` Tom Tromey
2011-06-10 22:00   ` Jan Kratochvil
2011-06-10 21:26 ` Joel Brobecker

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=20110610203300.GB31746@host1.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    /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