From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: gdb-patches@sourceware.org
Subject: [patch] Fix solib-display.exp crash
Date: Tue, 19 Jan 2010 23:40:00 -0000 [thread overview]
Message-ID: <20100119234001.GA9151@host0.dyn.jankratochvil.net> (raw)
Hi,
it is a testsuite regression against gdb-7.0 although the bug was probably
present even in gdb-7.0 (it started to reproduce since one completely
unrelated Daniel J.'s patch). This patch fixes (-lmcheck may be required):
PASS: gdb.base/solib-display.exp: display a_global
PASS: gdb.base/solib-display.exp: display b_global
PASS: gdb.base/solib-display.exp: display c_global
-ERROR: Process no longer exists
-UNRESOLVED: gdb.base/solib-display.exp: after rerun
-WARNING: remote_expect statement without a default case?!
-FAIL: gdb.base/solib-display.exp: Can't run to main (3)
+PASS: gdb.base/solib-display.exp: after rerun
+PASS: gdb.base/solib-display.exp: after rerun
+PASS: gdb.base/solib-display.exp: break 25
+PASS: gdb.base/solib-display.exp: continue
+PASS: gdb.base/solib-display.exp: display main_global
+PASS: gdb.base/solib-display.exp: display a_local
+PASS: gdb.base/solib-display.exp: display a_static
+PASS: gdb.base/solib-display.exp: break 25
+PASS: gdb.base/solib-display.exp: continue
No regressions on {x86_64,x86_64-m32,i686}-fedora12-linux-gnu.
The question is whether SYMBOL_SYMTAB (symbol) can be ever NULL at this point.
IMO not, it can be NULL only temporarily during reading symbols.
Thanks,
Jan
2010-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
* printcmd.c (display_uses_solib_p): Remove variable section. Access
objfile via SYMBOL_SYMTAB.
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -1888,15 +1888,14 @@ display_uses_solib_p (const struct display *d,
{
const struct block *const block = elts[i + 1].block;
const struct symbol *const symbol = elts[i + 2].symbol;
- const struct obj_section *const section =
- SYMBOL_OBJ_SECTION (symbol);
if (block != NULL
&& solib_contains_address_p (solib,
block->startaddr))
return 1;
- if (section && section->objfile == solib->objfile)
+ /* SYMBOL_OBJ_SECTION (symbol) may be NULL. */
+ if (SYMBOL_SYMTAB (symbol)->objfile == solib->objfile)
return 1;
}
endpos -= oplen;
next reply other threads:[~2010-01-19 23:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-19 23:40 Jan Kratochvil [this message]
2010-01-26 21:24 ` Daniel Jacobowitz
2010-01-26 23:52 ` [patch] Comment symbol->symtab NULL [Re: [patch] Fix solib-display.exp crash] Jan Kratochvil
2010-01-27 0:06 ` Daniel Jacobowitz
2010-01-27 0:16 ` Jan Kratochvil
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=20100119234001.GA9151@host0.dyn.jankratochvil.net \
--to=jan.kratochvil@redhat.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