diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index bc77fe85c7..557c72b203 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+YYYY-MM-DD  Keith Seitz  <keiths@redhat.com>
+
+	PR symtab/23853
+	* symtab.c (iterate_over_some_symtabs): If the symtab has a
+	fullname, check whether it is a filename match, too.
+
 2018-11-04  Tom Tromey  <tom@tromey.com>
 
 	* varobj.c (install_default_visualizer): Update.
diff --git a/gdb/symtab.c b/gdb/symtab.c
index 7649908d9c..5b39db6d33 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -412,7 +412,9 @@ iterate_over_some_symtabs (const char *name,
     {
       ALL_COMPUNIT_FILETABS (cust, s)
 	{
-	  if (compare_filenames_for_search (s->filename, name))
+	  if (compare_filenames_for_search (s->filename, name)
+	      || (s->fullname != nullptr
+		  && compare_filenames_for_search (s->fullname, name)))
 	    {
 	      if (callback (s))
 		return true;
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 0df75aa54f..4befa4f4c9 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+YYYY-MM-DD  Keith Seitz  <keiths@redhat.com>
+
+	PR symtab/23853
+	* gdb.base/symlink-sourcefile.c: New file.
+	* gdb.base/symlink-sourcefile.exp: New file.
+
 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
 
 	* gdb.ada/watch_minus_l: New testcase.
diff --git a/gdb/testsuite/gdb.base/symlink-sourcefile.c b/gdb/testsuite/gdb.base/symlink-sourcefile.c
new file mode 100644
index 0000000000..2cf0d0e2fe
--- /dev/null
+++ b/gdb/testsuite/gdb.base/symlink-sourcefile.c
@@ -0,0 +1,26 @@
+/* Copyright 2018 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+static int
+foo (void)
+{
+  return 0; /* break here  */
+}
+
+int
+main (void)
+{
+  return foo ();
+}
diff --git a/gdb/testsuite/gdb.base/symlink-sourcefile.exp b/gdb/testsuite/gdb.base/symlink-sourcefile.exp
new file mode 100644
index 0000000000..084be07151
--- /dev/null
+++ b/gdb/testsuite/gdb.base/symlink-sourcefile.exp
@@ -0,0 +1,44 @@
+# Copyright 2018 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test GDB when source files are symlinks.
+standard_testfile
+
+set test "file symbolic link name"
+set linksrc "link-${srcfile}"
+set srcfilelink [standard_output_file $linksrc]
+
+
+# Remove any existing symlink and build executable using the
+# symlink.
+remote_file host delete $srcfilelink
+set status [remote_exec host \
+		"ln -sf $srcdir/$subdir/$srcfile $srcfilelink"]
+if {[lindex $status 0] != 0} {
+    unsupported "$test (host does not support symbolic links)"
+    return 0
+}
+
+if {[prepare_for_testing $testfile $testfile $srcfilelink]} {
+    return -1
+}
+
+if {![runto_main]} {
+    untested "could not run to main"
+    return -1
+}
+
+gdb_breakpoint [gdb_get_line_number "break here" $srcfile] message
+gdb_continue_to_breakpoint "run to breakpoint marker"
