* [patch] Fix solib-display.exp crash
@ 2010-01-19 23:40 Jan Kratochvil
2010-01-26 21:24 ` Daniel Jacobowitz
0 siblings, 1 reply; 5+ messages in thread
From: Jan Kratochvil @ 2010-01-19 23:40 UTC (permalink / raw)
To: gdb-patches
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;
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [patch] Fix solib-display.exp crash
2010-01-19 23:40 [patch] Fix solib-display.exp crash Jan Kratochvil
@ 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
0 siblings, 1 reply; 5+ messages in thread
From: Daniel Jacobowitz @ 2010-01-26 21:24 UTC (permalink / raw)
To: Jan Kratochvil; +Cc: gdb-patches
On Wed, Jan 20, 2010 at 12:40:01AM +0100, Jan Kratochvil wrote:
> 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.
I think that's right; this patch is fine. Thanks!
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 5+ messages in thread
* [patch] Comment symbol->symtab NULL [Re: [patch] Fix solib-display.exp crash]
2010-01-26 21:24 ` Daniel Jacobowitz
@ 2010-01-26 23:52 ` Jan Kratochvil
2010-01-27 0:06 ` Daniel Jacobowitz
0 siblings, 1 reply; 5+ messages in thread
From: Jan Kratochvil @ 2010-01-26 23:52 UTC (permalink / raw)
To: gdb-patches
On Tue, 26 Jan 2010 22:24:25 +0100, Daniel Jacobowitz wrote:
> On Wed, Jan 20, 2010 at 12:40:01AM +0100, Jan Kratochvil wrote:
> > 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.
>
> I think that's right; this patch is fine. Thanks!
Checked-in:
http://sourceware.org/ml/gdb-cvs/2010-01/msg00217.html
OK to check-in this comment?
Thanks,
Jan
2010-01-27 Jan Kratochvil <jan.kratochvil@redhat.com>
* symtab.h (struct symbol <symtab>): New comment on NULL values.
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -554,7 +554,8 @@ struct symbol
struct type *type;
/* The symbol table containing this symbol. This is the file
- associated with LINE. */
+ associated with LINE. It can be NULL during symbols read-in but it is
+ never NULL during normal operation. */
struct symtab *symtab;
/* Domain code. */
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch] Comment symbol->symtab NULL [Re: [patch] Fix solib-display.exp crash]
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
0 siblings, 1 reply; 5+ messages in thread
From: Daniel Jacobowitz @ 2010-01-27 0:06 UTC (permalink / raw)
To: Jan Kratochvil; +Cc: gdb-patches
On Wed, Jan 27, 2010 at 12:50:16AM +0100, Jan Kratochvil wrote:
> On Tue, 26 Jan 2010 22:24:25 +0100, Daniel Jacobowitz wrote:
> > On Wed, Jan 20, 2010 at 12:40:01AM +0100, Jan Kratochvil wrote:
> > > 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.
> >
> > I think that's right; this patch is fine. Thanks!
>
> Checked-in:
> http://sourceware.org/ml/gdb-cvs/2010-01/msg00217.html
>
>
> OK to check-in this comment?
Sure.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-01-27 0:16 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-19 23:40 [patch] Fix solib-display.exp crash Jan Kratochvil
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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox