Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] remote: Avoid unwanted shlib internal BPs When debugging Linux kernel or u-boot with Abatron BDI emulator an error occurs:
@ 2012-06-01 13:37 Joakim Tjernlund
  2012-06-01 14:08 ` Pedro Alves
  0 siblings, 1 reply; 9+ messages in thread
From: Joakim Tjernlund @ 2012-06-01 13:37 UTC (permalink / raw)
  To: gdb-patches; +Cc: Joakim Tjernlund

..
(gdb) tar remote bdi:2001
Remote debugging using bdi:2001
0xeff80050 in ?? ()
(gdb) mon reset
(gdb) cont
Continuing.
Warning:
Cannot insert breakpoint -1.
Error accessing memory address 0xc0000000: Unknown error 4294967295.

(gdb) maintenance info breakpoints
Num     Type           Disp Enb Address    What
-1      shlib events   keep y   0xc0000000 <_stext> inf 1

gdb mistakenly inserts a special shared library BP even though
there area no such libs in either linux or u-boot.

Fix this by explicitly informing remote_add_inferior() that
the remote is attached.

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
---
 remote.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/remote.c b/remote.c
index 04b818f..f06c119 100644
--- a/remote.c
+++ b/remote.c
@@ -3293,7 +3293,7 @@ remote_start_remote (int from_tty, struct target_ops *target, int extended_p)
       /* Now, if we have thread information, update inferior_ptid.  */
       inferior_ptid = remote_current_thread (inferior_ptid);
 
-      remote_add_inferior (ptid_get_pid (inferior_ptid), -1);
+      remote_add_inferior (ptid_get_pid (inferior_ptid), 1);
 
       /* Always add the main thread.  */
       add_thread_silent (inferior_ptid);
-- 
1.7.3.4


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

end of thread, other threads:[~2012-06-01 15:01 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-01 13:37 [PATCH] remote: Avoid unwanted shlib internal BPs When debugging Linux kernel or u-boot with Abatron BDI emulator an error occurs: Joakim Tjernlund
2012-06-01 14:08 ` Pedro Alves
2012-06-01 14:39   ` Joakim Tjernlund
2012-06-01 14:40     ` Pedro Alves
2012-06-01 14:48       ` Joakim Tjernlund
     [not found]       ` <OF322378AB.B2F2176F-ONC1257A10.0051062C-C1257A10.00514CCD@LocalDomain>
2012-06-01 14:49         ` Joakim Tjernlund
2012-06-01 14:53       ` Joakim Tjernlund
2012-06-01 14:56         ` Pedro Alves
2012-06-01 15:01           ` Joakim Tjernlund

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