This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: [4/4] RFC: implement catch load and catch unload


> -----Original Message-----
> From: Tom Tromey [mailto:tromey@redhat.com] 
> Sent: Tuesday, January 24, 2012 12:36 PM
> To: Marc Khouzam
> Cc: 'Pedro Alves'; 'gdb-patches@sourceware.org'
> Subject: Re: [4/4] RFC: implement catch load and catch unload
> 
> >>>>> "Marc" == Marc Khouzam <marc.khouzam@ericsson.com> writes:
> 
> Marc> Not having this command won't prevent CDI from debugging,
> Marc> but will have two impacts, as far as I know:
> Marc> 1- no more user feature to stop on lib events
> Marc> 2- breakpoints set on non-loaded libs will no longer be
> Marc> installed (since CDI does not use pending breakpoints, but
> Marc> tries to plant failed bps at each new lib load event)
> 
> Just to be clear -- the command still exists and works.
> What changed is how gdb reports it.  It used to be that you would get:
> 
>     -exec-continue
>     ~"Stopped due to shared library event."
>     *stopped
> 
> Now you will get:
> 
>     -exec-continue
>     *stopped,reason="solib-event",[more stuff]
> 
> I can even restore the old output if you really need it; though I'd
> prefer we just keep on with a more purely MI solution.

Funny.  I found the following comment in our code:

		// GDB does not have reason when stopping on shared, hopefully
		// this will be fix in newer version meanwhile, we will use a hack
		// to cope.  On most platform we can detect this state by looking at the
		// console stream for the phrase:
		// 	~"Stopped due to shared library event\n"

The good news is we do look for the 'reason' field first.
Surprisingly we look for "shlib-event", but it is a one-line fix
to use "solib-event" instead.

Is the change already in HEAD?  I can test with that just to be sure
I haven't missed something.

Thanks

Marc


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]