Aside from the include prefix problem we are having, the kdebase-workspace port needed some fixing for 4.0.83. Attached are two new patch files updated for 4.0.83, and we are able to remove one old one also. If somebody could commit these, that would be great :)

+kdebase-workspace/files/patch-libs-ksysguard-processui_KMonitorProcessIO.cpp <Updated patch file> +kdebase-workspace/files/patch-libs-ksysguard-processui_CMakeLists.txt <Updated patch file> - kdebase-workspace/files/patch-libs-ksysguard-config_ksysguard.h.cmake <Remove this file>

Also here's the diff's of each:


---------------------------------------------------------------------------------------------------------------------------------


# diff -ruN patch-libs-ksysguard-processui_KMonitorProcessIO.cpp.orig patch-libs-ksysguard-processui_KMonitorProcessIO.cpp

--- patch-libs-ksysguard-processui_KMonitorProcessIO.cpp.orig 2008-05-29 09:28:40.000000000 -0400 +++ patch-libs-ksysguard-processui_KMonitorProcessIO.cpp 2008-06-25 21:08:56.000000000 -0400
@@ -1,53 +1,48 @@
---- ../libs/ksysguard/processui/KMonitorProcessIO.cpp.orig 2008-04-18 09:21:52.000000000 +0200 -+++ ../libs/ksysguard/processui/KMonitorProcessIO.cpp 2008-05-29 10:43:29.000000000 +0200
-@@ -29,19 +29,40 @@
- #include <errno.h>
+--- ../libs/ksysguard/processui/KMonitorProcessIO.cpp.orig 2008-06-18 08:41:37.000000000 -0400 ++++ ../libs/ksysguard/processui/KMonitorProcessIO.cpp 2008-06-25 21:07:56.000000000 -0400
+@@ -32,6 +32,7 @@
  #include <unistd.h>
  #include <stdio.h>
--#include <sys/ptrace.h>
+ #ifdef HAVE_SYS_PTRACE_H
 +#include <signal.h>
+ #include <sys/ptrace.h>
+ #endif
  #include <sys/types.h>
-+#include <sys/ptrace.h>
- #include <sys/wait.h>
- #include <sys/syscall.h>
--#include <endian.h> //Required to define _BIG_ENDIAN on big endian systems
- #include <sys/user.h>
- #include <ctype.h>
--#ifdef _BIG_ENDIAN
--//Required for bswap on big endian systems
--#include <byteswap.h>
-+
-+#ifdef Q_OS_FREEBSD
-+  //FreeBSD's ptrace uses slightly different arguments
-+      #define PTRACE_ATTACH   PT_ATTACH
-+      #define PTRACE_CONT     PT_CONTINUE
-+      #define PTRACE_DETACH   PT_DETACH
-+      #define PTRACE_GETREGS  PT_GETREGS
-+      #define PTRACE_SYSCALL  PT_SETREGS
-+      #define PTRACE_PEEKTEXT PT_READ_I
-+   #include <machine/reg.h>
-+      #define REG_ORIG_ACCUM r_eax
-+      #define REG_ACCUM r_eax
-+      #define REG_PARAM1 r_ebx
-+      #define REG_PARAM2 r_ecx
-+      #define REG_PARAM3 r_edx
-+ #include <sys/endian.h> //Required to define _BIG_ENDIAN on big endian systems
-+      #define __BYTE_ORDER _BYTE_ORDER
-+#else
-+      #include <endian.h>
-+      #if __BYTE_ORDER == __BIG_ENDIAN
-+              //Required for bswap on big endian systems
-+              #include <byteswap.h>
-+              #define SYSTEM_IS_BIGENDIAN
-+      #endif
+@@ -50,7 +51,32 @@
+ #include <byteswap.h>
  #endif

 -#ifdef __i386__
++#ifdef Q_OS_FREEBSD
++   //FreeBSD's ptrace uses slightly different arguments
++       #define PTRACE_ATTACH   PT_ATTACH
++       #define PTRACE_CONT     PT_CONTINUE
++       #define PTRACE_DETACH   PT_DETACH
++       #define PTRACE_GETREGS  PT_GETREGS
++       #define PTRACE_SYSCALL  PT_SETREGS
++       #define PTRACE_PEEKTEXT PT_READ_I
++    #include <machine/reg.h>
++       #define REG_ORIG_ACCUM r_eax
++       #define REG_ACCUM r_eax
++       #define REG_PARAM1 r_ebx
++       #define REG_PARAM2 r_ecx
++       #define REG_PARAM3 r_edx
++ #include <sys/endian.h> //Required to define _BIG_ENDIAN on big endian systems
++       #define __BYTE_ORDER _BYTE_ORDER
++#else
++       #include <endian.h>
++       #if __BYTE_ORDER == __BIG_ENDIAN
++               //Required for bswap on big endian systems
++               #include <byteswap.h>
++               #define SYSTEM_IS_BIGENDIAN
++       #endif
++#endif
++
 +#if defined(__i386__) && !defined(Q_OS_FREEBSD)
        #define REG_ORIG_ACCUM orig_eax
        #define REG_ACCUM eax
        #define REG_PARAM1 ebx
-@@ -210,7 +231,10 @@
+@@ -226,7 +252,10 @@
                        ensureCursorVisible();
                return;
        }
@@ -59,7 +54,7 @@
        struct pt_regs regs;
        regs.gpr[0] = ptrace(PTRACE_PEEKUSER, pid, 4 * PT_R0, 0);
        regs.gpr[3] = ptrace(PTRACE_PEEKUSER, pid, 4 * PT_R3, 0);
-@@ -222,14 +246,18 @@
+@@ -238,14 +267,18 @@
        ptrace(PTRACE_GETREGS, pid, 0, &regs);
  #endif
        /*unsigned int b = ptrace(PTRACE_PEEKTEXT, pid, regs.eip, 0);*/

----------------------------------------------------------------------------------------------------------------------------

# diff -ruN patch-libs-ksysguard-processui_CMakeLists.txt.orig patch-libs-ksysguard-processui_CMakeLists.txt

--- patch-libs-ksysguard-processui_CMakeLists.txt.orig 2008-05-29 09:28:40.000000000 -0400 +++ patch-libs-ksysguard-processui_CMakeLists.txt 2008-06-25 19:35:48.000000000 -0400
@@ -1,15 +1,16 @@
---- ../libs/ksysguard/processui/CMakeLists.txt.orig 2008-04-10 11:30:14.000000000 +0200 -+++ ../libs/ksysguard/processui/CMakeLists.txt 2008-05-29 10:48:06.000000000 +0200
-@@ -1,13 +1,7 @@
+--- ../libs/ksysguard/processui/CMakeLists.txt.orig 2008-06-18 12:41:37.000000000 +0000 ++++ ../libs/ksysguard/processui/CMakeLists.txt 2008-06-25 12:08:36.000000000 +0000
+@@ -5,14 +5,7 @@
+ check_include_files(sys/endian.h HAVE_SYS_ENDIAN_H)
+ check_include_files(byteswap.h HAVE_BYTESWAP_H)

- include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/../  ../processcore/)
-
--check_include_files(sys/ptrace.h HAVE_SYS_PTRACE_H)
--
 -if (HAVE_SYS_PTRACE_H)
     set(processui_ptrace_SRCS KMonitorProcessIO.cpp DisplayProcessDlg.cpp)
 -else (HAVE_SYS_PTRACE_H)
--   set(processui_ptrace_SRCS )
+-   # Even if we don't have ptrace, we need KMonitorProcessIO.cpp
+-   # because the widget is referenced from the .widgets file and
+-   # from the .ui files.
+-   set(processui_ptrace_SRCS KMonitorProcessIO.cpp)
 -endif (HAVE_SYS_PTRACE_H)

  set(processui_LIB_SRCS





--

Kris Moore
PC-BSD Software
http://www.pcbsd.com
--- ../libs/ksysguard/processui/CMakeLists.txt.orig     2008-06-18 
12:41:37.000000000 +0000
+++ ../libs/ksysguard/processui/CMakeLists.txt  2008-06-25 12:08:36.000000000 
+0000
@@ -5,14 +5,7 @@
 check_include_files(sys/endian.h HAVE_SYS_ENDIAN_H)
 check_include_files(byteswap.h HAVE_BYTESWAP_H)
 
-if (HAVE_SYS_PTRACE_H)
    set(processui_ptrace_SRCS KMonitorProcessIO.cpp DisplayProcessDlg.cpp)
-else (HAVE_SYS_PTRACE_H)
-   # Even if we don't have ptrace, we need KMonitorProcessIO.cpp
-   # because the widget is referenced from the .widgets file and
-   # from the .ui files.
-   set(processui_ptrace_SRCS KMonitorProcessIO.cpp)
-endif (HAVE_SYS_PTRACE_H)
 
 set(processui_LIB_SRCS
    ksysguardprocesslist.cpp
--- ../libs/ksysguard/processui/KMonitorProcessIO.cpp.orig      2008-06-18 
08:41:37.000000000 -0400
+++ ../libs/ksysguard/processui/KMonitorProcessIO.cpp   2008-06-25 
21:07:56.000000000 -0400
@@ -32,6 +32,7 @@
 #include <unistd.h>
 #include <stdio.h>
 #ifdef HAVE_SYS_PTRACE_H
+#include <signal.h>
 #include <sys/ptrace.h>
 #endif
 #include <sys/types.h>
@@ -50,7 +51,32 @@
 #include <byteswap.h> 
 #endif
 
-#ifdef __i386__
+#ifdef Q_OS_FREEBSD
+   //FreeBSD's ptrace uses slightly different arguments
+       #define PTRACE_ATTACH   PT_ATTACH
+       #define PTRACE_CONT     PT_CONTINUE
+       #define PTRACE_DETACH   PT_DETACH
+       #define PTRACE_GETREGS  PT_GETREGS
+       #define PTRACE_SYSCALL  PT_SETREGS
+       #define PTRACE_PEEKTEXT PT_READ_I
+    #include <machine/reg.h>
+       #define REG_ORIG_ACCUM r_eax
+       #define REG_ACCUM r_eax
+       #define REG_PARAM1 r_ebx
+       #define REG_PARAM2 r_ecx
+       #define REG_PARAM3 r_edx
+       #include <sys/endian.h>  //Required to define _BIG_ENDIAN on big endian 
systems
+       #define __BYTE_ORDER _BYTE_ORDER
+#else
+       #include <endian.h>
+       #if __BYTE_ORDER == __BIG_ENDIAN
+               //Required for bswap on big endian systems
+               #include <byteswap.h>
+               #define SYSTEM_IS_BIGENDIAN
+       #endif
+#endif
+
+#if defined(__i386__) && !defined(Q_OS_FREEBSD)
        #define REG_ORIG_ACCUM orig_eax
        #define REG_ACCUM eax
        #define REG_PARAM1 ebx
@@ -226,7 +252,10 @@
                        ensureCursorVisible();
                return;
        }
-#if defined(__ppc__) || defined(__powerpc__) || defined(__powerpc64__) || 
defined(__PPC__) || defined(powerpc)
+#if defined Q_OS_FREEBSD
+       struct reg regs;
+       ptrace(PTRACE_GETREGS, pid, (char*)&regs,0);
+#elif defined(__ppc__) || defined(__powerpc__) || defined(__powerpc64__) || 
defined(__PPC__) || defined(powerpc)
        struct pt_regs regs;
        regs.gpr[0] = ptrace(PTRACE_PEEKUSER, pid, 4 * PT_R0, 0);
        regs.gpr[3] = ptrace(PTRACE_PEEKUSER, pid, 4 * PT_R3, 0);
@@ -238,14 +267,18 @@
        ptrace(PTRACE_GETREGS, pid, 0, &regs);
 #endif
        /*unsigned int b = ptrace(PTRACE_PEEKTEXT, pid, regs.eip, 0);*/
-       if (mIncludeChildProcesses && (regs.REG_ORIG_ACCUM == SYS_fork || 
regs.REG_ORIG_ACCUM == SYS_clone)) {
+       if (mIncludeChildProcesses && (regs.REG_ORIG_ACCUM == SYS_fork 
+#ifndef Q_OS_FREEBSD
+                               || regs.REG_ORIG_ACCUM == SYS_clone
+#endif
+       )) {
                if (regs.REG_ACCUM > 0)
-                       attach(regs.REG_ACCUM);                                 
+                       attach(regs.REG_ACCUM); 
        }
        if ((regs.REG_ORIG_ACCUM == SYS_read || regs.REG_ORIG_ACCUM == 
SYS_write) && (regs.REG_PARAM3 == regs.REG_ACCUM)) {
                for (unsigned int i = 0; i < regs.REG_PARAM3; i++) {
-                       unsigned int a = ptrace(PTRACE_PEEKTEXT, pid, 
regs.REG_PARAM2 + i, 0);
-#ifdef _BIG_ENDIAN
+                       unsigned int a = ptrace(PTRACE_PEEKTEXT, pid, 
(char*)regs.REG_PARAM2 + i, 0);
+#ifdef SYSTEM_IS_BIGENDIAN
                        a = bswap_32(a);
 #endif
                        if(!modified) {
_______________________________________________
kde-freebsd mailing list
kde-freebsd@kde.org
https://mail.kde.org/mailman/listinfo/kde-freebsd

Reply via email to