From: Joel Brobecker Date: Sat, 9 Jan 2010 04:40:02 +0000 (+0000) Subject: GDB hangs when attaching to process on mips-irix. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b2391021b65311d8253c924fc21183dd7c7d0a3c;p=binutils-gdb.git GDB hangs when attaching to process on mips-irix. * solib-irix.c (irix_solib_create_inferior_hook): Do nothing if attaching to a process. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b7fb8ce5b6a..4767db89166 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2010-01-09 Joel Brobecker + + GDB hangs when attaching to process on mips-irix. + * solib-irix.c (irix_solib_create_inferior_hook): Do nothing if + attaching to a process. + 2010-01-09 Joel Brobecker Use the correct breakpoint instruction on mips-irix. diff --git a/gdb/solib-irix.c b/gdb/solib-irix.c index 17f7240269c..ecd5c70b098 100644 --- a/gdb/solib-irix.c +++ b/gdb/solib-irix.c @@ -442,6 +442,13 @@ irix_solib_create_inferior_hook (int from_tty) struct inferior *inf; struct thread_info *tp; + inf = current_inferior (); + + /* If we are attaching to the inferior, the shared libraries + have already been mapped, so nothing more to do. */ + if (inf->attach_flag) + return; + if (!enable_break ()) { warning (_("shared library handler failed to enable breakpoint")); @@ -453,7 +460,6 @@ irix_solib_create_inferior_hook (int from_tty) can go groveling around in the dynamic linker structures to find out what we need to know about them. */ - inf = current_inferior (); tp = inferior_thread (); clear_proceed_status ();