This is the mail archive of the gdb-patches@sourceware.cygnus.com 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]

[RFA] attach_command patch (affects Mach 3 and Hurd?)


I've been trying to perfect gdb-for-Windows' ability to attach to a running
process and would like to use the ATTACH_NO_WAIT conditional in infcmd.c
to avoid calling wait_for_inferior.

Unfortunately, attach_command in its present incarnation always sets the
stop_soon_quietly flag.  This has an unwanted side effect of avoiding
the loading of shared library symbols.  That's not an issue for Windows
so I'd like to just avoid setting this flag (which seems badly overloaded
to me).

The patch below moves the setting of this variable inside of the #ifndef
ATTACH_NO_WAIT which *I think* is actually the correct behavior.  Since
stop_soon_quietly is supposed to tell WFI that a target trap is coming
soon, it doesn't make sense to me that this should be set when we are
not about to enter WFI.

This only affects two other targets so I'm hoping that their maintainers
will be able to let me know if this is an issue for them.

cgf

Sat Jul  1 22:50:59 2000  Christopher Faylor <cgf@cygnus.com>

        * infcmd.c (attach_command): Move "stop_soon_quietly" setting
        inside ATTACH_NO_WAIT conditional since we are not about to
        stop "soon" if we're not calling wait_for_inferior.

Index: infcmd.c
===================================================================
RCS file: /cvs/src/src/gdb/infcmd.c,v
retrieving revision 1.7
diff -u -p -r1.7 infcmd.c
--- infcmd.c	2000/05/28 01:12:27	1.7
+++ infcmd.c	2000/07/02 02:52:39
@@ -1721,11 +1721,11 @@ attach_command (args, from_tty)
      wait_for_inferior as soon as the target reports a stop.  */
   init_wait_for_inferior ();
   clear_proceed_status ();
-  stop_soon_quietly = 1;
 
   /* No traps are generated when attaching to inferior under Mach 3
      or GNU hurd.  */
 #ifndef ATTACH_NO_WAIT
+  stop_soon_quietly = 1;
   wait_for_inferior ();
 #endif

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