[geany/geany-plugins] 84d841: scope - small fixes

Dimitar Zhekov git-noreply at geany.org
Wed Jan 23 19:22:08 UTC 2013


Branch:      refs/heads/master
Author:      Dimitar Zhekov <dimitar.zhekov at gmail.com>
Committer:   Dimitar Zhekov <dimitar.zhekov at gmail.com>
Date:        Wed, 23 Jan 2013 19:22:08 UTC
Commit:      84d841ecae18cb9a533fe6e44751c0f4d6761f60
             https://github.com/geany/geany-plugins/commit/84d841ecae18cb9a533fe6e44751c0f4d6761f60

Log Message:
-----------
scope - small fixes


Modified Paths:
--------------
    scope/ChangeLog
    scope/docs/scope.html
    scope/src/break.c
    scope/src/debug.c
    scope/wscript_build

Modified: scope/ChangeLog
9 files changed, 9 insertions(+), 0 deletions(-)
===================================================================
@@ -1,3 +1,12 @@
+2013-01-22  Dimitar Zhekov  <dimitar.zhekov at gmail.com>
+
+ * src/debug.c:
+   Win32 waitpid()/kill() emulation depends on glibconfig.h only and
+   sets errno = EINVAL on error.
+ * wscript_build:
+   Define empty libraries for win32 only.
+
+
 2013-01-20  Dimitar Zhekov  <dimitar.zhekov at gmail.com>
 
  * src/debug.c:


Modified: scope/docs/scope.html
3 files changed, 2 insertions(+), 1 deletions(-)
===================================================================
@@ -325,7 +325,8 @@
 
 <p><b><a name="threads">Threads</a></b></p>
 
-<p><em>Refresh</em> - will not append or remove threads, only update the currently listed
+<p>The thread list is updated by asynchronous gdb messages. Normally you should not need to
+refresh it, and <em>Refresh</em> won't append or remove threads, only update the current
 ones.</p>
 
 <p><em>Synchronize</em> - refresh and select the current gdb thread. Shift-click:


Modified: scope/src/break.c
2 files changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -1162,7 +1162,7 @@ static gboolean on_break_query_tooltip(G_GNUC_UNUSED GtkWidget *widget, gint x,
 			has_tip = TRUE;
 			g_free(file);
 		}
-		
+
 		if (func)
 		{
 			if (has_tip)


Modified: scope/src/debug.c
35 files changed, 23 insertions(+), 12 deletions(-)
===================================================================
@@ -22,7 +22,7 @@
 #include <string.h>
 #include <unistd.h>
 
-#include "common.h"
+#include <glibconfig.h>
 
 #ifdef G_OS_UNIX
 #include <sys/types.h>
@@ -31,32 +31,43 @@
 #else  /* G_OS_UNIX */
 #include <windows.h>
 
-static int waitpid(HANDLE pid, int *stat_loc)
-{
-	DWORD status;
+#define WNOHANG 0
 
-	if (GetExitCodeProcess(pid, &status))
+static int waitpid(HANDLE pid, int *stat_loc, int options)
+{
+	if (options == WNOHANG)
 	{
-		if (status == STILL_ACTIVE)
-			return 0;
+		DWORD status;
+
+		if (GetExitCodeProcess(pid, &status))
+		{
+			if (status == STILL_ACTIVE)
+				return 0;
 
-		if (stat_loc)
-			*stat_loc = status;
-		return 1;
+			if (stat_loc)
+				*stat_loc = status;
+			return 1;
+		}
 	}
 
+	errno = EINVAL;
 	return -1;
 }
-#define waitpid(pid, stat_loc, options) waitpid((pid), (stat_loc))
 
 #define SIGKILL 9
 
 static int kill(HANDLE pid, int sig)
 {
-	return TerminateProcess(pid, sig) ? 0 : -1;
+	if (TerminateProcess(pid, sig))
+		return 0;
+
+	errno = EINVAL;
+	return -1;
 }
 #endif  /* G_OS_UNIX */
 
+#include "common.h"
+
 extern guint thread_count;
 extern guint thread_prompt;
 


Modified: scope/wscript_build
2 files changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -25,11 +25,11 @@ from build.wafutils import build_plugin, target_is_win32
 
 name = 'Scope'
 includes = ['scope/src']
-libraries = []
 
 if target_is_win32(bld):
 	datadir = '${G_PREFIX}/${GEANYPLUGINS_DATADIR}'
 	docdir = '${G_PREFIX}/doc/plugins/scope'
+	libraries = []
 else:
 	datadir = '${GEANYPLUGINS_DATADIR}'
 	docdir = '${DOCDIR}/scope'



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Plugins-Commits mailing list