This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit] [rfc] Print MI fullname even for non-existing files
On Fri, 28 Dec 2012 01:17:06 +0100, Edjunior Barbosa Machado wrote:
> This seem to be due to a strcmp with a null string 'symtab->fullname' in:
>
> if (FILENAME_CMP (symtab->fullname, symtab_to_fullname (s)) != 0)
>
> With the patch below, this problem is fixed and gdb.base/list.exp no longer
> crashes gdb. Ok?
Thanks for the bugreport. I have checked in an equivalent fix below.
Jan
http://sourceware.org/ml/gdb-cvs/2012-12/msg00192.html
--- src/gdb/ChangeLog 2012/12/25 17:27:47 1.14982
+++ src/gdb/ChangeLog 2012/12/28 09:05:39 1.14983
@@ -1,3 +1,8 @@
+2012-12-28 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * symtab.c (find_line_symtab): Call symtab_to_fullname instead of
+ accessing FULLNAME directly.
+
2012-12-25 Sergio Durigan Junior <sergiodj@redhat.com>
* frv-linux-tdep.c (frv_linux_pc_in_sigtramp): Fix typo.
--- src/gdb/symtab.c 2012/12/25 08:03:31 1.333
+++ src/gdb/symtab.c 2012/12/28 09:05:40 1.334
@@ -2554,7 +2554,8 @@
if (FILENAME_CMP (symtab->filename, s->filename) != 0)
continue;
- if (FILENAME_CMP (symtab->fullname, symtab_to_fullname (s)) != 0)
+ if (FILENAME_CMP (symtab_to_fullname (symtab),
+ symtab_to_fullname (s)) != 0)
continue;
l = LINETABLE (s);
ind = find_line_common (l, line, &exact, 0);