From: Craig Small Date: Thu, 21 Jun 2007 00:20:35 +0000 (+0000) Subject: Added x86_64 support for peekfd X-Git-Tag: v22.11~54 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2aa37ef33c004fecfebb3468f78aba7875fc5f24;p=psmisc Added x86_64 support for peekfd --- diff --git a/ChangeLog b/ChangeLog index d568a4b..dd80711 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ Changes in ?? ============= +2007-06-21 Tomas Smetana + * Added support for x86_64 architecture for peekfd + 2007-06-13 Craig Small * Added Chinese simplified po file diff --git a/configure.ac b/configure.ac index 81d6745..98d567f 100644 --- a/configure.ac +++ b/configure.ac @@ -58,13 +58,28 @@ AC_TYPE_PID_T AC_TYPE_SIZE_T AC_CHECK_MEMBERS([struct stat.st_rdev]) AC_TYPE_UID_T -AC_CHECK_MEMBERS([struct user_regs_struct.orig_eax, struct user_regs_struct.eax, struct user_regs_struct.ebx, struct user_regs_struct.ecx, struct user_regs_struct.edx], [],[], [#include ]) -AM_CONDITIONAL(WANT_PEEKFD, +AC_CHECK_MEMBERS([struct user_regs_struct.orig_eax, + struct user_regs_struct.eax, + struct user_regs_struct.ebx, + struct user_regs_struct.ecx, + struct user_regs_struct.edx, + struct user_regs_struct.orig_rax, + struct user_regs_struct.rax, + struct user_regs_struct.rdi, + struct user_regs_struct.rsi, + struct user_regs_struct.rdx], [],[], [#include ]) +AM_CONDITIONAL(WANT_PEEKFD_I386, test $ac_cv_member_struct_user_regs_struct_orig_eax = yes && test $ac_cv_member_struct_user_regs_struct_eax = yes && test $ac_cv_member_struct_user_regs_struct_ebx = yes && test $ac_cv_member_struct_user_regs_struct_ecx = yes && test $ac_cv_member_struct_user_regs_struct_edx = yes ) +AM_CONDITIONAL(WANT_PEEKFD_X86_64, + test $ac_cv_member_struct_user_regs_struct_orig_rax = yes && + test $ac_cv_member_struct_user_regs_struct_rax = yes && + test $ac_cv_member_struct_user_regs_struct_rdi = yes && + test $ac_cv_member_struct_user_regs_struct_rsi = yes && + test $ac_cv_member_struct_user_regs_struct_rdx = yes ) dnl Check for language stuff AM_GNU_GETTEXT([external]) diff --git a/po/bg.po b/po/bg.po index 65706b7..f723ae0 100644 --- a/po/bg.po +++ b/po/bg.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: psmisc 22.2pre1\n" "Report-Msgid-Bugs-To: csmall@small.dropbear.id.au\n" -"POT-Creation-Date: 2007-05-31 08:31+1000\n" +"POT-Creation-Date: 2007-06-21 10:12+1000\n" "PO-Revision-Date: 2006-03-07 11:49+0200\n" "Last-Translator: Anton Zinoviev \n" "Language-Team: Bulgarian \n" @@ -145,7 +145,7 @@ msgstr "" "Copyright © 1993-2005 Werner Almesberger и Craig Small\n" "\n" -#: src/killall.c:556 src/fuser.c:124 src/peekfd.c:61 src/pstree.c:782 +#: src/killall.c:556 src/fuser.c:124 src/peekfd.c:76 src/pstree.c:782 #, c-format msgid "" "PSmisc comes with ABSOLUTELY NO WARRANTY.\n" @@ -356,24 +356,24 @@ msgstr "Не може да се отвори мрежово гнездо.\n" msgid "Cannot find socket's device number.\n" msgstr "Не може да бъде намерен номерът на устройството на гнездото.\n" -#: src/peekfd.c:49 +#: src/peekfd.c:64 #, c-format msgid "Error attaching to pid %i\n" msgstr "" -#: src/peekfd.c:57 +#: src/peekfd.c:72 #, fuzzy, c-format msgid "peekfd (PSmisc) %s\n" msgstr "pstree (PSmisc) %s\n" -#: src/peekfd.c:59 +#: src/peekfd.c:74 #, c-format msgid "" "Copyright (C) 2007 Trent Waddington\n" "\n" msgstr "" -#: src/peekfd.c:69 +#: src/peekfd.c:84 #, c-format msgid "" "Usage: peekfd [-8] [-n] [-c] [-d] [-V] [-h] [ ..]\n" diff --git a/po/ca.po b/po/ca.po index f0e8d09..79ef564 100644 --- a/po/ca.po +++ b/po/ca.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: psmisc 21.6cvs\n" "Report-Msgid-Bugs-To: csmall@small.dropbear.id.au\n" -"POT-Creation-Date: 2007-05-31 08:31+1000\n" +"POT-Creation-Date: 2007-06-21 10:12+1000\n" "PO-Revision-Date: 2004-12-08 12:46+0100\n" "Last-Translator: Guillem Jover \n" "Language-Team: Catalan \n" @@ -137,7 +137,7 @@ msgstr "" "Copyright (C) 1993-2002 Werner Almesberger i Craig Small\n" "\n" -#: src/killall.c:556 src/fuser.c:124 src/peekfd.c:61 src/pstree.c:782 +#: src/killall.c:556 src/fuser.c:124 src/peekfd.c:76 src/pstree.c:782 #, c-format msgid "" "PSmisc comes with ABSOLUTELY NO WARRANTY.\n" @@ -345,24 +345,24 @@ msgstr "" msgid "Cannot find socket's device number.\n" msgstr "no s'ha pogut trobar el nombre de dispositiu del sòcol" -#: src/peekfd.c:49 +#: src/peekfd.c:64 #, c-format msgid "Error attaching to pid %i\n" msgstr "" -#: src/peekfd.c:57 +#: src/peekfd.c:72 #, fuzzy, c-format msgid "peekfd (PSmisc) %s\n" msgstr "pstree (psmisc) %s\n" -#: src/peekfd.c:59 +#: src/peekfd.c:74 #, c-format msgid "" "Copyright (C) 2007 Trent Waddington\n" "\n" msgstr "" -#: src/peekfd.c:69 +#: src/peekfd.c:84 #, c-format msgid "" "Usage: peekfd [-8] [-n] [-c] [-d] [-V] [-h] [ ..]\n" diff --git a/po/de.po b/po/de.po index 764a149..5cff59f 100644 --- a/po/de.po +++ b/po/de.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: psmisc 20.1\n" "Report-Msgid-Bugs-To: csmall@small.dropbear.id.au\n" -"POT-Creation-Date: 2007-05-31 08:31+1000\n" +"POT-Creation-Date: 2007-06-21 10:12+1000\n" "PO-Revision-Date: 2004-11-02 13:36-0500\n" "Last-Translator: Wolfgang Schorer \n" "Language-Team: woolfy \n" @@ -111,7 +111,7 @@ msgstr "" "Copyright (C) 1993-2002 Werner Almesberger und Craig Small\n" "\n" -#: src/killall.c:556 src/fuser.c:124 src/peekfd.c:61 src/pstree.c:782 +#: src/killall.c:556 src/fuser.c:124 src/peekfd.c:76 src/pstree.c:782 #, c-format msgid "" "PSmisc comes with ABSOLUTELY NO WARRANTY.\n" @@ -315,24 +315,24 @@ msgstr "" msgid "Cannot find socket's device number.\n" msgstr "Kann die Gerätenummer der Sockets nicht finden" -#: src/peekfd.c:49 +#: src/peekfd.c:64 #, c-format msgid "Error attaching to pid %i\n" msgstr "" -#: src/peekfd.c:57 +#: src/peekfd.c:72 #, fuzzy, c-format msgid "peekfd (PSmisc) %s\n" msgstr "fuser (psmisc) %s\n" -#: src/peekfd.c:59 +#: src/peekfd.c:74 #, c-format msgid "" "Copyright (C) 2007 Trent Waddington\n" "\n" msgstr "" -#: src/peekfd.c:69 +#: src/peekfd.c:84 #, c-format msgid "" "Usage: peekfd [-8] [-n] [-c] [-d] [-V] [-h] [ ..]\n" diff --git a/po/eu.po b/po/eu.po index 7776e8e..653148a 100644 --- a/po/eu.po +++ b/po/eu.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: psmisc 21.6pre1\n" "Report-Msgid-Bugs-To: csmall@small.dropbear.id.au\n" -"POT-Creation-Date: 2007-05-31 08:31+1000\n" +"POT-Creation-Date: 2007-06-21 10:12+1000\n" "PO-Revision-Date: 2005-02-23 14:55+0100\n" "Last-Translator: Mikel Olasagasti \n" "Language-Team: Basque \n" @@ -140,7 +140,7 @@ msgstr "" "Copyright (C) 1993-2002 Werner Almesberger eta Craig Small\n" "\n" -#: src/killall.c:556 src/fuser.c:124 src/peekfd.c:61 src/pstree.c:782 +#: src/killall.c:556 src/fuser.c:124 src/peekfd.c:76 src/pstree.c:782 #, c-format msgid "" "PSmisc comes with ABSOLUTELY NO WARRANTY.\n" @@ -350,24 +350,24 @@ msgstr "" msgid "Cannot find socket's device number.\n" msgstr "ezin da socket gailu zenbakia aurkitu" -#: src/peekfd.c:49 +#: src/peekfd.c:64 #, c-format msgid "Error attaching to pid %i\n" msgstr "" -#: src/peekfd.c:57 +#: src/peekfd.c:72 #, fuzzy, c-format msgid "peekfd (PSmisc) %s\n" msgstr "pstree (psmisc) %s\n" -#: src/peekfd.c:59 +#: src/peekfd.c:74 #, c-format msgid "" "Copyright (C) 2007 Trent Waddington\n" "\n" msgstr "" -#: src/peekfd.c:69 +#: src/peekfd.c:84 #, c-format msgid "" "Usage: peekfd [-8] [-n] [-c] [-d] [-V] [-h] [ ..]\n" diff --git a/po/fi.po b/po/fi.po index b40ccf1..8da599b 100644 --- a/po/fi.po +++ b/po/fi.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: psmisc 21.5\n" "Report-Msgid-Bugs-To: csmall@small.dropbear.id.au\n" -"POT-Creation-Date: 2007-05-31 08:31+1000\n" +"POT-Creation-Date: 2007-06-21 10:12+1000\n" "PO-Revision-Date: 2004-10-29 15:14+0300\n" "Last-Translator: Lars Wirzenius \n" "Language-Team: Finnish \n" @@ -111,7 +111,7 @@ msgstr "" "Copyright (C) 1993-2002 Werner Almesberger and Craig Small\n" "\n" -#: src/killall.c:556 src/fuser.c:124 src/peekfd.c:61 src/pstree.c:782 +#: src/killall.c:556 src/fuser.c:124 src/peekfd.c:76 src/pstree.c:782 #, fuzzy, c-format msgid "" "PSmisc comes with ABSOLUTELY NO WARRANTY.\n" @@ -320,24 +320,24 @@ msgstr "" msgid "Cannot find socket's device number.\n" msgstr "pistokkeen laitenumeroa ei löydy" -#: src/peekfd.c:49 +#: src/peekfd.c:64 #, c-format msgid "Error attaching to pid %i\n" msgstr "" -#: src/peekfd.c:57 +#: src/peekfd.c:72 #, fuzzy, c-format msgid "peekfd (PSmisc) %s\n" msgstr "pstree (psmisc) %s\n" -#: src/peekfd.c:59 +#: src/peekfd.c:74 #, c-format msgid "" "Copyright (C) 2007 Trent Waddington\n" "\n" msgstr "" -#: src/peekfd.c:69 +#: src/peekfd.c:84 #, c-format msgid "" "Usage: peekfd [-8] [-n] [-c] [-d] [-V] [-h] [ ..]\n" diff --git a/po/fr.po b/po/fr.po index bfb5064..f2eb021 100644 --- a/po/fr.po +++ b/po/fr.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: psmisc 20.1\n" "Report-Msgid-Bugs-To: csmall@small.dropbear.id.au\n" -"POT-Creation-Date: 2007-05-31 08:31+1000\n" +"POT-Creation-Date: 2007-06-21 10:12+1000\n" "PO-Revision-Date: 2002-04-12 21:33+1000\n" "Last-Translator: Marc Léger \n" "Language-Team: French \n" @@ -107,7 +107,7 @@ msgid "" "\n" msgstr "" -#: src/killall.c:556 src/fuser.c:124 src/peekfd.c:61 src/pstree.c:782 +#: src/killall.c:556 src/fuser.c:124 src/peekfd.c:76 src/pstree.c:782 #, fuzzy, c-format msgid "" "PSmisc comes with ABSOLUTELY NO WARRANTY.\n" @@ -314,24 +314,24 @@ msgstr "" msgid "Cannot find socket's device number.\n" msgstr "ne peut pas trouver le numéro du périphérique des sockets" -#: src/peekfd.c:49 +#: src/peekfd.c:64 #, c-format msgid "Error attaching to pid %i\n" msgstr "" -#: src/peekfd.c:57 +#: src/peekfd.c:72 #, fuzzy, c-format msgid "peekfd (PSmisc) %s\n" msgstr "fuser (psmisc) %s\n" -#: src/peekfd.c:59 +#: src/peekfd.c:74 #, c-format msgid "" "Copyright (C) 2007 Trent Waddington\n" "\n" msgstr "" -#: src/peekfd.c:69 +#: src/peekfd.c:84 #, c-format msgid "" "Usage: peekfd [-8] [-n] [-c] [-d] [-V] [-h] [ ..]\n" diff --git a/po/hu.po b/po/hu.po index 5f78585..12eff0b 100644 --- a/po/hu.po +++ b/po/hu.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: psmisc 22.2\n" "Report-Msgid-Bugs-To: csmall@small.dropbear.id.au\n" -"POT-Creation-Date: 2007-05-31 08:31+1000\n" +"POT-Creation-Date: 2007-06-21 10:12+1000\n" "PO-Revision-Date: 2006-08-05 02:34+0200\n" "Last-Translator: Miklos Vajna \n" "Language-Team: Hungarian \n" @@ -140,7 +140,7 @@ msgstr "" "Copyright (C) 1993-2005 Werner Almesberger és Craig Small\n" "\n" -#: src/killall.c:556 src/fuser.c:124 src/peekfd.c:61 src/pstree.c:782 +#: src/killall.c:556 src/fuser.c:124 src/peekfd.c:76 src/pstree.c:782 #, c-format msgid "" "PSmisc comes with ABSOLUTELY NO WARRANTY.\n" @@ -349,24 +349,24 @@ msgstr "Nem siker msgid "Cannot find socket's device number.\n" msgstr "Nem sikerült megtalálni a socket eszközszámát.\n" -#: src/peekfd.c:49 +#: src/peekfd.c:64 #, c-format msgid "Error attaching to pid %i\n" msgstr "" -#: src/peekfd.c:57 +#: src/peekfd.c:72 #, fuzzy, c-format msgid "peekfd (PSmisc) %s\n" msgstr "pstree (PSmisc) %s\n" -#: src/peekfd.c:59 +#: src/peekfd.c:74 #, c-format msgid "" "Copyright (C) 2007 Trent Waddington\n" "\n" msgstr "" -#: src/peekfd.c:69 +#: src/peekfd.c:84 #, c-format msgid "" "Usage: peekfd [-8] [-n] [-c] [-d] [-V] [-h] [ ..]\n" diff --git a/po/it.po b/po/it.po index 621ebd5..e588ba9 100644 --- a/po/it.po +++ b/po/it.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: psmisc 22.5\n" "Report-Msgid-Bugs-To: csmall@small.dropbear.id.au\n" -"POT-Creation-Date: 2007-05-31 08:31+1000\n" +"POT-Creation-Date: 2007-06-21 10:12+1000\n" "PO-Revision-Date: 2007-05-30 17:17+0100\n" "Last-Translator: Marco Colombo \n" "Language-Team: Italian \n" @@ -139,7 +139,7 @@ msgstr "" "Copyright (C) 1993-2005 Werner Almesberger e Craig Small\n" "\n" -#: src/killall.c:556 src/fuser.c:124 src/peekfd.c:61 src/pstree.c:782 +#: src/killall.c:556 src/fuser.c:124 src/peekfd.c:76 src/pstree.c:782 #, c-format msgid "" "PSmisc comes with ABSOLUTELY NO WARRANTY.\n" @@ -349,17 +349,17 @@ msgstr "Impossibile aprire un socket di rete.\n" msgid "Cannot find socket's device number.\n" msgstr "Impossibile trovare il numero di dispositivo del socket.\n" -#: src/peekfd.c:49 +#: src/peekfd.c:64 #, c-format msgid "Error attaching to pid %i\n" msgstr "Errore nel collegarsi al pid %i\n" -#: src/peekfd.c:57 +#: src/peekfd.c:72 #, c-format msgid "peekfd (PSmisc) %s\n" msgstr "peekfd (PSmisc) %s\n" -#: src/peekfd.c:59 +#: src/peekfd.c:74 #, c-format msgid "" "Copyright (C) 2007 Trent Waddington\n" @@ -369,7 +369,7 @@ msgstr "" "\n" # FIXME -#: src/peekfd.c:69 +#: src/peekfd.c:84 #, c-format msgid "" "Usage: peekfd [-8] [-n] [-c] [-d] [-V] [-h] [ ..]\n" diff --git a/po/ja.po b/po/ja.po index 9772d81..8a07438 100644 --- a/po/ja.po +++ b/po/ja.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: psmisc 22.2pre1\n" "Report-Msgid-Bugs-To: csmall@small.dropbear.id.au\n" -"POT-Creation-Date: 2007-05-31 08:31+1000\n" +"POT-Creation-Date: 2007-06-21 10:12+1000\n" "PO-Revision-Date: 2006-03-20 10:31+0900\n" "Last-Translator: GOTO Masanori \n" "Language-Team: Japanese \n" @@ -137,7 +137,7 @@ msgstr "" "Copyright (C) 1993-2005 Werner Almesberger and Craig Small\n" "\n" -#: src/killall.c:556 src/fuser.c:124 src/peekfd.c:61 src/pstree.c:782 +#: src/killall.c:556 src/fuser.c:124 src/peekfd.c:76 src/pstree.c:782 #, c-format msgid "" "PSmisc comes with ABSOLUTELY NO WARRANTY.\n" @@ -349,24 +349,24 @@ msgstr " msgid "Cannot find socket's device number.\n" msgstr "¥½¥±¥Ã¥È¤Î¥Ç¥Ð¥¤¥¹Èֹ椬¸«¤Ä¤«¤ê¤Þ¤»¤ó.\n" -#: src/peekfd.c:49 +#: src/peekfd.c:64 #, c-format msgid "Error attaching to pid %i\n" msgstr "" -#: src/peekfd.c:57 +#: src/peekfd.c:72 #, fuzzy, c-format msgid "peekfd (PSmisc) %s\n" msgstr "pstree (PSmisc) %s\n" -#: src/peekfd.c:59 +#: src/peekfd.c:74 #, c-format msgid "" "Copyright (C) 2007 Trent Waddington\n" "\n" msgstr "" -#: src/peekfd.c:69 +#: src/peekfd.c:84 #, c-format msgid "" "Usage: peekfd [-8] [-n] [-c] [-d] [-V] [-h] [ ..]\n" diff --git a/po/nb.po b/po/nb.po index 1603472..d9eddcd 100644 --- a/po/nb.po +++ b/po/nb.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: psmisc 22.2pre1\n" "Report-Msgid-Bugs-To: csmall@small.dropbear.id.au\n" -"POT-Creation-Date: 2007-05-31 08:31+1000\n" +"POT-Creation-Date: 2007-06-21 10:12+1000\n" "PO-Revision-Date: 2006-03-07 12:01+0100\n" "Last-Translator: Trond Endrestøl \n" "Language-Team: Norwegian Bokmaal \n" @@ -151,7 +151,7 @@ msgstr "" "Copyright (C) 1993-2005 Werner Almesberger og Craig Small\n" "\n" -#: src/killall.c:556 src/fuser.c:124 src/peekfd.c:61 src/pstree.c:782 +#: src/killall.c:556 src/fuser.c:124 src/peekfd.c:76 src/pstree.c:782 #, c-format msgid "" "PSmisc comes with ABSOLUTELY NO WARRANTY.\n" @@ -364,24 +364,24 @@ msgstr "Kan ikke msgid "Cannot find socket's device number.\n" msgstr "Kan ikke finne socketens enhetsnummer.\n" -#: src/peekfd.c:49 +#: src/peekfd.c:64 #, c-format msgid "Error attaching to pid %i\n" msgstr "" -#: src/peekfd.c:57 +#: src/peekfd.c:72 #, fuzzy, c-format msgid "peekfd (PSmisc) %s\n" msgstr "pstree (psmisc) %s\n" -#: src/peekfd.c:59 +#: src/peekfd.c:74 #, c-format msgid "" "Copyright (C) 2007 Trent Waddington\n" "\n" msgstr "" -#: src/peekfd.c:69 +#: src/peekfd.c:84 #, c-format msgid "" "Usage: peekfd [-8] [-n] [-c] [-d] [-V] [-h] [ ..]\n" diff --git a/po/nl.po b/po/nl.po index a9343e9..a97ea54 100644 --- a/po/nl.po +++ b/po/nl.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: psmisc 22.5\n" "Report-Msgid-Bugs-To: csmall@small.dropbear.id.au\n" -"POT-Creation-Date: 2007-05-31 08:31+1000\n" +"POT-Creation-Date: 2007-06-21 10:12+1000\n" "PO-Revision-Date: 2007-05-31 14:03+0200\n" "Last-Translator: Benno Schulenberg \n" "Language-Team: Dutch \n" @@ -139,7 +139,7 @@ msgstr "" "Copyright (C) 1993-2005 Werner Almesberger and Craig Small\n" "\n" -#: src/killall.c:556 src/fuser.c:124 src/peekfd.c:61 src/pstree.c:782 +#: src/killall.c:556 src/fuser.c:124 src/peekfd.c:76 src/pstree.c:782 #, c-format msgid "" "PSmisc comes with ABSOLUTELY NO WARRANTY.\n" @@ -347,17 +347,17 @@ msgstr "Kan netwerk-socket niet openen.\n" msgid "Cannot find socket's device number.\n" msgstr "Kan apparaatnummer van socket niet vinden.\n" -#: src/peekfd.c:49 +#: src/peekfd.c:64 #, c-format msgid "Error attaching to pid %i\n" msgstr "Fout tijdens aanhechten aan PID %i\n" -#: src/peekfd.c:57 +#: src/peekfd.c:72 #, c-format msgid "peekfd (PSmisc) %s\n" msgstr "peekfd (PSmisc) %s\n" -#: src/peekfd.c:59 +#: src/peekfd.c:74 #, c-format msgid "" "Copyright (C) 2007 Trent Waddington\n" @@ -366,7 +366,7 @@ msgstr "" "Copyright (C) 2007 Trent Waddington\n" "\n" -#: src/peekfd.c:69 +#: src/peekfd.c:84 #, c-format msgid "" "Usage: peekfd [-8] [-n] [-c] [-d] [-V] [-h] [ ..]\n" diff --git a/po/pl.po b/po/pl.po index 2c703dc..16e6769 100644 --- a/po/pl.po +++ b/po/pl.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: psmisc 22.5\n" "Report-Msgid-Bugs-To: csmall@small.dropbear.id.au\n" -"POT-Creation-Date: 2007-05-31 08:31+1000\n" +"POT-Creation-Date: 2007-06-21 10:12+1000\n" "PO-Revision-Date: 2007-05-30 17:34+0200\n" "Last-Translator: Jakub Bogusz \n" "Language-Team: Polish \n" @@ -141,7 +141,7 @@ msgstr "" "Copyright (C) 1993-2005 Werner Almesberger i Craig Small\n" "\n" -#: src/killall.c:556 src/fuser.c:124 src/peekfd.c:61 src/pstree.c:782 +#: src/killall.c:556 src/fuser.c:124 src/peekfd.c:76 src/pstree.c:782 #, c-format msgid "" "PSmisc comes with ABSOLUTELY NO WARRANTY.\n" @@ -348,17 +348,17 @@ msgstr "Nie mo msgid "Cannot find socket's device number.\n" msgstr "Nie mo¿na odnale¼æ numeru urz±dzenia gniazda.\n" -#: src/peekfd.c:49 +#: src/peekfd.c:64 #, c-format msgid "Error attaching to pid %i\n" msgstr "B³±d podczas pod³±czania do procesu %i\n" -#: src/peekfd.c:57 +#: src/peekfd.c:72 #, c-format msgid "peekfd (PSmisc) %s\n" msgstr "peekfd (PSmisc) %s\n" -#: src/peekfd.c:59 +#: src/peekfd.c:74 #, c-format msgid "" "Copyright (C) 2007 Trent Waddington\n" @@ -367,7 +367,7 @@ msgstr "" "Copyright (C) 2007 Trent Waddington\n" "\n" -#: src/peekfd.c:69 +#: src/peekfd.c:84 #, c-format msgid "" "Usage: peekfd [-8] [-n] [-c] [-d] [-V] [-h] [ ..]\n" diff --git a/po/psmisc.pot b/po/psmisc.pot index 05e63c0..e3b543c 100644 --- a/po/psmisc.pot +++ b/po/psmisc.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: csmall@small.dropbear.id.au\n" -"POT-Creation-Date: 2007-05-31 08:31+1000\n" +"POT-Creation-Date: 2007-06-21 10:12+1000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -109,7 +109,7 @@ msgid "" "\n" msgstr "" -#: src/killall.c:556 src/fuser.c:124 src/peekfd.c:61 src/pstree.c:782 +#: src/killall.c:556 src/fuser.c:124 src/peekfd.c:76 src/pstree.c:782 #, c-format msgid "" "PSmisc comes with ABSOLUTELY NO WARRANTY.\n" @@ -285,24 +285,24 @@ msgstr "" msgid "Cannot find socket's device number.\n" msgstr "" -#: src/peekfd.c:49 +#: src/peekfd.c:64 #, c-format msgid "Error attaching to pid %i\n" msgstr "" -#: src/peekfd.c:57 +#: src/peekfd.c:72 #, c-format msgid "peekfd (PSmisc) %s\n" msgstr "" -#: src/peekfd.c:59 +#: src/peekfd.c:74 #, c-format msgid "" "Copyright (C) 2007 Trent Waddington\n" "\n" msgstr "" -#: src/peekfd.c:69 +#: src/peekfd.c:84 #, c-format msgid "" "Usage: peekfd [-8] [-n] [-c] [-d] [-V] [-h] [ ..]\n" diff --git a/po/pt.po b/po/pt.po index a46fb03..808ba10 100644 --- a/po/pt.po +++ b/po/pt.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: psmisc 1.0\n" "Report-Msgid-Bugs-To: csmall@small.dropbear.id.au\n" -"POT-Creation-Date: 2007-05-31 08:31+1000\n" +"POT-Creation-Date: 2007-06-21 10:12+1000\n" "PO-Revision-Date: 2001-10-28 22:14-0200\n" "Last-Translator: Edesio Costa e Silva \n" "Language-Team: Portuguese \n" @@ -107,7 +107,7 @@ msgid "" "\n" msgstr "" -#: src/killall.c:556 src/fuser.c:124 src/peekfd.c:61 src/pstree.c:782 +#: src/killall.c:556 src/fuser.c:124 src/peekfd.c:76 src/pstree.c:782 #, fuzzy, c-format msgid "" "PSmisc comes with ABSOLUTELY NO WARRANTY.\n" @@ -316,24 +316,24 @@ msgstr "" msgid "Cannot find socket's device number.\n" msgstr "não pode achar o número de dispositivo do socket" -#: src/peekfd.c:49 +#: src/peekfd.c:64 #, c-format msgid "Error attaching to pid %i\n" msgstr "" -#: src/peekfd.c:57 +#: src/peekfd.c:72 #, fuzzy, c-format msgid "peekfd (PSmisc) %s\n" msgstr "fuser (psmisc) %s\n" -#: src/peekfd.c:59 +#: src/peekfd.c:74 #, c-format msgid "" "Copyright (C) 2007 Trent Waddington\n" "\n" msgstr "" -#: src/peekfd.c:69 +#: src/peekfd.c:84 #, c-format msgid "" "Usage: peekfd [-8] [-n] [-c] [-d] [-V] [-h] [ ..]\n" diff --git a/po/ro.po b/po/ro.po index 29856c8..6fffa45 100644 --- a/po/ro.po +++ b/po/ro.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: psmisc-21.6pre1\n" "Report-Msgid-Bugs-To: csmall@small.dropbear.id.au\n" -"POT-Creation-Date: 2007-05-31 08:31+1000\n" +"POT-Creation-Date: 2007-06-21 10:12+1000\n" "PO-Revision-Date: 2005-02-24 12:00-0500\n" "Last-Translator: Laurentiu Buzdugan \n" "Language-Team: Romanian \n" @@ -140,7 +140,7 @@ msgstr "" "Copyright (C) 1993-2002 Werner Almesberger ºi Craig Small\n" "\n" -#: src/killall.c:556 src/fuser.c:124 src/peekfd.c:61 src/pstree.c:782 +#: src/killall.c:556 src/fuser.c:124 src/peekfd.c:76 src/pstree.c:782 #, c-format msgid "" "PSmisc comes with ABSOLUTELY NO WARRANTY.\n" @@ -348,24 +348,24 @@ msgstr "" msgid "Cannot find socket's device number.\n" msgstr "nu pot gãsi numerele dispozitivelor socket-urilor" -#: src/peekfd.c:49 +#: src/peekfd.c:64 #, c-format msgid "Error attaching to pid %i\n" msgstr "" -#: src/peekfd.c:57 +#: src/peekfd.c:72 #, fuzzy, c-format msgid "peekfd (PSmisc) %s\n" msgstr "pstree (psmisc) %s\n" -#: src/peekfd.c:59 +#: src/peekfd.c:74 #, c-format msgid "" "Copyright (C) 2007 Trent Waddington\n" "\n" msgstr "" -#: src/peekfd.c:69 +#: src/peekfd.c:84 #, c-format msgid "" "Usage: peekfd [-8] [-n] [-c] [-d] [-V] [-h] [ ..]\n" diff --git a/po/ru.po b/po/ru.po index 5771238..19e33c8 100644 --- a/po/ru.po +++ b/po/ru.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: psmisc 20.6\n" "Report-Msgid-Bugs-To: csmall@small.dropbear.id.au\n" -"POT-Creation-Date: 2007-05-31 08:31+1000\n" +"POT-Creation-Date: 2007-06-21 10:12+1000\n" "PO-Revision-Date: 2005-03-15 02:53+0300\n" "Last-Translator: Ilya Evseev \n" "Language-Team: woolfy \n" @@ -136,7 +136,7 @@ msgid "" "\n" msgstr "" -#: src/killall.c:556 src/fuser.c:124 src/peekfd.c:61 src/pstree.c:782 +#: src/killall.c:556 src/fuser.c:124 src/peekfd.c:76 src/pstree.c:782 #, c-format msgid "" "PSmisc comes with ABSOLUTELY NO WARRANTY.\n" @@ -335,24 +335,24 @@ msgstr "" msgid "Cannot find socket's device number.\n" msgstr "ÎÅ ÍÏÇÕ ÎÁÊÔÉ ÎÏÍÅÒ ÕÓÔÒÏÊÓÔ×Á ÓÏËÅÔÁ" -#: src/peekfd.c:49 +#: src/peekfd.c:64 #, c-format msgid "Error attaching to pid %i\n" msgstr "" -#: src/peekfd.c:57 +#: src/peekfd.c:72 #, fuzzy, c-format msgid "peekfd (PSmisc) %s\n" msgstr "fuser (psmisc) %s\n" -#: src/peekfd.c:59 +#: src/peekfd.c:74 #, c-format msgid "" "Copyright (C) 2007 Trent Waddington\n" "\n" msgstr "" -#: src/peekfd.c:69 +#: src/peekfd.c:84 #, c-format msgid "" "Usage: peekfd [-8] [-n] [-c] [-d] [-V] [-h] [ ..]\n" diff --git a/po/sv.po b/po/sv.po index eb9ef31..375977e 100644 --- a/po/sv.po +++ b/po/sv.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: psmisc 22.2pre1\n" "Report-Msgid-Bugs-To: csmall@small.dropbear.id.au\n" -"POT-Creation-Date: 2007-05-31 08:31+1000\n" +"POT-Creation-Date: 2007-06-21 10:12+1000\n" "PO-Revision-Date: 2006-05-04 00:08+0100\n" "Last-Translator: Daniel Nylander \n" "Language-Team: Swedish \n" @@ -137,7 +137,7 @@ msgstr "" "Copyright 1993-2005 Werner Almesberger och Craig Small\n" "\n" -#: src/killall.c:556 src/fuser.c:124 src/peekfd.c:61 src/pstree.c:782 +#: src/killall.c:556 src/fuser.c:124 src/peekfd.c:76 src/pstree.c:782 #, c-format msgid "" "PSmisc comes with ABSOLUTELY NO WARRANTY.\n" @@ -348,24 +348,24 @@ msgstr "Kan inte msgid "Cannot find socket's device number.\n" msgstr "Kunde inte hitta uttagets enhetsnummer.\n" -#: src/peekfd.c:49 +#: src/peekfd.c:64 #, c-format msgid "Error attaching to pid %i\n" msgstr "" -#: src/peekfd.c:57 +#: src/peekfd.c:72 #, fuzzy, c-format msgid "peekfd (PSmisc) %s\n" msgstr "pstree (PSmisc) %s\n" -#: src/peekfd.c:59 +#: src/peekfd.c:74 #, c-format msgid "" "Copyright (C) 2007 Trent Waddington\n" "\n" msgstr "" -#: src/peekfd.c:69 +#: src/peekfd.c:84 #, c-format msgid "" "Usage: peekfd [-8] [-n] [-c] [-d] [-V] [-h] [ ..]\n" diff --git a/po/vi.po b/po/vi.po index 2a2de17..64cda4c 100644 --- a/po/vi.po +++ b/po/vi.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: psmisc 22.5\n" "Report-Msgid-Bugs-To: csmall@small.dropbear.id.au\n" -"POT-Creation-Date: 2007-05-31 08:31+1000\n" +"POT-Creation-Date: 2007-06-21 10:12+1000\n" "PO-Revision-Date: 2007-05-31 18:04+0930\n" "Last-Translator: Clytie Siddall \n" "Language-Team: Vietnamese \n" @@ -142,7 +142,7 @@ msgstr "" "Bản quyền © 1993-2005 Werner Almesberger và Craig Small\n" "\n" -#: src/killall.c:556 src/fuser.c:124 src/peekfd.c:61 src/pstree.c:782 +#: src/killall.c:556 src/fuser.c:124 src/peekfd.c:76 src/pstree.c:782 #, c-format msgid "" "PSmisc comes with ABSOLUTELY NO WARRANTY.\n" @@ -351,17 +351,17 @@ msgstr "Không thể mở một ổ cắm mạng.\n" msgid "Cannot find socket's device number.\n" msgstr "Không tìm thấy số hiệu thiết bị ổ cắm.\n" -#: src/peekfd.c:49 +#: src/peekfd.c:64 #, c-format msgid "Error attaching to pid %i\n" msgstr "Gặp lỗi khi đính kèm đến PID %i\n" -#: src/peekfd.c:57 +#: src/peekfd.c:72 #, c-format msgid "peekfd (PSmisc) %s\n" msgstr "peekfd (PSmisc) %s\n" -#: src/peekfd.c:59 +#: src/peekfd.c:74 #, c-format msgid "" "Copyright (C) 2007 Trent Waddington\n" @@ -370,7 +370,7 @@ msgstr "" "Tác quyền © năm 2007 của Trent Waddington\n" "\n" -#: src/peekfd.c:69 +#: src/peekfd.c:84 #, c-format msgid "" "Usage: peekfd [-8] [-n] [-c] [-d] [-V] [-h] [ ..]\n" diff --git a/po/zh_CN.po b/po/zh_CN.po index 750ab2b..ed81b04 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: psmisc 22.5\n" "Report-Msgid-Bugs-To: csmall@small.dropbear.id.au\n" -"POT-Creation-Date: 2007-05-31 08:31+1000\n" +"POT-Creation-Date: 2007-06-21 10:12+1000\n" "PO-Revision-Date: 2007-06-13 03:56+0800\n" "Last-Translator: LI Daobing \n" "Language-Team: Chinese (simplified) [ ..]\n" diff --git a/src/Makefile.am b/src/Makefile.am index 0760fff..22cb39c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -2,8 +2,13 @@ AM_CFLAGS = -Wall -DLOCALEDIR=\"/usr/share/locale\" bin_PROGRAMS = fuser killall pstree oldfuser -if WANT_PEEKFD +if WANT_PEEKFD_I386 bin_PROGRAMS += peekfd + AM_CFLAGS += -DI386 +endif +if WANT_PEEKFD_X86_64 + bin_PROGRAMS += peekfd + AM_CFLAGS += -DX86_64 endif oldfuser_SOURCES = oldfuser.c comm.h signals.c signals.h loop.h i18n.h diff --git a/src/peekfd.c b/src/peekfd.c index e22b7ab..cfcfb18 100644 --- a/src/peekfd.c +++ b/src/peekfd.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -33,6 +34,20 @@ #include "i18n.h" +#ifdef I386 + #define REG_ORIG_ACCUM orig_eax + #define REG_ACCUM eax + #define REG_PARAM1 ebx + #define REG_PARAM2 ecx + #define REG_PARAM3 edx +#elif X86_64 + #define REG_ORIG_ACCUM orig_rax + #define REG_ACCUM rax + #define REG_PARAM1 rdi + #define REG_PARAM2 rsi + #define REG_PARAM3 rdx +#endif + #define MAX_ATTACHED_PIDS 1024 int num_attached_pids = 0; pid_t attached_pids[MAX_ATTACHED_PIDS]; @@ -177,35 +192,34 @@ int main(int argc, char **argv) ptrace(PTRACE_GETREGS, pid, 0, ®s); /*unsigned int b = ptrace(PTRACE_PEEKTEXT, pid, regs.eip, 0);*/ - - if (follow_forks && (regs.orig_eax == 2 || regs.orig_eax == 120)) { - if (regs.eax > 0) - attach(regs.eax); + if (follow_forks && (regs.REG_ORIG_ACCUM == SYS_fork || regs.REG_ORIG_ACCUM == SYS_clone)) { + if (regs.REG_ACCUM > 0) + attach(regs.REG_ACCUM); } - if ((regs.orig_eax == 3 || regs.orig_eax == 4) && (regs.edx == regs.eax)) { + if ((regs.REG_ORIG_ACCUM == SYS_read || regs.REG_ORIG_ACCUM == SYS_write) && (regs.REG_PARAM3 == regs.REG_ACCUM)) { for (i = 0; i < numfds; i++) - if (fds[i] == regs.ebx) + if (fds[i] == regs.REG_PARAM1) break; if (i != numfds || numfds == 0) { - if (regs.ebx != lastfd || regs.orig_eax != lastdir) { - lastfd = regs.ebx; - lastdir = regs.orig_eax; + if (regs.REG_PARAM1 != lastfd || regs.REG_ORIG_ACCUM != lastdir) { + lastfd = regs.REG_PARAM1; + lastdir = regs.REG_ORIG_ACCUM; if (!no_headers) - printf("\n%sing fd %i:\n", regs.orig_eax == 3 ? "read" : "writ", lastfd); + printf("\n%sing fd %i:\n", regs.REG_ORIG_ACCUM == SYS_read ? "read" : "writ", lastfd); } if (!remove_duplicates || lastbuf == NULL - || last_buf_size != regs.edx || - bufdiff(pid, lastbuf, regs.ecx, regs.edx)) { + || last_buf_size != regs.REG_PARAM3 || + bufdiff(pid, lastbuf, regs.REG_PARAM2, regs.REG_PARAM3)) { if (remove_duplicates) { if (lastbuf) free(lastbuf); - lastbuf = malloc(regs.edx); - last_buf_size = regs.edx; + lastbuf = malloc(regs.REG_PARAM3); + last_buf_size = regs.REG_PARAM3; } - for (i = 0; i < regs.edx; i++) { - unsigned int a = ptrace(PTRACE_PEEKTEXT, pid, regs.ecx + i, 0); + for (i = 0; i < regs.REG_PARAM3; i++) { + unsigned int a = ptrace(PTRACE_PEEKTEXT, pid, regs.REG_PARAM2 + i, 0); if (remove_duplicates) lastbuf[i] = a & 0xff;