From: Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: Tom Tromey <tromey@redhat.com>, gdb-patches@sourceware.org
Subject: Re: [rfc] Print MI fullname even for non-existing files
Date: Fri, 28 Dec 2012 00:17:00 -0000 [thread overview]
Message-ID: <50DCE502.5050700@linux.vnet.ibm.com> (raw)
In-Reply-To: <20121217185910.GE14232@host2.jankratochvil.net>
On 12/17/2012 04:59 PM, Jan Kratochvil wrote:
> gdb/
> 2012-12-17 Jan Kratochvil <jan.kratochvil@redhat.com>
>
> * ada-lang.c (is_known_support_routine): New variable fullname. Use
> access call to verify the symtab_to_fullname result.
> * breakpoint.c (print_breakpoint_location, update_static_tracepoint):
> Remove NULL check of symtab_to_fullname result.
> * cli/cli-cmds.c (edit_command): Likewise.
> * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
> (mi_cmd_file_list_exec_source_files): Likewise.
> * python/py-symtab.c (stpy_fullname): Likewise.
> * source.c (symtab_to_fullname): Update function comment. Rename
> variable r to fd, move it to inner block. Always provide non-NULL
> result.
> (print_source_lines_base): Remove NULL check of symtab_to_fullname
> result.
> * stack.c (print_frame): Likewise.
> * symtab.c (iterate_over_some_symtabs, find_line_symtab, sources_info):
> Likewise.
> * tracepoint.c (print_one_static_tracepoint_marker): Likewise.
>
> gdb/doc/
> 2012-12-17 Jan Kratochvil <jan.kratochvil@redhat.com>
>
> * gdb.texinfo (GDB/MI Data Manipulation) (fullname): Make it always
> present.
> (GDB/MI File Commands) (-file-list-exec-source-files): Make the
> fullname output always present.
>
> gdb/testsuite/
> 2012-12-17 Jan Kratochvil <jan.kratochvil@redhat.com>
>
> * gdb.mi/mi-fullname-deleted.exp: New file.
>
I've seen a high number of failures on gdb.base/list.exp testcase on ppc64 after
this change and noticed that gdb was segfaulting when issuing a list with
specific arguments:
$ ./gdb ./testsuite/gdb.base/list -q -ex 'list list0.h:1'
Reading symbols from /home/emachado/gdb/build/gdb/testsuite/gdb.base/list...done.
Segmentation fault (core dumped)
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?
2012-12-27 Edjunior Machado <emachado@linux.vnet.ibm.com>
* symtab.c (find_line_symtab): Update symtab->fullname before compare
full file name strings.
diff --git a/gdb/symtab.c b/gdb/symtab.c
index a39e5bf..bd6c3b4 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -2547,6 +2547,9 @@ find_line_symtab (struct symtab *symtab, int line,
symtab->filename);
}
+ /* Get symbol full file name if possible. */
+ symtab_to_fullname (symtab);
+
ALL_SYMTABS (objfile, s)
{
struct linetable *l;
next prev parent reply other threads:[~2012-12-28 0:17 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-17 15:59 Jan Kratochvil
2012-12-17 16:13 ` Andrew Burgess
2012-12-17 18:36 ` Jan Kratochvil
2012-12-17 16:33 ` Eli Zaretskii
2012-12-17 16:36 ` Jan Kratochvil
2012-12-17 18:33 ` Tom Tromey
2012-12-17 18:37 ` Jan Kratochvil
2012-12-17 18:41 ` Tom Tromey
2012-12-17 18:59 ` Jan Kratochvil
2012-12-28 0:17 ` Edjunior Barbosa Machado [this message]
2012-12-28 9:09 ` [commit] " Jan Kratochvil
2012-12-20 14:33 ` Marc Khouzam
2012-12-25 8:04 ` [commit] " Jan Kratochvil
2013-01-03 15:38 ` Marc Khouzam
2013-01-03 15:44 ` Jan Kratochvil
2013-01-03 16:04 ` Tom Tromey
2013-01-03 16:57 ` Joel Brobecker
2013-04-02 16:24 ` Pedro Alves
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=50DCE502.5050700@linux.vnet.ibm.com \
--to=emachado@linux.vnet.ibm.com \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.com \
--cc=tromey@redhat.com \
/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