This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC][PATCH 04/15] Fix crash in tstatus after detach
- From: Gary Benson <gbenson at redhat dot com>
- To: "Wallin, Henrik" <Henrik dot Wallin at windriver dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Fri, 30 Oct 2015 09:48:06 +0000
- Subject: Re: [RFC][PATCH 04/15] Fix crash in tstatus after detach
- Authentication-results: sourceware.org; auth=none
- References: <cover dot 1444820235 dot git dot henrik dot wallin at windriver dot com> <410dda80c8530a193308630ff74a456fadd4bc9e dot 1444820235 dot git dot henrik dot wallin at windriver dot com> <20151014114807 dot GA30077 at blade dot nx> <7014C13F3D22A944AFC3200B12FB0A11765B49DB at ALA-MBA dot corp dot ad dot wrs dot com>
Wallin, Henrik wrote:
> 2015-10-14 13:48 GMT+02:00 Gary Benson <gbenson@redhat.com>:
> > henrik.wallin@windriver.com wrote:
> > > diff --git a/gdb/common/agent.c b/gdb/common/agent.c
> > > index 5c307290589d..c9b6c41bc4ff 100644
> > > --- a/gdb/common/agent.c
> > > +++ b/gdb/common/agent.c
> > > @@ -73,9 +73,16 @@ static struct ipa_sym_addresses ipa_sym_addrs;
> > >
> > > static int all_agent_symbols_looked_up = 0;
> > >
> > > +#ifdef GDBSERVER
> > > +#include <inferiors.h>
> > > +#endif
> > > int
> > > agent_loaded_p (void)
> > > {
> > > +#ifdef GDBSERVER
> > > + if (current_thread == NULL)
> > > + return 0;
> > > +#endif
> > > return all_agent_symbols_looked_up;
> > > }
> > >
> >
> > Please don't introduce "#ifdef GDBSERVER" conditionals into common
> > code, I spent some time removing them last year. I know I didn't
> > get them all, but the remaining two are on my hit list :)
>
> Ok :)
> I will check that.
Thanks Henrik.
Cheers,
Gary
--
http://gbenson.net/