Better support for introspection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch adds in the get_process_info request the address of the first debug channel descriptor, so that a taskmanager (or any other tool like a debugger) can walk along the descriptor list.

A+
--
Eric Pouech
Name:          chnbase
ChangeLog:     added (debug info) channel in process information
License:       X11
GenDate:       2003/09/13 12:56:20 UTC
ModifiedFiles: libs/wine/debug.c scheduler/process.c server/protocol.def server/process.c server/process.h
===================================================================
RCS file: /home/cvs/cvsroot/wine/wine/libs/wine/debug.c,v
retrieving revision 1.1
diff -u -u -r1.1 debug.c
--- libs/wine/debug.c	22 Mar 2003 20:40:48 -0000	1.1
+++ libs/wine/debug.c	12 Sep 2003 18:58:02 -0000
@@ -61,6 +61,9 @@
     return strcmp( name, *chan + 1 );
 }
 
+/* get chennel start */
+void* wine_dbg_first(void) {return (void*)&first_dll;}
+
 /* apply a debug option to the channels of a given dll */
 static void apply_option( struct dll *dll, const struct debug_option *opt )
 {
Index: scheduler/process.c
===================================================================
RCS file: /home/cvs/cvsroot/wine/wine/scheduler/process.c,v
retrieving revision 1.230
diff -u -u -r1.230 process.c
--- scheduler/process.c	8 Sep 2003 19:02:01 -0000	1.230
+++ scheduler/process.c	12 Sep 2003 19:56:37 -0000
@@ -125,6 +125,9 @@
 extern void SHELL_LoadRegistry(void);
 extern void VERSION_Init( const char *appname );
 
+/* debug channels */
+extern void* wine_dbg_first(void);
+
 /***********************************************************************
  *           get_basename
  */
@@ -434,6 +437,7 @@
             req->name        = &main_exe_name_ptr;
             req->exe_file    = main_file;
             req->gui         = (nt->OptionalHeader.Subsystem != IMAGE_SUBSYSTEM_WINDOWS_CUI);
+            req->channel_base= wine_dbg_first();
             wine_server_add_data( req, main_exe_name, strlen(main_exe_name) );
             wine_server_call( req );
             peb->BeingDebugged = reply->debugged;
Index: server/protocol.def
===================================================================
RCS file: /home/cvs/cvsroot/wine/wine/server/protocol.def,v
retrieving revision 1.81
diff -u -u -r1.81 protocol.def
--- server/protocol.def	8 Sep 2003 19:04:01 -0000	1.81
+++ server/protocol.def	13 Sep 2003 08:48:53 -0000
@@ -279,6 +279,7 @@
     void*        name;         /* ptr to ptr to name (in process addr space) */
     obj_handle_t exe_file;     /* file handle for main exe */
     int          gui;          /* is it a GUI process? */
+    void*        channel_base; /* address of first channel (debug info) descriptor */
     VARARG(filename,string);   /* file name of main exe */
 @REPLY
     int          debugged;     /* being debugged? */
@@ -330,6 +331,7 @@
     int          priority;         /* priority class */
     int          process_affinity; /* process affinity mask */
     int          system_affinity;  /* system affinity mask */
+    void*        channel_base;     /* address of first channel (debug info) descriptor */
 @END
 
 
Index: server/process.c
===================================================================
RCS file: /home/cvs/cvsroot/wine/wine/server/process.c,v
retrieving revision 1.109
diff -u -u -r1.109 process.c
--- server/process.c	5 Sep 2003 23:15:41 -0000	1.109
+++ server/process.c	13 Sep 2003 09:10:07 -0000
@@ -729,6 +729,7 @@
     reply->priority         = process->priority;
     reply->process_affinity = process->affinity;
     reply->system_affinity  = 1;
+    reply->channel_base     = process->channel_base;
 }
 
 /* set all information about a process */
@@ -1001,6 +1003,7 @@
     set_process_startup_state( process, STARTUP_DONE );
 
     if (req->gui) process->idle_event = create_event( NULL, 0, 1, 0 );
+    process->channel_base = req->channel_base;
     if (current->suspend + process->suspend > 0) stop_thread( current );
     reply->debugged = (process->debugger != 0);
 }
Index: server/process.h
===================================================================
RCS file: /home/cvs/cvsroot/wine/wine/server/process.h,v
retrieving revision 1.38
diff -u -u -r1.38 process.h
--- server/process.h	24 Jul 2003 00:07:00 -0000	1.38
+++ server/process.h	13 Sep 2003 08:49:52 -0000
@@ -78,6 +78,7 @@
     struct process_dll   exe;             /* main exe file */
     void                *ldt_copy;        /* pointer to LDT copy in client addr space */
     void                *ldt_flags;       /* pointer to LDT flags in client addr space */
+    void                *channel_base;    /* pointer to channel (debug info) list start */
 };
 
 struct process_snapshot

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux