This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: MI solib notification
- From: Vladimir Prus <vladimir at codesourcery dot com>
- To: Daniel Jacobowitz <drow at false dot org>
- Cc: Marc Khouzam <marc dot khouzam at ericsson dot com>, gdb-patches at sources dot redhat dot com, Nick Roberts <nickrob at snap dot net dot nz>
- Date: Thu, 12 Feb 2009 18:01:54 +0300
- Subject: Re: MI solib notification
- References: <200901310010.46738.vladimir@codesourcery.com> <200902121212.53025.vladimir@codesourcery.com> <20090212132247.GA3107@caradoc.them.org>
On Thursday 12 February 2009 16:22:47 Daniel Jacobowitz wrote:
> On Thu, Feb 12, 2009 at 12:12:52PM +0300, Vladimir Prus wrote:
> > Eclipse does use this, in particular consider this bit of code:
> >
> > public boolean hasSharedLibChanged(SharedLibrary lib, MIShared miLib) {
> > return !miLib.getName().equals(lib.getFileName()) ||
> > !MIFormat.getBigInteger(miLib.getFrom()).equals(lib.getStartAddress()) ||
> > !MIFormat.getBigInteger(miLib.getTo()).equals(lib.getEndAddress()) ||
> > miLib.isRead() != lib.areSymbolsLoaded();
> > }
> >
> > Now, we know this is never going to happen in practice, when using GDB, and this is
> > GDB-specific code, so maybe we can drop addresses from the GDB output and then DSF
> > folks will make sure they don't use start/end addresses?
>
> I see. This is code that parses the CLI output, right? Let's do as
> you suggest: not generate the addresses in MI notifications, and make
> GDB responsible for detecting this change in the future.
OK.
> > Well, not necessary, due to this code in clear_solib:
> >
> >
> > 903 if (exec_bfd != NULL
> > 904 && bfd_get_flavour (exec_bfd) != bfd_target_aout_flavour)
> > 905 disable_breakpoints_in_shlibs ();
> >
> > So, I think we'll only get additional chatter on a.out targets -- do we care?
>
> == vs != ? I think this runs everywhere except a.out.
Yes, this runs everywhere except a.out and marks all breakpoints in solibs
disabled, without printing any messages. *Then* we look over all solibs
and call observer, but since all breakpoints are already disabled,
breakpoint.c:disable_breakpoints_in_unloaded_shlib won't do anything,
and won't say anything either.
- Volodya