From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: gdb-patches@sourceware.org
Subject: [patch 02/15] PIE: disable_breakpoints_in_shlibs also bp_shlib_event
Date: Mon, 09 Nov 2009 20:57:00 -0000 [thread overview]
Message-ID: <20091109205739.GC19138@host0.dyn.jankratochvil.net> (raw)
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
next reply other threads:[~2009-11-09 20:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-09 20:57 Jan Kratochvil [this message]
2009-11-10 18:02 ` Tom Tromey
2009-11-10 19:00 ` Pedro Alves
2010-01-08 23:02 ` Jan Kratochvil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091109205739.GC19138@host0.dyn.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox