public inbox for gdb-testers@sourceware.org
help / color / mirror / Atom feed
From: gdb-buildbot@sergiodj.net
To: gdb-testers@sourceware.org
Subject: [binutils-gdb] Revert basenames_may_differ patch
Date: Sun, 09 Feb 2020 16:08:00 -0000	[thread overview]
Message-ID: <5abbbe1d13e03496af5564b997f3c3a2e79b4d73@gdb-build> (raw)

*** TEST RESULTS FOR COMMIT 5abbbe1d13e03496af5564b997f3c3a2e79b4d73 ***

commit 5abbbe1d13e03496af5564b997f3c3a2e79b4d73
Author:     Tom Tromey <tromey@adacore.com>
AuthorDate: Wed Feb 5 10:53:44 2020 +0100
Commit:     Tom Tromey <tromey@adacore.com>
CommitDate: Fri Feb 7 14:05:56 2020 -0700

    Revert basenames_may_differ patch
    
    Commit a0c1ffedc regressed certain cases coming from Eclipse.
    See PR breakpoints/24915.
    
    gdb/ChangeLog
    2020-02-07  Tom Tromey  <tromey@adacore.com>
    
            PR breakpoints/24915:
            * source.c (find_and_open_source): Do not check basenames_may_differ.
    
    gdb/testsuite/ChangeLog
    2020-02-07  Tom Tromey  <tromey@adacore.com>
    
            PR breakpoints/24915:
            * gdb.base/annotate-symlink.exp: Use setup_xfail.
    
    Change-Id: Iadbf42f35eb40c95ad32b2108ae25d8f199998bd

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 901841e816..26fffd769c 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2020-02-07  Tom Tromey  <tromey@adacore.com>
+
+	PR breakpoints/24915:
+	* source.c (find_and_open_source): Do not check basenames_may_differ.
+
 2020-02-07  Tom Tromey  <tom@tromey.com>
 
 	* README: Update gdbserver documentation.
diff --git a/gdb/source.c b/gdb/source.c
index 327e9c1229..4f889e4b95 100644
--- a/gdb/source.c
+++ b/gdb/source.c
@@ -1051,10 +1051,7 @@ find_and_open_source (const char *filename,
       result = gdb_open_cloexec (fullname->get (), OPEN_MODE, 0);
       if (result >= 0)
 	{
-	  if (basenames_may_differ)
-	    *fullname = gdb_realpath (fullname->get ());
-	  else
-	    *fullname = gdb_abspath (fullname->get ());
+	  *fullname = gdb_realpath (fullname->get ());
 	  return scoped_fd (result);
 	}
 
@@ -1098,12 +1095,9 @@ find_and_open_source (const char *filename,
   if (rewritten_filename != NULL)
     filename = rewritten_filename.get ();
 
-  openp_flags flags = OPF_SEARCH_IN_PATH;
-  if (basenames_may_differ)
-    flags |= OPF_RETURN_REALPATH;
-
   /* Try to locate file using filename.  */
-  result = openp (path, flags, filename, OPEN_MODE, fullname);
+  result = openp (path, OPF_SEARCH_IN_PATH | OPF_RETURN_REALPATH, filename,
+		  OPEN_MODE, fullname);
   if (result < 0 && dirname != NULL)
     {
       /* Remove characters from the start of PATH that we don't need when
@@ -1124,15 +1118,16 @@ find_and_open_source (const char *filename,
       cdir_filename.append (SLASH_STRING);
       cdir_filename.append (filename_start);
 
-      result = openp (path, flags, cdir_filename.c_str (), OPEN_MODE,
-		      fullname);
+      result = openp (path, OPF_SEARCH_IN_PATH | OPF_RETURN_REALPATH,
+		      cdir_filename.c_str (), OPEN_MODE, fullname);
     }
   if (result < 0)
     {
       /* Didn't work.  Try using just the basename.  */
       p = lbasename (filename);
       if (p != filename)
-	result = openp (path, flags, p, OPEN_MODE, fullname);
+	result = openp (path, OPF_SEARCH_IN_PATH | OPF_RETURN_REALPATH, p,
+			OPEN_MODE, fullname);
     }
 
   return scoped_fd (result);
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 685994a19a..f6bd172ca9 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2020-02-07  Tom Tromey  <tromey@adacore.com>
+
+	PR breakpoints/24915:
+	* gdb.base/annotate-symlink.exp: Use setup_xfail.
+
 2020-02-06  Shahab Vahedi  <shahab@synopsys.com>
 
 	* gdb.tui/tui-missing-src.exp: Add the "missing source
diff --git a/gdb/testsuite/gdb.base/annotate-symlink.exp b/gdb/testsuite/gdb.base/annotate-symlink.exp
index d22593ca36..830949daa4 100644
--- a/gdb/testsuite/gdb.base/annotate-symlink.exp
+++ b/gdb/testsuite/gdb.base/annotate-symlink.exp
@@ -47,5 +47,8 @@ gdb_breakpoint func message
 
 gdb_test_no_output "set annotate 1"
 
+# The patch to cause this output was reverted.
+# See PR breakpoints/24915.
+setup_xfail *-*-* 24915
 gdb_test "continue" \
     "Breakpoint .* func .*realname-expand-link.c:$decimal\r\n\032\032.*realname-expand-link.c:.*"


             reply	other threads:[~2020-02-09 13:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-09 16:08 gdb-buildbot [this message]
2020-02-09 15:31 ` Failures on Ubuntu-Aarch64-native-gdbserver-m64, branch master gdb-buildbot
2020-02-09 16:56 ` Failures on Fedora-i686, " gdb-buildbot
2020-02-10 11:22 ` Failures on Fedora-x86_64-m64, " gdb-buildbot
2020-02-10 11:22 ` Failures on Fedora-x86_64-m32, " gdb-buildbot
2020-02-11 14:17 ` Failures on Fedora-x86_64-native-gdbserver-m32, " gdb-buildbot
2020-02-13  9:01 ` Failures on Fedora-x86_64-native-gdbserver-m64, " gdb-buildbot

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=5abbbe1d13e03496af5564b997f3c3a2e79b4d73@gdb-build \
    --to=gdb-buildbot@sergiodj.net \
    --cc=gdb-testers@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).