Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [patch 02/15] PIE: disable_breakpoints_in_shlibs also bp_shlib_event
@ 2009-11-09 20:57 Jan Kratochvil
  2009-11-10 18:02 ` Tom Tromey
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Kratochvil @ 2009-11-09 20:57 UTC (permalink / raw)
  To: gdb-patches

Hi,

Fix error on inserting stale breakpoint of type bp_shlib_event.


Thanks,
Jan


With the patchset applied:

x86_64 host i386 target:
cd gdb/testsuite; ../gdb -nx -i=mi <transcript.1
-gdb-set non-stop 1
105-file-exec-and-symbols gdb.mi/mi-non-stop-exit
220-exec-run
200-break-insert -t main
220-exec-run

=thread-exited,id="3",group-id="16651"
=thread-exited,id="2",group-id="16651"
=thread-exited,id="1",group-id="16651"
=thread-group-exited,id="16651"
=library-unloaded,id="/lib/ld-linux.so.2",target-name="/lib/ld-linux.so.2",host-name="/lib/ld-linux.so.2"
=library-unloaded,id="/lib/libpthread.so.0",target-name="/lib/libpthread.so.0",host-name="/lib/libpthread.so.0"
=library-unloaded,id="/lib/libm.so.6",target-name="/lib/libm.so.6",host-name="/lib/libm.so.6"
=library-unloaded,id="/lib/libc.so.6",target-name="/lib/libc.so.6",host-name="/lib/libc.so.6"
=thread-group-created,id="16656"
=thread-created,id="1",group-id="16656"
220^running
*running,thread-id="all"
(gdb)
&"Error in re-setting breakpoint 1: Warning:\n"
&"Cannot insert breakpoint -1.\n"
&"Error accessing memory address 0x5ab0b0: Input/output error.\n"
&"\n"
220^error,msg="Warning:\nCannot insert breakpoint -1.\nError accessing memory address 0x5ab0b0: Input/output error.\n"
=thread-selected,id="1"
(gdb)
=thread-exited,id="1",group-id="16656"
=thread-group-exited,id="16656"


	* breakpoint.c (disable_breakpoints_in_shlibs): Apply also to
	bp_shlib_event.  Simplify parentheses.

--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -4994,9 +4994,10 @@ disable_breakpoints_in_shlibs (void)
        becomes enabled, or the duplicate is removed, gdb will try to insert
        all breakpoints.  If we don't set shlib_disabled here, we'll try
        to insert those breakpoints and fail.  */
-    if (((b->type == bp_breakpoint)
-	 || (b->type == bp_hardware_breakpoint)
-	 || (b->type == bp_tracepoint))
+    if ((b->type == bp_breakpoint
+	 || b->type == bp_hardware_breakpoint
+	 || b->type == bp_tracepoint
+	 || b->type == bp_shlib_event)
 	&& loc->pspace == current_program_space
 	&& !loc->shlib_disabled
 #ifdef PC_SOLIB


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [patch 02/15] PIE: disable_breakpoints_in_shlibs also bp_shlib_event
  2009-11-09 20:57 [patch 02/15] PIE: disable_breakpoints_in_shlibs also bp_shlib_event Jan Kratochvil
@ 2009-11-10 18:02 ` Tom Tromey
  2009-11-10 19:00   ` Pedro Alves
  0 siblings, 1 reply; 4+ messages in thread
From: Tom Tromey @ 2009-11-10 18:02 UTC (permalink / raw)
  To: Jan Kratochvil; +Cc: gdb-patches

>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:

Jan> Fix error on inserting stale breakpoint of type bp_shlib_event.

I suppose the issue is that this breakpoint is inserted in a shared
library?  It was hard to tell from just the transcript.

Jan> 	* breakpoint.c (disable_breakpoints_in_shlibs): Apply also to
Jan> 	bp_shlib_event.  Simplify parentheses.

Ok.

Tom


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [patch 02/15] PIE: disable_breakpoints_in_shlibs also bp_shlib_event
  2009-11-10 18:02 ` Tom Tromey
@ 2009-11-10 19:00   ` Pedro Alves
  2010-01-08 23:02     ` Jan Kratochvil
  0 siblings, 1 reply; 4+ messages in thread
From: Pedro Alves @ 2009-11-10 19:00 UTC (permalink / raw)
  To: gdb-patches, tromey; +Cc: Jan Kratochvil

Also questionable is why is why is breakpoint_init_inferior letting
bp_shlib_event breakpoints survive.

-- 
Pedro Alves


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [patch 02/15] PIE: disable_breakpoints_in_shlibs also  bp_shlib_event
  2009-11-10 19:00   ` Pedro Alves
@ 2010-01-08 23:02     ` Jan Kratochvil
  0 siblings, 0 replies; 4+ messages in thread
From: Jan Kratochvil @ 2010-01-08 23:02 UTC (permalink / raw)
  To: Pedro Alves; +Cc: gdb-patches, tromey

On Tue, 10 Nov 2009 20:00:01 +0100, Pedro Alves wrote:
> Also questionable is why is why is breakpoint_init_inferior letting
> bp_shlib_event breakpoints survive.

Dropping this patch, it really could not work.  It was just some false
FAIL->PASS unstable testsuite result.


Regards,
Jan


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-01-08 23:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-09 20:57 [patch 02/15] PIE: disable_breakpoints_in_shlibs also bp_shlib_event Jan Kratochvil
2009-11-10 18:02 ` Tom Tromey
2009-11-10 19:00   ` Pedro Alves
2010-01-08 23:02     ` Jan Kratochvil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox