diff -Nru systemtap-1.4/ABOUT-NLS systemtap-1.6/ABOUT-NLS --- systemtap-1.4/ABOUT-NLS 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/ABOUT-NLS 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,1282 @@ +1 Notes on the Free Translation Project +*************************************** + +Free software is going international! The Free Translation Project is +a way to get maintainers of free software, translators, and users all +together, so that free software will gradually become able to speak many +languages. A few packages already provide translations for their +messages. + + If you found this `ABOUT-NLS' file inside a distribution, you may +assume that the distributed package does use GNU `gettext' internally, +itself available at your nearest GNU archive site. But you do _not_ +need to install GNU `gettext' prior to configuring, installing or using +this package with messages translated. + + Installers will find here some useful hints. These notes also +explain how users should proceed for getting the programs to use the +available translations. They tell how people wanting to contribute and +work on translations can contact the appropriate team. + +1.1 INSTALL Matters +=================== + +Some packages are "localizable" when properly installed; the programs +they contain can be made to speak your own native language. Most such +packages use GNU `gettext'. Other packages have their own ways to +internationalization, predating GNU `gettext'. + + By default, this package will be installed to allow translation of +messages. It will automatically detect whether the system already +provides the GNU `gettext' functions. Installers may use special +options at configuration time for changing the default behaviour. The +command: + + ./configure --disable-nls + +will _totally_ disable translation of messages. + + When you already have GNU `gettext' installed on your system and run +configure without an option for your new package, `configure' will +probably detect the previously built and installed `libintl' library +and will decide to use it. If not, you may have to to use the +`--with-libintl-prefix' option to tell `configure' where to look for it. + + Internationalized packages usually have many `po/LL.po' files, where +LL gives an ISO 639 two-letter code identifying the language. Unless +translations have been forbidden at `configure' time by using the +`--disable-nls' switch, all available translations are installed +together with the package. However, the environment variable `LINGUAS' +may be set, prior to configuration, to limit the installed set. +`LINGUAS' should then contain a space separated list of two-letter +codes, stating which languages are allowed. + +1.2 Using This Package +====================== + +As a user, if your language has been installed for this package, you +only have to set the `LANG' environment variable to the appropriate +`LL_CC' combination. If you happen to have the `LC_ALL' or some other +`LC_xxx' environment variables set, you should unset them before +setting `LANG', otherwise the setting of `LANG' will not have the +desired effect. Here `LL' is an ISO 639 two-letter language code, and +`CC' is an ISO 3166 two-letter country code. For example, let's +suppose that you speak German and live in Germany. At the shell +prompt, merely execute `setenv LANG de_DE' (in `csh'), +`export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash'). +This can be done from your `.login' or `.profile' file, once and for +all. + + You might think that the country code specification is redundant. +But in fact, some languages have dialects in different countries. For +example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The +country code serves to distinguish the dialects. + + The locale naming convention of `LL_CC', with `LL' denoting the +language and `CC' denoting the country, is the one use on systems based +on GNU libc. On other systems, some variations of this scheme are +used, such as `LL' or `LL_CC.ENCODING'. You can get the list of +locales supported by your system for your language by running the +command `locale -a | grep '^LL''. + + Not all programs have translations for all languages. By default, an +English message is shown in place of a nonexistent translation. If you +understand other languages, you can set up a priority list of languages. +This is done through a different environment variable, called +`LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG' +for the purpose of message handling, but you still need to have `LANG' +set to the primary language; this is required by other parts of the +system libraries. For example, some Swedish users who would rather +read translations in German than English for when Swedish is not +available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'. + + Special advice for Norwegian users: The language code for Norwegian +bokma*l changed from `no' to `nb' recently (in 2003). During the +transition period, while some message catalogs for this language are +installed under `nb' and some older ones under `no', it's recommended +for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and +older translations are used. + + In the `LANGUAGE' environment variable, but not in the `LANG' +environment variable, `LL_CC' combinations can be abbreviated as `LL' +to denote the language's main dialect. For example, `de' is equivalent +to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT' +(Portuguese as spoken in Portugal) in this context. + +1.3 Translating Teams +===================== + +For the Free Translation Project to be a success, we need interested +people who like their own language and write it well, and who are also +able to synergize with other translators speaking the same language. +Each translation team has its own mailing list. The up-to-date list of +teams can be found at the Free Translation Project's homepage, +`http://translationproject.org/', in the "Teams" area. + + If you'd like to volunteer to _work_ at translating messages, you +should become a member of the translating team for your own language. +The subscribing address is _not_ the same as the list itself, it has +`-request' appended. For example, speakers of Swedish can send a +message to `sv-request@li.org', having this message body: + + subscribe + + Keep in mind that team members are expected to participate +_actively_ in translations, or at solving translational difficulties, +rather than merely lurking around. If your team does not exist yet and +you want to start one, or if you are unsure about what to do or how to +get started, please write to `coordinator@translationproject.org' to +reach the coordinator for all translator teams. + + The English team is special. It works at improving and uniformizing +the terminology in use. Proven linguistic skills are praised more than +programming skills, here. + +1.4 Available Packages +====================== + +Languages are not equally supported in all packages. The following +matrix shows the current state of internationalization, as of June +2010. The matrix shows, in regard of each package, for which languages +PO files have been submitted to translation coordination, with a +translation percentage of at least 50%. + + Ready PO files af am an ar as ast az be be@latin bg bn_IN bs ca + +--------------------------------------------------+ + a2ps | [] [] | + aegis | | + ant-phone | | + anubis | | + aspell | [] [] | + bash | | + bfd | | + bibshelf | [] | + binutils | | + bison | | + bison-runtime | [] | + bluez-pin | [] [] | + bombono-dvd | | + buzztard | | + cflow | | + clisp | | + coreutils | [] [] | + cpio | | + cppi | | + cpplib | [] | + cryptsetup | | + dfarc | | + dialog | [] [] | + dico | | + diffutils | [] | + dink | | + doodle | | + e2fsprogs | [] | + enscript | [] | + exif | | + fetchmail | [] | + findutils | [] | + flex | [] | + freedink | | + gas | | + gawk | [] [] | + gcal | [] | + gcc | | + gettext-examples | [] [] [] [] | + gettext-runtime | [] [] | + gettext-tools | [] [] | + gip | [] | + gjay | | + gliv | [] | + glunarclock | [] [] | + gnubiff | | + gnucash | [] | + gnuedu | | + gnulib | | + gnunet | | + gnunet-gtk | | + gnutls | | + gold | | + gpe-aerial | | + gpe-beam | | + gpe-bluetooth | | + gpe-calendar | | + gpe-clock | [] | + gpe-conf | | + gpe-contacts | | + gpe-edit | | + gpe-filemanager | | + gpe-go | | + gpe-login | | + gpe-ownerinfo | [] | + gpe-package | | + gpe-sketchbook | | + gpe-su | [] | + gpe-taskmanager | [] | + gpe-timesheet | [] | + gpe-today | [] | + gpe-todo | | + gphoto2 | | + gprof | [] | + gpsdrive | | + gramadoir | | + grep | | + grub | [] [] | + gsasl | | + gss | | + gst-plugins-bad | [] | + gst-plugins-base | [] | + gst-plugins-good | [] | + gst-plugins-ugly | [] | + gstreamer | [] [] [] | + gtick | | + gtkam | [] | + gtkorphan | [] | + gtkspell | [] [] [] | + gutenprint | | + hello | [] | + help2man | | + hylafax | | + idutils | | + indent | [] [] | + iso_15924 | | + iso_3166 | [] [] [] [] [] [] [] | + iso_3166_2 | | + iso_4217 | | + iso_639 | [] [] [] [] | + iso_639_3 | | + jwhois | | + kbd | | + keytouch | [] | + keytouch-editor | | + keytouch-keyboa... | [] | + klavaro | [] | + latrine | | + ld | [] | + leafpad | [] [] | + libc | [] [] | + libexif | () | + libextractor | | + libgnutls | | + libgpewidget | | + libgpg-error | | + libgphoto2 | | + libgphoto2_port | | + libgsasl | | + libiconv | [] | + libidn | | + lifelines | | + liferea | [] [] | + lilypond | | + linkdr | [] | + lordsawar | | + lprng | | + lynx | [] | + m4 | | + mailfromd | | + mailutils | | + make | | + man-db | | + man-db-manpages | | + minicom | | + mkisofs | | + myserver | | + nano | [] [] | + opcodes | | + parted | | + pies | | + popt | | + psmisc | | + pspp | [] | + pwdutils | | + radius | [] | + recode | [] [] | + rosegarden | | + rpm | | + rush | | + sarg | | + screem | | + scrollkeeper | [] [] [] | + sed | [] [] | + sharutils | [] [] | + shishi | | + skencil | | + solfege | | + solfege-manual | | + soundtracker | | + sp | | + sysstat | | + tar | [] | + texinfo | | + tin | | + unicode-han-tra... | | + unicode-transla... | | + util-linux-ng | [] | + vice | | + vmm | | + vorbis-tools | | + wastesedge | | + wdiff | | + wget | [] [] | + wyslij-po | | + xchat | [] [] [] [] | + xdg-user-dirs | [] [] [] [] [] [] [] [] [] | + xkeyboard-config | [] [] | + +--------------------------------------------------+ + af am an ar as ast az be be@latin bg bn_IN bs ca + 6 0 1 2 3 19 1 10 3 28 3 1 38 + + crh cs da de el en en_GB en_ZA eo es et eu fa + +-------------------------------------------------+ + a2ps | [] [] [] [] [] [] [] | + aegis | [] [] [] | + ant-phone | [] () | + anubis | [] [] | + aspell | [] [] [] [] [] | + bash | [] [] [] | + bfd | [] | + bibshelf | [] [] [] | + binutils | [] | + bison | [] [] | + bison-runtime | [] [] [] [] | + bluez-pin | [] [] [] [] [] [] | + bombono-dvd | [] | + buzztard | [] [] [] | + cflow | [] [] | + clisp | [] [] [] [] | + coreutils | [] [] [] [] | + cpio | | + cppi | | + cpplib | [] [] [] | + cryptsetup | [] | + dfarc | [] [] [] | + dialog | [] [] [] [] [] | + dico | | + diffutils | [] [] [] [] [] [] | + dink | [] [] [] | + doodle | [] | + e2fsprogs | [] [] [] | + enscript | [] [] [] | + exif | () [] [] | + fetchmail | [] [] () [] [] [] | + findutils | [] [] [] | + flex | [] [] | + freedink | [] [] [] | + gas | [] | + gawk | [] [] [] | + gcal | [] | + gcc | [] [] | + gettext-examples | [] [] [] [] | + gettext-runtime | [] [] [] [] | + gettext-tools | [] [] [] | + gip | [] [] [] [] | + gjay | [] | + gliv | [] [] [] | + glunarclock | [] [] | + gnubiff | () | + gnucash | [] () () () () | + gnuedu | [] [] | + gnulib | [] [] | + gnunet | | + gnunet-gtk | [] | + gnutls | [] [] | + gold | [] | + gpe-aerial | [] [] [] [] | + gpe-beam | [] [] [] [] | + gpe-bluetooth | [] [] | + gpe-calendar | [] | + gpe-clock | [] [] [] [] | + gpe-conf | [] [] [] | + gpe-contacts | [] [] [] | + gpe-edit | [] [] | + gpe-filemanager | [] [] [] | + gpe-go | [] [] [] [] | + gpe-login | [] [] | + gpe-ownerinfo | [] [] [] [] | + gpe-package | [] [] [] | + gpe-sketchbook | [] [] [] [] | + gpe-su | [] [] [] [] | + gpe-taskmanager | [] [] [] [] | + gpe-timesheet | [] [] [] [] | + gpe-today | [] [] [] [] | + gpe-todo | [] [] [] | + gphoto2 | [] [] () [] [] [] | + gprof | [] [] [] | + gpsdrive | [] [] [] | + gramadoir | [] [] [] | + grep | [] | + grub | [] [] | + gsasl | [] | + gss | | + gst-plugins-bad | [] [] [] [] [] | + gst-plugins-base | [] [] [] [] [] | + gst-plugins-good | [] [] [] [] [] [] | + gst-plugins-ugly | [] [] [] [] [] [] | + gstreamer | [] [] [] [] [] | + gtick | [] () [] | + gtkam | [] [] () [] [] | + gtkorphan | [] [] [] [] | + gtkspell | [] [] [] [] [] [] [] | + gutenprint | [] [] [] | + hello | [] [] [] [] | + help2man | [] | + hylafax | [] [] | + idutils | [] [] | + indent | [] [] [] [] [] [] [] | + iso_15924 | [] () [] [] | + iso_3166 | [] [] [] [] () [] [] [] () | + iso_3166_2 | () | + iso_4217 | [] [] [] () [] [] | + iso_639 | [] [] [] [] () [] [] | + iso_639_3 | [] | + jwhois | [] | + kbd | [] [] [] [] [] | + keytouch | [] [] | + keytouch-editor | [] [] | + keytouch-keyboa... | [] | + klavaro | [] [] [] [] | + latrine | [] () | + ld | [] [] | + leafpad | [] [] [] [] [] [] | + libc | [] [] [] [] | + libexif | [] [] () | + libextractor | | + libgnutls | [] | + libgpewidget | [] [] | + libgpg-error | [] [] | + libgphoto2 | [] () | + libgphoto2_port | [] () [] | + libgsasl | | + libiconv | [] [] [] [] [] | + libidn | [] [] [] | + lifelines | [] () | + liferea | [] [] [] [] [] | + lilypond | [] [] [] | + linkdr | [] [] [] | + lordsawar | [] | + lprng | | + lynx | [] [] [] [] | + m4 | [] [] [] [] | + mailfromd | | + mailutils | [] | + make | [] [] [] | + man-db | | + man-db-manpages | | + minicom | [] [] [] [] | + mkisofs | | + myserver | | + nano | [] [] [] | + opcodes | [] [] | + parted | [] [] | + pies | | + popt | [] [] [] [] [] | + psmisc | [] [] [] | + pspp | [] | + pwdutils | [] | + radius | [] | + recode | [] [] [] [] [] [] | + rosegarden | () () () | + rpm | [] [] [] | + rush | | + sarg | | + screem | | + scrollkeeper | [] [] [] [] [] | + sed | [] [] [] [] [] [] | + sharutils | [] [] [] [] | + shishi | | + skencil | [] () [] | + solfege | [] [] [] | + solfege-manual | [] [] | + soundtracker | [] [] [] | + sp | [] | + sysstat | [] [] [] | + tar | [] [] [] [] | + texinfo | [] [] [] | + tin | [] [] | + unicode-han-tra... | | + unicode-transla... | | + util-linux-ng | [] [] [] [] | + vice | () () | + vmm | [] | + vorbis-tools | [] [] | + wastesedge | [] | + wdiff | [] [] | + wget | [] [] [] | + wyslij-po | | + xchat | [] [] [] [] [] | + xdg-user-dirs | [] [] [] [] [] [] [] [] [] | + xkeyboard-config | [] [] [] [] [] [] | + +-------------------------------------------------+ + crh cs da de el en en_GB en_ZA eo es et eu fa + 5 64 105 117 18 1 8 0 28 89 18 19 0 + + fi fr ga gl gu he hi hr hu hy id is it ja ka kn + +----------------------------------------------------+ + a2ps | [] [] [] [] | + aegis | [] [] | + ant-phone | [] [] | + anubis | [] [] [] [] | + aspell | [] [] [] [] | + bash | [] [] [] [] | + bfd | [] [] [] | + bibshelf | [] [] [] [] [] | + binutils | [] [] [] | + bison | [] [] [] [] | + bison-runtime | [] [] [] [] [] [] | + bluez-pin | [] [] [] [] [] [] [] [] | + bombono-dvd | [] | + buzztard | [] | + cflow | [] [] [] | + clisp | [] | + coreutils | [] [] [] [] [] | + cpio | [] [] [] [] | + cppi | [] [] | + cpplib | [] [] [] | + cryptsetup | [] [] [] | + dfarc | [] [] [] | + dialog | [] [] [] [] [] [] [] | + dico | | + diffutils | [] [] [] [] [] [] [] [] [] | + dink | [] | + doodle | [] [] | + e2fsprogs | [] [] | + enscript | [] [] [] [] | + exif | [] [] [] [] [] [] | + fetchmail | [] [] [] [] | + findutils | [] [] [] [] [] [] | + flex | [] [] [] | + freedink | [] [] [] | + gas | [] [] | + gawk | [] [] [] [] () [] | + gcal | [] | + gcc | [] | + gettext-examples | [] [] [] [] [] [] [] | + gettext-runtime | [] [] [] [] [] [] | + gettext-tools | [] [] [] [] | + gip | [] [] [] [] [] [] | + gjay | [] | + gliv | [] () | + glunarclock | [] [] [] [] | + gnubiff | () [] () | + gnucash | () () () () () [] | + gnuedu | [] [] | + gnulib | [] [] [] [] [] [] | + gnunet | | + gnunet-gtk | [] | + gnutls | [] [] | + gold | [] [] | + gpe-aerial | [] [] [] | + gpe-beam | [] [] [] [] | + gpe-bluetooth | [] [] [] [] | + gpe-calendar | [] [] | + gpe-clock | [] [] [] [] [] | + gpe-conf | [] [] [] [] | + gpe-contacts | [] [] [] [] | + gpe-edit | [] [] [] | + gpe-filemanager | [] [] [] [] | + gpe-go | [] [] [] [] [] | + gpe-login | [] [] [] | + gpe-ownerinfo | [] [] [] [] [] | + gpe-package | [] [] [] | + gpe-sketchbook | [] [] [] [] | + gpe-su | [] [] [] [] [] [] | + gpe-taskmanager | [] [] [] [] [] | + gpe-timesheet | [] [] [] [] [] | + gpe-today | [] [] [] [] [] [] [] | + gpe-todo | [] [] [] | + gphoto2 | [] [] [] [] [] [] | + gprof | [] [] [] [] | + gpsdrive | [] [] [] | + gramadoir | [] [] [] | + grep | [] [] | + grub | [] [] [] [] | + gsasl | [] [] [] [] [] | + gss | [] [] [] [] [] | + gst-plugins-bad | [] [] [] [] [] [] | + gst-plugins-base | [] [] [] [] [] [] | + gst-plugins-good | [] [] [] [] [] [] | + gst-plugins-ugly | [] [] [] [] [] [] | + gstreamer | [] [] [] [] [] | + gtick | [] [] [] [] [] | + gtkam | [] [] [] [] [] | + gtkorphan | [] [] [] | + gtkspell | [] [] [] [] [] [] [] [] [] | + gutenprint | [] [] [] [] | + hello | [] [] [] | + help2man | [] [] | + hylafax | [] | + idutils | [] [] [] [] [] [] | + indent | [] [] [] [] [] [] [] [] | + iso_15924 | [] () [] [] | + iso_3166 | [] () [] [] [] [] [] [] [] [] [] [] | + iso_3166_2 | () [] [] [] | + iso_4217 | [] () [] [] [] [] | + iso_639 | [] () [] [] [] [] [] [] [] | + iso_639_3 | () [] [] | + jwhois | [] [] [] [] [] | + kbd | [] [] | + keytouch | [] [] [] [] [] [] | + keytouch-editor | [] [] [] [] [] | + keytouch-keyboa... | [] [] [] [] [] | + klavaro | [] [] | + latrine | [] [] [] | + ld | [] [] [] [] | + leafpad | [] [] [] [] [] [] [] () | + libc | [] [] [] [] [] | + libexif | [] | + libextractor | | + libgnutls | [] [] | + libgpewidget | [] [] [] [] | + libgpg-error | [] [] | + libgphoto2 | [] [] [] | + libgphoto2_port | [] [] [] | + libgsasl | [] [] [] [] [] | + libiconv | [] [] [] [] [] [] | + libidn | [] [] [] [] | + lifelines | () | + liferea | [] [] [] [] | + lilypond | [] [] | + linkdr | [] [] [] [] [] | + lordsawar | | + lprng | [] | + lynx | [] [] [] [] [] | + m4 | [] [] [] [] [] [] | + mailfromd | | + mailutils | [] [] | + make | [] [] [] [] [] [] [] [] [] | + man-db | [] [] | + man-db-manpages | [] | + minicom | [] [] [] [] [] | + mkisofs | [] [] [] [] | + myserver | | + nano | [] [] [] [] [] [] | + opcodes | [] [] [] [] | + parted | [] [] [] [] | + pies | | + popt | [] [] [] [] [] [] [] [] [] | + psmisc | [] [] [] | + pspp | | + pwdutils | [] [] | + radius | [] [] | + recode | [] [] [] [] [] [] [] [] | + rosegarden | () () () () () | + rpm | [] [] | + rush | | + sarg | [] | + screem | [] [] | + scrollkeeper | [] [] [] [] | + sed | [] [] [] [] [] [] [] [] | + sharutils | [] [] [] [] [] [] [] | + shishi | [] | + skencil | [] | + solfege | [] [] [] [] | + solfege-manual | [] [] | + soundtracker | [] [] | + sp | [] () | + sysstat | [] [] [] [] [] | + tar | [] [] [] [] [] [] [] | + texinfo | [] [] [] [] | + tin | [] | + unicode-han-tra... | | + unicode-transla... | [] [] | + util-linux-ng | [] [] [] [] [] [] | + vice | () () () | + vmm | [] | + vorbis-tools | [] | + wastesedge | () () | + wdiff | [] | + wget | [] [] [] [] [] [] [] [] | + wyslij-po | [] [] [] | + xchat | [] [] [] [] [] [] [] [] [] | + xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] [] [] [] | + xkeyboard-config | [] [] [] [] [] | + +----------------------------------------------------+ + fi fr ga gl gu he hi hr hu hy id is it ja ka kn + 105 121 53 20 4 8 3 5 53 2 120 5 84 67 0 4 + + ko ku ky lg lt lv mk ml mn mr ms mt nb nds ne + +-----------------------------------------------+ + a2ps | [] | + aegis | | + ant-phone | | + anubis | [] [] | + aspell | [] | + bash | | + bfd | | + bibshelf | [] [] | + binutils | | + bison | [] | + bison-runtime | [] [] [] [] [] | + bluez-pin | [] [] [] [] [] | + bombono-dvd | | + buzztard | | + cflow | | + clisp | | + coreutils | [] | + cpio | | + cppi | | + cpplib | | + cryptsetup | | + dfarc | [] | + dialog | [] [] [] [] [] | + dico | | + diffutils | [] [] | + dink | | + doodle | | + e2fsprogs | | + enscript | | + exif | [] | + fetchmail | | + findutils | | + flex | | + freedink | [] | + gas | | + gawk | | + gcal | | + gcc | | + gettext-examples | [] [] [] [] | + gettext-runtime | [] | + gettext-tools | [] | + gip | [] [] | + gjay | | + gliv | | + glunarclock | [] | + gnubiff | | + gnucash | () () () () | + gnuedu | | + gnulib | | + gnunet | | + gnunet-gtk | | + gnutls | [] | + gold | | + gpe-aerial | [] | + gpe-beam | [] | + gpe-bluetooth | [] [] | + gpe-calendar | [] | + gpe-clock | [] [] [] [] [] | + gpe-conf | [] [] | + gpe-contacts | [] [] | + gpe-edit | [] | + gpe-filemanager | [] [] | + gpe-go | [] [] [] | + gpe-login | [] | + gpe-ownerinfo | [] [] | + gpe-package | [] [] | + gpe-sketchbook | [] [] | + gpe-su | [] [] [] [] [] [] | + gpe-taskmanager | [] [] [] [] [] [] | + gpe-timesheet | [] [] | + gpe-today | [] [] [] [] | + gpe-todo | [] [] | + gphoto2 | | + gprof | [] | + gpsdrive | | + gramadoir | | + grep | | + grub | | + gsasl | | + gss | | + gst-plugins-bad | [] [] [] [] | + gst-plugins-base | [] [] | + gst-plugins-good | [] [] | + gst-plugins-ugly | [] [] [] [] [] | + gstreamer | | + gtick | | + gtkam | [] | + gtkorphan | [] [] | + gtkspell | [] [] [] [] [] [] [] | + gutenprint | | + hello | [] [] [] | + help2man | | + hylafax | | + idutils | | + indent | | + iso_15924 | [] [] | + iso_3166 | [] [] () [] [] [] [] [] | + iso_3166_2 | | + iso_4217 | [] [] | + iso_639 | [] [] | + iso_639_3 | [] | + jwhois | [] | + kbd | | + keytouch | [] | + keytouch-editor | [] | + keytouch-keyboa... | [] | + klavaro | [] | + latrine | [] | + ld | | + leafpad | [] [] [] | + libc | [] | + libexif | | + libextractor | | + libgnutls | [] | + libgpewidget | [] [] | + libgpg-error | | + libgphoto2 | | + libgphoto2_port | | + libgsasl | | + libiconv | | + libidn | | + lifelines | | + liferea | | + lilypond | | + linkdr | | + lordsawar | | + lprng | | + lynx | | + m4 | | + mailfromd | | + mailutils | | + make | [] | + man-db | | + man-db-manpages | | + minicom | [] | + mkisofs | | + myserver | | + nano | [] [] | + opcodes | | + parted | | + pies | | + popt | [] [] [] | + psmisc | | + pspp | | + pwdutils | | + radius | | + recode | | + rosegarden | | + rpm | | + rush | | + sarg | | + screem | | + scrollkeeper | [] [] | + sed | | + sharutils | | + shishi | | + skencil | | + solfege | [] | + solfege-manual | | + soundtracker | | + sp | | + sysstat | [] | + tar | [] | + texinfo | [] | + tin | | + unicode-han-tra... | | + unicode-transla... | | + util-linux-ng | | + vice | | + vmm | | + vorbis-tools | | + wastesedge | | + wdiff | | + wget | [] | + wyslij-po | | + xchat | [] [] [] | + xdg-user-dirs | [] [] [] [] [] [] [] [] | + xkeyboard-config | [] [] [] | + +-----------------------------------------------+ + ko ku ky lg lt lv mk ml mn mr ms mt nb nds ne + 20 5 10 1 13 48 4 2 2 4 24 10 20 3 1 + + nl nn or pa pl ps pt pt_BR ro ru rw sk sl sq sr + +---------------------------------------------------+ + a2ps | [] [] [] [] [] [] [] [] | + aegis | [] [] [] | + ant-phone | [] [] | + anubis | [] [] [] | + aspell | [] [] [] [] [] | + bash | [] [] | + bfd | [] | + bibshelf | [] [] | + binutils | [] [] | + bison | [] [] [] | + bison-runtime | [] [] [] [] [] [] [] | + bluez-pin | [] [] [] [] [] [] [] [] | + bombono-dvd | [] () | + buzztard | [] [] | + cflow | [] | + clisp | [] [] | + coreutils | [] [] [] [] [] [] | + cpio | [] [] [] | + cppi | [] | + cpplib | [] | + cryptsetup | [] | + dfarc | [] | + dialog | [] [] [] [] | + dico | [] | + diffutils | [] [] [] [] [] [] | + dink | () | + doodle | [] [] | + e2fsprogs | [] [] | + enscript | [] [] [] [] [] | + exif | [] [] [] () [] | + fetchmail | [] [] [] [] | + findutils | [] [] [] [] [] | + flex | [] [] [] [] [] | + freedink | [] [] | + gas | | + gawk | [] [] [] [] | + gcal | | + gcc | [] | + gettext-examples | [] [] [] [] [] [] [] [] | + gettext-runtime | [] [] [] [] [] [] [] [] [] | + gettext-tools | [] [] [] [] [] [] | + gip | [] [] [] [] [] | + gjay | | + gliv | [] [] [] [] [] [] | + glunarclock | [] [] [] [] [] | + gnubiff | [] () | + gnucash | [] () () () | + gnuedu | [] | + gnulib | [] [] [] [] | + gnunet | | + gnunet-gtk | | + gnutls | [] [] | + gold | | + gpe-aerial | [] [] [] [] [] [] [] | + gpe-beam | [] [] [] [] [] [] [] | + gpe-bluetooth | [] [] | + gpe-calendar | [] [] [] [] | + gpe-clock | [] [] [] [] [] [] [] [] | + gpe-conf | [] [] [] [] [] [] [] | + gpe-contacts | [] [] [] [] [] | + gpe-edit | [] [] [] | + gpe-filemanager | [] [] [] | + gpe-go | [] [] [] [] [] [] [] [] | + gpe-login | [] [] | + gpe-ownerinfo | [] [] [] [] [] [] [] [] | + gpe-package | [] [] | + gpe-sketchbook | [] [] [] [] [] [] [] | + gpe-su | [] [] [] [] [] [] [] [] | + gpe-taskmanager | [] [] [] [] [] [] [] [] | + gpe-timesheet | [] [] [] [] [] [] [] [] | + gpe-today | [] [] [] [] [] [] [] [] | + gpe-todo | [] [] [] [] [] | + gphoto2 | [] [] [] [] [] [] [] [] | + gprof | [] [] [] | + gpsdrive | [] [] | + gramadoir | [] [] | + grep | [] [] [] [] | + grub | [] [] [] | + gsasl | [] [] [] [] | + gss | [] [] [] | + gst-plugins-bad | [] [] [] [] [] [] | + gst-plugins-base | [] [] [] [] [] | + gst-plugins-good | [] [] [] [] [] | + gst-plugins-ugly | [] [] [] [] [] [] | + gstreamer | [] [] [] [] [] | + gtick | [] [] [] | + gtkam | [] [] [] [] [] [] | + gtkorphan | [] | + gtkspell | [] [] [] [] [] [] [] [] [] [] | + gutenprint | [] [] | + hello | [] [] [] [] | + help2man | [] [] | + hylafax | [] | + idutils | [] [] [] [] [] | + indent | [] [] [] [] [] [] [] | + iso_15924 | [] [] [] [] | + iso_3166 | [] [] [] [] [] () [] [] [] [] [] [] [] [] | + iso_3166_2 | [] [] [] | + iso_4217 | [] [] [] [] [] [] [] [] | + iso_639 | [] [] [] [] [] [] [] [] [] | + iso_639_3 | [] [] | + jwhois | [] [] [] [] | + kbd | [] [] [] | + keytouch | [] [] [] | + keytouch-editor | [] [] [] | + keytouch-keyboa... | [] [] [] | + klavaro | [] [] | + latrine | [] [] | + ld | | + leafpad | [] [] [] [] [] [] [] [] [] | + libc | [] [] [] [] | + libexif | [] [] () [] | + libextractor | | + libgnutls | [] [] | + libgpewidget | [] [] [] | + libgpg-error | [] [] | + libgphoto2 | [] [] | + libgphoto2_port | [] [] [] [] [] | + libgsasl | [] [] [] [] [] | + libiconv | [] [] [] [] [] | + libidn | [] [] | + lifelines | [] [] | + liferea | [] [] [] [] [] () () [] | + lilypond | [] | + linkdr | [] [] [] | + lordsawar | | + lprng | [] | + lynx | [] [] [] | + m4 | [] [] [] [] [] | + mailfromd | [] | + mailutils | [] | + make | [] [] [] [] | + man-db | [] [] [] | + man-db-manpages | [] [] [] | + minicom | [] [] [] [] | + mkisofs | [] [] [] | + myserver | | + nano | [] [] [] [] | + opcodes | [] [] | + parted | [] [] [] [] | + pies | [] | + popt | [] [] [] [] | + psmisc | [] [] [] | + pspp | [] [] | + pwdutils | [] | + radius | [] [] [] | + recode | [] [] [] [] [] [] [] [] | + rosegarden | () () | + rpm | [] [] [] | + rush | [] [] | + sarg | | + screem | | + scrollkeeper | [] [] [] [] [] [] [] [] | + sed | [] [] [] [] [] [] [] [] [] | + sharutils | [] [] [] [] | + shishi | [] | + skencil | [] [] | + solfege | [] [] [] [] | + solfege-manual | [] [] [] | + soundtracker | [] | + sp | | + sysstat | [] [] [] [] | + tar | [] [] [] [] | + texinfo | [] [] [] [] | + tin | [] | + unicode-han-tra... | | + unicode-transla... | | + util-linux-ng | [] [] [] [] [] | + vice | [] | + vmm | [] | + vorbis-tools | [] [] | + wastesedge | [] | + wdiff | [] [] | + wget | [] [] [] [] [] [] [] | + wyslij-po | [] [] [] | + xchat | [] [] [] [] [] [] [] [] [] | + xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] [] [] [] [] | + xkeyboard-config | [] [] [] | + +---------------------------------------------------+ + nl nn or pa pl ps pt pt_BR ro ru rw sk sl sq sr + 135 10 4 7 105 1 29 62 47 91 3 54 46 9 37 + + sv sw ta te tg th tr uk vi wa zh_CN zh_HK zh_TW + +---------------------------------------------------+ + a2ps | [] [] [] [] [] | 27 + aegis | [] | 9 + ant-phone | [] [] [] [] | 9 + anubis | [] [] [] [] | 15 + aspell | [] [] [] | 20 + bash | [] [] [] | 12 + bfd | [] | 6 + bibshelf | [] [] [] | 16 + binutils | [] [] | 8 + bison | [] [] | 12 + bison-runtime | [] [] [] [] [] [] | 29 + bluez-pin | [] [] [] [] [] [] [] [] | 37 + bombono-dvd | [] | 4 + buzztard | [] | 7 + cflow | [] [] [] | 9 + clisp | | 10 + coreutils | [] [] [] [] | 22 + cpio | [] [] [] [] [] [] | 13 + cppi | [] [] | 5 + cpplib | [] [] [] [] [] [] | 14 + cryptsetup | [] [] | 7 + dfarc | [] | 9 + dialog | [] [] [] [] [] [] [] | 30 + dico | [] | 2 + diffutils | [] [] [] [] [] [] | 30 + dink | | 4 + doodle | [] [] | 7 + e2fsprogs | [] [] [] | 11 + enscript | [] [] [] [] | 17 + exif | [] [] [] | 16 + fetchmail | [] [] [] | 17 + findutils | [] [] [] [] [] | 20 + flex | [] [] [] [] | 15 + freedink | [] | 10 + gas | [] | 4 + gawk | [] [] [] [] | 18 + gcal | [] [] | 5 + gcc | [] [] [] | 7 + gettext-examples | [] [] [] [] [] [] [] | 34 + gettext-runtime | [] [] [] [] [] [] [] | 29 + gettext-tools | [] [] [] [] [] [] | 22 + gip | [] [] [] [] | 22 + gjay | [] | 3 + gliv | [] [] [] | 14 + glunarclock | [] [] [] [] [] | 19 + gnubiff | [] [] | 4 + gnucash | () [] () [] () | 10 + gnuedu | [] [] | 7 + gnulib | [] [] [] [] | 16 + gnunet | [] | 1 + gnunet-gtk | [] [] [] | 5 + gnutls | [] [] [] | 10 + gold | [] | 4 + gpe-aerial | [] [] [] | 18 + gpe-beam | [] [] [] | 19 + gpe-bluetooth | [] [] [] | 13 + gpe-calendar | [] [] [] [] | 12 + gpe-clock | [] [] [] [] [] | 28 + gpe-conf | [] [] [] [] | 20 + gpe-contacts | [] [] [] | 17 + gpe-edit | [] [] [] | 12 + gpe-filemanager | [] [] [] [] | 16 + gpe-go | [] [] [] [] [] | 25 + gpe-login | [] [] [] | 11 + gpe-ownerinfo | [] [] [] [] [] | 25 + gpe-package | [] [] [] | 13 + gpe-sketchbook | [] [] [] | 20 + gpe-su | [] [] [] [] [] | 30 + gpe-taskmanager | [] [] [] [] [] | 29 + gpe-timesheet | [] [] [] [] [] | 25 + gpe-today | [] [] [] [] [] [] | 30 + gpe-todo | [] [] [] [] | 17 + gphoto2 | [] [] [] [] [] | 24 + gprof | [] [] [] | 15 + gpsdrive | [] [] [] | 11 + gramadoir | [] [] [] | 11 + grep | [] [] [] | 10 + grub | [] [] [] | 14 + gsasl | [] [] [] [] | 14 + gss | [] [] [] | 11 + gst-plugins-bad | [] [] [] [] | 26 + gst-plugins-base | [] [] [] [] [] | 24 + gst-plugins-good | [] [] [] [] | 24 + gst-plugins-ugly | [] [] [] [] [] | 29 + gstreamer | [] [] [] [] | 22 + gtick | [] [] [] | 13 + gtkam | [] [] [] | 20 + gtkorphan | [] [] [] | 14 + gtkspell | [] [] [] [] [] [] [] [] [] | 45 + gutenprint | [] | 10 + hello | [] [] [] [] [] [] | 21 + help2man | [] [] | 7 + hylafax | [] | 5 + idutils | [] [] [] [] | 17 + indent | [] [] [] [] [] [] | 30 + iso_15924 | () [] () [] [] | 16 + iso_3166 | [] [] () [] [] () [] [] [] () | 53 + iso_3166_2 | () [] () [] | 9 + iso_4217 | [] () [] [] () [] [] | 26 + iso_639 | [] [] [] () [] () [] [] [] [] | 38 + iso_639_3 | [] () | 8 + jwhois | [] [] [] [] [] | 16 + kbd | [] [] [] [] [] | 15 + keytouch | [] [] [] | 16 + keytouch-editor | [] [] [] | 14 + keytouch-keyboa... | [] [] [] | 14 + klavaro | [] | 11 + latrine | [] [] [] | 10 + ld | [] [] [] [] | 11 + leafpad | [] [] [] [] [] [] | 33 + libc | [] [] [] [] [] | 21 + libexif | [] () | 7 + libextractor | [] | 1 + libgnutls | [] [] [] | 9 + libgpewidget | [] [] [] | 14 + libgpg-error | [] [] [] | 9 + libgphoto2 | [] [] | 8 + libgphoto2_port | [] [] [] [] | 14 + libgsasl | [] [] [] | 13 + libiconv | [] [] [] [] | 21 + libidn | () [] [] | 11 + lifelines | [] | 4 + liferea | [] [] [] | 21 + lilypond | [] | 7 + linkdr | [] [] [] [] [] | 17 + lordsawar | | 1 + lprng | [] | 3 + lynx | [] [] [] [] | 17 + m4 | [] [] [] [] | 19 + mailfromd | [] [] | 3 + mailutils | [] | 5 + make | [] [] [] [] | 21 + man-db | [] [] [] | 8 + man-db-manpages | | 4 + minicom | [] [] | 16 + mkisofs | [] [] | 9 + myserver | | 0 + nano | [] [] [] [] | 21 + opcodes | [] [] [] | 11 + parted | [] [] [] [] [] | 15 + pies | [] [] | 3 + popt | [] [] [] [] [] [] | 27 + psmisc | [] [] | 11 + pspp | | 4 + pwdutils | [] [] | 6 + radius | [] [] | 9 + recode | [] [] [] [] | 28 + rosegarden | () | 0 + rpm | [] [] [] | 11 + rush | [] [] | 4 + sarg | | 1 + screem | [] | 3 + scrollkeeper | [] [] [] [] [] | 27 + sed | [] [] [] [] [] | 30 + sharutils | [] [] [] [] [] | 22 + shishi | [] | 3 + skencil | [] [] | 7 + solfege | [] [] [] [] | 16 + solfege-manual | [] | 8 + soundtracker | [] [] [] | 9 + sp | [] | 3 + sysstat | [] [] | 15 + tar | [] [] [] [] [] [] | 23 + texinfo | [] [] [] [] [] | 17 + tin | | 4 + unicode-han-tra... | | 0 + unicode-transla... | | 2 + util-linux-ng | [] [] [] [] | 20 + vice | () () | 1 + vmm | [] | 4 + vorbis-tools | [] | 6 + wastesedge | | 2 + wdiff | [] [] | 7 + wget | [] [] [] [] [] | 26 + wyslij-po | [] [] | 8 + xchat | [] [] [] [] [] [] | 36 + xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] | 63 + xkeyboard-config | [] [] [] | 22 + +---------------------------------------------------+ + 85 teams sv sw ta te tg th tr uk vi wa zh_CN zh_HK zh_TW + 178 domains 119 1 3 3 0 10 65 51 155 17 98 7 41 2618 + + Some counters in the preceding matrix are higher than the number of +visible blocks let us expect. This is because a few extra PO files are +used for implementing regional variants of languages, or language +dialects. + + For a PO file in the matrix above to be effective, the package to +which it applies should also have been internationalized and +distributed as such by its maintainer. There might be an observable +lag between the mere existence a PO file and its wide availability in a +distribution. + + If June 2010 seems to be old, you may fetch a more recent copy of +this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date +matrix with full percentage details can be found at +`http://translationproject.org/extra/matrix.html'. + +1.5 Using `gettext' in new packages +=================================== + +If you are writing a freely available program and want to +internationalize it you are welcome to use GNU `gettext' in your +package. Of course you have to respect the GNU Library General Public +License which covers the use of the GNU `gettext' library. This means +in particular that even non-free programs can use `libintl' as a shared +library, whereas only free software can use `libintl' as a static +library or use modified versions of `libintl'. + + Once the sources are changed appropriately and the setup can handle +the use of `gettext' the only thing missing are the translations. The +Free Translation Project is also available for packages which are not +developed inside the GNU project. Therefore the information given above +applies also for every other Free Software Project. Contact +`coordinator@translationproject.org' to make the `.pot' files available +to the translation teams. + diff -Nru systemtap-1.4/aclocal.m4 systemtap-1.6/aclocal.m4 --- systemtap-1.4/aclocal.m4 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/aclocal.m4 2011-07-25 18:12:01.000000000 +0000 @@ -1258,3 +1258,11 @@ AC_SUBST([am__untar]) ]) # _AM_PROG_TAR +m4_include([m4/gettext.m4]) +m4_include([m4/iconv.m4]) +m4_include([m4/lib-ld.m4]) +m4_include([m4/lib-link.m4]) +m4_include([m4/lib-prefix.m4]) +m4_include([m4/nls.m4]) +m4_include([m4/po.m4]) +m4_include([m4/progtest.m4]) diff -Nru systemtap-1.4/AUTHORS systemtap-1.6/AUTHORS --- systemtap-1.4/AUTHORS 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/AUTHORS 2011-07-25 18:12:01.000000000 +0000 @@ -1,13 +1,18 @@ Adrien Kunysz +Alfred Landrum Ananth N Mavinakayanahalli Andre Detsch Anil Keshavamurthy Anithra Janakiraman Anton Vorontsov +Atsushi Tsuji Breno Leitao +Bryn Reeves Charles Spirakis Charley Wang +Chris Meek Dan Horak +Daniel Migault Dave Brolley Dave Nomura David J. Wilder @@ -17,11 +22,13 @@ Erick Tryzelaar Eugene Teo Eugeniy Meshcheryakov +Fabio Olive Leite Frank Ch. Eigler Grant Edwards Graydon Hoare Hien Nguyen James Bottomley +Jan Kratochvil Jeff Moyer Jim Keniston JoeLynn Keniston @@ -32,6 +39,7 @@ Keiichi KII Kent Sebastian Kevin Stafford +Kim van der Riet Kiran Prakesh Lars R. Damerow Li Guanglei @@ -40,6 +48,7 @@ Mahesh J Salgaonkar Malte Nuhn Maran Pakkirisamy +Marc Milgram Mark McLoughlin Mark Wielaard Martin Hunt @@ -47,6 +56,7 @@ Maynard Johnson Michael Meeks Mike Mason +Nathan Scott Nobuhiro Tachino Petr Muller Phil Muldoon @@ -74,4 +84,5 @@ Varun Chandramohan Wenji Huang William Cohen +Yoshihide Sonoda Zhaolei diff -Nru systemtap-1.4/buildrun.cxx systemtap-1.6/buildrun.cxx --- systemtap-1.4/buildrun.cxx 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/buildrun.cxx 2011-07-25 18:12:01.000000000 +0000 @@ -1,5 +1,5 @@ // build/run probes -// Copyright (C) 2005-2010 Red Hat Inc. +// Copyright (C) 2005-2011 Red Hat Inc. // // This file is part of systemtap, and is free software. You can // redistribute it and/or modify it under the terms of the GNU General @@ -10,6 +10,7 @@ #include "buildrun.h" #include "session.h" #include "util.h" +#include "hash.h" #include #include @@ -30,11 +31,10 @@ using namespace std; -static int uprobes_pass (systemtap_session& s); - /* Adjust and run make_cmd to build a kernel module. */ static int -run_make_cmd(systemtap_session& s, string& make_cmd) +run_make_cmd(systemtap_session& s, vector& make_cmd, + bool null_out=false, bool null_err=false) { // Before running make, fix up the environment a bit. PATH should // already be overridden. Clean out a few variables that @@ -46,6 +46,7 @@ { const char* e = strerror (errno); cerr << "unsetenv failed: " << e << endl; + s.set_try_server (); } // Disable ccache to avoid saving files that will never be reused. @@ -55,11 +56,14 @@ (void) setenv("CCACHE_DISABLE", "1", 0); if (s.verbose > 2) - make_cmd += " V=1"; + make_cmd.push_back("V=1"); else if (s.verbose > 1) - make_cmd += " --no-print-directory"; + make_cmd.push_back("--no-print-directory"); else - make_cmd += " -s --no-print-directory"; + { + make_cmd.push_back("-s"); + make_cmd.push_back("--no-print-directory"); + } // NB: there appears to be no parallelism opportunity in the // module-building makefiles, so while the following works, it @@ -67,7 +71,7 @@ #if 0 long smp = sysconf(_SC_NPROCESSORS_ONLN); if (smp > 1) - make_cmd += " -j " + lex_cast(smp); + make_cmd.push_back("-j" + lex_cast(smp)); #endif if (strverscmp (s.kernel_base_release.c_str(), "2.6.29") < 0) @@ -75,10 +79,34 @@ // Older kernels, before linux commit #fd54f502841c1, include // gratuitous "echo"s in their Makefile. We need to suppress // that with this bluntness. - make_cmd += " >/dev/null"; + null_out = true; } - return stap_system (s.verbose, make_cmd); + rc = stap_system (s.verbose, make_cmd, null_out, null_err); + if (rc != 0) + s.set_try_server (); + return rc; +} + +static vector +make_make_cmd(systemtap_session& s, const string& dir) +{ + vector make_cmd; + make_cmd.push_back("make"); + make_cmd.push_back("-C"); + make_cmd.push_back(s.kernel_build_tree); + make_cmd.push_back("M=" + dir); // need make-quoting? + make_cmd.push_back("modules"); + + // Add architecture, except for old powerpc (RHBZ669082) + if (s.architecture != "powerpc" || + (strverscmp (s.kernel_base_release.c_str(), "2.6.15") >= 0)) + make_cmd.push_back("ARCH=" + s.architecture); // need make-quoting? + + // Add any custom kbuild flags + make_cmd.insert(make_cmd.end(), s.kbuildflags.begin(), s.kbuildflags.end()); + + return make_cmd; } static void @@ -117,7 +145,10 @@ { int rc = uprobes_pass (s); if (rc) - return rc; + { + s.set_try_server (); + return rc; + } // fill in a quick Makefile string makefile_nm = s.tmpdir + "/Makefile"; @@ -204,14 +235,18 @@ output_autoconf(s, o, "autoconf-ring_buffer-flags.c", "STAPCONF_RING_BUFFER_FLAGS", NULL); output_autoconf(s, o, "autoconf-kallsyms-on-each-symbol.c", "STAPCONF_KALLSYMS_ON_EACH_SYMBOL", NULL); output_autoconf(s, o, "autoconf-walk-stack.c", "STAPCONF_WALK_STACK", NULL); + output_autoconf(s, o, "autoconf-stacktrace_ops-warning.c", + "STAPCONF_STACKTRACE_OPS_WARNING", NULL); output_autoconf(s, o, "autoconf-mm-context-vdso.c", "STAPCONF_MM_CONTEXT_VDSO", NULL); output_autoconf(s, o, "autoconf-blk-types.c", "STAPCONF_BLK_TYPES", NULL); output_autoconf(s, o, "autoconf-perf-structpid.c", "STAPCONF_PERF_STRUCTPID", NULL); + output_autoconf(s, o, "autoconf-kern-path-parent.c", + "STAPCONF_KERN_PATH_PARENT", NULL); o << module_cflags << " += -include $(STAPCONF_HEADER)" << endl; for (unsigned i=0; i 3) o << "EXTRA_CFLAGS += -ftime-report -Q" << endl; @@ -258,217 +293,218 @@ rc = stat(module_dir_makefile.c_str(), &st); if (rc != 0) { - clog << "Checking \"" << module_dir_makefile << "\" failed: " << strerror(errno) << endl - << "Ensure kernel development headers & makefiles are installed." << endl; + clog << _F("Checking \" %s \" failed with error: %s\nEnsure kernel development headers & makefiles are installed.", + module_dir_makefile.c_str(), strerror(errno)) << endl; + s.set_try_server (); return rc; } // Run make - string make_cmd = string("make") - + string (" -C \"") + module_dir + string("\""); // XXX: lex_cast_qstring? - make_cmd += string(" M=\"") + s.tmpdir + string("\""); - - // Add architecture - make_cmd += string(" ARCH=") + lex_cast_qstring(s.architecture); - - // Add any custom kbuild flags - for (unsigned k=0; k make_cmd = make_make_cmd(s, s.tmpdir); rc = run_make_cmd(s, make_cmd); - + if (rc) + s.set_try_server (); return rc; } /* * If uprobes was built as part of the kernel build (either built-in - * or as a module), the uprobes exports should show up in either - * s.kernel_build_tree / Module.symvers. Return true if so. + * or as a module), the uprobes exports should show up. This is to be + * as distinct from the stap-built uprobes.ko from the runtime. */ static bool kernel_built_uprobes (systemtap_session& s) { - string grep_cmd = string ("/bin/grep -q unregister_uprobe ") + - s.kernel_build_tree + string ("/Module.symvers"); - - return (stap_system (s.verbose, grep_cmd) == 0); + return (s.kernel_exports.find("unregister_uprobe") != s.kernel_exports.end()); } -/* - * We only want root, the owner of the uprobes build directory - * and members of the group owning the uprobes build directory - * modifying uprobes. - */ -static bool -may_build_uprobes (const systemtap_session& s) -{ - // root may build uprobes. - uid_t euid = geteuid (); - if (euid == 0) - return true; - - // Get information on the build directory. - string uprobes_home = s.runtime_path + "/uprobes"; - struct stat file_info; - if (stat(uprobes_home.c_str(), &file_info) != 0) { - clog << "Unable to obtain information on " << uprobes_home << '.' << endl; - return false; - } - - // The owner of the build directory may build uprobes. - if (euid == file_info.st_uid) - return true; - - // Members of the group owner of the build directory may build uprobes. - if (in_group_id (file_info.st_gid)) - return true; - - return false; -} - -/* - * Use "make -q" with a fake target to - * verify that uprobes doesn't need to be rebuilt. - */ -static bool -verify_uprobes_uptodate (systemtap_session& s) +static int +make_uprobes (systemtap_session& s) { if (s.verbose > 1) - clog << "Pass 4, preamble: " - << "verifying that SystemTap's version of uprobes is up to date." + clog << _("Pass 4, preamble: (re)building SystemTap's version of uprobes.") << endl; - string uprobes_home = s.runtime_path + "/uprobes"; - string make_cmd = string("make -q -C ") + uprobes_home - + string(" uprobes.ko"); - int rc = run_make_cmd(s, make_cmd); - if (rc) { - clog << "SystemTap's version of uprobes is out of date." << endl; - - struct stat file_info; - if (stat(uprobes_home.c_str(), &file_info) != 0) { - clog << "Unable to obtain information on " << uprobes_home << '.' << endl; - } - else { - struct passwd *owner = getpwuid (file_info.st_uid); - string owner_name = owner == NULL ? "The owner of " + uprobes_home : - owner->pw_name; - if (owner_name == "root") - owner_name = ""; - struct group *owner_group = getgrgid (file_info.st_gid); - string owner_group_name = owner_group == NULL ? "The owner group of " + uprobes_home : - owner_group->gr_name; - clog << "As root, " << owner_name << (owner_name.empty () ? "" : ", ") - << "or a member of the '" << owner_group_name << "' group, run" << endl; - clog << "\"make -C " << uprobes_home << "\"." << endl; + // create a subdirectory for the uprobes module + string dir(s.tmpdir + "/uprobes"); + if (create_dir(dir.c_str()) != 0) + { + if (! s.suppress_warnings) + cerr << _("Warning: failed to create directory for build uprobes.") << endl; + s.set_try_server (); + return 1; } - } - return rc; -} + // create a simple Makefile + string makefile(dir + "/Makefile"); + ofstream omf(makefile.c_str()); + omf << "obj-m := uprobes.o" << endl; + // RHBZ 655231: later rhel6 kernels' module-signing kbuild logic breaks out-of-tree modules + omf << "CONFIG_MODULE_SIG := n" << endl; + omf.close(); -static int -make_uprobes (systemtap_session& s) -{ - if (s.verbose > 1) - clog << "Pass 4, preamble: " - << "(re)building SystemTap's version of uprobes." - << endl; + // create a simple #include-chained source file + string runtimesourcefile(s.runtime_path + "/uprobes/uprobes.c"); + string sourcefile(dir + "/uprobes.c"); + ofstream osrc(sourcefile.c_str()); + osrc << "#include \"" << runtimesourcefile << "\"" << endl; + osrc.close(); - string uprobes_home = s.runtime_path + "/uprobes"; - string make_cmd = string("make -C ") + uprobes_home; - int rc = run_make_cmd(s, make_cmd); - if (s.verbose > 1) - clog << "uprobes rebuild rc=" << rc << endl; + // make the module + vector make_cmd = make_make_cmd(s, dir); + bool quiet = (s.verbose < 4); + int rc = run_make_cmd(s, make_cmd, quiet, quiet); + if (!rc && !copy_file(dir + "/Module.symvers", + s.tmpdir + "/Module.symvers")) + rc = -1; + if (s.verbose > 1) + clog << _("uprobes rebuild exit code: ") << rc << endl; + if (rc) + s.set_try_server (); + else + s.uprobes_path = dir + "/uprobes.ko"; return rc; } -/* - * Copy uprobes' exports (in Module.symvers) into the temporary directory - * so the script-module build can find them. - */ -static int -copy_uprobes_symbols (const systemtap_session& s) +static bool +get_cached_uprobes(systemtap_session& s) { - string uprobes_home = s.runtime_path + "/uprobes"; - string cp_cmd = string("/bin/cp ") + uprobes_home + - string("/Module.symvers ") + s.tmpdir; + s.uprobes_hash = s.use_cache ? find_uprobes_hash(s) : ""; + if (!s.uprobes_hash.empty()) + { + // NB: We always put uprobes.ko in its own directory, especially so + // stap-serverd can more easily locate it. + string dir(s.tmpdir + "/uprobes"); + if (create_dir(dir.c_str()) != 0) + return false; + + string cacheko = s.uprobes_hash + ".ko"; + string tmpko = dir + "/uprobes.ko"; + + // The symvers file still needs to go in the script module's directory. + string cachesyms = s.uprobes_hash + ".symvers"; + string tmpsyms = s.tmpdir + "/Module.symvers"; + + if (get_file_size(cacheko) > 0 && copy_file(cacheko, tmpko) && + get_file_size(cachesyms) > 0 && copy_file(cachesyms, tmpsyms)) + { + s.uprobes_path = tmpko; + return true; + } + } + return false; +} - return stap_system (s.verbose, cp_cmd); +static void +set_cached_uprobes(systemtap_session& s) +{ + if (s.use_cache && !s.uprobes_hash.empty()) + { + string cacheko = s.uprobes_hash + ".ko"; + string tmpko = s.tmpdir + "/uprobes/uprobes.ko"; + copy_file(tmpko, cacheko); + + string cachesyms = s.uprobes_hash + ".symvers"; + string tmpsyms = s.tmpdir + "/uprobes/Module.symvers"; + copy_file(tmpsyms, cachesyms); + } } -static int +int uprobes_pass (systemtap_session& s) { if (!s.need_uprobes || kernel_built_uprobes(s)) return 0; if (s.kernel_config["CONFIG_UTRACE"] != string("y")) { - clog << "user-space facilities not available without kernel CONFIG_UTRACE" << endl; + clog << _("user-space facilities not available without kernel CONFIG_UTRACE") << endl; + s.set_try_server (); return 1; } /* - * We need to use the version of uprobes that comes with SystemTap, so - * we may need to rebuild uprobes.ko there. Unfortunately, this is - * never a no-op; e.g., the modpost step gets run every time. Only - * certain users can build uprobes, so we keep the uprobes directory - * writable only by those users. But that means that other users - * can't run the make even if everything's up to date. - * - * So for the other users, we just verify that uprobes doesn't need - * to be rebuilt. If that's not so, stap must fail. + * We need to use the version of uprobes that comes with SystemTap. Try to + * get it from the cache first. If not found, build it and try to save it to + * the cache for future reuse. */ - int rc; - if (may_build_uprobes (s)) - rc = make_uprobes(s); - else - rc = verify_uprobes_uptodate(s); - if (rc == 0) - rc = copy_uprobes_symbols(s); + int rc = 0; + if (!get_cached_uprobes(s)) + { + rc = make_uprobes(s); + if (!rc) + set_cached_uprobes(s); + } + if (rc) + s.set_try_server (); return rc; } -string -make_run_command (systemtap_session& s, const string& module) +vector +make_run_command (systemtap_session& s, const string& module, + const string& version) { // for now, just spawn staprun - string staprun_cmd = string(getenv("SYSTEMTAP_STAPRUN") ?: BINDIR "/staprun") - + " " - + (s.verbose>1 ? "-v " : "") - + (s.verbose>2 ? "-v " : "") - + (s.suppress_warnings ? "-w " : "") - + (s.output_file.empty() ? "" : "-o " + s.output_file + " "); + vector staprun_cmd; + staprun_cmd.push_back(getenv("SYSTEMTAP_STAPRUN") ?: BINDIR "/staprun"); + if (s.verbose>1) + staprun_cmd.push_back("-v"); + if (s.verbose>2) + staprun_cmd.push_back("-v"); + if (s.suppress_warnings) + staprun_cmd.push_back("-w"); - if (s.cmd != "") - staprun_cmd += "-c " + cmdstr_quoted(s.cmd) + " "; + if (!s.output_file.empty()) + { + staprun_cmd.push_back("-o"); + staprun_cmd.push_back(s.output_file); + } + + if (!s.cmd.empty()) + { + staprun_cmd.push_back("-c"); + staprun_cmd.push_back(s.cmd); + } if (s.target_pid) - staprun_cmd += "-t " + lex_cast(s.target_pid) + " "; + { + staprun_cmd.push_back("-t"); + staprun_cmd.push_back(lex_cast(s.target_pid)); + } if (s.buffer_size) - staprun_cmd += "-b " + lex_cast(s.buffer_size) + " "; + { + staprun_cmd.push_back("-b"); + staprun_cmd.push_back(lex_cast(s.buffer_size)); + } if (s.need_uprobes) - staprun_cmd += "-u" + s.uprobes_path + " "; + { + staprun_cmd.push_back("-u"); + if (!s.uprobes_path.empty()) + staprun_cmd.back().append(s.uprobes_path); + } if (s.load_only) - staprun_cmd += (s.output_file.empty() ? "-L " : "-D "); + staprun_cmd.push_back(s.output_file.empty() ? "-L" : "-D"); + + if(!s.modname_given && (strverscmp("1.6", version.c_str()) <= 0)) + staprun_cmd.push_back("-R"); if (!s.size_option.empty()) - staprun_cmd += "-S " + s.size_option + " "; + { + staprun_cmd.push_back("-S"); + staprun_cmd.push_back(s.size_option); + } if (module.empty()) - staprun_cmd += s.tmpdir + "/" + s.module_name + ".ko"; + staprun_cmd.push_back(s.tmpdir + "/" + s.module_name + ".ko"); else - staprun_cmd += module; + staprun_cmd.push_back(module); // add module arguments - for (unsigned i=0; i")->... omf << "CFLAGS_" << basename << ".o :="; for (size_t i = 0; i < headers.size(); ++i) - omf << " -include " << lex_cast_qstring(headers[i]); + omf << " -include " << lex_cast_qstring(headers[i]); // XXX right quoting? omf << endl; omf << "obj-m := " + basename + ".o" << endl; @@ -602,19 +640,12 @@ osrc.close(); // make the module - string make_cmd = "make -C '" + s.kernel_build_tree + "'" - + " M='" + dir + "' modules"; - - // Add architecture - make_cmd += string(" ARCH=") + lex_cast_qstring(s.architecture); - - // Add any custom kbuild flags - for (unsigned k=0; k make_cmd = make_make_cmd(s, dir); + bool quiet = (s.verbose < 4); + int rc = run_make_cmd(s, make_cmd, quiet, quiet); + if (rc) + s.set_try_server (); + return rc; } @@ -632,13 +663,25 @@ // cwd in this case will be the cwd of stap itself though, which may be // trickier to deal with. It might be better to "cd `dirname $script`" // first... - ostringstream cmd; - cmd << "gcc -shared -g -fno-eliminate-unused-debug-types -xc /dev/null -o " << name; + vector cmd; + cmd.push_back("gcc"); + cmd.push_back("-shared"); + cmd.push_back("-g"); + cmd.push_back("-fno-eliminate-unused-debug-types"); + cmd.push_back("-xc"); + cmd.push_back("/dev/null"); + cmd.push_back("-o"); + cmd.push_back(name); for (size_t i = 0; i < headers.size(); ++i) - cmd << " -include " << lex_cast_qstring(headers[i]); - if (s.verbose < 4) - cmd << " >/dev/null 2>&1"; - return stap_system (s.verbose, cmd.str()); + { + cmd.push_back("-include"); + cmd.push_back(headers[i]); + } + bool quiet = (s.verbose < 4); + int rc = stap_system (s.verbose, cmd, quiet, quiet); + if (rc) + s.set_try_server (); + return rc; } @@ -658,8 +701,15 @@ if (end == string::npos) return -1; string header = module.substr(i, end - i); - assert_regexp_match("@cast header", header, "^[a-z0-9/_.+-]+$"); - headers.push_back(header); + vector matches; + if (regexp_match(header, "^[a-zA-Z0-9/_.+-]+$", matches)) + { + if (! s.suppress_warnings) + cerr << _F("Warning: skipping malformed @cast header \"%s\"", + header.c_str()) << endl; + } + else + headers.push_back(header); } if (headers.empty()) return -1; diff -Nru systemtap-1.4/buildrun.h systemtap-1.6/buildrun.h --- systemtap-1.4/buildrun.h 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/buildrun.h 2011-07-25 18:12:01.000000000 +0000 @@ -12,8 +12,11 @@ #include "elaborate.h" int compile_pass (systemtap_session& s); -std::string make_run_command (systemtap_session& s, - const std::string& module); +int uprobes_pass (systemtap_session& s); + +std::vector make_run_command (systemtap_session& s, + const std::string& module="", + const std::string& version=VERSION); int make_tracequery(systemtap_session& s, std::string& name, const std::vector& headers); diff -Nru systemtap-1.4/cache.cxx systemtap-1.6/cache.cxx --- systemtap-1.4/cache.cxx 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/cache.cxx 2011-07-25 18:12:01.000000000 +0000 @@ -125,7 +125,7 @@ close(fd_stapconf); if (s.verbose > 1) - clog << "Pass 4: using cached " << s.stapconf_path << endl; + clog << _("Pass 4: using cached ") << s.stapconf_path << endl; return true; } @@ -212,9 +212,9 @@ // NB: don't use s.verbose here, since we're still in pass-2, // i.e., s.verbose = s.perpass_verbose[1]. if (s.perpass_verbose[2]) - clog << "Pass 3: using cached " << c_src_path << endl; + clog << _("Pass 3: using cached ") << c_src_path << endl; if (s.perpass_verbose[3] && s.last_pass != 3) - clog << "Pass 4: using cached " << s.hash_path << endl; + clog << _("Pass 4: using cached ") << s.hash_path << endl; PROBE2(stap, cache__get, c_src_path.c_str(), s.hash_path.c_str()); @@ -246,9 +246,8 @@ cache_mb_max = SYSTEMTAP_CACHE_DEFAULT_MB; if (s.verbose > 1) - clog << "Cache limit file " << s.cache_path << "/" - << SYSTEMTAP_CACHE_MAX_FILENAME - << " missing, creating default." << endl; + clog << _F("Cache limit file %s/%s missing, creating default.", + s.cache_path.c_str(), SYSTEMTAP_CACHE_MAX_FILENAME) << endl; } //glob for all kernel modules in the cache dir @@ -347,14 +346,14 @@ { //remove trailing ", " removed_dirs = removed_dirs.substr(0, removed_dirs.length() - 2); - clog << "Cache cleaning successful, removed entries: " + clog << _("Cache cleaning successful, removed entries: ") << removed_dirs << endl; } } else { if (s.verbose > 1) - clog << "Cache cleaning skipped, no cache path." << endl; + clog << _("Cache cleaning skipped, no cache path.") << endl; } } @@ -388,8 +387,8 @@ string source_path = path + ".c"; string hash_path = path + ".log"; size = get_file_size(mod_path) - + get_file_size(modsgn_path); - + get_file_size(source_path); + + get_file_size(modsgn_path) + + get_file_size(source_path) + get_file_size(hash_path); weight = get_file_weight(mod_path); } diff -Nru systemtap-1.4/config.guess systemtap-1.6/config.guess --- systemtap-1.4/config.guess 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/config.guess 2011-07-25 18:12:01.000000000 +0000 @@ -17,9 +17,7 @@ # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. +# along with this program. If not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a diff -Nru systemtap-1.4/config.in systemtap-1.6/config.in --- systemtap-1.4/config.in 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/config.in 2011-07-25 18:12:01.000000000 +0000 @@ -3,6 +3,10 @@ /* Configuration/build date */ #undef DATE +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +#undef ENABLE_NLS + /* make -P prologue-searching default */ #undef ENABLE_PROLOGUES @@ -24,8 +28,15 @@ /* Define to 1 if you have the header file. */ #undef HAVE_CRASH_DEFS_H -/* Define to 1 if you have the header file. */ -#undef HAVE_ELFUTILS_VERSION_H +/* Define if the GNU dcgettext() function is already present or preinstalled. + */ +#undef HAVE_DCGETTEXT + +/* Define if the GNU gettext() function is already present or preinstalled. */ +#undef HAVE_GETTEXT + +/* Define if you have the iconv() function and it works. */ +#undef HAVE_ICONV /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H @@ -36,6 +47,9 @@ /* have librpm */ #undef HAVE_LIBRPM +/* have librpmio */ +#undef HAVE_LIBRPMIO + /* Define to 1 if you have the `sqlite3' library (-lsqlite3). */ #undef HAVE_LIBSQLITE3 @@ -45,6 +59,9 @@ /* Define to 1 if you have the nss libraries. */ #undef HAVE_NSS +/* Define to 1 if you have the `ppoll' function. */ +#undef HAVE_PPOLL + /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H @@ -105,8 +122,40 @@ /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# undef _ALL_SOURCE +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# undef _GNU_SOURCE +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# undef _POSIX_PTHREAD_SEMANTICS +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# undef _TANDEM_SOURCE +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# undef __EXTENSIONS__ +#endif + + /* Version number of package */ #undef VERSION +/* Define to 1 if on MINIX. */ +#undef _MINIX + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +#undef _POSIX_1_SOURCE + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +#undef _POSIX_SOURCE + /* Define like PROTOTYPES; this can be used by system headers. */ #undef __PROTOTYPES diff -Nru systemtap-1.4/config.rpath systemtap-1.6/config.rpath --- systemtap-1.4/config.rpath 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/config.rpath 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,672 @@ +#! /bin/sh +# Output a system dependent set of variables, describing how to set the +# run time search path of shared libraries in an executable. +# +# Copyright 1996-2010 Free Software Foundation, Inc. +# Taken from GNU libtool, 2001 +# Originally by Gordon Matzigkeit , 1996 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. +# +# The first argument passed to this file is the canonical host specification, +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld +# should be set by the caller. +# +# The set of defined variables is at the end of this script. + +# Known limitations: +# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer +# than 256 bytes, otherwise the compiler driver will dump core. The only +# known workaround is to choose shorter directory names for the build +# directory and/or the installation directory. + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a +shrext=.so + +host="$1" +host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + +# Code taken from libtool.m4's _LT_CC_BASENAME. + +for cc_temp in $CC""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'` + +# Code taken from libtool.m4's _LT_COMPILER_PIC. + +wl= +if test "$GCC" = yes; then + wl='-Wl,' +else + case "$host_os" in + aix*) + wl='-Wl,' + ;; + darwin*) + case $cc_basename in + xlc*) + wl='-Wl,' + ;; + esac + ;; + mingw* | cygwin* | pw32* | os2* | cegcc*) + ;; + hpux9* | hpux10* | hpux11*) + wl='-Wl,' + ;; + irix5* | irix6* | nonstopux*) + wl='-Wl,' + ;; + newsos6) + ;; + linux* | k*bsd*-gnu) + case $cc_basename in + ecc*) + wl='-Wl,' + ;; + icc* | ifort*) + wl='-Wl,' + ;; + lf95*) + wl='-Wl,' + ;; + pgcc | pgf77 | pgf90) + wl='-Wl,' + ;; + ccc*) + wl='-Wl,' + ;; + como) + wl='-lopt=' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + wl='-Wl,' + ;; + esac + ;; + esac + ;; + osf3* | osf4* | osf5*) + wl='-Wl,' + ;; + rdos*) + ;; + solaris*) + wl='-Wl,' + ;; + sunos4*) + wl='-Qoption ld ' + ;; + sysv4 | sysv4.2uw2* | sysv4.3*) + wl='-Wl,' + ;; + sysv4*MP*) + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + wl='-Wl,' + ;; + unicos*) + wl='-Wl,' + ;; + uts4*) + ;; + esac +fi + +# Code taken from libtool.m4's _LT_LINKER_SHLIBS. + +hardcode_libdir_flag_spec= +hardcode_libdir_separator= +hardcode_direct=no +hardcode_minus_L=no + +case "$host_os" in + cygwin* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; +esac + +ld_shlibs=yes +if test "$with_gnu_ld" = yes; then + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + # Unlike libtool, we use -rpath here, not --rpath, since the documented + # option of GNU ld is called -rpath, not --rpath. + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + case "$host_os" in + aix[3-9]*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs=no + fi + ;; + amigaos*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we cannot use + # them. + ld_shlibs=no + ;; + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + cygwin* | mingw* | pw32* | cegcc*) + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + interix[3-9]*) + hardcode_direct=no + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + gnu* | linux* | k*bsd*-gnu) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + netbsd*) + ;; + solaris*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + ld_shlibs=no + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs=no + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + else + ld_shlibs=no + fi + ;; + esac + ;; + sunos4*) + hardcode_direct=yes + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + esac + if test "$ld_shlibs" = no; then + hardcode_libdir_flag_spec= + fi +else + case "$host_os" in + aix3*) + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L=yes + if test "$GCC" = yes; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct=unsupported + fi + ;; + aix[4-9]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + else + aix_use_runtimelinking=no + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + fi + hardcode_direct=yes + hardcode_libdir_separator=':' + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + hardcode_direct=unsupported + hardcode_minus_L=yes + hardcode_libdir_flag_spec='-L$libdir' + hardcode_libdir_separator= + fi + ;; + esac + fi + # Begin _LT_AC_SYS_LIBPATH_AIX. + echo 'int main () { return 0; }' > conftest.c + ${CC} ${LDFLAGS} conftest.c -o conftest + aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` + if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` + fi + if test -z "$aix_libpath"; then + aix_libpath="/usr/lib:/lib" + fi + rm -f conftest.c conftest + # End _LT_AC_SYS_LIBPATH_AIX. + if test "$aix_use_runtimelinking" = yes; then + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' + else + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + fi + fi + ;; + amigaos*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + # see comment about different semantics on the GNU ld section + ld_shlibs=no + ;; + bsdi[45]*) + ;; + cygwin* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec=' ' + libext=lib + ;; + darwin* | rhapsody*) + hardcode_direct=no + if test "$GCC" = yes ; then + : + else + case $cc_basename in + xlc*) + ;; + *) + ld_shlibs=no + ;; + esac + fi + ;; + dgux*) + hardcode_libdir_flag_spec='-L$libdir' + ;; + freebsd1*) + ld_shlibs=no + ;; + freebsd2.2*) + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + ;; + freebsd2*) + hardcode_direct=yes + hardcode_minus_L=yes + ;; + freebsd* | dragonfly*) + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + ;; + hpux9*) + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + hpux10*) + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + fi + ;; + hpux11*) + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct=no + ;; + *) + hardcode_direct=yes + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + esac + fi + ;; + irix5* | irix6* | nonstopux*) + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + netbsd*) + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + ;; + newsos6) + hardcode_direct=yes + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct=yes + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + else + case "$host_os" in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + hardcode_libdir_flag_spec='-R$libdir' + ;; + *) + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + esac + fi + else + ld_shlibs=no + fi + ;; + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + osf3*) + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + osf4* | osf5*) + if test "$GCC" = yes; then + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + # Both cc and cxx compiler support -rpath directly + hardcode_libdir_flag_spec='-rpath $libdir' + fi + hardcode_libdir_separator=: + ;; + solaris*) + hardcode_libdir_flag_spec='-R$libdir' + ;; + sunos4*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + ;; + sysv4) + case $host_vendor in + sni) + hardcode_direct=yes # is this really true??? + ;; + siemens) + hardcode_direct=no + ;; + motorola) + hardcode_direct=no #Motorola manual says yes, but my tests say they lie + ;; + esac + ;; + sysv4.3*) + ;; + sysv4*MP*) + if test -d /usr/nec; then + ld_shlibs=yes + fi + ;; + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + ;; + sysv5* | sco3.2v5* | sco5v6*) + hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator=':' + ;; + uts4*) + hardcode_libdir_flag_spec='-L$libdir' + ;; + *) + ld_shlibs=no + ;; + esac +fi + +# Check dynamic linker characteristics +# Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER. +# Unlike libtool.m4, here we don't care about _all_ names of the library, but +# only about the one the linker finds when passed -lNAME. This is the last +# element of library_names_spec in libtool.m4, or possibly two of them if the +# linker has special search rules. +library_names_spec= # the last element of library_names_spec in libtool.m4 +libname_spec='lib$name' +case "$host_os" in + aix3*) + library_names_spec='$libname.a' + ;; + aix[4-9]*) + library_names_spec='$libname$shrext' + ;; + amigaos*) + library_names_spec='$libname.a' + ;; + beos*) + library_names_spec='$libname$shrext' + ;; + bsdi[45]*) + library_names_spec='$libname$shrext' + ;; + cygwin* | mingw* | pw32* | cegcc*) + shrext=.dll + library_names_spec='$libname.dll.a $libname.lib' + ;; + darwin* | rhapsody*) + shrext=.dylib + library_names_spec='$libname$shrext' + ;; + dgux*) + library_names_spec='$libname$shrext' + ;; + freebsd1*) + ;; + freebsd* | dragonfly*) + case "$host_os" in + freebsd[123]*) + library_names_spec='$libname$shrext$versuffix' ;; + *) + library_names_spec='$libname$shrext' ;; + esac + ;; + gnu*) + library_names_spec='$libname$shrext' + ;; + hpux9* | hpux10* | hpux11*) + case $host_cpu in + ia64*) + shrext=.so + ;; + hppa*64*) + shrext=.sl + ;; + *) + shrext=.sl + ;; + esac + library_names_spec='$libname$shrext' + ;; + interix[3-9]*) + library_names_spec='$libname$shrext' + ;; + irix5* | irix6* | nonstopux*) + library_names_spec='$libname$shrext' + case "$host_os" in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;; + *) libsuff= shlibsuff= ;; + esac + ;; + esac + ;; + linux*oldld* | linux*aout* | linux*coff*) + ;; + linux* | k*bsd*-gnu) + library_names_spec='$libname$shrext' + ;; + knetbsd*-gnu) + library_names_spec='$libname$shrext' + ;; + netbsd*) + library_names_spec='$libname$shrext' + ;; + newsos6) + library_names_spec='$libname$shrext' + ;; + nto-qnx*) + library_names_spec='$libname$shrext' + ;; + openbsd*) + library_names_spec='$libname$shrext$versuffix' + ;; + os2*) + libname_spec='$name' + shrext=.dll + library_names_spec='$libname.a' + ;; + osf3* | osf4* | osf5*) + library_names_spec='$libname$shrext' + ;; + rdos*) + ;; + solaris*) + library_names_spec='$libname$shrext' + ;; + sunos4*) + library_names_spec='$libname$shrext$versuffix' + ;; + sysv4 | sysv4.3*) + library_names_spec='$libname$shrext' + ;; + sysv4*MP*) + library_names_spec='$libname$shrext' + ;; + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + library_names_spec='$libname$shrext' + ;; + uts4*) + library_names_spec='$libname$shrext' + ;; +esac + +sed_quote_subst='s/\(["`$\\]\)/\\\1/g' +escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"` +shlibext=`echo "$shrext" | sed -e 's,^\.,,'` +escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` +escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` +escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` + +LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + + +# Please send patches to . Submit a context +# diff and a properly formatted GNU ChangeLog entry. +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit ;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ + uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ + kopensolaris*-gnu* | \ + storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis | -knuth | -cray | -microblaze) + os= + basic_machine=$1 + ;; + -bluegene*) + os=-cnk + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco6) + os=-sco5v6 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ + | bfin \ + | c4x | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | fido | fr30 | frv \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | i370 | i860 | i960 | ia64 \ + | ip2k | iq2000 \ + | lm32 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | mcore | mep | metag \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64octeon | mips64octeonel \ + | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | moxie \ + | mt \ + | msp430 \ + | nios | nios2 \ + | ns16k | ns32k \ + | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | pyramid \ + | rx \ + | score \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu | strongarm \ + | tahoe | thumb | tic4x | tic80 | tron \ + | ubicom32 \ + | v850 | v850e \ + | we32k \ + | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ + | z8k | z80) + basic_machine=$basic_machine-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12 | picochip) + # Motorola 68HC11/12. + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + ;; + ms1) + basic_machine=mt-unknown + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* | avr32-* \ + | bfin-* | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ + | clipper-* | craynv-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | elxsi-* \ + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* | iq2000-* \ + | lm32-* \ + | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64octeon-* | mips64octeonel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64r5900-* | mips64r5900el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | mt-* \ + | msp430-* \ + | nios-* | nios2-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | pyramid-* \ + | romp-* | rs6000-* | rx-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ + | tahoe-* | thumb-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ + | tron-* \ + | ubicom32-* \ + | v850-* | v850e-* | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ + | xstormy16-* | xtensa*-* \ + | ymp-* \ + | z8k-* | z80-*) + ;; + # Recognize the basic CPU types without company name, with glob match. + xtensa*) + basic_machine=$basic_machine-unknown + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + abacus) + basic_machine=abacus-unknown + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amd64) + basic_machine=x86_64-pc + ;; + amd64-*) + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aros) + basic_machine=i386-pc + os=-aros + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + blackfin) + basic_machine=bfin-unknown + os=-linux + ;; + blackfin-*) + basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + bluegene*) + basic_machine=powerpc-ibm + os=-cnk + ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; + cegcc) + basic_machine=arm-unknown + os=-cegcc + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | j90) + basic_machine=j90-cray + os=-unicos + ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; + cr16) + basic_machine=cr16-unknown + os=-elf + ;; + crds | unos) + basic_machine=m68k-crds + ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dicos) + basic_machine=i686-pc + os=-dicos + ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; +# I'm not sure what "Sysv32" means. Should this be sysv3.2? + i*86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m68knommu) + basic_machine=m68k-unknown + os=-linux + ;; + m68knommu-*) + basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + microblaze) + basic_machine=microblaze-xilinx + ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 + ;; + mingw32ce) + basic_machine=arm-unknown + os=-mingw32ce + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + ms1-*) + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + openrisc | openrisc-*) + basic_machine=or32-unknown + ;; + os400) + basic_machine=powerpc-ibm + os=-os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + parisc) + basic_machine=hppa-unknown + os=-linux + ;; + parisc-*) + basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; + pentiumii | pentium2 | pentiumiii | pentium3) + basic_machine=i686-pc + ;; + pentium4) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium4-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc) basic_machine=powerpc-unknown + ;; + ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little | ppc64-le | powerpc64-little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rdos) + basic_machine=i386-pc + os=-rdos + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sde) + basic_machine=mipsisa32-sde + os=-elf + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sh5el) + basic_machine=sh5le-unknown + ;; + sh64) + basic_machine=sh64-unknown + ;; + sparclite-wrs | simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tic54x | c54x*) + basic_machine=tic54x-unknown + os=-coff + ;; + tic55x | c55x*) + basic_machine=tic55x-unknown + os=-coff + ;; + tic6x | c6x*) + basic_machine=tic6x-unknown + os=-coff + ;; + tile*) + basic_machine=tile-unknown + os=-linux-gnu + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; + z80-*-coff) + basic_machine=z80-unknown + os=-sim + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + romp) + basic_machine=romp-ibm + ;; + mmix) + basic_machine=mmix-knuth + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -auroraux) + os=-auroraux + ;; + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ + | -sym* | -kopensolaris* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* | -aros* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ + | -openbsd* | -solidbsd* \ + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* | -cegcc* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto-qnx*) + ;; + -nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux-dietlibc) + os=-linux-dietlibc + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -os400*) + os=-os400 + ;; + -wince*) + os=-wince + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -atheos*) + os=-atheos + ;; + -syllable*) + os=-syllable + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -nova*) + os=-rtmk-nova + ;; + -ns2 ) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -tpf*) + os=-tpf + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -aros*) + os=-aros + ;; + -kaos*) + os=-kaos + ;; + -zvmoe) + os=-zvmoe + ;; + -dicos*) + os=-dicos + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + score-*) + os=-elf + ;; + spu-*) + os=-elf + ;; + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + c4x-* | tic4x-*) + os=-coff + ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + # This also exists in the configure program, but was not the + # default. + # os=-sunos4 + ;; + m68*-cisco) + os=-aout + ;; + mep-*) + os=-elf + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + or32-*) + os=-coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-haiku) + os=-haiku + ;; + *-ibm) + os=-aix + ;; + *-knuth) + os=-mmixware + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -cnk*|-aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -os400*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -tpf*) + vendor=ibm + ;; + -vxsim* | -vxworks* | -windiss*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + -vos*) + vendor=stratus + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os +exit + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff -Nru systemtap-1.4/configure systemtap-1.6/configure --- systemtap-1.4/configure 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/configure 2011-07-25 18:12:01.000000000 +0000 @@ -1,8 +1,8 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.66 for systemtap 1.4. +# Generated by GNU Autoconf 2.66 for systemtap 1.6. # -# Report bugs to . +# Report bugs to . # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -231,10 +231,10 @@ $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and -$0: systemtap@sources.redhat.com about your system, -$0: including any error possibly output before this -$0: message. Then install a modern shell, or manually run -$0: the script under such a shell if you do have one." +$0: systemtap@sourceware.org about your system, including +$0: any error possibly output before this message. Then +$0: install a modern shell, or manually run the script +$0: under such a shell if you do have one." fi exit 1 fi @@ -552,9 +552,9 @@ # Identity of this package. PACKAGE_NAME='systemtap' PACKAGE_TARNAME='systemtap' -PACKAGE_VERSION='1.4' -PACKAGE_STRING='systemtap 1.4' -PACKAGE_BUGREPORT='systemtap@sources.redhat.com' +PACKAGE_VERSION='1.6' +PACKAGE_STRING='systemtap 1.6' +PACKAGE_BUGREPORT='systemtap@sourceware.org' PACKAGE_URL='' # Factoring default headers for most tests. @@ -593,12 +593,16 @@ # include #endif" +gt_needs= enable_option_checking=no ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS subdirs +STAP_PREFIX +LOCALEDIR +ENABLE_NLS support_section_question DATE stap_LIBS @@ -617,13 +621,12 @@ PKG_CONFIG HAVE_AVAHI_FALSE HAVE_AVAHI_TRUE -HAVE_NSS_FALSE -HAVE_NSS_TRUE BUILD_SERVER_FALSE BUILD_SERVER_TRUE +HAVE_NSS_FALSE +HAVE_NSS_TRUE nspr_CFLAGS nss_CFLAGS -have_certutil BUILD_PDFREFDOCS_FALSE BUILD_PDFREFDOCS_TRUE XMLTO_STRINGPARAM_FALSE @@ -650,18 +653,43 @@ PIECXXFLAGS PIECFLAGS PIELDFLAGS +POSUB +LTLIBINTL +LIBINTL +INTLLIBS +LTLIBICONV +LIBICONV +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build +XGETTEXT_EXTRA_OPTIONS +MSGMERGE +XGETTEXT_015 +XGETTEXT +GMSGFMT_015 +MSGFMT_015 +GMSGFMT +MSGFMT +GETTEXT_MACRO_VERSION +USE_NLS RANLIB ANSI2KNR U -EGREP -GREP -CPP am__fastdepCXX_FALSE am__fastdepCXX_TRUE CXXDEPMODE ac_ct_CXX CXXFLAGS CXX +LN_S +EGREP +GREP +CPP am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE @@ -678,7 +706,6 @@ LDFLAGS CFLAGS CC -LN_S AM_BACKSLASH AM_DEFAULT_VERBOSITY MAINT @@ -751,6 +778,11 @@ enable_maintainer_mode enable_silent_rules enable_dependency_tracking +enable_nls +with_gnu_ld +enable_rpath +with_libiconv_prefix +with_libintl_prefix enable_prologues enable_sdt_probes enable_ssp @@ -775,10 +807,10 @@ LDFLAGS LIBS CPPFLAGS +CPP CXX CXXFLAGS CCC -CPP PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR @@ -1328,7 +1360,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures systemtap 1.4 to adapt to many kinds of systems. +\`configure' configures systemtap 1.6 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1389,12 +1421,16 @@ --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of systemtap 1.4:";; + short | recursive ) echo "Configuration of systemtap 1.6:";; esac cat <<\_ACEOF @@ -1408,6 +1444,8 @@ --disable-silent-rules verbose build output (undo: `make V=0') --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors + --disable-nls do not use Native Language Support + --disable-rpath do not hardcode runtime library paths --enable-prologues make -P prologue-searching default --disable-sdt-probes disable process.mark probes in stap, staprun, stapio --disable-ssp disable gcc stack-protector @@ -1426,14 +1464,19 @@ documentation built). --enable-refdocs enable building reference documentation (default on if xmlto etc. found and other documentation built). - --enable-server enable building of stap-server/client (default on if - nss etc. found). + --enable-server enable building of stap-server (default on if nss + etc. found). --enable-grapher enable building of grapher (default on if needed requirements are found). Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-gnu-ld assume the C compiler uses GNU ld default=no + --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib + --without-libiconv-prefix don't search for libiconv in includedir and libdir + --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib + --without-libintl-prefix don't search for libintl in includedir and libdir --with-publican-brand=BRAND building publican documentation guides using given brand (defaults to "common"). @@ -1449,9 +1492,9 @@ LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory + CPP C preprocessor CXX C++ compiler command CXXFLAGS C++ compiler flags - CPP C preprocessor PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path @@ -1469,7 +1512,7 @@ Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. -Report bugs to . +Report bugs to . _ACEOF ac_status=$? fi @@ -1532,7 +1575,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -systemtap configure 1.4 +systemtap configure 1.6 generated by GNU Autoconf 2.66 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1584,44 +1627,6 @@ } # ac_fn_c_try_compile -# ac_fn_cxx_try_compile LINENO -# ---------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_cxx_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_cxx_try_compile - # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. @@ -1659,48 +1664,6 @@ } # ac_fn_c_try_cpp -# ac_fn_c_try_run LINENO -# ---------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. -ac_fn_c_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_c_try_run - # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using @@ -1771,9 +1734,9 @@ $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( $as_echo "## ------------------------------------------- ## -## Report this to systemtap@sources.redhat.com ## -## ------------------------------------------- ##" +( $as_echo "## --------------------------------------- ## +## Report this to systemtap@sourceware.org ## +## --------------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac @@ -1792,6 +1755,48 @@ } # ac_fn_c_check_header_mongrel +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval + +} # ac_fn_c_try_run + # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in @@ -1823,6 +1828,44 @@ } # ac_fn_c_check_header_compile +# ac_fn_cxx_try_compile LINENO +# ---------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_cxx_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval + +} # ac_fn_cxx_try_compile + # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. @@ -1869,6 +1912,73 @@ } # ac_fn_c_try_link +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval "test \"\${$3+set}\"" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $2 + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif + +int +main () +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_func + # ac_fn_cxx_try_cpp LINENO # ------------------------ # Try to preprocess conftest.$ac_ext, and return whether this succeeded. @@ -1976,9 +2086,9 @@ $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( $as_echo "## ------------------------------------------- ## -## Report this to systemtap@sources.redhat.com ## -## ------------------------------------------- ##" +( $as_echo "## --------------------------------------- ## +## Report this to systemtap@sourceware.org ## +## --------------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac @@ -2000,7 +2110,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by systemtap $as_me 1.4, which was +It was created by systemtap $as_me 1.6, which was generated by GNU Autoconf 2.66. Invocation command line was $ $0 $@ @@ -2280,6 +2390,7 @@ >$cache_file fi +gt_needs="$gt_needs " # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false @@ -2817,7 +2928,7 @@ # Define the identity of the package. PACKAGE='systemtap' - VERSION='1.4' + VERSION='1.6' cat >>confdefs.h <<_ACEOF @@ -2894,39 +3005,83 @@ AM_BACKSLASH='\' -mkdir_p="$MKDIR_P" -case $mkdir_p in - [\\/$]* | ?:[\\/]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac +DEPDIR="${am__leading_dot}deps" +ac_config_commands="$ac_config_commands depfiles" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 -$as_echo_n "checking whether ln -s works... " >&6; } -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 -$as_echo "no, using $LN_S" >&6; } -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. +am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 +$as_echo_n "checking for style of include used by $am_make... " >&6; } +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from `make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 +$as_echo "$_am_result" >&6; } +rm -f confinc confmf + +# Check whether --enable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then : + enableval=$enable_dependency_tracking; +fi + +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +fi + if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -3701,68 +3856,6 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -DEPDIR="${am__leading_dot}deps" - -ac_config_commands="$ac_config_commands depfiles" - - -am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo this is the am__doit target -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 -$as_echo_n "checking for style of include used by $am_make... " >&6; } -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from `make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 -$as_echo "$_am_result" >&6; } -rm -f confinc confmf - -# Check whether --enable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then : - enableval=$enable_dependency_tracking; -fi - -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' -fi - if test "x$enable_dependency_tracking" != xno; then - AMDEP_TRUE= - AMDEP_FALSE='#' -else - AMDEP_TRUE='#' - AMDEP_FALSE= -fi - - depcc="$CC" am_compiler_list= @@ -3891,222 +3984,436 @@ fi -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test -z "$CXX"; then - if test -n "$CCC"; then - CXX=$CCC - else - if test -n "$ac_tool_prefix"; then - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CXX+set}" = set; then : + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then : $as_echo_n "(cached) " >&6 else - if test -n "$CXX"; then - ac_cv_prog_CXX="$CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : +else + # Broken: fails on valid input. +continue fi -fi -CXX=$ac_cv_prog_CXX -if test -n "$CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 -$as_echo "$CXX" >&6; } +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break fi + done + ac_cv_prog_CPP=$CPP - test -n "$CXX" && break - done fi -if test -z "$CXX"; then - ac_ct_CXX=$CXX - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CXX"; then - ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. + CPP=$ac_cv_prog_CPP else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CXX="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS + ac_cv_prog_CPP=$CPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : +else + # Broken: fails on valid input. +continue fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break fi -ac_ct_CXX=$ac_cv_prog_ac_ct_CXX -if test -n "$ac_ct_CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 -$as_echo "$ac_ct_CXX" >&6; } +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu - test -n "$ac_ct_CXX" && break -done - if test "x$ac_ct_CXX" = x; then - CXX="g++" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if test "${ac_cv_path_GREP+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac - CXX=$ac_ct_CXX + + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi +else + ac_cv_path_GREP=$GREP fi - fi fi -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 + + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done +else + ac_cv_path_EGREP=$EGREP +fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 -$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } -if test "${ac_cv_cxx_compiler_gnu+set}" = set; then : + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if test "${ac_cv_header_stdc+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include +#include +#include +#include int main () { -#ifndef __GNUC__ - choke me -#endif ; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_compiler_gnu=yes +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes else - ac_compiler_gnu=no + ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_cxx_compiler_gnu=$ac_compiler_gnu +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 -$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GXX=yes -else - GXX= -fi -ac_test_CXXFLAGS=${CXXFLAGS+set} -ac_save_CXXFLAGS=$CXXFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 -$as_echo_n "checking whether $CXX accepts -g... " >&6; } -if test "${ac_cv_prog_cxx_g+set}" = set; then : - $as_echo_n "(cached) " >&6 +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : + else - ac_save_cxx_werror_flag=$ac_cxx_werror_flag - ac_cxx_werror_flag=yes - ac_cv_prog_cxx_g=no - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { - - ; + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes +if ac_fn_c_try_run "$LINENO"; then : + else - CXXFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi -int -main () -{ +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then - ; - return 0; -} +$as_echo "#define STDC_HEADERS 1" >>confdefs.h + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +fi + +done + + + + ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" +if test "x$ac_cv_header_minix_config_h" = x""yes; then : + MINIX=yes else - ac_cxx_werror_flag=$ac_save_cxx_werror_flag - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + MINIX= +fi + + + if test "$MINIX" = yes; then + +$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h + + +$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h + + +$as_echo "#define _MINIX 1" >>confdefs.h + + fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 +$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } +if test "${ac_cv_safe_to_define___extensions__+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +# define __EXTENSIONS__ 1 + $ac_includes_default int main () { @@ -4115,333 +4422,75 @@ return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_safe_to_define___extensions__=yes +else + ac_cv_safe_to_define___extensions__=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 -$as_echo "$ac_cv_prog_cxx_g" >&6; } -if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS=$ac_save_CXXFLAGS -elif test $ac_cv_prog_cxx_g = yes; then - if test "$GXX" = yes; then - CXXFLAGS="-g -O2" - else - CXXFLAGS="-g" - fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 +$as_echo "$ac_cv_safe_to_define___extensions__" >&6; } + test $ac_cv_safe_to_define___extensions__ = yes && + $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h + + $as_echo "#define _ALL_SOURCE 1" >>confdefs.h + + $as_echo "#define _GNU_SOURCE 1" >>confdefs.h + + $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h + + $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h + + +mkdir_p="$MKDIR_P" +case $mkdir_p in + [\\/$]* | ?:[\\/]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 +$as_echo_n "checking whether ln -s works... " >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - if test "$GXX" = yes; then - CXXFLAGS="-O2" - else - CXXFLAGS= - fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 +$as_echo "no, using $LN_S" >&6; } fi + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu - -depcc="$CXX" am_compiler_list= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then : +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CXX_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 fi - am__universal=false - case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CXX_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CXX_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } -CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then - am__fastdepCXX_TRUE= - am__fastdepCXX_FALSE='#' -else - am__fastdepCXX_TRUE='#' - am__fastdepCXX_FALSE= -fi - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS +done + done +IFS=$as_save_IFS fi fi @@ -5079,561 +5128,3515 @@ fi +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +if test -z "$CXX"; then + if test -n "$CCC"; then + CXX=$CCC + else + if test -n "$ac_tool_prefix"; then + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CXX+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CXX=$ac_cv_prog_CXX +if test -n "$CXX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 +$as_echo "$CXX" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CXX" && break + done +fi +if test -z "$CXX"; then + ac_ct_CXX=$CXX + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CXX"; then + ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CXX="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CXX=$ac_cv_prog_ac_ct_CXX +if test -n "$ac_ct_CXX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 +$as_echo "$ac_ct_CXX" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CXX" && break +done + + if test "x$ac_ct_CXX" = x; then + CXX="g++" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CXX=$ac_ct_CXX + fi +fi + + fi +fi +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 +$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } +if test "${ac_cv_cxx_compiler_gnu+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_cxx_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 +$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GXX=yes +else + GXX= +fi +ac_test_CXXFLAGS=${CXXFLAGS+set} +ac_save_CXXFLAGS=$CXXFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 +$as_echo_n "checking whether $CXX accepts -g... " >&6; } +if test "${ac_cv_prog_cxx_g+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_save_cxx_werror_flag=$ac_cxx_werror_flag + ac_cxx_werror_flag=yes + ac_cv_prog_cxx_g=no + CXXFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_cv_prog_cxx_g=yes +else + CXXFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + +else + ac_cxx_werror_flag=$ac_save_cxx_werror_flag + CXXFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_cv_prog_cxx_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cxx_werror_flag=$ac_save_cxx_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 +$as_echo "$ac_cv_prog_cxx_g" >&6; } +if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS=$ac_save_CXXFLAGS +elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-g" + fi +else + if test "$GXX" = yes; then + CXXFLAGS="-O2" + else + CXXFLAGS= + fi +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +depcc="$CXX" am_compiler_list= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CXX_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvisualcpp | msvcmsys) + # This compiler won't grok `-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CXX_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CXX_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } +CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then + am__fastdepCXX_TRUE= + am__fastdepCXX_FALSE='#' +else + am__fastdepCXX_TRUE='#' + am__fastdepCXX_FALSE= +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } + +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if test "${ac_cv_c_compiler_gnu+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if test "${ac_cv_prog_cc_g+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +else + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then : + +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +depcc="$CC" am_compiler_list= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvisualcpp | msvcmsys) + # This compiler won't grok `-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + + +am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc + +if test "x$CC" != xcc; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 +$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5 +$as_echo_n "checking whether cc understands -c and -o together... " >&6; } +fi +set dummy $CC; ac_cc=`$as_echo "$2" | + sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` +if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\"" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +# Make sure it works both with $CC and with simple cc. +# We do the test twice because some compilers refuse to overwrite an +# existing .o file with -o, though they will create one. +ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' +rm -f conftest2.* +if { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && + test -f conftest2.$ac_objext && { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; +then + eval ac_cv_prog_cc_${ac_cc}_c_o=yes + if test "x$CC" != xcc; then + # Test first that cc exists at all. + if { ac_try='cc -c conftest.$ac_ext >&5' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' + rm -f conftest2.* + if { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && + test -f conftest2.$ac_objext && { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; + then + # cc works too. + : + else + # cc exists but doesn't like -o. + eval ac_cv_prog_cc_${ac_cc}_c_o=no + fi + fi + fi +else + eval ac_cv_prog_cc_${ac_cc}_c_o=no +fi +rm -f core conftest* + +fi +if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h + +fi + +# FIXME: we rely on the cache variable name because +# there is no other way. +set dummy $CC +am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` +eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o +if test "$am_t" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function prototypes" >&5 +$as_echo_n "checking for function prototypes... " >&6; } +if test "$ac_cv_prog_cc_c89" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define PROTOTYPES 1" >>confdefs.h + + +$as_echo "#define __PROTOTYPES 1" >>confdefs.h + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +if test "$ac_cv_prog_cc_stdc" != no; then + U= ANSI2KNR= +else + U=_ ANSI2KNR=./ansi2knr +fi +# Ensure some checks needed by ansi2knr itself. + +for ac_header in string.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default" +if test "x$ac_cv_header_string_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STRING_H 1 +_ACEOF + +fi + +done + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_RANLIB+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : + $as_echo_n "(cached) " >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 +$as_echo_n "checking whether NLS is requested... " >&6; } + # Check whether --enable-nls was given. +if test "${enable_nls+set}" = set; then : + enableval=$enable_nls; USE_NLS=$enableval +else + USE_NLS=yes +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 +$as_echo "$USE_NLS" >&6; } + + + + + GETTEXT_MACRO_VERSION=0.18 + -am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc - -if test "x$CC" != xcc; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 -$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5 -$as_echo_n "checking whether cc understands -c and -o together... " >&6; } -fi -set dummy $CC; ac_cc=`$as_echo "$2" | - sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\"" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -# Make sure it works both with $CC and with simple cc. -# We do the test twice because some compilers refuse to overwrite an -# existing .o file with -o, though they will create one. -ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' -rm -f conftest2.* -if { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && - test -f conftest2.$ac_objext && { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; -then - eval ac_cv_prog_cc_${ac_cc}_c_o=yes - if test "x$CC" != xcc; then - # Test first that cc exists at all. - if { ac_try='cc -c conftest.$ac_ext >&5' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; + + +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Find out how to test for executable files. Don't use a zero-byte file, +# as systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + ac_executable_p="test -x" +else + ac_executable_p="test -f" +fi +rm -f conf$$.file + +# Extract the first word of "msgfmt", so it can be a program name with args. +set dummy msgfmt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_MSGFMT+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case "$MSGFMT" in + [\\/]* | ?:[\\/]*) + ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. + ;; + *) + ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$ac_save_IFS" + test -z "$ac_dir" && ac_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then + echo "$as_me: trying $ac_dir/$ac_word..." >&5 + if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 && + (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then + ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext" + break 2 + fi + fi + done + done + IFS="$ac_save_IFS" + test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":" + ;; esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' - rm -f conftest2.* - if { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; +fi +MSGFMT="$ac_cv_path_MSGFMT" +if test "$MSGFMT" != ":"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 +$as_echo "$MSGFMT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + # Extract the first word of "gmsgfmt", so it can be a program name with args. +set dummy gmsgfmt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_GMSGFMT+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $GMSGFMT in + [\\/]* | ?:[\\/]*) + ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" + ;; esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && - test -f conftest2.$ac_objext && { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; +fi +GMSGFMT=$ac_cv_path_GMSGFMT +if test -n "$GMSGFMT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5 +$as_echo "$GMSGFMT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + + case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;; + *) MSGFMT_015=$MSGFMT ;; + esac + + case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; + *) GMSGFMT_015=$GMSGFMT ;; + esac + + + +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Find out how to test for executable files. Don't use a zero-byte file, +# as systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + ac_executable_p="test -x" +else + ac_executable_p="test -f" +fi +rm -f conf$$.file + +# Extract the first word of "xgettext", so it can be a program name with args. +set dummy xgettext; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_XGETTEXT+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case "$XGETTEXT" in + [\\/]* | ?:[\\/]*) + ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. + ;; + *) + ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$ac_save_IFS" + test -z "$ac_dir" && ac_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then + echo "$as_me: trying $ac_dir/$ac_word..." >&5 + if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 && + (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then + ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext" + break 2 + fi + fi + done + done + IFS="$ac_save_IFS" + test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" + ;; esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; - then - # cc works too. - : - else - # cc exists but doesn't like -o. - eval ac_cv_prog_cc_${ac_cc}_c_o=no - fi - fi +fi +XGETTEXT="$ac_cv_path_XGETTEXT" +if test "$XGETTEXT" != ":"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5 +$as_echo "$XGETTEXT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + rm -f messages.po + + case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; + *) XGETTEXT_015=$XGETTEXT ;; + esac + + + +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: fi + rm -f conf$$.sh +fi + +# Find out how to test for executable files. Don't use a zero-byte file, +# as systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + ac_executable_p="test -x" else - eval ac_cv_prog_cc_${ac_cc}_c_o=no + ac_executable_p="test -f" fi -rm -f core conftest* +rm -f conf$$.file +# Extract the first word of "msgmerge", so it can be a program name with args. +set dummy msgmerge; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_MSGMERGE+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case "$MSGMERGE" in + [\\/]* | ?:[\\/]*) + ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path. + ;; + *) + ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$ac_save_IFS" + test -z "$ac_dir" && ac_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then + echo "$as_me: trying $ac_dir/$ac_word..." >&5 + if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then + ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext" + break 2 + fi + fi + done + done + IFS="$ac_save_IFS" + test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":" + ;; +esac fi -if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +MSGMERGE="$ac_cv_path_MSGMERGE" +if test "$MSGMERGE" != ":"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5 +$as_echo "$MSGMERGE" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } +fi -$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h + test -n "$localedir" || localedir='${datadir}/locale' + + + test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS= + + + ac_config_commands="$ac_config_commands po-directories" + + + + if test "X$prefix" = "XNONE"; then + acl_final_prefix="$ac_default_prefix" + else + acl_final_prefix="$prefix" + fi + if test "X$exec_prefix" = "XNONE"; then + acl_final_exec_prefix='${prefix}' + else + acl_final_exec_prefix="$exec_prefix" + fi + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" + prefix="$acl_save_prefix" + +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if test "${ac_cv_build+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if test "${ac_cv_host+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi -# FIXME: we rely on the cache variable name because -# there is no other way. -set dummy $CC -am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o -if test "$am_t" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + + +# Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then : + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi + +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5 +$as_echo_n "checking for ld used by GCC... " >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | [A-Za-z]:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the path of ld + ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +$as_echo_n "checking for GNU ld... " >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +$as_echo_n "checking for non-GNU ld... " >&6; } +fi +if test "${acl_cv_path_LD+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$LD"; then + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + acl_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some GNU ld's only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in + *GNU* | *'with BFD'*) + test "$with_gnu_ld" != no && break ;; + *) + test "$with_gnu_ld" != yes && break ;; + esac + fi + done + IFS="$ac_save_ifs" +else + acl_cv_path_LD="$LD" # Let the user override the test with a path. +fi +fi + +LD="$acl_cv_path_LD" +if test -n "$LD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 +$as_echo "$LD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } +if test "${acl_cv_prog_gnu_ld+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + # I'd rather use --version here, but apparently some GNU ld's only accept -v. +case `$LD -v 2>&1 &5 +$as_echo "$acl_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$acl_cv_prog_gnu_ld -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function prototypes" >&5 -$as_echo_n "checking for function prototypes... " >&6; } -if test "$ac_cv_prog_cc_c89" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -$as_echo "#define PROTOTYPES 1" >>confdefs.h + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 +$as_echo_n "checking for shared library run path origin... " >&6; } +if test "${acl_cv_rpath+set}" = set; then : + $as_echo_n "(cached) " >&6 +else -$as_echo "#define __PROTOTYPES 1" >>confdefs.h + CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ + ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh + . ./conftest.sh + rm -f ./conftest.sh + acl_cv_rpath=done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 +$as_echo "$acl_cv_rpath" >&6; } + wl="$acl_cv_wl" + acl_libext="$acl_cv_libext" + acl_shlibext="$acl_cv_shlibext" + acl_libname_spec="$acl_cv_libname_spec" + acl_library_names_spec="$acl_cv_library_names_spec" + acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" + acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" + acl_hardcode_direct="$acl_cv_hardcode_direct" + acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" + # Check whether --enable-rpath was given. +if test "${enable_rpath+set}" = set; then : + enableval=$enable_rpath; : else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + enable_rpath=yes fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then : + + acl_libdirstem=lib + acl_libdirstem2= + case "$host_os" in + solaris*) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5 +$as_echo_n "checking for 64-bit host... " >&6; } +if test "${gl_cv_solaris_64bit+set}" = set; then : $as_echo_n "(cached) " >&6 else - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - $ac_path_GREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi +#ifdef _LP64 +sixtyfour bits +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "sixtyfour bits" >/dev/null 2>&1; then : + gl_cv_solaris_64bit=yes else - ac_cv_path_GREP=$GREP + gl_cv_solaris_64bit=no fi +rm -f conftest* + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5 +$as_echo "$gl_cv_solaris_64bit" >&6; } + if test $gl_cv_solaris_64bit = yes; then + acl_libdirstem=lib/64 + case "$host_cpu" in + sparc*) acl_libdirstem2=lib/sparcv9 ;; + i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; + esac + fi + ;; + *) + searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` + if test -n "$searchpath"; then + acl_save_IFS="${IFS= }"; IFS=":" + for searchdir in $searchpath; do + if test -d "$searchdir"; then + case "$searchdir" in + */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; + */../ | */.. ) + # Better ignore directories of this form. They are misleading. + ;; + *) searchdir=`cd "$searchdir" && pwd` + case "$searchdir" in + */lib64 ) acl_libdirstem=lib64 ;; + esac ;; + esac + fi + done + IFS="$acl_save_IFS" + fi + ;; + esac + test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count + + + + + + + + + + + use_additional=yes + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + +# Check whether --with-libiconv-prefix was given. +if test "${with_libiconv_prefix+set}" = set; then : + withval=$with_libiconv_prefix; + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + else + additional_includedir="$withval/include" + additional_libdir="$withval/$acl_libdirstem" + if test "$acl_libdirstem2" != "$acl_libdirstem" \ + && ! test -d "$withval/$acl_libdirstem"; then + additional_libdir="$withval/$acl_libdirstem2" + fi + fi fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - $ac_path_EGREP_found && break 3 +fi + + LIBICONV= + LTLIBICONV= + INCICONV= + LIBICONV_PREFIX= + HAVE_LIBICONV= + rpathdirs= + ltrpathdirs= + names_already_handled= + names_next_round='iconv ' + while test -n "$names_next_round"; do + names_this_round="$names_next_round" + names_next_round= + for name in $names_this_round; do + already_handled= + for n in $names_already_handled; do + if test "$n" = "$name"; then + already_handled=yes + break + fi + done + if test -z "$already_handled"; then + names_already_handled="$names_already_handled $name" + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` + eval value=\"\$HAVE_LIB$uppername\" + if test -n "$value"; then + if test "$value" = yes; then + eval value=\"\$LIB$uppername\" + test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" + eval value=\"\$LTLIB$uppername\" + test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" + else + : + fi + else + found_dir= + found_la= + found_so= + found_a= + eval libname=\"$acl_libname_spec\" # typically: libname=lib$name + if test -n "$acl_shlibext"; then + shrext=".$acl_shlibext" # typically: shrext=.so + else + shrext= + fi + if test $use_additional = yes; then + dir="$additional_libdir" + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + fi + if test "X$found_dir" = "X"; then + for x in $LDFLAGS $LTLIBICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + case "$x" in + -L*) + dir=`echo "X$x" | sed -e 's/^X-L//'` + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + ;; + esac + if test "X$found_dir" != "X"; then + break + fi + done + fi + if test "X$found_dir" != "X"; then + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" + if test "X$found_so" != "X"; then + if test "$enable_rpath" = no \ + || test "X$found_dir" = "X/usr/$acl_libdirstem" \ + || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + else + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $found_dir" + fi + if test "$acl_hardcode_direct" = yes; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + else + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $found_dir" + fi + else + haveit= + for x in $LDFLAGS $LIBICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" + fi + if test "$acl_hardcode_minus_L" != no; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + else + LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" + fi + fi + fi + fi + else + if test "X$found_a" != "X"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" + else + LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" + fi + fi + additional_includedir= + case "$found_dir" in + */$acl_libdirstem | */$acl_libdirstem/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` + if test "$name" = 'iconv'; then + LIBICONV_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; + */$acl_libdirstem2 | */$acl_libdirstem2/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` + if test "$name" = 'iconv'; then + LIBICONV_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; + esac + if test "X$additional_includedir" != "X"; then + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + for x in $CPPFLAGS $INCICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" + fi + fi + fi + fi + fi + if test -n "$found_la"; then + save_libdir="$libdir" + case "$found_la" in + */* | *\\*) . "$found_la" ;; + *) . "./$found_la" ;; + esac + libdir="$save_libdir" + for dep in $dependency_libs; do + case "$dep" in + -L*) + additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ + && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then + haveit= + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ + || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + haveit= + for x in $LDFLAGS $LIBICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" + fi + fi + haveit= + for x in $LDFLAGS $LTLIBICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" + fi + fi + fi + fi + ;; + -R*) + dir=`echo "X$dep" | sed -e 's/^X-R//'` + if test "$enable_rpath" != no; then + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $dir" + fi + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $dir" + fi + fi + ;; + -l*) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` + ;; + *.la) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` + ;; + *) + LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" + ;; + esac + done + fi + else + LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" + fi + fi + fi done done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + if test "X$rpathdirs" != "X"; then + if test -n "$acl_hardcode_libdir_separator"; then + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" + done + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" + else + for found_dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$found_dir" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" + done + fi + fi + if test "X$ltrpathdirs" != "X"; then + for found_dir in $ltrpathdirs; do + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" + done fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LIBINTL= + LTLIBINTL= + POSUB= + + case " $gt_needs " in + *" need-formatstring-macros "*) gt_api_version=3 ;; + *" need-ngettext "*) gt_api_version=2 ;; + *) gt_api_version=1 ;; + esac + gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" + gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" + + if test "$USE_NLS" = "yes"; then + gt_use_preinstalled_gnugettext=no + + + if test $gt_api_version -ge 3; then + gt_revision_test_code=' +#ifndef __GNU_GETTEXT_SUPPORTED_REVISION +#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) +#endif +typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; +' + else + gt_revision_test_code= + fi + if test $gt_api_version -ge 2; then + gt_expression_test_code=' + * ngettext ("", "", 0)' + else + gt_expression_test_code= + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5 +$as_echo_n "checking for GNU gettext in libc... " >&6; } +if eval "test \"\${$gt_func_gnugettext_libc+set}\"" = set; then : + $as_echo_n "(cached) " >&6 else - ac_cv_path_EGREP=$EGREP + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +$gt_revision_test_code +extern int _nl_msg_cat_cntr; +extern int *_nl_domain_bindings; +int +main () +{ +bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$gt_func_gnugettext_libc=yes" +else + eval "$gt_func_gnugettext_libc=no" fi - - fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" +eval ac_res=\$$gt_func_gnugettext_libc + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + + if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then + + + + + + am_save_CPPFLAGS="$CPPFLAGS" + + for element in $INCICONV; do + haveit= + for x in $CPPFLAGS; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" + fi + done -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 +$as_echo_n "checking for iconv... " >&6; } +if test "${am_cv_func_iconv+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + am_cv_func_iconv="no, consider installing GNU libiconv" + am_cv_lib_iconv=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include -#include -#include -#include - +#include int main () { - +iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - +if ac_fn_c_try_link "$LINENO"; then : + am_cv_func_iconv=yes fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test "$am_cv_func_iconv" != yes; then + am_save_LIBS="$LIBS" + LIBS="$LIBS $LIBICONV" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include - +#include +int +main () +{ +iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd); + ; + return 0; +} _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no +if ac_fn_c_try_link "$LINENO"; then : + am_cv_lib_iconv=yes + am_cv_func_iconv=yes fi -rm -f conftest* +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$am_save_LIBS" + fi fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 +$as_echo "$am_cv_func_iconv" >&6; } + if test "$am_cv_func_iconv" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5 +$as_echo_n "checking for working iconv... " >&6; } +if test "${am_cv_func_iconv_works+set}" = set; then : + $as_echo_n "(cached) " >&6 +else -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : + am_save_LIBS="$LIBS" + if test $am_cv_lib_iconv = yes; then + LIBS="$LIBS $LIBICONV" + fi + if test "$cross_compiling" = yes; then : + case "$host_os" in + aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; + *) am_cv_func_iconv_works="guessing yes" ;; + esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () +#include +#include +int main () { - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; + /* Test against AIX 5.1 bug: Failures are not distinguishable from successful + returns. */ + { + iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); + if (cd_utf8_to_88591 != (iconv_t)(-1)) + { + static const char input[] = "\342\202\254"; /* EURO SIGN */ + char buf[10]; + const char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_utf8_to_88591, + (char **) &inptr, &inbytesleft, + &outptr, &outbytesleft); + if (res == 0) + return 1; + } + } + /* Test against Solaris 10 bug: Failures are not distinguishable from + successful returns. */ + { + iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); + if (cd_ascii_to_88591 != (iconv_t)(-1)) + { + static const char input[] = "\263"; + char buf[10]; + const char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_ascii_to_88591, + (char **) &inptr, &inbytesleft, + &outptr, &outbytesleft); + if (res == 0) + return 1; + } + } +#if 0 /* This bug could be worked around by the caller. */ + /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ + { + iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); + if (cd_88591_to_utf8 != (iconv_t)(-1)) + { + static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; + char buf[50]; + const char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_88591_to_utf8, + (char **) &inptr, &inbytesleft, + &outptr, &outbytesleft); + if ((int)res > 0) + return 1; + } + } +#endif + /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is + provided. */ + if (/* Try standardized names. */ + iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) + /* Try IRIX, OSF/1 names. */ + && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) + /* Try AIX names. */ + && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) + /* Try HP-UX names. */ + && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) + return 1; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : - + am_cv_func_iconv_works=yes else - ac_cv_header_stdc=no + am_cv_func_iconv_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi + LIBS="$am_save_LIBS" + fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5 +$as_echo "$am_cv_func_iconv_works" >&6; } + case "$am_cv_func_iconv_works" in + *no) am_func_iconv=no am_cv_lib_iconv=no ;; + *) am_func_iconv=yes ;; + esac + else + am_func_iconv=no am_cv_lib_iconv=no + fi + if test "$am_func_iconv" = yes; then -$as_echo "#define STDC_HEADERS 1" >>confdefs.h +$as_echo "#define HAVE_ICONV 1" >>confdefs.h -fi + fi + if test "$am_cv_lib_iconv" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 +$as_echo_n "checking how to link with libiconv... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 +$as_echo "$LIBICONV" >&6; } + else + CPPFLAGS="$am_save_CPPFLAGS" + LIBICONV= + LTLIBICONV= + fi -# On IRIX 5.3, sys/types and inttypes.h are conflicting. -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF -fi -done -if test "$ac_cv_prog_cc_stdc" != no; then - U= ANSI2KNR= -else - U=_ ANSI2KNR=./ansi2knr -fi -# Ensure some checks needed by ansi2knr itself. -for ac_header in string.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default" -if test "x$ac_cv_header_string_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STRING_H 1 -_ACEOF + + + + + use_additional=yes + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + +# Check whether --with-libintl-prefix was given. +if test "${with_libintl_prefix+set}" = set; then : + withval=$with_libintl_prefix; + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + else + additional_includedir="$withval/include" + additional_libdir="$withval/$acl_libdirstem" + if test "$acl_libdirstem2" != "$acl_libdirstem" \ + && ! test -d "$withval/$acl_libdirstem"; then + additional_libdir="$withval/$acl_libdirstem2" + fi + fi + fi fi -done + LIBINTL= + LTLIBINTL= + INCINTL= + LIBINTL_PREFIX= + HAVE_LIBINTL= + rpathdirs= + ltrpathdirs= + names_already_handled= + names_next_round='intl ' + while test -n "$names_next_round"; do + names_this_round="$names_next_round" + names_next_round= + for name in $names_this_round; do + already_handled= + for n in $names_already_handled; do + if test "$n" = "$name"; then + already_handled=yes + break + fi + done + if test -z "$already_handled"; then + names_already_handled="$names_already_handled $name" + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` + eval value=\"\$HAVE_LIB$uppername\" + if test -n "$value"; then + if test "$value" = yes; then + eval value=\"\$LIB$uppername\" + test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value" + eval value=\"\$LTLIB$uppername\" + test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value" + else + : + fi + else + found_dir= + found_la= + found_so= + found_a= + eval libname=\"$acl_libname_spec\" # typically: libname=lib$name + if test -n "$acl_shlibext"; then + shrext=".$acl_shlibext" # typically: shrext=.so + else + shrext= + fi + if test $use_additional = yes; then + dir="$additional_libdir" + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + fi + if test "X$found_dir" = "X"; then + for x in $LDFLAGS $LTLIBINTL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + case "$x" in + -L*) + dir=`echo "X$x" | sed -e 's/^X-L//'` + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + ;; + esac + if test "X$found_dir" != "X"; then + break + fi + done + fi + if test "X$found_dir" != "X"; then + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name" + if test "X$found_so" != "X"; then + if test "$enable_rpath" = no \ + || test "X$found_dir" = "X/usr/$acl_libdirstem" \ + || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then + LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" + else + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $found_dir" + fi + if test "$acl_hardcode_direct" = yes; then + LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" + else + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then + LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $found_dir" + fi + else + haveit= + for x in $LDFLAGS $LIBINTL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir" + fi + if test "$acl_hardcode_minus_L" != no; then + LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" + else + LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" + fi + fi + fi + fi + else + if test "X$found_a" != "X"; then + LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a" + else + LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name" + fi + fi + additional_includedir= + case "$found_dir" in + */$acl_libdirstem | */$acl_libdirstem/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` + if test "$name" = 'intl'; then + LIBINTL_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; + */$acl_libdirstem2 | */$acl_libdirstem2/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` + if test "$name" = 'intl'; then + LIBINTL_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; + esac + if test "X$additional_includedir" != "X"; then + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + for x in $CPPFLAGS $INCINTL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir" + fi + fi + fi + fi + fi + if test -n "$found_la"; then + save_libdir="$libdir" + case "$found_la" in + */* | *\\*) . "$found_la" ;; + *) . "./$found_la" ;; + esac + libdir="$save_libdir" + for dep in $dependency_libs; do + case "$dep" in + -L*) + additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ + && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then + haveit= + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ + || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + haveit= + for x in $LDFLAGS $LIBINTL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir" + fi + fi + haveit= + for x in $LDFLAGS $LTLIBINTL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir" + fi + fi + fi + fi + ;; + -R*) + dir=`echo "X$dep" | sed -e 's/^X-R//'` + if test "$enable_rpath" != no; then + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $dir" + fi + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $dir" + fi + fi + ;; + -l*) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` + ;; + *.la) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` + ;; + *) + LIBINTL="${LIBINTL}${LIBINTL:+ }$dep" + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep" + ;; + esac + done + fi + else + LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name" + fi + fi + fi + done + done + if test "X$rpathdirs" != "X"; then + if test -n "$acl_hardcode_libdir_separator"; then + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" + done + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" + else + for found_dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$found_dir" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" + done + fi + fi + if test "X$ltrpathdirs" != "X"; then + for found_dir in $ltrpathdirs; do + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir" + done + fi -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then : + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5 +$as_echo_n "checking for GNU gettext in libintl... " >&6; } +if eval "test \"\${$gt_func_gnugettext_libintl+set}\"" = set; then : $as_echo_n "(cached) " >&6 else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. + gt_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $INCINTL" + gt_save_LIBS="$LIBS" + LIBS="$LIBS $LIBINTL" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +$gt_revision_test_code +extern int _nl_msg_cat_cntr; +extern +#ifdef __cplusplus +"C" +#endif +const char *_nl_expand_alias (const char *); +int +main () +{ +bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$gt_func_gnugettext_libintl=yes" else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - + eval "$gt_func_gnugettext_libintl=no" fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then + LIBS="$LIBS $LIBICONV" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +$gt_revision_test_code +extern int _nl_msg_cat_cntr; +extern +#ifdef __cplusplus +"C" +#endif +const char *_nl_expand_alias (const char *); +int +main () +{ +bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + LIBINTL="$LIBINTL $LIBICONV" + LTLIBINTL="$LTLIBINTL $LTLIBICONV" + eval "$gt_func_gnugettext_libintl=yes" + fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi + CPPFLAGS="$gt_save_CPPFLAGS" + LIBS="$gt_save_LIBS" fi +eval ac_res=\$$gt_func_gnugettext_libintl + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + fi - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 + if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ + || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ + && test "$PACKAGE" != gettext-runtime \ + && test "$PACKAGE" != gettext-tools; }; then + gt_use_preinstalled_gnugettext=yes + else + LIBINTL= + LTLIBINTL= + INCINTL= + fi + + + + if test -n "$INTL_MACOSX_LIBS"; then + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" + LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" + fi + fi + + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + +$as_echo "#define ENABLE_NLS 1" >>confdefs.h + + else + USE_NLS=no + fi fi -done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5 +$as_echo_n "checking whether to use NLS... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 +$as_echo "$USE_NLS" >&6; } + if test "$USE_NLS" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5 +$as_echo_n "checking where the gettext function comes from... " >&6; } + if test "$gt_use_preinstalled_gnugettext" = "yes"; then + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then + gt_source="external libintl" + else + gt_source="libc" + fi + else + gt_source="included intl directory" + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5 +$as_echo "$gt_source" >&6; } + fi + + if test "$USE_NLS" = "yes"; then + + if test "$gt_use_preinstalled_gnugettext" = "yes"; then + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5 +$as_echo_n "checking how to link with libintl... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5 +$as_echo "$LIBINTL" >&6; } + + for element in $INCINTL; do + haveit= + for x in $CPPFLAGS; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" + fi done -IFS=$as_save_IFS -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi + fi - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB + +$as_echo "#define HAVE_GETTEXT 1" >>confdefs.h + + +$as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h + + fi + + POSUB=po fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi + + + + INTLLIBS="$LIBINTL" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - SET_MAKE= -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi +for ac_func in ppoll +do : + ac_fn_c_check_func "$LINENO" "ppoll" "ac_cv_func_ppoll" +if test "x$ac_cv_func_ppoll" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_PPOLL 1 +_ACEOF + +fi +done + if test "${enable_prologues+set}" != set; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if prologue searching should be the default" >&5 @@ -5693,7 +8696,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling with gcc -fstack-protector-all et al." >&5 $as_echo "$as_me: Compiling with gcc -fstack-protector-all et al." >&6;} CFLAGS="$save_CFLAGS -fstack-protector-all -D_FORTIFY_SOURCE=2" - CXFXLAGS="$save_CXXFLAGS -fstack-protector-all -D_FORTIFY_SOURCE=2" + CXXFLAGS="$save_CXXFLAGS -fstack-protector-all -D_FORTIFY_SOURCE=2" else { $as_echo "$as_me:${as_lineno-$LINENO}: Compiler does not support -fstack-protector-all et al." >&5 @@ -6262,54 +9265,7 @@ rm -f conftest.xml - -# Check whether --enable-server was given. -if test "${enable_server+set}" = set; then : - enableval=$enable_server; enable_server=$enableval -else - enable_server="check" -fi - -if test "$enable_server" != "no"; then - # Extract the first word of "certutil", so it can be a program name with args. -set dummy certutil; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_have_certutil+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$have_certutil"; then - ac_cv_prog_have_certutil="$have_certutil" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_have_certutil="yes" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_prog_have_certutil" && ac_cv_prog_have_certutil="no" -fi -fi -have_certutil=$ac_cv_prog_have_certutil -if test -n "$have_certutil"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_certutil" >&5 -$as_echo "$have_certutil" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /usr/include/nss3" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /usr/include/nss3" >&5 $as_echo_n "checking for /usr/include/nss3... " >&6; } if test "${ac_cv_file__usr_include_nss3+set}" = set; then : $as_echo_n "(cached) " >&6 @@ -6328,7 +9284,7 @@ nssdir=nss3 else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /usr/include/nss" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /usr/include/nss" >&5 $as_echo_n "checking for /usr/include/nss... " >&6; } if test "${ac_cv_file__usr_include_nss+set}" = set; then : $as_echo_n "(cached) " >&6 @@ -6350,7 +9306,7 @@ fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /usr/include/nspr4" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /usr/include/nspr4" >&5 $as_echo_n "checking for /usr/include/nspr4... " >&6; } if test "${ac_cv_file__usr_include_nspr4+set}" = set; then : $as_echo_n "(cached) " >&6 @@ -6369,7 +9325,7 @@ nsprdir=nspr4 else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /usr/include/nspr" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /usr/include/nspr" >&5 $as_echo_n "checking for /usr/include/nspr... " >&6; } if test "${ac_cv_file__usr_include_nspr+set}" = set; then : $as_echo_n "(cached) " >&6 @@ -6391,15 +9347,15 @@ fi - if test "x$nssdir" != "x" -a "x$nsprdir" != "x"; then - nss_CFLAGS="-I/usr/include/$nssdir" - nspr_CFLAGS="-I/usr/include/$nsprdir" +if test "x$nssdir" != "x" -a "x$nsprdir" != "x"; then + nss_CFLAGS="-I/usr/include/$nssdir" + nspr_CFLAGS="-I/usr/include/$nsprdir" - save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CFLAGS $nss_CFLAGS $nspr_CFLAGS" - have_nss_includes=yes - for ac_header in "$nsprdir/nspr.h" "$nsprdir/plgetopt.h" "$nsprdir/prerror.h" "$nssdir/ssl.h" "$nssdir/nss.h" "$nssdir/pk11func.h" "$nssdir/secerr.h" + save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CFLAGS $nss_CFLAGS $nspr_CFLAGS" + have_nss_includes=yes + for ac_header in "$nsprdir/nspr.h" "$nsprdir/plgetopt.h" "$nsprdir/prerror.h" "$nssdir/ssl.h" "$nssdir/nss.h" "$nssdir/pk11func.h" "$nssdir/secerr.h" do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" @@ -6414,9 +9370,10 @@ done - CPPFLAGS="$save_CPPFLAGS" - have_nss_libs=no - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PR_Connect in -lnspr4" >&5 + CPPFLAGS="$save_CPPFLAGS" + have_nss_libs=no +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PR_Connect in -lnspr4" >&5 $as_echo_n "checking for PR_Connect in -lnspr4... " >&6; } if test "${ac_cv_lib_nspr4_PR_Connect+set}" = set; then : $as_echo_n "(cached) " >&6 @@ -6454,7 +9411,7 @@ $as_echo "$ac_cv_lib_nspr4_PR_Connect" >&6; } if test "x$ac_cv_lib_nspr4_PR_Connect" = x""yes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_ReHandshake in -lssl3" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_ReHandshake in -lssl3" >&5 $as_echo_n "checking for SSL_ReHandshake in -lssl3... " >&6; } if test "${ac_cv_lib_ssl3_SSL_ReHandshake+set}" = set; then : $as_echo_n "(cached) " >&6 @@ -6497,21 +9454,57 @@ fi - fi - if test "x${have_nss_includes}${have_nss_libs}${have_certutil}" != "xyesyesyes"; then - if test "$enable_server" == "yes"; then - as_fn_error $? "cannot find all libraries or tools for systemtap compile client or server" "$LINENO" 5 - fi - if test "$enable_server" == "check"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: will not build systemtap client or server, cannot find all libraries or tools" >&5 -$as_echo "$as_me: WARNING: will not build systemtap client or server, cannot find all libraries or tools" >&2;} - fi - else +if test "x${have_nss_includes}${have_nss_libs}" = "xyesyes"; then $as_echo "#define HAVE_NSS 1" >>confdefs.h +fi + if test "x${have_nss_includes}${have_nss_libs}" == "xyesyes"; then + HAVE_NSS_TRUE= + HAVE_NSS_FALSE='#' +else + HAVE_NSS_TRUE='#' + HAVE_NSS_FALSE= +fi + + +# Check whether --enable-server was given. +if test "${enable_server+set}" = set; then : + enableval=$enable_server; enable_server=$enableval +else + enable_server="check" +fi + + +if test "$enable_server" != "no"; then + if test "x${have_nss_includes}" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: will not build systemtap compile server, cannot find nss/nspr headers" >&5 +$as_echo "$as_me: WARNING: will not build systemtap compile server, cannot find nss/nspr headers" >&2;} fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /usr/include/avahi-client" >&5 + if test "x${have_nss_libs}" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: will not build systemtap compile server, cannot find nss/nspr libraries" >&5 +$as_echo "$as_me: WARNING: will not build systemtap compile server, cannot find nss/nspr libraries" >&2;} + fi +fi + if test "x${have_nss_includes}${have_nss_libs}" == "xyesyes" -a "$enable_server" != "no"; then + BUILD_SERVER_TRUE= + BUILD_SERVER_FALSE='#' +else + BUILD_SERVER_TRUE='#' + BUILD_SERVER_FALSE= +fi + + +if test "x${have_nss_includes}" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: some compile server client functionality will be restricted, cannot find nss/nspr headers" >&5 +$as_echo "$as_me: WARNING: some compile server client functionality will be restricted, cannot find nss/nspr headers" >&2;} +fi +if test "x${have_nss_libs}" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: some compile server client functionality will be restricted, cannot find nss/nspr libraries" >&5 +$as_echo "$as_me: WARNING: some compile server client functionality will be restricted, cannot find nss/nspr libraries" >&2;} +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /usr/include/avahi-client" >&5 $as_echo_n "checking for /usr/include/avahi-client... " >&6; } if test "${ac_cv_file__usr_include_avahi_client+set}" = set; then : $as_echo_n "(cached) " >&6 @@ -6530,7 +9523,7 @@ avahi_clientdir=avahi-client fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /usr/include/avahi-common" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /usr/include/avahi-common" >&5 $as_echo_n "checking for /usr/include/avahi-common... " >&6; } if test "${ac_cv_file__usr_include_avahi_common+set}" = set; then : $as_echo_n "(cached) " >&6 @@ -6549,9 +9542,9 @@ avahi_commondir=avahi-common fi - if test "x$avahi_clientdir" != "x" -a "x$avahi_commondir" != "x"; then - have_avahi_includes=yes - for ac_header in "$avahi_clientdir/client.h" "$avahi_clientdir/lookup.h" "$avahi_commondir/simple-watch.h" "$avahi_commondir/malloc.h" "$avahi_commondir/error.h" +if test "x$avahi_clientdir" != "x" -a "x$avahi_commondir" != "x"; then + have_avahi_includes=yes + for ac_header in "$avahi_clientdir/client.h" "$avahi_clientdir/lookup.h" "$avahi_commondir/simple-watch.h" "$avahi_commondir/malloc.h" "$avahi_commondir/error.h" do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" @@ -6566,8 +9559,9 @@ done - have_avahi_libs=no - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for avahi_client_new in -lavahi-client" >&5 + have_avahi_libs=no +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for avahi_client_new in -lavahi-client" >&5 $as_echo_n "checking for avahi_client_new in -lavahi-client... " >&6; } if test "${ac_cv_lib_avahi_client_avahi_client_new+set}" = set; then : $as_echo_n "(cached) " >&6 @@ -6646,37 +9640,19 @@ fi - fi - if test "x${have_avahi_includes}${have_avahi_libs}" != "xyesyes"; then - if test "$enable_server" == "yes"; then - as_fn_error $? "cannot find all libraries or tools for systemtap compile client or server" "$LINENO" 5 - fi - if test "$enable_server" == "check"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: will not build systemtap internal client or server, cannot find all libraries or tools" >&5 -$as_echo "$as_me: WARNING: will not build systemtap internal client or server, cannot find all libraries or tools" >&2;} - fi - else +if test "x${have_avahi_includes}" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: some compile-server functionality will be restricted, cannot find avahi headers" >&5 +$as_echo "$as_me: WARNING: some compile-server functionality will be restricted, cannot find avahi headers" >&2;} +fi +if test "x${have_avahi_libs}" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: some compile-server functionality will be restricted, cannot find avahi libraries" >&5 +$as_echo "$as_me: WARNING: some compile-server functionality will be restricted, cannot find avahi libraries" >&2;} +fi +if test "x${have_avahi_includes}${have_avahi_libs}" = "xyesyes"; then $as_echo "#define HAVE_AVAHI 1" >>confdefs.h - fi -fi - if test "x${have_nss_includes}${have_nss_libs}${have_certutil}" == "xyesyesyes" -a "$enable_server" != "no"; then - BUILD_SERVER_TRUE= - BUILD_SERVER_FALSE='#' -else - BUILD_SERVER_TRUE='#' - BUILD_SERVER_FALSE= -fi - - if test "x${have_nss_includes}${have_nss_libs}${have_certutil}" == "xyesyesyes"; then - HAVE_NSS_TRUE= - HAVE_NSS_FALSE='#' -else - HAVE_NSS_TRUE='#' - HAVE_NSS_FALSE= fi - if test "x${have_avahi_includes}${have_avahi_libs}" == "xyesyes"; then HAVE_AVAHI_TRUE= HAVE_AVAHI_FALSE='#' @@ -7149,7 +10125,6 @@ - # Check whether --with-rpm was given. if test "${with_rpm+set}" = set; then : withval=$with_rpm; @@ -7205,9 +10180,60 @@ have_librpm="no" fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rpmFreeCrypto in -lrpmio" >&5 +$as_echo_n "checking for rpmFreeCrypto in -lrpmio... " >&6; } +if test "${ac_cv_lib_rpmio_rpmFreeCrypto+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lrpmio $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char rpmFreeCrypto (); +int +main () +{ +return rpmFreeCrypto (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_rpmio_rpmFreeCrypto=yes +else + ac_cv_lib_rpmio_rpmFreeCrypto=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rpmio_rpmFreeCrypto" >&5 +$as_echo "$ac_cv_lib_rpmio_rpmFreeCrypto" >&6; } +if test "x$ac_cv_lib_rpmio_rpmFreeCrypto" = x""yes; then : + + +$as_echo "#define HAVE_LIBRPMIO 1" >>confdefs.h + + stap_LIBS="$stap_LIBS -lrpmio" + have_librpmio="yes" +else + have_librpmio="no" +fi + if test "x$have_librpm" != "xyes" -a "$with_rpm" == "yes"; then as_fn_error $? "cannot find librpm" "$LINENO" 5 fi + if test "x$have_librpmio" != "xyes" -a "$with_rpm" == "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find librpmio" >&5 +$as_echo "$as_me: WARNING: cannot find librpmio" >&2;} + fi fi @@ -7336,9 +10362,9 @@ as_fn_error $? "missing elfutils development headers/libraries (install elfutils-devel, libebl-dev, libdw-dev and/or libebl-devel)" "$LINENO" 5 fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dwarf_getelf in -ldw" >&5 -$as_echo_n "checking for dwarf_getelf in -ldw... " >&6; } -if test "${ac_cv_lib_dw_dwarf_getelf+set}" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dwarf_getcfi_elf in -ldw" >&5 +$as_echo_n "checking for dwarf_getcfi_elf in -ldw... " >&6; } +if test "${ac_cv_lib_dw_dwarf_getcfi_elf+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -7352,27 +10378,27 @@ #ifdef __cplusplus extern "C" #endif -char dwarf_getelf (); +char dwarf_getcfi_elf (); int main () { -return dwarf_getelf (); +return dwarf_getcfi_elf (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dw_dwarf_getelf=yes + ac_cv_lib_dw_dwarf_getcfi_elf=yes else - ac_cv_lib_dw_dwarf_getelf=no + ac_cv_lib_dw_dwarf_getcfi_elf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dw_dwarf_getelf" >&5 -$as_echo "$ac_cv_lib_dw_dwarf_getelf" >&6; } -if test "x$ac_cv_lib_dw_dwarf_getelf" = x""yes; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dw_dwarf_getcfi_elf" >&5 +$as_echo "$ac_cv_lib_dw_dwarf_getcfi_elf" >&6; } +if test "x$ac_cv_lib_dw_dwarf_getcfi_elf" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDW 1 _ACEOF @@ -7381,7 +10407,7 @@ else - as_fn_error $? "elfutils, libdw too old, need 0.126+" "$LINENO" 5 + as_fn_error $? "elfutils, libdw too old, need 0.142+" "$LINENO" 5 fi stap_LIBS="$stap_LIBS -Wl,--start-group -ldw $ebl_LIBS -Wl,--end-group -lelf" @@ -7487,7 +10513,7 @@ stap_cv_sectionq=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -CFLAGS="$oldCFLAGS" +CFLAGS="$old_CFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $stap_cv_sectionq" >&5 $as_echo "$stap_cv_sectionq" >&6; } @@ -7496,8 +10522,7 @@ if test $stap_cv_sectionq = yes; then support_section_question=1 fi -ac_config_files="$ac_config_files includes/sys/sdt-config.h" - +ac_config_files="$ac_config_files includes/sys/sdt-config.h po/Makefile.in" if test $build_elfutils = yes -a $enable_translator = yes; then @@ -7546,42 +10571,22 @@ CFLAGS="${CFLAGS/-Wall/} $gnu89_inline_flag" \ LDFLAGS="$LDFLAGS $elfutils_rpath" && if test -f ${elfutils_srcdir}/config/version.h.in; then - echo Trying to install elfutils version header... - make install-pkgincludeHEADERS + echo Found elfutils/version.h header... + else + echo elfutils/version.h header not found, need elfutils 0.142+... + exit -1 fi - # so that elfutils/version.h - available from 0.138 - may be found. - # Don't use install-data because that will fail (installing in $prefix). ) - if test $? != 0; then exit; fi - save_CPPFLAGS=${CPPFLAGS} - CPPFLAGS="${CPPFLAGS} -Iinclude-elfutils" # in case bundled elfutils - for ac_header in elfutils/version.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "elfutils/version.h" "ac_cv_header_elfutils_version_h" "$ac_includes_default" -if test "x$ac_cv_header_elfutils_version_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_ELFUTILS_VERSION_H 1 -_ACEOF - + if test $? != 0; then exit -1; fi fi -done +ENABLE_NLS="$USE_NLS" - CPPFLAGS="$save_CPPFLAGS" -else - for ac_header in elfutils/version.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "elfutils/version.h" "ac_cv_header_elfutils_version_h" "$ac_includes_default" -if test "x$ac_cv_header_elfutils_version_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_ELFUTILS_VERSION_H 1 -_ACEOF +localedir="$localedir" -fi +LOCALEDIR="$localedir" -done -fi stap_prefix=$prefix test "$stap_prefix" = NONE && stap_prefix=$ac_default_prefix @@ -7590,10 +10595,12 @@ #define STAP_PREFIX "$stap_prefix" _ACEOF +STAP_PREFIX="$stap_prefix" + ac_config_headers="$ac_config_headers config.h:config.in" -ac_config_files="$ac_config_files Makefile doc/Makefile doc/beginners/Makefile doc/SystemTap_Tapset_Reference/Makefile grapher/Makefile grapher/stapgraph.1 stappaths.7 stap-server.8 initscript/systemtap initscript/stap-server" +ac_config_files="$ac_config_files Makefile doc/Makefile doc/beginners/Makefile doc/SystemTap_Tapset_Reference/Makefile grapher/Makefile grapher/stapgraph.1 stappaths.7 initscript/systemtap initscript/stap-server" @@ -7732,6 +10739,10 @@ as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -7768,14 +10779,14 @@ as_fn_error $? "conditional \"BUILD_PDFREFDOCS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${BUILD_SERVER_TRUE}" && test -z "${BUILD_SERVER_FALSE}"; then - as_fn_error $? "conditional \"BUILD_SERVER\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi if test -z "${HAVE_NSS_TRUE}" && test -z "${HAVE_NSS_FALSE}"; then as_fn_error $? "conditional \"HAVE_NSS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${BUILD_SERVER_TRUE}" && test -z "${BUILD_SERVER_FALSE}"; then + as_fn_error $? "conditional \"BUILD_SERVER\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${HAVE_AVAHI_TRUE}" && test -z "${HAVE_AVAHI_FALSE}"; then as_fn_error $? "conditional \"HAVE_AVAHI\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -8196,7 +11207,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by systemtap $as_me 1.4, which was +This file was extended by systemtap $as_me 1.6, which was generated by GNU Autoconf 2.66. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -8256,13 +11267,13 @@ Configuration commands: $config_commands -Report bugs to ." +Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -systemtap config.status 1.4 +systemtap config.status 1.6 configured by $0, generated by GNU Autoconf 2.66, with options \\"\$ac_cs_config\\" @@ -8376,6 +11387,13 @@ # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" +# Capture the value of obsolete ALL_LINGUAS because we need it to compute + # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it + # from automake < 1.5. + eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' + # Capture the value of LINGUAS because we need it to compute CATALOGS. + LINGUAS="${LINGUAS-%UNSET%}" + _ACEOF @@ -8386,7 +11404,9 @@ do case $ac_config_target in "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;; "includes/sys/sdt-config.h") CONFIG_FILES="$CONFIG_FILES includes/sys/sdt-config.h" ;; + "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; @@ -8395,7 +11415,6 @@ "grapher/Makefile") CONFIG_FILES="$CONFIG_FILES grapher/Makefile" ;; "grapher/stapgraph.1") CONFIG_FILES="$CONFIG_FILES grapher/stapgraph.1" ;; "stappaths.7") CONFIG_FILES="$CONFIG_FILES stappaths.7" ;; - "stap-server.8") CONFIG_FILES="$CONFIG_FILES stap-server.8" ;; "initscript/systemtap") CONFIG_FILES="$CONFIG_FILES initscript/systemtap" ;; "initscript/stap-server") CONFIG_FILES="$CONFIG_FILES initscript/stap-server" ;; "run-stap") CONFIG_FILES="$CONFIG_FILES run-stap" ;; @@ -9089,6 +12108,119 @@ done } ;; + "po-directories":C) + for ac_file in $CONFIG_FILES; do + # Support "outfile[:infile[:infile...]]" + case "$ac_file" in + *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + esac + # PO directories have a Makefile.in generated from Makefile.in.in. + case "$ac_file" in */Makefile.in) + # Adjust a relative srcdir. + ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` + ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" + ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` + # In autoconf-2.13 it is called $ac_given_srcdir. + # In autoconf-2.50 it is called $srcdir. + test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" + case "$ac_given_srcdir" in + .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; + /*) top_srcdir="$ac_given_srcdir" ;; + *) top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + # Treat a directory as a PO directory if and only if it has a + # POTFILES.in file. This allows packages to have multiple PO + # directories under different names or in different locations. + if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then + rm -f "$ac_dir/POTFILES" + test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" + cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" + POMAKEFILEDEPS="POTFILES.in" + # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend + # on $ac_dir but don't depend on user-specified configuration + # parameters. + if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then + # The LINGUAS file contains the set of available languages. + if test -n "$OBSOLETE_ALL_LINGUAS"; then + test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" + fi + ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` + # Hide the ALL_LINGUAS assigment from automake < 1.5. + eval 'ALL_LINGUAS''=$ALL_LINGUAS_' + POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" + else + # The set of available languages was given in configure.in. + # Hide the ALL_LINGUAS assigment from automake < 1.5. + eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' + fi + # Compute POFILES + # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) + # Compute UPDATEPOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) + # Compute DUMMYPOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) + # Compute GMOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) + case "$ac_given_srcdir" in + .) srcdirpre= ;; + *) srcdirpre='$(srcdir)/' ;; + esac + POFILES= + UPDATEPOFILES= + DUMMYPOFILES= + GMOFILES= + for lang in $ALL_LINGUAS; do + POFILES="$POFILES $srcdirpre$lang.po" + UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" + DUMMYPOFILES="$DUMMYPOFILES $lang.nop" + GMOFILES="$GMOFILES $srcdirpre$lang.gmo" + done + # CATALOGS depends on both $ac_dir and the user's LINGUAS + # environment variable. + INST_LINGUAS= + if test -n "$ALL_LINGUAS"; then + for presentlang in $ALL_LINGUAS; do + useit=no + if test "%UNSET%" != "$LINGUAS"; then + desiredlanguages="$LINGUAS" + else + desiredlanguages="$ALL_LINGUAS" + fi + for desiredlang in $desiredlanguages; do + # Use the presentlang catalog if desiredlang is + # a. equal to presentlang, or + # b. a variant of presentlang (because in this case, + # presentlang can be used as a fallback for messages + # which are not translated in the desiredlang catalog). + case "$desiredlang" in + "$presentlang"*) useit=yes;; + esac + done + if test $useit = yes; then + INST_LINGUAS="$INST_LINGUAS $presentlang" + fi + done + fi + CATALOGS= + if test -n "$INST_LINGUAS"; then + for lang in $INST_LINGUAS; do + CATALOGS="$CATALOGS $lang.gmo" + done + fi + test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" + sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" + for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do + if test -f "$f"; then + case "$f" in + *.orig | *.bak | *~) ;; + *) cat "$f" >> "$ac_dir/Makefile" ;; + esac + fi + done + fi + ;; + esac + done ;; "run-stap":F) chmod +x run-stap ;; "dtrace":F) chmod +x dtrace ;; "doc/beginners":C) rm -f $ac_abs_top_builddir/doc/beginners/en-US $ac_abs_top_builddir/doc/beginners/build/en-US/testsuite && mkdir -p $ac_abs_top_builddir/doc/beginners/build/en-US && ln -s $ac_abs_top_srcdir/doc/SystemTap_Beginners_Guide/en-US $ac_abs_top_builddir/doc/beginners/en-US && ln -s $ac_abs_top_srcdir/testsuite $ac_abs_top_builddir/doc/beginners/build/en-US/testsuite ;; diff -Nru systemtap-1.4/configure.ac systemtap-1.6/configure.ac --- systemtap-1.4/configure.ac 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/configure.ac 2011-07-25 18:12:01.000000000 +0000 @@ -1,8 +1,9 @@ dnl configure.ac --- autoconf input file for systemtap dnl Process this file with autoconf to produce a configure script. -AC_INIT([systemtap], 1.4, systemtap@sources.redhat.com, systemtap) -dnl ^^^ see also NEWS, systemtap.spec, testsuite/configure.ac +AC_INIT([systemtap], 1.6, systemtap@sourceware.org, systemtap) +dnl ^^^ see also NEWS, systemtap.spec, testsuite/configure.ac, +dnl runtime/staprun/configure.ac AC_PREREQ(2.59) AM_INIT_AUTOMAKE([no-dist foreign]) @@ -10,6 +11,7 @@ m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) +AC_USE_SYSTEM_EXTENSIONS AM_PROG_MKDIR_P AC_SUBST(MKDIR_P) AC_PROG_LN_S @@ -26,6 +28,9 @@ AC_PROG_MAKE_SET AC_SUBST(CFLAGS) AC_SUBST(CXXFLAGS) +AM_GNU_GETTEXT(external) +AM_GNU_GETTEXT_VERSION +AC_CHECK_FUNCS(ppoll) dnl Handle the prologues option. dnl @@ -65,10 +70,10 @@ save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS -Werror -fstack-protector-all -D_FORTIFY_SOURCE=2" CFLAGS="$CFLAGS -Werror -fstack-protector-all -D_FORTIFY_SOURCE=2" - AC_COMPILE_IFELSE([int something ();], [ + AC_COMPILE_IFELSE([AC_LANG_SOURCE([int something ();])], [ AC_MSG_NOTICE([Compiling with gcc -fstack-protector-all et al.]) CFLAGS="$save_CFLAGS -fstack-protector-all -D_FORTIFY_SOURCE=2" - CXFXLAGS="$save_CXXFLAGS -fstack-protector-all -D_FORTIFY_SOURCE=2"],[ + CXXFLAGS="$save_CXXFLAGS -fstack-protector-all -D_FORTIFY_SOURCE=2"],[ AC_MSG_NOTICE([Compiler does not support -fstack-protector-all et al.]) CFLAGS="$save_CFLAGS" CXXFLAGS="$save_CXXFLAGS"])]) @@ -97,7 +102,7 @@ CFLAGS="$CFLAGS -fPIE" CXXFLAGS="$CXXFLAGS -fPIE" LDFLAGS="$LDFLAGS -pie -Wl,-z,relro -Wl,-z,now" - AC_LINK_IFELSE([void main () {}], [ + AC_LINK_IFELSE([AC_LANG_SOURCE([void main () {}])], [ AC_MSG_NOTICE([Compiling with gcc pie et al.]) # LDFLAGS is special since it may be passed down to bundled-elfutils, # and interfere with the .so's built therein @@ -287,71 +292,78 @@ rm -f conftest.xml +dnl See if we have the nss/nspr headers and libraries +AC_CHECK_FILE([/usr/include/nss3], nssdir=nss3, [ + AC_CHECK_FILE([/usr/include/nss], nssdir=nss) +]) +AC_CHECK_FILE([/usr/include/nspr4], nsprdir=nspr4, [ + AC_CHECK_FILE([/usr/include/nspr], nsprdir=nspr) +]) +if test "x$nssdir" != "x" -a "x$nsprdir" != "x"; then + nss_CFLAGS="-I/usr/include/$nssdir" + nspr_CFLAGS="-I/usr/include/$nsprdir" + AC_SUBST(nss_CFLAGS) + AC_SUBST(nspr_CFLAGS) + save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CFLAGS $nss_CFLAGS $nspr_CFLAGS" + have_nss_includes=yes + AC_CHECK_HEADERS(["$nsprdir/nspr.h" "$nsprdir/plgetopt.h" "$nsprdir/prerror.h" "$nssdir/ssl.h" "$nssdir/nss.h" "$nssdir/pk11func.h" "$nssdir/secerr.h"], [], have_nss_includes=no) + CPPFLAGS="$save_CPPFLAGS" + have_nss_libs=no +fi +AC_CHECK_LIB(nspr4, PR_Connect, [ + AC_CHECK_LIB(ssl3, SSL_ReHandshake, have_nss_libs=yes) +]) +if test "x${have_nss_includes}${have_nss_libs}" = "xyesyes"; then + AC_DEFINE([HAVE_NSS], [1], [Define to 1 if you have the nss libraries.]) +fi +AM_CONDITIONAL([HAVE_NSS], [test "x${have_nss_includes}${have_nss_libs}" == "xyesyes"]) -dnl Handle the option to build the server setup. +dnl Handle the option to build the compile server. AC_ARG_ENABLE([server], AS_HELP_STRING([--enable-server], - [enable building of stap-server/client (default on if nss etc. found).]), + [enable building of stap-server (default on if nss etc. found).]), [enable_server=$enableval], [enable_server="check"]) + if test "$enable_server" != "no"; then -dnl Find the location of nss and nspr headers and certutil - AC_CHECK_PROG(have_certutil, certutil, [yes], [no]) - AC_CHECK_FILE([/usr/include/nss3], nssdir=nss3, [ - AC_CHECK_FILE([/usr/include/nss], nssdir=nss) - ]) - AC_CHECK_FILE([/usr/include/nspr4], nsprdir=nspr4, [ - AC_CHECK_FILE([/usr/include/nspr], nsprdir=nspr) - ]) - if test "x$nssdir" != "x" -a "x$nsprdir" != "x"; then - nss_CFLAGS="-I/usr/include/$nssdir" - nspr_CFLAGS="-I/usr/include/$nsprdir" - AC_SUBST(nss_CFLAGS) - AC_SUBST(nspr_CFLAGS) - save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CFLAGS $nss_CFLAGS $nspr_CFLAGS" - have_nss_includes=yes - AC_CHECK_HEADERS(["$nsprdir/nspr.h" "$nsprdir/plgetopt.h" "$nsprdir/prerror.h" "$nssdir/ssl.h" "$nssdir/nss.h" "$nssdir/pk11func.h" "$nssdir/secerr.h"], [], have_nss_includes=no) - CPPFLAGS="$save_CPPFLAGS" - have_nss_libs=no - AC_CHECK_LIB(nspr4, PR_Connect, [ - AC_CHECK_LIB(ssl3, SSL_ReHandshake, have_nss_libs=yes) - ]) - fi - if test "x${have_nss_includes}${have_nss_libs}${have_certutil}" != "xyesyesyes"; then - if test "$enable_server" == "yes"; then - AC_MSG_ERROR([cannot find all libraries or tools for systemtap compile client or server]) - fi - if test "$enable_server" == "check"; then - AC_MSG_WARN([will not build systemtap client or server, cannot find all libraries or tools]) - fi - else - AC_DEFINE([HAVE_NSS], [1], [Define to 1 if you have the nss libraries.]) - fi -dnl Find the location of avahi-client headers and library - AC_CHECK_FILE([/usr/include/avahi-client], avahi_clientdir=avahi-client) - AC_CHECK_FILE([/usr/include/avahi-common], avahi_commondir=avahi-common) - if test "x$avahi_clientdir" != "x" -a "x$avahi_commondir" != "x"; then - have_avahi_includes=yes - AC_CHECK_HEADERS(["$avahi_clientdir/client.h" "$avahi_clientdir/lookup.h" "$avahi_commondir/simple-watch.h" "$avahi_commondir/malloc.h" "$avahi_commondir/error.h"], [], have_avahi_includes=no) - have_avahi_libs=no - AC_CHECK_LIB(avahi-client, avahi_client_new, - AC_CHECK_LIB(avahi-common, avahi_strerror, have_avahi_libs=yes)) - fi - if test "x${have_avahi_includes}${have_avahi_libs}" != "xyesyes"; then - if test "$enable_server" == "yes"; then - AC_MSG_ERROR([cannot find all libraries or tools for systemtap compile client or server]) - fi - if test "$enable_server" == "check"; then - AC_MSG_WARN([will not build systemtap internal client or server, cannot find all libraries or tools]) - fi - else - AC_DEFINE([HAVE_AVAHI], [1], [Define to 1 if you have the avahi libraries.]) +dnl See if we have enough libraries and tools to build the compile server + if test "x${have_nss_includes}" != "xyes"; then + AC_MSG_WARN([will not build systemtap compile server, cannot find nss/nspr headers]) + fi + if test "x${have_nss_libs}" != "xyes"; then + AC_MSG_WARN([will not build systemtap compile server, cannot find nss/nspr libraries]) fi fi -AM_CONDITIONAL([BUILD_SERVER], [test "x${have_nss_includes}${have_nss_libs}${have_certutil}" == "xyesyesyes" -a "$enable_server" != "no"]) -AM_CONDITIONAL([HAVE_NSS], [test "x${have_nss_includes}${have_nss_libs}${have_certutil}" == "xyesyesyes"]) -AM_CONDITIONAL([HAVE_AVAHI], [test "x${have_avahi_includes}${have_avahi_libs}" == "xyesyes"]) +AM_CONDITIONAL([BUILD_SERVER], [test "x${have_nss_includes}${have_nss_libs}" == "xyesyes" -a "$enable_server" != "no"]) + +if test "x${have_nss_includes}" != "xyes"; then + AC_MSG_WARN([some compile server client functionality will be restricted, cannot find nss/nspr headers]) +fi +if test "x${have_nss_libs}" != "xyes"; then + AC_MSG_WARN([some compile server client functionality will be restricted, cannot find nss/nspr libraries]) +fi + +dnl See if we have the avahi libraries and headers +AC_CHECK_FILE([/usr/include/avahi-client], avahi_clientdir=avahi-client) +AC_CHECK_FILE([/usr/include/avahi-common], avahi_commondir=avahi-common) +if test "x$avahi_clientdir" != "x" -a "x$avahi_commondir" != "x"; then + have_avahi_includes=yes + AC_CHECK_HEADERS(["$avahi_clientdir/client.h" "$avahi_clientdir/lookup.h" "$avahi_commondir/simple-watch.h" "$avahi_commondir/malloc.h" "$avahi_commondir/error.h"], [], have_avahi_includes=no) + have_avahi_libs=no +fi +AC_CHECK_LIB(avahi-client, avahi_client_new, + AC_CHECK_LIB(avahi-common, avahi_strerror, have_avahi_libs=yes)) +if test "x${have_avahi_includes}" != "xyes"; then + AC_MSG_WARN([some compile-server functionality will be restricted, cannot find avahi headers]) +fi +if test "x${have_avahi_libs}" != "xyes"; then + AC_MSG_WARN([some compile-server functionality will be restricted, cannot find avahi libraries]) +fi +if test "x${have_avahi_includes}${have_avahi_libs}" = "xyesyes"; then + AC_DEFINE([HAVE_AVAHI], [1], [Define to 1 if you have the avahi libraries.]) +fi +AM_CONDITIONAL([HAVE_AVAHI], [test "x${have_avahi_includes}${have_avahi_libs}" == "xyesyes"]) dnl Handle the optional grapher AC_ARG_ENABLE([grapher], @@ -399,7 +411,6 @@ dnl requirements are installed, enable the grapher. AM_CONDITIONAL([BUILD_GRAPHER], [test "x${have_grapher_reqs}" == "xyes" -a x"$enable_grapher" != "xno"]) - dnl Look for librpm. AC_ARG_WITH([rpm], [AS_HELP_STRING([--with-rpm], @@ -409,9 +420,16 @@ AC_DEFINE([HAVE_LIBRPM],[1],[have librpm]) stap_LIBS="$stap_LIBS -lrpm" have_librpm="yes"], [have_librpm="no"]) + AC_CHECK_LIB(rpmio, rpmFreeCrypto, [ + AC_DEFINE([HAVE_LIBRPMIO],[1],[have librpmio]) + stap_LIBS="$stap_LIBS -lrpmio" + have_librpmio="yes"], [have_librpmio="no"]) if test "x$have_librpm" != "xyes" -a "$with_rpm" == "yes"; then AC_MSG_ERROR([cannot find librpm]) fi + if test "x$have_librpmio" != "xyes" -a "$with_rpm" == "yes"; then + AC_MSG_WARN([cannot find librpmio]) + fi fi @@ -445,8 +463,8 @@ AC_CHECK_LIB(dw, dwfl_module_getsym,[],[ AC_MSG_ERROR([missing elfutils development headers/libraries (install elfutils-devel, libebl-dev, libdw-dev and/or libebl-devel)])], [-Wl,--start-group -ldw $ebl_LIBS -Wl,--end-group -lelf]) - AC_CHECK_LIB(dw, dwarf_getelf,[],[ - AC_MSG_ERROR([elfutils, libdw too old, need 0.126+])], + AC_CHECK_LIB(dw, dwarf_getcfi_elf,[],[ + AC_MSG_ERROR([elfutils, libdw too old, need 0.142+])], [-Wl,--start-group -ldw $ebl_LIBS -Wl,--end-group -lelf]) stap_LIBS="$stap_LIBS -Wl,--start-group -ldw $ebl_LIBS -Wl,--end-group -lelf" LIBS="$save_LIBS" @@ -480,7 +498,7 @@ AC_CACHE_CHECK([for assembler .section "?" flags support], stap_cv_sectionq, [ old_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wa,--fatal-warnings" -AC_COMPILE_IFELSE([asm(".section .note.foo,\"?\",\"note\"\n" +AC_COMPILE_IFELSE([AC_LANG_SOURCE([asm(".section .note.foo,\"?\",\"note\"\n" ".byte 1, 2, 3\n" ".previous\n" ".section .text,\"axG\",\"progbits\",foogroup,comdat\n" @@ -488,16 +506,15 @@ ".pushsection .note.foo,\"?\",\"note\"\n" ".byte 4, 5, 6\n" ".popsection\n" - ".byte 2\n");], + ".byte 2\n");])], stap_cv_sectionq=yes, stap_cv_sectionq=no) -CFLAGS="$oldCFLAGS"]) +CFLAGS="$old_CFLAGS"]) AC_SUBST(support_section_question) support_section_question=0 if test $stap_cv_sectionq = yes; then support_section_question=1 fi -AC_CONFIG_FILES([includes/sys/sdt-config.h]) - +AC_CONFIG_FILES([includes/sys/sdt-config.h po/Makefile.in]) if test $build_elfutils = yes -a $enable_translator = yes; then case "$with_elfutils" in @@ -511,7 +528,7 @@ CXXFLAGS="$CXXFLAGS -fgnu89-inline" CFLAGS="$CFLAGS -fgnu89-inline" gnu89_inline_flag="" - AC_COMPILE_IFELSE([int something ();], [ + AC_COMPILE_IFELSE([AC_LANG_SOURCE([int something ();])], [ AC_MSG_NOTICE([Compiling elfutils with gcc -fgnu89-inline]) gnu89_inline_flag="-fgnu89-inline"],[ AC_MSG_NOTICE([Compiler does not support -fgnu89-inline])]) @@ -533,29 +550,29 @@ CFLAGS="${CFLAGS/-Wall/} $gnu89_inline_flag" \ LDFLAGS="$LDFLAGS $elfutils_rpath" && if test -f ${elfutils_srcdir}/config/version.h.in; then - echo Trying to install elfutils version header... - make install-pkgincludeHEADERS + echo Found elfutils/version.h header... + else + echo elfutils/version.h header not found, need elfutils 0.142+... + exit -1 fi - # so that elfutils/version.h - available from 0.138 - may be found. - # Don't use install-data because that will fail (installing in $prefix). ) - if test $? != 0; then exit; fi - save_CPPFLAGS=${CPPFLAGS} - CPPFLAGS="${CPPFLAGS} -Iinclude-elfutils" # in case bundled elfutils - AC_CHECK_HEADERS([elfutils/version.h]) - CPPFLAGS="$save_CPPFLAGS" -else - AC_CHECK_HEADERS([elfutils/version.h]) + if test $? != 0; then exit -1; fi fi +AC_SUBST(ENABLE_NLS, "$USE_NLS") +AC_SUBST(localedir, "$localedir") +AC_SUBST(LOCALEDIR, "$localedir") + dnl This is here mainly to make sure that configure --prefix=... changes dnl the config.h files so files depending on it are recompiled dnl prefix is passed through indirectly in the Makefile.am AM_CPPFLAGS. dnl Formerly: Don't use this directly (when not given it is set to NONE). dnl Currently: inline autoconf's later defaulting + stap_prefix=$prefix test "$stap_prefix" = NONE && stap_prefix=$ac_default_prefix AC_DEFINE_UNQUOTED(STAP_PREFIX, "$stap_prefix", [configure prefix location]) +AC_SUBST(STAP_PREFIX, "$stap_prefix") AC_CONFIG_HEADERS([config.h:config.in]) AC_CONFIG_FILES([Makefile doc/Makefile \ @@ -563,7 +580,6 @@ grapher/Makefile \ grapher/stapgraph.1 \ stappaths.7 \ -stap-server.8 \ initscript/systemtap initscript/stap-server ]) AC_CONFIG_SUBDIRS(testsuite runtime/staprun) if test $enable_translator == "yes"; then diff -Nru systemtap-1.4/COPYING systemtap-1.6/COPYING --- systemtap-1.4/COPYING 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/COPYING 2011-07-25 18:12:01.000000000 +0000 @@ -1,12 +1,12 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. - Preamble + Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public @@ -15,7 +15,7 @@ General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to +the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not @@ -55,8 +55,8 @@ The precise terms and conditions for copying, distribution and modification follow. - - GNU GENERAL PUBLIC LICENSE + + GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains @@ -110,7 +110,7 @@ License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) - + These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in @@ -168,7 +168,7 @@ access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. - + 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is @@ -225,7 +225,7 @@ This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. - + 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License @@ -255,7 +255,7 @@ of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. - NO WARRANTY + NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN @@ -277,9 +277,9 @@ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it @@ -303,17 +303,16 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: - Gnomovision version 69, Copyright (C) year name of author + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. @@ -336,5 +335,5 @@ This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General +library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. diff -Nru systemtap-1.4/coveragedb.cxx systemtap-1.6/coveragedb.cxx --- systemtap-1.4/coveragedb.cxx 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/coveragedb.cxx 2011-07-25 18:12:01.000000000 +0000 @@ -25,43 +25,43 @@ void print_coverage_info(systemtap_session &s) { // print out used probes - clog << "---- used probes-----" << endl; + clog << _("---- used probes-----") << endl; for (unsigned i=0; i used_probe_list; s.probes[i]->collect_derivation_chain(used_probe_list); for (unsigned j=0; jlocations.size(); ++k) - clog << "probe: " + clog << _("probe: ") << used_probe_list[j]->locations[k]->components.front()->tok->location << endl; } clog << "----" << endl; // for each probe print used and unused variables for (unsigned j=0; jlocals.size(); ++j) { - clog << "local: " << s.probes[i]->locals[j]->tok->location << endl; + clog << _("local: ") << s.probes[i]->locals[j]->tok->location << endl; } for (unsigned j=0; junused_locals.size(); ++j) { - clog << "unused_local: " + clog << _("unused_local: ") << s.probes[i]->unused_locals[j]->tok->location << endl; } } // print out unused probes - clog << "---- unused probes----- " << endl; + clog << _("---- unused probes----- ") << endl; for (unsigned i=0; i unused_probe_list; s.unused_probes[i]->collect_derivation_chain(unused_probe_list); for (unsigned j=0; jlocations.size(); ++k) - clog << "probe: " + clog << _("probe: ") << unused_probe_list[j]->locations[k]->components.front()->tok->location << endl; } } // print out used functions - clog << "---- used functions----- " << endl; + clog << _("---- used functions----- ") << endl; for (map::iterator it = s.functions.begin(); it != s.functions.end(); it++) { clog << "function: " << it->second->tok->location @@ -69,23 +69,23 @@ << endl; } // print out unused functions - clog << "---- unused functions----- " << endl; + clog << _("---- unused functions----- ") << endl; for (unsigned i=0; itok->location + clog << _("unused_function: ") << s.unused_functions[i]->tok->location << " " << s.unused_functions[i]->name << endl; } // print out used globals - clog << "---- used globals----- " << endl; + clog << _("---- used globals----- ") << endl; for (unsigned i=0; itok->location + clog << _("globals: ") << s.globals[i]->tok->location << " " << s.globals[i]->name << endl; } // print out unused globals - clog << "---- unused globals----- " << endl; + clog << _("---- unused globals----- ") << endl; for (unsigned i=0; itok->location + clog << _("globals: ") << s.unused_globals[i]->tok->location << " " << s.unused_globals[i]->name << endl; } @@ -107,7 +107,7 @@ &results, &rows, &columns, &errmsg); if(rc != SQLITE_OK) { - cerr << "Error in statement: " << command << " [" << errmsg << "]." + cerr << _("Error in statement: ") << command << " [" << errmsg << "]." << endl; } sqlite3_free_table(results); @@ -130,7 +130,7 @@ &results, &rows, &columns, &errmsg); if(rc != SQLITE_OK) { - cerr << "Error in statement: " << command << " [" << errmsg << "]." + cerr << _("Error in statement: ") << command << " [" << errmsg << "]." << endl; } sqlite3_free_table(results); @@ -148,7 +148,7 @@ ret = sqlite3_exec(db, stmt, 0, 0, &errmsg); if(ret != SQLITE_OK) { - cerr << "Error in statement: " << stmt << " [" << errmsg << "]." + cerr << _("Error in statement: ") << stmt << " [" << errmsg << "]." << endl; } } @@ -334,7 +334,7 @@ if( rc ){ cerr << "Can't open database: " << sqlite3_errmsg(db) << endl; sqlite3_close(db); - exit(EXIT_FAILURE); + return; } // lock the database diff -Nru systemtap-1.4/csclient.cxx systemtap-1.6/csclient.cxx --- systemtap-1.4/csclient.cxx 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/csclient.cxx 2011-07-25 18:12:01.000000000 +0000 @@ -1,6 +1,6 @@ /* Compile server client functions - Copyright (C) 2010 Red Hat Inc. + Copyright (C) 2010-2011 Red Hat Inc. This file is part of systemtap, and is free software. You can redistribute it and/or modify it under the terms of the GNU General @@ -9,6 +9,7 @@ */ #include "config.h" #include "session.h" +#include "cscommon.h" #include "csclient.h" #include "util.h" #include "stap-probe.h" @@ -20,7 +21,6 @@ #include #include #include -#include #include extern "C" { @@ -57,23 +57,37 @@ #include #include #include +} #include "nsscommon.h" -} #endif // HAVE_NSS using namespace std; +#define STAP_CSC_01 _("WARNING: The domain name, %s, does not match the DNS name(s) on the server certificate:\n") +#define STAP_CSC_02 _("could not find input file %s\n") +#define STAP_CSC_03 _("could not open input file %s\n") +#define STAP_CSC_04 _("Unable to open output file %s\n") +#define STAP_CSC_05 _("could not write to %s\n") + +extern "C" +void +nsscommon_error (const char *msg, int logit __attribute ((unused))) +{ + clog << msg << endl << flush; +} + // Information about compile servers. struct compile_server_info { compile_server_info () : port (0) {} - std::string host_name; - std::string ip_address; + string host_name; + string ip_address; unsigned short port; - std::string sysinfo; - std::string certinfo; + string version; + string sysinfo; + string certinfo; bool empty () const { @@ -95,6 +109,9 @@ // Compare the other fields only if they have both been set. if (this->port != 0 && that.port != 0 && this->port != that.port) return false; + if (! this->version.empty () && ! that.version.empty () && + this->version != that.version) + return false; if (! this->sysinfo.empty () && ! that.sysinfo.empty () && this->sysinfo != that.sysinfo) return false; @@ -103,10 +120,41 @@ return false; return true; } + + // Used to sort servers by preference for order of contact. The preferred server is + // "less" than the other one. + bool operator< (const compile_server_info &that) const + { + // Prefer servers with a later (higher) version number. + cs_protocol_version this_version (this->version.c_str ()); + cs_protocol_version that_version (that.version.c_str ()); + return that_version < this_version; + } }; ostream &operator<< (ostream &s, const compile_server_info &i); +static void +preferred_order (vector &servers) +{ + // Sort the given list of servers into the preferred order for contacting. + // Don't bother if there are less than 2 servers in the list. + if (servers.size () < 2) + return; + + // Sort the list using compile_server_info::operator< + sort (servers.begin (), servers.end ()); +} + +struct compile_server_cache +{ + vector default_servers; + vector specified_servers; + vector trusted_servers; + vector signing_servers; + vector online_servers; +}; + // For filtering queries. enum compile_server_properties { compile_server_all = 0x1, @@ -118,6 +166,7 @@ }; // Static functions. +static compile_server_cache* cscache(systemtap_session& s); static void query_server_status (systemtap_session &s, const string &status_string); static void get_server_info (systemtap_session &s, int pmask, vector &servers); @@ -141,23 +190,62 @@ #endif static void resolve_host (systemtap_session& s, compile_server_info &server, vector &servers); -#if HAVE_NSS -static const char *server_cert_nickname = "stap-server"; +/* Exit error codes */ +#define SUCCESS 0 +#define GENERAL_ERROR 1 +#define CA_CERT_INVALID_ERROR 2 +#define SERVER_CERT_EXPIRED_ERROR 3 + +// Convert the given string to an ip address in host byte order. +static unsigned +stringToIpAddress (const string &s) +{ + if (s.empty ()) + return 0; // unknown + + vectorcomponents; + tokenize (s, components, "."); + assert (components.size () >= 1); + + unsigned ip = 0; + unsigned i; + for (i = 0; i < components.size (); ++i) + { + const char *ipstr = components[i].c_str (); + char *estr; + errno = 0; + unsigned a = strtoul (ipstr, & estr, 10); + if (errno == 0 && *estr == '\0' && a <= UCHAR_MAX) + ip = (ip << 8) + a; + else + return 0; + } + + return ip; +} +#if HAVE_NSS +// ----------------------------------------------------- +// NSS related code used by the compile server client +// ----------------------------------------------------- static void add_server_trust (systemtap_session &s, const string &cert_db_path, const vector &server_list); static void revoke_server_trust (systemtap_session &s, const string &cert_db_path, const vector &server_list); static void get_server_info_from_db (systemtap_session &s, vector &servers, const string &cert_db_path); +static string global_client_cert_db_path () { + return SYSCONFDIR "/systemtap/ssl/client"; +} + static string -private_ssl_cert_db_path (const systemtap_session &s) +private_ssl_cert_db_path () { - return s.data_path + "/ssl/client"; + return local_client_cert_db_path (); } static string global_ssl_cert_db_path () { - return SYSCONFDIR "/systemtap/ssl/client"; + return global_client_cert_db_path (); } static string @@ -165,21 +253,507 @@ { return SYSCONFDIR "/systemtap/staprun"; } -#endif // HAVE_NSS + +/* Connection state. */ +typedef struct connectionState_t +{ + const char *hostName; + PRNetAddr addr; + PRUint16 port; + const char *infileName; + const char *outfileName; + const char *trustNewServerMode; +} connectionState_t; + +#if 0 /* No client authorization */ +static char * +myPasswd(PK11SlotInfo *info, PRBool retry, void *arg) +{ + char * passwd = NULL; + + if ( (!retry) && arg ) + passwd = PORT_Strdup((char *)arg); + + return passwd; +} +#endif + +/* Add the server's certificate to our database of trusted servers. */ +static SECStatus +trustNewServer (CERTCertificate *serverCert) +{ + SECStatus secStatus; + CERTCertTrust *trust = NULL; + PK11SlotInfo *slot = NULL; + + /* Import the certificate. */ + slot = PK11_GetInternalKeySlot(); + const char *nickname = server_cert_nickname (); + secStatus = PK11_ImportCert(slot, serverCert, CK_INVALID_HANDLE, nickname, PR_FALSE); + if (secStatus != SECSuccess) + goto done; + + /* Make it a trusted peer. */ + trust = (CERTCertTrust *)PORT_ZAlloc(sizeof(CERTCertTrust)); + if (! trust) + { + secStatus = SECFailure; + goto done; + } + + secStatus = CERT_DecodeTrustString(trust, "P,P,P"); + if (secStatus != SECSuccess) + goto done; + + secStatus = CERT_ChangeCertTrust(CERT_GetDefaultCertDB(), serverCert, trust); + +done: + if (slot) + PK11_FreeSlot (slot); + if (trust) + PORT_Free(trust); + return secStatus; +} + +/* Called when the server certificate verification fails. This gives us + the chance to trust the server anyway and add the certificate to the + local database. */ +static SECStatus +badCertHandler(void *arg, PRFileDesc *sslSocket) +{ + SECStatus secStatus; + PRErrorCode errorNumber; + CERTCertificate *serverCert = NULL; + SECItem subAltName; + PRArenaPool *tmpArena = NULL; + CERTGeneralName *nameList, *current; + char *expected = NULL; + const connectionState_t *connectionState = (connectionState_t *)arg; + + errorNumber = PR_GetError (); + switch (errorNumber) + { + case SSL_ERROR_BAD_CERT_DOMAIN: + /* Since we administer our own client-side databases of trustworthy + certificates, we don't need the domain name(s) on the certificate to + match. If the cert is in our database, then we can trust it. + Issue a warning and accept the certificate. */ + expected = SSL_RevealURL (sslSocket); + fprintf (stderr, STAP_CSC_01, expected); + + /* List the DNS names from the server cert as part of the warning. + First, find the alt-name extension on the certificate. */ + subAltName.data = NULL; + serverCert = SSL_PeerCertificate (sslSocket); + secStatus = CERT_FindCertExtension (serverCert, + SEC_OID_X509_SUBJECT_ALT_NAME, + & subAltName); + if (secStatus != SECSuccess || ! subAltName.data) + { + fprintf (stderr, _("Unable to find alt name extension on the server certificate\n")); + secStatus = SECSuccess; /* Not a fatal error */ + break; + } + + // Now, decode the extension. + tmpArena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); + if (! tmpArena) + { + fprintf (stderr, _("Out of memory\n")); + secStatus = SECSuccess; /* Not a fatal error here */ + break; + } + nameList = CERT_DecodeAltNameExtension (tmpArena, & subAltName); + SECITEM_FreeItem(& subAltName, PR_FALSE); + if (! nameList) + { + fprintf (stderr, _("Unable to decode alt name extension on server certificate\n")); + secStatus = SECSuccess; /* Not a fatal error */ + break; + } + + /* List the DNS names from the server cert as part of the warning. + The names are in a circular list. */ + current = nameList; + do + { + /* Make sure this is a DNS name. */ + if (current->type == certDNSName) + { + fprintf (stderr, " %.*s\n", + (int)current->name.other.len, current->name.other.data); + } + current = CERT_GetNextGeneralName (current); + } + while (current != nameList); + + /* Accept the certificate */ + secStatus = SECSuccess; + break; + + case SEC_ERROR_CA_CERT_INVALID: + /* The server's certificate is not trusted. Should we trust it? */ + secStatus = SECFailure; /* Do not trust by default. */ + if (! connectionState->trustNewServerMode) + break; + + /* Trust it for this session only? */ + if (strcmp (connectionState->trustNewServerMode, "session") == 0) + { + secStatus = SECSuccess; + break; + } + + /* Trust it permanently? */ + if (strcmp (connectionState->trustNewServerMode, "permanent") == 0) + { + /* The user wants to trust this server. Get the server's certificate so + and add it to our database. */ + serverCert = SSL_PeerCertificate (sslSocket); + if (serverCert != NULL) + { + secStatus = trustNewServer (serverCert); + } + } + break; + default: + secStatus = SECFailure; /* Do not trust this server */ + break; + } + + if (expected) + PORT_Free (expected); + if (tmpArena) + PORT_FreeArena (tmpArena, PR_FALSE); + + if (serverCert != NULL) + { + CERT_DestroyCertificate (serverCert); + } + + return secStatus; +} + +static PRFileDesc * +setupSSLSocket (connectionState_t *connectionState) +{ + PRFileDesc *tcpSocket; + PRFileDesc *sslSocket; + PRSocketOptionData socketOption; + PRStatus prStatus; + SECStatus secStatus; + + tcpSocket = PR_NewTCPSocket(); + if (tcpSocket == NULL) + goto loser; + + /* Make the socket blocking. */ + socketOption.option = PR_SockOpt_Nonblocking; + socketOption.value.non_blocking = PR_FALSE; + + prStatus = PR_SetSocketOption(tcpSocket, &socketOption); + if (prStatus != PR_SUCCESS) + goto loser; + + /* Import the socket into the SSL layer. */ + sslSocket = SSL_ImportFD(NULL, tcpSocket); + if (!sslSocket) + goto loser; + + /* Set configuration options. */ + secStatus = SSL_OptionSet(sslSocket, SSL_SECURITY, PR_TRUE); + if (secStatus != SECSuccess) + goto loser; + + secStatus = SSL_OptionSet(sslSocket, SSL_HANDSHAKE_AS_CLIENT, PR_TRUE); + if (secStatus != SECSuccess) + goto loser; + + /* Set SSL callback routines. */ +#if 0 /* no client authentication */ + secStatus = SSL_GetClientAuthDataHook(sslSocket, + (SSLGetClientAuthData)myGetClientAuthData, + (void *)certNickname); + if (secStatus != SECSuccess) + goto loser; +#endif +#if 0 /* Use the default */ + secStatus = SSL_AuthCertificateHook(sslSocket, + (SSLAuthCertificate)myAuthCertificate, + (void *)CERT_GetDefaultCertDB()); + if (secStatus != SECSuccess) + goto loser; +#endif + + secStatus = SSL_BadCertHook(sslSocket, (SSLBadCertHandler)badCertHandler, + connectionState); + if (secStatus != SECSuccess) + goto loser; + +#if 0 /* No handshake callback */ + secStatus = SSL_HandshakeCallback(sslSocket, myHandshakeCallback, NULL); + if (secStatus != SECSuccess) + goto loser; +#endif + + return sslSocket; + + loser: + if (tcpSocket) + PR_Close(tcpSocket); + return NULL; +} + + +static SECStatus +handle_connection (PRFileDesc *sslSocket, connectionState_t *connectionState) +{ + PRInt32 numBytes; + char *readBuffer; + PRFileInfo info; + PRFileDesc *local_file_fd; + PRStatus prStatus; + SECStatus secStatus = SECSuccess; + +#define READ_BUFFER_SIZE (60 * 1024) + + /* If we don't have both the input and output file names, then we're + contacting this server only in order to establish trust. In this case send + 0 as the file size and exit. */ + if (! connectionState->infileName || ! connectionState->outfileName) + { + numBytes = htonl ((PRInt32)0); + numBytes = PR_Write (sslSocket, & numBytes, sizeof (numBytes)); + if (numBytes < 0) + return SECFailure; + return SECSuccess; + } + + /* read and send the data. */ + /* Try to open the local file named. + * If successful, then write it to the server + */ + prStatus = PR_GetFileInfo(connectionState->infileName, &info); + if (prStatus != PR_SUCCESS || + info.type != PR_FILE_FILE || + info.size < 0) + { + fprintf (stderr, STAP_CSC_02, + connectionState->infileName); + return SECFailure; + } + + local_file_fd = PR_Open(connectionState->infileName, PR_RDONLY, 0); + if (local_file_fd == NULL) + { + fprintf (stderr, STAP_CSC_03, connectionState->infileName); + return SECFailure; + } + + /* Send the file size first, so the server knows when it has the entire file. */ + numBytes = htonl ((PRInt32)info.size); + numBytes = PR_Write(sslSocket, & numBytes, sizeof (numBytes)); + if (numBytes < 0) + { + PR_Close(local_file_fd); + return SECFailure; + } + + /* Transmit the local file across the socket. */ + numBytes = PR_TransmitFile(sslSocket, local_file_fd, + NULL, 0, + PR_TRANSMITFILE_KEEP_OPEN, + PR_INTERVAL_NO_TIMEOUT); + if (numBytes < 0) + { + PR_Close(local_file_fd); + return SECFailure; + } + + PR_Close(local_file_fd); + + /* read until EOF */ + readBuffer = (char *)PORT_Alloc(READ_BUFFER_SIZE); + if (! readBuffer) { + fprintf (stderr, _("Out of memory\n")); + return SECFailure; + } + + local_file_fd = PR_Open(connectionState->outfileName, PR_WRONLY | PR_CREATE_FILE | PR_TRUNCATE, + PR_IRUSR | PR_IWUSR | PR_IRGRP | PR_IWGRP | PR_IROTH); + if (local_file_fd == NULL) + { + fprintf (stderr, STAP_CSC_04, connectionState->outfileName); + return SECFailure; + } + while (PR_TRUE) + { + numBytes = PR_Read(sslSocket, readBuffer, READ_BUFFER_SIZE); + if (numBytes == 0) + break; /* EOF */ + + if (numBytes < 0) + { + secStatus = SECFailure; + break; + } + + /* Write to output file */ + numBytes = PR_Write(local_file_fd, readBuffer, numBytes); + if (numBytes < 0) + { + fprintf (stderr, STAP_CSC_05, connectionState->outfileName); + secStatus = SECFailure; + break; + } + } + + PR_Free(readBuffer); + PR_Close(local_file_fd); + + /* Caller closes the socket. */ + return secStatus; +} + +/* make the connection. +*/ +static SECStatus +do_connect (connectionState_t *connectionState) +{ + PRFileDesc *sslSocket; + PRStatus prStatus; + SECStatus secStatus; + + secStatus = SECSuccess; + + /* Set up SSL secure socket. */ + sslSocket = setupSSLSocket (connectionState); + if (sslSocket == NULL) + return SECFailure; + +#if 0 /* no client authentication */ + secStatus = SSL_SetPKCS11PinArg(sslSocket, password); + if (secStatus != SECSuccess) + goto done; +#endif + + secStatus = SSL_SetURL(sslSocket, connectionState->hostName); + if (secStatus != SECSuccess) + goto done; + + prStatus = PR_Connect(sslSocket, & connectionState->addr, PR_INTERVAL_NO_TIMEOUT); + if (prStatus != PR_SUCCESS) + { + secStatus = SECFailure; + goto done; + } + + /* Established SSL connection, ready to send data. */ + secStatus = SSL_ResetHandshake(sslSocket, /* asServer */ PR_FALSE); + if (secStatus != SECSuccess) + goto done; + + /* This is normally done automatically on the first I/O operation, + but doing it here catches any authentication problems early. */ + secStatus = SSL_ForceHandshake(sslSocket); + if (secStatus != SECSuccess) + goto done; + + // Connect to the server and make the request. + secStatus = handle_connection(sslSocket, connectionState); + + done: + prStatus = PR_Close(sslSocket); + return secStatus; +} + +int +client_connect (const char *hostName, PRUint32 ip, + PRUint16 port, + const char* infileName, const char* outfileName, + const char* trustNewServer) +{ + SECStatus secStatus; + PRStatus prStatus; + PRInt32 rv; + PRHostEnt hostEntry; + PRErrorCode errorNumber; + char buffer[PR_NETDB_BUF_SIZE]; + int attempt; + int errCode = GENERAL_ERROR; + struct connectionState_t connectionState; + + connectionState.hostName = hostName; + connectionState.port = port; + connectionState.infileName = infileName; + connectionState.outfileName = outfileName; + connectionState.trustNewServerMode = trustNewServer; + + /* Setup network connection. If we have an ip address, then + simply use it, otherwise we need to resolve the host name. */ + if (ip) + { + connectionState.addr.inet.family = PR_AF_INET; + connectionState.addr.inet.port = htons (port); + connectionState.addr.inet.ip = htonl (ip); + } + else + { + prStatus = PR_GetHostByName(hostName, buffer, sizeof (buffer), &hostEntry); + if (prStatus != PR_SUCCESS) { + fprintf (stderr, _("Unable to resolve server host name")); + return errCode; + } + + rv = PR_EnumerateHostEnt(0, &hostEntry, port, &connectionState.addr); + if (rv < 0) { + fprintf (stderr, _("Unable to resolve server host address")); + return errCode; + } + } + + /* Some errors (see below) represent a situation in which trying again + should succeed. However, don't try forever. */ + for (attempt = 0; attempt < 5; ++attempt) + { + secStatus = do_connect (& connectionState); + if (secStatus == SECSuccess) + return SUCCESS; + + errorNumber = PR_GetError (); + switch (errorNumber) + { + case PR_CONNECT_RESET_ERROR: + /* Server was not ready. */ + sleep (1); + break; /* Try again */ + case SEC_ERROR_EXPIRED_CERTIFICATE: + /* The server's certificate has expired. It should + generate a new certificate. Return now and we'll try again. */ + errCode = SERVER_CERT_EXPIRED_ERROR; + return errCode; + case SEC_ERROR_CA_CERT_INVALID: + /* The server's certificate is not trusted. The exit code must + reflect this. */ + errCode = CA_CERT_INVALID_ERROR; + return errCode; + default: + /* This error is fatal. */ + return errCode; + } + } + + return errCode; +} int compile_server_client::passes_0_4 () { PROBE1(stap, client__start, &s); -#if ! HAVE_NSS - // This code will never be called, if we don't have NSS, but it must still - // compile. - return 1; // Failure -#else // arguments parsed; get down to business if (s.verbose > 1) - clog << "Using a compile server" << endl; + clog << _("Using a compile server.") << endl; struct tms tms_before; times (& tms_before); @@ -227,11 +801,17 @@ // syntax errors, if any, are already printed if (s.verbose) { - clog << "Passes: via server " << s.winning_server << " " + string ws = s.winning_server; + if (ws == "") ws = "?"; + clog << _("Passes: via server ") << ws << " " << getmemusage() << TIMESPRINT << endl; } + if (rc) + { + clog << _("Passes: via server failed. Try again with another '-v' option.") << endl; + } if (rc == 0) { @@ -258,10 +838,8 @@ PROBE1(stap, client__end, &s); return rc; -#endif // HAVE_NSS } -#if HAVE_NSS // Initialize a client/server session. int compile_server_client::initialize () @@ -272,7 +850,7 @@ argc = 0; // Private location for server certificates. - private_ssl_dbs.push_back (private_ssl_cert_db_path (s)); + private_ssl_dbs.push_back (private_ssl_cert_db_path ()); // Additional public location. public_ssl_dbs.push_back (global_ssl_cert_db_path ()); @@ -283,7 +861,7 @@ if (rc != 0) { const char* e = strerror (errno); - cerr << "ERROR: cannot create temporary directory (\"" + clog << _("ERROR: cannot create temporary directory (\"") << client_tmpdir << "\"): " << e << endl; } @@ -295,7 +873,10 @@ int compile_server_client::create_request () { - int rc = 0; + // Add the current protocol version. + int rc = write_to_file (client_tmpdir + "/version", CURRENT_CS_PROTOCOL_VERSION); + if (rc != 0) + return rc; // Add the script file or script option if (s.script_file != "") @@ -308,7 +889,7 @@ if (rc != 0) { const char* e = strerror (errno); - cerr << "ERROR: cannot create temporary directory " + clog << _("ERROR: cannot create temporary directory ") << packaged_script_dir << ": " << e << endl; return rc; @@ -355,6 +936,11 @@ // Add the sysinfo file string sysinfo = "sysinfo: " + s.kernel_release + " " + s.architecture; rc = write_to_file (client_tmpdir + "/sysinfo", sysinfo); + if (rc != 0) + return rc; + + // Add localization data + rc = add_localization_variables(); return rc; } @@ -404,7 +990,7 @@ // directory under the given subdirectory. int compile_server_client::include_file_or_directory ( - const string &subdir, const string &path, const char *option + const string &subdir, const string &path ) { // Must predeclare these because we do use 'goto done' to @@ -436,6 +1022,16 @@ rpath = cpath; free (cpath); + // Including / would require special handling in the code below and + // is a bad idea anyway. Let's not allow it. + if (rpath == "/") + { + if (rpath != path) + clog << _F("%s resolves to %s\n", path.c_str (), rpath.c_str ()); + clog << _F("Unable to send %s to the server\n", path.c_str ()); + return 1; + } + // First create the requested subdirectory. name = client_tmpdir + "/" + subdir; rc = create_dir (name.c_str ()); @@ -462,21 +1058,14 @@ if (rc) goto done; } - // Name this file or directory in the packaged arguments along with any - // associated option. - if (option) - { - rc = add_package_arg (option); - if (rc) goto done; - } - + // Name this file or directory in the packaged arguments. rc = add_package_arg (subdir + "/" + rpath.substr (1)); done: if (rc != 0) { const char* e = strerror (errno); - cerr << "ERROR: unable to add " + clog << "ERROR: unable to add " << rpath << " to temp directory as " << name << ": " << e @@ -485,6 +1074,33 @@ return rc; } +// Add the localization variables to the server request +// package. +int +compile_server_client::add_localization_variables() +{ + int rc; + string envVar; + string fname; + + const set &locVars = localization_variables(); + set::iterator it; + + /* Note: We don't have to check for the contents of the environment + * variables here, since they will be checked extensively on the + * server. + */ + for (it = locVars.begin(); it != locVars.end(); it++) + { + char* var = getenv((*it).c_str()); + if (var) + envVar += *it + "=" + (string)var + "\n"; + } + fname = client_tmpdir + "/locale"; + rc = write_to_file(fname, envVar); + return rc; +} + // Package the client's temp directory into a form suitable for sending to the // server. int @@ -492,8 +1108,13 @@ { // Package up the temporary directory into a zip file. client_zipfile = client_tmpdir + ".zip"; - string cmd = "cd " + client_tmpdir + " && zip -qr " + client_zipfile + " *"; - int rc = stap_system (s.verbose, cmd); + string cmd = "cd " + cmdstr_quoted(client_tmpdir) + " && zip -qr " + + cmdstr_quoted(client_zipfile) + " *"; + vector sh_cmd; + sh_cmd.push_back("sh"); + sh_cmd.push_back("-c"); + sh_cmd.push_back(cmd); + int rc = stap_system (s.verbose, sh_cmd); return rc; } @@ -545,52 +1166,34 @@ unsigned limit = server_list.size (); if (limit == 0) { - cerr << "Unable to find a server" << endl; + clog << _("Unable to find a compile server.") << endl; return 1; } + // Sort the list of servers into a preferred order. + preferred_order (server_list); + // Now try each of the identified servers in turn. int rc = compile_using_server (server_list); - if (rc == 0) + if (rc == SUCCESS) return 0; // success! - return 1; // Failure - message already generated. -} - -// Temporary until the stap-client-connect program goes away. -extern "C" -int -client_main (const char *hostName, PRUint32 ip, PRUint16 port, - const char* infileName, const char* outfileName, - const char* trustNewServer); -#endif // HAVE_NSS - -// Convert the given string to an ip address in host byte order. -static unsigned -stringToIpAddress (const string &s) -{ - if (s.empty ()) - return 0; // unknown - - vectorcomponents; - tokenize (s, components, "."); - assert (components.size () >= 1); - - unsigned ip = 0; - unsigned i; - for (i = 0; i < components.size (); ++i) - { - const char *ipstr = components[i].c_str (); - char *estr; - errno = 0; - unsigned a = strtoul (ipstr, & estr, 10); - if (errno == 0 && *estr == '\0' && a <= UCHAR_MAX) - ip = (ip << 8) + a; - else - return 0; - } - - return ip; + // If the error was that a server's cert was expired, try again. This is because the server + // should generate a new cert which may be automatically trusted by us if it is our server. + // Give the server a chance to do this before retrying. + if (rc == SERVER_CERT_EXPIRED_ERROR) + { + if (s.verbose > 1) + clog << _("A server's certificate was expired. Trying again") << endl << flush; + sleep (2); + rc = compile_using_server (server_list); + if (rc == SUCCESS) + return 0; // success! + } + + // We were unable to use any available server + clog << _("Unable to connect to a server.") << endl; + return 1; // Failure } int @@ -598,10 +1201,7 @@ const vector &servers ) { - // This code will never be called if we don't have NSS, but it must still - // compile. -#if HAVE_NSS - // Make sure NSPR is initialized + // Make sure NSPR is initialized. Must be done before NSS is initialized s.NSPR_init (); // Attempt connection using each of the available client certificate @@ -610,7 +1210,8 @@ vector dbs = private_ssl_dbs; vector::iterator i = dbs.end(); dbs.insert (i, public_ssl_dbs.begin (), public_ssl_dbs.end ()); - int rc = 1; // assume failure + int rc = GENERAL_ERROR; // assume failure + bool serverCertExpired = false; for (i = dbs.begin (); i != dbs.end (); ++i) { // Make sure the database directory exists. It is not an error if it @@ -625,23 +1226,25 @@ // Initialize the NSS libraries. const char *cert_dir = i->c_str (); - SECStatus secStatus = NSS_InitReadWrite (cert_dir); + SECStatus secStatus = nssInit (cert_dir); if (secStatus != SECSuccess) { - // Try it again, readonly. - secStatus = NSS_Init(cert_dir); - if (secStatus != SECSuccess) - { - cerr << "Error initializing NSS" << endl; - nssError (); - NSS_Shutdown(); - continue; // try next database - } + // Message already issued. + continue; // try next database } - // All cipher suites except RSA_NULL_MD5 are enabled by Domestic Policy. - NSS_SetDomesticPolicy (); - + // Enable cipher suites which are allowed by U.S. export regulations. + // SSL_ClearSessionCache is required for the new settings to take effect. + secStatus = NSS_SetExportPolicy (); + SSL_ClearSessionCache (); + if (secStatus != SECSuccess) + { + clog << _("Unable to set NSS export policy"); + nssError (); + nssCleanup (cert_dir); + continue; // try next database + } + server_zipfile = s.tmpdir + "/server.zip"; // Try each server in turn. @@ -650,9 +1253,9 @@ ++j) { if (s.verbose > 1) - clog << "Attempting SSL connection with " << *j << endl - << " using certificates from the database in " << cert_dir - << endl; + clog << _F("Attempting SSL connection with %s\n" + " using certificates from the database in %s\n", + lex_cast(*j).c_str(), cert_dir); // The host name defaults to the ip address, if not specified. string hostName; @@ -664,12 +1267,12 @@ else hostName = j->host_name; - rc = client_main (hostName.c_str (), - stringToIpAddress (j->ip_address), - j->port, - client_zipfile.c_str(), server_zipfile.c_str (), - NULL/*trustNewServer_p*/); - if (rc == SECSuccess) + rc = client_connect (hostName.c_str (), + stringToIpAddress (j->ip_address), + j->port, + client_zipfile.c_str(), server_zipfile.c_str (), + NULL/*trustNewServer_p*/); + if (rc == SUCCESS) { s.winning_server = hostName + string(" [") + @@ -678,65 +1281,89 @@ break; // Success! } + // Server cert has expired. Try other servers and/or databases, but take note because + // server should generate a new certificate. If no other servers succeed, we'll try again + // in case the new cert works. + if (rc == SERVER_CERT_EXPIRED_ERROR) + { + serverCertExpired = true; + continue; + } + if (s.verbose > 1) { - clog << " Unable to connect: "; + clog << _(" Unable to connect: "); nssError (); } } - - NSS_Shutdown(); + + // SSL_ClearSessionCache is required before shutdown for client applications. + SSL_ClearSessionCache (); + nssCleanup (cert_dir); if (rc == SECSuccess) break; // Success! } - if (rc != SECSuccess) - cerr << "Unable to connect to a server" << endl; + // Indicate whether a server cert was expired, so we can try again, if desired. + if (rc != SUCCESS) + { + if (serverCertExpired) + rc = SERVER_CERT_EXPIRED_ERROR; + } return rc; -#endif // HAVE_NSS - - return 1; // Failure } -#if HAVE_NSS int compile_server_client::unpack_response () { // Unzip the response package. server_tmpdir = s.tmpdir + "/server"; - string cmd = "unzip -qd " + server_tmpdir + " " + server_zipfile; + vector cmd; + cmd.push_back("unzip"); + cmd.push_back("-qd"); + cmd.push_back(server_tmpdir); + cmd.push_back(server_zipfile); int rc = stap_system (s.verbose, cmd); if (rc != 0) { - cerr << "Unable to unzip the server reponse '" << server_zipfile << '\'' - << endl; + clog << _F("Unable to unzip the server response '%s'\n", server_zipfile.c_str()); + return rc; } + // Determine the server protocol version. + string filename = server_tmpdir + "/version"; + if (file_exists (filename)) + ::read_from_file (filename, server_version); + + // Warn about the shortcomings of this server, if it is down level. + show_server_compatibility (); + // If the server's response contains a systemtap temp directory, move // its contents to our temp directory. glob_t globbuf; string filespec = server_tmpdir + "/stap??????"; if (s.verbose > 2) - clog << "Searching \"" << filespec << "\"" << endl; + clog << _F("Searching \"%s\"\n", filespec.c_str()); int r = glob(filespec.c_str (), 0, NULL, & globbuf); if (r != GLOB_NOSPACE && r != GLOB_ABORTED && r != GLOB_NOMATCH) { if (globbuf.gl_pathc > 1) { - cerr << "Incorrect number of files in server response" << endl; - rc = 1; goto done; + clog << _("Incorrect number of files in server response") << endl; + rc = 1; + goto done; } assert (globbuf.gl_pathc == 1); string dirname = globbuf.gl_pathv[0]; if (s.verbose > 2) - clog << " found " << dirname << endl; + clog << _(" found ") << dirname << endl; filespec = dirname + "/*"; if (s.verbose > 2) - clog << "Searching \"" << filespec << "\"" << endl; + clog << _F("Searching \"%s\"\n", filespec.c_str()); int r = glob(filespec.c_str (), GLOB_PERIOD, NULL, & globbuf); if (r != GLOB_NOSPACE && r != GLOB_ABORTED && r != GLOB_NOMATCH) { @@ -749,27 +1376,38 @@ continue; string newname = s.tmpdir + "/" + oldname.substr (prefix_len); if (s.verbose > 2) - clog << " found " << oldname - << " -- linking from " << newname << endl; + clog << _F(" found %s -- linking from %s", oldname.c_str(), newname.c_str()); rc = symlink (oldname.c_str (), newname.c_str ()); if (rc != 0) { - cerr << "Unable to link '" << oldname - << "' to '" << newname << "': " - << strerror (errno) << endl; + clog << _F("Unable to link '%s' to '%s':%s\n", + oldname.c_str(), newname.c_str(), strerror(errno)); goto done; } } } } - // Remove the output line due to the synthetic server-side -k - cmd = "sed -i '/^Keeping temporary directory.*/ d' " + - server_tmpdir + "/stderr"; - stap_system (s.verbose, cmd); + // If the server version is less that 1.6, remove the output line due to the synthetic + // server-side -k. Look for a message containing the name of the temporary directory. + // We can look for the English message since server versions before 1.1 do not support + // localization. + if (server_version < "1.6") + { + cmd.clear(); + cmd.push_back("sed"); + cmd.push_back("-i"); + cmd.push_back("/^Keeping temporary directory.*/ d"); + cmd.push_back(server_tmpdir + "/stderr"); + stap_system (s.verbose, cmd); + } // Remove the output line due to the synthetic server-side -p4 - cmd = "sed -i '/^.*\\.ko$/ d' " + server_tmpdir + "/stdout"; + cmd.clear(); + cmd.push_back("sed"); + cmd.push_back("-i"); + cmd.push_back("/^.*\\.ko$/ d"); + cmd.push_back(server_tmpdir + "/stdout"); stap_system (s.verbose, cmd); done: @@ -793,20 +1431,20 @@ // The server should have returned a module. string filespec = s.tmpdir + "/*.ko"; if (s.verbose > 2) - clog << "Searching \"" << filespec << "\"" << endl; + clog << _F("Searching \"%s\"\n", filespec.c_str()); glob_t globbuf; int r = glob(filespec.c_str (), 0, NULL, & globbuf); if (r != GLOB_NOSPACE && r != GLOB_ABORTED && r != GLOB_NOMATCH) { if (globbuf.gl_pathc > 1) - cerr << "Incorrect number of modules in server response" << endl; + clog << _("Incorrect number of modules in server response") << endl; else { assert (globbuf.gl_pathc == 1); string modname = globbuf.gl_pathv[0]; if (s.verbose > 2) - clog << " found " << modname << endl; + clog << _(" found ") << modname << endl; // If a module name was not specified by the user, then set it to // be the one generated by the server. @@ -819,10 +1457,16 @@ } // If a uprobes.ko module was returned, then make note of it. - if (file_exists (s.tmpdir + "/server/uprobes.ko")) + string uprobes_ko; + if (server_version < "1.6") + uprobes_ko = s.tmpdir + "/server/uprobes.ko"; + else + uprobes_ko = s.tmpdir + "/uprobes/uprobes.ko"; + + if (file_exists (uprobes_ko)) { s.need_uprobes = true; - s.uprobes_path = s.tmpdir + "/server/uprobes.ko"; + s.uprobes_path = uprobes_ko; } } } @@ -830,7 +1474,7 @@ { if (rc == 0) { - cerr << "No module was returned by the server" << endl; + clog << _("No module was returned by the server.") << endl; rc = 1; } } @@ -839,7 +1483,7 @@ // Output stdout and stderr. filename = server_tmpdir + "/stderr"; - flush_to_stream (filename, cerr); + flush_to_stream (filename, clog); filename = server_tmpdir + "/stdout"; flush_to_stream (filename, cout); @@ -857,7 +1501,7 @@ ifstream f (fname.c_str ()); if (! f.good ()) { - cerr << "Unable to open file '" << fname << "' for reading: "; + clog << _F("Unable to open file '%s' for reading: ", fname.c_str()); goto error; } @@ -866,7 +1510,7 @@ f >> data; if (f.fail ()) { - cerr << "Unable to read from file '" << fname << "': "; + clog << _F("Unable to read from file '%s': ", fname.c_str()); goto error; } @@ -875,14 +1519,15 @@ error: if (errno) - cerr << strerror (errno) << endl; + clog << strerror (errno) << endl; else - cerr << "unknown error" << endl; + clog << _("unknown error") << endl; return 1; // Failure } +template int -compile_server_client::write_to_file (const string &fname, const string &data) +compile_server_client::write_to_file (const string &fname, const T &data) { // C++ streams may not set errno in the even of a failure. However if we // set it to 0 before each operation and it gets set during the operation, @@ -891,7 +1536,7 @@ ofstream f (fname.c_str ()); if (! f.good ()) { - cerr << "Unable to open file '" << fname << "' for writing: "; + clog << _F("Unable to open file '%s' for writing: ", fname.c_str()); goto error; } @@ -900,7 +1545,7 @@ errno = 0; if (f.fail ()) { - cerr << "Unable to write to file '" << fname << "': "; + clog << _F("Unable to write to file '%s': ", fname.c_str()); goto error; } @@ -909,9 +1554,9 @@ error: if (errno) - cerr << strerror (errno) << endl; + clog << strerror (errno) << endl; else - cerr << "unknown error" << endl; + clog << _("unknown error") << endl; return 1; // Failure } @@ -925,14 +1570,14 @@ ifstream f (fname.c_str ()); if (! f.good ()) { - cerr << "Unable to open file '" << fname << "' for reading: "; + clog << _F("Unable to open file '%s' for reading: ", fname.c_str()); goto error; } // Stream the data // NB: o << f.rdbuf() misbehaves for some reason, appearing to close o, - // which is unfortunate if o == cerr or cout. + // which is unfortunate if o == clog or cout. while (1) { errno = 0; @@ -947,419 +1592,108 @@ error: if (errno) - cerr << strerror (errno) << endl; + clog << strerror (errno) << endl; else - cerr << "unknown error" << endl; + clog << _("unknown error") << endl; return 1; // Failure } -#endif // HAVE_NSS -// Utility Functions. -//----------------------------------------------------------------------- -ostream &operator<< (ostream &s, const compile_server_info &i) +void +compile_server_client::show_server_compatibility () const { - s << " host="; - if (! i.host_name.empty ()) - s << i.host_name; - else - s << "unknown"; - s << " ip="; - if (! i.ip_address.empty ()) - s << i.ip_address; - else - s << "offline"; - s << " port="; - if (i.port != 0) - s << i.port; - else - s << "offline"; - s << " sysinfo=\""; - if (! i.sysinfo.empty ()) - s << i.sysinfo << '"'; - else - s << "unknown\""; - s << " certinfo=\""; - if (! i.certinfo.empty ()) - s << i.certinfo << '"'; - else - s << "unknown\""; - return s; + // Locale sensitivity was added in version 1.6 + if (server_version < "1.6") + { + clog << _F("Server protocol version is %s\n", server_version.v); + clog << _("The server does not use localization information passed by the client\n"); + } } -// Return the default server specification, used when none is given on the -// command line. -static string -default_server_spec (const systemtap_session &s) +// Issue a status message for when a server's trust is already in place. +static void +trust_already_in_place ( + const compile_server_info &server, + const vector &server_list, + const string cert_db_path, + bool revoking +) { - // If the --use-server option has been used - // the default is 'specified' - // otherwise if the --unprivileged has been used - // the default is online,trusted,compatible,signer - // otherwise - // the default is online,compatible - // - // Having said that, - // 'online' and 'compatible' will only succeed if we have avahi - // 'trusted' and 'signer' will only succeed if we have NSS - // - string working_string = "online,trusted,compatible"; - if (s.unprivileged) - working_string += ",signer"; - return working_string; -} + // What level of trust? + string purpose; + if (cert_db_path == signing_cert_db_path ()) + purpose = _("as a module signer for all users"); + else + { + purpose = _("as an SSL peer"); + if (cert_db_path == global_ssl_cert_db_path ()) + purpose += _(" for all users"); + else + purpose += _(" for the current user"); + } -static int -server_spec_to_pmask (const string &server_spec) -{ - // Construct a mask of the server properties that have been requested. - // The available properties are: - // trusted - servers which are trusted SSL peers. - // online - online servers. - // compatible - servers which compile for the current kernel release - // and architecture. - // signer - servers which are trusted module signers. - // specified - servers which have been specified using --use-server=XXX. - // If no servers have been specified, then this is - // equivalent to --list-servers=trusted,online,compatible. - // all - all trusted servers, trusted module signers, - // servers currently online and specified servers. - string working_spec = server_spec; - vector properties; - tokenize (working_spec, properties, ","); - int pmask = 0; - unsigned limit = properties.size (); + // Issue a message for each server in the list with the same certificate. + unsigned limit = server_list.size (); for (unsigned i = 0; i < limit; ++i) { - const string &property = properties[i]; - // Tolerate (and ignore) empty properties. - if (property.empty ()) + if (server.certinfo != server_list[i].certinfo) continue; - if (property == "all") - { - pmask |= compile_server_all; - } - else if (property == "specified") - { - pmask |= compile_server_specified; - } - else if (property == "trusted") - { - pmask |= compile_server_trusted; - } - else if (property == "online") - { - pmask |= compile_server_online; - } - else if (property == "compatible") - { - pmask |= compile_server_compatible; - } - else if (property == "signer") - { - pmask |= compile_server_signer; - } + clog << server_list[i] << _(" is already "); + if (revoking) + clog << _("untrusted ") << purpose << endl; else - { - cerr << "Warning: unsupported compile server property: " << property - << endl; - } + clog << _("trusted ") << purpose << endl; } - return pmask; -} - -void -query_server_status (systemtap_session &s) -{ - // Make sure NSPR is initialized - s.NSPR_init (); - - unsigned limit = s.server_status_strings.size (); - for (unsigned i = 0; i < limit; ++i) - query_server_status (s, s.server_status_strings[i]); } +// Add the given servers to the given database of trusted servers. static void -query_server_status (systemtap_session &s, const string &status_string) +add_server_trust ( + systemtap_session &s, + const string &cert_db_path, + const vector &server_list +) { - // If this string is empty, then the default is "specified" - string working_string = status_string; - if (working_string.empty ()) - working_string = "specified"; - - // If the query is "specified" and no servers have been specified - // (i.e. --use-server not used or used with no argument), then - // use the default query. - // TODO: This may not be necessary. The underlying queries should handle - // "specified" properly. - if (working_string == "specified" && - (s.specified_servers.empty () || - (s.specified_servers.size () == 1 && s.specified_servers[0].empty ()))) - working_string = default_server_spec (s); + // Get a list of servers already trusted. This opens the database, so do it + // before we open it for our own purposes. + vector already_trusted; + get_server_info_from_db (s, already_trusted, cert_db_path); - int pmask = server_spec_to_pmask (working_string); + // Make sure the given path exists. + if (create_dir (cert_db_path.c_str (), 0755) != 0) + { + clog << _F("Unable to find or create the client certificate database directory %s: ", cert_db_path.c_str()); + perror (""); + return; + } - // Now obtain a list of the servers which match the criteria. - vector raw_servers; - get_server_info (s, pmask, raw_servers); + // Must predeclare this because of jumps to cleanup: below. + vector processed_certs; - // Augment the listing with as much information as possible by adding - // information from known servers. - vector servers; - get_all_server_info (s, servers); - keep_common_server_info (raw_servers, servers); + // Make sure NSPR is initialized. Must be done before NSS is initialized + s.NSPR_init (); - // Print the server information. Skip the empty entry at the head of the list. - clog << "Systemtap Compile Server Status for '" << working_string << '\'' - << endl; - bool found = false; - unsigned limit = servers.size (); - for (unsigned i = 0; i < limit; ++i) + // Initialize the NSS libraries -- read/write + SECStatus secStatus = nssInit (cert_db_path.c_str (), 1/*readwrite*/); + if (secStatus != SECSuccess) { - assert (! servers[i].empty ()); - // Don't list servers with no cert information. They may not actually - // exist. - // TODO: Could try contacting the server and obtaining it cert - if (servers[i].certinfo.empty ()) - continue; - clog << servers[i] << endl; - found = true; - } - if (! found) - clog << "No servers found" << endl; -} - -// Add or remove trust of the servers specified on the command line. -void -manage_server_trust (systemtap_session &s) -{ - // This function will never be called if we don't have NSS, but it must - // still compile. -#if HAVE_NSS - // Nothing to do if --trust-servers was not specified. - if (s.server_trust_spec.empty ()) - return; - - // Break up and analyze the trust specification. Recognized components are: - // ssl - trust the specified servers as ssl peers - // signer - trust the specified servers as module signers - // revoke - revoke the requested trust - // all-users - apply/revoke the requested trust for all users - // no-prompt - don't prompt the user for confirmation - vectorcomponents; - tokenize (s.server_trust_spec, components, ","); - bool ssl = false; - bool signer = false; - bool revoke = false; - bool all_users = false; - bool no_prompt = false; - bool error = false; - for (vector::const_iterator i = components.begin (); - i != components.end (); - ++i) - { - if (*i == "ssl") - ssl = true; - else if (*i == "signer") - { - if (geteuid () != 0) - { - cerr << "Only root can specify 'signer' on --trust-servers" << endl; - error = true; - } - else - signer = true; - } - else if (*i == "revoke") - revoke = true; - else if (*i == "all-users") - { - if (geteuid () != 0) - { - cerr << "Only root can specify 'all-users' on --trust-servers" << endl; - error = true; - } - else - all_users = true; - } - else if (*i == "no-prompt") - no_prompt = true; - else - cerr << "Warning: Unrecognized server trust specification: " << *i - << endl; - } - if (error) - return; - - // Make sure NSPR is initialized - s.NSPR_init (); - - // Now obtain the list of specified servers. - vector server_list; - get_specified_server_info (s, server_list, true/*no_default*/); - - // Did we identify any potential servers? - unsigned limit = server_list.size (); - if (limit == 0) - { - cerr << "No servers identified for trust" << endl; - return; - } - - // Create a string representing the request in English. - // If neither 'ssl' or 'signer' was specified, the default is 'ssl'. - if (! ssl && ! signer) - ssl = true; - ostringstream trustString; - if (ssl) - { - trustString << "as an SSL peer"; - if (all_users) - trustString << " for all users"; - else - trustString << " for the current user"; - } - if (signer) - { - if (ssl) - trustString << " and "; - trustString << "as a module signer for all users"; - } - - // Prompt the user to confirm what's about to happen. - if (no_prompt) - { - if (revoke) - clog << "Revoking trust "; - else - clog << "Adding trust "; - } - else - { - if (revoke) - clog << "Revoke trust "; - else - clog << "Add trust "; - } - clog << "in the following servers " << trustString.str (); - if (! no_prompt) - clog << '?'; - clog << endl; - for (unsigned i = 0; i < limit; ++i) - clog << " " << server_list[i] << endl; - if (! no_prompt) - { - clog << "[y/N] " << flush; - - // Only carry out the operation if the response is "yes" - string response; - cin >> response; - if (response[0] != 'y' && response [0] != 'Y') - { - clog << "Server trust unchanged" << endl; - return; - } - } - - // Now add/revoke the requested trust. - string cert_db_path; - if (ssl) - { - if (all_users) - cert_db_path = global_ssl_cert_db_path (); - else - cert_db_path = private_ssl_cert_db_path (s); - if (revoke) - revoke_server_trust (s, cert_db_path, server_list); - else - add_server_trust (s, cert_db_path, server_list); - } - if (signer) - { - cert_db_path = signing_cert_db_path (); - if (revoke) - revoke_server_trust (s, cert_db_path, server_list); - else - add_server_trust (s, cert_db_path, server_list); - } -#endif // HAVE_NSS -} - -#if HAVE_NSS -// Issue a status message for when a server's trust is already in place. -static void -trust_already_in_place ( - const compile_server_info &server, - const vector &server_list, - const string cert_db_path, - bool revoking -) -{ - // What level of trust? - string purpose; - if (cert_db_path == signing_cert_db_path ()) - purpose = "as a module signer for all users"; - else - { - purpose = "as an SSL peer"; - if (cert_db_path == global_ssl_cert_db_path ()) - purpose += " for all users"; - else - purpose += " for the current user"; - } - - // Issue a message for each server in the list with the same certificate. - unsigned limit = server_list.size (); - for (unsigned i = 0; i < limit; ++i) - { - if (server.certinfo != server_list[i].certinfo) - continue; - clog << server_list[i] << " is already "; - if (revoking) - clog << "un"; - clog << "trusted " << purpose << endl; - } -} - -// Add the given servers to the given database of trusted servers. -static void -add_server_trust ( - systemtap_session &s, - const string &cert_db_path, - const vector &server_list -) -{ - // Get a list of servers already trusted. This opens the database, so do it - // before we open it for our own purposes. - vector already_trusted; - get_server_info_from_db (s, already_trusted, cert_db_path); - - // Make sure the given path exists. - if (create_dir (cert_db_path.c_str (), 0755) != 0) - { - cerr << "Unable to find or create the client certificate database directory " - << cert_db_path << ": "; - perror (""); - return; + // Message already issued. + goto cleanup; } - // Must predeclare this because of jumps to cleanup: below. - vector processed_certs; - - // Initialize the NSS libraries -- read/write - SECStatus secStatus = NSS_InitReadWrite (cert_db_path.c_str ()); + // Enable cipher suites which are allowed by U.S. export regulations. + // SSL_ClearSessionCache is required for the new settings to take effect. + secStatus = NSS_SetExportPolicy (); + SSL_ClearSessionCache (); if (secStatus != SECSuccess) { - cerr << "Error initializing NSS for " << cert_db_path << endl; + clog << _("Unable to set NSS export policy"); nssError (); goto cleanup; } - - // All cipher suites except RSA_NULL_MD5 are enabled by Domestic Policy. - NSS_SetDomesticPolicy (); - + // Iterate over the servers to become trusted. Contact each one and // add it to the list of trusted servers if it is not already trusted. - // client_main will issue any error messages. + // client_connect will issue any error messages. for (vector::const_iterator server = server_list.begin(); server != server_list.end (); ++server) @@ -1383,26 +1717,28 @@ // number in order to contact the server. if (server->empty () || server->port == 0) continue; - int rc = client_main (server->host_name.c_str (), - stringToIpAddress (server->ip_address), - server->port, - NULL, NULL, "permanent"); - if (rc != SECSuccess) + int rc = client_connect (server->host_name.c_str (), + stringToIpAddress (server->ip_address), + server->port, + NULL, NULL, "permanent"); + if (rc != SUCCESS) { - cerr << "Unable to connect to " << *server << endl; + clog << _F("Unable to connect to %s", lex_cast(*server).c_str()) << endl; nssError (); } } cleanup: // Shutdown NSS. - NSS_Shutdown (); + // SSL_ClearSessionCache is required before shutdown for client applications. + SSL_ClearSessionCache (); + nssCleanup (cert_db_path.c_str ()); // Make sure the database files are readable. glob_t globbuf; string filespec = cert_db_path + "/*.db"; if (s.verbose > 2) - clog << "Searching \"" << filespec << "\"" << endl; + clog << _F("Searching \"%s\"\n", filespec.c_str()); int r = glob (filespec.c_str (), 0, NULL, & globbuf); if (r != GLOB_NOSPACE && r != GLOB_ABORTED && r != GLOB_NOMATCH) { @@ -1410,12 +1746,11 @@ { string filename = globbuf.gl_pathv[i]; if (s.verbose > 2) - clog << " found " << filename << endl; + clog << _(" found ") << filename << endl; if (chmod (filename.c_str (), 0644) != 0) { - cerr << "Warning: Unable to change permissions on " - << filename << ": "; + clog << _F("Warning: Unable to change permissions on %s: ", filename.c_str()); perror (""); } } @@ -1434,8 +1769,8 @@ if (! file_exists (cert_db_path)) { if (s.verbose > 1) - cerr << "Certificate database '" << cert_db_path << "' does not exist." - << endl; + clog << _F("Certificate database '%s' does not exist", + cert_db_path.c_str()) << endl; if (s.verbose) { for (vector::const_iterator server = server_list.begin(); @@ -1447,34 +1782,36 @@ } // Must predeclare these because of jumps to cleanup: below. - PK11SlotInfo *slot = NULL; CERTCertDBHandle *handle; PRArenaPool *tmpArena = NULL; CERTCertList *certs = NULL; CERTCertificate *db_cert; vector processed_certs; + const char *nickname; + + // Make sure NSPR is initialized. Must be done before NSS is initialized + s.NSPR_init (); // Initialize the NSS libraries -- read/write - SECStatus secStatus = NSS_InitReadWrite (cert_db_path.c_str ()); + SECStatus secStatus = nssInit (cert_db_path.c_str (), 1/*readwrite*/); if (secStatus != SECSuccess) { - cerr << "Error initializing NSS for " << cert_db_path << endl; - nssError (); + // Message already issued goto cleanup; } - slot = PK11_GetInternalKeySlot (); handle = CERT_GetDefaultCertDB(); // A memory pool to work in tmpArena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); if (! tmpArena) { - cerr << "Out of memory:"; + clog << _("Out of memory:"); nssError (); goto cleanup; } // Iterate over the servers to become untrusted. + nickname = server_cert_nickname (); for (vector::const_iterator server = server_list.begin(); server != server_list.end (); ++server) @@ -1492,7 +1829,7 @@ processed_certs.push_back (server->certinfo); // Search the client-side database of trusted servers. - db_cert = PK11_FindCertFromNickname (server_cert_nickname, NULL); + db_cert = PK11_FindCertFromNickname (nickname, NULL); if (! db_cert) { // No trusted servers. Not an error, but issue a status message. @@ -1511,72 +1848,512 @@ CERT_DestroyCertificate (db_cert); if (! certs) { - cerr << "Unable to query certificate database " << cert_db_path - << ": " << endl; - PORT_SetError (SEC_ERROR_LIBRARY_FAILURE); - nssError (); - goto cleanup; + clog << _F("Unable to query certificate database %s: ", + cert_db_path.c_str()) << endl; + PORT_SetError (SEC_ERROR_LIBRARY_FAILURE); + nssError (); + goto cleanup; + } + + // Find the certificate matching the one belonging to our server. + CERTCertListNode *node; + for (node = CERT_LIST_HEAD (certs); + ! CERT_LIST_END (node, certs); + node = CERT_LIST_NEXT (node)) + { + // The certificate we're working with. + db_cert = node->cert; + + // Get the serial number. + string serialNumber = get_cert_serial_number (db_cert); + + // Does the serial number match that of the current server? + if (serialNumber != server->certinfo) + continue; // goto next certificate + + // All is ok! Remove the certificate from the database. + break; + } // Loop over certificates in the database + + // Was a certificate matching the server found? */ + if (CERT_LIST_END (node, certs)) + { + // Not found. Server is already untrusted. + if (s.verbose) + trust_already_in_place (*server, server_list, cert_db_path, true/*revoking*/); + } + else + { + secStatus = SEC_DeletePermCertificate (db_cert); + if (secStatus != SECSuccess) + { + clog << _F("Unable to remove certificate from %s: ", + cert_db_path.c_str()) << endl; + nssError (); + } + } + CERT_DestroyCertList (certs); + certs = NULL; + } // Loop over servers + + cleanup: + if (certs) + CERT_DestroyCertList (certs); + if (tmpArena) + PORT_FreeArena (tmpArena, PR_FALSE); + + nssCleanup (cert_db_path.c_str ()); +} + +// Obtain information about servers from the certificates in the given database. +static void +get_server_info_from_db ( + systemtap_session &s, + vector &servers, + const string &cert_db_path +) +{ + // Make sure the given path exists. + if (! file_exists (cert_db_path)) + { + if (s.verbose > 1) + clog << _F("Certificate database '%s' does not exist.", + cert_db_path.c_str()) << endl; + return; + } + + // Make sure NSPR is initialized. Must be done before NSS is initialized + s.NSPR_init (); + + // Initialize the NSS libraries -- readonly + SECStatus secStatus = nssInit (cert_db_path.c_str ()); + if (secStatus != SECSuccess) + { + // Message already issued. + return; + } + + // Must predeclare this because of jumps to cleanup: below. + PRArenaPool *tmpArena = NULL; + CERTCertList *certs = get_cert_list_from_db (server_cert_nickname ()); + if (! certs) + { + if (s.verbose > 1) + clog << _F("No certificate found in database %s", cert_db_path.c_str ()) << endl; + goto cleanup; + } + + // A memory pool to work in + tmpArena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); + if (! tmpArena) + { + clog << _("Out of memory:"); + nssError (); + goto cleanup; + } + for (CERTCertListNode *node = CERT_LIST_HEAD (certs); + ! CERT_LIST_END (node, certs); + node = CERT_LIST_NEXT (node)) + { + compile_server_info server_info; + + // The certificate we're working with. + CERTCertificate *db_cert = node->cert; + + // Get the host name. It is in the alt-name extension of the + // certificate. + SECItem subAltName; + subAltName.data = NULL; + secStatus = CERT_FindCertExtension (db_cert, + SEC_OID_X509_SUBJECT_ALT_NAME, + & subAltName); + if (secStatus != SECSuccess || ! subAltName.data) + { + clog << _("Unable to find alt name extension on server certificate: ") << endl; + nssError (); + continue; + } + + // Decode the extension. + CERTGeneralName *nameList = CERT_DecodeAltNameExtension (tmpArena, & subAltName); + SECITEM_FreeItem(& subAltName, PR_FALSE); + if (! nameList) + { + clog << _("Unable to decode alt name extension on server certificate: ") << endl; + nssError (); + continue; + } + + // We're interested in the first alternate name. + assert (nameList->type == certDNSName); + server_info.host_name = string ((const char *)nameList->name.other.data, + nameList->name.other.len); + // Don't free nameList. It's part of the tmpArena. + + // Get the serial number. + server_info.certinfo = get_cert_serial_number (db_cert); + + // Our results will at a minimum contain this server. + add_server_info (server_info, servers); + + // Augment the list by querying all online servers and keeping the ones + // with the same cert serial number. + vector online_servers; + get_or_keep_online_server_info (s, online_servers, false/*keep*/); + keep_server_info_with_cert_and_port (s, server_info, online_servers); + add_server_info (online_servers, servers); + } + + cleanup: + if (certs) + CERT_DestroyCertList (certs); + if (tmpArena) + PORT_FreeArena (tmpArena, PR_FALSE); + + nssCleanup (cert_db_path.c_str ()); +} +#endif // HAVE_NSS + +// Utility Functions. +//----------------------------------------------------------------------- +ostream &operator<< (ostream &s, const compile_server_info &i) +{ + s << " host="; + if (! i.host_name.empty ()) + s << i.host_name; + else + s << "unknown"; + s << " ip="; + if (! i.ip_address.empty ()) + s << i.ip_address; + else + s << "offline"; + s << " port="; + if (i.port != 0) + s << i.port; + else + s << "offline"; + s << " sysinfo=\""; + if (! i.sysinfo.empty ()) + s << i.sysinfo << '"'; + else + s << "unknown\""; + s << " version="; + if (! i.version.empty ()) + s << i.version; + else + s << "unknown"; + s << " certinfo=\""; + if (! i.certinfo.empty ()) + s << i.certinfo << '"'; + else + s << "unknown\""; + return s; +} + +// Return the default server specification, used when none is given on the +// command line. +static string +default_server_spec (const systemtap_session &s) +{ + // If the --use-server option has been used + // the default is 'specified' + // otherwise if the --unprivileged has been used + // the default is online,trusted,compatible,signer + // otherwise + // the default is online,compatible + // + // Having said that, + // 'online' and 'compatible' will only succeed if we have avahi + // 'trusted' and 'signer' will only succeed if we have NSS + // + string working_string = "online,trusted,compatible"; + if (s.unprivileged) + working_string += ",signer"; + return working_string; +} + +static int +server_spec_to_pmask (const string &server_spec) +{ + // Construct a mask of the server properties that have been requested. + // The available properties are: + // trusted - servers which are trusted SSL peers. + // online - online servers. + // compatible - servers which compile for the current kernel release + // and architecture. + // signer - servers which are trusted module signers. + // specified - servers which have been specified using --use-server=XXX. + // If no servers have been specified, then this is + // equivalent to --list-servers=trusted,online,compatible. + // all - all trusted servers, trusted module signers, + // servers currently online and specified servers. + string working_spec = server_spec; + vector properties; + tokenize (working_spec, properties, ","); + int pmask = 0; + unsigned limit = properties.size (); + for (unsigned i = 0; i < limit; ++i) + { + const string &property = properties[i]; + // Tolerate (and ignore) empty properties. + if (property.empty ()) + continue; + if (property == "all") + { + pmask |= compile_server_all; + } + else if (property == "specified") + { + pmask |= compile_server_specified; + } + else if (property == "trusted") + { + pmask |= compile_server_trusted; + } + else if (property == "online") + { + pmask |= compile_server_online; + } + else if (property == "compatible") + { + pmask |= compile_server_compatible; + } + else if (property == "signer") + { + pmask |= compile_server_signer; + } + else + { + clog << _F("Warning: unsupported compile server property: %s", property.c_str()) + << endl; + } + } + return pmask; +} + +void +query_server_status (systemtap_session &s) +{ + unsigned limit = s.server_status_strings.size (); + for (unsigned i = 0; i < limit; ++i) + query_server_status (s, s.server_status_strings[i]); +} + +static void +query_server_status (systemtap_session &s, const string &status_string) +{ + // If this string is empty, then the default is "specified" + string working_string = status_string; + if (working_string.empty ()) + working_string = "specified"; + + // If the query is "specified" and no servers have been specified + // (i.e. --use-server not used or used with no argument), then + // use the default query. + // TODO: This may not be necessary. The underlying queries should handle + // "specified" properly. + if (working_string == "specified" && + (s.specified_servers.empty () || + (s.specified_servers.size () == 1 && s.specified_servers[0].empty ()))) + working_string = default_server_spec (s); + + int pmask = server_spec_to_pmask (working_string); + + // Now obtain a list of the servers which match the criteria. + vector raw_servers; + get_server_info (s, pmask, raw_servers); + + // Augment the listing with as much information as possible by adding + // information from known servers. + vector servers; + get_all_server_info (s, servers); + keep_common_server_info (raw_servers, servers); + + // Sort the list of servers into a preferred order. + preferred_order (servers); + + // Print the server information. Skip the empty entry at the head of the list. + clog << _F("Systemtap Compile Server Status for '%s'", working_string.c_str()) << endl; + bool found = false; + unsigned limit = servers.size (); + for (unsigned i = 0; i < limit; ++i) + { + assert (! servers[i].empty ()); + // Don't list servers with no cert information. They may not actually + // exist. + // TODO: Could try contacting the server and obtaining its cert + if (servers[i].certinfo.empty ()) + continue; + clog << servers[i] << endl; + found = true; + } + if (! found) + clog << _("No servers found") << endl; +} + +// Add or remove trust of the servers specified on the command line. +void +manage_server_trust (systemtap_session &s) +{ + // This function should do nothing if we don't have NSS. +#if HAVE_NSS + // Nothing to do if --trust-servers was not specified. + if (s.server_trust_spec.empty ()) + return; + + // Break up and analyze the trust specification. Recognized components are: + // ssl - trust the specified servers as ssl peers + // signer - trust the specified servers as module signers + // revoke - revoke the requested trust + // all-users - apply/revoke the requested trust for all users + // no-prompt - don't prompt the user for confirmation + vectorcomponents; + tokenize (s.server_trust_spec, components, ","); + bool ssl = false; + bool signer = false; + bool revoke = false; + bool all_users = false; + bool no_prompt = false; + bool error = false; + for (vector::const_iterator i = components.begin (); + i != components.end (); + ++i) + { + if (*i == "ssl") + ssl = true; + else if (*i == "signer") + { + if (geteuid () != 0) + { + clog << _("Only root can specify 'signer' on --trust-servers") << endl; + error = true; + } + else + signer = true; } - - // Find the certificate matching the one belonging to our server. - CERTCertListNode *node; - for (node = CERT_LIST_HEAD (certs); - ! CERT_LIST_END (node, certs); - node = CERT_LIST_NEXT (node)) + else if (*i == "revoke") + revoke = true; + else if (*i == "all-users") { - // The certificate we're working with. - db_cert = node->cert; - - // Get the serial number. - ostringstream serialNumber; - serialNumber << hex << setfill('0') << right; - for (unsigned i = 0; i < db_cert->serialNumber.len; ++i) + if (geteuid () != 0) { - if (i > 0) - serialNumber << ':'; - serialNumber << setw(2) << (unsigned)db_cert->serialNumber.data[i]; + clog << _("Only root can specify 'all-users' on --trust-servers") << endl; + error = true; } + else + all_users = true; + } + else if (*i == "no-prompt") + no_prompt = true; + else + clog << _("Warning: Unrecognized server trust specification: ") << *i + << endl; + } + if (error) + return; - // Does the serial number match that of the current server? - if (serialNumber.str () != server->certinfo) - continue; // goto next certificate + // Make sure NSPR is initialized + s.NSPR_init (); - // All is ok! Remove the certificate from the database. - break; - } // Loop over certificates in the database + // Now obtain the list of specified servers. + vector server_list; + get_specified_server_info (s, server_list, true/*no_default*/); - // Was a certificate matching the server found? */ - if (CERT_LIST_END (node, certs)) - { - // Not found. Server is already untrusted. - if (s.verbose) - trust_already_in_place (*server, server_list, cert_db_path, true/*revoking*/); - } + // Did we identify any potential servers? + unsigned limit = server_list.size (); + if (limit == 0) + { + clog << _("No servers identified for trust") << endl; + return; + } + + // Create a string representing the request in English. + // If neither 'ssl' or 'signer' was specified, the default is 'ssl'. + if (! ssl && ! signer) + ssl = true; + ostringstream trustString; + if (ssl) + { + trustString << _("as an SSL peer"); + if (all_users) + trustString << _(" for all users"); + else + trustString << _(" for the current user"); + } + if (signer) + { + if (ssl) + trustString << _(" and "); + trustString << _("as a module signer for all users"); + } + + // Prompt the user to confirm what's about to happen. + if (no_prompt) + { + if (revoke) + clog << _("Revoking trust "); + else + clog << _("Adding trust "); + } + else + { + if (revoke) + clog << _("Revoke trust "); else + clog << _("Add trust "); + } + clog << _F("in the following servers %s", trustString.str().c_str()); + if (! no_prompt) + clog << '?'; + clog << endl; + for (unsigned i = 0; i < limit; ++i) + clog << " " << server_list[i] << endl; + if (! no_prompt) + { + clog << "[y/N] " << flush; + + // Only carry out the operation if the response is "yes" + string response; + cin >> response; + if (response[0] != 'y' && response [0] != 'Y') { - secStatus = SEC_DeletePermCertificate (db_cert); - if (secStatus != SECSuccess) - { - cerr << "Unable to remove certificate from " << cert_db_path - << ": " << endl; - nssError (); - } + clog << _("Server trust unchanged") << endl; + return; } - CERT_DestroyCertList (certs); - certs = NULL; - } // Loop over servers + } - cleanup: - if (certs) - CERT_DestroyCertList (certs); - if (slot) - PK11_FreeSlot (slot); - if (tmpArena) - PORT_FreeArena (tmpArena, PR_FALSE); + // Now add/revoke the requested trust. + string cert_db_path; + if (ssl) + { + if (all_users) + cert_db_path = global_ssl_cert_db_path (); + else + cert_db_path = private_ssl_cert_db_path (); + if (revoke) + revoke_server_trust (s, cert_db_path, server_list); + else + add_server_trust (s, cert_db_path, server_list); + } + if (signer) + { + cert_db_path = signing_cert_db_path (); + if (revoke) + revoke_server_trust (s, cert_db_path, server_list); + else + add_server_trust (s, cert_db_path, server_list); + } +#endif // HAVE_NSS +} - NSS_Shutdown (); +static compile_server_cache* +cscache(systemtap_session& s) +{ + if (!s.server_cache) + s.server_cache = new compile_server_cache(); + return s.server_cache; } -#endif // HAVE_NSS static void get_server_info ( @@ -1600,7 +2377,7 @@ get_specified_server_info (s, servers); keep = true; } - // Now filter the or accumulate the list depending on whether a query has + // Now filter or accumulate the list depending on whether a query has // already been made. if ((pmask & compile_server_online)) { @@ -1643,9 +2420,9 @@ vector &servers ) { - // We only need to obtain this once. This is a good thing(tm) since - // obtaining this information is expensive. - static vector default_servers; + // We only need to obtain this once per session. This is a good thing(tm) + // since obtaining this information is expensive. + vector& default_servers = cscache(s)->default_servers; if (default_servers.empty ()) { // Get the required information. @@ -1666,9 +2443,9 @@ bool no_default ) { - // We only need to obtain this once. This is a good thing(tm) since - // obtaining this information is expensive. - static vector specified_servers; + // We only need to obtain this once per session. This is a good thing(tm) + // since obtaining this information is expensive. + vector& specified_servers = cscache(s)->specified_servers; if (specified_servers.empty ()) { // Maintain an empty entry to indicate that this search has been @@ -1719,9 +2496,8 @@ server_info.port = port; else { - cerr << "Invalid port number specified: " - << components.back () - << endl; + clog << _F("Invalid port number specified: %s", + components.back().c_str()) << endl; continue; } // Remove the port number from the spec @@ -1739,8 +2515,7 @@ if (known_servers.empty ()) { if (s.verbose) - cerr << "No server matching " << server << " found" - << endl; + clog << _F("No server matching %s found", server.c_str()) << endl; } else add_server_info (known_servers, specified_servers); @@ -1759,9 +2534,8 @@ server_info.port = port; else { - cerr << "Invalid port number specified: " - << components.back () - << endl; + clog << _F("Invalid port number specified: %s", + components.back().c_str()) << endl; continue; } } @@ -1801,9 +2575,9 @@ if (keep && servers.empty ()) return; - // We only need to obtain this once. This is a good thing(tm) since - // obtaining this information is expensive. - static vector trusted_servers; + // We only need to obtain this once per session. This is a good thing(tm) + // since obtaining this information is expensive. + vector& trusted_servers = cscache(s)->trusted_servers; if (trusted_servers.empty ()) { // Maintain an empty entry to indicate that this search has been @@ -1812,7 +2586,7 @@ #if HAVE_NSS // Check the private database first. - string cert_db_path = private_ssl_cert_db_path (s); + string cert_db_path = private_ssl_cert_db_path (); get_server_info_from_db (s, trusted_servers, cert_db_path); // Now check the global database. @@ -1822,7 +2596,7 @@ // Without NSS, we can't determine whether a server is trusted. // Issue a warning. if (s.verbose) - clog << "Unable to determine server trust as an SSL peer" << endl; + clog << _("Unable to determine server trust as an SSL peer") << endl; #endif // ! HAVE_NSS } // Server information is not cached @@ -1851,9 +2625,9 @@ if (keep && servers.empty ()) return; - // We only need to obtain this once. This is a good thing(tm) since - // obtaining this information is expensive. - static vector signing_servers; + // We only need to obtain this once per session. This is a good thing(tm) + // since obtaining this information is expensive. + vector& signing_servers = cscache(s)->signing_servers; if (signing_servers.empty ()) { // Maintain an empty entry to indicate that this search has been @@ -1868,7 +2642,7 @@ // Without NSS, we can't determine whether a server is a trusted // signer. Issue a warning. if (s.verbose) - clog << "Unable to determine server trust as a module signer" << endl; + clog << _("Unable to determine server trust as a module signer") << endl; #endif // ! HAVE_NSS } // Server information is not cached @@ -1885,146 +2659,6 @@ } } -#if HAVE_NSS -// Obtain information about servers from the certificates in the given database. -static void -get_server_info_from_db ( - systemtap_session &s, - vector &servers, - const string &cert_db_path -) -{ - // Make sure the given path exists. - if (! file_exists (cert_db_path)) - { - if (s.verbose > 1) - cerr << "Certificate database '" << cert_db_path << "' does not exist." - << endl; - return; - } - - // Must predeclare these because of jumps to cleanup: below. - PK11SlotInfo *slot = NULL; - CERTCertDBHandle *handle; - PRArenaPool *tmpArena = NULL; - CERTCertList *certs = NULL; - CERTCertificate *db_cert; - - // Initialize the NSS libraries -- readonly - SECStatus secStatus = NSS_Init (cert_db_path.c_str ()); - if (secStatus != SECSuccess) - { - cerr << "Error initializing NSS for " << cert_db_path << endl; - nssError (); - goto cleanup; - } - - // Search the client-side database of trusted servers. - slot = PK11_GetInternalKeySlot (); - handle = CERT_GetDefaultCertDB(); - db_cert = PK11_FindCertFromNickname (server_cert_nickname, NULL); - if (! db_cert) - { - // No trusted servers. Not an error. Just an empty list returned. - goto cleanup; - } - - // Here, we have one cert with the desired nickname. - // Now, we will attempt to get a list of ALL certs - // with the same subject name as the cert we have. That list - // should contain, at a minimum, the one cert we have already found. - // If the list of certs is empty (NULL), the libraries have failed. - certs = CERT_CreateSubjectCertList (NULL, handle, & db_cert->derSubject, - PR_Now (), PR_FALSE); - CERT_DestroyCertificate (db_cert); - if (! certs) - { - cerr << "Unable to query client certificate database: " << endl; - PORT_SetError (SEC_ERROR_LIBRARY_FAILURE); - nssError (); - goto cleanup; - } - - // A memory pool to work in - tmpArena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); - if (! tmpArena) - { - cerr << "Out of memory:"; - nssError (); - goto cleanup; - } - for (CERTCertListNode *node = CERT_LIST_HEAD (certs); - ! CERT_LIST_END (node, certs); - node = CERT_LIST_NEXT (node)) - { - compile_server_info server_info; - - // The certificate we're working with. - db_cert = node->cert; - - // Get the host name. It is in the alt-name extension of the - // certificate. - SECItem subAltName; - subAltName.data = NULL; - secStatus = CERT_FindCertExtension (db_cert, - SEC_OID_X509_SUBJECT_ALT_NAME, - & subAltName); - if (secStatus != SECSuccess || ! subAltName.data) - { - cerr << "Unable to find alt name extension on server certificate: " << endl; - nssError (); - continue; - } - - // Decode the extension. - CERTGeneralName *nameList = CERT_DecodeAltNameExtension (tmpArena, & subAltName); - SECITEM_FreeItem(& subAltName, PR_FALSE); - if (! nameList) - { - cerr << "Unable to decode alt name extension on server certificate: " << endl; - nssError (); - continue; - } - - // We're interested in the first alternate name. - assert (nameList->type == certDNSName); - server_info.host_name = string ((const char *)nameList->name.other.data, - nameList->name.other.len); - // Don't free nameList. It's part of the tmpArena. - - // Get the serial number. - ostringstream field; - field << hex << setfill('0') << right; - for (unsigned i = 0; i < db_cert->serialNumber.len; ++i) - { - if (i > 0) - field << ':'; - field << setw(2) << (unsigned)db_cert->serialNumber.data[i]; - } - server_info.certinfo = field.str (); - - // Our results will at a minimum contain this server. - add_server_info (server_info, servers); - - // Augment the list by querying all online servers and keeping the ones - // with the same cert serial number. - vector online_servers; - get_or_keep_online_server_info (s, online_servers, false/*keep*/); - keep_server_info_with_cert_and_port (s, server_info, online_servers); - add_server_info (online_servers, servers); - } - - cleanup: - if (certs) - CERT_DestroyCertList (certs); - if (slot) - PK11_FreeSlot (slot); - if (tmpArena) - PORT_FreeArena (tmpArena, PR_FALSE); - - NSS_Shutdown (); -} -#endif // HAVE_NSS static void get_or_keep_compatible_server_info ( @@ -2075,7 +2709,7 @@ // Without Avahi, we can't obtain the target platform of the server. // Issue a warning. if (s.verbose) - clog << "Unable to detect server compatibility" << endl; + clog << _("Unable to detect server compatibility") << endl; if (keep) servers.clear (); #endif @@ -2083,7 +2717,7 @@ static void keep_server_info_with_cert_and_port ( - systemtap_session &s, + systemtap_session &, const compile_server_info &server, vector &servers ) @@ -2120,7 +2754,7 @@ // Obtain missing host name or ip address, if any. static void resolve_host ( - systemtap_session& s, + systemtap_session&, compile_server_info &server, vector &resolved_servers ) @@ -2248,7 +2882,7 @@ const AvahiAddress *address, uint16_t port, AvahiStringList *txt, - AvahiLookupResultFlags flags, + AvahiLookupResultFlags /*flags*/, AVAHI_GCC_UNUSED void* userdata) { assert(r); @@ -2259,30 +2893,36 @@ switch (event) { case AVAHI_RESOLVER_FAILURE: - cerr << "Failed to resolve service '" << name - << "' of type '" << type - << "' in domain '" << domain - << "': " << avahi_strerror(avahi_client_errno(avahi_service_resolver_get_client(r))) - << endl; + clog << _F("Failed to resolve service '%s' of type '%s' in domain '%s': %s", + name, type, domain, + avahi_strerror(avahi_client_errno(avahi_service_resolver_get_client(r)))) << endl; break; case AVAHI_RESOLVER_FOUND: { char a[AVAHI_ADDRESS_STR_MAX], *t; avahi_address_snprint(a, sizeof(a), address); - t = avahi_string_list_to_string(txt); - - // Save the information of interest. - compile_server_info info; - info.host_name = host_name; - info.ip_address = strdup (a); - info.port = port; - info.sysinfo = extract_field_from_avahi_txt ("sysinfo=", t); - info.certinfo = extract_field_from_avahi_txt ("certinfo=", t); - // Add this server to the list of discovered servers. - add_server_info (info, *servers); - - avahi_free(t); + // Ignore entries using IPv6 addresses for now + vector parts; + tokenize (a, parts, "."); + if (parts.size () == 4) + { + // Save the information of interest. + compile_server_info info; + info.host_name = host_name; + info.ip_address = strdup (a); + info.port = port; + t = avahi_string_list_to_string(txt); + info.sysinfo = extract_field_from_avahi_txt ("sysinfo=", t); + info.certinfo = extract_field_from_avahi_txt ("certinfo=", t); + info.version = extract_field_from_avahi_txt ("version=", t); + if (info.version.empty ()) + info.version = "1.0"; // default version is 1.0 + avahi_free(t); + + // Add this server to the list of discovered servers. + add_server_info (info, *servers); + } } } @@ -2310,9 +2950,9 @@ switch (event) { case AVAHI_BROWSER_FAILURE: - cerr << "Avahi browse failed: " - << avahi_strerror(avahi_client_errno(avahi_service_browser_get_client(b))) - << endl; + clog << _F("Avahi browse failed: %s", + avahi_strerror(avahi_client_errno(avahi_service_browser_get_client(b)))) + << endl; avahi_simple_poll_quit(simple_poll); break; @@ -2323,9 +2963,8 @@ // the resolver for us. if (!(avahi_service_resolver_new(c, interface, protocol, name, type, domain, AVAHI_PROTO_UNSPEC, (AvahiLookupFlags)0, resolve_callback, context))) { - cerr << "Failed to resolve service '" << name - << "': " << avahi_strerror(avahi_client_errno(c)) - << endl; + clog << _F("Failed to resolve service '%s': %s", + name, avahi_strerror(avahi_client_errno(c))) << endl; } break; @@ -2345,9 +2984,7 @@ // Called whenever the client or server state changes. if (state == AVAHI_CLIENT_FAILURE) { - cerr << "Avahi Server connection failure: " - << avahi_strerror(avahi_client_errno(c)) - << endl; + clog << _F("Avahi Server connection failure: %s", avahi_strerror(avahi_client_errno(c))) << endl; avahi_simple_poll_quit(simple_poll); } } @@ -2372,9 +3009,9 @@ if (keep && servers.empty ()) return; - // We only need to obtain this once. This is a good thing(tm) since - // obtaining this information is expensive. - static vector online_servers; + // We only need to obtain this once per session. This is a good thing(tm) + // since obtaining this information is expensive. + vector& online_servers = cscache(s)->online_servers; if (online_servers.empty ()) { // Maintain an empty entry to indicate that this search has been @@ -2393,7 +3030,7 @@ AvahiSimplePoll *simple_poll; if (!(simple_poll = avahi_simple_poll_new())) { - cerr << "Failed to create Avahi simple poll object" << endl; + clog << _("Failed to create Avahi simple poll object") << endl; goto fail; } browsing_context context; @@ -2409,9 +3046,8 @@ // Check whether creating the client object succeeded. if (! client) { - cerr << "Failed to create Avahi client: " - << avahi_strerror(error) - << endl; + clog << _F("Failed to create Avahi client: %s", + avahi_strerror(error)) << endl; goto fail; } context.client = client; @@ -2422,9 +3058,8 @@ NULL, (AvahiLookupFlags)0, browse_callback, & context))) { - cerr << "Failed to create Avahi service browser: " - << avahi_strerror(avahi_client_errno(client)) - << endl; + clog << _F("Failed to create Avahi service browser: %s", + avahi_strerror(avahi_client_errno(client))) << endl; goto fail; } @@ -2470,7 +3105,7 @@ #else // ! HAVE_AVAHI // Without Avahi, we can't detect online servers. Issue a warning. if (s.verbose) - clog << "Unable to detect online servers" << endl; + clog << _("Unable to detect online servers") << endl; #endif // ! HAVE_AVAHI } // Server information is not cached. @@ -2609,6 +3244,8 @@ target.port = source.port; if (target.sysinfo.empty ()) target.sysinfo = source.sysinfo; + if (target.version.empty ()) + target.version = source.version; if (target.certinfo.empty ()) target.certinfo = source.certinfo; } @@ -2643,3 +3280,5 @@ merge_server_info (*i, target); } #endif + +/* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ diff -Nru systemtap-1.4/csclient.h systemtap-1.6/csclient.h --- systemtap-1.4/csclient.h 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/csclient.h 2011-07-25 18:12:01.000000000 +0000 @@ -1,5 +1,5 @@ // -*- C++ -*- -// Copyright (C) 2010 Red Hat Inc. +// Copyright (C) 2010-2011 Red Hat Inc. // // This file is part of systemtap, and is free software. You can // redistribute it and/or modify it under the terms of the GNU General @@ -8,12 +8,15 @@ #ifndef CSCLIENT_H #define CSCLIENT_H +#if HAVE_NSS +#include "cscommon.h" + struct compile_server_info; class compile_server_client { public: - compile_server_client (systemtap_session &s) : s(s) {} + compile_server_client (systemtap_session &s) : s(s), server_version() {} int passes_0_4 (); private: @@ -28,17 +31,20 @@ // Client/server utility methods. int include_file_or_directory ( const std::string &subdir, - const std::string &path, - const char *option = 0 + const std::string &path ); int add_package_args (); int add_package_arg (const std::string &arg); int compile_using_server (const std::vector &servers); + int add_localization_variables(); int read_from_file (const std::string &fname, int &data); - int write_to_file (const std::string &fname, const std::string &data); + template + int write_to_file (const std::string &fname, const T &data); int flush_to_stream (const std::string &fname, std::ostream &o); + void show_server_compatibility () const; + systemtap_session &s; std::vector private_ssl_dbs; std::vector public_ssl_dbs; @@ -47,7 +53,9 @@ std::string server_tmpdir; std::string server_zipfile; unsigned argc; + cs_protocol_version server_version; }; +#endif // HAVE_NSS // Utility functions void query_server_status (systemtap_session &s); diff -Nru systemtap-1.4/cscommon.cxx systemtap-1.6/cscommon.cxx --- systemtap-1.4/cscommon.cxx 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/cscommon.cxx 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,130 @@ +/* + Compile-server and client common functions + Copyright (C) 2011 Red Hat Inc. + + This file is part of systemtap, and is free software. You can + redistribute it and/or modify it under the terms of the GNU General + Public License (GPL); either version 2, or (at your option) any + later version. +*/ +#include "util.h" +#include "cscommon.h" + +#include +#include +#include +#include +#include +#include +#include + +#if HAVE_NSS +extern "C" +{ +#include +} +#endif + +using namespace std; + +cs_protocol_version::~cs_protocol_version () +{ + assert (this->v); + free ((void*)this->v); +} + +const cs_protocol_version & +cs_protocol_version::operator= (const char *v) +{ + if (this->v) + free ((void *)this->v); + this->v = strdup (v); + return *this; +} + +bool +cs_protocol_version::operator< (const cs_protocol_version &that) const +{ + // Compare the levels of each version in turn. + vector these_tokens; + tokenize (this->v, these_tokens, "."); + vector those_tokens; + tokenize (that.v, those_tokens, "."); + + unsigned this_limit = these_tokens.size (); + unsigned that_limit = those_tokens.size (); + unsigned i; + for (i = 0; i < this_limit && i < that_limit; ++i) + { + char *e; + unsigned long this_level = strtoul (these_tokens[i].c_str (), & e, 0); + assert (! *e); + unsigned long that_level = strtoul (those_tokens[i].c_str (), & e, 0); + assert (! *e); + if (this_level > that_level) + return false; + if (this_level < that_level) + return true; + } + + // If the other version has more components, then this one is less than that one. + if (i < that_limit) + { + assert (i == this_limit); + return true; + } + // This version is greater than or equal to that one. + return false; +} + +#if HAVE_NSS +int +read_from_file (const string &fname, cs_protocol_version &data) +{ + // C++ streams may not set errno in the even of a failure. However if we + // set it to 0 before each operation and it gets set during the operation, + // then we can use its value in order to determine what happened. + string dataStr; + errno = 0; + ifstream f (fname.c_str ()); + if (! f.good ()) + { + clog << _F("Unable to open file '%s' for reading: ", fname.c_str()); + goto error; + } + + // Read the data; + errno = 0; + f >> dataStr; + if (f.fail ()) + { + clog << _F("Unable to read from file '%s': ", fname.c_str()); + goto error; + } + + data = dataStr.c_str (); + + // NB: not necessary to f.close (); + return 0; // Success + + error: + if (errno) + clog << strerror (errno) << endl; + else + clog << _("unknown error") << endl; + return 1; // Failure +} + +string get_cert_serial_number (const CERTCertificate *cert) +{ + ostringstream serialNumber; + serialNumber << hex << setfill('0') << right; + for (unsigned i = 0; i < cert->serialNumber.len; ++i) + { + if (i > 0) + serialNumber << ':'; + serialNumber << setw(2) << (unsigned)cert->serialNumber.data[i]; + } + return serialNumber.str (); +} +#endif /* HAVE_NSS */ diff -Nru systemtap-1.4/cscommon.h systemtap-1.6/cscommon.h --- systemtap-1.4/cscommon.h 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/cscommon.h 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,56 @@ +// Common functions and macros used by the compile-server and its client. +#ifndef CSCOMMON_H +#define CSCOMMON_H 1 + +#if HAVE_NSS +extern "C" +{ +#include +} +#endif + +// Versioning system for the protocol used for communication between the compile-server and client. +// The original version is 1.0. After that, we use the systemtap release number. +// +// By Policy: +// - All servers are backward compatible with clients. Servers adapt to the protocol version +// of the client. +// - All clients are backward compatible with servers. Clients adapt to the protocol version +// of the server. Warnings are issued for servers lacking features. +// +// Features: +// Version 1.0 +// Original version +// Versions 1.6 and higher +// Client: +// - Passes localization variables to the server in the file client_tmpdir + "/locale" +// - Looks for the uprobes module in server_response + "/uprobes" +// - No longer needs to remove stap's "Keeping temporary directory ..." message from +// the server's stderr response. +// - Looks for 'version' tag in server's avahi record and does not automatically connect to +// an incompatible server. Also prefers newer servers over older ones. +// Server: +// - Applies localization variables passed from the client to stap during translation. +// - Looks for the uprobes module in server_response + "/uprobes" +// - Uses --tmpdir to specify temp directory to be used by stap, instead of -k, in order to +// avoid parsing error messages in search of stap's randomly-generated temp dir. +// - Advertises its protocol version using a 'version' tag in avahi. +// +#define CURRENT_CS_PROTOCOL_VERSION VERSION + +struct cs_protocol_version +{ + cs_protocol_version (const char *v = "1.0") : v(0) { *this = v; } + ~cs_protocol_version (); + const cs_protocol_version &operator= (const char *v); + bool operator< (const cs_protocol_version &that) const; + + const char *v; +}; + +#if HAVE_NSS +extern int read_from_file (const std::string &fname, cs_protocol_version &data); +extern std::string get_cert_serial_number (const CERTCertificate *cert); +#endif + +#endif // CSCOMMON_H diff -Nru systemtap-1.4/debian/changelog systemtap-1.6/debian/changelog --- systemtap-1.4/debian/changelog 2011-09-12 14:09:33.000000000 +0000 +++ systemtap-1.6/debian/changelog 2012-01-30 11:53:36.000000000 +0000 @@ -1,3 +1,31 @@ +systemtap (1.6-1ubuntu1) precise; urgency=low + + * Merge from debian unstable (LP: #876855). Remaining changes: + - Refreshed no-werror.patch. Remove -Werror from CFLAGS to avoid + new variable-set-but-not-used errors when building. + * Drop changes: + - Updated-__ip_sock_daddr-for-2.6.38-kernels.patch it was a patch picked + from upstream, and this version has those changes + - debian/patches/fix-compile-warning: Fix for failure to compile tapsets + due to kernel change. Now in upstream. + - adding-ifdef-CLONE_STOPPED-to-stop-module-compilatio.patch patch was + taken from upstream. + + -- Leo Iannacone Sat, 17 Dec 2011 02:59:13 +0100 + +systemtap (1.6-1) unstable; urgency=low + + [ Lucas Nussbaum ] + * Refresh all patches. + + [ Ritesh Raj Sarraf ] + * [ab3b78a] Imported Upstream version 1.6 + * New upstream release (Closes: #625414, #635542, #628819) + - Fixes vulnerability: CVE-2011-1769, CVE-2011-1781, CVE-2011-2502 + and CVE-2011-2503 + + -- Ritesh Raj Sarraf Fri, 29 Jul 2011 15:59:14 +0530 + systemtap (1.4-1ubuntu2) oneiric; urgency=low * debian/patches/fix-compile-warning: Apply upstream fix for failure to diff -Nru systemtap-1.4/debian/control systemtap-1.6/debian/control --- systemtap-1.4/debian/control 2011-03-23 07:51:39.000000000 +0000 +++ systemtap-1.6/debian/control 2012-01-30 11:53:36.000000000 +0000 @@ -3,7 +3,7 @@ Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Ritesh Raj Sarraf -Uploaders: Lucas Nussbaum +Uploaders: Lucas Nussbaum Build-Depends: debhelper (>= 7.0.50~), libelf-dev (>= 0.141), libdw-dev (>= 0.141), libsqlite3-dev, texlive-latex-base, texlive-latex-recommended, texlive-latex-extra, texlive-fonts-recommended, libnss3-dev, libnspr4-dev, pkg-config, diff -Nru systemtap-1.4/debian/patches/adding-ifdef-CLONE_STOPPED-to-stop-module-compilatio.patch systemtap-1.6/debian/patches/adding-ifdef-CLONE_STOPPED-to-stop-module-compilatio.patch --- systemtap-1.4/debian/patches/adding-ifdef-CLONE_STOPPED-to-stop-module-compilatio.patch 2011-03-23 04:47:42.000000000 +0000 +++ systemtap-1.6/debian/patches/adding-ifdef-CLONE_STOPPED-to-stop-module-compilatio.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,26 +0,0 @@ -From b30b7ed14e6734e0b5b216729aad0e465412c4b1 Mon Sep 17 00:00:00 2001 -From: Lukas Berk -Date: Mon, 24 Jan 2011 12:09:29 -0500 -Subject: [PATCH] adding #ifdef CLONE_STOPPED to stop module compilation error - ---- - tapset/aux_syscalls.stp | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) - -diff --git a/tapset/aux_syscalls.stp b/tapset/aux_syscalls.stp -index e9a9750..25ca345 100644 ---- a/tapset/aux_syscalls.stp -+++ b/tapset/aux_syscalls.stp -@@ -1616,7 +1616,9 @@ static const _stp_val_array const _stp_fork_list[] = { - V(CLONE_DETACHED), - V(CLONE_UNTRACED), - V(CLONE_CHILD_SETTID), -+#ifdef CLONE_STOPPED - V(CLONE_STOPPED), -+#endif - #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19) - V(CLONE_NEWUTS), - V(CLONE_NEWIPC), --- -1.7.1 - diff -Nru systemtap-1.4/debian/patches/debversion.diff systemtap-1.6/debian/patches/debversion.diff --- systemtap-1.4/debian/patches/debversion.diff 2011-03-23 07:51:39.000000000 +0000 +++ systemtap-1.6/debian/patches/debversion.diff 2011-07-29 10:33:10.000000000 +0000 @@ -1,9 +1,7 @@ debian version patch -Index: systemtap/Makefile.am -=================================================================== ---- systemtap.orig/Makefile.am 2011-02-25 01:17:34.534391001 +0530 -+++ systemtap/Makefile.am 2011-02-25 01:29:50.434391001 +0530 -@@ -82,7 +82,7 @@ +--- a/Makefile.am ++++ b/Makefile.am +@@ -79,7 +79,7 @@ git_version.stamp: cp "$(srcdir)/git_version.h" "git_version.h"; \ fi; \ fi @@ -12,7 +10,7 @@ @if test -s "$(srcdir)/git_version.h"; then \ if cmp "$(srcdir)/git_version.h" "git_version.h"; then :; \ else \ -@@ -93,7 +93,7 @@ +@@ -90,7 +90,7 @@ git_version.stamp: fi git_version.h: diff -Nru systemtap-1.4/debian/patches/dont-build-pdfdocs.diff systemtap-1.6/debian/patches/dont-build-pdfdocs.diff --- systemtap-1.4/debian/patches/dont-build-pdfdocs.diff 2011-03-23 07:51:39.000000000 +0000 +++ systemtap-1.6/debian/patches/dont-build-pdfdocs.diff 2011-07-29 10:33:10.000000000 +0000 @@ -1,9 +1,7 @@ don't build pdf docs -Index: systemtap/configure.ac -=================================================================== ---- systemtap.orig/configure.ac 2011-02-25 01:20:13.522391000 +0530 -+++ systemtap/configure.ac 2011-02-25 01:20:17.674391000 +0530 -@@ -271,18 +271,18 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -276,18 +276,18 @@ AC_MSG_CHECKING([for xmlto --stringparam fi AM_CONDITIONAL([XMLTO_STRINGPARAM], [test "$have_xmlto_stringparam" == "yes"]) diff -Nru systemtap-1.4/debian/patches/fix-compile-warning systemtap-1.6/debian/patches/fix-compile-warning --- systemtap-1.4/debian/patches/fix-compile-warning 2011-09-12 14:09:33.000000000 +0000 +++ systemtap-1.6/debian/patches/fix-compile-warning 1970-01-01 00:00:00.000000000 +0000 @@ -1,72 +0,0 @@ -commit 0bbb80098decc9c4c43a1800538007d86b600bba -Author: Josh Stone -Date: Tue Jun 7 11:23:13 2011 -0700 - - stapconf: Conditionalize stacktrace_ops.warning{,_symbol} - - Kernel commit 449a66f removed these fields. - - * buildrun.cxx: Include the new test. - * runtime/autoconf-stacktrace_ops-warning.c: Check the warning field. - * runtime/stack.c: Conditionalize the warning initialization. - -diff --git a/buildrun.cxx b/buildrun.cxx -index 0bebc35..79f8818 100644 ---- a/buildrun.cxx -+++ b/buildrun.cxx -@@ -215,6 +215,8 @@ compile_pass (systemtap_session& s) - output_autoconf(s, o, "autoconf-ring_buffer-flags.c", "STAPCONF_RING_BUFFER_FLAGS", NULL); - output_autoconf(s, o, "autoconf-kallsyms-on-each-symbol.c", "STAPCONF_KALLSYMS_ON_EACH_SYMBOL", NULL); - output_autoconf(s, o, "autoconf-walk-stack.c", "STAPCONF_WALK_STACK", NULL); -+ output_autoconf(s, o, "autoconf-stacktrace_ops-warning.c", -+ "STAPCONF_STACKTRACE_OPS_WARNING", NULL); - output_autoconf(s, o, "autoconf-mm-context-vdso.c", "STAPCONF_MM_CONTEXT_VDSO", NULL); - output_autoconf(s, o, "autoconf-blk-types.c", "STAPCONF_BLK_TYPES", NULL); - output_autoconf(s, o, "autoconf-perf-structpid.c", "STAPCONF_PERF_STRUCTPID", NULL); -diff --git a/runtime/autoconf-stacktrace_ops-warning.c b/runtime/autoconf-stacktrace_ops-warning.c -new file mode 100644 -index 0000000..9c00f05 ---- /dev/null -+++ b/runtime/autoconf-stacktrace_ops-warning.c -@@ -0,0 +1,10 @@ -+/* Some kernels have warning fields in stacktrace_ops. */ -+#include -+#include -+ -+void foo (void) -+{ -+ struct stacktrace_ops t; -+ t.warning = 0; -+ (void) t; -+} -diff --git a/runtime/stack.c b/runtime/stack.c -index 68a7e4f..b2d5d1d 100644 ---- a/runtime/stack.c -+++ b/runtime/stack.c -@@ -73,6 +73,7 @@ struct print_stack_data - int level; - }; - -+#if defined(STAPCONF_STACKTRACE_OPS_WARNING) - static void print_stack_warning(void *data, char *msg) - { - } -@@ -81,6 +82,7 @@ static void - print_stack_warning_symbol(void *data, char *msg, unsigned long symbol) - { - } -+#endif - - static int print_stack_stack(void *data, char *name) - { -@@ -95,8 +97,10 @@ static void print_stack_address(void *data, unsigned long addr, int reliable) - } - - static const struct stacktrace_ops print_stack_ops = { -+#if defined(STAPCONF_STACKTRACE_OPS_WARNING) - .warning = print_stack_warning, - .warning_symbol = print_stack_warning_symbol, -+#endif - .stack = print_stack_stack, - .address = print_stack_address, - #if defined(STAPCONF_WALK_STACK) diff -Nru systemtap-1.4/debian/patches/grapher-libs.diff systemtap-1.6/debian/patches/grapher-libs.diff --- systemtap-1.4/debian/patches/grapher-libs.diff 2011-03-23 07:51:39.000000000 +0000 +++ systemtap-1.6/debian/patches/grapher-libs.diff 2011-07-29 10:33:10.000000000 +0000 @@ -1,9 +1,7 @@ grapher libraries as needed -Index: systemtap/grapher/Makefile.am -=================================================================== ---- systemtap.orig/grapher/Makefile.am 2010-01-21 08:23:45.000000000 +0100 -+++ systemtap/grapher/Makefile.am 2010-01-21 09:12:47.556618938 +0100 -@@ -9,5 +9,6 @@ +--- a/grapher/Makefile.am ++++ b/grapher/Makefile.am +@@ -9,5 +9,6 @@ stapgraph_CPPFLAGS = -DPKGDATADIR='"${pk stapgraph_CXXFLAGS = $(libglade_CFLAGS) -Wall -Werror stapgraph_SOURCES = grapher.cxx StapParser.cxx Graph.cxx GraphWidget.cxx CairoWidget.cxx GraphStyle.cxx stapgraph_LDADD = $(libglade_LIBS) diff -Nru systemtap-1.4/debian/patches/manpage-and-spelling-error-fixes.patch systemtap-1.6/debian/patches/manpage-and-spelling-error-fixes.patch --- systemtap-1.4/debian/patches/manpage-and-spelling-error-fixes.patch 2011-03-23 07:51:39.000000000 +0000 +++ systemtap-1.6/debian/patches/manpage-and-spelling-error-fixes.patch 2011-07-29 10:33:10.000000000 +0000 @@ -1,9 +1,7 @@ manpage hyphen and spelling error fixes -Index: systemtap/grapher/stapgraph.1.in -=================================================================== ---- systemtap.orig/grapher/stapgraph.1.in 2011-02-25 01:14:18.150391001 +0530 -+++ systemtap/grapher/stapgraph.1.in 2011-02-25 01:19:57.718391001 +0530 -@@ -82,7 +82,7 @@ +--- a/grapher/stapgraph.1.in ++++ b/grapher/stapgraph.1.in +@@ -82,7 +82,7 @@ displayed pause button restarts the disp The scroll wheel can be used to zoom in and out on the graph. .SH SCRIPT OUTPUT SYNTAX @@ -12,11 +10,9 @@ .IR stapgraph. The first value is the X coordinate of the graph, usually a time value. .IR stapgraph -Index: systemtap/runtime/access_process_vm.h -=================================================================== ---- systemtap.orig/runtime/access_process_vm.h 2011-02-25 01:14:18.134391001 +0530 -+++ systemtap/runtime/access_process_vm.h 2011-02-25 01:19:57.718391001 +0530 -@@ -26,7 +26,7 @@ +--- a/runtime/access_process_vm.h ++++ b/runtime/access_process_vm.h +@@ -26,7 +26,7 @@ __access_process_vm_ (struct task_struct return 0; down_read (&mm->mmap_sem); @@ -25,11 +21,9 @@ while (len) { int bytes, ret, offset; -Index: systemtap/runtime/uprobes/uprobes.c -=================================================================== ---- systemtap.orig/runtime/uprobes/uprobes.c 2011-02-25 01:17:34.562391001 +0530 -+++ systemtap/runtime/uprobes/uprobes.c 2011-02-25 01:19:57.718391001 +0530 -@@ -2748,7 +2748,7 @@ +--- a/runtime/uprobes/uprobes.c ++++ b/runtime/uprobes/uprobes.c +@@ -2747,7 +2747,7 @@ static int __access_process_vm(struct ta return 0; down_read(&mm->mmap_sem); @@ -38,11 +32,9 @@ while (len) { int bytes, ret, offset; void *maddr; -Index: systemtap/runtime/uprobes2/uprobes.c -=================================================================== ---- systemtap.orig/runtime/uprobes2/uprobes.c 2011-02-25 01:17:34.562391001 +0530 -+++ systemtap/runtime/uprobes2/uprobes.c 2011-02-25 01:19:57.718391001 +0530 -@@ -3011,7 +3011,7 @@ +--- a/runtime/uprobes2/uprobes.c ++++ b/runtime/uprobes2/uprobes.c +@@ -3010,7 +3010,7 @@ static int __access_process_vm(struct ta return 0; down_read(&mm->mmap_sem); @@ -51,11 +43,9 @@ while (len) { int bytes, ret, offset; void *maddr; -Index: systemtap/tapset/signal.stp -=================================================================== ---- systemtap.orig/tapset/signal.stp 2011-02-25 01:17:34.578391001 +0530 -+++ systemtap/tapset/signal.stp 2011-02-25 01:19:57.722391001 +0530 -@@ -134,7 +134,7 @@ +--- a/tapset/signal.stp ++++ b/tapset/signal.stp +@@ -134,7 +134,7 @@ probe __signal.send.specific_send_sig_in * Possible __group_send_sig_info and * specific_send_sig_info return values are as follows; * @@ -64,7 +54,7 @@ * which means that: * (1) the signal was ignored by the receiving process, * (2) this is a non-RT signal and the system already has one queued, and -@@ -147,7 +147,7 @@ +@@ -147,7 +147,7 @@ probe __signal.send.specific_send_sig_in * Possible send_group_sigqueue and * send_sigqueue return values are as follows; * @@ -73,7 +63,7 @@ * sigqueue of the receiving process, or a SI_TIMER entry is already * queued (in which case, the overrun count will be simply incremented). * -@@ -204,7 +204,7 @@ +@@ -204,7 +204,7 @@ probe __signal.send.send_signal.return = // Return values for "__group_send_sig_info" and "specific_send_sig_info" // @@ -82,7 +72,7 @@ // which means the following: // <1> the signal is ignored by receiving process // <2> this is a non-RT signal and we already have one queued -@@ -230,7 +230,7 @@ +@@ -230,7 +230,7 @@ probe __signal.send.specific_send_sig_in send2queue = 0 } diff -Nru systemtap-1.4/debian/patches/no-werror.patch systemtap-1.6/debian/patches/no-werror.patch --- systemtap-1.4/debian/patches/no-werror.patch 2011-09-12 14:09:33.000000000 +0000 +++ systemtap-1.6/debian/patches/no-werror.patch 2012-01-30 11:53:36.000000000 +0000 @@ -2,109 +2,47 @@ due to some variables being set but not used. Author: Serge Hallyn Forwarded: no +--- + Makefile.am | 4 ++-- + Makefile.in | 4 ++-- + configure | 4 ++-- + configure.ac | 4 ++-- + grapher/Makefile.am | 2 +- + grapher/Makefile.in | 2 +- + runtime/bench2/Makefile | 2 +- + runtime/staprun/Makefile.am | 4 ++-- + runtime/staprun/Makefile.in | 4 ++-- + 9 files changed, 15 insertions(+), 15 deletions(-) -Index: systemtap-1.4/Makefile.am -=================================================================== ---- systemtap-1.4.orig/Makefile.am 2011-08-31 18:30:12.748558006 +0000 -+++ systemtap-1.4/Makefile.am 2011-08-31 18:30:27.348558017 +0000 -@@ -13,8 +13,8 @@ - -DPKGLIBDIR='"$(pkglibexecdir)"' \ - -I$(srcdir)/includes -I$(builddir)/includes/sys - --AM_CFLAGS = -D_GNU_SOURCE -fexceptions -Wall -Werror -Wunused -Wformat=2 -W --AM_CXXFLAGS = -Wall -Werror -+AM_CFLAGS = -D_GNU_SOURCE -fexceptions -Wall -Wunused -Wformat=2 -W -+AM_CXXFLAGS = -Wall - - man_MANS = stapprobes.3stap stapfuncs.3stap stapvars.3stap stapex.3stap \ - dtrace.1 stap-merge.1\ -@@ -170,16 +170,16 @@ - if BUILD_TRANSLATOR - if HAVE_NSS - stap_sign_module_SOURCES = modsign.cxx nsscommon.c --stap_sign_module_CPPFLAGS = -Wall -Werror $(AM_CPPFLAGS) $(nss_CFLAGS) $(nspr_CFLAGS) -+stap_sign_module_CPPFLAGS = -Wall $(AM_CPPFLAGS) $(nss_CFLAGS) $(nspr_CFLAGS) - stap_sign_module_LDADD = -lnss3 -lnspr4 - - if BUILD_SERVER - stap_client_connect_SOURCES = stap-client-connect.c nsscommon.c --stap_client_connect_CFLAGS = -Wall -Werror $(nss_CFLAGS) $(nspr_CFLAGS) -+stap_client_connect_CFLAGS = -Wall $(nss_CFLAGS) $(nspr_CFLAGS) - stap_client_connect_LDADD = -lssl3 -lnss3 -lnspr4 -lplc4 - - stap_server_connect_SOURCES = stap-server-connect.c nsscommon.c --stap_server_connect_CFLAGS = -Wall -Werror $(nss_CFLAGS) $(nspr_CFLAGS) -+stap_server_connect_CFLAGS = -Wall $(nss_CFLAGS) $(nspr_CFLAGS) - stap_server_connect_LDADD = -lssl3 -lnss3 -lnspr4 -lplc4 - endif - endif -Index: systemtap-1.4/Makefile.in -=================================================================== ---- systemtap-1.4.orig/Makefile.in 2011-08-31 18:30:29.498558012 +0000 -+++ systemtap-1.4/Makefile.in 2011-08-31 18:30:39.358558879 +0000 -@@ -376,8 +376,8 @@ - -DPKGLIBDIR='"$(pkglibexecdir)"' \ - -I$(srcdir)/includes -I$(builddir)/includes/sys - --AM_CFLAGS = -D_GNU_SOURCE -fexceptions -Wall -Werror -Wunused -Wformat=2 -W --AM_CXXFLAGS = -Wall -Werror -+AM_CFLAGS = -D_GNU_SOURCE -fexceptions -Wall -Wunused -Wformat=2 -W -+AM_CXXFLAGS = -Wall - man_MANS = stapprobes.3stap stapfuncs.3stap stapvars.3stap \ - stapex.3stap dtrace.1 stap-merge.1 stappaths.7 $(am__append_2) \ - $(am__append_4) $(am__append_8) -@@ -429,13 +429,13 @@ - @BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_server_connect_LDFLAGS = $(AM_LDFLAGS) - @BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_sign_module_LDFLAGS = $(AM_LDFLAGS) - @BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_sign_module_SOURCES = modsign.cxx nsscommon.c --@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_sign_module_CPPFLAGS = -Wall -Werror $(AM_CPPFLAGS) $(nss_CFLAGS) $(nspr_CFLAGS) -+@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_sign_module_CPPFLAGS = -Wall $(AM_CPPFLAGS) $(nss_CFLAGS) $(nspr_CFLAGS) - @BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_sign_module_LDADD = -lnss3 -lnspr4 - @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_client_connect_SOURCES = stap-client-connect.c nsscommon.c --@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_client_connect_CFLAGS = -Wall -Werror $(nss_CFLAGS) $(nspr_CFLAGS) -+@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_client_connect_CFLAGS = -Wall $(nss_CFLAGS) $(nspr_CFLAGS) - @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_client_connect_LDADD = -lssl3 -lnss3 -lnspr4 -lplc4 - @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_server_connect_SOURCES = stap-server-connect.c nsscommon.c --@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_server_connect_CFLAGS = -Wall -Werror $(nss_CFLAGS) $(nspr_CFLAGS) -+@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_server_connect_CFLAGS = -Wall $(nss_CFLAGS) $(nspr_CFLAGS) - @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_server_connect_LDADD = -lssl3 -lnss3 -lnspr4 -lplc4 - @BUILD_TRANSLATOR_TRUE@loc2c_test_SOURCES = loc2c-test.c loc2c.c - @BUILD_TRANSLATOR_TRUE@loc2c_test_CFLAGS = $(stap_CFLAGS) -Index: systemtap-1.4/configure -=================================================================== ---- systemtap-1.4.orig/configure 2011-08-31 18:33:59.808562739 +0000 -+++ systemtap-1.4/configure 2011-08-31 18:34:14.118563137 +0000 -@@ -5682,8 +5682,8 @@ +--- systemtap-1.6-1ubuntu1.orig/configure ++++ systemtap-1.6-1ubuntu1/configure +@@ -8685,8 +8685,8 @@ if test "x$enable_ssp" != xno; then : save_CFLAGS="$CFLAGS" save_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS -Werror -fstack-protector-all -D_FORTIFY_SOURCE=2" - CFLAGS="$CFLAGS -Werror -fstack-protector-all -D_FORTIFY_SOURCE=2" -+ CXXFLAGS="$CXXFLAGS -fstack-protector-all -D_FORTIFY_SOURCE=2" -+ CFLAGS="$CFLAGS -fstack-protector-all -D_FORTIFY_SOURCE=2" ++ CXXFLAGS="$CXXFLAGS -fstack-protector-all -D_FORTIFY_SOURCE=2" ++ CFLAGS="$CFLAGS -fstack-protector-all -D_FORTIFY_SOURCE=2" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int something (); -Index: systemtap-1.4/configure.ac -=================================================================== ---- systemtap-1.4.orig/configure.ac 2011-08-31 18:33:59.838559680 +0000 -+++ systemtap-1.4/configure.ac 2011-08-31 18:34:19.168562111 +0000 -@@ -63,8 +63,8 @@ +--- systemtap-1.6-1ubuntu1.orig/configure.ac ++++ systemtap-1.6-1ubuntu1/configure.ac +@@ -68,8 +68,8 @@ AC_ARG_ENABLE([ssp], AS_IF([test "x$enable_ssp" != xno],[ save_CFLAGS="$CFLAGS" save_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS -Werror -fstack-protector-all -D_FORTIFY_SOURCE=2" - CFLAGS="$CFLAGS -Werror -fstack-protector-all -D_FORTIFY_SOURCE=2" -+ CXXFLAGS="$CXXFLAGS -fstack-protector-all -D_FORTIFY_SOURCE=2" -+ CFLAGS="$CFLAGS -fstack-protector-all -D_FORTIFY_SOURCE=2" - AC_COMPILE_IFELSE([int something ();], [ ++ CXXFLAGS="$CXXFLAGS -fstack-protector-all -D_FORTIFY_SOURCE=2" ++ CFLAGS="$CFLAGS -fstack-protector-all -D_FORTIFY_SOURCE=2" + AC_COMPILE_IFELSE([AC_LANG_SOURCE([int something ();])], [ AC_MSG_NOTICE([Compiling with gcc -fstack-protector-all et al.]) CFLAGS="$save_CFLAGS -fstack-protector-all -D_FORTIFY_SOURCE=2" -Index: systemtap-1.4/grapher/Makefile.am -=================================================================== ---- systemtap-1.4.orig/grapher/Makefile.am 2011-08-31 18:37:54.908557975 +0000 -+++ systemtap-1.4/grapher/Makefile.am 2011-08-31 18:38:03.438558089 +0000 -@@ -6,7 +6,7 @@ +--- systemtap-1.6-1ubuntu1.orig/grapher/Makefile.am ++++ systemtap-1.6-1ubuntu1/grapher/Makefile.am +@@ -6,7 +6,7 @@ man_MANS = stapgraph.1 # "superset" of the gtkmm_CFLAGS/gtkmm_LIBS variabes, we'll just use # the libglade ones. stapgraph_CPPFLAGS = -DPKGDATADIR='"${pkgdatadir}"' @@ -113,11 +51,9 @@ stapgraph_SOURCES = grapher.cxx StapParser.cxx Graph.cxx GraphWidget.cxx CairoWidget.cxx GraphStyle.cxx stapgraph_LDADD = $(libglade_LIBS) stapgraph_LDFLAGS = -Wl,--as-needed -Index: systemtap-1.4/grapher/Makefile.in -=================================================================== ---- systemtap-1.4.orig/grapher/Makefile.in 2011-08-31 18:37:53.418558238 +0000 -+++ systemtap-1.4/grapher/Makefile.in 2011-08-31 18:38:07.718556185 +0000 -@@ -243,7 +243,7 @@ +--- systemtap-1.6-1ubuntu1.orig/grapher/Makefile.in ++++ systemtap-1.6-1ubuntu1/grapher/Makefile.in +@@ -275,7 +275,7 @@ top_srcdir = @top_srcdir@ # "superset" of the gtkmm_CFLAGS/gtkmm_LIBS variabes, we'll just use # the libglade ones. @BUILD_GRAPHER_TRUE@stapgraph_CPPFLAGS = -DPKGDATADIR='"${pkgdatadir}"' @@ -126,29 +62,66 @@ @BUILD_GRAPHER_TRUE@stapgraph_SOURCES = grapher.cxx StapParser.cxx Graph.cxx GraphWidget.cxx CairoWidget.cxx GraphStyle.cxx @BUILD_GRAPHER_TRUE@stapgraph_LDADD = $(libglade_LIBS) @BUILD_GRAPHER_TRUE@dist_pkgdata_DATA = graph-dialog.glade stap-start.glade processwindow.glade -Index: systemtap-1.4/runtime/staprun/Makefile.am -=================================================================== ---- systemtap-1.4.orig/runtime/staprun/Makefile.am 2011-08-31 18:42:46.738558002 +0000 -+++ systemtap-1.4/runtime/staprun/Makefile.am 2011-08-31 18:42:52.458557961 +0000 +--- systemtap-1.6-1ubuntu1.orig/Makefile.am ++++ systemtap-1.6-1ubuntu1/Makefile.am +@@ -14,8 +14,8 @@ AM_CPPFLAGS = -DBINDIR='"$(bindir)"' \ + -DLOCALEDIR='"$(localedir)"' \ + -I$(srcdir)/includes -I$(builddir)/includes/sys + +-AM_CFLAGS = -D_GNU_SOURCE -fexceptions -Wall -Werror -Wunused -Wformat=2 -W +-AM_CXXFLAGS = -Wall -Werror ++AM_CFLAGS = -D_GNU_SOURCE -fexceptions -Wall -Wunused -Wformat=2 -W ++AM_CXXFLAGS = -Wall + + man_MANS = stapprobes.3stap stapfuncs.3stap stapvars.3stap stapex.3stap \ + dtrace.1 stap-merge.1\ +--- systemtap-1.6-1ubuntu1.orig/Makefile.in ++++ systemtap-1.6-1ubuntu1/Makefile.in +@@ -415,8 +415,8 @@ AM_CPPFLAGS = -DBINDIR='"$(bindir)"' \ + -DLOCALEDIR='"$(localedir)"' \ + -I$(srcdir)/includes -I$(builddir)/includes/sys + +-AM_CFLAGS = -D_GNU_SOURCE -fexceptions -Wall -Werror -Wunused -Wformat=2 -W +-AM_CXXFLAGS = -Wall -Werror ++AM_CFLAGS = -D_GNU_SOURCE -fexceptions -Wall -Wunused -Wformat=2 -W ++AM_CXXFLAGS = -Wall + man_MANS = stapprobes.3stap stapfuncs.3stap stapvars.3stap \ + stapex.3stap dtrace.1 stap-merge.1 stappaths.7 $(am__append_2) \ + $(am__append_5) +--- systemtap-1.6-1ubuntu1.orig/runtime/staprun/Makefile.am ++++ systemtap-1.6-1ubuntu1/runtime/staprun/Makefile.am @@ -1,7 +1,7 @@ # Makefile.am --- automake input file for systemtap runtime tools - AM_CPPFLAGS = -D_GNU_SOURCE -AM_CFLAGS = -Wall -Werror -Wunused -W -Wformat=2 -Wno-format-nonliteral -+AM_CFLAGS = -Wall -Wunused -W -Wformat=2 -Wno-format-nonliteral +-AM_CXXFLAGS = -Wall -Werror -Wunused -W -Wformat=2 -Wno-format-nonliteral ++AM_CFLAGS = -Wall -Wunused -W -Wformat=2 -Wno-format-nonliteral ++AM_CXXFLAGS = -Wall -Wunused -W -Wformat=2 -Wno-format-nonliteral + AM_CPPFLAGS = -D_GNU_SOURCE AM_CPPFLAGS += -I$(srcdir)/../../includes AM_CPPFLAGS += -I$(builddir)/../../includes/sys - AM_CPPFLAGS += -DBINDIR='"$(bindir)"' -DSYSCONFDIR='"$(sysconfdir)"' -DPKGDATADIR='"${pkgdatadir}"' -DPKGLIBDIR='"$(pkglibexecdir)"' -Index: systemtap-1.4/runtime/staprun/Makefile.in -=================================================================== ---- systemtap-1.4.orig/runtime/staprun/Makefile.in 2011-08-31 18:42:44.758557237 +0000 -+++ systemtap-1.4/runtime/staprun/Makefile.in 2011-08-31 18:42:57.068558017 +0000 -@@ -224,7 +224,7 @@ - -I$(builddir)/../../includes/sys -DBINDIR='"$(bindir)"' \ - -DSYSCONFDIR='"$(sysconfdir)"' -DPKGDATADIR='"${pkgdatadir}"' \ - -DPKGLIBDIR='"$(pkglibexecdir)"' +--- systemtap-1.6-1ubuntu1.orig/runtime/staprun/Makefile.in ++++ systemtap-1.6-1ubuntu1/runtime/staprun/Makefile.in +@@ -249,9 +249,9 @@ target_alias = @target_alias@ + top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ -AM_CFLAGS = -Wall -Werror -Wunused -W -Wformat=2 \ -+AM_CFLAGS = -Wall -Wunused -W -Wformat=2 \ ++AM_CFLAGS = -Wall -Wunused -W -Wformat=2 \ -Wno-format-nonliteral @PIECFLAGS@ - AM_LDFLAGS = @PIELDFLAGS@ - staprun_SOURCES = staprun.c staprun_funcs.c ctl.c common.c \ +-AM_CXXFLAGS = -Wall -Werror -Wunused -W -Wformat=2 \ ++AM_CXXFLAGS = -Wall -Wunused -W -Wformat=2 \ + -Wno-format-nonliteral @PIECXXFLAGS@ + AM_CPPFLAGS = -D_GNU_SOURCE -I$(srcdir)/../../includes \ + -I$(builddir)/../../includes/sys -DBINDIR='"$(bindir)"' \ +--- systemtap-1.6-1ubuntu1.orig/runtime/bench2/Makefile ++++ systemtap-1.6-1ubuntu1/runtime/bench2/Makefile +@@ -1,7 +1,7 @@ + all: itest + + itest: itest.c +- gcc -D_GNU_SOURCE -Wall -Wextra -Wstrict-prototypes -Werror -O3 -o itest itest.c -lpthread ++ gcc -D_GNU_SOURCE -Wall -Wextra -Wstrict-prototypes -O3 -o itest itest.c -lpthread + + clean: + /bin/rm -f itest diff -Nru systemtap-1.4/debian/patches/series systemtap-1.6/debian/patches/series --- systemtap-1.4/debian/patches/series 2011-09-12 14:09:34.000000000 +0000 +++ systemtap-1.6/debian/patches/series 2012-01-30 11:53:58.000000000 +0000 @@ -4,7 +4,4 @@ vim-filetype-override.diff grapher-libs.diff debversion.diff -adding-ifdef-CLONE_STOPPED-to-stop-module-compilatio.patch -Updated-__ip_sock_daddr-for-2.6.38-kernels.patch -fix-compile-warning no-werror.patch diff -Nru systemtap-1.4/debian/patches/Updated-__ip_sock_daddr-for-2.6.38-kernels.patch systemtap-1.6/debian/patches/Updated-__ip_sock_daddr-for-2.6.38-kernels.patch --- systemtap-1.4/debian/patches/Updated-__ip_sock_daddr-for-2.6.38-kernels.patch 2011-03-23 04:47:42.000000000 +0000 +++ systemtap-1.6/debian/patches/Updated-__ip_sock_daddr-for-2.6.38-kernels.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,37 +0,0 @@ -From 0321f208d530087b8bec3bdd974c1ef82887f3f9 Mon Sep 17 00:00:00 2001 -From: David Smith -Date: Mon, 14 Mar 2011 16:01:46 -0500 -Subject: [PATCH] Updated __ip_sock_daddr() for 2.6.38 kernels. - -* tapset/ip.stp (__ip_sock_daddr): Updated for 2.6.38. ---- - tapset/ip.stp | 13 ++++++++----- - 1 files changed, 8 insertions(+), 5 deletions(-) - -diff --git a/tapset/ip.stp b/tapset/ip.stp -index 574fc8b..04321e1 100644 ---- a/tapset/ip.stp -+++ b/tapset/ip.stp -@@ -49,11 +49,14 @@ function __ip_sock_saddr:long (sock:long) - /* return the destination IP address for a given sock */ - function __ip_sock_daddr:long (sock:long) - { -- return (@defined(@cast(sock, "inet_sock")->inet_daddr) -- ? @cast(sock, "inet_sock")->inet_daddr # kernel >= 2.6.33 -- : (@defined(@cast(sock, "inet_sock")->daddr) -- ? @cast(sock, "inet_sock", "kernel")->daddr # kernel >= 2.6.11 -- : @cast(sock, "inet_sock", "kernel")->inet->daddr)) -+ return (@defined(@cast(sock, "inet_sock")->sk->__sk_common->skc_daddr) -+ ? # kernel >= 2.6.38 -+ @cast(sock, "inet_sock")->sk->__sk_common->skc_daddr -+ : (@defined(@cast(sock, "inet_sock")->inet_daddr) -+ ? @cast(sock, "inet_sock")->inet_daddr # kernel >= 2.6.33 -+ : (@defined(@cast(sock, "inet_sock")->daddr) -+ ? @cast(sock, "inet_sock", "kernel")->daddr # kernel >= 2.6.11 -+ : @cast(sock, "inet_sock", "kernel")->inet->daddr))) - } - - /* Get the IP header from a sk_buff struct */ --- -1.7.1 - diff -Nru systemtap-1.4/debian/patches/use-pdflatex.diff systemtap-1.6/debian/patches/use-pdflatex.diff --- systemtap-1.4/debian/patches/use-pdflatex.diff 2011-03-23 07:51:39.000000000 +0000 +++ systemtap-1.6/debian/patches/use-pdflatex.diff 2011-07-29 10:33:10.000000000 +0000 @@ -1,9 +1,7 @@ use pdflater for generation -Index: systemtap/configure.ac -=================================================================== ---- systemtap.orig/configure.ac 2011-02-25 01:17:34.538391001 +0530 -+++ systemtap/configure.ac 2011-02-25 01:20:13.522391000 +0530 -@@ -173,19 +173,19 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -178,19 +178,19 @@ AC_ARG_ENABLE([docs], [enable building documentation (default on if latex etc. found).]), [enable_docs=$enableval], [enable_docs="check"]) @@ -36,10 +34,8 @@ building_docs="yes" fi AM_CONDITIONAL([BUILD_DOCS], [test "$building_docs" == "yes"]) -Index: systemtap/doc/langref.tex -=================================================================== ---- systemtap.orig/doc/langref.tex 2011-02-25 01:17:34.546391001 +0530 -+++ systemtap/doc/langref.tex 2011-02-25 01:20:13.526391000 +0530 +--- a/doc/langref.tex ++++ b/doc/langref.tex @@ -10,6 +10,7 @@ \usepackage{makeidx} \usepackage{verbatim} @@ -48,11 +44,9 @@ \makeindex \makeatletter -Index: systemtap/doc/Makefile.am -=================================================================== ---- systemtap.orig/doc/Makefile.am 2011-02-25 01:17:34.538391001 +0530 -+++ systemtap/doc/Makefile.am 2011-02-25 01:20:13.526391000 +0530 -@@ -22,20 +22,14 @@ +--- a/doc/Makefile.am ++++ b/doc/Makefile.am +@@ -22,20 +22,14 @@ uninstall-local: done endif @@ -79,10 +73,8 @@ + pdflatex -output-directory=$$pwd $<; \ + pdflatex -output-directory=$$pwd $< -Index: systemtap/doc/tutorial.tex -=================================================================== ---- systemtap.orig/doc/tutorial.tex 2011-02-25 01:17:34.546391001 +0530 -+++ systemtap/doc/tutorial.tex 2011-02-25 01:20:13.526391000 +0530 +--- a/doc/tutorial.tex ++++ b/doc/tutorial.tex @@ -5,7 +5,7 @@ % later version. @@ -113,7 +105,7 @@ % \usepackage{draftcopy} % ugly \bibliographystyle{plain} -@@ -1099,9 +1100,9 @@ +@@ -1099,9 +1100,9 @@ and a live GIT source repository. Come \section{Glossary} \renewcommand{\nomname}{} \printglossary diff -Nru systemtap-1.4/debian/patches/vim-filetype-override.diff systemtap-1.6/debian/patches/vim-filetype-override.diff --- systemtap-1.4/debian/patches/vim-filetype-override.diff 2011-03-23 07:51:39.000000000 +0000 +++ systemtap-1.6/debian/patches/vim-filetype-override.diff 2011-07-29 10:33:10.000000000 +0000 @@ -1,8 +1,6 @@ vim filetype override -Index: systemtap/vim/filetype.vim -=================================================================== ---- systemtap.orig/vim/filetype.vim 2011-02-25 01:14:15.938391001 +0530 -+++ systemtap/vim/filetype.vim 2011-02-25 01:20:21.262391000 +0530 +--- a/vim/filetype.vim ++++ b/vim/filetype.vim @@ -6,5 +6,5 @@ " It would be nice to find a way to intelligently detect this. diff -Nru systemtap-1.4/debian/systemtap-client.install systemtap-1.6/debian/systemtap-client.install --- systemtap-1.4/debian/systemtap-client.install 2011-03-23 07:51:39.000000000 +0000 +++ systemtap-1.6/debian/systemtap-client.install 2011-07-29 10:33:10.000000000 +0000 @@ -1,5 +1 @@ -usr/bin/stap-client -usr/lib/systemtap/stap-find-servers -usr/lib/systemtap/stap-client-connect -usr/share/man/man8/stap-client.8 usr/lib/systemtap/stap-env diff -Nru systemtap-1.4/debian/systemtap-runtime.install systemtap-1.6/debian/systemtap-runtime.install --- systemtap-1.4/debian/systemtap-runtime.install 2011-03-23 07:51:39.000000000 +0000 +++ systemtap-1.6/debian/systemtap-runtime.install 2011-07-29 10:33:10.000000000 +0000 @@ -1,5 +1,3 @@ usr/bin/staprun -usr/bin/stap-authorize-signing-cert usr/lib/systemtap/stapio usr/share/man/man8/staprun.8 -usr/share/man/man8/stap-authorize-signing-cert.8 diff -Nru systemtap-1.4/debian/systemtap-server.install systemtap-1.6/debian/systemtap-server.install --- systemtap-1.4/debian/systemtap-server.install 2011-03-23 07:51:39.000000000 +0000 +++ systemtap-1.6/debian/systemtap-server.install 2011-07-29 10:33:10.000000000 +0000 @@ -1,13 +1,8 @@ usr/bin/stap-server usr/lib/systemtap/stap-serverd usr/lib/systemtap/stap-start-server -usr/lib/systemtap/stap-find-or-start-server usr/lib/systemtap/stap-stop-server usr/lib/systemtap/stap-gen-cert -usr/lib/systemtap/stap-authorize-cert -usr/bin/stap-authorize-server-cert -usr/lib/systemtap/stap-server-connect usr/lib/systemtap/stap-sign-module usr/share/man/man8/stap-server.8 -usr/share/man/man8/stap-authorize-server-cert.8 # TODO stap-env diff -Nru systemtap-1.4/doc/beginners/Makefile.in systemtap-1.6/doc/beginners/Makefile.in --- systemtap-1.4/doc/beginners/Makefile.in 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/doc/beginners/Makefile.in 2011-07-25 18:12:01.000000000 +0000 @@ -38,11 +38,17 @@ NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ subdir = doc/beginners DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/doc/SystemTap_Beginners_Guide/publican.cfg.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -80,21 +86,34 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_NLS = @ENABLE_NLS@ EXEEXT = @EXEEXT@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ LDFLAGS = @LDFLAGS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ +LOCALEDIR = @LOCALEDIR@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -110,13 +129,19 @@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +POSUB = @POSUB@ PUBLICAN_BRAND = @PUBLICAN_BRAND@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +STAP_PREFIX = @STAP_PREFIX@ STRIP = @STRIP@ U = @U@ +USE_NLS = @USE_NLS@ VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -129,7 +154,11 @@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ +build = @build@ build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ @@ -139,14 +168,17 @@ exec_prefix = @exec_prefix@ gtkmm_CFLAGS = @gtkmm_CFLAGS@ gtkmm_LIBS = @gtkmm_LIBS@ -have_certutil = @have_certutil@ have_dvips = @have_dvips@ have_latex = @have_latex@ have_latex2html = @have_latex2html@ have_ps2pdf = @have_ps2pdf@ have_publican = @have_publican@ have_xmlto = @have_xmlto@ +host = @host@ host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ diff -Nru systemtap-1.4/doc/.gitignore systemtap-1.6/doc/.gitignore --- systemtap-1.4/doc/.gitignore 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/doc/.gitignore 2011-07-25 18:12:01.000000000 +0000 @@ -8,3 +8,5 @@ *.toc *.dvi _region_.* +beginners +langref diff -Nru systemtap-1.4/doc/langref.tex systemtap-1.6/doc/langref.tex --- systemtap-1.4/doc/langref.tex 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/doc/langref.tex 2011-07-25 18:12:01.000000000 +0000 @@ -1135,6 +1135,14 @@ the target command and descendants only. You can use \texttt{\$\$vars} and others. You can provide the location of debug information to the stap command with the \texttt{-d DIRECTORY} option. +To qualify a probe point to a location in a library required by a +particular process try using a command with this syntax: +\begin{vindent} +\begin{verbatim} +probe process("...").library("...").function("....") { ... } +\end{verbatim} +\end{vindent} +The library name may use wildcards. \subsubsection{Instruction probes} \label{sec:insnprobes} diff -Nru systemtap-1.4/doc/Makefile.in systemtap-1.6/doc/Makefile.in --- systemtap-1.4/doc/Makefile.in 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/doc/Makefile.in 2011-07-25 18:12:01.000000000 +0000 @@ -33,10 +33,16 @@ NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ subdir = doc DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -88,21 +94,34 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_NLS = @ENABLE_NLS@ EXEEXT = @EXEEXT@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ LDFLAGS = @LDFLAGS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ +LOCALEDIR = @LOCALEDIR@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -118,13 +137,19 @@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +POSUB = @POSUB@ PUBLICAN_BRAND = @PUBLICAN_BRAND@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +STAP_PREFIX = @STAP_PREFIX@ STRIP = @STRIP@ U = @U@ +USE_NLS = @USE_NLS@ VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -137,7 +162,11 @@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ +build = @build@ build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ @@ -147,14 +176,17 @@ exec_prefix = @exec_prefix@ gtkmm_CFLAGS = @gtkmm_CFLAGS@ gtkmm_LIBS = @gtkmm_LIBS@ -have_certutil = @have_certutil@ have_dvips = @have_dvips@ have_latex = @have_latex@ have_latex2html = @have_latex2html@ have_ps2pdf = @have_ps2pdf@ have_publican = @have_publican@ have_xmlto = @have_xmlto@ +host = @host@ host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ diff -Nru systemtap-1.4/doc/SystemTap_Beginners_Guide/en-US/Array-Operations.xml systemtap-1.6/doc/SystemTap_Beginners_Guide/en-US/Array-Operations.xml --- systemtap-1.4/doc/SystemTap_Beginners_Guide/en-US/Array-Operations.xml 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/doc/SystemTap_Beginners_Guide/en-US/Array-Operations.xml 2011-07-25 18:12:01.000000000 +0000 @@ -885,7 +885,7 @@ Note - In the context of , count returns the amount of data written by the returned execname() to the virtual file system. + In the context of , count returns the amount of data read by the returned execname() to the virtual file system. @@ -953,7 +953,7 @@ array operations - Returns the number of all values stored into the variable/array index expression. Given the sample probe in , the expression @count(writes[execname()]) will return how many values are stored in each unique key in array writes. + Returns the number of all values stored into the variable/array index expression. Given the sample probe in , the expression @count(reads[execname()]) will return how many values are stored in each unique key in array reads. @@ -989,7 +989,7 @@ - Returns the sum of all values stored into the variable/array index expression. Again, given sample probe in , the expression @sum(writes[execname()]) will return the total of all values stored in each unique key in array writes. + Returns the sum of all values stored into the variable/array index expression. Again, given sample probe in , the expression @sum(reads[execname()]) will return the total of all values stored in each unique key in array reads. diff -Nru systemtap-1.4/doc/SystemTap_Beginners_Guide/en-US/Book_Info.xml systemtap-1.6/doc/SystemTap_Beginners_Guide/en-US/Book_Info.xml --- systemtap-1.4/doc/SystemTap_Beginners_Guide/en-US/Book_Info.xml 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/doc/SystemTap_Beginners_Guide/en-US/Book_Info.xml 2011-07-25 18:12:01.000000000 +0000 @@ -9,7 +9,7 @@ 2.0 Systemtap - 1.4 + 1.5 2 This guide provides basic instructions on how to use SystemTap to monitor different subsystems of &PRODUCT; in finer detail. The SystemTap Beginners Guide is recommended for users who have taken RHCT or have a similar level of expertise in &PRODUCT;. diff -Nru systemtap-1.4/doc/SystemTap_Beginners_Guide/en-US/CrossInstrumenting.xml systemtap-1.6/doc/SystemTap_Beginners_Guide/en-US/CrossInstrumenting.xml --- systemtap-1.4/doc/SystemTap_Beginners_Guide/en-US/CrossInstrumenting.xml 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/doc/SystemTap_Beginners_Guide/en-US/CrossInstrumenting.xml 2011-07-25 18:12:01.000000000 +0000 @@ -14,7 +14,7 @@ cross-compiling script from here: - http://sources.redhat.com/ml/systemtap/2008-q3/msg00310.html + http://sourceware.org/ml/systemtap/2008-q3/msg00310.html diff -Nru systemtap-1.4/doc/SystemTap_Beginners_Guide/en-US/extras/rhelchannels.sh systemtap-1.6/doc/SystemTap_Beginners_Guide/en-US/extras/rhelchannels.sh --- systemtap-1.4/doc/SystemTap_Beginners_Guide/en-US/extras/rhelchannels.sh 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/doc/SystemTap_Beginners_Guide/en-US/extras/rhelchannels.sh 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,14 @@ +#! /bin/bash +pkg=`rpm -q --whatprovides "redhat-release"` +releasever=`rpm -q --qf "%{version}" $pkg` +variant=`echo $releasever | tr -d "[:digit:]" | tr "[:upper:]" "[:lower:]" ` +if test -z "$variant"; then + echo "No Red Hat Enterprise Linux variant (workstation/client/server) found." + exit 1 +fi +version=`echo $releasever | tr -cd "[:digit:]"` +base=`uname -i` +echo "rhel-$base-$variant-$version" +echo "rhel-$base-$variant-$version-debuginfo" +echo "rhel-$base-$variant-optional-$version-debuginfo" +echo "rhel-$base-$variant-optional-$version" diff -Nru systemtap-1.4/doc/SystemTap_Beginners_Guide/en-US/Installation.xml systemtap-1.6/doc/SystemTap_Beginners_Guide/en-US/Installation.xml --- systemtap-1.4/doc/SystemTap_Beginners_Guide/en-US/Installation.xml 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/doc/SystemTap_Beginners_Guide/en-US/Installation.xml 2011-07-25 18:12:01.000000000 +0000 @@ -173,8 +173,61 @@ -devel, -debuginfo, and -debuginfo-common packages for your - kernel. To install the corresponding packages for a - specific kernel, run the following commands: + kernel. + + + + For Red Hat Enterprise Linux 6 and newer you need + the appropriate channels enabled for the system for + yum to download and install the appropriate packages. + Configure the channels with either the + rhn-channel command or the Red Hat Network + web interface. + To obtain a list of the channels SystemTap needs on the system use + the following script: + + + + + +Installation +rhelchannels.sh + + + +rhelchannels.sh + + +rhelchannels.sh + + + + + + + On a system with Red Hat Enterprise Linux 6 for Workstation running the + previous script would return the following list: + +rhel-x86_64-workstation-6 +rhel-x86_64-workstation-6-debuginfo +rhel-x86_64-workstation-optional-6-debuginfo +rhel-x86_64-workstation-optional-6 + + The rhn-channel --list will provide a list of + channels the machine is currently subscribed to. + If the machine is only subscribed to + rhel-x86_64-workstation-6, then + with root and Red Hat Network administrator privileges for the machine + the other channels could be added with the following command: + +rhn-channel --add \ +--channel=rhel-x86_64-workstation-6-debuginfo \ +--channel=rhel-x86_64-workstation-optional-6-debuginfo \ +--channel=rhel-x86_64-workstation-optional-6 + + With the appropriate software repositories are enabled, + install the corresponding packages for a specific kernel using + yum with the following commands: @@ -194,8 +247,13 @@ debuginfo-install kernel-PAE-2.6.18-53.1.13.el5 - - If you do not have yum and yum-utils installed (and you are unable to install them), you will have to manually download and install the required kernel information packages. To generate the URL from which to download the required packages, use the following script: + + If you do not have yum and + yum-utils installed (and you are unable to install + them), you will have to manually download and install the required + kernel information packages. + To generate the URL from which to download the required packages, + use the following script: Installation @@ -207,6 +265,15 @@ + + If you do not have yum + and yum-utils installed (and you are unable to + install them) on Red Hat Enterprise Linux 4 or 5, + you will have to manually download and + install the required kernel information packages. + To generate the URL from which to download the required packages, + use the following script: + diff -Nru systemtap-1.4/doc/SystemTap_Beginners_Guide/en-US/Legal_Notice.xml systemtap-1.6/doc/SystemTap_Beginners_Guide/en-US/Legal_Notice.xml --- systemtap-1.4/doc/SystemTap_Beginners_Guide/en-US/Legal_Notice.xml 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/doc/SystemTap_Beginners_Guide/en-US/Legal_Notice.xml 2011-07-25 18:12:01.000000000 +0000 @@ -19,8 +19,8 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, - MA 02111-1307 USA + Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301 USA. diff -Nru systemtap-1.4/doc/SystemTap_Tapset_Reference/Makefile.am systemtap-1.6/doc/SystemTap_Tapset_Reference/Makefile.am --- systemtap-1.4/doc/SystemTap_Tapset_Reference/Makefile.am 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/doc/SystemTap_Tapset_Reference/Makefile.am 2011-07-25 18:12:01.000000000 +0000 @@ -20,6 +20,7 @@ if XMLTO_STRINGPARAM XMLTOMANPARAMS=--stringparam man.authors.section.enabled=0 --stringparam man.copyright.section.enabled=0 +XMLTOHTMLPARAMS=--stringparam use.id.as.filename=1 endif if BUILD_REFDOCS diff -Nru systemtap-1.4/doc/SystemTap_Tapset_Reference/Makefile.in systemtap-1.6/doc/SystemTap_Tapset_Reference/Makefile.in --- systemtap-1.4/doc/SystemTap_Tapset_Reference/Makefile.in 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/doc/SystemTap_Tapset_Reference/Makefile.in 2011-07-25 18:12:01.000000000 +0000 @@ -34,11 +34,17 @@ NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ @BUILD_REFDOCS_TRUE@noinst_PROGRAMS = docproc$(EXEEXT) subdir = doc/SystemTap_Tapset_Reference DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -96,21 +102,34 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_NLS = @ENABLE_NLS@ EXEEXT = @EXEEXT@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ LDFLAGS = @LDFLAGS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ +LOCALEDIR = @LOCALEDIR@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -126,13 +145,19 @@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +POSUB = @POSUB@ PUBLICAN_BRAND = @PUBLICAN_BRAND@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +STAP_PREFIX = @STAP_PREFIX@ STRIP = @STRIP@ U = @U@ +USE_NLS = @USE_NLS@ VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -145,7 +170,11 @@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ +build = @build@ build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ @@ -155,14 +184,17 @@ exec_prefix = @exec_prefix@ gtkmm_CFLAGS = @gtkmm_CFLAGS@ gtkmm_LIBS = @gtkmm_LIBS@ -have_certutil = @have_certutil@ have_dvips = @have_dvips@ have_latex = @have_latex@ have_latex2html = @have_latex2html@ have_ps2pdf = @have_ps2pdf@ have_publican = @have_publican@ have_xmlto = @have_xmlto@ +host = @host@ host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ @@ -208,6 +240,7 @@ # +--> man/ (mandocs) [by xmlto] @BUILD_PDFREFDOCS_TRUE@PDFDOCS = tapsets.pdf @XMLTO_STRINGPARAM_TRUE@XMLTOMANPARAMS = --stringparam man.authors.section.enabled=0 --stringparam man.copyright.section.enabled=0 +@XMLTO_STRINGPARAM_TRUE@XMLTOHTMLPARAMS = --stringparam use.id.as.filename=1 @BUILD_REFDOCS_TRUE@SRCTREE = $(abs_top_srcdir)/ @BUILD_REFDOCS_TRUE@DOCPROC = $(abs_builddir)/docproc CLEANFILES = tapsets.xml stamp-* $(PDFDOCS) diff -Nru systemtap-1.4/doc/SystemTap_Tapset_Reference/tapsets.tmpl systemtap-1.6/doc/SystemTap_Tapset_Reference/tapsets.tmpl --- systemtap-1.4/doc/SystemTap_Tapset_Reference/tapsets.tmpl 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/doc/SystemTap_Tapset_Reference/tapsets.tmpl 2011-07-25 18:12:01.000000000 +0000 @@ -7,7 +7,7 @@ SystemTap Tapset Reference Manual - 2008-2010 + 2008-2011 Red Hat, Inc. and others @@ -36,8 +36,8 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, - MA 02111-1307 USA + Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301 USA. @@ -150,6 +150,15 @@ !Itapset/tzinfo.stp + + + Time utility functions + + Utility functions to enqueue shell commands. + +!Itapset/system.stp + + Memory Tapset diff -Nru systemtap-1.4/doc/Tapset_Reference_Guide/en-US/Legal_Notice.xml systemtap-1.6/doc/Tapset_Reference_Guide/en-US/Legal_Notice.xml --- systemtap-1.4/doc/Tapset_Reference_Guide/en-US/Legal_Notice.xml 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/doc/Tapset_Reference_Guide/en-US/Legal_Notice.xml 2011-07-25 18:12:01.000000000 +0000 @@ -19,8 +19,8 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, - MA 02111-1307 USA + Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301 USA. diff -Nru systemtap-1.4/doc/Tapset_Reference_Guide/en-US/Tapset_Dev_Guide.xml systemtap-1.6/doc/Tapset_Reference_Guide/en-US/Tapset_Dev_Guide.xml --- systemtap-1.4/doc/Tapset_Reference_Guide/en-US/Tapset_Dev_Guide.xml 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/doc/Tapset_Reference_Guide/en-US/Tapset_Dev_Guide.xml 2011-07-25 18:12:01.000000000 +0000 @@ -119,7 +119,7 @@ will not need or understand them. Keep your tapsets simple and high-level. -info from here:http://sources.redhat.com/git/?p=systemtap.git;a=blob_plain;f=tapset/DEVGUIDE +info from here:http://sourceware.org/git/?p=systemtap.git;a=blob_plain;f=tapset/DEVGUIDE diff -Nru systemtap-1.4/doc/Tapset_Reference_Guide/publicanize.sh systemtap-1.6/doc/Tapset_Reference_Guide/publicanize.sh --- systemtap-1.4/doc/Tapset_Reference_Guide/publicanize.sh 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/doc/Tapset_Reference_Guide/publicanize.sh 2011-07-25 18:12:01.000000000 +0000 @@ -71,7 +71,7 @@ #perl -p -e 'undef $/;s|\n2008-2009\nRed Hat, Inc. and others\n||msg' | #perl -p -e 'undef $/;s|\n\nThis documentation is free software\; you can redistribute\nit and/or modify it under the terms of the GNU General Public\nLicense version 2 as published by the Free Software Foundation.\n||msg' | #perl -p -e 'undef $/;s|\nThis program is distributed in the hope that it will be\nuseful, but WITHOUT ANY WARRANTY; without even the implied\nwarranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\nSee the GNU General Public License for more details.\n||msg' | -#perl -p -e 'undef $/;s|\nYou should have received a copy of the GNU General Public\nLicense along with this program; if not, write to the Free\nSoftware Foundation, Inc., 59 Temple Place, Suite 330, Boston,\nMA 02111-1307 USA\n||msg' | +#perl -p -e 'undef $/;s|\nYou should have received a copy of the GNU General Public\nLicense along with this program; if not, write to the Free\nSoftware Foundation, Inc., 51 Franklin Street, Fifth Floor,\nBoston, MA 02110-1301 USA.\n||msg' | #perl -p -e 'undef $/;s|\nFor more details see the file COPYING in the source\ndistribution of Linux.\n\n\n||msg' | #perl -p -e 'undef $/;s|||msg' | perl -p -e 'undef $/;s|\n\n\n\n\n\n\n\n\n\n\n\n\n\n||msg' | diff -Nru systemtap-1.4/doc/tutorial.tex systemtap-1.6/doc/tutorial.tex --- systemtap-1.4/doc/tutorial.tex 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/doc/tutorial.tex 2011-07-25 18:12:01.000000000 +0000 @@ -56,7 +56,7 @@ {\bf NOTE:} This tutorial does not describe every feature available in systemtap. Please see the individual {\verb+stap+} manual pages for the most up-to-date information. These may be available installed on -your system, or at \verb+http://sources.redhat.com/systemtap/man/+. +your system, or at \verb+http://sourceware.org/systemtap/man/+. \nomenclature{script}{A simple programming language understood by systemtap.} @@ -707,7 +707,7 @@ \item{\bf What about bugs in the translator? compiler?} While bugs in the translator, or the runtime layer certainly exist\footnote{See -\tt http://sources.redhat.com/bugzilla}, our test suite gives some +\tt http://sourceware.org/bugzilla}, our test suite gives some assurance. Plus, the entire generated C code may be inspected (try the \verb+-p3+ option). Compiler bugs are unlikely to be of any greater concern for systemtap than for the kernel as a whole. In @@ -1088,9 +1088,9 @@ as study, modification, and sharing.} Finally, there is the project web site -(\verb+http://sources.redhat.com/systemtap/+) with several articles, +(\verb+http://sourceware.org/systemtap/+) with several articles, an archived public mailing list for users and developers -(\verb+systemtap@sources.redhat.com+), IRC channels, +(\verb+systemtap@sourceware.org+), IRC channels, and a live GIT source repository. Come join us! diff -Nru systemtap-1.4/dtrace.1 systemtap-1.6/dtrace.1 --- systemtap-1.4/dtrace.1 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/dtrace.1 2011-07-25 18:12:01.000000000 +0000 @@ -12,8 +12,8 @@ The dtrace command converts probe descriptions defined in \fIfile.d\fR into a probe header -file via the \fB-h\fR option -or a probe description file via the \fB-G\fR option. +file via the \fB\-h\fR option +or a probe description file via the \fB\-G\fR option. .SH OPTIONS .PP @@ -28,7 +28,7 @@ .TP .B \-o \fIfile\fR is the name of the output file. If the \fB\-G\fR option is given then -the output file will be called \fIfile.o\fR; if the \fB-h\fR option is +the output file will be called \fIfile.o\fR; if the \fB\-h\fR option is given then the output file will be called \fIfile.h\fR. .TP @@ -67,9 +67,9 @@ .fi .in .RE -Then the command \fI"dtrace\ -s\ test.d\ -G"\fR +Then the command \fI"dtrace\ \-s\ test.d\ \-G"\fR will create the probe definition file \fItest.o\fR -and the command \fI"dtrace\ -s\ test.d\ -h"\fR +and the command \fI"dtrace\ \-s\ test.d\ \-h"\fR will create the probe header file \fItest.h\fR Subsequently the application can define probes using .in +2 diff -Nru systemtap-1.4/dtrace.in systemtap-1.6/dtrace.in --- systemtap-1.4/dtrace.in 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/dtrace.in 2011-07-25 18:12:01.000000000 +0000 @@ -1,11 +1,12 @@ #!/usr/bin/python +# vim: et sta sts=4 sw=4 ts=8 # This handles the systemtap equivalent of # $(DTRACE) $(DTRACEFLAGS) -G -s $^ -o $@ # $(DTRACE) $(DTRACEFLAGS) -h -s $^ -o $@ # which is a step that builds DTrace provider and probe definitions -# Copyright (C) 2009, 2010 Red Hat Inc. +# Copyright (C) 2009, 2010, 2011 Red Hat Inc. # # This file is part of systemtap, and is free software. You can # redistribute it and/or modify it under the terms of the GNU General @@ -14,21 +15,34 @@ import os import posix -import string import sys +import shlex from subprocess import call from tempfile import mkstemp +def init_gettext(): + if "@USE_NLS@" == "yes": + import gettext + # hack around autoconf's weird stepwise substitution + datarootdir = "@datarootdir@".replace("${prefix}", "@STAP_PREFIX@") + localedir = "@LOCALEDIR@".replace("${datarootdir}", datarootdir) + gettext.bindtextdomain('@PACKAGE@', localedir) + gettext.textdomain('@PACKAGE@') + return gettext.gettext + return str + +class _provider(object): + def __init__(self): + self.semaphores_def = "\n" -class _provider: - semaphores_def = "\n" # is the type a basic scalar type? def __basic_type(self, arg): basic_types = [ "int","int*","long","long*","short","short int", "unsigned long","char","char*","float","double" ] split_arg = arg.rsplit(None,1) return (split_arg[0].strip() in basic_types) & (arg.find("[") == -1) - def __typedef_append(self, typedefs,this_probe,arg,c): + + def __typedef_append(self, typedefs, this_probe, arg, c, add_typedefs): if (add_typedefs): split_arg = arg.rsplit(None,1) if (self.__basic_type(arg)): @@ -41,16 +55,24 @@ typedefs += ("typedef " + arg.strip() + type_name + "; ") typedefs += (type_name + type_name + "_v;\n") return typedefs + def __semaphore_def_append(self, this_probe): # NB: unsigned short is fixed in ABI self.semaphores_def += '#if defined STAP_SDT_V1\n' self.semaphores_def += '#define %s_%s_semaphore %s_semaphore\n' % \ (self.provider,this_probe,this_probe) self.semaphores_def += '#endif\n' + self.semaphores_def += '#if defined STAP_SDT_V1 || defined STAP_SDT_V2 \n' + self.semaphores_def += "__extension__ unsigned short %s_%s_semaphore __attribute__ ((unused)) __attribute__ ((section (\".probes\")));\n" % \ + (self.provider,this_probe) + self.semaphores_def += '#else\n' self.semaphores_def += "__extension__ unsigned short %s_%s_semaphore __attribute__ ((unused)) __attribute__ ((section (\".probes\"))) __attribute__ ((visibility (\"hidden\")));\n" % \ (self.provider,this_probe) + self.semaphores_def += '#endif\n' + def semaphore_def_write(self, file): file.write(self.semaphores_def) + def generate(self, provider, header, add_typedefs): have_provider = False self.f = open(provider) @@ -95,7 +117,8 @@ args_string = ('%s %s,' % (args_string, arg.strip())) c += 1 - typedefs = self.__typedef_append (typedefs,this_probe,arg,c) + typedefs = self.__typedef_append (typedefs, this_probe, + arg, c, add_typedefs) arg = "" else: arg = arg + args[i] @@ -108,7 +131,8 @@ (self.provider,this_probe) else: c += 1 - typedefs = self.__typedef_append (typedefs,this_probe,arg,c) + typedefs = self.__typedef_append (typedefs, this_probe, + arg, c, add_typedefs) stap_str = "STAP_PROBE%d(%s,%s" % \ (c,self.provider,this_probe) define_str = "#define %s(" % (this_probe_canon) @@ -143,130 +167,130 @@ def usage (): - print "Usage " + sys.argv[0] + " [--help] [-h | -G] [-C [-I]] -s File.d [-o ]" + print _("Usage ") + sys.argv[0] + " [--help] [-h | -G] [-C [-I]] -s File.d [-o ]" def help (): usage() - print "Where -h builds a systemtap header file from the .d file" - print " -C when used with -h, also run cpp preprocessor" - print " -o specifies an explicit output file name," - print " the default for -G is file.o and -h is file.h" - print " -I when running cpp pass through this -I include Path" - print " -s specifies the name of the .d input file" - print " -G builds a stub file.o from file.d," - print " which is required by some packages that use dtrace." + print _("Where -h builds a systemtap header file from the .d file") + print _(" -C when used with -h, also run cpp preprocessor") + print _(" -o specifies an explicit output file name,") + print _(" the default for -G is file.o and -h is file.h") + print _(" -I when running cpp pass through this -I include Path") + print _(" -s specifies the name of the .d input file") + print _(" -G builds a stub file.o from file.d,") + print _(" which is required by some packages that use dtrace.") sys.exit(1) -def open_file (arg): - if (len(sys.argv) <= arg): - return False - try: - file = open(sys.argv[arg], 'r') - except IOError: - print (sys.argv[arg] + " not found") - sys.exit(1) - return file - ######################################################################## # main ######################################################################## -if (len(sys.argv) < 2): - usage() - sys.exit(1) +def main(): + if (len(sys.argv) < 2): + usage() + return 1 -i = 1 -build_header = False -build_source = False -add_typedefs = False -keep_temps = False -use_cpp = False -h_ext = '.h' -filename = "" -s_filename = "" -includes = [] -defines = [] -while (i < len(sys.argv)): - if (sys.argv[i] == "-o"): - i += 1 - filename = sys.argv[i] - elif (sys.argv[i] == "-s"): + i = 1 + build_header = False + build_source = False + add_typedefs = False + keep_temps = False + use_cpp = False + suffix = "" + filename = "" + s_filename = "" + includes = [] + defines = [] + while (i < len(sys.argv)): + if (sys.argv[i] == "-o"): + i += 1 + filename = sys.argv[i] + elif (sys.argv[i] == "-s"): + i += 1 + s_filename = sys.argv[i] + elif (sys.argv[i] == "-C"): + use_cpp = True + elif (sys.argv[i].startswith("-D")): + defines.append(sys.argv[i]) + elif (sys.argv[i] == "-h"): + build_header = True + suffix = ".h" + elif (sys.argv[i].startswith("-I")): + includes.append(sys.argv[i]) + elif (sys.argv[i] == "-G"): + build_source = True + suffix = ".o" + elif (sys.argv[i] == "-k"): + keep_temps = True + elif (sys.argv[i] == "--types"): + add_typedefs = True + elif (sys.argv[i] == "--help"): + help() i += 1 - s_filename = sys.argv[i] - elif (sys.argv[i] == "-C"): - use_cpp = True - elif (sys.argv[i].startswith("-D")): - defines.append(sys.argv[i]) - elif (sys.argv[i] == "-h"): - build_header = True - elif (sys.argv[i].startswith("-I")): - includes.append(sys.argv[i]) - elif (sys.argv[i] == "-G"): - build_source = True - elif (sys.argv[i] == "-k"): - keep_temps = True - elif (sys.argv[i] == "--types"): - add_typedefs = True - elif (sys.argv[i] == "--help"): - help() - i += 1 -if (build_header == False and build_source == False): - usage() - sys.exit(1) - -if (s_filename != "" and use_cpp): - (d,fn) = mkstemp(suffix=".d") - args = ['cpp'] + includes + defines + [s_filename, fn] - retcode = call(args) - if (retcode != 0): - print "\"cpp includes s_filename\" failed" + if (build_header == False and build_source == False): usage() - sys.exit(1) - s_filename = fn -if (filename == ""): - if (s_filename != ""): - (filename,ext) = os.path.splitext(s_filename) - filename = os.path.basename(filename) + return 1 + + if (s_filename != "" and use_cpp): + (d,fn) = mkstemp(suffix=".d") + CPP = os.environ.get("CPP", "cpp") + retcode = call(shlex.split(CPP) + includes + defines + [s_filename, fn]) + if (retcode != 0): + print "\"cpp includes s_filename\" failed" + usage() + return 1 + s_filename = fn + if (filename == ""): + if (s_filename != ""): + (filename,ext) = os.path.splitext(s_filename) + filename = os.path.basename(filename) + else: + usage() + return 1 else: - usage() - sys.exit(1) -else: + suffix = "" if (build_header): - h_ext = "" - else: - (filename,ext) = os.path.splitext(filename) -if (build_header): - providers = _provider() - providers.generate(s_filename, filename + h_ext, add_typedefs) -elif (build_source): - (basename,ext) = os.path.splitext(s_filename) - - # create for semaphore_def_write - providers = _provider() - (d,fn) = mkstemp(suffix=".h") - providers.generate(s_filename, fn, add_typedefs) - if (not keep_temps): - os.remove(fn) - else: - print "header: " + fn + providers = _provider() + providers.generate(s_filename, filename + suffix, add_typedefs) + elif (build_source): + (basename,ext) = os.path.splitext(s_filename) + + # create for semaphore_def_write + providers = _provider() + (d,fn) = mkstemp(suffix=".h") + providers.generate(s_filename, fn, add_typedefs) + if (not keep_temps): + os.remove(fn) + else: + print "header: " + fn + + (d,fn) = mkstemp(suffix=".c") + f = open(fn,mode='w') + f.write("static __dtrace () {}\n") + f.write("\n#include \n\n") + providers.semaphore_def_write(f) + f.close() + CC = os.environ.get("CC", "gcc") + CFLAGS = "-g " + os.environ.get("CFLAGS", "") + retcode = call(shlex.split(CC) + defines + includes + shlex.split(CFLAGS) + + ["-fPIC", "-I.", "-I@prefix@/include", "-c", fn, "-o", + filename + suffix], shell=False) + if (retcode != 0): + print "\"gcc " + fn + "\" failed" + usage() + return 1 + if (not keep_temps): + os.remove(fn) + else: + print "source: " + fn + if (use_cpp): + if (not keep_temps): + os.remove(s_filename) + else: + print "cpp: " + s_filename + return 0 - (d,fn) = mkstemp(suffix=".c") - f = open(fn,mode='w') - f.write("static __dtrace () {}\n") - f.write("\n#include \n\n") - providers.semaphore_def_write(f) - f.close() - #print ["gcc", "-fPIC"] + defines + ["-I.", "-I@prefix@/include", "-g", "-c", fn, "-o", filename + ".o"] - call(["gcc", "-fPIC"] + defines + includes + - ["-I.", "-I@prefix@/include", "-g", "-c", fn, "-o", - filename + ".o"], shell=False) - if (not keep_temps): - os.remove(fn) - else: - print "source: " + fn -if (use_cpp): - if (not keep_temps): - os.remove(s_filename) - else: - print "cpp: " + s_filename +if __name__ == "__main__": + _ = init_gettext() + sys.exit(main()) diff -Nru systemtap-1.4/dwarf_wrappers.cxx systemtap-1.6/dwarf_wrappers.cxx --- systemtap-1.4/dwarf_wrappers.cxx 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/dwarf_wrappers.cxx 2011-07-25 18:12:01.000000000 +0000 @@ -1,5 +1,5 @@ // -*- C++ -*- -// Copyright (C) 2008-2009 Red Hat Inc. +// Copyright (C) 2008-2011 Red Hat Inc. // // This file is part of systemtap, and is free software. You can // redistribute it and/or modify it under the terms of the GNU General @@ -8,6 +8,7 @@ #include "dwarf_wrappers.h" #include "staptree.h" +#include "util.h" #include #include @@ -21,7 +22,7 @@ { if (rc == 0) return; - string msg = "libdwfl failure (" + desc + "): "; + string msg = _F("libdwfl failure (%s): ", desc.c_str()); if (rc < 0) msg += (dwfl_errmsg (rc) ?: "?"); else @@ -33,7 +34,7 @@ { if (rc == 0) return; - string msg = "libdw failure (" + desc + "): "; + string msg = _F("libdw failure (%s): ", desc.c_str()); if (rc < 0) msg += dwarf_errmsg (rc); else diff -Nru systemtap-1.4/dwarf_wrappers.h systemtap-1.6/dwarf_wrappers.h --- systemtap-1.4/dwarf_wrappers.h 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/dwarf_wrappers.h 2011-07-25 18:12:01.000000000 +0000 @@ -1,5 +1,5 @@ // -*- C++ -*- -// Copyright (C) 2008 Red Hat Inc. +// Copyright (C) 2008-2011 Red Hat Inc. // // This file is part of systemtap, and is free software. You can // redistribute it and/or modify it under the terms of the GNU General @@ -13,23 +13,12 @@ extern "C" { #include -#ifdef HAVE_ELFUTILS_VERSION_H #include -#endif #include } #include -#if !defined(_ELFUTILS_PREREQ) -// make a dummy PREREQ check for elfutils < 0.138 -#define _ELFUTILS_PREREQ(major, minor) (0 >= 1) -#endif - -#if ! _ELFUTILS_PREREQ(0,142) -#define DW_TAG_rvalue_reference_type 0x42 -#endif - #if ! _ELFUTILS_PREREQ(0, 148) #define DW_AT_linkage_name 0x6e #endif diff -Nru systemtap-1.4/dwflpp.cxx systemtap-1.6/dwflpp.cxx --- systemtap-1.4/dwflpp.cxx 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/dwflpp.cxx 2011-07-25 18:12:01.000000000 +0000 @@ -1,5 +1,5 @@ // C++ interface to dwfl -// Copyright (C) 2005-2010 Red Hat Inc. +// Copyright (C) 2005-2011 Red Hat Inc. // Copyright (C) 2005-2007 Intel Corporation. // Copyright (C) 2008 James.Bottomley@HansenPartnership.com // @@ -124,7 +124,7 @@ mod_info->dwarf_status = (module_dwarf ? info_present : info_absent); if (!module_dwarf && report) { - string msg = "cannot find "; + string msg = _("cannot find "); if (module_name == "") msg += "kernel"; else @@ -141,7 +141,7 @@ if (required) throw semantic_error (msg); else if (! sess.suppress_warnings) - cerr << "WARNING: " << msg << "\n"; + cerr << _("WARNING: ") << msg << "\n"; } } @@ -232,9 +232,8 @@ { bool t = (fnmatch(pattern.c_str(), module_name.c_str(), 0) == 0); if (t && sess.verbose>3) - clog << "pattern '" << pattern << "' " - << "matches " - << "module '" << module_name << "'" << "\n"; + clog << _F("pattern '%s' matches module '%s'\n", + pattern.c_str(), module_name.c_str()); return t; } @@ -263,9 +262,7 @@ { bool t = (fnmatch(pattern.c_str(), name.c_str(), 0) == 0); if (t && sess.verbose>3) - clog << "pattern '" << pattern << "' " - << "matches " - << "function '" << name << "'" << "\n"; + clog << _F("pattern '%s' matches function '%s'\n", pattern.c_str(), name.c_str()); return t; } @@ -321,9 +318,8 @@ string dir = string("/lib/modules/" + sess.kernel_release ); find_debug_rpms(sess, dir.c_str()); } - throw semantic_error (string("missing ") + sess.architecture + - string(" kernel/module debuginfo under '") + - sess.kernel_build_tree + string("'")); + throw semantic_error (_F("missing %s kernel/module debuginfo under '%s'", + sess.architecture.c_str(), sess.kernel_build_tree.c_str())); } build_blacklist(); @@ -348,9 +344,8 @@ string dir = string("/lib/modules/" + sess.kernel_release ); find_debug_rpms(sess, dir.c_str()); } - throw semantic_error (string("missing ") + sess.architecture + - string(" kernel/module debuginfo under '") + - sess.kernel_build_tree + string("'")); + throw semantic_error (_F("missing %s kernel/module debuginfo under '%s'", + sess.architecture.c_str(), sess.kernel_build_tree.c_str())); } build_blacklist(); @@ -366,19 +361,16 @@ vector::const_iterator it = modules.begin(); dwfl_ptr = setup_dwfl_user(it, modules.end(), debuginfo_needed); if (debuginfo_needed && it != modules.end()) - dwfl_assert (string("missing process ") + - *it + - string(" ") + - sess.architecture + - string(" debuginfo"), - dwfl_ptr.get()->dwfl); + dwfl_assert (string(_F("missing process %s %s debuginfo", + (*it).c_str(), sess.architecture.c_str())), + dwfl_ptr.get()->dwfl); } void dwflpp::iterate_over_modules(int (* callback)(Dwfl_Module *, void **, const char *, Dwarf_Addr, void *), - base_query *data) + void *data) { dwfl_getmodules (dwfl_ptr.get()->dwfl, callback, data, 0); @@ -571,8 +563,8 @@ parents = new cu_die_parent_cache_t; cache_die_parents(parents, cu); if (sess.verbose > 4) - clog << "die parent cache " << module_name << ":" << cu_name() - << " size " << parents->size() << endl; + clog << _F("die parent cache %s:%s size %zu", module_name.c_str(), + cu_name().c_str(), parents->size()) << endl; } return parents; } @@ -787,8 +779,8 @@ global_alias_cache[cu->addr] = v; iterate_over_globals(cu, global_alias_caching_callback, v); if (sess.verbose > 4) - clog << "global alias cache " << module_name << ":" << cu_name() - << " size " << v->size() << endl; + clog << _F("global alias cache %s:%s size %zu", module_name.c_str(), + cu_name().c_str(), v->size()) << endl; } // XXX: it may be desirable to search other modules' declarations @@ -850,8 +842,8 @@ cu_function_cache[cu->addr] = v; dwarf_getfuncs (cu, cu_function_caching_callback, v, 0); if (sess.verbose > 4) - clog << "function cache " << module_name << ":" << cu_name() - << " size " << v->size() << endl; + clog << _F("function cache %s:%s size %zu", module_name.c_str(), + cu_name().c_str(), v->size()) << endl; mod_info->update_symtab(v); } @@ -863,8 +855,8 @@ { Dwarf_Die& die = it->second; if (sess.verbose > 4) - clog << "function cache " << module_name << ":" << cu_name() - << " hit " << function << endl; + clog << _F("function cache %s:%s hit %s", module_name.c_str(), + cu_name().c_str(), function.c_str()) << endl; rc = (*callback)(& die, q); if (rc != DWARF_CB_OK) break; } @@ -885,8 +877,8 @@ && function_name_matches_pattern (linkage_name, function)) { if (sess.verbose > 4) - clog << "function cache " << module_name << ":" << cu_name() - << " match " << linkage_name << " vs " << function << endl; + clog << _F("function cache %s:%s match %s vs %s", module_name.c_str(), + cu_name().c_str(), linkage_name, function.c_str()) << endl; rc = (*callback)(& die, q); if (rc != DWARF_CB_OK) break; @@ -903,8 +895,8 @@ if (function_name_matches_pattern (func_name, function)) { if (sess.verbose > 4) - clog << "function cache " << module_name << ":" << cu_name() - << " match " << func_name << " vs " << function << endl; + clog << _F("function cache %s:%s match %s vs %s", module_name.c_str(), + cu_name().c_str(), func_name.c_str(), function.c_str()) << endl; rc = (*callback)(& die, q); if (rc != DWARF_CB_OK) break; @@ -937,8 +929,8 @@ mod_function_cache[module_dwarf] = v; iterate_over_cus (mod_function_caching_callback, v); if (sess.verbose > 4) - clog << "module function cache " << module_name - << " size " << v->size() << endl; + clog << _F("module function cache %s size %zu", module_name.c_str(), + v->size()) << endl; mod_info->update_symtab(v); } @@ -951,8 +943,8 @@ Dwarf_Die cu_mem; Dwarf_Die& die = it->second; if (sess.verbose > 4) - clog << "module function cache " << module_name - << " hit " << function << endl; + clog << _F("module function cache %s hit %s", module_name.c_str(), + function.c_str()) << endl; // since we're iterating out of cu-context, we need each focus focus_on_cu(dwarf_diecu(&die, &cu_mem, NULL, NULL)); @@ -1015,14 +1007,14 @@ dwflpp::iterate_over_notes (void *object, void (*callback)(void *object, int type, const char *data, size_t len)) { Dwarf_Addr bias; - Elf* elf = (dwarf_getelf (dwfl_module_getdwarf (module, &bias)) - ?: dwfl_module_getelf (module, &bias)); + // Note we really want the actual elf file, not the dwarf .debug file. + // Older binutils had a bug where they mangled the SHT_NOTE type during + // --keep-debug. + Elf* elf = dwfl_module_getelf (module, &bias); size_t shstrndx; if (elf_getshdrstrndx (elf, &shstrndx)) return elf_errno(); - GElf_Addr base = (GElf_Addr) -1; - Elf_Scn *scn = NULL; vector notes; @@ -1037,9 +1029,6 @@ case SHT_NOTE: if (!(shdr.sh_flags & SHF_ALLOC)) { - if (base == (GElf_Addr) -1) - base = 0; - Elf_Data *data = elf_getdata (scn, NULL); size_t next; GElf_Nhdr nhdr; @@ -1057,6 +1046,128 @@ } +/* For each entry in the .dynamic section in the current module call 'callback' + * returning 'object' in case 'callback' is a method */ + +void +dwflpp::iterate_over_libraries (void (*callback)(void *object, const char *arg), void *q) +{ + std::set added; + string interpreter; + + assert (this->module_name.length() != 0); + + Dwarf_Addr bias; +// We cannot use this: dwarf_getelf (dwfl_module_getdwarf (module, &bias)) + Elf *elf = dwfl_module_getelf (module, &bias); +// elf_getphdrnum (elf, &phnum) is not available in all versions of elfutils +// needs libelf from elfutils 0.144+ + for (int i = 0; ; i++) + { + GElf_Phdr mem; + GElf_Phdr *phdr; + phdr = gelf_getphdr (elf, i, &mem); + if (phdr == NULL) + break; + if (phdr->p_type == PT_INTERP) + { + size_t maxsize; + char *filedata = elf_rawfile (elf, &maxsize); + + if (filedata != NULL && phdr->p_offset < maxsize) + interpreter = (char*) (filedata + phdr->p_offset); + break; + } + } + + if (interpreter.length() == 0) + return; + // If it gets cumbersome to maintain this whitelist, we could just check for + // startswith("/lib/ld") || startswith("/lib64/ld"), and trust that no admin + // would install untrustworthy loaders in those paths. + if ((interpreter != "/lib/ld.so.1" // ppc / s390 + && interpreter != "/lib64/ld64.so.1" + && interpreter != "/lib/ld-linux-ia64.so.2" // ia64 + && interpreter != "/emul/ia32-linux/lib/ld-linux.so.2" + && interpreter != "/lib64/ld-linux-x86-64.so.2" // x8664 + && interpreter != "/lib/ld-linux.so.2")) // x86 + { + if (! sess.suppress_warnings) + sess.print_warning (_F("module %s --ldd skipped: unsupported interpreter: %s", + module_name.c_str(), interpreter.c_str())); + return; + } + + vector ldd_command; + ldd_command.push_back("/usr/bin/env"); + ldd_command.push_back("LD_TRACE_LOADED_OBJECTS=1"); + ldd_command.push_back("LD_WARN=yes"); + ldd_command.push_back("LD_BIND_NOW=yes"); + ldd_command.push_back(interpreter); + ldd_command.push_back(module_name); + + FILE *fp; + int child_fd; + pid_t child = stap_spawn_piped(sess.verbose, ldd_command, NULL, &child_fd); + if (child <= 0 || !(fp = fdopen(child_fd, "r"))) + clog << _F("library iteration on %s failed: %s", + module_name.c_str(), strerror(errno)) << endl; + else + { + while (1) // this parsing loop borrowed from add_unwindsym_ldd + { + char linebuf[256]; + char *soname = 0; + char *shlib = 0; + unsigned long int addr = 0; + + char *line = fgets (linebuf, 256, fp); + if (line == 0) break; // EOF or error + + // Try soname => shlib (0xaddr) + int nf = sscanf (line, "%as => %as (0x%lx)", + &soname, &shlib, &addr); + if (nf != 3 || shlib[0] != '/') + { + // Try shlib (0xaddr) + nf = sscanf (line, " %as (0x%lx)", &shlib, &addr); + if (nf != 2 || shlib[0] != '/') + continue; // fewer than expected fields, or bad shlib. + } + + if (added.find (shlib) == added.end()) + { + if (sess.verbose > 2) + { + clog << _F("Added -d '%s", shlib); + if (nf == 3) + clog << _F("' due to '%s'", soname); + else + clog << "'"; + clog << endl; + } + added.insert (shlib); + } + + free (soname); + free (shlib); + } + if ((fclose(fp) || stap_waitpid(sess.verbose, child)) + && !sess.suppress_warnings) + clog << _F("Warning: failed to read libraries from %s: %s", + module_name.c_str(), strerror(errno)) << endl; + } + + for (std::set::iterator it = added.begin(); + it != added.end(); + it++) + { + string modname = *it; + (callback) (q, modname.c_str()); + } +} + + // This little test routine represents an unfortunate breakdown in // abstraction between dwflpp (putatively, a layer right on top of // elfutils), and dwarf_query (interpreting a systemtap probe point). @@ -1084,7 +1195,7 @@ if (nsrcs != 1) { if (sess.verbose>4) - clog << "alternative line " << lineno << " rejected: nsrcs=" << nsrcs << endl; + clog << _F("alternative line %d rejected: nsrcs=%zu", lineno, nsrcs) << endl; return false; } @@ -1101,7 +1212,7 @@ if (die_has_pc (i->die, addr)) { if (sess.verbose>4) - clog << "alternative line " << lineno << " accepted: fn=" << i->name << endl; + clog << _F("alternative line %d accepted: fn=%s", lineno, i->name.c_str()) << endl; return true; } } @@ -1113,13 +1224,14 @@ if (die_has_pc (i->die, addr)) { if (sess.verbose>4) - clog << "alternative line " << lineno << " accepted: ifn=" << i->name << endl; + clog << _F("alternative line %d accepted: ifn=%s", lineno, i->name.c_str()) << endl; return true; } } if (sess.verbose>4) - clog << "alternative line " << lineno << " rejected: leaves selected fns" << endl; + //TRANSLATORS: given line number leaves (is beyond) given function. + clog << _F("alternative line %d rejected: leaves selected fns", lineno) << endl; return false; } @@ -1150,10 +1262,27 @@ Dwarf_Line *line; int line_number; - dwarf_assert ("dwarf_entrypc", dwarf_entrypc (this->function, &addr)); - line = dwarf_getsrc_die (this->cu, addr); - dwarf_assert ("dwarf_getsrc_die", line == NULL); - dwarf_assert ("dwarf_lineno", dwarf_lineno (line, &line_number)); + die_entrypc(this->function, &addr); + + if (addr != 0) + { + line = dwarf_getsrc_die (this->cu, addr); + dwarf_assert ("dwarf_getsrc_die", line == NULL); + dwarf_assert ("dwarf_lineno", dwarf_lineno (line, &line_number)); + } + else if (dwarf_decl_line (this->function, &line_number) != 0) + { + // use DW_AT_decl_line as a fallback method + Dwarf_Attribute type_attr; + Dwarf_Word constant; + if (dwarf_attr_integrate (this->function, DW_AT_decl_line, &type_attr)) + { + dwarf_formudata (&type_attr, &constant); + line_number = constant; + } + else + return; + } lineno += line_number; } else if (line_type == WILDCARD) @@ -1168,9 +1297,9 @@ lineno = lineno < start_lineno ? start_lineno : lineno; if (lineno > lines[1]) { /* invalid line range */ stringstream advice; - advice << "Invalid line range (" << lines[0] << "-" << lines[1] << ")"; + advice << _("Invalid line range (") << lines[0] << "-" << lines[1] << ")"; if (start_lineno > lines[1]) - advice << ", the end line number " << lines[1] << " < " << start_lineno; + advice << _(", the end line number ") << lines[1] << " < " << start_lineno; throw semantic_error (advice.str()); } } @@ -1242,14 +1371,16 @@ } stringstream advice; - advice << "multiple addresses for " << srcfile << ":" << lineno; + advice << _F("multiple addresses for %s:%d", srcfile, lineno); if (lo_try > 0 || hi_try > 0) { - advice << " (try "; + //TRANSLATORS: Here we are trying to advise what source file + //TRANSLATORS: to attempt. + advice << _(" (try "); if (lo_try > 0) advice << srcfile << ":" << lo_try; if (lo_try > 0 && hi_try > 0) - advice << " or "; + advice << _(" or "); if (hi_try > 0) advice << srcfile << ":" << hi_try; advice << ")"; @@ -1320,15 +1451,12 @@ if (!inner_die_containing_pc(scopes[1], stmt_addr, scope) && !sess.suppress_warnings) { - ostringstream msg; - msg << "label '" << name << "' at address " - << lex_cast_hex(stmt_addr) << " (dieoffset: " - << lex_cast_hex(dwarf_dieoffset(&die)) - << ") is not contained by its scope '" - << (dwarf_diename(&scope) ?: "") - << "' (dieoffset: " << lex_cast_hex(dwarf_dieoffset(&scope)) - << ") -- bad debuginfo?"; - sess.print_warning (msg.str()); + sess.print_warning(_F("label '%s' at address %s (dieoffset: %s) is not " + "contained by its scope '%s' (dieoffset: %s) -- bad" + " debuginfo?", name, lex_cast_hex(stmt_addr).c_str(), + lex_cast_hex(dwarf_dieoffset(&die)).c_str(), + (dwarf_diename(&scope) ?: ""), + lex_cast_hex(dwarf_dieoffset(&scope)).c_str())); } callback(function, name, file, dline, &scope, stmt_addr, q); @@ -1377,7 +1505,7 @@ { filtered_srcfiles.insert (fname); if (sess.verbose>2) - clog << "selected source file '" << fname << "'\n"; + clog << _F("selected source file '%s'\n", fname); } } } @@ -1447,8 +1575,8 @@ if (!entrypc_srcline) { if (sess.verbose > 2) - clog << "missing entrypc dwarf line record for function '" - << it->name << "'\n"; + clog << _F("missing entrypc dwarf line record for function '%s'\n", + it->name.c_str()); // This is probably an inlined function. We'll end up using // its lowpc as a probe address. continue; @@ -1457,18 +1585,17 @@ if (entrypc == 0) { if (sess.verbose > 2) - clog << "null entrypc dwarf line record for function '" - << it->name << "'\n"; + clog << _F("null entrypc dwarf line record for function '%s'\n", + it->name.c_str()); // This is probably an inlined function. We'll skip this instance; // it is messed up. continue; } if (sess.verbose>2) - clog << "prologue searching function '" << it->name << "'" - << " 0x" << hex << entrypc << "-0x" << highpc << dec - << "@" << it->decl_file << ":" << it->decl_line - << "\n"; + clog << _F("searching for prologue of function '%s' 0x%#" PRIx64 "-0x%#" PRIx64 + "@%s:%d\n", it->name.c_str(), entrypc, highpc, it->decl_file, + it->decl_line); // Now we go searching for the first line record that has a // file/line different from the one in the declaration. @@ -1491,8 +1618,8 @@ int postprologue_lineno = lr.lineno(); if (sess.verbose>2) - clog << "checking line record 0x" << hex << postprologue_addr << dec - << "@" << postprologue_file << ":" << postprologue_lineno << "\n"; + clog << _F("checking line record 0x%#" PRIx64 "@%s:%d\n", postprologue_addr, + postprologue_file, postprologue_lineno); if (postprologue_addr >= highpc) { @@ -1508,10 +1635,12 @@ if (sess.verbose>2) { - clog << "prologue found function '" << it->name << "'"; + clog << _F("prologue found function '%s'", it->name.c_str()); // Add a little classification datum - if (postprologue_srcline_idx == entrypc_srcline_idx) clog << " (naked)"; - if (ranoff_end) clog << " (tail-call?)"; + //TRANSLATORS: Here we're adding some classification datum (ie Prologue Free) + if (postprologue_srcline_idx == entrypc_srcline_idx) clog << _(" (naked)"); + //TRANSLATORS: Here we're adding some classification datum (ie Prologue Free) + if (ranoff_end) clog << _(" (tail-call?)"); clog << " = 0x" << hex << postprologue_addr << dec << "\n"; } @@ -1575,7 +1704,7 @@ while ((offset = dwarf_ranges (die, offset, &base, &begin, &end)) > 0) extra ++; if (extra) - lookup_method += ", ignored " + lex_cast(extra) + " more"; + lookup_method += _F(", ignored %s more", lex_cast(extra).c_str()); } } @@ -1584,15 +1713,13 @@ // COMDAT copies of C++ functions. if (rc == 0 && *addr == 0) { - lookup_method += " (skip comdat)"; + lookup_method += _(" (skip comdat)"); rc = 1; } if (sess.verbose > 2) - clog << "entry-pc lookup (" << lookup_method << " dieoffset: " << lex_cast_hex(dwarf_dieoffset (die)) - << ") = 0x" << hex << *addr << dec - << " (rc " << rc << ")" - << endl; + clog << _F("entry-pc lookup (%s dieoffset: %s) = 0x%#" PRIx64 " (rc %d", lookup_method.c_str(), + lex_cast_hex(dwarf_dieoffset(die)).c_str(), *addr, rc) << endl; return (rc == 0); } @@ -1707,14 +1834,14 @@ // relocatable module probing code will need to have. Dwfl *dwfl = dwfl_ptr.get()->dwfl; if (! dwfl) - throw semantic_error ("emit_address internal error, no dwfl"); + throw semantic_error (_("emit_address internal error, no dwfl")); Dwfl_Module *mod = dwfl_addrmodule (dwfl, address); if (! mod) { ostringstream msg; - msg << "emit_address internal error, dwfl_addrmodule failed, " - "address 0x" << hex << address << dec; + msg << _F("emit_address internal error, dwfl_addrmodule failed, " + "address 0x%#" PRIx64 , address); const char *err = dwfl_errmsg(0); if (err) msg << " (" << err << ")"; @@ -1732,11 +1859,8 @@ if (sess.verbose > 2) { - clog << "emit dwarf addr 0x" << hex << address << dec - << " => module " << modname - << " section " << (secname ?: "null") - << " relocaddr 0x" << hex << reloc_address << dec - << endl; + clog << _F("emit dwarf addr 0x%#" PRIx64 " => module %s section %s relocaddr 0x%#" PRIx64, + address, modname, (secname ?: "null"), reloc_address) << endl; } if (n > 0 && !(n == 1 && secname == NULL)) @@ -1839,15 +1963,11 @@ { stringstream alternatives; print_locals (scopes, alternatives); - throw semantic_error ("unable to find local '" + local + "'" - + " near pc " + lex_cast_hex(pc) - + ((scope_die == NULL) ? "" - : (string (" in ") - + (dwarf_diename(scope_die) ?: "") - + "(" + (dwarf_diename(cu) ?: "") - + ")")) - + (alternatives.str() == "" ? "" : (" (alternatives:" + alternatives.str () + ")")), - e->tok); + throw semantic_error (_F("unable to find local '%s' near pc %s %s %s %s (%s)", local.c_str(), + lex_cast_hex(pc).c_str(), (scope_die == NULL) ? "" : _(" in "), + (dwarf_diename(scope_die) ?: ""), + (dwarf_diename(cu) ?: ""), + (alternatives.str() == "" ? "" : (_(" (alternatives:") + alternatives.str())).c_str()), e->tok); } /* We start out walking the "lexical scopes" as returned by @@ -1878,9 +1998,8 @@ { physcopes = getscopes_die(&scope); if (physcopes.empty()) - throw semantic_error ("unable to get die scopes for '" + - local + "' in an inlined subroutines", - e->tok); + throw semantic_error (_F("unable to get die scopes for '%s' in an inlined subroutine", + local.c_str()), e->tok); fbscopes = &physcopes; inner = 0; // zero is current scope, for look will increase. declaring_scope = -1; @@ -1903,22 +2022,7 @@ { /* DW_AT_data_member_location, can be either constant offsets - (struct member fields), or full blown location expressions. - In older elfutils, dwarf_getlocation_addr would not handle the - constant for us, but newer ones do. For older ones, we work - it by faking an expression, which is what newer ones do. */ -#if !_ELFUTILS_PREREQ (0,142) - if (dwarf_whatattr (attr) == DW_AT_data_member_location) - { - Dwarf_Op offset_loc; - memset(&offset_loc, 0, sizeof(Dwarf_Op)); - offset_loc.atom = DW_OP_plus_uconst; - if (dwarf_formudata (attr, &offset_loc.number) == 0) - return c_translate_location (pool, &loc2c_error, this, - &loc2c_emit_address, 1, 0, pc, - NULL, &offset_loc, 1, NULL, NULL, NULL); - } -#endif + (struct member fields), or full blown location expressions. */ /* There is no location expression, but a constant value instead. */ if (dwarf_whatattr (attr) == DW_AT_const_value) @@ -1945,16 +2049,13 @@ /* Fall through. */ case 0: /* Shouldn't happen. */ - throw semantic_error ("not accessible at this address (" - + lex_cast_hex(pc) + ", dieoffset: " - + lex_cast_hex(dwarf_dieoffset(die)) + ")", - e->tok); + throw semantic_error (_F("not accessible at this address (%s, dieoffset: %s)", + lex_cast_hex(pc).c_str(), lex_cast_hex(dwarf_dieoffset(die)).c_str()), + e->tok); default: /* Shouldn't happen. */ case -1: - throw semantic_error (string ("dwarf_getlocation_addr failed, ") + - string (dwarf_errmsg (-1)), - e->tok); + throw semantic_error (_F("dwarf_getlocation_addr failed, %s", dwarf_errmsg(-1)), e->tok); } // pc is in the dw address space of the current module, which is what @@ -1977,9 +2078,7 @@ typetag != DW_TAG_class_type && typetag != DW_TAG_union_type) { - o << " Error: " - << dwarf_type_name(vardie) - << " isn't a struct/class/union"; + o << _F(" Error: %s isn't a struct/class/union", dwarf_type_name(vardie).c_str()); return; } @@ -1989,8 +2088,7 @@ switch (dwarf_child (vardie, die)) { case 1: // No children. - o << dwarf_type_name(vardie) - << " is empty"; + o << _F("%s is empty", dwarf_type_name(vardie).c_str()); break; case -1: // Error. @@ -2022,8 +2120,8 @@ string source = dwarf_decl_file(die) ?: ""; int line = -1; dwarf_decl_line(die, &line); - clog << "\n Error in obtaining type attribute for anonymous member at " - << source << ":" << line; + clog << _F("\n Error in obtaining type attribute for anonymous " + "member at %s:%d", source.c_str(), line); return; } @@ -2096,9 +2194,8 @@ /* Union members don't usually have a location, * but just use the containing union's location. */ else if (dwarf_tag(parentdie) != DW_TAG_union_type) - throw semantic_error ("no location for field '" + c.member - + "': " + string(dwarf_errmsg (-1)), - c.tok); + throw semantic_error (_F("no location for field '%s':%s", + c.member.c_str(), dwarf_errmsg(-1)), c.tok); return true; } @@ -2108,8 +2205,7 @@ dwarf_die_type (Dwarf_Die *die, Dwarf_Die *typedie_mem, const token *tok=NULL) { if (!dwarf_attr_die (die, DW_AT_type, typedie_mem)) - throw semantic_error ("cannot get type of field: " - + string(dwarf_errmsg(-1)), tok); + throw semantic_error (_F("cannot get type of field: %s", dwarf_errmsg(-1)), tok); } @@ -2155,9 +2251,8 @@ case DW_TAG_pointer_type: /* A pointer with no type is a void* -- can't dereference it. */ if (!dwarf_hasattr_integrate (typedie, DW_AT_type)) - throw semantic_error ("invalid access '" + lex_cast(c) - + "' vs. " + dwarf_type_name(typedie), - c.tok); + throw semantic_error (_F("invalid access '%s' vs '%s'", lex_cast(c).c_str(), + dwarf_type_name(typedie).c_str()), c.tok); if (pool) c_translate_pointer (pool, 1, 0 /* PR9768*/, typedie, tail); @@ -2184,8 +2279,8 @@ index.c_str(), 0); } else - throw semantic_error ("invalid access '" + lex_cast(c) - + "' for array type", c.tok); + throw semantic_error (_F("invalid access '%s' for array type", + lex_cast(c).c_str()), c.tok); dwarf_die_type (typedie, typedie, c.tok); *vardie = *typedie; @@ -2196,16 +2291,14 @@ case DW_TAG_union_type: case DW_TAG_class_type: if (c.type != target_symbol::comp_struct_member) - throw semantic_error ("invalid access '" + lex_cast(c) - + "' for " + dwarf_type_name(typedie), - c.tok); + throw semantic_error (_F("invalid access '%s' for %s", + lex_cast(c).c_str(), dwarf_type_name(typedie).c_str())); if (dwarf_hasattr(typedie, DW_AT_declaration)) { Dwarf_Die *tmpdie = declaration_resolve(typedie); if (tmpdie == NULL) - throw semantic_error ("unresolved " + dwarf_type_name(typedie), - c.tok); + throw semantic_error (_F("unresolved %s", dwarf_type_name(typedie).c_str()), c.tok); *typedie = *tmpdie; } @@ -2230,11 +2323,9 @@ print_members(typedie, members); if (members.str().size() != 0) alternatives = " (alternatives:" + members.str() + ")"; - throw semantic_error("unable to find member '" + - c.member + "' for " - + dwarf_type_name(typedie) - + source + alternatives, - c.tok); + throw semantic_error(_F("unable to find member '%s' for %s%s%s", c.member.c_str(), + dwarf_type_name(typedie).c_str(), source.c_str(), + alternatives.c_str()), c.tok); } for (unsigned j = 0; j < locs.size(); ++j) @@ -2249,21 +2340,17 @@ case DW_TAG_enumeration_type: case DW_TAG_base_type: - throw semantic_error ("invalid access '" - + lex_cast(c) - + "' vs. " + dwarf_type_name(typedie), - c.tok); + throw semantic_error (_F("invalid access '%s' vs. %s", lex_cast(c).c_str(), + dwarf_type_name(typedie).c_str()), c.tok); break; case -1: - throw semantic_error ("cannot find type: " + string(dwarf_errmsg (-1)), - c.tok); + throw semantic_error (_F("cannot find type: %s", dwarf_errmsg(-1)), c.tok); break; default: - throw semantic_error (dwarf_type_name(typedie) + ": unexpected type tag " - + lex_cast(dwarf_tag (typedie)), - c.tok); + throw semantic_error (_F("%s: unexpected type tag %s", dwarf_type_name(typedie).c_str(), + lex_cast(dwarf_tag(typedie)).c_str()), c.tok); break; } } @@ -2282,7 +2369,7 @@ typetag == DW_TAG_volatile_type) { if (!dwarf_attr_die (innerdie, DW_AT_type, innerdie)) - throw semantic_error ("cannot get type of pointee: " + string(dwarf_errmsg (-1)), e->tok); + throw semantic_error (_F("cannot get type of pointee: %s", dwarf_errmsg(-1)), e->tok); typetag = dwarf_tag (innerdie); } } @@ -2291,7 +2378,7 @@ void dwflpp::translate_final_fetch_or_store (struct obstack *pool, struct location **tail, - Dwarf_Addr module_bias, + Dwarf_Addr /*module_bias*/, Dwarf_Die *vardie, Dwarf_Die *start_typedie, bool lvalue, @@ -2311,10 +2398,10 @@ if (e->addressof) { if (lvalue) - throw semantic_error ("cannot write to member address", e->tok); + throw semantic_error (_("cannot write to member address"), e->tok); if (dwarf_hasattr_integrate (vardie, DW_AT_bit_offset)) - throw semantic_error ("cannot take address of bit-field", e->tok); + throw semantic_error (_("cannot take address of bit-field"), e->tok); c_translate_addressof (pool, 1, 0, vardie, typedie, tail, "THIS->__retvalue"); ty = pe_long; @@ -2328,19 +2415,17 @@ switch (typetag) { default: - throw semantic_error ("unsupported type tag " - + lex_cast(typetag) - + " for " + dwarf_type_name(typedie), e->tok); + throw semantic_error (_F("unsupported type tag %s for %s", lex_cast(typetag).c_str(), + dwarf_type_name(typedie).c_str()), e->tok); break; case DW_TAG_structure_type: case DW_TAG_class_type: case DW_TAG_union_type: - throw semantic_error ("'" + dwarf_type_name(typedie) - + "' is being accessed instead of a member", e->tok); + throw semantic_error (_F("'%s' is being accessed instead of a member", + dwarf_type_name(typedie).c_str()), e->tok); break; - case DW_TAG_enumeration_type: case DW_TAG_base_type: // Reject types we can't handle in systemtap @@ -2349,11 +2434,11 @@ Dwarf_Word encoding = (Dwarf_Word) -1; dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_encoding, &encoding_attr), & encoding); - if (encoding < 0) + if (encoding == (Dwarf_Word) -1) { // clog << "bad type1 " << encoding << " diestr" << endl; - throw semantic_error ("unsupported type (mystery encoding " + lex_cast(encoding) + ")" + - " for " + dwarf_type_name(typedie), e->tok); + throw semantic_error (_F("unsupported type (mystery encoding %s for %s", lex_cast(encoding).c_str(), + dwarf_type_name(typedie).c_str()), e->tok); } if (encoding == DW_ATE_float @@ -2361,10 +2446,12 @@ /* XXX || many others? */) { // clog << "bad type " << encoding << " diestr" << endl; - throw semantic_error ("unsupported type (encoding " + lex_cast(encoding) + ")" + - " for " + dwarf_type_name(typedie), e->tok); + throw semantic_error (_F("unsupported type (encoding %s) for %s", lex_cast(encoding).c_str(), + dwarf_type_name(typedie).c_str()), e->tok); } } + // Fallthrough. enumeration_types are always scalar. + case DW_TAG_enumeration_type: ty = pe_long; if (lvalue) @@ -2384,10 +2471,10 @@ { ty = pe_long; if (typetag == DW_TAG_array_type) - throw semantic_error ("cannot write to array address", e->tok); + throw semantic_error (_("cannot write to array address"), e->tok); if (typetag == DW_TAG_reference_type || typetag == DW_TAG_rvalue_reference_type) - throw semantic_error ("cannot write to reference", e->tok); + throw semantic_error (_("cannot write to reference"), e->tok); assert (typetag == DW_TAG_pointer_type); c_translate_pointer_store (pool, 1, 0 /* PR9768 */, typedie, tail, "THIS->value"); @@ -2460,11 +2547,11 @@ const char *name = dwarf_linkage_name (vardie) ?: dwarf_diename (vardie); if (sess.verbose > 2) - clog << "finding symtable address for " << name << "\n"; + clog << _F("finding symtable address for %s\n", name); *addr = 0; int syms = dwfl_module_getsymtab (module); - dwfl_assert ("Getting symbols", syms >= 0); + dwfl_assert (_("Getting symbols"), syms >= 0); for (int i = 0; *addr == 0 && i < syms; i++) { @@ -2479,7 +2566,7 @@ } if (sess.verbose > 2) - clog << "found " << name << "@0x" << hex << *addr << "\n"; + clog << _F("found %s @0x%#" PRIx64 "\n", name, *addr); return *addr; } @@ -2499,10 +2586,8 @@ &vardie, &fb_attr_mem); if (sess.verbose>2) - clog << "finding location for local '" << local - << "' near address 0x" << hex << pc - << ", module bias 0x" << module_bias << dec - << "\n"; + clog << _F("finding location for local '%s' near address 0x%#" PRIx64 + ", module bias 0x%#" PRIx64 "\n", local.c_str(), pc, module_bias); #define obstack_chunk_alloc malloc #define obstack_chunk_free free @@ -2532,12 +2617,8 @@ NULL, &addr_loc, 1, &tail, NULL, NULL); } else - throw semantic_error("failed to retrieve location " - "attribute for local '" + local - + "' (dieoffset: " - + lex_cast_hex(dwarf_dieoffset (&vardie)) - + ")", - e->tok); + throw semantic_error (_F("failed to retrieve location attribute for local '%s' (dieoffset: %s)", + local.c_str(), lex_cast_hex(dwarf_dieoffset(&vardie)).c_str()), e->tok); } else head = translate_location (&pool, &attr_mem, &vardie, pc, fb_attr, &tail, e); @@ -2546,9 +2627,7 @@ Dwarf_Die typedie; if (dwarf_attr_die (&vardie, DW_AT_type, &typedie) == NULL) - throw semantic_error("failed to retrieve type " - "attribute for local '" + local + "'", - e->tok); + throw semantic_error(_F("failed to retrieve type attribute for local '%s'", local.c_str()), e->tok); translate_components (&pool, &tail, pc, e, &vardie, &typedie); @@ -2582,9 +2661,7 @@ find_variable_and_frame_base (scopes, pc, local, e, &vardie, &attr_mem); if (dwarf_attr_die (&vardie, DW_AT_type, typedie) == NULL) - throw semantic_error("failed to retrieve type " - "attribute for local '" + local + "'", - e->tok); + throw semantic_error(_F("failed to retrieve type attribute for local '%s'", local.c_str()), e->tok); translate_components (NULL, NULL, pc, e, &vardie, typedie); return typedie; @@ -2599,11 +2676,8 @@ exp_type & ty) { if (sess.verbose>2) - clog << "literal_stmt_for_return: finding return value for " - << (dwarf_diename(scope_die) ?: "") - << "(" - << (dwarf_diename(cu) ?: "") - << ")\n"; + clog << _F("literal_stmt_for_return: finding return value for %s (%s)\n", + (dwarf_diename(scope_die) ?: ""), (dwarf_diename(cu) ?: "")); struct obstack pool; obstack_init (&pool); @@ -2615,21 +2689,16 @@ &locops); if (nlocops < 0) { - throw semantic_error("failed to retrieve return value location" - " for " - + string(dwarf_diename(scope_die) ?: "") - + "(" + string(dwarf_diename(cu) ?: "") - + ")", - e->tok); + throw semantic_error(_F("failed to retrieve return value location for %s (%s)", + (dwarf_diename(scope_die) ?: ""), + (dwarf_diename(cu) ?: "")), e->tok); } // the function has no return value (e.g. "void" in C) else if (nlocops == 0) { - throw semantic_error("function " - + string(dwarf_diename(scope_die) ?: "") - + "(" + string(dwarf_diename(cu) ?: "") - + ") has no return value", - e->tok); + throw semantic_error(_F("function %s (%s) has no return value", + (dwarf_diename(scope_die) ?: ""), + (dwarf_diename(cu) ?: "")), e->tok); } struct location *head = c_translate_location (&pool, &loc2c_error, this, @@ -2642,11 +2711,9 @@ Dwarf_Die vardie = *scope_die, typedie; if (dwarf_attr_die (&vardie, DW_AT_type, &typedie) == NULL) - throw semantic_error("failed to retrieve return value type attribute for " - + string(dwarf_diename(&vardie) ?: "") - + "(" + string(dwarf_diename(cu) ?: "") - + ")", - e->tok); + throw semantic_error(_F("failed to retrieve return value type attribute for %s (%s)", + (dwarf_diename(&vardie) ?: ""), + (dwarf_diename(cu) ?: "")), e->tok); translate_components (&pool, &tail, pc, e, &vardie, &typedie); @@ -2675,11 +2742,9 @@ { Dwarf_Die vardie = *scope_die; if (dwarf_attr_die (&vardie, DW_AT_type, typedie) == NULL) - throw semantic_error("failed to retrieve return value type attribute for " - + string(dwarf_diename(&vardie) ?: "") - + "(" + string(dwarf_diename(cu) ?: "") - + ")", - e->tok); + throw semantic_error(_F("failed to retrieve return value type attribute for %s (%s)", + (dwarf_diename(&vardie) ?: ""), + (dwarf_diename(cu) ?: "")), e->tok); translate_components (NULL, NULL, pc, e, &vardie, typedie); return typedie; @@ -2693,11 +2758,8 @@ exp_type & ty) { if (sess.verbose>2) - clog << "literal_stmt_for_pointer: finding value for " - << dwarf_type_name(start_typedie) - << "(" - << (dwarf_diename(cu) ?: "") - << ")\n"; + clog << _F("literal_stmt_for_pointer: finding value for %s (%s)\n", + dwarf_type_name(start_typedie).c_str(), (dwarf_diename(cu) ?: "")); struct obstack pool; obstack_init (&pool); @@ -2814,7 +2876,7 @@ // then allowing the exit code to run // then removing these kprobes if (sess.verbose>1) - clog << " skipping - init/exit"; + clog << _(" skipping - init/exit"); return true; } @@ -2822,7 +2884,7 @@ if (module == TOK_KERNEL && in_kprobes_function(sess, addr)) { if (sess.verbose>1) - clog << " skipping - __kprobes"; + clog << _(" skipping - __kprobes"); return true; } @@ -2837,12 +2899,12 @@ if (sess.guru_mode) { if (sess.verbose>1) - clog << " guru mode enabled - ignoring blacklist"; + clog << _(" guru mode enabled - ignoring blacklist"); } else { if (sess.verbose>1) - clog << " skipping - blacklisted"; + clog << _(" skipping - blacklisted"); return true; } } @@ -2981,7 +3043,7 @@ if (sess.verbose > 2) { - clog << "blacklist regexps:" << endl; + clog << _("blacklist regexps:") << endl; clog << "blfn: " << blfn << endl; clog << "blfn_ret: " << blfn_ret << endl; clog << "blfile: " << blfile << endl; @@ -2989,13 +3051,13 @@ } int rc = regcomp (& blacklist_func, blfn.c_str(), REG_NOSUB|REG_EXTENDED); - if (rc) throw semantic_error ("blacklist_func regcomp failed"); + if (rc) throw semantic_error (_("blacklist_func regcomp failed")); rc = regcomp (& blacklist_func_ret, blfn_ret.c_str(), REG_NOSUB|REG_EXTENDED); - if (rc) throw semantic_error ("blacklist_func_ret regcomp failed"); + if (rc) throw semantic_error (_("blacklist_func_ret regcomp failed")); rc = regcomp (& blacklist_file, blfile.c_str(), REG_NOSUB|REG_EXTENDED); - if (rc) throw semantic_error ("blacklist_file regcomp failed"); + if (rc) throw semantic_error (_("blacklist_file regcomp failed")); rc = regcomp (& blacklist_section, blsection.c_str(), REG_NOSUB|REG_EXTENDED); - if (rc) throw semantic_error ("blacklist_section regcomp failed"); + if (rc) throw semantic_error (_("blacklist_section regcomp failed")); blacklist_enabled = true; } @@ -3141,7 +3203,6 @@ clog << "get_cfa_ops @0x" << hex << pc << dec << ", module_start @0x" << hex << module_start << dec << endl; -#if _ELFUTILS_PREREQ(0,142) // Try debug_frame first, then fall back on eh_frame. size_t cfa_nops = 0; Dwarf_Addr bias = 0; @@ -3176,24 +3237,20 @@ clog << "dwfl_module_eh_cfi failed: " << dwfl_errmsg(-1) << endl; } -#endif if (sess.verbose > 2) { if (cfa_ops == NULL) - clog << "not found cfa" << endl; -#if _ELFUTILS_PREREQ(0,142) + clog << _("not found cfa") << endl; else { Dwarf_Addr frame_start, frame_end; bool frame_signalp; int info = dwarf_frame_info (frame, &frame_start, &frame_end, &frame_signalp); - clog << "found cfa, info:" << info << " [start: 0x" << hex - << frame_start << dec << ", end: 0x" << hex << frame_end - << dec << "), nops: " << cfa_nops << endl; + clog << _F("found cfa, info: %d [start: 0x%#" PRIx64 ", end: 0x%#" PRIx64 + ", nops: %zu", info, frame_start, frame_end, cfa_nops) << endl; } -#endif } return cfa_ops; diff -Nru systemtap-1.4/dwflpp.h systemtap-1.6/dwflpp.h --- systemtap-1.4/dwflpp.h 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/dwflpp.h 2011-07-25 18:12:01.000000000 +0000 @@ -30,11 +30,6 @@ #include } -#if !_ELFUTILS_PREREQ(0,142) -// Always use newer name, old name is deprecated in 0.142. -#define elf_getshdrstrndx elf_getshstrndx -#endif - struct func_info; struct inline_instance_info; @@ -202,7 +197,7 @@ void iterate_over_modules(int (* callback)(Dwfl_Module *, void **, const char *, Dwarf_Addr, void *), - base_query *data); + void *data); void iterate_over_cus (int (*callback)(Dwarf_Die * die, void * arg), void * data); @@ -251,6 +246,10 @@ void (*callback)(void *object, int type, const char *data, size_t len)); + void iterate_over_libraries (void (*callback)(void *object, + const char *data), void *data); + + GElf_Shdr * get_section(std::string section_name, GElf_Shdr *shdr_mem, Elf **elf_ret=NULL); diff -Nru systemtap-1.4/elaborate.cxx systemtap-1.6/elaborate.cxx --- systemtap-1.4/elaborate.cxx 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/elaborate.cxx 2011-07-25 18:12:01.000000000 +0000 @@ -1,5 +1,5 @@ // elaboration functions -// Copyright (C) 2005-2010 Red Hat Inc. +// Copyright (C) 2005-2011 Red Hat Inc. // Copyright (C) 2008 Intel Corporation // // This file is part of systemtap, and is free software. You can @@ -19,6 +19,8 @@ extern "C" { #include #include +#define __STDC_FORMAT_MACROS +#include } #include @@ -138,10 +140,10 @@ probe_point* derived_probe::sole_location () const { - if (locations.size() == 0) - throw semantic_error ("derived_probe with no locations", this->tok); - else if (locations.size() > 1) - throw semantic_error ("derived_probe with too many locations", this->tok); + if (locations.size() == 0 || locations.size() > 1) + throw semantic_error (ngettext("derived_probe with no locations", + "derived_probe with no locations", + locations.size()), this->tok); else return locations[0]; } @@ -153,10 +155,10 @@ const probe* p = almost_basest(); const probe_alias *a = p->get_alias(); const vector& locs = a ? a->alias_names : p->locations; - if (locs.size() == 0) - throw semantic_error ("derived_probe with no locations", this->tok); - else if (locs.size() > 1) - throw semantic_error ("derived_probe with too many locations", this->tok); + if (locs.size() == 0 || locs.size() > 1) + throw semantic_error (ngettext("derived_probe with no locations", + "derived_probe with too many locations", + locs.size()), this->tok); else return locs[0]; } @@ -196,13 +198,13 @@ void derived_probe::print_dupe_stamp_unprivileged(ostream& o) { - o << "unprivileged users: authorized" << endl; + o << _("unprivileged users: authorized") << endl; } void derived_probe::print_dupe_stamp_unprivileged_process_owner(ostream& o) { - o << "unprivileged users: authorized for process owner" << endl; + o << _("unprivileged users: authorized for process owner") << endl; } // ------------------------------------------------------------------------ @@ -354,7 +356,7 @@ match_node::bind(match_key const & k) { if (k.name == "*") - throw semantic_error("invalid use of wildcard probe point component"); + throw semantic_error(_("invalid use of wildcard probe point component")); map::const_iterator i = sub.find(k); if (i != sub.end()) @@ -409,15 +411,15 @@ for (sub_map_iterator_t i = sub.begin(); i != sub.end(); i++) alternatives += string(" ") + i->first.str(); - throw semantic_error (string("probe point truncated at position ") + - lex_cast (pos) + - " (follow:" + alternatives + ")", loc->components.back()->tok); + throw semantic_error (_F("probe point truncated at position %s (follow: %s)", + lex_cast(pos).c_str(), alternatives.c_str()), + loc->components.back()->tok); } if (s.unprivileged && ! unprivileged_ok) { - throw semantic_error (string("probe point is not allowed for unprivileged users"), - loc->components.back()->tok); + throw semantic_error (_("probe point is not allowed for unprivileged users"), + loc->components.back()->tok); } map param_map; @@ -493,11 +495,8 @@ for (sub_map_iterator_t i = sub.begin(); i != sub.end(); i++) alternatives += string(" ") + i->first.str(); - throw semantic_error(string("probe point mismatch at position ") + - lex_cast (pos) + - " (alternatives:" + alternatives + ")" + - " didn't find any wildcard matches", - comp->tok); + throw semantic_error(_F("probe point mismatch at position %s (alternatives: %s)", + lex_cast(pos).c_str(), alternatives.c_str()), comp->tok); } } else if (isglob(loc->components[pos]->functor)) // wildcard? @@ -517,8 +516,9 @@ if (match.globmatch(subkey)) { if (s.verbose > 2) - clog << "wildcard '" << loc->components[pos]->functor - << "' matched '" << subkey.name << "'" << endl; + clog << _F("wildcard '%s' matched '%s'", + loc->components[pos]->functor.c_str(), + subkey.name.c_str()) << endl; // When we have a wildcard, we need to create a copy of // the probe point. Then we'll create a copy of the @@ -560,12 +560,10 @@ for (sub_map_iterator_t i = sub.begin(); i != sub.end(); i++) alternatives += string(" ") + i->first.str(); - throw semantic_error(string("probe point mismatch at position ") + - lex_cast (pos) + - (alternatives == "" ? "" : - (" (alternatives:" + alternatives + ")")) + - " didn't find any wildcard matches", - loc->components[pos]->tok); + throw semantic_error(_F("probe point mismatch at position %s %s didn't find any wildcard matches", + lex_cast(pos).c_str(), + (alternatives == "" ? "" : _(" (alternatives: ") + + alternatives + ")").c_str()), loc->components[pos]->tok); } } else @@ -578,11 +576,9 @@ for (sub_map_iterator_t i = sub.begin(); i != sub.end(); i++) alternatives += string(" ") + i->first.str(); - throw semantic_error(string("probe point mismatch at position ") + - lex_cast (pos) + - (alternatives == "" ? "" : - (" (alternatives:" + alternatives + ")")), - loc->components[pos]->tok); + throw semantic_error(_F("probe point mismatch at position %s %s", lex_cast(pos).c_str(), + (alternatives == "" ? "" : (_(" (alternatives:") + alternatives + + ")").c_str())), loc->components[pos]->tok); } match_node* subnode = i->second; @@ -614,7 +610,7 @@ alias_derived_probe (probe* base, probe_point *l, const probe_alias *a): derived_probe (base, l), alias(a) {} - void upchuck () { throw semantic_error ("inappropriate", this->tok); } + void upchuck () { throw semantic_error (_("inappropriate"), this->tok); } // Alias probes are immediately expanded to other derived_probe // types, and are not themselves emitted or listed in @@ -652,7 +648,8 @@ // Don't build the alias expansion if infinite recursion is detected. if (checkForRecursiveExpansion (use)) { stringstream msg; - msg << "Recursive loop in alias expansion of " << *location << " at " << location->components.front()->tok->location; + msg << _F("Recursive loop in alias expansion of %s at %s", + lex_cast(*location).c_str(), lex_cast(location->components.front()->tok->location).c_str()); // semantic_errors thrown here are ignored. sess.print_error (semantic_error (msg.str())); return; @@ -740,7 +737,7 @@ recursion_guard(unsigned & i) : i(i) { if (i > max_recursion) - throw semantic_error("recursion limit reached"); + throw semantic_error(_("recursion limit reached")); ++i; } ~recursion_guard() @@ -788,7 +785,7 @@ if (! (loc->optional||optional) && // something required, but num_atbegin == num_atend) // nothing new derived! - throw semantic_error ("no match"); + throw semantic_error (_("no match")); if (loc->sufficient && (num_atend > num_atbegin)) { @@ -809,13 +806,14 @@ } catch (const semantic_error& e) { - if (! s.listing_mode) // suppress error messages in listing mode + //only output in listing if -vv is supplied + if (!s.listing_mode || (s.listing_mode && s.verbose > 1)) { // XXX: prefer not to print_error at every nest/unroll level semantic_error* er = new semantic_error (e); // copy it stringstream msg; msg << e.msg2; - msg << " while resolving probe point " << *loc; + msg << _(" while resolving probe point ") << *loc; er->msg2 = msg.str(); s.print_error (* er); delete er; @@ -862,7 +860,7 @@ void throwone (const token* t) { - throw semantic_error ("Expecting symbol or array index expression", t); + throw semantic_error (_("Expecting symbol or array index expression"), t); } }; @@ -915,7 +913,7 @@ if (e->base->is_symbol (sym)) mutated_vars->insert (sym->referent); else - throw semantic_error("Assignment to read-only histogram bucket", e->tok); + throw semantic_error(_("Assignment to read-only histogram bucket"), e->tok); } traversing_visitor::visit_arrayindex (e); } @@ -947,8 +945,8 @@ vardecl *v = vars_being_iterated[i]; if (v == vd) { - string err = ("variable '" + v->name + - "' modified during 'foreach' iteration"); + string err = _F("variable '%s' modified during 'foreach' iteration", + v->name.c_str()); session.print_error (semantic_error (err, e->tok)); } } @@ -969,8 +967,8 @@ vardecl *m = vars_being_iterated[j]; if (i->second->find (m) != i->second->end()) { - string err = ("function call modifies var '" + m->name + - "' during 'foreach' iteration"); + string err = _F("function call modifies var '%s' during 'foreach' iteration", + m->name.c_str()); session.print_error (semantic_error (err, e->tok)); } } @@ -1057,8 +1055,7 @@ else { // FIXME: Support multiple co-declared histogram types - semantic_error se("multiple histogram types declared on '" + sym->name + "'", - e->tok); + semantic_error se(_F("multiple histogram types declared on '%s'", sym->name.c_str()), e->tok); session.print_error (se); } } @@ -1086,7 +1083,7 @@ if (sess.stat_decls.find(v->name) == sess.stat_decls.end()) { - semantic_error se("unable to infer statistic parameters for global '" + v->name + "'"); + semantic_error se(_F("unable to infer statistic parameters for global '%s'", v->name.c_str())); sess.print_error (se); } } @@ -1167,12 +1164,12 @@ if (! vut.written.empty()) { - string err = ("probe condition must not modify any variables"); + string err = (_("probe condition must not modify any variables")); sess.print_error (semantic_error (err, e->tok)); } else if (vut.embedded_seen) { - sess.print_error (semantic_error ("probe condition must not include impure embedded-C", e->tok)); + sess.print_error (semantic_error (_("probe condition must not include impure embedded-C"), e->tok)); } // Add the condition expression to the front of the @@ -1226,8 +1223,8 @@ { enable_vma_tracker(session); if (session.verbose > 2) - clog << "Turning on task_finder vma_tracker, pragma:vma found in " - << current_function->name << endl; + clog << _F("Turning on task_finder vma_tracker, pragma:vma found in %s", + current_function->name.c_str()) << endl; } } }; @@ -1353,12 +1350,12 @@ if(s.systemtap_v_check){ for(unsigned i=0;isystemtap_v_conditional) - s.print_warning("This global uses tapset constructs that are dependent on systemtap version", s.globals[i]->tok); + s.print_warning(_("This global uses tapset constructs that are dependent on systemtap version"), s.globals[i]->tok); } for(map::const_iterator i=s.functions.begin();i != s.functions.end();++i){ if(i->second->systemtap_v_conditional) - s.print_warning("This function uses tapset constructs that are dependent on systemtap version", i->second->tok); + s.print_warning(_("This function uses tapset constructs that are dependent on systemtap version"), i->second->tok); } for(unsigned i=0;icollect_derivation_chain(sysvc); for(unsigned j=0;jsystemtap_v_conditional) - s.print_warning("This probe uses tapset constructs that are dependent on systemtap version", sysvc[j]->tok); + s.print_warning(_("This probe uses tapset constructs that are dependent on systemtap version"), sysvc[j]->tok); if(sysvc[j]->get_alias() && sysvc[j]->get_alias()->systemtap_v_conditional) - s.print_warning("This alias uses tapset constructs that are dependent on systemtap version", sysvc[j]->get_alias()->tok); + s.print_warning(_("This alias uses tapset constructs that are dependent on systemtap version"), sysvc[j]->get_alias()->tok); } } } @@ -1386,6 +1383,7 @@ if (s.listing_mode) return; varuse_collecting_visitor vut(s); + for (unsigned i=0; ibody->visit (& vut); @@ -1397,7 +1395,8 @@ for (unsigned g=0; g < s.globals.size(); g++) { vardecl* l = s.globals[g]; - if (vut.read.find (l) != vut.read.end() + if ((vut.read.find (l) != vut.read.end() + && vut.used.find (l) != vut.used.end()) || vut.written.find (l) == vut.written.end()) continue; @@ -1649,7 +1648,7 @@ if (rc == 0) embeddedcode_info_pass (s); if (s.num_errors() == 0 && s.probes.size() == 0 && !s.listing_mode) - throw semantic_error ("no probes found"); + throw semantic_error (_("no probes found")); } catch (const semantic_error& e) { @@ -1712,9 +1711,8 @@ else { stringstream msg; - msg << "unresolved arity-" << e->indexes.size() - << " global array " << array->name - << ", missing global declaration? "; + msg << _F("unresolved arity-%zu global array %s, missing global declaration?", + e->indexes.size(), array->name.c_str()); throw semantic_error (msg.str(), e->tok); } } @@ -1763,7 +1761,7 @@ if (d) e->referent = d; else - throw semantic_error ("unresolved array in delete statement", e->tok); + throw semantic_error (_("unresolved array in delete statement"), e->tok); } }; @@ -1797,7 +1795,7 @@ current_probe->locals.push_back (v); else // must be probe-condition expression - throw semantic_error ("probe condition must not reference undeclared global", e->tok); + throw semantic_error (_("probe condition must not reference undeclared global"), e->tok); e->referent = v; } } @@ -1824,9 +1822,8 @@ else { stringstream msg; - msg << "unresolved arity-" << e->indexes.size() - << " global array " << array->name - << ", missing global declaration? "; + msg << _F("unresolved arity-%zu global array %s, missing global declaration?", + e->indexes.size(), array->name.c_str()); throw semantic_error (msg.str(), e->tok); } } @@ -1846,7 +1843,7 @@ if (! (current_function || current_probe)) { // must be probe-condition expression - throw semantic_error ("probe condition must not reference function", e->tok); + throw semantic_error (_("probe condition must not reference function"), e->tok); } for (unsigned i=0; iargs.size(); i++) @@ -1861,8 +1858,7 @@ else { stringstream msg; - msg << "unresolved arity-" << e->args.size() - << " function"; + msg << _F("unresolved arity-%zu function", e->args.size()); throw semantic_error (msg.str(), e->tok); } } @@ -1909,8 +1905,8 @@ // clog << "resolved " << *tok << " to global " << *v->tok << endl; if (v->tok->location.file != tok->location.file) { - session.print_warning ("cross-file global variable reference to " + lex_cast (*v->tok) + " from", - tok); + session.print_warning (_F("cross-file global variable reference to %s from", + lex_cast(*v->tok).c_str()), tok); } } return session.globals[i]; @@ -1963,8 +1959,8 @@ { // put library into the queue if not already there if (0) // session.verbose_resolution - cerr << " function " << name << " " - << "is defined from " << f->name << endl; + cerr << _F(" function %s is defined from %s", + name.c_str(), f->name.c_str()) << endl; if (find (session.files.begin(), session.files.end(), f) == session.files.end()) @@ -2003,10 +1999,9 @@ { if (fd->tok->location.file->name == s.user_file->name && // !tapset ! s.suppress_warnings && ! fd->synthetic) - s.print_warning ("eliding unused function '" + fd->name + "'", fd->tok); + s.print_warning (_F("Eliding unused function '%s'", fd->name.c_str()), fd->tok); else if (s.verbose>2) - clog << "Eliding unused function " << fd->name - << endl; + clog << _F("Eliding unused function '%s'", fd->name.c_str()) << endl; // s.functions.erase (it); // NB: can't, since we're already iterating upon it new_unused_functions.push_back (fd); relaxed_p = false; @@ -2062,10 +2057,10 @@ { if (l->tok->location.file->name == s.user_file->name && // !tapset ! s.suppress_warnings) - s.print_warning ("eliding unused variable '" + l->name + "'", l->tok); + s.print_warning (_F("Eliding unused variable '%s'", l->name.c_str()), l->tok); else if (s.verbose>2) - clog << "Eliding unused local variable " - << l->name << " in " << s.probes[i]->name << endl; + clog << _F("Eliding unused local variable %s in %s", + l->name.c_str(), s.probes[i]->name.c_str()) << endl; if (s.tapset_compile_coverage) { s.probes[i]->unused_locals.push_back (s.probes[i]->locals[j]); @@ -2088,8 +2083,9 @@ if (l->name != (*it)->name) o << " " << (*it)->name; - s.print_warning ("never-assigned local variable '" + l->name + "' " + - (o.str() == "" ? "" : ("(alternatives:" + o.str() + ")")), l->tok); + s.print_warning (_F("never-assigned local variable '%s' %s", + l->name.c_str(), (o.str() == "" ? "" : + (_("(alternatives:") + o.str() + ")")).c_str()), l->tok); } j++; } @@ -2106,11 +2102,10 @@ { if (l->tok->location.file->name == s.user_file->name && // !tapset ! s.suppress_warnings) - s.print_warning ("eliding unused variable '" + l->name + "'", l->tok); + s.print_warning (_F("Eliding unused variable '%s'", l->name.c_str()), l->tok); else if (s.verbose>2) - clog << "Eliding unused local variable " - << l->name << " in function " << fd->name - << endl; + clog << _F("Eliding unused local variable %s in function %s", + l->name.c_str(), fd->name.c_str()) << endl; if (s.tapset_compile_coverage) { fd->unused_locals.push_back (fd->locals[j]); } @@ -2136,8 +2131,9 @@ if (l->name != (*it)->name) o << " " << (*it)->name; - s.print_warning ("never-assigned local variable '" + l->name + "' " + - (o.str() == "" ? "" : ("(alternatives:" + o.str() + ")")), l->tok); + s.print_warning (_F("never-assigned local variable '%s' %s", + l->name.c_str(), (o.str() == "" ? "" : + (_("(alternatives:") + o.str() + ")")).c_str()), l->tok); } j++; @@ -2152,10 +2148,9 @@ { if (l->tok->location.file->name == s.user_file->name && // !tapset ! s.suppress_warnings) - s.print_warning ("eliding unused variable '" + l->name + "'", l->tok); + s.print_warning (_F("Eliding unused variable '%s'", l->name.c_str()), l->tok); else if (s.verbose>2) - clog << "Eliding unused global variable " - << l->name << endl; + clog << _F("Eliding unused global variable %s", l->name.c_str()) << endl; if (s.tapset_compile_coverage) { s.unused_globals.push_back(s.globals[i]); } @@ -2174,8 +2169,8 @@ if (l->name != (*it)->name) o << " " << (*it)->name; - s.print_warning ("never-assigned global variable '" + l->name + "' " + - (o.str() == "" ? "" : ("(alternatives:" + o.str() + ")")), l->tok); + s.print_warning (_F("never assigned global variable '%s' %s", l->name.c_str(), + (o.str() == "" ? "" : (_("(alternatives:") + o.str() + ")")).c_str()), l->tok); } i++; @@ -2242,8 +2237,8 @@ else */ if (session.verbose>2) - clog << "Eliding assignment to " << leftvar->name - << " at " << *e->tok << endl; + clog << _F("Eliding assignment to %s at %s", + leftvar->name.c_str(), lex_cast(*e->tok).c_str()) << endl; provide (e->right); // goodbye assignment* relaxed_p = false; @@ -2265,8 +2260,8 @@ if (vut.read.find(errvar) == vut.read.end()) // never read? { if (session.verbose>2) - clog << "Eliding unused error string catcher " << errvar->name - << " at " << *s->tok << endl; + clog << _F("Eliding unused error string catcher %s at %s", + errvar->name.c_str(), lex_cast(*s->tok).c_str()) << endl; s->catch_error_var = 0; } } @@ -2330,7 +2325,7 @@ { // easy! if (session.verbose>2) - clog << "Eliding side-effect-free null statement " << *s->tok << endl; + clog << _("Eliding side-effect-free null statement ") << *s->tok << endl; s = 0; provide (s); } @@ -2350,7 +2345,7 @@ if (b) { if (session.verbose>2) - clog << "Flattening nested block " << *b->tok << endl; + clog << _("Flattening nested block ") << *b->tok << endl; new_stmts.insert(new_stmts.end(), b->statements.begin(), b->statements.end()); relaxed_p = false; @@ -2362,13 +2357,13 @@ if (new_stmts.size() == 0) { if (session.verbose>2) - clog << "Eliding side-effect-free empty block " << *s->tok << endl; + clog << _("Eliding side-effect-free empty block ") << *s->tok << endl; s = 0; } else if (new_stmts.size() == 1) { if (session.verbose>2) - clog << "Eliding side-effect-free singleton block " << *s->tok << endl; + clog << _("Eliding side-effect-free singleton block ") << *s->tok << endl; provide (new_stmts[0]); return; } @@ -2386,7 +2381,7 @@ if (s->try_block == 0) { if (session.verbose>2) - clog << "Eliding empty try {} block " << *s->tok << endl; + clog << _("Eliding empty try {} block ") << *s->tok << endl; s = 0; } provide (s); @@ -2410,7 +2405,7 @@ if (vct.side_effect_free ()) { if (session.verbose>2) - clog << "Eliding side-effect-free if statement " + clog << _("Eliding side-effect-free if statement ") << *s->tok << endl; s = 0; // yeah, baby } @@ -2418,7 +2413,7 @@ { // We can still turn it into a simple expr_statement though... if (session.verbose>2) - clog << "Creating simple evaluation from if statement " + clog << _("Creating simple evaluation from if statement ") << *s->tok << endl; expr_statement *es = new expr_statement; es->value = s->condition; @@ -2432,7 +2427,7 @@ // For an else without a then, we can invert the condition logic to // avoid having a null statement in the thenblock if (session.verbose>2) - clog << "Inverting the condition of if statement " + clog << _("Inverting the condition of if statement ") << *s->tok << endl; unary_expression *ue = new unary_expression; ue->operand = s->condition; @@ -2456,7 +2451,7 @@ // XXX what if s->limit has side effects? // XXX what about s->indexes or s->value used outside the loop? if (session.verbose>2) - clog << "Eliding side-effect-free foreach statement " << *s->tok << endl; + clog << _("Eliding side-effect-free foreach statement ") << *s->tok << endl; s = 0; // yeah, baby } provide (s); @@ -2478,7 +2473,7 @@ if (vct.side_effect_free ()) { if (session.verbose>2) - clog << "Eliding side-effect-free for statement " << *s->tok << endl; + clog << _("Eliding side-effect-free for statement ") << *s->tok << endl; s = 0; // yeah, baby } else @@ -2520,7 +2515,7 @@ else */ if (session.verbose>2) - clog << "Eliding side-effect-free expression " + clog << _("Eliding side-effect-free expression ") << *s->tok << endl; // NB: this 0 pointer is invalid to leave around for any length of @@ -2558,7 +2553,7 @@ { if (! s.suppress_warnings && ! s.timing) // PR10070 - s.print_warning ("side-effect-free probe '" + p->name + "'", p->tok); + s.print_warning (_F("side-effect-free probe '%s'", p->name.c_str()), p->tok); p->body = new null_statement(p->tok); @@ -2582,7 +2577,7 @@ if (fn->body == 0) { if (! s.suppress_warnings) - s.print_warning ("side-effect-free function '" + fn->name + "'", fn->tok); + s.print_warning (_F("side-effect-free function '%s'", fn->name.c_str()), fn->tok); fn->body = new null_statement(fn->tok); @@ -2702,7 +2697,7 @@ // "if (!a) b", so let's do that instead. if (session.verbose>2) - clog << "Creating if statement from unused logical-or " + clog << _("Creating if statement from unused logical-or ") << *e->tok << endl; if_statement *is = new if_statement; @@ -2733,7 +2728,7 @@ // "if (a) b", so let's do that instead. if (session.verbose>2) - clog << "Creating if statement from unused logical-and " + clog << _("Creating if statement from unused logical-and ") << *e->tok << endl; if_statement *is = new if_statement; @@ -2759,7 +2754,7 @@ // "if (a) b else c", so let's do that instead. if (session.verbose>2) - clog << "Creating if statement from unused ternary expression " + clog << _("Creating if statement from unused ternary expression ") << *e->tok << endl; if_statement *is = new if_statement; @@ -2789,7 +2784,7 @@ // evaluate the operands as sequential statements in a block. if (session.verbose>2) - clog << "Eliding unused binary " << *e->tok << endl; + clog << _("Eliding unused binary ") << *e->tok << endl; block *b = new block; b->tok = e->tok; @@ -2817,7 +2812,7 @@ // evaluate the operand directly if (session.verbose>2) - clog << "Eliding unused unary " << *e->tok << endl; + clog << _("Eliding unused unary ") << *e->tok << endl; relaxed_p = false; e->operand->visit(this); @@ -2858,7 +2853,7 @@ } if (session.verbose>2) - clog << "Eliding side-effect-free function call " << *e->tok << endl; + clog << _("Eliding side-effect-free function call ") << *e->tok << endl; block *b = new block; b->tok = e->tok; @@ -2890,7 +2885,7 @@ } if (session.verbose>2) - clog << "Eliding unused print " << *e->tok << endl; + clog << _("Eliding unused print ") << *e->tok << endl; block *b = new block; b->tok = e->tok; @@ -2937,7 +2932,7 @@ } if (session.verbose>2) - clog << "Eliding unused target symbol " << *e->tok << endl; + clog << _("Eliding unused target symbol ") << *e->tok << endl; b->visit(this); relaxed_p = false; @@ -2971,7 +2966,7 @@ } if (session.verbose>2) - clog << "Eliding unused typecast " << *e->tok << endl; + clog << _("Eliding unused typecast ") << *e->tok << endl; b->visit(this); relaxed_p = false; @@ -2988,7 +2983,7 @@ // side-effect-free. if (session.verbose>2) - clog << "Eliding unused check " << *e->tok << endl; + clog << _("Eliding unused check ") << *e->tok << endl; relaxed_p = false; e = 0; @@ -3097,7 +3092,8 @@ else { if (session.verbose>2) - clog << "Collapsing constant-" << cond->value << " if-statement " << *s->tok << endl; + clog << _F("Collapsing constant-%" PRIi64 " if-statement %s", + cond->value, lex_cast(*s->tok).c_str()) << endl; relaxed_p = false; statement* n = cond->value ? s->thenblock : s->elseblock; @@ -3122,7 +3118,7 @@ else { if (session.verbose>2) - clog << "Collapsing constantly-false for-loop " << *s->tok << endl; + clog << _("Collapsing constantly-false for-loop ") << *s->tok << endl; relaxed_p = false; if (s->init) @@ -3148,7 +3144,7 @@ else { if (session.verbose>2) - clog << "Collapsing constantly-limited foreach-loop " << *s->tok << endl; + clog << _("Collapsing constantly-limited foreach-loop ") << *s->tok << endl; relaxed_p = false; provide (new null_statement (s->tok)); @@ -3195,7 +3191,7 @@ value = (left->value == LLONG_MIN && right->value == -1) ? 0 : left->value % right->value; else - throw semantic_error ("unsupported binary operator " + e->op); + throw semantic_error (_("unsupported binary operator ") + e->op); } else if ((left && ((left->value == 0 && (e->op == "*" || e->op == "&" || @@ -3235,7 +3231,7 @@ (right->value <= 0 && (e->op == ">>" || e->op == "<<"))))) { if (session.verbose>2) - clog << "Collapsing constant-identity binary operator " << *e->tok << endl; + clog << _("Collapsing constant-identity binary operator ") << *e->tok << endl; relaxed_p = false; provide (left ? e->right : e->left); @@ -3249,7 +3245,8 @@ } if (session.verbose>2) - clog << "Collapsing constant-" << value << " binary operator " << *e->tok << endl; + clog << _F("Collapsing constant-%" PRIi64 " binary operator %s", + value, lex_cast(*e->tok).c_str()) << endl; relaxed_p = false; literal_number* n = new literal_number(value); @@ -3266,7 +3263,7 @@ else { if (session.verbose>2) - clog << "Collapsing constant unary " << *e->tok << endl; + clog << _("Collapsing constant unary ") << *e->tok << endl; relaxed_p = false; literal_number* n = new literal_number (*operand); @@ -3280,7 +3277,7 @@ else if (e->op == "~") n->value = ~n->value; else - throw semantic_error ("unsupported unary operator " + e->op); + throw semantic_error (_("unsupported unary operator ") + e->op); n->visit (this); } } @@ -3324,7 +3321,7 @@ } if (session.verbose>2) - clog << "Collapsing constant logical-OR " << *e->tok << endl; + clog << _("Collapsing constant logical-OR ") << *e->tok << endl; relaxed_p = false; literal_number* n = new literal_number(value); @@ -3371,7 +3368,7 @@ } if (session.verbose>2) - clog << "Collapsing constant logical-AND " << *e->tok << endl; + clog << _("Collapsing constant logical-AND ") << *e->tok << endl; relaxed_p = false; literal_number* n = new literal_number(value); @@ -3414,7 +3411,7 @@ else { if (session.verbose>2) - clog << "Collapsing constant-boundary comparison " << *e->tok << endl; + clog << _("Collapsing constant-boundary comparison ") << *e->tok << endl; relaxed_p = false; // ops <= and >= are true, < and > are false @@ -3432,7 +3429,7 @@ } if (session.verbose>2) - clog << "Collapsing constant comparison " << *e->tok << endl; + clog << _("Collapsing constant comparison ") << *e->tok << endl; relaxed_p = false; int64_t value; @@ -3449,7 +3446,7 @@ else if (e->op == ">=") value = comp >= 0; else - throw semantic_error ("unsupported comparison operator " + e->op); + throw semantic_error (_("unsupported comparison operator ") + e->op); literal_number* n = new literal_number(value); n->tok = e->tok; @@ -3465,7 +3462,7 @@ if (left && right) { if (session.verbose>2) - clog << "Collapsing constant concatenation " << *e->tok << endl; + clog << _("Collapsing constant concatenation ") << *e->tok << endl; relaxed_p = false; literal_string* n = new literal_string (*left); @@ -3477,7 +3474,7 @@ (right && right->value.empty())) { if (session.verbose>2) - clog << "Collapsing identity concatenation " << *e->tok << endl; + clog << _("Collapsing identity concatenation ") << *e->tok << endl; relaxed_p = false; provide(left ? e->right : e->left); } @@ -3498,7 +3495,8 @@ else { if (session.verbose>2) - clog << "Collapsing constant-" << cond->value << " ternary " << *e->tok << endl; + clog << _F("Collapsing constant-%" PRIi64 " ternary %s", + cond->value, lex_cast(*e->tok).c_str()) << endl; relaxed_p = false; expression* n = cond->value ? e->truevalue : e->falsevalue; @@ -3512,7 +3510,7 @@ // If a @defined makes it this far, then it is, de facto, undefined. if (session.verbose>2) - clog << "Collapsing untouched @defined check " << *e->tok << endl; + clog << _("Collapsing untouched @defined check ") << *e->tok << endl; relaxed_p = false; literal_number* n = new literal_number (0); @@ -3532,10 +3530,10 @@ ln_zero->tok = e->tok; provide (ln_zero); if (!session.suppress_warnings) - session.print_warning ("Bad $context variable being substituted with literal 0", + session.print_warning (_("Bad $context variable being substituted with literal 0"), e->tok); else if (session.verbose > 2) - clog << "Bad $context variable being substituted with literal 0, " + clog << _("Bad $context variable being substituted with literal 0, ") << *e->tok << endl; relaxed_p = false; } @@ -3580,10 +3578,8 @@ if (duplicate_function_map.count(e->referent) != 0) { if (s.verbose>2) - clog << "Changing " << e->referent->name - << " reference to " - << duplicate_function_map[e->referent]->name - << " reference\n"; + clog << _F("Changing %s reference to %s reference\n", + e->referent->name.c_str(), duplicate_function_map[e->referent]->name.c_str()); e->tok = duplicate_function_map[e->referent]->tok; e->function = duplicate_function_map[e->referent]->name; e->referent = duplicate_function_map[e->referent]; @@ -3994,7 +3990,7 @@ } else - throw semantic_error ("unsupported assignment operator " + e->op); + throw semantic_error (_("unsupported assignment operator ") + e->op); } @@ -4171,7 +4167,7 @@ if (session.verbose > 2) { - clog << "Resolution problem with "; + clog << _("Resolution problem with "); if (current_function) { clog << "function " << current_function->name << endl; @@ -4185,27 +4181,28 @@ clog << endl; } else - clog << "other" << endl; + //TRANSLATORS: simply saying not an issue with a probe or function + clog << _("other") << endl; } if (e->saved_conversion_error) throw (* (e->saved_conversion_error)); else - throw semantic_error("unresolved target-symbol expression", e->tok); + throw semantic_error(_("unresolved target-symbol expression"), e->tok); } void typeresolution_info::visit_defined_op (defined_op* e) { - throw semantic_error("unexpected @defined", e->tok); + throw semantic_error(_("unexpected @defined"), e->tok); } void typeresolution_info::visit_entry_op (entry_op* e) { - throw semantic_error("@entry is only valid in .return probes", e->tok); + throw semantic_error(_("@entry is only valid in .return probes"), e->tok); } @@ -4217,7 +4214,8 @@ if (e->saved_conversion_error) throw (* (e->saved_conversion_error)); else - throw semantic_error("type definition '" + e->type_name + "' not found", e->tok); + throw semantic_error(_F("type definition '%s' not found", + e->type_name.c_str()), e->tok); } @@ -4377,7 +4375,7 @@ if (!session.need_uprobes && s->code.find("/* pragma:uprobes */") != string::npos) { if (session.verbose > 2) - clog << "Activating uprobes support because /* pragma:uprobes */ seen." << endl; + clog << _("Activating uprobes support because /* pragma:uprobes */ seen.") << endl; session.need_uprobes = true; } } @@ -4518,7 +4516,7 @@ { typeresolution_info *parent; delete_statement_typeresolution_info (typeresolution_info *p): - throwing_visitor ("invalid operand of delete expression"), + throwing_visitor (_("invalid operand of delete expression")), parent (p) {} @@ -4634,7 +4632,7 @@ for (size_t i = 0; i < e->components.size(); ++i) { if (e->components[i].type == print_format::conv_unspecified) - throw semantic_error ("Unspecified conversion in print operator format string", + throw semantic_error (_("Unspecified conversion in print operator format string"), e->tok); else if (e->components[i].type == print_format::conv_literal) continue; @@ -4650,7 +4648,7 @@ // of args agree. if (expected_num_args != e->args.size()) - throw semantic_error ("Wrong number of args to formatted print operator", + throw semantic_error (_("Wrong number of args to formatted print operator"), e->tok); // Then we check that the types of the conversions match the types @@ -4787,7 +4785,7 @@ num_still_unresolved ++; if (assert_resolvability) session.print_error - (semantic_error ("array locals not supported, missing global declaration? ", v->tok)); + (semantic_error (_("array locals not supported, missing global declaration? "), v->tok)); } if (v->type == pe_unknown) @@ -4797,7 +4795,7 @@ num_still_unresolved ++; if (assert_resolvability) session.print_error - (semantic_error ("stat locals not supported, missing global declaration? ", v->tok)); + (semantic_error (_("stat locals not supported, missing global declaration? "), v->tok)); } else if (!(v->type == pe_long || v->type == pe_string)) invalid (v->tok, v->type); @@ -4812,7 +4810,7 @@ if (assert_resolvability) { stringstream msg; - msg << "unresolved type "; + msg << _("unresolved type "); session.print_error (semantic_error (msg.str(), tok)); } } @@ -4827,9 +4825,9 @@ { stringstream msg; if (tok && tok->type == tok_operator) - msg << "invalid operator"; + msg << _("invalid operator"); else - msg << "invalid type " << pe; + msg << _("invalid type ") << pe; session.print_error (semantic_error (msg.str(), tok)); } } @@ -4862,7 +4860,8 @@ } if (!tok_resolved) { - msg << "type mismatch (" << t1 << " vs. " << t2 << ")"; + msg << _F("type mismatch ( %s vs. %s )", + lex_cast(t1).c_str(), lex_cast(t2).c_str()); } else { @@ -4875,13 +4874,14 @@ break; } } - msg << "type mismatch (" << t1 << " vs. " << t2 << ")"; + msg << _F("type mismatch ( %s vs. %s )", + lex_cast(t1).c_str(), lex_cast(t2).c_str()); if (!tok_printed) { //error for possible mismatch in the earlier resolved token printed_toks.push_back (resolved_toks[i]); stringstream type_msg; - type_msg << "type was first inferred here (" << t2 << ")"; + type_msg << _F("type was first inferred here ( %s )", lex_cast(t2).c_str()); err1 = new semantic_error (type_msg.str(), resolved_toks[i]); } } diff -Nru systemtap-1.4/elaborate.h systemtap-1.6/elaborate.h --- systemtap-1.4/elaborate.h 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/elaborate.h 2011-07-25 18:12:01.000000000 +0000 @@ -1,5 +1,5 @@ // -*- C++ -*- -// Copyright (C) 2005-2010 Red Hat Inc. +// Copyright (C) 2005-2011 Red Hat Inc. // // This file is part of systemtap, and is free software. You can // redistribute it and/or modify it under the terms of the GNU General @@ -135,7 +135,7 @@ virtual probe_point* script_location () const; virtual void printsig (std::ostream &o) const; // return arguments of probe if there - virtual void getargs (std::list &arg_set) const {} + virtual void getargs (std::list &) const {} void printsig_nested (std::ostream &o) const; virtual void collect_derivation_chain (std::vector &probes_list); virtual void collect_derivation_pp_chain (std::vector &pp_list); diff -Nru systemtap-1.4/.gitignore systemtap-1.6/.gitignore --- systemtap-1.4/.gitignore 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/.gitignore 2011-07-25 18:12:01.000000000 +0000 @@ -20,14 +20,13 @@ testresults stapio stap_merge -stap-client-connect -stap-server-connect CVS .checkstyle .cproject .metadata .project .settings +.autotools SNAPSHOT *.o git_version.h @@ -37,3 +36,4 @@ lib-elfutils stamp-elfutils dtrace +stappaths.7 diff -Nru systemtap-1.4/grapher/grapher.cxx systemtap-1.6/grapher/grapher.cxx --- systemtap-1.4/grapher/grapher.cxx 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/grapher/grapher.cxx 2011-07-25 18:12:01.000000000 +0000 @@ -72,11 +72,13 @@ strerror_r(errno, errbuf, sizeof(errbuf)); err = write(STDERR_FILENO, errbuf, strlen(errbuf)); err = write(STDERR_FILENO, "\n", 1); + (void) err; /* XXX: notused */ return; } else if (childInfo.pid > 0) { err = write(signalPipe[1], &childInfo, sizeof(childInfo)); + (void) err; /* XXX: notused */ } else return; diff -Nru systemtap-1.4/grapher/Makefile.in systemtap-1.6/grapher/Makefile.in --- systemtap-1.4/grapher/Makefile.in 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/grapher/Makefile.in 2011-07-25 18:12:01.000000000 +0000 @@ -33,12 +33,18 @@ NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ @BUILD_GRAPHER_TRUE@bin_PROGRAMS = stapgraph$(EXEEXT) subdir = grapher DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(srcdir)/stapgraph.1.in $(am__dist_pkgdata_DATA_DIST) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -138,21 +144,34 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_NLS = @ENABLE_NLS@ EXEEXT = @EXEEXT@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ LDFLAGS = @LDFLAGS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ +LOCALEDIR = @LOCALEDIR@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -168,13 +187,19 @@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +POSUB = @POSUB@ PUBLICAN_BRAND = @PUBLICAN_BRAND@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +STAP_PREFIX = @STAP_PREFIX@ STRIP = @STRIP@ U = @U@ +USE_NLS = @USE_NLS@ VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -187,7 +212,11 @@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ +build = @build@ build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ @@ -197,14 +226,17 @@ exec_prefix = @exec_prefix@ gtkmm_CFLAGS = @gtkmm_CFLAGS@ gtkmm_LIBS = @gtkmm_LIBS@ -have_certutil = @have_certutil@ have_dvips = @have_dvips@ have_latex = @have_latex@ have_latex2html = @have_latex2html@ have_ps2pdf = @have_ps2pdf@ have_publican = @have_publican@ have_xmlto = @have_xmlto@ +host = @host@ host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ diff -Nru systemtap-1.4/grapher/stapgraph.1.in systemtap-1.6/grapher/stapgraph.1.in --- systemtap-1.4/grapher/stapgraph.1.in 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/grapher/stapgraph.1.in 2011-07-25 18:12:01.000000000 +0000 @@ -125,5 +125,5 @@ .SH BUGS Use the Bugzilla link off of the project web page or our mailing list. .nh -.BR http://sources.redhat.com/systemtap/ , . +.BR http://sourceware.org/systemtap/ , . .hy diff -Nru systemtap-1.4/HACKING systemtap-1.6/HACKING --- systemtap-1.4/HACKING 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/HACKING 2011-07-25 18:12:01.000000000 +0000 @@ -1,6 +1,6 @@ This text describes contribution procedures to systemtap. Please read and understand them before jumping in. Discussions take place on -the mailing list. +the mailing list. - general @@ -147,10 +147,10 @@ - git basics - git clone ssh://sources.redhat.com/git/systemtap.git - # OR: use git://sources.redhat.com/git/systemtap.git then add to .git/config: + git clone ssh://sourceware.org/git/systemtap.git + # OR: use git://sourceware.org/git/systemtap.git then add to .git/config: # [remote "origin"] - # pushurl=ssh://sources.redhat.com/git/systemtap.git + # pushurl=ssh://sourceware.org/git/systemtap.git # build ; hack hack hack; test git add FILE1 FILE2 # enumerate all modified or new files git status # to confirm that needed local changes are "staged" diff -Nru systemtap-1.4/hash.cxx systemtap-1.6/hash.cxx --- systemtap-1.4/hash.cxx 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/hash.cxx 2011-07-25 18:12:01.000000000 +0000 @@ -1,5 +1,5 @@ // Copyright (C) Andrew Tridgell 2002 (original file) -// Copyright (C) 2006-2010 Red Hat Inc. (systemtap changes) +// Copyright (C) 2006-2011 Red Hat Inc. (systemtap changes) // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -12,8 +12,7 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +// along with this program. If not, see . #include "config.h" #include "session.h" @@ -128,7 +127,7 @@ log_file << "[" << time_str.substr(0,time_str.length()-1); // erase terminated '\n' log_file << "] " << type_str << ":" << endl; log_file << parms << endl; - log_file << "result:" << result << endl; + log_file << _("result:") << result << endl; log_file.close(); } @@ -154,13 +153,6 @@ h.add_path(s.kernel_build_tree + "/include/linux/version.h"); h.add_path(s.kernel_build_tree + "/include/linux/utsrelease.h"); - // If the kernel is a git working directory, then add the git HEAD - // revision to our hash as well. - // XXX avoiding this for now, because it's potentially expensive and has - // uncertain gain. The only corner case that this may help is if a developer - // is switching the source tree without rebuilding the kernel... - ///h.add(git_revision(s.kernel_build_tree)); - // Hash runtime path (that gets added in as "-R path"). h.add_path(s.runtime_path); @@ -204,9 +196,8 @@ if (create_dir(hashdir.c_str()) != 0) { if (! s.suppress_warnings) - cerr << "Warning: failed to create cache directory (\"" - << hashdir + "\"): " << strerror(errno) - << ", disabling cache support." << endl; + cerr << _F("Warning: failed to create cache directory (\"%s\") %s, disabling cache support", + hashdir.c_str(), strerror(errno)) << endl; s.use_cache = s.use_script_cache = false; return false; } @@ -370,4 +361,29 @@ + (name[0] == 'k' ? ".ko" : ".so"); } + +string +find_uprobes_hash (systemtap_session& s) +{ + hash h(get_base_hash(s)); + + // Hash runtime uprobes paths + h.add_path(s.runtime_path + "/uprobes"); + h.add_path(s.runtime_path + "/uprobes2"); + + // Add any custom kbuild flags + for (unsigned i = 0; i < s.kbuildflags.size(); i++) + h.add(s.kbuildflags[i]); + + // Get the directory path to store our cached module + string result, hashdir; + h.result(result); + if (!create_hashdir(s, result, hashdir)) + return ""; + + create_hash_log(string("uprobes_hash"), h.get_parms(), result, + hashdir + "/uprobes_" + result + "_hash.log"); + return hashdir + "/uprobes_" + result; +} + /* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ diff -Nru systemtap-1.4/hash.h systemtap-1.6/hash.h --- systemtap-1.4/hash.h 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/hash.h 2011-07-25 18:12:01.000000000 +0000 @@ -11,5 +11,6 @@ std::string find_tracequery_hash (systemtap_session& s, const std::vector& headers); std::string find_typequery_hash (systemtap_session& s, const std::string& name); +std::string find_uprobes_hash (systemtap_session& s); /* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ diff -Nru systemtap-1.4/includes/sys/.gitignore systemtap-1.6/includes/sys/.gitignore --- systemtap-1.4/includes/sys/.gitignore 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/includes/sys/.gitignore 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1 @@ +sdt-config.h diff -Nru systemtap-1.4/includes/sys/sdt.h systemtap-1.6/includes/sys/sdt.h --- systemtap-1.4/includes/sys/sdt.h 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/includes/sys/sdt.h 2011-07-25 18:12:01.000000000 +0000 @@ -1,5 +1,5 @@ /* - Systemtap static probe definition macros. - Copyright (C) 2010 Red Hat Inc. + Copyright (C) 2010-2011 Red Hat Inc. This file is part of systemtap, and is free software in the public domain. */ @@ -45,9 +45,14 @@ # define _SDT_ASM_STRING_1(x) _SDT_ASM_1(.asciz #x) # define _SDT_ARGFMT(no) %n[_SDT_S##no]@_SDT_ARGTMPL(_SDT_A##no) +# ifndef STAP_SDT_ARG_CONSTRAINT +# define STAP_SDT_ARG_CONSTRAINT nor +# endif +# define _SDT_STRINGIFY(x) #x +# define _SDT_ARG_CONSTRAINT_STRING(x) _SDT_STRINGIFY(x) # define _SDT_ARG(n, x) \ [_SDT_S##n] "n" ((_SDT_ARGSIGNED (x) ? 1 : -1) * (int) _SDT_ARGSIZE (x)), \ - [_SDT_A##n] "nor" (_SDT_ARGVAL (x)) + [_SDT_A##n] _SDT_ARG_CONSTRAINT_STRING (STAP_SDT_ARG_CONSTRAINT) (_SDT_ARGVAL (x)) #endif #define _SDT_ASM_STRING(x) _SDT_ASM_STRING_1(x) @@ -62,15 +67,49 @@ # define _SDT_ARGVAL(x) (x) # include -# include template struct __sdt_type { - static const bool __sdt_signed - = (std::numeric_limits<__sdt_T>::is_signed - && std::numeric_limits<__sdt_T>::is_integer); + static const bool __sdt_signed = false; }; + +#define __SDT_ALWAYS_SIGNED(T) \ +template<> struct __sdt_type { static const bool __sdt_signed = true; }; +#define __SDT_COND_SIGNED(T) \ +template<> struct __sdt_type { static const bool __sdt_signed = ((T)(-1) < 1); }; +__SDT_ALWAYS_SIGNED(signed char) +__SDT_ALWAYS_SIGNED(short) +__SDT_ALWAYS_SIGNED(int) +__SDT_ALWAYS_SIGNED(long) +__SDT_ALWAYS_SIGNED(long long) +__SDT_ALWAYS_SIGNED(volatile signed char) +__SDT_ALWAYS_SIGNED(volatile short) +__SDT_ALWAYS_SIGNED(volatile int) +__SDT_ALWAYS_SIGNED(volatile long) +__SDT_ALWAYS_SIGNED(volatile long long) +__SDT_ALWAYS_SIGNED(const signed char) +__SDT_ALWAYS_SIGNED(const short) +__SDT_ALWAYS_SIGNED(const int) +__SDT_ALWAYS_SIGNED(const long) +__SDT_ALWAYS_SIGNED(const long long) +__SDT_ALWAYS_SIGNED(const volatile signed char) +__SDT_ALWAYS_SIGNED(const volatile short) +__SDT_ALWAYS_SIGNED(const volatile int) +__SDT_ALWAYS_SIGNED(const volatile long) +__SDT_ALWAYS_SIGNED(const volatile long long) +__SDT_COND_SIGNED(char) +__SDT_COND_SIGNED(wchar_t) +__SDT_COND_SIGNED(volatile char) +__SDT_COND_SIGNED(volatile wchar_t) +__SDT_COND_SIGNED(const char) +__SDT_COND_SIGNED(const wchar_t) +__SDT_COND_SIGNED(const volatile char) +__SDT_COND_SIGNED(const volatile wchar_t) +#if defined (__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) +/* __SDT_COND_SIGNED(char16_t) */ +/* __SDT_COND_SIGNED(char32_t) */ +#endif template struct __sdt_type<__sdt_E[]> : public __sdt_type<__sdt_E *> {}; @@ -223,6 +262,28 @@ _SDT_PROBE(provider, name, 10, \ (arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10)) +/* This STAP_PROBEV macro can be used in variadic scenarios, where the + number of probe arguments is not known until compile time. Since + variadic macro support may vary with compiler options, you must + pre-#define SDT_USE_VARIADIC to enable this type of probe. + + The trick to count __VA_ARGS__ was inspired by this post by + Laurent Deniau : + http://groups.google.com/group/comp.std.c/msg/346fc464319b1ee5 + + Note that our _SDT_NARG is called with an extra 0 arg that's not + counted, so we don't have to worry about the behavior of macros + called without any arguments. */ + +#ifdef SDT_USE_VARIADIC +#define _SDT_NARG(...) __SDT_NARG(__VA_ARGS__, 10,9,8,7,6,5,4,3,2,1,0) +#define __SDT_NARG(_0,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10, N, ...) N +#define _SDT_PROBE_N(provider, name, N, ...) \ + _SDT_PROBE(provider, name, N, (__VA_ARGS__)) +#define STAP_PROBEV(provider, name, ...) \ + _SDT_PROBE_N(provider, name, _SDT_NARG(0, ##__VA_ARGS__), ##__VA_ARGS__) +#endif + /* These macros are for use in asm statements. You must compile with -std=gnu99 or -std=c99 to use the STAP_PROBE_ASM macro. diff -Nru systemtap-1.4/initscript/stap-server.in systemtap-1.6/initscript/stap-server.in --- systemtap-1.4/initscript/stap-server.in 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/initscript/stap-server.in 2011-07-25 18:12:01.000000000 +0000 @@ -3,10 +3,17 @@ # stap-server init.d script for the systemtap compile server # # chkconfig: - 00 99 -# description: The systemtap compile server provides a centralized and secure \ -# environment for compiling systemtap scripts. # config: /etc/sysconfig/stap-server # config: /etc/stap-server/conf.d +### BEGIN INIT INFO +# Provides: SystemTap compile-server startup +# Required-Start: $local_fs $network +# Required-Stop: $local_fs $network +# Short-Description: Start and stop SystemTap compile-server +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Description: stap-server provides remote-compilation services to systemtap users on the local network. +### END INIT INFO # Call the installed stap-server script. STAP_USER=stap-server @bindir@/stap-server "$@" diff -Nru systemtap-1.4/initscript/systemtap.in systemtap-1.6/initscript/systemtap.in --- systemtap-1.4/initscript/systemtap.in 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/initscript/systemtap.in 2011-07-25 18:12:01.000000000 +0000 @@ -3,15 +3,16 @@ # systemtap Startup script for SystemTap scripts # # chkconfig: - 00 99 -# description: SystemTap is a programmable kernel/application tracing tool. # config: /etc/systemtap/config # config: /etc/systemtap/conf.d ### BEGIN INIT INFO # Provides: SystemTap scripts startup # Required-Start: $local_fs # Required-Stop: $local_fs -# Short-Description: Start and stop SystemTap scripts -# Description: SystemTap is a programmable kernel/application tracing tool. +# Short-Description: Start and stop systemtap scripts +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Description: The systemtap service runs a configured list of scripts at system startup. ### END INIT INFO # Source function library. diff -Nru systemtap-1.4/loc2c.c systemtap-1.6/loc2c.c --- systemtap-1.4/loc2c.c 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/loc2c.c 2011-07-25 18:12:01.000000000 +0000 @@ -7,27 +7,13 @@ #include #include #include +#include + #include #include "loc2c.h" #include "config.h" -#include -#ifdef HAVE_ELFUTILS_VERSION_H -#include -#endif - -#if !defined(_ELFUTILS_PREREQ) -// make a dummy PREREQ check for elfutils < 0.138 -#define _ELFUTILS_PREREQ(major, minor) (0 >= 1) -#endif - -#if !_ELFUTILS_PREREQ (0,142) -#define DW_TAG_rvalue_reference_type 0x42 -#define DW_AT_data_bit_offset 0x6b -#define DW_OP_implicit_value 0x9e -#define DW_OP_stack_value 0x9f -#endif #define N_(x) x @@ -185,6 +171,7 @@ Dwarf_Addr addr; if (dwarf_formaddr (attr, &addr) != 0) { + //TRANSLATORS: failure to find an address that was a constant literal number FAIL (loc, N_("cannot get constant address: %s"), dwarf_errmsg (-1)); return NULL; @@ -680,7 +667,6 @@ UNOP (abs, op_abs); BINOP (and, &); BINOP (minus, -); - BINOP (mod, %); BINOP (mul, *); UNOP (neg, -); UNOP (not, ~); @@ -715,9 +701,21 @@ { POP (b); POP (a); - push ("(%s) " STACKFMT " / (%s)" STACKFMT, + push ("dwarf_div_op((%s) " STACKFMT ", (%s) " STACKFMT ")", stack_slot_type (loc, true), a, stack_slot_type (loc, true), b); + used_deref = true; + break; + } + + case DW_OP_mod: + { + POP (b); + POP (a); + push ("dwarf_mod_op((%s) " STACKFMT ", (%s) " STACKFMT ")", + stack_slot_type (loc, false), a, + stack_slot_type (loc, false), b); + used_deref = true; break; } @@ -980,7 +978,7 @@ default: /* Shouldn't happen. */ case -1: - (*ctx->fail) (ctx->fail_arg, N_("dwarf_getlocation_addr: %s"), + (*ctx->fail) (ctx->fail_arg, "dwarf_getlocation_addr: %s", dwarf_errmsg (-1)); return NULL; } @@ -1606,7 +1604,7 @@ inline bool pieces_small_enough (void) { if (loc->type != loc_noncontiguous) - return (loc->byte_size ?: total_bytes) <= max_piece_bytes; + return total_bytes <= max_piece_bytes; struct location *p; for (p = loc->pieces; p != NULL; p = p->next) if (p->byte_size > max_piece_bytes) @@ -1614,6 +1612,15 @@ return true; } + /* Constants are always copied byte-wise, but we may need to + * truncate to the total_bytes requested here. */ + if (loc->type == loc_constant) + { + if (loc->byte_size > total_bytes) + loc->byte_size = total_bytes; + return loc; + } + if (pieces_small_enough ()) return loc; @@ -1665,29 +1672,6 @@ break; } - case loc_constant: - { - Dwarf_Word offset = 0; - while (total_bytes - offset > 0) - { - Dwarf_Word size = total_bytes - offset; - if (size > max_piece_bytes) - size = max_piece_bytes; - - struct location *piece = alloc_location (ctx); - piece->next = NULL; - piece->type = loc_constant; - piece->byte_size = size; - piece->constant_block = loc->constant_block + offset; - - add (piece); - - offset += size; - } - - break; - } - case loc_value: FAIL (loc, N_("stack value too big for fetch ???")); break; @@ -1702,7 +1686,7 @@ case loc_noncontiguous: /* Could be handled if it ever happened. */ - FAIL (loc, N_("discontiguify of noncontiguous location not supported")); + FAIL (loc, N_("cannot support noncontiguous location")); break; default: @@ -1914,6 +1898,7 @@ uint8_t address_size; Dwarf_Die *cu = dwarf_diecu (die, &cu_mem, &address_size, NULL); if (cu == NULL) + //TRANSLATORS: CU stands for 'compilation unit' FAIL (loc, N_("cannot determine CU address size from %s: %s"), dwarf_diename (die), dwarf_errmsg (-1)); @@ -1958,7 +1943,8 @@ (*input)->type = loc_fragment; (*input)->address.declare = "tmp"; - Dwarf_Word bit_offset, bit_size; + Dwarf_Word bit_offset = 0; + Dwarf_Word bit_size = 0; get_bitfield (*input, die, &bit_offset, &bit_size); obstack_printf (pool, "%*s" @@ -2086,7 +2072,8 @@ (*input)->type = loc_fragment; (*input)->address.declare = "tmp"; - Dwarf_Word bit_offset, bit_size; + Dwarf_Word bit_offset = 0; + Dwarf_Word bit_size = 0; get_bitfield (*input, die, &bit_offset, &bit_size); obstack_printf (pool, "%*s" @@ -2239,6 +2226,7 @@ { if (dwarf_attr_integrate (&die_mem, DW_AT_type, &attr_mem) == NULL || dwarf_formref_die (&attr_mem, &die_mem) == NULL) + //TRANSLATORS: This refers to the basic type, (stripped of const/volatile/etc.) FAIL (origin, N_("cannot get inner type of type %s: %s"), dwarf_diename (&die_mem) ?: "", dwarf_errmsg (-1)); @@ -2308,6 +2296,7 @@ piece = piece->next; } if (piece == NULL) + //TRANSLATORS: The index is constant FAIL (*input, N_("constant index is outside noncontiguous array")); if (offset % stride != 0 || piece->byte_size < stride) FAIL (*input, N_("noncontiguous array splits elements")); @@ -2345,6 +2334,7 @@ if (idx != NULL) FAIL (*input, N_("cannot index into constant value")); else if (const_idx > loc->byte_size / stride) + //TRANSLATORS: The index is constant FAIL (*input, N_("constant index is outside constant array value")); else { diff -Nru systemtap-1.4/loc2c-test.c systemtap-1.6/loc2c-test.c --- systemtap-1.4/loc2c-test.c 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/loc2c-test.c 2011-07-25 18:12:01.000000000 +0000 @@ -15,20 +15,13 @@ #include #include #include -#ifdef HAVE_ELFUTILS_VERSION_H #include -#endif #include #include #include #include #include "loc2c.h" -#if !defined(_ELFUTILS_PREREQ) -// make a dummy PREREQ check for elfutils < 0.138 -#define _ELFUTILS_PREREQ(major, minor) (0 >= 1) -#endif - #define _(msg) msg static void __attribute__ ((noreturn)) @@ -177,22 +170,10 @@ } else { - /* We expect a block or a constant. In older elfutils, - dwarf_getlocation_addr would not handle the constant for - us, but newer ones do. For older ones, we work around - it by faking an expression, which is what newer ones do. */ - size_t locexpr_len; + /* We expect a block or a constant. */ + size_t locexpr_len = 0; const Dwarf_Op *locexpr; -#if !_ELFUTILS_PREREQ (0,142) - Dwarf_Op offset_loc = { .atom = DW_OP_plus_uconst }; - if (dwarf_formudata (&attr_mem, &offset_loc.number) == 0) - { - locexpr = &offset_loc; - locexpr_len = 1; - } - else -#endif - locexpr = get_location (cubias, pc, &attr_mem, &locexpr_len); + locexpr = get_location (cubias, pc, &attr_mem, &locexpr_len); c_translate_location (pool, NULL, NULL, NULL, 1, cubias, pc, &attr_mem, locexpr, locexpr_len, @@ -355,7 +336,7 @@ error (2, 0, _("cannot get location of variable: %s"), dwarf_errmsg (-1)); - size_t locexpr_len; + size_t locexpr_len = 0; const Dwarf_Op *locexpr = get_location (cubias, pc, &attr_mem, &locexpr_len); @@ -609,7 +590,6 @@ { Dwarf_Op *cfa_ops = NULL; -#if _ELFUTILS_PREREQ(0,142) size_t cfa_nops; Dwarf_Addr bias; Dwfl_Module *module = dwfl_addrmodule (dwfl, pc); @@ -634,7 +614,6 @@ } } } -#endif handle_variable (scopes, n, out, cubias, &vardie, pc, cfa_ops, &argv[argi]); diff -Nru systemtap-1.4/m4/gettext.m4 systemtap-1.6/m4/gettext.m4 --- systemtap-1.4/m4/gettext.m4 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/m4/gettext.m4 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,383 @@ +# gettext.m4 serial 63 (gettext-0.18) +dnl Copyright (C) 1995-2010 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. +dnl +dnl This file can can be used in projects which are not available under +dnl the GNU General Public License or the GNU Library General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +dnl by the GNU Library General Public License, and the rest of the GNU +dnl gettext package package is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Authors: +dnl Ulrich Drepper , 1995-2000. +dnl Bruno Haible , 2000-2006, 2008-2010. + +dnl Macro to add for using GNU gettext. + +dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). +dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The +dnl default (if it is not specified or empty) is 'no-libtool'. +dnl INTLSYMBOL should be 'external' for packages with no intl directory, +dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory. +dnl If INTLSYMBOL is 'use-libtool', then a libtool library +dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static, +dnl depending on --{enable,disable}-{shared,static} and on the presence of +dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library +dnl $(top_builddir)/intl/libintl.a will be created. +dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext +dnl implementations (in libc or libintl) without the ngettext() function +dnl will be ignored. If NEEDSYMBOL is specified and is +dnl 'need-formatstring-macros', then GNU gettext implementations that don't +dnl support the ISO C 99 formatstring macros will be ignored. +dnl INTLDIR is used to find the intl libraries. If empty, +dnl the value `$(top_builddir)/intl/' is used. +dnl +dnl The result of the configuration is one of three cases: +dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled +dnl and used. +dnl Catalog format: GNU --> install in $(datadir) +dnl Catalog extension: .mo after installation, .gmo in source tree +dnl 2) GNU gettext has been found in the system's C library. +dnl Catalog format: GNU --> install in $(datadir) +dnl Catalog extension: .mo after installation, .gmo in source tree +dnl 3) No internationalization, always use English msgid. +dnl Catalog format: none +dnl Catalog extension: none +dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur. +dnl The use of .gmo is historical (it was needed to avoid overwriting the +dnl GNU format catalogs when building on a platform with an X/Open gettext), +dnl but we keep it in order not to force irrelevant filename changes on the +dnl maintainers. +dnl +AC_DEFUN([AM_GNU_GETTEXT], +[ + dnl Argument checking. + ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , + [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT +])])])])]) + ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old], + [AC_DIAGNOSE([obsolete], [Use of AM_GNU_GETTEXT without [external] argument is deprecated.])]) + ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , + [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT +])])])]) + define([gt_included_intl], + ifelse([$1], [external], + ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]), + [yes])) + define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], [])) + gt_NEEDS_INIT + AM_GNU_GETTEXT_NEED([$2]) + + AC_REQUIRE([AM_PO_SUBDIRS])dnl + ifelse(gt_included_intl, yes, [ + AC_REQUIRE([AM_INTL_SUBDIR])dnl + ]) + + dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + + dnl Sometimes libintl requires libiconv, so first search for libiconv. + dnl Ideally we would do this search only after the + dnl if test "$USE_NLS" = "yes"; then + dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then + dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT + dnl the configure script would need to contain the same shell code + dnl again, outside any 'if'. There are two solutions: + dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. + dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. + dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not + dnl documented, we avoid it. + ifelse(gt_included_intl, yes, , [ + AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) + ]) + + dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation. + dnl gt_INTL_MACOSX + + dnl Set USE_NLS. + AC_REQUIRE([AM_NLS]) + + ifelse(gt_included_intl, yes, [ + BUILD_INCLUDED_LIBINTL=no + USE_INCLUDED_LIBINTL=no + ]) + LIBINTL= + LTLIBINTL= + POSUB= + + dnl Add a version number to the cache macros. + case " $gt_needs " in + *" need-formatstring-macros "*) gt_api_version=3 ;; + *" need-ngettext "*) gt_api_version=2 ;; + *) gt_api_version=1 ;; + esac + gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" + gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" + + dnl If we use NLS figure out what method + if test "$USE_NLS" = "yes"; then + gt_use_preinstalled_gnugettext=no + ifelse(gt_included_intl, yes, [ + AC_MSG_CHECKING([whether included gettext is requested]) + AC_ARG_WITH([included-gettext], + [ --with-included-gettext use the GNU gettext library included here], + nls_cv_force_use_gnu_gettext=$withval, + nls_cv_force_use_gnu_gettext=no) + AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext]) + + nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" + if test "$nls_cv_force_use_gnu_gettext" != "yes"; then + ]) + dnl User does not insist on using GNU NLS library. Figure out what + dnl to use. If GNU gettext is available we use this. Else we have + dnl to fall back to GNU NLS library. + + if test $gt_api_version -ge 3; then + gt_revision_test_code=' +#ifndef __GNU_GETTEXT_SUPPORTED_REVISION +#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) +#endif +changequote(,)dnl +typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; +changequote([,])dnl +' + else + gt_revision_test_code= + fi + if test $gt_api_version -ge 2; then + gt_expression_test_code=' + * ngettext ("", "", 0)' + else + gt_expression_test_code= + fi + + AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc], + [AC_TRY_LINK([#include +$gt_revision_test_code +extern int _nl_msg_cat_cntr; +extern int *_nl_domain_bindings;], + [bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings], + [eval "$gt_func_gnugettext_libc=yes"], + [eval "$gt_func_gnugettext_libc=no"])]) + + if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then + dnl Sometimes libintl requires libiconv, so first search for libiconv. + ifelse(gt_included_intl, yes, , [ + AM_ICONV_LINK + ]) + dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL + dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv]) + dnl because that would add "-liconv" to LIBINTL and LTLIBINTL + dnl even if libiconv doesn't exist. + AC_LIB_LINKFLAGS_BODY([intl]) + AC_CACHE_CHECK([for GNU gettext in libintl], + [$gt_func_gnugettext_libintl], + [gt_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $INCINTL" + gt_save_LIBS="$LIBS" + LIBS="$LIBS $LIBINTL" + dnl Now see whether libintl exists and does not depend on libiconv. + AC_TRY_LINK([#include +$gt_revision_test_code +extern int _nl_msg_cat_cntr; +extern +#ifdef __cplusplus +"C" +#endif +const char *_nl_expand_alias (const char *);], + [bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")], + [eval "$gt_func_gnugettext_libintl=yes"], + [eval "$gt_func_gnugettext_libintl=no"]) + dnl Now see whether libintl exists and depends on libiconv. + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then + LIBS="$LIBS $LIBICONV" + AC_TRY_LINK([#include +$gt_revision_test_code +extern int _nl_msg_cat_cntr; +extern +#ifdef __cplusplus +"C" +#endif +const char *_nl_expand_alias (const char *);], + [bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")], + [LIBINTL="$LIBINTL $LIBICONV" + LTLIBINTL="$LTLIBINTL $LTLIBICONV" + eval "$gt_func_gnugettext_libintl=yes" + ]) + fi + CPPFLAGS="$gt_save_CPPFLAGS" + LIBS="$gt_save_LIBS"]) + fi + + dnl If an already present or preinstalled GNU gettext() is found, + dnl use it. But if this macro is used in GNU gettext, and GNU + dnl gettext is already preinstalled in libintl, we update this + dnl libintl. (Cf. the install rule in intl/Makefile.in.) + if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ + || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ + && test "$PACKAGE" != gettext-runtime \ + && test "$PACKAGE" != gettext-tools; }; then + gt_use_preinstalled_gnugettext=yes + else + dnl Reset the values set by searching for libintl. + LIBINTL= + LTLIBINTL= + INCINTL= + fi + + ifelse(gt_included_intl, yes, [ + if test "$gt_use_preinstalled_gnugettext" != "yes"; then + dnl GNU gettext is not found in the C library. + dnl Fall back on included GNU gettext library. + nls_cv_use_gnu_gettext=yes + fi + fi + + if test "$nls_cv_use_gnu_gettext" = "yes"; then + dnl Mark actions used to generate GNU NLS library. + BUILD_INCLUDED_LIBINTL=yes + USE_INCLUDED_LIBINTL=yes + LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD" + LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD" + LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` + fi + + CATOBJEXT= + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + dnl Mark actions to use GNU gettext tools. + CATOBJEXT=.gmo + fi + ]) + + if test -n "$INTL_MACOSX_LIBS"; then + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + dnl Some extra flags are needed during linking. + LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" + LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" + fi + fi + + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + AC_DEFINE([ENABLE_NLS], [1], + [Define to 1 if translation of program messages to the user's native language + is requested.]) + else + USE_NLS=no + fi + fi + + AC_MSG_CHECKING([whether to use NLS]) + AC_MSG_RESULT([$USE_NLS]) + if test "$USE_NLS" = "yes"; then + AC_MSG_CHECKING([where the gettext function comes from]) + if test "$gt_use_preinstalled_gnugettext" = "yes"; then + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then + gt_source="external libintl" + else + gt_source="libc" + fi + else + gt_source="included intl directory" + fi + AC_MSG_RESULT([$gt_source]) + fi + + if test "$USE_NLS" = "yes"; then + + if test "$gt_use_preinstalled_gnugettext" = "yes"; then + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then + AC_MSG_CHECKING([how to link with libintl]) + AC_MSG_RESULT([$LIBINTL]) + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL]) + fi + + dnl For backward compatibility. Some packages may be using this. + AC_DEFINE([HAVE_GETTEXT], [1], + [Define if the GNU gettext() function is already present or preinstalled.]) + AC_DEFINE([HAVE_DCGETTEXT], [1], + [Define if the GNU dcgettext() function is already present or preinstalled.]) + fi + + dnl We need to process the po/ directory. + POSUB=po + fi + + ifelse(gt_included_intl, yes, [ + dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL + dnl to 'yes' because some of the testsuite requires it. + if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then + BUILD_INCLUDED_LIBINTL=yes + fi + + dnl Make all variables we use known to autoconf. + AC_SUBST([BUILD_INCLUDED_LIBINTL]) + AC_SUBST([USE_INCLUDED_LIBINTL]) + AC_SUBST([CATOBJEXT]) + + dnl For backward compatibility. Some configure.ins may be using this. + nls_cv_header_intl= + nls_cv_header_libgt= + + dnl For backward compatibility. Some Makefiles may be using this. + DATADIRNAME=share + AC_SUBST([DATADIRNAME]) + + dnl For backward compatibility. Some Makefiles may be using this. + INSTOBJEXT=.mo + AC_SUBST([INSTOBJEXT]) + + dnl For backward compatibility. Some Makefiles may be using this. + GENCAT=gencat + AC_SUBST([GENCAT]) + + dnl For backward compatibility. Some Makefiles may be using this. + INTLOBJS= + if test "$USE_INCLUDED_LIBINTL" = yes; then + INTLOBJS="\$(GETTOBJS)" + fi + AC_SUBST([INTLOBJS]) + + dnl Enable libtool support if the surrounding package wishes it. + INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix + AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX]) + ]) + + dnl For backward compatibility. Some Makefiles may be using this. + INTLLIBS="$LIBINTL" + AC_SUBST([INTLLIBS]) + + dnl Make all documented variables known to autoconf. + AC_SUBST([LIBINTL]) + AC_SUBST([LTLIBINTL]) + AC_SUBST([POSUB]) +]) + + +dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized. +m4_define([gt_NEEDS_INIT], +[ + m4_divert_text([DEFAULTS], [gt_needs=]) + m4_define([gt_NEEDS_INIT], []) +]) + + +dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL]) +AC_DEFUN([AM_GNU_GETTEXT_NEED], +[ + m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"]) +]) + + +dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) +AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) diff -Nru systemtap-1.4/m4/iconv.m4 systemtap-1.6/m4/iconv.m4 --- systemtap-1.4/m4/iconv.m4 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/m4/iconv.m4 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,214 @@ +# iconv.m4 serial 11 (gettext-0.18.1) +dnl Copyright (C) 2000-2002, 2007-2010 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. + +AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], +[ + dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + + dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV + dnl accordingly. + AC_LIB_LINKFLAGS_BODY([iconv]) +]) + +AC_DEFUN([AM_ICONV_LINK], +[ + dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and + dnl those with the standalone portable GNU libiconv installed). + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + + dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV + dnl accordingly. + AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) + + dnl Add $INCICONV to CPPFLAGS before performing the following checks, + dnl because if the user has installed libiconv and not disabled its use + dnl via --without-libiconv-prefix, he wants to use it. The first + dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed. + am_save_CPPFLAGS="$CPPFLAGS" + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) + + AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [ + am_cv_func_iconv="no, consider installing GNU libiconv" + am_cv_lib_iconv=no + AC_TRY_LINK([#include +#include ], + [iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd);], + [am_cv_func_iconv=yes]) + if test "$am_cv_func_iconv" != yes; then + am_save_LIBS="$LIBS" + LIBS="$LIBS $LIBICONV" + AC_TRY_LINK([#include +#include ], + [iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd);], + [am_cv_lib_iconv=yes] + [am_cv_func_iconv=yes]) + LIBS="$am_save_LIBS" + fi + ]) + if test "$am_cv_func_iconv" = yes; then + AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [ + dnl This tests against bugs in AIX 5.1, HP-UX 11.11, Solaris 10. + am_save_LIBS="$LIBS" + if test $am_cv_lib_iconv = yes; then + LIBS="$LIBS $LIBICONV" + fi + AC_TRY_RUN([ +#include +#include +int main () +{ + /* Test against AIX 5.1 bug: Failures are not distinguishable from successful + returns. */ + { + iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); + if (cd_utf8_to_88591 != (iconv_t)(-1)) + { + static const char input[] = "\342\202\254"; /* EURO SIGN */ + char buf[10]; + const char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_utf8_to_88591, + (char **) &inptr, &inbytesleft, + &outptr, &outbytesleft); + if (res == 0) + return 1; + } + } + /* Test against Solaris 10 bug: Failures are not distinguishable from + successful returns. */ + { + iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); + if (cd_ascii_to_88591 != (iconv_t)(-1)) + { + static const char input[] = "\263"; + char buf[10]; + const char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_ascii_to_88591, + (char **) &inptr, &inbytesleft, + &outptr, &outbytesleft); + if (res == 0) + return 1; + } + } +#if 0 /* This bug could be worked around by the caller. */ + /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ + { + iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); + if (cd_88591_to_utf8 != (iconv_t)(-1)) + { + static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; + char buf[50]; + const char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_88591_to_utf8, + (char **) &inptr, &inbytesleft, + &outptr, &outbytesleft); + if ((int)res > 0) + return 1; + } + } +#endif + /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is + provided. */ + if (/* Try standardized names. */ + iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) + /* Try IRIX, OSF/1 names. */ + && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) + /* Try AIX names. */ + && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) + /* Try HP-UX names. */ + && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) + return 1; + return 0; +}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no], + [case "$host_os" in + aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; + *) am_cv_func_iconv_works="guessing yes" ;; + esac]) + LIBS="$am_save_LIBS" + ]) + case "$am_cv_func_iconv_works" in + *no) am_func_iconv=no am_cv_lib_iconv=no ;; + *) am_func_iconv=yes ;; + esac + else + am_func_iconv=no am_cv_lib_iconv=no + fi + if test "$am_func_iconv" = yes; then + AC_DEFINE([HAVE_ICONV], [1], + [Define if you have the iconv() function and it works.]) + fi + if test "$am_cv_lib_iconv" = yes; then + AC_MSG_CHECKING([how to link with libiconv]) + AC_MSG_RESULT([$LIBICONV]) + else + dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV + dnl either. + CPPFLAGS="$am_save_CPPFLAGS" + LIBICONV= + LTLIBICONV= + fi + AC_SUBST([LIBICONV]) + AC_SUBST([LTLIBICONV]) +]) + +dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to +dnl avoid warnings like +dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required". +dnl This is tricky because of the way 'aclocal' is implemented: +dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN. +dnl Otherwise aclocal's initial scan pass would miss the macro definition. +dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions. +dnl Otherwise aclocal would emit many "Use of uninitialized value $1" +dnl warnings. +m4_define([gl_iconv_AC_DEFUN], + m4_version_prereq([2.64], + [[AC_DEFUN_ONCE( + [$1], [$2])]], + [[AC_DEFUN( + [$1], [$2])]])) +gl_iconv_AC_DEFUN([AM_ICONV], +[ + AM_ICONV_LINK + if test "$am_cv_func_iconv" = yes; then + AC_MSG_CHECKING([for iconv declaration]) + AC_CACHE_VAL([am_cv_proto_iconv], [ + AC_TRY_COMPILE([ +#include +#include +extern +#ifdef __cplusplus +"C" +#endif +#if defined(__STDC__) || defined(__cplusplus) +size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); +#else +size_t iconv(); +#endif +], [], [am_cv_proto_iconv_arg1=""], [am_cv_proto_iconv_arg1="const"]) + am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) + am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` + AC_MSG_RESULT([ + $am_cv_proto_iconv]) + AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1], + [Define as const if the declaration of iconv() needs const.]) + fi +]) diff -Nru systemtap-1.4/m4/lib-ld.m4 systemtap-1.6/m4/lib-ld.m4 --- systemtap-1.4/m4/lib-ld.m4 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/m4/lib-ld.m4 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,110 @@ +# lib-ld.m4 serial 4 (gettext-0.18) +dnl Copyright (C) 1996-2003, 2009-2010 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl Subroutines of libtool.m4, +dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision +dnl with libtool.m4. + +dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. +AC_DEFUN([AC_LIB_PROG_LD_GNU], +[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld], +[# I'd rather use --version here, but apparently some GNU ld's only accept -v. +case `$LD -v 2>&1 conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + AC_MSG_CHECKING([for ld used by GCC]) + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [[\\/]* | [A-Za-z]:[\\/]*)] + [re_direlt='/[^/][^/]*/\.\./'] + # Canonicalize the path of ld + ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + AC_MSG_CHECKING([for GNU ld]) +else + AC_MSG_CHECKING([for non-GNU ld]) +fi +AC_CACHE_VAL([acl_cv_path_LD], +[if test -z "$LD"; then + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + acl_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some GNU ld's only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in + *GNU* | *'with BFD'*) + test "$with_gnu_ld" != no && break ;; + *) + test "$with_gnu_ld" != yes && break ;; + esac + fi + done + IFS="$ac_save_ifs" +else + acl_cv_path_LD="$LD" # Let the user override the test with a path. +fi]) +LD="$acl_cv_path_LD" +if test -n "$LD"; then + AC_MSG_RESULT([$LD]) +else + AC_MSG_RESULT([no]) +fi +test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) +AC_LIB_PROG_LD_GNU +]) diff -Nru systemtap-1.4/m4/lib-link.m4 systemtap-1.6/m4/lib-link.m4 --- systemtap-1.4/m4/lib-link.m4 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/m4/lib-link.m4 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,774 @@ +# lib-link.m4 serial 21 (gettext-0.18) +dnl Copyright (C) 2001-2010 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. + +AC_PREREQ([2.54]) + +dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and +dnl the libraries corresponding to explicit and implicit dependencies. +dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and +dnl augments the CPPFLAGS variable. +dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname +dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. +AC_DEFUN([AC_LIB_LINKFLAGS], +[ + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + pushdef([Name],[translit([$1],[./-], [___])]) + pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ + AC_LIB_LINKFLAGS_BODY([$1], [$2]) + ac_cv_lib[]Name[]_libs="$LIB[]NAME" + ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" + ac_cv_lib[]Name[]_cppflags="$INC[]NAME" + ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX" + ]) + LIB[]NAME="$ac_cv_lib[]Name[]_libs" + LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" + INC[]NAME="$ac_cv_lib[]Name[]_cppflags" + LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix" + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) + AC_SUBST([LIB]NAME) + AC_SUBST([LTLIB]NAME) + AC_SUBST([LIB]NAME[_PREFIX]) + dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the + dnl results of this search when this library appears as a dependency. + HAVE_LIB[]NAME=yes + popdef([NAME]) + popdef([Name]) +]) + +dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message]) +dnl searches for libname and the libraries corresponding to explicit and +dnl implicit dependencies, together with the specified include files and +dnl the ability to compile and link the specified testcode. The missing-message +dnl defaults to 'no' and may contain additional hints for the user. +dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} +dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and +dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs +dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. +dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname +dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. +AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], +[ + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + pushdef([Name],[translit([$1],[./-], [___])]) + pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + + dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME + dnl accordingly. + AC_LIB_LINKFLAGS_BODY([$1], [$2]) + + dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, + dnl because if the user has installed lib[]Name and not disabled its use + dnl via --without-lib[]Name-prefix, he wants to use it. + ac_save_CPPFLAGS="$CPPFLAGS" + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) + + AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ + ac_save_LIBS="$LIBS" + dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS, + dnl because these -l options might require -L options that are present in + dnl LIBS. -l options benefit only from the -L options listed before it. + dnl Otherwise, add it to the front of LIBS, because it may be a static + dnl library that depends on another static library that is present in LIBS. + dnl Static libraries benefit only from the static libraries listed after + dnl it. + case " $LIB[]NAME" in + *" -l"*) LIBS="$LIBS $LIB[]NAME" ;; + *) LIBS="$LIB[]NAME $LIBS" ;; + esac + AC_TRY_LINK([$3], [$4], + [ac_cv_lib[]Name=yes], + [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])']) + LIBS="$ac_save_LIBS" + ]) + if test "$ac_cv_lib[]Name" = yes; then + HAVE_LIB[]NAME=yes + AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.]) + AC_MSG_CHECKING([how to link with lib[]$1]) + AC_MSG_RESULT([$LIB[]NAME]) + else + HAVE_LIB[]NAME=no + dnl If $LIB[]NAME didn't lead to a usable library, we don't need + dnl $INC[]NAME either. + CPPFLAGS="$ac_save_CPPFLAGS" + LIB[]NAME= + LTLIB[]NAME= + LIB[]NAME[]_PREFIX= + fi + AC_SUBST([HAVE_LIB]NAME) + AC_SUBST([LIB]NAME) + AC_SUBST([LTLIB]NAME) + AC_SUBST([LIB]NAME[_PREFIX]) + popdef([NAME]) + popdef([Name]) +]) + +dnl Determine the platform dependent parameters needed to use rpath: +dnl acl_libext, +dnl acl_shlibext, +dnl acl_hardcode_libdir_flag_spec, +dnl acl_hardcode_libdir_separator, +dnl acl_hardcode_direct, +dnl acl_hardcode_minus_L. +AC_DEFUN([AC_LIB_RPATH], +[ + dnl Tell automake >= 1.10 to complain if config.rpath is missing. + m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) + AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS + AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld + AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host + AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir + AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [ + CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ + ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh + . ./conftest.sh + rm -f ./conftest.sh + acl_cv_rpath=done + ]) + wl="$acl_cv_wl" + acl_libext="$acl_cv_libext" + acl_shlibext="$acl_cv_shlibext" + acl_libname_spec="$acl_cv_libname_spec" + acl_library_names_spec="$acl_cv_library_names_spec" + acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" + acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" + acl_hardcode_direct="$acl_cv_hardcode_direct" + acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" + dnl Determine whether the user wants rpath handling at all. + AC_ARG_ENABLE([rpath], + [ --disable-rpath do not hardcode runtime library paths], + :, enable_rpath=yes) +]) + +dnl AC_LIB_FROMPACKAGE(name, package) +dnl declares that libname comes from the given package. The configure file +dnl will then not have a --with-libname-prefix option but a +dnl --with-package-prefix option. Several libraries can come from the same +dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar +dnl macro call that searches for libname. +AC_DEFUN([AC_LIB_FROMPACKAGE], +[ + pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + define([acl_frompackage_]NAME, [$2]) + popdef([NAME]) + pushdef([PACK],[$2]) + pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + define([acl_libsinpackage_]PACKUP, + m4_ifdef([acl_libsinpackage_]PACKUP, [acl_libsinpackage_]PACKUP[[, ]],)[lib$1]) + popdef([PACKUP]) + popdef([PACK]) +]) + +dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and +dnl the libraries corresponding to explicit and implicit dependencies. +dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. +dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found +dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem. +AC_DEFUN([AC_LIB_LINKFLAGS_BODY], +[ + AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) + pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])]) + pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])]) + dnl Autoconf >= 2.61 supports dots in --with options. + pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit(PACK,[.],[_])],PACK)]) + dnl By default, look in $includedir and $libdir. + use_additional=yes + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + AC_ARG_WITH(P_A_C_K[-prefix], +[[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib + --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]], +[ + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + else + additional_includedir="$withval/include" + additional_libdir="$withval/$acl_libdirstem" + if test "$acl_libdirstem2" != "$acl_libdirstem" \ + && ! test -d "$withval/$acl_libdirstem"; then + additional_libdir="$withval/$acl_libdirstem2" + fi + fi + fi +]) + dnl Search the library and its dependencies in $additional_libdir and + dnl $LDFLAGS. Using breadth-first-seach. + LIB[]NAME= + LTLIB[]NAME= + INC[]NAME= + LIB[]NAME[]_PREFIX= + dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been + dnl computed. So it has to be reset here. + HAVE_LIB[]NAME= + rpathdirs= + ltrpathdirs= + names_already_handled= + names_next_round='$1 $2' + while test -n "$names_next_round"; do + names_this_round="$names_next_round" + names_next_round= + for name in $names_this_round; do + already_handled= + for n in $names_already_handled; do + if test "$n" = "$name"; then + already_handled=yes + break + fi + done + if test -z "$already_handled"; then + names_already_handled="$names_already_handled $name" + dnl See if it was already located by an earlier AC_LIB_LINKFLAGS + dnl or AC_LIB_HAVE_LINKFLAGS call. + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` + eval value=\"\$HAVE_LIB$uppername\" + if test -n "$value"; then + if test "$value" = yes; then + eval value=\"\$LIB$uppername\" + test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" + eval value=\"\$LTLIB$uppername\" + test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" + else + dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined + dnl that this library doesn't exist. So just drop it. + : + fi + else + dnl Search the library lib$name in $additional_libdir and $LDFLAGS + dnl and the already constructed $LIBNAME/$LTLIBNAME. + found_dir= + found_la= + found_so= + found_a= + eval libname=\"$acl_libname_spec\" # typically: libname=lib$name + if test -n "$acl_shlibext"; then + shrext=".$acl_shlibext" # typically: shrext=.so + else + shrext= + fi + if test $use_additional = yes; then + dir="$additional_libdir" + dnl The same code as in the loop below: + dnl First look for a shared library. + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + dnl Then look for a static library. + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + fi + if test "X$found_dir" = "X"; then + for x in $LDFLAGS $LTLIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + case "$x" in + -L*) + dir=`echo "X$x" | sed -e 's/^X-L//'` + dnl First look for a shared library. + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + dnl Then look for a static library. + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + ;; + esac + if test "X$found_dir" != "X"; then + break + fi + done + fi + if test "X$found_dir" != "X"; then + dnl Found the library. + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" + if test "X$found_so" != "X"; then + dnl Linking with a shared library. We attempt to hardcode its + dnl directory into the executable's runpath, unless it's the + dnl standard /usr/lib. + if test "$enable_rpath" = no \ + || test "X$found_dir" = "X/usr/$acl_libdirstem" \ + || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then + dnl No hardcoding is needed. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + dnl Use an explicit option to hardcode DIR into the resulting + dnl binary. + dnl Potentially add DIR to ltrpathdirs. + dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $found_dir" + fi + dnl The hardcoding into $LIBNAME is system dependent. + if test "$acl_hardcode_direct" = yes; then + dnl Using DIR/libNAME.so during linking hardcodes DIR into the + dnl resulting binary. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then + dnl Use an explicit option to hardcode DIR into the resulting + dnl binary. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + dnl Potentially add DIR to rpathdirs. + dnl The rpathdirs will be appended to $LIBNAME at the end. + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $found_dir" + fi + else + dnl Rely on "-L$found_dir". + dnl But don't add it if it's already contained in the LDFLAGS + dnl or the already constructed $LIBNAME + haveit= + for x in $LDFLAGS $LIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" + fi + if test "$acl_hardcode_minus_L" != no; then + dnl FIXME: Not sure whether we should use + dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" + dnl here. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH + dnl here, because this doesn't fit in flags passed to the + dnl compiler. So give up. No hardcoding. This affects only + dnl very old systems. + dnl FIXME: Not sure whether we should use + dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" + dnl here. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" + fi + fi + fi + fi + else + if test "X$found_a" != "X"; then + dnl Linking with a static library. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" + else + dnl We shouldn't come here, but anyway it's good to have a + dnl fallback. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" + fi + fi + dnl Assume the include files are nearby. + additional_includedir= + case "$found_dir" in + */$acl_libdirstem | */$acl_libdirstem/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` + if test "$name" = '$1'; then + LIB[]NAME[]_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; + */$acl_libdirstem2 | */$acl_libdirstem2/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` + if test "$name" = '$1'; then + LIB[]NAME[]_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; + esac + if test "X$additional_includedir" != "X"; then + dnl Potentially add $additional_includedir to $INCNAME. + dnl But don't add it + dnl 1. if it's the standard /usr/include, + dnl 2. if it's /usr/local/include and we are using GCC on Linux, + dnl 3. if it's already present in $CPPFLAGS or the already + dnl constructed $INCNAME, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + for x in $CPPFLAGS $INC[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + dnl Really add $additional_includedir to $INCNAME. + INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" + fi + fi + fi + fi + fi + dnl Look for dependencies. + if test -n "$found_la"; then + dnl Read the .la file. It defines the variables + dnl dlname, library_names, old_library, dependency_libs, current, + dnl age, revision, installed, dlopen, dlpreopen, libdir. + save_libdir="$libdir" + case "$found_la" in + */* | *\\*) . "$found_la" ;; + *) . "./$found_la" ;; + esac + libdir="$save_libdir" + dnl We use only dependency_libs. + for dep in $dependency_libs; do + case "$dep" in + -L*) + additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. + dnl But don't add it + dnl 1. if it's the standard /usr/lib, + dnl 2. if it's /usr/local/lib and we are using GCC on Linux, + dnl 3. if it's already present in $LDFLAGS or the already + dnl constructed $LIBNAME, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ + && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then + haveit= + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ + || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + haveit= + for x in $LDFLAGS $LIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + dnl Really add $additional_libdir to $LIBNAME. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" + fi + fi + haveit= + for x in $LDFLAGS $LTLIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + dnl Really add $additional_libdir to $LTLIBNAME. + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" + fi + fi + fi + fi + ;; + -R*) + dir=`echo "X$dep" | sed -e 's/^X-R//'` + if test "$enable_rpath" != no; then + dnl Potentially add DIR to rpathdirs. + dnl The rpathdirs will be appended to $LIBNAME at the end. + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $dir" + fi + dnl Potentially add DIR to ltrpathdirs. + dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $dir" + fi + fi + ;; + -l*) + dnl Handle this in the next round. + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` + ;; + *.la) + dnl Handle this in the next round. Throw away the .la's + dnl directory; it is already contained in a preceding -L + dnl option. + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` + ;; + *) + dnl Most likely an immediate library name. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" + ;; + esac + done + fi + else + dnl Didn't find the library; assume it is in the system directories + dnl known to the linker and runtime loader. (All the system + dnl directories known to the linker should also be known to the + dnl runtime loader, otherwise the system is severely misconfigured.) + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" + fi + fi + fi + done + done + if test "X$rpathdirs" != "X"; then + if test -n "$acl_hardcode_libdir_separator"; then + dnl Weird platform: only the last -rpath option counts, the user must + dnl pass all path elements in one option. We can arrange that for a + dnl single library, but not when more than one $LIBNAMEs are used. + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" + done + dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl. + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" + else + dnl The -rpath options are cumulative. + for found_dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$found_dir" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" + done + fi + fi + if test "X$ltrpathdirs" != "X"; then + dnl When using libtool, the option that works for both libraries and + dnl executables is -R. The -R options are cumulative. + for found_dir in $ltrpathdirs; do + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" + done + fi + popdef([P_A_C_K]) + popdef([PACKLIBS]) + popdef([PACKUP]) + popdef([PACK]) + popdef([NAME]) +]) + +dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, +dnl unless already present in VAR. +dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes +dnl contains two or three consecutive elements that belong together. +AC_DEFUN([AC_LIB_APPENDTOVAR], +[ + for element in [$2]; do + haveit= + for x in $[$1]; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + [$1]="${[$1]}${[$1]:+ }$element" + fi + done +]) + +dnl For those cases where a variable contains several -L and -l options +dnl referring to unknown libraries and directories, this macro determines the +dnl necessary additional linker options for the runtime path. +dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) +dnl sets LDADDVAR to linker options needed together with LIBSVALUE. +dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, +dnl otherwise linking without libtool is assumed. +AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], +[ + AC_REQUIRE([AC_LIB_RPATH]) + AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) + $1= + if test "$enable_rpath" != no; then + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then + dnl Use an explicit option to hardcode directories into the resulting + dnl binary. + rpathdirs= + next= + for opt in $2; do + if test -n "$next"; then + dir="$next" + dnl No need to hardcode the standard /usr/lib. + if test "X$dir" != "X/usr/$acl_libdirstem" \ + && test "X$dir" != "X/usr/$acl_libdirstem2"; then + rpathdirs="$rpathdirs $dir" + fi + next= + else + case $opt in + -L) next=yes ;; + -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` + dnl No need to hardcode the standard /usr/lib. + if test "X$dir" != "X/usr/$acl_libdirstem" \ + && test "X$dir" != "X/usr/$acl_libdirstem2"; then + rpathdirs="$rpathdirs $dir" + fi + next= ;; + *) next= ;; + esac + fi + done + if test "X$rpathdirs" != "X"; then + if test -n ""$3""; then + dnl libtool is used for linking. Use -R options. + for dir in $rpathdirs; do + $1="${$1}${$1:+ }-R$dir" + done + else + dnl The linker is used for linking directly. + if test -n "$acl_hardcode_libdir_separator"; then + dnl Weird platform: only the last -rpath option counts, the user + dnl must pass all path elements in one option. + alldirs= + for dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir" + done + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + $1="$flag" + else + dnl The -rpath options are cumulative. + for dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$dir" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + $1="${$1}${$1:+ }$flag" + done + fi + fi + fi + fi + fi + AC_SUBST([$1]) +]) diff -Nru systemtap-1.4/m4/lib-prefix.m4 systemtap-1.6/m4/lib-prefix.m4 --- systemtap-1.4/m4/lib-prefix.m4 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/m4/lib-prefix.m4 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,224 @@ +# lib-prefix.m4 serial 7 (gettext-0.18) +dnl Copyright (C) 2001-2005, 2008-2010 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. + +dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and +dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't +dnl require excessive bracketing. +ifdef([AC_HELP_STRING], +[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], +[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) + +dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed +dnl to access previously installed libraries. The basic assumption is that +dnl a user will want packages to use other packages he previously installed +dnl with the same --prefix option. +dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate +dnl libraries, but is otherwise very convenient. +AC_DEFUN([AC_LIB_PREFIX], +[ + AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + dnl By default, look in $includedir and $libdir. + use_additional=yes + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + AC_LIB_ARG_WITH([lib-prefix], +[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib + --without-lib-prefix don't search for libraries in includedir and libdir], +[ + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + else + additional_includedir="$withval/include" + additional_libdir="$withval/$acl_libdirstem" + fi + fi +]) + if test $use_additional = yes; then + dnl Potentially add $additional_includedir to $CPPFLAGS. + dnl But don't add it + dnl 1. if it's the standard /usr/include, + dnl 2. if it's already present in $CPPFLAGS, + dnl 3. if it's /usr/local/include and we are using GCC on Linux, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + for x in $CPPFLAGS; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + dnl Really add $additional_includedir to $CPPFLAGS. + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" + fi + fi + fi + fi + dnl Potentially add $additional_libdir to $LDFLAGS. + dnl But don't add it + dnl 1. if it's the standard /usr/lib, + dnl 2. if it's already present in $LDFLAGS, + dnl 3. if it's /usr/local/lib and we are using GCC on Linux, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then + haveit= + for x in $LDFLAGS; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then + if test -n "$GCC"; then + case $host_os in + linux*) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + dnl Really add $additional_libdir to $LDFLAGS. + LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" + fi + fi + fi + fi + fi +]) + +dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, +dnl acl_final_exec_prefix, containing the values to which $prefix and +dnl $exec_prefix will expand at the end of the configure script. +AC_DEFUN([AC_LIB_PREPARE_PREFIX], +[ + dnl Unfortunately, prefix and exec_prefix get only finally determined + dnl at the end of configure. + if test "X$prefix" = "XNONE"; then + acl_final_prefix="$ac_default_prefix" + else + acl_final_prefix="$prefix" + fi + if test "X$exec_prefix" = "XNONE"; then + acl_final_exec_prefix='${prefix}' + else + acl_final_exec_prefix="$exec_prefix" + fi + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" + prefix="$acl_save_prefix" +]) + +dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the +dnl variables prefix and exec_prefix bound to the values they will have +dnl at the end of the configure script. +AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], +[ + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + $1 + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" +]) + +dnl AC_LIB_PREPARE_MULTILIB creates +dnl - a variable acl_libdirstem, containing the basename of the libdir, either +dnl "lib" or "lib64" or "lib/64", +dnl - a variable acl_libdirstem2, as a secondary possible value for +dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or +dnl "lib/amd64". +AC_DEFUN([AC_LIB_PREPARE_MULTILIB], +[ + dnl There is no formal standard regarding lib and lib64. + dnl On glibc systems, the current practice is that on a system supporting + dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under + dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine + dnl the compiler's default mode by looking at the compiler's library search + dnl path. If at least one of its elements ends in /lib64 or points to a + dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI. + dnl Otherwise we use the default, namely "lib". + dnl On Solaris systems, the current practice is that on a system supporting + dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under + dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or + dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib. + AC_REQUIRE([AC_CANONICAL_HOST]) + acl_libdirstem=lib + acl_libdirstem2= + case "$host_os" in + solaris*) + dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment + dnl . + dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link." + dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the + dnl symlink is missing, so we set acl_libdirstem2 too. + AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit], + [AC_EGREP_CPP([sixtyfour bits], [ +#ifdef _LP64 +sixtyfour bits +#endif + ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no]) + ]) + if test $gl_cv_solaris_64bit = yes; then + acl_libdirstem=lib/64 + case "$host_cpu" in + sparc*) acl_libdirstem2=lib/sparcv9 ;; + i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; + esac + fi + ;; + *) + searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` + if test -n "$searchpath"; then + acl_save_IFS="${IFS= }"; IFS=":" + for searchdir in $searchpath; do + if test -d "$searchdir"; then + case "$searchdir" in + */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; + */../ | */.. ) + # Better ignore directories of this form. They are misleading. + ;; + *) searchdir=`cd "$searchdir" && pwd` + case "$searchdir" in + */lib64 ) acl_libdirstem=lib64 ;; + esac ;; + esac + fi + done + IFS="$acl_save_IFS" + fi + ;; + esac + test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" +]) diff -Nru systemtap-1.4/m4/nls.m4 systemtap-1.6/m4/nls.m4 --- systemtap-1.4/m4/nls.m4 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/m4/nls.m4 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,32 @@ +# nls.m4 serial 5 (gettext-0.18) +dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation, +dnl Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. +dnl +dnl This file can can be used in projects which are not available under +dnl the GNU General Public License or the GNU Library General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +dnl by the GNU Library General Public License, and the rest of the GNU +dnl gettext package package is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Authors: +dnl Ulrich Drepper , 1995-2000. +dnl Bruno Haible , 2000-2003. + +AC_PREREQ([2.50]) + +AC_DEFUN([AM_NLS], +[ + AC_MSG_CHECKING([whether NLS is requested]) + dnl Default is enabled NLS + AC_ARG_ENABLE([nls], + [ --disable-nls do not use Native Language Support], + USE_NLS=$enableval, USE_NLS=yes) + AC_MSG_RESULT([$USE_NLS]) + AC_SUBST([USE_NLS]) +]) diff -Nru systemtap-1.4/m4/po.m4 systemtap-1.6/m4/po.m4 --- systemtap-1.4/m4/po.m4 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/m4/po.m4 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,449 @@ +# po.m4 serial 17 (gettext-0.18) +dnl Copyright (C) 1995-2010 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. +dnl +dnl This file can can be used in projects which are not available under +dnl the GNU General Public License or the GNU Library General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +dnl by the GNU Library General Public License, and the rest of the GNU +dnl gettext package package is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Authors: +dnl Ulrich Drepper , 1995-2000. +dnl Bruno Haible , 2000-2003. + +AC_PREREQ([2.50]) + +dnl Checks for all prerequisites of the po subdirectory. +AC_DEFUN([AM_PO_SUBDIRS], +[ + AC_REQUIRE([AC_PROG_MAKE_SET])dnl + AC_REQUIRE([AC_PROG_INSTALL])dnl + AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake + AC_REQUIRE([AM_NLS])dnl + + dnl Release version of the gettext macros. This is used to ensure that + dnl the gettext macros and po/Makefile.in.in are in sync. + AC_SUBST([GETTEXT_MACRO_VERSION], [0.18]) + + dnl Perform the following tests also if --disable-nls has been given, + dnl because they are needed for "make dist" to work. + + dnl Search for GNU msgfmt in the PATH. + dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions. + dnl The second test excludes FreeBSD msgfmt. + AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, + [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && + (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], + :) + AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT]) + + dnl Test whether it is GNU msgfmt >= 0.15. +changequote(,)dnl + case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;; + *) MSGFMT_015=$MSGFMT ;; + esac +changequote([,])dnl + AC_SUBST([MSGFMT_015]) +changequote(,)dnl + case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; + *) GMSGFMT_015=$GMSGFMT ;; + esac +changequote([,])dnl + AC_SUBST([GMSGFMT_015]) + + dnl Search for GNU xgettext 0.12 or newer in the PATH. + dnl The first test excludes Solaris xgettext and early GNU xgettext versions. + dnl The second test excludes FreeBSD xgettext. + AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, + [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && + (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], + :) + dnl Remove leftover from FreeBSD xgettext call. + rm -f messages.po + + dnl Test whether it is GNU xgettext >= 0.15. +changequote(,)dnl + case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; + *) XGETTEXT_015=$XGETTEXT ;; + esac +changequote([,])dnl + AC_SUBST([XGETTEXT_015]) + + dnl Search for GNU msgmerge 0.11 or newer in the PATH. + AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, + [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :) + + dnl Installation directories. + dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we + dnl have to define it here, so that it can be used in po/Makefile. + test -n "$localedir" || localedir='${datadir}/locale' + AC_SUBST([localedir]) + + dnl Support for AM_XGETTEXT_OPTION. + test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS= + AC_SUBST([XGETTEXT_EXTRA_OPTIONS]) + + AC_CONFIG_COMMANDS([po-directories], [[ + for ac_file in $CONFIG_FILES; do + # Support "outfile[:infile[:infile...]]" + case "$ac_file" in + *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + esac + # PO directories have a Makefile.in generated from Makefile.in.in. + case "$ac_file" in */Makefile.in) + # Adjust a relative srcdir. + ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` + ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" + ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` + # In autoconf-2.13 it is called $ac_given_srcdir. + # In autoconf-2.50 it is called $srcdir. + test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" + case "$ac_given_srcdir" in + .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; + /*) top_srcdir="$ac_given_srcdir" ;; + *) top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + # Treat a directory as a PO directory if and only if it has a + # POTFILES.in file. This allows packages to have multiple PO + # directories under different names or in different locations. + if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then + rm -f "$ac_dir/POTFILES" + test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" + cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" + POMAKEFILEDEPS="POTFILES.in" + # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend + # on $ac_dir but don't depend on user-specified configuration + # parameters. + if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then + # The LINGUAS file contains the set of available languages. + if test -n "$OBSOLETE_ALL_LINGUAS"; then + test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" + fi + ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` + # Hide the ALL_LINGUAS assigment from automake < 1.5. + eval 'ALL_LINGUAS''=$ALL_LINGUAS_' + POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" + else + # The set of available languages was given in configure.in. + # Hide the ALL_LINGUAS assigment from automake < 1.5. + eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' + fi + # Compute POFILES + # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) + # Compute UPDATEPOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) + # Compute DUMMYPOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) + # Compute GMOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) + case "$ac_given_srcdir" in + .) srcdirpre= ;; + *) srcdirpre='$(srcdir)/' ;; + esac + POFILES= + UPDATEPOFILES= + DUMMYPOFILES= + GMOFILES= + for lang in $ALL_LINGUAS; do + POFILES="$POFILES $srcdirpre$lang.po" + UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" + DUMMYPOFILES="$DUMMYPOFILES $lang.nop" + GMOFILES="$GMOFILES $srcdirpre$lang.gmo" + done + # CATALOGS depends on both $ac_dir and the user's LINGUAS + # environment variable. + INST_LINGUAS= + if test -n "$ALL_LINGUAS"; then + for presentlang in $ALL_LINGUAS; do + useit=no + if test "%UNSET%" != "$LINGUAS"; then + desiredlanguages="$LINGUAS" + else + desiredlanguages="$ALL_LINGUAS" + fi + for desiredlang in $desiredlanguages; do + # Use the presentlang catalog if desiredlang is + # a. equal to presentlang, or + # b. a variant of presentlang (because in this case, + # presentlang can be used as a fallback for messages + # which are not translated in the desiredlang catalog). + case "$desiredlang" in + "$presentlang"*) useit=yes;; + esac + done + if test $useit = yes; then + INST_LINGUAS="$INST_LINGUAS $presentlang" + fi + done + fi + CATALOGS= + if test -n "$INST_LINGUAS"; then + for lang in $INST_LINGUAS; do + CATALOGS="$CATALOGS $lang.gmo" + done + fi + test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" + sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" + for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do + if test -f "$f"; then + case "$f" in + *.orig | *.bak | *~) ;; + *) cat "$f" >> "$ac_dir/Makefile" ;; + esac + fi + done + fi + ;; + esac + done]], + [# Capture the value of obsolete ALL_LINGUAS because we need it to compute + # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it + # from automake < 1.5. + eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' + # Capture the value of LINGUAS because we need it to compute CATALOGS. + LINGUAS="${LINGUAS-%UNSET%}" + ]) +]) + +dnl Postprocesses a Makefile in a directory containing PO files. +AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE], +[ + # When this code is run, in config.status, two variables have already been + # set: + # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in, + # - LINGUAS is the value of the environment variable LINGUAS at configure + # time. + +changequote(,)dnl + # Adjust a relative srcdir. + ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` + ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" + ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` + # In autoconf-2.13 it is called $ac_given_srcdir. + # In autoconf-2.50 it is called $srcdir. + test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" + case "$ac_given_srcdir" in + .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; + /*) top_srcdir="$ac_given_srcdir" ;; + *) top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + + # Find a way to echo strings without interpreting backslash. + if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then + gt_echo='echo' + else + if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then + gt_echo='printf %s\n' + else + echo_func () { + cat < "$ac_file.tmp" + if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then + # Add dependencies that cannot be formulated as a simple suffix rule. + for lang in $ALL_LINGUAS; do + frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` + cat >> "$ac_file.tmp" < /dev/null; then + # Add dependencies that cannot be formulated as a simple suffix rule. + for lang in $ALL_LINGUAS; do + frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` + cat >> "$ac_file.tmp" <> "$ac_file.tmp" <, 1996. + +AC_PREREQ([2.50]) + +# Search path for a program which passes the given test. + +dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, +dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) +AC_DEFUN([AM_PATH_PROG_WITH_TEST], +[ +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Find out how to test for executable files. Don't use a zero-byte file, +# as systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + ac_executable_p="test -x" +else + ac_executable_p="test -f" +fi +rm -f conf$$.file + +# Extract the first word of "$2", so it can be a program name with args. +set dummy $2; ac_word=[$]2 +AC_MSG_CHECKING([for $ac_word]) +AC_CACHE_VAL([ac_cv_path_$1], +[case "[$]$1" in + [[\\/]]* | ?:[[\\/]]*) + ac_cv_path_$1="[$]$1" # Let the user override the test with a path. + ;; + *) + ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in ifelse([$5], , $PATH, [$5]); do + IFS="$ac_save_IFS" + test -z "$ac_dir" && ac_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then + echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD + if [$3]; then + ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext" + break 2 + fi + fi + done + done + IFS="$ac_save_IFS" +dnl If no 4th arg is given, leave the cache variable unset, +dnl so AC_PATH_PROGS will keep looking. +ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" +])dnl + ;; +esac])dnl +$1="$ac_cv_path_$1" +if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then + AC_MSG_RESULT([$][$1]) +else + AC_MSG_RESULT([no]) +fi +AC_SUBST([$1])dnl +]) diff -Nru systemtap-1.4/main.cxx systemtap-1.6/main.cxx --- systemtap-1.4/main.cxx 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/main.cxx 2011-07-25 18:12:01.000000000 +0000 @@ -1,5 +1,5 @@ // systemtap translator/driver -// Copyright (C) 2005-2010 Red Hat Inc. +// Copyright (C) 2005-2011 Red Hat Inc. // Copyright (C) 2005 IBM Corp. // Copyright (C) 2006 Intel Corporation. // @@ -24,6 +24,9 @@ #include "csclient.h" #include "remote.h" +#include +#include + #include "stap-probe.h" #include @@ -173,7 +176,7 @@ else { if (s.embeds.size() > 0) - o << "# global embedded code" << endl; + o << _("# global embedded code") << endl; for (unsigned i=0; i 0) - o << "# globals" << endl; + o << _("# globals") << endl; for (unsigned i=0; i 0) - o << "# functions" << endl; + o << _("# functions") << endl; for (map::iterator it = s.functions.begin(); it != s.functions.end(); it++) { if (pending_interrupts) return; @@ -206,7 +209,7 @@ f->printsig (o); o << endl; if (f->locals.size() > 0) - o << " # locals" << endl; + o << _(" # locals") << endl; for (unsigned j=0; jlocals.size(); j++) { vardecl* v = f->locals[j]; @@ -222,7 +225,7 @@ } if (s.probes.size() > 0) - o << "# probes" << endl; + o << _("# probes") << endl; for (unsigned i=0; iprintsig (o); o << endl; if (p->locals.size() > 0) - o << " # locals" << endl; + o << _(" # locals") << endl; for (unsigned j=0; jlocals.size(); j++) { vardecl* v = p->locals[j]; @@ -253,9 +256,14 @@ extern "C" void handle_interrupt (int sig) { + // This might be nice, but we don't know our current verbosity... + // clog << _F("Received signal %d", sig) << endl << flush; kill_stap_spawn(sig); pending_interrupts ++; - if (pending_interrupts > 1) // XXX: should be configurable? time-based? + // Absorb the first two signals. This used to be one, but when + // stap is run under sudo, and then interrupted, sudo relays a + // redundant copy of the signal to stap, leading to an unclean shutdown. + if (pending_interrupts > 2) // XXX: should be configurable? time-based? { char msg[] = "Too many interrupts received, exiting.\n"; int rc = write (2, msg, sizeof(msg)-1); @@ -270,6 +278,7 @@ { struct sigaction sa; + memset(&sa, 0, sizeof(sa)); sa.sa_handler = handler; sigemptyset (&sa.sa_mask); if (handler != SIG_IGN) @@ -278,6 +287,8 @@ sigaddset (&sa.sa_mask, SIGPIPE); sigaddset (&sa.sa_mask, SIGINT); sigaddset (&sa.sa_mask, SIGTERM); + sigaddset (&sa.sa_mask, SIGXFSZ); + sigaddset (&sa.sa_mask, SIGXCPU); } sa.sa_flags = SA_RESTART; @@ -285,6 +296,8 @@ sigaction (SIGPIPE, &sa, NULL); sigaction (SIGINT, &sa, NULL); sigaction (SIGTERM, &sa, NULL); + sigaction (SIGXFSZ, &sa, NULL); + sigaction (SIGXCPU, &sa, NULL); } int parse_kernel_config (systemtap_session &s) @@ -294,8 +307,9 @@ struct stat st; int rc = stat(kernel_config_file.c_str(), &st); if (rc != 0) - { - clog << "Checking \"" << kernel_config_file << "\" failed: " << strerror(errno) << endl; + { + clog << _F("Checking \"%s\" failed with error: %s", + kernel_config_file.c_str(), strerror(errno)) << endl; find_devel_rpms(s, s.kernel_build_tree.c_str()); missing_rpm_list_print(s,"-devel"); return rc; @@ -313,8 +327,10 @@ s.kernel_config[key] = value; } if (s.verbose > 2) - clog << "Parsed kernel \"" << kernel_config_file << "\", number of tuples: " << s.kernel_config.size() << endl; - + clog << _F("Parsed kernel \"%s\", ", kernel_config_file.c_str()) + << _F(ngettext("containing %zu tuple", "containing %zu tuples", + s.kernel_config.size()), s.kernel_config.size()) << endl; + kcf.close(); return 0; } @@ -327,8 +343,8 @@ int rc = stat(kernel_exports_file.c_str(), &st); if (rc != 0) { - clog << "Checking \"" << kernel_exports_file << "\" failed: " << strerror(errno) << endl - << "Ensure kernel development headers & makefiles are installed." << endl; + clog << _F("Checking \"%s\" failed with error: %s\nEnsure kernel development headers & makefiles are installed", + kernel_exports_file.c_str(), strerror(errno)) << endl; return rc; } @@ -344,80 +360,111 @@ s.kernel_exports.insert (tokens[1]); } if (s.verbose > 2) - clog << "Parsed kernel \"" << kernel_exports_file << "\", number of vmlinux exports: " << s.kernel_exports.size() << endl; - + clog << _F(ngettext("Parsed kernel %s, which contained one vmlinux export", + "Parsed kernel %s, which contained %zu vmlinux exports", + s.kernel_exports.size()), kernel_exports_file.c_str(), + s.kernel_exports.size()) << endl; + kef.close(); return 0; } -static void +static int create_temp_dir (systemtap_session &s) { + if (!s.tmpdir.empty()) + return 0; + // Create a temporary directory to build within. // Be careful with this, as "tmpdir" is "rm -rf"'d at the end. - const char* tmpdir_env = getenv("TMPDIR"); - if (! tmpdir_env) + const char * tmpdir_env = getenv("TMPDIR"); + if (!tmpdir_env) tmpdir_env = "/tmp"; string stapdir = "/stapXXXXXX"; string tmpdirt = tmpdir_env + stapdir; - mode_t mask = umask(0); const char *tmpdir_name = mkdtemp((char *)tmpdirt.c_str()); - umask(mask); if (! tmpdir_name) { - const char* e = strerror (errno); - cerr << "ERROR: cannot create temporary directory (\"" << tmpdirt << "\"): " << e << endl; - exit (1); // die + const char* e = strerror(errno); + //TRANSLATORS: we can't make the directory due to the error + cerr << _F("ERROR: cannot create temporary directory (\" %s \"): %s", tmpdirt.c_str(), e) << endl; + return 1; } else s.tmpdir = tmpdir_name; if (s.verbose>1) - clog << "Created temporary directory \"" << s.tmpdir << "\"" << endl; + clog << _F("Created temporary directory \"%s\"", s.tmpdir.c_str()) << endl; + return 0; } static void -remove_temp_dir (systemtap_session &s) +remove_temp_dir(systemtap_session &s) { - if (s.tmpdir != "") + if (!s.tmpdir.empty()) { - if (s.keep_tmpdir) - // NB: the format of this message needs to match the expectations - // of stap-server-connect.c. - clog << "Keeping temporary directory \"" << s.tmpdir << "\"" << endl; - else + if (s.keep_tmpdir && !s.tmpdir_opt_set) + clog << _F("Keeping temporary directory \"%s\"", s.tmpdir.c_str()) << endl; + else if (!s.tmpdir_opt_set) { - // Ignore signals while we're deleting the temporary directory. - setup_signals (SIG_IGN); + // Mask signals while we're deleting the temporary directory. + stap_sigmasker masked; - // Remove the temporary directory. - string cleanupcmd = "rm -rf "; - cleanupcmd += s.tmpdir; + // Remove the temporary directory. + vector cleanupcmd; + cleanupcmd.push_back("rm"); + cleanupcmd.push_back("-rf"); + cleanupcmd.push_back(s.tmpdir); - (void) stap_system (s.verbose, cleanupcmd); + (void) stap_system(s.verbose, cleanupcmd); + s.tmpdir.clear(); } } } +// Compilation passes 0 through 4 static int passes_0_4 (systemtap_session &s) { int rc = 0; + // If we don't know the release, there's no hope either locally or on a server. + if (s.kernel_release.empty()) + { + if (s.kernel_build_tree.empty()) + cerr << _("ERROR: kernel release isn't specified") << endl; + else + cerr << _F("ERROR: kernel release isn't found in \"%s\"", + s.kernel_build_tree.c_str()) << endl; + return 1; + } + // Create a temporary directory to build within. // Be careful with this, as "s.tmpdir" is "rm -rf"'d at the end. - create_temp_dir (s); + rc = create_temp_dir (s); + if (rc) + return rc; // Perform passes 0 through 4 using a compile server? if (! s.specified_servers.empty ()) { #if HAVE_NSS compile_server_client client (s); - return client.passes_0_4 (); + int rc = client.passes_0_4 (); + // Need to give a user a better diagnostic, if she didn't + // even ask for a server + if (rc && s.automatic_server_mode) { + cerr << _("Note: --use-server --unprivileged was selected because of stapusr membership.") << endl; + } + return rc; #else - cerr << "WARNING: Without NSS, using a compile-server is not supported by this version of systemtap" << endl; + cerr << _("WARNING: Without NSS, using a compile-server is not supported by this version of systemtap") << endl; + // This cannot be an attempt to use a server after a local compile failed + // since --use-server-on-error is locked to 'no' if we don't have + // NSS. + assert (! s.try_server ()); #endif } @@ -425,7 +472,6 @@ s.verbose = s.perpass_verbose[0]; PROBE1(stap, pass0__start, &s); - // For PR1477, we used to override $PATH and $LC_ALL and other stuff // here. We seem to use complete pathnames in // buildrun.cxx/tapsets.cxx now, so this is not necessary. Further, @@ -434,31 +480,25 @@ s.kernel_base_release.assign(s.kernel_release, 0, s.kernel_release.find('-')); - // arguments parsed; get down to business - if (s.verbose > 1) + // Now that no further changes to s.kernel_build_tree can occur, let's use it. + if ((rc = parse_kernel_config (s)) != 0) { - s.version (); - clog << "Session arch: " << s.architecture - << " release: " << s.kernel_release - << endl; + // Try again with a server + s.set_try_server (); + return rc; } - // Now that no further changes to s.kernel_build_tree can occur, let's use it. - if (parse_kernel_config (s) != 0) - exit (1); - - if (parse_kernel_exports (s) != 0) - exit (1); - + if ((rc = parse_kernel_exports (s)) != 0) + { + // Try again with a server + s.set_try_server (); + return rc; + } // Create the name of the C source file within the temporary // directory. s.translated_source = string(s.tmpdir) + "/" + s.module_name + ".c"; - // Set up our handler to catch routine signals, to allow clean - // and reasonably timely exit. - setup_signals(&handle_interrupt); - PROBE1(stap, pass0__end, &s); struct tms tms_before; @@ -488,8 +528,10 @@ s.user_file = parse (s, ii, s.guru_mode); } if (s.user_file == 0) - // syntax errors already printed - rc ++; + { + // Syntax errors already printed. + rc ++; + } // Construct arch / kernel-versioning search path vector version_suffixes; @@ -532,8 +574,8 @@ string dir = s.include_path[i] + version_suffixes[k] + "/*.stp"; int r = glob(dir.c_str (), 0, NULL, & globbuf); if (r == GLOB_NOSPACE || r == GLOB_ABORTED) - rc ++; - // GLOB_NOMATCH is acceptable + rc ++; + // GLOB_NOMATCH is acceptable unsigned prev_s_library_files = s.library_files.size(); @@ -548,8 +590,9 @@ user_file_stat.st_dev == tapset_file_stat.st_dev && user_file_stat.st_ino == tapset_file_stat.st_ino) { - cerr << "usage error: tapset file '" << globbuf.gl_pathv[j] - << "' cannot be run directly as a session script." << endl; + cerr + << _F("usage error: tapset file '%s' cannot be run directly as a session script.", + globbuf.gl_pathv[j]) << endl; rc ++; } @@ -574,9 +617,10 @@ unsigned next_s_library_files = s.library_files.size(); if (s.verbose>1 && globbuf.gl_pathc > 0) - clog << "Searched \"" << dir << "\"," - << " found " << globbuf.gl_pathc - << " processed " << (next_s_library_files-prev_s_library_files) << endl; + //TRANSLATORS: Searching through directories, 'processed' means 'examined so far' + clog << _F("Searched: \" %s \", found: %zu, processed: %u", + dir.c_str(), globbuf.gl_pathc, + (next_s_library_files-prev_s_library_files)) << endl; globfree (& globbuf); } @@ -586,7 +630,7 @@ if (rc == 0 && s.last_pass == 1) { - cout << "# parse tree dump" << endl; + cout << _("# parse tree dump") << endl; s.user_file->print (cout); cout << endl; if (s.verbose) @@ -623,9 +667,10 @@ } if (rc && !s.listing_mode) - cerr << "Pass 1: parse failed. " - << "Try again with another '--vp 1' option." - << endl; + cerr << _("Pass 1: parse failed. Try again with another '--vp 1' option.") << endl; + //cerr << "Pass 1: parse failed. " + // << "Try again with another '--vp 1' option." + // << endl; PROBE1(stap, pass1__end, &s); @@ -654,10 +699,11 @@ << TIMESPRINT << endl; - if (rc && !s.listing_mode) - cerr << "Pass 2: analysis failed. " - << "Try again with another '--vp 01' option." - << endl; + if (rc && !s.listing_mode && !s.try_server ()) + cerr << _("Pass 2: analysis failed. Try again with another '--vp 01' option.") << endl; + //cerr << "Pass 2: analysis failed. " + // << "Try again with another '--vp 01' option." + // << endl; /* Print out list of missing files. XXX should be "if (rc)" ? */ missing_rpm_list_print(s,"-debuginfo"); @@ -691,9 +737,14 @@ // See if we can use cached source/module. if (get_script_from_cache(s)) { + // We may still need to build uprobes, if it's not also cached. + if (s.need_uprobes) + rc = uprobes_pass(s); + // If our last pass isn't 5, we're done (since passes 3 and // 4 just generate what we just pulled out of the cache). - if (s.last_pass < 5 || pending_interrupts) return rc; + if (rc || s.last_pass < 5 || pending_interrupts) + return rc; // Short-circuit to pass 5. return 0; @@ -707,8 +758,7 @@ PROBE1(stap, pass3__start, &s); rc = translate_pass (s); - - if (rc == 0 && s.last_pass == 3) + if (! rc && s.last_pass == 3) { ifstream i (s.translated_source.c_str()); cout << i.rdbuf(); @@ -717,18 +767,20 @@ times (& tms_after); gettimeofday (&tv_after, NULL); - if (s.verbose) clog << "Pass 3: translated to C into \"" - << s.translated_source - << "\" " - << getmemusage() - << TIMESPRINT - << endl; - - if (rc) - cerr << "Pass 3: translation failed. " - << "Try again with another '--vp 001' option." + if (s.verbose) + clog << "Pass 3: translated to C into \"" + << s.translated_source + << "\" " + << getmemusage() + << TIMESPRINT << endl; + if (rc && ! s.try_server ()) + cerr << _("Pass 3: translation failed. Try again with another '--vp 001' option.") << endl; + //cerr << "Pass 3: translation failed. " + // << "Try again with another '--vp 001' option." + // << endl; + PROBE1(stap, pass3__end, &s); if (rc || s.last_pass == 3 || pending_interrupts) return rc; @@ -745,8 +797,7 @@ get_stapconf_from_cache(s); } rc = compile_pass (s); - - if (rc == 0 && s.last_pass == 4) + if (! rc && s.last_pass == 4) { cout << ((s.hash_path == "") ? (s.module_name + string(".ko")) : s.hash_path); cout << endl; @@ -761,10 +812,11 @@ << TIMESPRINT << endl; - if (rc) - cerr << "Pass 4: compilation failed. " - << "Try again with another '--vp 0001' option." - << endl; + if (rc && ! s.try_server ()) + cerr << _("Pass 4: compilation failed. Try again with another '--vp 0001' option.") << endl; + //cerr << "Pass 4: compilation failed. " + // << "Try again with another '--vp 0001' option." + // << endl; else { // Update cache. Cache cleaning is kicked off at the beginning of this function. @@ -805,12 +857,8 @@ // a "hello, I'm starting" message, but then the others aren't interactive // and don't take an indefinite amount of time. PROBE1(stap, pass5__start, &s); - if (s.verbose) clog << "Pass 5: starting run." << endl; - int rc = 0; // XXX with multiple targets, need to deal with partial failure - for (unsigned i = 0; i < targets.size() && !pending_interrupts; ++i) - rc |= targets[i]->start(); - for (unsigned i = 0; i < targets.size(); ++i) - rc |= targets[i]->finish(); + if (s.verbose) clog << _("Pass 5: starting run.") << endl; + int rc = remote::run(targets); struct tms tms_after; times (& tms_after); unsigned _sc_clk_tck = sysconf (_SC_CLK_TCK); @@ -821,9 +869,10 @@ << endl; if (rc) - cerr << "Pass 5: run failed. " - << "Try again with another '--vp 00001' option." - << endl; + cerr << _("Pass 5: run failed. Try again with another '--vp 00001' option.") << endl; + //cerr << "Pass 5: run failed. " + // << "Try again with another '--vp 00001' option." + // << endl; else // Interrupting pass-5 to quit is normal, so we want an EXIT_SUCCESS below. pending_interrupts = 0; @@ -848,7 +897,7 @@ #ifdef HAVE_LIBSQLITE3 update_coverage_db(s); #else - cerr << "Coverage database not available without libsqlite3" << endl; + cerr << _("Coverage database not available without libsqlite3") << endl; #endif } @@ -858,12 +907,40 @@ PROBE1(stap, pass6__end, &s); } +static int +passes_0_4_again_with_server (systemtap_session &s) +{ + // Not a server and not already using a server. + assert (! s.client_options); + assert (s.specified_servers.empty ()); + + // Specify default server(s). + s.specified_servers.push_back (""); + + // Remove the previous temporary directory and start fresh. + remove_temp_dir (s); + + // Try to compile again, using the server + clog << _("Attempting compilation using a compile server") + << endl; + int rc = passes_0_4 (s); + return rc; +} + int main (int argc, char * const argv []) { // Initialize defaults. systemtap_session s; + setlocale (LC_ALL, ""); + bindtextdomain (PACKAGE, LOCALEDIR); + textdomain (PACKAGE); + + // Set up our handler to catch routine signals, to allow clean + // and reasonably timely exit. + setup_signals(&handle_interrupt); + // Process the command line. int rc = s.parse_cmdline (argc, argv); if (rc != 0) @@ -872,60 +949,69 @@ // Check for options conflicts. Exits if errors are detected. s.check_options (argc, argv); - // If requested, query server status. This is independent of other tasks. - query_server_status (s); - - // If requested, manage trust of servers. This is independent of other tasks. - manage_server_trust (s); + // arguments parsed; get down to business + if (s.verbose > 1) + s.version (); - // Run the passes only if a script has been specified. The requirement for - // a script has already been checked in systemtap_session::check_options. - if (s.have_script) - { - vector targets; - if (s.remote_uris.empty()) - { - remote* target = remote::create(s, "direct"); - if (target) - targets.push_back(target); - else - rc = 1; - } + // Some of the remote methods need to write temporary data, so go ahead + // and create the main tempdir now. + rc = create_temp_dir (s); + + // Prepare connections for each specified remote target. + vector targets; + if (s.remote_uris.empty()) + s.remote_uris.push_back("direct:"); + for (unsigned i = 0; rc == 0 && i < s.remote_uris.size(); ++i) + { + remote *target = remote::create(s, s.remote_uris[i]); + if (target) + targets.push_back(target); else - for (unsigned i = 0; i < s.remote_uris.size(); ++i) - { - remote *target = remote::create(s, s.remote_uris[i]); - if (target) - targets.push_back(target); - else - { - rc = 1; - break; - } - } - - // Run passes 0-4 for each unique session, - // either locally or using a compile-server. - if (rc == 0) - { - set sessions; - for (unsigned i = 0; i < targets.size(); ++i) - sessions.insert(targets[i]->get_session()); - for (set::iterator it = sessions.begin(); - it != sessions.end(); ++it) - if ((rc = passes_0_4 (**it))) - break; - } - - // Run pass 5, if requested - if (rc == 0 && s.last_pass >= 5 && ! pending_interrupts) - rc = pass_5 (s, targets); + rc = 1; + } - for (unsigned i = 0; i < targets.size(); ++i) - delete targets[i]; + // Discover and loop over each unique session created by the remote targets. + set sessions; + for (unsigned i = 0; i < targets.size(); ++i) + sessions.insert(targets[i]->get_session()); + for (set::iterator it = sessions.begin(); + rc == 0 && !pending_interrupts && it != sessions.end(); ++it) + { + systemtap_session& ss = **it; + if (ss.verbose > 1) + clog << _F("Session arch: %s release: %s", + ss.architecture.c_str(), ss.kernel_release.c_str()) << endl; + + // If requested, query server status. This is independent of other tasks. + query_server_status (ss); + + // If requested, manage trust of servers. This is independent of other tasks. + manage_server_trust (ss); + + // Run the passes only if a script has been specified. The requirement for + // a script has already been checked in systemtap_session::check_options. + if (ss.have_script) + { + // Run passes 0-4 for each unique session, + // either locally or using a compile-server. + ss.init_try_server (); + if ((rc = passes_0_4 (ss))) + { + // Compilation failed. + // Try again using a server if appropriate. + if (ss.try_server ()) + rc = passes_0_4_again_with_server (ss); + } + } } + // Run pass 5, if requested + if (rc == 0 && s.have_script && s.last_pass >= 5 && ! pending_interrupts) + rc = pass_5 (s, targets); + // Pass 6. Cleanup + for (unsigned i = 0; i < targets.size(); ++i) + delete targets[i]; cleanup (s, rc); return (rc||pending_interrupts) ? EXIT_FAILURE : EXIT_SUCCESS; diff -Nru systemtap-1.4/Makefile.am systemtap-1.6/Makefile.am --- systemtap-1.4/Makefile.am 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/Makefile.am 2011-07-25 18:12:01.000000000 +0000 @@ -9,8 +9,9 @@ AM_CPPFLAGS = -DBINDIR='"$(bindir)"' \ -DSYSCONFDIR='"$(sysconfdir)"' \ - -DPKGDATADIR='"${pkgdatadir}"' \ + -DPKGDATADIR='"$(pkgdatadir)"' \ -DPKGLIBDIR='"$(pkglibexecdir)"' \ + -DLOCALEDIR='"$(localedir)"' \ -I$(srcdir)/includes -I$(builddir)/includes/sys AM_CFLAGS = -D_GNU_SOURCE -fexceptions -Wall -Werror -Wunused -Wformat=2 -W @@ -34,17 +35,13 @@ pkglibexec_PROGRAMS = if HAVE_NSS -man_MANS += stap-authorize-signing-cert.8 -bin_SCRIPTS += stap-authorize-signing-cert -pkglibexec_PROGRAMS += stap-sign-module -pkglibexec_SCRIPTS += stap-gen-cert stap-authorize-cert +pkglibexec_PROGRAMS += stap-sign-module stap-authorize-cert if BUILD_SERVER -man_MANS += stap-client.8 stap-server.8 stap-authorize-server-cert.8 -pkglibexec_PROGRAMS += stap-client-connect stap-server-connect -bin_SCRIPTS += stap-client stap-server stap-authorize-server-cert -pkglibexec_SCRIPTS += stap-serverd stap-find-servers \ - stap-start-server stap-find-or-start-server stap-stop-server +man_MANS += stap-server.8 +pkglibexec_PROGRAMS += stap-serverd stap-gen-cert +bin_SCRIPTS += stap-server +pkglibexec_SCRIPTS += stap-start-server stap-stop-server endif endif @@ -55,9 +52,9 @@ tapset-been.cxx tapset-procfs.cxx tapset-timers.cxx \ tapset-perfmon.cxx tapset-mark.cxx tapset-itrace.cxx \ tapset-utrace.cxx task_finder.cxx dwflpp.cxx rpm_finder.cxx \ - setupdwfl.cxx csclient.cxx remote.cxx + setupdwfl.cxx csclient.cxx cscommon.cxx remote.cxx noinst_HEADERS = sdt_types.h -stap_LDADD = @stap_LIBS@ @sqlite3_LIBS@ +stap_LDADD = @stap_LIBS@ @sqlite3_LIBS@ @LIBINTL@ stap_DEPENDENCIES = endif @@ -114,16 +111,14 @@ endif if HAVE_NSS -stap_SOURCES += stap-client-connect.c nsscommon.c +stap_SOURCES += nsscommon.cxx stap_CFLAGS += $(nss_CFLAGS) $(nspr_CFLAGS) -DSTAP stap_CXXFLAGS += $(nss_CFLAGS) $(nspr_CFLAGS) stap_CPPFLAGS += $(nss_CFLAGS) $(nspr_CFLAGS) -stap_LDADD += -lssl3 -lnss3 -lnspr4 -lplc4 -stap_client_connect_LDFLAGS = $(AM_LDFLAGS) -stap_server_connect_LDFLAGS = $(AM_LDFLAGS) +stap_LDADD += -lssl3 -lnss3 -lnspr4 -lplc4 -lsmime3 stap_sign_module_LDFLAGS = $(AM_LDFLAGS) +stap_authorize_cert_LDFLAGS = $(AM_LDFLAGS) -if BUILD_SERVER install-exec-local: install-scripts PHONIES += install-scripts @@ -133,10 +128,9 @@ sed -i -e "s,\$${PKGLIBEXECDIR},$(pkglibexecdir)/," $(DESTDIR)$(bindir)/$$f; \ done for f in $(pkglibexec_SCRIPTS); do \ - sed -i -e "/INSTALL-HOOK/d;s,exec_prefix=.*,exec_prefix=$(exec_prefix)/bin/,;s,sysconfdir=.*,sysconfdir=$(sysconfdir),;s,pkglibexecdir=.*,pkglibexecdir=$(pkglibexecdir)/,;s,localstatedir=.*,localstatedir=$(localstatedir),;s,\$${PKGLIBEXECDIR},$(pkglibexecdir)/," $(DESTDIR)$(pkglibexecdir)/$$f; \ + sed -i -e "/INSTALL-HOOK/d;s,sysconfdir=.*,sysconfdir=$(sysconfdir),;s,pkglibexecdir=.*,pkglibexecdir=$(pkglibexecdir)/,;s,localstatedir=.*,localstatedir=$(localstatedir),;s,\$${PKGLIBEXECDIR},$(pkglibexecdir)/," $(DESTDIR)$(pkglibexecdir)/$$f; \ done endif -endif if BUILD_ELFUTILS stap_CPPFLAGS += -Iinclude-elfutils @@ -151,6 +145,7 @@ for dir in libelf libebl libdw libdwfl backends; do \ $(MAKE) $(AM_MAKEFLAGS) -j1 -C build-elfutils/$$dir bin_PROGRAMS= install; \ done + $(MAKE) $(AM_MAKEFLAGS) -j1 -C build-elfutils install-pkgincludeHEADERS; touch $@ stap_DEPENDENCIES += lib-elfutils/libdw.so lib-elfutils/libdw.so: stamp-elfutils ; @@ -169,18 +164,31 @@ if BUILD_TRANSLATOR if HAVE_NSS -stap_sign_module_SOURCES = modsign.cxx nsscommon.c -stap_sign_module_CPPFLAGS = -Wall -Werror $(AM_CPPFLAGS) $(nss_CFLAGS) $(nspr_CFLAGS) -stap_sign_module_LDADD = -lnss3 -lnspr4 +stap_sign_module_SOURCES = stap-sign-module.cxx nsscommon.cxx util.cxx +stap_sign_module_CPPFLAGS = $(AM_CPPFLAGS) +stap_sign_module_CXXFLAGS = $(AM_CXXFLAGS) @PIECXXFLAGS@ $(nss_CFLAGS) $(nspr_CFLAGS) +stap_sign_module_CFLAGS = $(AM_CFLAGS) @PIECFLAGS@ $(nss_CFLAGS) $(nspr_CFLAGS) +stap_sign_module_LDADD = -lssl3 -lnss3 -lnspr4 -lsmime3 + +stap_authorize_cert_SOURCES = stap-authorize-cert.cxx nsscommon.cxx util.cxx +stap_authorize_cert_CPPFLAGS = $(AM_CPPFLAGS) +stap_authorize_cert_CXXFLAGS = $(AM_CXXFLAGS) @PIECXXFLAGS@ $(nss_CFLAGS) $(nspr_CFLAGS) +stap_authorize_cert_CFLAGS = $(AM_CFLAGS) @PIECFLAGS@ $(nss_CFLAGS) $(nspr_CFLAGS) +stap_authorize_cert_LDADD = -lssl3 -lnss3 -lnspr4 -lsmime3 if BUILD_SERVER -stap_client_connect_SOURCES = stap-client-connect.c nsscommon.c -stap_client_connect_CFLAGS = -Wall -Werror $(nss_CFLAGS) $(nspr_CFLAGS) -stap_client_connect_LDADD = -lssl3 -lnss3 -lnspr4 -lplc4 - -stap_server_connect_SOURCES = stap-server-connect.c nsscommon.c -stap_server_connect_CFLAGS = -Wall -Werror $(nss_CFLAGS) $(nspr_CFLAGS) -stap_server_connect_LDADD = -lssl3 -lnss3 -lnspr4 -lplc4 +stap_serverd_SOURCES = stap-serverd.cxx cscommon.cxx util.cxx nsscommon.cxx +stap_serverd_CXXFLAGS = $(AM_CXXFLAGS) @PIECXXFLAGS@ $(nss_CFLAGS) $(nspr_CFLAGS) +stap_serverd_CFLAGS = $(AM_CFLAGS) @PIECFLAGS@ $(nss_CFLAGS) $(nspr_CFLAGS) +stap_serverd_LDADD = -lssl3 -lnss3 -lnspr4 -lplc4 -lsmime3 -lpthread +if HAVE_AVAHI +stap_serverd_LDADD += -lavahi-client -lavahi-common +endif + +stap_gen_cert_SOURCES = stap-gen-cert.cxx util.cxx nsscommon.cxx +stap_gen_cert_CXXFLAGS = $(AM_CXXFLAGS) @PIECXXFLAGS@ $(nss_CFLAGS) $(nspr_CFLAGS) +stap_gen_cert_CFLAGS = $(AM_CFLAGS) @PIECFLAGS@ $(nss_CFLAGS) $(nspr_CFLAGS) +stap_gen_cert_LDADD = -lssl3 -lnss3 -lnspr4 -lsmime3 endif endif @@ -295,9 +303,9 @@ endif (cd $(srcdir)/man; for f in *.3*; do rm -rf "$(DESTDIR)$(man3dir)/$$f"; done) -SUBDIRS = . runtime/staprun grapher doc +SUBDIRS = . runtime/staprun grapher doc po DIST_SUBDIRS = testsuite $(SUBDIRS) -EXTRA_DIST = man/tapset*.3stap +EXTRA_DIST = m4/ChangeLog man/tapset*.3stap check-local: SRCDIR=`cd $(srcdir); pwd`; \ @@ -331,6 +339,17 @@ chmod 555 $@.new mv -f $@.new $@ +PHONIES += update-po +update-po: + (cd $(srcdir); ls -1d *.c *.cxx *.h runtime/staprun/*.c runtime/staprun/*.h dtrace.in) \ + | grep -v loc2c-test.c \ + | grep -v config.h \ + | grep -v git_version.h \ + | grep -v runtime/staprun/config.h \ + | sort > $(srcdir)/po/POTFILES.in + $(MAKE) -C po update-po + + # Any extra flags, such as: # --define "with_docs 0" # --define "with_bundled_elfutils 1" --define "elfutils_version 0.135" @@ -357,3 +376,5 @@ mkdir -p `rpm --eval %_builddir` mkdir -p `rpm --eval %_buildroot` rpmbuild --define "_sourcedir $(PWD)/" -ta systemtap-$(VERSION).tar.gz $(RPMBUILDFLAGS) + +ACLOCAL_AMFLAGS = -I m4 diff -Nru systemtap-1.4/Makefile.in systemtap-1.6/Makefile.in --- systemtap-1.4/Makefile.in 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/Makefile.in 2011-07-25 18:12:01.000000000 +0000 @@ -35,52 +35,53 @@ NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ bin_PROGRAMS = $(am__EXEEXT_1) @BUILD_TRANSLATOR_TRUE@am__append_1 = stap @BUILD_TRANSLATOR_TRUE@am__append_2 = stap.1 @BUILD_TRANSLATOR_TRUE@am__append_3 = dtrace @BUILD_TRANSLATOR_TRUE@pkglibexec_PROGRAMS = $(am__EXEEXT_2) \ @BUILD_TRANSLATOR_TRUE@ $(am__EXEEXT_3) -@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am__append_4 = stap-authorize-signing-cert.8 -@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am__append_5 = stap-authorize-signing-cert -@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am__append_6 = stap-sign-module -@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am__append_7 = stap-gen-cert stap-authorize-cert -@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am__append_8 = stap-client.8 stap-server.8 stap-authorize-server-cert.8 -@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am__append_9 = stap-client-connect stap-server-connect -@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am__append_10 = stap-client stap-server stap-authorize-server-cert -@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am__append_11 = stap-serverd stap-find-servers \ -@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ stap-start-server stap-find-or-start-server stap-stop-server - -@BUILD_TRANSLATOR_TRUE@@HAVE_AVAHI_TRUE@am__append_12 = $(avahi_CFLAGS) -@BUILD_TRANSLATOR_TRUE@@HAVE_AVAHI_TRUE@am__append_13 = $(avahi_CFLAGS) -@BUILD_TRANSLATOR_TRUE@@HAVE_AVAHI_TRUE@am__append_14 = -lavahi-client -lavahi-common -@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am__append_15 = stap-client-connect.c nsscommon.c -@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am__append_16 = $(nss_CFLAGS) $(nspr_CFLAGS) -DSTAP -@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am__append_17 = $(nss_CFLAGS) $(nspr_CFLAGS) -@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am__append_18 = $(nss_CFLAGS) $(nspr_CFLAGS) -@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am__append_19 = -lssl3 -lnss3 -lnspr4 -lplc4 -@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am__append_20 = install-scripts -@BUILD_ELFUTILS_TRUE@@BUILD_TRANSLATOR_TRUE@am__append_21 = -Iinclude-elfutils -@BUILD_ELFUTILS_TRUE@@BUILD_TRANSLATOR_TRUE@am__append_22 = -Llib-elfutils -Wl,-rpath-link,lib-elfutils \ +@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am__append_4 = stap-sign-module stap-authorize-cert +@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am__append_5 = stap-server.8 +@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am__append_6 = stap-serverd stap-gen-cert +@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am__append_7 = stap-server +@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am__append_8 = stap-start-server stap-stop-server +@BUILD_TRANSLATOR_TRUE@@HAVE_AVAHI_TRUE@am__append_9 = $(avahi_CFLAGS) +@BUILD_TRANSLATOR_TRUE@@HAVE_AVAHI_TRUE@am__append_10 = $(avahi_CFLAGS) +@BUILD_TRANSLATOR_TRUE@@HAVE_AVAHI_TRUE@am__append_11 = -lavahi-client -lavahi-common +@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am__append_12 = nsscommon.cxx +@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am__append_13 = $(nss_CFLAGS) $(nspr_CFLAGS) -DSTAP +@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am__append_14 = $(nss_CFLAGS) $(nspr_CFLAGS) +@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am__append_15 = $(nss_CFLAGS) $(nspr_CFLAGS) +@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am__append_16 = -lssl3 -lnss3 -lnspr4 -lplc4 -lsmime3 +@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am__append_17 = install-scripts +@BUILD_ELFUTILS_TRUE@@BUILD_TRANSLATOR_TRUE@am__append_18 = -Iinclude-elfutils +@BUILD_ELFUTILS_TRUE@@BUILD_TRANSLATOR_TRUE@am__append_19 = -Llib-elfutils -Wl,-rpath-link,lib-elfutils \ @BUILD_ELFUTILS_TRUE@@BUILD_TRANSLATOR_TRUE@ -Wl,--enable-new-dtags,-rpath,$(pkglibdir) -@BUILD_ELFUTILS_TRUE@@BUILD_TRANSLATOR_TRUE@am__append_23 = stamp-elfutils -@BUILD_ELFUTILS_TRUE@@BUILD_TRANSLATOR_TRUE@am__append_24 = stamp-elfutils -@BUILD_ELFUTILS_TRUE@@BUILD_TRANSLATOR_TRUE@am__append_25 = lib-elfutils/libdw.so -@BUILD_ELFUTILS_TRUE@@BUILD_TRANSLATOR_TRUE@am__append_26 = install-elfutils +@BUILD_ELFUTILS_TRUE@@BUILD_TRANSLATOR_TRUE@am__append_20 = stamp-elfutils +@BUILD_ELFUTILS_TRUE@@BUILD_TRANSLATOR_TRUE@am__append_21 = stamp-elfutils +@BUILD_ELFUTILS_TRUE@@BUILD_TRANSLATOR_TRUE@am__append_22 = lib-elfutils/libdw.so +@BUILD_ELFUTILS_TRUE@@BUILD_TRANSLATOR_TRUE@am__append_23 = install-elfutils +@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_AVAHI_TRUE@@HAVE_NSS_TRUE@am__append_24 = -lavahi-client -lavahi-common @BUILD_TRANSLATOR_TRUE@noinst_PROGRAMS = loc2c-test$(EXEEXT) subdir = . DIST_COMMON = INSTALL NEWS README AUTHORS $(srcdir)/Makefile.in \ $(srcdir)/Makefile.am $(top_srcdir)/configure \ $(am__configure_deps) $(srcdir)/config.in \ $(top_srcdir)/includes/sys/sdt-config.h.in \ - $(srcdir)/stappaths.7.in $(srcdir)/stap-server.8.in \ - $(top_srcdir)/initscript/systemtap.in \ + $(srcdir)/stappaths.7.in $(top_srcdir)/initscript/systemtap.in \ $(top_srcdir)/initscript/stap-server.in $(srcdir)/run-stap.in \ - $(srcdir)/dtrace.in depcomp $(am__noinst_HEADERS_DIST) \ - $(oldinclude_HEADERS) + $(srcdir)/dtrace.in ABOUT-NLS depcomp \ + $(am__noinst_HEADERS_DIST) $(oldinclude_HEADERS) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ @@ -88,8 +89,7 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = includes/sys/sdt-config.h stappaths.7 \ - stap-server.8 initscript/systemtap initscript/stap-server \ - run-stap dtrace + initscript/systemtap initscript/stap-server run-stap dtrace CONFIG_CLEAN_VPATH_FILES = @BUILD_TRANSLATOR_TRUE@am__EXEEXT_1 = stap$(EXEEXT) am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkglibexecdir)" \ @@ -97,9 +97,10 @@ "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man3dir)" \ "$(DESTDIR)$(man7dir)" "$(DESTDIR)$(man8dir)" \ "$(DESTDIR)$(oldincludedir)" -@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am__EXEEXT_2 = stap-sign-module$(EXEEXT) -@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am__EXEEXT_3 = stap-client-connect$(EXEEXT) \ -@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ stap-server-connect$(EXEEXT) +@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am__EXEEXT_2 = stap-sign-module$(EXEEXT) \ +@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ stap-authorize-cert$(EXEEXT) +@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am__EXEEXT_3 = stap-serverd$(EXEEXT) \ +@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ stap-gen-cert$(EXEEXT) PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) $(pkglibexec_PROGRAMS) @BUILD_TRANSLATOR_TRUE@am_loc2c_test_OBJECTS = \ @BUILD_TRANSLATOR_TRUE@ loc2c_test-loc2c-test.$(OBJEXT) \ @@ -112,8 +113,7 @@ @BUILD_TRANSLATOR_TRUE@ $(am__DEPENDENCIES_2) loc2c_test_LINK = $(CCLD) $(loc2c_test_CFLAGS) $(CFLAGS) \ $(loc2c_test_LDFLAGS) $(LDFLAGS) -o $@ -@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am__objects_1 = stap-stap-client-connect.$(OBJEXT) \ -@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ stap-nsscommon.$(OBJEXT) +@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am__objects_1 = stap-nsscommon.$(OBJEXT) @BUILD_TRANSLATOR_TRUE@am_stap_OBJECTS = stap-main.$(OBJEXT) \ @BUILD_TRANSLATOR_TRUE@ stap-session.$(OBJEXT) \ @BUILD_TRANSLATOR_TRUE@ stap-parse.$(OBJEXT) \ @@ -141,28 +141,40 @@ @BUILD_TRANSLATOR_TRUE@ stap-rpm_finder.$(OBJEXT) \ @BUILD_TRANSLATOR_TRUE@ stap-setupdwfl.$(OBJEXT) \ @BUILD_TRANSLATOR_TRUE@ stap-csclient.$(OBJEXT) \ +@BUILD_TRANSLATOR_TRUE@ stap-cscommon.$(OBJEXT) \ @BUILD_TRANSLATOR_TRUE@ stap-remote.$(OBJEXT) $(am__objects_1) stap_OBJECTS = $(am_stap_OBJECTS) stap_LINK = $(CXXLD) $(stap_CXXFLAGS) $(CXXFLAGS) $(stap_LDFLAGS) \ $(LDFLAGS) -o $@ -@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am_stap_client_connect_OBJECTS = stap_client_connect-stap-client-connect.$(OBJEXT) \ -@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ stap_client_connect-nsscommon.$(OBJEXT) -stap_client_connect_OBJECTS = $(am_stap_client_connect_OBJECTS) -stap_client_connect_DEPENDENCIES = -stap_client_connect_LINK = $(CCLD) $(stap_client_connect_CFLAGS) \ - $(CFLAGS) $(stap_client_connect_LDFLAGS) $(LDFLAGS) -o $@ -@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am_stap_server_connect_OBJECTS = stap_server_connect-stap-server-connect.$(OBJEXT) \ -@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ stap_server_connect-nsscommon.$(OBJEXT) -stap_server_connect_OBJECTS = $(am_stap_server_connect_OBJECTS) -stap_server_connect_DEPENDENCIES = -stap_server_connect_LINK = $(CCLD) $(stap_server_connect_CFLAGS) \ - $(CFLAGS) $(stap_server_connect_LDFLAGS) $(LDFLAGS) -o $@ -@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am_stap_sign_module_OBJECTS = stap_sign_module-modsign.$(OBJEXT) \ -@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ stap_sign_module-nsscommon.$(OBJEXT) +@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am_stap_authorize_cert_OBJECTS = stap_authorize_cert-stap-authorize-cert.$(OBJEXT) \ +@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ stap_authorize_cert-nsscommon.$(OBJEXT) \ +@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ stap_authorize_cert-util.$(OBJEXT) +stap_authorize_cert_OBJECTS = $(am_stap_authorize_cert_OBJECTS) +stap_authorize_cert_DEPENDENCIES = +stap_authorize_cert_LINK = $(CXXLD) $(stap_authorize_cert_CXXFLAGS) \ + $(CXXFLAGS) $(stap_authorize_cert_LDFLAGS) $(LDFLAGS) -o $@ +@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am_stap_gen_cert_OBJECTS = stap_gen_cert-stap-gen-cert.$(OBJEXT) \ +@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ stap_gen_cert-util.$(OBJEXT) \ +@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ stap_gen_cert-nsscommon.$(OBJEXT) +stap_gen_cert_OBJECTS = $(am_stap_gen_cert_OBJECTS) +stap_gen_cert_DEPENDENCIES = +stap_gen_cert_LINK = $(CXXLD) $(stap_gen_cert_CXXFLAGS) $(CXXFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am_stap_serverd_OBJECTS = stap_serverd-stap-serverd.$(OBJEXT) \ +@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ stap_serverd-cscommon.$(OBJEXT) \ +@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ stap_serverd-util.$(OBJEXT) \ +@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ stap_serverd-nsscommon.$(OBJEXT) +stap_serverd_OBJECTS = $(am_stap_serverd_OBJECTS) +@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_serverd_DEPENDENCIES = $(am__DEPENDENCIES_1) +stap_serverd_LINK = $(CXXLD) $(stap_serverd_CXXFLAGS) $(CXXFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am_stap_sign_module_OBJECTS = stap_sign_module-stap-sign-module.$(OBJEXT) \ +@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ stap_sign_module-nsscommon.$(OBJEXT) \ +@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ stap_sign_module-util.$(OBJEXT) stap_sign_module_OBJECTS = $(am_stap_sign_module_OBJECTS) stap_sign_module_DEPENDENCIES = -stap_sign_module_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ - $(stap_sign_module_LDFLAGS) $(LDFLAGS) -o $@ +stap_sign_module_LINK = $(CXXLD) $(stap_sign_module_CXXFLAGS) \ + $(CXXFLAGS) $(stap_sign_module_LDFLAGS) $(LDFLAGS) -o $@ am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -220,8 +232,8 @@ am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(loc2c_test_SOURCES) $(stap_SOURCES) \ - $(stap_client_connect_SOURCES) $(stap_server_connect_SOURCES) \ - $(stap_sign_module_SOURCES) + $(stap_authorize_cert_SOURCES) $(stap_gen_cert_SOURCES) \ + $(stap_serverd_SOURCES) $(stap_sign_module_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ @@ -268,21 +280,34 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_NLS = @ENABLE_NLS@ EXEEXT = @EXEEXT@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ LDFLAGS = @LDFLAGS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ +LOCALEDIR = @LOCALEDIR@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -298,13 +323,19 @@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +POSUB = @POSUB@ PUBLICAN_BRAND = @PUBLICAN_BRAND@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +STAP_PREFIX = @STAP_PREFIX@ STRIP = @STRIP@ U = @U@ +USE_NLS = @USE_NLS@ VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -317,7 +348,11 @@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ +build = @build@ build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ @@ -327,14 +362,17 @@ exec_prefix = @exec_prefix@ gtkmm_CFLAGS = @gtkmm_CFLAGS@ gtkmm_LIBS = @gtkmm_LIBS@ -have_certutil = @have_certutil@ have_dvips = @have_dvips@ have_latex = @have_latex@ have_latex2html = @have_latex2html@ have_ps2pdf = @have_ps2pdf@ have_publican = @have_publican@ have_xmlto = @have_xmlto@ +host = @host@ host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ @@ -372,18 +410,18 @@ AUTOMAKE_OPTIONS = no-dist foreign AM_CPPFLAGS = -DBINDIR='"$(bindir)"' \ -DSYSCONFDIR='"$(sysconfdir)"' \ - -DPKGDATADIR='"${pkgdatadir}"' \ + -DPKGDATADIR='"$(pkgdatadir)"' \ -DPKGLIBDIR='"$(pkglibexecdir)"' \ + -DLOCALEDIR='"$(localedir)"' \ -I$(srcdir)/includes -I$(builddir)/includes/sys AM_CFLAGS = -D_GNU_SOURCE -fexceptions -Wall -Werror -Wunused -Wformat=2 -W AM_CXXFLAGS = -Wall -Werror man_MANS = stapprobes.3stap stapfuncs.3stap stapvars.3stap \ stapex.3stap dtrace.1 stap-merge.1 stappaths.7 $(am__append_2) \ - $(am__append_4) $(am__append_8) -bin_SCRIPTS = stap-report $(am__append_3) $(am__append_5) \ - $(am__append_10) -pkglibexec_SCRIPTS = stap-env $(am__append_7) $(am__append_11) + $(am__append_5) +bin_SCRIPTS = stap-report $(am__append_3) $(am__append_7) +pkglibexec_SCRIPTS = stap-env $(am__append_8) oldinclude_HEADERS = includes/sys/sdt.h includes/sys/sdt-config.h @BUILD_TRANSLATOR_TRUE@stap_SOURCES = main.cxx session.cxx parse.cxx \ @BUILD_TRANSLATOR_TRUE@ staptree.cxx elaborate.cxx \ @@ -396,12 +434,13 @@ @BUILD_TRANSLATOR_TRUE@ tapset-itrace.cxx tapset-utrace.cxx \ @BUILD_TRANSLATOR_TRUE@ task_finder.cxx dwflpp.cxx \ @BUILD_TRANSLATOR_TRUE@ rpm_finder.cxx setupdwfl.cxx \ -@BUILD_TRANSLATOR_TRUE@ csclient.cxx remote.cxx \ -@BUILD_TRANSLATOR_TRUE@ $(am__append_15) +@BUILD_TRANSLATOR_TRUE@ csclient.cxx cscommon.cxx remote.cxx \ +@BUILD_TRANSLATOR_TRUE@ $(am__append_12) @BUILD_TRANSLATOR_TRUE@noinst_HEADERS = sdt_types.h @BUILD_TRANSLATOR_TRUE@stap_LDADD = @stap_LIBS@ @sqlite3_LIBS@ \ -@BUILD_TRANSLATOR_TRUE@ $(am__append_14) $(am__append_19) -@BUILD_TRANSLATOR_TRUE@stap_DEPENDENCIES = $(am__append_25) +@BUILD_TRANSLATOR_TRUE@ @LIBINTL@ $(am__append_11) \ +@BUILD_TRANSLATOR_TRUE@ $(am__append_16) +@BUILD_TRANSLATOR_TRUE@stap_DEPENDENCIES = $(am__append_22) # Arrange for git_version.h to be regenerated at every "make". # Code fragment is based upon RadeonHD.am. @@ -411,32 +450,46 @@ # of foo-bar.c if it is newer than the foo-bar.o file. Using noinst_foo_SOURCES # instead of foo_SOURCES prevents shipping git_version.h in dist tarballs, # which may cause false GIT_FOO readings. -BUILT_SOURCES = git_version.stamp $(am__append_23) -CLEANFILES = git_version.h $(am__append_24) $(pkglibexec_PROGRAMS) +BUILT_SOURCES = git_version.stamp $(am__append_20) +CLEANFILES = git_version.h $(am__append_21) $(pkglibexec_PROGRAMS) GIT_VERSION_CMD = $(SHELL) $(top_srcdir)/git_version.sh -PHONIES = $(am__append_20) $(am__append_26) runcheck dist-gzip uprobes \ - install-uprobes +PHONIES = $(am__append_17) $(am__append_23) runcheck update-po \ + dist-gzip uprobes install-uprobes @BUILD_TRANSLATOR_TRUE@stap_CFLAGS = $(AM_CFLAGS) @PIECFLAGS@ \ -@BUILD_TRANSLATOR_TRUE@ -D_FILE_OFFSET_BITS=64 $(am__append_16) +@BUILD_TRANSLATOR_TRUE@ -D_FILE_OFFSET_BITS=64 $(am__append_13) @BUILD_TRANSLATOR_TRUE@stap_CXXFLAGS = $(AM_CXXFLAGS) @PIECXXFLAGS@ \ -@BUILD_TRANSLATOR_TRUE@ $(am__append_12) $(am__append_17) +@BUILD_TRANSLATOR_TRUE@ $(am__append_9) $(am__append_14) @BUILD_TRANSLATOR_TRUE@stap_CPPFLAGS = $(AM_CPPFLAGS) -DSTAP_SDT_V2 \ -@BUILD_TRANSLATOR_TRUE@ $(am__append_13) $(am__append_18) \ -@BUILD_TRANSLATOR_TRUE@ $(am__append_21) +@BUILD_TRANSLATOR_TRUE@ $(am__append_10) $(am__append_15) \ +@BUILD_TRANSLATOR_TRUE@ $(am__append_18) @BUILD_TRANSLATOR_TRUE@stap_LDFLAGS = $(AM_LDFLAGS) @PIELDFLAGS@ \ -@BUILD_TRANSLATOR_TRUE@ $(am__append_22) -@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_client_connect_LDFLAGS = $(AM_LDFLAGS) -@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_server_connect_LDFLAGS = $(AM_LDFLAGS) +@BUILD_TRANSLATOR_TRUE@ $(am__append_19) @BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_sign_module_LDFLAGS = $(AM_LDFLAGS) -@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_sign_module_SOURCES = modsign.cxx nsscommon.c -@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_sign_module_CPPFLAGS = -Wall -Werror $(AM_CPPFLAGS) $(nss_CFLAGS) $(nspr_CFLAGS) -@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_sign_module_LDADD = -lnss3 -lnspr4 -@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_client_connect_SOURCES = stap-client-connect.c nsscommon.c -@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_client_connect_CFLAGS = -Wall -Werror $(nss_CFLAGS) $(nspr_CFLAGS) -@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_client_connect_LDADD = -lssl3 -lnss3 -lnspr4 -lplc4 -@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_server_connect_SOURCES = stap-server-connect.c nsscommon.c -@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_server_connect_CFLAGS = -Wall -Werror $(nss_CFLAGS) $(nspr_CFLAGS) -@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_server_connect_LDADD = -lssl3 -lnss3 -lnspr4 -lplc4 +@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_authorize_cert_LDFLAGS = $(AM_LDFLAGS) +@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_sign_module_SOURCES = stap-sign-module.cxx nsscommon.cxx util.cxx +@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_sign_module_CPPFLAGS = $(AM_CPPFLAGS) +@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_sign_module_CXXFLAGS = $(AM_CXXFLAGS) @PIECXXFLAGS@ $(nss_CFLAGS) $(nspr_CFLAGS) +@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_sign_module_CFLAGS = $(AM_CFLAGS) @PIECFLAGS@ $(nss_CFLAGS) $(nspr_CFLAGS) +@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_sign_module_LDADD = -lssl3 -lnss3 -lnspr4 -lsmime3 +@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_authorize_cert_SOURCES = stap-authorize-cert.cxx nsscommon.cxx util.cxx +@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_authorize_cert_CPPFLAGS = $(AM_CPPFLAGS) +@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_authorize_cert_CXXFLAGS = $(AM_CXXFLAGS) @PIECXXFLAGS@ $(nss_CFLAGS) $(nspr_CFLAGS) +@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_authorize_cert_CFLAGS = $(AM_CFLAGS) @PIECFLAGS@ $(nss_CFLAGS) $(nspr_CFLAGS) +@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_authorize_cert_LDADD = -lssl3 -lnss3 -lnspr4 -lsmime3 +@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_serverd_SOURCES = stap-serverd.cxx cscommon.cxx util.cxx nsscommon.cxx +@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_serverd_CXXFLAGS = $(AM_CXXFLAGS) @PIECXXFLAGS@ $(nss_CFLAGS) $(nspr_CFLAGS) +@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_serverd_CFLAGS = $(AM_CFLAGS) @PIECFLAGS@ $(nss_CFLAGS) $(nspr_CFLAGS) +@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_serverd_LDADD = -lssl3 \ +@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ -lnss3 \ +@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ -lnspr4 \ +@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ -lplc4 \ +@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ -lsmime3 \ +@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ -lpthread \ +@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ $(am__append_24) +@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_gen_cert_SOURCES = stap-gen-cert.cxx util.cxx nsscommon.cxx +@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_gen_cert_CXXFLAGS = $(AM_CXXFLAGS) @PIECXXFLAGS@ $(nss_CFLAGS) $(nspr_CFLAGS) +@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_gen_cert_CFLAGS = $(AM_CFLAGS) @PIECFLAGS@ $(nss_CFLAGS) $(nspr_CFLAGS) +@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@stap_gen_cert_LDADD = -lssl3 -lnss3 -lnspr4 -lsmime3 @BUILD_TRANSLATOR_TRUE@loc2c_test_SOURCES = loc2c-test.c loc2c.c @BUILD_TRANSLATOR_TRUE@loc2c_test_CFLAGS = $(stap_CFLAGS) @BUILD_TRANSLATOR_TRUE@loc2c_test_CPPFLAGS = $(stap_CPPFLAGS) @@ -451,14 +504,15 @@ EXAMPLE_SOURCE_DIR = $(srcdir)/testsuite/systemtap.examples EXAMPLE_META_FILES = $(EXAMPLE_SOURCE_DIR)/*/*.meta TEST_COV_DIR = coverage -SUBDIRS = . runtime/staprun grapher doc +SUBDIRS = . runtime/staprun grapher doc po DIST_SUBDIRS = testsuite $(SUBDIRS) -EXTRA_DIST = man/tapset*.3stap +EXTRA_DIST = m4/ChangeLog man/tapset*.3stap # Any extra flags, such as: # --define "with_docs 0" # --define "with_bundled_elfutils 1" --define "elfutils_version 0.135" RPMBUILDFLAGS = +ACLOCAL_AMFLAGS = -I m4 all: $(BUILT_SOURCES) config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive @@ -519,8 +573,6 @@ cd $(top_builddir) && $(SHELL) ./config.status $@ stappaths.7: $(top_builddir)/config.status $(srcdir)/stappaths.7.in cd $(top_builddir) && $(SHELL) ./config.status $@ -stap-server.8: $(top_builddir)/config.status $(srcdir)/stap-server.8.in - cd $(top_builddir) && $(SHELL) ./config.status $@ initscript/systemtap: $(top_builddir)/config.status $(top_srcdir)/initscript/systemtap.in cd $(top_builddir) && $(SHELL) ./config.status $@ initscript/stap-server: $(top_builddir)/config.status $(top_srcdir)/initscript/stap-server.in @@ -612,12 +664,15 @@ stap$(EXEEXT): $(stap_OBJECTS) $(stap_DEPENDENCIES) @rm -f stap$(EXEEXT) $(AM_V_CXXLD)$(stap_LINK) $(stap_OBJECTS) $(stap_LDADD) $(LIBS) -stap-client-connect$(EXEEXT): $(stap_client_connect_OBJECTS) $(stap_client_connect_DEPENDENCIES) - @rm -f stap-client-connect$(EXEEXT) - $(AM_V_CCLD)$(stap_client_connect_LINK) $(stap_client_connect_OBJECTS) $(stap_client_connect_LDADD) $(LIBS) -stap-server-connect$(EXEEXT): $(stap_server_connect_OBJECTS) $(stap_server_connect_DEPENDENCIES) - @rm -f stap-server-connect$(EXEEXT) - $(AM_V_CCLD)$(stap_server_connect_LINK) $(stap_server_connect_OBJECTS) $(stap_server_connect_LDADD) $(LIBS) +stap-authorize-cert$(EXEEXT): $(stap_authorize_cert_OBJECTS) $(stap_authorize_cert_DEPENDENCIES) + @rm -f stap-authorize-cert$(EXEEXT) + $(AM_V_CXXLD)$(stap_authorize_cert_LINK) $(stap_authorize_cert_OBJECTS) $(stap_authorize_cert_LDADD) $(LIBS) +stap-gen-cert$(EXEEXT): $(stap_gen_cert_OBJECTS) $(stap_gen_cert_DEPENDENCIES) + @rm -f stap-gen-cert$(EXEEXT) + $(AM_V_CXXLD)$(stap_gen_cert_LINK) $(stap_gen_cert_OBJECTS) $(stap_gen_cert_LDADD) $(LIBS) +stap-serverd$(EXEEXT): $(stap_serverd_OBJECTS) $(stap_serverd_DEPENDENCIES) + @rm -f stap-serverd$(EXEEXT) + $(AM_V_CXXLD)$(stap_serverd_LINK) $(stap_serverd_OBJECTS) $(stap_serverd_LDADD) $(LIBS) stap-sign-module$(EXEEXT): $(stap_sign_module_OBJECTS) $(stap_sign_module_DEPENDENCIES) @rm -f stap-sign-module$(EXEEXT) $(AM_V_CXXLD)$(stap_sign_module_LINK) $(stap_sign_module_OBJECTS) $(stap_sign_module_LDADD) $(LIBS) @@ -702,6 +757,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-cache.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-coveragedb.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-csclient.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-cscommon.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-dwarf_wrappers.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-dwflpp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-elaborate.Po@am__quote@ @@ -715,7 +771,6 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-rpm_finder.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-session.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-setupdwfl.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-stap-client-connect.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-staptree.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-tapset-been.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-tapset-itrace.Po@am__quote@ @@ -728,12 +783,19 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-task_finder.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-translate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-util.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap_client_connect-nsscommon.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap_client_connect-stap-client-connect.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap_server_connect-nsscommon.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap_server_connect-stap-server-connect.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap_sign_module-modsign.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap_authorize_cert-nsscommon.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap_authorize_cert-stap-authorize-cert.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap_authorize_cert-util.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap_gen_cert-nsscommon.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap_gen_cert-stap-gen-cert.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap_gen_cert-util.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap_serverd-cscommon.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap_serverd-nsscommon.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap_serverd-stap-serverd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap_serverd-util.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap_sign_module-nsscommon.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap_sign_module-stap-sign-module.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap_sign_module-util.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -815,118 +877,6 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CFLAGS) $(CFLAGS) -c -o stap-mdfour.obj `if test -f 'mdfour.c'; then $(CYGPATH_W) 'mdfour.c'; else $(CYGPATH_W) '$(srcdir)/mdfour.c'; fi` -stap-stap-client-connect.o: stap-client-connect.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CFLAGS) $(CFLAGS) -MT stap-stap-client-connect.o -MD -MP -MF $(DEPDIR)/stap-stap-client-connect.Tpo -c -o stap-stap-client-connect.o `test -f 'stap-client-connect.c' || echo '$(srcdir)/'`stap-client-connect.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-stap-client-connect.Tpo $(DEPDIR)/stap-stap-client-connect.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='stap-client-connect.c' object='stap-stap-client-connect.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CFLAGS) $(CFLAGS) -c -o stap-stap-client-connect.o `test -f 'stap-client-connect.c' || echo '$(srcdir)/'`stap-client-connect.c - -stap-stap-client-connect.obj: stap-client-connect.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CFLAGS) $(CFLAGS) -MT stap-stap-client-connect.obj -MD -MP -MF $(DEPDIR)/stap-stap-client-connect.Tpo -c -o stap-stap-client-connect.obj `if test -f 'stap-client-connect.c'; then $(CYGPATH_W) 'stap-client-connect.c'; else $(CYGPATH_W) '$(srcdir)/stap-client-connect.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-stap-client-connect.Tpo $(DEPDIR)/stap-stap-client-connect.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='stap-client-connect.c' object='stap-stap-client-connect.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CFLAGS) $(CFLAGS) -c -o stap-stap-client-connect.obj `if test -f 'stap-client-connect.c'; then $(CYGPATH_W) 'stap-client-connect.c'; else $(CYGPATH_W) '$(srcdir)/stap-client-connect.c'; fi` - -stap-nsscommon.o: nsscommon.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CFLAGS) $(CFLAGS) -MT stap-nsscommon.o -MD -MP -MF $(DEPDIR)/stap-nsscommon.Tpo -c -o stap-nsscommon.o `test -f 'nsscommon.c' || echo '$(srcdir)/'`nsscommon.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-nsscommon.Tpo $(DEPDIR)/stap-nsscommon.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nsscommon.c' object='stap-nsscommon.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CFLAGS) $(CFLAGS) -c -o stap-nsscommon.o `test -f 'nsscommon.c' || echo '$(srcdir)/'`nsscommon.c - -stap-nsscommon.obj: nsscommon.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CFLAGS) $(CFLAGS) -MT stap-nsscommon.obj -MD -MP -MF $(DEPDIR)/stap-nsscommon.Tpo -c -o stap-nsscommon.obj `if test -f 'nsscommon.c'; then $(CYGPATH_W) 'nsscommon.c'; else $(CYGPATH_W) '$(srcdir)/nsscommon.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-nsscommon.Tpo $(DEPDIR)/stap-nsscommon.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nsscommon.c' object='stap-nsscommon.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CFLAGS) $(CFLAGS) -c -o stap-nsscommon.obj `if test -f 'nsscommon.c'; then $(CYGPATH_W) 'nsscommon.c'; else $(CYGPATH_W) '$(srcdir)/nsscommon.c'; fi` - -stap_client_connect-stap-client-connect.o: stap-client-connect.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_client_connect_CFLAGS) $(CFLAGS) -MT stap_client_connect-stap-client-connect.o -MD -MP -MF $(DEPDIR)/stap_client_connect-stap-client-connect.Tpo -c -o stap_client_connect-stap-client-connect.o `test -f 'stap-client-connect.c' || echo '$(srcdir)/'`stap-client-connect.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_client_connect-stap-client-connect.Tpo $(DEPDIR)/stap_client_connect-stap-client-connect.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='stap-client-connect.c' object='stap_client_connect-stap-client-connect.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_client_connect_CFLAGS) $(CFLAGS) -c -o stap_client_connect-stap-client-connect.o `test -f 'stap-client-connect.c' || echo '$(srcdir)/'`stap-client-connect.c - -stap_client_connect-stap-client-connect.obj: stap-client-connect.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_client_connect_CFLAGS) $(CFLAGS) -MT stap_client_connect-stap-client-connect.obj -MD -MP -MF $(DEPDIR)/stap_client_connect-stap-client-connect.Tpo -c -o stap_client_connect-stap-client-connect.obj `if test -f 'stap-client-connect.c'; then $(CYGPATH_W) 'stap-client-connect.c'; else $(CYGPATH_W) '$(srcdir)/stap-client-connect.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_client_connect-stap-client-connect.Tpo $(DEPDIR)/stap_client_connect-stap-client-connect.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='stap-client-connect.c' object='stap_client_connect-stap-client-connect.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_client_connect_CFLAGS) $(CFLAGS) -c -o stap_client_connect-stap-client-connect.obj `if test -f 'stap-client-connect.c'; then $(CYGPATH_W) 'stap-client-connect.c'; else $(CYGPATH_W) '$(srcdir)/stap-client-connect.c'; fi` - -stap_client_connect-nsscommon.o: nsscommon.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_client_connect_CFLAGS) $(CFLAGS) -MT stap_client_connect-nsscommon.o -MD -MP -MF $(DEPDIR)/stap_client_connect-nsscommon.Tpo -c -o stap_client_connect-nsscommon.o `test -f 'nsscommon.c' || echo '$(srcdir)/'`nsscommon.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_client_connect-nsscommon.Tpo $(DEPDIR)/stap_client_connect-nsscommon.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nsscommon.c' object='stap_client_connect-nsscommon.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_client_connect_CFLAGS) $(CFLAGS) -c -o stap_client_connect-nsscommon.o `test -f 'nsscommon.c' || echo '$(srcdir)/'`nsscommon.c - -stap_client_connect-nsscommon.obj: nsscommon.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_client_connect_CFLAGS) $(CFLAGS) -MT stap_client_connect-nsscommon.obj -MD -MP -MF $(DEPDIR)/stap_client_connect-nsscommon.Tpo -c -o stap_client_connect-nsscommon.obj `if test -f 'nsscommon.c'; then $(CYGPATH_W) 'nsscommon.c'; else $(CYGPATH_W) '$(srcdir)/nsscommon.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_client_connect-nsscommon.Tpo $(DEPDIR)/stap_client_connect-nsscommon.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nsscommon.c' object='stap_client_connect-nsscommon.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_client_connect_CFLAGS) $(CFLAGS) -c -o stap_client_connect-nsscommon.obj `if test -f 'nsscommon.c'; then $(CYGPATH_W) 'nsscommon.c'; else $(CYGPATH_W) '$(srcdir)/nsscommon.c'; fi` - -stap_server_connect-stap-server-connect.o: stap-server-connect.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_server_connect_CFLAGS) $(CFLAGS) -MT stap_server_connect-stap-server-connect.o -MD -MP -MF $(DEPDIR)/stap_server_connect-stap-server-connect.Tpo -c -o stap_server_connect-stap-server-connect.o `test -f 'stap-server-connect.c' || echo '$(srcdir)/'`stap-server-connect.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_server_connect-stap-server-connect.Tpo $(DEPDIR)/stap_server_connect-stap-server-connect.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='stap-server-connect.c' object='stap_server_connect-stap-server-connect.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_server_connect_CFLAGS) $(CFLAGS) -c -o stap_server_connect-stap-server-connect.o `test -f 'stap-server-connect.c' || echo '$(srcdir)/'`stap-server-connect.c - -stap_server_connect-stap-server-connect.obj: stap-server-connect.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_server_connect_CFLAGS) $(CFLAGS) -MT stap_server_connect-stap-server-connect.obj -MD -MP -MF $(DEPDIR)/stap_server_connect-stap-server-connect.Tpo -c -o stap_server_connect-stap-server-connect.obj `if test -f 'stap-server-connect.c'; then $(CYGPATH_W) 'stap-server-connect.c'; else $(CYGPATH_W) '$(srcdir)/stap-server-connect.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_server_connect-stap-server-connect.Tpo $(DEPDIR)/stap_server_connect-stap-server-connect.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='stap-server-connect.c' object='stap_server_connect-stap-server-connect.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_server_connect_CFLAGS) $(CFLAGS) -c -o stap_server_connect-stap-server-connect.obj `if test -f 'stap-server-connect.c'; then $(CYGPATH_W) 'stap-server-connect.c'; else $(CYGPATH_W) '$(srcdir)/stap-server-connect.c'; fi` - -stap_server_connect-nsscommon.o: nsscommon.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_server_connect_CFLAGS) $(CFLAGS) -MT stap_server_connect-nsscommon.o -MD -MP -MF $(DEPDIR)/stap_server_connect-nsscommon.Tpo -c -o stap_server_connect-nsscommon.o `test -f 'nsscommon.c' || echo '$(srcdir)/'`nsscommon.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_server_connect-nsscommon.Tpo $(DEPDIR)/stap_server_connect-nsscommon.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nsscommon.c' object='stap_server_connect-nsscommon.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_server_connect_CFLAGS) $(CFLAGS) -c -o stap_server_connect-nsscommon.o `test -f 'nsscommon.c' || echo '$(srcdir)/'`nsscommon.c - -stap_server_connect-nsscommon.obj: nsscommon.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_server_connect_CFLAGS) $(CFLAGS) -MT stap_server_connect-nsscommon.obj -MD -MP -MF $(DEPDIR)/stap_server_connect-nsscommon.Tpo -c -o stap_server_connect-nsscommon.obj `if test -f 'nsscommon.c'; then $(CYGPATH_W) 'nsscommon.c'; else $(CYGPATH_W) '$(srcdir)/nsscommon.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_server_connect-nsscommon.Tpo $(DEPDIR)/stap_server_connect-nsscommon.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nsscommon.c' object='stap_server_connect-nsscommon.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_server_connect_CFLAGS) $(CFLAGS) -c -o stap_server_connect-nsscommon.obj `if test -f 'nsscommon.c'; then $(CYGPATH_W) 'nsscommon.c'; else $(CYGPATH_W) '$(srcdir)/nsscommon.c'; fi` - -stap_sign_module-nsscommon.o: nsscommon.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_sign_module_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stap_sign_module-nsscommon.o -MD -MP -MF $(DEPDIR)/stap_sign_module-nsscommon.Tpo -c -o stap_sign_module-nsscommon.o `test -f 'nsscommon.c' || echo '$(srcdir)/'`nsscommon.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_sign_module-nsscommon.Tpo $(DEPDIR)/stap_sign_module-nsscommon.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nsscommon.c' object='stap_sign_module-nsscommon.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_sign_module_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stap_sign_module-nsscommon.o `test -f 'nsscommon.c' || echo '$(srcdir)/'`nsscommon.c - -stap_sign_module-nsscommon.obj: nsscommon.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_sign_module_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stap_sign_module-nsscommon.obj -MD -MP -MF $(DEPDIR)/stap_sign_module-nsscommon.Tpo -c -o stap_sign_module-nsscommon.obj `if test -f 'nsscommon.c'; then $(CYGPATH_W) 'nsscommon.c'; else $(CYGPATH_W) '$(srcdir)/nsscommon.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_sign_module-nsscommon.Tpo $(DEPDIR)/stap_sign_module-nsscommon.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nsscommon.c' object='stap_sign_module-nsscommon.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_sign_module_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stap_sign_module-nsscommon.obj `if test -f 'nsscommon.c'; then $(CYGPATH_W) 'nsscommon.c'; else $(CYGPATH_W) '$(srcdir)/nsscommon.c'; fi` - .cxx.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @@ -1343,6 +1293,22 @@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-csclient.obj `if test -f 'csclient.cxx'; then $(CYGPATH_W) 'csclient.cxx'; else $(CYGPATH_W) '$(srcdir)/csclient.cxx'; fi` +stap-cscommon.o: cscommon.cxx +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-cscommon.o -MD -MP -MF $(DEPDIR)/stap-cscommon.Tpo -c -o stap-cscommon.o `test -f 'cscommon.cxx' || echo '$(srcdir)/'`cscommon.cxx +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-cscommon.Tpo $(DEPDIR)/stap-cscommon.Po +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='cscommon.cxx' object='stap-cscommon.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-cscommon.o `test -f 'cscommon.cxx' || echo '$(srcdir)/'`cscommon.cxx + +stap-cscommon.obj: cscommon.cxx +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-cscommon.obj -MD -MP -MF $(DEPDIR)/stap-cscommon.Tpo -c -o stap-cscommon.obj `if test -f 'cscommon.cxx'; then $(CYGPATH_W) 'cscommon.cxx'; else $(CYGPATH_W) '$(srcdir)/cscommon.cxx'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-cscommon.Tpo $(DEPDIR)/stap-cscommon.Po +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='cscommon.cxx' object='stap-cscommon.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-cscommon.obj `if test -f 'cscommon.cxx'; then $(CYGPATH_W) 'cscommon.cxx'; else $(CYGPATH_W) '$(srcdir)/cscommon.cxx'; fi` + stap-remote.o: remote.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-remote.o -MD -MP -MF $(DEPDIR)/stap-remote.Tpo -c -o stap-remote.o `test -f 'remote.cxx' || echo '$(srcdir)/'`remote.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-remote.Tpo $(DEPDIR)/stap-remote.Po @@ -1359,21 +1325,229 @@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-remote.obj `if test -f 'remote.cxx'; then $(CYGPATH_W) 'remote.cxx'; else $(CYGPATH_W) '$(srcdir)/remote.cxx'; fi` -stap_sign_module-modsign.o: modsign.cxx -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_sign_module_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT stap_sign_module-modsign.o -MD -MP -MF $(DEPDIR)/stap_sign_module-modsign.Tpo -c -o stap_sign_module-modsign.o `test -f 'modsign.cxx' || echo '$(srcdir)/'`modsign.cxx -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_sign_module-modsign.Tpo $(DEPDIR)/stap_sign_module-modsign.Po +stap-nsscommon.o: nsscommon.cxx +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-nsscommon.o -MD -MP -MF $(DEPDIR)/stap-nsscommon.Tpo -c -o stap-nsscommon.o `test -f 'nsscommon.cxx' || echo '$(srcdir)/'`nsscommon.cxx +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-nsscommon.Tpo $(DEPDIR)/stap-nsscommon.Po +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='nsscommon.cxx' object='stap-nsscommon.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-nsscommon.o `test -f 'nsscommon.cxx' || echo '$(srcdir)/'`nsscommon.cxx + +stap-nsscommon.obj: nsscommon.cxx +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-nsscommon.obj -MD -MP -MF $(DEPDIR)/stap-nsscommon.Tpo -c -o stap-nsscommon.obj `if test -f 'nsscommon.cxx'; then $(CYGPATH_W) 'nsscommon.cxx'; else $(CYGPATH_W) '$(srcdir)/nsscommon.cxx'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap-nsscommon.Tpo $(DEPDIR)/stap-nsscommon.Po +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='nsscommon.cxx' object='stap-nsscommon.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-nsscommon.obj `if test -f 'nsscommon.cxx'; then $(CYGPATH_W) 'nsscommon.cxx'; else $(CYGPATH_W) '$(srcdir)/nsscommon.cxx'; fi` + +stap_authorize_cert-stap-authorize-cert.o: stap-authorize-cert.cxx +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_authorize_cert_CPPFLAGS) $(CPPFLAGS) $(stap_authorize_cert_CXXFLAGS) $(CXXFLAGS) -MT stap_authorize_cert-stap-authorize-cert.o -MD -MP -MF $(DEPDIR)/stap_authorize_cert-stap-authorize-cert.Tpo -c -o stap_authorize_cert-stap-authorize-cert.o `test -f 'stap-authorize-cert.cxx' || echo '$(srcdir)/'`stap-authorize-cert.cxx +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_authorize_cert-stap-authorize-cert.Tpo $(DEPDIR)/stap_authorize_cert-stap-authorize-cert.Po +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='stap-authorize-cert.cxx' object='stap_authorize_cert-stap-authorize-cert.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_authorize_cert_CPPFLAGS) $(CPPFLAGS) $(stap_authorize_cert_CXXFLAGS) $(CXXFLAGS) -c -o stap_authorize_cert-stap-authorize-cert.o `test -f 'stap-authorize-cert.cxx' || echo '$(srcdir)/'`stap-authorize-cert.cxx + +stap_authorize_cert-stap-authorize-cert.obj: stap-authorize-cert.cxx +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_authorize_cert_CPPFLAGS) $(CPPFLAGS) $(stap_authorize_cert_CXXFLAGS) $(CXXFLAGS) -MT stap_authorize_cert-stap-authorize-cert.obj -MD -MP -MF $(DEPDIR)/stap_authorize_cert-stap-authorize-cert.Tpo -c -o stap_authorize_cert-stap-authorize-cert.obj `if test -f 'stap-authorize-cert.cxx'; then $(CYGPATH_W) 'stap-authorize-cert.cxx'; else $(CYGPATH_W) '$(srcdir)/stap-authorize-cert.cxx'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_authorize_cert-stap-authorize-cert.Tpo $(DEPDIR)/stap_authorize_cert-stap-authorize-cert.Po +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='stap-authorize-cert.cxx' object='stap_authorize_cert-stap-authorize-cert.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_authorize_cert_CPPFLAGS) $(CPPFLAGS) $(stap_authorize_cert_CXXFLAGS) $(CXXFLAGS) -c -o stap_authorize_cert-stap-authorize-cert.obj `if test -f 'stap-authorize-cert.cxx'; then $(CYGPATH_W) 'stap-authorize-cert.cxx'; else $(CYGPATH_W) '$(srcdir)/stap-authorize-cert.cxx'; fi` + +stap_authorize_cert-nsscommon.o: nsscommon.cxx +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_authorize_cert_CPPFLAGS) $(CPPFLAGS) $(stap_authorize_cert_CXXFLAGS) $(CXXFLAGS) -MT stap_authorize_cert-nsscommon.o -MD -MP -MF $(DEPDIR)/stap_authorize_cert-nsscommon.Tpo -c -o stap_authorize_cert-nsscommon.o `test -f 'nsscommon.cxx' || echo '$(srcdir)/'`nsscommon.cxx +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_authorize_cert-nsscommon.Tpo $(DEPDIR)/stap_authorize_cert-nsscommon.Po +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='nsscommon.cxx' object='stap_authorize_cert-nsscommon.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_authorize_cert_CPPFLAGS) $(CPPFLAGS) $(stap_authorize_cert_CXXFLAGS) $(CXXFLAGS) -c -o stap_authorize_cert-nsscommon.o `test -f 'nsscommon.cxx' || echo '$(srcdir)/'`nsscommon.cxx + +stap_authorize_cert-nsscommon.obj: nsscommon.cxx +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_authorize_cert_CPPFLAGS) $(CPPFLAGS) $(stap_authorize_cert_CXXFLAGS) $(CXXFLAGS) -MT stap_authorize_cert-nsscommon.obj -MD -MP -MF $(DEPDIR)/stap_authorize_cert-nsscommon.Tpo -c -o stap_authorize_cert-nsscommon.obj `if test -f 'nsscommon.cxx'; then $(CYGPATH_W) 'nsscommon.cxx'; else $(CYGPATH_W) '$(srcdir)/nsscommon.cxx'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_authorize_cert-nsscommon.Tpo $(DEPDIR)/stap_authorize_cert-nsscommon.Po +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='nsscommon.cxx' object='stap_authorize_cert-nsscommon.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_authorize_cert_CPPFLAGS) $(CPPFLAGS) $(stap_authorize_cert_CXXFLAGS) $(CXXFLAGS) -c -o stap_authorize_cert-nsscommon.obj `if test -f 'nsscommon.cxx'; then $(CYGPATH_W) 'nsscommon.cxx'; else $(CYGPATH_W) '$(srcdir)/nsscommon.cxx'; fi` + +stap_authorize_cert-util.o: util.cxx +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_authorize_cert_CPPFLAGS) $(CPPFLAGS) $(stap_authorize_cert_CXXFLAGS) $(CXXFLAGS) -MT stap_authorize_cert-util.o -MD -MP -MF $(DEPDIR)/stap_authorize_cert-util.Tpo -c -o stap_authorize_cert-util.o `test -f 'util.cxx' || echo '$(srcdir)/'`util.cxx +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_authorize_cert-util.Tpo $(DEPDIR)/stap_authorize_cert-util.Po +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='util.cxx' object='stap_authorize_cert-util.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_authorize_cert_CPPFLAGS) $(CPPFLAGS) $(stap_authorize_cert_CXXFLAGS) $(CXXFLAGS) -c -o stap_authorize_cert-util.o `test -f 'util.cxx' || echo '$(srcdir)/'`util.cxx + +stap_authorize_cert-util.obj: util.cxx +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_authorize_cert_CPPFLAGS) $(CPPFLAGS) $(stap_authorize_cert_CXXFLAGS) $(CXXFLAGS) -MT stap_authorize_cert-util.obj -MD -MP -MF $(DEPDIR)/stap_authorize_cert-util.Tpo -c -o stap_authorize_cert-util.obj `if test -f 'util.cxx'; then $(CYGPATH_W) 'util.cxx'; else $(CYGPATH_W) '$(srcdir)/util.cxx'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_authorize_cert-util.Tpo $(DEPDIR)/stap_authorize_cert-util.Po +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='util.cxx' object='stap_authorize_cert-util.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_authorize_cert_CPPFLAGS) $(CPPFLAGS) $(stap_authorize_cert_CXXFLAGS) $(CXXFLAGS) -c -o stap_authorize_cert-util.obj `if test -f 'util.cxx'; then $(CYGPATH_W) 'util.cxx'; else $(CYGPATH_W) '$(srcdir)/util.cxx'; fi` + +stap_gen_cert-stap-gen-cert.o: stap-gen-cert.cxx +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_gen_cert_CXXFLAGS) $(CXXFLAGS) -MT stap_gen_cert-stap-gen-cert.o -MD -MP -MF $(DEPDIR)/stap_gen_cert-stap-gen-cert.Tpo -c -o stap_gen_cert-stap-gen-cert.o `test -f 'stap-gen-cert.cxx' || echo '$(srcdir)/'`stap-gen-cert.cxx +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_gen_cert-stap-gen-cert.Tpo $(DEPDIR)/stap_gen_cert-stap-gen-cert.Po +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='stap-gen-cert.cxx' object='stap_gen_cert-stap-gen-cert.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_gen_cert_CXXFLAGS) $(CXXFLAGS) -c -o stap_gen_cert-stap-gen-cert.o `test -f 'stap-gen-cert.cxx' || echo '$(srcdir)/'`stap-gen-cert.cxx + +stap_gen_cert-stap-gen-cert.obj: stap-gen-cert.cxx +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_gen_cert_CXXFLAGS) $(CXXFLAGS) -MT stap_gen_cert-stap-gen-cert.obj -MD -MP -MF $(DEPDIR)/stap_gen_cert-stap-gen-cert.Tpo -c -o stap_gen_cert-stap-gen-cert.obj `if test -f 'stap-gen-cert.cxx'; then $(CYGPATH_W) 'stap-gen-cert.cxx'; else $(CYGPATH_W) '$(srcdir)/stap-gen-cert.cxx'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_gen_cert-stap-gen-cert.Tpo $(DEPDIR)/stap_gen_cert-stap-gen-cert.Po +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='stap-gen-cert.cxx' object='stap_gen_cert-stap-gen-cert.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_gen_cert_CXXFLAGS) $(CXXFLAGS) -c -o stap_gen_cert-stap-gen-cert.obj `if test -f 'stap-gen-cert.cxx'; then $(CYGPATH_W) 'stap-gen-cert.cxx'; else $(CYGPATH_W) '$(srcdir)/stap-gen-cert.cxx'; fi` + +stap_gen_cert-util.o: util.cxx +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_gen_cert_CXXFLAGS) $(CXXFLAGS) -MT stap_gen_cert-util.o -MD -MP -MF $(DEPDIR)/stap_gen_cert-util.Tpo -c -o stap_gen_cert-util.o `test -f 'util.cxx' || echo '$(srcdir)/'`util.cxx +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_gen_cert-util.Tpo $(DEPDIR)/stap_gen_cert-util.Po +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='util.cxx' object='stap_gen_cert-util.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_gen_cert_CXXFLAGS) $(CXXFLAGS) -c -o stap_gen_cert-util.o `test -f 'util.cxx' || echo '$(srcdir)/'`util.cxx + +stap_gen_cert-util.obj: util.cxx +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_gen_cert_CXXFLAGS) $(CXXFLAGS) -MT stap_gen_cert-util.obj -MD -MP -MF $(DEPDIR)/stap_gen_cert-util.Tpo -c -o stap_gen_cert-util.obj `if test -f 'util.cxx'; then $(CYGPATH_W) 'util.cxx'; else $(CYGPATH_W) '$(srcdir)/util.cxx'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_gen_cert-util.Tpo $(DEPDIR)/stap_gen_cert-util.Po +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='util.cxx' object='stap_gen_cert-util.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_gen_cert_CXXFLAGS) $(CXXFLAGS) -c -o stap_gen_cert-util.obj `if test -f 'util.cxx'; then $(CYGPATH_W) 'util.cxx'; else $(CYGPATH_W) '$(srcdir)/util.cxx'; fi` + +stap_gen_cert-nsscommon.o: nsscommon.cxx +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_gen_cert_CXXFLAGS) $(CXXFLAGS) -MT stap_gen_cert-nsscommon.o -MD -MP -MF $(DEPDIR)/stap_gen_cert-nsscommon.Tpo -c -o stap_gen_cert-nsscommon.o `test -f 'nsscommon.cxx' || echo '$(srcdir)/'`nsscommon.cxx +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_gen_cert-nsscommon.Tpo $(DEPDIR)/stap_gen_cert-nsscommon.Po +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='nsscommon.cxx' object='stap_gen_cert-nsscommon.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_gen_cert_CXXFLAGS) $(CXXFLAGS) -c -o stap_gen_cert-nsscommon.o `test -f 'nsscommon.cxx' || echo '$(srcdir)/'`nsscommon.cxx + +stap_gen_cert-nsscommon.obj: nsscommon.cxx +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_gen_cert_CXXFLAGS) $(CXXFLAGS) -MT stap_gen_cert-nsscommon.obj -MD -MP -MF $(DEPDIR)/stap_gen_cert-nsscommon.Tpo -c -o stap_gen_cert-nsscommon.obj `if test -f 'nsscommon.cxx'; then $(CYGPATH_W) 'nsscommon.cxx'; else $(CYGPATH_W) '$(srcdir)/nsscommon.cxx'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_gen_cert-nsscommon.Tpo $(DEPDIR)/stap_gen_cert-nsscommon.Po +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='nsscommon.cxx' object='stap_gen_cert-nsscommon.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_gen_cert_CXXFLAGS) $(CXXFLAGS) -c -o stap_gen_cert-nsscommon.obj `if test -f 'nsscommon.cxx'; then $(CYGPATH_W) 'nsscommon.cxx'; else $(CYGPATH_W) '$(srcdir)/nsscommon.cxx'; fi` + +stap_serverd-stap-serverd.o: stap-serverd.cxx +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_serverd_CXXFLAGS) $(CXXFLAGS) -MT stap_serverd-stap-serverd.o -MD -MP -MF $(DEPDIR)/stap_serverd-stap-serverd.Tpo -c -o stap_serverd-stap-serverd.o `test -f 'stap-serverd.cxx' || echo '$(srcdir)/'`stap-serverd.cxx +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_serverd-stap-serverd.Tpo $(DEPDIR)/stap_serverd-stap-serverd.Po +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='stap-serverd.cxx' object='stap_serverd-stap-serverd.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_serverd_CXXFLAGS) $(CXXFLAGS) -c -o stap_serverd-stap-serverd.o `test -f 'stap-serverd.cxx' || echo '$(srcdir)/'`stap-serverd.cxx + +stap_serverd-stap-serverd.obj: stap-serverd.cxx +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_serverd_CXXFLAGS) $(CXXFLAGS) -MT stap_serverd-stap-serverd.obj -MD -MP -MF $(DEPDIR)/stap_serverd-stap-serverd.Tpo -c -o stap_serverd-stap-serverd.obj `if test -f 'stap-serverd.cxx'; then $(CYGPATH_W) 'stap-serverd.cxx'; else $(CYGPATH_W) '$(srcdir)/stap-serverd.cxx'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_serverd-stap-serverd.Tpo $(DEPDIR)/stap_serverd-stap-serverd.Po +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='stap-serverd.cxx' object='stap_serverd-stap-serverd.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_serverd_CXXFLAGS) $(CXXFLAGS) -c -o stap_serverd-stap-serverd.obj `if test -f 'stap-serverd.cxx'; then $(CYGPATH_W) 'stap-serverd.cxx'; else $(CYGPATH_W) '$(srcdir)/stap-serverd.cxx'; fi` + +stap_serverd-cscommon.o: cscommon.cxx +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_serverd_CXXFLAGS) $(CXXFLAGS) -MT stap_serverd-cscommon.o -MD -MP -MF $(DEPDIR)/stap_serverd-cscommon.Tpo -c -o stap_serverd-cscommon.o `test -f 'cscommon.cxx' || echo '$(srcdir)/'`cscommon.cxx +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_serverd-cscommon.Tpo $(DEPDIR)/stap_serverd-cscommon.Po +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='cscommon.cxx' object='stap_serverd-cscommon.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_serverd_CXXFLAGS) $(CXXFLAGS) -c -o stap_serverd-cscommon.o `test -f 'cscommon.cxx' || echo '$(srcdir)/'`cscommon.cxx + +stap_serverd-cscommon.obj: cscommon.cxx +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_serverd_CXXFLAGS) $(CXXFLAGS) -MT stap_serverd-cscommon.obj -MD -MP -MF $(DEPDIR)/stap_serverd-cscommon.Tpo -c -o stap_serverd-cscommon.obj `if test -f 'cscommon.cxx'; then $(CYGPATH_W) 'cscommon.cxx'; else $(CYGPATH_W) '$(srcdir)/cscommon.cxx'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_serverd-cscommon.Tpo $(DEPDIR)/stap_serverd-cscommon.Po +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='cscommon.cxx' object='stap_serverd-cscommon.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_serverd_CXXFLAGS) $(CXXFLAGS) -c -o stap_serverd-cscommon.obj `if test -f 'cscommon.cxx'; then $(CYGPATH_W) 'cscommon.cxx'; else $(CYGPATH_W) '$(srcdir)/cscommon.cxx'; fi` + +stap_serverd-util.o: util.cxx +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_serverd_CXXFLAGS) $(CXXFLAGS) -MT stap_serverd-util.o -MD -MP -MF $(DEPDIR)/stap_serverd-util.Tpo -c -o stap_serverd-util.o `test -f 'util.cxx' || echo '$(srcdir)/'`util.cxx +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_serverd-util.Tpo $(DEPDIR)/stap_serverd-util.Po +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='util.cxx' object='stap_serverd-util.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_serverd_CXXFLAGS) $(CXXFLAGS) -c -o stap_serverd-util.o `test -f 'util.cxx' || echo '$(srcdir)/'`util.cxx + +stap_serverd-util.obj: util.cxx +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_serverd_CXXFLAGS) $(CXXFLAGS) -MT stap_serverd-util.obj -MD -MP -MF $(DEPDIR)/stap_serverd-util.Tpo -c -o stap_serverd-util.obj `if test -f 'util.cxx'; then $(CYGPATH_W) 'util.cxx'; else $(CYGPATH_W) '$(srcdir)/util.cxx'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_serverd-util.Tpo $(DEPDIR)/stap_serverd-util.Po +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='util.cxx' object='stap_serverd-util.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_serverd_CXXFLAGS) $(CXXFLAGS) -c -o stap_serverd-util.obj `if test -f 'util.cxx'; then $(CYGPATH_W) 'util.cxx'; else $(CYGPATH_W) '$(srcdir)/util.cxx'; fi` + +stap_serverd-nsscommon.o: nsscommon.cxx +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_serverd_CXXFLAGS) $(CXXFLAGS) -MT stap_serverd-nsscommon.o -MD -MP -MF $(DEPDIR)/stap_serverd-nsscommon.Tpo -c -o stap_serverd-nsscommon.o `test -f 'nsscommon.cxx' || echo '$(srcdir)/'`nsscommon.cxx +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_serverd-nsscommon.Tpo $(DEPDIR)/stap_serverd-nsscommon.Po +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='nsscommon.cxx' object='stap_serverd-nsscommon.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_serverd_CXXFLAGS) $(CXXFLAGS) -c -o stap_serverd-nsscommon.o `test -f 'nsscommon.cxx' || echo '$(srcdir)/'`nsscommon.cxx + +stap_serverd-nsscommon.obj: nsscommon.cxx +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_serverd_CXXFLAGS) $(CXXFLAGS) -MT stap_serverd-nsscommon.obj -MD -MP -MF $(DEPDIR)/stap_serverd-nsscommon.Tpo -c -o stap_serverd-nsscommon.obj `if test -f 'nsscommon.cxx'; then $(CYGPATH_W) 'nsscommon.cxx'; else $(CYGPATH_W) '$(srcdir)/nsscommon.cxx'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_serverd-nsscommon.Tpo $(DEPDIR)/stap_serverd-nsscommon.Po +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='nsscommon.cxx' object='stap_serverd-nsscommon.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stap_serverd_CXXFLAGS) $(CXXFLAGS) -c -o stap_serverd-nsscommon.obj `if test -f 'nsscommon.cxx'; then $(CYGPATH_W) 'nsscommon.cxx'; else $(CYGPATH_W) '$(srcdir)/nsscommon.cxx'; fi` + +stap_sign_module-stap-sign-module.o: stap-sign-module.cxx +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_sign_module_CPPFLAGS) $(CPPFLAGS) $(stap_sign_module_CXXFLAGS) $(CXXFLAGS) -MT stap_sign_module-stap-sign-module.o -MD -MP -MF $(DEPDIR)/stap_sign_module-stap-sign-module.Tpo -c -o stap_sign_module-stap-sign-module.o `test -f 'stap-sign-module.cxx' || echo '$(srcdir)/'`stap-sign-module.cxx +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_sign_module-stap-sign-module.Tpo $(DEPDIR)/stap_sign_module-stap-sign-module.Po +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='stap-sign-module.cxx' object='stap_sign_module-stap-sign-module.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_sign_module_CPPFLAGS) $(CPPFLAGS) $(stap_sign_module_CXXFLAGS) $(CXXFLAGS) -c -o stap_sign_module-stap-sign-module.o `test -f 'stap-sign-module.cxx' || echo '$(srcdir)/'`stap-sign-module.cxx + +stap_sign_module-stap-sign-module.obj: stap-sign-module.cxx +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_sign_module_CPPFLAGS) $(CPPFLAGS) $(stap_sign_module_CXXFLAGS) $(CXXFLAGS) -MT stap_sign_module-stap-sign-module.obj -MD -MP -MF $(DEPDIR)/stap_sign_module-stap-sign-module.Tpo -c -o stap_sign_module-stap-sign-module.obj `if test -f 'stap-sign-module.cxx'; then $(CYGPATH_W) 'stap-sign-module.cxx'; else $(CYGPATH_W) '$(srcdir)/stap-sign-module.cxx'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_sign_module-stap-sign-module.Tpo $(DEPDIR)/stap_sign_module-stap-sign-module.Po +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='stap-sign-module.cxx' object='stap_sign_module-stap-sign-module.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_sign_module_CPPFLAGS) $(CPPFLAGS) $(stap_sign_module_CXXFLAGS) $(CXXFLAGS) -c -o stap_sign_module-stap-sign-module.obj `if test -f 'stap-sign-module.cxx'; then $(CYGPATH_W) 'stap-sign-module.cxx'; else $(CYGPATH_W) '$(srcdir)/stap-sign-module.cxx'; fi` + +stap_sign_module-nsscommon.o: nsscommon.cxx +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_sign_module_CPPFLAGS) $(CPPFLAGS) $(stap_sign_module_CXXFLAGS) $(CXXFLAGS) -MT stap_sign_module-nsscommon.o -MD -MP -MF $(DEPDIR)/stap_sign_module-nsscommon.Tpo -c -o stap_sign_module-nsscommon.o `test -f 'nsscommon.cxx' || echo '$(srcdir)/'`nsscommon.cxx +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_sign_module-nsscommon.Tpo $(DEPDIR)/stap_sign_module-nsscommon.Po +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='nsscommon.cxx' object='stap_sign_module-nsscommon.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_sign_module_CPPFLAGS) $(CPPFLAGS) $(stap_sign_module_CXXFLAGS) $(CXXFLAGS) -c -o stap_sign_module-nsscommon.o `test -f 'nsscommon.cxx' || echo '$(srcdir)/'`nsscommon.cxx + +stap_sign_module-nsscommon.obj: nsscommon.cxx +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_sign_module_CPPFLAGS) $(CPPFLAGS) $(stap_sign_module_CXXFLAGS) $(CXXFLAGS) -MT stap_sign_module-nsscommon.obj -MD -MP -MF $(DEPDIR)/stap_sign_module-nsscommon.Tpo -c -o stap_sign_module-nsscommon.obj `if test -f 'nsscommon.cxx'; then $(CYGPATH_W) 'nsscommon.cxx'; else $(CYGPATH_W) '$(srcdir)/nsscommon.cxx'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_sign_module-nsscommon.Tpo $(DEPDIR)/stap_sign_module-nsscommon.Po +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='nsscommon.cxx' object='stap_sign_module-nsscommon.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_sign_module_CPPFLAGS) $(CPPFLAGS) $(stap_sign_module_CXXFLAGS) $(CXXFLAGS) -c -o stap_sign_module-nsscommon.obj `if test -f 'nsscommon.cxx'; then $(CYGPATH_W) 'nsscommon.cxx'; else $(CYGPATH_W) '$(srcdir)/nsscommon.cxx'; fi` + +stap_sign_module-util.o: util.cxx +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_sign_module_CPPFLAGS) $(CPPFLAGS) $(stap_sign_module_CXXFLAGS) $(CXXFLAGS) -MT stap_sign_module-util.o -MD -MP -MF $(DEPDIR)/stap_sign_module-util.Tpo -c -o stap_sign_module-util.o `test -f 'util.cxx' || echo '$(srcdir)/'`util.cxx +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_sign_module-util.Tpo $(DEPDIR)/stap_sign_module-util.Po @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='modsign.cxx' object='stap_sign_module-modsign.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='util.cxx' object='stap_sign_module-util.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_sign_module_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o stap_sign_module-modsign.o `test -f 'modsign.cxx' || echo '$(srcdir)/'`modsign.cxx +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_sign_module_CPPFLAGS) $(CPPFLAGS) $(stap_sign_module_CXXFLAGS) $(CXXFLAGS) -c -o stap_sign_module-util.o `test -f 'util.cxx' || echo '$(srcdir)/'`util.cxx -stap_sign_module-modsign.obj: modsign.cxx -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_sign_module_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT stap_sign_module-modsign.obj -MD -MP -MF $(DEPDIR)/stap_sign_module-modsign.Tpo -c -o stap_sign_module-modsign.obj `if test -f 'modsign.cxx'; then $(CYGPATH_W) 'modsign.cxx'; else $(CYGPATH_W) '$(srcdir)/modsign.cxx'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_sign_module-modsign.Tpo $(DEPDIR)/stap_sign_module-modsign.Po +stap_sign_module-util.obj: util.cxx +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_sign_module_CPPFLAGS) $(CPPFLAGS) $(stap_sign_module_CXXFLAGS) $(CXXFLAGS) -MT stap_sign_module-util.obj -MD -MP -MF $(DEPDIR)/stap_sign_module-util.Tpo -c -o stap_sign_module-util.obj `if test -f 'util.cxx'; then $(CYGPATH_W) 'util.cxx'; else $(CYGPATH_W) '$(srcdir)/util.cxx'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stap_sign_module-util.Tpo $(DEPDIR)/stap_sign_module-util.Po @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='modsign.cxx' object='stap_sign_module-modsign.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='util.cxx' object='stap_sign_module-util.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_sign_module_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o stap_sign_module-modsign.obj `if test -f 'modsign.cxx'; then $(CYGPATH_W) 'modsign.cxx'; else $(CYGPATH_W) '$(srcdir)/modsign.cxx'; fi` +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_sign_module_CPPFLAGS) $(CPPFLAGS) $(stap_sign_module_CXXFLAGS) $(CXXFLAGS) -c -o stap_sign_module-util.obj `if test -f 'util.cxx'; then $(CYGPATH_W) 'util.cxx'; else $(CYGPATH_W) '$(srcdir)/util.cxx'; fi` install-man1: $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" @@ -1718,7 +1892,6 @@ @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -@BUILD_CRASHMOD_FALSE@@BUILD_ELFUTILS_FALSE@@BUILD_SERVER_FALSE@install-exec-local: @BUILD_CRASHMOD_FALSE@@BUILD_ELFUTILS_FALSE@@HAVE_NSS_FALSE@install-exec-local: @BUILD_CRASHMOD_FALSE@@BUILD_TRANSLATOR_FALSE@install-exec-local: clean: clean-recursive @@ -1855,20 +2028,21 @@ (echo -q ; git ls-files '*.cxx' '*.c' '*.h' | grep -v '^testsuite' ) > cscope.files && \ cscope -b -q -@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@install-exec-local: install-scripts +@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@install-exec-local: install-scripts # scripts must be installed before this rule is run -@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@install-scripts: install-binSCRIPTS install-pkglibexecSCRIPTS -@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ for f in $(bin_SCRIPTS); do \ -@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ sed -i -e "s,\$${PKGLIBEXECDIR},$(pkglibexecdir)/," $(DESTDIR)$(bindir)/$$f; \ -@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ done -@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ for f in $(pkglibexec_SCRIPTS); do \ -@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ sed -i -e "/INSTALL-HOOK/d;s,exec_prefix=.*,exec_prefix=$(exec_prefix)/bin/,;s,sysconfdir=.*,sysconfdir=$(sysconfdir),;s,pkglibexecdir=.*,pkglibexecdir=$(pkglibexecdir)/,;s,localstatedir=.*,localstatedir=$(localstatedir),;s,\$${PKGLIBEXECDIR},$(pkglibexecdir)/," $(DESTDIR)$(pkglibexecdir)/$$f; \ -@BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ done +@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@install-scripts: install-binSCRIPTS install-pkglibexecSCRIPTS +@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ for f in $(bin_SCRIPTS); do \ +@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ sed -i -e "s,\$${PKGLIBEXECDIR},$(pkglibexecdir)/," $(DESTDIR)$(bindir)/$$f; \ +@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ done +@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ for f in $(pkglibexec_SCRIPTS); do \ +@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ sed -i -e "/INSTALL-HOOK/d;s,sysconfdir=.*,sysconfdir=$(sysconfdir),;s,pkglibexecdir=.*,pkglibexecdir=$(pkglibexecdir)/,;s,localstatedir=.*,localstatedir=$(localstatedir),;s,\$${PKGLIBEXECDIR},$(pkglibexecdir)/," $(DESTDIR)$(pkglibexecdir)/$$f; \ +@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ done @BUILD_ELFUTILS_TRUE@@BUILD_TRANSLATOR_TRUE@stamp-elfutils: config.status @BUILD_ELFUTILS_TRUE@@BUILD_TRANSLATOR_TRUE@ $(MAKE) $(AM_MAKEFLAGS) -C build-elfutils all bin_PROGRAMS= @BUILD_ELFUTILS_TRUE@@BUILD_TRANSLATOR_TRUE@ for dir in libelf libebl libdw libdwfl backends; do \ @BUILD_ELFUTILS_TRUE@@BUILD_TRANSLATOR_TRUE@ $(MAKE) $(AM_MAKEFLAGS) -j1 -C build-elfutils/$$dir bin_PROGRAMS= install; \ @BUILD_ELFUTILS_TRUE@@BUILD_TRANSLATOR_TRUE@ done +@BUILD_ELFUTILS_TRUE@@BUILD_TRANSLATOR_TRUE@ $(MAKE) $(AM_MAKEFLAGS) -j1 -C build-elfutils install-pkgincludeHEADERS; @BUILD_ELFUTILS_TRUE@@BUILD_TRANSLATOR_TRUE@ touch $@ @BUILD_ELFUTILS_TRUE@@BUILD_TRANSLATOR_TRUE@lib-elfutils/libdw.so: stamp-elfutils ; @BUILD_ELFUTILS_TRUE@@BUILD_TRANSLATOR_TRUE@install-elfutils: @@ -1991,6 +2165,14 @@ (echo '#!/bin/sh'; echo "exec `pwd`/dtrace" '$${1+"$$@"}') > $@.new chmod 555 $@.new mv -f $@.new $@ +update-po: + (cd $(srcdir); ls -1d *.c *.cxx *.h runtime/staprun/*.c runtime/staprun/*.h dtrace.in) \ + | grep -v loc2c-test.c \ + | grep -v config.h \ + | grep -v git_version.h \ + | grep -v runtime/staprun/config.h \ + | sort > $(srcdir)/po/POTFILES.in + $(MAKE) -C po update-po uprobes: $(MAKE) -C $(srcdir)/runtime/uprobes clean default install-uprobes: diff -Nru systemtap-1.4/man/.cvsignore systemtap-1.6/man/.cvsignore --- systemtap-1.4/man/.cvsignore 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/man/.cvsignore 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -*.[15] diff -Nru systemtap-1.4/man/tapset::snmp.3stap systemtap-1.6/man/tapset::snmp.3stap --- systemtap-1.4/man/tapset::snmp.3stap 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/man/tapset::snmp.3stap 2011-07-25 18:12:01.000000000 +0000 @@ -21,7 +21,7 @@ This family of probe points enhances the Linux system's implementation of the Simple Network Management Protocol .B (SNMP) by allowing the user to collect per-socket statistics. SNMP data is collected in the Linux kernel by counting various events occurring in the networking subsystem. Linux provides one counter for each type of event, thus providing a system-wide collection of network statistics. These statistics can be viewed with the command: -.B netstat -s. +.B netstat \-s. The probe points defined in the SNMP group of tapsets allow users to aberrate each SNMP counter into groups of counters. For example, the user may count SNMP events for a single network socket or for a group of sockets. diff -Nru systemtap-1.4/mdfour.c systemtap-1.6/mdfour.c --- systemtap-1.4/mdfour.c 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/mdfour.c 2011-07-25 18:12:01.000000000 +0000 @@ -13,8 +13,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + along with this program. If not, see . */ #include diff -Nru systemtap-1.4/mdfour.h systemtap-1.6/mdfour.h --- systemtap-1.4/mdfour.h 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/mdfour.h 2011-07-25 18:12:01.000000000 +0000 @@ -15,8 +15,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + along with this program. If not, see . */ #include diff -Nru systemtap-1.4/modsign.cxx systemtap-1.6/modsign.cxx --- systemtap-1.4/modsign.cxx 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/modsign.cxx 1970-01-01 00:00:00.000000000 +0000 @@ -1,350 +0,0 @@ -/* - This program signs the given file using the named certificate and private - key in the given certificate database and places the signature in the named - output file. - - Copyright (C) 2009 Red Hat Inc. - - This file is part of systemtap, and is free software. You can - redistribute it and/or modify it under the terms of the GNU General Public - License as published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -#include "util.h" -#include -#include - -extern "C" { -#include "nsscommon.h" - -#include -#include -#include -#include - -#include -#include - -#include -#include -#include -#include -} - -using namespace std; - -/* Function: int init_cert_db_path (const string &cert_db_path); - * - * Initialize a certificate database at the given path. - */ -static int -init_cert_db_path (const string &cert_db_path) { - int rc; - - // Generate the certificate and database. - string cmd = PKGLIBDIR "/stap-gen-cert " + cert_db_path; - rc = system (cmd.c_str ()) == 0; - - return rc; -} - -/* Function: int check_cert_db_path (const string &cert_db_path); - * - * Check that the given certificate directory exists and is initialized. - * Create and/or initialize it otherwise. - */ -static int -check_cert_db_path (const string &cert_db_path) { - // Does the path exist? - PRFileInfo fileInfo; - PRStatus prStatus = PR_GetFileInfo (cert_db_path.c_str(), &fileInfo); - if (prStatus != PR_SUCCESS || fileInfo.type != PR_FILE_DIRECTORY) - return init_cert_db_path (cert_db_path); - - // Update the user's cert file if it is old. - string fname = cert_db_path + "/stap-server.cert"; - prStatus = PR_GetFileInfo (fname.c_str (), &fileInfo); - if (prStatus == PR_SUCCESS && fileInfo.type == PR_FILE_FILE && fileInfo.size > 0) - { - string fname1 = cert_db_path + "/stap.cert"; - prStatus = PR_GetFileInfo (fname1.c_str (), &fileInfo); - if (prStatus != PR_SUCCESS) - PR_Rename (fname.c_str (), fname1.c_str ()); - else - PR_Delete (fname.c_str ()); - } - - return 1; // ok -} - -/* Function: char * password_callback() - * - * Purpose: This function is our custom password handler that is called by - * NSS when retrieving private certs and keys from the database. Returns a - * pointer to a string that with a password for the database. Password pointer - * should point to dynamically allocated memory that will be freed later. - */ -static char * -password_callback (PK11SlotInfo *info, PRBool retry, void *arg) -{ - char *passwd = NULL; - - if (! retry && arg) - passwd = PORT_Strdup((char *)arg); - - return passwd; -} - -/* Obtain the certificate and key database password from the given file. */ -static char * -get_password (const string &fileName) -{ - PRFileDesc *local_file_fd; - PRFileInfo fileInfo; - PRInt32 numBytesRead; - PRStatus prStatus; - PRInt32 i; - char *password; - - prStatus = PR_GetFileInfo (fileName.c_str(), &fileInfo); - if (prStatus != PR_SUCCESS || fileInfo.type != PR_FILE_FILE || fileInfo.size < 0) - { - cerr << "Could not obtain information on password file " << fileName << "." << endl; - nssError (); - return NULL; - } - - local_file_fd = PR_Open (fileName.c_str(), PR_RDONLY, 0); - if (local_file_fd == NULL) - { - cerr << "Could not open password file " << fileName << "." << endl; - nssError (); - return NULL; - } - - password = (char*)PORT_Alloc (fileInfo.size + 1); - if (! password) - { - cerr << "Unable to allocate " << (fileInfo.size + 1) << " bytes." << endl; - nssError (); - return NULL; - } - - numBytesRead = PR_Read (local_file_fd, password, fileInfo.size); - if (numBytesRead <= 0) - { - cerr << "Error reading password file " << fileName << "." << endl; - nssError (); - return 0; - } - - PR_Close (local_file_fd); - - /* Keep only the first line of data. */ - for (i = 0; i < numBytesRead; ++i) - { - if (password[i] == '\n' || password[i] == '\r' || password[i] == '\0') - break; - } - password[i] = '\0'; - - return password; -} - -static void -sign_it (const string &inputName, const string &outputName, SECKEYPrivateKey *privKey) -{ - unsigned char buffer[4096]; - PRFileDesc *local_file_fd; - PRUint32 numBytes; - SECStatus secStatus; - SGNContext *sgn; - SECItem signedData; - - /* Set up the signing context. */ - sgn = SGN_NewContext (SEC_OID_PKCS1_SHA1_WITH_RSA_ENCRYPTION, privKey); - if (! sgn) - { - cerr << "Could not create signing context." << endl; - nssError (); - return; - } - secStatus = SGN_Begin (sgn); - if (secStatus != SECSuccess) - { - cerr << "Could not initialize signing context." << endl; - nssError (); - return; - } - - /* Now read the data and add it to the signature. */ - local_file_fd = PR_Open (inputName.c_str(), PR_RDONLY, 0); - if (local_file_fd == NULL) - { - cerr << "Could not open module file " << inputName << "." << endl; - nssError (); - return; - } - - for (;;) - { - numBytes = PR_Read (local_file_fd, buffer, sizeof (buffer)); - if (numBytes == 0) - break; /* EOF */ - - if (numBytes < 0) - { - cerr << "Error reading module file " << inputName << "." << endl; - nssError (); - return; - } - - /* Add the data to the signature. */ - secStatus = SGN_Update (sgn, buffer, numBytes); - if (secStatus != SECSuccess) - { - cerr << "Error while signing module file " << inputName << "." << endl; - nssError (); - return; - } - } - - PR_Close (local_file_fd); - - /* Complete the signature. */ - secStatus = SGN_End (sgn, & signedData); - if (secStatus != SECSuccess) - { - cerr << "Could not complete signature of module file " << inputName << "." << endl; - nssError (); - return; - } - - SGN_DestroyContext (sgn, PR_TRUE); - - /* Now write the signed data to the output file. */ - local_file_fd = PR_Open (outputName.c_str(), PR_WRONLY | PR_CREATE_FILE | PR_TRUNCATE, - PR_IRUSR | PR_IWUSR | PR_IRGRP | PR_IWGRP | PR_IROTH); - if (local_file_fd == NULL) - { - cerr << "Could not open signature file " << outputName << "." << endl; - nssError (); - return; - } - - numBytes = PR_Write (local_file_fd, signedData.data, signedData.len); - if (numBytes < 0 || numBytes != signedData.len) - { - cerr << "Error writing to signature file " << outputName << "." << endl; - nssError (); - return; - } - - PR_Close (local_file_fd); -} - -int -main(int argc, char **argv) -{ - const char *nickName = "stap-server"; - string module_name; - string cert_db_path; - char *password; - CERTCertificate *cert; - SECKEYPrivateKey *privKey; - SECStatus secStatus; - const char *stap_dir; - struct passwd *pwd; - - if (argc < 2) { - cerr << "Module name was not specified." << endl; - return 1; - } - module_name = argv[1]; - - if (argc >= 3) - cert_db_path = argv[2]; - else { - // Use the default database for this user. - stap_dir = getenv ("SYSTEMTAP_DIR"); - if (stap_dir == NULL) { - stap_dir = getenv("HOME"); - if (stap_dir == NULL) { - pwd = getpwuid(getuid()); - if (pwd) - stap_dir = pwd->pw_dir; - else { - cerr << "Unable to determine the certificate database path." << endl; - return 1; - } - } - cert_db_path = string (stap_dir) + "/.systemtap/ssl/server"; - } - else - cert_db_path = string (stap_dir) + "/ssl/server"; - } - - if (! check_cert_db_path (cert_db_path)) - return 1; - - password = get_password (cert_db_path + "/pw"); - if (! password) - { - cerr << "Unable to obtain certificate database password." << endl; - return 1; - } - - /* Call the NSPR initialization routines. */ - PR_Init (PR_SYSTEM_THREAD, PR_PRIORITY_NORMAL, 1); - - /* Set the cert database password callback. */ - PK11_SetPasswordFunc (password_callback); - - /* Initialize NSS. */ - secStatus = NSS_Init (cert_db_path.c_str()); - if (secStatus != SECSuccess) - { - cerr << "Unable to initialize nss library." << endl; - nssError (); - return 1; - } - - /* Get own certificate and private key. */ - cert = PK11_FindCertFromNickname (nickName, password); - if (cert == NULL) - { - cerr << "Unable to find certificate with nickname " << nickName - << " in " << cert_db_path << "." << endl; - nssError (); - return 1; - } - - privKey = PK11_FindKeyByAnyCert (cert, password); - if (privKey == NULL) - { - cerr << "Unable to obtain private key from the certificate with nickname " << nickName - << " in " << cert_db_path << "." << endl; - nssError (); - return 1; - } - - /* Sign the file. */ - sign_it (module_name, module_name + ".sgn", privKey); - - /* Shutdown NSS and exit NSPR gracefully. */ - nssCleanup (); - - return 0; -} - -/* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ diff -Nru systemtap-1.4/modsign.h systemtap-1.6/modsign.h --- systemtap-1.4/modsign.h 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/modsign.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -void sign_module (systemtap_session& s); - -/* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ diff -Nru systemtap-1.4/NEWS systemtap-1.6/NEWS --- systemtap-1.4/NEWS 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/NEWS 2011-07-25 18:12:01.000000000 +0000 @@ -1,3 +1,119 @@ +* What's new in version 1.6 + +- The systemtap compile-server no longer uses the -k option when calling the + translator (stap). As a result, the server will now take advantage of the + module cache when compiling the same script more than once. You may observe + an improvement in the performance of the server in this situation. + +- The systemtap compile-server and client now each check the version of the + other, allowing both to adapt when communicating with a down-level + counterpart. As a result, all version of the client can communicate + with all versions of the server and vice-versa. Client will prefer newer + servers when selecting a server automatically. + +- SystemTap has improved support for the ARM architecture. The + kread() and kwrite() operations for ARM were corrected allowing many + of the tapsets probes and function to work properly on the ARM + architecture. + +- Staprun can now rename the module to a unique name with the '-R' option before + inserting it. Systemtap itself will also call staprun with '-R' by default. + This allows the same module to be inserted more than once, without conflicting + duplicate names. + +- Systemtap error messages now provide feedback when staprun or any other + process fails to launch. This also specifically covers when the user + doesn't have the proper permissions to launch staprun. + +- Systemtap will now map - to _ in module names. Previously, + stap -L 'module("i2c-core").function("*")' would be empty. It now returns + a list had stap -L 'module("i2c_core").function("*") been specified. + +- Systemtap now fills in missing process names to probe points, to + avoid having to name them twice twice: + % stap -e 'probe process("a.out").function("*") {}' -c 'a.out ...' + Now the probed process name is inferred from the -c CMD argument. + % stap -e 'probe process.function("*") {}' -c 'a.out ...' + +- stap -L 'process("PATH").syscall' will now list context variables + +- Depends on elfutils 0.142+. + +- Deprecated task_backtrace:string (task:long). This function will go + away after 1.6. Please run your scripts with stap --check-version. + +* What's new in version 1.5, 2011-05-23 + +- The compile server and its related tools (stap-gen-ert, stap-authorize-cert, + stap-sign-module) have been re-implemented in C++. Previously, these + components were a mix of bash scripts and C code. These changes should be + transparent to the end user with the exception of NSS certificate database + password prompting (see below). The old implementation would prompt more + than once for the same password in some situations. + +- eventcount.stp now allows for event counting in the format of + 'stap eventcount.stp process.end syscall.* ...', and also reports + corresponding event tid's. + +- Systemtap checks that the build-id of the module being probed matches the + build-id saved in the systemtap module. Invoking systemtap with + -DSTP_NO_BUILDID_CHECK will bypass this build-id runtime verification. See + man ld(1) for info on --build-id. + +- stapio will now report if a child process has an abnormal exit along with + the associated status or signal. + +- Compiler optimization may sometimes result in systemtap not being able to + access a user-space probe argument. Compiling the application with + -DSTAP_SDT_ARG_CONSTRAINT=nr will force the argument to be an immediate or + register value which should enable systemtap to access the argument. + +- GNU Gettext has now been intergrated with systemtap. Our translation + page can be found at http://www.transifex.net/projects/p/systemtap/ . + "make update-po" will generate the necessary files to use translated + messages. Please refer to the po/README file for more info and + please consider contributing to this I18N effort! + +- The new addr() function returns the probe's instruction pointer. + +- process("...").library("...") probes are now supported. Wildcards + are supported in the library-name part, to refer to any shared + library that is required by process-name, which matches the glob + pattern and the rest of the probe point. + +- The "--remote USER@HOST" functionality can now be specified multiple times + to fan out on multiple targets. If the targets have distinct kernel and + architecture configurations, stap will automatically build the script + appropriately for each one. This option is also no longer considered + experimental. + +- The NSS certificate database generated for use by the compile server is now + generated with no password. Previously, a random password was generated and + used to access the database. This change should be transparent to most users. + However, if you are prompted for a password when using systemtap, then + running $libexecdir/stap-gen-cert should correct the problem. + +- The timestamp tapset includes jiffies() and HZ() for lightweight approximate + timekeeping. + +- A powerful new command line option --version has been added. + +- process.mark now supports $$parms for reading probe parameters. + +- A new command line option, --use-server-on-error[=yes|no] is available + for stap. It instructs stap to retry compilation of a script using a + compile server if it fails on the local host. The default setting + is 'no'. + +- The following deprecated tools have been removed: + stap-client + stap-authorize-server-cert + stap-authorize-signing-cert + stap-find-or-start-server + stap-find-servers + Use the --use-server, --trust-server and --list-servers options of stap + instead. + * What's new in version 1.4, 2011-01-17 - A new /* myproc-unprivileged */ marker is now available for embedded C diff -Nru systemtap-1.4/nsscommon.c systemtap-1.6/nsscommon.c --- systemtap-1.4/nsscommon.c 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/nsscommon.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,66 +0,0 @@ -/* - Common functions used by the NSS-aware code in systemtap. - - Copyright (C) 2009, 2010 Red Hat Inc. - - This file is part of systemtap, and is free software. You can - redistribute it and/or modify it under the terms of the GNU General Public - License as published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -#include - -#include -#include -#include -#include -#include - -void -nssError (void) -{ - PRErrorCode errorNumber; - char *errorText; - - /* See if PR_GetError can tell us what the error is. */ - errorNumber = PR_GetError (); - fprintf(stderr, "(%d) ", errorNumber); - - /* PR_ErrorToString always returns a valid string for errors in this range. */ - if (errorNumber >= PR_NSPR_ERROR_BASE && errorNumber <= PR_MAX_ERROR) - { - fprintf (stderr, "%s\n", PR_ErrorToString(errorNumber, PR_LANGUAGE_EN)); - return; - } - - /* PR_ErrorToString does not handle errors outside the range above, so - we handle them ourselves. */ - switch (errorNumber) { - default: errorText = "(unknown)"; break; -#define NSSYERROR(code,msg) case code: errorText = msg; break -#include "stapsslerr.h" -#undef NSSYERROR - } - - fprintf (stderr, "%s\n", errorText); -} - -void -nssCleanup (void) -{ - /* Shutdown NSS and exit NSPR gracefully. */ - NSS_Shutdown (); - PR_Cleanup (); -} - -/* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ diff -Nru systemtap-1.4/nsscommon.cxx systemtap-1.6/nsscommon.cxx --- systemtap-1.4/nsscommon.cxx 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/nsscommon.cxx 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,1325 @@ +/* + Common functions used by the NSS-aware code in systemtap. + + Copyright (C) 2009-2011 Red Hat Inc. + + This file is part of systemtap, and is free software. You can + redistribute it and/or modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +} + +#include "nsscommon.h" +#include "util.h" + +using namespace std; + +// Common constants and settings. +const char * +server_cert_nickname () +{ + return (const char *)"stap-server"; +} + +string +server_cert_db_path () +{ + string data_path; + const char* s_d = getenv ("SYSTEMTAP_DIR"); + if (s_d != NULL) + data_path = s_d; + else + data_path = get_home_directory() + string("/.systemtap"); + return data_path + "/ssl/server"; +} + +string +local_client_cert_db_path () +{ + string data_path; + const char* s_d = getenv ("SYSTEMTAP_DIR"); + if (s_d != NULL) + data_path = s_d; + else + data_path = get_home_directory() + string("/.systemtap"); + return data_path + "/ssl/client"; +} + +// Common error handling for applications using this file. +void +nsscommon_error (const string &msg, int logit) +{ + // Call the extern "C" version supplied by each application. + nsscommon_error (msg.c_str (), logit); +} + +// Logging. Enabled only by stap-serverd but called from some common methods. +static ofstream logfile; + +void +start_log (const char *arg) +{ + if (logfile.is_open ()) + logfile.close (); + + logfile.open (arg, ios_base::app); + if (! logfile.good ()) + nsscommon_error (_F("Could not open log file %s", arg)); +} + +bool +log_ok () +{ + return logfile.good (); +} + +void +log (const string &msg) +{ + // What time is it? + time_t now; + time (& now); + string nowStr = ctime (& now); + // Remove the newline from the end of the time string. + nowStr.erase (nowStr.size () - 1, 1); + + if (logfile.good ()) + logfile << nowStr << ": " << msg << endl << flush; + else + clog << nowStr << ": " << msg << endl << flush; +} + +void +end_log () +{ + if (logfile.is_open ()) + logfile.close (); +} + +// NSS/NSPR error reporting and cleanup. +// These functions are called from C code as well as C++, so make them extern "C". +extern "C" +void +nssError (void) +{ + // See if PR_GetError can tell us what the error is. + PRErrorCode errorNumber = PR_GetError (); + + // PR_ErrorToString always returns a valid string for errors in this range. + if (errorNumber >= PR_NSPR_ERROR_BASE && errorNumber <= PR_MAX_ERROR) + { + nsscommon_error (_F("(%d) %s", errorNumber, PR_ErrorToString (errorNumber, PR_LANGUAGE_EN))); + return; + } + + // PR_ErrorToString does not handle errors outside the range above, so we handle them ourselves. + const char *errorText; + switch (errorNumber) { + default: errorText = "Unknown error"; break; +#define NSSYERROR(code,msg) case code: errorText = msg; break +#include "stapsslerr.h" +#undef NSSYERROR + } + + nsscommon_error (_F("(%d) %s", errorNumber, errorText)); +} + +extern "C" +SECStatus +nssInit (const char *db_path, int readWrite, int issueMessage) +{ + SECStatus secStatus; + if (readWrite) + secStatus = NSS_InitReadWrite (db_path); + else + secStatus = NSS_Init (db_path); + if (secStatus != SECSuccess && issueMessage) + { + nsscommon_error (_F("Error initializing NSS for %s", db_path)); + nssError (); + } + return secStatus; +} + +extern "C" +void +nssCleanup (const char *db_path) +{ + // Shutdown NSS and ensure that it went down successfully. This is because we can not + // initialize NSS again if it does not. + if (NSS_Shutdown () != SECSuccess) + { + if (db_path) + nsscommon_error (_F("Unable to shutdown NSS for database %s", db_path)); + else + { + // This shutdown request is coming from the rpm finder which attempts to shutdown NSS + // manually if rpmFreeCrypto() is not available (see rpm_finder.cxx:missing_rpm_enlist). + // At that point there is no way of knowing if NSS was actually started, so allow + // failure here with SEC_ERROR_NOT_INITIALIZED. + PRErrorCode errorNumber = PR_GetError (); + if (errorNumber == SEC_ERROR_NOT_INITIALIZED) + return; + nsscommon_error (_("Unable to shutdown NSS")); + } + nssError (); + } +} + +// Certificate database password support functions. +// +// Disable character echoing, if the fd is a tty. +static void +echoOff(int fd) +{ + if (isatty(fd)) { + struct termios tio; + tcgetattr(fd, &tio); + tio.c_lflag &= ~ECHO; + tcsetattr(fd, TCSAFLUSH, &tio); + } +} + +/* Enable character echoing, if the fd is a tty. */ +static void +echoOn(int fd) +{ + if (isatty(fd)) { + struct termios tio; + tcgetattr(fd, &tio); + tio.c_lflag |= ECHO; + tcsetattr(fd, TCSAFLUSH, &tio); + } +} + +/* + * This function is our custom password handler that is called by + * NSS when retrieving private certs and keys from the database. Returns a + * pointer to a string with a password for the database. Password pointer + * must be allocated by one of the NSPR memory allocation functions, or by PORT_Strdup, + * and will be freed by the caller. + */ +extern "C" +char * +nssPasswordCallback (PK11SlotInfo *info __attribute ((unused)), PRBool retry, void *arg) +{ + static int retries = 0; + #define PW_MAX 200 + char* password = NULL; + char* password_ret = NULL; + const char *dbname ; + int infd; + int isTTY; + + if (! retry) + { + /* Not a retry. */ + retries = 0; + } + else + { + /* Maximum of 2 retries for bad password. */ + if (++retries > 2) + return NULL; /* No more retries */ + } + + /* Can only prompt for a password if stdin is a tty. */ + infd = fileno (stdin); + isTTY = isatty (infd); + if (! isTTY) + { + nsscommon_error (_("Cannot prompt for certificate database password. stdin is not a tty")); + return NULL; + } + + /* Prompt for password */ + password = (char *)PORT_Alloc (PW_MAX); + if (! password) + { + nssError (); + return NULL; + } + + dbname = (const char *)arg; + cerr << _F("Password for certificate database in %s: ", dbname) << flush; + echoOff (infd); + password_ret = fgets (password, PW_MAX, stdin); + cerr << endl << flush; + echoOn(infd); + + if (password_ret) + /* stomp on the newline */ + *strchrnul (password, '\n') = '\0'; + else + PORT_Free (password); + + return password_ret; +} + +static int +create_server_cert_db (const char *db_path) +{ + return create_dir (db_path, 0755); +} + +static int +create_client_cert_db (const char *db_path) +{ + // Same properties as the server's database, at present. + return create_server_cert_db (db_path); +} + +static int +clean_cert_db (const string &db_path) +{ + // First remove all files from the directory + glob_t globbuf; + string filespec = db_path + "/*"; + int r = glob (filespec.c_str (), 0, NULL, & globbuf); + if (r == GLOB_NOSPACE || r == GLOB_ABORTED) + nsscommon_error (_F("Could not search certificate database directory %s", db_path.c_str ())); + else if (r != GLOB_NOMATCH) + { + for (unsigned i = 0; i < globbuf.gl_pathc; ++i) + { + if (remove_file_or_dir (globbuf.gl_pathv[i]) != 0) + nsscommon_error (_F("Could not remove %s", globbuf.gl_pathv[i])); + } + } + + // Now remove the directory itself. + if (remove_file_or_dir (db_path.c_str ()) != 0) + { + nsscommon_error (_F("Could not remove certificate database directory %s\n%s", + db_path.c_str (), strerror (errno))); + return 1; + } + + return 0; +} + +static int +init_password (PK11SlotInfo *slot, const string &db_path, bool use_password) +{ + // Prompt for the database password, if we're using one. Keep the passwords in memory for as + // little time as possible. + SECStatus secStatus; + if (use_password) + { + char *pw1 = 0; + int attempts; + const int max_attempts = 3; + for (attempts = 0; attempts < max_attempts; ++attempts) + { + pw1 = nssPasswordCallback (slot, false, (void*)db_path.c_str ()); + if (! pw1) + continue; + cerr << "Confirm "; + bool match = false; + char *pw2 = nssPasswordCallback (slot, false, (void*)db_path.c_str ()); + if (pw2) + { + if (strcmp (pw1, pw2) == 0) + match = true; + else + nsscommon_error (_("Passwords do not match")); + memset (pw2, 0, strlen (pw2)); + PORT_Free (pw2); + } + if (match) + break; + memset (pw1, 0, strlen (pw1)); + PORT_Free (pw1); + } + if (attempts >= max_attempts) + { + nsscommon_error (_("Too many password attempts")); + return 1; + } + secStatus = PK11_InitPin (slot, 0, pw1); + memset (pw1, 0, strlen (pw1)); + PORT_Free (pw1); + } + else + secStatus = PK11_InitPin (slot, 0, 0); + + if (secStatus != SECSuccess) + { + nsscommon_error (_F("Could not initialize pin for certificate database %s", db_path.c_str())); + nssError (); + return 1; + } + + return 0; +} + +static SECKEYPrivateKey * +generate_private_key (const string &db_path, PK11SlotInfo *slot, SECKEYPublicKey **pubkeyp) +{ + if (PK11_Authenticate (slot, PR_TRUE, 0) != SECSuccess) + { + nsscommon_error (_F("Unable to authenticate the default slot for certificate database %s", + db_path.c_str ())); + nssError (); + return 0; + } + + // Do some random-number initialization. + // TODO: We can do better. + srand (time (NULL)); + char randbuf[64]; + for (unsigned i = 0; i < sizeof (randbuf); ++i) + randbuf[i] = rand (); + PK11_RandomUpdate (randbuf, sizeof (randbuf)); + memset (randbuf, 0, sizeof (randbuf)); + + // Set up for RSA. + PK11RSAGenParams rsaparams; + rsaparams.keySizeInBits = 1024; + rsaparams.pe = 0x010001; + CK_MECHANISM_TYPE mechanism = CKM_RSA_PKCS_KEY_PAIR_GEN; + + // Generate the key pair. + SECKEYPrivateKey *privKey = PK11_GenerateKeyPair (slot, mechanism, & rsaparams, pubkeyp, + PR_TRUE /*isPerm*/, PR_TRUE /*isSensitive*/, + 0/*pwdata*/); + if (! privKey) + { + nsscommon_error (_("Unable to generate public/private key pair")); + nssError (); + } + return privKey; +} + +static CERTCertificateRequest * +generate_cert_request (SECKEYPublicKey *pubk, CERTName *subject) +{ + CERTSubjectPublicKeyInfo *spki = SECKEY_CreateSubjectPublicKeyInfo (pubk); + if (! spki) + { + nsscommon_error (_("Unable to create subject public key info for certificate request")); + nssError (); + return 0; + } + + /* Generate certificate request */ + CERTCertificateRequest *cr = CERT_CreateCertificateRequest (subject, spki, 0); + SECKEY_DestroySubjectPublicKeyInfo (spki); + if (! cr) + { + nsscommon_error (_("Unable to create certificate request")); + nssError (); + } + return cr; +} + +static CERTCertificate * +create_cert (CERTCertificateRequest *certReq, const string &dnsNames) +{ + // What is the current date and time? + PRTime now = PR_Now (); + + // What is the date and time 1 year from now? + PRExplodedTime printableTime; + PR_ExplodeTime (now, PR_GMTParameters, & printableTime); + printableTime.tm_month += 12; + PRTime after = PR_ImplodeTime (& printableTime); + + // Note that the time is now in micro-second units. + CERTValidity *validity = CERT_CreateValidity (now, after); + if (! validity) + { + nsscommon_error (_("Unable to create certificate validity dates")); + nssError (); + return 0; + } + + // Create a default serial number using the current time. + PRTime serialNumber = now >> 19; // copied from certutil. + + // Create the certificate. + CERTCertificate *cert = CERT_CreateCertificate (serialNumber, & certReq->subject, validity, + certReq); + CERT_DestroyValidity (validity); + if (! cert) + { + nsscommon_error (_("Unable to create certificate")); + nssError (); + return 0; + } + + // Predeclare these to keep C++ happy about jumps to the label 'error'. + SECStatus secStatus = SECSuccess; + unsigned char keyUsage = 0x0; + PRArenaPool *arena = 0; + + // Add the extensions that we need. + void *extHandle = CERT_StartCertExtensions (cert); + if (! extHandle) + { + nsscommon_error (_("Unable to allocate certificate extensions")); + nssError (); + goto error; + } + + // Cert type extension. + keyUsage |= (0x80 >> 1); // SSL Server + keyUsage |= (0x80 >> 3); // Object signer + keyUsage |= (0x80 >> 7); // Object signing CA + + SECItem bitStringValue; + bitStringValue.data = & keyUsage; + bitStringValue.len = 1; + + secStatus = CERT_EncodeAndAddBitStrExtension (extHandle, + SEC_OID_NS_CERT_EXT_CERT_TYPE, + & bitStringValue, PR_TRUE); + if (secStatus != SECSuccess) + { + nsscommon_error (_("Unable to encode certificate type extensions")); + nssError (); + goto error; + } + + // Alternate dns name extension. + if (! dnsNames.empty ()) + { + arena = PORT_NewArena (DER_DEFAULT_CHUNKSIZE); + if (! arena) + { + nsscommon_error (_("Unable to allocate alternate DNS name extension for certificate")); + goto error; + } + + // Walk down the comma separated list of names. + CERTGeneralName *nameList = 0; + CERTGeneralName *current = 0; + PRCList *prev = 0; + vectorcomponents; + tokenize (dnsNames, components, ","); + for (unsigned i = 0; i < components.size (); ++i) + { + char *tbuf = (char *)PORT_ArenaAlloc (arena, components[i].size () + 1); + strcpy (tbuf, components[i].c_str ()); + + current = (CERTGeneralName *)PORT_ZAlloc (sizeof (CERTGeneralName)); + if (! current) + { + nsscommon_error (_("Unable to allocate alternate DNS name extension for certificate")); + goto error; + } + if (prev) + { + current->l.prev = prev; + prev->next = & current->l; + } + else + nameList = current; + + current->type = certDNSName; + current->name.other.data = (unsigned char *)tbuf; + current->name.other.len = strlen (tbuf); + prev = & current->l; + } + + // At this point nameList points to the head of a doubly linked, + // but not yet circular, list and current points to its tail. + if (nameList) + { + // Make nameList circular. + nameList->l.prev = prev; + current->l.next = & nameList->l; + + // Encode and add the extension. + SECItem item; + secStatus = CERT_EncodeAltNameExtension (arena, nameList, & item); + if (secStatus != SECSuccess) + { + nsscommon_error (_("Unable to encode alternate DNS name extension for certificate")); + nssError (); + goto error; + } + secStatus = CERT_AddExtension(extHandle, + SEC_OID_X509_SUBJECT_ALT_NAME, + & item, PR_FALSE, PR_TRUE); + if (secStatus != SECSuccess) + { + nsscommon_error (_("Unable to add alternate DNS name extension for certificate")); + nssError (); + goto error; + } + } + } // extra dns names specified. + + // We did not create any extensions on the cert request. + assert (certReq->attributes != NULL); + assert (certReq->attributes[0] == NULL); + + // Finished with cert extensions. + secStatus = CERT_FinishExtensions (extHandle); + if (secStatus != SECSuccess) + { + nsscommon_error (_("Unable to complete alternate DNS name extension for certificate")); + nssError (); + goto error; + } + + return cert; + + error: + if (arena) + PORT_FreeArena (arena, PR_FALSE); + CERT_DestroyCertificate (cert); + return 0; +} + +static SECItem * +sign_cert (CERTCertificate *cert, SECKEYPrivateKey *privKey) +{ + SECOidTag algID = SEC_GetSignatureAlgorithmOidTag (privKey->keyType, + SEC_OID_UNKNOWN); + if (algID == SEC_OID_UNKNOWN) + { + nsscommon_error (_("Unable to determine the signature algorithm for the signing the certificate")); + nssError (); + return 0; + } + + PRArenaPool *arena = cert->arena; + SECStatus rv = SECOID_SetAlgorithmID (arena, & cert->signature, algID, 0); + if (rv != SECSuccess) + { + nsscommon_error (_("Unable to set the signature algorithm for signing the certificate")); + nssError (); + return 0; + } + + /* we only deal with cert v3 here */ + *(cert->version.data) = 2; + cert->version.len = 1; + + SECItem der; + der.len = 0; + der.data = 0; + void *dummy = SEC_ASN1EncodeItem (arena, & der, cert, + SEC_ASN1_GET (CERT_CertificateTemplate)); + if (! dummy) + { + nsscommon_error (_("Unable to encode the certificate for signing")); + nssError (); + return 0; + } + + SECItem *result = (SECItem *)PORT_ArenaZAlloc (arena, sizeof (SECItem)); + if (! result) + { + nsscommon_error (_("Unable to allocate memory for signing the certificate")); + return 0; + } + + rv = SEC_DerSignData (arena, result, der.data, der.len, privKey, algID); + if (rv != SECSuccess) + { + nsscommon_error (_("Unable to sign the certificate")); + nssError (); + return 0; + } + + cert->derCert = *result; + return result; +} + +static SECStatus +add_server_cert (const string &db_path, SECItem *certDER, PK11SlotInfo *slot) +{ + // Decode the cert. + CERTCertificate *cert = CERT_DecodeCertFromPackage((char *)certDER->data, certDER->len); + if (! cert) + { + nsscommon_error (_("Unable to decode certificate")); + nssError (); + return SECFailure; + } + + // Import it into the database. + CERTCertDBHandle *handle = 0; + CERTCertTrust *trust = NULL; + SECStatus secStatus = PK11_ImportCert (slot, cert, CK_INVALID_HANDLE, + server_cert_nickname (), PR_FALSE); + if (secStatus != SECSuccess) + { + nsscommon_error (_F("Unable to import certificate into the database at %s", db_path.c_str ())); + nssError (); + goto done; + } + + // Make it a trusted server and signer. + trust = (CERTCertTrust *)PORT_ZAlloc (sizeof (CERTCertTrust)); + if (! trust) + { + nsscommon_error (_("Unable to allocate certificate trust")); + secStatus = SECFailure; + goto done; + } + + secStatus = CERT_DecodeTrustString (trust, "PCu,,PCu"); + if (secStatus != SECSuccess) + { + nsscommon_error (_("Unable decode trust string 'PCu,,PCu'")); + nssError (); + goto done; + } + + handle = CERT_GetDefaultCertDB (); + assert (handle); + secStatus = CERT_ChangeCertTrust (handle, cert, trust); + if (secStatus != SECSuccess) + { + nsscommon_error (_("Unable to change certificate trust")); + nssError (); + } + +done: + CERT_DestroyCertificate (cert); + if (trust) + PORT_Free (trust); + return secStatus; +} + +SECStatus +add_client_cert (const string &inFileName, const string &db_path) +{ + FILE *inFile = fopen (inFileName.c_str (), "rb"); + if (! inFile) + { + nsscommon_error (_F("Could not open certificate file %s for reading\n%s", + inFileName.c_str (), strerror (errno))); + return SECFailure; + } + + int fd = fileno (inFile); + struct stat info; + int rc = fstat (fd, &info); + if (rc != 0) + { + nsscommon_error (_F("Could not obtain information about certificate file %s\n%s", + inFileName.c_str (), strerror (errno))); + fclose (inFile); + return SECFailure; + } + + SECItem certDER; + certDER.len = info.st_size; + certDER.data = (unsigned char *)PORT_Alloc (certDER.len); + size_t read = fread (certDER.data, 1, certDER.len, inFile); + fclose (inFile); + if (read != certDER.len) + { + nsscommon_error (_F("Error reading from certificate file %s\n%s", + inFileName.c_str (), strerror (errno))); + return SECFailure; + } + + // See if the database already exists and can be initialized. + SECStatus secStatus = nssInit (db_path.c_str (), 1/*readwrite*/, 0/*issueMessage*/); + if (secStatus != SECSuccess) + { + // Try again with a fresh database. + if (clean_cert_db (db_path.c_str ()) != 0) + { + // Message already issued. + return SECFailure; + } + + // Make sure the given path exists. + if (create_client_cert_db (db_path.c_str ()) != 0) + { + nsscommon_error (_F("Could not create certificate database directory %s", + db_path.c_str ())); + return SECFailure; + } + + // Initialize the new database. + secStatus = nssInit (db_path.c_str (), 1/*readwrite*/); + if (secStatus != SECSuccess) + { + // Message already issued. + return SECFailure; + } + } + + // Predeclare these to keep C++ happy about jumps to the label 'done'. + CERTCertificate *cert = 0; + CERTCertDBHandle *handle = 0; + CERTCertTrust *trust = 0; + PK11SlotInfo *slot = 0; + + // Add the cert to the database + // Decode the cert. + secStatus = SECFailure; + cert = CERT_DecodeCertFromPackage ((char *)certDER.data, certDER.len); + if (! cert) + { + nsscommon_error (_("Unable to decode certificate")); + nssError (); + goto done; + } + + // We need the internal slot for this database. + slot = PK11_GetInternalKeySlot (); + if (! slot) + { + nsscommon_error (_F("Could not obtain internal key slot for certificate database %s", db_path.c_str())); + nssError (); + goto done; + } + + // Import it into the database. + secStatus = PK11_ImportCert (slot, cert, CK_INVALID_HANDLE, + server_cert_nickname (), PR_FALSE); + if (secStatus != SECSuccess) + { + nsscommon_error (_F("Could not import certificate into the database at %s", db_path.c_str())); + nssError (); + goto done; + } + + // Make it a trusted SSL peer. + trust = (CERTCertTrust *)PORT_ZAlloc (sizeof (CERTCertTrust)); + if (! trust) + { + nsscommon_error (_("Could not allocate certificate trust")); + goto done; + } + + secStatus = CERT_DecodeTrustString (trust, "P,P,P"); + if (secStatus != SECSuccess) + { + nsscommon_error (_("Unable decode trust string 'P,P,P'")); + nssError (); + goto done; + } + + handle = CERT_GetDefaultCertDB (); + assert (handle); + secStatus = CERT_ChangeCertTrust (handle, cert, trust); + if (secStatus != SECSuccess) + { + nsscommon_error (_("Unable to change certificate trust")); + nssError (); + } + + done: + // Free NSS/NSPR objects and shutdown NSS. + if (slot) + PK11_FreeSlot (slot); + if (trust) + PORT_Free (trust); + if (cert) + CERT_DestroyCertificate (cert); + if (certDER.data) + PORT_Free (certDER.data); + nssCleanup (db_path.c_str ()); + + // Make sure that the cert database files are read/write by the owner and + // readable by all. + glob_t globbuf; + string filespec = db_path + "/*"; + int r = glob (filespec.c_str (), 0, NULL, & globbuf); + if (r == GLOB_NOSPACE || r == GLOB_ABORTED) { + // Not fatal, just a warning + nsscommon_error (_F("Could not search certificate database directory %s", db_path.c_str ())); + } + else if (r != GLOB_NOMATCH) + { + mode_t mode = S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH; + for (unsigned i = 0; i < globbuf.gl_pathc; ++i) + { + // Not fatal, just a warning + if (chmod (globbuf.gl_pathv[i], mode) != 0) + nsscommon_error (_F("Could set file permissions for %s", globbuf.gl_pathv[i])); + } + } + + return secStatus; +} + +int +gen_cert_db (const string &db_path, const string &extraDnsNames, bool use_password) +{ + // Log the generation of a new database. + log (_F("Generating a new certificate database directory in %s", + db_path.c_str ())); + + // Start with a clean cert database. + if (clean_cert_db (db_path.c_str ()) != 0) + { + // Message already issued. + return 1; + } + + // Make sure the given path exists. + if (create_server_cert_db (db_path.c_str ()) != 0) + { + nsscommon_error (_F("Could not create certificate database directory %s", + db_path.c_str ())); + return 1; + } + + // Initialize the new database. + SECStatus secStatus = nssInit (db_path.c_str (), 1/*readwrite*/); + if (secStatus != SECSuccess) + { + // Message already issued. + return 1; + } + + // Pre declare these to keep g++ happy about jumps to the label 'error'. + CERTName *subject = 0; + SECKEYPublicKey *pubkey = 0; + SECKEYPrivateKey *privkey = 0; + CERTCertificateRequest *cr = 0; + CERTCertificate *cert = 0; + SECItem *certDER = 0; + string dnsNames; + int rc; + string outFileName; + FILE *outFile = 0; + + // We need the internal slot for this database. + PK11SlotInfo *slot = PK11_GetInternalKeySlot (); + if (! slot) + { + nsscommon_error (_F("Could not obtain internal key slot for certificate database %s", db_path.c_str())); + nssError (); + goto error; + } + + // Establish the password (if any) for the new database. + rc = init_password (slot, db_path, use_password); + if (rc != 0) + { + // Messages already issued. + goto error; + } + + // Format the cert subject. + subject = CERT_AsciiToName ((char *)"CN=Systemtap Compile Server, OU=Systemtap"); + if (! subject) + { + nsscommon_error (_("Unable to encode certificate common header")); + nssError (); + goto error; + } + + // Next, generate the private key. + privkey = generate_private_key (db_path, slot, & pubkey); + if (! privkey) + { + // Message already issued. + goto error; + } + + // Next, generate a cert request. + cr = generate_cert_request (pubkey, subject); + if (! cr) + { + // Message already issued. + goto error; + } + + // Now, generate the cert. We need our host name and the supplied additional dns names (if any). + struct utsname utsname; + uname (& utsname); + dnsNames = utsname.nodename; + if (! extraDnsNames.empty ()) + dnsNames += "," + extraDnsNames; + cert = create_cert (cr, dnsNames); + CERT_DestroyCertificateRequest (cr); + if (! cert) + { + // NSS error already issued. + nsscommon_error (_("Unable to create certificate")); + goto error; + } + + // Sign the cert. + certDER = sign_cert (cert, privkey); + if (! certDER) + { + // Message already issued. + goto error; + } + + // Now output it to a file. + outFileName = db_path + "/stap.cert"; + outFile = fopen (outFileName.c_str (), "wb"); + if (outFile) + { + size_t written = fwrite (certDER->data, 1, certDER->len, outFile); + if (written != certDER->len) + { + nsscommon_error (_F("Error writing to certificate file %s\n%s", + outFileName.c_str (), strerror (errno))); + } + fclose (outFile); + } + else + { + nsscommon_error (_F("Could not open certificate file %s for writing\n%s", + outFileName.c_str (), strerror (errno))); + } + + // Add the cert to the database + secStatus = add_server_cert (db_path, certDER, slot); + CERT_DestroyCertificate (cert); + if (secStatus != SECSuccess) + { + // NSS error already issued. + nsscommon_error (_F("Unable to add certificate to %s", db_path.c_str ())); + goto error; + } + + // Done with the certificate database + PK11_FreeSlot (slot); + CERT_DestroyName (subject); + SECKEY_DestroyPublicKey (pubkey); + SECKEY_DestroyPrivateKey (privkey); + goto done; + + error: + if (slot) + PK11_FreeSlot (slot); + if (subject) + CERT_DestroyName (subject); + if (pubkey) + SECKEY_DestroyPublicKey (pubkey); + if (privkey) + SECKEY_DestroyPrivateKey (privkey); + if (cert) + CERT_DestroyCertificate (cert); // Also destroys certDER. + + done: + nssCleanup (db_path.c_str ()); + return secStatus != SECSuccess; +} + +CERTCertList *get_cert_list_from_db (const string &cert_nickname) +{ + // Search the client-side database of trusted servers. + CERTCertDBHandle *handle = CERT_GetDefaultCertDB (); + assert (handle); + CERTCertificate *db_cert = PK11_FindCertFromNickname (cert_nickname.c_str (), 0); + if (! db_cert) + { + // No trusted servers. Not an error. Just an empty list returned. + return 0; + } + + // Here, we have one cert with the desired nickname. + // Now, we will attempt to get a list of ALL certs + // with the same subject name as the cert we have. That list + // should contain, at a minimum, the one cert we have already found. + // If the list of certs is empty (0), the libraries have failed. + CERTCertList *certs = CERT_CreateSubjectCertList (0, handle, & db_cert->derSubject, + PR_Now (), PR_FALSE); + CERT_DestroyCertificate (db_cert); + if (! certs) + { + nsscommon_error (_("NSS library failure in CERT_CreateSubjectCertList")); + nssError (); + } + + return certs; +} + +static int +format_cert_validity_time (SECItem &vTime, char *timeString, size_t ts_size) +{ + int64 time; + SECStatus secStatus; + + switch (vTime.type) { + case siUTCTime: + secStatus = DER_UTCTimeToTime (& time, & vTime); + break; + case siGeneralizedTime: + secStatus = DER_GeneralizedTimeToTime (& time, & vTime); + break; + default: + nsscommon_error (_("Could not decode certificate validity")); + return 1; + } + if (secStatus != SECSuccess) + { + nsscommon_error (_("Could not decode certificate validity time")); + return 1; + } + + // Convert to local time. + PRExplodedTime printableTime; + PR_ExplodeTime (time, PR_GMTParameters, & printableTime); + if (! PR_FormatTime (timeString, ts_size, "%a %b %d %H:%M:%S %Y", & printableTime)) + { + nsscommon_error (_("Could not format certificate validity time")); + return 1; + } + + return 0; +} + +static bool +cert_is_valid (CERTCertificate *cert) +{ + // Verify the the certificate is valid as an SSL server and as an object signer and that + // it is valid now. + CERTCertDBHandle *handle = CERT_GetDefaultCertDB (); + assert (handle); + SECCertificateUsage usage = certificateUsageSSLServer | certificateUsageObjectSigner; + SECStatus secStatus = CERT_VerifyCertificate (handle, cert, PR_TRUE/*checkSig*/, usage, + PR_Now (), NULL, NULL/*log*/, & usage); + return secStatus == SECSuccess; +} + +static bool +cert_db_is_valid (const string &db_path, const string &nss_cert_name) +{ + // Make sure the given path exists. + if (! file_exists (db_path)) + { + log (_F("Certificate database %s does not exist", db_path.c_str ())); + return false; + } + + // If a 'pw' file exists, then this is an old database. Treat any certs as invalid. + if (file_exists (db_path + "/pw")) + { + log (_F("Certificate database %s is obsolete", db_path.c_str ())); + return false; + } + + // Initialize the NSS libraries -- readonly + SECStatus secStatus = nssInit (db_path.c_str ()); + if (secStatus != SECSuccess) + { + // Message already issued. + return false; + } + + // Obtain a list of our certs from the database. + bool valid_p = false; + CERTCertList *certs = get_cert_list_from_db (nss_cert_name); + if (! certs) + { + log (_F("No certificate found in database %s", db_path.c_str ())); + goto done; + } + + log (_F("Certificate found in database %s", db_path.c_str ())); + for (CERTCertListNode *node = CERT_LIST_HEAD (certs); + ! CERT_LIST_END (node, certs); + node = CERT_LIST_NEXT (node)) + { + // The certificate we're working with. + CERTCertificate *c = node->cert; + + // Print the validity dates of the certificate. + CERTValidity &v = c->validity; + char timeString[256]; + if (format_cert_validity_time (v.notBefore, timeString, sizeof (timeString)) == 0) + log (_F(" Not Valid Before: %s UTC", timeString)); + if (format_cert_validity_time (v.notAfter, timeString, sizeof (timeString)) == 0) + log (_F(" Not Valid After: %s UTC", timeString)); + + // Now ask NSS to check the validity. + if (cert_is_valid (c)) + { + // The cert is valid. One valid cert is enough. + log (_("Certificate is valid")); + valid_p = true; + break; + } + + // The cert is not valid. Look for another one. + log (_("Certificate is not valid")); + } + CERT_DestroyCertList (certs); + + done: + nssCleanup (db_path.c_str ()); + return valid_p; +} + +// Ensure that our certificate exists and is valid. Generate a new one if not. +int +check_cert (const string &db_path, const string &nss_cert_name, bool use_db_password) +{ + // Generate a new cert database if the current one does not exist or is not valid. + if (! cert_db_is_valid (db_path, nss_cert_name)) + { + if (gen_cert_db (db_path, "", use_db_password) != 0) + { + // NSS message already issued. + nsscommon_error (_("Unable to generate new certificate")); + return 1; + } + } + return 0; +} + +void sign_file ( + const string &db_path, + const string &nss_cert_name, + const string &inputName, + const string &outputName +) { + /* Get own certificate and private key. */ + CERTCertificate *cert = PK11_FindCertFromNickname (nss_cert_name.c_str (), NULL); + if (cert == NULL) + { + nsscommon_error (_F("Unable to find certificate with nickname %s in %s.", + nss_cert_name.c_str (), db_path.c_str())); + nssError (); + return; + } + + // Predeclare these to keep C++ happy abount branches to 'done'. + unsigned char buffer[4096]; + PRFileDesc *local_file_fd = NULL; + PRInt32 numBytes; + SECStatus secStatus; + SGNContext *sgn; + SECItem signedData; + + /* db_path.c_str () gets passed to nssPasswordCallback */ + SECKEYPrivateKey *privKey = PK11_FindKeyByAnyCert (cert, (void *)db_path.c_str ()); + if (privKey == NULL) + { + nsscommon_error (_F("Unable to obtain private key from the certificate with nickname %s in %s.", + nss_cert_name.c_str (), db_path.c_str())); + nssError (); + goto done; + } + + /* Sign the file. */ + /* Set up the signing context. */ + sgn = SGN_NewContext (SEC_OID_PKCS1_SHA1_WITH_RSA_ENCRYPTION, privKey); + if (! sgn) + { + nsscommon_error (_("Could not create signing context")); + nssError (); + return; + } + secStatus = SGN_Begin (sgn); + if (secStatus != SECSuccess) + { + nsscommon_error (_("Could not initialize signing context.")); + nssError (); + return; + } + + /* Now read the data and add it to the signature. */ + local_file_fd = PR_Open (inputName.c_str(), PR_RDONLY, 0); + if (local_file_fd == NULL) + { + nsscommon_error (_F("Could not open module file %s", inputName.c_str ())); + nssError (); + return; + } + + for (;;) + { + numBytes = PR_Read (local_file_fd, buffer, sizeof (buffer)); + if (numBytes == 0) + break; /* EOF */ + + if (numBytes < 0) + { + nsscommon_error (_F("Error reading module file %s", inputName.c_str ())); + nssError (); + goto done; + } + + /* Add the data to the signature. */ + secStatus = SGN_Update (sgn, buffer, numBytes); + if (secStatus != SECSuccess) + { + nsscommon_error (_F("Error while signing module file %s", inputName.c_str ())); + nssError (); + goto done; + } + } + + /* Complete the signature. */ + secStatus = SGN_End (sgn, & signedData); + if (secStatus != SECSuccess) + { + nsscommon_error (_F("Could not complete signature of module file %s", inputName.c_str ())); + nssError (); + goto done; + } + + SGN_DestroyContext (sgn, PR_TRUE); + + /* Now write the signed data to the output file. */ + if(local_file_fd != NULL) + PR_Close (local_file_fd); + local_file_fd = PR_Open (outputName.c_str(), PR_WRONLY | PR_CREATE_FILE | PR_TRUNCATE, + PR_IRUSR | PR_IWUSR | PR_IRGRP | PR_IWGRP | PR_IROTH); + if (local_file_fd == NULL) + { + nsscommon_error (_F("Could not open signature file %s", outputName.c_str ())); + nssError (); + goto done; + } + + numBytes = PR_Write (local_file_fd, signedData.data, signedData.len); + if (numBytes < 0 || numBytes != (PRInt32)signedData.len) + { + nsscommon_error (_F("Error writing to signature file %s", outputName.c_str ())); + nssError (); + } + + done: + if (privKey) + SECKEY_DestroyPrivateKey (privKey); + CERT_DestroyCertificate (cert); + if(local_file_fd != NULL) + PR_Close (local_file_fd); +} + +/* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ diff -Nru systemtap-1.4/nsscommon.h systemtap-1.6/nsscommon.h --- systemtap-1.4/nsscommon.h 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/nsscommon.h 2011-07-25 18:12:01.000000000 +0000 @@ -1,4 +1,80 @@ +#ifndef NSS_COMMON_H +#define NSS_COMMON_H 1 + +/* Used for parameters with default C++ values which are also called from C */ +#if defined(c_plusplus) || defined(__cplusplus) +#define INIT(v,i) v = (i) +#else +#define INIT(v,i) v +#endif + +/* These functions are called from both C and C++. */ +#if defined(c_plusplus) || defined(__cplusplus) +extern "C" { +#endif + +#include +#include +#include +#include "config.h" + +#if ENABLE_NLS +#define _(string) gettext(string) +#define _N(string, string_plural, count) \ + ngettext((string), (string_plural), (count)) +#else +#define _(string) (string) +#define _N(string, string_plural, count) \ + ( (count) == 1 ? (string) : (string_plural) ) +#endif +#define _F(format, ...) autosprintf(_(format), __VA_ARGS__) +#define _NF(format, format_plural, count, ...) \ + autosprintf(_N((format), (format_plural), (count)), __VA_ARGS__) + +char *nssPasswordCallback (PK11SlotInfo *info __attribute ((unused)), + PRBool retry __attribute ((unused)), + void *arg __attribute ((unused))); + +SECStatus nssInit (const char *db_path, INIT (int readWrite, 0), INIT (int issueMessage, 1)); +void nssCleanup (const char *db_path); + +void nsscommon_error (const char *msg, INIT(int logit, 1)); void nssError (void); -void nssCleanup (void); + +#if defined(c_plusplus) || defined(__cplusplus) +} +#endif + +#if defined(c_plusplus) || defined(__cplusplus) +/* These functions are only called from C++ */ +#include + +const char *server_cert_nickname (); +std::string server_cert_db_path (); +std::string local_client_cert_db_path (); + +void nsscommon_error (const std::string &msg, int logit = 1); + +void start_log (const char *arg); +bool log_ok (); +void log (const std::string &msg); +void end_log (); + +int check_cert (const std::string &db_path, const std::string &nss_cert_name, bool use_db_password = false); +int gen_cert_db (const std::string &db_path, const std::string &extraDnsNames, bool use_password); +SECStatus add_client_cert (const std::string &inFileName, const std::string &db_path); + +void sign_file ( + const std::string &db_path, + const std::string &nss_cert_name, + const std::string &inputName, + const std::string &outputName +); + +CERTCertList *get_cert_list_from_db (const std::string &cert_nickname); + +#endif // defined(c_plusplus) || defined(__cplusplus) + +#endif // NSS_COMMON_H /* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ diff -Nru systemtap-1.4/parse.cxx systemtap-1.6/parse.cxx --- systemtap-1.4/parse.cxx 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/parse.cxx 2011-07-25 18:12:01.000000000 +0000 @@ -1,5 +1,5 @@ // recursive descent parser for systemtap scripts -// Copyright (C) 2005-2010 Red Hat Inc. +// Copyright (C) 2005-2011 Red Hat Inc. // Copyright (C) 2006 Intel Corporation. // Copyright (C) 2007 Bull S.A.S // @@ -258,11 +258,11 @@ parser::print_error (const parse_error &pe) { string align_parse_error (" "); - cerr << "parse error: " << pe.what () << endl; + cerr << _("parse error: ") << pe.what () << endl; if (pe.tok) { - cerr << "\tat: " << *pe.tok << endl; + cerr << _("\tat: ") << *pe.tok << endl; session.print_error_source (cerr, align_parse_error, pe.tok); } else @@ -270,11 +270,11 @@ const token* t = last_t; if (t) { - cerr << "\tsaw: " << *t << endl; + cerr << _("\tsaw: ") << *t << endl; session.print_error_source (cerr, align_parse_error, t); } else - cerr << "\tsaw: " << input_name << " EOF" << endl; + cerr << _("\tsaw: ") << input_name << " EOF" << endl; } // XXX: make it possible to print the last input line, @@ -308,7 +308,7 @@ else if (op->type == tok_operator && op->content == "!=") { return lhs != rhs; } else - throw parse_error ("expected comparison operator", op); + throw parse_error (_("expected comparison operator"), op); } @@ -340,7 +340,7 @@ l->content == "systemtap_v")) { if (! (r->type == tok_string)) - throw parse_error ("expected string literal", r); + throw parse_error (_("expected string literal"), r); string target_kernel_vr = s.kernel_release; string target_kernel_v = s.kernel_base_release; @@ -370,10 +370,10 @@ else if (op->type == tok_operator && op->content == "!=") { rvc_ok1 = -1; rvc_ok2 = 1; wc_ok = true; } else - throw parse_error ("expected comparison operator", op); + throw parse_error (_("expected comparison operator"), op); if ((!wc_ok) && rhs_wildcard) - throw parse_error ("wildcard not allowed with order comparison operators", op); + throw parse_error (_("wildcard not allowed with order comparison operators"), op); if (rhs_wildcard) { @@ -395,7 +395,7 @@ { string target_architecture = s.architecture; if (! (r->type == tok_string)) - throw parse_error ("expected string literal", r); + throw parse_error (_("expected string literal"), r); string query_architecture = r->content; int nomatch = fnmatch (query_architecture.c_str(), @@ -408,7 +408,7 @@ else if (op->type == tok_operator && op->content == "!=") result = nomatch; else - throw parse_error ("expected '==' or '!='", op); + throw parse_error (_("expected '==' or '!='"), op); return result; } @@ -427,7 +427,7 @@ else if (op->type == tok_operator && op->content == "!=") result = nomatch; else - throw parse_error ("expected '==' or '!='", op); + throw parse_error (_("expected '==' or '!='"), op); return result; } @@ -468,7 +468,7 @@ return eval_comparison (lhs, op, rhs); } else - throw parse_error ("expected string, number literal or other CONFIG_... as right value", r); + throw parse_error (_("expected string, number literal or other CONFIG_... as right side operand"), r); } else if (l->type == tok_string && r->type == tok_string) { @@ -486,14 +486,14 @@ } else if (l->type == tok_string && r->type == tok_number && op->type == tok_operator) - throw parse_error ("expected string literal as right value", r); + throw parse_error (_("expected string literal as right value"), r); else if (l->type == tok_number && r->type == tok_string && op->type == tok_operator) - throw parse_error ("expected number literal as right value", r); + throw parse_error (_("expected number literal as right value"), r); else - throw parse_error ("expected 'arch' or 'kernel_v' or 'kernel_vr' or 'CONFIG_...'\n" - " or comparison between strings or integers", l); + throw parse_error (_("expected 'arch' or 'kernel_v' or 'kernel_vr' or 'CONFIG_...'\n" + " or comparison between strings or integers"), l); } @@ -519,22 +519,23 @@ { t = pp_state.back().first; pp_state.pop_back(); // so skip_some doesn't keep trying to close this - throw parse_error ("incomplete conditional at end of file", t); + //TRANSLATORS: 'conditional' meaning 'conditional preprocessing' + throw parse_error (_("incomplete conditional at end of file"), t); } return t; } // misplaced preprocessor "then" if (t->type == tok_operator && t->content == "%?") - throw parse_error ("incomplete conditional - missing '%('", t); + throw parse_error (_("incomplete conditional - missing '%('"), t); // preprocessor "else" if (t->type == tok_operator && t->content == "%:") { if (pp == PP_NONE) - throw parse_error ("incomplete conditional - missing '%('", t); + throw parse_error (_("incomplete conditional - missing '%('"), t); if (pp == PP_KEEP_ELSE || pp == PP_SKIP_ELSE) - throw parse_error ("invalid conditional - duplicate '%:'", t); + throw parse_error (_("invalid conditional - duplicate '%:'"), t); pp_state.back().second = (pp == PP_KEEP_THEN) ? PP_SKIP_ELSE : PP_KEEP_ELSE; @@ -546,7 +547,7 @@ if (t->type == tok_operator && t->content == "%)") { if (pp == PP_NONE) - throw parse_error ("incomplete conditional - missing '%('", t); + throw parse_error (_("incomplete conditional - missing '%('"), t); delete pp_state.back().first; delete t; //this is the closing bracket pp_state.pop_back(); @@ -567,7 +568,7 @@ op = input.scan (false); r = input.scan (false); if (l == 0 || op == 0 || r == 0) - throw parse_error ("incomplete condition after '%('", t); + throw parse_error (_("incomplete condition after '%('"), t); // NB: consider generalizing to consume all tokens until %?, and // passing that as a vector to an evaluator. @@ -599,7 +600,7 @@ const token *m = n; if (! (m && m->type == tok_operator && m->content == "%?")) - throw parse_error ("expected '%?' marker for conditional", t); + throw parse_error (_("expected '%?' marker for conditional"), t); delete m; // "%?" pp = result ? PP_KEEP_THEN : PP_SKIP_THEN; @@ -649,7 +650,7 @@ if (! next_t) next_t = scan_pp (wildcard); if (! next_t) - throw parse_error ("unexpected end-of-file"); + throw parse_error (_("unexpected end-of-file")); last_t = next_t; // advance by zeroing next_t @@ -682,7 +683,7 @@ { const token *t = next(); if (! (t && t->type == tt && t->content == expected)) - throw parse_error ("expected '" + expected + "'"); + throw parse_error (_F("expected '%s'", expected.c_str())); return t; } @@ -692,7 +693,7 @@ { const token *t = next(); if (!(t && t->type == tt)) - throw parse_error ("expected " + tt2str(tt)); + throw parse_error (_("expected ") + tt2str(tt)); target = t->content; return t; } @@ -733,7 +734,7 @@ t = next (); } if (!(t && t->type == tok_number)) - throw parse_error ("expected number"); + throw parse_error (_("expected number")); const char* startp = t->content.c_str (); char* endp = (char*) startp; @@ -748,7 +749,7 @@ || (neg && (unsigned long long) value > 9223372036854775808ULL) || (unsigned long long) value > 18446744073709551615ULL || value < -9223372036854775807LL-1) - throw parse_error ("number invalid or out of range"); + throw parse_error (_("number invalid or out of range")); if (neg) value = -value; @@ -930,7 +931,7 @@ n->content.push_back (c2); input_get(); // swallow '#' if (suspended) - throw parse_error ("invalid nested substitution of command line arguments", n); + throw parse_error (_("invalid nested substitution of command line arguments"), n); size_t num_args = session.args.size (); input_put ((c == '$') ? lex_cast (num_args) : lex_cast_qstring (num_args), n); n->content.clear(); @@ -950,7 +951,7 @@ isdigit (c2) && idx <= session.args.size()); // prevent overflow if (suspended) - throw parse_error ("invalid nested substitution of command line arguments", n); + throw parse_error (_("invalid nested substitution of command line arguments"), n); if (idx == 0 || idx-1 >= session.args.size()) throw parse_error ("command line argument index " + lex_cast(idx) @@ -1007,7 +1008,7 @@ if (c < 0 || c == '\n') { - throw parse_error("Could not find matching closing quote", n); + throw parse_error(_("Could not find matching closing quote"), n); } if (c == '\"') // closing double-quotes break; @@ -1097,7 +1098,7 @@ c2 = input_get (); } - throw parse_error ("Could not find matching '%}' to close embedded function block", n); + throw parse_error (_("Could not find matching '%}' to close embedded function block"), n); } // We're committed to recognizing at least the first character @@ -1199,7 +1200,7 @@ else { context = con_unknown; - throw parse_error ("expected 'probe', 'global', 'function', or '%{'"); + throw parse_error (_("expected 'probe', 'global', 'function', or '%{'")); } } catch (parse_error& pe) @@ -1229,13 +1230,13 @@ if (empty) { - cerr << "Input file '" << input_name << "' is empty or missing." << endl; + cerr << _F("Input file '%s' is empty or missing.", input_name.c_str()) << endl; delete f; f = 0; } else if (num_errors > 0) { - cerr << num_errors << " parse error(s)." << endl; + cerr << _F(ngettext("%d parse error.", "%d parse errors.", num_errors), num_errors) << endl; delete f; f = 0; } @@ -1251,7 +1252,7 @@ { const token* t0 = next (); if (! (t0->type == tok_keyword && t0->content == "probe")) - throw parse_error ("expected 'probe'"); + throw parse_error (_("expected 'probe'")); vector aliases; vector locations; @@ -1269,7 +1270,7 @@ && t->type == tok_operator && t->content == "=") { if (pp->optional || pp->sufficient) - throw parse_error ("probe point alias name cannot be optional nor sufficient", pp->components.front()->tok); + throw parse_error (_("probe point alias name cannot be optional nor sufficient"), pp->components.front()->tok); aliases.push_back(pp); next (); continue; @@ -1278,7 +1279,7 @@ && t->type == tok_operator && t->content == "+=") { if (pp->optional || pp->sufficient) - throw parse_error ("probe point alias name cannot be optional nor sufficient", pp->components.front()->tok); + throw parse_error (_("probe point alias name cannot be optional nor sufficient"), pp->components.front()->tok); aliases.push_back(pp); epilogue_alias = 1; next (); @@ -1297,7 +1298,7 @@ break; } else - throw parse_error ("expected probe point specifier"); + throw parse_error (_("expected probe point specifier")); } if (aliases.empty()) @@ -1333,10 +1334,10 @@ embeddedcode* e = new embeddedcode; const token* t = next (); if (t->type != tok_embedded) - throw parse_error ("expected '%{'"); + throw parse_error (_("expected '%{'")); if (! privileged) - throw parse_error ("embedded code in unprivileged script", + throw parse_error (_("embedded code in unprivileged script"), false /* don't skip tokens for parse resumption */); e->tok = t; @@ -1352,7 +1353,7 @@ const token* t = next (); if (! (t->type == tok_operator && t->content == "{")) - throw parse_error ("expected '{'"); + throw parse_error (_("expected '{'")); pb->tok = t; @@ -1406,7 +1407,7 @@ t = next(); if (! (t->type == tok_identifier)) - throw parse_error ("expected identifier"); + throw parse_error (_("expected identifier")); symbol* sym = new symbol; sym->tok = t; sym->name = t->content; @@ -1461,7 +1462,7 @@ ret = parse_expr_statement (); // XXX: consider generally accepting tok_embedded here too else - throw parse_error ("expected statement"); + throw parse_error (_("expected statement")); // Squash "empty" trailing colons after any "non-block-like" statement. t = peek (); @@ -1479,17 +1480,17 @@ { const token* t0 = next (); if (! (t0->type == tok_keyword && t0->content == "global")) - throw parse_error ("expected 'global'"); + throw parse_error (_("expected 'global'")); while (1) { const token* t = next (); if (! (t->type == tok_identifier)) - throw parse_error ("expected identifier"); + throw parse_error (_("expected identifier")); for (unsigned i=0; iname == t->content) - throw parse_error ("duplicate global name"); + throw parse_error (_("duplicate global name")); vardecl* d = new vardecl; d->name = t->content; @@ -1505,7 +1506,7 @@ next (); expect_number(size); if (size <= 0 || size > 1000000) // arbitrary max - throw parse_error("array size out of range"); + throw parse_error(_("array size out of range")); d->maxsize = (int)size; expect_known(tok_operator, "]"); t = peek (); @@ -1514,7 +1515,7 @@ if (t && t->type == tok_operator && t->content == "=") // initialization { if (!d->compatible_arity(0)) - throw parse_error("only scalar globals can be initialized"); + throw parse_error(_("only scalar globals can be initialized")); d->set_arity(0, t); next (); d->init = parse_literal (); @@ -1541,18 +1542,18 @@ { const token* t = next (); if (! (t->type == tok_keyword && t->content == "function")) - throw parse_error ("expected 'function'"); + throw parse_error (_("expected 'function'")); t = next (); if (! (t->type == tok_identifier) && ! (t->type == tok_keyword && (t->content == "string" || t->content == "long"))) - throw parse_error ("expected identifier"); + throw parse_error (_("expected identifier")); for (unsigned i=0; iname == t->content) - throw parse_error ("duplicate function name"); + throw parse_error (_("duplicate function name")); functiondecl *fd = new functiondecl (); fd->name = t->content; @@ -1566,13 +1567,13 @@ fd->type = pe_string; else if (t->type == tok_keyword && t->content == "long") fd->type = pe_long; - else throw parse_error ("expected 'string' or 'long'"); + else throw parse_error (_("expected 'string' or 'long'")); t = next (); } if (! (t->type == tok_operator && t->content == "(")) - throw parse_error ("expected '('"); + throw parse_error (_("expected '('")); while (1) { @@ -1582,7 +1583,7 @@ if (t->type == tok_operator && t->content == ")") break; else if (! (t->type == tok_identifier)) - throw parse_error ("expected identifier"); + throw parse_error (_("expected identifier")); vardecl* vd = new vardecl; vd->name = t->content; vd->tok = t; @@ -1597,7 +1598,7 @@ vd->type = pe_string; else if (t->type == tok_keyword && t->content == "long") vd->type = pe_long; - else throw parse_error ("expected 'string' or 'long'"); + else throw parse_error (_("expected 'string' or 'long'")); t = next (); } @@ -1606,7 +1607,7 @@ if (t->type == tok_operator && t->content == ",") continue; else - throw parse_error ("expected ',' or ')'"); + throw parse_error (_("expected ',' or ')'")); } t = peek (); @@ -1630,7 +1631,7 @@ if (! (t->type == tok_identifier // we must allow ".return" and ".function", which are keywords || t->type == tok_keyword)) - throw parse_error ("expected identifier or '*'"); + throw parse_error (_("expected identifier or '*'")); probe_point::component* c = new probe_point::component; @@ -1649,7 +1650,7 @@ t = next (); if (! (t->type == tok_operator && t->content == ")")) - throw parse_error ("expected ')'"); + throw parse_error (_("expected ')'")); t = peek (); } @@ -1679,14 +1680,14 @@ next (); t = peek (); if (t && ! (t->type == tok_operator && t->content == "(")) - throw parse_error ("expected '('"); + throw parse_error (_("expected '('")); next (); pl->condition = parse_expression (); t = peek (); if (t && ! (t->type == tok_operator && t->content == ")")) - throw parse_error ("expected ')'"); + throw parse_error (_("expected ')'")); next (); t = peek (); // fall through @@ -1697,7 +1698,7 @@ t->content == "=" || t->content == "+=" )) break; - throw parse_error ("expected one of '. , ( ? ! { = +='"); + throw parse_error (_("expected one of '. , ( ? ! { = +='")); } return pl; @@ -1748,7 +1749,7 @@ || (neg && (unsigned long long) value > 9223372036854775808ULL) || (unsigned long long) value > 18446744073709551615ULL || value < -9223372036854775807LL-1) - throw parse_error ("number invalid or out of range"); + throw parse_error (_("number invalid or out of range")); if (neg) value = -value; @@ -1756,7 +1757,7 @@ l = new literal_number (value); } else - throw parse_error ("expected literal string or number"); + throw parse_error (_("expected literal string or number")); } l->tok = t; @@ -1769,19 +1770,19 @@ { const token* t = next (); if (! (t->type == tok_keyword && t->content == "if")) - throw parse_error ("expected 'if'"); + throw parse_error (_("expected 'if'")); if_statement* s = new if_statement; s->tok = t; t = next (); if (! (t->type == tok_operator && t->content == "(")) - throw parse_error ("expected '('"); + throw parse_error (_("expected '('")); s->condition = parse_expression (); t = next (); if (! (t->type == tok_operator && t->content == ")")) - throw parse_error ("expected ')'"); + throw parse_error (_("expected ')'")); s->thenblock = parse_statement (); @@ -1814,9 +1815,9 @@ { const token* t = next (); if (! (t->type == tok_keyword && t->content == "return")) - throw parse_error ("expected 'return'"); + throw parse_error (_("expected 'return'")); if (context != con_function) - throw parse_error ("found 'return' not in function context"); + throw parse_error (_("found 'return' not in function context")); return_statement* s = new return_statement; s->tok = t; s->value = parse_expression (); @@ -1829,7 +1830,7 @@ { const token* t = next (); if (! (t->type == tok_keyword && t->content == "delete")) - throw parse_error ("expected 'delete'"); + throw parse_error (_("expected 'delete'")); delete_statement* s = new delete_statement; s->tok = t; s->value = parse_expression (); @@ -1842,9 +1843,9 @@ { const token* t = next (); if (! (t->type == tok_keyword && t->content == "next")) - throw parse_error ("expected 'next'"); + throw parse_error (_("expected 'next'")); if (context != con_probe) - throw parse_error ("found 'next' not in probe context"); + throw parse_error (_("found 'next' not in probe context")); next_statement* s = new next_statement; s->tok = t; return s; @@ -1856,7 +1857,7 @@ { const token* t = next (); if (! (t->type == tok_keyword && t->content == "break")) - throw parse_error ("expected 'break'"); + throw parse_error (_("expected 'break'")); break_statement* s = new break_statement; s->tok = t; return s; @@ -1868,7 +1869,7 @@ { const token* t = next (); if (! (t->type == tok_keyword && t->content == "continue")) - throw parse_error ("expected 'continue'"); + throw parse_error (_("expected 'continue'")); continue_statement* s = new continue_statement; s->tok = t; return s; @@ -1880,13 +1881,13 @@ { const token* t = next (); if (! (t->type == tok_keyword && t->content == "for")) - throw parse_error ("expected 'for'"); + throw parse_error (_("expected 'for'")); for_loop* s = new for_loop; s->tok = t; t = next (); if (! (t->type == tok_operator && t->content == "(")) - throw parse_error ("expected '('"); + throw parse_error (_("expected '('")); // initializer + ";" t = peek (); @@ -1900,7 +1901,7 @@ s->init = parse_expr_statement (); t = next (); if (! (t->type == tok_operator && t->content == ";")) - throw parse_error ("expected ';'"); + throw parse_error (_("expected ';'")); } // condition + ";" @@ -1916,7 +1917,7 @@ s->cond = parse_expression (); t = next (); if (! (t->type == tok_operator && t->content == ";")) - throw parse_error ("expected ';'"); + throw parse_error (_("expected ';'")); } // increment + ")" @@ -1931,7 +1932,7 @@ s->incr = parse_expr_statement (); t = next (); if (! (t->type == tok_operator && t->content == ")")) - throw parse_error ("expected ')'"); + throw parse_error (_("expected ')'")); } // block @@ -1946,13 +1947,13 @@ { const token* t = next (); if (! (t->type == tok_keyword && t->content == "while")) - throw parse_error ("expected 'while'"); + throw parse_error (_("expected 'while'")); for_loop* s = new for_loop; s->tok = t; t = next (); if (! (t->type == tok_operator && t->content == "(")) - throw parse_error ("expected '('"); + throw parse_error (_("expected '('")); // dummy init and incr fields s->init = 0; @@ -1963,7 +1964,7 @@ t = next (); if (! (t->type == tok_operator && t->content == ")")) - throw parse_error ("expected ')'"); + throw parse_error (_("expected ')'")); // block s->block = parse_statement (); @@ -1977,7 +1978,7 @@ { const token* t = next (); if (! (t->type == tok_keyword && t->content == "foreach")) - throw parse_error ("expected 'foreach'"); + throw parse_error (_("expected 'foreach'")); foreach_loop* s = new foreach_loop; s->tok = t; s->sort_direction = 0; @@ -1986,7 +1987,7 @@ t = next (); if (! (t->type == tok_operator && t->content == "(")) - throw parse_error ("expected '('"); + throw parse_error (_("expected '('")); symbol* lookahead_sym = NULL; int lookahead_sort = 0; @@ -2045,7 +2046,7 @@ { t = next (); if (! (t->type == tok_identifier)) - throw parse_error ("expected identifier"); + throw parse_error (_("expected identifier")); symbol* sym = new symbol; sym->tok = t; sym->name = t->content; @@ -2056,7 +2057,7 @@ (t->content == "+" || t->content == "-")) { if (s->sort_direction) - throw parse_error ("multiple sort directives"); + throw parse_error (_("multiple sort directives")); s->sort_direction = (t->content == "+") ? 1 : -1; s->sort_column = s->indexes.size(); next(); @@ -2076,7 +2077,7 @@ break; } else - throw parse_error ("expected ',' or ']'"); + throw parse_error (_("expected ',' or ']'")); } else break; // expecting only one expression @@ -2084,7 +2085,7 @@ t = next (); if (! (t->type == tok_keyword && t->content == "in")) - throw parse_error ("expected 'in'"); + throw parse_error (_("expected 'in'")); s->base = parse_indexable(); @@ -2093,7 +2094,7 @@ (t->content == "+" || t->content == "-")) { if (s->sort_direction) - throw parse_error ("multiple sort directives"); + throw parse_error (_("multiple sort directives")); s->sort_direction = (t->content == "+") ? 1 : -1; s->sort_column = 0; next(); @@ -2175,7 +2176,7 @@ t = next (); if (! (t->type == tok_operator && t->content == ":")) - throw parse_error ("expected ':'"); + throw parse_error (_("expected ':'")); e->falsevalue = parse_expression (); // XXX return e; @@ -2329,7 +2330,7 @@ break; } else - throw parse_error ("expected ',' or ']'"); + throw parse_error (_("expected ',' or ']'")); } else break; // expecting only one expression @@ -2352,7 +2353,7 @@ else if (indexes.size() == 1) // no "in" - need one expression only return indexes[0]; else - throw parse_error ("unexpected comma-separated expression list"); + throw parse_error (_("unexpected comma-separated expression list")); } @@ -2545,13 +2546,13 @@ { const token* t = peek (); if (! t) - throw parse_error ("expected value"); + throw parse_error (_("expected value")); if (t->type == tok_embedded) { next (); if (! privileged) - throw parse_error ("embedded expression code in unprivileged script", false); + throw parse_error (_("embedded expression code in unprivileged script"), false); embedded_expr *e = new embedded_expr; e->tok = t; @@ -2565,7 +2566,7 @@ expression* e = parse_expression (); t = next (); if (! (t->type == tok_operator && t->content == ")")) - throw parse_error ("expected ')'"); + throw parse_error (_("expected ')'")); return e; } else if (t->type == tok_operator && t->content == "&") @@ -2668,7 +2669,7 @@ else if (name == "@max") sop->ctype = sc_max; else - throw parse_error("unknown statistic operator " + name); + throw parse_error(_("unknown statistic operator ") + name); expect_op("("); sop->tok = t; sop->stat = parse_expression (); @@ -2795,7 +2796,7 @@ continue; } else - throw parse_error ("expected ',' or ')'"); + throw parse_error (_("expected ',' or ')'")); } return f; } @@ -2840,7 +2841,7 @@ continue; } else - throw parse_error ("expected ',' or ']'"); + throw parse_error (_("expected ',' or ']'")); } return ai; } @@ -2850,7 +2851,7 @@ // so we throw a parse error. if (hop) - throw parse_error("base histogram operator where expression expected", t); + throw parse_error(_("base histogram operator where expression expected"), t); return sym; } @@ -2897,7 +2898,7 @@ return tsym; } - throw parse_error ("expected @cast or $var"); + throw parse_error (_("expected @cast or $var")); } @@ -2997,7 +2998,7 @@ } if (pprint && (peek_op ("->") || peek_op("["))) - throw parse_error("can't dereference after pretty-printing"); + throw parse_error(_("-> and [ are not accepted for a pretty-printing variable")); } /* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ diff -Nru systemtap-1.4/po/boldquot.sed systemtap-1.6/po/boldquot.sed --- systemtap-1.4/po/boldquot.sed 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/po/boldquot.sed 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,10 @@ +s/"\([^"]*\)"/“\1”/g +s/`\([^`']*\)'/‘\1’/g +s/ '\([^`']*\)' / ‘\1’ /g +s/ '\([^`']*\)'$/ ‘\1’/g +s/^'\([^`']*\)' /‘\1’ /g +s/“”/""/g +s/“/“/g +s/”/”/g +s/‘/‘/g +s/’/’/g diff -Nru systemtap-1.4/po/en@boldquot.header systemtap-1.6/po/en@boldquot.header --- systemtap-1.4/po/en@boldquot.header 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/po/en@boldquot.header 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,25 @@ +# All this catalog "translates" are quotation characters. +# The msgids must be ASCII and therefore cannot contain real quotation +# characters, only substitutes like grave accent (0x60), apostrophe (0x27) +# and double quote (0x22). These substitutes look strange; see +# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html +# +# This catalog translates grave accent (0x60) and apostrophe (0x27) to +# left single quotation mark (U+2018) and right single quotation mark (U+2019). +# It also translates pairs of apostrophe (0x27) to +# left single quotation mark (U+2018) and right single quotation mark (U+2019) +# and pairs of quotation mark (0x22) to +# left double quotation mark (U+201C) and right double quotation mark (U+201D). +# +# When output to an UTF-8 terminal, the quotation characters appear perfectly. +# When output to an ISO-8859-1 terminal, the single quotation marks are +# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to +# grave/acute accent (by libiconv), and the double quotation marks are +# transliterated to 0x22. +# When output to an ASCII terminal, the single quotation marks are +# transliterated to apostrophes, and the double quotation marks are +# transliterated to 0x22. +# +# This catalog furthermore displays the text between the quotation marks in +# bold face, assuming the VT100/XTerm escape sequences. +# Binary files /tmp/DYbL1hZvjo/systemtap-1.4/po/en.gmo and /tmp/LDb_u7dVDK/systemtap-1.6/po/en.gmo differ diff -Nru systemtap-1.4/po/en.po systemtap-1.6/po/en.po --- systemtap-1.4/po/en.po 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/po/en.po 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,5244 @@ +# English translations for systemtap package. +# Copyright (C) 2011 Red Hat Inc., and others +# This file is distributed under the same license as the systemtap package. +# Frank Ch. Eigler , 2011. +# +msgid "" +msgstr "" +"Project-Id-Version: systemtap 1.5\n" +"Report-Msgid-Bugs-To: systemtap@sourceware.org\n" +"POT-Creation-Date: 2011-07-21 08:00-0400\n" +"PO-Revision-Date: 2011-02-15 10:51-0500\n" +"Last-Translator: Frank Ch. Eigler \n" +"Language-Team: English\n" +"Language: en\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: buildrun.cxx:296 +#, fuzzy, c-format +msgid "" +"Checking \" %s \" failed with error: %s\n" +"Ensure kernel development headers & makefiles are installed." +msgstr "Ensure kernel development headers & makefiles are installed." + +#: buildrun.cxx:325 +msgid "Pass 4, preamble: (re)building SystemTap's version of uprobes." +msgstr "" + +#: buildrun.cxx:333 +#, fuzzy +msgid "Warning: failed to create directory for build uprobes." +msgstr "" +"Warning: failed to create cache directory (\" %s \"): %s, disabling cache " +"support." + +#: buildrun.cxx:362 +msgid "uprobes rebuild exit code: " +msgstr "" + +#: buildrun.cxx:421 +msgid "user-space facilities not available without kernel CONFIG_UTRACE" +msgstr "" + +#: buildrun.cxx:526 +#, fuzzy +msgid "Warning: failed to create directory for querying tracepoints." +msgstr "" +"Warning: failed to create cache directory (\" %s \"): %s, disabling cache " +"support." + +#: buildrun.cxx:607 +#, fuzzy +msgid "Warning: failed to create directory for querying types." +msgstr "" +"Warning: failed to create cache directory (\" %s \"): %s, disabling cache " +"support." + +#: buildrun.cxx:708 +#, c-format +msgid "Warning: skipping malformed @cast header \"%s\"" +msgstr "" + +#: cache.cxx:128 cache.cxx:217 +msgid "Pass 4: using cached " +msgstr "" + +#: cache.cxx:215 +msgid "Pass 3: using cached " +msgstr "" + +#: cache.cxx:249 +#, c-format +msgid "Cache limit file %s/%s missing, creating default." +msgstr "" + +#: cache.cxx:349 +msgid "Cache cleaning successful, removed entries: " +msgstr "" + +#: cache.cxx:356 +msgid "Cache cleaning skipped, no cache path." +msgstr "" + +#: coveragedb.cxx:28 +msgid "---- used probes-----" +msgstr "" + +#: coveragedb.cxx:35 coveragedb.cxx:58 +#, fuzzy +msgid "probe: " +msgstr "# probes" + +#: coveragedb.cxx:42 +msgid "local: " +msgstr "" + +#: coveragedb.cxx:45 +msgid "unused_local: " +msgstr "" + +#: coveragedb.cxx:51 +msgid "---- unused probes----- " +msgstr "" + +#: coveragedb.cxx:64 +msgid "---- used functions----- " +msgstr "" + +#: coveragedb.cxx:72 +msgid "---- unused functions----- " +msgstr "" + +#: coveragedb.cxx:74 +msgid "unused_function: " +msgstr "" + +#: coveragedb.cxx:79 +msgid "---- used globals----- " +msgstr "" + +#: coveragedb.cxx:81 coveragedb.cxx:88 +#, fuzzy +msgid "globals: " +msgstr "# globals" + +#: coveragedb.cxx:86 +msgid "---- unused globals----- " +msgstr "" + +#: coveragedb.cxx:110 coveragedb.cxx:133 coveragedb.cxx:151 +msgid "Error in statement: " +msgstr "" + +#: csclient.cxx:67 +#, c-format +msgid "" +"WARNING: The domain name, %s, does not match the DNS name(s) on the server " +"certificate:\n" +msgstr "" + +#: csclient.cxx:68 +#, fuzzy, c-format +msgid "could not find input file %s\n" +msgstr "cannot find type: %s" + +#: csclient.cxx:69 +#, c-format +msgid "could not open input file %s\n" +msgstr "" + +#: csclient.cxx:70 +#, c-format +msgid "Unable to open output file %s\n" +msgstr "" + +#: csclient.cxx:71 +#, c-format +msgid "could not write to %s\n" +msgstr "" + +#: csclient.cxx:353 +#, c-format +msgid "Unable to find alt name extension on the server certificate\n" +msgstr "" + +#: csclient.cxx:362 csclient.cxx:578 +#, c-format +msgid "Out of memory\n" +msgstr "" + +#: csclient.cxx:370 +#, c-format +msgid "Unable to decode alt name extension on server certificate\n" +msgstr "" + +#: csclient.cxx:704 +#, c-format +msgid "Unable to resolve server host name" +msgstr "" + +#: csclient.cxx:710 +#, c-format +msgid "Unable to resolve server host address" +msgstr "" + +#: csclient.cxx:756 +#, fuzzy +msgid "Using a compile server." +msgstr "" +" retry compilation using a compile server upon compilation error" + +#: csclient.cxx:806 +msgid "Passes: via server " +msgstr "" + +#: csclient.cxx:813 +#, fuzzy +msgid "Passes: via server failed. Try again with another '-v' option." +msgstr "Pass 1: parse failed. Try again with another '--vp 1' option." + +#: csclient.cxx:864 +#, fuzzy +msgid "ERROR: cannot create temporary directory (\"" +msgstr "ERROR: cannot create temporary directory (\" %s \"): %s" + +#: csclient.cxx:892 +#, fuzzy +msgid "ERROR: cannot create temporary directory " +msgstr "ERROR: cannot create temporary directory (\" %s \"): %s" + +#: csclient.cxx:1166 +#, fuzzy +msgid "Unable to find a compile server." +msgstr "" +" retry compilation using a compile server upon compilation error" + +#: csclient.cxx:1184 +msgid "A server's certificate was expired. Trying again" +msgstr "" + +#: csclient.cxx:1192 +msgid "Unable to connect to a server." +msgstr "" + +#: csclient.cxx:1239 csclient.cxx:1686 stap-serverd.cxx:1621 +msgid "Unable to set NSS export policy" +msgstr "" + +#: csclient.cxx:1253 +#, c-format +msgid "" +"Attempting SSL connection with %s\n" +" using certificates from the database in %s\n" +msgstr "" + +#: csclient.cxx:1292 +msgid " Unable to connect: " +msgstr "" + +#: csclient.cxx:1328 +#, c-format +msgid "Unable to unzip the server response '%s'\n" +msgstr "" + +#: csclient.cxx:1345 csclient.cxx:1363 csclient.cxx:1431 csclient.cxx:1738 +#, c-format +msgid "Searching \"%s\"\n" +msgstr "" + +#: csclient.cxx:1351 +msgid "Incorrect number of files in server response" +msgstr "" + +#: csclient.cxx:1359 csclient.cxx:1444 csclient.cxx:1746 +#, fuzzy +msgid " found " +msgstr "cannot find type: %s" + +#: csclient.cxx:1376 +#, c-format +msgid " found %s -- linking from %s" +msgstr "" + +#: csclient.cxx:1380 +#, c-format +msgid "Unable to link '%s' to '%s':%s\n" +msgstr "" + +#: csclient.cxx:1438 +msgid "Incorrect number of modules in server response" +msgstr "" + +#: csclient.cxx:1474 +msgid "No module was returned by the server." +msgstr "" + +#: csclient.cxx:1501 csclient.cxx:1570 cscommon.cxx:92 +#, c-format +msgid "Unable to open file '%s' for reading: " +msgstr "" + +#: csclient.cxx:1510 cscommon.cxx:101 +#, c-format +msgid "Unable to read from file '%s': " +msgstr "" + +#: csclient.cxx:1521 csclient.cxx:1556 csclient.cxx:1594 cscommon.cxx:114 +msgid "unknown error" +msgstr "" + +#: csclient.cxx:1536 +#, c-format +msgid "Unable to open file '%s' for writing: " +msgstr "" + +#: csclient.cxx:1545 +#, c-format +msgid "Unable to write to file '%s': " +msgstr "" + +#: csclient.cxx:1604 +#, c-format +msgid "Server protocol version is %s\n" +msgstr "" + +#: csclient.cxx:1605 +msgid "The server does not use localization information passed by the client\n" +msgstr "" + +#: csclient.cxx:1621 csclient.cxx:2285 +msgid "as a module signer for all users" +msgstr "" + +#: csclient.cxx:1624 csclient.cxx:2275 +msgid "as an SSL peer" +msgstr "" + +#: csclient.cxx:1626 csclient.cxx:2277 +msgid " for all users" +msgstr "" + +#: csclient.cxx:1628 csclient.cxx:2279 +msgid " for the current user" +msgstr "" + +#: csclient.cxx:1637 +msgid " is already " +msgstr "" + +#: csclient.cxx:1639 +msgid "untrusted " +msgstr "" + +#: csclient.cxx:1641 +msgid "trusted " +msgstr "" + +#: csclient.cxx:1661 +#, c-format +msgid "Unable to find or create the client certificate database directory %s: " +msgstr "" + +#: csclient.cxx:1723 +#, c-format +msgid "Unable to connect to %s" +msgstr "" + +#: csclient.cxx:1750 +#, c-format +msgid "Warning: Unable to change permissions on %s: " +msgstr "" + +#: csclient.cxx:1769 +#, c-format +msgid "Certificate database '%s' does not exist" +msgstr "" + +#: csclient.cxx:1805 csclient.cxx:1947 +msgid "Out of memory:" +msgstr "" + +#: csclient.cxx:1848 +#, c-format +msgid "Unable to query certificate database %s: " +msgstr "" + +#: csclient.cxx:1887 +#, c-format +msgid "Unable to remove certificate from %s: " +msgstr "" + +#: csclient.cxx:1917 +#, c-format +msgid "Certificate database '%s' does not exist." +msgstr "" + +#: csclient.cxx:1939 nsscommon.cxx:1148 +#, c-format +msgid "No certificate found in database %s" +msgstr "" + +#: csclient.cxx:1969 +msgid "Unable to find alt name extension on server certificate: " +msgstr "" + +#: csclient.cxx:1979 +msgid "Unable to decode alt name extension on server certificate: " +msgstr "" + +#: csclient.cxx:2125 +#, fuzzy, c-format +msgid "Warning: unsupported compile server property: %s" +msgstr "# functions" + +#: csclient.cxx:2174 +#, c-format +msgid "Systemtap Compile Server Status for '%s'" +msgstr "" + +#: csclient.cxx:2189 +#, fuzzy +msgid "No servers found" +msgstr "# probes" + +#: csclient.cxx:2226 +msgid "Only root can specify 'signer' on --trust-servers" +msgstr "" + +#: csclient.cxx:2238 +msgid "Only root can specify 'all-users' on --trust-servers" +msgstr "" + +#: csclient.cxx:2247 +msgid "Warning: Unrecognized server trust specification: " +msgstr "" + +#: csclient.cxx:2264 +msgid "No servers identified for trust" +msgstr "" + +#: csclient.cxx:2284 +msgid " and " +msgstr "" + +#: csclient.cxx:2292 +msgid "Revoking trust " +msgstr "" + +#: csclient.cxx:2294 +msgid "Adding trust " +msgstr "" + +#: csclient.cxx:2299 +msgid "Revoke trust " +msgstr "" + +#: csclient.cxx:2301 +msgid "Add trust " +msgstr "" + +#: csclient.cxx:2303 +#, c-format +msgid "in the following servers %s" +msgstr "" + +#: csclient.cxx:2318 +msgid "Server trust unchanged" +msgstr "" + +#: csclient.cxx:2496 csclient.cxx:2534 +#, c-format +msgid "Invalid port number specified: %s" +msgstr "" + +#: csclient.cxx:2515 +#, c-format +msgid "No server matching %s found" +msgstr "" + +#: csclient.cxx:2596 +msgid "Unable to determine server trust as an SSL peer" +msgstr "" + +#: csclient.cxx:2642 +msgid "Unable to determine server trust as a module signer" +msgstr "" + +#: csclient.cxx:2709 +msgid "Unable to detect server compatibility" +msgstr "" + +#: csclient.cxx:2893 +#, c-format +msgid "Failed to resolve service '%s' of type '%s' in domain '%s': %s" +msgstr "" + +#: csclient.cxx:2950 +#, c-format +msgid "Avahi browse failed: %s" +msgstr "" + +#: csclient.cxx:2963 +#, c-format +msgid "Failed to resolve service '%s': %s" +msgstr "" + +#: csclient.cxx:2984 +#, c-format +msgid "Avahi Server connection failure: %s" +msgstr "" + +#: csclient.cxx:3030 +msgid "Failed to create Avahi simple poll object" +msgstr "" + +#: csclient.cxx:3046 +#, c-format +msgid "Failed to create Avahi client: %s" +msgstr "" + +#: csclient.cxx:3058 +#, c-format +msgid "Failed to create Avahi service browser: %s" +msgstr "" + +#: csclient.cxx:3105 +msgid "Unable to detect online servers" +msgstr "" + +#: dtrace.in:165 +msgid "Usage " +msgstr "" + +#: dtrace.in:169 +msgid "Where -h builds a systemtap header file from the .d file" +msgstr "" + +#: dtrace.in:170 +msgid " -C when used with -h, also run cpp preprocessor" +msgstr "" + +#: dtrace.in:171 +msgid " -o specifies an explicit output file name," +msgstr "" + +#: dtrace.in:172 +msgid " the default for -G is file.o and -h is file.h" +msgstr "" + +#: dtrace.in:173 +msgid " -I when running cpp pass through this -I include Path" +msgstr "" + +#: dtrace.in:174 +msgid " -s specifies the name of the .d input file" +msgstr "" + +#: dtrace.in:175 +msgid " -G builds a stub file.o from file.d," +msgstr "" + +#: dtrace.in:176 +msgid " which is required by some packages that use dtrace." +msgstr "" + +#: dwarf_wrappers.cxx:25 +#, c-format +msgid "libdwfl failure (%s): " +msgstr "" + +#: dwarf_wrappers.cxx:37 +#, c-format +msgid "libdw failure (%s): " +msgstr "" + +#: dwflpp.cxx:127 +#, fuzzy +msgid "cannot find " +msgstr "cannot find type: %s" + +#: dwflpp.cxx:144 session.cxx:1488 +msgid "WARNING: " +msgstr "WARNING: " + +#: dwflpp.cxx:235 +#, c-format +msgid "pattern '%s' matches module '%s'\n" +msgstr "" + +#: dwflpp.cxx:265 +#, c-format +msgid "pattern '%s' matches function '%s'\n" +msgstr "" + +#: dwflpp.cxx:321 dwflpp.cxx:347 +#, c-format +msgid "missing %s kernel/module debuginfo under '%s'" +msgstr "" + +#: dwflpp.cxx:364 +#, fuzzy, c-format +msgid "missing process %s %s debuginfo" +msgstr "# probes" + +#: dwflpp.cxx:566 +#, c-format +msgid "die parent cache %s:%s size %zu" +msgstr "" + +#: dwflpp.cxx:782 +#, c-format +msgid "global alias cache %s:%s size %zu" +msgstr "" + +#: dwflpp.cxx:845 +#, c-format +msgid "function cache %s:%s size %zu" +msgstr "" + +#: dwflpp.cxx:858 +#, c-format +msgid "function cache %s:%s hit %s" +msgstr "" + +#: dwflpp.cxx:880 dwflpp.cxx:898 +#, c-format +msgid "function cache %s:%s match %s vs %s" +msgstr "" + +#: dwflpp.cxx:932 +#, c-format +msgid "module function cache %s size %zu" +msgstr "" + +#: dwflpp.cxx:946 +#, c-format +msgid "module function cache %s hit %s" +msgstr "" + +#: dwflpp.cxx:1096 +#, fuzzy, c-format +msgid "module %s --ldd skipped: unsupported interpreter: %s" +msgstr "# functions" + +#: dwflpp.cxx:1113 +#, c-format +msgid "library iteration on %s failed: %s" +msgstr "" + +#: dwflpp.cxx:1142 +#, c-format +msgid "Added -d '%s" +msgstr "" + +#: dwflpp.cxx:1144 +#, c-format +msgid "' due to '%s'" +msgstr "" + +#: dwflpp.cxx:1157 +#, fuzzy, c-format +msgid "Warning: failed to read libraries from %s: %s" +msgstr "" +"Warning: failed to create cache directory (\" %s \"): %s, disabling cache " +"support." + +#: dwflpp.cxx:1198 +#, c-format +msgid "alternative line %d rejected: nsrcs=%zu" +msgstr "" + +#: dwflpp.cxx:1215 +#, c-format +msgid "alternative line %d accepted: fn=%s" +msgstr "" + +#: dwflpp.cxx:1227 +#, c-format +msgid "alternative line %d accepted: ifn=%s" +msgstr "" + +#. TRANSLATORS: given line number leaves (is beyond) given function. +#: dwflpp.cxx:1234 +#, c-format +msgid "alternative line %d rejected: leaves selected fns" +msgstr "" + +#: dwflpp.cxx:1300 +msgid "Invalid line range (" +msgstr "" + +#: dwflpp.cxx:1302 +msgid ", the end line number " +msgstr "" + +#: dwflpp.cxx:1374 +#, c-format +msgid "multiple addresses for %s:%d" +msgstr "" + +#. TRANSLATORS: Here we are trying to advise what source file +#. TRANSLATORS: to attempt. +#: dwflpp.cxx:1379 +msgid " (try " +msgstr "" + +#: dwflpp.cxx:1383 +msgid " or " +msgstr "" + +#: dwflpp.cxx:1454 +#, c-format +msgid "" +"label '%s' at address %s (dieoffset: %s) is not contained by its scope " +"'%s' (dieoffset: %s) -- bad debuginfo?" +msgstr "" + +#: dwflpp.cxx:1508 +#, fuzzy, c-format +msgid "selected source file '%s'\n" +msgstr "# functions" + +#: dwflpp.cxx:1578 +#, c-format +msgid "missing entrypc dwarf line record for function '%s'\n" +msgstr "" + +#: dwflpp.cxx:1588 +#, c-format +msgid "null entrypc dwarf line record for function '%s'\n" +msgstr "" + +#: dwflpp.cxx:1596 +#, c-format +msgid "" +"searching for prologue of function '%s' 0x%#-0x%#@%s:%d\n" +msgstr "" + +#: dwflpp.cxx:1621 +#, c-format +msgid "checking line record 0x%#@%s:%d\n" +msgstr "" + +#: dwflpp.cxx:1638 +#, fuzzy, c-format +msgid "prologue found function '%s'" +msgstr "# functions" + +#. TRANSLATORS: Here we're adding some classification datum (ie Prologue Free) +#: dwflpp.cxx:1641 +msgid " (naked)" +msgstr "" + +#. TRANSLATORS: Here we're adding some classification datum (ie Prologue Free) +#: dwflpp.cxx:1643 +msgid " (tail-call?)" +msgstr "" + +#: dwflpp.cxx:1707 +#, c-format +msgid ", ignored %s more" +msgstr "" + +#: dwflpp.cxx:1716 +msgid " (skip comdat)" +msgstr "" + +#: dwflpp.cxx:1721 +#, c-format +msgid "entry-pc lookup (%s dieoffset: %s) = 0x%# (rc %d" +msgstr "" + +#: dwflpp.cxx:1837 +msgid "emit_address internal error, no dwfl" +msgstr "" + +#: dwflpp.cxx:1843 +#, c-format +msgid "" +"emit_address internal error, dwfl_addrmodule failed, address 0x%#" +msgstr "" + +#: dwflpp.cxx:1862 +#, c-format +msgid "" +"emit dwarf addr 0x%# => module %s section %s relocaddr 0x%#" +msgstr "" + +#: dwflpp.cxx:1967 +msgid " in " +msgstr "" + +#: dwflpp.cxx:1970 elaborate.cxx:580 +msgid " (alternatives:" +msgstr "" + +#: dwflpp.cxx:1966 +#, c-format +msgid "unable to find local '%s' near pc %s %s %s %s (%s)" +msgstr "" + +#: dwflpp.cxx:2001 +#, fuzzy, c-format +msgid "unable to get die scopes for '%s' in an inlined subroutine" +msgstr "cannot get die scopes inlined_subroutine: %s" + +#: dwflpp.cxx:2052 +#, fuzzy, c-format +msgid "not accessible at this address (%s, dieoffset: %s)" +msgstr "not accessible at this address" + +#: dwflpp.cxx:2058 +#, fuzzy, c-format +msgid "dwarf_getlocation_addr failed, %s" +msgstr "dwarf_getlocation_addr: %s" + +#: dwflpp.cxx:2081 +#, c-format +msgid " Error: %s isn't a struct/class/union" +msgstr "" + +#: dwflpp.cxx:2091 +#, c-format +msgid "%s is empty" +msgstr "" + +#: dwflpp.cxx:2123 +#, c-format +msgid "" +"\n" +" Error in obtaining type attribute for anonymous member at %s:%d" +msgstr "" + +#: dwflpp.cxx:2197 +#, fuzzy, c-format +msgid "no location for field '%s':%s" +msgstr "no location for field %s: %s" + +#: dwflpp.cxx:2208 +#, c-format +msgid "cannot get type of field: %s" +msgstr "cannot get type of field: %s" + +#: dwflpp.cxx:2254 +#, fuzzy, c-format +msgid "invalid access '%s' vs '%s'" +msgstr "bad field for array type: %s" + +#: dwflpp.cxx:2282 +#, fuzzy, c-format +msgid "invalid access '%s' for array type" +msgstr "bad field for array type: %s" + +#: dwflpp.cxx:2294 +#, c-format +msgid "invalid access '%s' for %s" +msgstr "" + +#: dwflpp.cxx:2301 +#, c-format +msgid "unresolved %s" +msgstr "" + +#: dwflpp.cxx:2326 +#, c-format +msgid "unable to find member '%s' for %s%s%s" +msgstr "" + +#: dwflpp.cxx:2343 +#, c-format +msgid "invalid access '%s' vs. %s" +msgstr "" + +#: dwflpp.cxx:2348 +#, c-format +msgid "cannot find type: %s" +msgstr "cannot find type: %s" + +#: dwflpp.cxx:2352 +#, fuzzy, c-format +msgid "%s: unexpected type tag %s" +msgstr "%s: unexpected type tag %#x" + +#: dwflpp.cxx:2372 +#, fuzzy, c-format +msgid "cannot get type of pointee: %s" +msgstr "cannot get type of field: %s" + +#: dwflpp.cxx:2401 +#, fuzzy +msgid "cannot write to member address" +msgstr "cannot index into constant value" + +#: dwflpp.cxx:2404 +#, fuzzy +msgid "cannot take address of bit-field" +msgstr "cannot take the address of a bit field" + +#: dwflpp.cxx:2418 +#, c-format +msgid "unsupported type tag %s for %s" +msgstr "" + +#: dwflpp.cxx:2425 +#, c-format +msgid "'%s' is being accessed instead of a member" +msgstr "" + +#: dwflpp.cxx:2440 +#, c-format +msgid "unsupported type (mystery encoding %s for %s" +msgstr "" + +#: dwflpp.cxx:2449 +#, c-format +msgid "unsupported type (encoding %s) for %s" +msgstr "" + +#: dwflpp.cxx:2474 +#, fuzzy +msgid "cannot write to array address" +msgstr "cannot index into constant value" + +#: dwflpp.cxx:2477 +#, fuzzy +msgid "cannot write to reference" +msgstr "cannot index into constant value" + +#: dwflpp.cxx:2550 +#, c-format +msgid "finding symtable address for %s\n" +msgstr "" + +#: dwflpp.cxx:2554 +msgid "Getting symbols" +msgstr "" + +#: dwflpp.cxx:2569 +#, c-format +msgid "found %s @0x%#\n" +msgstr "" + +#: dwflpp.cxx:2589 +#, c-format +msgid "" +"finding location for local '%s' near address 0x%#, module bias 0x" +"%#\n" +msgstr "" + +#: dwflpp.cxx:2620 +#, c-format +msgid "failed to retrieve location attribute for local '%s' (dieoffset: %s)" +msgstr "" + +#: dwflpp.cxx:2630 dwflpp.cxx:2664 +#, c-format +msgid "failed to retrieve type attribute for local '%s'" +msgstr "" + +#: dwflpp.cxx:2679 +#, c-format +msgid "literal_stmt_for_return: finding return value for %s (%s)\n" +msgstr "" + +#: dwflpp.cxx:2692 +#, c-format +msgid "failed to retrieve return value location for %s (%s)" +msgstr "" + +#: dwflpp.cxx:2699 +#, c-format +msgid "function %s (%s) has no return value" +msgstr "" + +#: dwflpp.cxx:2714 dwflpp.cxx:2745 +#, c-format +msgid "failed to retrieve return value type attribute for %s (%s)" +msgstr "" + +#: dwflpp.cxx:2761 +#, c-format +msgid "literal_stmt_for_pointer: finding value for %s (%s)\n" +msgstr "" + +#: dwflpp.cxx:2879 +msgid " skipping - init/exit" +msgstr "" + +#: dwflpp.cxx:2887 +msgid " skipping - __kprobes" +msgstr "" + +#: dwflpp.cxx:2902 +msgid " guru mode enabled - ignoring blacklist" +msgstr "" + +#: dwflpp.cxx:2907 +msgid " skipping - blacklisted" +msgstr "" + +#: dwflpp.cxx:3046 +msgid "blacklist regexps:" +msgstr "" + +#: dwflpp.cxx:3054 +msgid "blacklist_func regcomp failed" +msgstr "" + +#: dwflpp.cxx:3056 +msgid "blacklist_func_ret regcomp failed" +msgstr "" + +#: dwflpp.cxx:3058 +msgid "blacklist_file regcomp failed" +msgstr "" + +#: dwflpp.cxx:3060 +msgid "blacklist_section regcomp failed" +msgstr "" + +#: dwflpp.cxx:3244 +#, fuzzy +msgid "not found cfa" +msgstr "cannot find type: %s" + +#: dwflpp.cxx:3251 +#, c-format +msgid "found cfa, info: %d [start: 0x%#, end: 0x%#, nops: %zu" +msgstr "" + +#: elaborate.cxx:144 elaborate.cxx:159 +msgid "derived_probe with no locations" +msgid_plural "derived_probe with no locations" +msgstr[0] "" +msgstr[1] "" + +#: elaborate.cxx:201 +msgid "unprivileged users: authorized" +msgstr "" + +#: elaborate.cxx:207 +msgid "unprivileged users: authorized for process owner" +msgstr "" + +#: elaborate.cxx:359 +msgid "invalid use of wildcard probe point component" +msgstr "" + +#: elaborate.cxx:414 +#, c-format +msgid "probe point truncated at position %s (follow: %s)" +msgstr "" + +#: elaborate.cxx:421 +msgid "probe point is not allowed for unprivileged users" +msgstr "" + +#: elaborate.cxx:498 +#, c-format +msgid "probe point mismatch at position %s (alternatives: %s)" +msgstr "" + +#: elaborate.cxx:519 +#, c-format +msgid "wildcard '%s' matched '%s'" +msgstr "" + +#: elaborate.cxx:565 +msgid " (alternatives: " +msgstr "" + +#: elaborate.cxx:563 +#, c-format +msgid "probe point mismatch at position %s %s didn't find any wildcard matches" +msgstr "" + +#: elaborate.cxx:579 +#, c-format +msgid "probe point mismatch at position %s %s" +msgstr "" + +#: elaborate.cxx:613 +msgid "inappropriate" +msgstr "" + +#: elaborate.cxx:651 +#, c-format +msgid "Recursive loop in alias expansion of %s at %s" +msgstr "" + +#: elaborate.cxx:740 +msgid "recursion limit reached" +msgstr "" + +#: elaborate.cxx:788 +msgid "no match" +msgstr "" + +#: elaborate.cxx:816 +#, fuzzy +msgid " while resolving probe point " +msgstr " while registering probe alias " + +#: elaborate.cxx:863 +msgid "Expecting symbol or array index expression" +msgstr "" + +#: elaborate.cxx:916 +msgid "Assignment to read-only histogram bucket" +msgstr "" + +#: elaborate.cxx:948 +#, c-format +msgid "variable '%s' modified during 'foreach' iteration" +msgstr "" + +#: elaborate.cxx:970 +#, c-format +msgid "function call modifies var '%s' during 'foreach' iteration" +msgstr "" + +#: elaborate.cxx:1058 +#, c-format +msgid "multiple histogram types declared on '%s'" +msgstr "" + +#: elaborate.cxx:1086 +#, c-format +msgid "unable to infer statistic parameters for global '%s'" +msgstr "" + +#: elaborate.cxx:1167 +msgid "probe condition must not modify any variables" +msgstr "" + +#: elaborate.cxx:1172 +msgid "probe condition must not include impure embedded-C" +msgstr "" + +#: elaborate.cxx:1226 +#, c-format +msgid "Turning on task_finder vma_tracker, pragma:vma found in %s" +msgstr "" + +#: elaborate.cxx:1353 +msgid "" +"This global uses tapset constructs that are dependent on systemtap version" +msgstr "" + +#: elaborate.cxx:1358 +msgid "" +"This function uses tapset constructs that are dependent on systemtap version" +msgstr "" + +#: elaborate.cxx:1366 +msgid "" +"This probe uses tapset constructs that are dependent on systemtap version" +msgstr "" + +#: elaborate.cxx:1368 +msgid "" +"This alias uses tapset constructs that are dependent on systemtap version" +msgstr "" + +#: elaborate.cxx:1651 +#, fuzzy +msgid "no probes found" +msgstr "# probes" + +#: elaborate.cxx:1714 elaborate.cxx:1825 +#, c-format +msgid "unresolved arity-%zu global array %s, missing global declaration?" +msgstr "" + +#: elaborate.cxx:1764 +msgid "unresolved array in delete statement" +msgstr "" + +#: elaborate.cxx:1798 +msgid "probe condition must not reference undeclared global" +msgstr "" + +#: elaborate.cxx:1846 +msgid "probe condition must not reference function" +msgstr "" + +#: elaborate.cxx:1861 +#, c-format +msgid "unresolved arity-%zu function" +msgstr "" + +#: elaborate.cxx:1908 +#, c-format +msgid "cross-file global variable reference to %s from" +msgstr "" + +#: elaborate.cxx:1962 +#, c-format +msgid " function %s is defined from %s" +msgstr "" + +#: elaborate.cxx:2002 elaborate.cxx:2004 +#, fuzzy, c-format +msgid "Eliding unused function '%s'" +msgstr "# functions" + +#: elaborate.cxx:2060 elaborate.cxx:2105 elaborate.cxx:2151 +#, c-format +msgid "Eliding unused variable '%s'" +msgstr "" + +#: elaborate.cxx:2062 +#, fuzzy, c-format +msgid "Eliding unused local variable %s in %s" +msgstr "store supported only for base type" + +#: elaborate.cxx:2088 elaborate.cxx:2136 elaborate.cxx:2173 +msgid "(alternatives:" +msgstr "" + +#: elaborate.cxx:2086 elaborate.cxx:2134 +#, c-format +msgid "never-assigned local variable '%s' %s" +msgstr "" + +#: elaborate.cxx:2107 +#, c-format +msgid "Eliding unused local variable %s in function %s" +msgstr "" + +#: elaborate.cxx:2153 +#, fuzzy, c-format +msgid "Eliding unused global variable %s" +msgstr "store supported only for base type" + +#: elaborate.cxx:2172 +#, c-format +msgid "never assigned global variable '%s' %s" +msgstr "" + +#: elaborate.cxx:2240 +#, c-format +msgid "Eliding assignment to %s at %s" +msgstr "" + +#: elaborate.cxx:2263 +#, c-format +msgid "Eliding unused error string catcher %s at %s" +msgstr "" + +#: elaborate.cxx:2328 +msgid "Eliding side-effect-free null statement " +msgstr "" + +#: elaborate.cxx:2348 +msgid "Flattening nested block " +msgstr "" + +#: elaborate.cxx:2360 +msgid "Eliding side-effect-free empty block " +msgstr "" + +#: elaborate.cxx:2366 +msgid "Eliding side-effect-free singleton block " +msgstr "" + +#: elaborate.cxx:2384 +msgid "Eliding empty try {} block " +msgstr "" + +#: elaborate.cxx:2408 +msgid "Eliding side-effect-free if statement " +msgstr "" + +#: elaborate.cxx:2416 +msgid "Creating simple evaluation from if statement " +msgstr "" + +#: elaborate.cxx:2430 +msgid "Inverting the condition of if statement " +msgstr "" + +#: elaborate.cxx:2454 +msgid "Eliding side-effect-free foreach statement " +msgstr "" + +#: elaborate.cxx:2476 +msgid "Eliding side-effect-free for statement " +msgstr "" + +#: elaborate.cxx:2518 +msgid "Eliding side-effect-free expression " +msgstr "" + +#: elaborate.cxx:2556 +#, c-format +msgid "side-effect-free probe '%s'" +msgstr "" + +#: elaborate.cxx:2580 +#, fuzzy, c-format +msgid "side-effect-free function '%s'" +msgstr "# functions" + +#: elaborate.cxx:2700 +msgid "Creating if statement from unused logical-or " +msgstr "" + +#: elaborate.cxx:2731 +msgid "Creating if statement from unused logical-and " +msgstr "" + +#: elaborate.cxx:2757 +msgid "Creating if statement from unused ternary expression " +msgstr "" + +#: elaborate.cxx:2787 +msgid "Eliding unused binary " +msgstr "" + +#: elaborate.cxx:2815 +msgid "Eliding unused unary " +msgstr "" + +#: elaborate.cxx:2856 +msgid "Eliding side-effect-free function call " +msgstr "" + +#: elaborate.cxx:2888 +msgid "Eliding unused print " +msgstr "" + +#: elaborate.cxx:2935 +msgid "Eliding unused target symbol " +msgstr "" + +#: elaborate.cxx:2969 +msgid "Eliding unused typecast " +msgstr "" + +#: elaborate.cxx:2986 +msgid "Eliding unused check " +msgstr "" + +#: elaborate.cxx:3095 +#, c-format +msgid "Collapsing constant-% if-statement %s" +msgstr "" + +#: elaborate.cxx:3121 +msgid "Collapsing constantly-false for-loop " +msgstr "" + +#: elaborate.cxx:3147 +msgid "Collapsing constantly-limited foreach-loop " +msgstr "" + +#: elaborate.cxx:3194 +msgid "unsupported binary operator " +msgstr "" + +#: elaborate.cxx:3234 +msgid "Collapsing constant-identity binary operator " +msgstr "" + +#: elaborate.cxx:3248 +#, c-format +msgid "Collapsing constant-% binary operator %s" +msgstr "" + +#: elaborate.cxx:3266 +msgid "Collapsing constant unary " +msgstr "" + +#: elaborate.cxx:3280 +#, fuzzy +msgid "unsupported unary operator " +msgstr "# functions" + +#: elaborate.cxx:3324 +msgid "Collapsing constant logical-OR " +msgstr "" + +#: elaborate.cxx:3371 +msgid "Collapsing constant logical-AND " +msgstr "" + +#: elaborate.cxx:3414 +msgid "Collapsing constant-boundary comparison " +msgstr "" + +#: elaborate.cxx:3432 +msgid "Collapsing constant comparison " +msgstr "" + +#: elaborate.cxx:3449 +#, fuzzy +msgid "unsupported comparison operator " +msgstr "# functions" + +#: elaborate.cxx:3465 +msgid "Collapsing constant concatenation " +msgstr "" + +#: elaborate.cxx:3477 +msgid "Collapsing identity concatenation " +msgstr "" + +#: elaborate.cxx:3498 +#, c-format +msgid "Collapsing constant-% ternary %s" +msgstr "" + +#: elaborate.cxx:3513 +msgid "Collapsing untouched @defined check " +msgstr "" + +#: elaborate.cxx:3533 +msgid "Bad $context variable being substituted with literal 0" +msgstr "" + +#: elaborate.cxx:3536 +msgid "Bad $context variable being substituted with literal 0, " +msgstr "" + +#: elaborate.cxx:3581 +#, fuzzy, c-format +msgid "Changing %s reference to %s reference\n" +msgstr "cannot index into constant value" + +#: elaborate.cxx:3993 +#, fuzzy +msgid "unsupported assignment operator " +msgstr "# functions" + +#: elaborate.cxx:4170 +msgid "Resolution problem with " +msgstr "" + +#. TRANSLATORS: simply saying not an issue with a probe or function +#: elaborate.cxx:4185 +msgid "other" +msgstr "" + +#: elaborate.cxx:4191 +msgid "unresolved target-symbol expression" +msgstr "" + +#: elaborate.cxx:4198 +#, fuzzy +msgid "unexpected @defined" +msgstr "# functions" + +#: elaborate.cxx:4205 +msgid "@entry is only valid in .return probes" +msgstr "" + +#: elaborate.cxx:4217 +#, fuzzy, c-format +msgid "type definition '%s' not found" +msgstr "field name %s not found" + +#: elaborate.cxx:4378 +msgid "Activating uprobes support because /* pragma:uprobes */ seen." +msgstr "" + +#: elaborate.cxx:4519 translate.cxx:3055 +msgid "invalid operand of delete expression" +msgstr "" + +#: elaborate.cxx:4635 +msgid "Unspecified conversion in print operator format string" +msgstr "" + +#: elaborate.cxx:4651 +msgid "Wrong number of args to formatted print operator" +msgstr "" + +#: elaborate.cxx:4788 +msgid "array locals not supported, missing global declaration? " +msgstr "" + +#: elaborate.cxx:4798 +msgid "stat locals not supported, missing global declaration? " +msgstr "" + +#: elaborate.cxx:4813 +#, fuzzy +msgid "unresolved type " +msgstr "# functions" + +#: elaborate.cxx:4828 +#, fuzzy +msgid "invalid operator" +msgstr "bad field for array type: %s" + +#: elaborate.cxx:4830 +msgid "invalid type " +msgstr "" + +#: elaborate.cxx:4863 elaborate.cxx:4877 +#, c-format +msgid "type mismatch ( %s vs. %s )" +msgstr "" + +#: elaborate.cxx:4884 +#, c-format +msgid "type was first inferred here ( %s )" +msgstr "" + +#: hash.cxx:130 +msgid "result:" +msgstr "" + +#: hash.cxx:199 +#, fuzzy, c-format +msgid "" +"Warning: failed to create cache directory (\"%s\") %s, disabling cache " +"support" +msgstr "" +"Warning: failed to create cache directory (\" %s \"): %s, disabling cache " +"support." + +#. TRANSLATORS: failure to find an address that was a constant literal number +#: loc2c.c:175 +#, c-format +msgid "cannot get constant address: %s" +msgstr "cannot get constant address: %s" + +#: loc2c.c:195 +#, c-format +msgid "cannot get constant block: %s" +msgstr "cannot get constant block: %s" + +#: loc2c.c:210 +#, c-format +msgid "cannot get string constant: %s" +msgstr "cannot get string constant: %s" + +#: loc2c.c:224 +#, c-format +msgid "cannot get constant value: %s" +msgstr "cannot get constant value: %s" + +#: loc2c.c:301 +#, c-format +msgid "%s in DWARF expression [%Zu] at % (%#x: %, %)" +msgstr "%s in DWARF expression [%Zu] at % (%#x: %, %)" + +#: loc2c.c:912 +msgid "required DW_AT_frame_base attribute not supplied" +msgstr "required DW_AT_frame_base attribute not supplied" + +#: loc2c.c:926 +#, c-format +msgid "dwarf_getlocation_addr (form %#x): %s" +msgstr "dwarf_getlocation_addr (form %#x): %s" + +#: loc2c.c:932 +msgid "DW_AT_frame_base not accessible at this address" +msgstr "DW_AT_frame_base not accessible at this address" + +#: loc2c.c:941 +msgid "No cfa_ops supplied, but needed by DW_OP_call_frame_cfa" +msgstr "No cfa_ops supplied, but needed by DW_OP_call_frame_cfa" + +#: loc2c.c:976 +msgid "not accessible at this address" +msgstr "not accessible at this address" + +#: loc2c.c:1522 loc2c.c:2435 +msgid "cannot handle offset into register in fetch" +msgstr "cannot handle offset into register in fetch" + +#: loc2c.c:1527 +msgid "noncontiguous location for base fetch" +msgstr "noncontiguous location for base fetch" + +#: loc2c.c:1531 loc2c.c:1574 +msgid "pointer has been optimized out" +msgstr "pointer has been optimized out" + +#: loc2c.c:1535 +msgid "location not available" +msgstr "location not available" + +#: loc2c.c:1565 +msgid "cannot handle offset into register in store" +msgstr "cannot handle offset into register in store" + +#: loc2c.c:1570 +msgid "noncontiguous location for base store" +msgstr "noncontiguous location for base store" + +#: loc2c.c:1578 +msgid "location is computed value, cannot store" +msgstr "location is computed value, cannot store" + +#: loc2c.c:1582 +msgid "location is constant value, cannot store" +msgstr "location is constant value, cannot store" + +#: loc2c.c:1586 +msgid "location is not available, cannot store" +msgstr "location is not available, cannot store" + +#: loc2c.c:1676 +msgid "stack value too big for fetch ???" +msgstr "stack value too big for fetch ???" + +#: loc2c.c:1680 +msgid "single register too big for fetch/store ???" +msgstr "single register too big for fetch/store ???" + +#: loc2c.c:1684 +msgid "implicit pointer too big for fetch/store ???" +msgstr "implicit pointer too big for fetch/store ???" + +#: loc2c.c:1689 +#, fuzzy +msgid "cannot support noncontiguous location" +msgstr "cannot take address of noncontiguous object" + +#: loc2c.c:1717 +msgid "declaring noncontig union for depth > 9, too many pieces" +msgstr "declaring noncontig union for depth > 9, too many pieces" + +#: loc2c.c:1766 loc2c.c:2117 loc2c.c:2206 +#, c-format +msgid "cannot get byte_size attribute for type %s: %s" +msgstr "cannot get byte_size attribute for type %s: %s" + +#: loc2c.c:1807 +#, c-format +msgid "cannot get bit field parameters: %s" +msgstr "cannot get bit field parameters: %s" + +#: loc2c.c:1882 +msgid "fetch is larger than base integer types" +msgstr "fetch is larger than base integer types" + +#. TRANSLATORS: CU stands for 'compilation unit' +#: loc2c.c:1902 +#, c-format +msgid "cannot determine CU address size from %s: %s" +msgstr "cannot determine CU address size from %s: %s" + +#: loc2c.c:2022 +msgid "store is larger than base integer types" +msgstr "store is larger than base integer types" + +#: loc2c.c:2152 +msgid "cannot take the address of a bit field" +msgstr "cannot take the address of a bit field" + +#: loc2c.c:2163 +msgid "cannot take address of object in register" +msgstr "cannot take address of object in register" + +#: loc2c.c:2166 +msgid "cannot take address of noncontiguous object" +msgstr "cannot take address of noncontiguous object" + +#: loc2c.c:2169 +msgid "cannot take address of computed value" +msgstr "cannot take address of computed value" + +#: loc2c.c:2172 +msgid "cannot take address of constant value" +msgstr "cannot take address of constant value" + +#: loc2c.c:2175 +msgid "cannot take address of unavailable value" +msgstr "cannot take address of unavailable value" + +#: loc2c.c:2178 +msgid "cannot take address of implicit pointer" +msgstr "cannot take address of implicit pointer" + +#. TRANSLATORS: This refers to the basic type, (stripped of const/volatile/etc.) +#: loc2c.c:2230 +#, c-format +msgid "cannot get inner type of type %s: %s" +msgstr "cannot get inner type of type %s: %s" + +#: loc2c.c:2242 +#, c-format +msgid "cannot get byte_size attribute for array element type %s: %s" +msgstr "cannot get byte_size attribute for array element type %s: %s" + +#: loc2c.c:2247 +msgid "confused about array element size" +msgstr "confused about array element size" + +#: loc2c.c:2261 +#, c-format +msgid "cannot get byte_stride attribute array type %s: %s" +msgstr "cannot get byte_stride attribute array type %s: %s" + +#: loc2c.c:2269 +#, c-format +msgid "cannot get element type of array type %s: %s" +msgstr "cannot get element type of array type %s: %s" + +#: loc2c.c:2288 +msgid "cannot dynamically index noncontiguous array" +msgstr "cannot dynamically index noncontiguous array" + +#. TRANSLATORS: The index is constant +#: loc2c.c:2300 +msgid "constant index is outside noncontiguous array" +msgstr "constant index is outside noncontiguous array" + +#: loc2c.c:2302 +msgid "noncontiguous array splits elements" +msgstr "noncontiguous array splits elements" + +#: loc2c.c:2323 +msgid "cannot index array stored in a register" +msgstr "cannot index array stored in a register" + +#: loc2c.c:2325 +msgid "constant index is outside array held in register" +msgstr "constant index is outside array held in register" + +#: loc2c.c:2335 +msgid "cannot index into constant value" +msgstr "cannot index into constant value" + +#. TRANSLATORS: The index is constant +#: loc2c.c:2338 +msgid "constant index is outside constant array value" +msgstr "constant index is outside constant array value" + +#: loc2c.c:2349 +msgid "cannot index into implicit pointer" +msgstr "cannot index into implicit pointer" + +#: loc2c.c:2356 +msgid "cannot index into computed value" +msgstr "cannot index into computed value" + +#: loc2c.c:2361 +msgid "cannot index into unavailable value" +msgstr "cannot index into unavailable value" + +#: main.cxx:179 +msgid "# global embedded code" +msgstr "# global embedded code" + +#: main.cxx:189 +msgid "# globals" +msgstr "# globals" + +#: main.cxx:204 +msgid "# functions" +msgstr "# functions" + +#: main.cxx:212 main.cxx:236 +msgid " # locals" +msgstr " # locals" + +#: main.cxx:228 +msgid "# probes" +msgstr "# probes" + +#: main.cxx:311 +#, c-format +msgid "Checking \"%s\" failed with error: %s" +msgstr "Checking \"%s\" failed with error: %s" + +#: main.cxx:330 +#, c-format +msgid "Parsed kernel \"%s\", " +msgstr "Parsed kernel \"%s\", " + +#: main.cxx:331 +#, fuzzy, c-format +msgid "containing %zu tuple" +msgid_plural "containing %zu tuples" +msgstr[0] "containing %zu tuple" +msgstr[1] "containing %zu tuple" + +#: main.cxx:346 +#, fuzzy, c-format +msgid "" +"Checking \"%s\" failed with error: %s\n" +"Ensure kernel development headers & makefiles are installed" +msgstr "Ensure kernel development headers & makefiles are installed." + +#: main.cxx:363 +#, fuzzy, c-format +msgid "Parsed kernel %s, which contained one vmlinux export" +msgid_plural "Parsed kernel %s, which contained %zu vmlinux exports" +msgstr[0] "which contained one vmlinux export" +msgstr[1] "which contained one vmlinux export" + +#. TRANSLATORS: we can't make the directory due to the error +#: main.cxx:392 +#, c-format +msgid "ERROR: cannot create temporary directory (\" %s \"): %s" +msgstr "ERROR: cannot create temporary directory (\" %s \"): %s" + +#: main.cxx:399 +#, c-format +msgid "Created temporary directory \"%s\"" +msgstr "Created temporary directory \"%s\"" + +#: main.cxx:409 +#, c-format +msgid "Keeping temporary directory \"%s\"" +msgstr "Keeping temporary directory \"%s\"" + +#: main.cxx:437 +msgid "ERROR: kernel release isn't specified" +msgstr "ERROR: kernel release isn't specified" + +#: main.cxx:439 +#, c-format +msgid "ERROR: kernel release isn't found in \"%s\"" +msgstr "ERROR: kernel release isn't found in \"%s\"" + +#: main.cxx:459 +msgid "" +"Note: --use-server --unprivileged was selected because of stapusr membership." +msgstr "" + +#: main.cxx:463 +msgid "" +"WARNING: Without NSS, using a compile-server is not supported by this " +"version of systemtap" +msgstr "" +"WARNING: Without NSS, using a compile-server is not supported by this " +"version of systemtap" + +#: main.cxx:594 +#, c-format +msgid "" +"usage error: tapset file '%s' cannot be run directly as a session script." +msgstr "" +"usage error: tapset file '%s' cannot be run directly as a session script." + +#. TRANSLATORS: Searching through directories, 'processed' means 'examined so far' +#: main.cxx:621 +#, c-format +msgid "Searched: \" %s \", found: %zu, processed: %u" +msgstr "Searched: \" %s \", found: %zu, processed: %u" + +#: main.cxx:633 +msgid "# parse tree dump" +msgstr "# parse tree dump" + +#: main.cxx:670 +msgid "Pass 1: parse failed. Try again with another '--vp 1' option." +msgstr "Pass 1: parse failed. Try again with another '--vp 1' option." + +#: main.cxx:703 +msgid "Pass 2: analysis failed. Try again with another '--vp 01' option." +msgstr "Pass 2: analysis failed. Try again with another '--vp 01' option." + +#: main.cxx:779 +msgid "Pass 3: translation failed. Try again with another '--vp 001' option." +msgstr "Pass 3: translation failed. Try again with another '--vp 001' option." + +#: main.cxx:816 +msgid "Pass 4: compilation failed. Try again with another '--vp 0001' option." +msgstr "" +"Pass 4: compilation failed. Try again with another '--vp 0001' option." + +#: main.cxx:860 +msgid "Pass 5: starting run." +msgstr "Pass 5: starting run." + +#: main.cxx:872 +msgid "Pass 5: run failed. Try again with another '--vp 00001' option." +msgstr "Pass 5: run failed. Try again with another '--vp 00001' option." + +#: main.cxx:900 +msgid "Coverage database not available without libsqlite3" +msgstr "Coverage database not available without libsqlite3" + +#: main.cxx:924 +#, fuzzy +msgid "Attempting compilation using a compile server" +msgstr "" +" retry compilation using a compile server upon compilation error" + +#: main.cxx:982 +#, c-format +msgid "Session arch: %s release: %s" +msgstr "Session arch: %s release: %s" + +#: nsscommon.cxx:101 +#, fuzzy, c-format +msgid "Could not open log file %s" +msgstr "cannot find type: %s" + +#: nsscommon.cxx:145 nsscommon.cxx:158 +#, c-format +msgid "(%d) %s" +msgstr "" + +#: nsscommon.cxx:172 +#, c-format +msgid "Error initializing NSS for %s" +msgstr "" + +#: nsscommon.cxx:187 +#, c-format +msgid "Unable to shutdown NSS for database %s" +msgstr "" + +#: nsscommon.cxx:197 +msgid "Unable to shutdown NSS" +msgstr "" + +#: nsscommon.cxx:265 +msgid "Cannot prompt for certificate database password. stdin is not a tty" +msgstr "" + +#: nsscommon.cxx:278 +#, c-format +msgid "Password for certificate database in %s: " +msgstr "" + +#: nsscommon.cxx:314 nsscommon.cxx:865 +#, c-format +msgid "Could not search certificate database directory %s" +msgstr "" + +#: nsscommon.cxx:320 +#, c-format +msgid "Could not remove %s" +msgstr "" + +#: nsscommon.cxx:327 +#, c-format +msgid "" +"Could not remove certificate database directory %s\n" +"%s" +msgstr "" + +#: nsscommon.cxx:359 +msgid "Passwords do not match" +msgstr "" + +#: nsscommon.cxx:370 +msgid "Too many password attempts" +msgstr "" + +#: nsscommon.cxx:382 +#, c-format +msgid "Could not initialize pin for certificate database %s" +msgstr "" + +#: nsscommon.cxx:395 +#, c-format +msgid "Unable to authenticate the default slot for certificate database %s" +msgstr "" + +#: nsscommon.cxx:422 +msgid "Unable to generate public/private key pair" +msgstr "" + +#: nsscommon.cxx:434 +msgid "Unable to create subject public key info for certificate request" +msgstr "" + +#: nsscommon.cxx:444 +msgid "Unable to create certificate request" +msgstr "" + +#: nsscommon.cxx:466 +msgid "Unable to create certificate validity dates" +msgstr "" + +#: nsscommon.cxx:480 nsscommon.cxx:976 +msgid "Unable to create certificate" +msgstr "" + +#: nsscommon.cxx:494 +msgid "Unable to allocate certificate extensions" +msgstr "" + +#: nsscommon.cxx:513 +msgid "Unable to encode certificate type extensions" +msgstr "" + +#: nsscommon.cxx:524 nsscommon.cxx:542 +msgid "Unable to allocate alternate DNS name extension for certificate" +msgstr "" + +#: nsscommon.cxx:572 +msgid "Unable to encode alternate DNS name extension for certificate" +msgstr "" + +#: nsscommon.cxx:581 +msgid "Unable to add alternate DNS name extension for certificate" +msgstr "" + +#: nsscommon.cxx:596 +msgid "Unable to complete alternate DNS name extension for certificate" +msgstr "" + +#: nsscommon.cxx:617 +msgid "" +"Unable to determine the signature algorithm for the signing the certificate" +msgstr "" + +#: nsscommon.cxx:626 +msgid "Unable to set the signature algorithm for signing the certificate" +msgstr "" + +#: nsscommon.cxx:642 +msgid "Unable to encode the certificate for signing" +msgstr "" + +#: nsscommon.cxx:650 +msgid "Unable to allocate memory for signing the certificate" +msgstr "" + +#: nsscommon.cxx:657 +msgid "Unable to sign the certificate" +msgstr "" + +#: nsscommon.cxx:673 nsscommon.cxx:797 +msgid "Unable to decode certificate" +msgstr "" + +#: nsscommon.cxx:685 +#, c-format +msgid "Unable to import certificate into the database at %s" +msgstr "" + +#: nsscommon.cxx:694 +msgid "Unable to allocate certificate trust" +msgstr "" + +#: nsscommon.cxx:702 +msgid "Unable decode trust string 'PCu,,PCu'" +msgstr "" + +#: nsscommon.cxx:712 nsscommon.cxx:842 +msgid "Unable to change certificate trust" +msgstr "" + +#: nsscommon.cxx:729 +#, c-format +msgid "" +"Could not open certificate file %s for reading\n" +"%s" +msgstr "" + +#: nsscommon.cxx:739 +#, c-format +msgid "" +"Could not obtain information about certificate file %s\n" +"%s" +msgstr "" + +#: nsscommon.cxx:752 +#, c-format +msgid "" +"Error reading from certificate file %s\n" +"%s" +msgstr "" + +#: nsscommon.cxx:771 nsscommon.cxx:898 +#, c-format +msgid "Could not create certificate database directory %s" +msgstr "" + +#: nsscommon.cxx:806 nsscommon.cxx:927 +#, c-format +msgid "Could not obtain internal key slot for certificate database %s" +msgstr "" + +#: nsscommon.cxx:816 +#, c-format +msgid "Could not import certificate into the database at %s" +msgstr "" + +#: nsscommon.cxx:825 +msgid "Could not allocate certificate trust" +msgstr "" + +#: nsscommon.cxx:832 +msgid "Unable decode trust string 'P,P,P'" +msgstr "" + +#: nsscommon.cxx:874 +#, c-format +msgid "Could set file permissions for %s" +msgstr "" + +#: nsscommon.cxx:885 +#, c-format +msgid "Generating a new certificate database directory in %s" +msgstr "" + +#: nsscommon.cxx:944 +msgid "Unable to encode certificate common header" +msgstr "" + +#: nsscommon.cxx:996 +#, c-format +msgid "" +"Error writing to certificate file %s\n" +"%s" +msgstr "" + +#: nsscommon.cxx:1003 +#, c-format +msgid "" +"Could not open certificate file %s for writing\n" +"%s" +msgstr "" + +#: nsscommon.cxx:1013 +#, c-format +msgid "Unable to add certificate to %s" +msgstr "" + +#: nsscommon.cxx:1063 +msgid "NSS library failure in CERT_CreateSubjectCertList" +msgstr "" + +#: nsscommon.cxx:1084 +msgid "Could not decode certificate validity" +msgstr "" + +#: nsscommon.cxx:1089 +msgid "Could not decode certificate validity time" +msgstr "" + +#: nsscommon.cxx:1098 +msgid "Could not format certificate validity time" +msgstr "" + +#: nsscommon.cxx:1124 +#, c-format +msgid "Certificate database %s does not exist" +msgstr "" + +#: nsscommon.cxx:1131 +#, c-format +msgid "Certificate database %s is obsolete" +msgstr "" + +#: nsscommon.cxx:1152 +#, c-format +msgid "Certificate found in database %s" +msgstr "" + +#: nsscommon.cxx:1164 +#, c-format +msgid " Not Valid Before: %s UTC" +msgstr "" + +#: nsscommon.cxx:1166 +#, c-format +msgid " Not Valid After: %s UTC" +msgstr "" + +#: nsscommon.cxx:1172 +#, fuzzy +msgid "Certificate is valid" +msgstr "A script must be specified." + +#: nsscommon.cxx:1178 +#, fuzzy +msgid "Certificate is not valid" +msgstr "A script must be specified." + +#: nsscommon.cxx:1197 +msgid "Unable to generate new certificate" +msgstr "" + +#: nsscommon.cxx:1214 +#, c-format +msgid "Unable to find certificate with nickname %s in %s." +msgstr "" + +#: nsscommon.cxx:1232 +#, c-format +msgid "" +"Unable to obtain private key from the certificate with nickname %s in %s." +msgstr "" + +#: nsscommon.cxx:1243 +msgid "Could not create signing context" +msgstr "" + +#: nsscommon.cxx:1250 +msgid "Could not initialize signing context." +msgstr "" + +#: nsscommon.cxx:1259 +#, fuzzy, c-format +msgid "Could not open module file %s" +msgstr "cannot find type: %s" + +#: nsscommon.cxx:1272 +#, c-format +msgid "Error reading module file %s" +msgstr "" + +#: nsscommon.cxx:1281 +#, c-format +msgid "Error while signing module file %s" +msgstr "" + +#: nsscommon.cxx:1291 +#, c-format +msgid "Could not complete signature of module file %s" +msgstr "" + +#: nsscommon.cxx:1305 +#, fuzzy, c-format +msgid "Could not open signature file %s" +msgstr "cannot find type: %s" + +#: nsscommon.cxx:1313 +#, c-format +msgid "Error writing to signature file %s" +msgstr "" + +#: parse.cxx:261 +#, fuzzy +msgid "parse error: " +msgstr "semantic error: %s" + +#: parse.cxx:265 +msgid "\tat: " +msgstr "" + +#: parse.cxx:273 parse.cxx:277 +msgid "\tsaw: " +msgstr "" + +#: parse.cxx:311 parse.cxx:373 +msgid "expected comparison operator" +msgstr "" + +#: parse.cxx:343 parse.cxx:398 +msgid "expected string literal" +msgstr "" + +#: parse.cxx:376 +msgid "wildcard not allowed with order comparison operators" +msgstr "" + +#: parse.cxx:411 parse.cxx:430 +#, fuzzy +msgid "expected '==' or '!='" +msgstr "# functions" + +#: parse.cxx:471 +msgid "" +"expected string, number literal or other CONFIG_... as right side operand" +msgstr "" + +#: parse.cxx:489 +msgid "expected string literal as right value" +msgstr "" + +#: parse.cxx:492 +msgid "expected number literal as right value" +msgstr "" + +#: parse.cxx:495 +msgid "" +"expected 'arch' or 'kernel_v' or 'kernel_vr' or 'CONFIG_...'\n" +" or comparison between strings or integers" +msgstr "" + +#. TRANSLATORS: 'conditional' meaning 'conditional preprocessing' +#: parse.cxx:523 +msgid "incomplete conditional at end of file" +msgstr "" + +#: parse.cxx:530 parse.cxx:536 parse.cxx:550 +msgid "incomplete conditional - missing '%('" +msgstr "" + +#: parse.cxx:538 +msgid "invalid conditional - duplicate '%:'" +msgstr "" + +#: parse.cxx:571 +msgid "incomplete condition after '%('" +msgstr "" + +#: parse.cxx:603 +msgid "expected '%?' marker for conditional" +msgstr "" + +#: parse.cxx:653 +msgid "unexpected end-of-file" +msgstr "" + +#: parse.cxx:686 +#, fuzzy, c-format +msgid "expected '%s'" +msgstr "# functions" + +#: parse.cxx:696 +#, fuzzy +msgid "expected " +msgstr "# functions" + +#: parse.cxx:737 +msgid "expected number" +msgstr "" + +#: parse.cxx:752 parse.cxx:1752 +msgid "number invalid or out of range" +msgstr "" + +#: parse.cxx:934 parse.cxx:954 +msgid "invalid nested substitution of command line arguments" +msgstr "" + +#: parse.cxx:1011 +msgid "Could not find matching closing quote" +msgstr "" + +#: parse.cxx:1101 +msgid "Could not find matching '%}' to close embedded function block" +msgstr "" + +#: parse.cxx:1203 +msgid "expected 'probe', 'global', 'function', or '%{'" +msgstr "" + +#: parse.cxx:1233 +#, c-format +msgid "Input file '%s' is empty or missing." +msgstr "" + +#: parse.cxx:1239 +#, fuzzy, c-format +msgid "%d parse error." +msgid_plural "%d parse errors." +msgstr[0] "semantic error: %s" +msgstr[1] "semantic error: %s" + +#: parse.cxx:1255 +#, fuzzy +msgid "expected 'probe'" +msgstr "# functions" + +#: parse.cxx:1273 parse.cxx:1282 +msgid "probe point alias name cannot be optional nor sufficient" +msgstr "" + +#: parse.cxx:1301 +msgid "expected probe point specifier" +msgstr "" + +#: parse.cxx:1337 +#, fuzzy +msgid "expected '%{'" +msgstr "# functions" + +#: parse.cxx:1340 +msgid "embedded code in unprivileged script" +msgstr "" + +#: parse.cxx:1356 +#, fuzzy +msgid "expected '{'" +msgstr "# functions" + +#: parse.cxx:1410 parse.cxx:1489 parse.cxx:1552 parse.cxx:1586 parse.cxx:2049 +msgid "expected identifier" +msgstr "" + +#: parse.cxx:1465 +msgid "expected statement" +msgstr "" + +#: parse.cxx:1483 +#, fuzzy +msgid "expected 'global'" +msgstr "# functions" + +#: parse.cxx:1493 +msgid "duplicate global name" +msgstr "" + +#: parse.cxx:1509 +msgid "array size out of range" +msgstr "" + +#: parse.cxx:1518 +msgid "only scalar globals can be initialized" +msgstr "" + +#: parse.cxx:1545 +#, fuzzy +msgid "expected 'function'" +msgstr "# functions" + +#: parse.cxx:1556 +msgid "duplicate function name" +msgstr "" + +#: parse.cxx:1570 parse.cxx:1601 +#, fuzzy +msgid "expected 'string' or 'long'" +msgstr "# functions" + +#: parse.cxx:1576 parse.cxx:1683 parse.cxx:1779 parse.cxx:1890 parse.cxx:1956 +#: parse.cxx:1990 +#, fuzzy +msgid "expected '('" +msgstr "# functions" + +#: parse.cxx:1610 parse.cxx:2799 +#, fuzzy +msgid "expected ',' or ')'" +msgstr "# functions" + +#: parse.cxx:1634 +#, fuzzy +msgid "expected identifier or '*'" +msgstr "# functions" + +#: parse.cxx:1653 parse.cxx:1690 parse.cxx:1785 parse.cxx:1935 parse.cxx:1967 +#: parse.cxx:2569 +#, fuzzy +msgid "expected ')'" +msgstr "# functions" + +#: parse.cxx:1701 +msgid "expected one of '. , ( ? ! { = +='" +msgstr "" + +#: parse.cxx:1760 +msgid "expected literal string or number" +msgstr "" + +#: parse.cxx:1773 +#, fuzzy +msgid "expected 'if'" +msgstr "# functions" + +#: parse.cxx:1818 +#, fuzzy +msgid "expected 'return'" +msgstr "# functions" + +#: parse.cxx:1820 +msgid "found 'return' not in function context" +msgstr "" + +#: parse.cxx:1833 +msgid "expected 'delete'" +msgstr "" + +#: parse.cxx:1846 +#, fuzzy +msgid "expected 'next'" +msgstr "# functions" + +#: parse.cxx:1848 +msgid "found 'next' not in probe context" +msgstr "" + +#: parse.cxx:1860 +#, fuzzy +msgid "expected 'break'" +msgstr "# functions" + +#: parse.cxx:1872 +#, fuzzy +msgid "expected 'continue'" +msgstr "# functions" + +#: parse.cxx:1884 +#, fuzzy +msgid "expected 'for'" +msgstr "# functions" + +#: parse.cxx:1904 parse.cxx:1920 +#, fuzzy +msgid "expected ';'" +msgstr "# functions" + +#: parse.cxx:1950 +msgid "expected 'while'" +msgstr "" + +#: parse.cxx:1981 +#, fuzzy +msgid "expected 'foreach'" +msgstr "# functions" + +#: parse.cxx:2060 parse.cxx:2097 +msgid "multiple sort directives" +msgstr "" + +#: parse.cxx:2080 parse.cxx:2333 parse.cxx:2844 +#, fuzzy +msgid "expected ',' or ']'" +msgstr "# functions" + +#: parse.cxx:2088 +#, fuzzy +msgid "expected 'in'" +msgstr "# functions" + +#: parse.cxx:2179 +#, fuzzy +msgid "expected ':'" +msgstr "# functions" + +#: parse.cxx:2356 +msgid "unexpected comma-separated expression list" +msgstr "" + +#: parse.cxx:2549 +msgid "expected value" +msgstr "" + +#: parse.cxx:2555 +msgid "embedded expression code in unprivileged script" +msgstr "" + +#: parse.cxx:2672 +msgid "unknown statistic operator " +msgstr "" + +#: parse.cxx:2854 +msgid "base histogram operator where expression expected" +msgstr "" + +#: parse.cxx:2901 +#, fuzzy +msgid "expected @cast or $var" +msgstr "# functions" + +#: parse.cxx:3001 +#, fuzzy +msgid "-> and [ are not accepted for a pretty-printing variable" +msgstr "cannot get type of variable: %s" + +#: remote.cxx:48 +#, c-format +msgid "string doesn't appear to be a URI: %s" +msgstr "" + +#: remote.cxx:99 util.cxx:655 +#, c-format +msgid "Warning: %s exited with status: %d" +msgstr "" + +#: remote.cxx:255 +msgid "stapsh file ERROR: no reply" +msgstr "" + +#: remote.cxx:257 +#, c-format +msgid "stapsh file replied %s" +msgstr "" + +#: remote.cxx:332 +msgid "stapsh run ERROR: no reply" +msgstr "" + +#: remote.cxx:334 +#, c-format +msgid "stapsh run replied %s" +msgstr "" + +#: remote.cxx:369 +msgid "stapsh file descriptors already set" +msgstr "" + +#: remote.cxx:376 +msgid "invalid file descriptors for stapsh" +msgstr "" + +#: remote.cxx:379 +msgid "error sending hello to stapsh" +msgstr "" + +#: remote.cxx:383 +msgid "error receiving hello from stapsh" +msgstr "" + +#: remote.cxx:389 +msgid "failed to get uname from stapsh" +msgstr "" + +#: remote.cxx:428 remote.cxx:499 +msgid "error launching stapsh" +msgstr "" + +#: remote.cxx:511 +msgid "error establishing ssh connection" +msgstr "" + +#: remote.cxx:575 +msgid "No tmpdir available for ssh control master" +msgstr "" + +#: remote.cxx:606 +#, c-format +msgid "failed to create an ssh control master for %s : rc= %d" +msgstr "" + +#: remote.cxx:610 +#, c-format +msgid "Created ssh control master at %s" +msgstr "" + +#: remote.cxx:624 +#, c-format +msgid "failed to stop the ssh control master for %s : rc=%d" +msgstr "" + +#: remote.cxx:643 +#, c-format +msgid "failed to get uname from %s : rc= %d" +msgstr "" + +#: remote.cxx:668 +#, c-format +msgid "failed to make a tempdir on %s : rc=%d" +msgstr "" + +#: remote.cxx:683 +#, c-format +msgid "failed to copy the module to %s : rc=%d" +msgstr "" + +#: remote.cxx:698 +#, c-format +msgid "failed to run the module on %s : ret=%d" +msgstr "" + +#: remote.cxx:726 +#, c-format +msgid "failed to delete the tempdir on %s : rc=%d" +msgstr "" + +#: remote.cxx:774 +msgid "ssh target requires a hostname" +msgstr "" + +#: remote.cxx:776 +msgid "ssh target URI doesn't support a /path" +msgstr "" + +#: remote.cxx:778 +msgid "ssh target URI doesn't support a ?query" +msgstr "" + +#: remote.cxx:780 +msgid "ssh target URI doesn't support a #fragment" +msgstr "" + +#: remote.cxx:809 +#, c-format +msgid "unrecognized URI scheme '%s' in remote: %s" +msgstr "" + +#: rpm_finder.cxx:71 +msgid "Error reading the rpm configuration files" +msgstr "" + +#: rpm_finder.cxx:104 rpm_finder.cxx:123 rpm_finder.cxx:159 +msgid "Error querying the rpm file `" +msgstr "" + +#: rpm_finder.cxx:207 +msgid "Incorrect version or missing kernel-devel package, use: yum install " +msgstr "" + +#: rpm_finder.cxx:210 +msgid "Missing separate debuginfos, use: debuginfo-install " +msgstr "" + +#: rpm_finder.cxx:213 +msgid "Incorrect parameter passed, please report this error." +msgstr "" + +#: runtime/staprun/common.c:81 +msgid "Invalid FILE name format\n" +msgstr "" + +#: runtime/staprun/common.c:141 +#, fuzzy, c-format +msgid "Invalid buffer size '%d' (should be 1-4095).\n" +msgstr "Invalid buffer size (should be 1-4095)." + +#: runtime/staprun/common.c:177 +#, c-format +msgid "Invalid file size option '%s'.\n" +msgstr "" + +#: runtime/staprun/common.c:190 +msgid "File name is too long.\n" +msgstr "" + +#: runtime/staprun/common.c:196 +msgid "Filename format is invalid or too long.\n" +msgstr "" + +#: runtime/staprun/common.c:201 +#, fuzzy +msgid "You can't specify the '-A' and '-L' options together.\n" +msgstr "You can't specify -c and -x options together." + +#: runtime/staprun/common.c:206 +msgid "" +"You can't specify the '-A' and '-b' options together. The '-b'\n" +"buffer size option only has an effect when the module is inserted.\n" +msgstr "" + +#: runtime/staprun/common.c:212 +msgid "" +"You can't specify the '-A' and '-c' options together. The '-c cmd'\n" +"option used to start a command only has an effect when the module\n" +"is inserted.\n" +msgstr "" + +#: runtime/staprun/common.c:219 +msgid "" +"You can't specify the '-A' and '-x' options together. The '-x pid'\n" +"option only has an effect when the module is inserted.\n" +msgstr "" + +#: runtime/staprun/common.c:225 +#, fuzzy +msgid "You can't specify the '-c' and '-x' options together.\n" +msgstr "You can't specify -c and -x options together." + +#: runtime/staprun/common.c:230 +#, fuzzy +msgid "You can't specify the '-D' and '-L' options together.\n" +msgstr "You can't specify -c and -x options together." + +#: runtime/staprun/common.c:234 +#, fuzzy +msgid "You can't specify the '-D' and '-d' options together.\n" +msgstr "You can't specify -c and -x options together." + +#: runtime/staprun/common.c:238 +#, fuzzy +msgid "You can't specify the '-D' and '-c' options together.\n" +msgstr "You can't specify -c and -x options together." + +#: runtime/staprun/common.c:242 +#, fuzzy +msgid "You have to specify output FILE with '-D' option.\n" +msgstr "You can't specify multiple --kmap options." + +#: runtime/staprun/common.c:246 +#, fuzzy +msgid "You have to specify output FILE with '-S' option.\n" +msgstr "You can't specify multiple --kmap options." + +#: runtime/staprun/common.c:253 +#, c-format +msgid "" +"\n" +"%s [-v] [-w] [-u] [-c cmd ] [-x pid] [-u user] [-A|-L|-d]\n" +"\t[-b bufsize] [-o FILE [-D] [-S size[,N]]] MODULE [module-options]\n" +msgstr "" + +#: runtime/staprun/common.c:255 +msgid "" +"-v Increase verbosity.\n" +"-w Suppress warnings.\n" +"-u Load uprobes.ko\n" +"-c cmd Command 'cmd' will be run and staprun will\n" +" exit when it does. The '_stp_target' variable\n" +" will contain the pid for the command.\n" +"-x pid Sets the '_stp_target' variable to pid.\n" +"-o FILE Send output to FILE. This supports strftime(3)\n" +" formats for FILE.\n" +"-b buffer size The systemtap module specifies a buffer size.\n" +" Setting one here will override that value. The\n" +" value should be an integer between 1 and 4095 \n" +" which be assumed to be the buffer size in MB.\n" +" That value will be per-cpu in bulk mode.\n" +"-L Load module and start probes, then detach.\n" +"-A Attach to loaded systemtap module.\n" +"-d Delete a module. Only detached or unused modules\n" +" the user has permission to access will be deleted. Use \"*" +"\"\n" +" (quoted) to delete all unused modules.\n" +"-R Have staprun create a new name for the module before\n" +" inserting it. This allows the same module to be inserted\n" +" more than once.\n" +"-R (Module renaming is not available in this configuration.)\n" +"-D Run in background. This requires '-o' option.\n" +"-S size[,N] Switches output file to next file when the size\n" +" of file reaches the specified size. The value\n" +" should be an integer greater than 1 which is\n" +" assumed to be the maximum file size in MB.\n" +" When the number of output files reaches N, it\n" +" switches to the first output file. You can omit\n" +" the second argument.\n" +"\n" +"MODULE can be either a module name or a module path. If a\n" +"module name is used, it is searched in the following directory:\n" +msgstr "" + +#: runtime/staprun/common.c:336 runtime/staprun/common.c:361 +#: runtime/staprun/common.c:380 runtime/staprun/common.c:387 +msgid "Memory allocation failed. Exiting.\n" +msgstr "" + +#: runtime/staprun/common.c:352 +msgid "Unable to determine kernel version, uname failed" +msgstr "" + +#: runtime/staprun/common.c:400 +#, c-format +msgid "ERROR: Module name ('%s') is too long.\n" +msgstr "" + +#: runtime/staprun/common.c:491 +msgid "exceeded maximum send_request size.\n" +msgstr "" + +#: runtime/staprun/ctl.c:38 +#, c-format +msgid "ERROR: Can not attach. Module %s not running.\n" +msgstr "" + +#: runtime/staprun/ctl.c:40 +#, c-format +msgid "Couldn't open control channel '%s'" +msgstr "" + +#: runtime/staprun/mainloop.c:68 +#, c-format +msgid "Warning: child process exited with signal %d (%s)\n" +msgstr "" + +#: runtime/staprun/mainloop.c:73 +#, c-format +msgid "Warning: child process exited with status %d\n" +msgstr "" + +#: runtime/staprun/mainloop.c:124 +msgid "failed to create thread" +msgstr "" + +#: runtime/staprun/mainloop.c:206 +msgid "wordexp: syntax error (unmatched quotes?) in -c COMMAND\n" +msgstr "" + +#: runtime/staprun/mainloop.c:209 +#, c-format +msgid "wordexp: parsing error (%d)\n" +msgstr "" + +#: runtime/staprun/mainloop.c:317 runtime/staprun/mainloop.c:323 +msgid "Couldn't read bufsize" +msgstr "" + +#: runtime/staprun/mainloop.c:343 +msgid "Failed to initialize control channel.\n" +msgstr "" + +#: runtime/staprun/mainloop.c:378 +msgid "Failed to daemonize stapio\n" +msgstr "" + +#: runtime/staprun/mainloop.c:393 +msgid "Failed to open /dev/null\n" +msgstr "" + +#: runtime/staprun/mainloop.c:444 +#, c-format +msgid "" +"\n" +"Disconnecting from systemtap module.\n" +"To reconnect, type \"staprun -A %s\"\n" +msgstr "" + +#: runtime/staprun/mainloop.c:560 +#, c-format +msgid "Unexpected EOF in read (nb=%ld)" +msgstr "" + +#: runtime/staprun/mainloop.c:575 +#, fuzzy, c-format +msgid "write error (nb=%ld)" +msgstr "semantic error: %s" + +#: runtime/staprun/mainloop.c:608 +msgid "WARNING deduplication table full\n" +msgstr "" + +#: runtime/staprun/mainloop.c:674 +msgid "ptrace detach" +msgstr "" + +#: runtime/staprun/mainloop.c:707 +#, c-format +msgid "WARNING: ignored message of type %d\n" +msgstr "" + +#: runtime/staprun/stapio.c:46 +msgid "ERROR: Cannot have module options with attach (-A).\n" +msgstr "" + +#: runtime/staprun/stapio.c:57 +msgid "ERROR: Need a module name or path to load.\n" +msgstr "" + +#: runtime/staprun/stapio.c:65 +msgid "ERROR: Couldn't enter main loop. Exiting.\n" +msgstr "" + +#: session.cxx:186 +#, fuzzy, c-format +msgid "" +"Warning: failed to create systemtap data directory \"%s\":%s, disabling " +"cache support." +msgstr "" +"Warning: failed to create systemtap data driector \"%s\":%s, disablig cache " +"support." + +#: session.cxx:198 +#, c-format +msgid "" +"Warning: failed to create cache directory (\" %s \"): %s, disabling cache " +"support." +msgstr "" +"Warning: failed to create cache directory (\" %s \"): %s, disabling cache " +"support." + +#: session.cxx:363 +#, c-format +msgid "" +"Systemtap translator/driver (version %s/%s %s)\n" +"Copyright (C) 2005-2011 Red Hat, Inc. and others\n" +"This is free software; see the source for copying conditions." +msgstr "" + +#: session.cxx:367 +msgid "enabled features:" +msgstr "enabled features:" + +#: session.cxx:402 +#, c-format +msgid "" +"Usage: stap [options] FILE Run script in file.\n" +" or: stap [options] - Run script on stdin.\n" +" or: stap [options] -e SCRIPT Run given script.\n" +" or: stap [options] -l PROBE List matching probes.\n" +" or: stap [options] -L PROBE List matching probes and local " +"variables.\n" +"\n" +"Options:\n" +" -- end of translator options, script options follow\n" +" -h --help show help\n" +" -V --version show version\n" +" -p NUM stop after pass NUM 1-5, instead of %d\n" +" (parse, elaborate, translate, compile, run)\n" +" -v add verbosity to all passes\n" +" --vp {N}+ add per-pass verbosity [" +msgstr "" + +#: session.cxx:427 session.cxx:428 session.cxx:429 session.cxx:430 +msgid " [set]" +msgstr " [set]" + +#: session.cxx:419 +#, c-format +msgid "" +" -k keep temporary directory\n" +" -u unoptimized translation %s\n" +" -w suppress warnings %s\n" +" -W turn warnings into errors %s\n" +" -g guru mode %s\n" +" -P prologue-searching for function probes %s\n" +" -b bulk (percpu file) mode %s\n" +" -s NUM buffer size in megabytes, instead of %d\n" +" -I DIR look in DIR for additional .stp script files" +msgstr "" + +#: session.cxx:434 session.cxx:461 +msgid ", in addition to" +msgstr ", in addition to" + +#: session.cxx:438 +#, c-format +msgid "" +" -D NM=VAL emit macro definition into generated C code\n" +" -B NM=VAL pass option to kbuild make\n" +" -G VAR=VAL set global variable to value\n" +" -R DIR look in DIR for runtime, instead of\n" +" %s\n" +" -r DIR cross-compile to kernel with given build tree; or else\n" +" -r RELEASE cross-compile to kernel /lib/modules/RELEASE/build, instead " +"of\n" +" %s\n" +" -a ARCH cross-compile to given architecture, instead of %s\n" +" -m MODULE set probe module name, instead of \n" +" %s\n" +" -o FILE send script output to file, instead of stdout. This supports\n" +" strftime(3) formats for FILE\n" +" -c CMD start the probes, run CMD, and exit when it finishes\n" +" -x PID sets target() to PID\n" +" -F run as on-file flight recorder with -o.\n" +" run as on-memory flight recorder without -o.\n" +" -S size[,n] set maximum of the size and the number of files.\n" +" -d OBJECT add unwind/symbol data for OBJECT file" +msgstr "" + +#: session.cxx:468 +#, c-format +msgid "" +" --ldd add unwind/symbol data for all referenced object files.\n" +" --all-modules\n" +" add unwind/symbol data for all loaded kernel objects.\n" +" -t collect probe timing information\n" +" -q generate information on tapset coverage\n" +" --unprivileged\n" +" restrict usage to features available to unprivileged users\n" +" --kelf make do with symbol table from vmlinux\n" +" --kmap[=FILE]\n" +" make do with symbol table from nm listing\n" +" --compatible=VERSION\n" +" suppress incompatible language/tapset changes beyond VERSION,\n" +" instead of %s\n" +" --check-version\n" +" displays warnings where a syntax element may be \n" +" version dependent\n" +" --skip-badvars\n" +" substitute zero for bad context $variables\n" +" --use-server[=SERVER-SPEC]\n" +" specify systemtap compile-servers\n" +" --list-servers[=PROPERTIES]\n" +" report on the status of the specified compile-servers:\n" +" all,specified,online,trusted,signer,compatible\n" +" --trust-servers[=TRUST-SPEC]\n" +" add/revoke trust of specified compile-servers:\n" +" ssl,signer,all-users,revoke,no-prompt\n" +" --use-server-on-error[=yes/no]\n" +" retry compilation using a compile server upon compilation " +"error\n" +" --remote=HOSTNAME\n" +" run pass 5 on the specified ssh host.\n" +" may be repeated for targeting multiple hosts.\n" +" --remote-prefix\n" +" prefix each line of remote output with a host index.\n" +" --tmpdir=NAME\n" +" specify name of temporary directory to be used." +msgstr "" + +#: session.cxx:643 +msgid "Invalid pass number (should be 1-5)." +msgstr "Invalid pass number (should be 1-5)." + +#: session.cxx:648 +msgid "Listing (-l) mode implies pass 2." +msgstr "Listing (-l) mode implies pass 2." + +#: session.cxx:685 session.cxx:849 +msgid "Only one script can be given on the command line." +msgstr "Only one script can be given on the command line." + +#: session.cxx:701 session.cxx:758 session.cxx:830 session.cxx:864 +#, fuzzy, c-format +msgid "ERROR: %s invalid with %s" +msgstr "ERROR: -R invalid with --client-options" + +#: session.cxx:718 session.cxx:736 +#, c-format +msgid "Truncating module name to '%s'" +msgstr "Truncating module name to '%s'" + +#: session.cxx:724 +msgid "Module name cannot be empty." +msgstr "Module name cannot be empty." + +#: session.cxx:787 +msgid "Invalid buffer size (should be 1-4095)." +msgstr "Invalid buffer size (should be 1-4095)." + +#: session.cxx:800 +msgid "Empty CMD string invalid." +msgstr "Empty CMD string invalid." + +#: session.cxx:809 +msgid "Invalid target process ID number." +msgstr "Invalid target process ID number." + +#: session.cxx:885 +msgid "You can't specify multiple --kmap options." +msgstr "You can't specify multiple --kmap options." + +#: session.cxx:916 +msgid "Invalid --vp argument: it takes 1 to 5 digits." +msgstr "Invalid --vp argument: it takes 1 to 5 digits." + +#: session.cxx:967 +#, c-format +msgid "Invalid argument '%s' for --use-server-on-error." +msgstr "" + +#: session.cxx:995 session.cxx:1002 session.cxx:1009 session.cxx:1022 +#: session.cxx:1031 session.cxx:1039 session.cxx:1048 +#, fuzzy, c-format +msgid "ERROR: %s is invalid with %s" +msgstr "ERROR: -R invalid with --client-options" + +#: session.cxx:1062 +#, c-format +msgid "Unhandled long argument id %d" +msgstr "Unhandled long argument id %d" + +#: session.cxx:1076 +#, c-format +msgid "Unhandled argument code %d" +msgstr "Unhandled argument code %d" + +#: session.cxx:1118 +msgid "A script must be specified." +msgstr "A script must be specified." + +#: session.cxx:1125 +msgid "WARNING: --client-options is not supported by this version of systemtap" +msgstr "" +"WARNING: --client-options is not supported by this version of systemtap" + +#: session.cxx:1129 +msgid "WARNING: --trust-servers is not supported by this version of systemtap" +msgstr "WARNING: --trust-servers is not supported by this version of systemtap" + +#: session.cxx:1136 +msgid "Warning: Ignoring --use-server due to the use of -R" +msgstr "Warning: Ignoring --use-server due to the use of -R" + +#: session.cxx:1160 +msgid "Using --unprivileged for member of the group stapusr" +msgstr "Using --unprivileged for member of the group stapusr" + +#: session.cxx:1167 +msgid "Using --use-server for member of the group stapusr" +msgstr "Using --use-server for member of the group stapusr" + +#: session.cxx:1176 +#, c-format +msgid "You can't specify %s when --unprivileged is specified." +msgstr "You can't specify %s when --unprivileged is specified." + +#: session.cxx:1182 session.cxx:1187 session.cxx:1194 session.cxx:1205 +#, fuzzy, c-format +msgid "You can't specify %s and %s together." +msgstr "You can't specify -c and -x options together." + +#: session.cxx:1214 +msgid "" +"WARNING: kernel release/architecture mismatch with host forces last-pass 4." +msgstr "" +"WARNING: kernel release/architecture mismatch with host forces last-pass 4." + +#: session.cxx:1301 +#, c-format +msgid "Located kernel source tree (COPYING) at '%s'" +msgstr "Located kernel source tree (COPYING) at '%s'" + +#: session.cxx:1343 +#, c-format +msgid "alias component %s contains illegal parameter" +msgstr "alias component %s contains illegal parameter" + +#: session.cxx:1355 +msgid " while registering probe alias " +msgstr " while registering probe alias " + +#: session.cxx:1408 +#, c-format +msgid "semantic error: %s" +msgstr "semantic error: %s" + +#. TRANSLATORS: Here were are printing the source string of the error +#: session.cxx:1467 +msgid "source: " +msgstr "" + +#: stap-authorize-cert.cxx:51 +#, fuzzy +msgid "Certificate file must be specified" +msgstr "A script must be specified." + +#: stap-authorize-cert.cxx:59 +msgid "Certificate database directory must be specified" +msgstr "" + +#: stap-authorize-cert.cxx:74 +msgid "Unable to authorize certificate" +msgstr "" + +#: stap-gen-cert.cxx:68 +#, c-format +msgid "%s : unhandled option '%c %s'" +msgstr "" + +#: stap-gen-cert.cxx:70 +#, c-format +msgid "%s : unhandled option '%c'" +msgstr "" + +#: stap-gen-cert.cxx:114 +msgid "Unable to generate certificate" +msgstr "" + +#: stap-serverd.cxx:121 +#, fuzzy, c-format +msgid "Could not open client stderr file %s: %s" +msgstr "cannot find type: %s" + +#: stap-serverd.cxx:224 +#, c-format +msgid "%s: unhandled option '%c %s'" +msgstr "" + +#: stap-serverd.cxx:226 +#, c-format +msgid "%s: unhandled option '%c'" +msgstr "" + +#: stap-serverd.cxx:242 +#, c-format +msgid "%s: unhandled option '--%s=%s'" +msgstr "" + +#: stap-serverd.cxx:245 +#, c-format +msgid "%s: unhandled option '--%s'" +msgstr "" + +#: stap-serverd.cxx:253 +#, c-format +msgid "%s: unrecognized argument '%s'" +msgstr "" + +#: stap-serverd.cxx:289 +#, c-format +msgid "Received signal %d, exiting" +msgstr "" + +#: stap-serverd.cxx:348 +#, c-format +msgid "Service '%s' successfully established." +msgstr "" + +#: stap-serverd.cxx:358 stap-serverd.cxx:449 +#, c-format +msgid "Avahi service name collision, renaming service to '%s'" +msgstr "" + +#: stap-serverd.cxx:366 +#, c-format +msgid "Avahi entry group failure: %s" +msgstr "" + +#: stap-serverd.cxx:387 +#, c-format +msgid "avahi_entry_group_new () failed: %s" +msgstr "" + +#: stap-serverd.cxx:396 +#, c-format +msgid "Adding Avahi service '%s'" +msgstr "" + +#: stap-serverd.cxx:429 +#, c-format +msgid "Failed to add _stap._tcp service: %s" +msgstr "" + +#: stap-serverd.cxx:436 +#, c-format +msgid "Failed to commit avahi entry group: %s" +msgstr "" + +#: stap-serverd.cxx:474 +#, c-format +msgid "Avahi client failure: %s" +msgstr "" + +#: stap-serverd.cxx:500 +#, c-format +msgid "Removing Avahi service '%s'" +msgstr "" + +#: stap-serverd.cxx:538 +msgid "Failed to create avahi threaded poll object." +msgstr "" + +#: stap-serverd.cxx:550 +#, c-format +msgid "Failed to create avahi client: %s" +msgstr "" + +#: stap-serverd.cxx:567 +msgid "Unable to advertise presence on the network. Avahi is not available" +msgstr "" + +#: stap-serverd.cxx:599 +#, fuzzy, c-format +msgid "Unable to obtain current resource limits: %s" +msgstr "not accessible at this address" + +#: stap-serverd.cxx:637 +#, c-format +msgid "===== compile server pid %d starting =====" +msgstr "" + +#: stap-serverd.cxx:677 +msgid "Error reading size of request file" +msgstr "" + +#: stap-serverd.cxx:682 stap-serverd.cxx:713 +msgid "Error in PR_Read" +msgstr "" + +#: stap-serverd.cxx:700 +#, fuzzy, c-format +msgid "Could not open output file %s" +msgstr "cannot find type: %s" + +#: stap-serverd.cxx:722 +#, fuzzy, c-format +msgid "Could not write to output file %s" +msgstr "cannot find type: %s" + +#: stap-serverd.cxx:730 +#, c-format +msgid "Expected %d bytes, got %d while reading client request from socket" +msgstr "" + +#: stap-serverd.cxx:758 +msgid "Could not import socket into SSL" +msgstr "" + +#: stap-serverd.cxx:767 +msgid "Error setting SSL security for socket" +msgstr "" + +#: stap-serverd.cxx:775 +msgid "Error setting handshake as server for socket" +msgstr "" + +#: stap-serverd.cxx:783 stap-serverd.cxx:791 +msgid "Error setting SSL client authentication mode for socket" +msgstr "" + +#: stap-serverd.cxx:802 +msgid "Error in SSL_AuthCertificateHook" +msgstr "" + +#: stap-serverd.cxx:811 +msgid "Error in SSL_BadCertHook" +msgstr "" + +#: stap-serverd.cxx:819 +msgid "Error in SSL_HandshakeCallback" +msgstr "" + +#: stap-serverd.cxx:830 +msgid "Error configuring SSL server" +msgstr "" + +#: stap-serverd.cxx:864 +msgid "Error in SSL_OptionSet:SSL_REQUEST_CERTIFICATE" +msgstr "" + +#: stap-serverd.cxx:874 +msgid "Error in SSL_OptionSet:SSL_REQUIRE_CERTIFICATE" +msgstr "" + +#: stap-serverd.cxx:883 +msgid "Error in SSL_ReHandshake" +msgstr "" + +#: stap-serverd.cxx:892 +msgid "Error in SSL_ForceHandshake" +msgstr "" + +#: stap-serverd.cxx:912 +#, fuzzy, c-format +msgid "Could not open input file %s" +msgstr "cannot find type: %s" + +#: stap-serverd.cxx:928 +msgid "Error writing response to socket" +msgstr "" + +#: stap-serverd.cxx:951 +#, fuzzy, c-format +msgid "Unable to open file %s for reading: %s" +msgstr "not accessible at this address" + +#: stap-serverd.cxx:975 +#, c-format +msgid "Error in regcomp: %s" +msgstr "" + +#: stap-serverd.cxx:998 +#, c-format +msgid "Localization key '%s' not found in global list" +msgstr "" + +#: stap-serverd.cxx:1006 +#, fuzzy, c-format +msgid "Localization value '%s' contains illegal characters" +msgstr "alias component %s contains illegal parameter" + +#: stap-serverd.cxx:1017 +#, fuzzy, c-format +msgid "Error reading file %s: %s" +msgstr "no location for field %s: %s" + +#: stap-serverd.cxx:1050 +#, fuzzy, c-format +msgid "Unable to open client version file %s" +msgstr "not accessible at this address" + +#: stap-serverd.cxx:1056 +#, c-format +msgid "Client version is %s" +msgstr "" + +#: stap-serverd.cxx:1068 +msgid "Cannot parse stap options" +msgstr "" + +#: stap-serverd.cxx:1080 +#, fuzzy, c-format +msgid "Could not create temporary directory %s" +msgstr "ERROR: cannot create temporary directory (\" %s \"): %s" + +#: stap-serverd.cxx:1100 +msgid "Out of memory" +msgstr "" + +#: stap-serverd.cxx:1108 +#, c-format +msgid "Error opening %s: %s" +msgstr "" + +#: stap-serverd.cxx:1117 +#, c-format +msgid "Error reading %s: %s" +msgstr "" + +#: stap-serverd.cxx:1182 +#, c-format +msgid "Unable to find a module in %s" +msgstr "" + +#: stap-serverd.cxx:1184 +#, c-format +msgid "Too many modules (%zu) in %s" +msgstr "" + +#: stap-serverd.cxx:1211 +#, fuzzy, c-format +msgid "Could not link to %s from %s" +msgstr "cannot find type: %s" + +#: stap-serverd.cxx:1269 +msgid "Error in spawn getcwd" +msgstr "" + +#: stap-serverd.cxx:1277 +msgid "Error in spawn chdir" +msgstr "" + +#: stap-serverd.cxx:1300 +#, fuzzy, c-format +msgid "Unable to set resource limits for %s: %s" +msgstr "not accessible at this address" + +#: stap-serverd.cxx:1311 +#, fuzzy, c-format +msgid "Unable to restore resource limits after %s: %s" +msgstr "not accessible at this address" + +#: stap-serverd.cxx:1321 +msgid "Error in spawn unchdir" +msgstr "" + +#: stap-serverd.cxx:1326 +#, c-format +msgid "Error in spawn: %s" +msgstr "" + +#: stap-serverd.cxx:1333 +msgid "Error in waitpid" +msgstr "" + +#: stap-serverd.cxx:1385 +msgid "Error resetting SSL handshake" +msgstr "" + +#: stap-serverd.cxx:1395 +msgid "Error forcing SSL handshake" +msgstr "" + +#: stap-serverd.cxx:1406 stap-serverd.cxx:1418 stap-serverd.cxx:1426 +#, fuzzy, c-format +msgid "Could not create temporary directory %s: %s" +msgstr "ERROR: cannot create temporary directory (\" %s \"): %s" + +#: stap-serverd.cxx:1465 +msgid "Unable to extract client request" +msgstr "" + +#: stap-serverd.cxx:1484 +msgid "Unable to compress server response" +msgstr "" + +#: stap-serverd.cxx:1494 +msgid "Error closing ssl socket" +msgstr "" + +#: stap-serverd.cxx:1502 +#, fuzzy, c-format +msgid "Keeping temporary directory %s" +msgstr "Keeping temporary directory \"%s\"" + +#: stap-serverd.cxx:1511 +msgid "Error in tmpdir cleanup" +msgstr "" + +#: stap-serverd.cxx:1537 +msgid "Unable to obtain certificate private key" +msgstr "" + +#: stap-serverd.cxx:1548 +msgid "Error accepting client connection" +msgstr "" + +#: stap-serverd.cxx:1553 +#, c-format +msgid "Accepted connection from %d.%d.%d.%d:%d" +msgstr "" + +#: stap-serverd.cxx:1566 +msgid "Error processing client request" +msgstr "" + +#: stap-serverd.cxx:1569 +#, c-format +msgid "Request from %d.%d.%d.%d:%d complete" +msgstr "" + +#: stap-serverd.cxx:1630 +msgid "Unable to configure SSL server session ID cache" +msgstr "" + +#: stap-serverd.cxx:1640 +#, c-format +msgid "Unable to find our certificate in the database at %s" +msgstr "" + +#: stap-serverd.cxx:1663 +msgid "Unable to shut down server session ID cache" +msgstr "" + +#: stap-serverd.cxx:1678 +msgid "Error creating socket" +msgstr "" + +#: stap-serverd.cxx:1690 stap-serverd.cxx:1702 +msgid "Error setting socket properties" +msgstr "" + +#: stap-serverd.cxx:1727 +#, c-format +msgid "Network port %d is unavailable. Trying another port" +msgstr "" + +#: stap-serverd.cxx:1731 +#, c-format +msgid "Network port %d is busy. Trying another port" +msgstr "" + +#: stap-serverd.cxx:1735 +msgid "Error setting socket address" +msgstr "" + +#: stap-serverd.cxx:1745 +#, fuzzy +msgid "Unable to obtain socket address" +msgstr "not accessible at this address" + +#: stap-serverd.cxx:1750 +#, c-format +msgid "Using network port %d" +msgstr "" + +#: stap-serverd.cxx:1757 +msgid "Error listening on socket" +msgstr "" + +#: stap-serverd.cxx:1780 +msgid "Unable to authorize certificate for the local client" +msgstr "" + +#: stap-serverd.cxx:1791 +msgid "Error closing listen socket" +msgstr "" + +#: stap-sign-module.cxx:51 +#, fuzzy +msgid "Module name was not specified." +msgstr "Module name cannot be empty." + +#: staptree.cxx:161 +msgid "inconsistent arity" +msgstr "" + +#: staptree.cxx:165 +#, c-format +msgid "inconsistent arity (%s vs %d)" +msgstr "" + +#: staptree.cxx:168 +#, c-format +msgid "arity %s first inferred here" +msgstr "" + +#: staptree.cxx:203 +msgid "internal error, joining a non-synthetic function" +msgstr "" + +#: staptree.cxx:205 +#, c-format +msgid "synthetic function '%s' conflicts with an existing function" +msgstr "" + +#: staptree.cxx:251 +#, c-format +msgid "%s variable '%s' may not be used as array" +msgstr "" + +#: staptree.cxx:254 +#, c-format +msgid "%s variable '%s' may not be used as a structure" +msgstr "" + +#: staptree.cxx:258 +#, c-format +msgid "%s variable '%s' may not be pretty-printed" +msgstr "" + +#: staptree.cxx:262 +#, fuzzy, c-format +msgid "invalid use of %s variable '%s'" +msgstr "store supported only for base type" + +#: staptree.cxx:854 +msgid "invalid or missing conversion specifier" +msgstr "" + +#: staptree.cxx:867 +msgid "trailing incomplete print format conversion" +msgstr "" + +#: staptree.cxx:1574 staptree.cxx:1587 +msgid "Expecting symbol or histogram operator" +msgstr "" + +#: staptree.cxx:1576 +msgid "Failed to classify indexable" +msgstr "" + +#: staptree.cxx:1930 +#, fuzzy +msgid "function may not be used when --unprivileged is specified" +msgstr "You can't specify %s when --unprivileged is specified." + +#: staptree.cxx:1935 +msgid "function may not be used unless -g is specified" +msgstr "" + +#: staptree.cxx:1964 +#, fuzzy +msgid "embedded expression may not be used when --unprivileged is specified" +msgstr "You can't specify %s when --unprivileged is specified." + +#: staptree.cxx:1969 +msgid "embedded expression may not be used unless -g is specified" +msgstr "" + +#: staptree.cxx:2075 +msgid "symbol without referent" +msgstr "" + +#: staptree.cxx:2264 +#, fuzzy +msgid "invalid element" +msgstr "Invalid target process ID number." + +#: tapset-itrace.cxx:79 tapsets.cxx:6246 tapset-utrace.cxx:128 +msgid "process probes not available without kernel CONFIG_UTRACE" +msgstr "" + +#: tapset-mark.cxx:100 +#, fuzzy +msgid "invalid marker argument number" +msgstr "Invalid target process ID number." + +#: tapset-mark.cxx:103 +msgid "write to marker parameter not permitted" +msgstr "" + +#: tapset-mark.cxx:123 +#, c-format +msgid "write to marker '%s' not permitted" +msgstr "" + +#: tapset-mark.cxx:187 +#, fuzzy +msgid "cannot take address of marker variable" +msgstr "cannot take address of computed value" + +#: tapset-mark.cxx:195 +msgid "" +"invalid target symbol for marker, $argN, $name, $format, $$parms or $$vars " +"expected" +msgstr "" + +#: tapset-mark.cxx:449 translate.cxx:2019 +#, fuzzy +msgid "cannot expand unknown type" +msgstr "cannot find type: %s" + +#: tapset-mark.cxx:582 +msgid "mark_builder releasing cache" +msgstr "" + +#. TRANSLATORS: specific path cannot be opened +#: tapset-mark.cxx:620 +#, fuzzy +msgid " cannot be opened: " +msgstr "cannot get type of field: %s" + +#: tapset-perfmon.cxx:200 +msgid "" +"perf probes not available without exported perf_event_create_kernel_counter" +msgstr "" + +#: tapset-perfmon.cxx:202 +msgid "perf probes not available without CONFIG_PERF_EVENTS" +msgstr "" + +#: tapset-perfmon.cxx:217 +msgid "invalid perf sample period " +msgstr "" + +#: tapset-perfmon.cxx:221 +#, c-format +msgid "perf probe type=% config=% period=%" +msgstr "" + +#: tapset-procfs.cxx:147 +msgid "only one write procfs probe can exist for procfs path \"" +msgstr "" + +#: tapset-procfs.cxx:149 +msgid "only one read procfs probe can exist for procfs path \"" +msgstr "" + +#: tapset-procfs.cxx:406 +msgid "invalid target symbol for procfs probe, $value expected" +msgstr "" + +#: tapset-procfs.cxx:413 +msgid "procfs $value variable is read-only in a procfs write probe" +msgstr "" + +#: tapset-procfs.cxx:415 +msgid "procfs $value variable cannot be read in a procfs read probe" +msgstr "" + +#: tapset-procfs.cxx:418 +#, fuzzy +msgid "cannot take address of procfs variable" +msgstr "cannot take address of computed value" + +#: tapset-procfs.cxx:459 +msgid "" +"Only the following assign operators are implemented on procfs read target " +"variables: '=', '.='" +msgstr "" + +#: tapset-procfs.cxx:547 +msgid "maxsize must be greater than 0" +msgstr "" + +#: tapset-procfs.cxx:569 +msgid "procfs path cannot start with a '/'" +msgstr "" + +#: tapset-procfs.cxx:575 +#, fuzzy +msgid "procfs path component cannot be empty" +msgstr "Module name cannot be empty." + +#: tapset-procfs.cxx:579 tapset-procfs.cxx:589 +msgid "procfs path cannot be relative (and contain '.' or '..')" +msgstr "" + +#: tapset-procfs.cxx:586 +msgid "procfs path cannot end with a '/'" +msgstr "" + +#: tapset-procfs.cxx:593 +msgid "need read/write component" +msgstr "" + +#: tapsets.cxx:872 +#, c-format +msgid "" +"Error: Pattern '%s' matches every single instruction address in the symbol " +"table,\n" +"some of which aren't even functions.\n" +msgstr "" + +#: tapsets.cxx:906 +#, c-format +msgid "Warning: address %# out of range for module %s" +msgstr "" + +#: tapsets.cxx:917 +#, c-format +msgid "" +"Warning: address %# maps to no known compilation unit in module %s" +msgstr "" + +#: tapsets.cxx:1027 +#, c-format +msgid "parse '%s'" +msgstr "" + +#: tapsets.cxx:1068 +#, c-format +msgid "malformed specification '%s'" +msgstr "" + +#: tapsets.cxx:1097 +#, fuzzy +msgid "probe " +msgstr "# probes" + +#: tapsets.cxx:1099 +msgid " kernel" +msgstr "" + +#: tapsets.cxx:1101 +msgid " module=" +msgstr "" + +#: tapsets.cxx:1103 +#, fuzzy +msgid " process=" +msgstr "# probes" + +#: tapsets.cxx:1317 +#, c-format +msgid "address 0x%# does not match the beginning of a statement" +msgstr "" + +#: tapsets.cxx:1320 +#, c-format +msgid " (try 0x%#)" +msgstr "" + +#: tapsets.cxx:1322 +#, c-format +msgid " (no line info found for '%s', in module '%s')" +msgstr "" + +#: tapsets.cxx:1376 +#, c-format +msgid "querying entrypc %# of instance of inline '%s'\n" +msgstr "" + +#: tapsets.cxx:1457 +msgid "function DIE lands on srcfile\n" +msgstr "" + +#: tapsets.cxx:1478 +msgid "inline instance DIE lands on srcfile\n" +msgstr "" + +#: tapsets.cxx:1519 +#, c-format +msgid "selected inline instance of %s\n" +msgstr "" + +#: tapsets.cxx:1575 +#, c-format +msgid "checking instances of inline %s\n" +msgstr "" + +#: tapsets.cxx:1585 +#, fuzzy, c-format +msgid "selected function %s\n" +msgstr "# functions" + +#: tapsets.cxx:1623 +#, c-format +msgid "focused on CU '%s', in module '%s'\n" +msgstr "" + +#: tapsets.cxx:1664 +msgid "" +"For probing a particular line, use a .statement() probe, not .function()" +msgstr "" + +#: tapsets.cxx:1821 +#, c-format +msgid "ELF machine %s|%s (code %d) mismatch with target %s in '%s'" +msgstr "" + +#: tapsets.cxx:1828 +#, c-format +msgid "" +"focused on module '%s' = [0x%#, -0x%#, bias 0x%# " +"file %s ELF machine %s|%s (code %d)\n" +msgstr "" + +#: tapsets.cxx:1917 +#, c-format +msgid "focused on module '%s'\n" +msgstr "" + +#: tapsets.cxx:1987 +msgid "module=" +msgstr "" + +#: tapsets.cxx:2008 +msgid "deleting module_cache" +msgstr "" + +#: tapsets.cxx:2110 +#, c-format +msgid "" +"Only the following assign operator is implemented on target variables: %s" +msgid_plural "" +"Only the following assign operators are implemented on target variables: %s" +msgstr[0] "" +msgstr[1] "" + +#: tapsets.cxx:2303 +#, fuzzy +msgid "cannot take address of pretty-printed variable" +msgstr "cannot take address of computed value" + +#: tapsets.cxx:2307 +msgid "invalid target_symbol for pretty-print" +msgstr "" + +#: tapsets.cxx:3089 +msgid "unknown type to save in kretprobe" +msgstr "" + +#: tapsets.cxx:3239 tapsets.cxx:8211 +msgid "variable location problem: " +msgstr "" + +#: tapsets.cxx:3273 +msgid "write to target variable not permitted" +msgstr "" + +#: tapsets.cxx:3285 +msgid "write to target variable not permitted in .return probes" +msgstr "" + +#: tapsets.cxx:3294 +#, fuzzy +msgid "cannot write to context variable" +msgstr "cannot index into constant value" + +#: tapsets.cxx:3297 tapsets.cxx:4901 tapsets.cxx:8166 +#, fuzzy +msgid "cannot take address of context variable" +msgstr "cannot take address of constant value" + +#: tapsets.cxx:3309 tapsets.cxx:3570 tapsets.cxx:8063 +#, fuzzy +msgid "cannot write to pretty-printed variable" +msgstr "cannot get type of variable: %s" + +#. TRANSLATORS: Here we're using a cached module. +#: tapsets.cxx:3690 +msgid "Pass 2: using cached " +msgstr "" + +#: tapsets.cxx:3713 +#, fuzzy +msgid "write to @cast context variable not permitted" +msgstr "cannot index into constant value" + +#: tapsets.cxx:3853 +msgid "missing relocation basis" +msgstr "" + +#: tapsets.cxx:3855 +msgid "inconsistent relocation address" +msgstr "" + +#: tapsets.cxx:3865 +#, c-format +msgid "maxactive value out of range [0,%s]" +msgstr "" + +#: tapsets.cxx:3996 +#, c-format +msgid "saveargs: examining '%s' (dieoffset: %#)\n" +msgstr "" + +#: tapsets.cxx:4008 +#, c-format +msgid "" +"saveargs: failed to retrieve type name for return value (dieoffset: %s)\n" +msgstr "" + +#: tapsets.cxx:4036 +#, c-format +msgid "saveargs: failed to retrieve name for local (dieoffset: %s)\n" +msgstr "" + +#: tapsets.cxx:4042 +#, c-format +msgid "saveargs: finding location for local '%s' (dieoffset: %s)\n" +msgstr "" + +#: tapsets.cxx:4057 +#, c-format +msgid "" +"saveargs: failed to resolve the location for local '%s' (dieoffset: %s)\n" +msgstr "" + +#: tapsets.cxx:4065 +#, c-format +msgid "" +"saveargs: local '%s' (dieoffset: %s) is not available at this address (%s)\n" +msgstr "" + +#: tapsets.cxx:4078 +#, c-format +msgid "saveargs: failed to retrieve type name for local '%s' (dieoffset: %s)\n" +msgstr "" + +#: tapsets.cxx:5222 +#, c-format +msgid "Can't parse SDT_V3 operand '%s'" +msgstr "" + +#: tapsets.cxx:5224 +#, c-format +msgid "Downgrading SDT_V2 probe argument to dwarf, can't parse '%s'" +msgstr "" + +#. TRANSLATORS: We're mapping the operand to a new expression*. +#: tapsets.cxx:5237 +#, c-format +msgid "mapped asm operand %s to " +msgstr "" + +#: tapsets.cxx:5242 tapsets.cxx:5372 +#, fuzzy +msgid "cannot take address of sdt variable" +msgstr "cannot take address of computed value" + +#: tapsets.cxx:5297 tapsets.cxx:5307 +#, fuzzy +msgid "cannot take address of sdt context variable" +msgstr "cannot take address of constant value" + +#: tapsets.cxx:5325 +msgid "invalid variable, must be of the form $argN" +msgstr "" + +#: tapsets.cxx:5327 +#, fuzzy +msgid "invalid argument number" +msgstr "Invalid target process ID number." + +#. TRANSLATORS: Describing what probe type (kprobe or uprobe) the probe +#. TRANSLATORS: is matched to. +#: tapsets.cxx:5484 +#, c-format +msgid "matched probe_name %s probe type " +msgstr "" + +#: tapsets.cxx:5743 tapsets.cxx:5807 +msgid " (provider " +msgstr "" + +#: tapsets.cxx:5743 +#, c-format +msgid " saw .note.stapsdt %s%s " +msgstr "" + +#: tapsets.cxx:5764 +#, c-format +msgid "got unknown probe_type : 0x%x" +msgstr "" + +#: tapsets.cxx:5807 +#, fuzzy +msgid "saw .probes " +msgstr "# probes" + +#: tapsets.cxx:5825 +#, c-format +msgid "looking for semaphore symbol %s " +msgstr "" + +#: tapsets.cxx:5840 +msgid ", found at 0x" +msgstr "" + +#: tapsets.cxx:5845 +msgid ", not found" +msgstr "" + +#: tapsets.cxx:5972 +msgid "probe_type == uprobe1, use statement addr: 0x" +msgstr "" + +#: tapsets.cxx:5976 +msgid "probe_type == uprobe2, use statement addr: 0x" +msgstr "" + +#: tapsets.cxx:5980 +msgid "probe_type == uprobe3, use statement addr: 0x" +msgstr "" + +#: tapsets.cxx:5990 +#, c-format +msgid "probe_type == use_uprobe_no_dwarf, use label name: _stapprobe1_%s" +msgstr "" + +#: tapsets.cxx:6074 +msgid "unspecified process probe is invalid without a -c COMMAND" +msgstr "" + +#: tapsets.cxx:6099 +#, c-format +msgid "glob %s error (%s)" +msgstr "" + +#: tapsets.cxx:6120 tapsets.cxx:6210 +#, c-format +msgid "Expanded process(\"%s\") to process(\"%s\")" +msgstr "" + +#: tapsets.cxx:6254 +#, c-format +msgid "dwarf_builder::build for %s" +msgstr "" + +#: tapsets.cxx:6274 tapsets.cxx:7593 +msgid "absolute statement probe in unprivileged script" +msgstr "" + +#: tapsets.cxx:6314 +#, fuzzy, c-format +msgid "cannot probe .return of %u inlined function %s" +msgid_plural "cannot probe .return of %u inlined functions %s" +msgstr[0] "cannot get die scopes inlined_subroutine: %s" +msgstr[1] "cannot get die scopes inlined_subroutine: %s" + +#: tapsets.cxx:6320 +#, fuzzy, c-format +msgid "skipped .return probe of %u inlined function" +msgid_plural "skipped .return probe of %u inlined functions" +msgstr[0] "cannot get die scopes inlined_subroutine: %s" +msgstr[1] "cannot get die scopes inlined_subroutine: %s" + +#: tapsets.cxx:6378 +#, c-format +msgid "" +"Symbol table error: Line %d of symbol list from %s is not in correct format: " +"address type name [module]" +msgstr "" + +#: tapsets.cxx:6395 +#, c-format +msgid "Symbol table error: %s contains no function symbols." +msgstr "" + +#: tapsets.cxx:6421 +#, c-format +msgid "Internal error reading symbol table from %s -- %s" +msgstr "" + +#: tapsets.cxx:6429 +#, c-format +msgid "Warning: nm cannot read symbol table from %s" +msgstr "" + +#: tapsets.cxx:6443 +#, c-format +msgid "Warning: cannot read symbol table from %s -- %s" +msgstr "" + +#: tapsets.cxx:6593 +#, c-format +msgid "Warning: reading symbol table from %s -- ignoring %s" +msgstr "" + +#: tapsets.cxx:6603 +msgid "Error: Cannot find vmlinux. Consider using --kmap instead of --kelf." +msgstr "" + +#: tapsets.cxx:7724 +#, c-format +msgid "Too many hardware breakpoint probes requested for %s (%zu vs. %u)" +msgstr "" + +#: tapsets.cxx:7912 +msgid "CONFIG_PERF_EVENTS not available on this kernel" +msgstr "" + +#: tapsets.cxx:7915 +msgid "CONFIG_HAVE_HW_BREAKPOINT not available on this kernel" +msgstr "" + +#: tapsets.cxx:8022 +#, c-format +msgid "unable to find tracepoint variable '%s' (alternatives: %s)" +msgstr "" + +#: tapsets.cxx:8036 +#, c-format +msgid "write to tracepoint variable '%s' not permitted" +msgstr "" + +#: tapsets.cxx:8045 +#, fuzzy +msgid "cannot take address of tracepoint variable" +msgstr "cannot take address of constant value" + +#: tapsets.cxx:8169 +#, c-format +msgid "write to tracepoint '%s' not permitted" +msgstr "" + +#: tapsets.cxx:8375 +#, fuzzy, c-format +msgid "cannot get type of parameter '%s' of tracepoint '%s'" +msgstr "cannot get bit field parameters: %s" + +#: tapsets.cxx:8381 +#, c-format +msgid "found parameter for tracepoint '%s': type:'%s' name:'%s'" +msgstr "" + +#: tapsets.cxx:8712 +msgid "tracepoint_builder releasing dwflpp" +msgstr "" + +#: tapsets.cxx:8732 +#, c-format +msgid "Pass 2: getting a tracepoint query for %zu headers: " +msgstr "" + +#: tapsets.cxx:8748 +#, c-format +msgid "Pass 2: using cached %s" +msgstr "" + +#: tapsets.cxx:8814 +#, fuzzy, c-format +msgid "Located kernel source tree (DW_AT_comp_dir) at '%s'" +msgstr "Located kernel source tree (COPYING) at '%s'" + +#: tapsets.cxx:8846 +msgid "Checking tracepoint glob " +msgstr "" + +#. TRANSLATORS: 'timer' is the name of a probe point +#: tapset-timers.cxx:64 +msgid "invalid interval for jiffies timer" +msgstr "" + +#. TRANSLATORS: 'randomize' is a key word +#: tapset-timers.cxx:68 +msgid "invalid randomize for jiffies timer" +msgstr "" + +#: tapset-timers.cxx:71 +#, fuzzy +msgid "only expect one probe point" +msgstr " while registering probe alias " + +#: tapset-timers.cxx:199 +#, c-format +msgid "interval value out of range (%s, %s)" +msgstr "" + +#: tapset-timers.cxx:205 +msgid "randomization value out of range" +msgstr "" + +#: tapset-timers.cxx:553 +msgid "frequency must be greater than 0" +msgstr "" + +#: tapset-timers.cxx:583 +msgid "unrecognized timer variant" +msgstr "" + +#: tapset-utrace.cxx:471 +msgid "only \"process(PATH_OR_PID).syscall\" support $argN or $$parms." +msgstr "" + +#: tapset-utrace.cxx:517 tapset-utrace.cxx:524 +#, fuzzy +msgid "invalid syscall argument number (1-6)" +msgstr "Invalid target process ID number." + +#: tapset-utrace.cxx:528 +msgid "utrace '$argN' variable is read-only" +msgstr "" + +#: tapset-utrace.cxx:557 +#, c-format +msgid "utrace '%s' variable is read-only" +msgstr "" + +#: tapset-utrace.cxx:563 +msgid "only \"process(PATH_OR_PID).syscall.return\" support $return." +msgstr "" + +#: tapset-utrace.cxx:588 +#, fuzzy +msgid "unknown target variable" +msgstr "cannot take address of computed value" + +#: tapset-utrace.cxx:612 +msgid "" +"only \"process(PATH_OR_PID).syscall\" and \"process(PATH_OR_PID).syscall." +"return\" probes support target symbols" +msgstr "" + +#: tapset-utrace.cxx:617 +#, fuzzy +msgid "cannot take address of utrace variable" +msgstr "cannot take address of constant value" + +#: tapset-utrace.cxx:624 +msgid "" +"invalid target symbol for utrace probe, $syscall, $return, $argN or $$parms " +"expected" +msgstr "" + +#: tapset-utrace.cxx:690 +msgid "process pid must be greater than 1" +msgstr "" + +#: translate.cxx:47 +msgid "\"Array overflow, check " +msgstr "" + +#: translate.cxx:48 +msgid "\"MAXNESTING exceeded\";" +msgstr "" + +#: translate.cxx:49 +msgid "\"division by 0\";" +msgstr "" + +#: translate.cxx:50 +msgid "\"MAXACTION exceeded\";" +msgstr "" + +#: translate.cxx:51 +msgid "\"aggregation overflow in " +msgstr "" + +#: translate.cxx:52 +msgid "\"empty aggregate\";" +msgstr "" + +#: translate.cxx:53 +msgid "\"histogram index out of range\";" +msgstr "" + +#: translate.cxx:433 +#, c-format +msgid "unsupported stats type for %s" +msgstr "" + +#: translate.cxx:441 +#, c-format +msgid "unsupported initializer for %s" +msgstr "" + +#: translate.cxx:455 +#, c-format +msgid "unsupported deallocator for %s" +msgstr "" + +#: translate.cxx:585 +msgid "unknown type of map" +msgstr "" + +#: translate.cxx:600 +msgid "index type mismatch" +msgstr "" + +#: translate.cxx:616 +msgid "aggregating non-parallel map type" +msgstr "" + +#: translate.cxx:624 +msgid "fetching aggregate of non-parallel map type" +msgstr "" + +#: translate.cxx:642 +msgid "checking existence of an unsupported map type" +msgstr "" + +#: translate.cxx:655 +msgid "getting a value from an unsupported map type" +msgstr "" + +#: translate.cxx:666 +msgid "adding a value of an unsupported map type" +msgstr "" + +#: translate.cxx:688 +msgid "setting a value of an unsupported map type" +msgstr "" + +#: translate.cxx:777 +msgid "iterating over unknown reference type" +msgstr "" + +#: translate.cxx:790 +msgid "inconsistent iterator type in itervar::start()" +msgstr "" + +#: translate.cxx:801 +msgid "inconsistent iterator type in itervar::next()" +msgstr "" + +#: translate.cxx:826 +msgid "illegal key type" +msgstr "" + +#: translate.cxx:833 +msgid "inconsistent iterator value in itervar::get_value()" +msgstr "" + +#: translate.cxx:845 +msgid "illegal value type" +msgstr "" + +#: translate.cxx:1602 translate.cxx:1757 +msgid "array locals not supported, missing global declaration?" +msgstr "" + +#: translate.cxx:1691 +#, c-format +msgid "%s elided, duplicates %s" +msgstr "" + +#: translate.cxx:1766 +#, fuzzy +msgid "unsupported local variable type" +msgstr "store supported only for base type" + +#: translate.cxx:1862 +msgid "nothing" +msgstr "" + +#: translate.cxx:1910 translate.cxx:1940 +msgid "array type is neither string nor long" +msgstr "" + +#: translate.cxx:1925 +#, fuzzy +msgid "array key is neither string nor long" +msgstr "# functions" + +#: translate.cxx:2053 +msgid "unsupported c_expression token type" +msgstr "" + +#: translate.cxx:2084 +msgid "unknown lvalue type in assignment" +msgstr "" + +#: translate.cxx:2104 translate.cxx:2124 +msgid " type unsupported" +msgstr "" + +#: translate.cxx:2153 +msgid "post assignment on strings not supported" +msgstr "" + +#: translate.cxx:2167 +#, c-format +msgid "string assignment operator %s unsupported" +msgstr "" + +#: translate.cxx:2199 +msgid "unknown macop for assignment" +msgstr "" + +#: translate.cxx:2204 +msgid "invalid post-mode operator" +msgstr "" + +#: translate.cxx:2241 +msgid "assignment type not yet implemented" +msgstr "" + +#: translate.cxx:2328 +msgid "unresolved symbol" +msgstr "" + +#: translate.cxx:2330 +msgid "unresolved symbol: " +msgstr "" + +#: translate.cxx:2369 +msgid "attempt to use scalar where map expected" +msgstr "" + +#: translate.cxx:2607 translate.cxx:3610 translate.cxx:3630 +#, fuzzy +msgid "expected numeric type" +msgstr "# functions" + +#: translate.cxx:2752 translate.cxx:4000 +msgid "Invalid indexing of histogram" +msgstr "" + +#: translate.cxx:3015 +msgid "cannot 'return' from probe" +msgstr "" + +#: translate.cxx:3018 +msgid "return type mismatch" +msgstr "" + +#: translate.cxx:3031 +msgid "cannot 'next' from function" +msgstr "" + +#: translate.cxx:3095 +#, fuzzy +msgid "Cannot delete unknown expression type" +msgstr "cannot find type: %s" + +#: translate.cxx:3122 translate.cxx:3145 +msgid "cannot delete histogram bucket entries\n" +msgstr "" + +#: translate.cxx:3171 +msgid "cannot 'break' outside loop" +msgstr "" + +#: translate.cxx:3182 +msgid "cannot 'continue' outside loop" +msgstr "" + +#: translate.cxx:3256 +#, fuzzy +msgid "expected numeric or string type" +msgstr "# functions" + +#: translate.cxx:3268 translate.cxx:3342 translate.cxx:3371 translate.cxx:3387 +#: translate.cxx:3490 +#, fuzzy +msgid "expected numeric types" +msgstr "# functions" + +#: translate.cxx:3333 +msgid "operator not yet implemented" +msgstr "" + +#: translate.cxx:3478 translate.cxx:3524 +#, fuzzy +msgid "expected string types" +msgstr "# functions" + +#: translate.cxx:3499 +#, fuzzy +msgid "unexpected type" +msgstr "# functions" + +#: translate.cxx:3519 +#, fuzzy +msgid "unexpected concatenation operator" +msgstr "# functions" + +#: translate.cxx:3542 +#, fuzzy +msgid "expected numeric condition" +msgstr "# functions" + +#: translate.cxx:3547 +#, fuzzy +msgid "expected matching types" +msgstr "# functions" + +#: translate.cxx:3573 +msgid "non-number <<< expression" +msgstr "" + +#: translate.cxx:3576 +msgid "non-stats left operand to <<< expression" +msgstr "" + +#: translate.cxx:3579 +msgid "non-number right operand to <<< expression" +msgstr "" + +#: translate.cxx:3585 translate.cxx:3588 +msgid "type mismatch" +msgstr "" + +#: translate.cxx:3644 +#, fuzzy +msgid "invalid reference to array" +msgstr "bad field for array type: %s" + +#: translate.cxx:3739 +msgid "need rvalue for assignment" +msgstr "" + +#: translate.cxx:3750 +msgid "unexpected reference to array" +msgstr "" + +#: translate.cxx:3769 +msgid "cannot translate general target-symbol expression" +msgstr "" + +#: translate.cxx:3776 +msgid "cannot translate general @cast expression" +msgstr "" + +#: translate.cxx:3783 +msgid "cannot translate general @defined expression" +msgstr "" + +#: translate.cxx:3790 +msgid "cannot translate general @entry expression" +msgstr "" + +#: translate.cxx:3841 +#, fuzzy +msgid "invalid array reference" +msgstr "Invalid target process ID number." + +#: translate.cxx:3846 +msgid "array index type mismatch" +msgstr "" + +#: translate.cxx:3890 +msgid "expected arrayindex expression" +msgstr "" + +#: translate.cxx:3902 +msgid "unexpected aggregate of non-statistic" +msgstr "" + +#: translate.cxx:3918 +msgid "unexpected aggregate of non-arrayindex" +msgstr "" + +#: translate.cxx:4036 +msgid "statistic-valued array in rvalue context" +msgstr "" + +#: translate.cxx:4130 translate.cxx:4221 +msgid "cannot assign to histogram buckets" +msgstr "" + +#: translate.cxx:4150 +msgid "unexpected reference to scalar" +msgstr "" + +#: translate.cxx:4250 +#, fuzzy +msgid "invalid length argument list" +msgstr "Invalid target process ID number." + +#: translate.cxx:4266 translate.cxx:4286 +msgid "function argument type mismatch" +msgstr "" + +#: translate.cxx:4277 +msgid "function actual argument evaluation" +msgstr "" + +#: translate.cxx:4337 +msgid "unknown type of arg to print operator" +msgstr "" + +#: translate.cxx:4403 +#, c-format +msgid "additional argument to print" +msgid_plural "too many arguments to print (%zu)" +msgstr[0] "" +msgstr[1] "" + +#: translate.cxx:4449 +#, fuzzy +msgid "cannot print unknown expression type" +msgstr "cannot find type: %s" + +#: translate.cxx:4451 +msgid "cannot print a raw stats object" +msgstr "" + +#: translate.cxx:4948 +#, c-format +msgid "Getting symbol table for %s" +msgstr "" + +#: translate.cxx:4980 +#, fuzzy +msgid "unexpected build-id reloc section " +msgstr "# functions" + +#: translate.cxx:4988 +#, c-format +msgid "Found build-id in %s, length %d, start at 0x%#" +msgstr "" + +#: translate.cxx:5037 +#, c-format +msgid "Found kernel _stext extra offset 0x%#" +msgstr "" + +#: translate.cxx:5210 +#, c-format +msgid "skipping module %s eh_frame_hdr table (too big: %s > %s)" +msgstr "" + +#: translate.cxx:5274 +#, c-format +msgid "skipping module %s, section %s debug_frame_hdr table (too big: %s > %s)" +msgstr "" + +#: translate.cxx:5537 +msgid "Searching for vdso candidates: " +msgstr "" + +#: translate.cxx:5547 +msgid "vdso candidate: " +msgstr "" + +#: translate.cxx:5667 +msgid "missing unwind/symbol data for module '" +msgstr "" + +#: translate.cxx:5690 +#, c-format +msgid "identified max-nested function: %s (%d)" +msgstr "" + +#: translate.cxx:5701 +#, c-format +msgid "identified recursive function: %s" +msgstr "" + +#: translate.cxx:5716 +#, c-format +msgid "" +"myproc-unprivileged tapset function called without is_myproc checking for " +"pid %d (euid %d)" +msgstr "" + +#: translate.cxx:5720 +#, c-format +msgid "kernel read fault at 0x%p (%s)" +msgstr "" + +#: translate.cxx:5722 +#, c-format +msgid "kernel write fault at 0x%p (%s)" +msgstr "" + +#: translate.cxx:5724 +#, c-format +msgid "divide by zero in DWARF operand (%s)" +msgstr "" + +#: translate.cxx:5768 +#, c-format +msgid "ignoring extra parts of compat version: %s" +msgstr "" + +#: translate.cxx:5772 +#, c-format +msgid "parse error in compatibility version: %s" +msgstr "" + +#: translate.cxx:5775 +#, c-format +msgid "compatibility version out of range: %s" +msgstr "" + +#: translate.cxx:5795 +msgid " recursive" +msgstr "" + +#: translate.cxx:5795 +msgid " non-recursive" +msgstr "" + +#: translate.cxx:5794 +#, c-format +msgid "function recursion-analysis: max-nesting %d %s" +msgstr "" + +#: util.cxx:59 +msgid "Unable to determine home directory" +msgstr "" + +#: util.cxx:113 +#, c-format +msgid "Copying %s to %s" +msgstr "" + +#: util.cxx:167 +#, c-format +msgid "Copy failed (\"%s\" to \"%s\"): %s" +msgstr "" + +#: util.cxx:250 +msgid "Unable to retrieve group list" +msgstr "" + +#: util.cxx:277 +#, c-format +msgid "using %ldvirt/%ldres/%ldshr kb, " +msgstr "" + +#: util.cxx:400 +msgid "cmdstr_join called with an empty command!" +msgstr "" + +#: util.cxx:450 +#, c-format +msgid "Spawn waitpid call on unmanaged pid %d" +msgstr "" + +#: util.cxx:457 +#, c-format +msgid "Spawn waitpid result (0x%x): %d" +msgstr "" + +#: util.cxx:462 +#, fuzzy, c-format +msgid "Spawn waitpid error (%d): %s" +msgstr "semantic error: %s" + +#: util.cxx:503 +#, c-format +msgid "Warning: %s is not executable (%s)" +msgstr "" + +#: util.cxx:509 +msgid "Running" +msgstr "" + +#: util.cxx:543 +#, fuzzy, c-format +msgid "Spawn error (%d): %s" +msgstr "semantic error: %s" + +#: util.cxx:700 +#, c-format +msgid "regcomp %s (%s) error rc= %d" +msgstr "" + +#: util.cxx:712 +#, c-format +msgid "ERROR: Safety pattern mismatch for %s ('%s' vs. '%s') rc=%d" +msgstr "" + +#: util.cxx:730 +#, c-format +msgid "regcomp %s error rc=%d" +msgstr "" + +#. TRANSLATORS: Missing a file +#: util.cxx:806 +#, c-format +msgid "Missing %s" +msgstr "Missing %s" + +#: util.cxx:825 +#, c-format +msgid "autosprintf/vasprintf error %s" +msgstr "" + +#: util.h:74 util.h:85 util.h:96 util.h:104 util.h:115 util.h:128 +msgid "bad lexical cast" +msgstr "" + +#, fuzzy +#~ msgid "WARNING:" +#~ msgstr "WARNING: " + +#~ msgid "Usage: stap [options] FILE Run script in file." +#~ msgstr "Usage: stap [options] FILE Run script in file." + +#~ msgid " or: stap [options] - Run script on stdin." +#~ msgstr " or: stap [options] - Run script on stdin." + +#~ msgid " or: stap [options] -e SCRIPT Run given script." +#~ msgstr " or: stap [options] -e SCRIPT Run given script." + +#~ msgid " or: stap [options] -l PROBE List matching probes." +#~ msgstr " or: stap [options] -l PROBE List matching probes." + +#~ msgid "" +#~ " or: stap [options] -L PROBE List matching probes and local " +#~ "variables." +#~ msgstr "" +#~ " or: stap [options] -L PROBE List matching probes and local " +#~ "variables." + +#~ msgid "Options:" +#~ msgstr "Options:" + +#~ msgid " -- end of translator options, script options follow" +#~ msgstr " -- end of translator options, script options follow" + +#~ msgid " -h --help show help" +#~ msgstr " -h --help show help" + +#, fuzzy +#~ msgid " -V --version show version" +#~ msgstr " -V show version" + +#~ msgid " -p NUM stop after pass NUM 1-5, instead of " +#~ msgstr " -p NUM stop after pass NUM 1-5, instead of " + +#~ msgid " (parse, elaborate, translate, compile, run)" +#~ msgstr " (parse, elaborate, translate, compile, run)" + +#~ msgid " -v add verbosity to all passes" +#~ msgstr " -v add verbosity to all passes" + +#~ msgid " --vp {N}+ add per-pass verbosity [" +#~ msgstr " --vp {N}+ add per-pass verbosity [" + +#~ msgid " -k keep temporary directory" +#~ msgstr " -k keep temporary directory" + +#~ msgid " -u unoptimized translation %s" +#~ msgstr " -u unoptimized translation %s" + +#~ msgid " -w suppress warnings %s" +#~ msgstr " -w suppress warnings %s" + +#~ msgid " -W turn warnings into errors %s" +#~ msgstr " -W turn warnings into errors %s" + +#~ msgid " -g guru mode %s" +#~ msgstr " -g guru mode %s" + +#~ msgid " -P prologue-searching for function probes %s" +#~ msgstr " -P prologue-searching for function probes %s" + +#~ msgid " -b bulk (percpu file) mode %s" +#~ msgstr " -b bulk (percpu file) mode %s" + +#~ msgid " -s NUM buffer size in megabytes, instead of %d" +#~ msgstr " -s NUM buffer size in megabytes, instead of %d" + +#~ msgid " -I DIR look in DIR for additional .stp script files" +#~ msgstr " -I DIR look in DIR for additional .stp script files" + +#~ msgid " -D NM=VAL emit macro definition into generated C code" +#~ msgstr " -D NM=VAL emit macro definition into generated C code" + +#~ msgid " -B NM=VAL pass option to kbuild make" +#~ msgstr " -B NM=VAL pass option to kbuild make" + +#~ msgid " -G VAR=VAL set global variable to value" +#~ msgstr " -G VAR=VAL set global variable to value" + +#~ msgid " -R DIR look in DIR for runtime, instead of" +#~ msgstr " -R DIR look in DIR for runtime, instead of" + +#~ msgid " -r DIR cross-compile to kernel with given build tree; or else" +#~ msgstr "" +#~ " -r DIR cross-compile to kernel with given build tree; or else" + +#~ msgid "" +#~ " -r RELEASE cross-compile to kernel /lib/modules/RELEASE/build, instead " +#~ "of" +#~ msgstr "" +#~ " -r RELEASE cross-compile to kernel /lib/modules/RELEASE/build, instead " +#~ "of" + +#~ msgid " -a ARCH cross-compile to given architecture, instead of %s" +#~ msgstr " -a ARCH cross-compile to given architecture, instead of %s" + +#~ msgid " -m MODULE set probe module name, instead of " +#~ msgstr " -m MODULE set probe module name, instead of " + +#, fuzzy +#~ msgid "" +#~ " -o FILE send script output to file, instead of stdout. This " +#~ "supports\n" +#~ " strftime(3) formats for FILE" +#~ msgstr "" +#~ " -o FILE send script output to file, instead of stdout. This supports" + +#~ msgid " -c CMD start the probes, run CMD, and exit when it finishes" +#~ msgstr " -c CMD start the probes, run CMD, and exit when it finishes" + +#~ msgid " -x PID sets target() to PID" +#~ msgstr " -x PID sets target() to PID" + +#~ msgid " -F run as on-file flight recorder with -o." +#~ msgstr " -F run as on-file flight recorder with -o." + +#~ msgid " run as on-memory flight recorder without -o." +#~ msgstr " run as on-memory flight recorder without -o." + +#~ msgid " -S size[,n] set maximum of the size and the number of files." +#~ msgstr " -S size[,n] set maximum of the size and the number of files." + +#~ msgid " -d OBJECT add unwind/symbol data for OBJECT file" +#~ msgstr " -d OBJECT add unwind/symbol data for OBJECT file" + +#, fuzzy +#~ msgid "" +#~ " --ldd add unwind/symbol data for all referenced object files." +#~ msgstr "" +#~ " --ldd add unwind/symbol data for all referenced OBJECT files." + +#~ msgid " add unwind/symbol data for all loaded kernel objects." +#~ msgstr " add unwind/symbol data for all loaded kernel objects." + +#~ msgid " -t collect probe timing information" +#~ msgstr " -t collect probe timing information" + +#~ msgid " -q generate information on tapset coverage" +#~ msgstr " -q generate information on tapset coverage" + +#~ msgid "" +#~ " restrict usage to features available to unprivileged users" +#~ msgstr "" +#~ " restrict usage to features available to unprivileged users" + +#~ msgid "" +#~ " suppress incompatible language/tapset changes beyond " +#~ "VERSION," +#~ msgstr "" +#~ " suppress incompatible language/tapset changes beyond " +#~ "VERSION," + +#~ msgid " instead of %s" +#~ msgstr " instead of %s" + +#~ msgid " displays warnings where a syntax element may be " +#~ msgstr " displays warnings where a syntax element may be " + +#~ msgid " version dependent" +#~ msgstr " version dependent" + +#~ msgid " --skip-badvars" +#~ msgstr " --skip-badvars" + +#~ msgid " substitute zero for bad context $variables" +#~ msgstr " substitute zero for bad context $variables" + +#~ msgid " --use-server[=SERVER-SPEC]" +#~ msgstr " --use-server[=SERVER-SPEC]" + +#~ msgid " specify systemtap compile-servers" +#~ msgstr " specify systemtap compile-servers" + +#~ msgid " --list-servers[=PROPERTIES]" +#~ msgstr " --list-servers[=PROPERTIES]" + +#~ msgid " report on the status of the specified compile-servers" +#~ msgstr " report on the status of the specified compile-servers" + +#~ msgid " --trust-servers[=TRUST-SPEC]" +#~ msgstr " --trust-servers[=TRUST-SPEC]" + +#~ msgid " add/revoke trust of specified compile-servers" +#~ msgstr " add/revoke trust of specified compile-servers" + +#~ msgid " --use-server-on-error[=yes/no]" +#~ msgstr " --use-server-on-error[=yes/no]" + +#~ msgid "" +#~ " retry compilation using a compile server upon compilation " +#~ "error" +#~ msgstr "" +#~ " retry compilation using a compile server upon compilation " +#~ "error" + +#~ msgid " --remote=HOSTNAME" +#~ msgstr " --remote=HOSTNAME" + +#, fuzzy +#~ msgid " run pass 5 on the specified ssh host." +#~ msgstr " run pass 5 on the specified ssh host (EXPERIMENTAL)" + +#~ msgid "You can't specify -g and --unprivileged together." +#~ msgstr "You can't specify -g and --unprivileged together." + +#~ msgid "You can't specify --kelf and --kmap together." +#~ msgstr "You can't specify --kelf and --kmap together." + +#~ msgid "ERROR: -R invalid with --client-options" +#~ msgstr "ERROR: -R invalid with --client-options" + +#~ msgid "ERROR: -B invalid with --client-options" +#~ msgstr "ERROR: -B invalid with --client-options" + +#~ msgid "ERROR: --disable-cache is invalid with --client-options" +#~ msgstr "ERROR: --disable-cache is invalid with --client-options" + +#~ msgid "ERROR: --poison-cache is invalid with --client-options" +#~ msgstr "ERROR: --poison-cache is invalid with --client-options" + +#~ msgid "ERROR: --clean-cache is invalid with --client-options" +#~ msgstr "ERROR: --clean-cache is invalid with --client-options" + +#~ msgid "ERROR: --ldd is invalid with --client-options" +#~ msgstr "ERROR: --ldd is invalid with --client-options" + +#~ msgid "ERROR: --all-modules is invalid with --client-options" +#~ msgstr "ERROR: --all-modules is invalid with --client-options" + +#~ msgid "ERROR: --remote is invalid with --client-options" +#~ msgstr "ERROR: --remote is invalid with --client-options" + +#, fuzzy +#~ msgid "using " +#~ msgstr "Missing %s" + +#~ msgid " --all-modules" +#~ msgstr " --all-modules" + +#~ msgid " --unprivileged" +#~ msgstr " --unprivileged" + +#~ msgid " --compatible=VERSION" +#~ msgstr " --compatible=VERSION" + +#~ msgid " --check-version" +#~ msgstr " --check-version" + +#~ msgid "ERROR: -q invalid with --client-options" +#~ msgstr "ERROR: -q invalid with --client-options" + +#~ msgid "]" +#~ msgstr "]" + +#~ msgid " %s" +#~ msgstr " %s" + +#~ msgid " strftime(3) formats for FILE" +#~ msgstr " strftime(3) formats for FILE" + +#~ msgid "SystemTap translator/driver " +#~ msgstr "SystemTap translator/driver " + +#~ msgid "(version " +#~ msgstr "(version " + +#~ msgid "Copyright (C) 2005-2011 Red Hat, Inc. and others" +#~ msgstr "Copyright (C) 2005-2011 Red Hat, Inc. and others" + +#~ msgid "This is free software; see the source for copying conditions." +#~ msgstr "This is free software; see the source for copying conditions." + +#, fuzzy +#~ msgid "which contained one vmlinux export" +#~ msgid_plural "which contained %zu vmlinux exports" +#~ msgstr[0] "which contained one vmlinux export" +#~ msgstr[1] "which contained one vmlinux export" + +#, fuzzy +#~ msgid "expected '" +#~ msgstr "# functions" + +#, fuzzy +#~ msgid "" +#~ "Checking \" %s \" failed: %s\n" +#~ "Ensure kernel development headers & makefiles are installed." +#~ msgstr "Ensure kernel development headers & makefiles are installed." + +#~ msgid "cannot get type of variable: %s" +#~ msgstr "cannot get type of variable: %s" + +#~ msgid "extra fields after =" +#~ msgstr "extra fields after =" + +#~ msgid "bad field for array type: %s" +#~ msgstr "bad field for array type: %s" + +#~ msgid "empty struct %s" +#~ msgstr "empty struct %s" + +#~ msgid "%s %s: %s" +#~ msgstr "%s %s: %s" + +#~ msgid "field %s vs base type %s" +#~ msgstr "field %s vs base type %s" + +#~ msgid "%s: unexpected type tag %#x" +#~ msgstr "%s: unexpected type tag %#x" + +#~ msgid "store not supported for pointer type" +#~ msgstr "store not supported for pointer type" + +#~ msgid "store supported only for base type" +#~ msgstr "store supported only for base type" + +#~ msgid "fetch supported only for base type or pointer" +#~ msgstr "fetch supported only for base type or pointer" + +#~ msgid "cannot get die scopes inlined_subroutine: %s" +#~ msgstr "cannot get die scopes inlined_subroutine: %s" + +#~ msgid "cannot get location of variable: %s" +#~ msgstr "cannot get location of variable: %s" + +#~ msgid "dwarf_getlocation_addr: %s" +#~ msgstr "dwarf_getlocation_addr: %s" + +#~ msgid "discontiguify of noncontiguous location not supported" +#~ msgstr "discontiguify of noncontiguous location not supported" + +#, fuzzy +#~ msgid "insert or ignore into counts values ('" +#~ msgstr "cannot index into constant value" + +#~ msgid "Ensure kernel development headers & makefiles are installed." +#~ msgstr "Ensure kernel development headers & makefiles are installed." diff -Nru systemtap-1.4/po/en@quot.header systemtap-1.6/po/en@quot.header --- systemtap-1.4/po/en@quot.header 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/po/en@quot.header 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,22 @@ +# All this catalog "translates" are quotation characters. +# The msgids must be ASCII and therefore cannot contain real quotation +# characters, only substitutes like grave accent (0x60), apostrophe (0x27) +# and double quote (0x22). These substitutes look strange; see +# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html +# +# This catalog translates grave accent (0x60) and apostrophe (0x27) to +# left single quotation mark (U+2018) and right single quotation mark (U+2019). +# It also translates pairs of apostrophe (0x27) to +# left single quotation mark (U+2018) and right single quotation mark (U+2019) +# and pairs of quotation mark (0x22) to +# left double quotation mark (U+201C) and right double quotation mark (U+201D). +# +# When output to an UTF-8 terminal, the quotation characters appear perfectly. +# When output to an ISO-8859-1 terminal, the single quotation marks are +# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to +# grave/acute accent (by libiconv), and the double quotation marks are +# transliterated to 0x22. +# When output to an ASCII terminal, the single quotation marks are +# transliterated to apostrophes, and the double quotation marks are +# transliterated to 0x22. +# Binary files /tmp/DYbL1hZvjo/systemtap-1.4/po/fr.gmo and /tmp/LDb_u7dVDK/systemtap-1.6/po/fr.gmo differ diff -Nru systemtap-1.4/po/fr.po systemtap-1.6/po/fr.po --- systemtap-1.4/po/fr.po 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/po/fr.po 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,5467 @@ +# French translations for systemtap package +# Traductions françaises du paquet systemtap. +# Copyright (C) 2011 Red Hat Inc., and others +# This file is distributed under the same license as the systemtap package. +# Adrien Kunysz , 2011. +# With some help from Wikipedia, Wiktionary, Google Translate, +# , glibc/po/fr.po, +# gdb/opcodes/po/fr.po, gdb/bfd/po/fr.po and gcc/po/fr.po. +# +# Areas where improvement is needed are marked with "XXX". +# The following assumptions and decisions have been made but can be discussed +# and revised: +# +# * The word "tracepoint" is not to be translated. +# * The word "probe" is generally not translated and we use it as a +# masculine name ("un probe"). +# * The word "statement" has been translated to "expression" or +# "instruction" depending on the context although it is not strictly +# correct but not even gcc people could find a good equivalent. +# * Most (all?) occurences of the word "die" stand for "DWARF Debugging +# Information Entry". Consequently, "dieoffset" has been translated as +# "offset du DIE". We can probably do better. +# * The word "location" has been translated to "adresse" but this is +# usually not strictly correct as the location may refer to a register +# for example. Maybe "emplacement" or "localisation" would be better. +msgid "" +msgstr "" +"Project-Id-Version: systemtap 1.5\n" +"Report-Msgid-Bugs-To: systemtap@sourceware.org\n" +"POT-Creation-Date: 2011-07-21 08:00-0400\n" +"PO-Revision-Date: 2011-04-05 16:53-0400\n" +"Last-Translator: Adrien Kunysz \n" +"Language-Team: French\n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#: buildrun.cxx:296 +#, c-format +msgid "" +"Checking \" %s \" failed with error: %s\n" +"Ensure kernel development headers & makefiles are installed." +msgstr "" +"La vérification de \"%s\" a échoué avec une erreur : %s\n" +"Vérifiez que les en-têtes et makefiles sont installés" + +#: buildrun.cxx:325 +msgid "Pass 4, preamble: (re)building SystemTap's version of uprobes." +msgstr "" +"Passe 4, préambule : (re)compilation de la version d'uprobeutilisée par " +"SystemTap." + +#: buildrun.cxx:333 +#, fuzzy +msgid "Warning: failed to create directory for build uprobes." +msgstr "Attention : échec de la création du répertoire pour obtenir les types." + +#: buildrun.cxx:362 +msgid "uprobes rebuild exit code: " +msgstr "code de retour de la recompilation d'uprobes : " + +#: buildrun.cxx:421 +msgid "user-space facilities not available without kernel CONFIG_UTRACE" +msgstr "" +"l'instrumentation de l'espace utilisateur n'est pas possible sans un kernel " +"utilisant CONFIG_UTRACE" + +#: buildrun.cxx:526 +msgid "Warning: failed to create directory for querying tracepoints." +msgstr "" +"Attention : échec de la création du répertoire pour obtenir les tracepoints." + +#: buildrun.cxx:607 +msgid "Warning: failed to create directory for querying types." +msgstr "Attention : échec de la création du répertoire pour obtenir les types." + +#: buildrun.cxx:708 +#, c-format +msgid "Warning: skipping malformed @cast header \"%s\"" +msgstr "Attention : l'en-tête @cast \"%s\" est malformé et a été ignoré" + +#: cache.cxx:128 cache.cxx:217 +msgid "Pass 4: using cached " +msgstr "Passe 4 : utilisation du cache pour " + +#: cache.cxx:215 +msgid "Pass 3: using cached " +msgstr "Passe 3 : utilisation du cache pour " + +#: cache.cxx:249 +#, c-format +msgid "Cache limit file %s/%s missing, creating default." +msgstr "" +"Le fichier de limite de taille de cache %s/%s est manquant, création avec la " +"valeur par défaut." + +#: cache.cxx:349 +msgid "Cache cleaning successful, removed entries: " +msgstr "Nettoyage du cache effectué, entrées supprimées : " + +#: cache.cxx:356 +msgid "Cache cleaning skipped, no cache path." +msgstr "Nettoyage du cache ignoré, pas de chemin vers le cache." + +# XXX: coveragedb.cxx should probably be cleaned up and clarified +# XXX: before attempting translation +#: coveragedb.cxx:28 +msgid "---- used probes-----" +msgstr "" + +#: coveragedb.cxx:35 coveragedb.cxx:58 +msgid "probe: " +msgstr "" + +#: coveragedb.cxx:42 +msgid "local: " +msgstr "" + +#: coveragedb.cxx:45 +msgid "unused_local: " +msgstr "" + +#: coveragedb.cxx:51 +msgid "---- unused probes----- " +msgstr "" + +#: coveragedb.cxx:64 +msgid "---- used functions----- " +msgstr "" + +#: coveragedb.cxx:72 +msgid "---- unused functions----- " +msgstr "" + +#: coveragedb.cxx:74 +msgid "unused_function: " +msgstr "" + +#: coveragedb.cxx:79 +msgid "---- used globals----- " +msgstr "" + +#: coveragedb.cxx:81 coveragedb.cxx:88 +msgid "globals: " +msgstr "" + +#: coveragedb.cxx:86 +msgid "---- unused globals----- " +msgstr "" + +#: coveragedb.cxx:110 coveragedb.cxx:133 coveragedb.cxx:151 +msgid "Error in statement: " +msgstr "Erreur dans l'expression : " + +#: csclient.cxx:67 +#, c-format +msgid "" +"WARNING: The domain name, %s, does not match the DNS name(s) on the server " +"certificate:\n" +msgstr "" + +# XXX: assuming the file contains only one signature (as per PR_TRUNCATE) +#: csclient.cxx:68 +#, fuzzy, c-format +msgid "could not find input file %s\n" +msgstr "Ne peut ouvrir le fichier de signature " + +# XXX: assuming the file contains only one signature (as per PR_TRUNCATE) +#: csclient.cxx:69 +#, fuzzy, c-format +msgid "could not open input file %s\n" +msgstr "Ne peut ouvrir le fichier de signature " + +#: csclient.cxx:70 +#, fuzzy, c-format +msgid "Unable to open output file %s\n" +msgstr "Incapable de récupérer la liste des groupes" + +#: csclient.cxx:71 +#, c-format +msgid "could not write to %s\n" +msgstr "" + +#: csclient.cxx:353 +#, c-format +msgid "Unable to find alt name extension on the server certificate\n" +msgstr "" + +#: csclient.cxx:362 csclient.cxx:578 +#, c-format +msgid "Out of memory\n" +msgstr "" + +#: csclient.cxx:370 +#, c-format +msgid "Unable to decode alt name extension on server certificate\n" +msgstr "" + +#: csclient.cxx:704 +#, fuzzy, c-format +msgid "Unable to resolve server host name" +msgstr "Incapable de récupérer la liste des groupes" + +#: csclient.cxx:710 +#, c-format +msgid "Unable to resolve server host address" +msgstr "" + +#: csclient.cxx:756 +#, fuzzy +msgid "Using a compile server." +msgstr "" +" réessayer la compilation avec un serveur de compilation lors " +"d'une erreur" + +#: csclient.cxx:806 +msgid "Passes: via server " +msgstr "" + +#: csclient.cxx:813 +#, fuzzy +msgid "Passes: via server failed. Try again with another '-v' option." +msgstr "" +"Passe 1 : échec de l'analyse syntaxique. Essayez encore avec une option '--" +"vp 1' supplémentaire." + +#: csclient.cxx:864 +#, fuzzy +msgid "ERROR: cannot create temporary directory (\"" +msgstr "ERREUR : ne peut créer le répertoire temporaire %s : %s" + +#: csclient.cxx:892 +#, fuzzy +msgid "ERROR: cannot create temporary directory " +msgstr "ERREUR : ne peut créer le répertoire temporaire %s : %s" + +#: csclient.cxx:1166 +#, fuzzy +msgid "Unable to find a compile server." +msgstr "Incapable d'initialiser la bibliothèque nss." + +#: csclient.cxx:1184 +msgid "A server's certificate was expired. Trying again" +msgstr "" + +#: csclient.cxx:1192 +#, fuzzy +msgid "Unable to connect to a server." +msgstr "Impossible d'obtenir des informations sur " + +#: csclient.cxx:1239 csclient.cxx:1686 stap-serverd.cxx:1621 +msgid "Unable to set NSS export policy" +msgstr "" + +#: csclient.cxx:1253 +#, c-format +msgid "" +"Attempting SSL connection with %s\n" +" using certificates from the database in %s\n" +msgstr "" + +#: csclient.cxx:1292 +msgid " Unable to connect: " +msgstr "" + +#: csclient.cxx:1328 +#, c-format +msgid "Unable to unzip the server response '%s'\n" +msgstr "" + +#: csclient.cxx:1345 csclient.cxx:1363 csclient.cxx:1431 csclient.cxx:1738 +#, c-format +msgid "Searching \"%s\"\n" +msgstr "" + +#: csclient.cxx:1351 +msgid "Incorrect number of files in server response" +msgstr "" + +#: csclient.cxx:1359 csclient.cxx:1444 csclient.cxx:1746 +#, fuzzy +msgid " found " +msgstr ", pas trouvé" + +#: csclient.cxx:1376 +#, c-format +msgid " found %s -- linking from %s" +msgstr "" + +#: csclient.cxx:1380 +#, fuzzy, c-format +msgid "Unable to link '%s' to '%s':%s\n" +msgstr "incapable de trouver le membre '%s' pour %s%s%s" + +#: csclient.cxx:1438 +msgid "Incorrect number of modules in server response" +msgstr "" + +#: csclient.cxx:1474 +#, fuzzy +msgid "No module was returned by the server." +msgstr "Aucun module a été renvoyé par le serveur" + +#: csclient.cxx:1501 csclient.cxx:1570 cscommon.cxx:92 +#, c-format +msgid "Unable to open file '%s' for reading: " +msgstr "Impossible d'ouvrir le fichier '%s' pour la lecture: " + +#: csclient.cxx:1510 cscommon.cxx:101 +#, fuzzy, c-format +msgid "Unable to read from file '%s': " +msgstr "Incapable de récupérer la liste des groupes" + +#: csclient.cxx:1521 csclient.cxx:1556 csclient.cxx:1594 cscommon.cxx:114 +#, fuzzy +msgid "unknown error" +msgstr "type de tableau inconnu" + +#: csclient.cxx:1536 +#, fuzzy, c-format +msgid "Unable to open file '%s' for writing: " +msgstr "Impossible d'ouvrir le fichier %s pour l'écriture" + +#: csclient.cxx:1545 +#, fuzzy, c-format +msgid "Unable to write to file '%s': " +msgstr "Incapable de récupérer la liste des groupes" + +#: csclient.cxx:1604 +#, c-format +msgid "Server protocol version is %s\n" +msgstr "" + +#: csclient.cxx:1605 +msgid "The server does not use localization information passed by the client\n" +msgstr "" + +#: csclient.cxx:1621 csclient.cxx:2285 +msgid "as a module signer for all users" +msgstr "" + +#: csclient.cxx:1624 csclient.cxx:2275 +msgid "as an SSL peer" +msgstr "" + +#: csclient.cxx:1626 csclient.cxx:2277 +msgid " for all users" +msgstr "" + +#: csclient.cxx:1628 csclient.cxx:2279 +msgid " for the current user" +msgstr "" + +#: csclient.cxx:1637 +msgid " is already " +msgstr "" + +#: csclient.cxx:1639 +msgid "untrusted " +msgstr "" + +#: csclient.cxx:1641 +msgid "trusted " +msgstr "" + +#: csclient.cxx:1661 +#, fuzzy, c-format +msgid "Unable to find or create the client certificate database directory %s: " +msgstr "" +"Incapable de déterminer le chemin vers la base de données de certificats." + +#: csclient.cxx:1723 +#, fuzzy, c-format +msgid "Unable to connect to %s" +msgstr "Impossible d'obtenir des informations sur " + +#: csclient.cxx:1750 +#, c-format +msgid "Warning: Unable to change permissions on %s: " +msgstr "" + +#: csclient.cxx:1769 +#, c-format +msgid "Certificate database '%s' does not exist" +msgstr "" + +#: csclient.cxx:1805 csclient.cxx:1947 +msgid "Out of memory:" +msgstr "" + +#: csclient.cxx:1848 +#, fuzzy, c-format +msgid "Unable to query certificate database %s: " +msgstr "" +"Incapable d'obtenir le mot de passe de la base de données de certificats." + +#: csclient.cxx:1887 +#, fuzzy, c-format +msgid "Unable to remove certificate from %s: " +msgstr "" +"Incapable de déterminer le chemin vers la base de données de certificats." + +#: csclient.cxx:1917 +#, c-format +msgid "Certificate database '%s' does not exist." +msgstr "" + +#: csclient.cxx:1939 nsscommon.cxx:1148 +#, fuzzy, c-format +msgid "No certificate found in database %s" +msgstr "" +"Incapable d'obtenir le mot de passe de la base de données de certificats." + +#: csclient.cxx:1969 +msgid "Unable to find alt name extension on server certificate: " +msgstr "" + +#: csclient.cxx:1979 +msgid "Unable to decode alt name extension on server certificate: " +msgstr "" + +#: csclient.cxx:2125 +#, fuzzy, c-format +msgid "Warning: unsupported compile server property: %s" +msgstr "opérateur de comparaison attendu" + +#: csclient.cxx:2174 +#, c-format +msgid "Systemtap Compile Server Status for '%s'" +msgstr "" + +#: csclient.cxx:2189 +#, fuzzy +msgid "No servers found" +msgstr ", pas trouvé" + +#: csclient.cxx:2226 +msgid "Only root can specify 'signer' on --trust-servers" +msgstr "" + +#: csclient.cxx:2238 +msgid "Only root can specify 'all-users' on --trust-servers" +msgstr "" + +#: csclient.cxx:2247 +msgid "Warning: Unrecognized server trust specification: " +msgstr "" + +#: csclient.cxx:2264 +msgid "No servers identified for trust" +msgstr "" + +#: csclient.cxx:2284 +msgid " and " +msgstr "" + +#: csclient.cxx:2292 +msgid "Revoking trust " +msgstr "" + +#: csclient.cxx:2294 +msgid "Adding trust " +msgstr "" + +#: csclient.cxx:2299 +msgid "Revoke trust " +msgstr "" + +#: csclient.cxx:2301 +msgid "Add trust " +msgstr "" + +#: csclient.cxx:2303 +#, c-format +msgid "in the following servers %s" +msgstr "" + +#: csclient.cxx:2318 +msgid "Server trust unchanged" +msgstr "" + +#: csclient.cxx:2496 csclient.cxx:2534 +#, fuzzy, c-format +msgid "Invalid port number specified: %s" +msgstr "période d'échantillonnage perf invalide" + +#: csclient.cxx:2515 +#, c-format +msgid "No server matching %s found" +msgstr "" + +#: csclient.cxx:2596 +#, fuzzy +msgid "Unable to determine server trust as an SSL peer" +msgstr "" +"Incapable de déterminer le chemin vers la base de données de certificats." + +#: csclient.cxx:2642 +#, fuzzy +msgid "Unable to determine server trust as a module signer" +msgstr "Incapable de déterminer le répertoire d'accueil de l'utilisateur" + +#: csclient.cxx:2709 +#, fuzzy +msgid "Unable to detect server compatibility" +msgstr "Incapable de récupérer la liste des groupes" + +#: csclient.cxx:2893 +#, c-format +msgid "Failed to resolve service '%s' of type '%s' in domain '%s': %s" +msgstr "" + +#: csclient.cxx:2950 +#, c-format +msgid "Avahi browse failed: %s" +msgstr "" + +#: csclient.cxx:2963 +#, c-format +msgid "Failed to resolve service '%s': %s" +msgstr "" + +#: csclient.cxx:2984 +#, c-format +msgid "Avahi Server connection failure: %s" +msgstr "" + +#: csclient.cxx:3030 +msgid "Failed to create Avahi simple poll object" +msgstr "" + +#: csclient.cxx:3046 +#, c-format +msgid "Failed to create Avahi client: %s" +msgstr "" + +#: csclient.cxx:3058 +#, c-format +msgid "Failed to create Avahi service browser: %s" +msgstr "" + +#: csclient.cxx:3105 +#, fuzzy +msgid "Unable to detect online servers" +msgstr "Incapable de déterminer le répertoire d'accueil de l'utilisateur" + +#: dtrace.in:165 +msgid "Usage " +msgstr "" + +#: dtrace.in:169 +msgid "Where -h builds a systemtap header file from the .d file" +msgstr "" + +#: dtrace.in:170 +msgid " -C when used with -h, also run cpp preprocessor" +msgstr "" + +#: dtrace.in:171 +msgid " -o specifies an explicit output file name," +msgstr "" + +#: dtrace.in:172 +msgid " the default for -G is file.o and -h is file.h" +msgstr "" + +#: dtrace.in:173 +msgid " -I when running cpp pass through this -I include Path" +msgstr "" + +#: dtrace.in:174 +msgid " -s specifies the name of the .d input file" +msgstr "" + +#: dtrace.in:175 +msgid " -G builds a stub file.o from file.d," +msgstr "" + +#: dtrace.in:176 +msgid " which is required by some packages that use dtrace." +msgstr "" + +#: dwarf_wrappers.cxx:25 +#, c-format +msgid "libdwfl failure (%s): " +msgstr "" + +#: dwarf_wrappers.cxx:37 +#, c-format +msgid "libdw failure (%s): " +msgstr "" + +#: dwflpp.cxx:127 +msgid "cannot find " +msgstr "impossible de trouver " + +#: dwflpp.cxx:144 session.cxx:1488 +msgid "WARNING: " +msgstr "ATTENTION : " + +#: dwflpp.cxx:235 +#, c-format +msgid "pattern '%s' matches module '%s'\n" +msgstr "le motif '%s' correspond au module '%s'\n" + +#: dwflpp.cxx:265 +#, c-format +msgid "pattern '%s' matches function '%s'\n" +msgstr "le motif '%s' correspond à la fonction '%s'\n" + +#: dwflpp.cxx:321 dwflpp.cxx:347 +#, c-format +msgid "missing %s kernel/module debuginfo under '%s'" +msgstr "" +"les informations de débogage pour le kernel/module %s sous '%s' sont " +"manquantes" + +#: dwflpp.cxx:364 +#, c-format +msgid "missing process %s %s debuginfo" +msgstr "" + +#: dwflpp.cxx:566 +#, c-format +msgid "die parent cache %s:%s size %zu" +msgstr "taille du cache du DIE parent %s:%s : %zu" + +#: dwflpp.cxx:782 +#, c-format +msgid "global alias cache %s:%s size %zu" +msgstr "taille du cache des aliases globaux %s:%s : %zu" + +#: dwflpp.cxx:845 +#, c-format +msgid "function cache %s:%s size %zu" +msgstr "taille du cache de fonctions %s:%s : %zu" + +#: dwflpp.cxx:858 +#, c-format +msgid "function cache %s:%s hit %s" +msgstr "succés de cache de fonction %s:%s : %s" + +#: dwflpp.cxx:880 dwflpp.cxx:898 +#, c-format +msgid "function cache %s:%s match %s vs %s" +msgstr "correspondance dans le cache de fonctions %s:%s %s vs %s" + +#: dwflpp.cxx:932 +#, c-format +msgid "module function cache %s size %zu" +msgstr " taille du cache de fonctions de modules %s : %zu" + +#: dwflpp.cxx:946 +#, c-format +msgid "module function cache %s hit %s" +msgstr " succés de cache de fonctions de modules %s : %s" + +#: dwflpp.cxx:1096 +#, fuzzy, c-format +msgid "module %s --ldd skipped: unsupported interpreter: %s" +msgstr "initiateur non supportée pour %s" + +#: dwflpp.cxx:1113 +#, c-format +msgid "library iteration on %s failed: %s" +msgstr "" + +#: dwflpp.cxx:1142 +#, c-format +msgid "Added -d '%s" +msgstr "" + +#: dwflpp.cxx:1144 +#, c-format +msgid "' due to '%s'" +msgstr "" + +#: dwflpp.cxx:1157 +#, fuzzy, c-format +msgid "Warning: failed to read libraries from %s: %s" +msgstr "Attention : ne peut lire la table de symboles depuis %s -- %s" + +#: dwflpp.cxx:1198 +#, c-format +msgid "alternative line %d rejected: nsrcs=%zu" +msgstr "ligne alternative %d rejetée : nsrcs=%zu" + +#: dwflpp.cxx:1215 +#, c-format +msgid "alternative line %d accepted: fn=%s" +msgstr "ligne alternative %d acceptée : fn=%s" + +#: dwflpp.cxx:1227 +#, c-format +msgid "alternative line %d accepted: ifn=%s" +msgstr "ligne alternative %d acceptée : ifn=%s" + +#. TRANSLATORS: given line number leaves (is beyond) given function. +#: dwflpp.cxx:1234 +#, c-format +msgid "alternative line %d rejected: leaves selected fns" +msgstr "" +"ligne alternative %d rejetée : hors des limites des fonctions sélectionnées" + +#: dwflpp.cxx:1300 +msgid "Invalid line range (" +msgstr "Intervalle invalide (" + +#: dwflpp.cxx:1302 +msgid ", the end line number " +msgstr ", numéro de ligne de fin " + +#: dwflpp.cxx:1374 +#, c-format +msgid "multiple addresses for %s:%d" +msgstr "adresses multiples pour %s:%d" + +#. TRANSLATORS: Here we are trying to advise what source file +#. TRANSLATORS: to attempt. +#: dwflpp.cxx:1379 +msgid " (try " +msgstr "(essayez " + +#: dwflpp.cxx:1383 +msgid " or " +msgstr " ou " + +#: dwflpp.cxx:1454 +#, c-format +msgid "" +"label '%s' at address %s (dieoffset: %s) is not contained by its scope " +"'%s' (dieoffset: %s) -- bad debuginfo?" +msgstr "" +"l'étiquette '%s' à l'adresse %s (offset du DIE : %s) n'est pas contenu par " +"sa portée '%s' (adresse relative du DIE : %s) -- mauvaises informations de " +"débogage ?" + +#: dwflpp.cxx:1508 +#, c-format +msgid "selected source file '%s'\n" +msgstr "fichier source '%s' sélectionné\n" + +# "attribute" works too as it is used in the DWARF4 spec +#: dwflpp.cxx:1578 +#, c-format +msgid "missing entrypc dwarf line record for function '%s'\n" +msgstr "attribut DWARF entrypc manquant pour la fonction '%s'\n" + +#: dwflpp.cxx:1588 +#, c-format +msgid "null entrypc dwarf line record for function '%s'\n" +msgstr "attribut DWARF entrypc nul pour la fonction '%s'\n" + +#: dwflpp.cxx:1596 +#, c-format +msgid "" +"searching for prologue of function '%s' 0x%#-0x%#@%s:%d\n" +msgstr "" +"recherche du prologue de la fonction '%s' 0x%#-0x%#@%s:%d\n" + +#: dwflpp.cxx:1621 +#, c-format +msgid "checking line record 0x%#@%s:%d\n" +msgstr "vérification de l'enregistrement 0x%#@%s:%d\n" + +#: dwflpp.cxx:1638 +#, c-format +msgid "prologue found function '%s'" +msgstr "prologue de fonction '%s' trouvé" + +#. TRANSLATORS: Here we're adding some classification datum (ie Prologue Free) +#: dwflpp.cxx:1641 +msgid " (naked)" +msgstr " (sans prologue)" + +#. TRANSLATORS: Here we're adding some classification datum (ie Prologue Free) +#: dwflpp.cxx:1643 +msgid " (tail-call?)" +msgstr "(récursion terminale ?)" + +#: dwflpp.cxx:1707 +#, c-format +msgid ", ignored %s more" +msgstr ", %s de plus ont été ignorés" + +#: dwflpp.cxx:1716 +msgid " (skip comdat)" +msgstr " (comdat ignoré)" + +#: dwflpp.cxx:1721 +#, c-format +msgid "entry-pc lookup (%s dieoffset: %s) = 0x%# (rc %d" +msgstr "" +"recherche d'entry-pc (%s adresse relative du DIE : %s) = 0x%# (rc %d" + +#: dwflpp.cxx:1837 +msgid "emit_address internal error, no dwfl" +msgstr "erreur interne d'emit_address, pas de dwfl" + +#: dwflpp.cxx:1843 +#, fuzzy, c-format +msgid "" +"emit_address internal error, dwfl_addrmodule failed, address 0x%#" +msgstr "" +"erreur interne d'emit_address, dwfl_adddrmodule a échoué, adresse 0x" +"%#" + +#: dwflpp.cxx:1862 +#, c-format +msgid "" +"emit dwarf addr 0x%# => module %s section %s relocaddr 0x%#" +msgstr "" +"émission de l'adresse DWARF 0x%# => module %s section %s relocaddr 0x" +"%#" + +#: dwflpp.cxx:1967 +msgid " in " +msgstr " dans " + +#: dwflpp.cxx:1970 elaborate.cxx:580 +msgid " (alternatives:" +msgstr " (alternatives :" + +#: dwflpp.cxx:1966 +#, c-format +msgid "unable to find local '%s' near pc %s %s %s %s (%s)" +msgstr "" +"incapable de trouver la variable locale '%s' près du PC %s %s %s %s (%s)" + +#: dwflpp.cxx:2001 +#, c-format +msgid "unable to get die scopes for '%s' in an inlined subroutine" +msgstr "" +"incapable d'obtenir les portées DIE pour '%s' dans une sous-routine en ligne" + +#: dwflpp.cxx:2052 +#, c-format +msgid "not accessible at this address (%s, dieoffset: %s)" +msgstr "pas accessible à cette adresse (%s, adresse relative du DIE : %s)" + +#: dwflpp.cxx:2058 +#, c-format +msgid "dwarf_getlocation_addr failed, %s" +msgstr "dwarf_getlocation_addr a échoué, %s" + +#: dwflpp.cxx:2081 +#, c-format +msgid " Error: %s isn't a struct/class/union" +msgstr " Erreur : %s n'est pas un struct/class/union" + +#: dwflpp.cxx:2091 +#, c-format +msgid "%s is empty" +msgstr "%s est vide" + +#: dwflpp.cxx:2123 +#, c-format +msgid "" +"\n" +" Error in obtaining type attribute for anonymous member at %s:%d" +msgstr "" +"\n" +" Erreur lors de la récupération de l'attribut de type pourle membre anonyme " +"à %s:%d" + +#: dwflpp.cxx:2197 +#, c-format +msgid "no location for field '%s':%s" +msgstr "pas d'adresse pour le champ '%s':%s" + +#: dwflpp.cxx:2208 +#, c-format +msgid "cannot get type of field: %s" +msgstr "ne peut obtenir le type du champ : %s" + +#: dwflpp.cxx:2254 +#, c-format +msgid "invalid access '%s' vs '%s'" +msgstr "accès invalide '%s' vs %s" + +#: dwflpp.cxx:2282 +#, c-format +msgid "invalid access '%s' for array type" +msgstr "accès invalide '%s' pour le tableau de type" + +#: dwflpp.cxx:2294 +#, c-format +msgid "invalid access '%s' for %s" +msgstr "accès invalide '%s' pour %s" + +#: dwflpp.cxx:2301 +#, c-format +msgid "unresolved %s" +msgstr "%s non résolu" + +#: dwflpp.cxx:2326 +#, c-format +msgid "unable to find member '%s' for %s%s%s" +msgstr "incapable de trouver le membre '%s' pour %s%s%s" + +#: dwflpp.cxx:2343 +#, c-format +msgid "invalid access '%s' vs. %s" +msgstr "accès invalide '%s' vs. %s" + +#: dwflpp.cxx:2348 +#, c-format +msgid "cannot find type: %s" +msgstr "incapable de trouver le type : %s" + +#: dwflpp.cxx:2352 +#, c-format +msgid "%s: unexpected type tag %s" +msgstr "%s : marqueur de type inattendu : %s" + +#: dwflpp.cxx:2372 +#, c-format +msgid "cannot get type of pointee: %s" +msgstr "incapable d'obtenir le type du pointé : %s" + +#: dwflpp.cxx:2401 +msgid "cannot write to member address" +msgstr "incapable d'écrire à l'adresse du membre" + +#: dwflpp.cxx:2404 +msgid "cannot take address of bit-field" +msgstr "incapable de prendre l'adresse du champs de bits" + +#: dwflpp.cxx:2418 +#, c-format +msgid "unsupported type tag %s for %s" +msgstr "tag de type %s non supporté pour %s" + +#: dwflpp.cxx:2425 +#, c-format +msgid "'%s' is being accessed instead of a member" +msgstr "accession à '%s' au lieu d'un membre" + +#: dwflpp.cxx:2440 +#, c-format +msgid "unsupported type (mystery encoding %s for %s" +msgstr "type non supporté (encodage mystère %s pour %s" + +#: dwflpp.cxx:2449 +#, c-format +msgid "unsupported type (encoding %s) for %s" +msgstr "type non supporté (encodage %s) pour %s" + +#: dwflpp.cxx:2474 +msgid "cannot write to array address" +msgstr "ne peut écrire à l'adresse du tableau" + +#: dwflpp.cxx:2477 +msgid "cannot write to reference" +msgstr "ne peut écrire dans une référence" + +#: dwflpp.cxx:2550 +#, c-format +msgid "finding symtable address for %s\n" +msgstr "recherche de l'adresse de la table des symboles pour %s\n" + +#: dwflpp.cxx:2554 +msgid "Getting symbols" +msgstr "Obtention des symboles" + +#: dwflpp.cxx:2569 +#, c-format +msgid "found %s @0x%#\n" +msgstr "trouvé %s @0x%#\n" + +#: dwflpp.cxx:2589 +#, c-format +msgid "" +"finding location for local '%s' near address 0x%#, module bias 0x" +"%#\n" +msgstr "" +"recherche de l'adresse de la variable locale '%s' près de 0x%#, " +"biais du module : 0x%#\n" + +#: dwflpp.cxx:2620 +#, c-format +msgid "failed to retrieve location attribute for local '%s' (dieoffset: %s)" +msgstr "" +"échec de la récupération de l'adresse pour la variable localte '%s' (offset " +"du DIE : %s)" + +#: dwflpp.cxx:2630 dwflpp.cxx:2664 +#, c-format +msgid "failed to retrieve type attribute for local '%s'" +msgstr "échec de la récupération du type pour la variable localte '%s'" + +#: dwflpp.cxx:2679 +#, c-format +msgid "literal_stmt_for_return: finding return value for %s (%s)\n" +msgstr "" +"literal_stmt_for_return: recherche de la valeur de retour pour %s (%s)\n" + +#: dwflpp.cxx:2692 +#, c-format +msgid "failed to retrieve return value location for %s (%s)" +msgstr "" +"échec de la récupération de l'adresse de la valeur de retour pour %s (%s)" + +#: dwflpp.cxx:2699 +#, c-format +msgid "function %s (%s) has no return value" +msgstr "la fonction %s (%s) n'a pas de valeur de retour" + +#: dwflpp.cxx:2714 dwflpp.cxx:2745 +#, c-format +msgid "failed to retrieve return value type attribute for %s (%s)" +msgstr "échec de la récupération du type de la valeur de retour pour %s (%s)" + +#: dwflpp.cxx:2761 +#, c-format +msgid "literal_stmt_for_pointer: finding value for %s (%s)\n" +msgstr "literal_stmt_for_pointer: recherche de la valeur pour %s (%s)\n" + +#: dwflpp.cxx:2879 +msgid " skipping - init/exit" +msgstr "ignoré : init/exit" + +#: dwflpp.cxx:2887 +msgid " skipping - __kprobes" +msgstr "ignoré : __kprobes" + +#: dwflpp.cxx:2902 +msgid " guru mode enabled - ignoring blacklist" +msgstr "mode guru activé : la blacklist est ignorée" + +#: dwflpp.cxx:2907 +msgid " skipping - blacklisted" +msgstr "ignoré : dans la blacklist" + +#: dwflpp.cxx:3046 +msgid "blacklist regexps:" +msgstr "expression régulière de la blacklist :" + +#: dwflpp.cxx:3054 +msgid "blacklist_func regcomp failed" +msgstr "" + +#: dwflpp.cxx:3056 +msgid "blacklist_func_ret regcomp failed" +msgstr "regcomp(blacklist_func_ret) a échoué" + +#: dwflpp.cxx:3058 +msgid "blacklist_file regcomp failed" +msgstr "regcomp(blacklist_file) a échoué" + +#: dwflpp.cxx:3060 +msgid "blacklist_section regcomp failed" +msgstr "regcomp(blacklist_section) a échoué" + +#: dwflpp.cxx:3244 +msgid "not found cfa" +msgstr "adresse de trame de pile d'appel non trouvée" + +#: dwflpp.cxx:3251 +#, c-format +msgid "found cfa, info: %d [start: 0x%#, end: 0x%#, nops: %zu" +msgstr "" +"adresse de trame de pile d'appel trouvée, info : %d [début : 0x%#, " +"fin : 0x%#, nops : %zu" + +#: elaborate.cxx:144 elaborate.cxx:159 +msgid "derived_probe with no locations" +msgid_plural "derived_probe with no locations" +msgstr[0] "" +msgstr[1] "" + +#: elaborate.cxx:201 +msgid "unprivileged users: authorized" +msgstr "" + +#: elaborate.cxx:207 +msgid "unprivileged users: authorized for process owner" +msgstr "" + +#: elaborate.cxx:359 +msgid "invalid use of wildcard probe point component" +msgstr "" + +#: elaborate.cxx:414 +#, fuzzy, c-format +msgid "probe point truncated at position %s (follow: %s)" +msgstr "" +"incapable de trouver la variable de tracepoint '%s' (alternatives : %s)" + +#: elaborate.cxx:421 +msgid "probe point is not allowed for unprivileged users" +msgstr "" + +#: elaborate.cxx:498 +#, fuzzy, c-format +msgid "probe point mismatch at position %s (alternatives: %s)" +msgstr "" +"incapable de trouver la variable de tracepoint '%s' (alternatives : %s)" + +#: elaborate.cxx:519 +#, c-format +msgid "wildcard '%s' matched '%s'" +msgstr "le motif '%s' correspond à '%s'" + +#: elaborate.cxx:565 +msgid " (alternatives: " +msgstr " (alternatives :" + +#: elaborate.cxx:563 +#, fuzzy, c-format +msgid "probe point mismatch at position %s %s didn't find any wildcard matches" +msgstr "" +"incapable de trouver la variable de tracepoint '%s' (alternatives : %s)" + +#: elaborate.cxx:579 +#, fuzzy, c-format +msgid "probe point mismatch at position %s %s" +msgstr "" +"incapable de trouver la variable de tracepoint '%s' (alternatives : %s)" + +#: elaborate.cxx:613 +msgid "inappropriate" +msgstr "" + +#: elaborate.cxx:651 +#, c-format +msgid "Recursive loop in alias expansion of %s at %s" +msgstr "" + +#: elaborate.cxx:740 +msgid "recursion limit reached" +msgstr "" + +#: elaborate.cxx:788 +msgid "no match" +msgstr "" + +#: elaborate.cxx:816 +#, fuzzy +msgid " while resolving probe point " +msgstr " lors de l'enregistrement d'un alias de probe" + +#: elaborate.cxx:863 +msgid "Expecting symbol or array index expression" +msgstr "" + +#: elaborate.cxx:916 +msgid "Assignment to read-only histogram bucket" +msgstr "" + +#: elaborate.cxx:948 +#, c-format +msgid "variable '%s' modified during 'foreach' iteration" +msgstr "" + +#: elaborate.cxx:970 +#, c-format +msgid "function call modifies var '%s' during 'foreach' iteration" +msgstr "" + +#: elaborate.cxx:1058 +#, c-format +msgid "multiple histogram types declared on '%s'" +msgstr "" + +#: elaborate.cxx:1086 +#, fuzzy, c-format +msgid "unable to infer statistic parameters for global '%s'" +msgstr "échec de la récupération du type pour la variable localte '%s'" + +#: elaborate.cxx:1167 +msgid "probe condition must not modify any variables" +msgstr "" + +#: elaborate.cxx:1172 +msgid "probe condition must not include impure embedded-C" +msgstr "" + +#: elaborate.cxx:1226 +#, c-format +msgid "Turning on task_finder vma_tracker, pragma:vma found in %s" +msgstr "" + +#: elaborate.cxx:1353 +msgid "" +"This global uses tapset constructs that are dependent on systemtap version" +msgstr "" + +#: elaborate.cxx:1358 +msgid "" +"This function uses tapset constructs that are dependent on systemtap version" +msgstr "" + +#: elaborate.cxx:1366 +msgid "" +"This probe uses tapset constructs that are dependent on systemtap version" +msgstr "" + +#: elaborate.cxx:1368 +msgid "" +"This alias uses tapset constructs that are dependent on systemtap version" +msgstr "" + +#: elaborate.cxx:1651 +#, fuzzy +msgid "no probes found" +msgstr ", pas trouvé" + +#: elaborate.cxx:1714 elaborate.cxx:1825 +#, c-format +msgid "unresolved arity-%zu global array %s, missing global declaration?" +msgstr "" + +#: elaborate.cxx:1764 +msgid "unresolved array in delete statement" +msgstr "" + +#: elaborate.cxx:1798 +msgid "probe condition must not reference undeclared global" +msgstr "" + +#: elaborate.cxx:1846 +msgid "probe condition must not reference function" +msgstr "" + +#: elaborate.cxx:1861 +#, c-format +msgid "unresolved arity-%zu function" +msgstr "" + +#: elaborate.cxx:1908 +#, c-format +msgid "cross-file global variable reference to %s from" +msgstr "" + +#: elaborate.cxx:1962 +#, c-format +msgid " function %s is defined from %s" +msgstr "" + +#: elaborate.cxx:2002 elaborate.cxx:2004 +#, fuzzy, c-format +msgid "Eliding unused function '%s'" +msgstr "prologue de fonction '%s' trouvé" + +#: elaborate.cxx:2060 elaborate.cxx:2105 elaborate.cxx:2151 +#, c-format +msgid "Eliding unused variable '%s'" +msgstr "" + +#: elaborate.cxx:2062 +#, fuzzy, c-format +msgid "Eliding unused local variable %s in %s" +msgstr "type de variable locale non supporté" + +#: elaborate.cxx:2088 elaborate.cxx:2136 elaborate.cxx:2173 +#, fuzzy +msgid "(alternatives:" +msgstr " (alternatives :" + +#: elaborate.cxx:2086 elaborate.cxx:2134 +#, c-format +msgid "never-assigned local variable '%s' %s" +msgstr "" + +#: elaborate.cxx:2107 +#, c-format +msgid "Eliding unused local variable %s in function %s" +msgstr "" + +#: elaborate.cxx:2153 +#, fuzzy, c-format +msgid "Eliding unused global variable %s" +msgstr "type de variable locale non supporté" + +#: elaborate.cxx:2172 +#, c-format +msgid "never assigned global variable '%s' %s" +msgstr "" + +#: elaborate.cxx:2240 +#, c-format +msgid "Eliding assignment to %s at %s" +msgstr "" + +#: elaborate.cxx:2263 +#, c-format +msgid "Eliding unused error string catcher %s at %s" +msgstr "" + +#: elaborate.cxx:2328 +msgid "Eliding side-effect-free null statement " +msgstr "" + +#: elaborate.cxx:2348 +msgid "Flattening nested block " +msgstr "" + +#: elaborate.cxx:2360 +msgid "Eliding side-effect-free empty block " +msgstr "" + +#: elaborate.cxx:2366 +msgid "Eliding side-effect-free singleton block " +msgstr "" + +#: elaborate.cxx:2384 +msgid "Eliding empty try {} block " +msgstr "" + +#: elaborate.cxx:2408 +msgid "Eliding side-effect-free if statement " +msgstr "" + +#: elaborate.cxx:2416 +msgid "Creating simple evaluation from if statement " +msgstr "" + +#: elaborate.cxx:2430 +msgid "Inverting the condition of if statement " +msgstr "" + +#: elaborate.cxx:2454 +msgid "Eliding side-effect-free foreach statement " +msgstr "" + +#: elaborate.cxx:2476 +msgid "Eliding side-effect-free for statement " +msgstr "" + +#: elaborate.cxx:2518 +msgid "Eliding side-effect-free expression " +msgstr "" + +#: elaborate.cxx:2556 +#, c-format +msgid "side-effect-free probe '%s'" +msgstr "" + +#: elaborate.cxx:2580 +#, fuzzy, c-format +msgid "side-effect-free function '%s'" +msgstr "fonction sélectionnée %s\n" + +#: elaborate.cxx:2700 +msgid "Creating if statement from unused logical-or " +msgstr "" + +#: elaborate.cxx:2731 +msgid "Creating if statement from unused logical-and " +msgstr "" + +#: elaborate.cxx:2757 +msgid "Creating if statement from unused ternary expression " +msgstr "" + +#: elaborate.cxx:2787 +msgid "Eliding unused binary " +msgstr "" + +#: elaborate.cxx:2815 +msgid "Eliding unused unary " +msgstr "" + +#: elaborate.cxx:2856 +msgid "Eliding side-effect-free function call " +msgstr "" + +#: elaborate.cxx:2888 +msgid "Eliding unused print " +msgstr "" + +#: elaborate.cxx:2935 +msgid "Eliding unused target symbol " +msgstr "" + +#: elaborate.cxx:2969 +msgid "Eliding unused typecast " +msgstr "" + +#: elaborate.cxx:2986 +msgid "Eliding unused check " +msgstr "" + +#: elaborate.cxx:3095 +#, c-format +msgid "Collapsing constant-% if-statement %s" +msgstr "" + +#: elaborate.cxx:3121 +msgid "Collapsing constantly-false for-loop " +msgstr "" + +#: elaborate.cxx:3147 +msgid "Collapsing constantly-limited foreach-loop " +msgstr "" + +#: elaborate.cxx:3194 +#, fuzzy +msgid "unsupported binary operator " +msgstr "initiateur non supportée pour %s" + +#: elaborate.cxx:3234 +msgid "Collapsing constant-identity binary operator " +msgstr "" + +#: elaborate.cxx:3248 +#, c-format +msgid "Collapsing constant-% binary operator %s" +msgstr "" + +#: elaborate.cxx:3266 +msgid "Collapsing constant unary " +msgstr "" + +#: elaborate.cxx:3280 +#, fuzzy +msgid "unsupported unary operator " +msgstr "déallocateur non supporté pour %s" + +#: elaborate.cxx:3324 +msgid "Collapsing constant logical-OR " +msgstr "" + +#: elaborate.cxx:3371 +msgid "Collapsing constant logical-AND " +msgstr "" + +#: elaborate.cxx:3414 +msgid "Collapsing constant-boundary comparison " +msgstr "" + +#: elaborate.cxx:3432 +msgid "Collapsing constant comparison " +msgstr "" + +#: elaborate.cxx:3449 +#, fuzzy +msgid "unsupported comparison operator " +msgstr "opérateur de comparaison attendu" + +#: elaborate.cxx:3465 +msgid "Collapsing constant concatenation " +msgstr "" + +#: elaborate.cxx:3477 +msgid "Collapsing identity concatenation " +msgstr "" + +#: elaborate.cxx:3498 +#, c-format +msgid "Collapsing constant-% ternary %s" +msgstr "" + +#: elaborate.cxx:3513 +msgid "Collapsing untouched @defined check " +msgstr "" + +#: elaborate.cxx:3533 +msgid "Bad $context variable being substituted with literal 0" +msgstr "" + +#: elaborate.cxx:3536 +msgid "Bad $context variable being substituted with literal 0, " +msgstr "" + +#: elaborate.cxx:3581 +#, fuzzy, c-format +msgid "Changing %s reference to %s reference\n" +msgstr "ne peut écrire dans une référence" + +#: elaborate.cxx:3993 +#, fuzzy +msgid "unsupported assignment operator " +msgstr "initiateur non supportée pour %s" + +#: elaborate.cxx:4170 +msgid "Resolution problem with " +msgstr "" + +#. TRANSLATORS: simply saying not an issue with a probe or function +#: elaborate.cxx:4185 +msgid "other" +msgstr "" + +#: elaborate.cxx:4191 +#, fuzzy +msgid "unresolved target-symbol expression" +msgstr "symbole non résolu : " + +#: elaborate.cxx:4198 +#, fuzzy +msgid "unexpected @defined" +msgstr "identifiant attendu" + +#: elaborate.cxx:4205 +msgid "@entry is only valid in .return probes" +msgstr "" + +#: elaborate.cxx:4217 +#, fuzzy, c-format +msgid "type definition '%s' not found" +msgstr "field name %s not found" + +#: elaborate.cxx:4378 +msgid "Activating uprobes support because /* pragma:uprobes */ seen." +msgstr "" + +#: elaborate.cxx:4519 translate.cxx:3055 +msgid "invalid operand of delete expression" +msgstr "" + +#: elaborate.cxx:4635 +msgid "Unspecified conversion in print operator format string" +msgstr "" + +#: elaborate.cxx:4651 +#, fuzzy +msgid "Wrong number of args to formatted print operator" +msgstr "type inconnu pour un argument de l'opérateur \"print\"" + +#: elaborate.cxx:4788 +msgid "array locals not supported, missing global declaration? " +msgstr "" + +#: elaborate.cxx:4798 +msgid "stat locals not supported, missing global declaration? " +msgstr "" + +#: elaborate.cxx:4813 +#, fuzzy +msgid "unresolved type " +msgstr "%s non résolu" + +#: elaborate.cxx:4828 +#, fuzzy +msgid "invalid operator" +msgstr "référence invalide vers le tableau" + +#: elaborate.cxx:4830 +msgid "invalid type " +msgstr "" + +#: elaborate.cxx:4863 elaborate.cxx:4877 +#, c-format +msgid "type mismatch ( %s vs. %s )" +msgstr "" + +#: elaborate.cxx:4884 +#, c-format +msgid "type was first inferred here ( %s )" +msgstr "" + +#: hash.cxx:130 +msgid "result:" +msgstr "résultat :" + +#: hash.cxx:199 +#, c-format +msgid "" +"Warning: failed to create cache directory (\"%s\") %s, disabling cache " +"support" +msgstr "" +"Attention : échec de création du répertoire de cache (\"%s\") %s, " +"désactivation du cache " + +#. TRANSLATORS: failure to find an address that was a constant literal number +#: loc2c.c:175 +#, c-format +msgid "cannot get constant address: %s" +msgstr "" + +#: loc2c.c:195 +#, c-format +msgid "cannot get constant block: %s" +msgstr "" + +#: loc2c.c:210 +#, c-format +msgid "cannot get string constant: %s" +msgstr "" + +#: loc2c.c:224 +#, c-format +msgid "cannot get constant value: %s" +msgstr "" + +#: loc2c.c:301 +#, c-format +msgid "%s in DWARF expression [%Zu] at % (%#x: %, %)" +msgstr "" +"%s dans l'expression DWARF [%Zu] à % (%#x: %, %)" + +#: loc2c.c:912 +msgid "required DW_AT_frame_base attribute not supplied" +msgstr "l'attribut DW_AT_frame_base obligatoire n'a pas été fourni" + +#: loc2c.c:926 +#, c-format +msgid "dwarf_getlocation_addr (form %#x): %s" +msgstr "dwarf_getlocation_addr (forme %#x) : %s" + +#: loc2c.c:932 +msgid "DW_AT_frame_base not accessible at this address" +msgstr "DW_AT_frame_base pas accessible à cette adresse" + +#: loc2c.c:941 +msgid "No cfa_ops supplied, but needed by DW_OP_call_frame_cfa" +msgstr "Pas de cfa_ops fourni mais requis par DW_OP_call_frame_cfa" + +#: loc2c.c:976 +msgid "not accessible at this address" +msgstr "pas accessible à cette adresse" + +# XXX: not sure how to translate fetch nicely +#: loc2c.c:1522 loc2c.c:2435 +#, fuzzy +msgid "cannot handle offset into register in fetch" +msgstr "ne peut gérer un offset dans le fetch d'un registre" + +#: loc2c.c:1527 +msgid "noncontiguous location for base fetch" +msgstr "position non contiguë dans le fetch de base" + +#: loc2c.c:1531 loc2c.c:1574 +msgid "pointer has been optimized out" +msgstr "le pointeur a été supprimé par optimisation" + +#: loc2c.c:1535 +msgid "location not available" +msgstr "adresse non disponible" + +# XXX: not sure how to translate store nicely +#: loc2c.c:1565 +msgid "cannot handle offset into register in store" +msgstr "ne peut gérer un offset dans le store d'un registre" + +#: loc2c.c:1570 +msgid "noncontiguous location for base store" +msgstr "position non contiguë dans le store de base" + +#: loc2c.c:1578 +msgid "location is computed value, cannot store" +msgstr "l'adresse a une valeur calculée, ne peut faire un store" + +#: loc2c.c:1582 +msgid "location is constant value, cannot store" +msgstr "l'adresse est une valeur constante, ne peut faire un store" + +#: loc2c.c:1586 +msgid "location is not available, cannot store" +msgstr "l'adresse n'est pas disponible, ne peut faire un store" + +#: loc2c.c:1676 +msgid "stack value too big for fetch ???" +msgstr "valeur de pile trop grande pour un fetch ???" + +#: loc2c.c:1680 +msgid "single register too big for fetch/store ???" +msgstr "registre trop grand pour un fetch/store ???" + +#: loc2c.c:1684 +msgid "implicit pointer too big for fetch/store ???" +msgstr "pointeur implicite trop grand pour un fetch/store ???" + +#: loc2c.c:1689 +msgid "cannot support noncontiguous location" +msgstr "ne peut prendre l'adresse d'un objet non contigu" + +#: loc2c.c:1717 +msgid "declaring noncontig union for depth > 9, too many pieces" +msgstr "déclaration d'union non contigüe pour profondeur > 9, trop de morceaux" + +#: loc2c.c:1766 loc2c.c:2117 loc2c.c:2206 +#, c-format +msgid "cannot get byte_size attribute for type %s: %s" +msgstr "ne peut obtenir l'attribut byte_size pour le type %s : %s" + +#: loc2c.c:1807 +#, c-format +msgid "cannot get bit field parameters: %s" +msgstr "ne peut obtenir les paramètres du champs de bits : %s" + +#: loc2c.c:1882 +msgid "fetch is larger than base integer types" +msgstr "le fetch est plus grand que les types entiers de base" + +#. TRANSLATORS: CU stands for 'compilation unit' +#: loc2c.c:1902 +#, c-format +msgid "cannot determine CU address size from %s: %s" +msgstr "" +"ne peut déterminer la taille d'adresse de l'unité de compilation depuis %s : " +"%s" + +#: loc2c.c:2022 +msgid "store is larger than base integer types" +msgstr "le store est plus grand que les types entiers de base" + +#: loc2c.c:2152 +msgid "cannot take the address of a bit field" +msgstr "ne peut prendre l'adresse d'un champs de bits" + +#: loc2c.c:2163 +msgid "cannot take address of object in register" +msgstr "le peut prendre l'adresse d'un objet dans un registre" + +#: loc2c.c:2166 +msgid "cannot take address of noncontiguous object" +msgstr "ne peut prendre l'adresse d'un objet non contigu" + +#: loc2c.c:2169 +msgid "cannot take address of computed value" +msgstr "ne peut prendre l'adresse d'une valeur calculée" + +#: loc2c.c:2172 +msgid "cannot take address of constant value" +msgstr "ne peut prendre l'adresse d'une constante" + +#: loc2c.c:2175 +msgid "cannot take address of unavailable value" +msgstr "ne peut prendre l'adresse d'une valeur non disponible" + +#: loc2c.c:2178 +msgid "cannot take address of implicit pointer" +msgstr "ne peut prendre l'adresse d'un pointeur implicite" + +#. TRANSLATORS: This refers to the basic type, (stripped of const/volatile/etc.) +#: loc2c.c:2230 +#, c-format +msgid "cannot get inner type of type %s: %s" +msgstr "ne peut obtenir le type de base du type %s : %s" + +#: loc2c.c:2242 +#, c-format +msgid "cannot get byte_size attribute for array element type %s: %s" +msgstr "" +"ne peut obtenir l'attribut byte_size pour le type d'élément de tableau %s : " +"%s" + +#: loc2c.c:2247 +msgid "confused about array element size" +msgstr "confusion concernant la taille d'élément du tableau" + +#: loc2c.c:2261 +#, c-format +msgid "cannot get byte_stride attribute array type %s: %s" +msgstr "ne peut obtenir l'attribut byte_stride du type de tableau %s : %s" + +#: loc2c.c:2269 +#, c-format +msgid "cannot get element type of array type %s: %s" +msgstr "ne peut obtenir le type des éléments du tableau de type %s : %s" + +#: loc2c.c:2288 +msgid "cannot dynamically index noncontiguous array" +msgstr "ne peut indexer dynamiquement un tableau non contigu" + +#. TRANSLATORS: The index is constant +#: loc2c.c:2300 +msgid "constant index is outside noncontiguous array" +msgstr "l'index constant est hors du tableau non contigu" + +#: loc2c.c:2302 +msgid "noncontiguous array splits elements" +msgstr "le tableau non contigu scinde les éléments" + +#: loc2c.c:2323 +msgid "cannot index array stored in a register" +msgstr "ne peut indexer un tableau stocké dans un registre" + +#: loc2c.c:2325 +msgid "constant index is outside array held in register" +msgstr "l'index constant est hors du tableau contenu dans un registre" + +#: loc2c.c:2335 +msgid "cannot index into constant value" +msgstr "ne peut indexer dans une valeur constante" + +#. TRANSLATORS: The index is constant +#: loc2c.c:2338 +msgid "constant index is outside constant array value" +msgstr "l'index constant est hors du tableau " + +#: loc2c.c:2349 +msgid "cannot index into implicit pointer" +msgstr "ne peut indexer dans un pointeur implicite" + +#: loc2c.c:2356 +msgid "cannot index into computed value" +msgstr "ne peut indexer dans une valeur calculée" + +#: loc2c.c:2361 +msgid "cannot index into unavailable value" +msgstr "ne peut indexer dans une valeur non disponible" + +# XXX: not sure what this is for +#: main.cxx:179 +msgid "# global embedded code" +msgstr "" + +#: main.cxx:189 +msgid "# globals" +msgstr "# variables globales" + +#: main.cxx:204 +msgid "# functions" +msgstr "# fonctions" + +#: main.cxx:212 main.cxx:236 +msgid " # locals" +msgstr " # variables locales" + +#: main.cxx:228 +msgid "# probes" +msgstr "" + +#: main.cxx:311 +#, c-format +msgid "Checking \"%s\" failed with error: %s" +msgstr "La vérification de \"%s\" a échoué avec une erreur : %s" + +#: main.cxx:330 +#, c-format +msgid "Parsed kernel \"%s\", " +msgstr "Analyse syntaxique du noyau \"%s\", " + +# XXX: "uplet" is the pedantically correct translation +# XXX: "tuple" is fine and more common AFAICT +#: main.cxx:331 +#, c-format +msgid "containing %zu tuple" +msgid_plural "containing %zu tuples" +msgstr[0] "contient %zu tuple" +msgstr[1] "contient %zu tuples" + +# XXX: duplicate of buildrun.cxx:272 +#: main.cxx:346 +#, c-format +msgid "" +"Checking \"%s\" failed with error: %s\n" +"Ensure kernel development headers & makefiles are installed" +msgstr "" +"La vérification de \"%s\" a échoué avec une erreur : %s\n" +"Vérifiez que les en-têtes et makefiles sont installés" + +#: main.cxx:363 +#, c-format +msgid "Parsed kernel %s, which contained one vmlinux export" +msgid_plural "Parsed kernel %s, which contained %zu vmlinux exports" +msgstr[0] "Analyse syntaxique du noyau %s qui contenait un export vmlinux" +msgstr[1] "Analyse syntaxique du noyau %s qui contenait %zu exports vmlinux" + +#. TRANSLATORS: we can't make the directory due to the error +#: main.cxx:392 +#, c-format +msgid "ERROR: cannot create temporary directory (\" %s \"): %s" +msgstr "ERREUR : ne peut créer le répertoire temporaire %s : %s" + +#: main.cxx:399 +#, c-format +msgid "Created temporary directory \"%s\"" +msgstr "Répertoire temporaire \"%s\" crée" + +#: main.cxx:409 +#, c-format +msgid "Keeping temporary directory \"%s\"" +msgstr "Conservation du répertoire temporaire \"%s\"" + +#: main.cxx:437 +msgid "ERROR: kernel release isn't specified" +msgstr "ERREUR : la version du noyau n'est pas spécifiée" + +#: main.cxx:439 +#, c-format +msgid "ERROR: kernel release isn't found in \"%s\"" +msgstr "ERREUR : la version du noyau n'a pas été trouvée dans \"%s\"" + +#: main.cxx:459 +msgid "" +"Note: --use-server --unprivileged was selected because of stapusr membership." +msgstr "" + +#: main.cxx:463 +msgid "" +"WARNING: Without NSS, using a compile-server is not supported by this " +"version of systemtap" +msgstr "" +"ATTENTION : Sans NSS, utiliser un serveur de compilation n'estpas supporté " +"par cette version de systemtap" + +#: main.cxx:594 +#, c-format +msgid "" +"usage error: tapset file '%s' cannot be run directly as a session script." +msgstr "" +"erreur d'utilisation : le fichier tapset '%s' ne peut être lancé directement " +"comme script de session" + +#. TRANSLATORS: Searching through directories, 'processed' means 'examined so far' +#: main.cxx:621 +#, c-format +msgid "Searched: \" %s \", found: %zu, processed: %u" +msgstr "Recherché : \" %s \", trouvé : %zu, parcourus : %u" + +#: main.cxx:633 +msgid "# parse tree dump" +msgstr "# image de l'arbre syntaxique" + +#: main.cxx:670 +msgid "Pass 1: parse failed. Try again with another '--vp 1' option." +msgstr "" +"Passe 1 : échec de l'analyse syntaxique. Essayez encore avec une option '--" +"vp 1' supplémentaire." + +#: main.cxx:703 +msgid "Pass 2: analysis failed. Try again with another '--vp 01' option." +msgstr "" +"Passe 2 : échec de l'analyse sémantique. Essayez encore avec une option '--" +"vp 01' supplémentaire." + +#: main.cxx:779 +msgid "Pass 3: translation failed. Try again with another '--vp 001' option." +msgstr "" +"Passe 3 : échec de la traduction.Essayez encore avec une option '--vp 001' " +"supplémentaire." + +#: main.cxx:816 +msgid "Pass 4: compilation failed. Try again with another '--vp 0001' option." +msgstr "" +"Passe 4 : échec de la compilation. Essayez encore avec une option '--vp " +"0001' supplémentaire." + +#: main.cxx:860 +msgid "Pass 5: starting run." +msgstr "Passe 5 : lancement de l'exécution" + +#: main.cxx:872 +msgid "Pass 5: run failed. Try again with another '--vp 00001' option." +msgstr "" +"Passe 5 : échec de l'exécution.Essayez encore avec une option '--vp 00001' " +"supplémentaire." + +#: main.cxx:900 +msgid "Coverage database not available without libsqlite3" +msgstr "Base de données de couverture non disponibles sans libsqlite3" + +#: main.cxx:924 +#, fuzzy +msgid "Attempting compilation using a compile server" +msgstr "" +" réessayer la compilation avec un serveur de compilation lors " +"d'une erreur" + +#: main.cxx:982 +#, c-format +msgid "Session arch: %s release: %s" +msgstr "Architecture de la session : %s version : %s" + +#: nsscommon.cxx:101 +#, fuzzy, c-format +msgid "Could not open log file %s" +msgstr "Ne peut ouvrir le fichier module " + +#: nsscommon.cxx:145 nsscommon.cxx:158 +#, c-format +msgid "(%d) %s" +msgstr "" + +#: nsscommon.cxx:172 +#, fuzzy, c-format +msgid "Error initializing NSS for %s" +msgstr "initiateur non supportée pour %s" + +#: nsscommon.cxx:187 +#, fuzzy, c-format +msgid "Unable to shutdown NSS for database %s" +msgstr "" +"Incapable d'obtenir le mot de passe de la base de données de certificats." + +#: nsscommon.cxx:197 +msgid "Unable to shutdown NSS" +msgstr "" + +#: nsscommon.cxx:265 +#, fuzzy +msgid "Cannot prompt for certificate database password. stdin is not a tty" +msgstr "" +"Incapable d'obtenir le mot de passe de la base de données de certificats." + +#: nsscommon.cxx:278 +#, fuzzy, c-format +msgid "Password for certificate database in %s: " +msgstr "" +"Incapable d'obtenir le mot de passe de la base de données de certificats." + +#: nsscommon.cxx:314 nsscommon.cxx:865 +#, fuzzy, c-format +msgid "Could not search certificate database directory %s" +msgstr "" +"Incapable de déterminer le chemin vers la base de données de certificats." + +#: nsscommon.cxx:320 +#, fuzzy, c-format +msgid "Could not remove %s" +msgstr "Ne peut ouvrir le fichier module " + +#: nsscommon.cxx:327 +#, fuzzy, c-format +msgid "" +"Could not remove certificate database directory %s\n" +"%s" +msgstr "" +"Incapable de déterminer le chemin vers la base de données de certificats." + +#: nsscommon.cxx:359 +msgid "Passwords do not match" +msgstr "" + +#: nsscommon.cxx:370 +msgid "Too many password attempts" +msgstr "" + +#: nsscommon.cxx:382 +#, fuzzy, c-format +msgid "Could not initialize pin for certificate database %s" +msgstr "" +"Incapable d'obtenir le mot de passe de la base de données de certificats." + +#: nsscommon.cxx:395 +#, fuzzy, c-format +msgid "Unable to authenticate the default slot for certificate database %s" +msgstr "" +"Incapable d'obtenir le mot de passe de la base de données de certificats." + +#: nsscommon.cxx:422 +msgid "Unable to generate public/private key pair" +msgstr "" + +#: nsscommon.cxx:434 +msgid "Unable to create subject public key info for certificate request" +msgstr "" + +#: nsscommon.cxx:444 +#, fuzzy +msgid "Unable to create certificate request" +msgstr "" +"Incapable de déterminer le chemin vers la base de données de certificats." + +#: nsscommon.cxx:466 +#, fuzzy +msgid "Unable to create certificate validity dates" +msgstr "" +"Incapable de déterminer le chemin vers la base de données de certificats." + +#: nsscommon.cxx:480 nsscommon.cxx:976 +#, fuzzy +msgid "Unable to create certificate" +msgstr "" +"Incapable de déterminer le chemin vers la base de données de certificats." + +#: nsscommon.cxx:494 +#, fuzzy +msgid "Unable to allocate certificate extensions" +msgstr "" +"Incapable de déterminer le chemin vers la base de données de certificats." + +#: nsscommon.cxx:513 +#, fuzzy +msgid "Unable to encode certificate type extensions" +msgstr "" +"Incapable de déterminer le chemin vers la base de données de certificats." + +#: nsscommon.cxx:524 nsscommon.cxx:542 +msgid "Unable to allocate alternate DNS name extension for certificate" +msgstr "" + +#: nsscommon.cxx:572 +msgid "Unable to encode alternate DNS name extension for certificate" +msgstr "" + +#: nsscommon.cxx:581 +msgid "Unable to add alternate DNS name extension for certificate" +msgstr "" + +#: nsscommon.cxx:596 +msgid "Unable to complete alternate DNS name extension for certificate" +msgstr "" + +#: nsscommon.cxx:617 +msgid "" +"Unable to determine the signature algorithm for the signing the certificate" +msgstr "" + +#: nsscommon.cxx:626 +msgid "Unable to set the signature algorithm for signing the certificate" +msgstr "" + +#: nsscommon.cxx:642 +#, fuzzy +msgid "Unable to encode the certificate for signing" +msgstr "" +"Incapable de déterminer le chemin vers la base de données de certificats." + +#: nsscommon.cxx:650 +#, fuzzy +msgid "Unable to allocate memory for signing the certificate" +msgstr "" +"Incapable de déterminer le chemin vers la base de données de certificats." + +#: nsscommon.cxx:657 +#, fuzzy +msgid "Unable to sign the certificate" +msgstr "" +"Incapable de déterminer le chemin vers la base de données de certificats." + +#: nsscommon.cxx:673 nsscommon.cxx:797 +#, fuzzy +msgid "Unable to decode certificate" +msgstr "" +"Incapable de déterminer le chemin vers la base de données de certificats." + +#: nsscommon.cxx:685 +#, fuzzy, c-format +msgid "Unable to import certificate into the database at %s" +msgstr "" +"Incapable d'obtenir le mot de passe de la base de données de certificats." + +#: nsscommon.cxx:694 +#, fuzzy +msgid "Unable to allocate certificate trust" +msgstr "" +"Incapable de déterminer le chemin vers la base de données de certificats." + +#: nsscommon.cxx:702 +msgid "Unable decode trust string 'PCu,,PCu'" +msgstr "" + +#: nsscommon.cxx:712 nsscommon.cxx:842 +#, fuzzy +msgid "Unable to change certificate trust" +msgstr "" +"Incapable de déterminer le chemin vers la base de données de certificats." + +#: nsscommon.cxx:729 +#, fuzzy, c-format +msgid "" +"Could not open certificate file %s for reading\n" +"%s" +msgstr "Impossible d'obtenir des informations sur " + +#: nsscommon.cxx:739 +#, fuzzy, c-format +msgid "" +"Could not obtain information about certificate file %s\n" +"%s" +msgstr "Ne peut obtenir des informations sur le fichier de mots de passe " + +#: nsscommon.cxx:752 +#, fuzzy, c-format +msgid "" +"Error reading from certificate file %s\n" +"%s" +msgstr "Erreur lors de la lecture du fichier de configuration rpm" + +#: nsscommon.cxx:771 nsscommon.cxx:898 +#, fuzzy, c-format +msgid "Could not create certificate database directory %s" +msgstr "" +"Incapable de déterminer le chemin vers la base de données de certificats." + +#: nsscommon.cxx:806 nsscommon.cxx:927 +#, fuzzy, c-format +msgid "Could not obtain internal key slot for certificate database %s" +msgstr "" +"Incapable d'obtenir le mot de passe de la base de données de certificats." + +#: nsscommon.cxx:816 +#, fuzzy, c-format +msgid "Could not import certificate into the database at %s" +msgstr "" +"Incapable d'obtenir le mot de passe de la base de données de certificats." + +#: nsscommon.cxx:825 +#, fuzzy +msgid "Could not allocate certificate trust" +msgstr "Ne peut créer le contexte de signature." + +#: nsscommon.cxx:832 +msgid "Unable decode trust string 'P,P,P'" +msgstr "" + +#: nsscommon.cxx:874 +#, c-format +msgid "Could set file permissions for %s" +msgstr "" + +#: nsscommon.cxx:885 +#, fuzzy, c-format +msgid "Generating a new certificate database directory in %s" +msgstr "" +"Incapable de déterminer le chemin vers la base de données de certificats." + +#: nsscommon.cxx:944 +#, fuzzy +msgid "Unable to encode certificate common header" +msgstr "" +"Incapable de déterminer le chemin vers la base de données de certificats." + +#: nsscommon.cxx:996 +#, fuzzy, c-format +msgid "" +"Error writing to certificate file %s\n" +"%s" +msgstr "Erreur lors de l'écriture du fichier de signature" + +#: nsscommon.cxx:1003 +#, fuzzy, c-format +msgid "" +"Could not open certificate file %s for writing\n" +"%s" +msgstr "Impossible d'obtenir des informations sur " + +#: nsscommon.cxx:1013 +#, fuzzy, c-format +msgid "Unable to add certificate to %s" +msgstr "" +"Incapable de déterminer le chemin vers la base de données de certificats." + +#: nsscommon.cxx:1063 +msgid "NSS library failure in CERT_CreateSubjectCertList" +msgstr "" + +#: nsscommon.cxx:1084 +msgid "Could not decode certificate validity" +msgstr "" + +#: nsscommon.cxx:1089 +msgid "Could not decode certificate validity time" +msgstr "" + +#: nsscommon.cxx:1098 +msgid "Could not format certificate validity time" +msgstr "" + +#: nsscommon.cxx:1124 +#, c-format +msgid "Certificate database %s does not exist" +msgstr "" + +#: nsscommon.cxx:1131 +#, fuzzy, c-format +msgid "Certificate database %s is obsolete" +msgstr "" +"Incapable d'obtenir le mot de passe de la base de données de certificats." + +#: nsscommon.cxx:1152 +#, fuzzy, c-format +msgid "Certificate found in database %s" +msgstr "" +"Incapable d'obtenir le mot de passe de la base de données de certificats." + +#: nsscommon.cxx:1164 +#, c-format +msgid " Not Valid Before: %s UTC" +msgstr "" + +#: nsscommon.cxx:1166 +#, c-format +msgid " Not Valid After: %s UTC" +msgstr "" + +#: nsscommon.cxx:1172 +#, fuzzy +msgid "Certificate is valid" +msgstr "Un script doit être spécifié." + +#: nsscommon.cxx:1178 +#, fuzzy +msgid "Certificate is not valid" +msgstr "Un script doit être spécifié." + +#: nsscommon.cxx:1197 +#, fuzzy +msgid "Unable to generate new certificate" +msgstr "" +"Incapable de déterminer le chemin vers la base de données de certificats." + +#: nsscommon.cxx:1214 +#, c-format +msgid "Unable to find certificate with nickname %s in %s." +msgstr "Incapable de trouver le certificat avec nommé %s dans %s." + +#: nsscommon.cxx:1232 +#, fuzzy, c-format +msgid "" +"Unable to obtain private key from the certificate with nickname %s in %s." +msgstr "" +"Incapable d'obtenir la clé privée depuis le certificat nommé %s, dans %s." + +#: nsscommon.cxx:1243 +#, fuzzy +msgid "Could not create signing context" +msgstr "Ne peut créer le contexte de signature." + +#: nsscommon.cxx:1250 +msgid "Could not initialize signing context." +msgstr "Ne peut initialiser le contexte de signature." + +#: nsscommon.cxx:1259 +#, fuzzy, c-format +msgid "Could not open module file %s" +msgstr "Ne peut ouvrir le fichier module " + +#: nsscommon.cxx:1272 +#, fuzzy, c-format +msgid "Error reading module file %s" +msgstr "Erreur lors de la lecture du fichier module " + +#: nsscommon.cxx:1281 +#, fuzzy, c-format +msgid "Error while signing module file %s" +msgstr "Erreur lors de la signature du fichier module " + +#: nsscommon.cxx:1291 +#, fuzzy, c-format +msgid "Could not complete signature of module file %s" +msgstr "Ne peut compléter la signature du fichier module " + +# XXX: assuming the file contains only one signature (as per PR_TRUNCATE) +#: nsscommon.cxx:1305 +#, fuzzy, c-format +msgid "Could not open signature file %s" +msgstr "Ne peut ouvrir le fichier de signature " + +#: nsscommon.cxx:1313 +#, fuzzy, c-format +msgid "Error writing to signature file %s" +msgstr "Erreur lors de l'écriture du fichier de signature" + +#: parse.cxx:261 +msgid "parse error: " +msgstr "erreur d'analyse syntaxique : " + +#: parse.cxx:265 +msgid "\tat: " +msgstr "\tà : " + +#: parse.cxx:273 parse.cxx:277 +msgid "\tsaw: " +msgstr "\tvu : " + +#: parse.cxx:311 parse.cxx:373 +msgid "expected comparison operator" +msgstr "opérateur de comparaison attendu" + +#: parse.cxx:343 parse.cxx:398 +msgid "expected string literal" +msgstr "chaîne litérale attendue" + +#: parse.cxx:376 +msgid "wildcard not allowed with order comparison operators" +msgstr "joker non autorisé avec un opérateur de comparaison d'ordre" + +#: parse.cxx:411 parse.cxx:430 +msgid "expected '==' or '!='" +msgstr "'==' ou '!=' attendu" + +#: parse.cxx:471 +msgid "" +"expected string, number literal or other CONFIG_... as right side operand" +msgstr "" +"chaîne, nombre litéral ou autre CONFIG_... attendu comme opérande de droite" + +#: parse.cxx:489 +msgid "expected string literal as right value" +msgstr "chaîne litérale attendue comme valeur à droite" + +#: parse.cxx:492 +msgid "expected number literal as right value" +msgstr "nombre litéral attendu comme valeur à droite" + +#: parse.cxx:495 +msgid "" +"expected 'arch' or 'kernel_v' or 'kernel_vr' or 'CONFIG_...'\n" +" or comparison between strings or integers" +msgstr "" +"'arch' ou 'kernel_v' ou 'kernel_vr' ou 'CONFIG_...'\n" +" ou comparaison entre chaînes ou entiers attendu" + +#. TRANSLATORS: 'conditional' meaning 'conditional preprocessing' +#: parse.cxx:523 +msgid "incomplete conditional at end of file" +msgstr "préprocession conditionelle incomplète à la fin du fichier" + +#: parse.cxx:530 parse.cxx:536 parse.cxx:550 +msgid "incomplete conditional - missing '%('" +msgstr "préprocession conditionnelle incomplète : '%(' manquant" + +#: parse.cxx:538 +msgid "invalid conditional - duplicate '%:'" +msgstr "préprocession conditionnelle invalide : '%:' dupliqué" + +#: parse.cxx:571 +msgid "incomplete condition after '%('" +msgstr "préprocession conditionnelle incomplète après '%('" + +#: parse.cxx:603 +msgid "expected '%?' marker for conditional" +msgstr "marqueur '%?' attendu pour la préprocession conditionnelle" + +#: parse.cxx:653 +msgid "unexpected end-of-file" +msgstr "fin de fichier inattendue" + +#: parse.cxx:686 +#, c-format +msgid "expected '%s'" +msgstr "'%s' attendu" + +#: parse.cxx:696 +msgid "expected " +msgstr "attendu : " + +#: parse.cxx:737 +msgid "expected number" +msgstr "nombre attendu" + +#: parse.cxx:752 parse.cxx:1752 +msgid "number invalid or out of range" +msgstr "nombre invalide ou hors limite" + +#: parse.cxx:934 parse.cxx:954 +msgid "invalid nested substitution of command line arguments" +msgstr "" +"imbriquation de substitution d'arguments de la ligne de commande invalide" + +#: parse.cxx:1011 +msgid "Could not find matching closing quote" +msgstr "Ne peut trouver la guillemet fermante" + +# XXX: there must be something better than "enchâssé" +#: parse.cxx:1101 +#, fuzzy +msgid "Could not find matching '%}' to close embedded function block" +msgstr "Ne peut trouver le '%}' fermant la bloc de fonction enchâssée" + +#: parse.cxx:1203 +msgid "expected 'probe', 'global', 'function', or '%{'" +msgstr "'probe', 'global', 'function' ou '%{' attendu" + +#: parse.cxx:1233 +#, c-format +msgid "Input file '%s' is empty or missing." +msgstr "Le fichier d'entrée '%s' est vide ou manquant" + +#: parse.cxx:1239 +#, c-format +msgid "%d parse error." +msgid_plural "%d parse errors." +msgstr[0] "%d erreur d'analyse." +msgstr[1] "%d erreurs d'analyse." + +#: parse.cxx:1255 +msgid "expected 'probe'" +msgstr "'probe' attendu" + +# XXX: should "probe point" be "point de sondage" ? +#: parse.cxx:1273 parse.cxx:1282 +#, fuzzy +msgid "probe point alias name cannot be optional nor sufficient" +msgstr "" +"le nom de l'alias du probe point ne peut pas être optionnel ou suffisant" + +#: parse.cxx:1301 +msgid "expected probe point specifier" +msgstr "spécificateur de probe point attendu" + +#: parse.cxx:1337 +msgid "expected '%{'" +msgstr "'%{' attendu" + +#: parse.cxx:1340 +msgid "embedded code in unprivileged script" +msgstr "code enchâssé dans un script non privilégié" + +#: parse.cxx:1356 +msgid "expected '{'" +msgstr "'{' attendu" + +#: parse.cxx:1410 parse.cxx:1489 parse.cxx:1552 parse.cxx:1586 parse.cxx:2049 +msgid "expected identifier" +msgstr "identifiant attendu" + +#: parse.cxx:1465 +msgid "expected statement" +msgstr "" + +#: parse.cxx:1483 +msgid "expected 'global'" +msgstr "'global' attendu" + +#: parse.cxx:1493 +msgid "duplicate global name" +msgstr "nom global dupliqué" + +#: parse.cxx:1509 +msgid "array size out of range" +msgstr "taille de tableau hors limite" + +#: parse.cxx:1518 +msgid "only scalar globals can be initialized" +msgstr "seules les variables globales scalaires peuvent être initialisées" + +#: parse.cxx:1545 +msgid "expected 'function'" +msgstr "'function' attendu" + +#: parse.cxx:1556 +msgid "duplicate function name" +msgstr "nom de fonction dupliqué" + +#: parse.cxx:1570 parse.cxx:1601 +msgid "expected 'string' or 'long'" +msgstr "'string' ou 'long' attendu" + +#: parse.cxx:1576 parse.cxx:1683 parse.cxx:1779 parse.cxx:1890 parse.cxx:1956 +#: parse.cxx:1990 +msgid "expected '('" +msgstr "'(' attendu" + +#: parse.cxx:1610 parse.cxx:2799 +msgid "expected ',' or ')'" +msgstr "',' ou ')' attendu" + +#: parse.cxx:1634 +msgid "expected identifier or '*'" +msgstr "identifiant ou '*' attendu" + +#: parse.cxx:1653 parse.cxx:1690 parse.cxx:1785 parse.cxx:1935 parse.cxx:1967 +#: parse.cxx:2569 +msgid "expected ')'" +msgstr "')' attendu" + +#: parse.cxx:1701 +msgid "expected one of '. , ( ? ! { = +='" +msgstr "un des éléments suivants est attendu : '. , ( ? ! { = +='" + +#: parse.cxx:1760 +msgid "expected literal string or number" +msgstr "chaîne ou nombre litéral attendu " + +#: parse.cxx:1773 +msgid "expected 'if'" +msgstr "'if' attendu" + +#: parse.cxx:1818 +msgid "expected 'return'" +msgstr "'return' attendu" + +#: parse.cxx:1820 +msgid "found 'return' not in function context" +msgstr "'return' trouvé hors du contexte d'une fonction" + +#: parse.cxx:1833 +msgid "expected 'delete'" +msgstr "'delete' attendu" + +#: parse.cxx:1846 +msgid "expected 'next'" +msgstr "'next' attendu" + +#: parse.cxx:1848 +msgid "found 'next' not in probe context" +msgstr "'next' trouvé en dehors du contexte d'un probe" + +#: parse.cxx:1860 +msgid "expected 'break'" +msgstr "'break' attendu" + +#: parse.cxx:1872 +msgid "expected 'continue'" +msgstr "'continue' attendu" + +#: parse.cxx:1884 +msgid "expected 'for'" +msgstr "'for' attendu" + +#: parse.cxx:1904 parse.cxx:1920 +msgid "expected ';'" +msgstr "';' attendu" + +#: parse.cxx:1950 +msgid "expected 'while'" +msgstr "'while' attendu" + +#: parse.cxx:1981 +msgid "expected 'foreach'" +msgstr "'foreach' attendu" + +#: parse.cxx:2060 parse.cxx:2097 +msgid "multiple sort directives" +msgstr "directives de tri multiples" + +#: parse.cxx:2080 parse.cxx:2333 parse.cxx:2844 +msgid "expected ',' or ']'" +msgstr "',' ou ']' attendu" + +#: parse.cxx:2088 +msgid "expected 'in'" +msgstr "'in' attendu" + +#: parse.cxx:2179 +msgid "expected ':'" +msgstr "':' attendu" + +#: parse.cxx:2356 +msgid "unexpected comma-separated expression list" +msgstr "liste d'expressions séparée par des virgules inattendue " + +#: parse.cxx:2549 +msgid "expected value" +msgstr "valeur attendue" + +#: parse.cxx:2555 +msgid "embedded expression code in unprivileged script" +msgstr "expression enchâssée dans un script non privilégié" + +#: parse.cxx:2672 +msgid "unknown statistic operator " +msgstr "opérateur de statistique inconnu " + +#: parse.cxx:2854 +msgid "base histogram operator where expression expected" +msgstr "opérateur d'histogramme de base lorsqu'une expression est attendue" + +#: parse.cxx:2901 +msgid "expected @cast or $var" +msgstr "@cast ou $var attendu" + +#: parse.cxx:3001 +msgid "-> and [ are not accepted for a pretty-printing variable" +msgstr "" + +#: remote.cxx:48 +#, c-format +msgid "string doesn't appear to be a URI: %s" +msgstr "" + +#: remote.cxx:99 util.cxx:655 +#, c-format +msgid "Warning: %s exited with status: %d" +msgstr "" + +#: remote.cxx:255 +msgid "stapsh file ERROR: no reply" +msgstr "" + +#: remote.cxx:257 +#, c-format +msgid "stapsh file replied %s" +msgstr "" + +#: remote.cxx:332 +msgid "stapsh run ERROR: no reply" +msgstr "" + +#: remote.cxx:334 +#, c-format +msgid "stapsh run replied %s" +msgstr "" + +#: remote.cxx:369 +msgid "stapsh file descriptors already set" +msgstr "" + +#: remote.cxx:376 +msgid "invalid file descriptors for stapsh" +msgstr "" + +#: remote.cxx:379 +msgid "error sending hello to stapsh" +msgstr "" + +#: remote.cxx:383 +msgid "error receiving hello from stapsh" +msgstr "" + +#: remote.cxx:389 +msgid "failed to get uname from stapsh" +msgstr "" + +#: remote.cxx:428 remote.cxx:499 +msgid "error launching stapsh" +msgstr "" + +#: remote.cxx:511 +msgid "error establishing ssh connection" +msgstr "" + +#: remote.cxx:575 +msgid "No tmpdir available for ssh control master" +msgstr "" + +#: remote.cxx:606 +#, c-format +msgid "failed to create an ssh control master for %s : rc= %d" +msgstr "" + +#: remote.cxx:610 +#, c-format +msgid "Created ssh control master at %s" +msgstr "" + +#: remote.cxx:624 +#, c-format +msgid "failed to stop the ssh control master for %s : rc=%d" +msgstr "" + +#: remote.cxx:643 +#, c-format +msgid "failed to get uname from %s : rc= %d" +msgstr "" + +#: remote.cxx:668 +#, c-format +msgid "failed to make a tempdir on %s : rc=%d" +msgstr "" + +#: remote.cxx:683 +#, c-format +msgid "failed to copy the module to %s : rc=%d" +msgstr "" + +#: remote.cxx:698 +#, c-format +msgid "failed to run the module on %s : ret=%d" +msgstr "" + +#: remote.cxx:726 +#, c-format +msgid "failed to delete the tempdir on %s : rc=%d" +msgstr "" + +#: remote.cxx:774 +msgid "ssh target requires a hostname" +msgstr "" + +#: remote.cxx:776 +msgid "ssh target URI doesn't support a /path" +msgstr "" + +#: remote.cxx:778 +msgid "ssh target URI doesn't support a ?query" +msgstr "" + +#: remote.cxx:780 +msgid "ssh target URI doesn't support a #fragment" +msgstr "" + +#: remote.cxx:809 +#, c-format +msgid "unrecognized URI scheme '%s' in remote: %s" +msgstr "" + +#: rpm_finder.cxx:71 +msgid "Error reading the rpm configuration files" +msgstr "Erreur lors de la lecture du fichier de configuration rpm" + +#: rpm_finder.cxx:104 rpm_finder.cxx:123 rpm_finder.cxx:159 +msgid "Error querying the rpm file `" +msgstr "Erreur lors de l'interrogation du fichier rpm `" + +#: rpm_finder.cxx:207 +msgid "Incorrect version or missing kernel-devel package, use: yum install " +msgstr "" +"Version incorrecte ou manquante du paquet kernel-devel, utilisez : yum " +"install " + +#: rpm_finder.cxx:210 +msgid "Missing separate debuginfos, use: debuginfo-install " +msgstr "" +"Informations de débogage séparées manquantes, utilisez : debuginfo-install " + +#: rpm_finder.cxx:213 +msgid "Incorrect parameter passed, please report this error." +msgstr "Paramètre incorrect transmis, veuillez rapporter cette erreur." + +#: runtime/staprun/common.c:81 +msgid "Invalid FILE name format\n" +msgstr "" + +#: runtime/staprun/common.c:141 +#, fuzzy, c-format +msgid "Invalid buffer size '%d' (should be 1-4095).\n" +msgstr "Taille de tampon invalide (devrait être 1-4095)." + +#: runtime/staprun/common.c:177 +#, c-format +msgid "Invalid file size option '%s'.\n" +msgstr "" + +#: runtime/staprun/common.c:190 +msgid "File name is too long.\n" +msgstr "" + +#: runtime/staprun/common.c:196 +#, fuzzy +msgid "Filename format is invalid or too long.\n" +msgstr "nombre invalide ou hors limite" + +#: runtime/staprun/common.c:201 +#, fuzzy +msgid "You can't specify the '-A' and '-L' options together.\n" +msgstr "Vous ne pouvez pas spécifier %s et %s en même temps." + +#: runtime/staprun/common.c:206 +msgid "" +"You can't specify the '-A' and '-b' options together. The '-b'\n" +"buffer size option only has an effect when the module is inserted.\n" +msgstr "" + +#: runtime/staprun/common.c:212 +msgid "" +"You can't specify the '-A' and '-c' options together. The '-c cmd'\n" +"option used to start a command only has an effect when the module\n" +"is inserted.\n" +msgstr "" + +#: runtime/staprun/common.c:219 +msgid "" +"You can't specify the '-A' and '-x' options together. The '-x pid'\n" +"option only has an effect when the module is inserted.\n" +msgstr "" + +#: runtime/staprun/common.c:225 +#, fuzzy +msgid "You can't specify the '-c' and '-x' options together.\n" +msgstr "Vous ne pouvez pas spécifier %s et %s en même temps." + +#: runtime/staprun/common.c:230 +#, fuzzy +msgid "You can't specify the '-D' and '-L' options together.\n" +msgstr "Vous ne pouvez pas spécifier %s et %s en même temps." + +#: runtime/staprun/common.c:234 +#, fuzzy +msgid "You can't specify the '-D' and '-d' options together.\n" +msgstr "Vous ne pouvez pas spécifier %s et %s en même temps." + +#: runtime/staprun/common.c:238 +#, fuzzy +msgid "You can't specify the '-D' and '-c' options together.\n" +msgstr "Vous ne pouvez pas spécifier %s et %s en même temps." + +#: runtime/staprun/common.c:242 +#, fuzzy +msgid "You have to specify output FILE with '-D' option.\n" +msgstr "Vous ne pouvez pas spécifier plusieurs options --kmap." + +#: runtime/staprun/common.c:246 +#, fuzzy +msgid "You have to specify output FILE with '-S' option.\n" +msgstr "Vous ne pouvez pas spécifier plusieurs options --kmap." + +#: runtime/staprun/common.c:253 +#, c-format +msgid "" +"\n" +"%s [-v] [-w] [-u] [-c cmd ] [-x pid] [-u user] [-A|-L|-d]\n" +"\t[-b bufsize] [-o FILE [-D] [-S size[,N]]] MODULE [module-options]\n" +msgstr "" + +#: runtime/staprun/common.c:255 +msgid "" +"-v Increase verbosity.\n" +"-w Suppress warnings.\n" +"-u Load uprobes.ko\n" +"-c cmd Command 'cmd' will be run and staprun will\n" +" exit when it does. The '_stp_target' variable\n" +" will contain the pid for the command.\n" +"-x pid Sets the '_stp_target' variable to pid.\n" +"-o FILE Send output to FILE. This supports strftime(3)\n" +" formats for FILE.\n" +"-b buffer size The systemtap module specifies a buffer size.\n" +" Setting one here will override that value. The\n" +" value should be an integer between 1 and 4095 \n" +" which be assumed to be the buffer size in MB.\n" +" That value will be per-cpu in bulk mode.\n" +"-L Load module and start probes, then detach.\n" +"-A Attach to loaded systemtap module.\n" +"-d Delete a module. Only detached or unused modules\n" +" the user has permission to access will be deleted. Use \"*" +"\"\n" +" (quoted) to delete all unused modules.\n" +"-R Have staprun create a new name for the module before\n" +" inserting it. This allows the same module to be inserted\n" +" more than once.\n" +"-R (Module renaming is not available in this configuration.)\n" +"-D Run in background. This requires '-o' option.\n" +"-S size[,N] Switches output file to next file when the size\n" +" of file reaches the specified size. The value\n" +" should be an integer greater than 1 which is\n" +" assumed to be the maximum file size in MB.\n" +" When the number of output files reaches N, it\n" +" switches to the first output file. You can omit\n" +" the second argument.\n" +"\n" +"MODULE can be either a module name or a module path. If a\n" +"module name is used, it is searched in the following directory:\n" +msgstr "" + +#: runtime/staprun/common.c:336 runtime/staprun/common.c:361 +#: runtime/staprun/common.c:380 runtime/staprun/common.c:387 +msgid "Memory allocation failed. Exiting.\n" +msgstr "" + +#: runtime/staprun/common.c:352 +#, fuzzy +msgid "Unable to determine kernel version, uname failed" +msgstr "Incapable de déterminer le répertoire d'accueil de l'utilisateur" + +#: runtime/staprun/common.c:400 +#, c-format +msgid "ERROR: Module name ('%s') is too long.\n" +msgstr "" + +#: runtime/staprun/common.c:491 +msgid "exceeded maximum send_request size.\n" +msgstr "" + +#: runtime/staprun/ctl.c:38 +#, c-format +msgid "ERROR: Can not attach. Module %s not running.\n" +msgstr "" + +# XXX: assuming the file contains only one signature (as per PR_TRUNCATE) +#: runtime/staprun/ctl.c:40 +#, fuzzy, c-format +msgid "Couldn't open control channel '%s'" +msgstr "Ne peut ouvrir le fichier de signature " + +#: runtime/staprun/mainloop.c:68 +#, c-format +msgid "Warning: child process exited with signal %d (%s)\n" +msgstr "" + +#: runtime/staprun/mainloop.c:73 +#, c-format +msgid "Warning: child process exited with status %d\n" +msgstr "" + +#: runtime/staprun/mainloop.c:124 +msgid "failed to create thread" +msgstr "" + +#: runtime/staprun/mainloop.c:206 +msgid "wordexp: syntax error (unmatched quotes?) in -c COMMAND\n" +msgstr "" + +#: runtime/staprun/mainloop.c:209 +#, c-format +msgid "wordexp: parsing error (%d)\n" +msgstr "" + +#: runtime/staprun/mainloop.c:317 runtime/staprun/mainloop.c:323 +#, fuzzy +msgid "Couldn't read bufsize" +msgstr "Ne peut ouvrir le fichier de mots de passe " + +#: runtime/staprun/mainloop.c:343 +#, fuzzy +msgid "Failed to initialize control channel.\n" +msgstr "Incapable d'initialiser la bibliothèque nss." + +#: runtime/staprun/mainloop.c:378 +msgid "Failed to daemonize stapio\n" +msgstr "" + +#: runtime/staprun/mainloop.c:393 +msgid "Failed to open /dev/null\n" +msgstr "" + +#: runtime/staprun/mainloop.c:444 +#, c-format +msgid "" +"\n" +"Disconnecting from systemtap module.\n" +"To reconnect, type \"staprun -A %s\"\n" +msgstr "" + +#: runtime/staprun/mainloop.c:560 +#, c-format +msgid "Unexpected EOF in read (nb=%ld)" +msgstr "" + +#: runtime/staprun/mainloop.c:575 +#, fuzzy, c-format +msgid "write error (nb=%ld)" +msgstr "Erreur de création de processus (%d) : %s" + +#: runtime/staprun/mainloop.c:608 +msgid "WARNING deduplication table full\n" +msgstr "" + +#: runtime/staprun/mainloop.c:674 +msgid "ptrace detach" +msgstr "" + +#: runtime/staprun/mainloop.c:707 +#, c-format +msgid "WARNING: ignored message of type %d\n" +msgstr "" + +#: runtime/staprun/stapio.c:46 +msgid "ERROR: Cannot have module options with attach (-A).\n" +msgstr "" + +#: runtime/staprun/stapio.c:57 +msgid "ERROR: Need a module name or path to load.\n" +msgstr "" + +#: runtime/staprun/stapio.c:65 +msgid "ERROR: Couldn't enter main loop. Exiting.\n" +msgstr "" + +#: session.cxx:186 +#, c-format +msgid "" +"Warning: failed to create systemtap data directory \"%s\":%s, disabling " +"cache support." +msgstr "" +"Attention : échec de création du répertoire de données systemtap \"%s\":%s, " +"désactivation du support du cache." + +#: session.cxx:198 +#, c-format +msgid "" +"Warning: failed to create cache directory (\" %s \"): %s, disabling cache " +"support." +msgstr "" +"Attention : échec de création du répertoire de cache (\" %s \"): %s, " +"désactivation du support du cache." + +#: session.cxx:363 +#, c-format +msgid "" +"Systemtap translator/driver (version %s/%s %s)\n" +"Copyright (C) 2005-2011 Red Hat, Inc. and others\n" +"This is free software; see the source for copying conditions." +msgstr "" + +#: session.cxx:367 +msgid "enabled features:" +msgstr "options activées :" + +#: session.cxx:402 +#, c-format +msgid "" +"Usage: stap [options] FILE Run script in file.\n" +" or: stap [options] - Run script on stdin.\n" +" or: stap [options] -e SCRIPT Run given script.\n" +" or: stap [options] -l PROBE List matching probes.\n" +" or: stap [options] -L PROBE List matching probes and local " +"variables.\n" +"\n" +"Options:\n" +" -- end of translator options, script options follow\n" +" -h --help show help\n" +" -V --version show version\n" +" -p NUM stop after pass NUM 1-5, instead of %d\n" +" (parse, elaborate, translate, compile, run)\n" +" -v add verbosity to all passes\n" +" --vp {N}+ add per-pass verbosity [" +msgstr "" +"Usage : stap [options] FICHIER Exécuter le script depuis le fichier.\n" +" ou : stap [options] - Exécuter le script depuis l'entrée " +"standard.\n" +" ou : stap [options] -e SCRIPT Exécuter le script donné.\n" +" ou : stap [options] -l PROBE Lister les probes correspondants.\n" +" ou : stap [options] -L PROBE Lister les probes correspondants et leurs " +"variables locales\n" +"Options :\n" +" -- fin des options de traducteur, les options de script suivent\n" +" -h --help afficher l'aide\n" +" -V --version afficher la version\n" +" -p NUM arréter après la passe NUM 1-5, au lieu de %d\n" +" (analyser, élaborer, traduire, compiler, exécuter)\n" +" -v ajouter de la verbosité à toutes les passes\n" +" --vp {N}+ ajouter de la verbosité par passe [" + +# XXX: this is to mean the option is already set, it goes in the %s in the next few lines +# XXX: in French it can be "activée" or "activé" depending on what it applies to +#: session.cxx:427 session.cxx:428 session.cxx:429 session.cxx:430 +#, fuzzy +msgid " [set]" +msgstr "[activé]" + +#: session.cxx:419 +#, c-format +msgid "" +" -k keep temporary directory\n" +" -u unoptimized translation %s\n" +" -w suppress warnings %s\n" +" -W turn warnings into errors %s\n" +" -g guru mode %s\n" +" -P prologue-searching for function probes %s\n" +" -b bulk (percpu file) mode %s\n" +" -s NUM buffer size in megabytes, instead of %d\n" +" -I DIR look in DIR for additional .stp script files" +msgstr "" +" -k conserver le répertoire temporaire\n" +" -u traduction non optimisée %s\n" +" -w suppression des avertissements %s\n" +" -W transformation des avertissements en erreurs %s\n" +" -g mode guru %s\n" +" -P recherche de prologue pour les probes de fonctions %s\n" +" -b mode groupé (fichier par CPU) %s\n" +" -s NUM taille de tampon en mégaoctets, au lieu de %d\n" +" -I DIR chercher les scripts .stp supplémentaires dans DIR" + +#: session.cxx:434 session.cxx:461 +msgid ", in addition to" +msgstr " en plus de" + +#: session.cxx:438 +#, c-format +msgid "" +" -D NM=VAL emit macro definition into generated C code\n" +" -B NM=VAL pass option to kbuild make\n" +" -G VAR=VAL set global variable to value\n" +" -R DIR look in DIR for runtime, instead of\n" +" %s\n" +" -r DIR cross-compile to kernel with given build tree; or else\n" +" -r RELEASE cross-compile to kernel /lib/modules/RELEASE/build, instead " +"of\n" +" %s\n" +" -a ARCH cross-compile to given architecture, instead of %s\n" +" -m MODULE set probe module name, instead of \n" +" %s\n" +" -o FILE send script output to file, instead of stdout. This supports\n" +" strftime(3) formats for FILE\n" +" -c CMD start the probes, run CMD, and exit when it finishes\n" +" -x PID sets target() to PID\n" +" -F run as on-file flight recorder with -o.\n" +" run as on-memory flight recorder without -o.\n" +" -S size[,n] set maximum of the size and the number of files.\n" +" -d OBJECT add unwind/symbol data for OBJECT file" +msgstr "" +" -D NM=VAL émettre une définition de macro dans le code C généré\n" +" -B NM=VAL passer l'option au make de kbuild\n" +" -G VAR=VAL assigner la valeur à la variable globale\n" +" -R DIR chercher l'environnement d'exécution dans DIR au lieu de\n" +" %s\n" +" -r DIR compilation croisée pour le noyau dans le répertoire donné ; " +"ou bien\n" +" -r RELEASE compilation croisée pour le noyau /lib/module/RELEASE/build au " +"lieu de\n" +" %s\n" +" -a ARCH compilation croisée pour l'architecture donnée au lieu de %s " +"-m MODULE définir le nom du module au lieu de %s\n" +" -o FILE envoyer la sortie du script vers le fichier au lieu de\n" +" la sortie standard. Le fortmat strftime(3) est supporté\n" +" pour FILE.\n" +" -c CMD lancer l'instrumentation, lancer CMD et quitter quandla " +"commande se termine\n" +" -x PID fixer target() à PID\n" +" -F exécuter en enregistrement continu dans un fichier avec -o.\n" +" exécuter en enregistrement continue en mémoire sans -o.\n" +" -S size[,n] définir le maximum de la taille et du nombre de fichiers.\n" +" -d OBJECT ajouter les données de symboles pour le fichier OBJECT" + +#: session.cxx:468 +#, fuzzy, c-format +msgid "" +" --ldd add unwind/symbol data for all referenced object files.\n" +" --all-modules\n" +" add unwind/symbol data for all loaded kernel objects.\n" +" -t collect probe timing information\n" +" -q generate information on tapset coverage\n" +" --unprivileged\n" +" restrict usage to features available to unprivileged users\n" +" --kelf make do with symbol table from vmlinux\n" +" --kmap[=FILE]\n" +" make do with symbol table from nm listing\n" +" --compatible=VERSION\n" +" suppress incompatible language/tapset changes beyond VERSION,\n" +" instead of %s\n" +" --check-version\n" +" displays warnings where a syntax element may be \n" +" version dependent\n" +" --skip-badvars\n" +" substitute zero for bad context $variables\n" +" --use-server[=SERVER-SPEC]\n" +" specify systemtap compile-servers\n" +" --list-servers[=PROPERTIES]\n" +" report on the status of the specified compile-servers:\n" +" all,specified,online,trusted,signer,compatible\n" +" --trust-servers[=TRUST-SPEC]\n" +" add/revoke trust of specified compile-servers:\n" +" ssl,signer,all-users,revoke,no-prompt\n" +" --use-server-on-error[=yes/no]\n" +" retry compilation using a compile server upon compilation " +"error\n" +" --remote=HOSTNAME\n" +" run pass 5 on the specified ssh host.\n" +" may be repeated for targeting multiple hosts.\n" +" --remote-prefix\n" +" prefix each line of remote output with a host index.\n" +" --tmpdir=NAME\n" +" specify name of temporary directory to be used." +msgstr "" +" --ldd ajouter les données de symboles pour toues les fichiers\n" +" objets référencés.\n" +" --all-modules\n" +" ajouter les données de symboles pour tous les objets chargés " +"dans le noyau.\n" +" -t récolter les informations de de timing de probes\n" +" -q générer les informations de couverture de tapset\n" +" --unprivileged\n" +" restreindre l'utilisation aux fonctionnalités disponibles aux " +"utilisateurs non privilégiés\n" +" --kelf make do with symbol table from vmlinux\n" +" --kmap[=FILE]\n" +" make do with symbol table from nm listing\n" +" --compatible=VERSION\n" +" désactiver les changements incompatibles dans le langage et " +"tapsets au delà de VERSION\n" +" au lieu de %s\n" +" --check-version\n" +" afficher un avertissement quand un élément\n" +" peut dépendre de la version\n" +" --skip-badvars\n" +" remplacer les $variables de context invalides par 0\n" +" --use-server[=SERVER-SPEC]\n" +" spécifier le serveur de compilation systemtap\n" +" --list-servers[=PROPERTIES]\n" +" rapporter le status du serveur de compilation spécifié\n" +" --trust-servers[=TRUST-SPEC]\n" +" ajouter/révoquer une relation de confiance avec les serveurs " +"de compilation spécifiés\n" +" --use-server-on-error[=yes/no]\n" +" réessayer la compilation avec un serveur de compilation lors " +"d'une erreur\n" +" --remote=HOSTNAME\n" +" exécuter la passe 5 sur l'hôte ssh spécifié (EXPÉRIMENTAL)\n" +" may be repeated for targeting multiple hosts." + +#: session.cxx:643 +msgid "Invalid pass number (should be 1-5)." +msgstr "Numéro de passe invalide (devrait être 1-5)." + +#: session.cxx:648 +msgid "Listing (-l) mode implies pass 2." +msgstr "Le mode de listage (-l) implique la passe 2." + +#: session.cxx:685 session.cxx:849 +msgid "Only one script can be given on the command line." +msgstr "Seul un script peut être donné sur la ligne de commande." + +#: session.cxx:701 session.cxx:758 session.cxx:830 session.cxx:864 +#, c-format +msgid "ERROR: %s invalid with %s" +msgstr "ERREUR : %s est invalide avec %s" + +#: session.cxx:718 session.cxx:736 +#, c-format +msgid "Truncating module name to '%s'" +msgstr "Nom du module tronqué à '%s'" + +#: session.cxx:724 +msgid "Module name cannot be empty." +msgstr "Le nom du module ne peut pas être vide." + +#: session.cxx:787 +msgid "Invalid buffer size (should be 1-4095)." +msgstr "Taille de tampon invalide (devrait être 1-4095)." + +#: session.cxx:800 +msgid "Empty CMD string invalid." +msgstr "Chaîne CMD vide invalide." + +#: session.cxx:809 +msgid "Invalid target process ID number." +msgstr "Identifiant de processus cible invalide." + +#: session.cxx:885 +msgid "You can't specify multiple --kmap options." +msgstr "Vous ne pouvez pas spécifier plusieurs options --kmap." + +#: session.cxx:916 +msgid "Invalid --vp argument: it takes 1 to 5 digits." +msgstr "Argument --vp invalide : il prend 1 à 5 chiffres." + +#: session.cxx:967 +#, c-format +msgid "Invalid argument '%s' for --use-server-on-error." +msgstr "Argument '%s' invalide pour --use-server-on-error." + +#: session.cxx:995 session.cxx:1002 session.cxx:1009 session.cxx:1022 +#: session.cxx:1031 session.cxx:1039 session.cxx:1048 +#, c-format +msgid "ERROR: %s is invalid with %s" +msgstr "ERREUR : %s est invalide avec %s" + +#: session.cxx:1062 +#, c-format +msgid "Unhandled long argument id %d" +msgstr "Long argument non géré (identifiant : %d)" + +#: session.cxx:1076 +#, c-format +msgid "Unhandled argument code %d" +msgstr "Argument non géré (code : %d)" + +#: session.cxx:1118 +msgid "A script must be specified." +msgstr "Un script doit être spécifié." + +#: session.cxx:1125 +msgid "WARNING: --client-options is not supported by this version of systemtap" +msgstr "" +"ATTENTION : --client-options n'est pas supporté dans cette version de " +"systemtap" + +#: session.cxx:1129 +msgid "WARNING: --trust-servers is not supported by this version of systemtap" +msgstr "" +"ATTENTION : --trust-servers n'est pas supporté dans cette version de " +"systemtap" + +#: session.cxx:1136 +msgid "Warning: Ignoring --use-server due to the use of -R" +msgstr "Attention : --use-server ignoré à cause de -R" + +#: session.cxx:1160 +msgid "Using --unprivileged for member of the group stapusr" +msgstr "Utilisation de --unprivileged pour membre du groupe stapusr" + +#: session.cxx:1167 +msgid "Using --use-server for member of the group stapusr" +msgstr "Utilisation de --use-server pour membre du groupe stapusr" + +#: session.cxx:1176 +#, c-format +msgid "You can't specify %s when --unprivileged is specified." +msgstr "Vous ne pouvez pas spécifier %s quand --unprivileged est spécifié." + +#: session.cxx:1182 session.cxx:1187 session.cxx:1194 session.cxx:1205 +#, c-format +msgid "You can't specify %s and %s together." +msgstr "Vous ne pouvez pas spécifier %s et %s en même temps." + +# XXX: i don't understand the "forces last-pass 4" bit +#: session.cxx:1214 +msgid "" +"WARNING: kernel release/architecture mismatch with host forces last-pass 4." +msgstr "" +"ATTENTION : la version/architecture du noyau ne correspond pas avec l'hôte" + +#: session.cxx:1301 +#, c-format +msgid "Located kernel source tree (COPYING) at '%s'" +msgstr "Trouvé arbre des sources du noyau (COPYING) dans '%s'" + +#: session.cxx:1343 +#, c-format +msgid "alias component %s contains illegal parameter" +msgstr "le composant d'alias %s contient un paramètre illégal" + +#: session.cxx:1355 +msgid " while registering probe alias " +msgstr " lors de l'enregistrement d'un alias de probe" + +#: session.cxx:1408 +#, c-format +msgid "semantic error: %s" +msgstr "erreur sémantique : %s" + +#. TRANSLATORS: Here were are printing the source string of the error +#: session.cxx:1467 +msgid "source: " +msgstr "source : " + +#: stap-authorize-cert.cxx:51 +#, fuzzy +msgid "Certificate file must be specified" +msgstr "Un script doit être spécifié." + +#: stap-authorize-cert.cxx:59 +msgid "Certificate database directory must be specified" +msgstr "" + +#: stap-authorize-cert.cxx:74 +#, fuzzy +msgid "Unable to authorize certificate" +msgstr "" +"Incapable de déterminer le chemin vers la base de données de certificats." + +#: stap-gen-cert.cxx:68 +#, c-format +msgid "%s : unhandled option '%c %s'" +msgstr "" + +#: stap-gen-cert.cxx:70 +#, c-format +msgid "%s : unhandled option '%c'" +msgstr "" + +#: stap-gen-cert.cxx:114 +#, fuzzy +msgid "Unable to generate certificate" +msgstr "" +"Incapable de déterminer le chemin vers la base de données de certificats." + +# XXX: assuming the file contains only one signature (as per PR_TRUNCATE) +#: stap-serverd.cxx:121 +#, fuzzy, c-format +msgid "Could not open client stderr file %s: %s" +msgstr "Ne peut ouvrir le fichier de signature " + +#: stap-serverd.cxx:224 +#, c-format +msgid "%s: unhandled option '%c %s'" +msgstr "" + +#: stap-serverd.cxx:226 +#, c-format +msgid "%s: unhandled option '%c'" +msgstr "" + +#: stap-serverd.cxx:242 +#, c-format +msgid "%s: unhandled option '--%s=%s'" +msgstr "" + +#: stap-serverd.cxx:245 +#, c-format +msgid "%s: unhandled option '--%s'" +msgstr "" + +#: stap-serverd.cxx:253 +#, fuzzy, c-format +msgid "%s: unrecognized argument '%s'" +msgstr "variante de timer non reconnue" + +#: stap-serverd.cxx:289 +#, c-format +msgid "Received signal %d, exiting" +msgstr "" + +#: stap-serverd.cxx:348 +#, c-format +msgid "Service '%s' successfully established." +msgstr "" + +#: stap-serverd.cxx:358 stap-serverd.cxx:449 +#, c-format +msgid "Avahi service name collision, renaming service to '%s'" +msgstr "" + +#: stap-serverd.cxx:366 +#, c-format +msgid "Avahi entry group failure: %s" +msgstr "" + +#: stap-serverd.cxx:387 +#, c-format +msgid "avahi_entry_group_new () failed: %s" +msgstr "" + +#: stap-serverd.cxx:396 +#, c-format +msgid "Adding Avahi service '%s'" +msgstr "" + +#: stap-serverd.cxx:429 +#, c-format +msgid "Failed to add _stap._tcp service: %s" +msgstr "" + +#: stap-serverd.cxx:436 +#, c-format +msgid "Failed to commit avahi entry group: %s" +msgstr "" + +#: stap-serverd.cxx:474 +#, c-format +msgid "Avahi client failure: %s" +msgstr "" + +#: stap-serverd.cxx:500 +#, c-format +msgid "Removing Avahi service '%s'" +msgstr "" + +#: stap-serverd.cxx:538 +msgid "Failed to create avahi threaded poll object." +msgstr "" + +#: stap-serverd.cxx:550 +#, c-format +msgid "Failed to create avahi client: %s" +msgstr "" + +#: stap-serverd.cxx:567 +msgid "Unable to advertise presence on the network. Avahi is not available" +msgstr "" + +#: stap-serverd.cxx:599 +#, fuzzy, c-format +msgid "Unable to obtain current resource limits: %s" +msgstr "" +"Incapable d'obtenir le mot de passe de la base de données de certificats." + +#: stap-serverd.cxx:637 +#, c-format +msgid "===== compile server pid %d starting =====" +msgstr "" + +#: stap-serverd.cxx:677 +#, fuzzy +msgid "Error reading size of request file" +msgstr "Erreur lors de la lecture du fichier module " + +#: stap-serverd.cxx:682 stap-serverd.cxx:713 +msgid "Error in PR_Read" +msgstr "" + +# XXX: assuming the file contains only one signature (as per PR_TRUNCATE) +#: stap-serverd.cxx:700 +#, fuzzy, c-format +msgid "Could not open output file %s" +msgstr "Ne peut ouvrir le fichier de signature " + +# XXX: assuming the file contains only one signature (as per PR_TRUNCATE) +#: stap-serverd.cxx:722 +#, fuzzy, c-format +msgid "Could not write to output file %s" +msgstr "Ne peut ouvrir le fichier de signature " + +#: stap-serverd.cxx:730 +#, c-format +msgid "Expected %d bytes, got %d while reading client request from socket" +msgstr "" + +#: stap-serverd.cxx:758 +msgid "Could not import socket into SSL" +msgstr "" + +#: stap-serverd.cxx:767 +msgid "Error setting SSL security for socket" +msgstr "" + +#: stap-serverd.cxx:775 +msgid "Error setting handshake as server for socket" +msgstr "" + +#: stap-serverd.cxx:783 stap-serverd.cxx:791 +msgid "Error setting SSL client authentication mode for socket" +msgstr "" + +#: stap-serverd.cxx:802 +msgid "Error in SSL_AuthCertificateHook" +msgstr "" + +#: stap-serverd.cxx:811 +msgid "Error in SSL_BadCertHook" +msgstr "" + +#: stap-serverd.cxx:819 +msgid "Error in SSL_HandshakeCallback" +msgstr "" + +#: stap-serverd.cxx:830 +msgid "Error configuring SSL server" +msgstr "" + +#: stap-serverd.cxx:864 +msgid "Error in SSL_OptionSet:SSL_REQUEST_CERTIFICATE" +msgstr "" + +#: stap-serverd.cxx:874 +msgid "Error in SSL_OptionSet:SSL_REQUIRE_CERTIFICATE" +msgstr "" + +#: stap-serverd.cxx:883 +msgid "Error in SSL_ReHandshake" +msgstr "" + +#: stap-serverd.cxx:892 +msgid "Error in SSL_ForceHandshake" +msgstr "" + +# XXX: assuming the file contains only one signature (as per PR_TRUNCATE) +#: stap-serverd.cxx:912 +#, fuzzy, c-format +msgid "Could not open input file %s" +msgstr "Ne peut ouvrir le fichier de signature " + +#: stap-serverd.cxx:928 +msgid "Error writing response to socket" +msgstr "" + +#: stap-serverd.cxx:951 +#, c-format +msgid "Unable to open file %s for reading: %s" +msgstr "Impossible d'ouvrir le fichier %s pour la lecture: %s" + +#: stap-serverd.cxx:975 +#, c-format +msgid "Error in regcomp: %s" +msgstr "Erreur dans l'expression régulière: %s" + +#: stap-serverd.cxx:998 +#, fuzzy, c-format +msgid "Localization key '%s' not found in global list" +msgstr "La clé de la localisation %s n'a pas été trouvé dans la liste globale" + +#: stap-serverd.cxx:1006 +#, fuzzy, c-format +msgid "Localization value '%s' contains illegal characters" +msgstr "La valeur de localisation %s a des lettres illégale" + +#: stap-serverd.cxx:1017 +#, c-format +msgid "Error reading file %s: %s" +msgstr "Erreur de la lecture du fichier %s: %s" + +#: stap-serverd.cxx:1050 +#, fuzzy, c-format +msgid "Unable to open client version file %s" +msgstr "Incapable de récupérer la liste des groupes" + +#: stap-serverd.cxx:1056 +#, c-format +msgid "Client version is %s" +msgstr "" + +#: stap-serverd.cxx:1068 +msgid "Cannot parse stap options" +msgstr "" + +#: stap-serverd.cxx:1080 +#, fuzzy, c-format +msgid "Could not create temporary directory %s" +msgstr "ERREUR : ne peut créer le répertoire temporaire %s : %s" + +#: stap-serverd.cxx:1100 +msgid "Out of memory" +msgstr "Pas plus de mémoire" + +#: stap-serverd.cxx:1108 +#, c-format +msgid "Error opening %s: %s" +msgstr "Erreur dans l'ouverture %s: %s" + +#: stap-serverd.cxx:1117 +#, c-format +msgid "Error reading %s: %s" +msgstr "Erreur de la lecture %s: %s" + +#: stap-serverd.cxx:1182 +#, fuzzy, c-format +msgid "Unable to find a module in %s" +msgstr "Incapable d'initialiser la bibliothèque nss." + +#: stap-serverd.cxx:1184 +#, c-format +msgid "Too many modules (%zu) in %s" +msgstr "" + +# XXX: assuming the file contains only one signature (as per PR_TRUNCATE) +#: stap-serverd.cxx:1211 +#, fuzzy, c-format +msgid "Could not link to %s from %s" +msgstr "Ne peut ouvrir le fichier de signature " + +#: stap-serverd.cxx:1269 +#, fuzzy +msgid "Error in spawn getcwd" +msgstr "Erreur dans l'expression : " + +#: stap-serverd.cxx:1277 +#, fuzzy +msgid "Error in spawn chdir" +msgstr "Erreur dans l'expression : " + +#: stap-serverd.cxx:1300 +#, fuzzy, c-format +msgid "Unable to set resource limits for %s: %s" +msgstr "" +"Incapable de déterminer le chemin vers la base de données de certificats." + +#: stap-serverd.cxx:1311 +#, fuzzy, c-format +msgid "Unable to restore resource limits after %s: %s" +msgstr "Incapable de récupérer la liste des groupes" + +#: stap-serverd.cxx:1321 +#, fuzzy +msgid "Error in spawn unchdir" +msgstr "Erreur dans l'expression : " + +#: stap-serverd.cxx:1326 +#, fuzzy, c-format +msgid "Error in spawn: %s" +msgstr "Erreur dans l'expression : " + +#: stap-serverd.cxx:1333 +#, fuzzy +msgid "Error in waitpid" +msgstr "Erreur dans l'expression : " + +#: stap-serverd.cxx:1385 +msgid "Error resetting SSL handshake" +msgstr "" + +#: stap-serverd.cxx:1395 +msgid "Error forcing SSL handshake" +msgstr "" + +#: stap-serverd.cxx:1406 stap-serverd.cxx:1418 stap-serverd.cxx:1426 +#, fuzzy, c-format +msgid "Could not create temporary directory %s: %s" +msgstr "ERREUR : ne peut créer le répertoire temporaire %s : %s" + +#: stap-serverd.cxx:1465 +#, fuzzy +msgid "Unable to extract client request" +msgstr "Incapable de déterminer le répertoire d'accueil de l'utilisateur" + +#: stap-serverd.cxx:1484 +#, fuzzy +msgid "Unable to compress server response" +msgstr "Incapable de récupérer la liste des groupes" + +#: stap-serverd.cxx:1494 +msgid "Error closing ssl socket" +msgstr "" + +#: stap-serverd.cxx:1502 +#, fuzzy, c-format +msgid "Keeping temporary directory %s" +msgstr "Conservation du répertoire temporaire \"%s\"" + +#: stap-serverd.cxx:1511 +#, fuzzy +msgid "Error in tmpdir cleanup" +msgstr "Erreur dans l'expression : " + +#: stap-serverd.cxx:1537 +#, fuzzy +msgid "Unable to obtain certificate private key" +msgstr "" +"Incapable d'obtenir le mot de passe de la base de données de certificats." + +#: stap-serverd.cxx:1548 +msgid "Error accepting client connection" +msgstr "" + +#: stap-serverd.cxx:1553 +#, c-format +msgid "Accepted connection from %d.%d.%d.%d:%d" +msgstr "" + +#: stap-serverd.cxx:1566 +msgid "Error processing client request" +msgstr "" + +#: stap-serverd.cxx:1569 +#, c-format +msgid "Request from %d.%d.%d.%d:%d complete" +msgstr "" + +#: stap-serverd.cxx:1630 +msgid "Unable to configure SSL server session ID cache" +msgstr "" + +#: stap-serverd.cxx:1640 +#, fuzzy, c-format +msgid "Unable to find our certificate in the database at %s" +msgstr "" +"Incapable d'obtenir le mot de passe de la base de données de certificats." + +#: stap-serverd.cxx:1663 +#, fuzzy +msgid "Unable to shut down server session ID cache" +msgstr "Incapable de récupérer la liste des groupes" + +#: stap-serverd.cxx:1678 +#, fuzzy +msgid "Error creating socket" +msgstr "Erreur lors de la lecture du fichier de mots de passe " + +#: stap-serverd.cxx:1690 stap-serverd.cxx:1702 +msgid "Error setting socket properties" +msgstr "" + +#: stap-serverd.cxx:1727 +#, c-format +msgid "Network port %d is unavailable. Trying another port" +msgstr "" + +#: stap-serverd.cxx:1731 +#, c-format +msgid "Network port %d is busy. Trying another port" +msgstr "" + +#: stap-serverd.cxx:1735 +msgid "Error setting socket address" +msgstr "" + +#: stap-serverd.cxx:1745 +#, fuzzy +msgid "Unable to obtain socket address" +msgstr "" +"Incapable d'obtenir le mot de passe de la base de données de certificats." + +#: stap-serverd.cxx:1750 +#, c-format +msgid "Using network port %d" +msgstr "" + +#: stap-serverd.cxx:1757 +msgid "Error listening on socket" +msgstr "" + +#: stap-serverd.cxx:1780 +#, fuzzy +msgid "Unable to authorize certificate for the local client" +msgstr "" +"Incapable de déterminer le chemin vers la base de données de certificats." + +#: stap-serverd.cxx:1791 +msgid "Error closing listen socket" +msgstr "" + +#: stap-sign-module.cxx:51 +msgid "Module name was not specified." +msgstr "Le nom du module n'a pas été spécifié." + +#: staptree.cxx:161 +#, fuzzy +msgid "inconsistent arity" +msgstr "adresse de relocalisation inconsistente" + +#: staptree.cxx:165 +#, fuzzy, c-format +msgid "inconsistent arity (%s vs %d)" +msgstr "adresse de relocalisation inconsistente" + +#: staptree.cxx:168 +#, c-format +msgid "arity %s first inferred here" +msgstr "" + +#: staptree.cxx:203 +msgid "internal error, joining a non-synthetic function" +msgstr "" + +#: staptree.cxx:205 +#, c-format +msgid "synthetic function '%s' conflicts with an existing function" +msgstr "" + +#: staptree.cxx:251 +#, c-format +msgid "%s variable '%s' may not be used as array" +msgstr "" + +#: staptree.cxx:254 +#, c-format +msgid "%s variable '%s' may not be used as a structure" +msgstr "" + +#: staptree.cxx:258 +#, c-format +msgid "%s variable '%s' may not be pretty-printed" +msgstr "" + +#: staptree.cxx:262 +#, fuzzy, c-format +msgid "invalid use of %s variable '%s'" +msgstr "type de variable locale non supporté" + +#: staptree.cxx:854 +msgid "invalid or missing conversion specifier" +msgstr "" + +#: staptree.cxx:867 +msgid "trailing incomplete print format conversion" +msgstr "" + +#: staptree.cxx:1574 staptree.cxx:1587 +#, fuzzy +msgid "Expecting symbol or histogram operator" +msgstr "opérateur de comparaison attendu" + +#: staptree.cxx:1576 +msgid "Failed to classify indexable" +msgstr "" + +#: staptree.cxx:1930 +#, fuzzy +msgid "function may not be used when --unprivileged is specified" +msgstr "Vous ne pouvez pas spécifier %s quand --unprivileged est spécifié." + +#: staptree.cxx:1935 +msgid "function may not be used unless -g is specified" +msgstr "" + +#: staptree.cxx:1964 +#, fuzzy +msgid "embedded expression may not be used when --unprivileged is specified" +msgstr "expression enchâssée dans un script non privilégié" + +#: staptree.cxx:1969 +#, fuzzy +msgid "embedded expression may not be used unless -g is specified" +msgstr "expression enchâssée dans un script non privilégié" + +#: staptree.cxx:2075 +msgid "symbol without referent" +msgstr "" + +#: staptree.cxx:2264 +#, fuzzy +msgid "invalid element" +msgstr "longueur de liste d'arguments invalide" + +#: tapset-itrace.cxx:79 tapsets.cxx:6246 tapset-utrace.cxx:128 +msgid "process probes not available without kernel CONFIG_UTRACE" +msgstr "" +"les probes 'process' ne sont pas disponibles sans un noyau CONFIG_UTRACE" + +# XXX: if we don't translate "probe" we probably shouldn't translate "marker" +#: tapset-mark.cxx:100 +msgid "invalid marker argument number" +msgstr "nombre d'arguments de marker invalide" + +#: tapset-mark.cxx:103 +msgid "write to marker parameter not permitted" +msgstr "modifier un paramètre de marker n'est pas permi" + +#: tapset-mark.cxx:123 +#, c-format +msgid "write to marker '%s' not permitted" +msgstr "modifier le marker '%s' n'est pas permi" + +#: tapset-mark.cxx:187 +msgid "cannot take address of marker variable" +msgstr "ne peut pas prendre l'adresse d'une variable de marker" + +#: tapset-mark.cxx:195 +msgid "" +"invalid target symbol for marker, $argN, $name, $format, $$parms or $$vars " +"expected" +msgstr "" +"symbole cible invalide pour un marker : $argN, $name, $format, $$parms ou $" +"$vars attendu" + +#: tapset-mark.cxx:449 translate.cxx:2019 +msgid "cannot expand unknown type" +msgstr "ne peut étender un type inconnu" + +#: tapset-mark.cxx:582 +msgid "mark_builder releasing cache" +msgstr "mark_builder nettoie le cache" + +#. TRANSLATORS: specific path cannot be opened +#: tapset-mark.cxx:620 +msgid " cannot be opened: " +msgstr " ne peut être ouvert : " + +#: tapset-perfmon.cxx:200 +msgid "" +"perf probes not available without exported perf_event_create_kernel_counter" +msgstr "" +"les probes perf ne sont pas disponibles quand " +"perf_event_create_kernel_counter n'est pas exporté" + +#: tapset-perfmon.cxx:202 +msgid "perf probes not available without CONFIG_PERF_EVENTS" +msgstr "les probes perf ne sont pas disponibles sans CONFIG_PERF_EVENTS" + +#: tapset-perfmon.cxx:217 +msgid "invalid perf sample period " +msgstr "période d'échantillonnage perf invalide" + +#: tapset-perfmon.cxx:221 +#, c-format +msgid "perf probe type=% config=% period=%" +msgstr "probe perf type=% config=% période=%" + +#: tapset-procfs.cxx:147 +msgid "only one write procfs probe can exist for procfs path \"" +msgstr "un seul probe d'écriture procfs peut exister pour le chemin procfs \"" + +#: tapset-procfs.cxx:149 +msgid "only one read procfs probe can exist for procfs path \"" +msgstr "un seul probe de lecture procfs peut exister pour le chemin procfs \"" + +#: tapset-procfs.cxx:406 +msgid "invalid target symbol for procfs probe, $value expected" +msgstr "symbole cible invalide pour probe procfs, $value attendu" + +#: tapset-procfs.cxx:413 +msgid "procfs $value variable is read-only in a procfs write probe" +msgstr "" +"la variable $value est en lecture seule dans un probe d'écriture procfs" + +#: tapset-procfs.cxx:415 +msgid "procfs $value variable cannot be read in a procfs read probe" +msgstr "" +"la variable $value ne peut pas être lue dans un probe de lecture procfs" + +#: tapset-procfs.cxx:418 +msgid "cannot take address of procfs variable" +msgstr "ne peut prendre l'adresse d'une variable procfs" + +#: tapset-procfs.cxx:459 +msgid "" +"Only the following assign operators are implemented on procfs read target " +"variables: '=', '.='" +msgstr "" +"Seuls les opérateurs d'affectation suivants sont implantés dans les " +"variables cibles de lecture procfs : '=', '.='" + +#: tapset-procfs.cxx:547 +msgid "maxsize must be greater than 0" +msgstr "maxsize doit être plus grand que 0" + +#: tapset-procfs.cxx:569 +msgid "procfs path cannot start with a '/'" +msgstr "un chemin procfs ne peut pas commencer par '/'" + +#: tapset-procfs.cxx:575 +msgid "procfs path component cannot be empty" +msgstr "un composant de chemin procfs ne peut pas être vide" + +#: tapset-procfs.cxx:579 tapset-procfs.cxx:589 +msgid "procfs path cannot be relative (and contain '.' or '..')" +msgstr "un chemin procfs ne peut pas être relatif (et contenir '.' ou '..')" + +#: tapset-procfs.cxx:586 +msgid "procfs path cannot end with a '/'" +msgstr "un chemin procfs ne peut pas se terminer avec '/'" + +#: tapset-procfs.cxx:593 +msgid "need read/write component" +msgstr "besoin d'un composant read/write" + +#: tapsets.cxx:872 +#, c-format +msgid "" +"Error: Pattern '%s' matches every single instruction address in the symbol " +"table,\n" +"some of which aren't even functions.\n" +msgstr "" +"Erreur : Le motif '%s' correspond à toutes les adresses d'instructions dans\n" +"la table des symboles ; certaines ne sont même pas des fonctions.\n" + +#: tapsets.cxx:906 +#, c-format +msgid "Warning: address %# out of range for module %s" +msgstr "Attention : l'adresse %# est hors de portée pour le module %s" + +#: tapsets.cxx:917 +#, c-format +msgid "" +"Warning: address %# maps to no known compilation unit in module %s" +msgstr "" +"Attention : l'adresse %# ne correspond à aucune unité de compilation " +"connue dans le module %s" + +#: tapsets.cxx:1027 +#, c-format +msgid "parse '%s'" +msgstr "analyse '%s'" + +#: tapsets.cxx:1068 +#, c-format +msgid "malformed specification '%s'" +msgstr "spécification malformée '%s'" + +#: tapsets.cxx:1097 +msgid "probe " +msgstr "" + +#: tapsets.cxx:1099 +msgid " kernel" +msgstr " noyau" + +#: tapsets.cxx:1101 +msgid " module=" +msgstr "" + +#: tapsets.cxx:1103 +msgid " process=" +msgstr " processus=" + +#: tapsets.cxx:1317 +#, c-format +msgid "address 0x%# does not match the beginning of a statement" +msgstr "l'adresse 0x%# ne correspond pas au début d'une instruction" + +#: tapsets.cxx:1320 +#, c-format +msgid " (try 0x%#)" +msgstr " (essayez 0x%#)" + +#: tapsets.cxx:1322 +#, c-format +msgid " (no line info found for '%s', in module '%s')" +msgstr " (pas d'information de ligne trouvée pour '%s', dans le module '%s')" + +#: tapsets.cxx:1376 +#, c-format +msgid "querying entrypc %# of instance of inline '%s'\n" +msgstr "requète de l'entrypc %# de l'instance en ligne '%s'\n" + +#: tapsets.cxx:1457 +msgid "function DIE lands on srcfile\n" +msgstr "le DIE de la fonction indique un fichier source\n" + +#: tapsets.cxx:1478 +msgid "inline instance DIE lands on srcfile\n" +msgstr "le DIE de la fonction en lighe indique un fichier source\n" + +#: tapsets.cxx:1519 +#, c-format +msgid "selected inline instance of %s\n" +msgstr "instance en ligne de %s sélectionnée\n" + +#: tapsets.cxx:1575 +#, c-format +msgid "checking instances of inline %s\n" +msgstr "vérification de l'instance en ligne %s\n" + +#: tapsets.cxx:1585 +#, c-format +msgid "selected function %s\n" +msgstr "fonction sélectionnée %s\n" + +#: tapsets.cxx:1623 +#, c-format +msgid "focused on CU '%s', in module '%s'\n" +msgstr "concentré sur l'unité de compilation '%s' dans le module '%s'\n" + +#: tapsets.cxx:1664 +msgid "" +"For probing a particular line, use a .statement() probe, not .function()" +msgstr "" +"Pour instrumenter une ligne spécifique, utilisez un probe .statement(), pas ." +"function()" + +#: tapsets.cxx:1821 +#, c-format +msgid "ELF machine %s|%s (code %d) mismatch with target %s in '%s'" +msgstr "" +"La machine ELF %s|%s (code %d) ne correspond pas à la cible %s dans '%s'" + +#: tapsets.cxx:1828 +#, c-format +msgid "" +"focused on module '%s' = [0x%#, -0x%#, bias 0x%# " +"file %s ELF machine %s|%s (code %d)\n" +msgstr "" +"concentré sur le module '%s' = [0x%#, -0x%#, biais 0x" +"%# fichier %s machine ELF %s|%s (code %d)\n" + +#: tapsets.cxx:1917 +#, c-format +msgid "focused on module '%s'\n" +msgstr "concentré sur le module '%s'\n" + +#: tapsets.cxx:1987 +msgid "module=" +msgstr "" + +#: tapsets.cxx:2008 +msgid "deleting module_cache" +msgstr "suppression de module_cache" + +#: tapsets.cxx:2110 +#, c-format +msgid "" +"Only the following assign operator is implemented on target variables: %s" +msgid_plural "" +"Only the following assign operators are implemented on target variables: %s" +msgstr[0] "" +"Seul l'opérateur d'affectation suivant est implanté pour les variables " +"cibles : %s" +msgstr[1] "" +"Seuls les opérateurs d'affectation suivants sont implantés pour les " +"variables cibles : %s" + +# XXX: still need to find a good translation for pretty-print* +#: tapsets.cxx:2303 +msgid "cannot take address of pretty-printed variable" +msgstr "" + +#: tapsets.cxx:2307 +msgid "invalid target_symbol for pretty-print" +msgstr "" + +#: tapsets.cxx:3089 +msgid "unknown type to save in kretprobe" +msgstr "type inconnu à sauvegarder dans kretprobe" + +#: tapsets.cxx:3239 tapsets.cxx:8211 +msgid "variable location problem: " +msgstr "problème de localisation de variable" + +#: tapsets.cxx:3273 +msgid "write to target variable not permitted" +msgstr "la modification d'une variable cible n'est pas permise" + +#: tapsets.cxx:3285 +msgid "write to target variable not permitted in .return probes" +msgstr "" +"la modification d'une variable cible n'est pas permise dans un probe .return" + +#: tapsets.cxx:3294 +msgid "cannot write to context variable" +msgstr "ne peut modifier une variable contextuelle" + +#: tapsets.cxx:3297 tapsets.cxx:4901 tapsets.cxx:8166 +msgid "cannot take address of context variable" +msgstr "ne peut prendre l'adresse d'une variable contextuelle" + +#: tapsets.cxx:3309 tapsets.cxx:3570 tapsets.cxx:8063 +msgid "cannot write to pretty-printed variable" +msgstr "" + +#. TRANSLATORS: Here we're using a cached module. +#: tapsets.cxx:3690 +msgid "Pass 2: using cached " +msgstr "Passe 2 : utilisation du module en cache " + +#: tapsets.cxx:3713 +msgid "write to @cast context variable not permitted" +msgstr "la modification d'une variable de contexte @cast n'est pas permise" + +#: tapsets.cxx:3853 +msgid "missing relocation basis" +msgstr "" + +#: tapsets.cxx:3855 +msgid "inconsistent relocation address" +msgstr "adresse de relocalisation inconsistente" + +#: tapsets.cxx:3865 +#, c-format +msgid "maxactive value out of range [0,%s]" +msgstr "valeur maxactive hors des limites [0,%s]" + +#: tapsets.cxx:3996 +#, c-format +msgid "saveargs: examining '%s' (dieoffset: %#)\n" +msgstr "saveargs : examun de '%s' (adresse relative du DIE : %#)\n" + +#: tapsets.cxx:4008 +#, c-format +msgid "" +"saveargs: failed to retrieve type name for return value (dieoffset: %s)\n" +msgstr "" +"saveargs : échec de récupération du nom du type pour la valeur de retour " +"(adresse relative du DIE : %s)\n" + +#: tapsets.cxx:4036 +#, c-format +msgid "saveargs: failed to retrieve name for local (dieoffset: %s)\n" +msgstr "" +"saveargs : échec de récupération du nom de la variable locale (adresse " +"relative du DIE : %s)\n" + +#: tapsets.cxx:4042 +#, c-format +msgid "saveargs: finding location for local '%s' (dieoffset: %s)\n" +msgstr "" +"saveargs : recherche de l'adresse de la variable locale '%s' (adresse " +"relative du DIE : %s)\n" + +#: tapsets.cxx:4057 +#, c-format +msgid "" +"saveargs: failed to resolve the location for local '%s' (dieoffset: %s)\n" +msgstr "" +"saveargs : échec de résolution de l'adresse de la variable localte " +"'%s' (adresse relative du DIE : %s)\n" + +#: tapsets.cxx:4065 +#, c-format +msgid "" +"saveargs: local '%s' (dieoffset: %s) is not available at this address (%s)\n" +msgstr "" +"saveargs : la variable locale '%s' (adresse relative du DIE : %s) n'est pas " +"disponible à cette adresse (%s)\n" + +#: tapsets.cxx:4078 +#, c-format +msgid "saveargs: failed to retrieve type name for local '%s' (dieoffset: %s)\n" +msgstr "" +"saveargs : échec de récupération du nom du type pour la variable locale " +"'%s' (adresse relative du DIE : %s)\n" + +#: tapsets.cxx:5222 +#, c-format +msgid "Can't parse SDT_V3 operand '%s'" +msgstr "" + +#: tapsets.cxx:5224 +#, c-format +msgid "Downgrading SDT_V2 probe argument to dwarf, can't parse '%s'" +msgstr "" +"Rétrogradation des arguments de probe SDT_V2 vers dwarf, ne peut analyser " +"'%s'" + +#. TRANSLATORS: We're mapping the operand to a new expression*. +#: tapsets.cxx:5237 +#, c-format +msgid "mapped asm operand %s to " +msgstr "correspondance de l'opérande asm %s à " + +#: tapsets.cxx:5242 tapsets.cxx:5372 +msgid "cannot take address of sdt variable" +msgstr "ne peut prendre l'adresse d'une variable sdt" + +#: tapsets.cxx:5297 tapsets.cxx:5307 +msgid "cannot take address of sdt context variable" +msgstr "ne peut prendre l'adresse d'une variable de contexte sdt" + +#: tapsets.cxx:5325 +msgid "invalid variable, must be of the form $argN" +msgstr "variable invalide, doit être de la forme $argN" + +#: tapsets.cxx:5327 +msgid "invalid argument number" +msgstr "nombre d'arguments invalide" + +#. TRANSLATORS: Describing what probe type (kprobe or uprobe) the probe +#. TRANSLATORS: is matched to. +#: tapsets.cxx:5484 +#, c-format +msgid "matched probe_name %s probe type " +msgstr "probe_name %s correspond au type de probe " + +#: tapsets.cxx:5743 tapsets.cxx:5807 +msgid " (provider " +msgstr " (fournisseur " + +#: tapsets.cxx:5743 +#, c-format +msgid " saw .note.stapsdt %s%s " +msgstr " vu .note.stapdst %s%s " + +#: tapsets.cxx:5764 +#, c-format +msgid "got unknown probe_type : 0x%x" +msgstr "obtenu probe_type inconnu : 0x%x" + +#: tapsets.cxx:5807 +msgid "saw .probes " +msgstr "vu .probes " + +#: tapsets.cxx:5825 +#, c-format +msgid "looking for semaphore symbol %s " +msgstr "recherche du symbole de sémaphore %s " + +#: tapsets.cxx:5840 +msgid ", found at 0x" +msgstr ", trouvé à 0x" + +#: tapsets.cxx:5845 +msgid ", not found" +msgstr ", pas trouvé" + +#: tapsets.cxx:5972 +msgid "probe_type == uprobe1, use statement addr: 0x" +msgstr "probe_type == uprobe1, utilisez l'adresse d'instruction 0x" + +#: tapsets.cxx:5976 +msgid "probe_type == uprobe2, use statement addr: 0x" +msgstr "probe_type == uprobe2, utilisez l'adresse d'instruction 0x" + +#: tapsets.cxx:5980 +msgid "probe_type == uprobe3, use statement addr: 0x" +msgstr "probe_type == uprobe3, utilisez l'adresse d'instruction 0x" + +#: tapsets.cxx:5990 +#, c-format +msgid "probe_type == use_uprobe_no_dwarf, use label name: _stapprobe1_%s" +msgstr "" +"probe_type == use_uprobe_no_dwarf, utilisez le nom d'étiquette _stapprobe1_%s" + +#: tapsets.cxx:6074 +msgid "unspecified process probe is invalid without a -c COMMAND" +msgstr "" + +# XXX: that's glob as in glob(), not sure how to translate +#: tapsets.cxx:6099 +#, c-format +msgid "glob %s error (%s)" +msgstr "" + +#: tapsets.cxx:6120 tapsets.cxx:6210 +#, c-format +msgid "Expanded process(\"%s\") to process(\"%s\")" +msgstr "Extension de process(\"%s\") en process(\"%s\")" + +#: tapsets.cxx:6254 +#, c-format +msgid "dwarf_builder::build for %s" +msgstr "dwarf_builder::build pour %s" + +#: tapsets.cxx:6274 tapsets.cxx:7593 +msgid "absolute statement probe in unprivileged script" +msgstr "probe statement().absolute dans un script non privilégié" + +#: tapsets.cxx:6314 +#, c-format +msgid "cannot probe .return of %u inlined function %s" +msgid_plural "cannot probe .return of %u inlined functions %s" +msgstr[0] "ne peut instrumenter .return de %u fonction en ligne %s" +msgstr[1] "ne peut instrumenter .return de %u fonctions en ligne %s" + +#: tapsets.cxx:6320 +#, c-format +msgid "skipped .return probe of %u inlined function" +msgid_plural "skipped .return probe of %u inlined functions" +msgstr[0] "probe .return ignorée pour %u fonction en ligne" +msgstr[1] "probe .return ignorée pour %u fonctions en ligne" + +#: tapsets.cxx:6378 +#, c-format +msgid "" +"Symbol table error: Line %d of symbol list from %s is not in correct format: " +"address type name [module]" +msgstr "" +"Erreur de table de symboles : La ligne %d de la liste de symboles de %s n'a " +"pas le format correct : adresse type nom [module]" + +#: tapsets.cxx:6395 +#, c-format +msgid "Symbol table error: %s contains no function symbols." +msgstr "" +"Erreur de table de symboles : %s ne contient pas de symboles de fonction." + +#: tapsets.cxx:6421 +#, c-format +msgid "Internal error reading symbol table from %s -- %s" +msgstr "" +"Erreur interne lors de la lecture de la table de symboles depuis %s -- %s" + +#: tapsets.cxx:6429 +#, c-format +msgid "Warning: nm cannot read symbol table from %s" +msgstr "Attention : nm ne peut pas lire la table de symboles depuis %s" + +#: tapsets.cxx:6443 +#, c-format +msgid "Warning: cannot read symbol table from %s -- %s" +msgstr "Attention : ne peut lire la table de symboles depuis %s -- %s" + +#: tapsets.cxx:6593 +#, c-format +msgid "Warning: reading symbol table from %s -- ignoring %s" +msgstr "Attention : lecture de la table de symboles depuis %s -- %s ignoré" + +#: tapsets.cxx:6603 +msgid "Error: Cannot find vmlinux. Consider using --kmap instead of --kelf." +msgstr "" +"Erreur : ne peut trouver vmlinux. Envisager l'utilisation de --kmap au lieu " +"de --kelf." + +#: tapsets.cxx:7724 +#, c-format +msgid "Too many hardware breakpoint probes requested for %s (%zu vs. %u)" +msgstr "Trop de points d'arrêt matériel demandés pour %s (%zu vs. %u)" + +#: tapsets.cxx:7912 +msgid "CONFIG_PERF_EVENTS not available on this kernel" +msgstr "CONFIG_PERF_EVENTS indisponible dans ce noyau" + +#: tapsets.cxx:7915 +msgid "CONFIG_HAVE_HW_BREAKPOINT not available on this kernel" +msgstr "CONFIG_HAVE_HW_BREAKPOINT indisponible dans ce noyau" + +#: tapsets.cxx:8022 +#, c-format +msgid "unable to find tracepoint variable '%s' (alternatives: %s)" +msgstr "" +"incapable de trouver la variable de tracepoint '%s' (alternatives : %s)" + +#: tapsets.cxx:8036 +#, c-format +msgid "write to tracepoint variable '%s' not permitted" +msgstr "modification de variable de tracepoint '%s' pas permis" + +#: tapsets.cxx:8045 +msgid "cannot take address of tracepoint variable" +msgstr "incapable de prendre l'adresse d'une variable de tracepoint" + +#: tapsets.cxx:8169 +#, c-format +msgid "write to tracepoint '%s' not permitted" +msgstr "modification du tracepoint '%s' pas permis" + +#: tapsets.cxx:8375 +#, c-format +msgid "cannot get type of parameter '%s' of tracepoint '%s'" +msgstr "incapable d'obtenir le type du paramètre '%s' du tracepoint '%s'" + +#: tapsets.cxx:8381 +#, c-format +msgid "found parameter for tracepoint '%s': type:'%s' name:'%s'" +msgstr "paramètre trouvé pour le tracepoint '%s' : type '%s', nom '%s'" + +#: tapsets.cxx:8712 +msgid "tracepoint_builder releasing dwflpp" +msgstr "tracepoint_builder libère dwflpp" + +#: tapsets.cxx:8732 +#, c-format +msgid "Pass 2: getting a tracepoint query for %zu headers: " +msgstr "" + +#: tapsets.cxx:8748 +#, c-format +msgid "Pass 2: using cached %s" +msgstr "Passe 2 : utilisation du cache %s" + +#: tapsets.cxx:8814 +#, c-format +msgid "Located kernel source tree (DW_AT_comp_dir) at '%s'" +msgstr "Trouvé arbre des sources du noyau (DW_AT_comp_dir) dans '%s'" + +# XXX: glob() again +#: tapsets.cxx:8846 +msgid "Checking tracepoint glob " +msgstr "" + +#. TRANSLATORS: 'timer' is the name of a probe point +#: tapset-timers.cxx:64 +msgid "invalid interval for jiffies timer" +msgstr "intervalle invalide pour un timer de jiffies" + +#. TRANSLATORS: 'randomize' is a key word +#: tapset-timers.cxx:68 +msgid "invalid randomize for jiffies timer" +msgstr "randomize invalide pour un timer de jiffies" + +#: tapset-timers.cxx:71 +msgid "only expect one probe point" +msgstr "un seul probe point est attendu" + +#: tapset-timers.cxx:199 +#, c-format +msgid "interval value out of range (%s, %s)" +msgstr "valeur d'intervalle hors limite (%s, %s)" + +#: tapset-timers.cxx:205 +msgid "randomization value out of range" +msgstr "valeur de randomize hors limite" + +#: tapset-timers.cxx:553 +msgid "frequency must be greater than 0" +msgstr "la fréquence doit être plus grande que 0" + +#: tapset-timers.cxx:583 +msgid "unrecognized timer variant" +msgstr "variante de timer non reconnue" + +#: tapset-utrace.cxx:471 +msgid "only \"process(PATH_OR_PID).syscall\" support $argN or $$parms." +msgstr "seul \"process(CHEMIN_OU_PID).syscall\" supporte $argN ou $$parms." + +#: tapset-utrace.cxx:517 tapset-utrace.cxx:524 +msgid "invalid syscall argument number (1-6)" +msgstr "nombre d'arguments de syscall invalide (1-6)" + +#: tapset-utrace.cxx:528 +msgid "utrace '$argN' variable is read-only" +msgstr "la variable utrace '$argN' est en lecture seule" + +#: tapset-utrace.cxx:557 +#, c-format +msgid "utrace '%s' variable is read-only" +msgstr "la variable utrace '%s' est en lecture seule" + +#: tapset-utrace.cxx:563 +msgid "only \"process(PATH_OR_PID).syscall.return\" support $return." +msgstr "seul \"process(CHEMIN_OU_PID).syscall.return\" supporte $return." + +#: tapset-utrace.cxx:588 +msgid "unknown target variable" +msgstr "variable cible inconnue" + +#: tapset-utrace.cxx:612 +msgid "" +"only \"process(PATH_OR_PID).syscall\" and \"process(PATH_OR_PID).syscall." +"return\" probes support target symbols" +msgstr "" +"seuls \"process(CHEMIN_OU_PID).syscall\" et \"process(CHEMIN_OU_PID).syscall." +"return\" supportent les symboles cible" + +#: tapset-utrace.cxx:617 +msgid "cannot take address of utrace variable" +msgstr "ne peut prendre l'adresse d'une variable utrace" + +#: tapset-utrace.cxx:624 +msgid "" +"invalid target symbol for utrace probe, $syscall, $return, $argN or $$parms " +"expected" +msgstr "" +"symbole cible invalide pour probe utrace, $syscall, $return, $argN ou $" +"$parms attendu" + +#: tapset-utrace.cxx:690 +msgid "process pid must be greater than 1" +msgstr "le pid du processus doit être plus grand que 1" + +#: translate.cxx:47 +msgid "\"Array overflow, check " +msgstr "" + +#: translate.cxx:48 +msgid "\"MAXNESTING exceeded\";" +msgstr "" + +#: translate.cxx:49 +msgid "\"division by 0\";" +msgstr "" + +#: translate.cxx:50 +msgid "\"MAXACTION exceeded\";" +msgstr "" + +#: translate.cxx:51 +msgid "\"aggregation overflow in " +msgstr "" + +#: translate.cxx:52 +msgid "\"empty aggregate\";" +msgstr "" + +#: translate.cxx:53 +#, fuzzy +msgid "\"histogram index out of range\";" +msgstr "taille de tableau hors limite" + +#: translate.cxx:433 +#, c-format +msgid "unsupported stats type for %s" +msgstr "" + +#: translate.cxx:441 +#, c-format +msgid "unsupported initializer for %s" +msgstr "initiateur non supportée pour %s" + +#: translate.cxx:455 +#, c-format +msgid "unsupported deallocator for %s" +msgstr "déallocateur non supporté pour %s" + +#: translate.cxx:585 +msgid "unknown type of map" +msgstr "type de tableau inconnu" + +#: translate.cxx:600 +msgid "index type mismatch" +msgstr "" + +#: translate.cxx:616 +msgid "aggregating non-parallel map type" +msgstr "" + +#: translate.cxx:624 +msgid "fetching aggregate of non-parallel map type" +msgstr "" + +#: translate.cxx:642 +msgid "checking existence of an unsupported map type" +msgstr "" + +#: translate.cxx:655 +msgid "getting a value from an unsupported map type" +msgstr "" + +#: translate.cxx:666 +msgid "adding a value of an unsupported map type" +msgstr "" + +#: translate.cxx:688 +msgid "setting a value of an unsupported map type" +msgstr "" + +#: translate.cxx:777 +msgid "iterating over unknown reference type" +msgstr "" + +#: translate.cxx:790 +msgid "inconsistent iterator type in itervar::start()" +msgstr "" + +#: translate.cxx:801 +msgid "inconsistent iterator type in itervar::next()" +msgstr "" + +#: translate.cxx:826 +msgid "illegal key type" +msgstr "" + +#: translate.cxx:833 +msgid "inconsistent iterator value in itervar::get_value()" +msgstr "" + +#: translate.cxx:845 +msgid "illegal value type" +msgstr "" + +#: translate.cxx:1602 translate.cxx:1757 +msgid "array locals not supported, missing global declaration?" +msgstr "" + +#: translate.cxx:1691 +#, c-format +msgid "%s elided, duplicates %s" +msgstr "" + +#: translate.cxx:1766 +msgid "unsupported local variable type" +msgstr "type de variable locale non supporté" + +#: translate.cxx:1862 +msgid "nothing" +msgstr "rien" + +#: translate.cxx:1910 translate.cxx:1940 +msgid "array type is neither string nor long" +msgstr "le type du tableau n'est ni une chaîne de caractères, ni un long" + +#: translate.cxx:1925 +msgid "array key is neither string nor long" +msgstr "" +"le type de la clé du tableau n'est ni une chaîne de caractères, ni un long" + +#: translate.cxx:2053 +msgid "unsupported c_expression token type" +msgstr "" + +#: translate.cxx:2084 +msgid "unknown lvalue type in assignment" +msgstr "" + +#: translate.cxx:2104 translate.cxx:2124 +msgid " type unsupported" +msgstr "" + +#: translate.cxx:2153 +msgid "post assignment on strings not supported" +msgstr "" + +#: translate.cxx:2167 +#, c-format +msgid "string assignment operator %s unsupported" +msgstr "" + +#: translate.cxx:2199 +msgid "unknown macop for assignment" +msgstr "" + +#: translate.cxx:2204 +msgid "invalid post-mode operator" +msgstr "" + +#: translate.cxx:2241 +msgid "assignment type not yet implemented" +msgstr "" + +#: translate.cxx:2328 +msgid "unresolved symbol" +msgstr "symbole non résolu" + +#: translate.cxx:2330 +msgid "unresolved symbol: " +msgstr "symbole non résolu : " + +#: translate.cxx:2369 +msgid "attempt to use scalar where map expected" +msgstr "" + +#: translate.cxx:2607 translate.cxx:3610 translate.cxx:3630 +msgid "expected numeric type" +msgstr "type numérique attendu" + +#: translate.cxx:2752 translate.cxx:4000 +msgid "Invalid indexing of histogram" +msgstr "" + +#: translate.cxx:3015 +msgid "cannot 'return' from probe" +msgstr "" + +#: translate.cxx:3018 +msgid "return type mismatch" +msgstr "" + +#: translate.cxx:3031 +msgid "cannot 'next' from function" +msgstr "" + +#: translate.cxx:3095 +msgid "Cannot delete unknown expression type" +msgstr "" + +#: translate.cxx:3122 translate.cxx:3145 +msgid "cannot delete histogram bucket entries\n" +msgstr "" + +#: translate.cxx:3171 +msgid "cannot 'break' outside loop" +msgstr "" + +#: translate.cxx:3182 +msgid "cannot 'continue' outside loop" +msgstr "" + +#: translate.cxx:3256 +msgid "expected numeric or string type" +msgstr "type numérique ou chaîne de caractère attendu" + +#: translate.cxx:3268 translate.cxx:3342 translate.cxx:3371 translate.cxx:3387 +#: translate.cxx:3490 +msgid "expected numeric types" +msgstr "type numérique attendu" + +#: translate.cxx:3333 +msgid "operator not yet implemented" +msgstr "" + +#: translate.cxx:3478 translate.cxx:3524 +msgid "expected string types" +msgstr "chaîne de caractère attendue" + +#: translate.cxx:3499 +msgid "unexpected type" +msgstr "type inattendu : " + +#: translate.cxx:3519 +msgid "unexpected concatenation operator" +msgstr "opérateur de concaténation inattendu" + +#: translate.cxx:3542 +msgid "expected numeric condition" +msgstr "condition numérique attendue" + +#: translate.cxx:3547 +msgid "expected matching types" +msgstr "" + +#: translate.cxx:3573 +msgid "non-number <<< expression" +msgstr "" + +#: translate.cxx:3576 +msgid "non-stats left operand to <<< expression" +msgstr "" + +#: translate.cxx:3579 +msgid "non-number right operand to <<< expression" +msgstr "" + +#: translate.cxx:3585 translate.cxx:3588 +msgid "type mismatch" +msgstr "" + +#: translate.cxx:3644 +msgid "invalid reference to array" +msgstr "référence invalide vers le tableau" + +#: translate.cxx:3739 +msgid "need rvalue for assignment" +msgstr "" + +#: translate.cxx:3750 +msgid "unexpected reference to array" +msgstr "" + +#: translate.cxx:3769 +msgid "cannot translate general target-symbol expression" +msgstr "" + +#: translate.cxx:3776 +msgid "cannot translate general @cast expression" +msgstr "" + +#: translate.cxx:3783 +msgid "cannot translate general @defined expression" +msgstr "" + +#: translate.cxx:3790 +msgid "cannot translate general @entry expression" +msgstr "" + +#: translate.cxx:3841 +msgid "invalid array reference" +msgstr "référence de tableau invalide" + +#: translate.cxx:3846 +msgid "array index type mismatch" +msgstr "" + +#: translate.cxx:3890 +msgid "expected arrayindex expression" +msgstr "" + +#: translate.cxx:3902 +msgid "unexpected aggregate of non-statistic" +msgstr "" + +#: translate.cxx:3918 +msgid "unexpected aggregate of non-arrayindex" +msgstr "" + +#: translate.cxx:4036 +msgid "statistic-valued array in rvalue context" +msgstr "" + +#: translate.cxx:4130 translate.cxx:4221 +msgid "cannot assign to histogram buckets" +msgstr "" + +#: translate.cxx:4150 +msgid "unexpected reference to scalar" +msgstr "" + +#: translate.cxx:4250 +msgid "invalid length argument list" +msgstr "longueur de liste d'arguments invalide" + +#: translate.cxx:4266 translate.cxx:4286 +msgid "function argument type mismatch" +msgstr "" + +#: translate.cxx:4277 +msgid "function actual argument evaluation" +msgstr "" + +#: translate.cxx:4337 +msgid "unknown type of arg to print operator" +msgstr "type inconnu pour un argument de l'opérateur \"print\"" + +#: translate.cxx:4403 +#, c-format +msgid "additional argument to print" +msgid_plural "too many arguments to print (%zu)" +msgstr[0] "" +msgstr[1] "" + +#: translate.cxx:4449 +msgid "cannot print unknown expression type" +msgstr "ne peut afficher une expressin de type inconnu" + +#: translate.cxx:4451 +msgid "cannot print a raw stats object" +msgstr "" + +#: translate.cxx:4948 +#, c-format +msgid "Getting symbol table for %s" +msgstr "Obtention de la table dess symboles pour %s" + +#: translate.cxx:4980 +msgid "unexpected build-id reloc section " +msgstr "" + +#: translate.cxx:4988 +#, c-format +msgid "Found build-id in %s, length %d, start at 0x%#" +msgstr "" + +#: translate.cxx:5037 +#, c-format +msgid "Found kernel _stext extra offset 0x%#" +msgstr "" + +#: translate.cxx:5210 +#, c-format +msgid "skipping module %s eh_frame_hdr table (too big: %s > %s)" +msgstr "" + +#: translate.cxx:5274 +#, c-format +msgid "skipping module %s, section %s debug_frame_hdr table (too big: %s > %s)" +msgstr "" + +#: translate.cxx:5537 +msgid "Searching for vdso candidates: " +msgstr "" + +#: translate.cxx:5547 +msgid "vdso candidate: " +msgstr "" + +#: translate.cxx:5667 +msgid "missing unwind/symbol data for module '" +msgstr "" + +#: translate.cxx:5690 +#, c-format +msgid "identified max-nested function: %s (%d)" +msgstr "" + +#: translate.cxx:5701 +#, c-format +msgid "identified recursive function: %s" +msgstr "" + +#: translate.cxx:5716 +#, c-format +msgid "" +"myproc-unprivileged tapset function called without is_myproc checking for " +"pid %d (euid %d)" +msgstr "" + +#: translate.cxx:5720 +#, c-format +msgid "kernel read fault at 0x%p (%s)" +msgstr "" + +#: translate.cxx:5722 +#, c-format +msgid "kernel write fault at 0x%p (%s)" +msgstr "" + +#: translate.cxx:5724 +#, c-format +msgid "divide by zero in DWARF operand (%s)" +msgstr "" + +#: translate.cxx:5768 +#, c-format +msgid "ignoring extra parts of compat version: %s" +msgstr "" + +#: translate.cxx:5772 +#, c-format +msgid "parse error in compatibility version: %s" +msgstr "" + +#: translate.cxx:5775 +#, c-format +msgid "compatibility version out of range: %s" +msgstr "" + +#: translate.cxx:5795 +msgid " recursive" +msgstr "" + +#: translate.cxx:5795 +msgid " non-recursive" +msgstr "" + +#: translate.cxx:5794 +#, c-format +msgid "function recursion-analysis: max-nesting %d %s" +msgstr "" + +#: util.cxx:59 +msgid "Unable to determine home directory" +msgstr "Incapable de déterminer le répertoire d'accueil de l'utilisateur" + +#: util.cxx:113 +#, c-format +msgid "Copying %s to %s" +msgstr "Copie de %s vers %s" + +#: util.cxx:167 +#, c-format +msgid "Copy failed (\"%s\" to \"%s\"): %s" +msgstr "La copie a échoué (\"%s\" vers \"%s\") : %s" + +#: util.cxx:250 +msgid "Unable to retrieve group list" +msgstr "Incapable de récupérer la liste des groupes" + +#: util.cxx:277 +#, c-format +msgid "using %ldvirt/%ldres/%ldshr kb, " +msgstr "" + +#: util.cxx:400 +msgid "cmdstr_join called with an empty command!" +msgstr "cmdstr_join appelé avec une commande vide !" + +#: util.cxx:450 +#, fuzzy, c-format +msgid "Spawn waitpid call on unmanaged pid %d" +msgstr "Appel de waitpid sur un pid non géré " + +#: util.cxx:457 +#, c-format +msgid "Spawn waitpid result (0x%x): %d" +msgstr "Résultat de waitpid (0x%x) : %d" + +#: util.cxx:462 +#, c-format +msgid "Spawn waitpid error (%d): %s" +msgstr "Erreur de waitpid (%d) : %s" + +#: util.cxx:503 +#, c-format +msgid "Warning: %s is not executable (%s)" +msgstr "" + +#: util.cxx:509 +msgid "Running" +msgstr "Exécution de" + +#: util.cxx:543 +#, c-format +msgid "Spawn error (%d): %s" +msgstr "Erreur de création de processus (%d) : %s" + +#: util.cxx:700 +#, c-format +msgid "regcomp %s (%s) error rc= %d" +msgstr "erreur de regcomp %s (%s) rc= %d" + +#: util.cxx:712 +#, c-format +msgid "ERROR: Safety pattern mismatch for %s ('%s' vs. '%s') rc=%d" +msgstr "ERREUR : disparité du motif de sûreté pour %s ('%s' vs. '%s') rc=%d" + +#: util.cxx:730 +#, c-format +msgid "regcomp %s error rc=%d" +msgstr "erreur de regcomp %s rc=%d" + +#. TRANSLATORS: Missing a file +#: util.cxx:806 +#, c-format +msgid "Missing %s" +msgstr "Fichier %s manquant" + +#: util.cxx:825 +#, c-format +msgid "autosprintf/vasprintf error %s" +msgstr "erreur de autosprintf/vasprintf %s" + +#: util.h:74 util.h:85 util.h:96 util.h:104 util.h:115 util.h:128 +msgid "bad lexical cast" +msgstr "" + +#, fuzzy +#~ msgid "WARNING:" +#~ msgstr "ATTENTION : " + +#~ msgid "Unable to obtain information on " +#~ msgstr "Impossible d'obtenir des informations sur " + +#~ msgid "" +#~ "Pass 4, preamble: verifying that SystemTap's version of uprobes is up to " +#~ "date." +#~ msgstr "" +#~ "Passe 4, préambule: vérification que SystemTap utilise une version " +#~ "d'uprobes à jour." + +#~ msgid "SystemTap's version of uprobes is out of date." +#~ msgstr "SystemTap utilise une version d'uprobes trop ancienne." + +#~ msgid "The owner of " +#~ msgstr "Le propriétaire de " + +#~ msgid "The owner group of " +#~ msgstr "Le groupe propriétaire de " + +#~ msgid "As root, %s%s or a member of the '%s' group, run\n" +#~ msgstr "" +#~ "Lancez la commande suivante en tant que root, %s%s ou un membre du groupe " +#~ "'%s'\n" + +#, fuzzy +#~ msgid "Error in stap stderr open: %s" +#~ msgstr "Erreur dans l'expression : " + +#, fuzzy +#~ msgid "Error in stap tmpdir move" +#~ msgstr "Erreur dans l'expression : " + +#, fuzzy +#~ msgid "Could not create a thread for the avahi client" +#~ msgstr "Ne peut compléter la signature du fichier module " + +#, fuzzy +#~ msgid "Unable to query client certificate database: " +#~ msgstr "" +#~ "Incapable de déterminer le chemin vers la base de données de certificats." + +#~ msgid "Unable to initialize nss library." +#~ msgstr "Incapable d'initialiser la bibliothèque nss." + +#~ msgid "Running '%s'" +#~ msgstr "Exécution de '%s'" + +#~ msgid "remove returned 0" +#~ msgstr "remove a retourné 0" + +#~ msgid "Usage: stap [options] FILE Run script in file." +#~ msgstr "" +#~ "Usage : stap [options] FICHIER Exécuter le script depuis le fichier." + +#~ msgid " or: stap [options] - Run script on stdin." +#~ msgstr "" +#~ " ou : stap [options] - Exécuter le script depuis l'entrée " +#~ "standard." + +#~ msgid " or: stap [options] -e SCRIPT Run given script." +#~ msgstr " ou : stap [options] -e SCRIPT Exécuter le script donné." + +#~ msgid " or: stap [options] -l PROBE List matching probes." +#~ msgstr "" +#~ " ou : stap [options] -l PROBE Lister les probes correspondants." + +#~ msgid "" +#~ " or: stap [options] -L PROBE List matching probes and local " +#~ "variables." +#~ msgstr "" +#~ " ou : stap [options] -L PROBE Lister les probes correspondants et " +#~ "leurs variables locales" + +#~ msgid "Options:" +#~ msgstr "Options :" + +#~ msgid " -- end of translator options, script options follow" +#~ msgstr "" +#~ " -- fin des options de traducteur, les options de script suivent" + +#~ msgid " -h --help show help" +#~ msgstr " -h --help afficher l'aide" + +#~ msgid " -V --version show version" +#~ msgstr " -V --version afficher la version" + +#~ msgid " -p NUM stop after pass NUM 1-5, instead of " +#~ msgstr " -p NUM arréter après la passe NUM 1-5, au lieu de " + +#~ msgid " (parse, elaborate, translate, compile, run)" +#~ msgstr " (analyser, élaborer, traduire, compiler, exécuter)" + +#~ msgid " -v add verbosity to all passes" +#~ msgstr " -v ajouter de la verbosité à toutes les passes" + +#~ msgid " --vp {N}+ add per-pass verbosity [" +#~ msgstr " --vp {N}+ ajouter de la verbosité par passe [" + +#~ msgid " -k keep temporary directory" +#~ msgstr " -k conserver le répertoire temporaire" + +#~ msgid " -u unoptimized translation %s" +#~ msgstr " -u traduction non optimisée %s" + +#~ msgid " -w suppress warnings %s" +#~ msgstr " -w suppression des avertissements %s" + +#~ msgid " -W turn warnings into errors %s" +#~ msgstr " -W transformation des avertissements en erreurs %s" + +#~ msgid " -g guru mode %s" +#~ msgstr " -g mode guru %s" + +#~ msgid " -P prologue-searching for function probes %s" +#~ msgstr " -P recherche de prologue pour les probes de fonctions %s" + +#~ msgid " -b bulk (percpu file) mode %s" +#~ msgstr " -b mode groupé (fichier par CPU) %s" + +#~ msgid " -s NUM buffer size in megabytes, instead of %d" +#~ msgstr " -s NUM taille de tampon en mégaoctets, au lieu de %d" + +#~ msgid " -I DIR look in DIR for additional .stp script files" +#~ msgstr " -I DIR chercher les scripts .stp supplémentaires dans DIR" + +#~ msgid " -D NM=VAL emit macro definition into generated C code" +#~ msgstr " -D NM=VAL émettre une définition de macro dans le code C généré" + +#~ msgid " -B NM=VAL pass option to kbuild make" +#~ msgstr " -B NM=VAL passer l'option au make de kbuild" + +#~ msgid " -G VAR=VAL set global variable to value" +#~ msgstr " -G VAR=VAL assigner la valeur à la variable globale" + +#~ msgid " -R DIR look in DIR for runtime, instead of" +#~ msgstr "" +#~ " -R DIR chercher l'environnement d'exécution dans DIR au lieu de" + +#~ msgid " -r DIR cross-compile to kernel with given build tree; or else" +#~ msgstr "" +#~ " -r DIR compilation croisée pour le noyau dans le répertoire " +#~ "donné ; ou bien" + +#~ msgid "" +#~ " -r RELEASE cross-compile to kernel /lib/modules/RELEASE/build, instead " +#~ "of" +#~ msgstr "" +#~ " -r RELEASE compilation croisée pour le noyau /lib/module/RELEASE/build " +#~ "au lieu de" + +#~ msgid " -a ARCH cross-compile to given architecture, instead of %s" +#~ msgstr "" +#~ " -a ARCH compilation croisée pour l'architecture donnée au lieu de %s" + +#~ msgid " -m MODULE set probe module name, instead of " +#~ msgstr " -m MODULE définir le nom du module au lieu de " + +#~ msgid "" +#~ " -o FILE send script output to file, instead of stdout. This " +#~ "supports\n" +#~ " strftime(3) formats for FILE" +#~ msgstr "" +#~ " -o FILE envoyer la sortie du script vers le fichier au lieu de\n" +#~ " la sortie standard. Le fortmat strftime(3) est supporté\n" +#~ " pour FILE." + +#~ msgid " -c CMD start the probes, run CMD, and exit when it finishes" +#~ msgstr "" +#~ " -c CMD lancer l'instrumentation, lancer CMD et quitter quandla " +#~ "commande se termine" + +#~ msgid " -x PID sets target() to PID" +#~ msgstr " -x PID fixer target() à PID" + +#~ msgid " -F run as on-file flight recorder with -o." +#~ msgstr "" +#~ " -F exécuter en enregistrement continu dans un fichier avec -o." + +#~ msgid " run as on-memory flight recorder without -o." +#~ msgstr "" +#~ " exécuter en enregistrement continue en mémoire sans -o." + +#~ msgid " -S size[,n] set maximum of the size and the number of files." +#~ msgstr "" +#~ " -S size[,n] définir le maximum de la taille et du nombre de fichiers." + +#~ msgid " -d OBJECT add unwind/symbol data for OBJECT file" +#~ msgstr "" +#~ " -d OBJECT ajouter les données de symboles pour le fichier OBJECT" + +#~ msgid "" +#~ " --ldd add unwind/symbol data for all referenced object files." +#~ msgstr "" +#~ " --ldd ajouter les données de symboles pour toues les fichiers\n" +#~ " objets référencés." + +#~ msgid " add unwind/symbol data for all loaded kernel objects." +#~ msgstr "" +#~ " ajouter les données de symboles pour tous les objets " +#~ "chargés dans le noyau." + +# XXX: chronométrage ? minutage ? +#, fuzzy +#~ msgid " -t collect probe timing information" +#~ msgstr " -t récolter les informations de de timing de probes" + +#~ msgid " -q generate information on tapset coverage" +#~ msgstr " -q générer les informations de couverture de tapset" + +#~ msgid "" +#~ " restrict usage to features available to unprivileged users" +#~ msgstr "" +#~ " restreindre l'utilisation aux fonctionnalités disponibles " +#~ "aux utilisateurs non privilégiés" + +#~ msgid "" +#~ " suppress incompatible language/tapset changes beyond " +#~ "VERSION," +#~ msgstr "" +#~ " désactiver les changements incompatibles dans le langage et " +#~ "tapsets au delà de VERSION" + +#~ msgid " instead of %s" +#~ msgstr " au lieu de %s" + +#~ msgid " displays warnings where a syntax element may be " +#~ msgstr " afficher un avertissement quand un élément" + +#~ msgid " version dependent" +#~ msgstr " peut dépendre de la version" + +#~ msgid " substitute zero for bad context $variables" +#~ msgstr " remplacer les $variables de context invalides par 0" + +#~ msgid " specify systemtap compile-servers" +#~ msgstr " spécifier le serveur de compilation systemtap" + +#~ msgid " report on the status of the specified compile-servers" +#~ msgstr "" +#~ " rapporter le status du serveur de compilation spécifié" + +#~ msgid " add/revoke trust of specified compile-servers" +#~ msgstr "" +#~ " ajouter/révoquer une relation de confiance avec les " +#~ "serveurs de compilation spécifiés" + +#~ msgid "" +#~ " retry compilation using a compile server upon compilation " +#~ "error" +#~ msgstr "" +#~ " réessayer la compilation avec un serveur de compilation " +#~ "lors d'une erreur" + +#, fuzzy +#~ msgid " run pass 5 on the specified ssh host." +#~ msgstr "" +#~ " exécuter la passe 5 sur l'hôte ssh spécifié (EXPÉRIMENTAL)" + +#~ msgid " --all-modules" +#~ msgstr " --all-modules" + +#~ msgid " --unprivileged" +#~ msgstr " --unprivileged" + +#~ msgid " --compatible=VERSION" +#~ msgstr " --compatible=VERSION" + +#~ msgid " --check-version" +#~ msgstr " --check-version" + +#~ msgid "]" +#~ msgstr "]" + +#~ msgid "SystemTap translator/driver " +#~ msgstr "SystemTap translator/driver " + +#~ msgid "(version " +#~ msgstr "(version " + +#~ msgid "Copyright (C) 2005-2011 Red Hat, Inc. and others" +#~ msgstr "Copyright (C) 2005-2011 Red Hat, Inc. and others" + +#~ msgid "This is free software; see the source for copying conditions." +#~ msgstr "This is free software; see the source for copying conditions." + +#~ msgid "extra fields after =" +#~ msgstr "extra fields after =" + +#~ msgid "empty struct %s" +#~ msgstr "empty struct %s" + +#~ msgid "%s %s: %s" +#~ msgstr "%s %s: %s" + +#~ msgid "field %s vs base type %s" +#~ msgstr "field %s vs base type %s" + +#~ msgid "store not supported for pointer type" +#~ msgstr "store not supported for pointer type" + +#~ msgid "fetch supported only for base type or pointer" +#~ msgstr "fetch supported only for base type or pointer" diff -Nru systemtap-1.4/po/.gitignore systemtap-1.6/po/.gitignore --- systemtap-1.4/po/.gitignore 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/po/.gitignore 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,3 @@ +Makefile.in +POTFILES +stamp-po diff -Nru systemtap-1.4/po/insert-header.sin systemtap-1.6/po/insert-header.sin --- systemtap-1.4/po/insert-header.sin 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/po/insert-header.sin 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,23 @@ +# Sed script that inserts the file called HEADER before the header entry. +# +# At each occurrence of a line starting with "msgid ", we execute the following +# commands. At the first occurrence, insert the file. At the following +# occurrences, do nothing. The distinction between the first and the following +# occurrences is achieved by looking at the hold space. +/^msgid /{ +x +# Test if the hold space is empty. +s/m/m/ +ta +# Yes it was empty. First occurrence. Read the file. +r HEADER +# Output the file's contents by reading the next line. But don't lose the +# current line while doing this. +g +N +bb +:a +# The hold space was nonempty. Following occurrences. Do nothing. +x +:b +} diff -Nru systemtap-1.4/po/LINGUAS systemtap-1.6/po/LINGUAS --- systemtap-1.4/po/LINGUAS 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/po/LINGUAS 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,3 @@ +en +pl +fr diff -Nru systemtap-1.4/po/Makefile.in.in systemtap-1.6/po/Makefile.in.in --- systemtap-1.4/po/Makefile.in.in 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/po/Makefile.in.in 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,445 @@ +# Makefile for PO directory in any package using GNU gettext. +# Copyright (C) 1995-1997, 2000-2007, 2009-2010 by Ulrich Drepper +# +# This file can be copied and used freely without restrictions. It can +# be used in projects which are not available under the GNU General Public +# License but which still want to provide support for the GNU gettext +# functionality. +# Please note that the actual code of GNU gettext is covered by the GNU +# General Public License and is *not* in the public domain. +# +# Origin: gettext-0.18 +GETTEXT_MACRO_VERSION = 0.18 + +PACKAGE = @PACKAGE@ +VERSION = @VERSION@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ + +SHELL = /bin/sh +@SET_MAKE@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ + +prefix = @prefix@ +exec_prefix = @exec_prefix@ +datarootdir = @datarootdir@ +datadir = @datadir@ +localedir = @localedir@ +gettextsrcdir = $(datadir)/gettext/po + +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ + +# We use $(mkdir_p). +# In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as +# "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions, +# @install_sh@ does not start with $(SHELL), so we add it. +# In automake >= 1.10, @mkdir_p@ is derived from ${MKDIR_P}, which is defined +# either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake +# versions, $(mkinstalldirs) and $(install_sh) are unused. +mkinstalldirs = $(SHELL) @install_sh@ -d +install_sh = $(SHELL) @install_sh@ +MKDIR_P = @MKDIR_P@ +mkdir_p = @mkdir_p@ + +GMSGFMT_ = @GMSGFMT@ +GMSGFMT_no = @GMSGFMT@ +GMSGFMT_yes = @GMSGFMT_015@ +GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT)) +MSGFMT_ = @MSGFMT@ +MSGFMT_no = @MSGFMT@ +MSGFMT_yes = @MSGFMT_015@ +MSGFMT = $(MSGFMT_$(USE_MSGCTXT)) +XGETTEXT_ = @XGETTEXT@ +XGETTEXT_no = @XGETTEXT@ +XGETTEXT_yes = @XGETTEXT_015@ +XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT)) +MSGMERGE = msgmerge +MSGMERGE_UPDATE = @MSGMERGE@ --update +MSGINIT = msginit +MSGCONV = msgconv +MSGFILTER = msgfilter + +POFILES = @POFILES@ +GMOFILES = @GMOFILES@ +UPDATEPOFILES = @UPDATEPOFILES@ +DUMMYPOFILES = @DUMMYPOFILES@ +DISTFILES.common = Makefile.in.in remove-potcdate.sin \ +$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3) +DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \ +$(POFILES) $(GMOFILES) \ +$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3) + +POTFILES = \ + +CATALOGS = @CATALOGS@ + +# Makevars gets inserted here. (Don't remove this line!) + +.SUFFIXES: +.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update + +.po.mo: + @echo "$(MSGFMT) -c -o $@ $<"; \ + $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@ + +.po.gmo: + @lang=`echo $* | sed -e 's,.*/,,'`; \ + test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ + echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.po"; \ + cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo + +.sin.sed: + sed -e '/^#/d' $< > t-$@ + mv t-$@ $@ + + +@MAINTAINER_MODE_TRUE@all: check-macro-version all-@USE_NLS@ +@MAINTAINER_MODE_FALSE@all: check-macro-version all-no + +all-yes: stamp-po +all-no: + +# Ensure that the gettext macros and this Makefile.in.in are in sync. +check-macro-version: + @test "$(GETTEXT_MACRO_VERSION)" = "@GETTEXT_MACRO_VERSION@" \ + || { echo "*** error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version $(GETTEXT_MACRO_VERSION) but the autoconf macros are from gettext version @GETTEXT_MACRO_VERSION@" 1>&2; \ + exit 1; \ + } + +# $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no +# internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because +# we don't want to bother translators with empty POT files). We assume that +# LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty. +# In this case, stamp-po is a nop (i.e. a phony target). + +# stamp-po is a timestamp denoting the last time at which the CATALOGS have +# been loosely updated. Its purpose is that when a developer or translator +# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS, +# "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent +# invocations of "make" will do nothing. This timestamp would not be necessary +# if updating the $(CATALOGS) would always touch them; however, the rule for +# $(POFILES) has been designed to not touch files that don't need to be +# changed. +stamp-po: $(srcdir)/$(DOMAIN).pot + test ! -f $(srcdir)/$(DOMAIN).pot || \ + test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES) + @test ! -f $(srcdir)/$(DOMAIN).pot || { \ + echo "touch stamp-po" && \ + echo timestamp > stamp-poT && \ + mv stamp-poT stamp-po; \ + } + +# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update', +# otherwise packages like GCC can not be built if only parts of the source +# have been downloaded. + +# This target rebuilds $(DOMAIN).pot; it is an expensive operation. +# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed. +$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed + if LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null | grep -v 'libtool:' >/dev/null; then \ + package_gnu='GNU '; \ + else \ + package_gnu=''; \ + fi; \ + if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \ + msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \ + else \ + msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \ + fi; \ + case `$(XGETTEXT) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \ + $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ + --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ + --files-from=$(srcdir)/POTFILES.in \ + --copyright-holder='$(COPYRIGHT_HOLDER)' \ + --msgid-bugs-address="$$msgid_bugs_address" \ + ;; \ + *) \ + $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ + --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ + --files-from=$(srcdir)/POTFILES.in \ + --copyright-holder='$(COPYRIGHT_HOLDER)' \ + --package-name="$${package_gnu}@PACKAGE@" \ + --package-version='@VERSION@' \ + --msgid-bugs-address="$$msgid_bugs_address" \ + ;; \ + esac + test ! -f $(DOMAIN).po || { \ + if test -f $(srcdir)/$(DOMAIN).pot; then \ + sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \ + sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \ + if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \ + rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \ + else \ + rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \ + mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ + fi; \ + else \ + mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ + fi; \ + } + +# This rule has no dependencies: we don't need to update $(DOMAIN).pot at +# every "make" invocation, only create it when it is missing. +# Only "make $(DOMAIN).pot-update" or "make dist" will force an update. +$(srcdir)/$(DOMAIN).pot: + $(MAKE) $(DOMAIN).pot-update + +# This target rebuilds a PO file if $(DOMAIN).pot has changed. +# Note that a PO file is not touched if it doesn't need to be changed. +$(POFILES): $(srcdir)/$(DOMAIN).pot + @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ + if test -f "$(srcdir)/$${lang}.po"; then \ + test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ + echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \ + cd $(srcdir) \ + && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ + $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) $${lang}.po $(DOMAIN).pot;; \ + *) \ + $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \ + esac; \ + }; \ + else \ + $(MAKE) $${lang}.po-create; \ + fi + + +install: install-exec install-data +install-exec: +install-data: install-data-@USE_NLS@ + if test "$(PACKAGE)" = "gettext-tools"; then \ + $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \ + for file in $(DISTFILES.common) Makevars.template; do \ + $(INSTALL_DATA) $(srcdir)/$$file \ + $(DESTDIR)$(gettextsrcdir)/$$file; \ + done; \ + for file in Makevars; do \ + rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ + done; \ + else \ + : ; \ + fi +install-data-no: all +install-data-yes: all + @catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ + dir=$(localedir)/$$lang/LC_MESSAGES; \ + $(mkdir_p) $(DESTDIR)$$dir; \ + if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \ + $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \ + echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \ + for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ + if test -n "$$lc"; then \ + if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ + link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ + mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ + mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ + (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ + for file in *; do \ + if test -f $$file; then \ + ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ + fi; \ + done); \ + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ + else \ + if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ + :; \ + else \ + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ + mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ + fi; \ + fi; \ + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ + ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ + ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ + cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ + echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \ + fi; \ + done; \ + done + +install-strip: install + +installdirs: installdirs-exec installdirs-data +installdirs-exec: +installdirs-data: installdirs-data-@USE_NLS@ + if test "$(PACKAGE)" = "gettext-tools"; then \ + $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \ + else \ + : ; \ + fi +installdirs-data-no: +installdirs-data-yes: + @catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ + dir=$(localedir)/$$lang/LC_MESSAGES; \ + $(mkdir_p) $(DESTDIR)$$dir; \ + for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ + if test -n "$$lc"; then \ + if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ + link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ + mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ + mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ + (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ + for file in *; do \ + if test -f $$file; then \ + ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ + fi; \ + done); \ + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ + else \ + if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ + :; \ + else \ + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ + mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ + fi; \ + fi; \ + fi; \ + done; \ + done + +# Define this as empty until I found a useful application. +installcheck: + +uninstall: uninstall-exec uninstall-data +uninstall-exec: +uninstall-data: uninstall-data-@USE_NLS@ + if test "$(PACKAGE)" = "gettext-tools"; then \ + for file in $(DISTFILES.common) Makevars.template; do \ + rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ + done; \ + else \ + : ; \ + fi +uninstall-data-no: +uninstall-data-yes: + catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ + for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \ + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ + done; \ + done + +check: all + +info dvi ps pdf html tags TAGS ctags CTAGS ID: + +mostlyclean: + rm -f remove-potcdate.sed + rm -f stamp-poT + rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po + rm -fr *.o + +clean: mostlyclean + +distclean: clean + rm -f Makefile Makefile.in POTFILES *.mo + +maintainer-clean: distclean + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + rm -f stamp-po $(GMOFILES) + +distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) +dist distdir: + $(MAKE) update-po + @$(MAKE) dist2 +# This is a separate target because 'update-po' must be executed before. +dist2: stamp-po $(DISTFILES) + dists="$(DISTFILES)"; \ + if test "$(PACKAGE)" = "gettext-tools"; then \ + dists="$$dists Makevars.template"; \ + fi; \ + if test -f $(srcdir)/$(DOMAIN).pot; then \ + dists="$$dists $(DOMAIN).pot stamp-po"; \ + fi; \ + if test -f $(srcdir)/ChangeLog; then \ + dists="$$dists ChangeLog"; \ + fi; \ + for i in 0 1 2 3 4 5 6 7 8 9; do \ + if test -f $(srcdir)/ChangeLog.$$i; then \ + dists="$$dists ChangeLog.$$i"; \ + fi; \ + done; \ + if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \ + for file in $$dists; do \ + if test -f $$file; then \ + cp -p $$file $(distdir) || exit 1; \ + else \ + cp -p $(srcdir)/$$file $(distdir) || exit 1; \ + fi; \ + done + +update-po: Makefile + $(MAKE) $(DOMAIN).pot-update + test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES) + $(MAKE) update-gmo + +# General rule for creating PO files. + +.nop.po-create: + @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \ + echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \ + exit 1 + +# General rule for updating PO files. + +.nop.po-update: + @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \ + if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \ + tmpdir=`pwd`; \ + echo "$$lang:"; \ + test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ + echo "$${cdcmd}$(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ + cd $(srcdir); \ + if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ + $(MSGMERGE) $(MSGMERGE_OPTIONS) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + *) \ + $(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + esac; \ + }; then \ + if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ + rm -f $$tmpdir/$$lang.new.po; \ + else \ + if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ + :; \ + else \ + echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ + exit 1; \ + fi; \ + fi; \ + else \ + echo "msgmerge for $$lang.po failed!" 1>&2; \ + rm -f $$tmpdir/$$lang.new.po; \ + fi + +$(DUMMYPOFILES): + +update-gmo: Makefile $(GMOFILES) + @: + +# Recreate Makefile by invoking config.status. Explicitly invoke the shell, +# because execution permission bits may not work on the current file system. +# Use @SHELL@, which is the shell determined by autoconf for the use by its +# scripts, not $(SHELL) which is hardwired to /bin/sh and may be deficient. +Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@ + cd $(top_builddir) \ + && @SHELL@ ./config.status $(subdir)/$@.in po-directories + +force: + +# Tell versions [3.59,3.63) of GNU make not to export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru systemtap-1.4/po/Makevars systemtap-1.6/po/Makevars --- systemtap-1.4/po/Makevars 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/po/Makevars 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,41 @@ +# Makefile variables for PO directory in any package using GNU gettext. + +# Usually the message domain is the same as the package name. +DOMAIN = $(PACKAGE) + +# These two variables depend on the location of this directory. +subdir = po +top_builddir = .. + +# These options get passed to xgettext. +XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ --keyword=_F --keyword=_NF --keyword=_N + +# This is the copyright holder that gets inserted into the header of the +# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding +# package. (Note that the msgstr strings, extracted from the package's +# sources, belong to the copyright holder of the package.) Translators are +# expected to transfer the copyright for their translations to this person +# or entity, or to disclaim their copyright. The empty string stands for +# the public domain; in this case the translators are expected to disclaim +# their copyright. +COPYRIGHT_HOLDER = Red Hat Inc., and others + +# This is the email address or URL to which the translators shall report +# bugs in the untranslated strings: +# - Strings which are not entire sentences, see the maintainer guidelines +# in the GNU gettext documentation, section 'Preparing Strings'. +# - Strings which use unclear terms or require additional context to be +# understood. +# - Strings which make invalid assumptions about notation of date, time or +# money. +# - Pluralisation problems. +# - Incorrect English spelling. +# - Incorrect formatting. +# It can be your email address, or a mailing list address where translators +# can write to without being subscribed, or the URL of a web page through +# which the translators can contact you. +MSGID_BUGS_ADDRESS = + +# This is the list of locale categories, beyond LC_MESSAGES, for which the +# message catalogs shall be used. It is usually empty. +EXTRA_LOCALE_CATEGORIES = Binary files /tmp/DYbL1hZvjo/systemtap-1.4/po/pl.gmo and /tmp/LDb_u7dVDK/systemtap-1.6/po/pl.gmo differ diff -Nru systemtap-1.4/po/pl.po systemtap-1.6/po/pl.po --- systemtap-1.4/po/pl.po 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/po/pl.po 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,4793 @@ +# Polish translations for systemtap package. +# This file is distributed under the same license as the systemtap package. +# Przemyslaw Pawelczyk , 2011 +# +msgid "" +msgstr "" +"Project-Id-Version: systemtap 1.5\n" +"Report-Msgid-Bugs-To: systemtap@sourceware.org\n" +"POT-Creation-Date: 2011-07-21 08:00-0400\n" +"PO-Revision-Date: \n" +"Last-Translator: Przemysław Pawełczyk \n" +"Language-Team: Polish\n" +"Language: pl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " +"|| n%100>=20) ? 1 : 2);\n" +"X-Poedit-Language: Polish\n" +"X-Poedit-Country: POLAND\n" + +#: buildrun.cxx:296 +#, c-format +msgid "" +"Checking \" %s \" failed with error: %s\n" +"Ensure kernel development headers & makefiles are installed." +msgstr "" + +#: buildrun.cxx:325 +msgid "Pass 4, preamble: (re)building SystemTap's version of uprobes." +msgstr "" + +#: buildrun.cxx:333 +msgid "Warning: failed to create directory for build uprobes." +msgstr "" + +#: buildrun.cxx:362 +msgid "uprobes rebuild exit code: " +msgstr "" + +#: buildrun.cxx:421 +msgid "user-space facilities not available without kernel CONFIG_UTRACE" +msgstr "" + +#: buildrun.cxx:526 +msgid "Warning: failed to create directory for querying tracepoints." +msgstr "" + +#: buildrun.cxx:607 +msgid "Warning: failed to create directory for querying types." +msgstr "" + +#: buildrun.cxx:708 +#, c-format +msgid "Warning: skipping malformed @cast header \"%s\"" +msgstr "" + +#: cache.cxx:128 cache.cxx:217 +msgid "Pass 4: using cached " +msgstr "" + +#: cache.cxx:215 +msgid "Pass 3: using cached " +msgstr "" + +#: cache.cxx:249 +#, c-format +msgid "Cache limit file %s/%s missing, creating default." +msgstr "" + +#: cache.cxx:349 +msgid "Cache cleaning successful, removed entries: " +msgstr "" + +#: cache.cxx:356 +msgid "Cache cleaning skipped, no cache path." +msgstr "" + +#: coveragedb.cxx:28 +msgid "---- used probes-----" +msgstr "" + +#: coveragedb.cxx:35 coveragedb.cxx:58 +msgid "probe: " +msgstr "" + +#: coveragedb.cxx:42 +msgid "local: " +msgstr "" + +#: coveragedb.cxx:45 +msgid "unused_local: " +msgstr "" + +#: coveragedb.cxx:51 +msgid "---- unused probes----- " +msgstr "" + +#: coveragedb.cxx:64 +msgid "---- used functions----- " +msgstr "" + +#: coveragedb.cxx:72 +msgid "---- unused functions----- " +msgstr "" + +#: coveragedb.cxx:74 +msgid "unused_function: " +msgstr "" + +#: coveragedb.cxx:79 +msgid "---- used globals----- " +msgstr "" + +#: coveragedb.cxx:81 coveragedb.cxx:88 +msgid "globals: " +msgstr "" + +#: coveragedb.cxx:86 +msgid "---- unused globals----- " +msgstr "" + +#: coveragedb.cxx:110 coveragedb.cxx:133 coveragedb.cxx:151 +msgid "Error in statement: " +msgstr "" + +#: csclient.cxx:67 +#, c-format +msgid "" +"WARNING: The domain name, %s, does not match the DNS name(s) on the server " +"certificate:\n" +msgstr "" + +#: csclient.cxx:68 +#, c-format +msgid "could not find input file %s\n" +msgstr "" + +#: csclient.cxx:69 +#, c-format +msgid "could not open input file %s\n" +msgstr "" + +#: csclient.cxx:70 +#, c-format +msgid "Unable to open output file %s\n" +msgstr "" + +#: csclient.cxx:71 +#, c-format +msgid "could not write to %s\n" +msgstr "" + +#: csclient.cxx:353 +#, c-format +msgid "Unable to find alt name extension on the server certificate\n" +msgstr "" + +#: csclient.cxx:362 csclient.cxx:578 +#, c-format +msgid "Out of memory\n" +msgstr "" + +#: csclient.cxx:370 +#, c-format +msgid "Unable to decode alt name extension on server certificate\n" +msgstr "" + +#: csclient.cxx:704 +#, c-format +msgid "Unable to resolve server host name" +msgstr "" + +#: csclient.cxx:710 +#, c-format +msgid "Unable to resolve server host address" +msgstr "" + +#: csclient.cxx:756 +msgid "Using a compile server." +msgstr "" + +#: csclient.cxx:806 +msgid "Passes: via server " +msgstr "" + +#: csclient.cxx:813 +msgid "Passes: via server failed. Try again with another '-v' option." +msgstr "" + +#: csclient.cxx:864 +msgid "ERROR: cannot create temporary directory (\"" +msgstr "" + +#: csclient.cxx:892 +msgid "ERROR: cannot create temporary directory " +msgstr "" + +#: csclient.cxx:1166 +msgid "Unable to find a compile server." +msgstr "" + +#: csclient.cxx:1184 +msgid "A server's certificate was expired. Trying again" +msgstr "" + +#: csclient.cxx:1192 +msgid "Unable to connect to a server." +msgstr "" + +#: csclient.cxx:1239 csclient.cxx:1686 stap-serverd.cxx:1621 +msgid "Unable to set NSS export policy" +msgstr "" + +#: csclient.cxx:1253 +#, c-format +msgid "" +"Attempting SSL connection with %s\n" +" using certificates from the database in %s\n" +msgstr "" + +#: csclient.cxx:1292 +msgid " Unable to connect: " +msgstr "" + +#: csclient.cxx:1328 +#, c-format +msgid "Unable to unzip the server response '%s'\n" +msgstr "" + +#: csclient.cxx:1345 csclient.cxx:1363 csclient.cxx:1431 csclient.cxx:1738 +#, c-format +msgid "Searching \"%s\"\n" +msgstr "" + +#: csclient.cxx:1351 +msgid "Incorrect number of files in server response" +msgstr "" + +#: csclient.cxx:1359 csclient.cxx:1444 csclient.cxx:1746 +msgid " found " +msgstr "" + +#: csclient.cxx:1376 +#, c-format +msgid " found %s -- linking from %s" +msgstr "" + +#: csclient.cxx:1380 +#, c-format +msgid "Unable to link '%s' to '%s':%s\n" +msgstr "" + +#: csclient.cxx:1438 +msgid "Incorrect number of modules in server response" +msgstr "" + +#: csclient.cxx:1474 +msgid "No module was returned by the server." +msgstr "" + +#: csclient.cxx:1501 csclient.cxx:1570 cscommon.cxx:92 +#, c-format +msgid "Unable to open file '%s' for reading: " +msgstr "" + +#: csclient.cxx:1510 cscommon.cxx:101 +#, c-format +msgid "Unable to read from file '%s': " +msgstr "" + +#: csclient.cxx:1521 csclient.cxx:1556 csclient.cxx:1594 cscommon.cxx:114 +msgid "unknown error" +msgstr "" + +#: csclient.cxx:1536 +#, c-format +msgid "Unable to open file '%s' for writing: " +msgstr "" + +#: csclient.cxx:1545 +#, c-format +msgid "Unable to write to file '%s': " +msgstr "" + +#: csclient.cxx:1604 +#, c-format +msgid "Server protocol version is %s\n" +msgstr "" + +#: csclient.cxx:1605 +msgid "The server does not use localization information passed by the client\n" +msgstr "" + +#: csclient.cxx:1621 csclient.cxx:2285 +msgid "as a module signer for all users" +msgstr "" + +#: csclient.cxx:1624 csclient.cxx:2275 +msgid "as an SSL peer" +msgstr "" + +#: csclient.cxx:1626 csclient.cxx:2277 +msgid " for all users" +msgstr "" + +#: csclient.cxx:1628 csclient.cxx:2279 +msgid " for the current user" +msgstr "" + +#: csclient.cxx:1637 +msgid " is already " +msgstr "" + +#: csclient.cxx:1639 +msgid "untrusted " +msgstr "" + +#: csclient.cxx:1641 +msgid "trusted " +msgstr "" + +#: csclient.cxx:1661 +#, c-format +msgid "Unable to find or create the client certificate database directory %s: " +msgstr "" + +#: csclient.cxx:1723 +#, c-format +msgid "Unable to connect to %s" +msgstr "" + +#: csclient.cxx:1750 +#, c-format +msgid "Warning: Unable to change permissions on %s: " +msgstr "" + +#: csclient.cxx:1769 +#, c-format +msgid "Certificate database '%s' does not exist" +msgstr "" + +#: csclient.cxx:1805 csclient.cxx:1947 +msgid "Out of memory:" +msgstr "" + +#: csclient.cxx:1848 +#, c-format +msgid "Unable to query certificate database %s: " +msgstr "" + +#: csclient.cxx:1887 +#, c-format +msgid "Unable to remove certificate from %s: " +msgstr "" + +#: csclient.cxx:1917 +#, c-format +msgid "Certificate database '%s' does not exist." +msgstr "" + +#: csclient.cxx:1939 nsscommon.cxx:1148 +#, c-format +msgid "No certificate found in database %s" +msgstr "" + +#: csclient.cxx:1969 +msgid "Unable to find alt name extension on server certificate: " +msgstr "" + +#: csclient.cxx:1979 +msgid "Unable to decode alt name extension on server certificate: " +msgstr "" + +#: csclient.cxx:2125 +#, c-format +msgid "Warning: unsupported compile server property: %s" +msgstr "" + +#: csclient.cxx:2174 +#, c-format +msgid "Systemtap Compile Server Status for '%s'" +msgstr "" + +#: csclient.cxx:2189 +msgid "No servers found" +msgstr "" + +#: csclient.cxx:2226 +msgid "Only root can specify 'signer' on --trust-servers" +msgstr "" + +#: csclient.cxx:2238 +msgid "Only root can specify 'all-users' on --trust-servers" +msgstr "" + +#: csclient.cxx:2247 +msgid "Warning: Unrecognized server trust specification: " +msgstr "" + +#: csclient.cxx:2264 +msgid "No servers identified for trust" +msgstr "" + +#: csclient.cxx:2284 +msgid " and " +msgstr "" + +#: csclient.cxx:2292 +msgid "Revoking trust " +msgstr "" + +#: csclient.cxx:2294 +msgid "Adding trust " +msgstr "" + +#: csclient.cxx:2299 +msgid "Revoke trust " +msgstr "" + +#: csclient.cxx:2301 +msgid "Add trust " +msgstr "" + +#: csclient.cxx:2303 +#, c-format +msgid "in the following servers %s" +msgstr "" + +#: csclient.cxx:2318 +msgid "Server trust unchanged" +msgstr "" + +#: csclient.cxx:2496 csclient.cxx:2534 +#, c-format +msgid "Invalid port number specified: %s" +msgstr "" + +#: csclient.cxx:2515 +#, c-format +msgid "No server matching %s found" +msgstr "" + +#: csclient.cxx:2596 +msgid "Unable to determine server trust as an SSL peer" +msgstr "" + +#: csclient.cxx:2642 +msgid "Unable to determine server trust as a module signer" +msgstr "" + +#: csclient.cxx:2709 +msgid "Unable to detect server compatibility" +msgstr "" + +#: csclient.cxx:2893 +#, c-format +msgid "Failed to resolve service '%s' of type '%s' in domain '%s': %s" +msgstr "" + +#: csclient.cxx:2950 +#, c-format +msgid "Avahi browse failed: %s" +msgstr "" + +#: csclient.cxx:2963 +#, c-format +msgid "Failed to resolve service '%s': %s" +msgstr "" + +#: csclient.cxx:2984 +#, c-format +msgid "Avahi Server connection failure: %s" +msgstr "" + +#: csclient.cxx:3030 +msgid "Failed to create Avahi simple poll object" +msgstr "" + +#: csclient.cxx:3046 +#, c-format +msgid "Failed to create Avahi client: %s" +msgstr "" + +#: csclient.cxx:3058 +#, c-format +msgid "Failed to create Avahi service browser: %s" +msgstr "" + +#: csclient.cxx:3105 +msgid "Unable to detect online servers" +msgstr "" + +#: dtrace.in:165 +msgid "Usage " +msgstr "" + +#: dtrace.in:169 +msgid "Where -h builds a systemtap header file from the .d file" +msgstr "" + +#: dtrace.in:170 +msgid " -C when used with -h, also run cpp preprocessor" +msgstr "" + +#: dtrace.in:171 +msgid " -o specifies an explicit output file name," +msgstr "" + +#: dtrace.in:172 +msgid " the default for -G is file.o and -h is file.h" +msgstr "" + +#: dtrace.in:173 +msgid " -I when running cpp pass through this -I include Path" +msgstr "" + +#: dtrace.in:174 +msgid " -s specifies the name of the .d input file" +msgstr "" + +#: dtrace.in:175 +msgid " -G builds a stub file.o from file.d," +msgstr "" + +#: dtrace.in:176 +msgid " which is required by some packages that use dtrace." +msgstr "" + +#: dwarf_wrappers.cxx:25 +#, c-format +msgid "libdwfl failure (%s): " +msgstr "" + +#: dwarf_wrappers.cxx:37 +#, c-format +msgid "libdw failure (%s): " +msgstr "" + +#: dwflpp.cxx:127 +msgid "cannot find " +msgstr "" + +#: dwflpp.cxx:144 session.cxx:1488 +msgid "WARNING: " +msgstr "UWAGA: " + +#: dwflpp.cxx:235 +#, c-format +msgid "pattern '%s' matches module '%s'\n" +msgstr "" + +#: dwflpp.cxx:265 +#, c-format +msgid "pattern '%s' matches function '%s'\n" +msgstr "" + +#: dwflpp.cxx:321 dwflpp.cxx:347 +#, c-format +msgid "missing %s kernel/module debuginfo under '%s'" +msgstr "" + +#: dwflpp.cxx:364 +#, c-format +msgid "missing process %s %s debuginfo" +msgstr "" + +#: dwflpp.cxx:566 +#, c-format +msgid "die parent cache %s:%s size %zu" +msgstr "" + +#: dwflpp.cxx:782 +#, c-format +msgid "global alias cache %s:%s size %zu" +msgstr "" + +#: dwflpp.cxx:845 +#, c-format +msgid "function cache %s:%s size %zu" +msgstr "" + +#: dwflpp.cxx:858 +#, c-format +msgid "function cache %s:%s hit %s" +msgstr "" + +#: dwflpp.cxx:880 dwflpp.cxx:898 +#, c-format +msgid "function cache %s:%s match %s vs %s" +msgstr "" + +#: dwflpp.cxx:932 +#, c-format +msgid "module function cache %s size %zu" +msgstr "" + +#: dwflpp.cxx:946 +#, c-format +msgid "module function cache %s hit %s" +msgstr "" + +#: dwflpp.cxx:1096 +#, c-format +msgid "module %s --ldd skipped: unsupported interpreter: %s" +msgstr "" + +#: dwflpp.cxx:1113 +#, c-format +msgid "library iteration on %s failed: %s" +msgstr "" + +#: dwflpp.cxx:1142 +#, c-format +msgid "Added -d '%s" +msgstr "" + +#: dwflpp.cxx:1144 +#, c-format +msgid "' due to '%s'" +msgstr "" + +#: dwflpp.cxx:1157 +#, c-format +msgid "Warning: failed to read libraries from %s: %s" +msgstr "" + +#: dwflpp.cxx:1198 +#, c-format +msgid "alternative line %d rejected: nsrcs=%zu" +msgstr "" + +#: dwflpp.cxx:1215 +#, c-format +msgid "alternative line %d accepted: fn=%s" +msgstr "" + +#: dwflpp.cxx:1227 +#, c-format +msgid "alternative line %d accepted: ifn=%s" +msgstr "" + +#. TRANSLATORS: given line number leaves (is beyond) given function. +#: dwflpp.cxx:1234 +#, c-format +msgid "alternative line %d rejected: leaves selected fns" +msgstr "" + +#: dwflpp.cxx:1300 +msgid "Invalid line range (" +msgstr "" + +#: dwflpp.cxx:1302 +msgid ", the end line number " +msgstr "" + +#: dwflpp.cxx:1374 +#, c-format +msgid "multiple addresses for %s:%d" +msgstr "" + +#. TRANSLATORS: Here we are trying to advise what source file +#. TRANSLATORS: to attempt. +#: dwflpp.cxx:1379 +msgid " (try " +msgstr "" + +#: dwflpp.cxx:1383 +msgid " or " +msgstr "" + +#: dwflpp.cxx:1454 +#, c-format +msgid "" +"label '%s' at address %s (dieoffset: %s) is not contained by its scope " +"'%s' (dieoffset: %s) -- bad debuginfo?" +msgstr "" + +#: dwflpp.cxx:1508 +#, c-format +msgid "selected source file '%s'\n" +msgstr "" + +#: dwflpp.cxx:1578 +#, c-format +msgid "missing entrypc dwarf line record for function '%s'\n" +msgstr "" + +#: dwflpp.cxx:1588 +#, c-format +msgid "null entrypc dwarf line record for function '%s'\n" +msgstr "" + +#: dwflpp.cxx:1596 +#, c-format +msgid "" +"searching for prologue of function '%s' 0x%#-0x%#@%s:%d\n" +msgstr "" + +#: dwflpp.cxx:1621 +#, c-format +msgid "checking line record 0x%#@%s:%d\n" +msgstr "" + +#: dwflpp.cxx:1638 +#, c-format +msgid "prologue found function '%s'" +msgstr "" + +#. TRANSLATORS: Here we're adding some classification datum (ie Prologue Free) +#: dwflpp.cxx:1641 +msgid " (naked)" +msgstr "" + +#. TRANSLATORS: Here we're adding some classification datum (ie Prologue Free) +#: dwflpp.cxx:1643 +msgid " (tail-call?)" +msgstr "" + +#: dwflpp.cxx:1707 +#, c-format +msgid ", ignored %s more" +msgstr "" + +#: dwflpp.cxx:1716 +msgid " (skip comdat)" +msgstr "" + +#: dwflpp.cxx:1721 +#, c-format +msgid "entry-pc lookup (%s dieoffset: %s) = 0x%# (rc %d" +msgstr "" + +#: dwflpp.cxx:1837 +msgid "emit_address internal error, no dwfl" +msgstr "" + +#: dwflpp.cxx:1843 +#, c-format +msgid "" +"emit_address internal error, dwfl_addrmodule failed, address 0x%#" +msgstr "" + +#: dwflpp.cxx:1862 +#, c-format +msgid "" +"emit dwarf addr 0x%# => module %s section %s relocaddr 0x%#" +msgstr "" + +#: dwflpp.cxx:1967 +msgid " in " +msgstr "" + +#: dwflpp.cxx:1970 elaborate.cxx:580 +msgid " (alternatives:" +msgstr "" + +#: dwflpp.cxx:1966 +#, c-format +msgid "unable to find local '%s' near pc %s %s %s %s (%s)" +msgstr "" + +#: dwflpp.cxx:2001 +#, c-format +msgid "unable to get die scopes for '%s' in an inlined subroutine" +msgstr "" + +#: dwflpp.cxx:2052 +#, c-format +msgid "not accessible at this address (%s, dieoffset: %s)" +msgstr "" + +#: dwflpp.cxx:2058 +#, c-format +msgid "dwarf_getlocation_addr failed, %s" +msgstr "" + +#: dwflpp.cxx:2081 +#, c-format +msgid " Error: %s isn't a struct/class/union" +msgstr "" + +#: dwflpp.cxx:2091 +#, c-format +msgid "%s is empty" +msgstr "" + +#: dwflpp.cxx:2123 +#, c-format +msgid "" +"\n" +" Error in obtaining type attribute for anonymous member at %s:%d" +msgstr "" + +#: dwflpp.cxx:2197 +#, c-format +msgid "no location for field '%s':%s" +msgstr "" + +#: dwflpp.cxx:2208 +#, c-format +msgid "cannot get type of field: %s" +msgstr "" + +#: dwflpp.cxx:2254 +#, c-format +msgid "invalid access '%s' vs '%s'" +msgstr "" + +#: dwflpp.cxx:2282 +#, c-format +msgid "invalid access '%s' for array type" +msgstr "" + +#: dwflpp.cxx:2294 +#, c-format +msgid "invalid access '%s' for %s" +msgstr "" + +#: dwflpp.cxx:2301 +#, c-format +msgid "unresolved %s" +msgstr "" + +#: dwflpp.cxx:2326 +#, c-format +msgid "unable to find member '%s' for %s%s%s" +msgstr "" + +#: dwflpp.cxx:2343 +#, c-format +msgid "invalid access '%s' vs. %s" +msgstr "" + +#: dwflpp.cxx:2348 +#, c-format +msgid "cannot find type: %s" +msgstr "" + +#: dwflpp.cxx:2352 +#, c-format +msgid "%s: unexpected type tag %s" +msgstr "" + +#: dwflpp.cxx:2372 +#, c-format +msgid "cannot get type of pointee: %s" +msgstr "" + +#: dwflpp.cxx:2401 +msgid "cannot write to member address" +msgstr "" + +#: dwflpp.cxx:2404 +msgid "cannot take address of bit-field" +msgstr "" + +#: dwflpp.cxx:2418 +#, c-format +msgid "unsupported type tag %s for %s" +msgstr "" + +#: dwflpp.cxx:2425 +#, c-format +msgid "'%s' is being accessed instead of a member" +msgstr "" + +#: dwflpp.cxx:2440 +#, c-format +msgid "unsupported type (mystery encoding %s for %s" +msgstr "" + +#: dwflpp.cxx:2449 +#, c-format +msgid "unsupported type (encoding %s) for %s" +msgstr "" + +#: dwflpp.cxx:2474 +msgid "cannot write to array address" +msgstr "" + +#: dwflpp.cxx:2477 +msgid "cannot write to reference" +msgstr "" + +#: dwflpp.cxx:2550 +#, c-format +msgid "finding symtable address for %s\n" +msgstr "" + +#: dwflpp.cxx:2554 +msgid "Getting symbols" +msgstr "" + +#: dwflpp.cxx:2569 +#, c-format +msgid "found %s @0x%#\n" +msgstr "" + +#: dwflpp.cxx:2589 +#, c-format +msgid "" +"finding location for local '%s' near address 0x%#, module bias 0x" +"%#\n" +msgstr "" + +#: dwflpp.cxx:2620 +#, c-format +msgid "failed to retrieve location attribute for local '%s' (dieoffset: %s)" +msgstr "" + +#: dwflpp.cxx:2630 dwflpp.cxx:2664 +#, c-format +msgid "failed to retrieve type attribute for local '%s'" +msgstr "" + +#: dwflpp.cxx:2679 +#, c-format +msgid "literal_stmt_for_return: finding return value for %s (%s)\n" +msgstr "" + +#: dwflpp.cxx:2692 +#, c-format +msgid "failed to retrieve return value location for %s (%s)" +msgstr "" + +#: dwflpp.cxx:2699 +#, c-format +msgid "function %s (%s) has no return value" +msgstr "" + +#: dwflpp.cxx:2714 dwflpp.cxx:2745 +#, c-format +msgid "failed to retrieve return value type attribute for %s (%s)" +msgstr "" + +#: dwflpp.cxx:2761 +#, c-format +msgid "literal_stmt_for_pointer: finding value for %s (%s)\n" +msgstr "" + +#: dwflpp.cxx:2879 +msgid " skipping - init/exit" +msgstr "" + +#: dwflpp.cxx:2887 +msgid " skipping - __kprobes" +msgstr "" + +#: dwflpp.cxx:2902 +msgid " guru mode enabled - ignoring blacklist" +msgstr "" + +#: dwflpp.cxx:2907 +msgid " skipping - blacklisted" +msgstr "" + +#: dwflpp.cxx:3046 +msgid "blacklist regexps:" +msgstr "" + +#: dwflpp.cxx:3054 +msgid "blacklist_func regcomp failed" +msgstr "" + +#: dwflpp.cxx:3056 +msgid "blacklist_func_ret regcomp failed" +msgstr "" + +#: dwflpp.cxx:3058 +msgid "blacklist_file regcomp failed" +msgstr "" + +#: dwflpp.cxx:3060 +msgid "blacklist_section regcomp failed" +msgstr "" + +#: dwflpp.cxx:3244 +msgid "not found cfa" +msgstr "" + +#: dwflpp.cxx:3251 +#, c-format +msgid "found cfa, info: %d [start: 0x%#, end: 0x%#, nops: %zu" +msgstr "" + +#: elaborate.cxx:144 elaborate.cxx:159 +msgid "derived_probe with no locations" +msgid_plural "derived_probe with no locations" +msgstr[0] "" +msgstr[1] "" +msgstr[2] "" + +#: elaborate.cxx:201 +msgid "unprivileged users: authorized" +msgstr "" + +#: elaborate.cxx:207 +msgid "unprivileged users: authorized for process owner" +msgstr "" + +#: elaborate.cxx:359 +msgid "invalid use of wildcard probe point component" +msgstr "" + +#: elaborate.cxx:414 +#, c-format +msgid "probe point truncated at position %s (follow: %s)" +msgstr "" + +#: elaborate.cxx:421 +msgid "probe point is not allowed for unprivileged users" +msgstr "" + +#: elaborate.cxx:498 +#, c-format +msgid "probe point mismatch at position %s (alternatives: %s)" +msgstr "" + +#: elaborate.cxx:519 +#, c-format +msgid "wildcard '%s' matched '%s'" +msgstr "" + +#: elaborate.cxx:565 +msgid " (alternatives: " +msgstr "" + +#: elaborate.cxx:563 +#, c-format +msgid "probe point mismatch at position %s %s didn't find any wildcard matches" +msgstr "" + +#: elaborate.cxx:579 +#, c-format +msgid "probe point mismatch at position %s %s" +msgstr "" + +#: elaborate.cxx:613 +msgid "inappropriate" +msgstr "" + +#: elaborate.cxx:651 +#, c-format +msgid "Recursive loop in alias expansion of %s at %s" +msgstr "" + +#: elaborate.cxx:740 +msgid "recursion limit reached" +msgstr "" + +#: elaborate.cxx:788 +msgid "no match" +msgstr "" + +#: elaborate.cxx:816 +msgid " while resolving probe point " +msgstr "" + +#: elaborate.cxx:863 +msgid "Expecting symbol or array index expression" +msgstr "" + +#: elaborate.cxx:916 +msgid "Assignment to read-only histogram bucket" +msgstr "" + +#: elaborate.cxx:948 +#, c-format +msgid "variable '%s' modified during 'foreach' iteration" +msgstr "" + +#: elaborate.cxx:970 +#, c-format +msgid "function call modifies var '%s' during 'foreach' iteration" +msgstr "" + +#: elaborate.cxx:1058 +#, c-format +msgid "multiple histogram types declared on '%s'" +msgstr "" + +#: elaborate.cxx:1086 +#, c-format +msgid "unable to infer statistic parameters for global '%s'" +msgstr "" + +#: elaborate.cxx:1167 +msgid "probe condition must not modify any variables" +msgstr "" + +#: elaborate.cxx:1172 +msgid "probe condition must not include impure embedded-C" +msgstr "" + +#: elaborate.cxx:1226 +#, c-format +msgid "Turning on task_finder vma_tracker, pragma:vma found in %s" +msgstr "" + +#: elaborate.cxx:1353 +msgid "" +"This global uses tapset constructs that are dependent on systemtap version" +msgstr "" + +#: elaborate.cxx:1358 +msgid "" +"This function uses tapset constructs that are dependent on systemtap version" +msgstr "" + +#: elaborate.cxx:1366 +msgid "" +"This probe uses tapset constructs that are dependent on systemtap version" +msgstr "" + +#: elaborate.cxx:1368 +msgid "" +"This alias uses tapset constructs that are dependent on systemtap version" +msgstr "" + +#: elaborate.cxx:1651 +msgid "no probes found" +msgstr "" + +#: elaborate.cxx:1714 elaborate.cxx:1825 +#, c-format +msgid "unresolved arity-%zu global array %s, missing global declaration?" +msgstr "" + +#: elaborate.cxx:1764 +msgid "unresolved array in delete statement" +msgstr "" + +#: elaborate.cxx:1798 +msgid "probe condition must not reference undeclared global" +msgstr "" + +#: elaborate.cxx:1846 +msgid "probe condition must not reference function" +msgstr "" + +#: elaborate.cxx:1861 +#, c-format +msgid "unresolved arity-%zu function" +msgstr "" + +#: elaborate.cxx:1908 +#, c-format +msgid "cross-file global variable reference to %s from" +msgstr "" + +#: elaborate.cxx:1962 +#, c-format +msgid " function %s is defined from %s" +msgstr "" + +#: elaborate.cxx:2002 elaborate.cxx:2004 +#, c-format +msgid "Eliding unused function '%s'" +msgstr "" + +#: elaborate.cxx:2060 elaborate.cxx:2105 elaborate.cxx:2151 +#, c-format +msgid "Eliding unused variable '%s'" +msgstr "" + +#: elaborate.cxx:2062 +#, c-format +msgid "Eliding unused local variable %s in %s" +msgstr "" + +#: elaborate.cxx:2088 elaborate.cxx:2136 elaborate.cxx:2173 +msgid "(alternatives:" +msgstr "" + +#: elaborate.cxx:2086 elaborate.cxx:2134 +#, c-format +msgid "never-assigned local variable '%s' %s" +msgstr "" + +#: elaborate.cxx:2107 +#, c-format +msgid "Eliding unused local variable %s in function %s" +msgstr "" + +#: elaborate.cxx:2153 +#, c-format +msgid "Eliding unused global variable %s" +msgstr "" + +#: elaborate.cxx:2172 +#, c-format +msgid "never assigned global variable '%s' %s" +msgstr "" + +#: elaborate.cxx:2240 +#, c-format +msgid "Eliding assignment to %s at %s" +msgstr "" + +#: elaborate.cxx:2263 +#, c-format +msgid "Eliding unused error string catcher %s at %s" +msgstr "" + +#: elaborate.cxx:2328 +msgid "Eliding side-effect-free null statement " +msgstr "" + +#: elaborate.cxx:2348 +msgid "Flattening nested block " +msgstr "" + +#: elaborate.cxx:2360 +msgid "Eliding side-effect-free empty block " +msgstr "" + +#: elaborate.cxx:2366 +msgid "Eliding side-effect-free singleton block " +msgstr "" + +#: elaborate.cxx:2384 +msgid "Eliding empty try {} block " +msgstr "" + +#: elaborate.cxx:2408 +msgid "Eliding side-effect-free if statement " +msgstr "" + +#: elaborate.cxx:2416 +msgid "Creating simple evaluation from if statement " +msgstr "" + +#: elaborate.cxx:2430 +msgid "Inverting the condition of if statement " +msgstr "" + +#: elaborate.cxx:2454 +msgid "Eliding side-effect-free foreach statement " +msgstr "" + +#: elaborate.cxx:2476 +msgid "Eliding side-effect-free for statement " +msgstr "" + +#: elaborate.cxx:2518 +msgid "Eliding side-effect-free expression " +msgstr "" + +#: elaborate.cxx:2556 +#, c-format +msgid "side-effect-free probe '%s'" +msgstr "" + +#: elaborate.cxx:2580 +#, c-format +msgid "side-effect-free function '%s'" +msgstr "" + +#: elaborate.cxx:2700 +msgid "Creating if statement from unused logical-or " +msgstr "" + +#: elaborate.cxx:2731 +msgid "Creating if statement from unused logical-and " +msgstr "" + +#: elaborate.cxx:2757 +msgid "Creating if statement from unused ternary expression " +msgstr "" + +#: elaborate.cxx:2787 +msgid "Eliding unused binary " +msgstr "" + +#: elaborate.cxx:2815 +msgid "Eliding unused unary " +msgstr "" + +#: elaborate.cxx:2856 +msgid "Eliding side-effect-free function call " +msgstr "" + +#: elaborate.cxx:2888 +msgid "Eliding unused print " +msgstr "" + +#: elaborate.cxx:2935 +msgid "Eliding unused target symbol " +msgstr "" + +#: elaborate.cxx:2969 +msgid "Eliding unused typecast " +msgstr "" + +#: elaborate.cxx:2986 +msgid "Eliding unused check " +msgstr "" + +#: elaborate.cxx:3095 +#, c-format +msgid "Collapsing constant-% if-statement %s" +msgstr "" + +#: elaborate.cxx:3121 +msgid "Collapsing constantly-false for-loop " +msgstr "" + +#: elaborate.cxx:3147 +msgid "Collapsing constantly-limited foreach-loop " +msgstr "" + +#: elaborate.cxx:3194 +msgid "unsupported binary operator " +msgstr "" + +#: elaborate.cxx:3234 +msgid "Collapsing constant-identity binary operator " +msgstr "" + +#: elaborate.cxx:3248 +#, c-format +msgid "Collapsing constant-% binary operator %s" +msgstr "" + +#: elaborate.cxx:3266 +msgid "Collapsing constant unary " +msgstr "" + +#: elaborate.cxx:3280 +msgid "unsupported unary operator " +msgstr "" + +#: elaborate.cxx:3324 +msgid "Collapsing constant logical-OR " +msgstr "" + +#: elaborate.cxx:3371 +msgid "Collapsing constant logical-AND " +msgstr "" + +#: elaborate.cxx:3414 +msgid "Collapsing constant-boundary comparison " +msgstr "" + +#: elaborate.cxx:3432 +msgid "Collapsing constant comparison " +msgstr "" + +#: elaborate.cxx:3449 +msgid "unsupported comparison operator " +msgstr "" + +#: elaborate.cxx:3465 +msgid "Collapsing constant concatenation " +msgstr "" + +#: elaborate.cxx:3477 +msgid "Collapsing identity concatenation " +msgstr "" + +#: elaborate.cxx:3498 +#, c-format +msgid "Collapsing constant-% ternary %s" +msgstr "" + +#: elaborate.cxx:3513 +msgid "Collapsing untouched @defined check " +msgstr "" + +#: elaborate.cxx:3533 +msgid "Bad $context variable being substituted with literal 0" +msgstr "" + +#: elaborate.cxx:3536 +msgid "Bad $context variable being substituted with literal 0, " +msgstr "" + +#: elaborate.cxx:3581 +#, c-format +msgid "Changing %s reference to %s reference\n" +msgstr "" + +#: elaborate.cxx:3993 +msgid "unsupported assignment operator " +msgstr "" + +#: elaborate.cxx:4170 +msgid "Resolution problem with " +msgstr "" + +#. TRANSLATORS: simply saying not an issue with a probe or function +#: elaborate.cxx:4185 +msgid "other" +msgstr "" + +#: elaborate.cxx:4191 +msgid "unresolved target-symbol expression" +msgstr "" + +#: elaborate.cxx:4198 +msgid "unexpected @defined" +msgstr "" + +#: elaborate.cxx:4205 +msgid "@entry is only valid in .return probes" +msgstr "" + +#: elaborate.cxx:4217 +#, c-format +msgid "type definition '%s' not found" +msgstr "" + +#: elaborate.cxx:4378 +msgid "Activating uprobes support because /* pragma:uprobes */ seen." +msgstr "" + +#: elaborate.cxx:4519 translate.cxx:3055 +msgid "invalid operand of delete expression" +msgstr "" + +#: elaborate.cxx:4635 +msgid "Unspecified conversion in print operator format string" +msgstr "" + +#: elaborate.cxx:4651 +msgid "Wrong number of args to formatted print operator" +msgstr "" + +#: elaborate.cxx:4788 +msgid "array locals not supported, missing global declaration? " +msgstr "" + +#: elaborate.cxx:4798 +msgid "stat locals not supported, missing global declaration? " +msgstr "" + +#: elaborate.cxx:4813 +msgid "unresolved type " +msgstr "" + +#: elaborate.cxx:4828 +msgid "invalid operator" +msgstr "" + +#: elaborate.cxx:4830 +msgid "invalid type " +msgstr "" + +#: elaborate.cxx:4863 elaborate.cxx:4877 +#, c-format +msgid "type mismatch ( %s vs. %s )" +msgstr "" + +#: elaborate.cxx:4884 +#, c-format +msgid "type was first inferred here ( %s )" +msgstr "" + +#: hash.cxx:130 +msgid "result:" +msgstr "" + +#: hash.cxx:199 +#, c-format +msgid "" +"Warning: failed to create cache directory (\"%s\") %s, disabling cache " +"support" +msgstr "" + +#. TRANSLATORS: failure to find an address that was a constant literal number +#: loc2c.c:175 +#, c-format +msgid "cannot get constant address: %s" +msgstr "" + +#: loc2c.c:195 +#, c-format +msgid "cannot get constant block: %s" +msgstr "" + +#: loc2c.c:210 +#, c-format +msgid "cannot get string constant: %s" +msgstr "" + +#: loc2c.c:224 +#, c-format +msgid "cannot get constant value: %s" +msgstr "" + +#: loc2c.c:301 +#, c-format +msgid "%s in DWARF expression [%Zu] at % (%#x: %, %)" +msgstr "" + +#: loc2c.c:912 +msgid "required DW_AT_frame_base attribute not supplied" +msgstr "" + +#: loc2c.c:926 +#, c-format +msgid "dwarf_getlocation_addr (form %#x): %s" +msgstr "" + +#: loc2c.c:932 +msgid "DW_AT_frame_base not accessible at this address" +msgstr "" + +#: loc2c.c:941 +msgid "No cfa_ops supplied, but needed by DW_OP_call_frame_cfa" +msgstr "" + +#: loc2c.c:976 +msgid "not accessible at this address" +msgstr "" + +#: loc2c.c:1522 loc2c.c:2435 +msgid "cannot handle offset into register in fetch" +msgstr "" + +#: loc2c.c:1527 +msgid "noncontiguous location for base fetch" +msgstr "" + +#: loc2c.c:1531 loc2c.c:1574 +msgid "pointer has been optimized out" +msgstr "" + +#: loc2c.c:1535 +msgid "location not available" +msgstr "" + +#: loc2c.c:1565 +msgid "cannot handle offset into register in store" +msgstr "" + +#: loc2c.c:1570 +msgid "noncontiguous location for base store" +msgstr "" + +#: loc2c.c:1578 +msgid "location is computed value, cannot store" +msgstr "" + +#: loc2c.c:1582 +msgid "location is constant value, cannot store" +msgstr "" + +#: loc2c.c:1586 +msgid "location is not available, cannot store" +msgstr "" + +#: loc2c.c:1676 +msgid "stack value too big for fetch ???" +msgstr "" + +#: loc2c.c:1680 +msgid "single register too big for fetch/store ???" +msgstr "" + +#: loc2c.c:1684 +msgid "implicit pointer too big for fetch/store ???" +msgstr "" + +#: loc2c.c:1689 +msgid "cannot support noncontiguous location" +msgstr "" + +#: loc2c.c:1717 +msgid "declaring noncontig union for depth > 9, too many pieces" +msgstr "" + +#: loc2c.c:1766 loc2c.c:2117 loc2c.c:2206 +#, c-format +msgid "cannot get byte_size attribute for type %s: %s" +msgstr "" + +#: loc2c.c:1807 +#, c-format +msgid "cannot get bit field parameters: %s" +msgstr "" + +#: loc2c.c:1882 +msgid "fetch is larger than base integer types" +msgstr "" + +#. TRANSLATORS: CU stands for 'compilation unit' +#: loc2c.c:1902 +#, c-format +msgid "cannot determine CU address size from %s: %s" +msgstr "" + +#: loc2c.c:2022 +msgid "store is larger than base integer types" +msgstr "" + +#: loc2c.c:2152 +msgid "cannot take the address of a bit field" +msgstr "" + +#: loc2c.c:2163 +msgid "cannot take address of object in register" +msgstr "" + +#: loc2c.c:2166 +msgid "cannot take address of noncontiguous object" +msgstr "" + +#: loc2c.c:2169 +msgid "cannot take address of computed value" +msgstr "" + +#: loc2c.c:2172 +msgid "cannot take address of constant value" +msgstr "" + +#: loc2c.c:2175 +msgid "cannot take address of unavailable value" +msgstr "" + +#: loc2c.c:2178 +msgid "cannot take address of implicit pointer" +msgstr "" + +#. TRANSLATORS: This refers to the basic type, (stripped of const/volatile/etc.) +#: loc2c.c:2230 +#, c-format +msgid "cannot get inner type of type %s: %s" +msgstr "" + +#: loc2c.c:2242 +#, c-format +msgid "cannot get byte_size attribute for array element type %s: %s" +msgstr "" + +#: loc2c.c:2247 +msgid "confused about array element size" +msgstr "" + +#: loc2c.c:2261 +#, c-format +msgid "cannot get byte_stride attribute array type %s: %s" +msgstr "" + +#: loc2c.c:2269 +#, c-format +msgid "cannot get element type of array type %s: %s" +msgstr "" + +#: loc2c.c:2288 +msgid "cannot dynamically index noncontiguous array" +msgstr "" + +#. TRANSLATORS: The index is constant +#: loc2c.c:2300 +msgid "constant index is outside noncontiguous array" +msgstr "" + +#: loc2c.c:2302 +msgid "noncontiguous array splits elements" +msgstr "" + +#: loc2c.c:2323 +msgid "cannot index array stored in a register" +msgstr "" + +#: loc2c.c:2325 +msgid "constant index is outside array held in register" +msgstr "" + +#: loc2c.c:2335 +msgid "cannot index into constant value" +msgstr "" + +#. TRANSLATORS: The index is constant +#: loc2c.c:2338 +msgid "constant index is outside constant array value" +msgstr "" + +#: loc2c.c:2349 +msgid "cannot index into implicit pointer" +msgstr "" + +#: loc2c.c:2356 +msgid "cannot index into computed value" +msgstr "" + +#: loc2c.c:2361 +msgid "cannot index into unavailable value" +msgstr "" + +#: main.cxx:179 +msgid "# global embedded code" +msgstr "" + +#: main.cxx:189 +msgid "# globals" +msgstr "" + +#: main.cxx:204 +msgid "# functions" +msgstr "" + +#: main.cxx:212 main.cxx:236 +msgid " # locals" +msgstr "" + +#: main.cxx:228 +msgid "# probes" +msgstr "" + +#: main.cxx:311 +#, c-format +msgid "Checking \"%s\" failed with error: %s" +msgstr "" + +#: main.cxx:330 +#, c-format +msgid "Parsed kernel \"%s\", " +msgstr "" + +#: main.cxx:331 +#, c-format +msgid "containing %zu tuple" +msgid_plural "containing %zu tuples" +msgstr[0] "" +msgstr[1] "" +msgstr[2] "" + +#: main.cxx:346 +#, c-format +msgid "" +"Checking \"%s\" failed with error: %s\n" +"Ensure kernel development headers & makefiles are installed" +msgstr "" + +#: main.cxx:363 +#, c-format +msgid "Parsed kernel %s, which contained one vmlinux export" +msgid_plural "Parsed kernel %s, which contained %zu vmlinux exports" +msgstr[0] "" +msgstr[1] "" +msgstr[2] "" + +#. TRANSLATORS: we can't make the directory due to the error +#: main.cxx:392 +#, c-format +msgid "ERROR: cannot create temporary directory (\" %s \"): %s" +msgstr "" + +#: main.cxx:399 +#, c-format +msgid "Created temporary directory \"%s\"" +msgstr "" + +#: main.cxx:409 +#, c-format +msgid "Keeping temporary directory \"%s\"" +msgstr "" + +#: main.cxx:437 +msgid "ERROR: kernel release isn't specified" +msgstr "" + +#: main.cxx:439 +#, c-format +msgid "ERROR: kernel release isn't found in \"%s\"" +msgstr "" + +#: main.cxx:459 +msgid "" +"Note: --use-server --unprivileged was selected because of stapusr membership." +msgstr "" + +#: main.cxx:463 +msgid "" +"WARNING: Without NSS, using a compile-server is not supported by this " +"version of systemtap" +msgstr "" + +#: main.cxx:594 +#, c-format +msgid "" +"usage error: tapset file '%s' cannot be run directly as a session script." +msgstr "" + +#. TRANSLATORS: Searching through directories, 'processed' means 'examined so far' +#: main.cxx:621 +#, c-format +msgid "Searched: \" %s \", found: %zu, processed: %u" +msgstr "" + +#: main.cxx:633 +msgid "# parse tree dump" +msgstr "" + +#: main.cxx:670 +msgid "Pass 1: parse failed. Try again with another '--vp 1' option." +msgstr "" + +#: main.cxx:703 +msgid "Pass 2: analysis failed. Try again with another '--vp 01' option." +msgstr "" + +#: main.cxx:779 +msgid "Pass 3: translation failed. Try again with another '--vp 001' option." +msgstr "" + +#: main.cxx:816 +msgid "Pass 4: compilation failed. Try again with another '--vp 0001' option." +msgstr "" + +#: main.cxx:860 +msgid "Pass 5: starting run." +msgstr "" + +#: main.cxx:872 +msgid "Pass 5: run failed. Try again with another '--vp 00001' option." +msgstr "" + +#: main.cxx:900 +msgid "Coverage database not available without libsqlite3" +msgstr "" + +#: main.cxx:924 +msgid "Attempting compilation using a compile server" +msgstr "" + +#: main.cxx:982 +#, c-format +msgid "Session arch: %s release: %s" +msgstr "" + +#: nsscommon.cxx:101 +#, c-format +msgid "Could not open log file %s" +msgstr "" + +#: nsscommon.cxx:145 nsscommon.cxx:158 +#, c-format +msgid "(%d) %s" +msgstr "" + +#: nsscommon.cxx:172 +#, c-format +msgid "Error initializing NSS for %s" +msgstr "" + +#: nsscommon.cxx:187 +#, c-format +msgid "Unable to shutdown NSS for database %s" +msgstr "" + +#: nsscommon.cxx:197 +msgid "Unable to shutdown NSS" +msgstr "" + +#: nsscommon.cxx:265 +msgid "Cannot prompt for certificate database password. stdin is not a tty" +msgstr "" + +#: nsscommon.cxx:278 +#, c-format +msgid "Password for certificate database in %s: " +msgstr "" + +#: nsscommon.cxx:314 nsscommon.cxx:865 +#, c-format +msgid "Could not search certificate database directory %s" +msgstr "" + +#: nsscommon.cxx:320 +#, c-format +msgid "Could not remove %s" +msgstr "" + +#: nsscommon.cxx:327 +#, c-format +msgid "" +"Could not remove certificate database directory %s\n" +"%s" +msgstr "" + +#: nsscommon.cxx:359 +msgid "Passwords do not match" +msgstr "" + +#: nsscommon.cxx:370 +msgid "Too many password attempts" +msgstr "" + +#: nsscommon.cxx:382 +#, c-format +msgid "Could not initialize pin for certificate database %s" +msgstr "" + +#: nsscommon.cxx:395 +#, c-format +msgid "Unable to authenticate the default slot for certificate database %s" +msgstr "" + +#: nsscommon.cxx:422 +msgid "Unable to generate public/private key pair" +msgstr "" + +#: nsscommon.cxx:434 +msgid "Unable to create subject public key info for certificate request" +msgstr "" + +#: nsscommon.cxx:444 +msgid "Unable to create certificate request" +msgstr "" + +#: nsscommon.cxx:466 +msgid "Unable to create certificate validity dates" +msgstr "" + +#: nsscommon.cxx:480 nsscommon.cxx:976 +msgid "Unable to create certificate" +msgstr "" + +#: nsscommon.cxx:494 +msgid "Unable to allocate certificate extensions" +msgstr "" + +#: nsscommon.cxx:513 +msgid "Unable to encode certificate type extensions" +msgstr "" + +#: nsscommon.cxx:524 nsscommon.cxx:542 +msgid "Unable to allocate alternate DNS name extension for certificate" +msgstr "" + +#: nsscommon.cxx:572 +msgid "Unable to encode alternate DNS name extension for certificate" +msgstr "" + +#: nsscommon.cxx:581 +msgid "Unable to add alternate DNS name extension for certificate" +msgstr "" + +#: nsscommon.cxx:596 +msgid "Unable to complete alternate DNS name extension for certificate" +msgstr "" + +#: nsscommon.cxx:617 +msgid "" +"Unable to determine the signature algorithm for the signing the certificate" +msgstr "" + +#: nsscommon.cxx:626 +msgid "Unable to set the signature algorithm for signing the certificate" +msgstr "" + +#: nsscommon.cxx:642 +msgid "Unable to encode the certificate for signing" +msgstr "" + +#: nsscommon.cxx:650 +msgid "Unable to allocate memory for signing the certificate" +msgstr "" + +#: nsscommon.cxx:657 +msgid "Unable to sign the certificate" +msgstr "" + +#: nsscommon.cxx:673 nsscommon.cxx:797 +msgid "Unable to decode certificate" +msgstr "" + +#: nsscommon.cxx:685 +#, c-format +msgid "Unable to import certificate into the database at %s" +msgstr "" + +#: nsscommon.cxx:694 +msgid "Unable to allocate certificate trust" +msgstr "" + +#: nsscommon.cxx:702 +msgid "Unable decode trust string 'PCu,,PCu'" +msgstr "" + +#: nsscommon.cxx:712 nsscommon.cxx:842 +msgid "Unable to change certificate trust" +msgstr "" + +#: nsscommon.cxx:729 +#, c-format +msgid "" +"Could not open certificate file %s for reading\n" +"%s" +msgstr "" + +#: nsscommon.cxx:739 +#, c-format +msgid "" +"Could not obtain information about certificate file %s\n" +"%s" +msgstr "" + +#: nsscommon.cxx:752 +#, c-format +msgid "" +"Error reading from certificate file %s\n" +"%s" +msgstr "" + +#: nsscommon.cxx:771 nsscommon.cxx:898 +#, c-format +msgid "Could not create certificate database directory %s" +msgstr "" + +#: nsscommon.cxx:806 nsscommon.cxx:927 +#, c-format +msgid "Could not obtain internal key slot for certificate database %s" +msgstr "" + +#: nsscommon.cxx:816 +#, c-format +msgid "Could not import certificate into the database at %s" +msgstr "" + +#: nsscommon.cxx:825 +msgid "Could not allocate certificate trust" +msgstr "" + +#: nsscommon.cxx:832 +msgid "Unable decode trust string 'P,P,P'" +msgstr "" + +#: nsscommon.cxx:874 +#, c-format +msgid "Could set file permissions for %s" +msgstr "" + +#: nsscommon.cxx:885 +#, c-format +msgid "Generating a new certificate database directory in %s" +msgstr "" + +#: nsscommon.cxx:944 +msgid "Unable to encode certificate common header" +msgstr "" + +#: nsscommon.cxx:996 +#, c-format +msgid "" +"Error writing to certificate file %s\n" +"%s" +msgstr "" + +#: nsscommon.cxx:1003 +#, c-format +msgid "" +"Could not open certificate file %s for writing\n" +"%s" +msgstr "" + +#: nsscommon.cxx:1013 +#, c-format +msgid "Unable to add certificate to %s" +msgstr "" + +#: nsscommon.cxx:1063 +msgid "NSS library failure in CERT_CreateSubjectCertList" +msgstr "" + +#: nsscommon.cxx:1084 +msgid "Could not decode certificate validity" +msgstr "" + +#: nsscommon.cxx:1089 +msgid "Could not decode certificate validity time" +msgstr "" + +#: nsscommon.cxx:1098 +msgid "Could not format certificate validity time" +msgstr "" + +#: nsscommon.cxx:1124 +#, c-format +msgid "Certificate database %s does not exist" +msgstr "" + +#: nsscommon.cxx:1131 +#, c-format +msgid "Certificate database %s is obsolete" +msgstr "" + +#: nsscommon.cxx:1152 +#, c-format +msgid "Certificate found in database %s" +msgstr "" + +#: nsscommon.cxx:1164 +#, c-format +msgid " Not Valid Before: %s UTC" +msgstr "" + +#: nsscommon.cxx:1166 +#, c-format +msgid " Not Valid After: %s UTC" +msgstr "" + +#: nsscommon.cxx:1172 +msgid "Certificate is valid" +msgstr "" + +#: nsscommon.cxx:1178 +msgid "Certificate is not valid" +msgstr "" + +#: nsscommon.cxx:1197 +msgid "Unable to generate new certificate" +msgstr "" + +#: nsscommon.cxx:1214 +#, c-format +msgid "Unable to find certificate with nickname %s in %s." +msgstr "" + +#: nsscommon.cxx:1232 +#, c-format +msgid "" +"Unable to obtain private key from the certificate with nickname %s in %s." +msgstr "" + +#: nsscommon.cxx:1243 +msgid "Could not create signing context" +msgstr "" + +#: nsscommon.cxx:1250 +msgid "Could not initialize signing context." +msgstr "" + +#: nsscommon.cxx:1259 +#, c-format +msgid "Could not open module file %s" +msgstr "" + +#: nsscommon.cxx:1272 +#, c-format +msgid "Error reading module file %s" +msgstr "" + +#: nsscommon.cxx:1281 +#, c-format +msgid "Error while signing module file %s" +msgstr "" + +#: nsscommon.cxx:1291 +#, c-format +msgid "Could not complete signature of module file %s" +msgstr "" + +#: nsscommon.cxx:1305 +#, c-format +msgid "Could not open signature file %s" +msgstr "" + +#: nsscommon.cxx:1313 +#, c-format +msgid "Error writing to signature file %s" +msgstr "" + +#: parse.cxx:261 +msgid "parse error: " +msgstr "" + +#: parse.cxx:265 +msgid "\tat: " +msgstr "" + +#: parse.cxx:273 parse.cxx:277 +msgid "\tsaw: " +msgstr "" + +#: parse.cxx:311 parse.cxx:373 +msgid "expected comparison operator" +msgstr "" + +#: parse.cxx:343 parse.cxx:398 +msgid "expected string literal" +msgstr "" + +#: parse.cxx:376 +msgid "wildcard not allowed with order comparison operators" +msgstr "" + +#: parse.cxx:411 parse.cxx:430 +msgid "expected '==' or '!='" +msgstr "" + +#: parse.cxx:471 +msgid "" +"expected string, number literal or other CONFIG_... as right side operand" +msgstr "" + +#: parse.cxx:489 +msgid "expected string literal as right value" +msgstr "" + +#: parse.cxx:492 +msgid "expected number literal as right value" +msgstr "" + +#: parse.cxx:495 +msgid "" +"expected 'arch' or 'kernel_v' or 'kernel_vr' or 'CONFIG_...'\n" +" or comparison between strings or integers" +msgstr "" + +#. TRANSLATORS: 'conditional' meaning 'conditional preprocessing' +#: parse.cxx:523 +msgid "incomplete conditional at end of file" +msgstr "" + +#: parse.cxx:530 parse.cxx:536 parse.cxx:550 +msgid "incomplete conditional - missing '%('" +msgstr "" + +#: parse.cxx:538 +msgid "invalid conditional - duplicate '%:'" +msgstr "" + +#: parse.cxx:571 +msgid "incomplete condition after '%('" +msgstr "" + +#: parse.cxx:603 +msgid "expected '%?' marker for conditional" +msgstr "" + +#: parse.cxx:653 +msgid "unexpected end-of-file" +msgstr "" + +#: parse.cxx:686 +#, c-format +msgid "expected '%s'" +msgstr "" + +#: parse.cxx:696 +msgid "expected " +msgstr "" + +#: parse.cxx:737 +msgid "expected number" +msgstr "" + +#: parse.cxx:752 parse.cxx:1752 +msgid "number invalid or out of range" +msgstr "" + +#: parse.cxx:934 parse.cxx:954 +msgid "invalid nested substitution of command line arguments" +msgstr "" + +#: parse.cxx:1011 +msgid "Could not find matching closing quote" +msgstr "" + +#: parse.cxx:1101 +msgid "Could not find matching '%}' to close embedded function block" +msgstr "" + +#: parse.cxx:1203 +msgid "expected 'probe', 'global', 'function', or '%{'" +msgstr "" + +#: parse.cxx:1233 +#, c-format +msgid "Input file '%s' is empty or missing." +msgstr "" + +#: parse.cxx:1239 +#, c-format +msgid "%d parse error." +msgid_plural "%d parse errors." +msgstr[0] "" +msgstr[1] "" +msgstr[2] "" + +#: parse.cxx:1255 +msgid "expected 'probe'" +msgstr "" + +#: parse.cxx:1273 parse.cxx:1282 +msgid "probe point alias name cannot be optional nor sufficient" +msgstr "" + +#: parse.cxx:1301 +msgid "expected probe point specifier" +msgstr "" + +#: parse.cxx:1337 +msgid "expected '%{'" +msgstr "" + +#: parse.cxx:1340 +msgid "embedded code in unprivileged script" +msgstr "" + +#: parse.cxx:1356 +msgid "expected '{'" +msgstr "" + +#: parse.cxx:1410 parse.cxx:1489 parse.cxx:1552 parse.cxx:1586 parse.cxx:2049 +msgid "expected identifier" +msgstr "" + +#: parse.cxx:1465 +msgid "expected statement" +msgstr "" + +#: parse.cxx:1483 +msgid "expected 'global'" +msgstr "" + +#: parse.cxx:1493 +msgid "duplicate global name" +msgstr "" + +#: parse.cxx:1509 +msgid "array size out of range" +msgstr "" + +#: parse.cxx:1518 +msgid "only scalar globals can be initialized" +msgstr "" + +#: parse.cxx:1545 +msgid "expected 'function'" +msgstr "" + +#: parse.cxx:1556 +msgid "duplicate function name" +msgstr "" + +#: parse.cxx:1570 parse.cxx:1601 +msgid "expected 'string' or 'long'" +msgstr "" + +#: parse.cxx:1576 parse.cxx:1683 parse.cxx:1779 parse.cxx:1890 parse.cxx:1956 +#: parse.cxx:1990 +msgid "expected '('" +msgstr "" + +#: parse.cxx:1610 parse.cxx:2799 +msgid "expected ',' or ')'" +msgstr "" + +#: parse.cxx:1634 +msgid "expected identifier or '*'" +msgstr "" + +#: parse.cxx:1653 parse.cxx:1690 parse.cxx:1785 parse.cxx:1935 parse.cxx:1967 +#: parse.cxx:2569 +msgid "expected ')'" +msgstr "" + +#: parse.cxx:1701 +msgid "expected one of '. , ( ? ! { = +='" +msgstr "" + +#: parse.cxx:1760 +msgid "expected literal string or number" +msgstr "" + +#: parse.cxx:1773 +msgid "expected 'if'" +msgstr "" + +#: parse.cxx:1818 +msgid "expected 'return'" +msgstr "" + +#: parse.cxx:1820 +msgid "found 'return' not in function context" +msgstr "" + +#: parse.cxx:1833 +msgid "expected 'delete'" +msgstr "" + +#: parse.cxx:1846 +msgid "expected 'next'" +msgstr "" + +#: parse.cxx:1848 +msgid "found 'next' not in probe context" +msgstr "" + +#: parse.cxx:1860 +msgid "expected 'break'" +msgstr "" + +#: parse.cxx:1872 +msgid "expected 'continue'" +msgstr "" + +#: parse.cxx:1884 +msgid "expected 'for'" +msgstr "" + +#: parse.cxx:1904 parse.cxx:1920 +msgid "expected ';'" +msgstr "" + +#: parse.cxx:1950 +msgid "expected 'while'" +msgstr "" + +#: parse.cxx:1981 +msgid "expected 'foreach'" +msgstr "" + +#: parse.cxx:2060 parse.cxx:2097 +msgid "multiple sort directives" +msgstr "" + +#: parse.cxx:2080 parse.cxx:2333 parse.cxx:2844 +msgid "expected ',' or ']'" +msgstr "" + +#: parse.cxx:2088 +msgid "expected 'in'" +msgstr "" + +#: parse.cxx:2179 +msgid "expected ':'" +msgstr "" + +#: parse.cxx:2356 +msgid "unexpected comma-separated expression list" +msgstr "" + +#: parse.cxx:2549 +msgid "expected value" +msgstr "" + +#: parse.cxx:2555 +msgid "embedded expression code in unprivileged script" +msgstr "" + +#: parse.cxx:2672 +msgid "unknown statistic operator " +msgstr "" + +#: parse.cxx:2854 +msgid "base histogram operator where expression expected" +msgstr "" + +#: parse.cxx:2901 +msgid "expected @cast or $var" +msgstr "" + +#: parse.cxx:3001 +msgid "-> and [ are not accepted for a pretty-printing variable" +msgstr "" + +#: remote.cxx:48 +#, c-format +msgid "string doesn't appear to be a URI: %s" +msgstr "" + +#: remote.cxx:99 util.cxx:655 +#, c-format +msgid "Warning: %s exited with status: %d" +msgstr "" + +#: remote.cxx:255 +msgid "stapsh file ERROR: no reply" +msgstr "" + +#: remote.cxx:257 +#, c-format +msgid "stapsh file replied %s" +msgstr "" + +#: remote.cxx:332 +msgid "stapsh run ERROR: no reply" +msgstr "" + +#: remote.cxx:334 +#, c-format +msgid "stapsh run replied %s" +msgstr "" + +#: remote.cxx:369 +msgid "stapsh file descriptors already set" +msgstr "" + +#: remote.cxx:376 +msgid "invalid file descriptors for stapsh" +msgstr "" + +#: remote.cxx:379 +msgid "error sending hello to stapsh" +msgstr "" + +#: remote.cxx:383 +msgid "error receiving hello from stapsh" +msgstr "" + +#: remote.cxx:389 +msgid "failed to get uname from stapsh" +msgstr "" + +#: remote.cxx:428 remote.cxx:499 +msgid "error launching stapsh" +msgstr "" + +#: remote.cxx:511 +msgid "error establishing ssh connection" +msgstr "" + +#: remote.cxx:575 +msgid "No tmpdir available for ssh control master" +msgstr "" + +#: remote.cxx:606 +#, c-format +msgid "failed to create an ssh control master for %s : rc= %d" +msgstr "" + +#: remote.cxx:610 +#, c-format +msgid "Created ssh control master at %s" +msgstr "" + +#: remote.cxx:624 +#, c-format +msgid "failed to stop the ssh control master for %s : rc=%d" +msgstr "" + +#: remote.cxx:643 +#, c-format +msgid "failed to get uname from %s : rc= %d" +msgstr "" + +#: remote.cxx:668 +#, c-format +msgid "failed to make a tempdir on %s : rc=%d" +msgstr "" + +#: remote.cxx:683 +#, c-format +msgid "failed to copy the module to %s : rc=%d" +msgstr "" + +#: remote.cxx:698 +#, c-format +msgid "failed to run the module on %s : ret=%d" +msgstr "" + +#: remote.cxx:726 +#, c-format +msgid "failed to delete the tempdir on %s : rc=%d" +msgstr "" + +#: remote.cxx:774 +msgid "ssh target requires a hostname" +msgstr "" + +#: remote.cxx:776 +msgid "ssh target URI doesn't support a /path" +msgstr "" + +#: remote.cxx:778 +msgid "ssh target URI doesn't support a ?query" +msgstr "" + +#: remote.cxx:780 +msgid "ssh target URI doesn't support a #fragment" +msgstr "" + +#: remote.cxx:809 +#, c-format +msgid "unrecognized URI scheme '%s' in remote: %s" +msgstr "" + +#: rpm_finder.cxx:71 +msgid "Error reading the rpm configuration files" +msgstr "" + +#: rpm_finder.cxx:104 rpm_finder.cxx:123 rpm_finder.cxx:159 +msgid "Error querying the rpm file `" +msgstr "" + +#: rpm_finder.cxx:207 +msgid "Incorrect version or missing kernel-devel package, use: yum install " +msgstr "" + +#: rpm_finder.cxx:210 +msgid "Missing separate debuginfos, use: debuginfo-install " +msgstr "" + +#: rpm_finder.cxx:213 +msgid "Incorrect parameter passed, please report this error." +msgstr "" + +#: runtime/staprun/common.c:81 +msgid "Invalid FILE name format\n" +msgstr "" + +#: runtime/staprun/common.c:141 +#, c-format +msgid "Invalid buffer size '%d' (should be 1-4095).\n" +msgstr "" + +#: runtime/staprun/common.c:177 +#, c-format +msgid "Invalid file size option '%s'.\n" +msgstr "" + +#: runtime/staprun/common.c:190 +msgid "File name is too long.\n" +msgstr "" + +#: runtime/staprun/common.c:196 +msgid "Filename format is invalid or too long.\n" +msgstr "" + +#: runtime/staprun/common.c:201 +msgid "You can't specify the '-A' and '-L' options together.\n" +msgstr "" + +#: runtime/staprun/common.c:206 +msgid "" +"You can't specify the '-A' and '-b' options together. The '-b'\n" +"buffer size option only has an effect when the module is inserted.\n" +msgstr "" + +#: runtime/staprun/common.c:212 +msgid "" +"You can't specify the '-A' and '-c' options together. The '-c cmd'\n" +"option used to start a command only has an effect when the module\n" +"is inserted.\n" +msgstr "" + +#: runtime/staprun/common.c:219 +msgid "" +"You can't specify the '-A' and '-x' options together. The '-x pid'\n" +"option only has an effect when the module is inserted.\n" +msgstr "" + +#: runtime/staprun/common.c:225 +msgid "You can't specify the '-c' and '-x' options together.\n" +msgstr "" + +#: runtime/staprun/common.c:230 +msgid "You can't specify the '-D' and '-L' options together.\n" +msgstr "" + +#: runtime/staprun/common.c:234 +msgid "You can't specify the '-D' and '-d' options together.\n" +msgstr "" + +#: runtime/staprun/common.c:238 +msgid "You can't specify the '-D' and '-c' options together.\n" +msgstr "" + +#: runtime/staprun/common.c:242 +msgid "You have to specify output FILE with '-D' option.\n" +msgstr "" + +#: runtime/staprun/common.c:246 +msgid "You have to specify output FILE with '-S' option.\n" +msgstr "" + +#: runtime/staprun/common.c:253 +#, c-format +msgid "" +"\n" +"%s [-v] [-w] [-u] [-c cmd ] [-x pid] [-u user] [-A|-L|-d]\n" +"\t[-b bufsize] [-o FILE [-D] [-S size[,N]]] MODULE [module-options]\n" +msgstr "" + +#: runtime/staprun/common.c:255 +msgid "" +"-v Increase verbosity.\n" +"-w Suppress warnings.\n" +"-u Load uprobes.ko\n" +"-c cmd Command 'cmd' will be run and staprun will\n" +" exit when it does. The '_stp_target' variable\n" +" will contain the pid for the command.\n" +"-x pid Sets the '_stp_target' variable to pid.\n" +"-o FILE Send output to FILE. This supports strftime(3)\n" +" formats for FILE.\n" +"-b buffer size The systemtap module specifies a buffer size.\n" +" Setting one here will override that value. The\n" +" value should be an integer between 1 and 4095 \n" +" which be assumed to be the buffer size in MB.\n" +" That value will be per-cpu in bulk mode.\n" +"-L Load module and start probes, then detach.\n" +"-A Attach to loaded systemtap module.\n" +"-d Delete a module. Only detached or unused modules\n" +" the user has permission to access will be deleted. Use \"*" +"\"\n" +" (quoted) to delete all unused modules.\n" +"-R Have staprun create a new name for the module before\n" +" inserting it. This allows the same module to be inserted\n" +" more than once.\n" +"-R (Module renaming is not available in this configuration.)\n" +"-D Run in background. This requires '-o' option.\n" +"-S size[,N] Switches output file to next file when the size\n" +" of file reaches the specified size. The value\n" +" should be an integer greater than 1 which is\n" +" assumed to be the maximum file size in MB.\n" +" When the number of output files reaches N, it\n" +" switches to the first output file. You can omit\n" +" the second argument.\n" +"\n" +"MODULE can be either a module name or a module path. If a\n" +"module name is used, it is searched in the following directory:\n" +msgstr "" + +#: runtime/staprun/common.c:336 runtime/staprun/common.c:361 +#: runtime/staprun/common.c:380 runtime/staprun/common.c:387 +msgid "Memory allocation failed. Exiting.\n" +msgstr "" + +#: runtime/staprun/common.c:352 +msgid "Unable to determine kernel version, uname failed" +msgstr "" + +#: runtime/staprun/common.c:400 +#, c-format +msgid "ERROR: Module name ('%s') is too long.\n" +msgstr "" + +#: runtime/staprun/common.c:491 +msgid "exceeded maximum send_request size.\n" +msgstr "" + +#: runtime/staprun/ctl.c:38 +#, c-format +msgid "ERROR: Can not attach. Module %s not running.\n" +msgstr "" + +#: runtime/staprun/ctl.c:40 +#, c-format +msgid "Couldn't open control channel '%s'" +msgstr "" + +#: runtime/staprun/mainloop.c:68 +#, c-format +msgid "Warning: child process exited with signal %d (%s)\n" +msgstr "" + +#: runtime/staprun/mainloop.c:73 +#, c-format +msgid "Warning: child process exited with status %d\n" +msgstr "" + +#: runtime/staprun/mainloop.c:124 +msgid "failed to create thread" +msgstr "" + +#: runtime/staprun/mainloop.c:206 +msgid "wordexp: syntax error (unmatched quotes?) in -c COMMAND\n" +msgstr "" + +#: runtime/staprun/mainloop.c:209 +#, c-format +msgid "wordexp: parsing error (%d)\n" +msgstr "" + +#: runtime/staprun/mainloop.c:317 runtime/staprun/mainloop.c:323 +msgid "Couldn't read bufsize" +msgstr "" + +#: runtime/staprun/mainloop.c:343 +msgid "Failed to initialize control channel.\n" +msgstr "" + +#: runtime/staprun/mainloop.c:378 +msgid "Failed to daemonize stapio\n" +msgstr "" + +#: runtime/staprun/mainloop.c:393 +msgid "Failed to open /dev/null\n" +msgstr "" + +#: runtime/staprun/mainloop.c:444 +#, c-format +msgid "" +"\n" +"Disconnecting from systemtap module.\n" +"To reconnect, type \"staprun -A %s\"\n" +msgstr "" + +#: runtime/staprun/mainloop.c:560 +#, c-format +msgid "Unexpected EOF in read (nb=%ld)" +msgstr "" + +#: runtime/staprun/mainloop.c:575 +#, c-format +msgid "write error (nb=%ld)" +msgstr "" + +#: runtime/staprun/mainloop.c:608 +msgid "WARNING deduplication table full\n" +msgstr "" + +#: runtime/staprun/mainloop.c:674 +msgid "ptrace detach" +msgstr "" + +#: runtime/staprun/mainloop.c:707 +#, c-format +msgid "WARNING: ignored message of type %d\n" +msgstr "" + +#: runtime/staprun/stapio.c:46 +msgid "ERROR: Cannot have module options with attach (-A).\n" +msgstr "" + +#: runtime/staprun/stapio.c:57 +msgid "ERROR: Need a module name or path to load.\n" +msgstr "" + +#: runtime/staprun/stapio.c:65 +msgid "ERROR: Couldn't enter main loop. Exiting.\n" +msgstr "" + +#: session.cxx:186 +#, c-format +msgid "" +"Warning: failed to create systemtap data directory \"%s\":%s, disabling " +"cache support." +msgstr "" + +#: session.cxx:198 +#, c-format +msgid "" +"Warning: failed to create cache directory (\" %s \"): %s, disabling cache " +"support." +msgstr "" + +#: session.cxx:363 +#, c-format +msgid "" +"Systemtap translator/driver (version %s/%s %s)\n" +"Copyright (C) 2005-2011 Red Hat, Inc. and others\n" +"This is free software; see the source for copying conditions." +msgstr "" + +#: session.cxx:367 +msgid "enabled features:" +msgstr "" + +#: session.cxx:402 +#, c-format +msgid "" +"Usage: stap [options] FILE Run script in file.\n" +" or: stap [options] - Run script on stdin.\n" +" or: stap [options] -e SCRIPT Run given script.\n" +" or: stap [options] -l PROBE List matching probes.\n" +" or: stap [options] -L PROBE List matching probes and local " +"variables.\n" +"\n" +"Options:\n" +" -- end of translator options, script options follow\n" +" -h --help show help\n" +" -V --version show version\n" +" -p NUM stop after pass NUM 1-5, instead of %d\n" +" (parse, elaborate, translate, compile, run)\n" +" -v add verbosity to all passes\n" +" --vp {N}+ add per-pass verbosity [" +msgstr "" + +#: session.cxx:427 session.cxx:428 session.cxx:429 session.cxx:430 +msgid " [set]" +msgstr "" + +#: session.cxx:419 +#, c-format +msgid "" +" -k keep temporary directory\n" +" -u unoptimized translation %s\n" +" -w suppress warnings %s\n" +" -W turn warnings into errors %s\n" +" -g guru mode %s\n" +" -P prologue-searching for function probes %s\n" +" -b bulk (percpu file) mode %s\n" +" -s NUM buffer size in megabytes, instead of %d\n" +" -I DIR look in DIR for additional .stp script files" +msgstr "" + +#: session.cxx:434 session.cxx:461 +msgid ", in addition to" +msgstr "" + +#: session.cxx:438 +#, c-format +msgid "" +" -D NM=VAL emit macro definition into generated C code\n" +" -B NM=VAL pass option to kbuild make\n" +" -G VAR=VAL set global variable to value\n" +" -R DIR look in DIR for runtime, instead of\n" +" %s\n" +" -r DIR cross-compile to kernel with given build tree; or else\n" +" -r RELEASE cross-compile to kernel /lib/modules/RELEASE/build, instead " +"of\n" +" %s\n" +" -a ARCH cross-compile to given architecture, instead of %s\n" +" -m MODULE set probe module name, instead of \n" +" %s\n" +" -o FILE send script output to file, instead of stdout. This supports\n" +" strftime(3) formats for FILE\n" +" -c CMD start the probes, run CMD, and exit when it finishes\n" +" -x PID sets target() to PID\n" +" -F run as on-file flight recorder with -o.\n" +" run as on-memory flight recorder without -o.\n" +" -S size[,n] set maximum of the size and the number of files.\n" +" -d OBJECT add unwind/symbol data for OBJECT file" +msgstr "" + +#: session.cxx:468 +#, c-format +msgid "" +" --ldd add unwind/symbol data for all referenced object files.\n" +" --all-modules\n" +" add unwind/symbol data for all loaded kernel objects.\n" +" -t collect probe timing information\n" +" -q generate information on tapset coverage\n" +" --unprivileged\n" +" restrict usage to features available to unprivileged users\n" +" --kelf make do with symbol table from vmlinux\n" +" --kmap[=FILE]\n" +" make do with symbol table from nm listing\n" +" --compatible=VERSION\n" +" suppress incompatible language/tapset changes beyond VERSION,\n" +" instead of %s\n" +" --check-version\n" +" displays warnings where a syntax element may be \n" +" version dependent\n" +" --skip-badvars\n" +" substitute zero for bad context $variables\n" +" --use-server[=SERVER-SPEC]\n" +" specify systemtap compile-servers\n" +" --list-servers[=PROPERTIES]\n" +" report on the status of the specified compile-servers:\n" +" all,specified,online,trusted,signer,compatible\n" +" --trust-servers[=TRUST-SPEC]\n" +" add/revoke trust of specified compile-servers:\n" +" ssl,signer,all-users,revoke,no-prompt\n" +" --use-server-on-error[=yes/no]\n" +" retry compilation using a compile server upon compilation " +"error\n" +" --remote=HOSTNAME\n" +" run pass 5 on the specified ssh host.\n" +" may be repeated for targeting multiple hosts.\n" +" --remote-prefix\n" +" prefix each line of remote output with a host index.\n" +" --tmpdir=NAME\n" +" specify name of temporary directory to be used." +msgstr "" + +#: session.cxx:643 +msgid "Invalid pass number (should be 1-5)." +msgstr "" + +#: session.cxx:648 +msgid "Listing (-l) mode implies pass 2." +msgstr "" + +#: session.cxx:685 session.cxx:849 +msgid "Only one script can be given on the command line." +msgstr "" + +#: session.cxx:701 session.cxx:758 session.cxx:830 session.cxx:864 +#, c-format +msgid "ERROR: %s invalid with %s" +msgstr "" + +#: session.cxx:718 session.cxx:736 +#, c-format +msgid "Truncating module name to '%s'" +msgstr "" + +#: session.cxx:724 +msgid "Module name cannot be empty." +msgstr "" + +#: session.cxx:787 +msgid "Invalid buffer size (should be 1-4095)." +msgstr "" + +#: session.cxx:800 +msgid "Empty CMD string invalid." +msgstr "" + +#: session.cxx:809 +msgid "Invalid target process ID number." +msgstr "" + +#: session.cxx:885 +msgid "You can't specify multiple --kmap options." +msgstr "" + +#: session.cxx:916 +msgid "Invalid --vp argument: it takes 1 to 5 digits." +msgstr "" + +#: session.cxx:967 +#, c-format +msgid "Invalid argument '%s' for --use-server-on-error." +msgstr "" + +#: session.cxx:995 session.cxx:1002 session.cxx:1009 session.cxx:1022 +#: session.cxx:1031 session.cxx:1039 session.cxx:1048 +#, c-format +msgid "ERROR: %s is invalid with %s" +msgstr "" + +#: session.cxx:1062 +#, c-format +msgid "Unhandled long argument id %d" +msgstr "" + +#: session.cxx:1076 +#, c-format +msgid "Unhandled argument code %d" +msgstr "" + +#: session.cxx:1118 +msgid "A script must be specified." +msgstr "" + +#: session.cxx:1125 +msgid "WARNING: --client-options is not supported by this version of systemtap" +msgstr "" + +#: session.cxx:1129 +msgid "WARNING: --trust-servers is not supported by this version of systemtap" +msgstr "" + +#: session.cxx:1136 +msgid "Warning: Ignoring --use-server due to the use of -R" +msgstr "" + +#: session.cxx:1160 +msgid "Using --unprivileged for member of the group stapusr" +msgstr "" + +#: session.cxx:1167 +msgid "Using --use-server for member of the group stapusr" +msgstr "" + +#: session.cxx:1176 +#, c-format +msgid "You can't specify %s when --unprivileged is specified." +msgstr "" + +#: session.cxx:1182 session.cxx:1187 session.cxx:1194 session.cxx:1205 +#, c-format +msgid "You can't specify %s and %s together." +msgstr "" + +#: session.cxx:1214 +msgid "" +"WARNING: kernel release/architecture mismatch with host forces last-pass 4." +msgstr "" + +#: session.cxx:1301 +#, c-format +msgid "Located kernel source tree (COPYING) at '%s'" +msgstr "" + +#: session.cxx:1343 +#, c-format +msgid "alias component %s contains illegal parameter" +msgstr "" + +#: session.cxx:1355 +msgid " while registering probe alias " +msgstr "" + +#: session.cxx:1408 +#, c-format +msgid "semantic error: %s" +msgstr "" + +#. TRANSLATORS: Here were are printing the source string of the error +#: session.cxx:1467 +msgid "source: " +msgstr "" + +#: stap-authorize-cert.cxx:51 +msgid "Certificate file must be specified" +msgstr "" + +#: stap-authorize-cert.cxx:59 +msgid "Certificate database directory must be specified" +msgstr "" + +#: stap-authorize-cert.cxx:74 +msgid "Unable to authorize certificate" +msgstr "" + +#: stap-gen-cert.cxx:68 +#, c-format +msgid "%s : unhandled option '%c %s'" +msgstr "" + +#: stap-gen-cert.cxx:70 +#, c-format +msgid "%s : unhandled option '%c'" +msgstr "" + +#: stap-gen-cert.cxx:114 +msgid "Unable to generate certificate" +msgstr "" + +#: stap-serverd.cxx:121 +#, c-format +msgid "Could not open client stderr file %s: %s" +msgstr "" + +#: stap-serverd.cxx:224 +#, c-format +msgid "%s: unhandled option '%c %s'" +msgstr "" + +#: stap-serverd.cxx:226 +#, c-format +msgid "%s: unhandled option '%c'" +msgstr "" + +#: stap-serverd.cxx:242 +#, c-format +msgid "%s: unhandled option '--%s=%s'" +msgstr "" + +#: stap-serverd.cxx:245 +#, c-format +msgid "%s: unhandled option '--%s'" +msgstr "" + +#: stap-serverd.cxx:253 +#, c-format +msgid "%s: unrecognized argument '%s'" +msgstr "" + +#: stap-serverd.cxx:289 +#, c-format +msgid "Received signal %d, exiting" +msgstr "" + +#: stap-serverd.cxx:348 +#, c-format +msgid "Service '%s' successfully established." +msgstr "" + +#: stap-serverd.cxx:358 stap-serverd.cxx:449 +#, c-format +msgid "Avahi service name collision, renaming service to '%s'" +msgstr "" + +#: stap-serverd.cxx:366 +#, c-format +msgid "Avahi entry group failure: %s" +msgstr "" + +#: stap-serverd.cxx:387 +#, c-format +msgid "avahi_entry_group_new () failed: %s" +msgstr "" + +#: stap-serverd.cxx:396 +#, c-format +msgid "Adding Avahi service '%s'" +msgstr "" + +#: stap-serverd.cxx:429 +#, c-format +msgid "Failed to add _stap._tcp service: %s" +msgstr "" + +#: stap-serverd.cxx:436 +#, c-format +msgid "Failed to commit avahi entry group: %s" +msgstr "" + +#: stap-serverd.cxx:474 +#, c-format +msgid "Avahi client failure: %s" +msgstr "" + +#: stap-serverd.cxx:500 +#, c-format +msgid "Removing Avahi service '%s'" +msgstr "" + +#: stap-serverd.cxx:538 +msgid "Failed to create avahi threaded poll object." +msgstr "" + +#: stap-serverd.cxx:550 +#, c-format +msgid "Failed to create avahi client: %s" +msgstr "" + +#: stap-serverd.cxx:567 +msgid "Unable to advertise presence on the network. Avahi is not available" +msgstr "" + +#: stap-serverd.cxx:599 +#, c-format +msgid "Unable to obtain current resource limits: %s" +msgstr "" + +#: stap-serverd.cxx:637 +#, c-format +msgid "===== compile server pid %d starting =====" +msgstr "" + +#: stap-serverd.cxx:677 +msgid "Error reading size of request file" +msgstr "" + +#: stap-serverd.cxx:682 stap-serverd.cxx:713 +msgid "Error in PR_Read" +msgstr "" + +#: stap-serverd.cxx:700 +#, c-format +msgid "Could not open output file %s" +msgstr "" + +#: stap-serverd.cxx:722 +#, c-format +msgid "Could not write to output file %s" +msgstr "" + +#: stap-serverd.cxx:730 +#, c-format +msgid "Expected %d bytes, got %d while reading client request from socket" +msgstr "" + +#: stap-serverd.cxx:758 +msgid "Could not import socket into SSL" +msgstr "" + +#: stap-serverd.cxx:767 +msgid "Error setting SSL security for socket" +msgstr "" + +#: stap-serverd.cxx:775 +msgid "Error setting handshake as server for socket" +msgstr "" + +#: stap-serverd.cxx:783 stap-serverd.cxx:791 +msgid "Error setting SSL client authentication mode for socket" +msgstr "" + +#: stap-serverd.cxx:802 +msgid "Error in SSL_AuthCertificateHook" +msgstr "" + +#: stap-serverd.cxx:811 +msgid "Error in SSL_BadCertHook" +msgstr "" + +#: stap-serverd.cxx:819 +msgid "Error in SSL_HandshakeCallback" +msgstr "" + +#: stap-serverd.cxx:830 +msgid "Error configuring SSL server" +msgstr "" + +#: stap-serverd.cxx:864 +msgid "Error in SSL_OptionSet:SSL_REQUEST_CERTIFICATE" +msgstr "" + +#: stap-serverd.cxx:874 +msgid "Error in SSL_OptionSet:SSL_REQUIRE_CERTIFICATE" +msgstr "" + +#: stap-serverd.cxx:883 +msgid "Error in SSL_ReHandshake" +msgstr "" + +#: stap-serverd.cxx:892 +msgid "Error in SSL_ForceHandshake" +msgstr "" + +#: stap-serverd.cxx:912 +#, c-format +msgid "Could not open input file %s" +msgstr "" + +#: stap-serverd.cxx:928 +msgid "Error writing response to socket" +msgstr "" + +#: stap-serverd.cxx:951 +#, c-format +msgid "Unable to open file %s for reading: %s" +msgstr "" + +#: stap-serverd.cxx:975 +#, c-format +msgid "Error in regcomp: %s" +msgstr "" + +#: stap-serverd.cxx:998 +#, c-format +msgid "Localization key '%s' not found in global list" +msgstr "" + +#: stap-serverd.cxx:1006 +#, c-format +msgid "Localization value '%s' contains illegal characters" +msgstr "" + +#: stap-serverd.cxx:1017 +#, c-format +msgid "Error reading file %s: %s" +msgstr "" + +#: stap-serverd.cxx:1050 +#, c-format +msgid "Unable to open client version file %s" +msgstr "" + +#: stap-serverd.cxx:1056 +#, c-format +msgid "Client version is %s" +msgstr "" + +#: stap-serverd.cxx:1068 +msgid "Cannot parse stap options" +msgstr "" + +#: stap-serverd.cxx:1080 +#, c-format +msgid "Could not create temporary directory %s" +msgstr "" + +#: stap-serverd.cxx:1100 +msgid "Out of memory" +msgstr "" + +#: stap-serverd.cxx:1108 +#, c-format +msgid "Error opening %s: %s" +msgstr "" + +#: stap-serverd.cxx:1117 +#, c-format +msgid "Error reading %s: %s" +msgstr "" + +#: stap-serverd.cxx:1182 +#, c-format +msgid "Unable to find a module in %s" +msgstr "" + +#: stap-serverd.cxx:1184 +#, c-format +msgid "Too many modules (%zu) in %s" +msgstr "" + +#: stap-serverd.cxx:1211 +#, c-format +msgid "Could not link to %s from %s" +msgstr "" + +#: stap-serverd.cxx:1269 +msgid "Error in spawn getcwd" +msgstr "" + +#: stap-serverd.cxx:1277 +msgid "Error in spawn chdir" +msgstr "" + +#: stap-serverd.cxx:1300 +#, c-format +msgid "Unable to set resource limits for %s: %s" +msgstr "" + +#: stap-serverd.cxx:1311 +#, c-format +msgid "Unable to restore resource limits after %s: %s" +msgstr "" + +#: stap-serverd.cxx:1321 +msgid "Error in spawn unchdir" +msgstr "" + +#: stap-serverd.cxx:1326 +#, c-format +msgid "Error in spawn: %s" +msgstr "" + +#: stap-serverd.cxx:1333 +msgid "Error in waitpid" +msgstr "" + +#: stap-serverd.cxx:1385 +msgid "Error resetting SSL handshake" +msgstr "" + +#: stap-serverd.cxx:1395 +msgid "Error forcing SSL handshake" +msgstr "" + +#: stap-serverd.cxx:1406 stap-serverd.cxx:1418 stap-serverd.cxx:1426 +#, c-format +msgid "Could not create temporary directory %s: %s" +msgstr "" + +#: stap-serverd.cxx:1465 +msgid "Unable to extract client request" +msgstr "" + +#: stap-serverd.cxx:1484 +msgid "Unable to compress server response" +msgstr "" + +#: stap-serverd.cxx:1494 +msgid "Error closing ssl socket" +msgstr "" + +#: stap-serverd.cxx:1502 +#, c-format +msgid "Keeping temporary directory %s" +msgstr "" + +#: stap-serverd.cxx:1511 +msgid "Error in tmpdir cleanup" +msgstr "" + +#: stap-serverd.cxx:1537 +msgid "Unable to obtain certificate private key" +msgstr "" + +#: stap-serverd.cxx:1548 +msgid "Error accepting client connection" +msgstr "" + +#: stap-serverd.cxx:1553 +#, c-format +msgid "Accepted connection from %d.%d.%d.%d:%d" +msgstr "" + +#: stap-serverd.cxx:1566 +msgid "Error processing client request" +msgstr "" + +#: stap-serverd.cxx:1569 +#, c-format +msgid "Request from %d.%d.%d.%d:%d complete" +msgstr "" + +#: stap-serverd.cxx:1630 +msgid "Unable to configure SSL server session ID cache" +msgstr "" + +#: stap-serverd.cxx:1640 +#, c-format +msgid "Unable to find our certificate in the database at %s" +msgstr "" + +#: stap-serverd.cxx:1663 +msgid "Unable to shut down server session ID cache" +msgstr "" + +#: stap-serverd.cxx:1678 +msgid "Error creating socket" +msgstr "" + +#: stap-serverd.cxx:1690 stap-serverd.cxx:1702 +msgid "Error setting socket properties" +msgstr "" + +#: stap-serverd.cxx:1727 +#, c-format +msgid "Network port %d is unavailable. Trying another port" +msgstr "" + +#: stap-serverd.cxx:1731 +#, c-format +msgid "Network port %d is busy. Trying another port" +msgstr "" + +#: stap-serverd.cxx:1735 +msgid "Error setting socket address" +msgstr "" + +#: stap-serverd.cxx:1745 +msgid "Unable to obtain socket address" +msgstr "" + +#: stap-serverd.cxx:1750 +#, c-format +msgid "Using network port %d" +msgstr "" + +#: stap-serverd.cxx:1757 +msgid "Error listening on socket" +msgstr "" + +#: stap-serverd.cxx:1780 +msgid "Unable to authorize certificate for the local client" +msgstr "" + +#: stap-serverd.cxx:1791 +msgid "Error closing listen socket" +msgstr "" + +#: stap-sign-module.cxx:51 +msgid "Module name was not specified." +msgstr "" + +#: staptree.cxx:161 +msgid "inconsistent arity" +msgstr "" + +#: staptree.cxx:165 +#, c-format +msgid "inconsistent arity (%s vs %d)" +msgstr "" + +#: staptree.cxx:168 +#, c-format +msgid "arity %s first inferred here" +msgstr "" + +#: staptree.cxx:203 +msgid "internal error, joining a non-synthetic function" +msgstr "" + +#: staptree.cxx:205 +#, c-format +msgid "synthetic function '%s' conflicts with an existing function" +msgstr "" + +#: staptree.cxx:251 +#, c-format +msgid "%s variable '%s' may not be used as array" +msgstr "" + +#: staptree.cxx:254 +#, c-format +msgid "%s variable '%s' may not be used as a structure" +msgstr "" + +#: staptree.cxx:258 +#, c-format +msgid "%s variable '%s' may not be pretty-printed" +msgstr "" + +#: staptree.cxx:262 +#, c-format +msgid "invalid use of %s variable '%s'" +msgstr "" + +#: staptree.cxx:854 +msgid "invalid or missing conversion specifier" +msgstr "" + +#: staptree.cxx:867 +msgid "trailing incomplete print format conversion" +msgstr "" + +#: staptree.cxx:1574 staptree.cxx:1587 +msgid "Expecting symbol or histogram operator" +msgstr "" + +#: staptree.cxx:1576 +msgid "Failed to classify indexable" +msgstr "" + +#: staptree.cxx:1930 +msgid "function may not be used when --unprivileged is specified" +msgstr "" + +#: staptree.cxx:1935 +msgid "function may not be used unless -g is specified" +msgstr "" + +#: staptree.cxx:1964 +msgid "embedded expression may not be used when --unprivileged is specified" +msgstr "" + +#: staptree.cxx:1969 +msgid "embedded expression may not be used unless -g is specified" +msgstr "" + +#: staptree.cxx:2075 +msgid "symbol without referent" +msgstr "" + +#: staptree.cxx:2264 +msgid "invalid element" +msgstr "" + +#: tapset-itrace.cxx:79 tapsets.cxx:6246 tapset-utrace.cxx:128 +msgid "process probes not available without kernel CONFIG_UTRACE" +msgstr "" + +#: tapset-mark.cxx:100 +msgid "invalid marker argument number" +msgstr "" + +#: tapset-mark.cxx:103 +msgid "write to marker parameter not permitted" +msgstr "" + +#: tapset-mark.cxx:123 +#, c-format +msgid "write to marker '%s' not permitted" +msgstr "" + +#: tapset-mark.cxx:187 +msgid "cannot take address of marker variable" +msgstr "" + +#: tapset-mark.cxx:195 +msgid "" +"invalid target symbol for marker, $argN, $name, $format, $$parms or $$vars " +"expected" +msgstr "" + +#: tapset-mark.cxx:449 translate.cxx:2019 +msgid "cannot expand unknown type" +msgstr "" + +#: tapset-mark.cxx:582 +msgid "mark_builder releasing cache" +msgstr "" + +#. TRANSLATORS: specific path cannot be opened +#: tapset-mark.cxx:620 +msgid " cannot be opened: " +msgstr "" + +#: tapset-perfmon.cxx:200 +msgid "" +"perf probes not available without exported perf_event_create_kernel_counter" +msgstr "" + +#: tapset-perfmon.cxx:202 +msgid "perf probes not available without CONFIG_PERF_EVENTS" +msgstr "" + +#: tapset-perfmon.cxx:217 +msgid "invalid perf sample period " +msgstr "" + +#: tapset-perfmon.cxx:221 +#, c-format +msgid "perf probe type=% config=% period=%" +msgstr "" + +#: tapset-procfs.cxx:147 +msgid "only one write procfs probe can exist for procfs path \"" +msgstr "" + +#: tapset-procfs.cxx:149 +msgid "only one read procfs probe can exist for procfs path \"" +msgstr "" + +#: tapset-procfs.cxx:406 +msgid "invalid target symbol for procfs probe, $value expected" +msgstr "" + +#: tapset-procfs.cxx:413 +msgid "procfs $value variable is read-only in a procfs write probe" +msgstr "" + +#: tapset-procfs.cxx:415 +msgid "procfs $value variable cannot be read in a procfs read probe" +msgstr "" + +#: tapset-procfs.cxx:418 +msgid "cannot take address of procfs variable" +msgstr "" + +#: tapset-procfs.cxx:459 +msgid "" +"Only the following assign operators are implemented on procfs read target " +"variables: '=', '.='" +msgstr "" + +#: tapset-procfs.cxx:547 +msgid "maxsize must be greater than 0" +msgstr "" + +#: tapset-procfs.cxx:569 +msgid "procfs path cannot start with a '/'" +msgstr "" + +#: tapset-procfs.cxx:575 +msgid "procfs path component cannot be empty" +msgstr "" + +#: tapset-procfs.cxx:579 tapset-procfs.cxx:589 +msgid "procfs path cannot be relative (and contain '.' or '..')" +msgstr "" + +#: tapset-procfs.cxx:586 +msgid "procfs path cannot end with a '/'" +msgstr "" + +#: tapset-procfs.cxx:593 +msgid "need read/write component" +msgstr "" + +#: tapsets.cxx:872 +#, c-format +msgid "" +"Error: Pattern '%s' matches every single instruction address in the symbol " +"table,\n" +"some of which aren't even functions.\n" +msgstr "" + +#: tapsets.cxx:906 +#, c-format +msgid "Warning: address %# out of range for module %s" +msgstr "" + +#: tapsets.cxx:917 +#, c-format +msgid "" +"Warning: address %# maps to no known compilation unit in module %s" +msgstr "" + +#: tapsets.cxx:1027 +#, c-format +msgid "parse '%s'" +msgstr "" + +#: tapsets.cxx:1068 +#, c-format +msgid "malformed specification '%s'" +msgstr "" + +#: tapsets.cxx:1097 +msgid "probe " +msgstr "" + +#: tapsets.cxx:1099 +msgid " kernel" +msgstr "" + +#: tapsets.cxx:1101 +msgid " module=" +msgstr "" + +#: tapsets.cxx:1103 +msgid " process=" +msgstr "" + +#: tapsets.cxx:1317 +#, c-format +msgid "address 0x%# does not match the beginning of a statement" +msgstr "" + +#: tapsets.cxx:1320 +#, c-format +msgid " (try 0x%#)" +msgstr "" + +#: tapsets.cxx:1322 +#, c-format +msgid " (no line info found for '%s', in module '%s')" +msgstr "" + +#: tapsets.cxx:1376 +#, c-format +msgid "querying entrypc %# of instance of inline '%s'\n" +msgstr "" + +#: tapsets.cxx:1457 +msgid "function DIE lands on srcfile\n" +msgstr "" + +#: tapsets.cxx:1478 +msgid "inline instance DIE lands on srcfile\n" +msgstr "" + +#: tapsets.cxx:1519 +#, c-format +msgid "selected inline instance of %s\n" +msgstr "" + +#: tapsets.cxx:1575 +#, c-format +msgid "checking instances of inline %s\n" +msgstr "" + +#: tapsets.cxx:1585 +#, c-format +msgid "selected function %s\n" +msgstr "" + +#: tapsets.cxx:1623 +#, c-format +msgid "focused on CU '%s', in module '%s'\n" +msgstr "" + +#: tapsets.cxx:1664 +msgid "" +"For probing a particular line, use a .statement() probe, not .function()" +msgstr "" + +#: tapsets.cxx:1821 +#, c-format +msgid "ELF machine %s|%s (code %d) mismatch with target %s in '%s'" +msgstr "" + +#: tapsets.cxx:1828 +#, c-format +msgid "" +"focused on module '%s' = [0x%#, -0x%#, bias 0x%# " +"file %s ELF machine %s|%s (code %d)\n" +msgstr "" + +#: tapsets.cxx:1917 +#, c-format +msgid "focused on module '%s'\n" +msgstr "" + +#: tapsets.cxx:1987 +msgid "module=" +msgstr "" + +#: tapsets.cxx:2008 +msgid "deleting module_cache" +msgstr "" + +#: tapsets.cxx:2110 +#, c-format +msgid "" +"Only the following assign operator is implemented on target variables: %s" +msgid_plural "" +"Only the following assign operators are implemented on target variables: %s" +msgstr[0] "" +msgstr[1] "" +msgstr[2] "" + +#: tapsets.cxx:2303 +msgid "cannot take address of pretty-printed variable" +msgstr "" + +#: tapsets.cxx:2307 +msgid "invalid target_symbol for pretty-print" +msgstr "" + +#: tapsets.cxx:3089 +msgid "unknown type to save in kretprobe" +msgstr "" + +#: tapsets.cxx:3239 tapsets.cxx:8211 +msgid "variable location problem: " +msgstr "" + +#: tapsets.cxx:3273 +msgid "write to target variable not permitted" +msgstr "" + +#: tapsets.cxx:3285 +msgid "write to target variable not permitted in .return probes" +msgstr "" + +#: tapsets.cxx:3294 +msgid "cannot write to context variable" +msgstr "" + +#: tapsets.cxx:3297 tapsets.cxx:4901 tapsets.cxx:8166 +msgid "cannot take address of context variable" +msgstr "" + +#: tapsets.cxx:3309 tapsets.cxx:3570 tapsets.cxx:8063 +msgid "cannot write to pretty-printed variable" +msgstr "" + +#. TRANSLATORS: Here we're using a cached module. +#: tapsets.cxx:3690 +msgid "Pass 2: using cached " +msgstr "" + +#: tapsets.cxx:3713 +msgid "write to @cast context variable not permitted" +msgstr "" + +#: tapsets.cxx:3853 +msgid "missing relocation basis" +msgstr "" + +#: tapsets.cxx:3855 +msgid "inconsistent relocation address" +msgstr "" + +#: tapsets.cxx:3865 +#, c-format +msgid "maxactive value out of range [0,%s]" +msgstr "" + +#: tapsets.cxx:3996 +#, c-format +msgid "saveargs: examining '%s' (dieoffset: %#)\n" +msgstr "" + +#: tapsets.cxx:4008 +#, c-format +msgid "" +"saveargs: failed to retrieve type name for return value (dieoffset: %s)\n" +msgstr "" + +#: tapsets.cxx:4036 +#, c-format +msgid "saveargs: failed to retrieve name for local (dieoffset: %s)\n" +msgstr "" + +#: tapsets.cxx:4042 +#, c-format +msgid "saveargs: finding location for local '%s' (dieoffset: %s)\n" +msgstr "" + +#: tapsets.cxx:4057 +#, c-format +msgid "" +"saveargs: failed to resolve the location for local '%s' (dieoffset: %s)\n" +msgstr "" + +#: tapsets.cxx:4065 +#, c-format +msgid "" +"saveargs: local '%s' (dieoffset: %s) is not available at this address (%s)\n" +msgstr "" + +#: tapsets.cxx:4078 +#, c-format +msgid "saveargs: failed to retrieve type name for local '%s' (dieoffset: %s)\n" +msgstr "" + +#: tapsets.cxx:5222 +#, c-format +msgid "Can't parse SDT_V3 operand '%s'" +msgstr "" + +#: tapsets.cxx:5224 +#, c-format +msgid "Downgrading SDT_V2 probe argument to dwarf, can't parse '%s'" +msgstr "" + +#. TRANSLATORS: We're mapping the operand to a new expression*. +#: tapsets.cxx:5237 +#, c-format +msgid "mapped asm operand %s to " +msgstr "" + +#: tapsets.cxx:5242 tapsets.cxx:5372 +msgid "cannot take address of sdt variable" +msgstr "" + +#: tapsets.cxx:5297 tapsets.cxx:5307 +msgid "cannot take address of sdt context variable" +msgstr "" + +#: tapsets.cxx:5325 +msgid "invalid variable, must be of the form $argN" +msgstr "" + +#: tapsets.cxx:5327 +msgid "invalid argument number" +msgstr "" + +#. TRANSLATORS: Describing what probe type (kprobe or uprobe) the probe +#. TRANSLATORS: is matched to. +#: tapsets.cxx:5484 +#, c-format +msgid "matched probe_name %s probe type " +msgstr "" + +#: tapsets.cxx:5743 tapsets.cxx:5807 +msgid " (provider " +msgstr "" + +#: tapsets.cxx:5743 +#, c-format +msgid " saw .note.stapsdt %s%s " +msgstr "" + +#: tapsets.cxx:5764 +#, c-format +msgid "got unknown probe_type : 0x%x" +msgstr "" + +#: tapsets.cxx:5807 +msgid "saw .probes " +msgstr "" + +#: tapsets.cxx:5825 +#, c-format +msgid "looking for semaphore symbol %s " +msgstr "" + +#: tapsets.cxx:5840 +msgid ", found at 0x" +msgstr "" + +#: tapsets.cxx:5845 +msgid ", not found" +msgstr "" + +#: tapsets.cxx:5972 +msgid "probe_type == uprobe1, use statement addr: 0x" +msgstr "" + +#: tapsets.cxx:5976 +msgid "probe_type == uprobe2, use statement addr: 0x" +msgstr "" + +#: tapsets.cxx:5980 +msgid "probe_type == uprobe3, use statement addr: 0x" +msgstr "" + +#: tapsets.cxx:5990 +#, c-format +msgid "probe_type == use_uprobe_no_dwarf, use label name: _stapprobe1_%s" +msgstr "" + +#: tapsets.cxx:6074 +msgid "unspecified process probe is invalid without a -c COMMAND" +msgstr "" + +#: tapsets.cxx:6099 +#, c-format +msgid "glob %s error (%s)" +msgstr "" + +#: tapsets.cxx:6120 tapsets.cxx:6210 +#, c-format +msgid "Expanded process(\"%s\") to process(\"%s\")" +msgstr "" + +#: tapsets.cxx:6254 +#, c-format +msgid "dwarf_builder::build for %s" +msgstr "" + +#: tapsets.cxx:6274 tapsets.cxx:7593 +msgid "absolute statement probe in unprivileged script" +msgstr "" + +#: tapsets.cxx:6314 +#, c-format +msgid "cannot probe .return of %u inlined function %s" +msgid_plural "cannot probe .return of %u inlined functions %s" +msgstr[0] "" +msgstr[1] "" +msgstr[2] "" + +#: tapsets.cxx:6320 +#, c-format +msgid "skipped .return probe of %u inlined function" +msgid_plural "skipped .return probe of %u inlined functions" +msgstr[0] "" +msgstr[1] "" +msgstr[2] "" + +#: tapsets.cxx:6378 +#, c-format +msgid "" +"Symbol table error: Line %d of symbol list from %s is not in correct format: " +"address type name [module]" +msgstr "" + +#: tapsets.cxx:6395 +#, c-format +msgid "Symbol table error: %s contains no function symbols." +msgstr "" + +#: tapsets.cxx:6421 +#, c-format +msgid "Internal error reading symbol table from %s -- %s" +msgstr "" + +#: tapsets.cxx:6429 +#, c-format +msgid "Warning: nm cannot read symbol table from %s" +msgstr "" + +#: tapsets.cxx:6443 +#, c-format +msgid "Warning: cannot read symbol table from %s -- %s" +msgstr "" + +#: tapsets.cxx:6593 +#, c-format +msgid "Warning: reading symbol table from %s -- ignoring %s" +msgstr "" + +#: tapsets.cxx:6603 +msgid "Error: Cannot find vmlinux. Consider using --kmap instead of --kelf." +msgstr "" + +#: tapsets.cxx:7724 +#, c-format +msgid "Too many hardware breakpoint probes requested for %s (%zu vs. %u)" +msgstr "" + +#: tapsets.cxx:7912 +msgid "CONFIG_PERF_EVENTS not available on this kernel" +msgstr "" + +#: tapsets.cxx:7915 +msgid "CONFIG_HAVE_HW_BREAKPOINT not available on this kernel" +msgstr "" + +#: tapsets.cxx:8022 +#, c-format +msgid "unable to find tracepoint variable '%s' (alternatives: %s)" +msgstr "" + +#: tapsets.cxx:8036 +#, c-format +msgid "write to tracepoint variable '%s' not permitted" +msgstr "" + +#: tapsets.cxx:8045 +msgid "cannot take address of tracepoint variable" +msgstr "" + +#: tapsets.cxx:8169 +#, c-format +msgid "write to tracepoint '%s' not permitted" +msgstr "" + +#: tapsets.cxx:8375 +#, c-format +msgid "cannot get type of parameter '%s' of tracepoint '%s'" +msgstr "" + +#: tapsets.cxx:8381 +#, c-format +msgid "found parameter for tracepoint '%s': type:'%s' name:'%s'" +msgstr "" + +#: tapsets.cxx:8712 +msgid "tracepoint_builder releasing dwflpp" +msgstr "" + +#: tapsets.cxx:8732 +#, c-format +msgid "Pass 2: getting a tracepoint query for %zu headers: " +msgstr "" + +#: tapsets.cxx:8748 +#, c-format +msgid "Pass 2: using cached %s" +msgstr "" + +#: tapsets.cxx:8814 +#, c-format +msgid "Located kernel source tree (DW_AT_comp_dir) at '%s'" +msgstr "" + +#: tapsets.cxx:8846 +msgid "Checking tracepoint glob " +msgstr "" + +#. TRANSLATORS: 'timer' is the name of a probe point +#: tapset-timers.cxx:64 +msgid "invalid interval for jiffies timer" +msgstr "" + +#. TRANSLATORS: 'randomize' is a key word +#: tapset-timers.cxx:68 +msgid "invalid randomize for jiffies timer" +msgstr "" + +#: tapset-timers.cxx:71 +msgid "only expect one probe point" +msgstr "" + +#: tapset-timers.cxx:199 +#, c-format +msgid "interval value out of range (%s, %s)" +msgstr "" + +#: tapset-timers.cxx:205 +msgid "randomization value out of range" +msgstr "" + +#: tapset-timers.cxx:553 +msgid "frequency must be greater than 0" +msgstr "" + +#: tapset-timers.cxx:583 +msgid "unrecognized timer variant" +msgstr "" + +#: tapset-utrace.cxx:471 +msgid "only \"process(PATH_OR_PID).syscall\" support $argN or $$parms." +msgstr "" + +#: tapset-utrace.cxx:517 tapset-utrace.cxx:524 +msgid "invalid syscall argument number (1-6)" +msgstr "" + +#: tapset-utrace.cxx:528 +msgid "utrace '$argN' variable is read-only" +msgstr "" + +#: tapset-utrace.cxx:557 +#, c-format +msgid "utrace '%s' variable is read-only" +msgstr "" + +#: tapset-utrace.cxx:563 +msgid "only \"process(PATH_OR_PID).syscall.return\" support $return." +msgstr "" + +#: tapset-utrace.cxx:588 +msgid "unknown target variable" +msgstr "" + +#: tapset-utrace.cxx:612 +msgid "" +"only \"process(PATH_OR_PID).syscall\" and \"process(PATH_OR_PID).syscall." +"return\" probes support target symbols" +msgstr "" + +#: tapset-utrace.cxx:617 +msgid "cannot take address of utrace variable" +msgstr "" + +#: tapset-utrace.cxx:624 +msgid "" +"invalid target symbol for utrace probe, $syscall, $return, $argN or $$parms " +"expected" +msgstr "" + +#: tapset-utrace.cxx:690 +msgid "process pid must be greater than 1" +msgstr "" + +#: translate.cxx:47 +msgid "\"Array overflow, check " +msgstr "" + +#: translate.cxx:48 +msgid "\"MAXNESTING exceeded\";" +msgstr "" + +#: translate.cxx:49 +msgid "\"division by 0\";" +msgstr "" + +#: translate.cxx:50 +msgid "\"MAXACTION exceeded\";" +msgstr "" + +#: translate.cxx:51 +msgid "\"aggregation overflow in " +msgstr "" + +#: translate.cxx:52 +msgid "\"empty aggregate\";" +msgstr "" + +#: translate.cxx:53 +msgid "\"histogram index out of range\";" +msgstr "" + +#: translate.cxx:433 +#, c-format +msgid "unsupported stats type for %s" +msgstr "" + +#: translate.cxx:441 +#, c-format +msgid "unsupported initializer for %s" +msgstr "" + +#: translate.cxx:455 +#, c-format +msgid "unsupported deallocator for %s" +msgstr "" + +#: translate.cxx:585 +msgid "unknown type of map" +msgstr "" + +#: translate.cxx:600 +msgid "index type mismatch" +msgstr "" + +#: translate.cxx:616 +msgid "aggregating non-parallel map type" +msgstr "" + +#: translate.cxx:624 +msgid "fetching aggregate of non-parallel map type" +msgstr "" + +#: translate.cxx:642 +msgid "checking existence of an unsupported map type" +msgstr "" + +#: translate.cxx:655 +msgid "getting a value from an unsupported map type" +msgstr "" + +#: translate.cxx:666 +msgid "adding a value of an unsupported map type" +msgstr "" + +#: translate.cxx:688 +msgid "setting a value of an unsupported map type" +msgstr "" + +#: translate.cxx:777 +msgid "iterating over unknown reference type" +msgstr "" + +#: translate.cxx:790 +msgid "inconsistent iterator type in itervar::start()" +msgstr "" + +#: translate.cxx:801 +msgid "inconsistent iterator type in itervar::next()" +msgstr "" + +#: translate.cxx:826 +msgid "illegal key type" +msgstr "" + +#: translate.cxx:833 +msgid "inconsistent iterator value in itervar::get_value()" +msgstr "" + +#: translate.cxx:845 +msgid "illegal value type" +msgstr "" + +#: translate.cxx:1602 translate.cxx:1757 +msgid "array locals not supported, missing global declaration?" +msgstr "" + +#: translate.cxx:1691 +#, c-format +msgid "%s elided, duplicates %s" +msgstr "" + +#: translate.cxx:1766 +msgid "unsupported local variable type" +msgstr "" + +#: translate.cxx:1862 +msgid "nothing" +msgstr "" + +#: translate.cxx:1910 translate.cxx:1940 +msgid "array type is neither string nor long" +msgstr "" + +#: translate.cxx:1925 +msgid "array key is neither string nor long" +msgstr "" + +#: translate.cxx:2053 +msgid "unsupported c_expression token type" +msgstr "" + +#: translate.cxx:2084 +msgid "unknown lvalue type in assignment" +msgstr "" + +#: translate.cxx:2104 translate.cxx:2124 +msgid " type unsupported" +msgstr "" + +#: translate.cxx:2153 +msgid "post assignment on strings not supported" +msgstr "" + +#: translate.cxx:2167 +#, c-format +msgid "string assignment operator %s unsupported" +msgstr "" + +#: translate.cxx:2199 +msgid "unknown macop for assignment" +msgstr "" + +#: translate.cxx:2204 +msgid "invalid post-mode operator" +msgstr "" + +#: translate.cxx:2241 +msgid "assignment type not yet implemented" +msgstr "" + +#: translate.cxx:2328 +msgid "unresolved symbol" +msgstr "" + +#: translate.cxx:2330 +msgid "unresolved symbol: " +msgstr "" + +#: translate.cxx:2369 +msgid "attempt to use scalar where map expected" +msgstr "" + +#: translate.cxx:2607 translate.cxx:3610 translate.cxx:3630 +msgid "expected numeric type" +msgstr "" + +#: translate.cxx:2752 translate.cxx:4000 +msgid "Invalid indexing of histogram" +msgstr "" + +#: translate.cxx:3015 +msgid "cannot 'return' from probe" +msgstr "" + +#: translate.cxx:3018 +msgid "return type mismatch" +msgstr "" + +#: translate.cxx:3031 +msgid "cannot 'next' from function" +msgstr "" + +#: translate.cxx:3095 +msgid "Cannot delete unknown expression type" +msgstr "" + +#: translate.cxx:3122 translate.cxx:3145 +msgid "cannot delete histogram bucket entries\n" +msgstr "" + +#: translate.cxx:3171 +msgid "cannot 'break' outside loop" +msgstr "" + +#: translate.cxx:3182 +msgid "cannot 'continue' outside loop" +msgstr "" + +#: translate.cxx:3256 +msgid "expected numeric or string type" +msgstr "" + +#: translate.cxx:3268 translate.cxx:3342 translate.cxx:3371 translate.cxx:3387 +#: translate.cxx:3490 +msgid "expected numeric types" +msgstr "" + +#: translate.cxx:3333 +msgid "operator not yet implemented" +msgstr "" + +#: translate.cxx:3478 translate.cxx:3524 +msgid "expected string types" +msgstr "" + +#: translate.cxx:3499 +msgid "unexpected type" +msgstr "" + +#: translate.cxx:3519 +msgid "unexpected concatenation operator" +msgstr "" + +#: translate.cxx:3542 +msgid "expected numeric condition" +msgstr "" + +#: translate.cxx:3547 +msgid "expected matching types" +msgstr "" + +#: translate.cxx:3573 +msgid "non-number <<< expression" +msgstr "" + +#: translate.cxx:3576 +msgid "non-stats left operand to <<< expression" +msgstr "" + +#: translate.cxx:3579 +msgid "non-number right operand to <<< expression" +msgstr "" + +#: translate.cxx:3585 translate.cxx:3588 +msgid "type mismatch" +msgstr "" + +#: translate.cxx:3644 +msgid "invalid reference to array" +msgstr "" + +#: translate.cxx:3739 +msgid "need rvalue for assignment" +msgstr "" + +#: translate.cxx:3750 +msgid "unexpected reference to array" +msgstr "" + +#: translate.cxx:3769 +msgid "cannot translate general target-symbol expression" +msgstr "" + +#: translate.cxx:3776 +msgid "cannot translate general @cast expression" +msgstr "" + +#: translate.cxx:3783 +msgid "cannot translate general @defined expression" +msgstr "" + +#: translate.cxx:3790 +msgid "cannot translate general @entry expression" +msgstr "" + +#: translate.cxx:3841 +msgid "invalid array reference" +msgstr "" + +#: translate.cxx:3846 +msgid "array index type mismatch" +msgstr "" + +#: translate.cxx:3890 +msgid "expected arrayindex expression" +msgstr "" + +#: translate.cxx:3902 +msgid "unexpected aggregate of non-statistic" +msgstr "" + +#: translate.cxx:3918 +msgid "unexpected aggregate of non-arrayindex" +msgstr "" + +#: translate.cxx:4036 +msgid "statistic-valued array in rvalue context" +msgstr "" + +#: translate.cxx:4130 translate.cxx:4221 +msgid "cannot assign to histogram buckets" +msgstr "" + +#: translate.cxx:4150 +msgid "unexpected reference to scalar" +msgstr "" + +#: translate.cxx:4250 +msgid "invalid length argument list" +msgstr "" + +#: translate.cxx:4266 translate.cxx:4286 +msgid "function argument type mismatch" +msgstr "" + +#: translate.cxx:4277 +msgid "function actual argument evaluation" +msgstr "" + +#: translate.cxx:4337 +msgid "unknown type of arg to print operator" +msgstr "" + +#: translate.cxx:4403 +#, c-format +msgid "additional argument to print" +msgid_plural "too many arguments to print (%zu)" +msgstr[0] "" +msgstr[1] "" +msgstr[2] "" + +#: translate.cxx:4449 +msgid "cannot print unknown expression type" +msgstr "" + +#: translate.cxx:4451 +msgid "cannot print a raw stats object" +msgstr "" + +#: translate.cxx:4948 +#, c-format +msgid "Getting symbol table for %s" +msgstr "" + +#: translate.cxx:4980 +msgid "unexpected build-id reloc section " +msgstr "" + +#: translate.cxx:4988 +#, c-format +msgid "Found build-id in %s, length %d, start at 0x%#" +msgstr "" + +#: translate.cxx:5037 +#, c-format +msgid "Found kernel _stext extra offset 0x%#" +msgstr "" + +#: translate.cxx:5210 +#, c-format +msgid "skipping module %s eh_frame_hdr table (too big: %s > %s)" +msgstr "" + +#: translate.cxx:5274 +#, c-format +msgid "skipping module %s, section %s debug_frame_hdr table (too big: %s > %s)" +msgstr "" + +#: translate.cxx:5537 +msgid "Searching for vdso candidates: " +msgstr "" + +#: translate.cxx:5547 +msgid "vdso candidate: " +msgstr "" + +#: translate.cxx:5667 +msgid "missing unwind/symbol data for module '" +msgstr "" + +#: translate.cxx:5690 +#, c-format +msgid "identified max-nested function: %s (%d)" +msgstr "" + +#: translate.cxx:5701 +#, c-format +msgid "identified recursive function: %s" +msgstr "" + +#: translate.cxx:5716 +#, c-format +msgid "" +"myproc-unprivileged tapset function called without is_myproc checking for " +"pid %d (euid %d)" +msgstr "" + +#: translate.cxx:5720 +#, c-format +msgid "kernel read fault at 0x%p (%s)" +msgstr "" + +#: translate.cxx:5722 +#, c-format +msgid "kernel write fault at 0x%p (%s)" +msgstr "" + +#: translate.cxx:5724 +#, c-format +msgid "divide by zero in DWARF operand (%s)" +msgstr "" + +#: translate.cxx:5768 +#, c-format +msgid "ignoring extra parts of compat version: %s" +msgstr "" + +#: translate.cxx:5772 +#, c-format +msgid "parse error in compatibility version: %s" +msgstr "" + +#: translate.cxx:5775 +#, c-format +msgid "compatibility version out of range: %s" +msgstr "" + +#: translate.cxx:5795 +msgid " recursive" +msgstr "" + +#: translate.cxx:5795 +msgid " non-recursive" +msgstr "" + +#: translate.cxx:5794 +#, c-format +msgid "function recursion-analysis: max-nesting %d %s" +msgstr "" + +#: util.cxx:59 +msgid "Unable to determine home directory" +msgstr "" + +#: util.cxx:113 +#, c-format +msgid "Copying %s to %s" +msgstr "" + +#: util.cxx:167 +#, c-format +msgid "Copy failed (\"%s\" to \"%s\"): %s" +msgstr "" + +#: util.cxx:250 +msgid "Unable to retrieve group list" +msgstr "" + +#: util.cxx:277 +#, c-format +msgid "using %ldvirt/%ldres/%ldshr kb, " +msgstr "" + +#: util.cxx:400 +msgid "cmdstr_join called with an empty command!" +msgstr "" + +#: util.cxx:450 +#, c-format +msgid "Spawn waitpid call on unmanaged pid %d" +msgstr "" + +#: util.cxx:457 +#, c-format +msgid "Spawn waitpid result (0x%x): %d" +msgstr "" + +#: util.cxx:462 +#, c-format +msgid "Spawn waitpid error (%d): %s" +msgstr "" + +#: util.cxx:503 +#, c-format +msgid "Warning: %s is not executable (%s)" +msgstr "" + +#: util.cxx:509 +msgid "Running" +msgstr "" + +#: util.cxx:543 +#, c-format +msgid "Spawn error (%d): %s" +msgstr "" + +#: util.cxx:700 +#, c-format +msgid "regcomp %s (%s) error rc= %d" +msgstr "" + +#: util.cxx:712 +#, c-format +msgid "ERROR: Safety pattern mismatch for %s ('%s' vs. '%s') rc=%d" +msgstr "" + +#: util.cxx:730 +#, c-format +msgid "regcomp %s error rc=%d" +msgstr "" + +#. TRANSLATORS: Missing a file +#: util.cxx:806 +#, c-format +msgid "Missing %s" +msgstr "" + +#: util.cxx:825 +#, c-format +msgid "autosprintf/vasprintf error %s" +msgstr "" + +#: util.h:74 util.h:85 util.h:96 util.h:104 util.h:115 util.h:128 +msgid "bad lexical cast" +msgstr "" + +#, fuzzy +#~ msgid "WARNING:" +#~ msgstr "UWAGA: " + +#~ msgid "(version " +#~ msgstr "(wersja " + +#~ msgid "This is free software; see the source for copying conditions." +#~ msgstr "" +#~ "To oprogramowanie jest darmowe; warunki kopiowania są opisane w źródłach." diff -Nru systemtap-1.4/po/POTFILES.in systemtap-1.6/po/POTFILES.in --- systemtap-1.4/po/POTFILES.in 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/po/POTFILES.in 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,75 @@ +auto_free.h +buildrun.cxx +buildrun.h +cache.cxx +cache.h +coveragedb.cxx +coveragedb.h +csclient.cxx +csclient.h +cscommon.cxx +cscommon.h +dtrace.in +dwarf_wrappers.cxx +dwarf_wrappers.h +dwflpp.cxx +dwflpp.h +elaborate.cxx +elaborate.h +hash.cxx +hash.h +loc2c.c +loc2c.h +main.cxx +mdfour.c +mdfour.h +nsscommon.cxx +nsscommon.h +parse.cxx +parse.h +remote.cxx +remote.h +rpm_finder.cxx +rpm_finder.h +runtime/staprun/common.c +runtime/staprun/ctl.c +runtime/staprun/mainloop.c +runtime/staprun/modverify.c +runtime/staprun/modverify.h +runtime/staprun/relay.c +runtime/staprun/relay_old.c +runtime/staprun/stapio.c +runtime/staprun/stap_merge.c +runtime/staprun/staprun.c +runtime/staprun/staprun_funcs.c +runtime/staprun/staprun.h +runtime/staprun/stapsh.c +sdt_types.h +session.cxx +session.h +setupdwfl.cxx +setupdwfl.h +stap-authorize-cert.cxx +stap-gen-cert.cxx +staplog.c +stap-serverd.cxx +stap-sign-module.cxx +stapsslerr.h +staptree.cxx +staptree.h +tapset-been.cxx +tapset-itrace.cxx +tapset-mark.cxx +tapset-perfmon.cxx +tapset-procfs.cxx +tapsets.cxx +tapsets.h +tapset-timers.cxx +tapset-utrace.cxx +task_finder.cxx +task_finder.h +translate.cxx +translate.h +unordered.h +util.cxx +util.h diff -Nru systemtap-1.4/po/quot.sed systemtap-1.6/po/quot.sed --- systemtap-1.4/po/quot.sed 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/po/quot.sed 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,6 @@ +s/"\([^"]*\)"/“\1”/g +s/`\([^`']*\)'/‘\1’/g +s/ '\([^`']*\)' / ‘\1’ /g +s/ '\([^`']*\)'$/ ‘\1’/g +s/^'\([^`']*\)' /‘\1’ /g +s/“”/""/g diff -Nru systemtap-1.4/po/README systemtap-1.6/po/README --- systemtap-1.4/po/README 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/po/README 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,43 @@ +Systemtap Internationalization: + +The internationalization data will not be generated by default unless systemtap +is configured with maintainer-mode. However, one can manually regenerate all +files, including the source-filename-list po/POTFILES.in by executing +'make update-po' from the top-level source directory. + +In order to generate a specific language, run the command: +'make -C po language.gmo' where 'language' is the language you would like to +have generated. + +Systemtap has a translation page located at +http://www.transifex.net/projects/p/systemtap/ which is automatically updated +to host the most up-to-date pot files. + +To begin a new translation of systemtap, simply copy the systemtap.pot file +to a new language.po file, fill in: +- PO-Revision-Date +- Last-Translator +- Language-Team +- CHARSET +- Plural-Forms +- Strings to Translate + +If you're unsure of the specific plural forms of the language, they can be +found in the gnu gettext online manual located at +http://www.gnu.org/software/gettext/manual/gettext.html#Plural-forms +Once all translatable strings have been completed, generate the necessary +files by running 'make -C po language.gmo' where 'language' is the +language you would like to generate from the po file. + +If there are any ambiguities or clarifications needed from the source, the +comment code '//TRANSLATORS: ' one line above a gettext string will be passed +through to the systemtap.pot file for translators to view. Feel free to ask +for any further clarifications either on the systemtap mailing list or on +the freenode #systemtap channel. + +In the most general case, adding a translatable string can be done by simply +wrapping the string with the _() macro, ie. _("string to translate here"). +The macro _F() has been used for autosprintf, _N() for ngettext, and _NF() +for a combination of autosprintf and ngettext. For more information on how to +use gnu gettext please consult the online manual at +http://www.gnu.org/software/gettext/ diff -Nru systemtap-1.4/po/remove-potcdate.sin systemtap-1.6/po/remove-potcdate.sin --- systemtap-1.4/po/remove-potcdate.sin 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/po/remove-potcdate.sin 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,19 @@ +# Sed script that remove the POT-Creation-Date line in the header entry +# from a POT file. +# +# The distinction between the first and the following occurrences of the +# pattern is achieved by looking at the hold space. +/^"POT-Creation-Date: .*"$/{ +x +# Test if the hold space is empty. +s/P/P/ +ta +# Yes it was empty. First occurrence. Remove the line. +g +d +bb +:a +# The hold space was nonempty. Following occurrences. Do nothing. +x +:b +} diff -Nru systemtap-1.4/po/Rules-quot systemtap-1.6/po/Rules-quot --- systemtap-1.4/po/Rules-quot 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/po/Rules-quot 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,47 @@ +# Special Makefile rules for English message catalogs with quotation marks. + +DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot + +.SUFFIXES: .insert-header .po-update-en + +en@quot.po-create: + $(MAKE) en@quot.po-update +en@boldquot.po-create: + $(MAKE) en@boldquot.po-update + +en@quot.po-update: en@quot.po-update-en +en@boldquot.po-update: en@boldquot.po-update-en + +.insert-header.po-update-en: + @lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \ + if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \ + tmpdir=`pwd`; \ + echo "$$lang:"; \ + ll=`echo $$lang | sed -e 's/@.*//'`; \ + LC_ALL=C; export LC_ALL; \ + cd $(srcdir); \ + if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$lang -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) sed -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > $$tmpdir/$$lang.new.po; then \ + if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ + rm -f $$tmpdir/$$lang.new.po; \ + else \ + if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ + :; \ + else \ + echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ + exit 1; \ + fi; \ + fi; \ + else \ + echo "creation of $$lang.po failed!" 1>&2; \ + rm -f $$tmpdir/$$lang.new.po; \ + fi + +en@quot.insert-header: insert-header.sin + sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en@quot.insert-header + +en@boldquot.insert-header: insert-header.sin + sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en@boldquot.insert-header + +mostlyclean: mostlyclean-quot +mostlyclean-quot: + rm -f *.insert-header diff -Nru systemtap-1.4/po/systemtap.pot systemtap-1.6/po/systemtap.pot --- systemtap-1.4/po/systemtap.pot 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/po/systemtap.pot 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,4773 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Red Hat Inc., and others +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: systemtap 1.6\n" +"Report-Msgid-Bugs-To: systemtap@sourceware.org\n" +"POT-Creation-Date: 2011-07-21 08:00-0400\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" + +#: buildrun.cxx:296 +#, c-format +msgid "" +"Checking \" %s \" failed with error: %s\n" +"Ensure kernel development headers & makefiles are installed." +msgstr "" + +#: buildrun.cxx:325 +msgid "Pass 4, preamble: (re)building SystemTap's version of uprobes." +msgstr "" + +#: buildrun.cxx:333 +msgid "Warning: failed to create directory for build uprobes." +msgstr "" + +#: buildrun.cxx:362 +msgid "uprobes rebuild exit code: " +msgstr "" + +#: buildrun.cxx:421 +msgid "user-space facilities not available without kernel CONFIG_UTRACE" +msgstr "" + +#: buildrun.cxx:526 +msgid "Warning: failed to create directory for querying tracepoints." +msgstr "" + +#: buildrun.cxx:607 +msgid "Warning: failed to create directory for querying types." +msgstr "" + +#: buildrun.cxx:708 +#, c-format +msgid "Warning: skipping malformed @cast header \"%s\"" +msgstr "" + +#: cache.cxx:128 cache.cxx:217 +msgid "Pass 4: using cached " +msgstr "" + +#: cache.cxx:215 +msgid "Pass 3: using cached " +msgstr "" + +#: cache.cxx:249 +#, c-format +msgid "Cache limit file %s/%s missing, creating default." +msgstr "" + +#: cache.cxx:349 +msgid "Cache cleaning successful, removed entries: " +msgstr "" + +#: cache.cxx:356 +msgid "Cache cleaning skipped, no cache path." +msgstr "" + +#: coveragedb.cxx:28 +msgid "---- used probes-----" +msgstr "" + +#: coveragedb.cxx:35 coveragedb.cxx:58 +msgid "probe: " +msgstr "" + +#: coveragedb.cxx:42 +msgid "local: " +msgstr "" + +#: coveragedb.cxx:45 +msgid "unused_local: " +msgstr "" + +#: coveragedb.cxx:51 +msgid "---- unused probes----- " +msgstr "" + +#: coveragedb.cxx:64 +msgid "---- used functions----- " +msgstr "" + +#: coveragedb.cxx:72 +msgid "---- unused functions----- " +msgstr "" + +#: coveragedb.cxx:74 +msgid "unused_function: " +msgstr "" + +#: coveragedb.cxx:79 +msgid "---- used globals----- " +msgstr "" + +#: coveragedb.cxx:81 coveragedb.cxx:88 +msgid "globals: " +msgstr "" + +#: coveragedb.cxx:86 +msgid "---- unused globals----- " +msgstr "" + +#: coveragedb.cxx:110 coveragedb.cxx:133 coveragedb.cxx:151 +msgid "Error in statement: " +msgstr "" + +#: csclient.cxx:67 +#, c-format +msgid "" +"WARNING: The domain name, %s, does not match the DNS name(s) on the server " +"certificate:\n" +msgstr "" + +#: csclient.cxx:68 +#, c-format +msgid "could not find input file %s\n" +msgstr "" + +#: csclient.cxx:69 +#, c-format +msgid "could not open input file %s\n" +msgstr "" + +#: csclient.cxx:70 +#, c-format +msgid "Unable to open output file %s\n" +msgstr "" + +#: csclient.cxx:71 +#, c-format +msgid "could not write to %s\n" +msgstr "" + +#: csclient.cxx:353 +#, c-format +msgid "Unable to find alt name extension on the server certificate\n" +msgstr "" + +#: csclient.cxx:362 csclient.cxx:578 +#, c-format +msgid "Out of memory\n" +msgstr "" + +#: csclient.cxx:370 +#, c-format +msgid "Unable to decode alt name extension on server certificate\n" +msgstr "" + +#: csclient.cxx:704 +#, c-format +msgid "Unable to resolve server host name" +msgstr "" + +#: csclient.cxx:710 +#, c-format +msgid "Unable to resolve server host address" +msgstr "" + +#: csclient.cxx:756 +msgid "Using a compile server." +msgstr "" + +#: csclient.cxx:806 +msgid "Passes: via server " +msgstr "" + +#: csclient.cxx:813 +msgid "Passes: via server failed. Try again with another '-v' option." +msgstr "" + +#: csclient.cxx:864 +msgid "ERROR: cannot create temporary directory (\"" +msgstr "" + +#: csclient.cxx:892 +msgid "ERROR: cannot create temporary directory " +msgstr "" + +#: csclient.cxx:1166 +msgid "Unable to find a compile server." +msgstr "" + +#: csclient.cxx:1184 +msgid "A server's certificate was expired. Trying again" +msgstr "" + +#: csclient.cxx:1192 +msgid "Unable to connect to a server." +msgstr "" + +#: csclient.cxx:1239 csclient.cxx:1686 stap-serverd.cxx:1621 +msgid "Unable to set NSS export policy" +msgstr "" + +#: csclient.cxx:1253 +#, c-format +msgid "" +"Attempting SSL connection with %s\n" +" using certificates from the database in %s\n" +msgstr "" + +#: csclient.cxx:1292 +msgid " Unable to connect: " +msgstr "" + +#: csclient.cxx:1328 +#, c-format +msgid "Unable to unzip the server response '%s'\n" +msgstr "" + +#: csclient.cxx:1345 csclient.cxx:1363 csclient.cxx:1431 csclient.cxx:1738 +#, c-format +msgid "Searching \"%s\"\n" +msgstr "" + +#: csclient.cxx:1351 +msgid "Incorrect number of files in server response" +msgstr "" + +#: csclient.cxx:1359 csclient.cxx:1444 csclient.cxx:1746 +msgid " found " +msgstr "" + +#: csclient.cxx:1376 +#, c-format +msgid " found %s -- linking from %s" +msgstr "" + +#: csclient.cxx:1380 +#, c-format +msgid "Unable to link '%s' to '%s':%s\n" +msgstr "" + +#: csclient.cxx:1438 +msgid "Incorrect number of modules in server response" +msgstr "" + +#: csclient.cxx:1474 +msgid "No module was returned by the server." +msgstr "" + +#: csclient.cxx:1501 csclient.cxx:1570 cscommon.cxx:92 +#, c-format +msgid "Unable to open file '%s' for reading: " +msgstr "" + +#: csclient.cxx:1510 cscommon.cxx:101 +#, c-format +msgid "Unable to read from file '%s': " +msgstr "" + +#: csclient.cxx:1521 csclient.cxx:1556 csclient.cxx:1594 cscommon.cxx:114 +msgid "unknown error" +msgstr "" + +#: csclient.cxx:1536 +#, c-format +msgid "Unable to open file '%s' for writing: " +msgstr "" + +#: csclient.cxx:1545 +#, c-format +msgid "Unable to write to file '%s': " +msgstr "" + +#: csclient.cxx:1604 +#, c-format +msgid "Server protocol version is %s\n" +msgstr "" + +#: csclient.cxx:1605 +msgid "The server does not use localization information passed by the client\n" +msgstr "" + +#: csclient.cxx:1621 csclient.cxx:2285 +msgid "as a module signer for all users" +msgstr "" + +#: csclient.cxx:1624 csclient.cxx:2275 +msgid "as an SSL peer" +msgstr "" + +#: csclient.cxx:1626 csclient.cxx:2277 +msgid " for all users" +msgstr "" + +#: csclient.cxx:1628 csclient.cxx:2279 +msgid " for the current user" +msgstr "" + +#: csclient.cxx:1637 +msgid " is already " +msgstr "" + +#: csclient.cxx:1639 +msgid "untrusted " +msgstr "" + +#: csclient.cxx:1641 +msgid "trusted " +msgstr "" + +#: csclient.cxx:1661 +#, c-format +msgid "Unable to find or create the client certificate database directory %s: " +msgstr "" + +#: csclient.cxx:1723 +#, c-format +msgid "Unable to connect to %s" +msgstr "" + +#: csclient.cxx:1750 +#, c-format +msgid "Warning: Unable to change permissions on %s: " +msgstr "" + +#: csclient.cxx:1769 +#, c-format +msgid "Certificate database '%s' does not exist" +msgstr "" + +#: csclient.cxx:1805 csclient.cxx:1947 +msgid "Out of memory:" +msgstr "" + +#: csclient.cxx:1848 +#, c-format +msgid "Unable to query certificate database %s: " +msgstr "" + +#: csclient.cxx:1887 +#, c-format +msgid "Unable to remove certificate from %s: " +msgstr "" + +#: csclient.cxx:1917 +#, c-format +msgid "Certificate database '%s' does not exist." +msgstr "" + +#: csclient.cxx:1939 nsscommon.cxx:1148 +#, c-format +msgid "No certificate found in database %s" +msgstr "" + +#: csclient.cxx:1969 +msgid "Unable to find alt name extension on server certificate: " +msgstr "" + +#: csclient.cxx:1979 +msgid "Unable to decode alt name extension on server certificate: " +msgstr "" + +#: csclient.cxx:2125 +#, c-format +msgid "Warning: unsupported compile server property: %s" +msgstr "" + +#: csclient.cxx:2174 +#, c-format +msgid "Systemtap Compile Server Status for '%s'" +msgstr "" + +#: csclient.cxx:2189 +msgid "No servers found" +msgstr "" + +#: csclient.cxx:2226 +msgid "Only root can specify 'signer' on --trust-servers" +msgstr "" + +#: csclient.cxx:2238 +msgid "Only root can specify 'all-users' on --trust-servers" +msgstr "" + +#: csclient.cxx:2247 +msgid "Warning: Unrecognized server trust specification: " +msgstr "" + +#: csclient.cxx:2264 +msgid "No servers identified for trust" +msgstr "" + +#: csclient.cxx:2284 +msgid " and " +msgstr "" + +#: csclient.cxx:2292 +msgid "Revoking trust " +msgstr "" + +#: csclient.cxx:2294 +msgid "Adding trust " +msgstr "" + +#: csclient.cxx:2299 +msgid "Revoke trust " +msgstr "" + +#: csclient.cxx:2301 +msgid "Add trust " +msgstr "" + +#: csclient.cxx:2303 +#, c-format +msgid "in the following servers %s" +msgstr "" + +#: csclient.cxx:2318 +msgid "Server trust unchanged" +msgstr "" + +#: csclient.cxx:2496 csclient.cxx:2534 +#, c-format +msgid "Invalid port number specified: %s" +msgstr "" + +#: csclient.cxx:2515 +#, c-format +msgid "No server matching %s found" +msgstr "" + +#: csclient.cxx:2596 +msgid "Unable to determine server trust as an SSL peer" +msgstr "" + +#: csclient.cxx:2642 +msgid "Unable to determine server trust as a module signer" +msgstr "" + +#: csclient.cxx:2709 +msgid "Unable to detect server compatibility" +msgstr "" + +#: csclient.cxx:2893 +#, c-format +msgid "Failed to resolve service '%s' of type '%s' in domain '%s': %s" +msgstr "" + +#: csclient.cxx:2950 +#, c-format +msgid "Avahi browse failed: %s" +msgstr "" + +#: csclient.cxx:2963 +#, c-format +msgid "Failed to resolve service '%s': %s" +msgstr "" + +#: csclient.cxx:2984 +#, c-format +msgid "Avahi Server connection failure: %s" +msgstr "" + +#: csclient.cxx:3030 +msgid "Failed to create Avahi simple poll object" +msgstr "" + +#: csclient.cxx:3046 +#, c-format +msgid "Failed to create Avahi client: %s" +msgstr "" + +#: csclient.cxx:3058 +#, c-format +msgid "Failed to create Avahi service browser: %s" +msgstr "" + +#: csclient.cxx:3105 +msgid "Unable to detect online servers" +msgstr "" + +#: dtrace.in:165 +msgid "Usage " +msgstr "" + +#: dtrace.in:169 +msgid "Where -h builds a systemtap header file from the .d file" +msgstr "" + +#: dtrace.in:170 +msgid " -C when used with -h, also run cpp preprocessor" +msgstr "" + +#: dtrace.in:171 +msgid " -o specifies an explicit output file name," +msgstr "" + +#: dtrace.in:172 +msgid " the default for -G is file.o and -h is file.h" +msgstr "" + +#: dtrace.in:173 +msgid " -I when running cpp pass through this -I include Path" +msgstr "" + +#: dtrace.in:174 +msgid " -s specifies the name of the .d input file" +msgstr "" + +#: dtrace.in:175 +msgid " -G builds a stub file.o from file.d," +msgstr "" + +#: dtrace.in:176 +msgid " which is required by some packages that use dtrace." +msgstr "" + +#: dwarf_wrappers.cxx:25 +#, c-format +msgid "libdwfl failure (%s): " +msgstr "" + +#: dwarf_wrappers.cxx:37 +#, c-format +msgid "libdw failure (%s): " +msgstr "" + +#: dwflpp.cxx:127 +msgid "cannot find " +msgstr "" + +#: dwflpp.cxx:144 session.cxx:1488 +msgid "WARNING: " +msgstr "" + +#: dwflpp.cxx:235 +#, c-format +msgid "pattern '%s' matches module '%s'\n" +msgstr "" + +#: dwflpp.cxx:265 +#, c-format +msgid "pattern '%s' matches function '%s'\n" +msgstr "" + +#: dwflpp.cxx:321 dwflpp.cxx:347 +#, c-format +msgid "missing %s kernel/module debuginfo under '%s'" +msgstr "" + +#: dwflpp.cxx:364 +#, c-format +msgid "missing process %s %s debuginfo" +msgstr "" + +#: dwflpp.cxx:566 +#, c-format +msgid "die parent cache %s:%s size %zu" +msgstr "" + +#: dwflpp.cxx:782 +#, c-format +msgid "global alias cache %s:%s size %zu" +msgstr "" + +#: dwflpp.cxx:845 +#, c-format +msgid "function cache %s:%s size %zu" +msgstr "" + +#: dwflpp.cxx:858 +#, c-format +msgid "function cache %s:%s hit %s" +msgstr "" + +#: dwflpp.cxx:880 dwflpp.cxx:898 +#, c-format +msgid "function cache %s:%s match %s vs %s" +msgstr "" + +#: dwflpp.cxx:932 +#, c-format +msgid "module function cache %s size %zu" +msgstr "" + +#: dwflpp.cxx:946 +#, c-format +msgid "module function cache %s hit %s" +msgstr "" + +#: dwflpp.cxx:1096 +#, c-format +msgid "module %s --ldd skipped: unsupported interpreter: %s" +msgstr "" + +#: dwflpp.cxx:1113 +#, c-format +msgid "library iteration on %s failed: %s" +msgstr "" + +#: dwflpp.cxx:1142 +#, c-format +msgid "Added -d '%s" +msgstr "" + +#: dwflpp.cxx:1144 +#, c-format +msgid "' due to '%s'" +msgstr "" + +#: dwflpp.cxx:1157 +#, c-format +msgid "Warning: failed to read libraries from %s: %s" +msgstr "" + +#: dwflpp.cxx:1198 +#, c-format +msgid "alternative line %d rejected: nsrcs=%zu" +msgstr "" + +#: dwflpp.cxx:1215 +#, c-format +msgid "alternative line %d accepted: fn=%s" +msgstr "" + +#: dwflpp.cxx:1227 +#, c-format +msgid "alternative line %d accepted: ifn=%s" +msgstr "" + +#. TRANSLATORS: given line number leaves (is beyond) given function. +#: dwflpp.cxx:1234 +#, c-format +msgid "alternative line %d rejected: leaves selected fns" +msgstr "" + +#: dwflpp.cxx:1300 +msgid "Invalid line range (" +msgstr "" + +#: dwflpp.cxx:1302 +msgid ", the end line number " +msgstr "" + +#: dwflpp.cxx:1374 +#, c-format +msgid "multiple addresses for %s:%d" +msgstr "" + +#. TRANSLATORS: Here we are trying to advise what source file +#. TRANSLATORS: to attempt. +#: dwflpp.cxx:1379 +msgid " (try " +msgstr "" + +#: dwflpp.cxx:1383 +msgid " or " +msgstr "" + +#: dwflpp.cxx:1454 +#, c-format +msgid "" +"label '%s' at address %s (dieoffset: %s) is not contained by its scope " +"'%s' (dieoffset: %s) -- bad debuginfo?" +msgstr "" + +#: dwflpp.cxx:1508 +#, c-format +msgid "selected source file '%s'\n" +msgstr "" + +#: dwflpp.cxx:1578 +#, c-format +msgid "missing entrypc dwarf line record for function '%s'\n" +msgstr "" + +#: dwflpp.cxx:1588 +#, c-format +msgid "null entrypc dwarf line record for function '%s'\n" +msgstr "" + +#: dwflpp.cxx:1596 +#, c-format +msgid "" +"searching for prologue of function '%s' 0x%#-0x%#@%s:%d\n" +msgstr "" + +#: dwflpp.cxx:1621 +#, c-format +msgid "checking line record 0x%#@%s:%d\n" +msgstr "" + +#: dwflpp.cxx:1638 +#, c-format +msgid "prologue found function '%s'" +msgstr "" + +#. TRANSLATORS: Here we're adding some classification datum (ie Prologue Free) +#: dwflpp.cxx:1641 +msgid " (naked)" +msgstr "" + +#. TRANSLATORS: Here we're adding some classification datum (ie Prologue Free) +#: dwflpp.cxx:1643 +msgid " (tail-call?)" +msgstr "" + +#: dwflpp.cxx:1707 +#, c-format +msgid ", ignored %s more" +msgstr "" + +#: dwflpp.cxx:1716 +msgid " (skip comdat)" +msgstr "" + +#: dwflpp.cxx:1721 +#, c-format +msgid "entry-pc lookup (%s dieoffset: %s) = 0x%# (rc %d" +msgstr "" + +#: dwflpp.cxx:1837 +msgid "emit_address internal error, no dwfl" +msgstr "" + +#: dwflpp.cxx:1843 +#, c-format +msgid "" +"emit_address internal error, dwfl_addrmodule failed, address 0x%#" +msgstr "" + +#: dwflpp.cxx:1862 +#, c-format +msgid "" +"emit dwarf addr 0x%# => module %s section %s relocaddr 0x%#" +msgstr "" + +#: dwflpp.cxx:1967 +msgid " in " +msgstr "" + +#: dwflpp.cxx:1970 elaborate.cxx:580 +msgid " (alternatives:" +msgstr "" + +#: dwflpp.cxx:1966 +#, c-format +msgid "unable to find local '%s' near pc %s %s %s %s (%s)" +msgstr "" + +#: dwflpp.cxx:2001 +#, c-format +msgid "unable to get die scopes for '%s' in an inlined subroutine" +msgstr "" + +#: dwflpp.cxx:2052 +#, c-format +msgid "not accessible at this address (%s, dieoffset: %s)" +msgstr "" + +#: dwflpp.cxx:2058 +#, c-format +msgid "dwarf_getlocation_addr failed, %s" +msgstr "" + +#: dwflpp.cxx:2081 +#, c-format +msgid " Error: %s isn't a struct/class/union" +msgstr "" + +#: dwflpp.cxx:2091 +#, c-format +msgid "%s is empty" +msgstr "" + +#: dwflpp.cxx:2123 +#, c-format +msgid "" +"\n" +" Error in obtaining type attribute for anonymous member at %s:%d" +msgstr "" + +#: dwflpp.cxx:2197 +#, c-format +msgid "no location for field '%s':%s" +msgstr "" + +#: dwflpp.cxx:2208 +#, c-format +msgid "cannot get type of field: %s" +msgstr "" + +#: dwflpp.cxx:2254 +#, c-format +msgid "invalid access '%s' vs '%s'" +msgstr "" + +#: dwflpp.cxx:2282 +#, c-format +msgid "invalid access '%s' for array type" +msgstr "" + +#: dwflpp.cxx:2294 +#, c-format +msgid "invalid access '%s' for %s" +msgstr "" + +#: dwflpp.cxx:2301 +#, c-format +msgid "unresolved %s" +msgstr "" + +#: dwflpp.cxx:2326 +#, c-format +msgid "unable to find member '%s' for %s%s%s" +msgstr "" + +#: dwflpp.cxx:2343 +#, c-format +msgid "invalid access '%s' vs. %s" +msgstr "" + +#: dwflpp.cxx:2348 +#, c-format +msgid "cannot find type: %s" +msgstr "" + +#: dwflpp.cxx:2352 +#, c-format +msgid "%s: unexpected type tag %s" +msgstr "" + +#: dwflpp.cxx:2372 +#, c-format +msgid "cannot get type of pointee: %s" +msgstr "" + +#: dwflpp.cxx:2401 +msgid "cannot write to member address" +msgstr "" + +#: dwflpp.cxx:2404 +msgid "cannot take address of bit-field" +msgstr "" + +#: dwflpp.cxx:2418 +#, c-format +msgid "unsupported type tag %s for %s" +msgstr "" + +#: dwflpp.cxx:2425 +#, c-format +msgid "'%s' is being accessed instead of a member" +msgstr "" + +#: dwflpp.cxx:2440 +#, c-format +msgid "unsupported type (mystery encoding %s for %s" +msgstr "" + +#: dwflpp.cxx:2449 +#, c-format +msgid "unsupported type (encoding %s) for %s" +msgstr "" + +#: dwflpp.cxx:2474 +msgid "cannot write to array address" +msgstr "" + +#: dwflpp.cxx:2477 +msgid "cannot write to reference" +msgstr "" + +#: dwflpp.cxx:2550 +#, c-format +msgid "finding symtable address for %s\n" +msgstr "" + +#: dwflpp.cxx:2554 +msgid "Getting symbols" +msgstr "" + +#: dwflpp.cxx:2569 +#, c-format +msgid "found %s @0x%#\n" +msgstr "" + +#: dwflpp.cxx:2589 +#, c-format +msgid "" +"finding location for local '%s' near address 0x%#, module bias 0x" +"%#\n" +msgstr "" + +#: dwflpp.cxx:2620 +#, c-format +msgid "failed to retrieve location attribute for local '%s' (dieoffset: %s)" +msgstr "" + +#: dwflpp.cxx:2630 dwflpp.cxx:2664 +#, c-format +msgid "failed to retrieve type attribute for local '%s'" +msgstr "" + +#: dwflpp.cxx:2679 +#, c-format +msgid "literal_stmt_for_return: finding return value for %s (%s)\n" +msgstr "" + +#: dwflpp.cxx:2692 +#, c-format +msgid "failed to retrieve return value location for %s (%s)" +msgstr "" + +#: dwflpp.cxx:2699 +#, c-format +msgid "function %s (%s) has no return value" +msgstr "" + +#: dwflpp.cxx:2714 dwflpp.cxx:2745 +#, c-format +msgid "failed to retrieve return value type attribute for %s (%s)" +msgstr "" + +#: dwflpp.cxx:2761 +#, c-format +msgid "literal_stmt_for_pointer: finding value for %s (%s)\n" +msgstr "" + +#: dwflpp.cxx:2879 +msgid " skipping - init/exit" +msgstr "" + +#: dwflpp.cxx:2887 +msgid " skipping - __kprobes" +msgstr "" + +#: dwflpp.cxx:2902 +msgid " guru mode enabled - ignoring blacklist" +msgstr "" + +#: dwflpp.cxx:2907 +msgid " skipping - blacklisted" +msgstr "" + +#: dwflpp.cxx:3046 +msgid "blacklist regexps:" +msgstr "" + +#: dwflpp.cxx:3054 +msgid "blacklist_func regcomp failed" +msgstr "" + +#: dwflpp.cxx:3056 +msgid "blacklist_func_ret regcomp failed" +msgstr "" + +#: dwflpp.cxx:3058 +msgid "blacklist_file regcomp failed" +msgstr "" + +#: dwflpp.cxx:3060 +msgid "blacklist_section regcomp failed" +msgstr "" + +#: dwflpp.cxx:3244 +msgid "not found cfa" +msgstr "" + +#: dwflpp.cxx:3251 +#, c-format +msgid "found cfa, info: %d [start: 0x%#, end: 0x%#, nops: %zu" +msgstr "" + +#: elaborate.cxx:144 elaborate.cxx:159 +msgid "derived_probe with no locations" +msgid_plural "derived_probe with no locations" +msgstr[0] "" +msgstr[1] "" + +#: elaborate.cxx:201 +msgid "unprivileged users: authorized" +msgstr "" + +#: elaborate.cxx:207 +msgid "unprivileged users: authorized for process owner" +msgstr "" + +#: elaborate.cxx:359 +msgid "invalid use of wildcard probe point component" +msgstr "" + +#: elaborate.cxx:414 +#, c-format +msgid "probe point truncated at position %s (follow: %s)" +msgstr "" + +#: elaborate.cxx:421 +msgid "probe point is not allowed for unprivileged users" +msgstr "" + +#: elaborate.cxx:498 +#, c-format +msgid "probe point mismatch at position %s (alternatives: %s)" +msgstr "" + +#: elaborate.cxx:519 +#, c-format +msgid "wildcard '%s' matched '%s'" +msgstr "" + +#: elaborate.cxx:565 +msgid " (alternatives: " +msgstr "" + +#: elaborate.cxx:563 +#, c-format +msgid "probe point mismatch at position %s %s didn't find any wildcard matches" +msgstr "" + +#: elaborate.cxx:579 +#, c-format +msgid "probe point mismatch at position %s %s" +msgstr "" + +#: elaborate.cxx:613 +msgid "inappropriate" +msgstr "" + +#: elaborate.cxx:651 +#, c-format +msgid "Recursive loop in alias expansion of %s at %s" +msgstr "" + +#: elaborate.cxx:740 +msgid "recursion limit reached" +msgstr "" + +#: elaborate.cxx:788 +msgid "no match" +msgstr "" + +#: elaborate.cxx:816 +msgid " while resolving probe point " +msgstr "" + +#: elaborate.cxx:863 +msgid "Expecting symbol or array index expression" +msgstr "" + +#: elaborate.cxx:916 +msgid "Assignment to read-only histogram bucket" +msgstr "" + +#: elaborate.cxx:948 +#, c-format +msgid "variable '%s' modified during 'foreach' iteration" +msgstr "" + +#: elaborate.cxx:970 +#, c-format +msgid "function call modifies var '%s' during 'foreach' iteration" +msgstr "" + +#: elaborate.cxx:1058 +#, c-format +msgid "multiple histogram types declared on '%s'" +msgstr "" + +#: elaborate.cxx:1086 +#, c-format +msgid "unable to infer statistic parameters for global '%s'" +msgstr "" + +#: elaborate.cxx:1167 +msgid "probe condition must not modify any variables" +msgstr "" + +#: elaborate.cxx:1172 +msgid "probe condition must not include impure embedded-C" +msgstr "" + +#: elaborate.cxx:1226 +#, c-format +msgid "Turning on task_finder vma_tracker, pragma:vma found in %s" +msgstr "" + +#: elaborate.cxx:1353 +msgid "" +"This global uses tapset constructs that are dependent on systemtap version" +msgstr "" + +#: elaborate.cxx:1358 +msgid "" +"This function uses tapset constructs that are dependent on systemtap version" +msgstr "" + +#: elaborate.cxx:1366 +msgid "" +"This probe uses tapset constructs that are dependent on systemtap version" +msgstr "" + +#: elaborate.cxx:1368 +msgid "" +"This alias uses tapset constructs that are dependent on systemtap version" +msgstr "" + +#: elaborate.cxx:1651 +msgid "no probes found" +msgstr "" + +#: elaborate.cxx:1714 elaborate.cxx:1825 +#, c-format +msgid "unresolved arity-%zu global array %s, missing global declaration?" +msgstr "" + +#: elaborate.cxx:1764 +msgid "unresolved array in delete statement" +msgstr "" + +#: elaborate.cxx:1798 +msgid "probe condition must not reference undeclared global" +msgstr "" + +#: elaborate.cxx:1846 +msgid "probe condition must not reference function" +msgstr "" + +#: elaborate.cxx:1861 +#, c-format +msgid "unresolved arity-%zu function" +msgstr "" + +#: elaborate.cxx:1908 +#, c-format +msgid "cross-file global variable reference to %s from" +msgstr "" + +#: elaborate.cxx:1962 +#, c-format +msgid " function %s is defined from %s" +msgstr "" + +#: elaborate.cxx:2002 elaborate.cxx:2004 +#, c-format +msgid "Eliding unused function '%s'" +msgstr "" + +#: elaborate.cxx:2060 elaborate.cxx:2105 elaborate.cxx:2151 +#, c-format +msgid "Eliding unused variable '%s'" +msgstr "" + +#: elaborate.cxx:2062 +#, c-format +msgid "Eliding unused local variable %s in %s" +msgstr "" + +#: elaborate.cxx:2088 elaborate.cxx:2136 elaborate.cxx:2173 +msgid "(alternatives:" +msgstr "" + +#: elaborate.cxx:2086 elaborate.cxx:2134 +#, c-format +msgid "never-assigned local variable '%s' %s" +msgstr "" + +#: elaborate.cxx:2107 +#, c-format +msgid "Eliding unused local variable %s in function %s" +msgstr "" + +#: elaborate.cxx:2153 +#, c-format +msgid "Eliding unused global variable %s" +msgstr "" + +#: elaborate.cxx:2172 +#, c-format +msgid "never assigned global variable '%s' %s" +msgstr "" + +#: elaborate.cxx:2240 +#, c-format +msgid "Eliding assignment to %s at %s" +msgstr "" + +#: elaborate.cxx:2263 +#, c-format +msgid "Eliding unused error string catcher %s at %s" +msgstr "" + +#: elaborate.cxx:2328 +msgid "Eliding side-effect-free null statement " +msgstr "" + +#: elaborate.cxx:2348 +msgid "Flattening nested block " +msgstr "" + +#: elaborate.cxx:2360 +msgid "Eliding side-effect-free empty block " +msgstr "" + +#: elaborate.cxx:2366 +msgid "Eliding side-effect-free singleton block " +msgstr "" + +#: elaborate.cxx:2384 +msgid "Eliding empty try {} block " +msgstr "" + +#: elaborate.cxx:2408 +msgid "Eliding side-effect-free if statement " +msgstr "" + +#: elaborate.cxx:2416 +msgid "Creating simple evaluation from if statement " +msgstr "" + +#: elaborate.cxx:2430 +msgid "Inverting the condition of if statement " +msgstr "" + +#: elaborate.cxx:2454 +msgid "Eliding side-effect-free foreach statement " +msgstr "" + +#: elaborate.cxx:2476 +msgid "Eliding side-effect-free for statement " +msgstr "" + +#: elaborate.cxx:2518 +msgid "Eliding side-effect-free expression " +msgstr "" + +#: elaborate.cxx:2556 +#, c-format +msgid "side-effect-free probe '%s'" +msgstr "" + +#: elaborate.cxx:2580 +#, c-format +msgid "side-effect-free function '%s'" +msgstr "" + +#: elaborate.cxx:2700 +msgid "Creating if statement from unused logical-or " +msgstr "" + +#: elaborate.cxx:2731 +msgid "Creating if statement from unused logical-and " +msgstr "" + +#: elaborate.cxx:2757 +msgid "Creating if statement from unused ternary expression " +msgstr "" + +#: elaborate.cxx:2787 +msgid "Eliding unused binary " +msgstr "" + +#: elaborate.cxx:2815 +msgid "Eliding unused unary " +msgstr "" + +#: elaborate.cxx:2856 +msgid "Eliding side-effect-free function call " +msgstr "" + +#: elaborate.cxx:2888 +msgid "Eliding unused print " +msgstr "" + +#: elaborate.cxx:2935 +msgid "Eliding unused target symbol " +msgstr "" + +#: elaborate.cxx:2969 +msgid "Eliding unused typecast " +msgstr "" + +#: elaborate.cxx:2986 +msgid "Eliding unused check " +msgstr "" + +#: elaborate.cxx:3095 +#, c-format +msgid "Collapsing constant-% if-statement %s" +msgstr "" + +#: elaborate.cxx:3121 +msgid "Collapsing constantly-false for-loop " +msgstr "" + +#: elaborate.cxx:3147 +msgid "Collapsing constantly-limited foreach-loop " +msgstr "" + +#: elaborate.cxx:3194 +msgid "unsupported binary operator " +msgstr "" + +#: elaborate.cxx:3234 +msgid "Collapsing constant-identity binary operator " +msgstr "" + +#: elaborate.cxx:3248 +#, c-format +msgid "Collapsing constant-% binary operator %s" +msgstr "" + +#: elaborate.cxx:3266 +msgid "Collapsing constant unary " +msgstr "" + +#: elaborate.cxx:3280 +msgid "unsupported unary operator " +msgstr "" + +#: elaborate.cxx:3324 +msgid "Collapsing constant logical-OR " +msgstr "" + +#: elaborate.cxx:3371 +msgid "Collapsing constant logical-AND " +msgstr "" + +#: elaborate.cxx:3414 +msgid "Collapsing constant-boundary comparison " +msgstr "" + +#: elaborate.cxx:3432 +msgid "Collapsing constant comparison " +msgstr "" + +#: elaborate.cxx:3449 +msgid "unsupported comparison operator " +msgstr "" + +#: elaborate.cxx:3465 +msgid "Collapsing constant concatenation " +msgstr "" + +#: elaborate.cxx:3477 +msgid "Collapsing identity concatenation " +msgstr "" + +#: elaborate.cxx:3498 +#, c-format +msgid "Collapsing constant-% ternary %s" +msgstr "" + +#: elaborate.cxx:3513 +msgid "Collapsing untouched @defined check " +msgstr "" + +#: elaborate.cxx:3533 +msgid "Bad $context variable being substituted with literal 0" +msgstr "" + +#: elaborate.cxx:3536 +msgid "Bad $context variable being substituted with literal 0, " +msgstr "" + +#: elaborate.cxx:3581 +#, c-format +msgid "Changing %s reference to %s reference\n" +msgstr "" + +#: elaborate.cxx:3993 +msgid "unsupported assignment operator " +msgstr "" + +#: elaborate.cxx:4170 +msgid "Resolution problem with " +msgstr "" + +#. TRANSLATORS: simply saying not an issue with a probe or function +#: elaborate.cxx:4185 +msgid "other" +msgstr "" + +#: elaborate.cxx:4191 +msgid "unresolved target-symbol expression" +msgstr "" + +#: elaborate.cxx:4198 +msgid "unexpected @defined" +msgstr "" + +#: elaborate.cxx:4205 +msgid "@entry is only valid in .return probes" +msgstr "" + +#: elaborate.cxx:4217 +#, c-format +msgid "type definition '%s' not found" +msgstr "" + +#: elaborate.cxx:4378 +msgid "Activating uprobes support because /* pragma:uprobes */ seen." +msgstr "" + +#: elaborate.cxx:4519 translate.cxx:3055 +msgid "invalid operand of delete expression" +msgstr "" + +#: elaborate.cxx:4635 +msgid "Unspecified conversion in print operator format string" +msgstr "" + +#: elaborate.cxx:4651 +msgid "Wrong number of args to formatted print operator" +msgstr "" + +#: elaborate.cxx:4788 +msgid "array locals not supported, missing global declaration? " +msgstr "" + +#: elaborate.cxx:4798 +msgid "stat locals not supported, missing global declaration? " +msgstr "" + +#: elaborate.cxx:4813 +msgid "unresolved type " +msgstr "" + +#: elaborate.cxx:4828 +msgid "invalid operator" +msgstr "" + +#: elaborate.cxx:4830 +msgid "invalid type " +msgstr "" + +#: elaborate.cxx:4863 elaborate.cxx:4877 +#, c-format +msgid "type mismatch ( %s vs. %s )" +msgstr "" + +#: elaborate.cxx:4884 +#, c-format +msgid "type was first inferred here ( %s )" +msgstr "" + +#: hash.cxx:130 +msgid "result:" +msgstr "" + +#: hash.cxx:199 +#, c-format +msgid "" +"Warning: failed to create cache directory (\"%s\") %s, disabling cache " +"support" +msgstr "" + +#. TRANSLATORS: failure to find an address that was a constant literal number +#: loc2c.c:175 +#, c-format +msgid "cannot get constant address: %s" +msgstr "" + +#: loc2c.c:195 +#, c-format +msgid "cannot get constant block: %s" +msgstr "" + +#: loc2c.c:210 +#, c-format +msgid "cannot get string constant: %s" +msgstr "" + +#: loc2c.c:224 +#, c-format +msgid "cannot get constant value: %s" +msgstr "" + +#: loc2c.c:301 +#, c-format +msgid "%s in DWARF expression [%Zu] at % (%#x: %, %)" +msgstr "" + +#: loc2c.c:912 +msgid "required DW_AT_frame_base attribute not supplied" +msgstr "" + +#: loc2c.c:926 +#, c-format +msgid "dwarf_getlocation_addr (form %#x): %s" +msgstr "" + +#: loc2c.c:932 +msgid "DW_AT_frame_base not accessible at this address" +msgstr "" + +#: loc2c.c:941 +msgid "No cfa_ops supplied, but needed by DW_OP_call_frame_cfa" +msgstr "" + +#: loc2c.c:976 +msgid "not accessible at this address" +msgstr "" + +#: loc2c.c:1522 loc2c.c:2435 +msgid "cannot handle offset into register in fetch" +msgstr "" + +#: loc2c.c:1527 +msgid "noncontiguous location for base fetch" +msgstr "" + +#: loc2c.c:1531 loc2c.c:1574 +msgid "pointer has been optimized out" +msgstr "" + +#: loc2c.c:1535 +msgid "location not available" +msgstr "" + +#: loc2c.c:1565 +msgid "cannot handle offset into register in store" +msgstr "" + +#: loc2c.c:1570 +msgid "noncontiguous location for base store" +msgstr "" + +#: loc2c.c:1578 +msgid "location is computed value, cannot store" +msgstr "" + +#: loc2c.c:1582 +msgid "location is constant value, cannot store" +msgstr "" + +#: loc2c.c:1586 +msgid "location is not available, cannot store" +msgstr "" + +#: loc2c.c:1676 +msgid "stack value too big for fetch ???" +msgstr "" + +#: loc2c.c:1680 +msgid "single register too big for fetch/store ???" +msgstr "" + +#: loc2c.c:1684 +msgid "implicit pointer too big for fetch/store ???" +msgstr "" + +#: loc2c.c:1689 +msgid "cannot support noncontiguous location" +msgstr "" + +#: loc2c.c:1717 +msgid "declaring noncontig union for depth > 9, too many pieces" +msgstr "" + +#: loc2c.c:1766 loc2c.c:2117 loc2c.c:2206 +#, c-format +msgid "cannot get byte_size attribute for type %s: %s" +msgstr "" + +#: loc2c.c:1807 +#, c-format +msgid "cannot get bit field parameters: %s" +msgstr "" + +#: loc2c.c:1882 +msgid "fetch is larger than base integer types" +msgstr "" + +#. TRANSLATORS: CU stands for 'compilation unit' +#: loc2c.c:1902 +#, c-format +msgid "cannot determine CU address size from %s: %s" +msgstr "" + +#: loc2c.c:2022 +msgid "store is larger than base integer types" +msgstr "" + +#: loc2c.c:2152 +msgid "cannot take the address of a bit field" +msgstr "" + +#: loc2c.c:2163 +msgid "cannot take address of object in register" +msgstr "" + +#: loc2c.c:2166 +msgid "cannot take address of noncontiguous object" +msgstr "" + +#: loc2c.c:2169 +msgid "cannot take address of computed value" +msgstr "" + +#: loc2c.c:2172 +msgid "cannot take address of constant value" +msgstr "" + +#: loc2c.c:2175 +msgid "cannot take address of unavailable value" +msgstr "" + +#: loc2c.c:2178 +msgid "cannot take address of implicit pointer" +msgstr "" + +#. TRANSLATORS: This refers to the basic type, (stripped of const/volatile/etc.) +#: loc2c.c:2230 +#, c-format +msgid "cannot get inner type of type %s: %s" +msgstr "" + +#: loc2c.c:2242 +#, c-format +msgid "cannot get byte_size attribute for array element type %s: %s" +msgstr "" + +#: loc2c.c:2247 +msgid "confused about array element size" +msgstr "" + +#: loc2c.c:2261 +#, c-format +msgid "cannot get byte_stride attribute array type %s: %s" +msgstr "" + +#: loc2c.c:2269 +#, c-format +msgid "cannot get element type of array type %s: %s" +msgstr "" + +#: loc2c.c:2288 +msgid "cannot dynamically index noncontiguous array" +msgstr "" + +#. TRANSLATORS: The index is constant +#: loc2c.c:2300 +msgid "constant index is outside noncontiguous array" +msgstr "" + +#: loc2c.c:2302 +msgid "noncontiguous array splits elements" +msgstr "" + +#: loc2c.c:2323 +msgid "cannot index array stored in a register" +msgstr "" + +#: loc2c.c:2325 +msgid "constant index is outside array held in register" +msgstr "" + +#: loc2c.c:2335 +msgid "cannot index into constant value" +msgstr "" + +#. TRANSLATORS: The index is constant +#: loc2c.c:2338 +msgid "constant index is outside constant array value" +msgstr "" + +#: loc2c.c:2349 +msgid "cannot index into implicit pointer" +msgstr "" + +#: loc2c.c:2356 +msgid "cannot index into computed value" +msgstr "" + +#: loc2c.c:2361 +msgid "cannot index into unavailable value" +msgstr "" + +#: main.cxx:179 +msgid "# global embedded code" +msgstr "" + +#: main.cxx:189 +msgid "# globals" +msgstr "" + +#: main.cxx:204 +msgid "# functions" +msgstr "" + +#: main.cxx:212 main.cxx:236 +msgid " # locals" +msgstr "" + +#: main.cxx:228 +msgid "# probes" +msgstr "" + +#: main.cxx:311 +#, c-format +msgid "Checking \"%s\" failed with error: %s" +msgstr "" + +#: main.cxx:330 +#, c-format +msgid "Parsed kernel \"%s\", " +msgstr "" + +#: main.cxx:331 +#, c-format +msgid "containing %zu tuple" +msgid_plural "containing %zu tuples" +msgstr[0] "" +msgstr[1] "" + +#: main.cxx:346 +#, c-format +msgid "" +"Checking \"%s\" failed with error: %s\n" +"Ensure kernel development headers & makefiles are installed" +msgstr "" + +#: main.cxx:363 +#, c-format +msgid "Parsed kernel %s, which contained one vmlinux export" +msgid_plural "Parsed kernel %s, which contained %zu vmlinux exports" +msgstr[0] "" +msgstr[1] "" + +#. TRANSLATORS: we can't make the directory due to the error +#: main.cxx:392 +#, c-format +msgid "ERROR: cannot create temporary directory (\" %s \"): %s" +msgstr "" + +#: main.cxx:399 +#, c-format +msgid "Created temporary directory \"%s\"" +msgstr "" + +#: main.cxx:409 +#, c-format +msgid "Keeping temporary directory \"%s\"" +msgstr "" + +#: main.cxx:437 +msgid "ERROR: kernel release isn't specified" +msgstr "" + +#: main.cxx:439 +#, c-format +msgid "ERROR: kernel release isn't found in \"%s\"" +msgstr "" + +#: main.cxx:459 +msgid "" +"Note: --use-server --unprivileged was selected because of stapusr membership." +msgstr "" + +#: main.cxx:463 +msgid "" +"WARNING: Without NSS, using a compile-server is not supported by this " +"version of systemtap" +msgstr "" + +#: main.cxx:594 +#, c-format +msgid "" +"usage error: tapset file '%s' cannot be run directly as a session script." +msgstr "" + +#. TRANSLATORS: Searching through directories, 'processed' means 'examined so far' +#: main.cxx:621 +#, c-format +msgid "Searched: \" %s \", found: %zu, processed: %u" +msgstr "" + +#: main.cxx:633 +msgid "# parse tree dump" +msgstr "" + +#: main.cxx:670 +msgid "Pass 1: parse failed. Try again with another '--vp 1' option." +msgstr "" + +#: main.cxx:703 +msgid "Pass 2: analysis failed. Try again with another '--vp 01' option." +msgstr "" + +#: main.cxx:779 +msgid "Pass 3: translation failed. Try again with another '--vp 001' option." +msgstr "" + +#: main.cxx:816 +msgid "Pass 4: compilation failed. Try again with another '--vp 0001' option." +msgstr "" + +#: main.cxx:860 +msgid "Pass 5: starting run." +msgstr "" + +#: main.cxx:872 +msgid "Pass 5: run failed. Try again with another '--vp 00001' option." +msgstr "" + +#: main.cxx:900 +msgid "Coverage database not available without libsqlite3" +msgstr "" + +#: main.cxx:924 +msgid "Attempting compilation using a compile server" +msgstr "" + +#: main.cxx:982 +#, c-format +msgid "Session arch: %s release: %s" +msgstr "" + +#: nsscommon.cxx:101 +#, c-format +msgid "Could not open log file %s" +msgstr "" + +#: nsscommon.cxx:145 nsscommon.cxx:158 +#, c-format +msgid "(%d) %s" +msgstr "" + +#: nsscommon.cxx:172 +#, c-format +msgid "Error initializing NSS for %s" +msgstr "" + +#: nsscommon.cxx:187 +#, c-format +msgid "Unable to shutdown NSS for database %s" +msgstr "" + +#: nsscommon.cxx:197 +msgid "Unable to shutdown NSS" +msgstr "" + +#: nsscommon.cxx:265 +msgid "Cannot prompt for certificate database password. stdin is not a tty" +msgstr "" + +#: nsscommon.cxx:278 +#, c-format +msgid "Password for certificate database in %s: " +msgstr "" + +#: nsscommon.cxx:314 nsscommon.cxx:865 +#, c-format +msgid "Could not search certificate database directory %s" +msgstr "" + +#: nsscommon.cxx:320 +#, c-format +msgid "Could not remove %s" +msgstr "" + +#: nsscommon.cxx:327 +#, c-format +msgid "" +"Could not remove certificate database directory %s\n" +"%s" +msgstr "" + +#: nsscommon.cxx:359 +msgid "Passwords do not match" +msgstr "" + +#: nsscommon.cxx:370 +msgid "Too many password attempts" +msgstr "" + +#: nsscommon.cxx:382 +#, c-format +msgid "Could not initialize pin for certificate database %s" +msgstr "" + +#: nsscommon.cxx:395 +#, c-format +msgid "Unable to authenticate the default slot for certificate database %s" +msgstr "" + +#: nsscommon.cxx:422 +msgid "Unable to generate public/private key pair" +msgstr "" + +#: nsscommon.cxx:434 +msgid "Unable to create subject public key info for certificate request" +msgstr "" + +#: nsscommon.cxx:444 +msgid "Unable to create certificate request" +msgstr "" + +#: nsscommon.cxx:466 +msgid "Unable to create certificate validity dates" +msgstr "" + +#: nsscommon.cxx:480 nsscommon.cxx:976 +msgid "Unable to create certificate" +msgstr "" + +#: nsscommon.cxx:494 +msgid "Unable to allocate certificate extensions" +msgstr "" + +#: nsscommon.cxx:513 +msgid "Unable to encode certificate type extensions" +msgstr "" + +#: nsscommon.cxx:524 nsscommon.cxx:542 +msgid "Unable to allocate alternate DNS name extension for certificate" +msgstr "" + +#: nsscommon.cxx:572 +msgid "Unable to encode alternate DNS name extension for certificate" +msgstr "" + +#: nsscommon.cxx:581 +msgid "Unable to add alternate DNS name extension for certificate" +msgstr "" + +#: nsscommon.cxx:596 +msgid "Unable to complete alternate DNS name extension for certificate" +msgstr "" + +#: nsscommon.cxx:617 +msgid "" +"Unable to determine the signature algorithm for the signing the certificate" +msgstr "" + +#: nsscommon.cxx:626 +msgid "Unable to set the signature algorithm for signing the certificate" +msgstr "" + +#: nsscommon.cxx:642 +msgid "Unable to encode the certificate for signing" +msgstr "" + +#: nsscommon.cxx:650 +msgid "Unable to allocate memory for signing the certificate" +msgstr "" + +#: nsscommon.cxx:657 +msgid "Unable to sign the certificate" +msgstr "" + +#: nsscommon.cxx:673 nsscommon.cxx:797 +msgid "Unable to decode certificate" +msgstr "" + +#: nsscommon.cxx:685 +#, c-format +msgid "Unable to import certificate into the database at %s" +msgstr "" + +#: nsscommon.cxx:694 +msgid "Unable to allocate certificate trust" +msgstr "" + +#: nsscommon.cxx:702 +msgid "Unable decode trust string 'PCu,,PCu'" +msgstr "" + +#: nsscommon.cxx:712 nsscommon.cxx:842 +msgid "Unable to change certificate trust" +msgstr "" + +#: nsscommon.cxx:729 +#, c-format +msgid "" +"Could not open certificate file %s for reading\n" +"%s" +msgstr "" + +#: nsscommon.cxx:739 +#, c-format +msgid "" +"Could not obtain information about certificate file %s\n" +"%s" +msgstr "" + +#: nsscommon.cxx:752 +#, c-format +msgid "" +"Error reading from certificate file %s\n" +"%s" +msgstr "" + +#: nsscommon.cxx:771 nsscommon.cxx:898 +#, c-format +msgid "Could not create certificate database directory %s" +msgstr "" + +#: nsscommon.cxx:806 nsscommon.cxx:927 +#, c-format +msgid "Could not obtain internal key slot for certificate database %s" +msgstr "" + +#: nsscommon.cxx:816 +#, c-format +msgid "Could not import certificate into the database at %s" +msgstr "" + +#: nsscommon.cxx:825 +msgid "Could not allocate certificate trust" +msgstr "" + +#: nsscommon.cxx:832 +msgid "Unable decode trust string 'P,P,P'" +msgstr "" + +#: nsscommon.cxx:874 +#, c-format +msgid "Could set file permissions for %s" +msgstr "" + +#: nsscommon.cxx:885 +#, c-format +msgid "Generating a new certificate database directory in %s" +msgstr "" + +#: nsscommon.cxx:944 +msgid "Unable to encode certificate common header" +msgstr "" + +#: nsscommon.cxx:996 +#, c-format +msgid "" +"Error writing to certificate file %s\n" +"%s" +msgstr "" + +#: nsscommon.cxx:1003 +#, c-format +msgid "" +"Could not open certificate file %s for writing\n" +"%s" +msgstr "" + +#: nsscommon.cxx:1013 +#, c-format +msgid "Unable to add certificate to %s" +msgstr "" + +#: nsscommon.cxx:1063 +msgid "NSS library failure in CERT_CreateSubjectCertList" +msgstr "" + +#: nsscommon.cxx:1084 +msgid "Could not decode certificate validity" +msgstr "" + +#: nsscommon.cxx:1089 +msgid "Could not decode certificate validity time" +msgstr "" + +#: nsscommon.cxx:1098 +msgid "Could not format certificate validity time" +msgstr "" + +#: nsscommon.cxx:1124 +#, c-format +msgid "Certificate database %s does not exist" +msgstr "" + +#: nsscommon.cxx:1131 +#, c-format +msgid "Certificate database %s is obsolete" +msgstr "" + +#: nsscommon.cxx:1152 +#, c-format +msgid "Certificate found in database %s" +msgstr "" + +#: nsscommon.cxx:1164 +#, c-format +msgid " Not Valid Before: %s UTC" +msgstr "" + +#: nsscommon.cxx:1166 +#, c-format +msgid " Not Valid After: %s UTC" +msgstr "" + +#: nsscommon.cxx:1172 +msgid "Certificate is valid" +msgstr "" + +#: nsscommon.cxx:1178 +msgid "Certificate is not valid" +msgstr "" + +#: nsscommon.cxx:1197 +msgid "Unable to generate new certificate" +msgstr "" + +#: nsscommon.cxx:1214 +#, c-format +msgid "Unable to find certificate with nickname %s in %s." +msgstr "" + +#: nsscommon.cxx:1232 +#, c-format +msgid "" +"Unable to obtain private key from the certificate with nickname %s in %s." +msgstr "" + +#: nsscommon.cxx:1243 +msgid "Could not create signing context" +msgstr "" + +#: nsscommon.cxx:1250 +msgid "Could not initialize signing context." +msgstr "" + +#: nsscommon.cxx:1259 +#, c-format +msgid "Could not open module file %s" +msgstr "" + +#: nsscommon.cxx:1272 +#, c-format +msgid "Error reading module file %s" +msgstr "" + +#: nsscommon.cxx:1281 +#, c-format +msgid "Error while signing module file %s" +msgstr "" + +#: nsscommon.cxx:1291 +#, c-format +msgid "Could not complete signature of module file %s" +msgstr "" + +#: nsscommon.cxx:1305 +#, c-format +msgid "Could not open signature file %s" +msgstr "" + +#: nsscommon.cxx:1313 +#, c-format +msgid "Error writing to signature file %s" +msgstr "" + +#: parse.cxx:261 +msgid "parse error: " +msgstr "" + +#: parse.cxx:265 +msgid "\tat: " +msgstr "" + +#: parse.cxx:273 parse.cxx:277 +msgid "\tsaw: " +msgstr "" + +#: parse.cxx:311 parse.cxx:373 +msgid "expected comparison operator" +msgstr "" + +#: parse.cxx:343 parse.cxx:398 +msgid "expected string literal" +msgstr "" + +#: parse.cxx:376 +msgid "wildcard not allowed with order comparison operators" +msgstr "" + +#: parse.cxx:411 parse.cxx:430 +msgid "expected '==' or '!='" +msgstr "" + +#: parse.cxx:471 +msgid "" +"expected string, number literal or other CONFIG_... as right side operand" +msgstr "" + +#: parse.cxx:489 +msgid "expected string literal as right value" +msgstr "" + +#: parse.cxx:492 +msgid "expected number literal as right value" +msgstr "" + +#: parse.cxx:495 +msgid "" +"expected 'arch' or 'kernel_v' or 'kernel_vr' or 'CONFIG_...'\n" +" or comparison between strings or integers" +msgstr "" + +#. TRANSLATORS: 'conditional' meaning 'conditional preprocessing' +#: parse.cxx:523 +msgid "incomplete conditional at end of file" +msgstr "" + +#: parse.cxx:530 parse.cxx:536 parse.cxx:550 +msgid "incomplete conditional - missing '%('" +msgstr "" + +#: parse.cxx:538 +msgid "invalid conditional - duplicate '%:'" +msgstr "" + +#: parse.cxx:571 +msgid "incomplete condition after '%('" +msgstr "" + +#: parse.cxx:603 +msgid "expected '%?' marker for conditional" +msgstr "" + +#: parse.cxx:653 +msgid "unexpected end-of-file" +msgstr "" + +#: parse.cxx:686 +#, c-format +msgid "expected '%s'" +msgstr "" + +#: parse.cxx:696 +msgid "expected " +msgstr "" + +#: parse.cxx:737 +msgid "expected number" +msgstr "" + +#: parse.cxx:752 parse.cxx:1752 +msgid "number invalid or out of range" +msgstr "" + +#: parse.cxx:934 parse.cxx:954 +msgid "invalid nested substitution of command line arguments" +msgstr "" + +#: parse.cxx:1011 +msgid "Could not find matching closing quote" +msgstr "" + +#: parse.cxx:1101 +msgid "Could not find matching '%}' to close embedded function block" +msgstr "" + +#: parse.cxx:1203 +msgid "expected 'probe', 'global', 'function', or '%{'" +msgstr "" + +#: parse.cxx:1233 +#, c-format +msgid "Input file '%s' is empty or missing." +msgstr "" + +#: parse.cxx:1239 +#, c-format +msgid "%d parse error." +msgid_plural "%d parse errors." +msgstr[0] "" +msgstr[1] "" + +#: parse.cxx:1255 +msgid "expected 'probe'" +msgstr "" + +#: parse.cxx:1273 parse.cxx:1282 +msgid "probe point alias name cannot be optional nor sufficient" +msgstr "" + +#: parse.cxx:1301 +msgid "expected probe point specifier" +msgstr "" + +#: parse.cxx:1337 +msgid "expected '%{'" +msgstr "" + +#: parse.cxx:1340 +msgid "embedded code in unprivileged script" +msgstr "" + +#: parse.cxx:1356 +msgid "expected '{'" +msgstr "" + +#: parse.cxx:1410 parse.cxx:1489 parse.cxx:1552 parse.cxx:1586 parse.cxx:2049 +msgid "expected identifier" +msgstr "" + +#: parse.cxx:1465 +msgid "expected statement" +msgstr "" + +#: parse.cxx:1483 +msgid "expected 'global'" +msgstr "" + +#: parse.cxx:1493 +msgid "duplicate global name" +msgstr "" + +#: parse.cxx:1509 +msgid "array size out of range" +msgstr "" + +#: parse.cxx:1518 +msgid "only scalar globals can be initialized" +msgstr "" + +#: parse.cxx:1545 +msgid "expected 'function'" +msgstr "" + +#: parse.cxx:1556 +msgid "duplicate function name" +msgstr "" + +#: parse.cxx:1570 parse.cxx:1601 +msgid "expected 'string' or 'long'" +msgstr "" + +#: parse.cxx:1576 parse.cxx:1683 parse.cxx:1779 parse.cxx:1890 parse.cxx:1956 +#: parse.cxx:1990 +msgid "expected '('" +msgstr "" + +#: parse.cxx:1610 parse.cxx:2799 +msgid "expected ',' or ')'" +msgstr "" + +#: parse.cxx:1634 +msgid "expected identifier or '*'" +msgstr "" + +#: parse.cxx:1653 parse.cxx:1690 parse.cxx:1785 parse.cxx:1935 parse.cxx:1967 +#: parse.cxx:2569 +msgid "expected ')'" +msgstr "" + +#: parse.cxx:1701 +msgid "expected one of '. , ( ? ! { = +='" +msgstr "" + +#: parse.cxx:1760 +msgid "expected literal string or number" +msgstr "" + +#: parse.cxx:1773 +msgid "expected 'if'" +msgstr "" + +#: parse.cxx:1818 +msgid "expected 'return'" +msgstr "" + +#: parse.cxx:1820 +msgid "found 'return' not in function context" +msgstr "" + +#: parse.cxx:1833 +msgid "expected 'delete'" +msgstr "" + +#: parse.cxx:1846 +msgid "expected 'next'" +msgstr "" + +#: parse.cxx:1848 +msgid "found 'next' not in probe context" +msgstr "" + +#: parse.cxx:1860 +msgid "expected 'break'" +msgstr "" + +#: parse.cxx:1872 +msgid "expected 'continue'" +msgstr "" + +#: parse.cxx:1884 +msgid "expected 'for'" +msgstr "" + +#: parse.cxx:1904 parse.cxx:1920 +msgid "expected ';'" +msgstr "" + +#: parse.cxx:1950 +msgid "expected 'while'" +msgstr "" + +#: parse.cxx:1981 +msgid "expected 'foreach'" +msgstr "" + +#: parse.cxx:2060 parse.cxx:2097 +msgid "multiple sort directives" +msgstr "" + +#: parse.cxx:2080 parse.cxx:2333 parse.cxx:2844 +msgid "expected ',' or ']'" +msgstr "" + +#: parse.cxx:2088 +msgid "expected 'in'" +msgstr "" + +#: parse.cxx:2179 +msgid "expected ':'" +msgstr "" + +#: parse.cxx:2356 +msgid "unexpected comma-separated expression list" +msgstr "" + +#: parse.cxx:2549 +msgid "expected value" +msgstr "" + +#: parse.cxx:2555 +msgid "embedded expression code in unprivileged script" +msgstr "" + +#: parse.cxx:2672 +msgid "unknown statistic operator " +msgstr "" + +#: parse.cxx:2854 +msgid "base histogram operator where expression expected" +msgstr "" + +#: parse.cxx:2901 +msgid "expected @cast or $var" +msgstr "" + +#: parse.cxx:3001 +msgid "-> and [ are not accepted for a pretty-printing variable" +msgstr "" + +#: remote.cxx:48 +#, c-format +msgid "string doesn't appear to be a URI: %s" +msgstr "" + +#: remote.cxx:99 util.cxx:655 +#, c-format +msgid "Warning: %s exited with status: %d" +msgstr "" + +#: remote.cxx:255 +msgid "stapsh file ERROR: no reply" +msgstr "" + +#: remote.cxx:257 +#, c-format +msgid "stapsh file replied %s" +msgstr "" + +#: remote.cxx:332 +msgid "stapsh run ERROR: no reply" +msgstr "" + +#: remote.cxx:334 +#, c-format +msgid "stapsh run replied %s" +msgstr "" + +#: remote.cxx:369 +msgid "stapsh file descriptors already set" +msgstr "" + +#: remote.cxx:376 +msgid "invalid file descriptors for stapsh" +msgstr "" + +#: remote.cxx:379 +msgid "error sending hello to stapsh" +msgstr "" + +#: remote.cxx:383 +msgid "error receiving hello from stapsh" +msgstr "" + +#: remote.cxx:389 +msgid "failed to get uname from stapsh" +msgstr "" + +#: remote.cxx:428 remote.cxx:499 +msgid "error launching stapsh" +msgstr "" + +#: remote.cxx:511 +msgid "error establishing ssh connection" +msgstr "" + +#: remote.cxx:575 +msgid "No tmpdir available for ssh control master" +msgstr "" + +#: remote.cxx:606 +#, c-format +msgid "failed to create an ssh control master for %s : rc= %d" +msgstr "" + +#: remote.cxx:610 +#, c-format +msgid "Created ssh control master at %s" +msgstr "" + +#: remote.cxx:624 +#, c-format +msgid "failed to stop the ssh control master for %s : rc=%d" +msgstr "" + +#: remote.cxx:643 +#, c-format +msgid "failed to get uname from %s : rc= %d" +msgstr "" + +#: remote.cxx:668 +#, c-format +msgid "failed to make a tempdir on %s : rc=%d" +msgstr "" + +#: remote.cxx:683 +#, c-format +msgid "failed to copy the module to %s : rc=%d" +msgstr "" + +#: remote.cxx:698 +#, c-format +msgid "failed to run the module on %s : ret=%d" +msgstr "" + +#: remote.cxx:726 +#, c-format +msgid "failed to delete the tempdir on %s : rc=%d" +msgstr "" + +#: remote.cxx:774 +msgid "ssh target requires a hostname" +msgstr "" + +#: remote.cxx:776 +msgid "ssh target URI doesn't support a /path" +msgstr "" + +#: remote.cxx:778 +msgid "ssh target URI doesn't support a ?query" +msgstr "" + +#: remote.cxx:780 +msgid "ssh target URI doesn't support a #fragment" +msgstr "" + +#: remote.cxx:809 +#, c-format +msgid "unrecognized URI scheme '%s' in remote: %s" +msgstr "" + +#: rpm_finder.cxx:71 +msgid "Error reading the rpm configuration files" +msgstr "" + +#: rpm_finder.cxx:104 rpm_finder.cxx:123 rpm_finder.cxx:159 +msgid "Error querying the rpm file `" +msgstr "" + +#: rpm_finder.cxx:207 +msgid "Incorrect version or missing kernel-devel package, use: yum install " +msgstr "" + +#: rpm_finder.cxx:210 +msgid "Missing separate debuginfos, use: debuginfo-install " +msgstr "" + +#: rpm_finder.cxx:213 +msgid "Incorrect parameter passed, please report this error." +msgstr "" + +#: runtime/staprun/common.c:81 +msgid "Invalid FILE name format\n" +msgstr "" + +#: runtime/staprun/common.c:141 +#, c-format +msgid "Invalid buffer size '%d' (should be 1-4095).\n" +msgstr "" + +#: runtime/staprun/common.c:177 +#, c-format +msgid "Invalid file size option '%s'.\n" +msgstr "" + +#: runtime/staprun/common.c:190 +msgid "File name is too long.\n" +msgstr "" + +#: runtime/staprun/common.c:196 +msgid "Filename format is invalid or too long.\n" +msgstr "" + +#: runtime/staprun/common.c:201 +msgid "You can't specify the '-A' and '-L' options together.\n" +msgstr "" + +#: runtime/staprun/common.c:206 +msgid "" +"You can't specify the '-A' and '-b' options together. The '-b'\n" +"buffer size option only has an effect when the module is inserted.\n" +msgstr "" + +#: runtime/staprun/common.c:212 +msgid "" +"You can't specify the '-A' and '-c' options together. The '-c cmd'\n" +"option used to start a command only has an effect when the module\n" +"is inserted.\n" +msgstr "" + +#: runtime/staprun/common.c:219 +msgid "" +"You can't specify the '-A' and '-x' options together. The '-x pid'\n" +"option only has an effect when the module is inserted.\n" +msgstr "" + +#: runtime/staprun/common.c:225 +msgid "You can't specify the '-c' and '-x' options together.\n" +msgstr "" + +#: runtime/staprun/common.c:230 +msgid "You can't specify the '-D' and '-L' options together.\n" +msgstr "" + +#: runtime/staprun/common.c:234 +msgid "You can't specify the '-D' and '-d' options together.\n" +msgstr "" + +#: runtime/staprun/common.c:238 +msgid "You can't specify the '-D' and '-c' options together.\n" +msgstr "" + +#: runtime/staprun/common.c:242 +msgid "You have to specify output FILE with '-D' option.\n" +msgstr "" + +#: runtime/staprun/common.c:246 +msgid "You have to specify output FILE with '-S' option.\n" +msgstr "" + +#: runtime/staprun/common.c:253 +#, c-format +msgid "" +"\n" +"%s [-v] [-w] [-u] [-c cmd ] [-x pid] [-u user] [-A|-L|-d]\n" +"\t[-b bufsize] [-o FILE [-D] [-S size[,N]]] MODULE [module-options]\n" +msgstr "" + +#: runtime/staprun/common.c:255 +msgid "" +"-v Increase verbosity.\n" +"-w Suppress warnings.\n" +"-u Load uprobes.ko\n" +"-c cmd Command 'cmd' will be run and staprun will\n" +" exit when it does. The '_stp_target' variable\n" +" will contain the pid for the command.\n" +"-x pid Sets the '_stp_target' variable to pid.\n" +"-o FILE Send output to FILE. This supports strftime(3)\n" +" formats for FILE.\n" +"-b buffer size The systemtap module specifies a buffer size.\n" +" Setting one here will override that value. The\n" +" value should be an integer between 1 and 4095 \n" +" which be assumed to be the buffer size in MB.\n" +" That value will be per-cpu in bulk mode.\n" +"-L Load module and start probes, then detach.\n" +"-A Attach to loaded systemtap module.\n" +"-d Delete a module. Only detached or unused modules\n" +" the user has permission to access will be deleted. Use \"*" +"\"\n" +" (quoted) to delete all unused modules.\n" +"-R Have staprun create a new name for the module before\n" +" inserting it. This allows the same module to be inserted\n" +" more than once.\n" +"-R (Module renaming is not available in this configuration.)\n" +"-D Run in background. This requires '-o' option.\n" +"-S size[,N] Switches output file to next file when the size\n" +" of file reaches the specified size. The value\n" +" should be an integer greater than 1 which is\n" +" assumed to be the maximum file size in MB.\n" +" When the number of output files reaches N, it\n" +" switches to the first output file. You can omit\n" +" the second argument.\n" +"\n" +"MODULE can be either a module name or a module path. If a\n" +"module name is used, it is searched in the following directory:\n" +msgstr "" + +#: runtime/staprun/common.c:336 runtime/staprun/common.c:361 +#: runtime/staprun/common.c:380 runtime/staprun/common.c:387 +msgid "Memory allocation failed. Exiting.\n" +msgstr "" + +#: runtime/staprun/common.c:352 +msgid "Unable to determine kernel version, uname failed" +msgstr "" + +#: runtime/staprun/common.c:400 +#, c-format +msgid "ERROR: Module name ('%s') is too long.\n" +msgstr "" + +#: runtime/staprun/common.c:491 +msgid "exceeded maximum send_request size.\n" +msgstr "" + +#: runtime/staprun/ctl.c:38 +#, c-format +msgid "ERROR: Can not attach. Module %s not running.\n" +msgstr "" + +#: runtime/staprun/ctl.c:40 +#, c-format +msgid "Couldn't open control channel '%s'" +msgstr "" + +#: runtime/staprun/mainloop.c:68 +#, c-format +msgid "Warning: child process exited with signal %d (%s)\n" +msgstr "" + +#: runtime/staprun/mainloop.c:73 +#, c-format +msgid "Warning: child process exited with status %d\n" +msgstr "" + +#: runtime/staprun/mainloop.c:124 +msgid "failed to create thread" +msgstr "" + +#: runtime/staprun/mainloop.c:206 +msgid "wordexp: syntax error (unmatched quotes?) in -c COMMAND\n" +msgstr "" + +#: runtime/staprun/mainloop.c:209 +#, c-format +msgid "wordexp: parsing error (%d)\n" +msgstr "" + +#: runtime/staprun/mainloop.c:317 runtime/staprun/mainloop.c:323 +msgid "Couldn't read bufsize" +msgstr "" + +#: runtime/staprun/mainloop.c:343 +msgid "Failed to initialize control channel.\n" +msgstr "" + +#: runtime/staprun/mainloop.c:378 +msgid "Failed to daemonize stapio\n" +msgstr "" + +#: runtime/staprun/mainloop.c:393 +msgid "Failed to open /dev/null\n" +msgstr "" + +#: runtime/staprun/mainloop.c:444 +#, c-format +msgid "" +"\n" +"Disconnecting from systemtap module.\n" +"To reconnect, type \"staprun -A %s\"\n" +msgstr "" + +#: runtime/staprun/mainloop.c:560 +#, c-format +msgid "Unexpected EOF in read (nb=%ld)" +msgstr "" + +#: runtime/staprun/mainloop.c:575 +#, c-format +msgid "write error (nb=%ld)" +msgstr "" + +#: runtime/staprun/mainloop.c:608 +msgid "WARNING deduplication table full\n" +msgstr "" + +#: runtime/staprun/mainloop.c:674 +msgid "ptrace detach" +msgstr "" + +#: runtime/staprun/mainloop.c:707 +#, c-format +msgid "WARNING: ignored message of type %d\n" +msgstr "" + +#: runtime/staprun/stapio.c:46 +msgid "ERROR: Cannot have module options with attach (-A).\n" +msgstr "" + +#: runtime/staprun/stapio.c:57 +msgid "ERROR: Need a module name or path to load.\n" +msgstr "" + +#: runtime/staprun/stapio.c:65 +msgid "ERROR: Couldn't enter main loop. Exiting.\n" +msgstr "" + +#: session.cxx:186 +#, c-format +msgid "" +"Warning: failed to create systemtap data directory \"%s\":%s, disabling " +"cache support." +msgstr "" + +#: session.cxx:198 +#, c-format +msgid "" +"Warning: failed to create cache directory (\" %s \"): %s, disabling cache " +"support." +msgstr "" + +#: session.cxx:363 +#, c-format +msgid "" +"Systemtap translator/driver (version %s/%s %s)\n" +"Copyright (C) 2005-2011 Red Hat, Inc. and others\n" +"This is free software; see the source for copying conditions." +msgstr "" + +#: session.cxx:367 +msgid "enabled features:" +msgstr "" + +#: session.cxx:402 +#, c-format +msgid "" +"Usage: stap [options] FILE Run script in file.\n" +" or: stap [options] - Run script on stdin.\n" +" or: stap [options] -e SCRIPT Run given script.\n" +" or: stap [options] -l PROBE List matching probes.\n" +" or: stap [options] -L PROBE List matching probes and local " +"variables.\n" +"\n" +"Options:\n" +" -- end of translator options, script options follow\n" +" -h --help show help\n" +" -V --version show version\n" +" -p NUM stop after pass NUM 1-5, instead of %d\n" +" (parse, elaborate, translate, compile, run)\n" +" -v add verbosity to all passes\n" +" --vp {N}+ add per-pass verbosity [" +msgstr "" + +#: session.cxx:427 session.cxx:428 session.cxx:429 session.cxx:430 +msgid " [set]" +msgstr "" + +#: session.cxx:419 +#, c-format +msgid "" +" -k keep temporary directory\n" +" -u unoptimized translation %s\n" +" -w suppress warnings %s\n" +" -W turn warnings into errors %s\n" +" -g guru mode %s\n" +" -P prologue-searching for function probes %s\n" +" -b bulk (percpu file) mode %s\n" +" -s NUM buffer size in megabytes, instead of %d\n" +" -I DIR look in DIR for additional .stp script files" +msgstr "" + +#: session.cxx:434 session.cxx:461 +msgid ", in addition to" +msgstr "" + +#: session.cxx:438 +#, c-format +msgid "" +" -D NM=VAL emit macro definition into generated C code\n" +" -B NM=VAL pass option to kbuild make\n" +" -G VAR=VAL set global variable to value\n" +" -R DIR look in DIR for runtime, instead of\n" +" %s\n" +" -r DIR cross-compile to kernel with given build tree; or else\n" +" -r RELEASE cross-compile to kernel /lib/modules/RELEASE/build, instead " +"of\n" +" %s\n" +" -a ARCH cross-compile to given architecture, instead of %s\n" +" -m MODULE set probe module name, instead of \n" +" %s\n" +" -o FILE send script output to file, instead of stdout. This supports\n" +" strftime(3) formats for FILE\n" +" -c CMD start the probes, run CMD, and exit when it finishes\n" +" -x PID sets target() to PID\n" +" -F run as on-file flight recorder with -o.\n" +" run as on-memory flight recorder without -o.\n" +" -S size[,n] set maximum of the size and the number of files.\n" +" -d OBJECT add unwind/symbol data for OBJECT file" +msgstr "" + +#: session.cxx:468 +#, c-format +msgid "" +" --ldd add unwind/symbol data for all referenced object files.\n" +" --all-modules\n" +" add unwind/symbol data for all loaded kernel objects.\n" +" -t collect probe timing information\n" +" -q generate information on tapset coverage\n" +" --unprivileged\n" +" restrict usage to features available to unprivileged users\n" +" --kelf make do with symbol table from vmlinux\n" +" --kmap[=FILE]\n" +" make do with symbol table from nm listing\n" +" --compatible=VERSION\n" +" suppress incompatible language/tapset changes beyond VERSION,\n" +" instead of %s\n" +" --check-version\n" +" displays warnings where a syntax element may be \n" +" version dependent\n" +" --skip-badvars\n" +" substitute zero for bad context $variables\n" +" --use-server[=SERVER-SPEC]\n" +" specify systemtap compile-servers\n" +" --list-servers[=PROPERTIES]\n" +" report on the status of the specified compile-servers:\n" +" all,specified,online,trusted,signer,compatible\n" +" --trust-servers[=TRUST-SPEC]\n" +" add/revoke trust of specified compile-servers:\n" +" ssl,signer,all-users,revoke,no-prompt\n" +" --use-server-on-error[=yes/no]\n" +" retry compilation using a compile server upon compilation " +"error\n" +" --remote=HOSTNAME\n" +" run pass 5 on the specified ssh host.\n" +" may be repeated for targeting multiple hosts.\n" +" --remote-prefix\n" +" prefix each line of remote output with a host index.\n" +" --tmpdir=NAME\n" +" specify name of temporary directory to be used." +msgstr "" + +#: session.cxx:643 +msgid "Invalid pass number (should be 1-5)." +msgstr "" + +#: session.cxx:648 +msgid "Listing (-l) mode implies pass 2." +msgstr "" + +#: session.cxx:685 session.cxx:849 +msgid "Only one script can be given on the command line." +msgstr "" + +#: session.cxx:701 session.cxx:758 session.cxx:830 session.cxx:864 +#, c-format +msgid "ERROR: %s invalid with %s" +msgstr "" + +#: session.cxx:718 session.cxx:736 +#, c-format +msgid "Truncating module name to '%s'" +msgstr "" + +#: session.cxx:724 +msgid "Module name cannot be empty." +msgstr "" + +#: session.cxx:787 +msgid "Invalid buffer size (should be 1-4095)." +msgstr "" + +#: session.cxx:800 +msgid "Empty CMD string invalid." +msgstr "" + +#: session.cxx:809 +msgid "Invalid target process ID number." +msgstr "" + +#: session.cxx:885 +msgid "You can't specify multiple --kmap options." +msgstr "" + +#: session.cxx:916 +msgid "Invalid --vp argument: it takes 1 to 5 digits." +msgstr "" + +#: session.cxx:967 +#, c-format +msgid "Invalid argument '%s' for --use-server-on-error." +msgstr "" + +#: session.cxx:995 session.cxx:1002 session.cxx:1009 session.cxx:1022 +#: session.cxx:1031 session.cxx:1039 session.cxx:1048 +#, c-format +msgid "ERROR: %s is invalid with %s" +msgstr "" + +#: session.cxx:1062 +#, c-format +msgid "Unhandled long argument id %d" +msgstr "" + +#: session.cxx:1076 +#, c-format +msgid "Unhandled argument code %d" +msgstr "" + +#: session.cxx:1118 +msgid "A script must be specified." +msgstr "" + +#: session.cxx:1125 +msgid "WARNING: --client-options is not supported by this version of systemtap" +msgstr "" + +#: session.cxx:1129 +msgid "WARNING: --trust-servers is not supported by this version of systemtap" +msgstr "" + +#: session.cxx:1136 +msgid "Warning: Ignoring --use-server due to the use of -R" +msgstr "" + +#: session.cxx:1160 +msgid "Using --unprivileged for member of the group stapusr" +msgstr "" + +#: session.cxx:1167 +msgid "Using --use-server for member of the group stapusr" +msgstr "" + +#: session.cxx:1176 +#, c-format +msgid "You can't specify %s when --unprivileged is specified." +msgstr "" + +#: session.cxx:1182 session.cxx:1187 session.cxx:1194 session.cxx:1205 +#, c-format +msgid "You can't specify %s and %s together." +msgstr "" + +#: session.cxx:1214 +msgid "" +"WARNING: kernel release/architecture mismatch with host forces last-pass 4." +msgstr "" + +#: session.cxx:1301 +#, c-format +msgid "Located kernel source tree (COPYING) at '%s'" +msgstr "" + +#: session.cxx:1343 +#, c-format +msgid "alias component %s contains illegal parameter" +msgstr "" + +#: session.cxx:1355 +msgid " while registering probe alias " +msgstr "" + +#: session.cxx:1408 +#, c-format +msgid "semantic error: %s" +msgstr "" + +#. TRANSLATORS: Here were are printing the source string of the error +#: session.cxx:1467 +msgid "source: " +msgstr "" + +#: stap-authorize-cert.cxx:51 +msgid "Certificate file must be specified" +msgstr "" + +#: stap-authorize-cert.cxx:59 +msgid "Certificate database directory must be specified" +msgstr "" + +#: stap-authorize-cert.cxx:74 +msgid "Unable to authorize certificate" +msgstr "" + +#: stap-gen-cert.cxx:68 +#, c-format +msgid "%s : unhandled option '%c %s'" +msgstr "" + +#: stap-gen-cert.cxx:70 +#, c-format +msgid "%s : unhandled option '%c'" +msgstr "" + +#: stap-gen-cert.cxx:114 +msgid "Unable to generate certificate" +msgstr "" + +#: stap-serverd.cxx:121 +#, c-format +msgid "Could not open client stderr file %s: %s" +msgstr "" + +#: stap-serverd.cxx:224 +#, c-format +msgid "%s: unhandled option '%c %s'" +msgstr "" + +#: stap-serverd.cxx:226 +#, c-format +msgid "%s: unhandled option '%c'" +msgstr "" + +#: stap-serverd.cxx:242 +#, c-format +msgid "%s: unhandled option '--%s=%s'" +msgstr "" + +#: stap-serverd.cxx:245 +#, c-format +msgid "%s: unhandled option '--%s'" +msgstr "" + +#: stap-serverd.cxx:253 +#, c-format +msgid "%s: unrecognized argument '%s'" +msgstr "" + +#: stap-serverd.cxx:289 +#, c-format +msgid "Received signal %d, exiting" +msgstr "" + +#: stap-serverd.cxx:348 +#, c-format +msgid "Service '%s' successfully established." +msgstr "" + +#: stap-serverd.cxx:358 stap-serverd.cxx:449 +#, c-format +msgid "Avahi service name collision, renaming service to '%s'" +msgstr "" + +#: stap-serverd.cxx:366 +#, c-format +msgid "Avahi entry group failure: %s" +msgstr "" + +#: stap-serverd.cxx:387 +#, c-format +msgid "avahi_entry_group_new () failed: %s" +msgstr "" + +#: stap-serverd.cxx:396 +#, c-format +msgid "Adding Avahi service '%s'" +msgstr "" + +#: stap-serverd.cxx:429 +#, c-format +msgid "Failed to add _stap._tcp service: %s" +msgstr "" + +#: stap-serverd.cxx:436 +#, c-format +msgid "Failed to commit avahi entry group: %s" +msgstr "" + +#: stap-serverd.cxx:474 +#, c-format +msgid "Avahi client failure: %s" +msgstr "" + +#: stap-serverd.cxx:500 +#, c-format +msgid "Removing Avahi service '%s'" +msgstr "" + +#: stap-serverd.cxx:538 +msgid "Failed to create avahi threaded poll object." +msgstr "" + +#: stap-serverd.cxx:550 +#, c-format +msgid "Failed to create avahi client: %s" +msgstr "" + +#: stap-serverd.cxx:567 +msgid "Unable to advertise presence on the network. Avahi is not available" +msgstr "" + +#: stap-serverd.cxx:599 +#, c-format +msgid "Unable to obtain current resource limits: %s" +msgstr "" + +#: stap-serverd.cxx:637 +#, c-format +msgid "===== compile server pid %d starting =====" +msgstr "" + +#: stap-serverd.cxx:677 +msgid "Error reading size of request file" +msgstr "" + +#: stap-serverd.cxx:682 stap-serverd.cxx:713 +msgid "Error in PR_Read" +msgstr "" + +#: stap-serverd.cxx:700 +#, c-format +msgid "Could not open output file %s" +msgstr "" + +#: stap-serverd.cxx:722 +#, c-format +msgid "Could not write to output file %s" +msgstr "" + +#: stap-serverd.cxx:730 +#, c-format +msgid "Expected %d bytes, got %d while reading client request from socket" +msgstr "" + +#: stap-serverd.cxx:758 +msgid "Could not import socket into SSL" +msgstr "" + +#: stap-serverd.cxx:767 +msgid "Error setting SSL security for socket" +msgstr "" + +#: stap-serverd.cxx:775 +msgid "Error setting handshake as server for socket" +msgstr "" + +#: stap-serverd.cxx:783 stap-serverd.cxx:791 +msgid "Error setting SSL client authentication mode for socket" +msgstr "" + +#: stap-serverd.cxx:802 +msgid "Error in SSL_AuthCertificateHook" +msgstr "" + +#: stap-serverd.cxx:811 +msgid "Error in SSL_BadCertHook" +msgstr "" + +#: stap-serverd.cxx:819 +msgid "Error in SSL_HandshakeCallback" +msgstr "" + +#: stap-serverd.cxx:830 +msgid "Error configuring SSL server" +msgstr "" + +#: stap-serverd.cxx:864 +msgid "Error in SSL_OptionSet:SSL_REQUEST_CERTIFICATE" +msgstr "" + +#: stap-serverd.cxx:874 +msgid "Error in SSL_OptionSet:SSL_REQUIRE_CERTIFICATE" +msgstr "" + +#: stap-serverd.cxx:883 +msgid "Error in SSL_ReHandshake" +msgstr "" + +#: stap-serverd.cxx:892 +msgid "Error in SSL_ForceHandshake" +msgstr "" + +#: stap-serverd.cxx:912 +#, c-format +msgid "Could not open input file %s" +msgstr "" + +#: stap-serverd.cxx:928 +msgid "Error writing response to socket" +msgstr "" + +#: stap-serverd.cxx:951 +#, c-format +msgid "Unable to open file %s for reading: %s" +msgstr "" + +#: stap-serverd.cxx:975 +#, c-format +msgid "Error in regcomp: %s" +msgstr "" + +#: stap-serverd.cxx:998 +#, c-format +msgid "Localization key '%s' not found in global list" +msgstr "" + +#: stap-serverd.cxx:1006 +#, c-format +msgid "Localization value '%s' contains illegal characters" +msgstr "" + +#: stap-serverd.cxx:1017 +#, c-format +msgid "Error reading file %s: %s" +msgstr "" + +#: stap-serverd.cxx:1050 +#, c-format +msgid "Unable to open client version file %s" +msgstr "" + +#: stap-serverd.cxx:1056 +#, c-format +msgid "Client version is %s" +msgstr "" + +#: stap-serverd.cxx:1068 +msgid "Cannot parse stap options" +msgstr "" + +#: stap-serverd.cxx:1080 +#, c-format +msgid "Could not create temporary directory %s" +msgstr "" + +#: stap-serverd.cxx:1100 +msgid "Out of memory" +msgstr "" + +#: stap-serverd.cxx:1108 +#, c-format +msgid "Error opening %s: %s" +msgstr "" + +#: stap-serverd.cxx:1117 +#, c-format +msgid "Error reading %s: %s" +msgstr "" + +#: stap-serverd.cxx:1182 +#, c-format +msgid "Unable to find a module in %s" +msgstr "" + +#: stap-serverd.cxx:1184 +#, c-format +msgid "Too many modules (%zu) in %s" +msgstr "" + +#: stap-serverd.cxx:1211 +#, c-format +msgid "Could not link to %s from %s" +msgstr "" + +#: stap-serverd.cxx:1269 +msgid "Error in spawn getcwd" +msgstr "" + +#: stap-serverd.cxx:1277 +msgid "Error in spawn chdir" +msgstr "" + +#: stap-serverd.cxx:1300 +#, c-format +msgid "Unable to set resource limits for %s: %s" +msgstr "" + +#: stap-serverd.cxx:1311 +#, c-format +msgid "Unable to restore resource limits after %s: %s" +msgstr "" + +#: stap-serverd.cxx:1321 +msgid "Error in spawn unchdir" +msgstr "" + +#: stap-serverd.cxx:1326 +#, c-format +msgid "Error in spawn: %s" +msgstr "" + +#: stap-serverd.cxx:1333 +msgid "Error in waitpid" +msgstr "" + +#: stap-serverd.cxx:1385 +msgid "Error resetting SSL handshake" +msgstr "" + +#: stap-serverd.cxx:1395 +msgid "Error forcing SSL handshake" +msgstr "" + +#: stap-serverd.cxx:1406 stap-serverd.cxx:1418 stap-serverd.cxx:1426 +#, c-format +msgid "Could not create temporary directory %s: %s" +msgstr "" + +#: stap-serverd.cxx:1465 +msgid "Unable to extract client request" +msgstr "" + +#: stap-serverd.cxx:1484 +msgid "Unable to compress server response" +msgstr "" + +#: stap-serverd.cxx:1494 +msgid "Error closing ssl socket" +msgstr "" + +#: stap-serverd.cxx:1502 +#, c-format +msgid "Keeping temporary directory %s" +msgstr "" + +#: stap-serverd.cxx:1511 +msgid "Error in tmpdir cleanup" +msgstr "" + +#: stap-serverd.cxx:1537 +msgid "Unable to obtain certificate private key" +msgstr "" + +#: stap-serverd.cxx:1548 +msgid "Error accepting client connection" +msgstr "" + +#: stap-serverd.cxx:1553 +#, c-format +msgid "Accepted connection from %d.%d.%d.%d:%d" +msgstr "" + +#: stap-serverd.cxx:1566 +msgid "Error processing client request" +msgstr "" + +#: stap-serverd.cxx:1569 +#, c-format +msgid "Request from %d.%d.%d.%d:%d complete" +msgstr "" + +#: stap-serverd.cxx:1630 +msgid "Unable to configure SSL server session ID cache" +msgstr "" + +#: stap-serverd.cxx:1640 +#, c-format +msgid "Unable to find our certificate in the database at %s" +msgstr "" + +#: stap-serverd.cxx:1663 +msgid "Unable to shut down server session ID cache" +msgstr "" + +#: stap-serverd.cxx:1678 +msgid "Error creating socket" +msgstr "" + +#: stap-serverd.cxx:1690 stap-serverd.cxx:1702 +msgid "Error setting socket properties" +msgstr "" + +#: stap-serverd.cxx:1727 +#, c-format +msgid "Network port %d is unavailable. Trying another port" +msgstr "" + +#: stap-serverd.cxx:1731 +#, c-format +msgid "Network port %d is busy. Trying another port" +msgstr "" + +#: stap-serverd.cxx:1735 +msgid "Error setting socket address" +msgstr "" + +#: stap-serverd.cxx:1745 +msgid "Unable to obtain socket address" +msgstr "" + +#: stap-serverd.cxx:1750 +#, c-format +msgid "Using network port %d" +msgstr "" + +#: stap-serverd.cxx:1757 +msgid "Error listening on socket" +msgstr "" + +#: stap-serverd.cxx:1780 +msgid "Unable to authorize certificate for the local client" +msgstr "" + +#: stap-serverd.cxx:1791 +msgid "Error closing listen socket" +msgstr "" + +#: stap-sign-module.cxx:51 +msgid "Module name was not specified." +msgstr "" + +#: staptree.cxx:161 +msgid "inconsistent arity" +msgstr "" + +#: staptree.cxx:165 +#, c-format +msgid "inconsistent arity (%s vs %d)" +msgstr "" + +#: staptree.cxx:168 +#, c-format +msgid "arity %s first inferred here" +msgstr "" + +#: staptree.cxx:203 +msgid "internal error, joining a non-synthetic function" +msgstr "" + +#: staptree.cxx:205 +#, c-format +msgid "synthetic function '%s' conflicts with an existing function" +msgstr "" + +#: staptree.cxx:251 +#, c-format +msgid "%s variable '%s' may not be used as array" +msgstr "" + +#: staptree.cxx:254 +#, c-format +msgid "%s variable '%s' may not be used as a structure" +msgstr "" + +#: staptree.cxx:258 +#, c-format +msgid "%s variable '%s' may not be pretty-printed" +msgstr "" + +#: staptree.cxx:262 +#, c-format +msgid "invalid use of %s variable '%s'" +msgstr "" + +#: staptree.cxx:854 +msgid "invalid or missing conversion specifier" +msgstr "" + +#: staptree.cxx:867 +msgid "trailing incomplete print format conversion" +msgstr "" + +#: staptree.cxx:1574 staptree.cxx:1587 +msgid "Expecting symbol or histogram operator" +msgstr "" + +#: staptree.cxx:1576 +msgid "Failed to classify indexable" +msgstr "" + +#: staptree.cxx:1930 +msgid "function may not be used when --unprivileged is specified" +msgstr "" + +#: staptree.cxx:1935 +msgid "function may not be used unless -g is specified" +msgstr "" + +#: staptree.cxx:1964 +msgid "embedded expression may not be used when --unprivileged is specified" +msgstr "" + +#: staptree.cxx:1969 +msgid "embedded expression may not be used unless -g is specified" +msgstr "" + +#: staptree.cxx:2075 +msgid "symbol without referent" +msgstr "" + +#: staptree.cxx:2264 +msgid "invalid element" +msgstr "" + +#: tapset-itrace.cxx:79 tapsets.cxx:6246 tapset-utrace.cxx:128 +msgid "process probes not available without kernel CONFIG_UTRACE" +msgstr "" + +#: tapset-mark.cxx:100 +msgid "invalid marker argument number" +msgstr "" + +#: tapset-mark.cxx:103 +msgid "write to marker parameter not permitted" +msgstr "" + +#: tapset-mark.cxx:123 +#, c-format +msgid "write to marker '%s' not permitted" +msgstr "" + +#: tapset-mark.cxx:187 +msgid "cannot take address of marker variable" +msgstr "" + +#: tapset-mark.cxx:195 +msgid "" +"invalid target symbol for marker, $argN, $name, $format, $$parms or $$vars " +"expected" +msgstr "" + +#: tapset-mark.cxx:449 translate.cxx:2019 +msgid "cannot expand unknown type" +msgstr "" + +#: tapset-mark.cxx:582 +msgid "mark_builder releasing cache" +msgstr "" + +#. TRANSLATORS: specific path cannot be opened +#: tapset-mark.cxx:620 +msgid " cannot be opened: " +msgstr "" + +#: tapset-perfmon.cxx:200 +msgid "" +"perf probes not available without exported perf_event_create_kernel_counter" +msgstr "" + +#: tapset-perfmon.cxx:202 +msgid "perf probes not available without CONFIG_PERF_EVENTS" +msgstr "" + +#: tapset-perfmon.cxx:217 +msgid "invalid perf sample period " +msgstr "" + +#: tapset-perfmon.cxx:221 +#, c-format +msgid "perf probe type=% config=% period=%" +msgstr "" + +#: tapset-procfs.cxx:147 +msgid "only one write procfs probe can exist for procfs path \"" +msgstr "" + +#: tapset-procfs.cxx:149 +msgid "only one read procfs probe can exist for procfs path \"" +msgstr "" + +#: tapset-procfs.cxx:406 +msgid "invalid target symbol for procfs probe, $value expected" +msgstr "" + +#: tapset-procfs.cxx:413 +msgid "procfs $value variable is read-only in a procfs write probe" +msgstr "" + +#: tapset-procfs.cxx:415 +msgid "procfs $value variable cannot be read in a procfs read probe" +msgstr "" + +#: tapset-procfs.cxx:418 +msgid "cannot take address of procfs variable" +msgstr "" + +#: tapset-procfs.cxx:459 +msgid "" +"Only the following assign operators are implemented on procfs read target " +"variables: '=', '.='" +msgstr "" + +#: tapset-procfs.cxx:547 +msgid "maxsize must be greater than 0" +msgstr "" + +#: tapset-procfs.cxx:569 +msgid "procfs path cannot start with a '/'" +msgstr "" + +#: tapset-procfs.cxx:575 +msgid "procfs path component cannot be empty" +msgstr "" + +#: tapset-procfs.cxx:579 tapset-procfs.cxx:589 +msgid "procfs path cannot be relative (and contain '.' or '..')" +msgstr "" + +#: tapset-procfs.cxx:586 +msgid "procfs path cannot end with a '/'" +msgstr "" + +#: tapset-procfs.cxx:593 +msgid "need read/write component" +msgstr "" + +#: tapsets.cxx:872 +#, c-format +msgid "" +"Error: Pattern '%s' matches every single instruction address in the symbol " +"table,\n" +"some of which aren't even functions.\n" +msgstr "" + +#: tapsets.cxx:906 +#, c-format +msgid "Warning: address %# out of range for module %s" +msgstr "" + +#: tapsets.cxx:917 +#, c-format +msgid "" +"Warning: address %# maps to no known compilation unit in module %s" +msgstr "" + +#: tapsets.cxx:1027 +#, c-format +msgid "parse '%s'" +msgstr "" + +#: tapsets.cxx:1068 +#, c-format +msgid "malformed specification '%s'" +msgstr "" + +#: tapsets.cxx:1097 +msgid "probe " +msgstr "" + +#: tapsets.cxx:1099 +msgid " kernel" +msgstr "" + +#: tapsets.cxx:1101 +msgid " module=" +msgstr "" + +#: tapsets.cxx:1103 +msgid " process=" +msgstr "" + +#: tapsets.cxx:1317 +#, c-format +msgid "address 0x%# does not match the beginning of a statement" +msgstr "" + +#: tapsets.cxx:1320 +#, c-format +msgid " (try 0x%#)" +msgstr "" + +#: tapsets.cxx:1322 +#, c-format +msgid " (no line info found for '%s', in module '%s')" +msgstr "" + +#: tapsets.cxx:1376 +#, c-format +msgid "querying entrypc %# of instance of inline '%s'\n" +msgstr "" + +#: tapsets.cxx:1457 +msgid "function DIE lands on srcfile\n" +msgstr "" + +#: tapsets.cxx:1478 +msgid "inline instance DIE lands on srcfile\n" +msgstr "" + +#: tapsets.cxx:1519 +#, c-format +msgid "selected inline instance of %s\n" +msgstr "" + +#: tapsets.cxx:1575 +#, c-format +msgid "checking instances of inline %s\n" +msgstr "" + +#: tapsets.cxx:1585 +#, c-format +msgid "selected function %s\n" +msgstr "" + +#: tapsets.cxx:1623 +#, c-format +msgid "focused on CU '%s', in module '%s'\n" +msgstr "" + +#: tapsets.cxx:1664 +msgid "" +"For probing a particular line, use a .statement() probe, not .function()" +msgstr "" + +#: tapsets.cxx:1821 +#, c-format +msgid "ELF machine %s|%s (code %d) mismatch with target %s in '%s'" +msgstr "" + +#: tapsets.cxx:1828 +#, c-format +msgid "" +"focused on module '%s' = [0x%#, -0x%#, bias 0x%# " +"file %s ELF machine %s|%s (code %d)\n" +msgstr "" + +#: tapsets.cxx:1917 +#, c-format +msgid "focused on module '%s'\n" +msgstr "" + +#: tapsets.cxx:1987 +msgid "module=" +msgstr "" + +#: tapsets.cxx:2008 +msgid "deleting module_cache" +msgstr "" + +#: tapsets.cxx:2110 +#, c-format +msgid "" +"Only the following assign operator is implemented on target variables: %s" +msgid_plural "" +"Only the following assign operators are implemented on target variables: %s" +msgstr[0] "" +msgstr[1] "" + +#: tapsets.cxx:2303 +msgid "cannot take address of pretty-printed variable" +msgstr "" + +#: tapsets.cxx:2307 +msgid "invalid target_symbol for pretty-print" +msgstr "" + +#: tapsets.cxx:3089 +msgid "unknown type to save in kretprobe" +msgstr "" + +#: tapsets.cxx:3239 tapsets.cxx:8211 +msgid "variable location problem: " +msgstr "" + +#: tapsets.cxx:3273 +msgid "write to target variable not permitted" +msgstr "" + +#: tapsets.cxx:3285 +msgid "write to target variable not permitted in .return probes" +msgstr "" + +#: tapsets.cxx:3294 +msgid "cannot write to context variable" +msgstr "" + +#: tapsets.cxx:3297 tapsets.cxx:4901 tapsets.cxx:8166 +msgid "cannot take address of context variable" +msgstr "" + +#: tapsets.cxx:3309 tapsets.cxx:3570 tapsets.cxx:8063 +msgid "cannot write to pretty-printed variable" +msgstr "" + +#. TRANSLATORS: Here we're using a cached module. +#: tapsets.cxx:3690 +msgid "Pass 2: using cached " +msgstr "" + +#: tapsets.cxx:3713 +msgid "write to @cast context variable not permitted" +msgstr "" + +#: tapsets.cxx:3853 +msgid "missing relocation basis" +msgstr "" + +#: tapsets.cxx:3855 +msgid "inconsistent relocation address" +msgstr "" + +#: tapsets.cxx:3865 +#, c-format +msgid "maxactive value out of range [0,%s]" +msgstr "" + +#: tapsets.cxx:3996 +#, c-format +msgid "saveargs: examining '%s' (dieoffset: %#)\n" +msgstr "" + +#: tapsets.cxx:4008 +#, c-format +msgid "" +"saveargs: failed to retrieve type name for return value (dieoffset: %s)\n" +msgstr "" + +#: tapsets.cxx:4036 +#, c-format +msgid "saveargs: failed to retrieve name for local (dieoffset: %s)\n" +msgstr "" + +#: tapsets.cxx:4042 +#, c-format +msgid "saveargs: finding location for local '%s' (dieoffset: %s)\n" +msgstr "" + +#: tapsets.cxx:4057 +#, c-format +msgid "" +"saveargs: failed to resolve the location for local '%s' (dieoffset: %s)\n" +msgstr "" + +#: tapsets.cxx:4065 +#, c-format +msgid "" +"saveargs: local '%s' (dieoffset: %s) is not available at this address (%s)\n" +msgstr "" + +#: tapsets.cxx:4078 +#, c-format +msgid "saveargs: failed to retrieve type name for local '%s' (dieoffset: %s)\n" +msgstr "" + +#: tapsets.cxx:5222 +#, c-format +msgid "Can't parse SDT_V3 operand '%s'" +msgstr "" + +#: tapsets.cxx:5224 +#, c-format +msgid "Downgrading SDT_V2 probe argument to dwarf, can't parse '%s'" +msgstr "" + +#. TRANSLATORS: We're mapping the operand to a new expression*. +#: tapsets.cxx:5237 +#, c-format +msgid "mapped asm operand %s to " +msgstr "" + +#: tapsets.cxx:5242 tapsets.cxx:5372 +msgid "cannot take address of sdt variable" +msgstr "" + +#: tapsets.cxx:5297 tapsets.cxx:5307 +msgid "cannot take address of sdt context variable" +msgstr "" + +#: tapsets.cxx:5325 +msgid "invalid variable, must be of the form $argN" +msgstr "" + +#: tapsets.cxx:5327 +msgid "invalid argument number" +msgstr "" + +#. TRANSLATORS: Describing what probe type (kprobe or uprobe) the probe +#. TRANSLATORS: is matched to. +#: tapsets.cxx:5484 +#, c-format +msgid "matched probe_name %s probe type " +msgstr "" + +#: tapsets.cxx:5743 tapsets.cxx:5807 +msgid " (provider " +msgstr "" + +#: tapsets.cxx:5743 +#, c-format +msgid " saw .note.stapsdt %s%s " +msgstr "" + +#: tapsets.cxx:5764 +#, c-format +msgid "got unknown probe_type : 0x%x" +msgstr "" + +#: tapsets.cxx:5807 +msgid "saw .probes " +msgstr "" + +#: tapsets.cxx:5825 +#, c-format +msgid "looking for semaphore symbol %s " +msgstr "" + +#: tapsets.cxx:5840 +msgid ", found at 0x" +msgstr "" + +#: tapsets.cxx:5845 +msgid ", not found" +msgstr "" + +#: tapsets.cxx:5972 +msgid "probe_type == uprobe1, use statement addr: 0x" +msgstr "" + +#: tapsets.cxx:5976 +msgid "probe_type == uprobe2, use statement addr: 0x" +msgstr "" + +#: tapsets.cxx:5980 +msgid "probe_type == uprobe3, use statement addr: 0x" +msgstr "" + +#: tapsets.cxx:5990 +#, c-format +msgid "probe_type == use_uprobe_no_dwarf, use label name: _stapprobe1_%s" +msgstr "" + +#: tapsets.cxx:6074 +msgid "unspecified process probe is invalid without a -c COMMAND" +msgstr "" + +#: tapsets.cxx:6099 +#, c-format +msgid "glob %s error (%s)" +msgstr "" + +#: tapsets.cxx:6120 tapsets.cxx:6210 +#, c-format +msgid "Expanded process(\"%s\") to process(\"%s\")" +msgstr "" + +#: tapsets.cxx:6254 +#, c-format +msgid "dwarf_builder::build for %s" +msgstr "" + +#: tapsets.cxx:6274 tapsets.cxx:7593 +msgid "absolute statement probe in unprivileged script" +msgstr "" + +#: tapsets.cxx:6314 +#, c-format +msgid "cannot probe .return of %u inlined function %s" +msgid_plural "cannot probe .return of %u inlined functions %s" +msgstr[0] "" +msgstr[1] "" + +#: tapsets.cxx:6320 +#, c-format +msgid "skipped .return probe of %u inlined function" +msgid_plural "skipped .return probe of %u inlined functions" +msgstr[0] "" +msgstr[1] "" + +#: tapsets.cxx:6378 +#, c-format +msgid "" +"Symbol table error: Line %d of symbol list from %s is not in correct format: " +"address type name [module]" +msgstr "" + +#: tapsets.cxx:6395 +#, c-format +msgid "Symbol table error: %s contains no function symbols." +msgstr "" + +#: tapsets.cxx:6421 +#, c-format +msgid "Internal error reading symbol table from %s -- %s" +msgstr "" + +#: tapsets.cxx:6429 +#, c-format +msgid "Warning: nm cannot read symbol table from %s" +msgstr "" + +#: tapsets.cxx:6443 +#, c-format +msgid "Warning: cannot read symbol table from %s -- %s" +msgstr "" + +#: tapsets.cxx:6593 +#, c-format +msgid "Warning: reading symbol table from %s -- ignoring %s" +msgstr "" + +#: tapsets.cxx:6603 +msgid "Error: Cannot find vmlinux. Consider using --kmap instead of --kelf." +msgstr "" + +#: tapsets.cxx:7724 +#, c-format +msgid "Too many hardware breakpoint probes requested for %s (%zu vs. %u)" +msgstr "" + +#: tapsets.cxx:7912 +msgid "CONFIG_PERF_EVENTS not available on this kernel" +msgstr "" + +#: tapsets.cxx:7915 +msgid "CONFIG_HAVE_HW_BREAKPOINT not available on this kernel" +msgstr "" + +#: tapsets.cxx:8022 +#, c-format +msgid "unable to find tracepoint variable '%s' (alternatives: %s)" +msgstr "" + +#: tapsets.cxx:8036 +#, c-format +msgid "write to tracepoint variable '%s' not permitted" +msgstr "" + +#: tapsets.cxx:8045 +msgid "cannot take address of tracepoint variable" +msgstr "" + +#: tapsets.cxx:8169 +#, c-format +msgid "write to tracepoint '%s' not permitted" +msgstr "" + +#: tapsets.cxx:8375 +#, c-format +msgid "cannot get type of parameter '%s' of tracepoint '%s'" +msgstr "" + +#: tapsets.cxx:8381 +#, c-format +msgid "found parameter for tracepoint '%s': type:'%s' name:'%s'" +msgstr "" + +#: tapsets.cxx:8712 +msgid "tracepoint_builder releasing dwflpp" +msgstr "" + +#: tapsets.cxx:8732 +#, c-format +msgid "Pass 2: getting a tracepoint query for %zu headers: " +msgstr "" + +#: tapsets.cxx:8748 +#, c-format +msgid "Pass 2: using cached %s" +msgstr "" + +#: tapsets.cxx:8814 +#, c-format +msgid "Located kernel source tree (DW_AT_comp_dir) at '%s'" +msgstr "" + +#: tapsets.cxx:8846 +msgid "Checking tracepoint glob " +msgstr "" + +#. TRANSLATORS: 'timer' is the name of a probe point +#: tapset-timers.cxx:64 +msgid "invalid interval for jiffies timer" +msgstr "" + +#. TRANSLATORS: 'randomize' is a key word +#: tapset-timers.cxx:68 +msgid "invalid randomize for jiffies timer" +msgstr "" + +#: tapset-timers.cxx:71 +msgid "only expect one probe point" +msgstr "" + +#: tapset-timers.cxx:199 +#, c-format +msgid "interval value out of range (%s, %s)" +msgstr "" + +#: tapset-timers.cxx:205 +msgid "randomization value out of range" +msgstr "" + +#: tapset-timers.cxx:553 +msgid "frequency must be greater than 0" +msgstr "" + +#: tapset-timers.cxx:583 +msgid "unrecognized timer variant" +msgstr "" + +#: tapset-utrace.cxx:471 +msgid "only \"process(PATH_OR_PID).syscall\" support $argN or $$parms." +msgstr "" + +#: tapset-utrace.cxx:517 tapset-utrace.cxx:524 +msgid "invalid syscall argument number (1-6)" +msgstr "" + +#: tapset-utrace.cxx:528 +msgid "utrace '$argN' variable is read-only" +msgstr "" + +#: tapset-utrace.cxx:557 +#, c-format +msgid "utrace '%s' variable is read-only" +msgstr "" + +#: tapset-utrace.cxx:563 +msgid "only \"process(PATH_OR_PID).syscall.return\" support $return." +msgstr "" + +#: tapset-utrace.cxx:588 +msgid "unknown target variable" +msgstr "" + +#: tapset-utrace.cxx:612 +msgid "" +"only \"process(PATH_OR_PID).syscall\" and \"process(PATH_OR_PID).syscall." +"return\" probes support target symbols" +msgstr "" + +#: tapset-utrace.cxx:617 +msgid "cannot take address of utrace variable" +msgstr "" + +#: tapset-utrace.cxx:624 +msgid "" +"invalid target symbol for utrace probe, $syscall, $return, $argN or $$parms " +"expected" +msgstr "" + +#: tapset-utrace.cxx:690 +msgid "process pid must be greater than 1" +msgstr "" + +#: translate.cxx:47 +msgid "\"Array overflow, check " +msgstr "" + +#: translate.cxx:48 +msgid "\"MAXNESTING exceeded\";" +msgstr "" + +#: translate.cxx:49 +msgid "\"division by 0\";" +msgstr "" + +#: translate.cxx:50 +msgid "\"MAXACTION exceeded\";" +msgstr "" + +#: translate.cxx:51 +msgid "\"aggregation overflow in " +msgstr "" + +#: translate.cxx:52 +msgid "\"empty aggregate\";" +msgstr "" + +#: translate.cxx:53 +msgid "\"histogram index out of range\";" +msgstr "" + +#: translate.cxx:433 +#, c-format +msgid "unsupported stats type for %s" +msgstr "" + +#: translate.cxx:441 +#, c-format +msgid "unsupported initializer for %s" +msgstr "" + +#: translate.cxx:455 +#, c-format +msgid "unsupported deallocator for %s" +msgstr "" + +#: translate.cxx:585 +msgid "unknown type of map" +msgstr "" + +#: translate.cxx:600 +msgid "index type mismatch" +msgstr "" + +#: translate.cxx:616 +msgid "aggregating non-parallel map type" +msgstr "" + +#: translate.cxx:624 +msgid "fetching aggregate of non-parallel map type" +msgstr "" + +#: translate.cxx:642 +msgid "checking existence of an unsupported map type" +msgstr "" + +#: translate.cxx:655 +msgid "getting a value from an unsupported map type" +msgstr "" + +#: translate.cxx:666 +msgid "adding a value of an unsupported map type" +msgstr "" + +#: translate.cxx:688 +msgid "setting a value of an unsupported map type" +msgstr "" + +#: translate.cxx:777 +msgid "iterating over unknown reference type" +msgstr "" + +#: translate.cxx:790 +msgid "inconsistent iterator type in itervar::start()" +msgstr "" + +#: translate.cxx:801 +msgid "inconsistent iterator type in itervar::next()" +msgstr "" + +#: translate.cxx:826 +msgid "illegal key type" +msgstr "" + +#: translate.cxx:833 +msgid "inconsistent iterator value in itervar::get_value()" +msgstr "" + +#: translate.cxx:845 +msgid "illegal value type" +msgstr "" + +#: translate.cxx:1602 translate.cxx:1757 +msgid "array locals not supported, missing global declaration?" +msgstr "" + +#: translate.cxx:1691 +#, c-format +msgid "%s elided, duplicates %s" +msgstr "" + +#: translate.cxx:1766 +msgid "unsupported local variable type" +msgstr "" + +#: translate.cxx:1862 +msgid "nothing" +msgstr "" + +#: translate.cxx:1910 translate.cxx:1940 +msgid "array type is neither string nor long" +msgstr "" + +#: translate.cxx:1925 +msgid "array key is neither string nor long" +msgstr "" + +#: translate.cxx:2053 +msgid "unsupported c_expression token type" +msgstr "" + +#: translate.cxx:2084 +msgid "unknown lvalue type in assignment" +msgstr "" + +#: translate.cxx:2104 translate.cxx:2124 +msgid " type unsupported" +msgstr "" + +#: translate.cxx:2153 +msgid "post assignment on strings not supported" +msgstr "" + +#: translate.cxx:2167 +#, c-format +msgid "string assignment operator %s unsupported" +msgstr "" + +#: translate.cxx:2199 +msgid "unknown macop for assignment" +msgstr "" + +#: translate.cxx:2204 +msgid "invalid post-mode operator" +msgstr "" + +#: translate.cxx:2241 +msgid "assignment type not yet implemented" +msgstr "" + +#: translate.cxx:2328 +msgid "unresolved symbol" +msgstr "" + +#: translate.cxx:2330 +msgid "unresolved symbol: " +msgstr "" + +#: translate.cxx:2369 +msgid "attempt to use scalar where map expected" +msgstr "" + +#: translate.cxx:2607 translate.cxx:3610 translate.cxx:3630 +msgid "expected numeric type" +msgstr "" + +#: translate.cxx:2752 translate.cxx:4000 +msgid "Invalid indexing of histogram" +msgstr "" + +#: translate.cxx:3015 +msgid "cannot 'return' from probe" +msgstr "" + +#: translate.cxx:3018 +msgid "return type mismatch" +msgstr "" + +#: translate.cxx:3031 +msgid "cannot 'next' from function" +msgstr "" + +#: translate.cxx:3095 +msgid "Cannot delete unknown expression type" +msgstr "" + +#: translate.cxx:3122 translate.cxx:3145 +msgid "cannot delete histogram bucket entries\n" +msgstr "" + +#: translate.cxx:3171 +msgid "cannot 'break' outside loop" +msgstr "" + +#: translate.cxx:3182 +msgid "cannot 'continue' outside loop" +msgstr "" + +#: translate.cxx:3256 +msgid "expected numeric or string type" +msgstr "" + +#: translate.cxx:3268 translate.cxx:3342 translate.cxx:3371 translate.cxx:3387 +#: translate.cxx:3490 +msgid "expected numeric types" +msgstr "" + +#: translate.cxx:3333 +msgid "operator not yet implemented" +msgstr "" + +#: translate.cxx:3478 translate.cxx:3524 +msgid "expected string types" +msgstr "" + +#: translate.cxx:3499 +msgid "unexpected type" +msgstr "" + +#: translate.cxx:3519 +msgid "unexpected concatenation operator" +msgstr "" + +#: translate.cxx:3542 +msgid "expected numeric condition" +msgstr "" + +#: translate.cxx:3547 +msgid "expected matching types" +msgstr "" + +#: translate.cxx:3573 +msgid "non-number <<< expression" +msgstr "" + +#: translate.cxx:3576 +msgid "non-stats left operand to <<< expression" +msgstr "" + +#: translate.cxx:3579 +msgid "non-number right operand to <<< expression" +msgstr "" + +#: translate.cxx:3585 translate.cxx:3588 +msgid "type mismatch" +msgstr "" + +#: translate.cxx:3644 +msgid "invalid reference to array" +msgstr "" + +#: translate.cxx:3739 +msgid "need rvalue for assignment" +msgstr "" + +#: translate.cxx:3750 +msgid "unexpected reference to array" +msgstr "" + +#: translate.cxx:3769 +msgid "cannot translate general target-symbol expression" +msgstr "" + +#: translate.cxx:3776 +msgid "cannot translate general @cast expression" +msgstr "" + +#: translate.cxx:3783 +msgid "cannot translate general @defined expression" +msgstr "" + +#: translate.cxx:3790 +msgid "cannot translate general @entry expression" +msgstr "" + +#: translate.cxx:3841 +msgid "invalid array reference" +msgstr "" + +#: translate.cxx:3846 +msgid "array index type mismatch" +msgstr "" + +#: translate.cxx:3890 +msgid "expected arrayindex expression" +msgstr "" + +#: translate.cxx:3902 +msgid "unexpected aggregate of non-statistic" +msgstr "" + +#: translate.cxx:3918 +msgid "unexpected aggregate of non-arrayindex" +msgstr "" + +#: translate.cxx:4036 +msgid "statistic-valued array in rvalue context" +msgstr "" + +#: translate.cxx:4130 translate.cxx:4221 +msgid "cannot assign to histogram buckets" +msgstr "" + +#: translate.cxx:4150 +msgid "unexpected reference to scalar" +msgstr "" + +#: translate.cxx:4250 +msgid "invalid length argument list" +msgstr "" + +#: translate.cxx:4266 translate.cxx:4286 +msgid "function argument type mismatch" +msgstr "" + +#: translate.cxx:4277 +msgid "function actual argument evaluation" +msgstr "" + +#: translate.cxx:4337 +msgid "unknown type of arg to print operator" +msgstr "" + +#: translate.cxx:4403 +#, c-format +msgid "additional argument to print" +msgid_plural "too many arguments to print (%zu)" +msgstr[0] "" +msgstr[1] "" + +#: translate.cxx:4449 +msgid "cannot print unknown expression type" +msgstr "" + +#: translate.cxx:4451 +msgid "cannot print a raw stats object" +msgstr "" + +#: translate.cxx:4948 +#, c-format +msgid "Getting symbol table for %s" +msgstr "" + +#: translate.cxx:4980 +msgid "unexpected build-id reloc section " +msgstr "" + +#: translate.cxx:4988 +#, c-format +msgid "Found build-id in %s, length %d, start at 0x%#" +msgstr "" + +#: translate.cxx:5037 +#, c-format +msgid "Found kernel _stext extra offset 0x%#" +msgstr "" + +#: translate.cxx:5210 +#, c-format +msgid "skipping module %s eh_frame_hdr table (too big: %s > %s)" +msgstr "" + +#: translate.cxx:5274 +#, c-format +msgid "skipping module %s, section %s debug_frame_hdr table (too big: %s > %s)" +msgstr "" + +#: translate.cxx:5537 +msgid "Searching for vdso candidates: " +msgstr "" + +#: translate.cxx:5547 +msgid "vdso candidate: " +msgstr "" + +#: translate.cxx:5667 +msgid "missing unwind/symbol data for module '" +msgstr "" + +#: translate.cxx:5690 +#, c-format +msgid "identified max-nested function: %s (%d)" +msgstr "" + +#: translate.cxx:5701 +#, c-format +msgid "identified recursive function: %s" +msgstr "" + +#: translate.cxx:5716 +#, c-format +msgid "" +"myproc-unprivileged tapset function called without is_myproc checking for " +"pid %d (euid %d)" +msgstr "" + +#: translate.cxx:5720 +#, c-format +msgid "kernel read fault at 0x%p (%s)" +msgstr "" + +#: translate.cxx:5722 +#, c-format +msgid "kernel write fault at 0x%p (%s)" +msgstr "" + +#: translate.cxx:5724 +#, c-format +msgid "divide by zero in DWARF operand (%s)" +msgstr "" + +#: translate.cxx:5768 +#, c-format +msgid "ignoring extra parts of compat version: %s" +msgstr "" + +#: translate.cxx:5772 +#, c-format +msgid "parse error in compatibility version: %s" +msgstr "" + +#: translate.cxx:5775 +#, c-format +msgid "compatibility version out of range: %s" +msgstr "" + +#: translate.cxx:5795 +msgid " recursive" +msgstr "" + +#: translate.cxx:5795 +msgid " non-recursive" +msgstr "" + +#: translate.cxx:5794 +#, c-format +msgid "function recursion-analysis: max-nesting %d %s" +msgstr "" + +#: util.cxx:59 +msgid "Unable to determine home directory" +msgstr "" + +#: util.cxx:113 +#, c-format +msgid "Copying %s to %s" +msgstr "" + +#: util.cxx:167 +#, c-format +msgid "Copy failed (\"%s\" to \"%s\"): %s" +msgstr "" + +#: util.cxx:250 +msgid "Unable to retrieve group list" +msgstr "" + +#: util.cxx:277 +#, c-format +msgid "using %ldvirt/%ldres/%ldshr kb, " +msgstr "" + +#: util.cxx:400 +msgid "cmdstr_join called with an empty command!" +msgstr "" + +#: util.cxx:450 +#, c-format +msgid "Spawn waitpid call on unmanaged pid %d" +msgstr "" + +#: util.cxx:457 +#, c-format +msgid "Spawn waitpid result (0x%x): %d" +msgstr "" + +#: util.cxx:462 +#, c-format +msgid "Spawn waitpid error (%d): %s" +msgstr "" + +#: util.cxx:503 +#, c-format +msgid "Warning: %s is not executable (%s)" +msgstr "" + +#: util.cxx:509 +msgid "Running" +msgstr "" + +#: util.cxx:543 +#, c-format +msgid "Spawn error (%d): %s" +msgstr "" + +#: util.cxx:700 +#, c-format +msgid "regcomp %s (%s) error rc= %d" +msgstr "" + +#: util.cxx:712 +#, c-format +msgid "ERROR: Safety pattern mismatch for %s ('%s' vs. '%s') rc=%d" +msgstr "" + +#: util.cxx:730 +#, c-format +msgid "regcomp %s error rc=%d" +msgstr "" + +#. TRANSLATORS: Missing a file +#: util.cxx:806 +#, c-format +msgid "Missing %s" +msgstr "" + +#: util.cxx:825 +#, c-format +msgid "autosprintf/vasprintf error %s" +msgstr "" + +#: util.h:74 util.h:85 util.h:96 util.h:104 util.h:115 util.h:128 +msgid "bad lexical cast" +msgstr "" diff -Nru systemtap-1.4/README systemtap-1.6/README --- systemtap-1.4/README 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/README 2011-07-25 18:12:01.000000000 +0000 @@ -1,6 +1,6 @@ systemtap: a linux trace/probe tool -Visit the project web site at , +Visit the project web site at , for documentation and mailing lists for developers and users. This is free software. @@ -19,11 +19,17 @@ Installation steps: - Install the kernel development and gcc packages. + On modern Fedora, # yum install kernel-devel-`uname -r` + - Install any debuginfo packages you need, for kernel and/or userspace. + On modern Fedora, # debuginfo-install kernel [...] + (Beware of confusion between kernel vs. kernel-debug vs kernel-PAE etc. variants. Each likely has a corresponding development and debuginfo package.) -- Install the systemtap package, if one already exists. + +- Install the systemtap package. + On modern Fedora, # yum install systemtap systemtap-runtime Build steps: @@ -46,11 +52,11 @@ # apt-get build-dep systemtap - Download systemtap sources: - http://sources.redhat.com/systemtap/ftp/releases/ - http://sources.redhat.com/systemtap/ftp/snapshots/ + http://sourceware.org/systemtap/ftp/releases/ + http://sourceware.org/systemtap/ftp/snapshots/ (or) - git clone git://sources.redhat.com/git/systemtap.git - (or) http://sources.redhat.com/git/systemtap.git + git clone git://sourceware.org/git/systemtap.git + (or) http://sourceware.org/git/systemtap.git - Build systemtap normally: % .../configure [other autoconf options] @@ -67,10 +73,10 @@ personal directory. % make all - % sudo make install + # make install To uninstall systemtap: - % sudo make uninstall + # make uninstall - Run systemtap: @@ -81,14 +87,19 @@ Some samples should be available under $prefix/share/doc/systemtap/examples. Normally, run "stap" as root. If desired, create "stapdev" and - "stapusr" entries in /etc/groups. Any users in "stapdev" will be - able to run systemtap as if with root privileges. Users in "stapusr" - can only launch (with "staprun") pre-compiled probe modules (created + "stapusr" entries in /etc/groups. Any users in "stapdev"+"stapusr" will + be able to run systemtap as if with root privileges. Users in "stapusr" + only may launch (with "staprun") pre-compiled probe modules (created by "stap -p4 ...") that a system administrator copied under - /lib/modules/`uname -r`/systemtap. + /lib/modules/`uname -r`/systemtap. "stapusr" may also be permitted to + create arbitrary unprivileged systemtap scripts of their own. See + README.unprivileged for additional setup instructions. + + To run a simple test. + # stap -v -e 'probe vfs.read {printf("read performed\n"); exit()}' To run the full test suite from the build tree. - % sudo make installcheck + # make installcheck Tips: @@ -102,12 +113,12 @@ Building a kernel.org kernel: -- Consider applying the utrace patches, if you wish to probe - user-space applications. http://people.redhat.com/roland/utrace/ +- Consider applying the utrace kernel patches, if you wish to probe + user-space applications. http://sourceware.org/systemtap/wiki/utrace - Build the kernel using your normal procedures. Enable CONFIG_DEBUG_INFO, CONFIG_KPROBES, CONFIG_RELAY, CONFIG_DEBUG_FS, - CONFIG_MODULES, CONFIG_MODULES_UNLOAD, CONFIG_UTRACE if able + CONFIG_MODULES, CONFIG_MODULE_UNLOAD, CONFIG_UTRACE if able - % make modules_install install headers_install - Boot into the kernel. diff -Nru systemtap-1.4/README.unprivileged systemtap-1.6/README.unprivileged --- systemtap-1.4/README.unprivileged 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/README.unprivileged 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,284 @@ +Unprivileged Mode for Systemtap Users +===================================== + +Introduction +------------ +In order to use the full capabilities of systemtap, one must run it as root or +as a member of the group stapdev. For other (unprivileged) users, systemtap +does provide support for use of a subset of systemtap's capabilities to perform +limited probing. For example, tracing your own applications or +polling using timers. The intent is to give unprivileged users capabilities +similar to those provided by a debugger. + +Below are instructions for running systemtap scripts in unprivileged mode. + +Systemtap Compile Server +------------------------ +In order to load the kernel module produced by compiling a systemtap script +for an unprivileged user, we must know that the script was compiled correctly +and that the script does not do anything dangerous. A systemap compile server +provides the trusted compilation environment needed to certify both conditions. + +NOTE: In order to use a compile server, the nss and nspr packages must be +installed on the client host and systemtap must have been built with +NSS enabled. Run 'stap -V | grep NSS' to find out if NSS is enabled. + +NOTE: In order to detect servers on the local network, the avahi package must be +installed on the client host and systemtap must have been built with avahi +enabled. Run 'stap -V | grep AVAHI' to find out if avahi is enabled. + +To find out if a suitable server is available on the local network, this +command should produce output similar to the following: + +# stap --list-servers --unprivileged +Systemtap Compile Server Status for 'online,trusted,compatible,signer' + host=somehost ip=10.15.16.156 port=10913 sysinfo="2.6.34.7-66.fc13.x86_64 x86_64" certinfo="00:93:49:be:2a" + +NOTE: In order for servers to be detected, the port for mDNS (5353/udp) + must be open on the server and client hosts. + +If no servers are listed, then you must ask your system administrator to +make the appropriate compile server available on the local host or on the +local network. The server must be trusted as an ssl peer and as a systemtap +module signer on the local host. + +See "Setup and Administration of Unprivileged Users for System Administrators" +below for more details. + +Trust of Unprivileged Users +--------------------------- +Even with the appropriate compile server available, each +unprivileged user must be explicitely trusted. This is done by adding each +unprivileged user to the group stapusr on each host on which they will +run systemtap scripts. To see if you are a member of the group stapusr on the +local host, this command should produce output similar to the following: + +# getent group stapusr +stapusr:x:483:someuser,anotheruser + +If your userid is listed, then you are already a member of the group stapusr. +If it is not, then you must ask your system administrator to add you to this +group. + +Once added, Try the command + + newgrp stapusr + +to activate your membership. If all else fails, logging out and back in +again should work. See the manual page for newgrp(1) for details. + +Using Systemtap in Unprivileged Mode +------------------------------------ +Unprivileged users can compile any systemtap script either directly or using +a compile server, but systemtap will not load the resulting kernel module +for an unprivileged user unless it has been compiled and certified by a +trusted compile server. To do this, as an unprivileged user, +this command should produce the following output similar: + +# stap -e 'probe begin { printf ("Hello\n"); exit (); }' +Hello + +For unprivileged users, stap will automatically add the options +--unprivileged and --use-server (you could also specify them yourself). + + --use-server tells systemtap to compile the script using a server. + + --unprivileged tells the server to check the script to maker sure it + doesn't do anything 'dangerous', i.e. nothing that an ordinary user + shouldn't be able to do. + +If the server approves of your script and is able to compile it, systemtap will then load the resulting module for you even though you are an unprivileged +user. + +If you save the resulting module by using the -p4 option of stap, then trusted, +unprivileged users can load the module at a later time using staprun: + +# stap -e 'probe begin { printf ("Hello\n"); exit (); }' -p4 +stap_5330.ko +# staprun stap_5330.ko +Hello + +Note that the module has already been ceritified (signed), so no special options +are needed. + +Additional Information +---------------------- +o When specifying path names in your script and compiling using a server, + you must use a server which has access to those paths (e.g. via nfs, or a + server on the local host) and you must specify the paths in full from the + servers's point of view. For example, specify + + probe process("foo").begin() + + as + + probe process("/the/full/path/as/seen/by/the/server/to/foo").begin() + +o You can use '--unprivileged -pN' (for 1 <= N <= 4) without --use-server to + compile and check scripts directly. stap will still check your script for + 'dangerous' behavior, but will not load it for an unprivileged user. + +o When using --unprivileged, all compile time and run time restrictions are + enforced for all users, including root and members of the group stapdev. + + + +Setup and Administration of Unprivileged Users for System Administrators +======================================================================== + +Introduction +------------ +In order to use the full capabilities of systemtap, one must run it as root or +as a member of the group stapdev. For other (unprivileged) users, systemtap +does provide support for use of a subset of systemtap's capabilities to perform +limited probing. For example, tracing your own applications or +polling using timers. The intent is to give unprivileged users capabilities +similar to those provided by a debugger. + +In order for this to happen, the system administrator must first perform some +setup: + +o Systemtap compile server(s) must be made available on the local network. + One server is needed for each kernel version and architecture pair for which + users will compile scripts. + +o The compile server(s) must be trusted as an SSL peer and as a signer of + systemtap modules on hosts on which unprivileged users will compile and + run their scripts respectively. + +o Unprivileged users must be added to the group stapusr on the host(s) on which + they will run their scripts. + +Below are the necessary steps for the system administrator to setup the above +infrastructure. + +Systemtap Compile Server +------------------------ +In order to load the kernel module produced by compiling a systemtap script +for an unprivileged user, we must know that the script was compiled correctly +and that the script does not do anything dangerous. A systemap compile server +provides a trusted environment needed to certify both conditions. + +In order to make a compile server available on the local network the +systemtap-server package and its prerequisites must be installed on the server +host. + +The system administrator then uses the following command: + +sudo service stap-server start [-r KERNEL-RELEASE] [-a ARCH] + +For example: + +# sudo service stap-server start -r 2.6.34.7-61.fc13.x86_64 -a x86_64 +Starting stap-server -a "x86_64" -r "2.6.34.7-61.fc13.x86_64" -u "stap-server" + [ OK ] + +This starts a compile server for the specified kernel release and hardware +architecture. The kernel and kernel-devel package for the specified release and +architecture must be installed on the server host. The kernel-debuginfo package +for each kernel release and archtecture should also be installed, but is not +relevant for unprivileged users. + +If either one (or both) the kernel release and/or architecture is not +specified, the kernel release and/or architecture of the server host will be +used: + +# sudo service stap-server start +Starting stap-server -a "x86_64" -r "2.6.34.7-66.fc13.x86_64" -u "stap-server" + [ OK ] + +As a short cut, to start a server for each kernel release and architecture +installed on the server host, use the command: + +# sudo service stap-server start -i +Starting stap-server -a "x86_64" -r "2.6.34.7-61.fc13.x86_64" -u "stap-server" + [ OK ] +Starting stap-server -a "x86_64" -r "2.6.34.7-63.fc13.x86_64" -u "stap-server" + [ OK ] +Starting stap-server -a "x86_64" -r "2.6.34.7-66.fc13.x86_64" -u "stap-server" + [ OK ] + +NOTE: Only root can start a systemtap server using the service command. + +Trust of Compile Servers +------------------------ +Once systemtap compile servers have been made available on the local network, +the system administrator must certify which ones are trusted as SSL peers, +as systemtap kernel module signers or both. + +Certifying a compile server as an SSL peer means what the system administrator +trusts that it compiles systemtap scripts correctly. + +Certifying a compile server as a module signer means that the system +administrator trusts it to correctly check a systemtap script for +behavior which should not be made available to unprivileged users. When a +script is compiled using the --unprivileged option, the server checks the +script for such behavior and cryptographically signs the resulting module if it +is safe for use by unprivileged users. Verification of ths signature certifies +that the module was certified as 'safe' by the server and that it has not been +altered since it was certified. + +Systemtap compile servers started by using the 'service' command are +automatically trusted both as SSL peers and as module signers on the server's +host. No further setup of the servers is necessary for users (clients) on +that same host. + +Before clients on another host can make use of a server, the system +administrator of each client host must certify trust in that server. +This is performed in two steps: + +1) Identify the server(s) to be trusted. + + # stap --list-servers=online,compatible + Systemtap Compile Server Status for 'online,compatible' + host=somehost ip=10.15.16.156 port=26543 sysinfo="2.6.34.7-66.fc13.x86_64 x86_64" certinfo="00:93:49:be:2a" + + Identify the server(s) to be trusted by examining the + host name, ip address and sysinfo (kernel release and architecture). Take + note of the 'certinfo' field of each server to be trusted. + + NOTE: In order for servers to be detected, the port for mDNS (5353/udp) + must be open on the server and client hosts. + +2) For each server to be trusted for use by unprivileged clients, use the + command: + + sudo stap --trust-servers=ssl,signer,all-users --use-server=CERTINFO1 [--use-server=CERTINFO2 ...] + + where each CERTINFOn is the value of the 'certinfo' field of a server to be + trusted (obtained using the previous command). + + For example: + + # sudo stap --trust-servers=ssl,signer,all-users --use-server=00:93:49:be:2a + Add trust in the following servers as an SSL peer for all users and as a module signer for all users? + host=somehost ip=10.15.16.156 port=26543 sysinfo="2.6.34.7-66.fc13.x86_64 x86_64" certinfo="00:93:49:be:2a" + [y/N] y + + Using the 'certinfo' to specify each server ensures that the exact servers + which were intended are the ones which become trusted. Note that only root + can certify trust in a server as signer in this way. + +Now verify the result: + +# stap --list-servers --unprivileged +Systemtap Compile Server Status for 'online,trusted,compatible,signer' + host=somehost ip=10.15.16.156 port=26543 sysinfo="2.6.34.7-66.fc13.x86_64 x86_64" certinfo="00:93:49:be:2a" + +Each of the servers you specified in stap 2 above should be listed. + +Trust of Unprivileged Users +--------------------------- +Finally, once compile servers have been set up and are trusted, each +unprivileged user must be explicitely trusted. This is done by adding each +unprivileged user to the group stapusr on each host on which they will +run systemtap scripts: + + sudo usermod -a -G stapusr USERID + +If the user is already logged in, they can try using + + newgrp stapusr + +to activate their membership. If all else fails, logging out and back in +again should work. See newgrp(1) for details. diff -Nru systemtap-1.4/remote.cxx systemtap-1.6/remote.cxx --- systemtap-1.4/remote.cxx 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/remote.cxx 2011-07-25 18:12:01.000000000 +0000 @@ -1,15 +1,24 @@ // systemtap remote execution -// Copyright (C) 2010 Red Hat Inc. +// Copyright (C) 2010-2011 Red Hat Inc. // // This file is part of systemtap, and is free software. You can // redistribute it and/or modify it under the terms of the GNU General // Public License (GPL); either version 2, or (at your option) any // later version. +#include "config.h" + extern "C" { -#include +#include +#include +#include +#include +#include } +#include +#include +#include #include #include #include @@ -21,86 +30,643 @@ using namespace std; +// Decode URIs as per RFC 3986, though not bothering to be strict +class uri_decoder { + public: + const string uri; + string scheme, authority, path, query, fragment; + bool has_authority, has_query, has_fragment; + + uri_decoder(const string& uri): + uri(uri), has_authority(false), has_query(false), has_fragment(false) + { + const string re = + "^([^:]+):(//[^/?#]*)?([^?#]*)(\\?[^#]*)?(#.*)?$"; + + vector matches; + if (regexp_match(uri, re, matches) != 0) + throw runtime_error(_F("string doesn't appear to be a URI: %s", uri.c_str())); + + scheme = matches[1]; + + if (!matches[2].empty()) + { + has_authority = true; + authority = matches[2].substr(2); + } + + path = matches[3]; + + if (!matches[4].empty()) + { + has_query = true; + query = matches[4].substr(1); + } + + if (!matches[5].empty()) + { + has_fragment = true; + fragment = matches[5].substr(1); + } + } +}; + + // loopback target for running locally class direct : public remote { private: pid_t child; + vector args; direct(systemtap_session& s): remote(s), child(0) {} + int start() + { + args = make_run_command(*s); + pid_t pid = stap_spawn (s->verbose, args); + if (pid <= 0) + return 1; + child = pid; + return 0; + } + + int finish() + { + if (child <= 0) + return 1; + + int ret = stap_waitpid(s->verbose, child); + if(ret) + clog << _F("Warning: %s exited with status: %d", args.front().c_str(), ret) << endl; + child = 0; + return ret; + } + public: friend class remote; - virtual ~direct() {} + virtual ~direct() { finish(); } +}; - int start() + +class stapsh : public remote { + private: + int interrupts_sent; + int fdin, fdout; + FILE *IN, *OUT; + string remote_version; + + virtual void prepare_poll(vector& fds) { - string module = s->tmpdir + "/" + s->module_name + ".ko"; - pid_t pid = stap_spawn (s->verbose, make_run_command (*s, module)); - if (pid <= 0) - return 1; - child = pid; - return 0; + if (fdout >= 0 && OUT) + { + pollfd p = { fdout, POLLIN, 0 }; + fds.push_back(p); + } + + // need to send a signal? + if (fdin >= 0 && IN && interrupts_sent < pending_interrupts) + { + pollfd p = { fdin, POLLOUT, 0 }; + fds.push_back(p); + } } - int finish() + virtual void handle_poll(vector& fds) + { + for (unsigned i=0; i < fds.size(); ++i) + if (fds[i].revents) + { + if (fdout >= 0 && OUT && fds[i].fd == fdout) + { + if (fds[i].revents & POLLIN) + { + char buf[4096]; + if (!prefix.empty()) + { + // If we have a line prefix, then read lines one at a + // time and copy out with the prefix. + errno = 0; + while (fgets(buf, sizeof(buf), OUT)) + cout << prefix << buf; + if (errno == EAGAIN) + continue; + } + else + { + // Otherwise read an entire block of data at once. + size_t rc = fread(buf, 1, sizeof(buf), OUT); + if (rc > 0) + { + // NB: The buf could contain binary data, + // including \0, so write as a block instead of + // the usual <= 0 && IN && fds[i].fd == fdin && + interrupts_sent < pending_interrupts) + { + if (fds[i].revents & POLLOUT) + { + if (send_command("quit\n") == 0) + { + ++interrupts_sent; + continue; + } + } + close(); + } + } + } + + string get_reply() + { + char reply[4096]; + if (!fgets(reply, sizeof(reply), OUT)) + reply[0] = '\0'; + return reply; + } + + int send_command(const string& cmd) + { + if (!IN) + return 2; + if (fputs(cmd.c_str(), IN) < 0 || + fflush(IN) != 0) + return 1; + return 0; + } + + int send_file(const string& filename, const string& dest) { - if (child <= 0) - return 1; + int rc = 0; + FILE* f = fopen(filename.c_str(), "r"); + if (!f) + return 1; + + struct stat fs; + rc = fstat(fileno(f), &fs); + if (!rc) + { + ostringstream cmd; + cmd << "file " << fs.st_size << " " << dest << "\n"; + rc = send_command(cmd.str()); + } + + off_t i = 0; + while (!rc && i < fs.st_size) + { + char buf[4096]; + size_t r = sizeof(buf); + if (fs.st_size - i < (off_t)r) + r = fs.st_size - i; + r = fread(buf, 1, r, f); + if (r == 0) + rc = 1; + else + { + size_t w = fwrite(buf, 1, r, IN); + if (w != r) + rc = 1; + else + i += w; + } + } + if (!rc) + rc = fflush(IN); + + fclose(f); + + if (!rc) + { + string reply = get_reply(); + if (reply != "OK\n") + { + rc = 1; + if (s->verbose > 0) + { + if (reply.empty()) + clog << _("stapsh file ERROR: no reply") << endl; + else + clog << _F("stapsh file replied %s", reply.c_str()); + } + } + } - int ret = stap_waitpid(s->verbose, child); - child = 0; - return ret; + return rc; } + + static string qpencode(const string& str) + { + ostringstream o; + o << setfill('0') << hex; + for (const char* s = str.c_str(); *s; ++s) + if (*s >= 33 && *s <= 126 && *s != 61) + o << *s; + else + o << '=' << setw(2) << (unsigned)(unsigned char) *s; + return o.str(); + } + + protected: + stapsh(systemtap_session& s) + : remote(s), interrupts_sent(0), + fdin(-1), fdout(-1), IN(0), OUT(0) + {} + + virtual int prepare() + { + int rc = 0; + + string localmodule = s->tmpdir + "/" + s->module_name + ".ko"; + string remotemodule = s->module_name + ".ko"; + if ((rc = send_file(localmodule, remotemodule))) + return rc; + + if (file_exists(localmodule + ".sgn") && + (rc = send_file(localmodule + ".sgn", remotemodule + ".sgn"))) + return rc; + + if (!s->uprobes_path.empty()) + { + string remoteuprobes = basename(s->uprobes_path.c_str()); + if ((rc = send_file(s->uprobes_path, remoteuprobes))) + return rc; + + if (file_exists(s->uprobes_path + ".sgn") && + (rc = send_file(s->uprobes_path + ".sgn", remoteuprobes + ".sgn"))) + return rc; + } + + return rc; + } + + virtual int start() + { + // Send the staprun args + // NB: The remote is left to decide its own staprun path + ostringstream run("run", ios::out | ios::ate); + vector cmd = make_run_command(*s, s->module_name + ".ko", + remote_version); + for (unsigned i = 1; i < cmd.size(); ++i) + run << ' ' << qpencode(cmd[i]); + run << '\n'; + + int rc = send_command(run.str()); + + if (!rc) + { + string reply = get_reply(); + if (reply != "OK\n") + { + rc = 1; + if (s->verbose > 0) + { + if (reply.empty()) + clog << _("stapsh run ERROR: no reply") << endl; + else + clog << _F("stapsh run replied %s", reply.c_str()); + } + } + } + + if (!rc) + { + long flags = fcntl(fdout, F_GETFL) | O_NONBLOCK; + fcntl(fdout, F_SETFL, flags); + } + else + // If run failed for any reason, then this + // connection is effectively dead to us. + close(); + + return rc; + } + + void close() + { + if (IN) fclose(IN); + if (OUT) fclose(OUT); + IN = OUT = NULL; + fdin = fdout = -1; + } + + virtual int finish() + { + close(); + return 0; + } + + void set_child_fds(int in, int out) + { + if (fdin >= 0 || fdout >= 0 || IN || OUT) + throw runtime_error(_("stapsh file descriptors already set")); + + fdin = in; + fdout = out; + IN = fdopen(fdin, "w"); + OUT = fdopen(fdout, "r"); + if (!IN || !OUT) + throw runtime_error(_("invalid file descriptors for stapsh")); + + if (send_command("stap " VERSION "\n")) + throw runtime_error(_("error sending hello to stapsh")); + + string reply = get_reply(); + if (reply.empty()) + throw runtime_error(_("error receiving hello from stapsh")); + + // stapsh VERSION MACHINE RELEASE + vector uname; + tokenize(reply, uname, " \t\r\n"); + if (uname.size() != 4 || uname[0] != "stapsh") + throw runtime_error(_("failed to get uname from stapsh")); + + // We assume that later versions will know how to talk to us. + // Looking backward, we use this for make_run_command(). + this->remote_version = uname[1]; + + this->s = s->clone(uname[2], uname[3]); + } + + public: + virtual ~stapsh() { close(); } }; -class ssh_remote : public remote { - // NB: ssh commands use a tty (-t) so signals are passed along to the remote + +// direct_stapsh is meant only for testing, as a way to exercise the stapsh +// mechanisms without requiring test machines to have actual remote access. +class direct_stapsh : public stapsh { private: - string uri, tmpdir; pid_t child; - ssh_remote(systemtap_session& s, const string& uri) - : remote(s), uri(uri), child(0) + direct_stapsh(systemtap_session& s) + : stapsh(s), child(0) + { + int in, out; + vector cmd; + cmd.push_back(BINDIR "/stapsh"); + if (s.perpass_verbose[4] > 1) + cmd.push_back("-v"); + if (s.perpass_verbose[4] > 2) + cmd.push_back("-v"); + + // mask signals while we spawn, so we can simulate manual signals to + // the "remote" target, as we must for the real ssh_remote case. + { + stap_sigmasker masked; + child = stap_spawn_piped(s.verbose, cmd, &in, &out); + } + + if (child <= 0) + throw runtime_error(_("error launching stapsh")); + + try + { + set_child_fds(in, out); + } + catch (runtime_error&) + { + finish(); + throw; + } + } + + virtual int finish() + { + int rc = stapsh::finish(); + if (child <= 0) + return rc; + + int rc2 = stap_waitpid(s->verbose, child); + child = 0; + return rc ?: rc2; + } + + public: + friend class remote; + + virtual ~direct_stapsh() { finish(); } +}; + + +// stapsh-based ssh_remote +class ssh_remote : public stapsh { + private: + pid_t child; + + ssh_remote(systemtap_session& s): stapsh(s), child(0) {} + + int connect(const string& host, const string& port) + { + int rc = 0; + int in, out; + vector cmd; + cmd.push_back("ssh"); + cmd.push_back("-q"); + cmd.push_back(host); + if (!port.empty()) + { + cmd.push_back("-p"); + cmd.push_back(port); + } + + // This is crafted so that we get a silent failure with status 127 if + // the command is not found. The combination of -P and $cmd ensures + // that we pull the command out of the PATH, not aliases or such. + string stapsh_cmd = "cmd=`type -P stapsh || exit 127` && exec \"$cmd\""; + if (s->perpass_verbose[4] > 1) + stapsh_cmd.append(" -v"); + if (s->perpass_verbose[4] > 2) + stapsh_cmd.append(" -v"); + // NB: We need to explicitly choose bash, as $SHELL may be weird... + cmd.push_back("/bin/bash -c '" + stapsh_cmd + "'"); + + // mask signals while we spawn, so we can manually send even tty + // signals *through* ssh rather than to ssh itself + { + stap_sigmasker masked; + child = stap_spawn_piped(s->verbose, cmd, &in, &out); + } + + if (child <= 0) + throw runtime_error(_("error launching stapsh")); + + try + { + set_child_fds(in, out); + } + catch (runtime_error&) + { + rc = finish(); + + // ssh itself signals errors with 255 + if (rc == 255) + throw runtime_error(_("error establishing ssh connection")); + + // If rc == 127, that's command-not-found, so we let ::create() + // try again in legacy mode. But only do this if there's a single + // remote, as the old code didn't handle ttys well with multiple + // remotes. Otherwise, throw up again. *barf* + if (rc != 127 || s->remote_uris.size() > 1) + throw; + } + + return rc; + } + + int finish() + { + int rc = stapsh::finish(); + if (child <= 0) + return rc; + + int rc2 = stap_waitpid(s->verbose, child); + child = 0; + return rc ?: rc2; + } + + public: + + static remote* create(systemtap_session& s, const string& host); + static remote* create(systemtap_session& s, const uri_decoder& ud); + + virtual ~ssh_remote() { finish(); } +}; + + +// ssh connection without stapsh, for legacy stap installations +// NB: ssh commands use a tty (-t) so signals are passed along to the remote. +// It does this by putting the local tty in raw mode, so it only works for tty +// signals, and only for a single remote at a time. +class ssh_legacy_remote : public remote { + private: + vector ssh_args, scp_args; + string ssh_control; + string host, port, tmpdir; + pid_t child; + + ssh_legacy_remote(systemtap_session& s, const string& host, const string& port) + : remote(s), host(host), port(port), child(0) + { + open_control_master(); + try + { + get_uname(); + } + catch (runtime_error&) + { + close_control_master(); + throw; + } + } + + void open_control_master() + { + static unsigned index = 0; + + if (s->tmpdir.empty()) // sanity check, shouldn't happen + throw runtime_error(_("No tmpdir available for ssh control master")); + + ssh_control = s->tmpdir + "/ssh_remote_control_" + lex_cast(++index); + + scp_args.clear(); + scp_args.push_back("scp"); + scp_args.push_back("-q"); + scp_args.push_back("-o"); + scp_args.push_back("ControlPath=" + ssh_control); + + ssh_args = scp_args; + ssh_args[0] = "ssh"; + ssh_args.push_back(host); + + if (!port.empty()) + { + scp_args.push_back("-P"); + scp_args.push_back(port); + ssh_args.push_back("-p"); + ssh_args.push_back(port); + } + + // NB: ssh -f will stay in the foreground until authentication is + // complete and the control socket is created, so we know it's ready to + // go when stap_system returns. + vector cmd = ssh_args; + cmd.push_back("-f"); + cmd.push_back("-N"); + cmd.push_back("-M"); + int rc = stap_system(s->verbose, cmd); + if (rc != 0) + throw runtime_error(_F("failed to create an ssh control master for %s : rc= %d", + host.c_str(), rc)); + + if (s->verbose>1) + clog << _F("Created ssh control master at %s", + lex_cast_qstring(ssh_control).c_str()) << endl; + } + + void close_control_master() + { + if (ssh_control.empty()) + return; + + vector cmd = ssh_args; + cmd.push_back("-O"); + cmd.push_back("exit"); + int rc = stap_system(s->verbose, cmd, true, true); + if (rc != 0) + cerr << _F("failed to stop the ssh control master for %s : rc=%d", + host.c_str(), rc) << endl; + + ssh_control.clear(); + scp_args.clear(); + ssh_args.clear(); + } + + void get_uname() { ostringstream out; vector uname; - string uname_cmd = "ssh -t -q " + lex_cast_qstring(uri) + " uname -rm"; - int rc = stap_system_read(s.verbose, uname_cmd, out); + vector cmd = ssh_args; + cmd.push_back("-t"); + cmd.push_back("uname -rm"); + int rc = stap_system_read(s->verbose, cmd, out); if (rc == 0) tokenize(out.str(), uname, " \t\r\n"); if (uname.size() != 2) - throw runtime_error("failed to get uname from " + uri - + " : rc=" + lex_cast(rc)); - string release = uname[0]; - string arch = uname[1]; - // XXX need to deal with command-line vs. implied arch/release - this->s = s.clone(arch, release); + throw runtime_error(_F("failed to get uname from %s : rc= %d", host.c_str(), rc)); + const string& release = uname[0]; + const string& arch = uname[1]; + // XXX need to deal with command-line vs. implied arch/release + this->s = s->clone(arch, release); } - public: - friend class remote; - - virtual ~ssh_remote() {} - int start() { int rc; string localmodule = s->tmpdir + "/" + s->module_name + ".ko"; string tmpmodule; - string quri = lex_cast_qstring(uri); // Make a remote tempdir. { ostringstream out; vector vout; - string cmd = "ssh -t -q " + quri + " mktemp -d -t stapXXXXXX"; + vector cmd = ssh_args; + cmd.push_back("-t"); + cmd.push_back("mktemp -d -t stapXXXXXX"); rc = stap_system_read(s->verbose, cmd, out); if (rc == 0) tokenize(out.str(), vout, "\r\n"); if (vout.size() != 1) { - cerr << "failed to make a tempdir on " << uri - << " : rc=" << rc << endl; + cerr << _F("failed to make a tempdir on %s : rc=%d", + host.c_str(), rc) << endl; return -1; } tmpdir = vout[0]; @@ -109,78 +675,233 @@ // Transfer the module. XXX and uprobes.ko, sigs, etc. if (rc == 0) { - string cmd = "scp -q " + localmodule + " " + quri + ":" + tmpmodule; + vector cmd = scp_args; + cmd.push_back(localmodule); + cmd.push_back(host + ":" + tmpmodule); rc = stap_system(s->verbose, cmd); if (rc != 0) - cerr << "failed to copy the module to " << uri - << " : rc=" << rc << endl; + cerr << _F("failed to copy the module to %s : rc=%d", + host.c_str(), rc) << endl; } // Run the module on the remote. if (rc == 0) { - string cmd = "ssh -t -q " + quri + " " - + lex_cast_qstring(make_run_command(*s, tmpmodule)); + vector cmd = ssh_args; + cmd.push_back("-t"); + // We don't know the actual version, but all <=1.3 are approx equal. + cmd.push_back(cmdstr_join(make_run_command(*s, tmpmodule, "1.3"))); pid_t pid = stap_spawn(s->verbose, cmd); if (pid > 0) - child = pid; - else - { - cerr << "failed to run the module on " << uri - << " : ret=" << pid << endl; - rc = -1; - } + child = pid; + else + { + cerr << _F("failed to run the module on %s : ret=%d", + host.c_str(), pid) << endl; + rc = -1; + } } - return rc; + return rc; } int finish() { - int rc = 0; + int rc = 0; - if (child > 0) - { - rc = stap_waitpid(s->verbose, child); - child = 0; - } + if (child > 0) + { + rc = stap_waitpid(s->verbose, child); + child = 0; + } if (!tmpdir.empty()) - { - // Remove the tempdir. - // XXX need to make sure this runs even with e.g. CTRL-C exits - string quri = lex_cast_qstring(uri); - string cmd = "ssh -t -q " + quri + " rm -r " + tmpdir; - tmpdir.clear(); - int rc2 = stap_system(s->verbose, cmd); - if (rc2 != 0) - cerr << "failed to delete the tempdir on " << uri - << " : rc=" << rc2 << endl; - if (rc == 0) - rc = rc2; - } + { + // Remove the tempdir. + // XXX need to make sure this runs even with e.g. CTRL-C exits + vector cmd = ssh_args; + cmd.push_back("-t"); + cmd.push_back("rm -r " + cmdstr_quoted(tmpdir)); + int rc2 = stap_system(s->verbose, cmd); + if (rc2 != 0) + cerr << _F("failed to delete the tempdir on %s : rc=%d", + host.c_str(), rc2) << endl; + if (rc == 0) + rc = rc2; + tmpdir.clear(); + } - return rc; + close_control_master(); + + return rc; + } + + public: + friend class ssh_remote; + + virtual ~ssh_legacy_remote() + { + close_control_master(); } }; +// Try to establish a stapsh connection to the remote, but fallback +// to the older mechanism if the command is not found. +remote* +ssh_remote::create(systemtap_session& s, const string& target) +{ + string port, host = target; + size_t i = host.find(':'); + if (i != string::npos) + { + port = host.substr(i + 1); + host.erase(i); + } + + auto_ptr p (new ssh_remote(s)); + int rc = p->connect(host, port); + if (rc == 0) + return p.release(); + else if (rc == 127) // stapsh command not found + return new ssh_legacy_remote(s, host, port); // try legacy instead + return NULL; +} + +remote* +ssh_remote::create(systemtap_session& s, const uri_decoder& ud) +{ + if (!ud.has_authority || ud.authority.empty()) + throw runtime_error(_("ssh target requires a hostname")); + if (!ud.path.empty() && ud.path != "/") + throw runtime_error(_("ssh target URI doesn't support a /path")); + if (ud.has_query) + throw runtime_error(_("ssh target URI doesn't support a ?query")); + if (ud.has_fragment) + throw runtime_error(_("ssh target URI doesn't support a #fragment")); + + return create(s, ud.authority); +} + + remote* remote::create(systemtap_session& s, const string& uri) { try { - if (uri == "direct") - return new direct(s); + if (uri.find(':') != string::npos) + { + const uri_decoder ud(uri); + + // An ssh "host:port" is ambiguous with a URI "scheme:path". + // So if it looks like a number, just assume ssh. + if (!ud.has_authority && !ud.has_query && + !ud.has_fragment && !ud.path.empty() && + ud.path.find_first_not_of("1234567890") == string::npos) + return ssh_remote::create(s, uri); + + if (ud.scheme == "direct") + return new direct(s); + else if (ud.scheme == "stapsh") + return new direct_stapsh(s); + if (ud.scheme == "ssh") + return ssh_remote::create(s, ud); + else + throw runtime_error(_F("unrecognized URI scheme '%s' in remote: %s", + ud.scheme.c_str(), uri.c_str())); + } else // XXX assuming everything else is ssh for now... - return new ssh_remote(s, uri); + return ssh_remote::create(s, uri); } catch (std::runtime_error& e) { - cerr << e.what() << endl; + cerr << e.what() << " on remote '" << uri << "'" << endl; return NULL; } } +#ifndef HAVE_PPOLL +// This is a poor-man's ppoll, only used by remote::run below. It does not +// provide the same guarantee of atomicity as on systems with a true ppoll. +// +// In our use, this would cause trouble if a signal came in any time from the +// moment we mask signals to prepare pollfds, to the moment we call poll in +// emulation here. If there's no data on any of the pollfds, we will be stuck +// waiting indefinitely. +// +// Since this is mainly about responsiveness of CTRL-C cleanup, we'll just +// throw in a one-second forced timeout to ensure we have a chance to notice +// there was an interrupt without too much delay. +static int +ppoll(struct pollfd *fds, nfds_t nfds, + const struct timespec *timeout_ts, + const sigset_t *sigmask) +{ + sigset_t origmask; + int timeout = (timeout_ts == NULL) ? 1000 // don't block forever... + : (timeout_ts->tv_sec * 1000 + timeout_ts->tv_nsec / 1000000); + sigprocmask(SIG_SETMASK, sigmask, &origmask); + int rc = poll(fds, nfds, timeout); + sigprocmask(SIG_SETMASK, &origmask, NULL); + return rc; +} +#endif + +int +remote::run(const vector& remotes) +{ + // NB: the first failure "wins" + int ret = 0, rc = 0; + + for (unsigned i = 0; i < remotes.size() && !pending_interrupts; ++i) + { + remote *r = remotes[i]; + r->s->verbose = r->s->perpass_verbose[4]; + if (r->s->use_remote_prefix) + r->prefix = lex_cast(i) + ": "; + rc = r->prepare(); + if (rc) + return rc; + } + + for (unsigned i = 0; i < remotes.size() && !pending_interrupts; ++i) + { + rc = remotes[i]->start(); + if (!ret) + ret = rc; + } + + // mask signals while we're preparing to poll + { + stap_sigmasker masked; + + // polling loop for remotes that have fds to watch + for (;;) + { + vector fds; + for (unsigned i = 0; i < remotes.size(); ++i) + remotes[i]->prepare_poll (fds); + if (fds.empty()) + break; + + rc = ppoll (&fds[0], fds.size(), NULL, &masked.old); + if (rc < 0 && errno != EINTR) + break; + + for (unsigned i = 0; i < remotes.size(); ++i) + remotes[i]->handle_poll (fds); + } + } + + for (unsigned i = 0; i < remotes.size(); ++i) + { + rc = remotes[i]->finish(); + if (!ret) + ret = rc; + } + + return ret; +} + /* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ diff -Nru systemtap-1.4/remote.h systemtap-1.6/remote.h --- systemtap-1.4/remote.h 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/remote.h 2011-07-25 18:12:01.000000000 +0000 @@ -1,5 +1,5 @@ // systemtap remote execution -// Copyright (C) 2010 Red Hat Inc. +// Copyright (C) 2010-2011 Red Hat Inc. // // This file is part of systemtap, and is free software. You can // redistribute it and/or modify it under the terms of the GNU General @@ -10,23 +10,36 @@ #define REMOTE_H #include +#include + +extern "C" { +#include +} #include "session.h" class remote { + private: + virtual int prepare() { return 0; } + virtual int start() = 0; + virtual int finish() = 0; + + virtual void prepare_poll(std::vector&) {} + virtual void handle_poll(std::vector&) {} + protected: systemtap_session* s; + std::string prefix; remote(systemtap_session& s): s(&s) {} public: static remote* create(systemtap_session& s, const std::string& uri); + static int run(const std::vector& remotes); systemtap_session* get_session() { return s; } virtual ~remote() {} - virtual int start() = 0; - virtual int finish() = 0; }; #endif // REMOTE_H diff -Nru systemtap-1.4/rpm_finder.cxx systemtap-1.6/rpm_finder.cxx --- systemtap-1.4/rpm_finder.cxx 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/rpm_finder.cxx 2011-07-25 18:12:01.000000000 +0000 @@ -1,5 +1,5 @@ // systemtap debuginfo rpm finder -// Copyright (C) 2009 Red Hat Inc. +// Copyright (C) 2009-2011 Red Hat Inc. // // This file is part of systemtap, and is free software. You can // redistribute it and/or modify it under the terms of the GNU General @@ -35,6 +35,13 @@ } +#if ! HAVE_LIBRPMIO && HAVE_NSS +extern "C" { +#include +} +#include "nsscommon.h" +#endif + /* Returns the count of newly added rpms. */ /* based on the code in F11 gdb-6.8.50.20090302 source rpm */ /* Added in the rpm_type parameter to specify what rpm to look for */ @@ -61,7 +68,7 @@ if (rpmReadConfigFiles(NULL, NULL) != 0) { - cerr << "Error reading the rpm configuration files" << endl; + cerr << _("Error reading the rpm configuration files") << endl; return 0; } @@ -94,7 +101,7 @@ if (!rpminfo) { - cerr << "Error querying the rpm file `" << filename << "': " + cerr << _("Error querying the rpm file `") << filename << "': " << err << endl; continue; } @@ -113,7 +120,7 @@ } if (!s2) { - cerr << "Error querying the rpm file `" << filename + cerr << _("Error querying the rpm file `") << filename << "': " << rpminfo << endl; xfree (rpminfo); continue; @@ -149,7 +156,7 @@ } if (!rpminfo) { - cerr << "Error querying the rpm file `" << filename + cerr << _("Error querying the rpm file `") << filename << "': " << err << endl; continue; } @@ -173,6 +180,19 @@ } rpmtsFree(ts); + +#if HAVE_NSS + // librpm uses NSS cryptography but doesn't shut down NSS when it is done. + // If NSS is available, it will be used by the compile server client on + // specific certificate databases and thus, it must be shut down first. + // Get librpm to do it if we can. Otherwise do it ourselves. +#if HAVE_LIBRPMIO + rpmFreeCrypto (); // Shuts down NSS within librpm +#else + nssCleanup (NULL); // Shut down NSS ourselves +#endif +#endif + return count; } #endif /* HAVE_LIBRPM */ @@ -184,13 +204,13 @@ if (sess.rpms_to_install.size() > 0 && ! sess.suppress_warnings) { if(strcmp(rpm_type,"-devel")==0) - cerr << "Incorrect version or missing kernel-devel package, use: yum install "; + cerr << _("Incorrect version or missing kernel-devel package, use: yum install "); else if(strcmp(rpm_type,"-debuginfo")==0) - cerr << "Missing seperate debuginfos, use: debuginfo-install "; + cerr << _("Missing separate debuginfos, use: debuginfo-install "); else{ - cerr << "Incorrect paramater passed, please report this error." << endl; + cerr << _("Incorrect parameter passed, please report this error.") << endl; _exit(1); } diff -Nru systemtap-1.4/runtime/addr-map.c systemtap-1.6/runtime/addr-map.c --- systemtap-1.4/runtime/addr-map.c 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/runtime/addr-map.c 2011-07-25 18:12:01.000000000 +0000 @@ -29,9 +29,9 @@ }; #ifdef CONFIG_PREEMPT_RT -static DEFINE_RAW_SPINLOCK(addr_map_lock); +static DEFINE_RAW_RWLOCK(addr_map_lock); #else -static DEFINE_SPINLOCK(addr_map_lock); +static DEFINE_RWLOCK(addr_map_lock); #endif static struct addr_map* blackmap; @@ -128,9 +128,9 @@ #endif /* Search for the given range in the black-listed map. */ - spin_lock(&addr_map_lock); + read_lock(&addr_map_lock); result = lookup_addr_aux(addr, size, blackmap); - spin_unlock(&addr_map_lock); + read_unlock(&addr_map_lock); if (result) return 1; else @@ -154,7 +154,7 @@ while (1) { size_t old_size = 0; - spin_lock(&addr_map_lock); + write_lock(&addr_map_lock); old_map = blackmap; if (old_map) old_size = old_map->size; @@ -163,7 +163,7 @@ added an entry while we were sleeping. */ if (!new_map || (new_map && new_map->size < old_size + 1)) { - spin_unlock(&addr_map_lock); + write_unlock(&addr_map_lock); if (new_map) { _stp_kfree(new_map); @@ -192,7 +192,7 @@ *existing_min = min_entry; if (existing_max) *existing_max = max_entry; - spin_unlock(&addr_map_lock); + write_unlock(&addr_map_lock); _stp_kfree(new_map); return 1; } @@ -210,7 +210,7 @@ (old_map->size - existing) * sizeof(*new_entry)); } blackmap = new_map; - spin_unlock(&addr_map_lock); + write_unlock(&addr_map_lock); if (old_map) _stp_kfree(old_map); return 0; diff -Nru systemtap-1.4/runtime/autoconf-kern-path-parent.c systemtap-1.6/runtime/autoconf-kern-path-parent.c --- systemtap-1.4/runtime/autoconf-kern-path-parent.c 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/runtime/autoconf-kern-path-parent.c 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,7 @@ +#include + +/* kernel commit c9c6cac0c2bdbda */ +int ____autoconf_func(const char *name) +{ + return kern_path_parent(name, NULL); +} diff -Nru systemtap-1.4/runtime/autoconf-procfs-owner.c systemtap-1.6/runtime/autoconf-procfs-owner.c --- systemtap-1.4/runtime/autoconf-procfs-owner.c 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/runtime/autoconf-procfs-owner.c 2011-07-25 18:12:01.000000000 +0000 @@ -5,4 +5,5 @@ void bar (void) { struct proc_dir_entry foo; foo.owner = (void*) 0; + (void) foo; } diff -Nru systemtap-1.4/runtime/autoconf-real-parent.c systemtap-1.6/runtime/autoconf-real-parent.c --- systemtap-1.4/runtime/autoconf-real-parent.c 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/runtime/autoconf-real-parent.c 2011-07-25 18:12:01.000000000 +0000 @@ -12,4 +12,5 @@ { struct task_struct *p; p = t.real_parent; + (void) p; } diff -Nru systemtap-1.4/runtime/autoconf-stacktrace_ops-warning.c systemtap-1.6/runtime/autoconf-stacktrace_ops-warning.c --- systemtap-1.4/runtime/autoconf-stacktrace_ops-warning.c 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/runtime/autoconf-stacktrace_ops-warning.c 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,10 @@ +/* Some kernels have warning fields in stacktrace_ops. */ +#include +#include + +void foo (void) +{ + struct stacktrace_ops t; + t.warning = 0; + (void) t; +} diff -Nru systemtap-1.4/runtime/autoconf-walk-stack.c systemtap-1.6/runtime/autoconf-walk-stack.c --- systemtap-1.4/runtime/autoconf-walk-stack.c 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/runtime/autoconf-walk-stack.c 2011-07-25 18:12:01.000000000 +0000 @@ -6,4 +6,5 @@ { struct stacktrace_ops t; t.walk_stack = print_context_stack; + (void) t; } diff -Nru systemtap-1.4/runtime/compatdefs.h systemtap-1.6/runtime/compatdefs.h --- systemtap-1.4/runtime/compatdefs.h 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/runtime/compatdefs.h 2011-07-25 18:12:01.000000000 +0000 @@ -50,6 +50,10 @@ #if defined(__x86_64__) #define task_pt_regs(tsk) ((struct pt_regs *)(tsk)->thread.rsp0 - 1) #endif +#if defined(__ia64__) +/* pre-commit 6450578f32 */ +#define task_pt_regs(tsk) ia64_task_regs(tsk) +#endif #endif /* Whether all user registers are valid. If not the pt_regs needs, diff -Nru systemtap-1.4/runtime/io.c systemtap-1.6/runtime/io.c --- systemtap-1.4/runtime/io.c 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/runtime/io.c 2011-07-25 18:12:01.000000000 +0000 @@ -63,9 +63,11 @@ else if (type == ERROR) printk (KERN_ERR "%s", buf); else printk (KERN_INFO "%s", buf); #else - if (type != DBUG) + if (type != DBUG) { + /* This is non-urgent .cmd data, so call + _stp_ctl_write, instead of _stp_ctl_send. */ _stp_ctl_write(STP_OOB_DATA, buf, start + num + 1); - else { + } else { _stp_print(buf); _stp_print_flush(); } diff -Nru systemtap-1.4/runtime/itrace.c systemtap-1.6/runtime/itrace.c --- systemtap-1.4/runtime/itrace.c 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/runtime/itrace.c 2011-07-25 18:12:01.000000000 +0000 @@ -58,7 +58,6 @@ #endif struct itrace_info { - pid_t tid; u32 step_flag; struct stap_itrace_probe *itrace_probe; #ifdef CONFIG_PPC @@ -260,7 +259,6 @@ return NULL; } ui->tsk = tsk; - ui->tid = tsk->pid; ui->step_flag = step_flag; ui->itrace_probe = itrace_probe; #ifdef CONFIG_PPC @@ -286,6 +284,7 @@ UTRACE_EVENT(DEATH)); if (status < 0) { printk(KERN_ERR "utrace_attach returns %d\n", status); + utrace_engine_put(ui->engine); return NULL; } @@ -295,20 +294,22 @@ if (status < 0) { printk(KERN_ERR "utrace_control(%d) returns %d\n", step_flag, status); + utrace_engine_put(ui->engine); return NULL; } } + utrace_engine_put(ui->engine); return ui; } -static struct itrace_info *find_itrace_info(pid_t tid) +static struct itrace_info *find_itrace_info(struct task_struct *tsk) { struct itrace_info *ui = NULL; spin_lock(&itrace_lock); list_for_each_entry(ui, &usr_itrace_info, link) { - if (ui->tid == tid) + if (ui->tsk == tsk) goto done; } ui = NULL; @@ -356,7 +357,8 @@ return; if (debug) - printk(KERN_INFO "remove_usr_itrace_info: tid=%d\n", ui->tid); + printk(KERN_INFO "remove_usr_itrace_info: tid=%d\n", + (ui->tsk ? ui->tsk->pid : -1)); if (ui->tsk && ui->engine) { status = utrace_control(ui->tsk, ui->engine, UTRACE_DETACH); diff -Nru systemtap-1.4/runtime/loc2c-runtime.h systemtap-1.6/runtime/loc2c-runtime.h --- systemtap-1.4/runtime/loc2c-runtime.h 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/runtime/loc2c-runtime.h 2011-07-25 18:12:01.000000000 +0000 @@ -69,19 +69,41 @@ #else #define DEREF_FAULT(addr) ({ \ snprintf(c->error_buffer, sizeof(c->error_buffer), \ - "kernel read fault at 0x%p (%s)", (void *)(intptr_t)(addr), #addr); \ + STAP_MSG_LOC2C_01, (void *)(intptr_t)(addr), #addr); \ c->last_error = c->error_buffer; \ goto deref_fault; \ }) #define STORE_DEREF_FAULT(addr) ({ \ snprintf(c->error_buffer, sizeof(c->error_buffer), \ - "kernel write fault at 0x%p (%s)", (void *)(intptr_t)(addr), #addr); \ + STAP_MSG_LOC2C_02, (void *)(intptr_t)(addr), #addr); \ c->last_error = c->error_buffer; \ goto deref_fault; \ }) #endif +/* dwarf_div_op and dwarf_mod_op do division and modulo operations catching any + divide by zero issues. When they detect div_by_zero they "fault" + by jumping to the (slightly misnamed) deref_fault label. */ +#define dwarf_div_op(a,b) ({ \ + if (b == 0) { \ + snprintf(c->error_buffer, sizeof(c->error_buffer), \ + STAP_MSG_LOC2C_03, "DW_OP_div"); \ + c->last_error = c->error_buffer; \ + goto deref_fault; \ + } \ + a / b; \ +}) +#define dwarf_mod_op(a,b) ({ \ + if (b == 0) { \ + snprintf(c->error_buffer, sizeof(c->error_buffer), \ + STAP_MSG_LOC2C_03, "DW_OP_mod"); \ + c->last_error = c->error_buffer; \ + goto deref_fault; \ + } \ + a % b; \ +}) + /* PR 10601: user-space (user_regset) register access. */ #if defined(STAPCONF_REGSET) #include @@ -584,47 +606,19 @@ }) #elif defined __powerpc__ || defined __powerpc64__ -#if defined __powerpc64__ -#define STP_PPC_LONG ".llong " + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15) +#define __stp_get_user_size(x, ptr, size, retval) \ + __get_user_size(x, ptr, size, retval) +#define __stp_put_user_size(x, ptr, size, retval) \ + __put_user_size(x, ptr, size, retval) #else -#define STP_PPC_LONG ".long " +#define __stp_get_user_size(x, ptr, size, retval) \ + __get_user_size(x, ptr, size, retval, -EFAULT) +#define __stp_put_user_size(x, ptr, size, retval) \ + __put_user_size(x, ptr, size, retval, -EFAULT) #endif -#define __stp_get_user_asm(x, addr, err, op) \ - __asm__ __volatile__( \ - "1: "op" %1,0(%2) # get_user\n" \ - "2:\n" \ - ".section .fixup,\"ax\"\n" \ - "3: li %0,%3\n" \ - " li %1,0\n" \ - " b 2b\n" \ - ".previous\n" \ - ".section __ex_table,\"a\"\n" \ - " .balign %5\n" \ - STP_PPC_LONG "1b,3b\n" \ - ".previous" \ - : "=r" (err), "=r" (x) \ - : "b" (addr), "i" (-EFAULT), "0" (err), \ - "i"(sizeof(unsigned long))) - - -#define __stp_put_user_asm(x, addr, err, op) \ - __asm__ __volatile__( \ - "1: " op " %1,0(%2) # put_user\n" \ - "2:\n" \ - ".section .fixup,\"ax\"\n" \ - "3: li %0,%3\n" \ - " b 2b\n" \ - ".previous\n" \ - ".section __ex_table,\"a\"\n" \ - " .balign %5\n" \ - STP_PPC_LONG "1b,3b\n" \ - ".previous" \ - : "=r" (err) \ - : "r" (x), "b" (addr), "i" (-EFAULT), "0" (err),\ - "i"(sizeof(unsigned long))) - - #define deref(size, addr) \ ({ \ int _bad = 0; \ @@ -634,10 +628,10 @@ else \ switch (size) \ { \ - case 1: __stp_get_user_asm(_v,addr,_bad,"lbz"); break; \ - case 2: __stp_get_user_asm(_v,addr,_bad,"lhz"); break; \ - case 4: __stp_get_user_asm(_v,addr,_bad,"lwz"); break; \ - case 8: __stp_get_user_asm(_v,addr,_bad,"ld"); break; \ + case 1: __stp_get_user_size(_v, addr, 1, _bad); break; \ + case 2: __stp_get_user_size(_v, addr, 2, _bad); break; \ + case 4: __stp_get_user_size(_v, addr, 4, _bad); break; \ + case 8: __stp_get_user_size(_v, addr, 8, _bad); break; \ default: _v = __get_user_bad(); \ } \ if (_bad) \ @@ -653,14 +647,14 @@ else \ switch (size) \ { \ - case 1: __stp_put_user_asm(((u8)(value)),addr,_bad,"stb"); break; \ - case 2: __stp_put_user_asm(((u16)(value)),addr,_bad,"sth"); break; \ - case 4: __stp_put_user_asm(((u32)(value)),addr,_bad,"stw"); break; \ - case 8: __stp_put_user_asm(((u64)(value)),addr,_bad, "std"); break; \ + case 1: __stp_put_user_size(((u8)(value)), addr, 1, _bad); break; \ + case 2: __stp_put_user_size(((u16)(value)), addr, 2, _bad); break; \ + case 4: __stp_put_user_size(((u32)(value)), addr, 4, _bad); break; \ + case 8: __stp_put_user_size(((u64)(value)), addr, 8, _bad); break; \ default: __put_user_bad(); \ } \ if (_bad) \ - STORE_DEREF_FAULT(addr); \ + STORE_DEREF_FAULT(addr); \ }) #elif defined (__arm__) @@ -772,33 +766,6 @@ : "r" (x), "r" (__pu_addr), "i" (-EFAULT) \ : "cc") -#ifndef __ARMEB__ -#define __reg_oper0 "%R2" -#define __reg_oper1 "%Q2" -#else -#define __reg_oper0 "%Q2" -#define __reg_oper1 "%R2" -#endif - -#define __stp_put_user_asm_dword(x,__pu_addr,err) \ - __asm__ __volatile__( \ - "1: str " __reg_oper1 ", [%1], #4\n" \ - "2: str " __reg_oper0 ", [%1], #0\n" \ - "3:\n" \ - " .section .fixup,\"ax\"\n" \ - " .align 2\n" \ - "4: mov %0, %3\n" \ - " b 3b\n" \ - " .previous\n" \ - " .section __ex_table,\"a\"\n" \ - " .align 3\n" \ - " .long 1b, 4b\n" \ - " .long 2b, 4b\n" \ - " .previous" \ - : "+r" (err), "+r" (__pu_addr) \ - : "r" (x), "i" (-EFAULT) \ - : "cc") - #define deref(size, addr) \ ({ \ int _bad = 0; \ @@ -827,7 +794,6 @@ case 1: __stp_put_user_asm_byte(value, addr, _bad); break; \ case 2: __stp_put_user_asm_half(value, addr, _bad); break; \ case 4: __stp_put_user_asm_word(value, addr, _bad); break; \ - case 8: __stp_put_user_asm_dword(value, addr, _bad); break; \ default: __put_user_bad(); break; \ } \ if (_bad) \ @@ -945,9 +911,9 @@ #endif /* (s390) || (s390x) */ -#if defined __i386__ +#if defined (__i386__) || defined (__arm__) -/* x86 can't do 8-byte put/get_user_asm, so we have to split it */ +/* x86 and arm can't do 8-byte put/get_user_asm, so we have to split it */ #define kread(ptr) \ ((sizeof(*(ptr)) == 8) ? \ diff -Nru systemtap-1.4/runtime/print_flush.c systemtap-1.6/runtime/print_flush.c --- systemtap-1.4/runtime/print_flush.c 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/runtime/print_flush.c 2011-07-25 18:12:01.000000000 +0000 @@ -99,7 +99,10 @@ #else /* !STP_BULKMODE */ #if STP_TRANSPORT_VERSION == 1 - + /** STP_TRANSPORT_VERSION == 1 is special, _stp_ctl_write will + pass through procfs _stp_ctl_write_fs which recognizes + STP_REALTIME_DATA as data that needs to be send right away + over the .cmd channel instead of being queued. */ if (unlikely(_stp_ctl_write(STP_REALTIME_DATA, pb->buf, len) <= 0)) atomic_inc (&_stp_transport_failures); diff -Nru systemtap-1.4/runtime/procfs.c systemtap-1.6/runtime/procfs.c --- systemtap-1.4/runtime/procfs.c 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/runtime/procfs.c 2011-07-25 18:12:01.000000000 +0000 @@ -21,6 +21,11 @@ #define STP_MAX_PROCFS_FILES 16 #endif +#ifndef STAPCONF_KERN_PATH_PARENT +#define kern_path_parent(name, nameidata) \ + path_lookup(name, LOOKUP_PARENT, nameidata) +#endif + static int _stp_num_pde = 0; static struct proc_dir_entry *_stp_pde[STP_MAX_PROCFS_FILES]; static struct proc_dir_entry *_stp_procfs_files[STP_MAX_PROCFS_FILES]; @@ -55,12 +60,13 @@ } if (_stp_proc_stap && _stp_proc_stap->subdir == NULL) { - /* Important! Do not attempt removal of /proc/systemtap */ - /* if in use. This will put the PDE in deleted state */ - /* pending usage count dropping to 0. During this time, */ - /* path_lookup() will still find it and allow new */ - /* modules to use it, even though it will not show up */ - /* in directory listings. */ + /* Important! Do not attempt removal of + * /proc/systemtap if in use. This will put the PDE + * in deleted state pending usage count dropping to + * 0. During this time, kern_path_parent() will still + * find it and allow new modules to use it, even + * though it will not show up in directory + * listings. */ if (atomic_read(&_stp_proc_stap->count) == 0) { remove_proc_entry("systemtap", NULL); @@ -85,12 +91,19 @@ goto done; } - /* We use path_lookup() because there is no lookup */ - /* function for procfs we can call directly. And */ - /* proc_mkdir() will always succeed, creating multiple */ - /* directory entries, all with the same name. */ + /* We use kern_path_parent() because there is no + * lookup function for procfs we can call directly. + * And proc_mkdir() will always succeed, creating + * multiple directory entries, all with the same + * name. + * + * Why "/proc/systemtap/foo"? kern_path_parent() is + * basically the same thing as calling the old + * path_lookup() with flags set to LOOKUP_PARENT, + * which means to look up the parent of the path, + * which in this case is "/proc/systemtap". */ - if (path_lookup("/proc/systemtap", 0, &nd)) { + if (kern_path_parent("/proc/systemtap/foo", &nd)) { /* doesn't exist, so create it */ _stp_proc_stap = proc_mkdir ("systemtap", NULL); if (_stp_proc_stap == NULL) { @@ -109,7 +122,7 @@ } _stp_proc_root = proc_mkdir(THIS_MODULE->name, _stp_proc_stap); -#ifdef AUTOCONF_PROCFS_OWNER +#ifdef STAPCONF_PROCFS_OWNER if (_stp_proc_root != NULL) _stp_proc_root->owner = THIS_MODULE; #endif @@ -167,7 +180,7 @@ goto err; } _stp_pde[_stp_num_pde++] = last_dir; -#ifdef AUTOCONF_PROCFS_OWNER +#ifdef STAPCONF_PROCFS_OWNER last_dir->owner = THIS_MODULE; #endif last_dir->uid = _stp_uid; @@ -191,7 +204,7 @@ _stp_error("Could not create file \"%s\" in path \"%s\"\n", p, path); goto err; } -#ifdef AUTOCONF_PROCFS_OWNER +#ifdef STAPCONF_PROCFS_OWNER de->owner = THIS_MODULE; #endif de->uid = _stp_uid; diff -Nru systemtap-1.4/runtime/README.doc systemtap-1.6/runtime/README.doc --- systemtap-1.4/runtime/README.doc 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/runtime/README.doc 2011-07-25 18:12:01.000000000 +0000 @@ -34,7 +34,7 @@ @ref io_page -SystemTap Project Page +SystemTap Project Page */ /** diff -Nru systemtap-1.4/runtime/runtime.h systemtap-1.6/runtime/runtime.h --- systemtap-1.4/runtime/runtime.h 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/runtime/runtime.h 2011-07-25 18:12:01.000000000 +0000 @@ -79,7 +79,7 @@ #ifndef STP_PRIVILEGED #define assert_is_myproc() do { \ if (! is_myproc()) { \ - snprintf (CONTEXT->error_buffer, MAXSTRINGLEN, "myproc-unprivileged tapset function called without is_myproc checking for pid %d (euid %d)", \ + snprintf (CONTEXT->error_buffer, MAXSTRINGLEN, STAP_MSG_RUNTIME_H_01, \ current->tgid, STP_CURRENT_EUID); \ CONTEXT->last_error = CONTEXT->error_buffer; \ goto out; \ diff -Nru systemtap-1.4/runtime/stack.c systemtap-1.6/runtime/stack.c --- systemtap-1.4/runtime/stack.c 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/runtime/stack.c 2011-07-25 18:12:01.000000000 +0000 @@ -73,6 +73,7 @@ int level; }; +#if defined(STAPCONF_STACKTRACE_OPS_WARNING) static void print_stack_warning(void *data, char *msg) { } @@ -81,6 +82,7 @@ print_stack_warning_symbol(void *data, char *msg, unsigned long symbol) { } +#endif static int print_stack_stack(void *data, char *name) { @@ -95,8 +97,10 @@ } static const struct stacktrace_ops print_stack_ops = { +#if defined(STAPCONF_STACKTRACE_OPS_WARNING) .warning = print_stack_warning, .warning_symbol = print_stack_warning_symbol, +#endif .stack = print_stack_stack, .address = print_stack_address, #if defined(STAPCONF_WALK_STACK) diff -Nru systemtap-1.4/runtime/staprun/common.c systemtap-1.6/runtime/staprun/common.c --- systemtap-1.4/runtime/staprun/common.c 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/runtime/staprun/common.c 2011-07-25 18:12:01.000000000 +0000 @@ -24,6 +24,7 @@ unsigned int buffer_size; char *target_cmd; char *outfile_name; +int rename_mod; int attach_mod; int delete_mod; int load_only; @@ -32,7 +33,6 @@ int daemon_mode; off_t fsize_max; int fnum_max; -int unprivileged_user = 0; /* module variables */ char *modname = NULL; @@ -78,7 +78,7 @@ max = PATH_MAX; len = stap_strfloctime(buf, max, outfile_name, t); if (len < 0) { - err("Invalid FILE name format\n"); + err(_("Invalid FILE name format\n")); return -1; } /* special case: for testing we sometimes want to write to /dev/null */ @@ -113,6 +113,7 @@ buffer_size = 0; target_cmd = NULL; outfile_name = NULL; + rename_mod = 0; attach_mod = 0; delete_mod = 0; load_only = 0; @@ -121,7 +122,7 @@ fsize_max = 0; fnum_max = 0; - while ((c = getopt(argc, argv, "ALu::vb:t:dc:o:x:S:Dw")) != EOF) { + while ((c = getopt(argc, argv, "ALu::vb:t:dc:o:x:S:DwR")) != EOF) { switch (c) { case 'u': need_uprobes = 1; @@ -137,7 +138,7 @@ case 'b': buffer_size = (unsigned)atoi(optarg); if (buffer_size < 1 || buffer_size > 4095) { - err("Invalid buffer size '%d' (should be 1-4095).\n", buffer_size); + err(_("Invalid buffer size '%d' (should be 1-4095).\n"), buffer_size); usage(argv[0]); } break; @@ -155,6 +156,9 @@ case 'o': outfile_name = optarg; break; + case 'R': + rename_mod = 1; + break; case 'A': attach_mod = 1; break; @@ -170,7 +174,7 @@ if (s[0] == ',') fnum_max = (int)strtoul(&s[1], &s, 10); if (s[0] != '\0') { - err("Invalid file size option '%s'.\n", optarg); + err(_("Invalid file size option '%s'.\n"), optarg); usage(argv[0]); } break; @@ -183,100 +187,107 @@ int ret; outfile_name = get_abspath(outfile_name); if (outfile_name == NULL) { - err("File name is too long.\n"); + err(_("File name is too long.\n")); usage(argv[0]); } ret = stap_strfloctime(tmp, PATH_MAX - 18, /* = _cpuNNN.SSSSSSSSSS */ outfile_name, time(NULL)); if (ret < 0) { - err("Filename format is invalid or too long.\n"); + err(_("Filename format is invalid or too long.\n")); usage(argv[0]); } } if (attach_mod && load_only) { - err("You can't specify the '-A' and '-L' options together.\n"); + err(_("You can't specify the '-A' and '-L' options together.\n")); usage(argv[0]); } if (attach_mod && buffer_size) { - err("You can't specify the '-A' and '-b' options together. The '-b'\n" - "buffer size option only has an effect when the module is inserted.\n"); + err(_("You can't specify the '-A' and '-b' options together. The '-b'\n" + "buffer size option only has an effect when the module is inserted.\n")); usage(argv[0]); } if (attach_mod && target_cmd) { - err("You can't specify the '-A' and '-c' options together. The '-c cmd'\n" + err(_("You can't specify the '-A' and '-c' options together. The '-c cmd'\n" "option used to start a command only has an effect when the module\n" - "is inserted.\n"); + "is inserted.\n")); usage(argv[0]); } if (attach_mod && target_pid) { - err("You can't specify the '-A' and '-x' options together. The '-x pid'\n" - "option only has an effect when the module is inserted.\n"); + err(_("You can't specify the '-A' and '-x' options together. The '-x pid'\n" + "option only has an effect when the module is inserted.\n")); usage(argv[0]); } if (target_cmd && target_pid) { - err("You can't specify the '-c' and '-x' options together.\n"); + err(_("You can't specify the '-c' and '-x' options together.\n")); usage(argv[0]); } if (daemon_mode && load_only) { - err("You can't specify the '-D' and '-L' options together.\n"); + err(_("You can't specify the '-D' and '-L' options together.\n")); usage(argv[0]); } if (daemon_mode && delete_mod) { - err("You can't specify the '-D' and '-d' options together.\n"); + err(_("You can't specify the '-D' and '-d' options together.\n")); usage(argv[0]); } if (daemon_mode && target_cmd) { - err("You can't specify the '-D' and '-c' options together.\n"); + err(_("You can't specify the '-D' and '-c' options together.\n")); usage(argv[0]); } if (daemon_mode && outfile_name == NULL) { - err("You have to specify output FILE with '-D' option.\n"); + err(_("You have to specify output FILE with '-D' option.\n")); usage(argv[0]); } if (outfile_name == NULL && fsize_max != 0) { - err("You have to specify output FILE with '-S' option.\n"); + err(_("You have to specify output FILE with '-S' option.\n")); usage(argv[0]); } } void usage(char *prog) { - err("\n%s [-v] [-w] [-u] [-c cmd ] [-x pid] [-u user] [-A|-L|-d]\n" - "\t[-b bufsize] [-o FILE [-D] [-S size[,N]]] MODULE [module-options]\n", prog); - err("-v Increase verbosity.\n"); - err("-w Suppress warnings.\n"); - err("-u Load uprobes.ko\n"); - err("-c cmd Command \'cmd\' will be run and staprun will\n"); - err(" exit when it does. The '_stp_target' variable\n"); - err(" will contain the pid for the command.\n"); - err("-x pid Sets the '_stp_target' variable to pid.\n"); - err("-o FILE Send output to FILE. This supports strftime(3)\n"); - err(" formats for FILE.\n"); - err("-b buffer size The systemtap module specifies a buffer size.\n"); - err(" Setting one here will override that value. The\n"); - err(" value should be an integer between 1 and 4095 \n"); - err(" which be assumed to be the buffer size in MB.\n"); - err(" That value will be per-cpu in bulk mode.\n"); - err("-L Load module and start probes, then detach.\n"); - err("-A Attach to loaded systemtap module.\n"); - err("-d Delete a module. Only detached or unused modules\n"); - err(" the user has permission to access will be deleted. Use \"*\"\n"); - err(" (quoted) to delete all unused modules.\n"); - err("-D Run in background. This requires '-o' option.\n"); - err("-S size[,N] Switches output file to next file when the size\n"); - err(" of file reaches the specified size. The value\n"); - err(" should be an integer greater than 1 which is\n"); - err(" assumed to be the maximum file size in MB.\n"); - err(" When the number of output files reaches N, it\n"); - err(" switches to the first output file. You can omit\n"); - err(" the second argument.\n\n"); - err("MODULE can be either a module name or a module path. If a\n"); - err("module name is used, it is searched in the following directory:\n"); + err(_("\n%s [-v] [-w] [-u] [-c cmd ] [-x pid] [-u user] [-A|-L|-d]\n" + "\t[-b bufsize] [-o FILE [-D] [-S size[,N]]] MODULE [module-options]\n"), prog); + err(_("-v Increase verbosity.\n" + "-w Suppress warnings.\n" + "-u Load uprobes.ko\n" + "-c cmd Command \'cmd\' will be run and staprun will\n" + " exit when it does. The '_stp_target' variable\n" + " will contain the pid for the command.\n" + "-x pid Sets the '_stp_target' variable to pid.\n" + "-o FILE Send output to FILE. This supports strftime(3)\n" + " formats for FILE.\n" + "-b buffer size The systemtap module specifies a buffer size.\n" + " Setting one here will override that value. The\n" + " value should be an integer between 1 and 4095 \n" + " which be assumed to be the buffer size in MB.\n" + " That value will be per-cpu in bulk mode.\n" + "-L Load module and start probes, then detach.\n" + "-A Attach to loaded systemtap module.\n" + "-d Delete a module. Only detached or unused modules\n" + " the user has permission to access will be deleted. Use \"*\"\n" + " (quoted) to delete all unused modules.\n" +#ifdef HAVE_ELF_GETSHDRSTRNDX + "-R Have staprun create a new name for the module before\n" + " inserting it. This allows the same module to be inserted\n" + " more than once.\n" +#else + "-R (Module renaming is not available in this configuration.)\n" +#endif + "-D Run in background. This requires '-o' option.\n" + "-S size[,N] Switches output file to next file when the size\n" + " of file reaches the specified size. The value\n" + " should be an integer greater than 1 which is\n" + " assumed to be the maximum file size in MB.\n" + " When the number of output files reaches N, it\n" + " switches to the first output file. You can omit\n" + " the second argument.\n\n" + "MODULE can be either a module name or a module path. If a\n" + "module name is used, it is searched in the following directory:\n")); { struct utsname utsbuf; int rc = uname (& utsbuf); @@ -322,7 +333,7 @@ mptr = inpath; modpath = strdup(inpath); if (!modpath) { - err("Memory allocation failed. Exiting.\n"); + err(_("Memory allocation failed. Exiting.\n")); exit(1); } } else { @@ -338,7 +349,7 @@ /* First, we need to figure out what the * kernel version. */ if (uname(&utsbuf) != 0) { - perr("Unable to determine kernel version, uname failed"); + perr(_("Unable to determine kernel version, uname failed")); exit(-1); } @@ -347,7 +358,7 @@ len = sizeof(MODULE_PATH) + sizeof(utsbuf.release) + strlen(inpath); modpath = malloc(len); if (!modpath) { - err("Memory allocation failed. Exiting.\n"); + err(_("Memory allocation failed. Exiting.\n")); exit(1); } @@ -366,14 +377,14 @@ modpath = strdup(inpath); if (!modpath) { - err("Memory allocation failed. Exiting.\n"); + err(_("Memory allocation failed. Exiting.\n")); exit(1); } } modname = strdup(mptr); if (!modname) { - err("Memory allocation failed. Exiting.\n"); + err(_("Memory allocation failed. Exiting.\n")); exit(1); } @@ -386,7 +397,7 @@ * work, but the module can't be removed (because you end up * with control characters in the module name). */ if (strlen(modname) > MODULE_NAME_LEN) { - err("ERROR: Module name ('%s') is too long.\n", modname); + err(_("ERROR: Module name ('%s') is too long.\n"), modname); exit(1); } } @@ -399,6 +410,7 @@ rc = write (STDERR_FILENO, ERR_MSG, sizeof(ERR_MSG)); rc = write (STDERR_FILENO, str, strlen(str)); rc = write (STDERR_FILENO, "\n", 1); + (void) rc; /* notused */ _exit(1); } @@ -476,7 +488,7 @@ PROBE3(stapio, send__ctlmsg, type, data, len); /* Before doing memcpy, make sure 'buf' is big enough. */ if ((len + 4) > (int)sizeof(buf)) { - _err("exceeded maximum send_request size.\n"); + _err(_("exceeded maximum send_request size.\n")); return -1; } memcpy(buf, &type, 4); diff -Nru systemtap-1.4/runtime/staprun/config.in systemtap-1.6/runtime/staprun/config.in --- systemtap-1.4/runtime/staprun/config.in 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/runtime/staprun/config.in 2011-07-25 18:12:01.000000000 +0000 @@ -1,11 +1,47 @@ /* config.in. Generated from configure.ac by autoheader. */ +/* Define to 1 if program messages should be translated. */ +#undef ENABLE_NLS + /* Define to 1 to enable process.mark probes in staprun, stapio. */ #undef ENABLE_SDT_PROBES +/* Define to 1 if libelf has elf_getshdrstrndx */ +#undef HAVE_ELF_GETSHDRSTRNDX + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LIBELF_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + /* Define to 1 if you have the nss libraries. */ #undef HAVE_NSS +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + /* Define to 1 if your C compiler doesn't accept -c and -o together. */ #undef NO_MINUS_C_MINUS_O @@ -30,6 +66,9 @@ /* Define to the version of this package. */ #undef PACKAGE_VERSION +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + /* Version number of package */ #undef VERSION diff -Nru systemtap-1.4/runtime/staprun/configure systemtap-1.6/runtime/staprun/configure --- systemtap-1.4/runtime/staprun/configure 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/runtime/staprun/configure 2011-07-25 18:12:01.000000000 +0000 @@ -1,8 +1,8 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.66 for systemtap 1.4. +# Generated by GNU Autoconf 2.66 for systemtap 1.6. # -# Report bugs to . +# Report bugs to . # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -172,7 +172,8 @@ as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1" + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else @@ -230,10 +231,10 @@ $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and -$0: systemtap@sources.redhat.com about your system, -$0: including any error possibly output before this -$0: message. Then install a modern shell, or manually run -$0: the script under such a shell if you do have one." +$0: systemtap@sourceware.org about your system, including +$0: any error possibly output before this message. Then +$0: install a modern shell, or manually run the script +$0: under such a shell if you do have one." fi exit 1 fi @@ -551,15 +552,55 @@ # Identity of this package. PACKAGE_NAME='systemtap' PACKAGE_TARNAME='systemtap' -PACKAGE_VERSION='1.4' -PACKAGE_STRING='systemtap 1.4' -PACKAGE_BUGREPORT='systemtap@sources.redhat.com' +PACKAGE_VERSION='1.6' +PACKAGE_STRING='systemtap 1.6' +PACKAGE_BUGREPORT='systemtap@sourceware.org' PACKAGE_URL='' +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif +# include +#endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_INTTYPES_H +# include +#endif +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif" + ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS +staprun_LIBS +EGREP +GREP +CPP HAVE_NSS_FALSE HAVE_NSS_TRUE nss_LIBS @@ -567,8 +608,16 @@ PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG +LOCALEDIR PIELDFLAGS +PIECXXFLAGS PIECFLAGS +am__fastdepCXX_FALSE +am__fastdepCXX_TRUE +CXXDEPMODE +ac_ct_CXX +CXXFLAGS +CXX am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE @@ -660,6 +709,7 @@ enable_largefile enable_pie enable_sdt_probes +enable_nls ' ac_precious_vars='build_alias host_alias @@ -669,11 +719,15 @@ LDFLAGS LIBS CPPFLAGS +CXX +CXXFLAGS +CCC PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR nss_CFLAGS -nss_LIBS' +nss_LIBS +CPP' # Initialize some variables set by options. @@ -1215,7 +1269,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures systemtap 1.4 to adapt to many kinds of systems. +\`configure' configures systemtap 1.6 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1281,7 +1335,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of systemtap 1.4:";; + short | recursive ) echo "Configuration of systemtap 1.6:";; esac cat <<\_ACEOF @@ -1298,6 +1352,7 @@ --disable-largefile omit support for large files --enable-pie enable position-independent-executable --disable-sdt-probes disable process.mark probes in staprun, stapio + --enable-nls enable translating program messages Some influential environment variables: CC C compiler command @@ -1307,6 +1362,8 @@ LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory + CXX C++ compiler command + CXXFLAGS C++ compiler flags PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path @@ -1314,11 +1371,12 @@ path overriding pkg-config's built-in search path nss_CFLAGS C compiler flags for nss, overriding pkg-config nss_LIBS linker flags for nss, overriding pkg-config + CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. -Report bugs to . +Report bugs to . _ACEOF ac_status=$? fi @@ -1381,7 +1439,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -systemtap configure 1.4 +systemtap configure 1.6 generated by GNU Autoconf 2.66 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1433,6 +1491,44 @@ } # ac_fn_c_try_compile +# ac_fn_cxx_try_compile LINENO +# ---------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_cxx_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval + +} # ac_fn_cxx_try_compile + # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. @@ -1478,11 +1574,212 @@ as_fn_set_status $ac_retval } # ac_fn_c_try_link + +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_c_check_header_mongrel () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if eval "test \"\${$3+set}\"" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval "test \"\${$3+set}\"" = set; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} +( $as_echo "## --------------------------------------- ## +## Report this to systemtap@sourceware.org ## +## --------------------------------------- ##" + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval "test \"\${$3+set}\"" = set; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_header_mongrel + +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval + +} # ac_fn_c_try_run + +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval "test \"\${$3+set}\"" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_header_compile cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by systemtap $as_me 1.4, which was +It was created by systemtap $as_me 1.6, which was generated by GNU Autoconf 2.66. Invocation command line was $ $0 $@ @@ -2299,7 +2596,7 @@ # Define the identity of the package. PACKAGE='systemtap' - VERSION='1.4' + VERSION='1.6' cat >>confdefs.h <<_ACEOF @@ -3355,21 +3652,27 @@ fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +if test -z "$CXX"; then + if test -n "$CCC"; then + CXX=$CCC + else + if test -n "$ac_tool_prefix"; then + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if test "${ac_cv_prog_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -3378,7 +3681,7 @@ test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" + ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -3388,28 +3691,32 @@ fi fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } +CXX=$ac_cv_prog_CXX +if test -n "$CXX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 +$as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi + test -n "$CXX" && break + done fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 +if test -z "$CXX"; then + ac_ct_CXX=$CXX + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. + if test -n "$ac_ct_CXX"; then + ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -3418,7 +3725,7 @@ test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="gcc" + ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -3428,17 +3735,21 @@ fi fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } +ac_ct_CXX=$ac_cv_prog_ac_ct_CXX +if test -n "$ac_ct_CXX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 +$as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - if test "x$ac_ct_CC" = x; then - CC="" + + test -n "$ac_ct_CXX" && break +done + + if test "x$ac_ct_CXX" = x; then + CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) @@ -3446,53 +3757,423 @@ $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac - CC=$ac_ct_CC + CXX=$ac_ct_CXX fi -else - CC="$ac_cv_prog_CC" fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 fi +fi +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } done - done -IFS=$as_save_IFS -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 +$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } +if test "${ac_cv_cxx_compiler_gnu+set}" = set; then : + $as_echo_n "(cached) " >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int +main () +{ +#ifndef __GNUC__ + choke me +#endif - fi -fi + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_cxx_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 +$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GXX=yes +else + GXX= +fi +ac_test_CXXFLAGS=${CXXFLAGS+set} +ac_save_CXXFLAGS=$CXXFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 +$as_echo_n "checking whether $CXX accepts -g... " >&6; } +if test "${ac_cv_prog_cxx_g+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_save_cxx_werror_flag=$ac_cxx_werror_flag + ac_cxx_werror_flag=yes + ac_cv_prog_cxx_g=no + CXXFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_cv_prog_cxx_g=yes +else + CXXFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + +else + ac_cxx_werror_flag=$ac_save_cxx_werror_flag + CXXFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_cv_prog_cxx_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cxx_werror_flag=$ac_save_cxx_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 +$as_echo "$ac_cv_prog_cxx_g" >&6; } +if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS=$ac_save_CXXFLAGS +elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-g" + fi +else + if test "$GXX" = yes; then + CXXFLAGS="-O2" + else + CXXFLAGS= + fi +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +depcc="$CXX" am_compiler_list= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CXX_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvisualcpp | msvcmsys) + # This compiler won't grok `-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CXX_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CXX_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } +CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then + am__fastdepCXX_TRUE= + am__fastdepCXX_FALSE='#' +else + am__fastdepCXX_TRUE='#' + am__fastdepCXX_FALSE= +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi +fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 @@ -4361,10 +5042,13 @@ if test "x$enable_pie" = xyes; then : PIECFLAGS='-fPIE' + PIECXXFLAGS='-fPIE' PIELDFLAGS='-pie -Wl,-z,relro -Wl,-z,now' save_CFLAGS="$CFLAGS" + save_CXXFLAGS="$CXXFLAGS" save_LDFLAGS="$LDFLAGS" CFLAGS="$CFLAGS $PIECFLAGS" + CXXFLAGS="$CXXFLAGS $PIECXXFLAGS" LDFLAGS="$LDFLAGS $PIELDFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -4380,18 +5064,23 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: Compiler does not support -pie et al." >&5 $as_echo "$as_me: Compiler does not support -pie et al." >&6;} PIECFLAGS= + PIECXXFLAGS= PIELDFLAGS= fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS="$save_CFLAGS" + CXXFLAGS="$save_CXXFLAGS" LDFLAGS="$save_LDFLAGS" fi +LOCALEDIR="$localedir" + + # Check whether --enable-sdt-probes was given. if test "${enable_sdt_probes+set}" = set; then : enableval=$enable_sdt_probes; @@ -4608,6 +5297,481 @@ fi +# Check whether --enable-nls was given. +if test "${enable_nls+set}" = set; then : + enableval=$enable_nls; +fi + +if test "x$enable_nls" != xno; then : + + +$as_echo "#define ENABLE_NLS 1" >>confdefs.h + + +fi + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if test "${ac_cv_path_GREP+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_GREP=$GREP +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_EGREP=$EGREP +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if test "${ac_cv_header_stdc+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes +else + ac_cv_header_stdc=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +else + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +$as_echo "#define STDC_HEADERS 1" >>confdefs.h + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +for ac_header in libelf.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "libelf.h" "ac_cv_header_libelf_h" "$ac_includes_default" +if test "x$ac_cv_header_libelf_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBELF_H 1 +_ACEOF + +fi + +done + + +save_LIBS="$LIBS" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_getshdrstrndx in -lelf" >&5 +$as_echo_n "checking for elf_getshdrstrndx in -lelf... " >&6; } +if test "${ac_cv_lib_elf_elf_getshdrstrndx+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lelf $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char elf_getshdrstrndx (); +int +main () +{ +return elf_getshdrstrndx (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_elf_elf_getshdrstrndx=yes +else + ac_cv_lib_elf_elf_getshdrstrndx=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_elf_getshdrstrndx" >&5 +$as_echo "$ac_cv_lib_elf_elf_getshdrstrndx" >&6; } +if test "x$ac_cv_lib_elf_elf_getshdrstrndx" = x""yes; then : + + +$as_echo "#define HAVE_ELF_GETSHDRSTRNDX 1" >>confdefs.h + +fi + +staprun_LIBS="$staprun_LIBS -lelf" +LIBS="$save_LIBS" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: staprun will link $staprun_LIBS" >&5 +$as_echo "$as_me: staprun will link $staprun_LIBS" >&6;} ac_config_headers="$ac_config_headers config.h:config.in" @@ -4733,6 +5897,10 @@ as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -5149,7 +6317,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by systemtap $as_me 1.4, which was +This file was extended by systemtap $as_me 1.6, which was generated by GNU Autoconf 2.66. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -5209,13 +6377,13 @@ Configuration commands: $config_commands -Report bugs to ." +Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -systemtap config.status 1.4 +systemtap config.status 1.6 configured by $0, generated by GNU Autoconf 2.66, with options \\"\$ac_cs_config\\" diff -Nru systemtap-1.4/runtime/staprun/configure.ac systemtap-1.6/runtime/staprun/configure.ac --- systemtap-1.4/runtime/staprun/configure.ac 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/runtime/staprun/configure.ac 2011-07-25 18:12:01.000000000 +0000 @@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script. dnl This line must match ../../configure.ac exactly. -AC_INIT([systemtap], 1.4, systemtap@sources.redhat.com, systemtap) +AC_INIT([systemtap], 1.6, systemtap@sourceware.org, systemtap) AC_PREREQ(2.63) dnl We don't maintain a ChangeLog, which makes us non-GNU -> foreign. @@ -12,6 +12,7 @@ m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) AC_PROG_CC +AC_PROG_CXX AM_PROG_CC_STDC AM_PROG_CC_C_O AC_PROG_INSTALL @@ -22,23 +23,30 @@ [AS_HELP_STRING([--enable-pie], [enable position-independent-executable])]) AS_IF([test "x$enable_pie" = xyes],[ PIECFLAGS='-fPIE' + PIECXXFLAGS='-fPIE' PIELDFLAGS='-pie -Wl,-z,relro -Wl,-z,now' save_CFLAGS="$CFLAGS" + save_CXXFLAGS="$CXXFLAGS" save_LDFLAGS="$LDFLAGS" CFLAGS="$CFLAGS $PIECFLAGS" + CXXFLAGS="$CXXFLAGS $PIECXXFLAGS" LDFLAGS="$LDFLAGS $PIELDFLAGS" - AC_LINK_IFELSE([int main () { return 0; }], [ + AC_LINK_IFELSE([AC_LANG_SOURCE([int main () { return 0; }])], [ AC_MSG_NOTICE([Compiling with gcc pie et al.]) ], [ AC_MSG_NOTICE([Compiler does not support -pie et al.]) PIECFLAGS= + PIECXXFLAGS= PIELDFLAGS= ]) CFLAGS="$save_CFLAGS" + CXXFLAGS="$save_CXXFLAGS" LDFLAGS="$save_LDFLAGS" ]) AC_SUBST(PIECFLAGS) +AC_SUBST(PIECXXFLAGS) AC_SUBST(PIELDFLAGS) +AC_SUBST(LOCALEDIR, "$localedir") AC_ARG_ENABLE([sdt-probes], [AS_HELP_STRING([--disable-sdt-probes], @@ -53,6 +61,27 @@ AS_IF([test $have_nss = yes], [ AC_DEFINE([HAVE_NSS], [1], [Define to 1 if you have the nss libraries.]) ]) +AC_ARG_ENABLE([nls], [AS_HELP_STRING([--enable-nls], [enable translating program messages])]) +AS_IF([test "x$enable_nls" != xno], [ +AC_DEFINE([ENABLE_NLS], [1], [Define to 1 if program messages should be translated.]) +]) + + +dnl We link only against the system elfutils. Connecting to a +dnl bundled elfutils build (stap/configure --with-elfutils=PATH) +dnl is too tricky to bother with. + +AC_CHECK_HEADERS([libelf.h]) + +save_LIBS="$LIBS" +dnl this will only succeed with elfutils 0.142+ +AC_CHECK_LIB(elf,elf_getshdrstrndx,[ + AC_DEFINE([HAVE_ELF_GETSHDRSTRNDX],[1],[Define to 1 if libelf has elf_getshdrstrndx])]) +staprun_LIBS="$staprun_LIBS -lelf" +LIBS="$save_LIBS" + +AC_SUBST(staprun_LIBS) +AC_MSG_NOTICE([staprun will link $staprun_LIBS]) AC_CONFIG_HEADERS([config.h:config.in]) AC_CONFIG_FILES(Makefile) diff -Nru systemtap-1.4/runtime/staprun/ctl.c systemtap-1.6/runtime/staprun/ctl.c --- systemtap-1.4/runtime/staprun/ctl.c 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/runtime/staprun/ctl.c 2011-07-25 18:12:01.000000000 +0000 @@ -27,17 +27,24 @@ return -2; } - if (access(buf, R_OK|W_OK) != 0) - return -5; - control_channel = open(buf, O_RDWR); dbug(2, "Opened %s (%d)\n", buf, control_channel); + +/* It's actually safe to do this check before the open(), + * as the file we're trying to access connot be modified + * by a typical user. + */ + if (access(buf, R_OK|W_OK) != 0){ + close(control_channel); + return -5; + } + if (control_channel < 0) { if (verb) { if (attach_mod && errno == ENOENT) - err("ERROR: Can not attach. Module %s not running.\n", name); + err(_("ERROR: Can not attach. Module %s not running.\n"), name); else - perr("Couldn't open control channel '%s'", buf); + perr(_("Couldn't open control channel '%s'"), buf); } return -3; } diff -Nru systemtap-1.4/runtime/staprun/mainloop.c systemtap-1.6/runtime/staprun/mainloop.c --- systemtap-1.4/runtime/staprun/mainloop.c 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/runtime/staprun/mainloop.c 2011-07-25 18:12:01.000000000 +0000 @@ -24,6 +24,7 @@ int ncpus; static int use_old_transport = 0; static int pending_interrupts = 0; +static int target_pid_failed_p = 0; //enum _stp_sig_type { sig_none, sig_done, sig_detach }; //static enum _stp_sig_type got_signal = sig_none; @@ -32,7 +33,7 @@ static void *signal_thread(void *arg) { sigset_t *s = (sigset_t *) arg; - int signum; + int signum = 0; while (1) { if (sigwait(s, &signum) < 0) { @@ -54,12 +55,29 @@ static void chld_proc(int signum) { int32_t rc, btype = STP_EXIT; + int chld_stat = 0; dbug(2, "chld_proc %d (%s)\n", signum, strsignal(signum)); - pid_t pid = waitpid(-1, NULL, WNOHANG); - if (pid != target_pid) + pid_t pid = waitpid(-1, &chld_stat, WNOHANG); + if (pid != target_pid) { return; - // send STP_EXIT - rc = write(control_channel, &btype, sizeof(btype)); + } + + if (chld_stat) { + // our child exited with a non-zero status + if (WIFSIGNALED(chld_stat)) { + err(_("Warning: child process exited with signal %d (%s)\n"), + WTERMSIG(chld_stat), strsignal(WTERMSIG(chld_stat))); + target_pid_failed_p = 1; + } + if (WIFEXITED(chld_stat) && WEXITSTATUS(chld_stat)) { + err(_("Warning: child process exited with status %d\n"), + WEXITSTATUS(chld_stat)); + target_pid_failed_p = 1; + } + } + + rc = write(control_channel, &btype, sizeof(btype)); // send STP_EXIT + (void) rc; /* XXX: notused */ } #if WORKAROUND_BZ467568 @@ -103,7 +121,7 @@ sigaddset(s, SIGQUIT); pthread_sigmask(SIG_SETMASK, s, NULL); if (pthread_create(&tid, NULL, signal_thread, s) < 0) { - _perr("failed to create thread"); + _perr(_("failed to create thread")); exit(1); } } @@ -128,6 +146,7 @@ /* if we are execing a target cmd, ignore ^C in stapio */ /* and let the target cmd get it. */ + memset(&a, 0, sizeof(a)); sigemptyset(&a.sa_mask); a.sa_flags = 0; a.sa_handler = SIG_IGN; @@ -139,6 +158,7 @@ sigaddset (&blockmask, SIGUSR1); /* Establish the SIGUSR1 signal handler. */ + memset(&usr1_action, 0, sizeof(usr1_action)); sigfillset (&usr1_action.sa_mask); usr1_action.sa_flags = 0; usr1_action.sa_handler = signal_usr1; @@ -183,10 +203,10 @@ case 0: break; case WRDE_SYNTAX: - _err ("wordexp: syntax error (unmatched quotes?) in -c COMMAND\n"); + _err (_("wordexp: syntax error (unmatched quotes?) in -c COMMAND\n")); _exit(1); default: - _err ("wordexp: parsing error (%d)\n", rc); + _err (_("wordexp: parsing error (%d)\n"), rc); _exit (1); } if (words.we_wordc < 1) { _err ("empty -c COMMAND"); _exit (1); } @@ -294,13 +314,13 @@ len = read(fd, buf, sizeof(buf)); if (len <= 0) { - perr("Couldn't read bufsize"); + perr(_("Couldn't read bufsize")); close(fd); return; } ret = sscanf(buf, "%u,%u", &n_subbufs, &subbuf_size); if (ret != 2) - perr("Couldn't read bufsize"); + perr(_("Couldn't read bufsize")); dbug(2, "n_subbufs= %u, size=%u\n", n_subbufs, subbuf_size); close(fd); @@ -320,7 +340,7 @@ /* create control channel */ use_old_transport = init_ctl_channel(modname, 1); if (use_old_transport < 0) { - err("Failed to initialize control channel.\n"); + err(_("Failed to initialize control channel.\n")); return -1; } read_buffer_info(); @@ -355,7 +375,7 @@ /* daemonize */ ret = daemon(0, 1); /* don't close stdout at this time. */ if (ret) { - err("Failed to daemonize stapio\n"); + err(_("Failed to daemonize stapio\n")); return -1; } @@ -370,7 +390,7 @@ /* redirect all outputs to /dev/null */ ret = open("/dev/null", O_RDWR); if (ret < 0) { - err("Failed to open /dev/null\n"); + err(_("Failed to open /dev/null\n")); return -1; } close(STDIN_FILENO); @@ -421,9 +441,11 @@ close_ctl_channel(); if (detach) { - err("\nDisconnecting from systemtap module.\n" "To reconnect, type \"staprun -A %s\"\n", modname); + err(_("\nDisconnecting from systemtap module.\n" "To reconnect, type \"staprun -A %s\"\n"), modname); _exit(0); } + else if (rename_mod) + dbug(2, "\nRenamed module to: %s", modname); /* At this point, we're committed to calling staprun -d MODULE to * unload the thing and exit. */ @@ -434,6 +456,7 @@ // So that waitpid() below will work correctly, we need to clear // out our SIGCHLD handler. + memset(&sa, 0, sizeof(sa)); sigemptyset(&sa.sa_mask); sa.sa_flags = 0; sa.sa_handler = SIG_DFL; @@ -470,8 +493,12 @@ } if (WIFEXITED(rstatus)) { - _exit(rc ?: WEXITSTATUS(rstatus)); + if(rc || target_pid_failed_p || rstatus) // if we have an error + _exit(1); + else + _exit(0); //success } + _exit(-1); } @@ -530,7 +557,7 @@ dbug(3, "nb=%ld\n", (long)nb); if (nb < (ssize_t) sizeof(recvbuf.type)) { if (nb >= 0 || (errno != EINTR && errno != EAGAIN)) { - _perr("Unexpected EOF in read (nb=%ld)", (long)nb); + _perr(_("Unexpected EOF in read (nb=%ld)"), (long)nb); cleanup_and_exit(0, 1); } dbug(4, "sleeping\n"); @@ -545,12 +572,14 @@ #if STP_TRANSPORT_VERSION == 1 case STP_REALTIME_DATA: if (write_realtime_data(recvbuf.payload.data, nb)) { - _perr("write error (nb=%ld)", (long)nb); + _perr(_("write error (nb=%ld)"), (long)nb); cleanup_and_exit(0, 1); } break; #endif case STP_OOB_DATA: + /* Note that "WARNING:" should not be translated, since it is + * part of the module cmd protocol. */ if (strncmp(recvbuf.payload.data, "WARNING:", 7) == 0) { if (suppress_warnings) break; if (verbose) { /* don't eliminate duplicates */ @@ -578,7 +607,7 @@ overflow staprun's memory. */ #define MAX_STORED_WARNINGS 1024 if (seen_count++ == MAX_STORED_WARNINGS) { - eprintf("WARNING deduplication table full\n"); + eprintf(_("WARNING deduplication table full\n")); free (dupstr); } else if (seen_count > MAX_STORED_WARNINGS) { @@ -602,6 +631,8 @@ free (dupstr); } } /* duplicate elimination */ + /* Note that "ERROR:" should not be translated, since it is + * part of the module cmd protocol. */ } else if (strncmp(recvbuf.payload.data, "ERROR:", 5) == 0) { eprintf("%.*s", (int) nb, recvbuf.payload.data); error_detected = 1; @@ -622,6 +653,7 @@ dbug(2, "got STP_REQUEST_EXIT\n"); int32_t rc, btype = STP_EXIT; rc = write(control_channel, &btype, sizeof(btype)); + (void) rc; /* XXX: notused */ break; } case STP_START: @@ -643,7 +675,7 @@ int rc = ptrace (PTRACE_DETACH, target_pid, 0, 0); if (rc < 0) { - perror ("ptrace detach"); + perror (_("ptrace detach")); if (target_cmd) kill(target_pid, SIGKILL); cleanup_and_exit(0, 1); @@ -676,7 +708,7 @@ break; } default: - err("WARNING: ignored message of type %d\n", recvbuf.type); + err(_("WARNING: ignored message of type %d\n"), recvbuf.type); } } fclose(ofp); diff -Nru systemtap-1.4/runtime/staprun/Makefile.am systemtap-1.6/runtime/staprun/Makefile.am --- systemtap-1.4/runtime/staprun/Makefile.am 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/runtime/staprun/Makefile.am 2011-07-25 18:12:01.000000000 +0000 @@ -1,24 +1,28 @@ # Makefile.am --- automake input file for systemtap runtime tools -AM_CPPFLAGS = -D_GNU_SOURCE AM_CFLAGS = -Wall -Werror -Wunused -W -Wformat=2 -Wno-format-nonliteral +AM_CXXFLAGS = -Wall -Werror -Wunused -W -Wformat=2 -Wno-format-nonliteral +AM_CPPFLAGS = -D_GNU_SOURCE AM_CPPFLAGS += -I$(srcdir)/../../includes AM_CPPFLAGS += -I$(builddir)/../../includes/sys -AM_CPPFLAGS += -DBINDIR='"$(bindir)"' -DSYSCONFDIR='"$(sysconfdir)"' -DPKGDATADIR='"${pkgdatadir}"' -DPKGLIBDIR='"$(pkglibexecdir)"' +AM_CPPFLAGS += -DBINDIR='"$(bindir)"' -DSYSCONFDIR='"$(sysconfdir)"' -DPKGDATADIR='"${pkgdatadir}"' -DPKGLIBDIR='"$(pkglibexecdir)"' -DLOCALEDIR='"$(localedir)"' AM_CFLAGS += @PIECFLAGS@ +AM_CXXFLAGS += @PIECXXFLAGS@ AM_LDFLAGS = @PIELDFLAGS@ -bin_PROGRAMS = staprun stap-merge +bin_PROGRAMS = staprun stap-merge stapsh pkglibexec_PROGRAMS = stapio staprun_SOURCES = staprun.c staprun_funcs.c ctl.c common.c staprun_CFLAGS = $(AM_CFLAGS) -DSINGLE_THREADED -staprun_LDADD = +staprun_CXXFLAGS = $(AM_CXXFLAGS) -DSINGLE_THREADED +staprun_LDADD = $(staprun_LIBS) if HAVE_NSS -staprun_SOURCES += modverify.c ../../nsscommon.c +staprun_SOURCES += modverify.c ../../nsscommon.cxx ../../util.cxx staprun_CFLAGS += $(nss_CFLAGS) +staprun_CXXFLAGS += $(nss_CFLAGS) staprun_LDADD += $(nss_LIBS) endif @@ -32,6 +36,11 @@ stap_merge_LDFLAGS = $(AM_LDFLAGS) stap_merge_LDADD = +stapsh_SOURCES = stapsh.c +stapsh_CFLAGS = $(AM_CFLAGS) +stapsh_LDFLAGS = $(AM_LDFLAGS) +stapsh_LDADD = + # Why the "id -u" condition? This way, an unprivileged user can run # make install, and have "sudo stap ...." or "sudo staprun ...." work later. diff -Nru systemtap-1.4/runtime/staprun/Makefile.in systemtap-1.6/runtime/staprun/Makefile.in --- systemtap-1.4/runtime/staprun/Makefile.in 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/runtime/staprun/Makefile.in 2011-07-25 18:12:01.000000000 +0000 @@ -34,11 +34,12 @@ NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : -bin_PROGRAMS = staprun$(EXEEXT) stap-merge$(EXEEXT) +bin_PROGRAMS = staprun$(EXEEXT) stap-merge$(EXEEXT) stapsh$(EXEEXT) pkglibexec_PROGRAMS = stapio$(EXEEXT) -@HAVE_NSS_TRUE@am__append_1 = modverify.c ../../nsscommon.c +@HAVE_NSS_TRUE@am__append_1 = modverify.c ../../nsscommon.cxx ../../util.cxx @HAVE_NSS_TRUE@am__append_2 = $(nss_CFLAGS) -@HAVE_NSS_TRUE@am__append_3 = $(nss_LIBS) +@HAVE_NSS_TRUE@am__append_3 = $(nss_CFLAGS) +@HAVE_NSS_TRUE@am__append_4 = $(nss_LIBS) subdir = . DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/configure $(am__configure_deps) \ @@ -68,15 +69,21 @@ stapio_OBJECTS = $(am_stapio_OBJECTS) stapio_DEPENDENCIES = @HAVE_NSS_TRUE@am__objects_1 = staprun-modverify.$(OBJEXT) \ -@HAVE_NSS_TRUE@ staprun-nsscommon.$(OBJEXT) +@HAVE_NSS_TRUE@ staprun-nsscommon.$(OBJEXT) \ +@HAVE_NSS_TRUE@ staprun-util.$(OBJEXT) am_staprun_OBJECTS = staprun-staprun.$(OBJEXT) \ staprun-staprun_funcs.$(OBJEXT) staprun-ctl.$(OBJEXT) \ staprun-common.$(OBJEXT) $(am__objects_1) staprun_OBJECTS = $(am_staprun_OBJECTS) am__DEPENDENCIES_1 = @HAVE_NSS_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) -staprun_DEPENDENCIES = $(am__DEPENDENCIES_2) -staprun_LINK = $(CCLD) $(staprun_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ +staprun_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) +staprun_LINK = $(CXXLD) $(staprun_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +am_stapsh_OBJECTS = stapsh-stapsh.$(OBJEXT) +stapsh_OBJECTS = $(am_stapsh_OBJECTS) +stapsh_DEPENDENCIES = +stapsh_LINK = $(CCLD) $(stapsh_CFLAGS) $(CFLAGS) $(stapsh_LDFLAGS) \ $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/../../depcomp @@ -98,10 +105,22 @@ AM_V_CCLD = $(am__v_CCLD_$(V)) am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) am__v_CCLD_0 = @echo " CCLD " $@; +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_$(V)) +am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY)) +am__v_CXX_0 = @echo " CXX " $@; +CXXLD = $(CXX) +CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ + -o $@ +AM_V_CXXLD = $(am__v_CXXLD_$(V)) +am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CXXLD_0 = @echo " CXXLD " $@; AM_V_GEN = $(am__v_GEN_$(V)) am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_0 = @echo " GEN " $@; -SOURCES = $(stap_merge_SOURCES) $(stapio_SOURCES) $(staprun_SOURCES) +SOURCES = $(stap_merge_SOURCES) $(stapio_SOURCES) $(staprun_SOURCES) \ + $(stapsh_SOURCES) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -138,14 +157,20 @@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ +EGREP = @EGREP@ EXEEXT = @EXEEXT@ +GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -154,6 +179,7 @@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LOCALEDIR = @LOCALEDIR@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -168,6 +194,7 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIECFLAGS = @PIECFLAGS@ +PIECXXFLAGS = @PIECXXFLAGS@ PIELDFLAGS = @PIELDFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ @@ -181,6 +208,7 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -215,22 +243,26 @@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ +staprun_LIBS = @staprun_LIBS@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ +AM_CFLAGS = -Wall -Werror -Wunused -W -Wformat=2 \ + -Wno-format-nonliteral @PIECFLAGS@ +AM_CXXFLAGS = -Wall -Werror -Wunused -W -Wformat=2 \ + -Wno-format-nonliteral @PIECXXFLAGS@ AM_CPPFLAGS = -D_GNU_SOURCE -I$(srcdir)/../../includes \ -I$(builddir)/../../includes/sys -DBINDIR='"$(bindir)"' \ -DSYSCONFDIR='"$(sysconfdir)"' -DPKGDATADIR='"${pkgdatadir}"' \ - -DPKGLIBDIR='"$(pkglibexecdir)"' -AM_CFLAGS = -Wall -Werror -Wunused -W -Wformat=2 \ - -Wno-format-nonliteral @PIECFLAGS@ + -DPKGLIBDIR='"$(pkglibexecdir)"' -DLOCALEDIR='"$(localedir)"' AM_LDFLAGS = @PIELDFLAGS@ staprun_SOURCES = staprun.c staprun_funcs.c ctl.c common.c \ $(am__append_1) staprun_CFLAGS = $(AM_CFLAGS) -DSINGLE_THREADED $(am__append_2) -staprun_LDADD = $(am__append_3) +staprun_CXXFLAGS = $(AM_CXXFLAGS) -DSINGLE_THREADED $(am__append_3) +staprun_LDADD = $(staprun_LIBS) $(am__append_4) stapio_SOURCES = stapio.c mainloop.c common.c ctl.c relay.c relay_old.c stapio_LDADD = -lpthread man_MANS = staprun.8 @@ -238,11 +270,15 @@ stap_merge_CFLAGS = $(AM_CFLAGS) stap_merge_LDFLAGS = $(AM_LDFLAGS) stap_merge_LDADD = +stapsh_SOURCES = stapsh.c +stapsh_CFLAGS = $(AM_CFLAGS) +stapsh_LDFLAGS = $(AM_LDFLAGS) +stapsh_LDADD = all: config.h $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: -.SUFFIXES: .c .o .obj +.SUFFIXES: .c .cxx .o .obj am--refresh: @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @@ -378,7 +414,10 @@ $(AM_V_CCLD)$(LINK) $(stapio_OBJECTS) $(stapio_LDADD) $(LIBS) staprun$(EXEEXT): $(staprun_OBJECTS) $(staprun_DEPENDENCIES) @rm -f staprun$(EXEEXT) - $(AM_V_CCLD)$(staprun_LINK) $(staprun_OBJECTS) $(staprun_LDADD) $(LIBS) + $(AM_V_CXXLD)$(staprun_LINK) $(staprun_OBJECTS) $(staprun_LDADD) $(LIBS) +stapsh$(EXEEXT): $(stapsh_OBJECTS) $(stapsh_DEPENDENCIES) + @rm -f stapsh$(EXEEXT) + $(AM_V_CCLD)$(stapsh_LINK) $(stapsh_OBJECTS) $(stapsh_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -399,6 +438,8 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/staprun-nsscommon.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/staprun-staprun.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/staprun-staprun_funcs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/staprun-util.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stapsh-stapsh.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -512,21 +553,69 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(staprun_CFLAGS) $(CFLAGS) -c -o staprun-modverify.obj `if test -f 'modverify.c'; then $(CYGPATH_W) 'modverify.c'; else $(CYGPATH_W) '$(srcdir)/modverify.c'; fi` -staprun-nsscommon.o: ../../nsscommon.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(staprun_CFLAGS) $(CFLAGS) -MT staprun-nsscommon.o -MD -MP -MF $(DEPDIR)/staprun-nsscommon.Tpo -c -o staprun-nsscommon.o `test -f '../../nsscommon.c' || echo '$(srcdir)/'`../../nsscommon.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/staprun-nsscommon.Tpo $(DEPDIR)/staprun-nsscommon.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../../nsscommon.c' object='staprun-nsscommon.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(staprun_CFLAGS) $(CFLAGS) -c -o staprun-nsscommon.o `test -f '../../nsscommon.c' || echo '$(srcdir)/'`../../nsscommon.c - -staprun-nsscommon.obj: ../../nsscommon.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(staprun_CFLAGS) $(CFLAGS) -MT staprun-nsscommon.obj -MD -MP -MF $(DEPDIR)/staprun-nsscommon.Tpo -c -o staprun-nsscommon.obj `if test -f '../../nsscommon.c'; then $(CYGPATH_W) '../../nsscommon.c'; else $(CYGPATH_W) '$(srcdir)/../../nsscommon.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/staprun-nsscommon.Tpo $(DEPDIR)/staprun-nsscommon.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../../nsscommon.c' object='staprun-nsscommon.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(staprun_CFLAGS) $(CFLAGS) -c -o staprun-nsscommon.obj `if test -f '../../nsscommon.c'; then $(CYGPATH_W) '../../nsscommon.c'; else $(CYGPATH_W) '$(srcdir)/../../nsscommon.c'; fi` +stapsh-stapsh.o: stapsh.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stapsh_CFLAGS) $(CFLAGS) -MT stapsh-stapsh.o -MD -MP -MF $(DEPDIR)/stapsh-stapsh.Tpo -c -o stapsh-stapsh.o `test -f 'stapsh.c' || echo '$(srcdir)/'`stapsh.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stapsh-stapsh.Tpo $(DEPDIR)/stapsh-stapsh.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='stapsh.c' object='stapsh-stapsh.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stapsh_CFLAGS) $(CFLAGS) -c -o stapsh-stapsh.o `test -f 'stapsh.c' || echo '$(srcdir)/'`stapsh.c + +stapsh-stapsh.obj: stapsh.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stapsh_CFLAGS) $(CFLAGS) -MT stapsh-stapsh.obj -MD -MP -MF $(DEPDIR)/stapsh-stapsh.Tpo -c -o stapsh-stapsh.obj `if test -f 'stapsh.c'; then $(CYGPATH_W) 'stapsh.c'; else $(CYGPATH_W) '$(srcdir)/stapsh.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stapsh-stapsh.Tpo $(DEPDIR)/stapsh-stapsh.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='stapsh.c' object='stapsh-stapsh.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stapsh_CFLAGS) $(CFLAGS) -c -o stapsh-stapsh.obj `if test -f 'stapsh.c'; then $(CYGPATH_W) 'stapsh.c'; else $(CYGPATH_W) '$(srcdir)/stapsh.c'; fi` + +.cxx.o: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cxx.obj: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +staprun-nsscommon.o: ../../nsscommon.cxx +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(staprun_CXXFLAGS) $(CXXFLAGS) -MT staprun-nsscommon.o -MD -MP -MF $(DEPDIR)/staprun-nsscommon.Tpo -c -o staprun-nsscommon.o `test -f '../../nsscommon.cxx' || echo '$(srcdir)/'`../../nsscommon.cxx +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/staprun-nsscommon.Tpo $(DEPDIR)/staprun-nsscommon.Po +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../../nsscommon.cxx' object='staprun-nsscommon.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(staprun_CXXFLAGS) $(CXXFLAGS) -c -o staprun-nsscommon.o `test -f '../../nsscommon.cxx' || echo '$(srcdir)/'`../../nsscommon.cxx + +staprun-nsscommon.obj: ../../nsscommon.cxx +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(staprun_CXXFLAGS) $(CXXFLAGS) -MT staprun-nsscommon.obj -MD -MP -MF $(DEPDIR)/staprun-nsscommon.Tpo -c -o staprun-nsscommon.obj `if test -f '../../nsscommon.cxx'; then $(CYGPATH_W) '../../nsscommon.cxx'; else $(CYGPATH_W) '$(srcdir)/../../nsscommon.cxx'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/staprun-nsscommon.Tpo $(DEPDIR)/staprun-nsscommon.Po +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../../nsscommon.cxx' object='staprun-nsscommon.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(staprun_CXXFLAGS) $(CXXFLAGS) -c -o staprun-nsscommon.obj `if test -f '../../nsscommon.cxx'; then $(CYGPATH_W) '../../nsscommon.cxx'; else $(CYGPATH_W) '$(srcdir)/../../nsscommon.cxx'; fi` + +staprun-util.o: ../../util.cxx +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(staprun_CXXFLAGS) $(CXXFLAGS) -MT staprun-util.o -MD -MP -MF $(DEPDIR)/staprun-util.Tpo -c -o staprun-util.o `test -f '../../util.cxx' || echo '$(srcdir)/'`../../util.cxx +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/staprun-util.Tpo $(DEPDIR)/staprun-util.Po +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../../util.cxx' object='staprun-util.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(staprun_CXXFLAGS) $(CXXFLAGS) -c -o staprun-util.o `test -f '../../util.cxx' || echo '$(srcdir)/'`../../util.cxx + +staprun-util.obj: ../../util.cxx +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(staprun_CXXFLAGS) $(CXXFLAGS) -MT staprun-util.obj -MD -MP -MF $(DEPDIR)/staprun-util.Tpo -c -o staprun-util.obj `if test -f '../../util.cxx'; then $(CYGPATH_W) '../../util.cxx'; else $(CYGPATH_W) '$(srcdir)/../../util.cxx'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/staprun-util.Tpo $(DEPDIR)/staprun-util.Po +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../../util.cxx' object='staprun-util.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(staprun_CXXFLAGS) $(CXXFLAGS) -c -o staprun-util.obj `if test -f '../../util.cxx'; then $(CYGPATH_W) '../../util.cxx'; else $(CYGPATH_W) '$(srcdir)/../../util.cxx'; fi` install-man8: $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)" diff -Nru systemtap-1.4/runtime/staprun/modverify.c systemtap-1.6/runtime/staprun/modverify.c --- systemtap-1.4/runtime/staprun/modverify.c 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/runtime/staprun/modverify.c 2011-07-25 18:12:01.000000000 +0000 @@ -15,8 +15,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + along with this program. If not, see . */ #include "config.h" @@ -38,6 +37,14 @@ #include "../../nsscommon.h" #include "modverify.h" +// Called by some of the functions in nsscommon.cxx. +void +nsscommon_error (const char *msg, int logit __attribute ((unused))) +{ + fprintf (stderr, "%s\n", msg); + fflush (stderr); +} + /* Function: int check_cert_db_permissions (const char *cert_db_path); * * Check that the given certificate directory and its contents have @@ -212,6 +219,7 @@ { VFYContext *vfy; SECStatus secStatus; + int rc = MODULE_OK; /* Create a verification context. */ vfy = VFY_CreateContextDirect (pubKey, signature, SEC_OID_PKCS1_RSA_ENCRYPTION, @@ -221,7 +229,8 @@ /* The key does not match the signature. This is not an error. It just means we are currently trying the wrong certificate/key. i.e. the module remains untrusted for now. */ - return MODULE_UNTRUSTED; + rc = MODULE_UNTRUSTED; + goto done; } /* Begin the verification process. */ @@ -231,7 +240,8 @@ fprintf (stderr, "Unable to initialize verification context while verifying %s using the signature in %s.\n", module_name, signatureName); nssError (); - return MODULE_CHECK_ERROR; + rc = MODULE_CHECK_ERROR; + goto done; } /* Add the data to be verified. */ @@ -241,7 +251,8 @@ fprintf (stderr, "Error while verifying %s using the signature in %s.\n", module_name, signatureName); nssError (); - return MODULE_CHECK_ERROR; + rc = MODULE_CHECK_ERROR; + goto done; } /* Complete the verification. */ @@ -250,10 +261,13 @@ fprintf (stderr, "Unable to verify the signed module %s. It may have been altered since it was created.\n", module_name); nssError (); - return MODULE_ALTERED; + rc = MODULE_ALTERED; } - return MODULE_OK; + done: + if (vfy) + VFY_DestroyContext(vfy, PR_TRUE /*freeit*/); + return rc; } int verify_module (const char *signatureName, const char* module_name, @@ -340,13 +354,10 @@ } /* Initialize NSS. */ - secStatus = NSS_Init (dbdir); + secStatus = nssInit (dbdir, 0/*readwrite*/, 1/*issueMessage*/); if (secStatus != SECSuccess) { - fprintf (stderr, "Unable to initialize nss library using the database in %s.\n", - dbdir); - nssError (); - nssCleanup (); + // Message already issued. return MODULE_CHECK_ERROR; } @@ -356,7 +367,7 @@ fprintf (stderr, "Unable to find certificates in the certificate database in %s.\n", dbdir); nssError (); - nssCleanup (); + nssCleanup (dbdir); return MODULE_UNTRUSTED; } @@ -373,8 +384,8 @@ fprintf (stderr, "Unable to extract public key from the certificate with nickname %s from the certificate database in %s.\n", cert->nickname, dbdir); nssError (); - nssCleanup (); - return MODULE_CHECK_ERROR; + rc = MODULE_CHECK_ERROR; + break; } /* Verify the file. */ @@ -384,8 +395,11 @@ break; /* resolved or error */ } + CERT_DestroyCertList (certList); + /* Shutdown NSS and exit NSPR gracefully. */ - nssCleanup (); + nssCleanup (dbdir); + PR_Cleanup (); return rc; } diff -Nru systemtap-1.4/runtime/staprun/relay.c systemtap-1.6/runtime/staprun/relay.c --- systemtap-1.4/runtime/staprun/relay.c 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/runtime/staprun/relay.c 2011-07-25 18:12:01.000000000 +0000 @@ -344,6 +344,7 @@ } + memset(&sa, 0, sizeof(sa)); sa.sa_handler = switchfile_handler; sa.sa_flags = 0; sigemptyset(&sa.sa_mask); diff -Nru systemtap-1.4/runtime/staprun/relay_old.c systemtap-1.6/runtime/staprun/relay_old.c --- systemtap-1.4/runtime/staprun/relay_old.c 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/runtime/staprun/relay_old.c 2011-07-25 18:12:01.000000000 +0000 @@ -405,6 +405,7 @@ char relay_filebase[PATH_MAX], proc_filebase[PATH_MAX]; struct sigaction sa; + memset(&sa, 0, sizeof(sa)); sa.sa_handler = switchfile_handler; sa.sa_flags = 0; sigemptyset(&sa.sa_mask); diff -Nru systemtap-1.4/runtime/staprun/stapio.c systemtap-1.6/runtime/staprun/stapio.c --- systemtap-1.4/runtime/staprun/stapio.c 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/runtime/staprun/stapio.c 2011-07-25 18:12:01.000000000 +0000 @@ -13,8 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * along with this program. If not, see . * * Copyright (C) 2005-2007 Red Hat, Inc. * @@ -26,6 +25,11 @@ int main(int argc, char **argv) { + + setlocale (LC_ALL, ""); + bindtextdomain (PACKAGE, LOCALEDIR); + textdomain (PACKAGE); + setup_signals(); parse_args(argc, argv); @@ -39,7 +43,7 @@ if (optind < argc) { if (attach_mod) { - err("ERROR: Cannot have module options with attach (-A).\n"); + err(_("ERROR: Cannot have module options with attach (-A).\n")); usage(argv[0]); } else { unsigned start_idx = 3; /* reserve three slots in modoptions[] */ @@ -50,7 +54,7 @@ } if (modpath == NULL || *modpath == '\0') { - err("ERROR: Need a module name or path to load.\n"); + err(_("ERROR: Need a module name or path to load.\n")); usage(argv[0]); } @@ -58,7 +62,7 @@ exit(1); if (stp_main_loop()) { - err("ERROR: Couldn't enter main loop. Exiting.\n"); + err(_("ERROR: Couldn't enter main loop. Exiting.\n")); exit(1); } diff -Nru systemtap-1.4/runtime/staprun/stap_merge.c systemtap-1.6/runtime/staprun/stap_merge.c --- systemtap-1.4/runtime/staprun/stap_merge.c 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/runtime/staprun/stap_merge.c 2011-07-25 18:12:01.000000000 +0000 @@ -12,8 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * along with this program. If not, see . * * Copyright (C) Red Hat Inc, 2005-2007 * @@ -39,7 +38,8 @@ char *buf, *outfile_name = NULL; int c, i, j, rc, dropped=0; long count=0, min, num[NR_CPUS]; - FILE *ofp, *fp[NR_CPUS]; + FILE *ofp = NULL; + FILE *fp[NR_CPUS] = { 0 }; int ncpus, len, verbose = 0; int bufsize = 65536; diff -Nru systemtap-1.4/runtime/staprun/stap_merge.tcl systemtap-1.6/runtime/staprun/stap_merge.tcl --- systemtap-1.4/runtime/staprun/stap_merge.tcl 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/runtime/staprun/stap_merge.tcl 2011-07-25 18:12:01.000000000 +0000 @@ -13,8 +13,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see . # # Copyright (C) Red Hat Inc, 2007 # diff -Nru systemtap-1.4/runtime/staprun/staprun.8 systemtap-1.6/runtime/staprun/staprun.8 --- systemtap-1.4/runtime/staprun/staprun.8 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/runtime/staprun/staprun.8 2011-07-25 18:12:01.000000000 +0000 @@ -30,9 +30,9 @@ transfer the resulting kernel module to a production machine that doesn't have any development tools or kernel debugging information installed. .PP -Please refere to stappaths (7) for the version number, or run -rpm -q systemtap (fedora/red hat) -apt-get -v systemtap (ubuntu) +Please refer to stappaths (7) for the version number, or run +rpm \-q systemtap (fedora/red hat) +apt\-get \-v systemtap (ubuntu) .SH OPTIONS The @@ -87,6 +87,9 @@ .BI \-D Run staprun in background as a daemon and show it's pid. .TP +.B \-R +Rename the module to a unique name before inserting it. +.TP .BI \-S " size[,N]" Sets the maximum size of output file and the maximum number of output files. If the size of output file will exceed @@ -222,9 +225,9 @@ must be owned by root and not be world writable. .IP \(bu 4 The module has been signed by a trusted signer. Trusted signers are normally -systemtap compile servers which sign modules when the --unprivileged option is +systemtap compile servers which sign modules when the \-\-unprivileged option is specified by the client. See the -.IR stap-server (8) +.IR stap\-server (8) manual page for a for more information. .SH FILES .TP @@ -239,12 +242,12 @@ .IR stap (1), .IR stapprobes (3stap), .IR stapfuncs (3stap), -.IR stap-server (8), +.IR stap\-server (8), .IR stapex (3stap) .SH BUGS Use the Bugzilla link of the project web page or our mailing list. .nh -.BR http://sources.redhat.com/systemtap/ ", " . +.BR http://sourceware.org/systemtap/ ", " . .hy diff -Nru systemtap-1.4/runtime/staprun/staprun.c systemtap-1.6/runtime/staprun/staprun.c --- systemtap-1.4/runtime/staprun/staprun.c 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/runtime/staprun/staprun.c 2011-07-25 18:12:01.000000000 +0000 @@ -15,8 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * along with this program. If not, see . * */ @@ -227,14 +226,12 @@ if (need_uprobes && enable_uprobes() != 0) return -1; if (insert_stap_module() < 0) { - /* staprun or stapio might have crashed or been SIGKILL'd, - without first removing the kernel module. This would block - a subsequent rerun attempt. So here we gingerly try to - unload it first. */ - int ret = remove_module (modname, 0); - err("Retrying, after attempted removal of module %s (rc %d)\n", modname, ret); - /* Then we try an insert a second time. */ - if (insert_stap_module() < 0) +#ifdef HAVE_ELF_GETSHDRSTRNDX + if(!rename_mod && errno == EEXIST) + err("Rerun with staprun option '-R' to rename this module.\n"); +#endif + /* Without a working rename_module(), we shan't + advise people to use -R. */ return -1; } if (send_relocations() < 0) @@ -278,6 +275,7 @@ if (buffer_size) dbug(2, "Using a buffer of %u MB.\n", buffer_size); + int mod_optind = optind; if (optind < argc) { parse_modpath(argv[optind++]); dbug(2, "modpath=\"%s\", modname=\"%s\"\n", modpath, modname); @@ -310,14 +308,23 @@ exit(1); argv[0] = getenv ("SYSTEMTAP_STAPIO") ?: PKGLIBDIR "/stapio"; + + /* Copy nenamed modname into argv */ + if(rename_mod) + argv[mod_optind] = modname; + + /* Run stapio */ if (run_as (1, getuid(), getgid(), argv[0], argv) < 0) { perror(argv[0]); goto err; } + + free(modname); return 0; err: remove_module(modname, 1); + free(modname); return 1; } @@ -414,8 +421,9 @@ void send_relocation_modules () { - unsigned i; + unsigned i = 0; glob_t globbuf; + globbuf.gl_pathc = 0; int r = glob("/sys/module/*/sections/*", GLOB_PERIOD, NULL, &globbuf); if (r == GLOB_NOSPACE || r == GLOB_ABORTED) @@ -472,7 +480,7 @@ fclose (secfile); else { - set_clexec (fileno (secfile)); + (void)set_clexec (fileno (secfile)); /* NB: don't fclose this arbitrarily-chosen section file. This forces the kernel to keep a nonzero reference count on the subject module, until staprun exits, by which time diff -Nru systemtap-1.4/runtime/staprun/staprun_funcs.c systemtap-1.6/runtime/staprun/staprun_funcs.c --- systemtap-1.4/runtime/staprun/staprun_funcs.c 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/runtime/staprun/staprun_funcs.c 2011-07-25 18:12:01.000000000 +0000 @@ -7,7 +7,7 @@ * Public License (GPL); either version 2, or (at your option) any * later version. * - * Copyright (C) 2007-2009 Red Hat Inc. + * Copyright (C) 2007-2011 Red Hat Inc. */ #include "config.h" @@ -19,6 +19,15 @@ #include #include +/* The module-renaming facility only works with new enough + elfutils: 0.142+. */ +#ifdef HAVE_LIBELF_H +#include +#include +#endif + +#include + #include "modverify.h" typedef int (*check_module_path_func)(const char *module_path, int module_fd); @@ -49,15 +58,21 @@ assert_permissions_func assert_permissions ) { int i; - long ret; + long ret, module_read; void *module_file; char *opts; int saved_errno; char module_realpath[PATH_MAX]; int module_fd; struct stat sbuf; + int rename_this_module; - dbug(2, "inserting module\n"); + dbug(2, "inserting module %s\n", path); + + /* Rename the script module if '-R' was passed, but not other modules + * like uprobes. We can tell which this is by comparing to the global + * modpath, but we must do it before it's transformed by realpath. */ + rename_this_module = rename_mod && (strcmp(path, modpath) == 0); if (special_options) opts = strdup(special_options); @@ -83,6 +98,7 @@ /* Use realpath() to canonicalize the module path. */ if (realpath(path, module_realpath) == NULL) { perr("Unable to canonicalize path \"%s\"", path); + free(opts); return -1; } @@ -96,6 +112,7 @@ module_fd = open(module_realpath, O_RDONLY); if (module_fd < 0) { perr("Error opening '%s'", module_realpath); + free(opts); return -1; } @@ -103,24 +120,60 @@ if (fstat(module_fd, &sbuf) < 0) { _perr("Error stat'ing '%s'", module_realpath); close(module_fd); + free(opts); return -1; } - /* mmap in the entire module. Work with the memory mapped data from this - point on to avoid a TOCTOU race between path and signature checking - below and module loading. */ - module_file = mmap(NULL, sbuf.st_size, PROT_READ, MAP_PRIVATE, module_fd, 0); - if (module_file == MAP_FAILED) { - _perr("Error mapping '%s'", module_realpath); + /* Allocate memory for the entire module. */ + module_file = calloc(1, sbuf.st_size); + if (module_file == NULL) { + _perr("Error allocating memory to read '%s'", module_realpath); close(module_fd); free(opts); return -1; } + /* Read in the entire module. Work with this copy of the data from this + point on to avoid a TOCTOU race between path and signature checking + below and module loading. */ + module_read = 0; + while (module_read < sbuf.st_size) { + ret = read(module_fd, module_file + module_read, + sbuf.st_size - module_read); + if (ret > 0) + module_read += ret; + else if (ret == 0) { + _err("Unexpected EOF reading '%s'", module_realpath); + free(module_file); + close(module_fd); + free(opts); + return -1; + } else if (errno != EINTR) { + _perr("Error reading '%s'", module_realpath); + free(module_file); + close(module_fd); + free(opts); + return -1; + } + } + /* Check whether this module can be loaded by the current user. * check_permissions will exit(-1) if permissions are insufficient*/ assert_permissions (module_realpath, module_fd, module_file, sbuf.st_size); + /* Rename Module if '-R' was passed */ + if (rename_this_module) { + dbug(2,"Renaming module '%s'\n", modname); + if(rename_module(module_file, sbuf.st_size) < 0) { + + _err("Error renaming module"); + close(module_fd); + free(opts); + return -1; + } + dbug(2,"Renamed module to '%s'\n", modname); + } + PROBE1(staprun, insert__module, (char*)module_realpath); /* Actually insert the module */ ret = init_module(module_file, sbuf.st_size, opts); @@ -128,16 +181,120 @@ /* Cleanup. */ free(opts); - munmap(module_file, sbuf.st_size); + free(module_file); close(module_fd); if (ret != 0) { err("Error inserting module '%s': %s\n", module_realpath, moderror(saved_errno)); + errno = saved_errno; return -1; } return 0; } +int +rename_module(void* module_file, const __off_t st_size) +{ +#ifdef HAVE_ELF_GETSHDRSTRNDX + int found = 0; + int length_to_replace; + char *name; + char newname[MODULE_NAME_LEN]; + char *p; + size_t shstrndx; + pid_t pid; + Elf* elf; + Elf_Scn *scn = 0; + Elf_Data *data = 0; + GElf_Shdr shdr_mem; + + /* Create descriptor for memory region. */ + if((elf = elf_memory (module_file, st_size))== NULL) { + _err("Error creating Elf object.\n"); + return -1; + } + + /* Get the string section index */ + if(elf_getshdrstrndx (elf, &shstrndx) < 0) { + _err("Error getting section index.\n"); + return -1; + } + + /* Go through the sections looking for ".gnu.linkonce.this_module" */ + while ((scn = elf_nextscn (elf, scn))) { + if((gelf_getshdr (scn, &shdr_mem))==NULL) { + _err("Error getting section header.\n"); + return -1; + } + name = elf_strptr (elf, shstrndx, shdr_mem.sh_name); + if (name == NULL) { + _err("Error getting section name.\n"); + return -1; + } + if(strcmp(name, ".gnu.linkonce.this_module") == 0) { + found = 1; + break; + } + } + if(!found) { + _err("Section name \".gnu.linkonce.this_module\" not found in module.\n"); + return -1; + } + + /* Get access to raw data from section; do not translate/copy. */ + if ((data = elf_rawdata (scn, data)) == NULL) { + _err("Error getting Elf data from section.\n"); + return -1; + } + + /* Generate new module name with the same length as the old name. + The new name is of the form: stap__*/ + pid = getpid(); + if (strlen(modname) >= MODULE_NAME_LEN) { + _err("Old module name is too long.\n"); + return -1; + } + length_to_replace = (int)strlen(modname)-((int)log10(pid)+1) - 1; + if(length_to_replace < 0 || length_to_replace > (int)strlen(modname)) { + _err("Error getting length of oldname to replace in newname.\n"); + return -1; + } + if (snprintf(newname, sizeof(newname), "%.*s_%d", length_to_replace, modname, pid) < 0) { + _err("Creating newname failed./n"); + return -1; + } + + /* Find where it is in the module structure. + To our knowledge, this section is always completely zeroed apart + from the module name, so a simple search and replace should suffice. + A signed module from any stapusr will already have been proven + untampered. An unsigned module from a stapdev could try to do + naughty things, but we're already trusting these users so much + that they can shoot their feet however they like. + */ + for (p = data->d_buf; p < (char *)data->d_buf + data->d_size - strlen(modname); p++) { + if (memcmp(p, modname, strlen(modname)) == 0) { + strncpy(p, newname, strlen(p)); /* Actually replace the oldname in memory with the newname */ + modname = strdup(newname); /* This is just to update the global variable containing the current module name */ + if (modname == NULL) { + _perr("allocating memory failed"); + return -1; + } + return 0; + } + } + _err("Could not find old name to replace!\n"); + return -1; +#else + /* Old or no elfutils? Pretend to have renamed. This means a + greater likelihood for module-name collisions, but so be + it. */ + (void) module_file; + (void) st_size; + return 0; +#endif +} + int mountfs(void) { struct stat sb; @@ -384,8 +541,10 @@ } /* - * Members of the 'stapusr' group can load the uprobes module freely, - * since it is loaded from a fixed path in the installed runtime. + * Don't allow path-based authorization for the uprobes module at all. + * Members of the 'stapusr' group can load a signed uprobes module, but + * nothing else. Later we could consider allowing specific paths, like + * the installed runtime or /lib/modules/... * * Returns: -1 on errors, 0 on failure, 1 on success. */ @@ -395,7 +554,7 @@ int module_fd __attribute__ ((unused)) ) { - return 1; + return 0; } /* @@ -478,7 +637,6 @@ gid = stapusr_gid; } if (gid != stapusr_gid) { - unprivileged_user = 1; return 0; } } @@ -554,10 +712,10 @@ return; /* Are we are an ordinary user?. */ - if (check_groups_rc == 0) { + if (check_groups_rc == 0 || check_groups_rc == -2) { err("ERROR: You are trying to run systemtap as a normal user.\n" - "You should either be root, or be part of either " - "group \"stapdev\" or group \"stapusr\".\n"); + "You should either be root, or be part of " + "group \"stapusr\" and possibly group \"stapdev\".\n"); if (check_groups_rc == -2) err("Your system doesn't seem to have either group.\n"); } @@ -593,10 +751,8 @@ if (check_signature_rc == MODULE_ALTERED) exit(-1); #else - /* If we don't have NSS, then the uprobes module is considered trusted. - Otherwise a member of the group 'stapusr' will not be able to load it. - */ - check_signature_rc = MODULE_OK; + /* If we don't have NSS, the uprobes module is considered untrusted. */ + check_signature_rc = MODULE_UNTRUSTED; #endif /* root can still load this module. */ @@ -609,10 +765,10 @@ return; /* Check permissions for group membership. */ - if (check_groups_rc == 0) { + if (check_groups_rc == 0 || check_groups_rc == -2) { err("ERROR: You are trying to load the module %s as a normal user.\n" - "You should either be root, or be part of either " - "group \"stapdev\" or group \"stapusr\".\n", module_path); + "You should either be root, or be part of " + "group \"stapusr\" and possible group \"stapusr\".\n", module_path); if (check_groups_rc == -2) err("Your system doesn't seem to have either group.\n"); } diff -Nru systemtap-1.4/runtime/staprun/staprun.h systemtap-1.6/runtime/staprun/staprun.h --- systemtap-1.4/runtime/staprun/staprun.h 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/runtime/staprun/staprun.h 2011-07-25 18:12:01.000000000 +0000 @@ -33,10 +33,26 @@ #include #include #include +#include +#include /* Include config.h to pick up dependency for --prefix usage. */ #include "config.h" +/* define gettext options if NLS is set */ +#if ENABLE_NLS +#define _(string) gettext(string) +#define _N(string, string_plural, count) \ + ngettext((string), (string_plural), (count)) +#else +#define _(string) (string) +#define _N(string, string_plural, count) \ + ( (count) == 1 ? (string) : (string_plural) ) +#endif +#define _F(format, ...) autosprintf(_(format), __VA_ARGS__) +#define _NF(format, format_plural, count, ...) \ + autosprintf(_N((format), (format_plural), (count)), __VA_ARGS__) + /* For probes in staprun.c, staprun_funcs.c, mainloop.c and common.c */ #include "stap-probe.h" @@ -155,6 +171,8 @@ int insert_module(const char *path, const char *special_options, char **options, assert_permissions_func apf); +int rename_module(void* module_file, const __off_t st_size); + int mountfs(void); void start_symbol_thread(void); void stop_symbol_thread(void); @@ -186,6 +204,7 @@ extern int target_pid; extern char *target_cmd; extern char *outfile_name; +extern int rename_mod; extern int attach_mod; extern int delete_mod; extern int load_only; @@ -194,7 +213,6 @@ extern int daemon_mode; extern off_t fsize_max; extern int fnum_max; -extern int unprivileged_user; /* getopt variables */ extern char *optarg; diff -Nru systemtap-1.4/runtime/staprun/stapsh.c systemtap-1.6/runtime/staprun/stapsh.c --- systemtap-1.4/runtime/staprun/stapsh.c 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/runtime/staprun/stapsh.c 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,418 @@ +// stapsh - systemtap remote shell +// Copyright (C) 2011 Red Hat Inc. +// +// This file is part of systemtap, and is free software. You can +// redistribute it and/or modify it under the terms of the GNU General +// Public License (GPL); either version 2, or (at your option) any +// later version. +// + +// stapsh implements a minimal protocol for a remote stap client to transfer a +// systemtap module to a temporary location and invoke staprun on it. It is +// not meant to be invoked directly by the user. Commands are simply +// whitespace-delimited strings, terminated by newlines. +// +// command: stap VERSION +// reply: stapsh VERSION MACHINE RELEASE +// desc: This is the initial handshake. The VERSION exchange is intended +// to facilitate compatibility checks, in case the protocol needs to +// change. MACHINE and RELEASE are reported as given by uname. +// +// command: file SIZE NAME +// DATA +// reply: OK / error message +// desc: Create a file of SIZE bytes, called NAME. The NAME is a basename +// only, and limited to roughly "[a-z0-9][a-z0-9._]*". The DATA is +// read as raw bytes following the command's newline. +// +// command: run ARG1 ARG2 ... +// reply: OK / error message +// desc: Start staprun with the given quoted-printable arguments. When +// the child exits, stapsh will clean up and then exit with the same +// return code. Note that whitespace has significance in stapsh +// command parsing, all tabs, spaces, and newlines must be escaped +// in the arguments. Any embedded NIL (=00) will truncate the +// argument in the actual command invocation. +// +// command: quit +// reply: (none) +// desc: Signal the child process to quit, then cleanup and exit. +// +// If stapsh reaches EOF on its standard input, it will send SIGHUP to the +// child process, wait for completion, then cleanup and exit normally. + + +#include "config.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + + +#define STAPSH_TOK_DELIM " \t\r\n" +#define STAPSH_MAX_FILE_SIZE 32000000 // XXX should be cumulative? +#define STAPSH_MAX_ARGS 256 + + +struct stapsh_handler { + const char* name; + int (*fn)(void); +}; + + +static int do_hello(void); +static int do_file(void); +static int do_run(void); +static int do_quit(void); + +static const int signals[] = { + SIGHUP, SIGPIPE, SIGINT, SIGTERM, SIGCHLD +}; + +static const struct stapsh_handler commands[] = { + { "stap", do_hello }, + { "file", do_file }, + { "run", do_run }, + { "quit", do_quit }, +}; +static const unsigned ncommands = sizeof(commands) / sizeof(*commands); + +static char tmpdir[FILENAME_MAX] = ""; + +static pid_t staprun_pid = -1; + +static unsigned verbose = 0; + +#define dbug(level, format, args...) ( (verbose < level) ? 0 : \ + fprintf (stderr, "stapsh:%s:%d " format, __FUNCTION__, __LINE__, ## args) ) + +#define vdbug(level, format, args) ( (verbose < level) ? 0 : \ + fprintf (stderr, "stapsh:%s:%d ", __FUNCTION__, __LINE__) + \ + vfprintf (stderr, format, args) ) + +#define die(format, args...) ({ dbug(1, format, ## args); cleanup(2); }) + + +static void __attribute__ ((noreturn)) +cleanup(int status) +{ + // Mask signals, so if called from non-signal context, we + // won't get a reentry (especially for SIGCHLD). + unsigned i; + sigset_t mask; + sigemptyset (&mask); + for (i = 0; i < sizeof(signals) / sizeof(*signals); ++i) + sigaddset (&mask, signals[i]); + sigprocmask(SIG_BLOCK, &mask, 0); + + if (staprun_pid > 0) + { + int rc, ret; + kill(staprun_pid, SIGHUP); + ret = waitpid(staprun_pid, &rc, 0); + if (status == 0) + { + if (ret == staprun_pid) + status = WIFEXITED(rc) ? WEXITSTATUS(rc) : 128 + WTERMSIG(rc); + else + status = 2; + } + } + + if (tmpdir[0]) + { + pid_t pid = 0; + const char* argv[] = {"rm", "-rf", "--", tmpdir, NULL}; + if (chdir("/")) {} // ignore failure, rm will probably work anyway + if (!posix_spawnp(&pid, argv[0], NULL, NULL, + (char* const*)argv, environ)) + waitpid(pid, NULL, 0); + } + + exit(status); +} + +static void +handle_signal(int sig) +{ + dbug(1, "received signal %d: %s\n", sig, strsignal(sig)); + cleanup(0); +} + +static void +setup_signals (void) +{ + unsigned i; + struct sigaction sa; + memset(&sa, 0, sizeof(sa)); + sa.sa_handler = handle_signal; + sigemptyset (&sa.sa_mask); + for (i = 0; i < sizeof(signals) / sizeof(*signals); ++i) + sigaddset (&sa.sa_mask, signals[i]); + for (i = 0; i < sizeof(signals) / sizeof(*signals); ++i) + sigaction (signals[i], &sa, NULL); +} + +static void __attribute__ ((noreturn)) +usage (char *prog, int status) +{ + fprintf (stderr, "%s [-v]\n", prog); + exit (status); +} + +static void +parse_args(int argc, char* const argv[]) +{ + int c; + while ((c = getopt (argc, argv, "v")) != -1) + switch (c) + { + case 'v': + ++verbose; + break; + case '?': + default: + usage (argv[0], 2); + } + if (optind < argc) + { + fprintf (stderr, "%s: invalid extraneous arguments\n", argv[0]); + usage (argv[0], 2); + } +} + + +// Decode a quoted-printable string in-place +static int +qpdecode(char* s) +{ + char* o = s; + while (*s) + if (*s != '=') + *o++ = *s++; + else + { + if (s[1] == '\r' || s[1] == '\n') + s += 2; + else if (s[1] == '\r' && s[2] == '\n') + s += 3; + else if (!s[1] || !s[2]) + { + dbug(2, "truncated quoted-printable escape \"%s\"\n", s); + return 1; + } + else + { + errno = 0; + char *end = 0, hex[] = { s[1], s[2], 0 }; + unsigned char c = strtol(hex, &end, 16); + if (errno || end != hex + 2) + { + dbug(2, "invalid quoted-printable escape \"=%s\"\n", hex); + return 1; + } + *o++ = c; + s += 3; + } + } + *o = '\0'; + return 0; +} + + +// Send a reply back to the client on stdout +static int __attribute__ ((format (printf, 1, 2))) +reply(const char* format, ...) +{ + va_list args, dbug_args; + va_start (args, format); + va_copy (dbug_args, args); + vdbug (1, format, dbug_args); + int ret = vprintf (format, args); + fflush (stdout); + va_end (dbug_args); + va_end (args); + return ret; +} + + +static int +do_hello() +{ + if (staprun_pid > 0) + return 1; + + // XXX check caller's version compatibility + + struct utsname uts; + if (uname(&uts)) + return 1; + + reply ("stapsh %s %s %s\n", VERSION, uts.machine, uts.release); + return 0; +} + +static int +do_file() +{ + if (staprun_pid > 0) + return 1; + + int ret = 0; + int size = -1; + const char* arg = strtok(NULL, STAPSH_TOK_DELIM); + if (arg) + size = atoi(arg); + if (size <= 0 || size > STAPSH_MAX_FILE_SIZE) + return reply ("ERROR: bad file size %d\n", size); + + const char* name = strtok(NULL, STAPSH_TOK_DELIM); + if (!name) + return reply ("ERROR: missing file name\n"); + for (arg = name; *arg; ++arg) + if (!isalnum(*arg) && + !(arg > name && (*arg == '.' || *arg == '_'))) + return reply ("ERROR: bad character '%c' in file name\n", *arg); + + FILE* f = fopen(name, "w"); + if (!f) + return reply ("ERROR: can't open file \"%s\" for writing\n", name); + while (size > 0 && ret == 0) + { + char buf[1024]; + size_t r = sizeof(buf); + if ((size_t)size < sizeof(buf)) + r = size; + r = fread(buf, 1, r, stdin); + if (!r && feof(stdin)) + ret = reply ("ERROR: reached EOF while reading file data\n"); + else if (!r) + ret = reply ("ERROR: unable to read file data\n"); + else + { + size -= r; + + const char* bufp = buf; + while (bufp < buf + r && ret == 0) + { + size_t w = (buf + r) - bufp; + w = fwrite(bufp, 1, w, f); + if (!w) + ret = reply ("ERROR: unable to write file data\n"); + else + bufp += w; + } + } + } + fclose(f); + + if (ret == 0) + reply ("OK\n"); + return ret; +} + +static int +do_run() +{ + if (staprun_pid > 0) + return 1; + + char staprun[] = BINDIR "/staprun"; + char* args[STAPSH_MAX_ARGS + 1] = { staprun, 0 }; + unsigned nargs = 1; + + char* arg; + while ((arg = strtok(NULL, STAPSH_TOK_DELIM))) + { + if (nargs + 1 > STAPSH_MAX_ARGS) + return reply ("ERROR: too many arguments\n"); + if (qpdecode(arg) != 0) + return reply ("ERROR: invalid encoding in argument \"%s\"\n", arg); + args[nargs++] = arg; + } + + // Explicitly check execute permissions here, because posix_spawn will only + // report that failure through a process exit code. + if (access(staprun, X_OK) != 0) + return reply ("ERROR: can't execute %s (%s)\n", staprun, strerror(errno)); + + int ret = 0; + posix_spawn_file_actions_t fa; + if (posix_spawn_file_actions_init(&fa) != 0) + return reply ("ERROR: can't initialize posix_spawn actions\n"); + + // no stdin for staprun + if (posix_spawn_file_actions_addopen(&fa, 0, "/dev/null", O_RDONLY, 0) != 0) + ret = reply ("ERROR: can't set posix_spawn actions\n"); + else + { + pid_t pid; + ret = posix_spawn(&pid, args[0], &fa, NULL, args, environ); + if (ret == 0) + staprun_pid = pid; + else + reply("ERROR: can't launch staprun\n"); + } + + posix_spawn_file_actions_destroy(&fa); + + if (ret == 0) + reply ("OK\n"); + return ret; +} + +static int +do_quit() +{ + cleanup(0); +} + +int +main(int argc, char* const argv[]) +{ + parse_args(argc, argv); + + setup_signals(); + + umask(0077); + snprintf(tmpdir, sizeof(tmpdir), "%s/stapsh.XXXXXX", + getenv("TMPDIR") ?: "/tmp"); + if (!mkdtemp(tmpdir)) + die ("Can't make a temporary working directory!\n"); + if (chdir(tmpdir)) + die ("Can't change to temporary working directory \"%s\"!\n", tmpdir); + + char command[4096]; + while (fgets(command, sizeof(command), stdin)) + { + dbug(1, "command: %s", command); + int rc = -1; + unsigned i; + const char* arg = strtok(command, STAPSH_TOK_DELIM) ?: "(null)"; + for (i = 0; i < ncommands; ++i) + if (strcmp(arg, commands[i].name) == 0) + { + rc = commands[i].fn(); + if (rc) + dbug(2, "failed command %s, rc=%d\n", arg, rc); + break; + } + if (i >= ncommands) + dbug(2, "invalid command %s\n", arg); + } + + cleanup(0); +} + +/* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ diff -Nru systemtap-1.4/runtime/sym.c systemtap-1.6/runtime/sym.c --- systemtap-1.4/runtime/sym.c 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/runtime/sym.c 2011-07-25 18:12:01.000000000 +0000 @@ -1,6 +1,6 @@ /* -*- linux-c -*- * Symbolic Lookup Functions - * Copyright (C) 2005-2010 Red Hat Inc. + * Copyright (C) 2005-2011 Red Hat Inc. * Copyright (C) 2006 Intel Corporation. * * This file is part of systemtap, and is free software. You can @@ -244,25 +244,25 @@ loc2c-runtime.h were more easily usable, a deref() loop could do it too. */ mm_segment_t oldfs = get_fs(); - int rc1, rc2; + int rc; unsigned char theory, practice; #ifdef STAPCONF_PROBE_KERNEL if (!user_module) { - rc1=probe_kernel_read(&theory, (void*)&m->build_id_bits[j], 1); - rc2=probe_kernel_read(&practice, (void*)(notes_addr+j), 1); + theory = m->build_id_bits[j]; + rc=probe_kernel_read(&practice, (void*)(notes_addr+j), 1); } else #endif { - set_fs(KERNEL_DS); - rc1 = get_user(theory,((unsigned char*) &m->build_id_bits[j])); - rc2 = get_user(practice,((unsigned char*) (void*) (notes_addr+j))); + set_fs (user_module ? USER_DS : KERNEL_DS); + theory = m->build_id_bits[j]; + rc = get_user(practice,((unsigned char*) (void*) (notes_addr+j))); set_fs(oldfs); } - if (rc1 || rc2 || (theory != practice)) { + if (rc || (theory != practice)) { const char *basename; basename = strrchr(m->path, '/'); if (basename) @@ -271,15 +271,15 @@ basename = m->path; #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27) - _stp_error ("Build-id mismatch: \"%s\" vs. \"%s\" byte %d (0x%02x vs 0x%02x) rc %d %d\n", - m->name, basename, j, theory, practice, rc1, rc2); + _stp_error ("Build-id mismatch: \"%s\" vs. \"%s\" byte %d (0x%02x vs 0x%02x) address %#lx rc %d\n", + m->name, basename, j, theory, practice, notes_addr, rc); return 1; #else /* This branch is a surrogate for kernels * affected by Fedora bug #465873. */ _stp_warn (KERN_WARNING - "Build-id mismatch: \"%s\" vs. \"%s\" byte %d (0x%02x vs 0x%02x) rc %d %d\n", - m->name, basename, j, theory, practice, rc1, rc2); + "Build-id mismatch: \"%s\" vs. \"%s\" byte %d (0x%02x vs 0x%02x) rc %d\n", + m->name, basename, j, theory, practice, rc); #endif break; } /* end mismatch */ @@ -298,36 +298,40 @@ */ static int _stp_module_check(void) { - struct _stp_module *m = NULL; - unsigned long notes_addr, base_addr; - unsigned i,j; + struct _stp_module *m = NULL; + unsigned long notes_addr, base_addr; + unsigned i,j; - for (i = 0; i < _stp_num_modules; i++) - { - m = _stp_modules[i]; - if (m->build_id_len > 0 && m->notes_sect != 0) { - dbug_sym(1, "build-id validation [%s]\n", m->name); - - /* notes end address */ - if (!strcmp(m->name, "kernel")) { - notes_addr = _stp_kmodule_relocate("kernel", - "_stext", m->build_id_offset); - base_addr = _stp_kmodule_relocate("kernel", - "_stext", 0); - } else { - notes_addr = m->notes_sect + m->build_id_offset; - base_addr = m->notes_sect; - } - - if (notes_addr <= base_addr) { /* shouldn't happen */ - _stp_warn ("build-id address %lx < base %lx\n", - notes_addr, base_addr); - continue; - } - _stp_build_id_check (m, notes_addr, 0); - } /* end checking */ - } /* end loop */ - return 0; +#ifdef STP_NO_BUILDID_CHECK + return 0; +#endif + + for (i = 0; i < _stp_num_modules; i++) + { + m = _stp_modules[i]; + if (m->build_id_len > 0 && m->notes_sect != 0) { + dbug_sym(1, "build-id validation [%s]\n", m->name); + + /* notes end address */ + if (!strcmp(m->name, "kernel")) { + notes_addr = _stp_kmodule_relocate("kernel", + "_stext", m->build_id_offset); + base_addr = _stp_kmodule_relocate("kernel", + "_stext", 0); + } else { + notes_addr = m->notes_sect + m->build_id_offset; + base_addr = m->notes_sect; + } + + if (notes_addr <= base_addr) { /* shouldn't happen */ + _stp_warn ("build-id address %lx < base %lx\n", + notes_addr, base_addr); + continue; + } + return _stp_build_id_check (m, notes_addr, 0); + } /* end checking */ + } /* end loop */ + return 0; } @@ -340,6 +344,10 @@ unsigned char practice_id_bits[MAXSTRINGLEN]; unsigned long vm_end = 0; +#ifdef STP_NO_BUILDID_CHECK + return 0; +#endif + for (i = 0; i < _stp_num_modules; i++) { m = _stp_modules[i]; @@ -358,7 +366,7 @@ notes_addr, addr); continue; } - _stp_build_id_check (m, notes_addr, 1); + return _stp_build_id_check (m, notes_addr, 1); } } diff -Nru systemtap-1.4/runtime/task_finder.c systemtap-1.6/runtime/task_finder.c --- systemtap-1.4/runtime/task_finder.c 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/runtime/task_finder.c 2011-07-25 18:12:01.000000000 +0000 @@ -105,6 +105,31 @@ #ifdef UTRACE_ORIG_VERSION static u32 +__stp_utrace_task_finder_target_exec(struct utrace_attached_engine *engine, + struct task_struct *tsk, + const struct linux_binprm *bprm, + struct pt_regs *regs); +#else +#if defined(UTRACE_API_VERSION) && (UTRACE_API_VERSION >= 20091216) +static u32 +__stp_utrace_task_finder_target_exec(u32 action, + struct utrace_attached_engine *engine, + const struct linux_binfmt *fmt, + const struct linux_binprm *bprm, + struct pt_regs *regs); +#else +static u32 +__stp_utrace_task_finder_target_exec(enum utrace_resume_action action, + struct utrace_attached_engine *engine, + struct task_struct *tsk, + const struct linux_binfmt *fmt, + const struct linux_binprm *bprm, + struct pt_regs *regs); +#endif +#endif + +#ifdef UTRACE_ORIG_VERSION +static u32 __stp_utrace_task_finder_target_death(struct utrace_attached_engine *engine, struct task_struct *tsk); #else @@ -210,6 +235,7 @@ new_tgt->munmap_events = 0; new_tgt->mprotect_events = 0; memset(&new_tgt->ops, 0, sizeof(new_tgt->ops)); + new_tgt->ops.report_exec = &__stp_utrace_task_finder_target_exec; new_tgt->ops.report_death = &__stp_utrace_task_finder_target_death; new_tgt->ops.report_quiesce = &__stp_utrace_task_finder_target_quiesce; new_tgt->ops.report_syscall_entry = \ @@ -267,8 +293,8 @@ struct mm_struct *mm; int rc = 0; - // Ignore init - if (tsk == NULL || tsk->pid <= 1) + // Ignore invalid tasks. + if (tsk == NULL || tsk->pid <= 0) return 0; #ifdef PF_KTHREAD @@ -456,7 +482,7 @@ * __STP_TASK_VM_BASE_EVENTS: base events for * stap_task_finder_target's with map callback's */ -#define __STP_TASK_BASE_EVENTS (UTRACE_EVENT(DEATH)) +#define __STP_TASK_BASE_EVENTS (UTRACE_EVENT(DEATH)|UTRACE_EVENT(EXEC)) #define __STP_TASK_VM_BASE_EVENTS (__STP_TASK_BASE_EVENTS \ | UTRACE_EVENT(SYSCALL_ENTRY)\ @@ -468,7 +494,7 @@ * quiesces, we reset the events to __STP_ATTACHED_TASK_BASE_EVENTS * events. */ -#define __STP_ATTACHED_TASK_EVENTS (__STP_TASK_BASE_EVENTS \ +#define __STP_ATTACHED_TASK_EVENTS (UTRACE_EVENT(DEATH) \ | UTRACE_EVENT(QUIESCE)) #define __STP_ATTACHED_TASK_BASE_EVENTS(tgt) \ @@ -486,8 +512,8 @@ struct mm_struct *mm; int rc = 0; - // Ignore init - if (tsk == NULL || tsk->pid <= 1) + // Ignore invalid tasks. + if (tsk == NULL || tsk->pid <= 0) return EPERM; #ifdef PF_KTHREAD @@ -506,7 +532,7 @@ engine = utrace_attach_task(tsk, UTRACE_ATTACH_CREATE, ops, data); if (IS_ERR(engine)) { int error = -PTR_ERR(engine); - if (error != ENOENT) { + if (error != ESRCH && error != ENOENT) { _stp_error("utrace_attach returned error %d on pid %d", error, (int)tsk->pid); rc = error; @@ -870,8 +896,8 @@ char *mmpath_buf; char *mmpath; - if (path_tsk == NULL || path_tsk->pid <= 1 - || match_tsk == NULL || match_tsk->pid <= 1) + if (path_tsk == NULL || path_tsk->pid <= 0 + || match_tsk == NULL || match_tsk->pid <= 0) return; /* Grab the path associated with the path_tsk. */ @@ -935,9 +961,6 @@ struct task_struct *parent = current; #endif int rc; - struct mm_struct *mm; - char *mmpath_buf; - char *mmpath; if (atomic_read(&__stp_task_finder_state) != __STP_TF_RUNNING) { debug_task_finder_detach(); @@ -1000,21 +1023,9 @@ __stp_tf_handler_start(); - // When exec'ing, we need to let callers detach from the - // parent thread (if necessary). For instance, assume - // '/bin/bash' clones and then execs '/bin/ls'. If the user - // was probing '/bin/bash', the cloned thread is still - // '/bin/bash' up until the exec. -#if ! defined(STAPCONF_REAL_PARENT) -#define real_parent parent -#endif - if (tsk != NULL && tsk->real_parent != NULL - && tsk->real_parent->pid > 1) { - // We'll hardcode this as a process end, but a thread - // *could* call exec (although they aren't supposed to). - __stp_utrace_attach_match_tsk(tsk->real_parent, tsk, 0, 1); - } -#undef real_parent + // If the original task was "interesting", + // __stp_utrace_task_finder_target_exec() will handle calling + // callbacks. // We assume that all exec's are exec'ing a new process. Note // that we don't use bprm->filename, since that path can be @@ -1048,6 +1059,64 @@ #ifdef UTRACE_ORIG_VERSION static u32 +__stp_utrace_task_finder_target_exec(struct utrace_attached_engine *engine, + struct task_struct *tsk, + const struct linux_binprm *bprm, + struct pt_regs *regs) +#else +#if defined(UTRACE_API_VERSION) && (UTRACE_API_VERSION >= 20091216) +static u32 +__stp_utrace_task_finder_target_exec(u32 action, + struct utrace_attached_engine *engine, + const struct linux_binfmt *fmt, + const struct linux_binprm *bprm, + struct pt_regs *regs) +#else +static u32 +__stp_utrace_task_finder_target_exec(enum utrace_resume_action action, + struct utrace_attached_engine *engine, + struct task_struct *tsk, + const struct linux_binfmt *fmt, + const struct linux_binprm *bprm, + struct pt_regs *regs) +#endif +#endif +{ +#if defined(UTRACE_API_VERSION) && (UTRACE_API_VERSION >= 20091216) + struct task_struct *tsk = current; +#endif + struct stap_task_finder_target *tgt = engine->data; + int rc; + + if (atomic_read(&__stp_task_finder_state) != __STP_TF_RUNNING) { + debug_task_finder_detach(); + return UTRACE_DETACH; + } + + __stp_tf_handler_start(); + + // We'll hardcode this as a process end. If a thread + // calls exec() (which it isn't supposed to), the kernel + // "promotes" it to being a process. Call the callbacks. + if (tgt != NULL && tsk != NULL) { + __stp_call_callbacks(tgt, tsk, 0, 1); + } + + // Note that we don't want to set engine_attached to 0 here - + // only when *all* threads using this engine have been + // detached. + + // Let __stp_utrace_task_finder_report_exec() call + // __stp_utrace_attach_match_tsk() to figure out if the + // exec'ed program is "interesting". + + __stp_tf_handler_end(); + debug_task_finder_detach(); + return UTRACE_DETACH; +} + +#ifdef UTRACE_ORIG_VERSION +static u32 __stp_utrace_task_finder_target_death(struct utrace_attached_engine *engine, struct task_struct *tsk) #else @@ -1332,6 +1401,9 @@ long syscall_no; unsigned long args[3] = { 0L }; int rc; + int is_mmap_or_mmap2 = 0; + int is_mprotect = 0; + int is_munmap = 0; if (atomic_read(&__stp_task_finder_state) != __STP_TF_RUNNING) { debug_task_finder_detach(); @@ -1341,38 +1413,42 @@ if (tgt == NULL) return UTRACE_RESUME; - // See if syscall is one we're interested in. + // See if syscall is one we're interested in. On x86_64, this + // is a potentially expensive operation (since we have to + // check and see if it is a 32-bit task). So, cache the + // results. // // FIXME: do we need to handle mremap()? syscall_no = syscall_get_nr(tsk, regs); - if (syscall_no != MMAP_SYSCALL_NO(tsk) - && syscall_no != MMAP2_SYSCALL_NO(tsk) - && syscall_no != MPROTECT_SYSCALL_NO(tsk) - && syscall_no != MUNMAP_SYSCALL_NO(tsk)) + is_mmap_or_mmap2 = (syscall_no == MMAP_SYSCALL_NO(tsk) + || syscall_no == MMAP2_SYSCALL_NO(tsk) ? 1 : 0); + if (!is_mmap_or_mmap2) { + is_mprotect = (syscall_no == MPROTECT_SYSCALL_NO(tsk) ? 1 : 0); + if (!is_mprotect) { + is_munmap = (syscall_no == MUNMAP_SYSCALL_NO(tsk) + ? 1 : 0); + } + } + if (!is_mmap_or_mmap2 && !is_mprotect && !is_munmap) return UTRACE_RESUME; // The syscall is one we're interested in, but do we have a // handler for it? - if (((syscall_no == MMAP_SYSCALL_NO(tsk) - || syscall_no == MMAP2_SYSCALL_NO(tsk)) && tgt->mmap_events == 0) - || (syscall_no == MPROTECT_SYSCALL_NO(tsk) - && tgt->mprotect_events == 0) - || (syscall_no == MUNMAP_SYSCALL_NO(tsk) - && tgt->munmap_events == 0)) + if ((is_mmap_or_mmap2 && tgt->mmap_events == 0) + || (is_mprotect && tgt->mprotect_events == 0) + || (is_munmap && tgt->munmap_events == 0)) return UTRACE_RESUME; + // Save the needed arguments. Note that for mmap, we really + // just need the return value, so there is no need to save + // any arguments. __stp_tf_handler_start(); - if (syscall_no == MUNMAP_SYSCALL_NO(tsk)) { - // We need 2 arguments + if (is_munmap) { + // We need 2 arguments for munmap() syscall_get_arguments(tsk, regs, 0, 2, args); } - else if (syscall_no == MMAP_SYSCALL_NO(tsk) - || syscall_no == MMAP2_SYSCALL_NO(tsk)) { - // For mmap, we really just need the return value, so - // there is no need to save arguments - } - else { // mprotect() - // We need 3 arguments + else if (is_mprotect) { + // We need 3 arguments for mprotect() syscall_get_arguments(tsk, regs, 0, 3, args); } diff -Nru systemtap-1.4/runtime/transport/control.c systemtap-1.6/runtime/transport/control.c --- systemtap-1.4/runtime/transport/control.c 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/runtime/transport/control.c 2011-07-25 18:12:01.000000000 +0000 @@ -1,7 +1,7 @@ /* -*- linux-c -*- * * control channel - * Copyright (C) 2007-2010 Red Hat Inc. + * Copyright (C) 2007-2011 Red Hat Inc. * * This file is part of systemtap, and is free software. You can * redistribute it and/or modify it under the terms of the GNU General @@ -18,8 +18,10 @@ static struct list_head _stp_ctl_ready_q; #ifdef CONFIG_PREEMPT_RT static DEFINE_RAW_SPINLOCK(_stp_ctl_ready_lock); +static DEFINE_RAW_SPINLOCK(_stp_ctl_special_msg_lock); #else static DEFINE_SPINLOCK(_stp_ctl_ready_lock); +static DEFINE_SPINLOCK(_stp_ctl_special_msg_lock); #endif static void _stp_cleanup_and_exit(int send_exit); @@ -145,6 +147,219 @@ } #endif +/* Marker to show a "special" message buffer isn't being used. + Will be put in the _stp_buffer type field. The type field Should + only be manipulated while holding the _stp_ctl_special_msg_lock. */ +#define _STP_CTL_MSG_UNUSED STP_MAX_CMD + +/* cmd messages allocated ahead of time. There can be only one. */ +static struct _stp_buffer *_stp_ctl_start_msg; +static struct _stp_buffer *_stp_ctl_exit_msg; +static struct _stp_buffer *_stp_ctl_transport_msg; +static struct _stp_buffer *_stp_ctl_request_exit_msg; + +/* generic overflow messages allocated ahread of time. */ +static struct _stp_buffer *_stp_ctl_oob_warn; +static struct _stp_buffer *_stp_ctl_oob_err; +static struct _stp_buffer *_stp_ctl_system_warn; +static struct _stp_buffer *_stp_ctl_realtime_err; + +/* Set aside buffers for all "special" message types, plus generic + warning and error messages. */ +static int _stp_ctl_alloc_special_buffers(void) +{ + size_t len; + const char *msg; + + /* There can be only one of start, exit, transport and request. */ + _stp_ctl_start_msg = _stp_mempool_alloc(_stp_pool_q); + if (_stp_ctl_start_msg == NULL) + return -1; + _stp_ctl_start_msg->type = _STP_CTL_MSG_UNUSED; + + _stp_ctl_exit_msg = _stp_mempool_alloc(_stp_pool_q); + if (_stp_ctl_exit_msg == NULL) + return -1; + _stp_ctl_exit_msg->type = _STP_CTL_MSG_UNUSED; + + _stp_ctl_transport_msg = _stp_mempool_alloc(_stp_pool_q); + if (_stp_ctl_transport_msg == NULL) + return -1; + _stp_ctl_transport_msg->type = _STP_CTL_MSG_UNUSED; + + _stp_ctl_request_exit_msg = _stp_mempool_alloc(_stp_pool_q); + if (_stp_ctl_request_exit_msg == NULL) + return -1; + _stp_ctl_request_exit_msg->type = _STP_CTL_MSG_UNUSED; + + /* oob_warn, oob_err, system and realtime are dynamically + allocated and a special static warn/err message take their + place if we run out of memory before delivery. */ + _stp_ctl_oob_warn = _stp_mempool_alloc(_stp_pool_q); + if (_stp_ctl_oob_warn == NULL) + return -1; + _stp_ctl_oob_warn->type = _STP_CTL_MSG_UNUSED; + /* Note that the following message shouldn't be translated, + * since "WARNING:" is part of the module cmd protocol. */ + msg = "WARNING: too many pending (warning) messages\n"; + len = strlen(msg) + 1; + _stp_ctl_oob_warn->len = len; + memcpy(&_stp_ctl_oob_warn->buf, msg, len); + + _stp_ctl_oob_err = _stp_mempool_alloc(_stp_pool_q); + if (_stp_ctl_oob_err == NULL) + return -1; + _stp_ctl_oob_err->type = _STP_CTL_MSG_UNUSED; + /* Note that the following message shouldn't be translated, + * since "ERROR:" is part of the module cmd protocol. */ + msg = "ERROR: too many pending (error) messages\n"; + len = strlen(msg) + 1; + _stp_ctl_oob_err->len = len; + memcpy(&_stp_ctl_oob_err->buf, msg, len); + + _stp_ctl_system_warn = _stp_mempool_alloc(_stp_pool_q); + if (_stp_ctl_system_warn == NULL) + return -1; + _stp_ctl_system_warn->type = _STP_CTL_MSG_UNUSED; + /* Note that the following message shouldn't be translated, + * since "WARNING:" is part of the module cmd protocol. */ + msg = "WARNING: too many pending (system) messages\n"; + len = strlen(msg) + 1; + _stp_ctl_system_warn->len = len; + memcpy(&_stp_ctl_system_warn->buf, msg, len); + + _stp_ctl_realtime_err = _stp_mempool_alloc(_stp_pool_q); + if (_stp_ctl_realtime_err == NULL) + return -1; + _stp_ctl_realtime_err->type = _STP_CTL_MSG_UNUSED; + /* Note that the following message shouldn't be translated, + * since "ERROR:" is part of the module cmd protocol. */ + msg = "ERROR: too many pending (realtime) messages\n"; + len = strlen(msg) + 1; + _stp_ctl_realtime_err->len = len; + memcpy(&_stp_ctl_realtime_err->buf, msg, len); + + return 0; +} + + +/* Get a buffer based on type, possibly a generic buffer, when all else + fails returns NULL and there is nothing we can do. */ +static struct _stp_buffer *_stp_ctl_get_buffer(int type, void *data, + unsigned len) +{ + unsigned long flags; + struct _stp_buffer *bptr = NULL; + + /* Is it a dynamically allocated message type? */ + if (type == STP_OOB_DATA + || type == STP_SYSTEM + || type == STP_REALTIME_DATA) + bptr = _stp_mempool_alloc(_stp_pool_q); + + if (bptr != NULL) { + bptr->type = type; + memcpy(bptr->buf, data, len); + bptr->len = len; + } else { + /* "special" type, or no more dynamic buffers. + We must be careful to lock to avoid races between + marking as used/free. There can be only one. */ + switch (type) { + case STP_START: + bptr = _stp_ctl_start_msg; + break; + case STP_EXIT: + bptr = _stp_ctl_exit_msg; + break; + case STP_TRANSPORT: + bptr = _stp_ctl_transport_msg; + break; + case STP_REQUEST_EXIT: + bptr = _stp_ctl_request_exit_msg; + break; + case STP_OOB_DATA: + /* Note that "WARNING:" should not be + * translated, since it is part of the module + * cmd protocol. */ + if (data && len >= 7 + && strncmp(data, "WARNING:", 7) == 0) + bptr = _stp_ctl_oob_warn; + /* Note that "ERROR:" should not be + * translated, since it is part of the module + * cmd protocol. */ + else if (data && len >= 5 + && strncmp(data, "ERROR:", 5) == 0) + bptr = _stp_ctl_oob_err; + else + printk(KERN_WARNING "_stp_ctl_get_buffer unexpected STP_OOB_DATA\n"); + break; + case STP_SYSTEM: + bptr = _stp_ctl_system_warn; + type = STP_OOB_DATA; /* overflow message */ + break; + case STP_REALTIME_DATA: + bptr = _stp_ctl_realtime_err; + type = STP_OOB_DATA; /* overflow message */ + break; + default: + printk(KERN_WARNING "_stp_ctl_get_buffer unknown type: %d\n", type); + bptr = NULL; + break; + } + if (bptr != NULL) { + /* OK, it is a special one, but is it free? */ + spin_lock_irqsave(&_stp_ctl_special_msg_lock, flags); + if (bptr->type == _STP_CTL_MSG_UNUSED) + bptr->type = type; + else + bptr = NULL; + spin_unlock_irqrestore(&_stp_ctl_special_msg_lock, flags); + } + + /* Got a special message buffer, with type set, fill it in, + unless it is an "overflow" message. */ + if (bptr != NULL + && bptr != _stp_ctl_oob_warn + && bptr != _stp_ctl_oob_err + && bptr != _stp_ctl_system_warn + && bptr != _stp_ctl_realtime_err) { + memcpy(bptr->buf, data, len); + bptr->len = len; + } + } + return bptr; +} + +/* Returns the given buffer to the pool when dynamically allocated. + Marks special buffers as being unused. */ +static void _stp_ctl_free_buffer(struct _stp_buffer *bptr) +{ + unsigned long flags; + + /* Special buffers need special care and locking. */ + if (bptr == _stp_ctl_start_msg + || bptr == _stp_ctl_exit_msg + || bptr == _stp_ctl_transport_msg + || bptr == _stp_ctl_request_exit_msg + || bptr == _stp_ctl_oob_warn + || bptr == _stp_ctl_oob_err + || bptr == _stp_ctl_system_warn + || bptr == _stp_ctl_realtime_err) { + spin_lock_irqsave(&_stp_ctl_special_msg_lock, flags); + bptr->type = _STP_CTL_MSG_UNUSED; + spin_unlock_irqrestore(&_stp_ctl_special_msg_lock, flags); + } else { + _stp_mempool_free(bptr); + } +} + +/* Send a message directly (only old_relay) or puts it on the + _stp_ctl_ready_q. Doesn't call wake_up on _stp_ctl_wq (use + _stp_ctl_send if you need that behavior). Returns zero if len + was zero, or len > STP_CTL_BUFFER_SIZE. Returns the the length + if the send or stored message on success. Returns a negative + error code on failure. */ static int _stp_ctl_write(int type, void *data, unsigned len) { struct _stp_buffer *bptr; @@ -164,14 +379,10 @@ return 0; /* get a buffer from the free pool */ - bptr = _stp_mempool_alloc(_stp_pool_q); + bptr = _stp_ctl_get_buffer(type, data, len); if (unlikely(bptr == NULL)) return -ENOMEM; - bptr->type = type; - memcpy(bptr->buf, data, len); - bptr->len = len; - /* put it on the pool of ready buffers */ spin_lock_irqsave(&_stp_ctl_ready_lock, flags); list_add_tail(&bptr->list, &_stp_ctl_ready_q); @@ -180,22 +391,45 @@ return len + sizeof(bptr->type); } -/* send commands with timeout and retry */ +/* send commands with timeout and retry (can still fail though). + Will call wake_up on _stp_ctl_wq if new data is available for + _stp_ctl_read_cmd, so stapio can immediately read it if wanted. + Returns zero if the message had zero length or was too big. + Returns the length of the final message if sucessfully send or queued. + Returns a negative error number on failure. */ static int _stp_ctl_send(int type, void *data, int len) { - int err, trylimit = 50; + int err, mesg_on_queue = 0; + unsigned long flags; dbug_trans(1, "ctl_send: type=%d len=%d\n", type, len); - while ((err = _stp_ctl_write(type, data, len)) < 0 && trylimit--) - msleep(5); - if (err > 0) + err = _stp_ctl_write(type, data, len); + if (err > 0) { + /* A message was queued (or directly written), so wake up + _stp_ctl_read_cmd so stapio can pick it up asap. */ wake_up_interruptible(&_stp_ctl_wq); - else - // printk instead of _stp_error since an error here means our transport is suspect + } else { + /* printk instead of _stp_error since an error here means + our message or transport is suspect. */ printk(KERN_ERR "ctl_send (type=%d len=%d) failed: %d\n", type, len, err); + + /* If there are pending messages on the queue, then yell + and scream for someone to pick them off quickly. */ + spin_lock_irqsave(&_stp_ctl_ready_lock, flags); + if (!list_empty(&_stp_ctl_ready_q)) + mesg_on_queue = 1; + spin_unlock_irqrestore(&_stp_ctl_ready_lock, flags); + if (!mesg_on_queue) + printk(KERN_ERR "_stp_ctl_write failed, but no messages on queue\n"); + else + wake_up_interruptible(&_stp_ctl_wq); + } dbug_trans(1, "returning %d\n", err); return err; } +/** Called when someone tries to read from our .cmd file. + Will take _stp_ctl_ready_lock and pick off the next _stp_buffer + from the _stp_ctl_ready_q, will wait_event on _stp_ctl_wq. */ static ssize_t _stp_ctl_read_cmd(struct file *file, char __user *buf, size_t count, loff_t *ppos) { @@ -233,7 +467,7 @@ } /* put it on the pool of free buffers */ - _stp_mempool_free(bptr); + _stp_ctl_free_buffer(bptr); return len; } @@ -277,6 +511,9 @@ goto err0; _stp_allocated_net_memory += sizeof(struct _stp_buffer) * STP_DEFAULT_BUFFERS; + if (unlikely(_stp_ctl_alloc_special_buffers() != 0)) + goto err0; + if (_stp_register_ctl_channel_fs() != 0) goto err0; diff -Nru systemtap-1.4/runtime/transport/debugfs.c systemtap-1.6/runtime/transport/debugfs.c --- systemtap-1.4/runtime/transport/debugfs.c 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/runtime/transport/debugfs.c 2011-07-25 18:12:01.000000000 +0000 @@ -12,8 +12,13 @@ #include #include "transport.h" -#define STP_DEFAULT_BUFFERS 50 +/* Defines the number of buffers allocated in control.c (which #includes + this file) for the _stp_pool_q. This is the number of .cmd messages + the module can store before they have to be read by stapio. + 40 is somewhat arbitrary, 8 pre-allocated messages, 32 dynamic. */ +#define STP_DEFAULT_BUFFERS 40 +/* Always returns zero, we just push all messages on the _stp_ctl_ready_q. */ inline static int _stp_ctl_write_fs(int type, void *data, unsigned len) { return 0; diff -Nru systemtap-1.4/runtime/transport/relay_v2.c systemtap-1.6/runtime/transport/relay_v2.c --- systemtap-1.4/runtime/transport/relay_v2.c 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/runtime/transport/relay_v2.c 2011-07-25 18:12:01.000000000 +0000 @@ -20,8 +20,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * along with this program. If not, see . * */ #include @@ -288,7 +287,7 @@ /* Create "dropped" file. */ _stp_relay_data.dropped_file - = debugfs_create_file("dropped", 0444, _stp_get_module_dir(), + = debugfs_create_file("dropped", 0400, _stp_get_module_dir(), NULL, &__stp_relay_dropped_fops); if (!_stp_relay_data.dropped_file) { rc = -EIO; diff -Nru systemtap-1.4/runtime/transport/ring_buffer.c systemtap-1.6/runtime/transport/ring_buffer.c --- systemtap-1.4/runtime/transport/ring_buffer.c 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/runtime/transport/ring_buffer.c 2011-07-25 18:12:01.000000000 +0000 @@ -3,6 +3,7 @@ #include #include #include +#include static DEFINE_PER_CPU(local_t, _stp_cpu_disabled); @@ -62,7 +63,7 @@ struct timer_list timer; int overwrite_flag; }; -static struct _stp_relay_data_type _stp_relay_data = { 0 }; +static struct _stp_relay_data_type _stp_relay_data; /* _stp_poll_wait is a waitqueue for tasks blocked on * _stp_data_poll_trace() */ diff -Nru systemtap-1.4/runtime/transport/symbols.c systemtap-1.6/runtime/transport/symbols.c --- systemtap-1.4/runtime/transport/symbols.c 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/runtime/transport/symbols.c 2011-07-25 18:12:01.000000000 +0000 @@ -1,7 +1,7 @@ /* -*- linux-c -*- * symbols.c - stp symbol and module functions * - * Copyright (C) Red Hat Inc, 2006-2009 + * Copyright (C) Red Hat Inc, 2006-2011 * * This file is part of systemtap, and is free software. You can * redistribute it and/or modify it under the terms of the GNU General @@ -13,20 +13,44 @@ #define _STP_SYMBOLS_C_ #include "../sym.h" +/* PR12612: pre-commit-3abb860f values */ + +#define STP13_MODULE_NAME_LEN 64 +#define STP13_SYMBOL_NAME_LEN 64 +struct _stp13_msg_relocation { + char module[STP13_MODULE_NAME_LEN]; + char reloc[STP13_SYMBOL_NAME_LEN]; + uint64_t address; +}; + static void _stp_do_relocation(const char __user *buf, size_t count) { static struct _stp_msg_relocation msg; /* by protocol, never concurrently used */ + static struct _stp13_msg_relocation msg13; /* ditto */ unsigned mi, si; - if (sizeof(msg) != count) - { - errk ("STP_RELOCATE message size mismatch (%lu vs %lu)\n", - (long unsigned) sizeof(msg), (long unsigned) count); + /* PR12612: Let's try to be compatible with systemtap modules being + compiled by new systemtap, but loaded (staprun'd) by an older + systemtap runtime. The only known incompatilibility is that we + get an older, smaller, relocation message. So here we accept both + sizes. */ + if (sizeof(msg) == count) { /* systemtap 1.4+ runtime */ + if (unlikely(copy_from_user (& msg, buf, count))) + return; + } else if (sizeof(msg13) == count) { /* systemtap 1.3- runtime */ + if (unlikely(copy_from_user (& msg13, buf, count))) + return; +#if STP_MODULE_NAME_LEN <= STP13_MODULE_NAME_LEN +#error "STP_MODULE_NAME_LEN should not be smaller than STP13_MODULE_NAME_LEN" +#endif + strlcpy (msg.module, msg13.module, STP13_MODULE_NAME_LEN); + strlcpy (msg.reloc, msg13.reloc, STP13_MODULE_NAME_LEN); + msg.address = msg13.address; + } else { + errk ("STP_RELOCATE message size mismatch (%lu or %lu vs %lu)\n", + (long unsigned) sizeof(msg), (long unsigned) sizeof (msg13), (long unsigned) count); return; - } - - if (unlikely(copy_from_user (& msg, buf, count))) - return; + } dbug_sym(2, "relocate (%s %s 0x%lx)\n", msg.module, msg.reloc, (unsigned long) msg.address); diff -Nru systemtap-1.4/runtime/transport/transport.c systemtap-1.6/runtime/transport/transport.c --- systemtap-1.4/runtime/transport/transport.c 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/runtime/transport/transport.c 2011-07-25 18:12:01.000000000 +0000 @@ -187,7 +187,10 @@ /* * _stp_ctl_work_callback - periodically check for IO or exit - * This is run by a kernel thread and may sleep. + * This IO comes from ERRORs or WARNINGs which are send with + * _stp_ctl_write as type STP_OOB_DATA, so don't immediately + * trigger a wake_up of _stp_ctl_wq. + * This is run by a kernel thread and may NOT sleep. */ static void _stp_ctl_work_callback(unsigned long val) { @@ -273,7 +276,10 @@ /* start transport */ _stp_transport_data_fs_start(); - /* Signal stapio to send us STP_START back (XXX: ?!?!?!). */ + /* Signal stapio to send us STP_START back. + This is an historic convention. This was called + STP_TRANSPORT_INFO and had a payload that described the + transport buffering, this is no longer the case. */ _stp_ctl_send(STP_TRANSPORT, NULL, 0); dbug_trans(1, "returning 0...\n"); @@ -465,6 +471,12 @@ } if (_stp_transport_data_fs_init() != 0) { +#if STP_TRANSPORT_VERSION == 1 + relayfs_remove_dir(__stp_module_dir); +#else + debugfs_remove(__stp_module_dir); +#endif + __stp_module_dir = NULL; _stp_remove_root_dir(); _stp_unlock_transport_dir(); return -1; diff -Nru systemtap-1.4/runtime/transport/transport_msgs.h systemtap-1.6/runtime/transport/transport_msgs.h --- systemtap-1.4/runtime/transport/transport_msgs.h 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/runtime/transport/transport_msgs.h 2011-07-25 18:12:01.000000000 +0000 @@ -1,7 +1,7 @@ /* -*- linux-c -*- * transport_msgs.h - messages exchanged between module and userspace * - * Copyright (C) Red Hat Inc, 2006-2010 + * Copyright (C) Red Hat Inc, 2006-2011 * * This file is part of systemtap, and is free software. You can * redistribute it and/or modify it under the terms of the GNU General @@ -9,6 +9,11 @@ * later version. */ +/* + * NB: consider backward compatibility implications such as PR12612 + * before changing existing message structures in any way. + */ + #define STP_MODULE_NAME_LEN 128 #define STP_SYMBOL_NAME_LEN 128 #define STP_TZ_NAME_LEN 64 @@ -21,22 +26,57 @@ /* stp control channel command values */ enum { + /** stapio sends a STP_START after recieving a STP_TRANSPORT from + the module. The module sends STP_START back with result of call + probe_start() which will install all initial probes. */ STP_START, + /** stapio sends STP_EXIT to signal it wants to stop the module + itself or in response to receiving a STP_REQUEST_EXIT. + The module sends STP_EXIT once _stp_clean_and_exit has been + called (the first time) in reponse to a STP_EXIT or an rmmod. */ STP_EXIT, + /** _stp_warn and _stp_error messages from the module. stapio + parses the start if the message payload string to determine + whether it is a WARNING: or ERROR:. */ STP_OOB_DATA, + /** Send by the module (tapset/system.stp) to request stapio to + execute a shell command with the given message payload. */ STP_SYSTEM, + /** modules sends STP_TRANSPORT to stapio when ready to recieve a + STP_START message. stapio sends STP_BULK and then STP_START + back. */ STP_TRANSPORT, + /** Never used. */ STP_CONNECT, + /** Never used. */ STP_DISCONNECT, + /** Send by the staprun when initializing relayfs in response to a + STP_TRANSPORT message with a (empty) 127 char payload. Silently + absorbed by module when in STP_BULKMODE (percpu files), otherwise + returns -EINVAL to indicate bulkmode is disabled. */ STP_BULK, + /** Send as first message from staprun stp_main_loop, but never + never acted upon. Used to be initial message for message to + start requestion symbol data (symbol data is now compiled + into the module). */ STP_READY, + /** Send by staprun at startup to notify module of where the kernel + (_stext) and all other modules are loaded. */ STP_RELOCATION, - /** deprecated STP_TRANSPORT_VERSION == 1 **/ + /** Never used. deprecated STP_TRANSPORT_VERSION == 1 **/ STP_BUF_INFO, + /** Never used. */ STP_SUBBUFS_CONSUMED, + /** Used by the module only when STP_TRANSPORT_VERSION == 1 for + stapio to write realtime data packet to disk. */ STP_REALTIME_DATA, + /** Send by the module when it gets unloaded or STP_EXIT has been + received by stapio. */ STP_REQUEST_EXIT, + /** Send by staprun to notify module of current timezone. + Only send once at startup. */ STP_TZINFO, + /** Max number of message types, sanity check only. */ STP_MAX_CMD }; diff -Nru systemtap-1.4/runtime/transport/transport.txt systemtap-1.6/runtime/transport/transport.txt --- systemtap-1.4/runtime/transport/transport.txt 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/runtime/transport/transport.txt 2011-07-25 18:12:01.000000000 +0000 @@ -1,3 +1,8 @@ +NOTE: This was written before the staprun/stapio split. +These days staprun handles the priviliged module loading operation +(and sending the kernel/module relocation and tzinfo messages) +and stapio handles the i/o with the kernel module. + INITIALIZATION init_module() is defined in runtime.h. It returns _stp_transport_init(). diff -Nru systemtap-1.4/runtime/unwind/unwind.h systemtap-1.6/runtime/unwind/unwind.h --- systemtap-1.4/runtime/unwind/unwind.h 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/runtime/unwind/unwind.h 2011-07-25 18:12:01.000000000 +0000 @@ -23,7 +23,8 @@ #error "Unsupported dwarf unwind architecture" #endif -#define STP_MAX_STACK_DEPTH 8 +/* Used for DW_CFA_remember_state and DW_CFA_restore_state. */ +#define STP_MAX_STACK_DEPTH 4 #ifndef BUILD_BUG_ON_ZERO #define BUILD_BUG_ON_ZERO(e) (sizeof(char[1 - 2 * !!(e)]) - 1) @@ -247,17 +248,6 @@ typedef unsigned long uleb128_t; typedef signed long sleb128_t; -static struct unwind_table { - unsigned long pc; /* text */ - unsigned long range; /* text_size */ - const void *address; /* unwind_data */ - unsigned long size; /* unwind_data_len */ - const unsigned char *header; /* unwind_header */ - unsigned long hdrsz; - struct unwind_table *link; - const char *name; /* module name */ -} root_table; - struct unwind_item { enum item_location { Nowhere, @@ -273,11 +263,7 @@ }; }; -struct unwind_state { - uleb128_t loc, org; - const u8 *cieStart, *cieEnd; - uleb128_t codeAlign; - sleb128_t dataAlign; +struct unwind_reg_state { union { struct cfa { uleb128_t reg, offs; @@ -285,23 +271,18 @@ const u8 *cfa_expr; }; struct unwind_item regs[ARRAY_SIZE(reg_info)]; - unsigned stackDepth:8; - unsigned version:8; unsigned cfa_is_expr:1; - const u8 *label; - const u8 *stack[STP_MAX_STACK_DEPTH]; }; -static const struct cfa badCFA = { ARRAY_SIZE(reg_info), 1 }; -static unsigned long read_pointer(const u8 **pLoc, - const void *end, - signed ptrType); -static const u32 bad_cie, not_fde; -static const u32 *cie_for_fde(const u32 *fde, void *table, - uint32_t table_len, int is_ehframe); -static signed fde_pointer_type(const u32 *cie, - void *table, uint32_t table_len); +struct unwind_state { + uleb128_t loc; + uleb128_t codeAlign; + sleb128_t dataAlign; + unsigned stackDepth:8; + struct unwind_reg_state reg[STP_MAX_STACK_DEPTH]; +}; +static const struct cfa badCFA = { ARRAY_SIZE(reg_info), 1 }; #endif /* STP_USE_DWARF_UNWINDER */ #endif /*_STP_UNWIND_H_*/ diff -Nru systemtap-1.4/runtime/unwind.c systemtap-1.6/runtime/unwind.c --- systemtap-1.4/runtime/unwind.c 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/runtime/unwind.c 2011-07-25 18:12:01.000000000 +0000 @@ -1,6 +1,6 @@ /* -*- linux-c -*- * kernel stack unwinding - * Copyright (C) 2008-2010 Red Hat Inc. + * Copyright (C) 2008-2011 Red Hat Inc. * * Based on old kernel code that is * Copyright (C) 2002-2006 Novell, Inc. @@ -22,31 +22,6 @@ struct unwind_state state; }; -struct eh_frame_hdr_table_entry { - unsigned long start, fde; -}; - -static int cmp_eh_frame_hdr_table_entries(const void *p1, const void *p2) -{ - const struct eh_frame_hdr_table_entry *e1 = p1; - const struct eh_frame_hdr_table_entry *e2 = p2; - return (e1->start > e2->start) - (e1->start < e2->start); -} - -static void swap_eh_frame_hdr_table_entries(void *p1, void *p2, int size) -{ - struct eh_frame_hdr_table_entry *e1 = p1; - struct eh_frame_hdr_table_entry *e2 = p2; - unsigned long v; - - v = e1->start; - e1->start = e2->start; - e2->start = v; - v = e1->fde; - e1->fde = e2->fde; - e2->fde = v; -} - static uleb128_t get_uleb128(const u8 **pcur, const u8 *end) { const u8 *cur = *pcur; @@ -91,23 +66,52 @@ return value; } -/* given an FDE, find its CIE */ -static const u32 *cie_for_fde(const u32 *fde, void *unwind_data, - uint32_t table_len, int is_ehframe) +/* Whether this is a real CIE. Assumes CIE (length) sane. */ +static int has_cie_id(const u32 *cie, int is_ehframe) { - const u32 *cie; + /* CIE id for eh_frame is 0, otherwise 0xffffffff */ + if (is_ehframe && cie[1] == 0) + return 1; + else if (cie[1] == 0xffffffff) + return 1; + else + return 0; +} + +/* whether this is a real fde or not */ +static int is_fde(const u32 *fde, void *table, uint32_t table_len, + int is_ehframe) +{ + const u8 *end; /* check that length is proper */ - if (!*fde || (*fde & (sizeof(*fde) - 1))) - return &bad_cie; + if (!*fde || (*fde & (sizeof(*fde) - 1))) { + _stp_warn("bad fde\n"); + return 0; + } - /* CIE id for eh_frame is 0, otherwise 0xffffffff */ - if (is_ehframe && fde[1] == 0) - return ¬_fde; - else if (fde[1] == 0xffffffff) - return ¬_fde; + if (has_cie_id(fde, is_ehframe)) + return 0; + + end = (const u8 *)(fde + 1) + *fde; - /* OK, must be an FDE. Now find its CIE. */ + /* end should fall within unwind table. */ + if (((void*)end) < table + || ((void *)end) > ((void *)(table + table_len))) { + _stp_warn("bad fde length\n"); + return 0; + } + + return 1; +} + +/* given an FDE, find its CIE and sanity check */ +static const u32 *cie_for_fde(const u32 *fde, void *unwind_data, + uint32_t table_len, int is_ehframe) +{ + const u32 *cie; + unsigned version; + const u8 *end; /* CIE_pointer must be a proper offset */ if ((fde[1] & (sizeof(*fde) - 1)) || fde[1] > (unsigned long)(fde + 1) - (unsigned long)unwind_data) { @@ -125,16 +129,32 @@ /* Make sure address falls in the table */ if (((void *)cie) < ((void*)unwind_data) - || ((void*)cie) > ((void*)(unwind_data + table_len))) - return NULL; + || ((void*)cie) > ((void*)(unwind_data + table_len))) { + _stp_warn("cie address falls outside table\n"); + return NULL; + } if (*cie <= sizeof(*cie) + 4 || *cie >= fde[1] - sizeof(*fde) - || (*cie & (sizeof(*cie) - 1)) - || (cie[1] != 0xffffffff && cie[1] != 0)) { + || ! has_cie_id(cie, is_ehframe)) { _stp_warn("cie is not valid %lx %x %x %x\n", (unsigned long)cie, *cie, fde[1], cie[1]); return NULL; /* this is not a (valid) CIE */ } + version = *(const u8 *)(cie + 2); + if (version != 1 && version != 3 && version != 4) { + _stp_warn ("Unsupported CIE version: %d\n", version); + return NULL; + } + + end = (const u8 *)(cie + 1) + *cie; + + /* end should fall within unwind table. */ + if (((void *)end) < (void *)unwind_data + || ((void *)end) > ((void *)(unwind_data + table_len))) { + _stp_warn ("CIE end falls outside table\n"); + return NULL; + } + return cie; } @@ -224,63 +244,124 @@ return read_ptr_sect(pLoc, end, ptrType, 0, 0); } -static signed fde_pointer_type(const u32 *cie, void *unwind_data, - uint32_t table_len) +/* Parse FDE and CIE content. Basic sanity checks should already have + been done start/end/version/id (done by is_fde and cie_for_fde). + Returns -1 if FDE or CIE cannot be parsed.*/ +static int parse_fde_cie(const u32 *fde, const u32 *cie, + void *unwind_data, uint32_t table_len, + unsigned *ptrType, + unsigned long *startLoc, unsigned long *locRange, + const u8 **fdeStart, const u8 **fdeEnd, + const u8 **cieStart, const u8 **cieEnd, + uleb128_t *codeAlign, sleb128_t *dataAlign, + uleb128_t *retAddrReg, unsigned *call_frame) { - const u8 *ptr = (const u8 *)(cie + 2); - unsigned version = *ptr; - - if (version != 1 && version != 3 && version != 4) - return -1; /* unsupported */ - if (*++ptr) { - const char *aug; - const u8 *end = (const u8 *)(cie + 1) + *cie; - uleb128_t len; - - /* end of cie should fall within unwind table. */ - if (((void*)end) < ((void *)unwind_data) - || ((void *)end) > ((void *)(unwind_data + table_len))) - return -1; - - /* check if augmentation size is first (and thus present) */ - if (*ptr != 'z') + const u8 *ciePtr = (const u8 *)(cie + 2); + const u8 *fdePtr = (const u8 *)(fde + 2); + unsigned version = *ciePtr++; + const char *aug = (const void *)ciePtr; + uleb128_t augLen = 0; /* Set to non-zero if cie aug starts with z */ + + *cieEnd = (const u8 *)(cie + 1) + *cie; + *fdeEnd = (const u8 *)(fde + 1) + *fde; + + /* check if augmentation string is nul-terminated */ + if ((ciePtr = memchr(aug, 0, *cieEnd - ciePtr)) == NULL) { + _stp_warn("Unterminated augmentation string\n"); + return -1; + } + ciePtr++; /* skip aug terminator */ + + *codeAlign = get_uleb128(&ciePtr, *cieEnd); + *dataAlign = get_sleb128(&ciePtr, *cieEnd); + dbug_unwind(2, "codeAlign=%lx, dataAlign=%lx\n", + *codeAlign, *dataAlign); + if (*codeAlign == 0 || *dataAlign == 0) { + _stp_warn("zero codeAlign or dataAlign values\n"); + return -1; + } + + *retAddrReg = ((version <= 1) + ? *ciePtr++ : get_uleb128(&ciePtr, *cieEnd)); + + if (*aug == 'z') { + augLen = get_uleb128(&ciePtr, *cieEnd); + if (augLen > (const u8 *)cie - *cieEnd + || ciePtr + augLen > *cieEnd) { + _stp_warn("Bogus CIE augmentation length\n"); return -1; - /* check if augmentation string is nul-terminated */ - if ((ptr = memchr(aug = (const void *)ptr, 0, end - ptr)) == NULL) - return -1; - ++ptr; /* skip terminator */ - get_uleb128(&ptr, end); /* skip code alignment */ - get_sleb128(&ptr, end); /* skip data alignment */ - /* skip return address column */ - version <= 1 ? (void)++ptr : (void)get_uleb128(&ptr, end); - len = get_uleb128(&ptr, end); /* augmentation length */ - if (ptr + len < ptr || ptr + len > end) + } + } + *cieStart = ciePtr + augLen; + + /* Read augmentation string to determine frame_call and ptrType. */ + *call_frame = 1; + *ptrType = DW_EH_PE_absptr; + while (*aug) { + if (ciePtr > *cieStart) { + _stp_warn("Augmentation data runs past end\n"); return -1; - end = ptr + len; - while (*++aug) { - if (ptr >= end) - return -1; - switch (*aug) { + } + switch (*aug) { + case 'z': + break; case 'L': - ++ptr; + ciePtr++; break; - case 'P':{ - signed ptrType = *ptr++; - - if (!read_pointer(&ptr, end, ptrType) || ptr > end) - return -1; + case 'P': { + /* We are not actually interested in + the value, so don't try to deref. + Mask off DW_EH_PE_indirect. */ + signed pType = *ciePtr++ & 0x7F; + if (!read_pointer(&ciePtr, *cieStart, pType)) { + _stp_warn("couldn't read personality routine handler\n"); + return -1; } break; + } case 'R': - return *ptr; + *ptrType = *ciePtr++; + break; + case 'S': + *call_frame = 0; + break; default: + _stp_warn("Unknown augmentation char '%c'\n", *(aug - 1)); return -1; - } } + aug++; } - return DW_EH_PE_absptr; + + if (ciePtr != *cieStart) { + _stp_warn("Bogus CIE augmentation data\n"); + return -1; + } + + /* Now we finally know the type encoding and whether or not the + augmentation string starts with 'z' indicating the FDE might also + have some augmentation data, so we can parse the FDE. */ + *startLoc = read_pointer(&fdePtr, *fdeEnd, *ptrType); + *locRange = read_pointer(&fdePtr, *fdeEnd, + *ptrType & (DW_EH_PE_FORM | DW_EH_PE_signed)); + dbug_unwind(2, "startLoc: %lx, locrange: %lx\n", + *startLoc, *locRange); + + /* Skip FDE augmentation length (not interested in data). */ + if (augLen != 0) { + augLen = get_uleb128(&fdePtr, *fdeEnd); + if (augLen > (const u8 *)fde - *fdeEnd + || fdePtr + augLen > *fdeEnd) { + _stp_warn("Bogus FDE augmentation length\n"); + return -1; + } + } + *fdeStart = fdePtr + augLen; + + return 0; } +#define REG_STATE state->reg[state->stackDepth] + static int advance_loc(unsigned long delta, struct unwind_state *state) { state->loc += delta * state->codeAlign; @@ -291,9 +372,9 @@ static void set_rule(uleb128_t reg, enum item_location where, uleb128_t value, struct unwind_state *state) { dbug_unwind(1, "reg=%lx, where=%d, value=%lx\n", reg, where, value); - if (reg < ARRAY_SIZE(state->regs)) { - state->regs[reg].where = where; - state->regs[reg].value = value; + if (reg < ARRAY_SIZE(REG_STATE.regs)) { + REG_STATE.regs[reg].where = where; + REG_STATE.regs[reg].value = value; } } @@ -305,9 +386,9 @@ uleb128_t len = get_uleb128(expr, end); dbug_unwind(1, "reg=%lx, where=%d, expr=%lu@%p\n", reg, where, len, *expr); - if (end - *expr >= len && reg < ARRAY_SIZE(state->regs)) { - state->regs[reg].where = where; - state->regs[reg].expr = start; + if (end - *expr >= len && reg < ARRAY_SIZE(REG_STATE.regs)) { + REG_STATE.regs[reg].where = where; + REG_STATE.regs[reg].expr = start; *expr += len; } } @@ -325,17 +406,12 @@ } ptr; int result = 1; - if (end - start > MAX_CFI) - return 0; - - dbug_unwind(1, "targetLoc=%lx state->loc=%lx\n", targetLoc, state->loc); - if (start != state->cieStart) { - state->loc = state->org; - result = processCFI(state->cieStart, state->cieEnd, 0, ptrType, state); - if (targetLoc == 0 && state->label == NULL) - return result; + if (end - start > MAX_CFI) { + _stp_warn("Too many CFI instuctions\n"); + return 0; } + dbug_unwind(1, "targetLoc=%lx state->loc=%lx\n", targetLoc, state->loc); for (ptr.p8 = start; result && ptr.p8 < end;) { switch (*ptr.p8 >> 6) { uleb128_t value; @@ -351,15 +427,15 @@ break; case DW_CFA_advance_loc1: result = ptr.p8 < end && advance_loc(*ptr.p8++, state); - dbug_unwind(1, "DW_CFA_advance_loc1 %d\n", result); + dbug_unwind(1, "DW_CFA_advance_loc1 (result=%d)\n", result); break; case DW_CFA_advance_loc2: result = ptr.p8 <= end + 2 && advance_loc(*ptr.p16++, state); - dbug_unwind(1, "DW_CFA_advance_loc2 %d\n", result); + dbug_unwind(1, "DW_CFA_advance_loc2 (result=%d)\n", result); break; case DW_CFA_advance_loc4: result = ptr.p8 <= end + 4 && advance_loc(*ptr.p32++, state); - dbug_unwind(1, "DW_CFA_advance_loc4 %d\n", result); + dbug_unwind(1, "DW_CFA_advance_loc4 (result=%d)\n", result); break; case DW_CFA_offset_extended: value = get_uleb128(&ptr.p8, end); @@ -385,7 +461,7 @@ case DW_CFA_undefined: case DW_CFA_same_value: set_rule(get_uleb128(&ptr.p8, end), Nowhere, 0, state); - dbug_unwind(1, "DW_CFA_undefined\n"); + dbug_unwind(1, "DW_CFA_undefined (instruction: 0x%x)\n", *(ptr.p8 - 1)); break; case DW_CFA_register: value = get_uleb128(&ptr.p8, end); @@ -404,58 +480,50 @@ dbug_unwind(1, "DW_CFA_val_expression\n"); break; case DW_CFA_remember_state: - dbug_unwind(1, "DW_CFA_remember_state\n"); - if (ptr.p8 == state->label) { - state->label = NULL; - return 1; - } - if (state->stackDepth >= STP_MAX_STACK_DEPTH) + state->stackDepth++; + if (state->stackDepth >= STP_MAX_STACK_DEPTH) { + _stp_warn("Too many stacked DW_CFA_remember_state\n"); return 0; - state->stack[state->stackDepth++] = ptr.p8; + } + memcpy(®_STATE, + &state->reg[state->stackDepth - 1], + sizeof (REG_STATE)); + dbug_unwind(1, "DW_CFA_remember_state (stackDepth=%d)\n", state->stackDepth); break; case DW_CFA_restore_state: - dbug_unwind(1, "DW_CFA_restore_state\n"); - if (state->stackDepth) { - const uleb128_t loc = state->loc; - const u8 *label = state->label; - - state->label = state->stack[state->stackDepth - 1]; - state->cfa_is_expr = 0; - memcpy(&state->cfa, &badCFA, sizeof(state->cfa)); - memset(state->regs, 0, sizeof(state->regs)); - state->stackDepth = 0; - result = processCFI(start, end, 0, ptrType, state); - state->loc = loc; - state->label = label; - } else + if (state->stackDepth == 0) { + _stp_warn("Unbalanced DW_CFA_restore_state\n"); return 0; + } + state->stackDepth--; + dbug_unwind(1, "DW_CFA_restore_state (stackDepth=%d)\n", state->stackDepth); break; case DW_CFA_def_cfa: - state->cfa.reg = get_uleb128(&ptr.p8, end); - dbug_unwind(1, "DW_CFA_def_cfa reg=%ld\n", state->cfa.reg); + REG_STATE.cfa.reg = get_uleb128(&ptr.p8, end); + dbug_unwind(1, "DW_CFA_def_cfa reg=%ld\n", REG_STATE.cfa.reg); /*nobreak */ case DW_CFA_def_cfa_offset: - state->cfa.offs = get_uleb128(&ptr.p8, end); - dbug_unwind(1, "DW_CFA_def_cfa_offset offs=%lx\n", state->cfa.offs); + REG_STATE.cfa.offs = get_uleb128(&ptr.p8, end); + dbug_unwind(1, "DW_CFA_def_cfa_offset offs=%lx\n", REG_STATE.cfa.offs); break; case DW_CFA_def_cfa_sf: - state->cfa.reg = get_uleb128(&ptr.p8, end); - dbug_unwind(1, "DW_CFA_def_cfa_sf reg=%ld\n", state->cfa.reg); + REG_STATE.cfa.reg = get_uleb128(&ptr.p8, end); + dbug_unwind(1, "DW_CFA_def_cfa_sf reg=%ld\n", REG_STATE.cfa.reg); /*nobreak */ case DW_CFA_def_cfa_offset_sf: - state->cfa.offs = get_sleb128(&ptr.p8, end) * state->dataAlign; - dbug_unwind(1, "DW_CFA_def_cfa_offset_sf offs=%lx\n", state->cfa.offs); + REG_STATE.cfa.offs = get_sleb128(&ptr.p8, end) * state->dataAlign; + dbug_unwind(1, "DW_CFA_def_cfa_offset_sf offs=%lx\n", REG_STATE.cfa.offs); break; case DW_CFA_def_cfa_register: - state->cfa.reg = get_uleb128(&ptr.p8, end); - dbug_unwind(1, "DW_CFA_def_cfa_register reg=%ld\n", state->cfa.reg); + REG_STATE.cfa.reg = get_uleb128(&ptr.p8, end); + dbug_unwind(1, "DW_CFA_def_cfa_register reg=%ld\n", REG_STATE.cfa.reg); break; case DW_CFA_def_cfa_expression: { const u8 *cfa_expr = ptr.p8; value = get_uleb128(&ptr.p8, end); if (ptr.p8 < end && end - ptr.p8 >= value) { - state->cfa_is_expr = 1; - state->cfa_expr = cfa_expr; + REG_STATE.cfa_is_expr = 1; + REG_STATE.cfa_expr = cfa_expr; ptr.p8 += value; dbug_unwind(1, "DW_CFA_def_cfa_expression %lu@%p\n", value, cfa_expr); } @@ -481,16 +549,16 @@ break; case 1: result = advance_loc(*ptr.p8++ & 0x3f, state); - dbug_unwind(1, "case 1\n"); + dbug_unwind(1, "DW_CFA_advance_loc\n"); break; case 2: value = *ptr.p8++ & 0x3f; set_rule(value, Memory, get_uleb128(&ptr.p8, end), state); - dbug_unwind(1, "case 2\n"); + dbug_unwind(1, "DW_CFA_offset\n"); break; case 3: set_rule(*ptr.p8++ & 0x3f, Nowhere, 0, state); - dbug_unwind(1, "case 3\n"); + dbug_unwind(1, "DW_CFA_restore\n"); break; } dbug_unwind(1, "targetLoc=%lx state->loc=%lx\n", targetLoc, state->loc); @@ -499,7 +567,7 @@ if (result && targetLoc != 0 && targetLoc < state->loc) return 1; } - return result && ptr.p8 == end && (targetLoc == 0 || state->label == NULL); + return result && ptr.p8 == end; } #ifdef DEBUG_UNWIND @@ -600,15 +668,18 @@ int is_ehframe) { const u8 *ptr, *end, *hdr = is_ehframe ? m->unwind_hdr: s->debug_hdr; + uint32_t hdr_len = is_ehframe ? m->unwind_hdr_len : s->debug_hdr_len; unsigned long startLoc; u32 *fde = NULL; unsigned num, tableSize, t2; unsigned long eh_hdr_addr = m->unwind_hdr_addr; - if (hdr == NULL || hdr[0] != 1) + if (hdr == NULL || hdr_len < 4 || hdr[0] != 1) { + _stp_warn("no or bad debug frame hdr\n"); return NULL; + } - dbug_unwind(1, "search for %lx", pc); + dbug_unwind(1, "binary search for %lx", pc); /* table_enc */ switch (hdr[3] & DW_EH_PE_FORM) { @@ -629,7 +700,7 @@ return NULL; } ptr = hdr + 4; - end = hdr + (is_ehframe ? m->unwind_hdr_len : s->debug_hdr_len); + end = hdr + hdr_len; { // XXX Can the header validity be checked just once? unsigned long eh = read_ptr_sect(&ptr, end, hdr[1], 0, @@ -856,12 +927,26 @@ BINOP(plus, +); BINOP(minus, -); BINOP(mul, *); - BINOP(div, /); - BINOP(mod, %); BINOP(shl, <<); BINOP(shra, >>); #undef BINOP + case DW_OP_mod: { + unsigned long b = POP; + unsigned long a = POP; + if (b == 0) + goto divzero; + PUSH (a % b); + } + + case DW_OP_div: { + long b = POP; + long a = POP; + if (b == 0) + goto divzero; + PUSH (a / b); + } + case DW_OP_shr: { unsigned long b = POP; unsigned long a = POP; @@ -933,7 +1018,7 @@ return 0; copy_failed: - _stp_warn("_stp_read_address failed to access memory\n"); + _stp_warn("_stp_read_address failed to access memory for deref\n"); return 1; truncated: _stp_warn("invalid (truncated) DWARF expression in CFI\n"); @@ -944,6 +1029,9 @@ underflow: _stp_warn("DWARF expression stack underflow in CFI\n"); return 1; +divzero: + _stp_warn("DWARF expression stack divide by zero in CFI\n"); + return 1; #undef NEED #undef PUSH @@ -959,12 +1047,15 @@ void *table, uint32_t table_len, int is_ehframe) { const u32 *fde = NULL, *cie = NULL; - const u8 *ptr = NULL, *end = NULL; + /* The start and end of the CIE CFI instructions. */ + const u8 *cieStart = NULL, *cieEnd = NULL; + /* The start and end of the FDE CFI instructions. */ + const u8 *fdeStart = NULL, *fdeEnd = NULL; struct unwind_frame_info *frame = &context->info; unsigned long pc = UNW_PC(frame) - frame->call_frame; - unsigned long tableSize, startLoc = 0, endLoc = 0, cfa; + unsigned long startLoc = 0, endLoc = 0, locRange = 0, cfa; unsigned i; - signed ptrType = -1; + signed ptrType = -1, call_frame = 1; uleb128_t retAddrReg = 0; struct unwind_state *state = &context->state; unsigned long addr; @@ -980,55 +1071,68 @@ goto err; } + memset(state, 0, sizeof(*state)); + fde = _stp_search_unwind_hdr(pc, tsk, m, s, is_ehframe); dbug_unwind(1, "%s: fde=%lx\n", m->name, (unsigned long) fde); /* found the fde, now set startLoc and endLoc */ - if (fde != NULL) { + if (fde != NULL && is_fde(fde, table, table_len, is_ehframe)) { cie = cie_for_fde(fde, table, table_len, is_ehframe); dbug_unwind(1, "%s: cie=%lx\n", m->name, (unsigned long) cie); - if (likely(cie != NULL && cie != &bad_cie && cie != ¬_fde)) { - ptr = (const u8 *)(fde + 2); - ptrType = fde_pointer_type(cie, table, table_len); - startLoc = read_pointer(&ptr, (const u8 *)(fde + 1) + *fde, ptrType); + if (likely(cie != NULL)) { + if (parse_fde_cie(fde, cie, table, table_len, &ptrType, + &startLoc, &locRange, + &fdeStart, &fdeEnd, + &cieStart, &cieEnd, + &state->codeAlign, + &state->dataAlign, + &retAddrReg, + &call_frame) < 0) + goto err; startLoc = adjustStartLoc(startLoc, tsk, m, s, ptrType, is_ehframe); - - dbug_unwind(2, "startLoc=%lx, ptrType=%s\n", startLoc, _stp_eh_enc_name(ptrType)); - if (!(ptrType & DW_EH_PE_indirect)) - ptrType &= DW_EH_PE_FORM | DW_EH_PE_signed; - endLoc = startLoc + read_pointer(&ptr, (const u8 *)(fde + 1) + *fde, ptrType); + endLoc = startLoc + locRange; + dbug_unwind(1, "startLoc: %lx, endLoc: %lx\n", startLoc, endLoc); if (pc > endLoc) { dbug_unwind(1, "pc (%lx) > endLoc(%lx)\n", pc, endLoc); goto done; } } else { - dbug_unwind(1, "fde found in header, but cie is bad!\n"); + _stp_warn("fde found in header, but cie is bad!\n"); fde = NULL; } - } - - /* did not a good fde find with binary search, so do slow linear search */ - if (fde == NULL) { + } else if ((is_ehframe ? m->unwind_hdr: s->debug_hdr) == NULL) { + /* Only do a linear search if there isn't a search header. + There always should be one, we create it in the translator + if it didn't exist. These should never be missing except + when there are toolchain bugs. */ + unsigned long tableSize; + _stp_warn("No binary search table for debug frame, doing slow linear search for %s\n", m->name); for (fde = table, tableSize = table_len; cie = NULL, tableSize > sizeof(*fde) && tableSize - sizeof(*fde) >= *fde; tableSize -= sizeof(*fde) + *fde, fde += 1 + *fde / sizeof(*fde)) { dbug_unwind(3, "fde=%lx tableSize=%d\n", (long)*fde, (int)tableSize); + if (!is_fde(fde, table, table_len, is_ehframe)) + continue; cie = cie_for_fde(fde, table, table_len, is_ehframe); - if (cie == &bad_cie) { - cie = NULL; + if (cie == NULL + || parse_fde_cie(fde, cie, table, table_len, + &ptrType, + &startLoc, &locRange, + &fdeStart, &fdeEnd, + &cieStart, &cieEnd, + &state->codeAlign, + &state->dataAlign, + &retAddrReg, + &call_frame) < 0) break; - } - if (cie == NULL || cie == ¬_fde || (ptrType = fde_pointer_type(cie, table, table_len)) < 0) - continue; - - ptr = (const u8 *)(fde + 2); - startLoc = read_pointer(&ptr, (const u8 *)(fde + 1) + *fde, ptrType); startLoc = adjustStartLoc(startLoc, tsk, m, s, ptrType, is_ehframe); - dbug_unwind(2, "startLoc=%lx, ptrType=%s\n", startLoc, _stp_eh_enc_name(ptrType)); if (!startLoc) continue; - if (!(ptrType & DW_EH_PE_indirect)) - ptrType &= DW_EH_PE_FORM | DW_EH_PE_signed; - endLoc = startLoc + read_pointer(&ptr, (const u8 *)(fde + 1) + *fde, ptrType); + endLoc = startLoc + locRange; + if (pc > endLoc) { + dbug_unwind(1, "pc (%lx) > endLoc(%lx)\n", pc, endLoc); + goto done; + } dbug_unwind(3, "endLoc=%lx\n", endLoc); if (pc >= startLoc && pc < endLoc) break; @@ -1042,106 +1146,47 @@ /* found the CIE and FDE */ - memset(state, 0, sizeof(*state)); - state->cieEnd = ptr; /* keep here temporarily */ - ptr = (const u8 *)(cie + 2); - end = (const u8 *)(cie + 1) + *cie; - - /* end should fall within unwind table. */ - if (((void *)end) < table - || ((void *)end) > ((void *)(table + table_len))) - goto err; - - frame->call_frame = 1; - state->version = *ptr; - if (state->version != 1 && state->version != 3 && state->version != 4) { - _stp_warn("CIE version number is %d. 1, 3 or 4 is supported.\n", state->version); - goto err; /* unsupported version */ - } - if (*++ptr) { - /* check if augmentation size is first (and thus present) */ - if (*ptr == 'z') { - while (++ptr < end && *ptr) { - switch (*ptr) { - /* check for ignorable (or already handled) - * nul-terminated augmentation string */ - case 'L': - case 'P': - case 'R': - continue; - case 'S': - dbug_unwind(1, "This is a signal frame\n"); - frame->call_frame = 0; - continue; - default: - break; - } - break; - } - } - if (ptr >= end || *ptr) { - _stp_warn("Problem parsing the augmentation string.\n"); - goto err; - } - } - ++ptr; - - /* get code aligment factor */ - state->codeAlign = get_uleb128(&ptr, end); - /* get data aligment factor */ - state->dataAlign = get_sleb128(&ptr, end); - if (state->codeAlign == 0 || state->dataAlign == 0 || ptr >= end) - goto err;; - - retAddrReg = state->version <= 1 ? *ptr++ : get_uleb128(&ptr, end); - - /* skip augmentation */ - if (((const char *)(cie + 2))[1] == 'z') { - uleb128_t augSize = get_uleb128(&ptr, end); - ptr += augSize; - } - if (ptr > end || retAddrReg >= ARRAY_SIZE(reg_info) + // Sanity check return address register value. + if (retAddrReg >= ARRAY_SIZE(reg_info) || REG_INVALID(retAddrReg) - || reg_info[retAddrReg].width != sizeof(unsigned long)) + || reg_info[retAddrReg].width != sizeof(unsigned long)) { + _stp_warn("Bad retAddrReg value\n"); goto err; - - state->cieStart = ptr; - ptr = state->cieEnd; - state->cieEnd = end; - end = (const u8 *)(fde + 1) + *fde; - - /* end should fall within unwind table. */ - if (((void*)end) < table - || ((void *)end) > ((void *)(table + table_len))) - goto err; - - /* skip augmentation */ - if (((const char *)(cie + 2))[1] == 'z') { - uleb128_t augSize = get_uleb128(&ptr, end); - if ((ptr += augSize) > end) - goto err; } - state->org = startLoc; - memcpy(&state->cfa, &badCFA, sizeof(state->cfa)); - /* process instructions */ - if (!processCFI(ptr, end, pc, ptrType, state) - || state->loc > endLoc || state->regs[retAddrReg].where == Nowhere || state->cfa.reg >= ARRAY_SIZE(reg_info) - || reg_info[state->cfa.reg].width != sizeof(unsigned long) - || state->cfa.offs % sizeof(unsigned long)) + frame->call_frame = call_frame; + state->stackDepth = 0; + state->loc = startLoc; + memcpy(®_STATE.cfa, &badCFA, sizeof(REG_STATE.cfa)); + + /* Common Information Entry (CIE) instructions. */ + dbug_unwind (1, "processCFI for CIE\n"); + if (!processCFI(cieStart, cieEnd, 0, ptrType, state)) + goto err; + + /* Process Frame Description Entry (FDE) instructions. */ + dbug_unwind (1, "processCFI for FDE\n"); + if (!processCFI(fdeStart, fdeEnd, pc, ptrType, state) + || state->loc > endLoc || REG_STATE.regs[retAddrReg].where == Nowhere + || REG_STATE.cfa.reg >= ARRAY_SIZE(reg_info) + || reg_info[REG_STATE.cfa.reg].width != sizeof(unsigned long) + || REG_STATE.cfa.offs % sizeof(unsigned long)) goto err; /* update frame */ #ifndef CONFIG_AS_CFI_SIGNAL_FRAME - if (frame->call_frame && !UNW_DEFAULT_RA(state->regs[retAddrReg], state->dataAlign)) + if (frame->call_frame && !UNW_DEFAULT_RA(REG_STATE.regs[retAddrReg], state->dataAlign)) frame->call_frame = 0; #endif - if (state->cfa_is_expr) { - if (compute_expr(state->cfa_expr, frame, &cfa)) + if (REG_STATE.cfa_is_expr) { + if (compute_expr(REG_STATE.cfa_expr, frame, &cfa)) goto err; } - else - cfa = FRAME_REG(state->cfa.reg, unsigned long) + state->cfa.offs; + else { + dbug_unwind(1, "cfa reg=%ld, offs=%lx\n", + REG_STATE.cfa.reg, REG_STATE.cfa.offs); + cfa = FRAME_REG(REG_STATE.cfa.reg, unsigned long) + REG_STATE.cfa.offs; + } startLoc = min((unsigned long)UNW_SP(frame), cfa); endLoc = max((unsigned long)UNW_SP(frame), cfa); dbug_unwind(1, "cfa=%lx startLoc=%lx, endLoc=%lx\n", cfa, startLoc, endLoc); @@ -1152,28 +1197,28 @@ (unsigned long)startLoc, (unsigned long)endLoc); } dbug_unwind(1, "cie=%lx fde=%lx\n", (unsigned long) cie, (unsigned long) fde); - for (i = 0; i < ARRAY_SIZE(state->regs); ++i) { + for (i = 0; i < ARRAY_SIZE(REG_STATE.regs); ++i) { if (REG_INVALID(i)) { - if (state->regs[i].where == Nowhere) + if (REG_STATE.regs[i].where == Nowhere) continue; _stp_warn("REG_INVALID %d\n", i); goto err; } - dbug_unwind(2, "register %d. where=%d\n", i, state->regs[i].where); - switch (state->regs[i].where) { + dbug_unwind(2, "register %d. where=%d\n", i, REG_STATE.regs[i].where); + switch (REG_STATE.regs[i].where) { default: break; case Register: - if (state->regs[i].value >= ARRAY_SIZE(reg_info) - || REG_INVALID(state->regs[i].value) - || reg_info[i].width > reg_info[state->regs[i].value].width) { + if (REG_STATE.regs[i].value >= ARRAY_SIZE(reg_info) + || REG_INVALID(REG_STATE.regs[i].value) + || reg_info[i].width > reg_info[REG_STATE.regs[i].value].width) { _stp_warn("case Register bad\n"); goto err; } - switch (reg_info[state->regs[i].value].width) { + switch (reg_info[REG_STATE.regs[i].value].width) { #define CASE(n) \ case sizeof(u##n): \ - state->regs[i].value = FRAME_REG(state->regs[i].value, \ + REG_STATE.regs[i].value = FRAME_REG(REG_STATE.regs[i].value, \ const u##n); \ break CASES; @@ -1185,12 +1230,12 @@ break; } } - for (i = 0; i < ARRAY_SIZE(state->regs); ++i) { + for (i = 0; i < ARRAY_SIZE(REG_STATE.regs); ++i) { dbug_unwind(2, "register %d. invalid=%d\n", i, REG_INVALID(i)); if (REG_INVALID(i)) continue; - dbug_unwind(2, "register %d. where=%d\n", i, state->regs[i].where); - switch (state->regs[i].where) { + dbug_unwind(2, "register %d. where=%d\n", i, REG_STATE.regs[i].where); + switch (REG_STATE.regs[i].where) { case Nowhere: if (reg_info[i].width != sizeof(UNW_SP(frame)) || &FRAME_REG(i, __typeof__(UNW_SP(frame))) @@ -1201,7 +1246,7 @@ case Register: switch (reg_info[i].width) { #define CASE(n) case sizeof(u##n): \ - FRAME_REG(i, u##n) = state->regs[i].value; \ + FRAME_REG(i, u##n) = REG_STATE.regs[i].value; \ break CASES; #undef CASE @@ -1211,15 +1256,15 @@ } break; case Expr: - if (compute_expr(state->regs[i].expr, frame, &addr)) + if (compute_expr(REG_STATE.regs[i].expr, frame, &addr)) goto err; goto memory; case ValExpr: - if (compute_expr(state->regs[i].expr, frame, &addr)) + if (compute_expr(REG_STATE.regs[i].expr, frame, &addr)) goto err; goto value; case Value: - addr = cfa + state->regs[i].value * state->dataAlign; + addr = cfa + REG_STATE.regs[i].value * state->dataAlign; value: if (reg_info[i].width != sizeof(unsigned long)) { _stp_warn("bad Register width\n"); @@ -1228,7 +1273,7 @@ FRAME_REG(i, unsigned long) = addr; break; case Memory: - addr = cfa + state->regs[i].value * state->dataAlign; + addr = cfa + REG_STATE.regs[i].value * state->dataAlign; memory: dbug_unwind(2, "addr=%lx width=%d\n", addr, reg_info[i].width); switch (reg_info[i].width) { @@ -1250,7 +1295,7 @@ return 0; copy_failed: - _stp_warn("_stp_read_address failed to access memory\n"); + _stp_warn("_stp_read_address failed to access memory location\n"); err: return -EIO; diff -Nru systemtap-1.4/runtime/uprobes/Makefile systemtap-1.6/runtime/uprobes/Makefile --- systemtap-1.4/runtime/uprobes/Makefile 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/runtime/uprobes/Makefile 2011-07-25 18:12:01.000000000 +0000 @@ -9,20 +9,36 @@ CLEAN_FILES += Module.markers modules.order Module.symvers CLEAN_DIRS := .tmp_versions -LIBEXECDIR=../../../../libexec/systemtap +LIBEXECDIR = ../../../../libexec/systemtap +CERTDB = ../../../../etc/systemtap/staprun -# Build the module and sign it. +# Build the module and, if we are root or stap-server, sign it. +# Make sure that all the required tools and resources are available +# before attempting to sign the module. # Ensure that the generated files are writeable by the group which # owns this build directory. This is so that the stap-server service # can rebuild the module, if necessary. default: $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules - if test -f $(LIBEXECDIR)/stap-sign-module; then \ - for f in *.ko; do \ - if test ! -e $$f.sgn -o $$f.sgn -ot $$f; then \ - $(LIBEXECDIR)/stap-sign-module $$f; \ - fi \ - done \ + if test `id -u` = 0 -o `id -un` = stap-server; then \ + if test -x $(LIBEXECDIR)/stap-sign-module; then \ + stap_dir=${SYSTEMTAP_DIR}; \ + if test -z "$$stap_dir"; then \ + stap_dir=~/.systemtap; \ + fi; \ + certfile=$$stap_dir/ssl/server/stap.cert; \ + if test ! -f $$certfile -o -f $$stap_dir/ssl/server/pw; then \ + $(LIBEXECDIR)/stap-gen-cert > /dev/null; \ + fi; \ + if test `id -u` = 0; then \ + $(LIBEXECDIR)/stap-authorize-cert $$certfile $(CERTDB) > /dev/null; \ + fi; \ + for f in *.ko; do \ + if test ! -e $$f.sgn -o $$f.sgn -ot $$f; then \ + $(LIBEXECDIR)/stap-sign-module $$f > /dev/null; \ + fi \ + done \ + fi \ fi group=`stat -c %G $(PWD)`; \ for f in $(CLEAN_FILES); do \ diff -Nru systemtap-1.4/runtime/uprobes/uprobes.c systemtap-1.6/runtime/uprobes/uprobes.c --- systemtap-1.4/runtime/uprobes/uprobes.c 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/runtime/uprobes/uprobes.c 2011-07-25 18:12:01.000000000 +0000 @@ -24,8 +24,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * along with this program. If not, see . * * Copyright (C) IBM Corporation, 2006 */ diff -Nru systemtap-1.4/runtime/uprobes/uprobes.h systemtap-1.6/runtime/uprobes/uprobes.h --- systemtap-1.4/runtime/uprobes/uprobes.h 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/runtime/uprobes/uprobes.h 2011-07-25 18:12:01.000000000 +0000 @@ -27,8 +27,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * along with this program. If not, see . * * Copyright (C) IBM Corporation, 2006 */ diff -Nru systemtap-1.4/runtime/uprobes/uprobes_i386.c systemtap-1.6/runtime/uprobes/uprobes_i386.c --- systemtap-1.4/runtime/uprobes/uprobes_i386.c 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/runtime/uprobes/uprobes_i386.c 2011-07-25 18:12:01.000000000 +0000 @@ -13,8 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * along with this program. If not, see . * * Copyright (C) IBM Corporation, 2006 */ @@ -32,7 +31,7 @@ (b8##UL << 0x8)|(b9##UL << 0x9)|(ba##UL << 0xa)|(bb##UL << 0xb) | \ (bc##UL << 0xc)|(bd##UL << 0xd)|(be##UL << 0xe)|(bf##UL << 0xf)) \ << (row % 32)) - static const unsigned long good_insns[256 / 32] = { + static const volatile unsigned long good_insns[256 / 32] = { /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */ /* ------------------------------- */ W(0x00, 1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0)| /* 00 */ @@ -55,7 +54,7 @@ /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */ }; - static const unsigned long good_2byte_insns[256 / 32] = { + static const volatile unsigned long good_2byte_insns[256 / 32] = { /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */ /* ------------------------------- */ W(0x00, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1)| /* 00 */ @@ -175,7 +174,8 @@ int prefix_ok = 0; switch (*insn) { case 0xc3: /* ret */ - if ((insn - ppt->insn == 1) && (*ppt->insn == 0xf3)) + if ((insn - ppt->insn == 1) && + (*ppt->insn == 0xf3 || *ppt->insn == 0xf2)) /* * "rep ret" is an AMD kludge that's used by GCC, * so we need to treat it like a normal ret. diff -Nru systemtap-1.4/runtime/uprobes/uprobes_i386.h systemtap-1.6/runtime/uprobes/uprobes_i386.h --- systemtap-1.4/runtime/uprobes/uprobes_i386.h 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/runtime/uprobes/uprobes_i386.h 2011-07-25 18:12:01.000000000 +0000 @@ -15,8 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * along with this program. If not, see . * * Copyright (C) IBM Corporation, 2006 */ diff -Nru systemtap-1.4/runtime/uprobes/uprobes_ppc.c systemtap-1.6/runtime/uprobes/uprobes_ppc.c --- systemtap-1.4/runtime/uprobes/uprobes_ppc.c 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/runtime/uprobes/uprobes_ppc.c 2011-07-25 18:12:01.000000000 +0000 @@ -12,8 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * along with this program. If not, see . * * Copyright IBM Corporation, 2007 */ diff -Nru systemtap-1.4/runtime/uprobes/uprobes_ppc.h systemtap-1.6/runtime/uprobes/uprobes_ppc.h --- systemtap-1.4/runtime/uprobes/uprobes_ppc.h 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/runtime/uprobes/uprobes_ppc.h 2011-07-25 18:12:01.000000000 +0000 @@ -14,8 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * along with this program. If not, see . * * Copyright IBM Corporation, 2007 */ diff -Nru systemtap-1.4/runtime/uprobes/uprobes_s390.c systemtap-1.6/runtime/uprobes/uprobes_s390.c --- systemtap-1.4/runtime/uprobes/uprobes_s390.c 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/runtime/uprobes/uprobes_s390.c 2011-07-25 18:12:01.000000000 +0000 @@ -13,8 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * along with this program. If not, see . * * Copyright (C) IBM Corporation, 2006 */ diff -Nru systemtap-1.4/runtime/uprobes/uprobes_s390.h systemtap-1.6/runtime/uprobes/uprobes_s390.h --- systemtap-1.4/runtime/uprobes/uprobes_s390.h 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/runtime/uprobes/uprobes_s390.h 2011-07-25 18:12:01.000000000 +0000 @@ -18,8 +18,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * along with this program. If not, see . * * Copyright (C) IBM Corporation, 2006 */ diff -Nru systemtap-1.4/runtime/uprobes/uprobes_x86_64.c systemtap-1.6/runtime/uprobes/uprobes_x86_64.c --- systemtap-1.4/runtime/uprobes/uprobes_x86_64.c 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/runtime/uprobes/uprobes_x86_64.c 2011-07-25 18:12:01.000000000 +0000 @@ -13,8 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * along with this program. If not, see . * * Copyright (C) IBM Corporation, 2006-2007 */ @@ -34,7 +33,7 @@ (bc##UL << 0xc)|(bd##UL << 0xd)|(be##UL << 0xe)|(bf##UL << 0xf)) \ << (row % 64)) -static const unsigned long good_insns_64[256 / 64] = { +static const volatile unsigned long good_insns_64[256 / 64] = { /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */ /* ------------------------------- */ W(0x00, 1,1,1,1,1,1,0,0,1,1,1,1,1,1,0,0)| /* 00 */ @@ -59,7 +58,7 @@ /* Good-instruction tables for 32-bit apps -- copied from i386 uprobes */ -static const unsigned long good_insns_32[256 / 64] = { +static const volatile unsigned long good_insns_32[256 / 64] = { /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */ /* ------------------------------- */ W(0x00, 1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0)| /* 00 */ @@ -83,7 +82,7 @@ }; /* Using this for both 64-bit and 32-bit apps */ -static const unsigned long good_2byte_insns[256 / 64] = { +static const volatile unsigned long good_2byte_insns[256 / 64] = { /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */ /* ------------------------------- */ W(0x00, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1)| /* 00 */ @@ -210,7 +209,8 @@ int prefix_ok = 0; switch (*insn) { case 0xc3: /* ret */ - if ((insn - ppt->insn == 1) && (*ppt->insn == 0xf3)) + if ((insn - ppt->insn == 1) && + (*ppt->insn == 0xf3 || *ppt->insn == 0xf2)) /* * "rep ret" is an AMD kludge that's used by GCC, * so we need to treat it like a normal ret. @@ -276,7 +276,7 @@ if (test_bit(insn[1], good_2byte_insns)) return 0; report_bad_2byte_opcode(insn[1]); - } else + } else report_bad_1byte_opcode(32, insn[0]); return -EPERM; } @@ -304,7 +304,7 @@ if (test_bit(insn[1], good_2byte_insns)) return 0; report_bad_2byte_opcode(insn[1]); - } else + } else report_bad_1byte_opcode(64, insn[0]); return -EPERM; } @@ -383,7 +383,7 @@ * TODO: These tables are common for kprobes and uprobes and can be moved * to a common place. */ -static const u64 onebyte_has_modrm[256 / 64] = { +static const volatile u64 onebyte_has_modrm[256 / 64] = { /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */ /* ------------------------------- */ W(0x00, 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0)| /* 00 */ @@ -405,7 +405,7 @@ /* ------------------------------- */ /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */ }; -static const u64 twobyte_has_modrm[256 / 64] = { +static const volatile u64 twobyte_has_modrm[256 / 64] = { /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */ /* ------------------------------- */ W(0x00, 1,1,1,1,0,0,0,0,0,0,0,0,0,1,0,1)| /* 0f */ @@ -502,7 +502,6 @@ + 1 /* modrm byte */ + 4 /* offset */ + immed_size; /* immediate field */ -#undef DEBUG_UPROBES_RIP #ifdef DEBUG_UPROBES_RIP { int i; diff -Nru systemtap-1.4/runtime/uprobes/uprobes_x86_64.h systemtap-1.6/runtime/uprobes/uprobes_x86_64.h --- systemtap-1.4/runtime/uprobes/uprobes_x86_64.h 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/runtime/uprobes/uprobes_x86_64.h 2011-07-25 18:12:01.000000000 +0000 @@ -15,8 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * along with this program. If not, see . * * Copyright (C) IBM Corporation, 2006 */ diff -Nru systemtap-1.4/runtime/uprobes/uprobes_x86.c systemtap-1.6/runtime/uprobes/uprobes_x86.c --- systemtap-1.4/runtime/uprobes/uprobes_x86.c 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/runtime/uprobes/uprobes_x86.c 2011-07-25 18:12:01.000000000 +0000 @@ -13,8 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * along with this program. If not, see . * * Copyright (C) IBM Corporation, 2006-2008 */ @@ -34,7 +33,7 @@ (bc##ULL << 0xc)|(bd##ULL << 0xd)|(be##ULL << 0xe)|(bf##ULL << 0xf)) \ << (row % 64)) -static const unsigned long long good_insns_64[256 / 64] = { +static const volatile unsigned long long good_insns_64[256 / 64] = { /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */ /* ------------------------------- */ W(0x00, 1,1,1,1,1,1,0,0,1,1,1,1,1,1,0,0)| /* 00 */ @@ -59,7 +58,7 @@ /* Good-instruction tables for 32-bit apps -- copied from i386 uprobes */ -static const unsigned long long good_insns_32[256 / 64] = { +static const volatile unsigned long long good_insns_32[256 / 64] = { /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */ /* ------------------------------- */ W(0x00, 1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0)| /* 00 */ @@ -83,7 +82,7 @@ }; /* Using this for both 64-bit and 32-bit apps */ -static const unsigned long long good_2byte_insns[256 / 64] = { +static const volatile unsigned long long good_2byte_insns[256 / 64] = { /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */ /* ------------------------------- */ W(0x00, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1)| /* 00 */ @@ -210,7 +209,8 @@ int prefix_ok = 0; switch (*insn) { case 0xc3: /* ret */ - if ((insn - ppt->insn == 1) && (*ppt->insn == 0xf3)) + if ((insn - ppt->insn == 1) && + (*ppt->insn == 0xf3 || *ppt->insn == 0xf2)) /* * "rep ret" is an AMD kludge that's used by GCC, * so we need to treat it like a normal ret. @@ -276,7 +276,7 @@ if (test_bit(insn[1], (unsigned long*)good_2byte_insns)) return 0; report_bad_2byte_opcode(insn[1]); - } else + } else report_bad_1byte_opcode(32, insn[0]); return -EPERM; } @@ -304,7 +304,7 @@ if (test_bit(insn[1], (unsigned long*)good_2byte_insns)) return 0; report_bad_2byte_opcode(insn[1]); - } else + } else report_bad_1byte_opcode(64, insn[0]); return -EPERM; } @@ -390,7 +390,7 @@ * TODO: These tables are common for kprobes and uprobes and can be moved * to a common place. */ -static const u64 onebyte_has_modrm[256 / 64] = { +static const volatile u64 onebyte_has_modrm[256 / 64] = { /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */ /* ------------------------------- */ W(0x00, 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0)| /* 00 */ @@ -412,7 +412,7 @@ /* ------------------------------- */ /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */ }; -static const u64 twobyte_has_modrm[256 / 64] = { +static const volatile u64 twobyte_has_modrm[256 / 64] = { /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */ /* ------------------------------- */ W(0x00, 1,1,1,1,0,0,0,0,0,0,0,0,0,1,0,1)| /* 0f */ @@ -509,7 +509,6 @@ + 1 /* modrm byte */ + 4 /* offset */ + immed_size; /* immediate field */ -#undef DEBUG_UPROBES_RIP #ifdef DEBUG_UPROBES_RIP { int i; diff -Nru systemtap-1.4/runtime/uprobes/uprobes_x86.h systemtap-1.6/runtime/uprobes/uprobes_x86.h --- systemtap-1.4/runtime/uprobes/uprobes_x86.h 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/runtime/uprobes/uprobes_x86.h 2011-07-25 18:12:01.000000000 +0000 @@ -15,8 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * along with this program. If not, see . * * Copyright (C) IBM Corporation, 2008 */ diff -Nru systemtap-1.4/runtime/uprobes2/uprobes.c systemtap-1.6/runtime/uprobes2/uprobes.c --- systemtap-1.4/runtime/uprobes2/uprobes.c 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/runtime/uprobes2/uprobes.c 2011-07-25 18:12:01.000000000 +0000 @@ -13,8 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * along with this program. If not, see . * * Copyright (C) IBM Corporation, 2006 * Copyright (C) Red Hat, Inc. 2009 diff -Nru systemtap-1.4/runtime/uprobes2/uprobes.h systemtap-1.6/runtime/uprobes2/uprobes.h --- systemtap-1.4/runtime/uprobes2/uprobes.h 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/runtime/uprobes2/uprobes.h 2011-07-25 18:12:01.000000000 +0000 @@ -15,8 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * along with this program. If not, see . * * Copyright (C) IBM Corporation, 2006 */ diff -Nru systemtap-1.4/runtime/uprobes2/uprobes_x86.c systemtap-1.6/runtime/uprobes2/uprobes_x86.c --- systemtap-1.4/runtime/uprobes2/uprobes_x86.c 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/runtime/uprobes2/uprobes_x86.c 2011-07-25 18:12:01.000000000 +0000 @@ -13,8 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * along with this program. If not, see . * * Copyright (C) IBM Corporation, 2006-2008 */ @@ -39,7 +38,7 @@ (bc##ULL<< 0xc)|(bd##ULL<< 0xd)|(be##ULL<< 0xe)|(bf##ULL<< 0xf)) \ << (row % 64)) -static const u64 good_insns_64[256 / 64] = { +static const volatile u64 good_insns_64[256 / 64] = { /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */ /* ------------------------------- */ W(0x00, 1,1,1,1,1,1,0,0,1,1,1,1,1,1,0,0)| /* 00 */ @@ -64,7 +63,7 @@ /* Good-instruction tables for 32-bit apps -- copied from i386 uprobes */ -static const u64 good_insns_32[256 / 64] = { +static const volatile u64 good_insns_32[256 / 64] = { /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */ /* ------------------------------- */ W(0x00, 1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0)| /* 00 */ @@ -88,7 +87,7 @@ }; /* Using this for both 64-bit and 32-bit apps */ -static const u64 good_2byte_insns[256 / 64] = { +static const volatile u64 good_2byte_insns[256 / 64] = { /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */ /* ------------------------------- */ W(0x00, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1)| /* 00 */ @@ -215,7 +214,8 @@ int prefix_ok = 0; switch (*insn) { case 0xc3: /* ret */ - if ((insn - ppt->insn == 1) && (*ppt->insn == 0xf3)) + if ((insn - ppt->insn == 1) && + (*ppt->insn == 0xf3 || *ppt->insn == 0xf2)) /* * "rep ret" is an AMD kludge that's used by GCC, * so we need to treat it like a normal ret. @@ -395,7 +395,7 @@ * TODO: These tables are common for kprobes and uprobes and can be moved * to a common place. */ -static const u64 onebyte_has_modrm[256 / 64] = { +static const volatile u64 onebyte_has_modrm[256 / 64] = { /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */ /* ------------------------------- */ W(0x00, 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0)| /* 00 */ @@ -417,7 +417,7 @@ /* ------------------------------- */ /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */ }; -static const u64 twobyte_has_modrm[256 / 64] = { +static const volatile u64 twobyte_has_modrm[256 / 64] = { /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */ /* ------------------------------- */ W(0x00, 1,1,1,1,0,0,0,0,0,0,0,0,0,1,0,1)| /* 0f */ @@ -514,7 +514,6 @@ + 1 /* modrm byte */ + 4 /* offset */ + immed_size; /* immediate field */ -#undef DEBUG_UPROBES_RIP #ifdef DEBUG_UPROBES_RIP { int i; diff -Nru systemtap-1.4/runtime/uprobes2/uprobes_x86.h systemtap-1.6/runtime/uprobes2/uprobes_x86.h --- systemtap-1.4/runtime/uprobes2/uprobes_x86.h 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/runtime/uprobes2/uprobes_x86.h 2011-07-25 18:12:01.000000000 +0000 @@ -15,8 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * along with this program. If not, see . * * Copyright (C) IBM Corporation, 2008 */ diff -Nru systemtap-1.4/runtime/uprobes-common.c systemtap-1.6/runtime/uprobes-common.c --- systemtap-1.4/runtime/uprobes-common.c 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/runtime/uprobes-common.c 2011-07-25 18:12:01.000000000 +0000 @@ -266,26 +266,53 @@ } /* The task_finder_mmap_callback */ -static int stap_uprobe_mmap_found (struct stap_task_finder_target *tgt, struct task_struct *tsk, char *path, struct dentry *dentry, unsigned long addr, unsigned long length, unsigned long offset, unsigned long vm_flags) { +static int +stap_uprobe_mmap_found (struct stap_task_finder_target *tgt, + struct task_struct *tsk, char *path, + struct dentry *dentry, unsigned long addr, + unsigned long length, unsigned long offset, + unsigned long vm_flags) +{ + int rc = 0; const struct stap_uprobe_tf *stf = container_of(tgt, struct stap_uprobe_tf, finder); /* 1 - shared libraries' executable segments load from offset 0 - - ld.so convention offset != 0 is now allowed - so stap_uprobe_change_plus can set a semaphore, - i.e. a static extern, in a shared object - 2 - the shared library we're interested in - 3 - mapping should be executable or writeable (for semaphore in .so) */ - if (path == NULL || strcmp (path, stf->pathname)) return 0; - if (vm_flags & VM_EXEC) { + * - ld.so convention offset != 0 is now allowed + * so stap_uprobe_change_plus can set a semaphore, + * i.e. a static extern, in a shared object + * 2 - the shared library we're interested in + * 3 - mapping should be executable or writeable (for semaphore in .so) + * NB: or both, on kernels that lack noexec mapping + */ + if (path == NULL || strcmp (path, stf->pathname)) + return 0; + + /* Check non-writable, executable sections for probes. */ + if ((vm_flags & VM_EXEC) && !(vm_flags & VM_WRITE)) { #ifdef DEBUG_TASK_FINDER_VMA - _stp_dbug (__FUNCTION__,__LINE__, "+mmap R-X pid %d path %s addr %p length %u offset %p stf %p %p path %s\n", tsk->tgid, path, (void *) addr, (unsigned)length, (void*) offset, tgt, stf, stf->pathname); + _stp_dbug (__FUNCTION__,__LINE__, + "+mmap X pid %d path %s addr %p length %u offset %p stf %p %p path %s\n", + tsk->tgid, path, (void *) addr, (unsigned)length, (void*) offset, + tgt, stf, stf->pathname); #endif - return stap_uprobe_change_plus (tsk, addr, length, stf, offset, vm_flags); - } else if (vm_flags & VM_WRITE) { + rc = stap_uprobe_change_plus (tsk, addr, length, stf, offset, vm_flags); + } + + /* Check writeable sections for semaphores. + * NB: They may have also been executable for the check above, if we're + * running a kernel that lacks noexec mappings. So long as there's + * no error (rc == 0), we need to look for semaphores too. + */ + if ((rc == 0) && (vm_flags & VM_WRITE)) { #ifdef DEBUG_TASK_FINDER_VMA - _stp_dbug (__FUNCTION__,__LINE__, "+mmap RW- pid %d path %s addr %p length %u offset %p stf %p %p path %s\n", tsk->tgid, path, (void *) addr, (unsigned)length, (void*) offset, tgt, stf, stf->pathname); + _stp_dbug (__FUNCTION__,__LINE__, + "+mmap W pid %d path %s addr %p length %u offset %p stf %p %p path %s\n", + tsk->tgid, path, (void *) addr, (unsigned)length, (void*) offset, + tgt, stf, stf->pathname); #endif - return stap_uprobe_change_semaphore_plus (tsk, addr, length, stf); - } else return 0; + rc = stap_uprobe_change_semaphore_plus (tsk, addr, length, stf); + } + + return rc; } /* The task_finder_munmap_callback */ diff -Nru systemtap-1.4/scripts/probe_perf/bench.c systemtap-1.6/scripts/probe_perf/bench.c --- systemtap-1.4/scripts/probe_perf/bench.c 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/scripts/probe_perf/bench.c 2011-07-25 18:12:01.000000000 +0000 @@ -1119,6 +1119,7 @@ #define LOOP 500 #endif +int main () { int i,j; @@ -1201,4 +1202,5 @@ for (j = 1; j <= fft_cycles_idx; j++) fft_cycles_avg += (*fft_cycles)[j]; printf ("fft_cycles %#lx\n", fft_cycles_avg / fft_cycles_idx); + return 0; } diff -Nru systemtap-1.4/scripts/probe_perf/bench.sh systemtap-1.6/scripts/probe_perf/bench.sh --- systemtap-1.4/scripts/probe_perf/bench.sh 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/scripts/probe_perf/bench.sh 2011-07-25 18:12:01.000000000 +0000 @@ -104,7 +104,7 @@ else STAP=/usr/ fi -echo Using /usr/bin/stap +echo Using $STAP/bin/stap if [ ! -z "$TESTSRC" ] ; then if [ ! -r "$TESTSRC/sys/sdt.h" ] ; then @@ -112,7 +112,7 @@ exit fi else - echo You must specify the directory where the testsuite sources are found. + echo -e 'The testsuite sources containing directory must be given\nso the compatible sdt.h can be found' usage fi echo Using $TESTSRC/sys/sdt.h @@ -124,7 +124,7 @@ stap_test EXPERIMENTAL_KPROBE_SDT kprobe echo -e "\n##### UPROBE V1 #####\n" -stap_test UPROBE_SDT uprobe +stap_test STAP_SDT_V1 uprobe echo -e "\n##### UPROBE V2 #####\n" stap_test STAP_SDT_V2 uprobe2 diff -Nru systemtap-1.4/session.cxx systemtap-1.6/session.cxx --- systemtap-1.4/session.cxx 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/session.cxx 2011-07-25 18:12:01.000000000 +0000 @@ -47,8 +47,13 @@ #define PATH_TBD string("__TBD__") +#if HAVE_NSS +bool systemtap_session::NSPR_Initialized = false; +#endif + systemtap_session::systemtap_session (): // NB: pointer members must be manually initialized! + // NB: don't forget the copy constructor too! base_hash(0), pattern_root(new match_node), user_file (0), @@ -107,7 +112,9 @@ module_name = "stap_" + lex_cast(getpid()); stapconf_name = "stapconf_" + lex_cast(getpid()) + ".h"; output_file = ""; // -o FILE + tmpdir_opt_set = false; save_module = false; + modname_given = false; keep_tmpdir = false; cmd = ""; target_pid = 0; @@ -127,7 +134,11 @@ compatible = VERSION; // XXX: perhaps also process GIT_SHAID if available? unwindsym_ldd = false; client_options = false; - NSPR_Initialized = false; + server_cache = NULL; + automatic_server_mode = false; + use_server_on_error = false; + try_server_status = try_server_unset; + use_remote_prefix = false; systemtap_v_check = false; /* adding in the XDG_DATA_DIRS variable path, @@ -172,9 +183,8 @@ { const char* e = strerror (errno); if (! suppress_warnings) - cerr << "Warning: failed to create systemtap data directory (\"" - << data_path << "\"): " << e - << ", disabling cache support." << endl; + cerr << _F("Warning: failed to create systemtap data directory \"%s\":%s, disabling cache support.", + data_path.c_str(),e) << endl; use_cache = use_script_cache = false; } @@ -185,9 +195,8 @@ { const char* e = strerror (errno); if (! suppress_warnings) - cerr << "Warning: failed to create cache directory (\"" - << cache_path << "\"): " << e - << ", disabling cache support." << endl; + cerr << _F("Warning: failed to create cache directory (\" %s \"): %s, disabling cache support.", + cache_path.c_str(),e) << endl; use_cache = use_script_cache = false; } } @@ -202,54 +211,160 @@ } } -systemtap_session::~systemtap_session () +systemtap_session::systemtap_session (const systemtap_session& other, + const string& arch, + const string& kern): + // NB: pointer members must be manually initialized! + // NB: this needs to consider everything that the base ctor does, + // plus copying any wanted implicit fields (strings, vectors, etc.) + base_hash(0), + pattern_root(new match_node), + user_file (other.user_file), + be_derived_probes(0), + dwarf_derived_probes(0), + kprobe_derived_probes(0), + hwbkpt_derived_probes(0), + perf_derived_probes(0), + uprobe_derived_probes(0), + utrace_derived_probes(0), + itrace_derived_probes(0), + task_finder_derived_probes(0), + timer_derived_probes(0), + profile_derived_probes(0), + mark_derived_probes(0), + tracepoint_derived_probes(0), + hrtimer_derived_probes(0), + procfs_derived_probes(0), + op (0), up (0), + sym_kprobes_text_start (0), + sym_kprobes_text_end (0), + sym_stext (0), + module_cache (0), + last_token (0) { -#if HAVE_NSS - if (NSPR_Initialized) - PR_Cleanup (); -#endif // HAVE_NSS + release = kernel_release = kern; + kernel_build_tree = "/lib/modules/" + kernel_release + "/build"; + architecture = machine = normalize_machine(arch); + setup_kernel_release(kern.c_str()); + + // These are all copied in the same order as the default ctor did above. + + copy(other.perpass_verbose, other.perpass_verbose + 5, perpass_verbose); + verbose = other.verbose; + + have_script = other.have_script; + runtime_specified = other.runtime_specified; + include_arg_start = other.include_arg_start; + timing = other.timing; + guru_mode = other.guru_mode; + bulk_mode = other.bulk_mode; + unoptimized = other.unoptimized; + suppress_warnings = other.suppress_warnings; + panic_warnings = other.panic_warnings; + listing_mode = other.listing_mode; + listing_mode_vars = other.listing_mode_vars; + + prologue_searching = other.prologue_searching; + + buffer_size = other.buffer_size; + last_pass = other.last_pass; + module_name = other.module_name; + stapconf_name = other.stapconf_name; + output_file = other.output_file; // XXX how should multiple remotes work? + tmpdir_opt_set = false; + save_module = other.save_module; + modname_given = other.modname_given; + keep_tmpdir = other.keep_tmpdir; + cmd = other.cmd; + target_pid = other.target_pid; // XXX almost surely nonsense for multiremote + use_cache = other.use_cache; + use_script_cache = other.use_script_cache; + poison_cache = other.poison_cache; + tapset_compile_coverage = other.tapset_compile_coverage; + need_uprobes = false; + uprobes_path = ""; + consult_symtab = other.consult_symtab; + ignore_vmlinux = other.ignore_vmlinux; + ignore_dwarf = other.ignore_dwarf; + load_only = other.load_only; + skip_badvars = other.skip_badvars; + unprivileged = other.unprivileged; + omit_werror = other.omit_werror; + compatible = other.compatible; + unwindsym_ldd = other.unwindsym_ldd; + client_options = other.client_options; + server_cache = NULL; + use_server_on_error = other.use_server_on_error; + try_server_status = other.try_server_status; + use_remote_prefix = other.use_remote_prefix; + systemtap_v_check = other.systemtap_v_check; + + include_path = other.include_path; + runtime_path = other.runtime_path; + + // NB: assuming that "other" created these already + data_path = other.data_path; + cache_path = other.cache_path; + + tapset_compile_coverage = other.tapset_compile_coverage; + + + // These are fields that were left to their default ctor, but now we want to + // copy them from "other". In the same order as declared... + script_file = other.script_file; + cmdline_script = other.cmdline_script; + macros = other.macros; + args = other.args; + kbuildflags = other.kbuildflags; + globalopts = other.globalopts; + + client_options_disallowed = other.client_options_disallowed; + server_status_strings = other.server_status_strings; + specified_servers = other.specified_servers; + server_trust_spec = other.server_trust_spec; + server_args = other.server_args; + unwindsym_modules = other.unwindsym_modules; +} + +systemtap_session::~systemtap_session () +{ delete_map(subsessions); } +#if HAVE_NSS void systemtap_session::NSPR_init () { -#if HAVE_NSS if (! NSPR_Initialized) { PR_Init (PR_SYSTEM_THREAD, PR_PRIORITY_NORMAL, 1); NSPR_Initialized = true; } -#endif // HAVE_NSS } +#endif // HAVE_NSS systemtap_session* systemtap_session::clone(const string& arch, const string& release) { - if (this->architecture == arch && this->kernel_release == release) + const string norm_arch = normalize_machine(arch); + if (this->architecture == norm_arch && this->kernel_release == release) return this; - systemtap_session*& s = subsessions[make_pair(arch, release)]; + systemtap_session*& s = subsessions[make_pair(norm_arch, release)]; if (!s) - { - s = new systemtap_session(*this); - s->machine = s->architecture = arch; - s->setup_kernel_release(release.c_str()); - } + s = new systemtap_session(*this, norm_arch, release); return s; } void systemtap_session::version () { - clog - << "SystemTap translator/driver " - << "(version " << VERSION << "/" << dwfl_version (NULL) - << " " << GIT_MESSAGE << ")" << endl - << "Copyright (C) 2005-2011 Red Hat, Inc. and others" << endl - << "This is free software; see the source for copying conditions." << endl; - clog << "enabled features:" + clog << _F("Systemtap translator/driver (version %s/%s %s)\n" + "Copyright (C) 2005-2011 Red Hat, Inc. and others\n" + "This is free software; see the source for copying conditions.", + VERSION, dwfl_version(NULL), GIT_MESSAGE) << endl; + clog << _("enabled features:") #ifdef HAVE_AVAHI << " AVAHI" #endif @@ -271,6 +386,9 @@ #ifdef ENABLE_PROLOGUES << " PROLOGUES" #endif +#ifdef ENABLE_NLS + << " NLS" +#endif << endl; } @@ -280,110 +398,118 @@ version (); clog << endl - << "Usage: stap [options] FILE Run script in file." - << endl - << " or: stap [options] - Run script on stdin." - << endl - << " or: stap [options] -e SCRIPT Run given script." - << endl - << " or: stap [options] -l PROBE List matching probes." - << endl - << " or: stap [options] -L PROBE List matching probes and local variables." - << endl - << endl - << "Options:" << endl - << " -- end of translator options, script options follow" << endl - << " -h --help show help" << endl - << " -V show version" << endl - << " -p NUM stop after pass NUM 1-5, instead of " << last_pass << endl - << " (parse, elaborate, translate, compile, run)" << endl - << " -v add verbosity to all passes" << endl - << " --vp {N}+ add per-pass verbosity ["; + //Session.cxx:287-390 detail systemtap usage from stap -h + << _F("Usage: stap [options] FILE Run script in file.\n" + " or: stap [options] - Run script on stdin.\n" + " or: stap [options] -e SCRIPT Run given script.\n" + " or: stap [options] -l PROBE List matching probes.\n" + " or: stap [options] -L PROBE List matching probes and local variables.\n\n" + "Options:\n" + " -- end of translator options, script options follow\n" + " -h --help show help\n" + " -V --version show version\n" + " -p NUM stop after pass NUM 1-5, instead of %d\n" + " (parse, elaborate, translate, compile, run)\n" + " -v add verbosity to all passes\n" + " --vp {N}+ add per-pass verbosity [", last_pass); for (unsigned i=0; i<5; i++) clog << (perpass_verbose[i] <= 9 ? perpass_verbose[i] : 9); clog - << "]" << endl - << " -k keep temporary directory" << endl - << " -u unoptimized translation" << (unoptimized ? " [set]" : "") << endl - << " -w suppress warnings" << (suppress_warnings ? " [set]" : "") << endl - << " -W turn warnings into errors" << (panic_warnings ? " [set]" : "") << endl - << " -g guru mode" << (guru_mode ? " [set]" : "") << endl - << " -P prologue-searching for function probes" - << (prologue_searching ? " [set]" : "") << endl - << " -b bulk (percpu file) mode" << (bulk_mode ? " [set]" : "") << endl - << " -s NUM buffer size in megabytes, instead of " << buffer_size << endl - << " -I DIR look in DIR for additional .stp script files"; + << "]" << endl; + clog << _F(" -k keep temporary directory\n" + " -u unoptimized translation %s\n" + " -w suppress warnings %s\n" + " -W turn warnings into errors %s\n" + " -g guru mode %s\n" + " -P prologue-searching for function probes %s\n" + " -b bulk (percpu file) mode %s\n" + " -s NUM buffer size in megabytes, instead of %d\n" + " -I DIR look in DIR for additional .stp script files", (unoptimized ? _(" [set]") : ""), + (suppress_warnings ? _(" [set]") : ""), (panic_warnings ? _(" [set]") : ""), + (guru_mode ? _(" [set]") : ""), (prologue_searching ? _(" [set]") : ""), + (bulk_mode ? _(" [set]") : ""), buffer_size); if (include_path.size() == 0) clog << endl; else - clog << ", in addition to" << endl; + clog << _(", in addition to") << endl; for (unsigned i=0; i syms (unwindsym_modules.begin(), unwindsym_modules.end()); for (unsigned i=0; i 5) { - cerr << "Invalid pass number (should be 1-5)." << endl; + cerr << _("Invalid pass number (should be 1-5).") << endl; return 1; } if (listing_mode && last_pass != 2) { - cerr << "Listing (-l) mode implies pass 2." << endl; + cerr << _("Listing (-l) mode implies pass 2.") << endl; return 1; } push_server_opt = true; @@ -548,7 +682,7 @@ case 'e': if (have_script) { - cerr << "Only one script can be given on the command line." + cerr << _("Only one script can be given on the command line.") << endl; return 1; } @@ -564,7 +698,7 @@ break; case 'R': - if (client_options) { cerr << "ERROR: -R invalid with --client-options" << endl; return 1; } + if (client_options) { cerr << _F("ERROR: %s invalid with %s", "-R", "--client-options") << endl; return 1; } runtime_specified = true; runtime_path = string (optarg); break; @@ -574,20 +708,20 @@ client_options_disallowed += client_options_disallowed.empty () ? "-m" : ", -m"; module_name = string (optarg); save_module = true; + modname_given = true; { // If the module name ends with '.ko', chop it off since // modutils doesn't like modules named 'foo.ko.ko'. if (endswith(module_name, ".ko")) { module_name.erase(module_name.size() - 3); - cerr << "Truncating module name to '" << module_name - << "'" << endl; + cerr << _F("Truncating module name to '%s'", module_name.c_str()) << endl; } // Make sure an empty module name wasn't specified (-m "") if (module_name.empty()) { - cerr << "Module name cannot be empty." << endl; + cerr << _("Module name cannot be empty.") << endl; return 1; } @@ -599,8 +733,7 @@ if (module_name.size() >= (MODULE_NAME_LEN - 1)) { module_name.resize(MODULE_NAME_LEN - 1); - cerr << "Truncating module name to '" << module_name - << "'" << endl; + cerr << _F("Truncating module name to '%s'", module_name.c_str()) << endl; } } @@ -622,7 +755,7 @@ break; case 'k': - push_server_opt = true; + if (client_options) { cerr << _F("ERROR: %s invalid with %s", "-k", "--client-options") << endl; return 1; } keep_tmpdir = true; use_script_cache = false; /* User wants to keep a usable build tree. */ break; @@ -651,7 +784,7 @@ buffer_size = (int) strtoul (optarg, &num_endptr, 10); if (*num_endptr != '\0' || buffer_size < 1 || buffer_size > 4095) { - cerr << "Invalid buffer size (should be 1-4095)." << endl; + cerr << _("Invalid buffer size (should be 1-4095).") << endl; return 1; } push_server_opt = true; @@ -664,7 +797,7 @@ { // This would mess with later code deciding to pass -c // through to staprun - cerr << "Empty CMD string invalid." << endl; + cerr << _("Empty CMD string invalid.") << endl; return 1; } break; @@ -673,7 +806,7 @@ target_pid = (int) strtoul(optarg, &num_endptr, 10); if (*num_endptr != '\0') { - cerr << "Invalid target process ID number." << endl; + cerr << _("Invalid target process ID number.") << endl; return 1; } push_server_opt = true; @@ -694,7 +827,7 @@ break; case 'q': - if (client_options) { cerr << "ERROR: -q invalid with --client-options" << endl; return 1; } + if (client_options) { cerr << _F("ERROR: %s invalid with %s", "-q", "--client-options") << endl; return 1; } push_server_opt = true; tapset_compile_coverage = true; break; @@ -713,7 +846,7 @@ last_pass = 2; if (have_script) { - cerr << "Only one script can be given on the command line." + cerr << _("Only one script can be given on the command line.") << endl; return 1; } @@ -728,7 +861,7 @@ break; case 'B': - if (client_options) { cerr << "ERROR: -B invalid with --client-options" << endl; return 1; } + if (client_options) { cerr << _F("ERROR: %s invalid with %s", "-B", "--client-options") << endl; return 1; } push_server_opt = true; kbuildflags.push_back (string (optarg)); break; @@ -736,6 +869,11 @@ case 0: switch (long_opt) { + case LONG_OPT_VERSION: + push_server_opt = true; + version (); + exit (0); + break; case LONG_OPT_KELF: push_server_opt = true; consult_symtab = true; @@ -744,7 +882,7 @@ // Leave consult_symtab unset for now, to ease error checking. if (!kernel_symtab_path.empty()) { - cerr << "You can't specify multiple --kmap options." << endl; + cerr << _("You can't specify multiple --kmap options.") << endl; return 1; } push_server_opt = true; @@ -775,7 +913,7 @@ if (! ok) { - cerr << "Invalid --vp argument: it takes 1 to 5 digits." << endl; + cerr << _("Invalid --vp argument: it takes 1 to 5 digits.") << endl; return 1; } // NB: we don't do this: last_pass = strlen(optarg); @@ -799,6 +937,12 @@ case LONG_OPT_CLIENT_OPTIONS: client_options = true; break; + case LONG_OPT_TMPDIR: + if (client_options) + client_options_disallowed += client_options_disallowed.empty() ? "--tmpdir" : ", --tmpdir"; + tmpdir_opt_set = true; + tmpdir = optarg; + break; case LONG_OPT_USE_SERVER: if (client_options) client_options_disallowed += client_options_disallowed.empty () ? "--use-server" : ", --use-server"; @@ -807,6 +951,24 @@ else specified_servers.push_back (""); break; + case LONG_OPT_USE_SERVER_ON_ERROR: + if (client_options) + client_options_disallowed += client_options_disallowed.empty () ? "--use-server-on-error" : ", --use-server-on-error"; + if (optarg) + { + string arg = optarg; + for (unsigned i = 0; i < arg.size (); ++i) + arg[i] = tolower (arg[i]); + if (arg == "yes" || arg == "ye" || arg == "y") + use_server_on_error = true; + else if (arg == "no" || arg == "n") + use_server_on_error = false; + else + cerr << _F("Invalid argument '%s' for --use-server-on-error.", optarg) << endl; + } + else + use_server_on_error = true; + break; case LONG_OPT_LIST_SERVERS: if (client_options) client_options_disallowed += client_options_disallowed.empty () ? "--list-servers" : ", --list-servers"; @@ -830,21 +992,21 @@ // The caching options should not be available to server clients case LONG_OPT_DISABLE_CACHE: if (client_options) { - cerr << "ERROR: --disable-cache is invalid with --client-options" << endl; + cerr << _F("ERROR: %s is invalid with %s", "--disable-cache", "--client-options") << endl; return 1; } use_cache = use_script_cache = false; break; case LONG_OPT_POISON_CACHE: if (client_options) { - cerr << "ERROR: --poison-cache is invalid with --client-options" << endl; + cerr << _F("ERROR: %s is invalid with %s", "--poison-cache", "--client-options") << endl; return 1; } poison_cache = true; break; case LONG_OPT_CLEAN_CACHE: if (client_options) { - cerr << "ERROR: --clean-cache is invalid with --client-options" << endl; + cerr << _F("ERROR: %s is invalid with %s", "--clean-cache", "--client-options") << endl; return 1; } clean_cache(*this); @@ -857,7 +1019,7 @@ case LONG_OPT_LDD: if (client_options) { - cerr << "ERROR: --ldd is invalid with --client-options" << endl; + cerr << _F("ERROR: %s is invalid with %s", "--ldd", "--client-options") << endl; return 1; } push_server_opt = true; @@ -866,7 +1028,7 @@ case LONG_OPT_ALL_MODULES: if (client_options) { - cerr << "ERROR: --all-modules is invalid with --client-options" << endl; + cerr << _F("ERROR: %s is invalid with %s", "--all-modules", "--client-options") << endl; return 1; } insert_loaded_modules(); @@ -874,13 +1036,22 @@ case LONG_OPT_REMOTE: if (client_options) { - cerr << "ERROR: --remote is invalid with --client-options" << endl; + cerr << _F("ERROR: %s is invalid with %s", "--remote", "--client-options") << endl; return 1; } remote_uris.push_back(optarg); break; + case LONG_OPT_REMOTE_PREFIX: + if (client_options) { + cerr << _F("ERROR: %s is invalid with %s", "--remote-prefix", "--client-options") << endl; + return 1; + } + + use_remote_prefix = true; + break; + case LONG_OPT_CHECK_VERSION: push_server_opt = true; systemtap_v_check = true; @@ -888,7 +1059,7 @@ default: // NOTREACHED unless one added a getopt option but not a corresponding switch/case: - cerr << "Unhandled long argument id " << long_opt << endl; + cerr << _F("Unhandled long argument id %d", long_opt) << endl; return 1; } break; @@ -902,7 +1073,7 @@ default: // NOTREACHED unless one added a getopt option but not a corresponding switch/case: - cerr << "Unhandled argument code " << (char)grc << endl; + cerr << _F("Unhandled argument code %d", (char)grc) << endl; return 1; break; } @@ -944,27 +1115,25 @@ // We don't need a script if --list-servers or --trust-servers was specified if (server_status_strings.empty () && server_trust_spec.empty ()) { - cerr << "A script must be specified." << endl; + cerr << _("A script must be specified.") << endl; usage(1); } } #if ! HAVE_NSS if (client_options) - cerr << "WARNING: --client-options is not supported by this version of systemtap" << endl; -#endif + cerr << _("WARNING: --client-options is not supported by this version of systemtap") << endl; -#if ! HAVE_NSS if (! server_trust_spec.empty ()) { - cerr << "WARNING: --trust-servers is not supported by this version of systemtap" << endl; + cerr << _("WARNING: --trust-servers is not supported by this version of systemtap") << endl; server_trust_spec.clear (); } #endif if (runtime_specified && ! specified_servers.empty ()) { - cerr << "Warning: Ignoring --use-server due to the use of -R" << endl; + cerr << _("Warning: Ignoring --use-server due to the use of -R") << endl; specified_servers.clear (); } @@ -972,7 +1141,6 @@ { last_pass = 4; /* Quietly downgrade. Server passed through -p5 naively. */ } - // If phase 5 has been requested and the user is a member of stapusr but not // stapdev, then add --unprivileged and --use-server to the invocation, // if not already specified. @@ -985,17 +1153,18 @@ stgr = getgrnam ("stapdev"); if (! stgr || ! in_group_id (stgr->gr_gid)) { + automatic_server_mode = true; if (! unprivileged) { if (perpass_verbose[0] > 1) - cerr << "Using --unprivileged for member of the group stapusr" << endl; + cerr << _("Using --unprivileged for member of the group stapusr") << endl; unprivileged = true; server_args.push_back ("--unprivileged"); } if (specified_servers.empty ()) { if (perpass_verbose[0] > 1) - cerr << "Using --use-server for member of the group stapusr" << endl; + cerr << _("Using --use-server for member of the group stapusr") << endl; specified_servers.push_back (""); } } @@ -1004,37 +1173,45 @@ if (client_options && unprivileged && ! client_options_disallowed.empty ()) { - cerr << "You can't specify " << client_options_disallowed << " when --unprivileged is specified." << endl; + cerr << _F("You can't specify %s when --unprivileged is specified.", + client_options_disallowed.c_str()) << endl; usage (1); } if ((cmd != "") && (target_pid)) { - cerr << "You can't specify -c and -x options together." << endl; + cerr << _F("You can't specify %s and %s together.", "-c", "-x") << endl; usage (1); } if (unprivileged && guru_mode) { - cerr << "You can't specify -g and --unprivileged together." << endl; + cerr << _F("You can't specify %s and %s together.", "-g", "--unprivileged") << endl; usage (1); } if (!kernel_symtab_path.empty()) { if (consult_symtab) { - cerr << "You can't specify --kelf and --kmap together." << endl; + cerr << _F("You can't specify %s and %s together.", "--kelf", "--kmap") << endl; usage (1); } consult_symtab = true; if (kernel_symtab_path == PATH_TBD) kernel_symtab_path = string("/boot/System.map-") + kernel_release; } + // Can't use --remote and --tmpdir together because with --remote, + // there may be more than one tmpdir needed. + if (!remote_uris.empty() && tmpdir_opt_set) + { + cerr << _F("You can't specify %s and %s together.", "--remote", "--tmpdir") << endl; + usage(1); + } // Warn in case the target kernel release doesn't match the running one. if (last_pass > 4 && (release != kernel_release || machine != architecture)) // NB: squashed ARCH by PR4186 logic { if(! suppress_warnings) - cerr << "WARNING: kernel release/architecture mismatch with host forces last-pass 4." << endl; + cerr << _("WARNING: kernel release/architecture mismatch with host forces last-pass 4.") << endl; last_pass = 4; } @@ -1047,8 +1224,39 @@ runtime_path = string(cwd) + "/" + runtime_path; } } + + // Abnormal characters in our temp path can break us, including parts out + // of our control like Kbuild. Let's enforce nice, safe characters only. + const char *tmpdir = getenv("TMPDIR"); + if (tmpdir) + assert_regexp_match("TMPDIR", tmpdir, "^[-/._0-9a-z]+$"); +} + + +void +systemtap_session::init_try_server () +{ +#if HAVE_NSS + // If the option is disabled or we are a server or we are already using a + // server, then never retry compilation using a server. + if (! use_server_on_error || client_options || ! specified_servers.empty ()) + try_server_status = dont_try_server; + else + try_server_status = try_server_unset; +#else + // No client, so don't bother. + try_server_status = dont_try_server; +#endif +} + +void +systemtap_session::set_try_server (int t) +{ + if (try_server_status != dont_try_server) + try_server_status = t; } + void systemtap_session::insert_loaded_modules() { char line[1024]; @@ -1067,25 +1275,16 @@ void systemtap_session::setup_kernel_release (const char* kstr) { + // Sometimes we may get dupes here... e.g. a server may have a full + // -r /path/to/kernel followed by a client's -r kernel. + if (kernel_release == kstr) + return; // nothing new here... + + kernel_release = kernel_build_tree = kernel_source_tree = ""; if (kstr[0] == '/') // fully specified path { kernel_build_tree = kstr; - string version_file_name = kernel_build_tree + "/include/config/kernel.release"; - // The file include/config/kernel.release within the - // build tree is used to pull out the version information - ifstream version_file (version_file_name.c_str()); - if (version_file.fail ()) - { - cerr << "Missing " << version_file_name << endl; - exit(1); - } - else - { - char c; - kernel_release = ""; - while (version_file.get(c) && c != '\n') - kernel_release.push_back(c); - } + kernel_release = kernel_release_from_build_tree (kernel_build_tree, verbose); // PR10745 // Maybe it's a full kernel source tree, for purposes of PR10745. @@ -1099,14 +1298,14 @@ { kernel_source_tree = kernel_build_tree; if (verbose > 2) - clog << "Located kernel source tree (COPYING) at '" - << kernel_source_tree << "'" << endl; + clog << _F("Located kernel source tree (COPYING) at '%s'", kernel_source_tree.c_str()) << endl; } } else { kernel_release = string (kstr); - kernel_build_tree = "/lib/modules/" + kernel_release + "/build"; + if (!kernel_release.empty()) + kernel_build_tree = "/lib/modules/" + kernel_release + "/build"; // PR10745 // Let's not look for the kernel_source_tree; it's definitely @@ -1135,18 +1334,17 @@ for (unsigned n = 0; n < alias->alias_names.size(); ++n) { probe_point * name = alias->alias_names[n]; - match_node * n = pattern_root; + match_node * mn = pattern_root; for (unsigned c = 0; c < name->components.size(); ++c) { probe_point::component * comp = name->components[c]; // XXX: alias parameters if (comp->arg) - throw semantic_error("alias component " - + comp->functor - + " contains illegal parameter"); - n = n->bind(comp->functor); + throw semantic_error(_F("alias component %s contains illegal parameter", + comp->functor.c_str())); + mn = mn->bind(comp->functor); } - n->bind(new alias_expansion_builder(alias)); + mn->bind(new alias_expansion_builder(alias)); } } catch (const semantic_error& e) @@ -1154,7 +1352,7 @@ semantic_error* er = new semantic_error (e); // copy it stringstream msg; msg << e.msg2; - msg << " while registering probe alias "; + msg << _(" while registering probe alias "); alias->printsig(msg); er->msg2 = msg.str(); print_error (* er); @@ -1207,7 +1405,7 @@ { stringstream message; - message << "semantic error: " << e.what (); + message << _F("semantic error: %s", e.what ()); if (e.tok1 || e.tok2) message << ": "; if (e.tok1) @@ -1265,7 +1463,8 @@ end_pos = file_contents.find ('\n', start_pos) + 1; i++; } - message << align << "source: " << file_contents.substr (start_pos, end_pos-start_pos-1) << endl; + //TRANSLATORS: Here were are printing the source string of the error + message << align << _("source: ") << file_contents.substr (start_pos, end_pos-start_pos-1) << endl; message << align << " "; //Navigate to the appropriate column for (i=start_pos; i +#include #include #include @@ -24,6 +26,18 @@ #include } +#if ENABLE_NLS +#define _(string) gettext(string) +#define _N(string, string_plural, count) \ + ngettext((string), (string_plural), (count)) +#else +#define _(string) (string) +#define _N(string, string_plural, count) \ + ( (count) == 1 ? (string) : (string_plural) ) +#endif +#define _F(format, ...) autosprintf(_(format), __VA_ARGS__) +#define _NF(format, format_plural, count, ...) \ + autosprintf(_N((format), (format_plural), (count)), __VA_ARGS__) // forward decls for all referenced systemtap types struct hash; @@ -54,6 +68,7 @@ struct semantic_error; struct module_cache; struct update_visitor; +struct compile_server_cache; // XXX: a generalized form of this descriptor could be associated with // a vardecl instead of out here at the systemtap_session level. @@ -78,6 +93,17 @@ struct systemtap_session { +private: + // disable implicit constructors by not implementing these + systemtap_session (const systemtap_session& other); + systemtap_session& operator= (const systemtap_session& other); + + // copy constructor used by ::clone() + systemtap_session (const systemtap_session& other, + const std::string& arch, + const std::string& kern); + +public: systemtap_session (); ~systemtap_session (); @@ -130,6 +156,7 @@ unsigned verbose; bool timing; bool save_module; + bool modname_given; bool keep_tmpdir; bool guru_mode; bool listing_mode; @@ -143,27 +170,52 @@ bool tapset_compile_coverage; bool need_uprobes; std::string uprobes_path; + std::string uprobes_hash; bool load_only; // flight recorder mode bool omit_werror; bool unprivileged; bool systemtap_v_check; + bool tmpdir_opt_set; // NB: It is very important for all of the above (and below) fields // to be cleared in the systemtap_session ctor (session.cxx). // Client/server - bool NSPR_Initialized; +#if HAVE_NSS + static bool NSPR_Initialized; // only once for all sessions void NSPR_init (); +#endif bool client_options; std::string client_options_disallowed; std::vector server_status_strings; std::vector specified_servers; + bool automatic_server_mode; std::string server_trust_spec; std::vector server_args; std::string winning_server; + compile_server_cache* server_cache; + + // NB: It is very important for all of the above (and below) fields + // to be cleared in the systemtap_session ctor (session.cxx). + + // Mechanism for retrying compilation with a compile server should it fail due + // to lack of resources on the local host. + // Once it has been decided not to try the server (e.g. syntax error), + // that decision cannot be changed. + int try_server_status; + bool use_server_on_error; + + enum { try_server_unset, dont_try_server, do_try_server }; + void init_try_server (); + void set_try_server (int t = do_try_server); + bool try_server () const { return try_server_status == do_try_server; } + + // NB: It is very important for all of the above (and below) fields + // to be cleared in the systemtap_session ctor (session.cxx). // Remote execution std::vector remote_uris; + bool use_remote_prefix; typedef std::map, systemtap_session*> session_map_t; session_map_t subsessions; systemtap_session* clone(const std::string& arch, const std::string& release); diff -Nru systemtap-1.4/setupdwfl.h systemtap-1.6/setupdwfl.h --- systemtap-1.4/setupdwfl.h 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/setupdwfl.h 2011-07-25 18:12:01.000000000 +0000 @@ -1,5 +1,5 @@ // Setup routines for creating fully populated DWFLs. Used in pass 2 and 3. -// Copyright (C) 2009 Red Hat, Inc. +// Copyright (C) 2009-2011 Red Hat, Inc. // // This file is part of systemtap, and is free software. You can // redistribute it and/or modify it under the terms of the GNU General diff -Nru systemtap-1.4/stap.1 systemtap-1.6/stap.1 --- systemtap-1.4/stap.1 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/stap.1 2011-07-25 18:12:01.000000000 +0000 @@ -92,10 +92,10 @@ The systemtap translator supports the following options. Any other option prints a list of supported options. .TP -.B \-h +.B \-h \-\-help Show help message. .TP -.B \-V +.B \-V \-\-version Show version message. .TP .BI \-p " NUM" @@ -192,17 +192,18 @@ larger. .TP .BI \-\-all\-modules -Equivalent to specifying "-dkernel" and a "-d" for each kernel module that is +Equivalent to specifying "\-dkernel" and a "\-d" for each kernel module that is currently loaded. Caution: this can make the probe modules considerably larger. .TP .BI \-o " FILE" Send standard output to named file. In bulk mode, percpu files will -start with FILE_ (FILE_cpu with -F) followed by the cpu number. +start with FILE_ (FILE_cpu with \-F) followed by the cpu number. This supports strftime(3) formats for FILE. .TP .BI \-c " CMD" -Start the probes, run CMD, and exit when CMD finishes. +Start the probes, run CMD, and exit when CMD finishes. This also has the +effect of setting target() to the pid of the command ran. .TP .BI \-x " PID" Sets target() to PID. This allows scripts to be written that filter on @@ -215,12 +216,12 @@ The process result code will indicate failure if there are no matches. .TP .BI \-L " PROBE" -Similar to "-l", but list probe points and script-level local variables. +Similar to "\-l", but list probe points and script-level local variables. .TP .BI \-F -Without -o option, load module and start probes, then detach from the module +Without \-o option, load module and start probes, then detach from the module leaving the probes running. -With -o option, run staprun in background as a daemon and show its pid. +With \-o option, run staprun in background as a daemon and show its pid. .TP .BI \-S " size[,N]" Sets the maximum size of output file and the maximum number of output files. @@ -245,7 +246,7 @@ .\".BI \-\-kmap [=FILE] .\"For names and addresses of kernel functions to probe, .\"consult the symbol table in the indicated text file. -.\"The default is /boot/System.map-VERSION. +.\"The default is /boot/System.map\-VERSION. .\"The contents of this file should be in the form of the default output from .\".IR nm (1). .\"Only symbols of type T or t are used. @@ -259,7 +260,7 @@ .\"See the .\".B "MAKING DO WITH SYMBOL TABLES" .\"section for more information. -.\" --ignore-{vmlinux,dwarf} shouldn't be visible +.\" \-\-ignore\-{vmlinux,dwarf} shouldn't be visible .TP .B \-\-skip\-badvars Ignore out of context variables and substitute with literal 0. @@ -272,12 +273,50 @@ details. .TP -.BI \-\-check-version +.BI \-\-check\-version This option is used to check if the active script has any constructors that may be systemtap version specific. See the DEPRECATION section for more details. .TP +.BI \-\-clean\-cache +This option prunes stale entries from the cache directory. This is normally +done automatically after successful runs, but this option will trigger the +cleanup manually and then exit. See the CACHING section for more details about +cache limits. + +.TP +.BI \-\-disable\-cache +This option disables all use of the cache directory. No files will be either +read from or written to the cache. + +.TP +.BI \-\-poison\-cache +This option treats files in the cache directory as invalid. No files will be +read from the cache, but resulting files from this run will still be written to +the cache. This is meant as a troubleshooting aid when stap's cached behavior +seems to be misbehaving. + +.TP +.BI \-\-unprivileged +This option instructs \fIstap\fR to examine the script looking for constructs +which are not allowed for unprivileged users (see \fIUNPRIVILEGED USERS\fR). +Compilation fails if any such +constructs are used. +If this option is specified when using a compile server +(see \fI\-\-use\-server\fR), +the server will examine the script and, if compilation succeeds, the +server will cryptographically sign the resulting kernel module, certifying +that is it safe for use by unprivileged users. + +If \fI\-\-unprivileged\fR has not been specified, +\fI\-pN\fR has not been specified with N < 5, +and the invoking user not +\fIroot\fR, is not a member of the group \fIstapdev\fR, but is a member of the +group \fIstapusr\fR, then \fIstap\fR will automatically +add \fI\-\-unprivileged\fR to the options already specified. + +.TP \fB\-\-use\-server \fR[\fIHOSTNAME\fR[\fI:PORT\fR] | \fIIP_ADDRESS\fR[\fI:PORT\fR] | \fICERT_SERIAL\fR] Specify compile\-server(s) to be used for compilation and/or in conjunction with @@ -299,11 +338,32 @@ .IR \-\-list\-servers ). The latter is most commonly used when revoking trust in a server (see -.I \-\-trust-servers +.I \-\-trust\-servers below). If a server is specified by host name or ip address, then an optional port number may be specified. This is useful for accessing servers which are not on the local network or to specify a particular server. +If \fI\-\-use\-server\fR has not been specified, +\fI\-pN\fR has not been specified with N < 5, +and the invoking user not \fIroot\fR, +is not a member of the group \fIstapdev\fR, but is a member of the group +\fIstapusr\fR, then \fIstap\fR will automatically +add \fI\-\-use\-server\fR to the options already specified. + +.TP +\fB\-\-use\-server\-on\-error \fR[\fByes\fR|\fBno\fR] +Instructs stap to retry compilation of a script using a compile server if +compilation on the local host fails in a manner which suggests that it might +succeed using a server. +If this option is not specified, the default is \fIno\fR. +If no argument is provided, then the default +is \fIyes\fR. Compilation will be retried for certain types of errors +(e.g. insufficient data or resources) which may not occur during +re\-compilation by a compile +server. Compile servers will be selected automatically for the +re\-compilation attempt as if \fI\-\-use\-server\fR was specified with no +arguments. + .TP .BI \-\-list\-servers " [SERVERS]" Display the status of the requested @@ -346,13 +406,13 @@ If no servers were specified using .IR \-\-use\-server , then the default servers for -.IR \-\-use-server +.IR \-\-use\-server are listed. .TP .BI \-\-trust\-servers " [TRUST_SPEC]" Grant or revoke trust in compile\-servers, specified using -.IR \-\-use-server +.IR \-\-use\-server as specified by TRUST_SPEC, where TRUST_SPEC is a comma\-separated list specifying the trust which is to be granted or revoked. Supported elements are: @@ -397,8 +457,9 @@ not matching your own. This option may be repeated to target multiple execution targets. Passes 1-4 are completed locally as normal to build the script, and then pass 5 will copy the module to the target and run it. -(EXPERIMENTAL) - +If a custom ssh_config file is in use, add +.B SendEnv LANG +to retain internationalization functionality. .SH ARGUMENTS Any additional arguments on the command line are passed to the script @@ -564,7 +625,10 @@ Variables may be declared global, so that they are shared amongst all probes and live as long as the entire systemtap session. There is one namespace for all global variables, regardless of which script file -they are found within. A global declaration may be written at the +they are found within. Concurrent access to global variables is +automatically protected with locks, see the +.B SAFETY AND SECURITY +section for more details. A global declaration may be written at the outermost level anywhere, not within a block of code. Global variables which are written but never read will be displayed automatically at session shutdown. The translator will @@ -576,7 +640,7 @@ .RE .PP Global variables can also be set as module options. One can do this by either -using the -G option, or the module must first be compiled using stap \-p4. +using the \-G option, or the module must first be compiled using stap \-p4. Global variables can then be set on the command line when calling staprun on the module generated by stap \-p4. See .IR staprun (8) @@ -789,7 +853,9 @@ .ESAMPLE defines a new probe point with the given statement as an epilogue, which is useful to take actions based upon variables set or left over by the -the alias user. +the alias user. Please note that in each case, the statements in the +alias handler block are treated ordinarily, so that variables assigned +there constitute mere initialization, not a macro substitution. An alias is used just like a built-in probe type. .SAMPLE @@ -898,7 +964,7 @@ .PP Examples: .SAMPLE - a = "alice", b = "bob", p = 0x1234abcd, i = 123, j = -1, id[a] = 1234, id[b] = 4567 + a = "alice", b = "bob", p = 0x1234abcd, i = 123, j = \-1, id[a] = 1234, id[b] = 4567 print("hello") Prints: hello println(b) @@ -908,7 +974,7 @@ foreach (name in id) printdln("|", strlen(name), name, id[name]) Prints: 5|alice|1234\\n3|bob|4567 printf("%c is %s; %x or %X or %p; %d or %u\\n",97,a,p,p,p,j,j) - Prints: a is alice; 1234abcd or 1234ABCD or 0x1234abcd; -1 or 18446744073709551615\\n + Prints: a is alice; 1234abcd or 1234ABCD or 0x1234abcd; \-1 or 18446744073709551615\\n printf("2 bytes of kernel buffer at address %p: %2m", p, p) Prints: 2 byte of kernel buffer at address 0x1234abcd: printf("%4b", p) @@ -979,7 +1045,7 @@ .I @cast() operator tells the translator how to read a pointer. .SAMPLE -@cast(p, "type_name"[, "module"])->member +@cast(p, "type_name"[, "module"])\->member .ESAMPLE .PP This will interpret @@ -1011,10 +1077,10 @@ All other headers are build with default GCC parameters into a user module. Multiple headers may be specified in sequence to resolve a codependency. .SAMPLE -@cast(tv, "timeval", "")->tv_sec -@cast(task, "task_struct", "kernel")->tgid +@cast(tv, "timeval", "")\->tv_sec +@cast(task, "task_struct", "kernel")\->tgid @cast(task, "task_struct", - "kernel")->fs->umask + "kernel")\->fs\->umask .ESAMPLE Values acquired by .BR @cast @@ -1035,10 +1101,10 @@ members whose type may be determinable at runtime. .SAMPLE probe foo { - if ($var->type == 1) { - value = @cast($var->data, "type1")->bar + if ($var\->type == 1) { + value = @cast($var\->data, "type1")\->bar } else { - value = @cast($var->data, "type2")->baz + value = @cast($var\->data, "type2")\->baz } print(value) } @@ -1119,7 +1185,7 @@ .TP .I /* guru */ means that the C code is so unsafe that a systemtap user must specify -.IR -g +.IR \-g (guru mode) to use this. .TP .I /* string */ @@ -1283,17 +1349,17 @@ groups can build and run any systemtap script. Members of the .I stapusr -group can only use pre-built modules under the following conditions: +group can only use pre\-built modules under the following conditions: .IP \(bu 4 The module is located in the /lib/modules/VERSION/systemtap directory. This directory must be owned by root and not be world writable. .IP \(bu 4 The module has been signed by a trusted signer. Trusted signers are normally -systemtap compile\-servers which sign modules when the --unprivileged option is +systemtap compile\-servers which sign modules when the \-\-unprivileged option is specified by the client. See the -.IR stap-server (8) -manual page for a for more information. +.IR stap\-server (8) +manual page for more information. .PP The kernel modules generated by .I stap @@ -1314,8 +1380,11 @@ The translator asserts certain safety constraints. It aims to ensure that no handler routine can run for very long, allocate memory, perform unsafe operations, or in unintentionally interfere with the -kernel. Use of script global variables is suitably locked to protect -against manipulation by concurrent probe handlers. Use of guru mode +kernel. Uses of script global variables are automatically read/write +locked as appropriate, to protect against manipulation by concurrent probe +handlers. (Deadlocks are detected with timeouts. Use the +.BR \-t +flag to receive reports of excessive lock contention.) Use of guru mode constructs such as embedded C can violate these constraints, leading to kernel crash or data corruption. .PP @@ -1347,7 +1416,11 @@ default (MAXACTION * 10). .TP MAXMAPENTRIES -Maximum number of rows in any single global array, default 2048. +Default maximum number of rows in any single global array, default 2048. +Individual arrays may be declared with a larger or smaller limit instead: +.SAMPLE +global big[10000],little[5] +.ESAMPLE .TP MAXERRORS Maximum number of soft errors before an exit is triggered, default 0, which @@ -1435,6 +1508,216 @@ would like to disable overload processing, define STP_NO_OVERLOAD (or its alias STAP_NO_OVERLOAD). +.SH UNPRIVILEGED USERS + +Systemtap exposes kernel internal data +structures and potentially private user information. Because of this, use of +systemtap's full capabilities are restricted to root and to users who are +members of the groups stapdev and stapusr. + +However, a restricted set of systemtap's features can be made available to +trusted, unprivileged users. These users are members of the group stapusr +only. These users can load systemtap modules which have been compiled and +certified by a trusted systemtap compile\-server. See the descriptions of the +options \fI\-\-unprivileged\fR and \fI\-\-use\-server\fR. See +\fIREADME.unprivileged\fR in the systemtap source code for information about +setting up a trusted compile server. + +The restrictions enforced when \fI\-\-unprivileged\fR is specified are designed +to prevent unprivileged users from: +.RS +.IP \(bu 4 +harming the system maliciously. +.IP \(bu 4 +gaining access to information which would not normally be available to an +unprivileged user. +.IP \(bu 4 +disrupting the performance of processes owned by other users of the system. +Some overhead to the system in general is unavoidable since the +unprivileged user's probes +will be triggered at the appropriate times. What we would like to avoid is +targeted interruption of another user's processes which would not normally be +possible by an unprivileged user. +.RE + +.SS PROBE RESTRICTIONS +An unprivileged user may only use the following probes: + +.RS +.IP \(bu 4 +begin, begin(n) +.IP \(bu 4 +end, end(n) +.IP \(bu 4 +error(n) +.IP \(bu 4 +never +.IP \(bu 4 +process.*, where the target process is owned by the user. +.IP \(bu 4 +timer.{jiffies,s,sec,ms,msec,us,usec,ns,nsec}(n)* +.IP \(bu 4 +timer.hz(n) +.RE + +.SS SCRIPTING LANGUAGE RESTRICTIONS +The following scripting language features are unavailable to unprivileged users: + +.RS +.IP \(bu 4 +any feature enabled by the Guru Mode (-g) option. +.IP \(bu 4 +embedded C code. +.RE + +.SS RUNTIME RESTRICTIONS +The following runtime restrictions are placed upon unprivileged users: + +.RS +.IP \(bu 4 +Only the default runtime code (see \fI-R\fR) may be used. +.IP \(bu 4 +Probing of processes owned by other users is not permitted. +.IP \(bu 4 +Access of kernel memory (read and write) is not permitted. +.RE + +.SS COMMAND LINE OPTION RESTRICTIONS +Some command line options provide access to features which must not be available +to unprivileged users: + +.RS +.IP \(bu 4 +-g may not be specified. +.IP \(bu 4 +The following options may not be used by the compile-server client: +.SAMPLE + -a, -B, -D, -I, -r, -R +.ESAMPLE +.RE + +.SS ENVIRONMENT RESTRICTIONS +The following environment variables must not be set: +.SAMPLE + +SYSTEMTAP_RUNTIME +SYSTEMTAP_TAPSET +SYSTEMTAP_DEBUGINFO_PATH +.ESAMPLE + +.SS TAPSET RESTRICTIONS +The following built-in tapset functions are unconditionally available to unprivileged +users: +.SAMPLE + +_ehostunreach:long () +_enetunreach:long () +_icmp_dest_unreach:long () +_icmp_exc_fragtime:long () +_icmp_prot_unreach:long () +_icmp_time_exceeded:long () +_MM_ANONPAGES:long() +_MM_FILEPAGES:long() +_net_rx_drop:long () +_rtn_broadcast:long () +_rtn_multicast:long () +_rtn_unspec:long () +_sys_pipe2_flag_str:string (f:long) +AF_INET:long() +cpu:long () +cputime_to_msecs:long (cputime:long) +egid:long () +error (msg:string) +euid:long () +execname:string () +exit () +get_cycles:long () +gettimeofday_ns:long () +GFP_KERNEL:long() +gid:long () +HZ:long () +is_myproc:long () +isdigit:long(str:string) +isinstr:long(s1:string,s2:string) +jiffies:long () +log (msg:string) +mem_page_size:long () +module_name:string () +pexecname:string () +pgrp:long () +pid:long () +pn:string () +pp:string () +ppid:long () +randint:long(n:long) +registers_valid:long () +sid:long () +str_replace:string (prnt_str:string, srch_str:string, rplc_str:string) +stringat:long(str:string, pos:long) +strlen:long(s:string) +strtol:long(str:string, base:long) +substr:string(str:string,start:long, length:long) +target:long () +task_utime:long () +task_stime:long () +text_str:string(input:string) +text_strn:string(input:string, len:long, quoted:long) +tid:long () +tokenize:string(input:string, delim:string) +tz_gmtoff() { +tz_name() { +uid:long () +user_mode:long () +warn (msg:string) +.ESAMPLE + +The following built-in tapset functions are available to unprivileged users +within their own processes. Scripts written by unprivileged users must test the +result of the tapset function \fIis_myproc\fR and only call these functions if +the result is 1. The script will exit immediately if any of these functions is +called by an unprivileged user within a probe within a process which is not +owned by that user. +.SAMPLE + +_utrace_syscall_nr:long () +_utrace_syscall_arg:long (n:long) +_utrace_syscall_return:long () +print_ubacktrace () +print_ubacktrace_brief () +print_ustack(stk:string) +sprint_ubacktrace:string () +uaddr:long () +ubacktrace:string () +umodname:string (addr:long) +user_char:long (addr:long) +user_char_warn:long (addr:long) +user_int:long (addr:long) +user_int_warn:long (addr:long) +user_int16:long (addr:long) +user_int32:long (addr:long) +user_int64:long (addr:long) +user_int8:long (addr:long) +user_long:long (addr:long) +user_long_warn:long (addr:long) +user_short:long (addr:long) +user_short_warn:long (addr:long) +user_string_quoted:string (addr:long) +user_string_n_quoted:string (addr:long, n:long) +user_string_n_warn:string (addr:long, n:long) +user_string_n2:string (addr:long, n:long, err_msg:string) +user_string_warn:string (addr:long) +user_string2:string (addr:long, err_msg:string) +user_uint16:long (addr:long) +user_uint32:long (addr:long) +user_uint8:long (addr:long) +user_ushort:long (addr:long) +user_ushort_warn:long (addr:long) +usymdata:string (addr: long) +usymname:string (addr: long) +.ESAMPLE + +No other built-in tapset functions may be used by unprivileged users. + .\" PR6864: disable temporarily .\".SH MAKING DO WITH SYMBOL TABLES .\"Systemtap performs best when it has access to the debugging information @@ -1577,12 +1860,12 @@ .IR staprun (8), .IR stapvars (3stap), .IR stapex (3stap), -.IR stap-server (8), +.IR stap\-server (8), .IR awk (1), .IR gdb (1) .SH BUGS Use the Bugzilla link of the project web page or our mailing list. .nh -.BR http://sources.redhat.com/systemtap/ , . +.BR http://sourceware.org/systemtap/ , . .hy diff -Nru systemtap-1.4/stap-authorize-cert systemtap-1.6/stap-authorize-cert --- systemtap-1.4/stap-authorize-cert 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/stap-authorize-cert 1970-01-01 00:00:00.000000000 +0000 @@ -1,51 +0,0 @@ -#!/bin/bash - -# Add an existing server certificate to a -# database of trusted servers for the client. -# -# Copyright (C) 2008, 2009 Red Hat Inc. -# -# This file is part of systemtap, and is free software. You can -# redistribute it and/or modify it under the terms of the GNU General -# Public License (GPL); either version 2, or (at your option) any -# later version. - -certfile=$1 -certdb=$2 - -# Obtain the filename of the certificate -if test "X$certfile" = "X"; then - echo "Certificate file must be specified" >&2 - exit 1 -fi -if ! test -f $certfile; then - echo "Cannot find certificate file $certfile" >&2 - exit 1 -fi - -# Obtain the certificate database directory name. -if test "X$certdb" = "X"; then - echo "Certificate database directory must be specified" >&2 - exit 1 -fi -if ! test -d $certdb; then - if ! mkdir -p -m 755 $certdb; then - echo "Unable to find or create the client certificate database directory: $certdb" >&2 - exit 1 - fi -fi - -# Add the certificate -if ! certutil -A -n stap-server -d $certdb -i $certfile -t "P,P,P" > /dev/null; then - echo "Unable to add $certfile to the client certificate database $certdb" >&2 - exit 1 -fi - -# Ensure that the database is readable by others -if ! chmod +r $certdb/*.db; then - echo "Warning: unable to make the client certificate database $certdb readable by others" >&2 -fi - -echo "Certificate $certfile added to database $certdb" - -exit 0 diff -Nru systemtap-1.4/stap-authorize-cert.cxx systemtap-1.6/stap-authorize-cert.cxx --- systemtap-1.4/stap-authorize-cert.cxx 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/stap-authorize-cert.cxx 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,81 @@ +/* + Add the certificate contained in the given file to the given certificate database. + + Copyright (C) 2011 Red Hat Inc. + + This file is part of systemtap, and is free software. You can + redistribute it and/or modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ +#include "config.h" + +extern "C" { +#include +} +#include + +#include "util.h" +#include "nsscommon.h" + +using namespace std; + +// Called by methods within nsscommon. +extern "C" +void +nsscommon_error (const char *msg, int logit __attribute ((unused))) +{ + clog << msg << endl << flush; +} + +static void +fatal (const char *msg) +{ + nsscommon_error (msg); + exit (1); +} + +int +main (int argc, char **argv) { + // Obtain the filename of the certificate. + if (argc < 2) + { + fatal (_("Certificate file must be specified")); + return 1; + } + const char *certFileName = argv[1]; + + // Obtain the certificate database directory name. + if (argc < 3) + { + fatal (_("Certificate database directory must be specified")); + return 1; + } + const char *certDBName = argv[2]; + + // Make sure NSPR is initialized. Must be done before NSS is initialized + PR_Init (PR_SYSTEM_THREAD, PR_PRIORITY_NORMAL, 1); + /* Set the cert database password callback. */ + PK11_SetPasswordFunc (nssPasswordCallback); + + // Add the certificate to the database. + SECStatus secStatus = add_client_cert (certFileName, certDBName); + if (secStatus != SECSuccess) + { + // NSS message already issued. + nsscommon_error (_("Unable to authorize certificate")); + } + + // Clean up. + PR_Cleanup (); + + return secStatus == SECSuccess; +} diff -Nru systemtap-1.4/stap-authorize-server-cert systemtap-1.6/stap-authorize-server-cert --- systemtap-1.4/stap-authorize-server-cert 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/stap-authorize-server-cert 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ -#!/bin/bash - -# Add an existing server certificate to the -# database of trusted SSL servers for the client. -# -# Copyright (C) 2009 Red Hat Inc. -# -# This file is part of systemtap, and is free software. You can -# redistribute it and/or modify it under the terms of the GNU General -# Public License (GPL); either version 2, or (at your option) any -# later version. - -# Deprecation warning. -echo "WARNING: stap-authorize-server-cert is deprecated and will be removed in release 1.5" >&2 -echo "Please use 'stap --trust-servers'. See stap(1) for more information" >&2 - -# Initialize the environment -. ${PKGLIBEXECDIR}stap-env - -certfile=$1 -certdb=$2 - -# Obtain the filename of the certificate -if test "X$certfile" = "X"; then - echo "Certificate file must be specified" >&2 - exit 1 -fi - -# Obtain the certificate database directory name. -if test "X$certdb" = "X"; then - certdb=$stap_ssl_db/client -fi - -${stap_pkglibexecdir}stap-authorize-cert $certfile $certdb diff -Nru systemtap-1.4/stap-authorize-server-cert.8 systemtap-1.6/stap-authorize-server-cert.8 --- systemtap-1.4/stap-authorize-server-cert.8 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/stap-authorize-server-cert.8 1970-01-01 00:00:00.000000000 +0000 @@ -1,116 +0,0 @@ -.\" -*- nroff -*- -.TH STAP-AUTHORIZE-SERVER-CERT 8 -.SH NAME -stap\-authorize\-server\-cert \- systemtap server authorization utility - -.SH SYNOPSIS - -.br -.B stap\-authorize\-server\-cert \fICERTFILE\fR [ \fIDIRNAME\fR ] - -.SH DESCRIPTION - -\fIstap\-authorize\-server\-cert\fR is deprecated and will be removed in -release 1.5. Please use 'stap --trust-servers'. See -.IR stap (1) -for more information. - -.PP -A systemtap compile server listens for connections from clients -on a secure SSL network port and accepts requests -to run the -.I stap -front end. Each server advertises its presence and configuration on the local -network using mDNS (\fIavahi\fR) allowing for automatic detection by clients. - -.PP -The security of the SSL network connection between the client and server -depends on the proper -management of server certificates. - -.PP -The trustworthiness of a given systemtap server can not be determined -automatically without a trusted certificate authority issuing systemtap server -certificates. This is -not practical in everyday use and so, clients must authenticate servers -against their own database of trusted server certificates. In this context, -establishing a given server as trusted by a given client means adding -that server\[aq]s certificate to the -client\[aq]s database of trusted servers. - -.PP -The -.I stap\-authorize\-server\-cert -program adds the given server certificate to the given client\-side -certificate database, making that server a trusted server for clients using -that database. - -.SH ARGUMENTS -The -.I stap\-authorize\-server\-cert -program accepts two arguments: - -.TP -.B CERTFILE -This is the name of the file containing the certificate of the new trusted -server. This is the file named \fIstap.cert\fR which can be found in the -server\[aq]s certificate database. -On the server host, -for servers started by the \fIstap\-server\fR service, this database can be -found in \fI/var/lib/stap\-server/.systemtap/ssl/server/\fR. -Otherwise, this database can be found in \fI$SYSTEMTAP_DIR/ssl/server/\fR. If -\fISYSTEMTAP_DIR\fR is not set, then the database can be found in -\fI$HOME/.systemtap/ssl/server/\fR. - -.TP -.B DIRNAME -This optional argument is the name of the directory containing the client\-side -certificate database to which the certificate is to be added. If not specified, -the -default is \fI$SYSTEMTAP_DIR/ssl/client/\fR. If -\fISYSTEMTAP_DIR\fR is not set, then the database can be found in -\fI$HOME/.systemtap/ssl/client/\fR. - -.SH SAFETY AND SECURITY -Systemtap is an administrative tool. It exposes kernel internal data -structures and potentially private user information. See the -.IR stap (1) -manual page for additional information on safety and security. - -.PP -The systemtap server and its related utilities use the Secure Socket Layer -(SSL) as implemented by Network Security Services (NSS) -for network security. The NSS tool -.I certutil -is used for the generation of certificates. The related -certificate databases must be protected in order to maintain the security of -the system. -Use of the utilities provided will help to ensure that the proper protection -is maintained. The systemtap client will check for proper -access permissions before making use of any certificate database. - -.SH FILES -.TP -/var/lib/stap\-server/.systemtap/ssl/server/stap.cert -Server certificate for servers started by the \fIstap\-server\fR service. - -.TP -$SYSTEMTAP_DIR/ssl/server/stap.cert -Server certificate for servers started by other users. - -.TP -$SYSTEMTAP_DIR/ssl/client/ -User\[aq]s private client side certificate database. - -.SH SEE ALSO -.IR stap (1), -.IR stappaths (7), -.IR stap\-server (8), -.IR NSS , -.IR certutil - -.SH BUGS -Use the Bugzilla link of the project web page or our mailing list. -.nh -.BR http://sources.redhat.com/systemtap/ ", " . -.hy diff -Nru systemtap-1.4/stap-authorize-signing-cert systemtap-1.6/stap-authorize-signing-cert --- systemtap-1.4/stap-authorize-signing-cert 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/stap-authorize-signing-cert 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ -#!/bin/bash - -# Add an existing server certificate to the -# database of trusted SSL servers for the client. -# -# Copyright (C) 2009 Red Hat Inc. -# -# This file is part of systemtap, and is free software. You can -# redistribute it and/or modify it under the terms of the GNU General -# Public License (GPL); either version 2, or (at your option) any -# later version. - -# Deprecation warning. -echo "WARNING: stap-authorize-signing-cert is deprecated and will be removed in release 1.5" >&2 -echo "Please use 'stap --trust-servers'. See stap(1) for more information" >&2 - -# Initialize the environment -. ${PKGLIBEXECDIR}stap-env - -certfile=$1 -certdb=$2 - -# Obtain the filename of the certificate -if test "X$certfile" = "X"; then - echo "Certificate file must be specified" >&2 - exit 1 -fi - -# Obtain the certificate database directory name. -if test "X$certdb" = "X"; then - certdb=$stap_signing_db -fi - -${stap_pkglibexecdir}stap-authorize-cert $certfile $certdb diff -Nru systemtap-1.4/stap-authorize-signing-cert.8 systemtap-1.6/stap-authorize-signing-cert.8 --- systemtap-1.4/stap-authorize-signing-cert.8 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/stap-authorize-signing-cert.8 1970-01-01 00:00:00.000000000 +0000 @@ -1,112 +0,0 @@ -.\" -*- nroff -*- -.TH STAP-AUTHORIZE-SIGNING-CERT 8 -.SH NAME -stap\-authorize\-signing\-cert \- systemtap signing authorization utility - -.SH SYNOPSIS - -.br -.B stap\-authorize\-signing\-cert \fICERTFILE\fR [ \fIDIRNAME\fR ] - -.SH DESCRIPTION - -\fIstap\-authorize\-signing\-cert\fR is deprecated and will be removed in -release 1.5. Please use 'stap --trust-servers'. See -.IR stap (1) -for more information. - -.PP -The \fIstaprun\fR program will load modules for members of the group -\fIstapusr\fR if they are signed by a trusted signer. A trusted signer is -usually a \fIsystemtap\fR compile server which signs modules when the client -specifies the \fB\-\-unprivileged\fR option. - -.PP -The trustworthiness of a given signer can not be determined -automatically without a trusted certificate authority issuing systemtap signing -certificates. This is -not practical in everyday use and so, \fIstaprun\fR must authenticate servers -against its own database of trusted signers. In this context, -establishing a given signer as trusted means adding -that signer\[aq]s certificate to -\fIstaprun\fR\[aq]s -database of trusted signers. - -.PP -The -.I stap\-authorize\-signing\-cert -program adds the given signing certificate to the given -certificate database, making that signer a trusted server for -\fIstaprun\fR when using -that database. - -.SH ARGUMENTS -The -.I stap\-authorize\-signing\-cert -program accepts two arguments: - -.TP -.B CERTFILE -This is the name of the file containing the certificate of the new trusted -signer. -For systemtap compile servers, this is the file named \fIstap.cert\fR which -can be found in the -server\[aq]s certificate database. -On the server host, - -For servers started by the \fIstap\-server\fR service, this database can be -found in \fI/var/lib/stap\-server/.systemtap/ssl/server/\fR. -Otherwise, this database can be found in \fI$SYSTEMTAP_DIR/ssl/server/\fR. If -\fISYSTEMTAP_DIR\fR is not set, then the database can be found in -\fI$HOME/.systemtap/ssl/server/\fR. - -.TP -.B DIRNAME -This optional argument is the name of the directory containing the -certificate database to which the certificate is to be added. - -If not specified, the -default can be found in the stappaths (7) manual page. -That is, the default result -is that all users on the local host will trust this signer. Note that this -default directory is only writable by root. - -.SH SAFETY AND SECURITY -Systemtap is an administrative tool. It exposes kernel internal data -structures and potentially private user information. See the -.IR stap (1) -manual page for additional information on safety and security. - -.PP -\fISystemtap\fR uses Network Security Services (NSS) -for module signing and verification. The NSS tool -.I certutil -is used for the generation of certificates. The related -certificate databases must be protected in order to maintain the security of -the system. -Use of the utilities provided will help to ensure that the proper protection -is maintained. \fIstaprun\fR will check for proper -access permissions before making use of any certificate database. - -.SH FILES -.TP -/var/lib/stap\-server/.systemtap/ssl/server/stap.cert -Signing certificate for servers started by the \fIstap\-server\fR service. - -.TP -$SYSTEMTAP_DIR/ssl/server/stap.cert -Server certificate for servers started by other users. - -.SH SEE ALSO -.IR stap (1), -.IR stappathss (7), -.IR staprun (8), -.IR stap\-server (8), -.IR NSS , -.IR certutil - -.SH BUGS -Use the Bugzilla link of the project web page or our mailing list. -.nh -.BR http://sources.redhat.com/systemtap/ ", " . -.hy diff -Nru systemtap-1.4/stap-client systemtap-1.6/stap-client --- systemtap-1.4/stap-client 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/stap-client 1970-01-01 00:00:00.000000000 +0000 @@ -1,1178 +0,0 @@ -#!/bin/bash - -# Compile server client for systemtap -# -# Copyright (C) 2008-2010 Red Hat Inc. -# -# This file is part of systemtap, and is free software. You can -# redistribute it and/or modify it under the terms of the GNU General -# Public License (GPL); either version 2, or (at your option) any -# later version. - -# This script examines the systemtap command line and packages the files and -# information needed to execute the command. This is then sent to a trusted -# systemtap server which will process the request and return the resulting -# kernel module (if requested) and any other information generated by the -# request. If a kernel module is generated, this script will load the module -# and execute it using 'staprun', if requested. - -# Deprecation warning. -echo "WARNING: stap-client is deprecated and will be removed in release 1.5" >&2 -echo "Please use 'stap --use-server'. See stap(1) for more information" >&2 - -# Catch ctrl-c and other termination signals -trap 'terminate' SIGTERM -trap 'interrupt' SIGINT -trap 'ignore_signal' SIGHUP SIGPIPE - -# Initialize the environment -. ${PKGLIBEXECDIR}stap-env - -#----------------------------------------------------------------------------- -# Helper functions. -#----------------------------------------------------------------------------- -# function: initialization -function initialization { - our_host_name=`expr "$HOSTNAME" : "\\\([a-zA-Z0-9-]*\\\).*"` - our_domain_name=`expr "$HOSTNAME" : "$our_host_name\\\(.*\\\)"` - - rc=0 - wd=`pwd` - umask 0 - - # Private location for server certificates. Must be owned by us. - if test -e $stap_user_ssl_db/client; then - if check_db $stap_user_ssl_db/client $EUID $USER; then - local_ssl_dbs=$stap_user_ssl_db/client - fi - fi - - # Additional location for all users. Must be owned by root. - if test -e $ssl_global_ssl_db/client; then - if check_db $ssl_global_ssl_db/client 0 root; then - public_ssl_dbs=$ssl_global_ssl_db/client - fi - fi - - # Default options settings - p_phase=5 - v_level=0 - keep_temps=0 - m_name= - module_name=stap_$$ - uname_r="`uname -r`" - arch=`stap_get_arch` - - # Default variable settings - find_all= - - # Create a temporary directory to package things in - # Do this before parsing the command line so that there is a place - # to put -I and -R directories. - tmpdir_client=`mktemp -dt $stap_tmpdir_prefix_client.XXXXXX` || \ - fatal "Cannot create temporary directory " $tmpdir_client - tmpdir_env=`dirname $tmpdir_client` - - session_only_prompt_done=0 -} - -# function: parse_options [ STAP-OPTIONS ] -# -# Examine the command line. We need not do much checking, but we do need to -# parse all options in order to discover the ones we're interested in. -# The server will take care of most situations and return the appropriate -# output. -# -function parse_options { - # Each command line argument will be written to its own file within the - # request package. - argc=1 - packed_options='-' - arg_subst= - - while test $# != 0 - do - advance=0 - dash_seen=0 - client_arg=0 - - # Start of a new token. - first_token="$1" - until test $advance != 0 - do - # Identify the next option - first_char="${first_token:0:1}" - second_char= - if test $dash_seen = 0; then - if test "$first_char" = "-"; then - if test "$first_token" != "-"; then - # It's not a lone dash, so it's an option. - # Is it a long option (i.e. --option)? - second_char="${first_token:1:1}" - if test "X$second_char" = "X-"; then - case "$first_token" in - --ssl=*) - process_ssl "$first_token" - ;; - --server=*) - process_server "$first_token" - ;; - *) - # An unknown or unimportant option. Ignore it. - ;; - esac - advance=$(($advance + 1)) - break - fi - # It's not a lone dash, or a long option, so it's a short option string. - # Remove the dash. - first_token="${first_token:1}" - dash_seen=1 - first_char="${first_token:0:1}" - fi - fi - if test $dash_seen = 0; then - # The dash has not been seen. This is either the script file - # name or an argument to be passed to the probe module. - # If this is the first time, and -e has not been specified, - # then it could be the name of the script file. - if test "X$e_script" = "X" -a "X$script_file" = "X"; then - script_file="$first_token" - script_file_argc=$argc - fi - advance=$(($advance + 1)) - break - fi - fi - - # We are at the start of an option. Look at the first character. - case $first_char in - a) - get_arg "$first_token" "$2" - process_a "$stap_arg" - ;; - B) - get_arg "$first_token" "$2" - ;; - c) - get_arg "$first_token" "$2" - process_c "$stap_arg" - ;; - D) - get_arg "$first_token" "$2" - ;; - e) - get_arg "$first_token" "$2" - process_e "$stap_arg" - ;; - I) - get_arg "$first_token" "$2" - process_I "$stap_arg" - ;; - k) - keep_temps=1 - ;; - l) - get_arg "$first_token" "$2" - p_phase=2 - ;; - L) - get_arg "$first_token" "$2" - p_phase=2 - ;; - m) - get_arg "$first_token" "$2" - process_m "$stap_arg" - ;; - o) - get_arg "$first_token" "$2" - process_o "$stap_arg" - ;; - p) - get_arg "$first_token" "$2" - process_p "$stap_arg" - ;; - r) - get_arg "$first_token" "$2" - process_r "$stap_arg" - ;; - R) - get_arg "$first_token" "$2" - process_R "$stap_arg" - ;; - s) - get_arg "$first_token" "$2" - ;; - S) - get_arg "$first_token" "$2" - ;; - v) - v_level=$(($v_level + 1)) - ;; - x) - get_arg "$first_token" "$2" - ;; - *) - # An unknown or unimportant flag. - ;; - esac - - if test $advance = 0; then - # Just another flag character. Consume it. - first_token="${first_token:1}" - if test "X$first_token" = "X"; then - advance=$(($advance + 1)) - fi - fi - done - - # Consume the arguments we just processed. - while test $advance != 0; do - # Does the final argument file contain a client-side file - # name which must be changed to a server-side name? - local arg - if test "X$arg_subst" != "X" -a $advance = 1; then - arg="$arg_subst" - arg_subst= - else - arg="$1" - fi - - # If it's not client-only argument, - # place the argument in a numbered file within our temp - # directory. - # o We don't write a newline at the end, since newline could be - # part of the argument. - # o We add an X to the beginning of the file - # in order to avoid having 'echo' interpret the output as - # its own option. We then remove the X. - # There must be a better way. - if test $client_arg = 0; then - echo -n "X$arg" > "$tmpdir_client/argv$argc" - sed -i "s|^X||" "$tmpdir_client/argv$argc" - argc=$(($argc + 1)) - fi - - # Get the next argument. - shift - advance=$(($advance - 1)) - packed_options='-' - done - done - - # If the script file was given and it's not '-', then replace it with its - # client-temp-name in its argument file. - if test "X$script_file" != "X"; then - local local_name - if test "$script_file" != "-"; then - generate_client_temp_name "$script_file" - local_name="$client_temp_name" - else - local_name="-" - fi - echo -n "script/$local_name" > "$tmpdir_client/argv$script_file_argc" - fi - - # Processing based on final options settings - # Complete the list of local certificate databases - local_ssl_dbs="$additional_local_ssl_dbs $local_ssl_dbs" - - # We must have at least one usable certificate database. - test "X$local_ssl_dbs" != "X " -o "X$public_ssl_dbs" != "X" || \ - fatal "No usable certificate databases found" -} - -# function: get_arg FIRSTWORD SECONDWORD -# -# Collect an argument to the given option -function get_arg { - # Remove first character. - local opt="${1:0:1}" - local first="${1:1}" - packed_options="${packed_options}$opt" - - # Advance to the next token, if the first one is exhausted. - if test "X$first" = "X"; then - advance=$(($advance + 1)) - first="$2" - fi - - stap_arg="$first" - test "X$first" != "X" && advance=$(($advance + 1)) -} - -# function: process_ssl ARGUMENT -# -# Process the --ssl option. -function process_ssl { - client_arg=1 - local db="${1:6}" - - test "X$db" != "X" || \ - fatal "Missing argument to --ssl" - - check_db "$db" || return - - additional_local_ssl_dbs="$additional_local_ssl_dbs $db" -} - -# function: process_server ARGUMENT -# -# Process the --server option. -function process_server { - client_arg=1 - local spec="${1:9}" - - test "X$spec" != "X" || \ - fatal "Missing argument to --server" - - specified_servers="$specified_servers $spec" -} - -# function: process_c ARGUMENT -# -# Process the -c flag. -function process_c { - c_cmd="$1" -} - -# function: process_e ARGUMENT -# -# Process the -e flag. -function process_e { - # Only the first -e option is recognized and it overrides any script file name - # which may have already been identified. - if test "X$e_script" = "X"; then - e_script="$1" - script_file= - fi -} - -# function: process_I ARGUMENT ORIGINAL_ARGUMENT -# -# Process the -I flag. -function process_I { - test "X$1" = "X" && return - test "${1:0:1}" = " -" && return - include_file_or_directory tapsets "$1" - if test $advance = 1; then - arg_subst="${packed_options}tapsets/$included_name" - else - arg_subst="tapsets/$included_name" - fi -} - -# function: process_m ARGUMENT -# -# Process the -m flag. -function process_m { - module_name="$1" - m_name="$1" -} - -# function: process_o ARGUMENT -# -# Process the -o flag. -function process_o { - stdout_redirection="$1" -} - -# function: process_p ARGUMENT -# -# Process the -p flag. -function process_p { - p_phase="$1" -} - -# function: process_r ARGUMENT -# -# Process the -r flag. -function process_r { - local first_char="${1:0:1}" - - if test "$first_char" = "/"; then # fully specified path - kernel_build_tree="$1" - version_file_name="$kernel_build_tree/include/config/kernel.release" - # The file include/config/kernel.release within the - # build tree is used to pull out the version information - release=`cat "$version_file_name" 2>/dev/null` - if test "X$release" = "X"; then - fatal "Missing $version_file_name" - return - fi - else - # kernel release specified directly - release="$1" - fi - - if test "X$release" != "X$uname_r"; then - uname_r="$release" - find_all="--all" - fi -} - -# function: process_a ARGUMENT -# -# Process the -a flag. -function process_a { - if test "X$1" != "X$arch"; then - arch="$1" - find_all="--all" - fi -} - -# function: process_R ARGUMENT ORIGINAL_ARGUMENT -# -# Process the -R flag. -function process_R { - test "X$1" = "X" && return - test "${1:0:1}" = " -" && return - include_file_or_directory runtime "$1" - if test $advance = 1; then - arg_subst="${packed_options}runtime/$included_name" - else - arg_subst="runtime/$included_name" - fi -} - -# function: include_file_or_directory PREFIX NAME -# -# Include the given file or directory in the client's temporary -# tree to be sent to the server and save it's name in the variable -# included_name. We use a global variable instread of echoing the -# result since the use of `include_file_or_directory` loses a trailing -# newline. -function include_file_or_directory { - # Add a symbolic link of the named file or directory to our temporary - # directory, but only if the file or directory exists. - generate_client_temp_name "$2" - local local_name="$client_temp_name" - included_name="$local_name" - test -e "/$local_name" || return - - local local_dirname=`dirname "$local_name"` - mkdir -p "$tmpdir_client/$1/$local_dirname" || \ - fatal "Could not create $tmpdir_client/$1/$local_dirname" - ln -s "/$local_name" "$tmpdir_client/$1/$local_name" || \ - fatal "Could not link $tmpdir_client/$1/$local_name to /$local_name" -} - -# function: generate_client_temp_name NAME -# -# Generate the name to be used for the given file/directory relative to the -# client's temporary directory and stores it in the variable -# client_temp_name. We use a global variable instread of echoing the -# result since the use of `generate_client_temp_name` loses a trailing -# newline. -function generate_client_temp_name { - # Transform the name into a fully qualified path name - local full_name="$1" - test "${full_name:0:1}" != "/" && full_name="$wd/$full_name" - - # The same name without the initial / or trailing / - local local_name="${full_name:1}" - test "${local_name: -1:1}" = "/" && local_name="${local_name:0:$((${#local_name}-1))}" - - client_temp_name="$local_name" -} - -# function: create_request -# -# Add information to the client's temp directory representing the request -# to the server. -function create_request { - # Work in our temporary directory - cd $tmpdir_client - - if test "X$script_file" != "X"; then - if test "$script_file" = "-"; then - mkdir -p $tmpdir_client/script || \ - fatal "Cannot create temporary directory " $tmpdir_client/script - cat > "$tmpdir_client/script/$script_file" - else - include_file_or_directory script "$script_file" - fi - fi - - # Add the necessary info to special files in our temporary directory. - echo "sysinfo: `client_sysinfo`" > sysinfo -} - -# function client_sysinfo -# -# Generate the client's sysinfo and echo it to stdout -function client_sysinfo { - echo "$uname_r $arch" -} - -# function: package_request -# -# Package the client's temp directory into a form suitable for sending to the -# server. -function package_request { - # Package up the temporary directory into a zip file - cd $tmpdir_env - - local tmpdir_client_base=`basename $tmpdir_client` - zip_client=$tmpdir_env/`mktemp $tmpdir_client_base.zip.XXXXXX` || \ - fatal "Cannot create temporary file " $zip_client - - cd $tmpdir_client - (rm -f $zip_client && zip -r $zip_client * > /dev/null) || \ - fatal "zip of request tree, $tmpdir_client, failed" -} - -# function: unpack_response -# -# Unpack the zip file received from the server and make the contents available -# for printing the results and/or running 'staprun'. -function unpack_response { - tmpdir_server=`mktemp -dt $stap_tmpdir_prefix_client.server.XXXXXX` || \ - fatal "Cannot create temporary file " $tmpdir_server - - # Unpack the server output directory - unzip -d $tmpdir_server $zip_server > /dev/null || \ - fatal "Cannot unpack server response, $zip_server" - - # Check the contents of the directory. It should contain: - # 1) a file called stdout - # 2) a file called stderr - # 3) a file called rc - # 4) optionally a directory named to match stap?????? - local num_files=`ls $tmpdir_server | wc -l` - test $num_files = 4 -o $num_files = 3 || \ - fatal "Wrong number of files in server's temp directory" - test -f $tmpdir_server/stdout || \ - fatal "`pwd`/$tmpdir_server/stdout does not exist or is not a regular file" - test -f $tmpdir_server/stderr || \ - fatal "`pwd`/$tmpdir_server/stderr does not exist or is not a regular file" - test -f $tmpdir_server/rc || \ - fatal "`pwd`/$tmpdir_server/rc does not exist or is not a regular file" - - # See if there is a systemtap temp directory. There should be at least an empty one. - # ls -l $tmpdir_server - tmpdir_stap=`cd $tmpdir_server && ls | grep stap......\$ 2>/dev/null` - if test "X$tmpdir_stap" != "X"; then - test -d $tmpdir_server/$tmpdir_stap || \ - fatal "$tmpdir_server/$tmpdir_stap is not a directory" - - # Move the systemtap temp directory to a local temp location, if -k - # was specified. - if test $keep_temps = 1; then - local local_tmpdir_stap=`mktemp -dt stapXXXXXX` || \ - fatal "Cannot create temporary directory " $local_tmpdir_stap - mv $tmpdir_server/$tmpdir_stap/* $local_tmpdir_stap 2>/dev/null - rm -fr $tmpdir_server/$tmpdir_stap - - # Correct the name of the temp directory in the server's stderr output - sed -i "s,^Keeping temporary directory.*,Keeping temporary directory \"$local_tmpdir_stap\"," $tmpdir_server/stderr - tmpdir_stap=$local_tmpdir_stap - else - tmpdir_stap=$tmpdir_server/$tmpdir_stap - # Make sure we own the systemtap temp directory if we are root. - test $EUID = 0 && chown $EUID:$EUID $tmpdir_stap - fi - fi - - if test $keep_temps = 0; then - # Remove the output line due to the synthetic server-side -k - sed -i "/^Keeping temporary directory.*/ d" $tmpdir_server/stderr - fi - - if test $p_phase = 5; then - # Remove the output line due to the synthetic server-side -p4 - sed -i "/^.*\.ko$/ d" $tmpdir_server/stdout - fi -} - -# function: find_and_connect_to_server -# -# Find and establish connection with a compatible stap server. -function find_and_connect_to_server { - local num_servers=0 - - # Make a place to receive the response file. - zip_server=`mktemp -t $stap_tmpdir_prefix_client.server.zip.XXXXXX` || \ - fatal "Cannot create temporary file " $zip_server - - # If servers were specified on the command line, then try them - # in sequence. Don't try any other servers. - if test "X$specified_servers" != "X"; then - for server in $specified_servers; do - num_servers=$(($num_servers + 1)) - - # If the server is completely specified, (i.e. server:port), - # then try it directly. - port=`expr "$server" : '.\+:\([0-9]\+\)'` - if test "X$port" != "X"; then - name=`expr "$server" : '\(.\+\):[0-9]\+'` - - # If we have been given an ip address, then try to resolve it to a name. - # If we have been given a name, try to resolve the full name. - # The full name is needed in order to validate the server's certificate. - address=`expr "$name" : '\([0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+\)'` - if test "X$address" = "X"; then - # We've been given a host name - full_name=`nslookup $name | awk '/^Name\:/ {print $2}'` - if test "X$full_name" != "X"; then - name=$full_name - fi - else - # We've been given an ip address. - name=`nslookup $address | awk '/in-addr\.arpa/ {print $4}'` - name=`expr "$name" : '\(.*\)\.'` - if test "X$name" = "X"; then - echo "Cannot resolve ip address $address" >> "$tmpdir_client/connect" - continue - fi - fi - - # Now try to contact the given server. - send_receive $name $port && return - continue - fi - - # Otherwise select the matching server from the available servers - # and use the port it is advertizing. - # - # Have we been given an ip address? If so, just use it. - address=`expr "$server" : '\([0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+\)'` - if test "X$address" = "X"; then - # We have not been given an ip address. Try to resolve it as a host name. - if test "X$server" = "Xlocalhost"; then - # We don't want the address of the loopback interface here. Avahi will present - # the actual ip address. - server=$our_host_name$our_domain_name - fi - address=`nslookup $server | awk '/^Address\:[ \t][0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$/ {print $2}'` - if test "X$address" = "X"; then - echo "Cannot resolve server $server" >> "$tmpdir_client/connect" - continue - fi - fi - - ${stap_pkglibexecdir}stap-find-servers $find_all | grep $address > "$tmpdir_client/servers" - - if test `wc -l "$tmpdir_client/servers" | awk '{print $1}'` = "0"; then - warning "No server is available on $server" 2>> "$tmpdir_client/connect" - continue - fi - - choose_server && return - done - else - # No servers specified. Find available servers and choose one of them. - # Remember which ssl certificate database was used to authenticate the chosen - # server. - ${stap_pkglibexecdir}stap-find-servers $find_all > "$tmpdir_client/servers" - choose_server && return - num_servers=`wc -l "$tmpdir_client/servers" | awk '{print $1}'` - fi - - if test $num_servers = 0; then - fatal "Unable to find a server" - fi - - test -f "$tmpdir_client/connect" && cat "$tmpdir_client/connect" >&2 - fatal "Unable to connect to a server" -} - -# function: choose_server -# -# Examine each line from "$tmpdir_client/servers" and attempt to connect to -# each server specified until successful. -function choose_server { - local name ip port remain - - while read -u3 name ip port remain - do - if test "X$name" = "X"; then - fatal "Server name not provided by avahi" - fi - -# if test "X$ip" = "X"; then -# fatal "Server ip address not provided by avahi" -# fi - - if test "X$port" = "X"; then - fatal "Server port not provided by avahi" - fi - - # Does the server build for the kernel release and architecture that we want? - sysinfo=`expr "$remain" : "'sysinfo=\\\(.*\\\)'"` - test "X$sysinfo" != "X$uname_r $arch" && continue - - send_receive $name $port && return - done 3< "$tmpdir_client/servers" - - # Could not connect to a server - return 1 -} - -# function: send_receive SERVER PORT -# -# Connect to the server, send the request and receive the response. -function send_receive { - local server="$1" - local port="$2" - - # The server must match the dns name on the certificate - # and must be 'localhost' if the server is on the local host. - local server_host_name=`expr "$server" : "\\\([a-zA-Z0-9-]*\\\).*"` - local server_domain_name=`expr "$server" : "$server_host_name\\\(.*\\\)"` - - if test "X$server_domain_name" = "X.local"; then - server_domain_name=$our_domain_name - fi - if test "X$server_host_name$server_domain_name" = "Xlocalhost$our_domain_name"; then - server=localhost - elif test "X$server_host_name$server_domain_name" = "X$our_host_name$our_domain_name"; then - server=localhost - else - server=$server_host_name$server_domain_name - fi - - # Try to connect using each of the given local certificate databases in turn - # for verification. - local rc - for ssl_db in $local_ssl_dbs - do - # Send the request and receive the response using stap-client-connect - attempt_connection -i $zip_client -o $zip_server -d $ssl_db -p $port -h $server && return - - # Try the next database, but give the server a chance to reset. - sleep 1 - done - - # Next, try the public certificate databases. - for ssl_db in $public_ssl_dbs - do - # Send the request and receive the response using stap-client-connect - attempt_connection -i $zip_client -o $zip_server -d $ssl_db -p $port -h $server && return - - # Try the next database, but give the server a chance to reset. - sleep 1 - done - - # Could not connect using any of the certificate databases - return 1 -} - -# function: attempt_connection ARGS -# -# Attempt connection with the given server. Give the user a chance to -# trust the server if it is not already trusted -function attempt_connection { - echo "Attempting connection with $server:$port using certificate database in '$ssl_db'" >> "$tmpdir_client/connect" - - # Send the request and receive the response using stap-client-connect - ${stap_pkglibexecdir}stap-client-connect "$@" >> "$tmpdir_client/connect" 2>&1 & - wait '%${stap_pkglibexecdir}stap-client-connect' - local rc=$? - test $rc = 0 && return - - # The connection failed. If it was because the server is not trusted, give - # the user a chance to decide whether to trust the server anyway. - # The prompt will not be printed and the read will quickly timeout if - # stdin is not from a terminal. - if test $rc = 2; then - # Output any connection messages generated thus far - cat "$tmpdir_client/connect" >&2 - rm "$tmpdir_client/connect" - - local response - local prompt="The server at $server:$port is not trusted based on the certificate database in '$ssl_db' -" - if test $session_only_prompt_done = 0; then - session_only_prompt_done=1 - prompt="${prompt}Trust this server for for this session only? [y/N] " - read -t 30 -p "$prompt" response || echo n - if test "$response" = "y" -o "$response" = "Y"; then - ${stap_pkglibexecdir}stap-client-connect "$@" -t session >> "$tmpdir_client/connect" 2>&1 & - wait '%${stap_pkglibexecdir}stap-client-connect' - test $? = 0 && return - return 1 # Connection failed - fi - prompt= - fi - if test "$ssl_db" = "$ssl_global_ssl_db/client"; then - prompt="${prompt}Adding this server's certificate to this database will make this server trusted by all users on the local host. -" - fi - prompt="${prompt}Add this server's certificate to '$ssl_db'? [y/N] " - read -t 30 -p "$prompt" response || echo n - if test "$response" = "y" -o "$response" = "Y"; then - ${stap_pkglibexecdir}stap-client-connect "$@" -t permanent >> "$tmpdir_client/connect" 2>&1 & - wait '%${stap_pkglibexecdir}stap-client-connect' - test $? = 0 && return - fi - fi - - # Connection failed - return 1 -} - -# function: process_response -# -# Write the stdout and stderr from the server to stdout and stderr respectively. -function process_response { - # Pick up the results of running stap on the server. - cd $tmpdir_server - rc=`cat rc` - - if test $p_phase -ge 4; then - if test -f $tmpdir_stap/*.ko; then - if test $p_phase = 4 -o "X$m_name" != "X"; then - cp -p $tmpdir_stap/*.ko $wd/$module_name.ko - test -f $tmpdir_stap/*.sgn && cp -p $tmpdir_stap/*.sgn $wd/$module_name.ko.sgn - else - module_name=`ls $tmpdir_stap/*.ko` - module_name=`expr "$module_name" : '\(.*\)\.ko'` - fi - elif test "X$script_file" != "X" -o "X$e_script" != "X"; then - if test "X$rc" != "X" -a $rc = 0; then - stream_output - fatal "no module returned by the server" - fi - fi - fi - - # Change the name of the temp directory and module name in stdout and stderr - sed -i "s,stap_[0-9]\+,$module_name,g" $tmpdir_server/stdout - sed -i "s,stap_[0-9]\+,$module_name,g" $tmpdir_server/stderr - sed -i "s,into \".*$module_name,into \"$module_name,g" $tmpdir_server/stdout - sed -i "s,into \".*$module_name,into \"$module_name,g" $tmpdir_server/stderr - - # Output stdout and stderr as directed - stream_output -} - -# function: stream_output -# -# Output stdout and stderr as directed -function stream_output { - cd $tmpdir_server - cat stderr >&2 - cat stdout -} - -# function: maybe_call_staprun -# -# Call staprun using the module returned from the server, if requested. -function maybe_call_staprun { - if test $rc != 0; then - # stap run on the server failed, so don't bother - return - fi - - if test $p_phase -ge 4; then - # There should be a systemtap temporary directory. - if test "X$tmpdir_stap" = "X"; then - # OK if no script specified - if test "X$e_script" != "X" -o "X$script_file" != "X"; then - fatal "systemtap temporary directory is missing in server response" - fi - return - fi - - if test $p_phase = 5; then - test $v_level -gt 0 && echo "Pass 5: starting run." >&2 - - # We have a module. Try to run it - # If a -c command was specified, pass it along. - if test "X$c_cmd" != "X"; then - staprun_opts="-c '$c_cmd'" - fi - - # The -v level will be one less than what was specified - # for us. - for ((vl=$((v_level - 1)); $vl > 0; --vl)) - do - staprun_opts="$staprun_opts -v" - done - - # if -o was specified, pass it along - if test "X$stdout_redirection" != "X"; then - staprun_opts="$staprun_opts -o $stdout_redirection" - fi - - # Run it from our original working directory - cd $wd - - # Run it in the background and wait for it. This - # way any signals sent to us can be caught. - if test $v_level -ge 2; then - echo "running `staprun_PATH` $staprun_opts $module_name.ko" >&2 - fi - eval `staprun_PATH` "$staprun_opts" $module_name.ko - rc=$? - - # Wait until the job actually disappears so that its output is complete. - while jobs '%?staprun' >/dev/null 2>&1 - do - sleep 1 - done - - test $v_level -gt 0 && echo "Pass 5: run completed in 0usr/0sys/0real ms." >&2 - fi - fi -} - -# function: staprun_PATH -# -# Compute a PATH suitable for running staprun. -function staprun_PATH { - # If $SYSTEMTAP_STAPRUN is set, then use that - if test "X$SYSTEMTAP_STAPRUN" != "X"; then - echo $SYSTEMTAP_STAPRUN - return - fi - - # Otherwise, if there is an exec_prefix, then use it. - if test "X$stap_exec_prefix" != "X"; then - echo ${stap_exec_prefix}staprun - return - fi - - # Otherwise, we have been called by the dejagnu test harness as 'stap' - # and we are the first 'stap' on the path. Since staprun may call - # 'stap', remove the PATH component where we live from the PATH in order to - # avoid recursion. - local first_stap=`which stap` - local PATH_component=`dirname $first_stap` - echo "PATH=$PATH staprun" | sed "s,$PATH_component,,g" -} - -# function: check_db DBNAME [ EUID USER ] -# -# Check the security of the given database directory. -function check_db { - local dir="$1" - local euid="$2" - local user="$3" - local rc=0 - - # Check that we have been given a directory - if ! test -e $dir; then - warning "Certificate database '$dir' does not exist" - return 1 - fi - if ! test -d $dir; then - warning "Certificate database '$dir' is not a directory" - return 1 - fi - - # If euid has been specified, then this directory must be owned by that - # user. - if test "X$euid" != "X"; then - local ownerid=`stat -c "%u" $dir` - if test "X$ownerid" != "X$euid"; then - warning "Certificate database '$dir' must be owned by $user" - rc=1 - fi - fi - - # Check that we can read the directory - if ! test -r $dir; then - warning "Certificate database '$dir' is not readble" - rc=1 - fi - - # Check the access permissions of the directory - local perm=0`stat -c "%a" $dir` - if test $((($perm & 0400) == 0400)) = 0; then - warning "Certificate database '$dir' should be readable by the owner" - fi - if test $((($perm & 0200) == 0200)) = 0; then - warning "Certificate database '$dir' should be writeable by the owner" - fi - if test $((($perm & 0100) == 0100)) = 0; then - warning "Certificate database '$dir' should be searchable by the owner" - fi - if test $((($perm & 0040) == 0040)) = 0; then - warning "Certificate database '$dir' should be readable by the group" - fi - if test $((($perm & 0020) == 0020)) = 1; then - warning "Certificate database '$dir' must not be writable by the group" - rc=1 - fi - if test $((($perm & 0010) == 0010)) = 0; then - warning "Certificate database '$dir' should be searchable by the group" - fi - if test $((($perm & 0004) == 0004)) = 0; then - warning "Certificate database '$dir' should be readable by others" - fi - if test $((($perm & 0002) == 0002)) = 1; then - warning "Certificate database '$dir' must not be writable by others" - rc=1 - fi - if test $((($perm & 0001) == 0001)) = 0; then - warning "Certificate database '$dir' should be searchable by others" - fi - - # Now check the permissions of the critical files. - check_db_file $dir/cert8.db $euid $user || rc=1 - check_db_file $dir/key3.db $euid $user || rc=1 - check_db_file $dir/secmod.db $euid $user || rc=1 - - test $rc = 1 && warning "Unable to use certificate database '$dir' due to errors" - - return $rc -} - -# function: check_db_file FILENAME [ EUID USER ] -# -# Check the security of the given database file. -function check_db_file { - local file="$1" - local rc=0 - - # Check that we have been given a file - if ! test -e $file; then - warning "Certificate database file '$file' does not exist" - return 1 - fi - if ! test -f $file; then - warning "Certificate database file '$file' is not a regular file" - return 1 - fi - - # If euid has been specified, then this directory must be owned by that - # user. - if test "X$euid" != "X"; then - local ownerid=`stat -c "%u" $file` - if test "X$ownerid" != "X$euid"; then - warning "Certificate database file '$file' must be owned by $user" - rc=1 - fi - fi - - # Check that we can read the file - if ! test -r $file; then - warning "Certificate database file '$file' is not readble" - rc=1 - fi - - # Check the access permissions of the file - local perm=0`stat -c "%a" $file` - if test $((($perm & 0400) == 0400)) = 0; then - warning "Certificate database file '$file' should be readable by the owner" - fi - if test $((($perm & 0200) == 0200)) = 0; then - warning "Certificate database file '$file' should be writeable by the owner" - fi - if test $((($perm & 0100) == 0100)) = 1; then - warning "Certificate database file '$file' must not be executable by the owner" - rc=1 - fi - if test $((($perm & 0040) == 0040)) = 0; then - warning "Certificate database file '$file' should be readable by the group" - fi - if test $((($perm & 0020) == 0020)) = 1; then - warning "Certificate database file '$file' must not be writable by the group" - rc=1 - fi - if test $((($perm & 0010) == 0010)) = 1; then - warning "Certificate database file '$file' must not be executable by the group" - rc=1 - fi - if test $((($perm & 0004) == 0004)) = 0; then - warning "Certificate database file '$file' should be readable by others" - fi - if test $((($perm & 0002) == 0002)) = 1; then - warning "Certificate database file '$file' must not be writable by others" - rc=1 - fi - if test $((($perm & 0001) == 0001)) = 1; then - warning "Certificate database file '$file' must not be executable by others" - rc=1 - fi - - return $rc -} - -# function: warning [ MESSAGE ] -# -# Warning error -# Prints its arguments to stderr -function warning { - echo "$0: WARNING:" "$@" >&2 -} - -# function: fatal [ MESSAGE ] -# -# Fatal error -# Prints its arguments to stderr and exits -function fatal { - echo "$0: ERROR:" "$@" >&2 - cleanup - exit 1 -} - -# function cleanup -# -# Cleanup work files unless asked to keep them. -function cleanup { - # Clean up. - cd $tmpdir_env - if test $keep_temps != 1; then - rm -fr $tmpdir_client - rm -f $zip_client - rm -f $zip_server - rm -fr $tmpdir_server - fi -} - -# function: terminate -# -# Terminate gracefully. -function terminate { - # Clean up - echo "$0: terminated by signal" >&2 - cleanup - - # Kill any running staprun job - kill -s SIGTERM '%?staprun' 2>/dev/null - - # Kill any stap-client-connect job - kill -s SIGTERM '%${stap_pkglibexecdir}stap-client-connect' 2>/dev/null - - exit 1 -} - -# function: interrupt -# -# Pass an interrupt (ctrl-C) to staprun -function interrupt { - # Kill any stap-client-connect job - # SIGINT won't do it. - kill -s SIGTERM '%${stap_pkglibexecdir}stap-client-connect' 2>/dev/null - - # If staprun was not running, then exit. - cleanup - exit 1 -} - -# function: ignore_signal -# -# Called in order to ignore a signal -function ignore_signal { - : -} - -#----------------------------------------------------------------------------- -# Beginning of main line execution. -#----------------------------------------------------------------------------- -initialization -parse_options "$@" -create_request -package_request -find_and_connect_to_server -unpack_response -process_response -maybe_call_staprun -cleanup - -exit $rc diff -Nru systemtap-1.4/stap-client.8 systemtap-1.6/stap-client.8 --- systemtap-1.4/stap-client.8 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/stap-client.8 1970-01-01 00:00:00.000000000 +0000 @@ -1,235 +0,0 @@ -.\" -*- nroff -*- -.TH STAP-CLIENT 8 -.SH NAME -stap\-client \- systemtap client - -.SH SYNOPSIS - -.br -.B stap\-client -[ -.B \-\-server=\fIHOSTNAME\fR|\fIIP_ADDRESS\fR[\fB:\fIPORT\fR] -] -[ -.B \-\-ssl=\fIDIRNAME -] -[ -.I ARGUMENTS -] - -.SH DESCRIPTION - -\fIstap\-client\fR is deprecated and will be removed in -release 1.5. Please use 'stap --use-server'. See -.IR stap (1) -for more information. - -.PP -A systemtap compile server listens for connections from clients -on a secure SSL network port and accepts requests to run the -.I stap -front end. Each server advertises its presence and configuration on the local -network using mDNS (\fIavahi\fR) allowing for automatic detection by clients. - -.PP -The -.I stap\-client -program is analogous to the -.I stap -front end except that it attempts to find a compatible systemtap server on the -local network and then attempts to use that server for actions related to -passes 1 through 4. Pass 5 actions, if requested, are performed on the local -host using -.IR staprun . -Upon successful completion, the exit code is 0. Otherwise the exit code -is 1. - -.SH OPTIONS -.PP -In addition to the options accepted by the -.I stap -front end, -.I stap\-client -accepts the following: - -.TP -.B \-\-server=\fIHOSTNAME\fR|\fIIP_ADDRESS\fR[\fB:\fIPORT\fR] -This option instructs -.I stap\-client -to use the named server instead of looking for one automatically. The server may -be specified using a valid host name or ip address. If no port is specified, -then -.I stap\-client -searches for the server among the servers on the specified host which are -advertising their presence on the -local network and uses the port which is being advertised. This is useful for -connecting to a specific server on the local network. If a port is specified, -then -.I stap\-client -will attempt to connect to the named host on the specified port. This is useful -for connecting to non\-local servers. If -.B \-\-server -is specified, -.I stap\-client -will make no attempt to contact other servers. If more than one -.B \-\-server -option is specified, -.I stap\-client -will attempt to use the servers in the order specified. - -.TP -.B \-\-ssl=\fIDIRNAME -.I stap\-client -uses certificate databases in default locations (see -.I SERVER AUTHENTICATION -below) in order to authenticate each server which is contacted. The -.B \-\-ssl -option is used to specify additional databases to search. Databases specified -using -.B \-\-ssl -are searched before the default databases. If more than one -.B \-\-ssl -option is specified, then the databases are searched in the order specified on -the command line followed by the default locations. - -.SH ARGUMENTS -The -.I stap\-client -program accepts the same arguments as -.I stap\fP. -See \fIstap\fP(1) for details. - -.SH SERVER AUTHENTICAION -The security of the SSL network connection between the client and server -depends on the proper -management of server certificates. - -.PP -The trustworthiness of a given systemtap server can not be determined -automatically without a trusted certificate authority issuing systemtap server -certificates. This is -not practical in everyday use and so, clients must authenticate servers -against their own database of trusted server certificates. In this context, -establishing a given server as trusted by a given client means adding -that server\[aq]s certificate to the -client\[aq]s database of trusted servers. - -.PP -For the \fIstap\-server\fR service, on the local host, this is handled -automatically. -When the \fIsystemtap\-server\fR package is installed, the server\[aq]s -certificate for the default user (\fIstap\-server\fR) is automatically -generated and installed. This means that servers started by the -\fIstap\-server\fR service, -with the default user, are automatically trusted by clients on the local -host. - -.PP -In order to use a server running on another host, that server\[aq]s certificate -must be installed on the client\[aq]s host. -See the \fI\-\-trust\-servers\fR option in the -.IR stap (1) -manual page for more details. - -.PP -The trustworthiness of other servers may also be asserted -for the duration of one invocation of \fIstap\-client\fR -by using the -.B \-\-ssl -option one or more times (see -.I OPTIONS -above). Servers whose certificates are contained in the additional databases -will be considered to be trusted for that invocation of the client. - -.SH UNPRIVILEGED USERS -One purpose of the systemtap client and server is to provide a secure -compilation environment and trusted signer for allowing unprivileged users -(members of the group \fIstapusr\fR) to load systemtap modules generated from -scripts which use only a safe subset of systemtap\[aq]s capabilities. - -.PP -When the \fB\-\-unprivileged\fR option is used on an invocation of -\fIstap\-client\fR, the server will pass it on to \fIstap\fR which will -check to ensure that the script is safe to run for unprivileged users. If so, -the server will also sign the resulting module, making it loadable by an -unprivileged user. - -.SH EXAMPLES -See the -.IR stapex (3stap) -manual page for a collection of sample scripts. -.PP -Here are some examples of how to use -.IR stap\-client . -.PP -To compile and execute a simple example using an automatically discovered -server on the local network -.PP -.B \& $ stap\-client \-e \[aq]probe begin { printf("Hello World!\\n"); exit() }\[aq] -.br -\& Hello World! -.PP -To compile and execute a simple example using a server on a specific host -on the local network -.PP -.B \& $ stap\-client \-\-server=\fIHOSTNAME\fP \-e \[aq]probe begin { printf("Hello World!\\n"); exit() }\[aq] -.br -\& Hello World! -.PP -To compile and execute a simple example using a specific server -.PP -.B \& $ stap\-client \-\-server=\fIHOSTNAME\fP:\fIPORT\fP \-e \[aq]probe begin { printf("Hello World!\\n"); exit() }\[aq] -.br -\& Hello World! -.PP -To search additional certificate databases in order to compile and execute a -simple example -.PP -.B \& $ stap\-client \-\-ssl=\fIDIRNAME\fP \-e \[aq]probe begin { printf("Hello World!\\n"); exit() }\[aq] -.br -\& Hello World! - -.SH SAFETY AND SECURITY -Systemtap is an administrative tool. It exposes kernel internal data -structures and potentially private user information. See the -.IR stap (1) -manual page for additional information on safety and security. - -.PP -The systemtap server and its related utilities use the Secure Socket Layer -(SSL) as implemented by Network Security Services (NSS) -for network security. The NSS tool -.I certutil -is used for the generation of certificates. The related -certificate databases must be protected in order to maintain the security of -the system. -Use of the utilities provided will help to ensure that the proper protection -is maintained. The systemtap client will check for proper -access permissions before making use of any certificate database. - -.SH FILES - -.TP -~/.systemtap/ssl/client/ -User\[aq]s private client side certificate database. - -.TP -/var/lib/stap\-server/.systemtap/ssl/server/stap.cert -Server certificate for servers started by the \fIstap\-server\fR service. - -.SH SEE ALSO -.IR stap (1), -.IR stappaths (7), -.IR staprun (8), -.IR stap\-server (8), -.IR stapprobes (3stap), -.IR stapfuncs (3stap), -.IR stapex (3stap), -.IR NSS , -.IR certutil - -.SH BUGS -Use the Bugzilla link of the project web page or our mailing list. -.nh -.BR http://sources.redhat.com/systemtap/ ", " . -.hy diff -Nru systemtap-1.4/stap-client-connect.c systemtap-1.6/stap-client-connect.c --- systemtap-1.4/stap-client-connect.c 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/stap-client-connect.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,619 +0,0 @@ -/* - SSL client program that sets up a connection to a SSL server, transmits - the given input file and then writes the reply to the given output file. - - Copyright (C) 2008-2010 Red Hat Inc. - - This file is part of systemtap, and is free software. You can - redistribute it and/or modify it under the terms of the GNU General Public - License as published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "nsscommon.h" - -#include - -#define READ_BUFFER_SIZE (60 * 1024) -static const char *trustNewServer_p = NULL; - -/* Exit error codes */ -#define GENERAL_ERROR 1 -#define CA_CERT_INVALID_ERROR 2 - -#if ! STAP /* temporary until stap-client-connect program goes away*/ -static void -Usage(const char *progName) -{ - fprintf(stderr, "Usage: %s -h hostname -p port -d dbdir -i infile -o outfile\n", - progName); - exit(1); -} -#endif - -#if STAP /* temporary until stap-client-connect program goes away*/ -#define exitErr(errorStr, rc) return (rc) -#else -static void -exitErr(const char* errorStr, int rc) -{ - fprintf (stderr, "%s: ", errorStr); - nssError(); - /* Exit gracefully. */ - /* ignoring return value of NSS_Shutdown. */ - (void) NSS_Shutdown(); - PR_Cleanup(); - exit(rc); -} -#endif - -/* Add the server's certificate to our database of trusted servers. */ -static SECStatus -trustNewServer (CERTCertificate *serverCert) -{ - SECStatus secStatus; - CERTCertTrust *trust = NULL; - PK11SlotInfo *slot; - - /* Import the certificate. */ - slot = PK11_GetInternalKeySlot();; - secStatus = PK11_ImportCert(slot, serverCert, CK_INVALID_HANDLE, "stap-server", PR_FALSE); - if (secStatus != SECSuccess) - goto done; - - /* Make it a trusted peer. */ - trust = (CERTCertTrust *)PORT_ZAlloc(sizeof(CERTCertTrust)); - if (! trust) - { - secStatus = SECFailure; - goto done; - } - - secStatus = CERT_DecodeTrustString(trust, "P,P,P"); - if (secStatus != SECSuccess) - goto done; - - secStatus = CERT_ChangeCertTrust(CERT_GetDefaultCertDB(), serverCert, trust); - if (secStatus != SECSuccess) - goto done; - -done: - if (trust) - PORT_Free(trust); - return secStatus; -} - -/* Called when the server certificate verification fails. This gives us - the chance to trust the server anyway and add the certificate to the - local database. */ -static SECStatus -badCertHandler(void *arg __attribute__ ((unused)), PRFileDesc *sslSocket) -{ - SECStatus secStatus; - PRErrorCode errorNumber; - CERTCertificate *serverCert; - SECItem subAltName; - PRArenaPool *tmpArena = NULL; - CERTGeneralName *nameList, *current; - char *expected = NULL; - - errorNumber = PR_GetError (); - switch (errorNumber) - { - case SSL_ERROR_BAD_CERT_DOMAIN: - /* Since we administer our own client-side databases of trustworthy - certificates, we don't need the domain name(s) on the certificate to - match. If the cert is in our database, then we can trust it. - Issue a warning and accept the certificate. */ - expected = SSL_RevealURL (sslSocket); - fprintf (stderr, "WARNING: The domain name, %s, does not match the DNS name(s) on the server certificate:\n", expected); - - /* List the DNS names from the server cert as part of the warning. - First, find the alt-name extension on the certificate. */ - subAltName.data = NULL; - serverCert = SSL_PeerCertificate (sslSocket); - secStatus = CERT_FindCertExtension (serverCert, - SEC_OID_X509_SUBJECT_ALT_NAME, - & subAltName); - if (secStatus != SECSuccess || ! subAltName.data) - { - fprintf (stderr, "Unable to find alt name extension on the server certificate\n"); - secStatus = SECSuccess; /* Not a fatal error */ - break; - } - - // Now, decode the extension. - tmpArena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); - if (! tmpArena) - { - fprintf (stderr, "Out of memory\n"); - secStatus = SECSuccess; /* Not a fatal error here */ - break; - } - nameList = CERT_DecodeAltNameExtension (tmpArena, & subAltName); - SECITEM_FreeItem(& subAltName, PR_FALSE); - if (! nameList) - { - fprintf (stderr, "Unable to decode alt name extension on server certificate\n"); - secStatus = SECSuccess; /* Not a fatal error */ - break; - } - - /* List the DNS names from the server cert as part of the warning. - The names are in a circular list. */ - current = nameList; - do - { - /* Make sure this is a DNS name. */ - if (current->type == certDNSName) - { - fprintf (stderr, " %.*s\n", - (int)current->name.other.len, current->name.other.data); - } - current = CERT_GetNextGeneralName (current); - } - while (current != nameList); - - /* Accept the certificate */ - secStatus = SECSuccess; - break; - - case SEC_ERROR_CA_CERT_INVALID: - /* The server's certificate is not trusted. Should we trust it? */ - secStatus = SECFailure; /* Do not trust by default. */ - if (trustNewServer_p == NULL) - break; - - /* Trust it for this session only? */ - if (strcmp (trustNewServer_p, "session") == 0) - { - secStatus = SECSuccess; - break; - } - - /* Trust it permanently? */ - if (strcmp (trustNewServer_p, "permanent") == 0) - { - /* The user wants to trust this server. Get the server's certificate so - and add it to our database. */ - serverCert = SSL_PeerCertificate (sslSocket); - if (serverCert != NULL) - secStatus = trustNewServer (serverCert); - } - break; - default: - secStatus = SECFailure; /* Do not trust this server */ - break; - } - - if (expected) - PORT_Free (expected); - if (tmpArena) - PORT_FreeArena (tmpArena, PR_FALSE); - - return secStatus; -} - -static PRFileDesc * -setupSSLSocket(void) -{ - PRFileDesc *tcpSocket; - PRFileDesc *sslSocket; - PRSocketOptionData socketOption; - PRStatus prStatus; - SECStatus secStatus; - - tcpSocket = PR_NewTCPSocket(); - if (tcpSocket == NULL) - goto loser; - - /* Make the socket blocking. */ - socketOption.option = PR_SockOpt_Nonblocking; - socketOption.value.non_blocking = PR_FALSE; - - prStatus = PR_SetSocketOption(tcpSocket, &socketOption); - if (prStatus != PR_SUCCESS) - goto loser; - - /* Import the socket into the SSL layer. */ - sslSocket = SSL_ImportFD(NULL, tcpSocket); - if (!sslSocket) - goto loser; - - /* Set configuration options. */ - secStatus = SSL_OptionSet(sslSocket, SSL_SECURITY, PR_TRUE); - if (secStatus != SECSuccess) - goto loser; - - secStatus = SSL_OptionSet(sslSocket, SSL_HANDSHAKE_AS_CLIENT, PR_TRUE); - if (secStatus != SECSuccess) - goto loser; - - /* Set SSL callback routines. */ -#if 0 /* no client authentication */ - secStatus = SSL_GetClientAuthDataHook(sslSocket, - (SSLGetClientAuthData)myGetClientAuthData, - (void *)certNickname); - if (secStatus != SECSuccess) - goto loser; -#endif -#if 0 /* Use the default */ - secStatus = SSL_AuthCertificateHook(sslSocket, - (SSLAuthCertificate)myAuthCertificate, - (void *)CERT_GetDefaultCertDB()); - if (secStatus != SECSuccess) - goto loser; -#endif - - secStatus = SSL_BadCertHook(sslSocket, (SSLBadCertHandler)badCertHandler, NULL); - if (secStatus != SECSuccess) - goto loser; - -#if 0 /* No handshake callback */ - secStatus = SSL_HandshakeCallback(sslSocket, myHandshakeCallback, NULL); - if (secStatus != SECSuccess) - goto loser; -#endif - - return sslSocket; - - loser: - if (tcpSocket) - PR_Close(tcpSocket); - return NULL; -} - - -static SECStatus -handle_connection( - PRFileDesc *sslSocket, const char *infileName, const char *outfileName -) -{ -#if DEBUG - int countRead = 0; -#endif - PRInt32 numBytes; - char *readBuffer; - PRFileInfo info; - PRFileDesc *local_file_fd; - PRStatus prStatus; - SECStatus secStatus = SECSuccess; - - /* read and send the data. */ - /* Try to open the local file named. - * If successful, then write it to the server - */ - prStatus = PR_GetFileInfo(infileName, &info); - if (prStatus != PR_SUCCESS || - info.type != PR_FILE_FILE || - info.size < 0) - { - fprintf (stderr, "could not find input file %s\n", infileName); - return SECFailure; - } - - local_file_fd = PR_Open(infileName, PR_RDONLY, 0); - if (local_file_fd == NULL) - { - fprintf (stderr, "could not open input file %s\n", infileName); - return SECFailure; - } - - /* Send the file size first, so the server knows when it has the entire file. */ - numBytes = htonl ((PRInt32)info.size); - numBytes = PR_Write(sslSocket, & numBytes, sizeof (numBytes)); - if (numBytes < 0) - { - PR_Close(local_file_fd); - return SECFailure; - } - - /* Transmit the local file across the socket. */ - numBytes = PR_TransmitFile(sslSocket, local_file_fd, - NULL, 0, - PR_TRANSMITFILE_KEEP_OPEN, - PR_INTERVAL_NO_TIMEOUT); - if (numBytes < 0) - { - PR_Close(local_file_fd); - return SECFailure; - } - -#if DEBUG - /* Transmitted bytes successfully. */ - fprintf(stderr, "PR_TransmitFile wrote %d bytes from %s\n", - numBytes, infileName); -#endif - - PR_Close(local_file_fd); - - /* read until EOF */ - readBuffer = PORT_Alloc(READ_BUFFER_SIZE); - if (! readBuffer) - exitErr("Out of memory", GENERAL_ERROR); - - local_file_fd = PR_Open(outfileName, PR_WRONLY | PR_CREATE_FILE | PR_TRUNCATE, - PR_IRUSR | PR_IWUSR | PR_IRGRP | PR_IWGRP | PR_IROTH); - if (local_file_fd == NULL) - { - fprintf (stderr, "could not open output file %s\n", outfileName); - return SECFailure; - } - while (PR_TRUE) - { - numBytes = PR_Read(sslSocket, readBuffer, READ_BUFFER_SIZE); - if (numBytes == 0) - break; /* EOF */ - - if (numBytes < 0) - { - secStatus = SECFailure; - break; - } -#if DEBUG - countRead += numBytes; -#endif - /* Write to output file */ - numBytes = PR_Write(local_file_fd, readBuffer, numBytes); - if (numBytes < 0) - { - fprintf (stderr, "could not write to %s\n", outfileName); - secStatus = SECFailure; - break; - } -#if DEBUG - fprintf(stderr, "***** Connection read %d bytes (%d total).\n", - numBytes, countRead ); - readBuffer[numBytes] = '\0'; - fprintf(stderr, "************\n%s\n************\n", readBuffer); -#endif - } - - PR_Free(readBuffer); - PR_Close(local_file_fd); - - /* Caller closes the socket. */ -#if DEBUG - fprintf(stderr, "***** Connection read %d bytes total.\n", countRead); -#endif - - return secStatus; -} - -/* make the connection. -*/ -static SECStatus -do_connect( - PRNetAddr *addr, - const char *hostName, - unsigned short port __attribute__ ((unused)), - const char *infileName, - const char *outfileName -) -{ - PRFileDesc *sslSocket; - PRStatus prStatus; - SECStatus secStatus; - - secStatus = SECSuccess; - - /* Set up SSL secure socket. */ - sslSocket = setupSSLSocket(); - if (sslSocket == NULL) - return SECFailure; - -#if 0 /* no client authentication */ - secStatus = SSL_SetPKCS11PinArg(sslSocket, password); - if (secStatus != SECSuccess) - goto done; -#endif - - secStatus = SSL_SetURL(sslSocket, hostName); - if (secStatus != SECSuccess) - goto done; - - prStatus = PR_Connect(sslSocket, addr, PR_INTERVAL_NO_TIMEOUT); - if (prStatus != PR_SUCCESS) - { - secStatus = SECFailure; - goto done; - } - - /* Established SSL connection, ready to send data. */ - secStatus = SSL_ResetHandshake(sslSocket, /* asServer */ PR_FALSE); - if (secStatus != SECSuccess) - goto done; - - /* This is normally done automatically on the first I/O operation, - but doing it here catches any authentication problems early. */ - secStatus = SSL_ForceHandshake(sslSocket); - if (secStatus != SECSuccess) - goto done; - - /* If we don't have both the input and output file names, then we're - contacting this server only in order to establish trust. No need to - handle the connection in this case. */ - if (infileName && outfileName) - secStatus = handle_connection(sslSocket, infileName, outfileName); - - done: - prStatus = PR_Close(sslSocket); - return secStatus; -} - -int -client_main (const char *hostName, PRUint32 ip, - PRUint16 port, - const char* infileName, const char* outfileName, - const char* trustNewServer) -{ - SECStatus secStatus; - PRStatus prStatus; - PRInt32 rv; - PRNetAddr addr; - PRHostEnt hostEntry; - PRErrorCode errorNumber; - char buffer[PR_NETDB_BUF_SIZE]; - int attempt; - int errCode = GENERAL_ERROR; - - trustNewServer_p = trustNewServer; - - /* Setup network connection. If we have an ip address, then - simply use it, otherwise we need to resolve the host name. */ - if (ip) - { - addr.inet.family = PR_AF_INET; - addr.inet.port = htons (port); - addr.inet.ip = htonl (ip); - } - else - { - prStatus = PR_GetHostByName(hostName, buffer, sizeof (buffer), &hostEntry); - if (prStatus != PR_SUCCESS) - exitErr ("Unable to resolve server host name", GENERAL_ERROR); - - rv = PR_EnumerateHostEnt(0, &hostEntry, port, &addr); - if (rv < 0) - exitErr ("Unable to resolve server host address", GENERAL_ERROR); - } - - /* Some errors (see below) represent a situation in which trying again - should succeed. However, don't try forever. */ - for (attempt = 0; attempt < 5; ++attempt) - { - secStatus = do_connect (&addr, hostName, port, infileName, outfileName); - if (secStatus == SECSuccess) - return secStatus; - - errorNumber = PR_GetError (); - switch (errorNumber) - { - case PR_CONNECT_RESET_ERROR: - /* Server was not ready. */ - sleep (1); - break; /* Try again */ - case SEC_ERROR_EXPIRED_CERTIFICATE: - /* The server's certificate has expired. It should - generate a new certificate. Give the server a chance to recover - and try again. */ - sleep (2); - break; /* Try again */ - case SEC_ERROR_CA_CERT_INVALID: - /* The server's certificate is not trusted. The exit code must - reflect this. */ - errCode = CA_CERT_INVALID_ERROR; - goto failed; /* break switch and loop */ - default: - /* This error is fatal. */ - goto failed; /* break switch and loop */ - } - } - - failed: - /* Unrecoverable error */ - exitErr("Unable to connect to server", errCode); - return errCode; -} - -#if 0 /* No client authorization */ -static char * -myPasswd(PK11SlotInfo *info, PRBool retry, void *arg) -{ - char * passwd = NULL; - - if ( (!retry) && arg ) - passwd = PORT_Strdup((char *)arg); - - return passwd; -} -#endif - -#if ! STAP /* temporary until stap-client-connect program goes away*/ -int -main(int argc, char **argv) -{ - const char *progName = NULL; - const char *certDir = NULL; - const char *hostName = NULL; - unsigned short port = 0; - const char *infileName = NULL; - const char *outfileName = NULL; - SECStatus secStatus; - PLOptState *optstate; - PLOptStatus status; - - /* Call the NSPR initialization routines */ - PR_Init( PR_SYSTEM_THREAD, PR_PRIORITY_NORMAL, 1); - - progName = PL_strdup(argv[0]); - - optstate = PL_CreateOptState(argc, argv, "d:h:i:o:p:t:"); - while ((status = PL_GetNextOpt(optstate)) == PL_OPT_OK) - { - switch(optstate->option) - { - case 'd' : certDir = PL_strdup(optstate->value); break; - case 'h' : hostName = PL_strdup(optstate->value); break; - case 'i' : infileName = PL_strdup(optstate->value); break; - case 'o' : outfileName = PL_strdup(optstate->value); break; - case 'p' : port = PORT_Atoi(optstate->value); break; - case 't' : trustNewServer_p = PL_strdup(optstate->value); break; - case '?' : - default : Usage(progName); - } - } - - if (port == 0 || hostName == NULL || infileName == NULL || outfileName == NULL || certDir == NULL) - Usage(progName); - -#if 0 /* no client authentication */ - /* Set our password function callback. */ - PK11_SetPasswordFunc(myPasswd); -#endif - - /* Initialize the NSS libraries. */ - secStatus = NSS_InitReadWrite(certDir); - if (secStatus != SECSuccess) - { - /* Try it again, readonly. */ - secStatus = NSS_Init(certDir); - if (secStatus != SECSuccess) - exitErr("Error initializing NSS", GENERAL_ERROR); - } - - /* All cipher suites except RSA_NULL_MD5 are enabled by Domestic Policy. */ - NSS_SetDomesticPolicy(); - - client_main (hostName, 0, port, infileName, outfileName, trustNewServer_p); - - NSS_Shutdown(); - PR_Cleanup(); - - return 0; -} -#endif /* ! STAP -- temporary */ - -/* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ diff -Nru systemtap-1.4/stap-env systemtap-1.6/stap-env --- systemtap-1.4/stap-env 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/stap-env 2011-07-25 18:12:01.000000000 +0000 @@ -3,7 +3,7 @@ # Generate a certificate for the systemtap server and add it to the # database of trusted servers for the client. # -# Copyright (C) 2009 Red Hat Inc. +# Copyright (C) 2009-2011 Red Hat Inc. # # This file is part of systemtap, and is free software. You can # redistribute it and/or modify it under the terms of the GNU General @@ -12,29 +12,23 @@ # Common environment setup for stap scripts +# Installation directories # INSTALL-HOOK These settings work for running the server from the source tree # INSTALL-HOOK using the dejagnu test harness and will be overridden at install # INSTALL-HOOK time. -stap_exec_prefix= stap_sysconfdir=`pwd`/net stap_pkglibexecdir= stap_localstatedir=`pwd`/net/var # General configuration -stap_tmpdir_prefix_client=stap.client -stap_tmpdir_prefix_server=stap.server stap_avahi_service_tag=_stap._tcp # NSS certificate databases -ssl_global_ssl_db=$stap_sysconfdir/systemtap/ssl if test "X$SYSTEMTAP_DIR" = "X"; then stap_user_ssl_db=$HOME/.systemtap/ssl else stap_user_ssl_db=$SYSTEMTAP_DIR/ssl fi -stap_ssl_db=$stap_user_ssl_db - -stap_signing_db=$stap_sysconfdir/systemtap/staprun stap_certfile=stap.cert function stap_get_arch { diff -Nru systemtap-1.4/stap-find-or-start-server systemtap-1.6/stap-find-or-start-server --- systemtap-1.4/stap-find-or-start-server 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/stap-find-or-start-server 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ -#!/bin/bash - -# Find or start a systemtap server -# -# Copyright (C) 2008, 2009 Red Hat Inc. -# -# This file is part of systemtap, and is free software. You can -# redistribute it and/or modify it under the terms of the GNU General -# Public License (GPL); either version 2, or (at your option) any -# later version. - -# This script attempts to find a systemtap server. If one is found, it -# echoes 0. -# -# Otherwise, it attempts to start a server. If succesful, it echoes the -# process id. -# -# Otherwise, it echoes -1 - -# Deprecation warning. -echo "WARNING: stap-find-or-start-server is deprecated and will be removed in release 1.5" >&2 -echo "Please use 'stap-server start'. See stap(1) for more information" >&2 - -# Initialize the environment -. ${PKGLIBEXECDIR}stap-env - -# Is there a server available? -${stap_pkglibexecdir}stap-find-servers >/dev/null 2>&1 && echo 0 && exit 0 - -# No server available, try to start one. -pid=`${stap_pkglibexecdir}stap-start-server "$@"` -if test $? = 0; then - echo $pid - exit 0 -fi - -# Could not find or start a server -echo "-1" -exit 0 diff -Nru systemtap-1.4/stap-find-servers systemtap-1.6/stap-find-servers --- systemtap-1.4/stap-find-servers 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/stap-find-servers 1970-01-01 00:00:00.000000000 +0000 @@ -1,167 +0,0 @@ -#!/bin/bash - -# Find compile servers for systemtap -# -# Copyright (C) 2008, 2009 Red Hat Inc. -# -# This file is part of systemtap, and is free software. You can -# redistribute it and/or modify it under the terms of the GNU General -# Public License (GPL); either version 2, or (at your option) any -# later version. - -# This script uses avahi to find systemtap compile servers on the local -# network. Information about each server found is printed to stdout. - -# Deprecation warning. -echo "WARNING: stap-find-servers is deprecated and will be removed in release 1.5" >&2 -echo "Please use 'stap --list-servers'. See stap(1) for more information" >&2 - -# Initialize the environment -. ${PKGLIBEXECDIR}stap-env - -#----------------------------------------------------------------------------- -# Helper functions. -#----------------------------------------------------------------------------- -# function: initialization -function initialization { - rc=1 # not found yet - if test "X$1" = "X--all"; then - find_all=1 - else - find_all=0 - fi - timeout=20 # seconds -} - -# function: find_servers -# -# Find and establish connection with a compatible stap server. -function find_servers { - # Create a temp file for the list of servers. We do this instead - # of using a pipe so that we can kill avahi-browse if it - # takes too long. - tmpfile=`mktemp -t stap-serversXXXXXX` || \ - fatal "Cannot create temporary file " $tmpfile - - # Find servers - avahi-browse $stap_avahi_service_tag --terminate -r > $tmpfile & - - for ((attempt=0; $attempt < $timeout; ++attempt)) - do - if ! jobs '%avahi-browse' >/dev/null 2>&1; then - break - fi - sleep 1 - done - - # Kill avahi-browse, if it's still running - test $attempt = $timeout && kill -s SIGTERM '%avahi-browse' 2>/dev/null - - match_server < $tmpfile - rm -fr $tmpfile -} - -# function: match_server -# -# Find a suitable server using the avahi-browse output provided on stdin. -function match_server { - local server_ip - local server_name - local server_sysinfo - local server_port - - rc=1 # not found yet - - # Loop over the avahi service descriptors. - read -t $timeout || return - while test "X$REPLY" != "X" - do - server_name= - server_ip= - server_port= - server_sysinfo= - - # Examine the next service descriptor - # Is it a stap server? - if ! echo $REPLY | grep -q "=.* .* IPv4 .*_stap"; then - read -t $timeout || return - continue - fi - REPLY= - - # Get the details of the service - local service_tag equal service_data - while read -t $timeout service_tag equal service_data - do - case $service_tag in - hostname ) - server_name=`expr "$service_data" : '\[\([^]]*\)\]'` - ;; - address ) - # Sometimes (seems random), avahi-resolve-host-name resolves a local server to its - # hardware address rather than its ip address. Keep trying until we get - # an ip address. - server_ip=`expr "$service_data" : '\[\([^]]*\)\]'` - local attempt - for ((attempt=0; $attempt < 5; ++attempt)) - do - server_ip=`expr "$server_ip" : '\([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*\)$'` - if test "X$server_ip" != "X"; then - break - fi - # Resolve the server.domain to an ip address. - server_ip=`avahi-resolve-host-name $server_name` - server_ip=`expr "$server_ip" : '.* \(.*\)$'` - done - ;; - port ) - server_port=`expr "$service_data" : '\[\([^]]*\)\]'` - ;; - txt ) - server_sysinfo=`expr "$service_data" : '\[.*\"\(sysinfo=[^]]*\)\"\]'` - ;; - * ) - REPLY="$service_tag $equal $service_data" - break - ;; - esac - done - - # It's an stap server, but is it compatible? - if test $find_all = 0 -a "$server_sysinfo" != "`client_sysinfo`"; then - continue - fi - - # It's compatible, or we're finding all servers. Print a summary line - echo "$server_name $server_ip $server_port '$server_sysinfo'" - rc=0 - done -} - -# function client_sysinfo -# -# Generate the client's sysinfo and echo it to stdout -function client_sysinfo { - if test "X$sysinfo_client" = "X"; then - # Add some info from uname - sysinfo_client="`uname -r` `stap_get_arch`" - fi - echo sysinfo=$sysinfo_client -} - -# function: fatal [ MESSAGE ] -# -# Fatal error -# Prints its arguments to stderr and exits -function fatal { - echo "$0: ERROR:" "$@" >&2 - exit 1 -} - -#----------------------------------------------------------------------------- -# Beginning of main line execution. -#----------------------------------------------------------------------------- -initialization "$@" -find_servers - -exit $rc diff -Nru systemtap-1.4/stap-gen-cert systemtap-1.6/stap-gen-cert --- systemtap-1.4/stap-gen-cert 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/stap-gen-cert 1970-01-01 00:00:00.000000000 +0000 @@ -1,93 +0,0 @@ -#!/bin/bash - -# Generate a certificate for the systemtap server and add it to the -# database of trusted servers for the client. -# -# Copyright (C) 2008-2010 Red Hat Inc. -# -# This file is part of systemtap, and is free software. You can -# redistribute it and/or modify it under the terms of the GNU General -# Public License (GPL); either version 2, or (at your option) any -# later version. - -# Initialize the environment -. ${PKGLIBEXECDIR}stap-env - -# Arguments -serverdb="$1" -shift - -# We need to keep localhost in the domain list until stap-client goes away -domains="$HOSTNAME" -while test $# != 0 -do - test -n "$domains" && domains="$domains," - domains="${domains}$1" - shift -done - -# Obtain the certificate database directory name. -if test "X$serverdb" = "X"; then - serverdb="$stap_ssl_db/server" -fi -rm -fr "$serverdb" - -# Create the server's certificate database directory. -if ! mkdir -p -m 755 "$serverdb"; then - echo "Unable to create the server certificate database directory: $serverdb" >&2 - exit 1 -fi - -# Create the certificate database password file. Care must be taken -# that this file is only readable by the owner. -if ! (touch "$serverdb/pw" && chmod 600 "$serverdb/pw"); then - echo "Unable to create the server certificate database password file: $serverdb/pw" >&2 - exit 1 -fi - -# Generate a random password. -mkpasswd -l 20 > "$serverdb/pw" 2>/dev/null || \ -apg -a 1 -n 1 -m 20 -x 20 > "$serverdb/pw" 2>/dev/null || \ -(read -n20 password "$serverdb/pw") - -# Generate the server certificate database -if ! certutil -N -d "$serverdb" -f "$serverdb/pw" > /dev/null; then - echo "Unable to initialize the server certificate database directory: $serverdb" >&2 - exit 1 -fi - -# We need some random noise for generating keys -dd bs=123 count=1 < /dev/urandom > "$serverdb/noise" 2> /dev/null - -# Generate a request for the server's certificate. -certutil -R -d "$serverdb" -f "$serverdb/pw" -s "CN=Systemtap Compile Server, OU=Systemtap" \ - -o "$serverdb/stap.req" -z "$serverdb/noise" 2> /dev/null -rm -fr "$serverdb/noise" - -# Create the certificate file first so that it always has the proper access permissions. -if ! (touch "$serverdb/$stap_certfile" && chmod 644 "$serverdb/$stap_certfile"); then - echo "Unable to create the server certificate file: $serverdb/$stap_certfile" >&2 - exit 1 -fi - -# Now generate the actual certificate. Make it valid for 1 year. -certutil -C -i "$serverdb/stap.req" -o "$serverdb/$stap_certfile" -x -d "$serverdb" \ - -f "$serverdb/pw" -v 12 -5 -8 "$domains" >/dev/null <<-EOF -1 -3 -7 -8 -y -EOF -rm -fr "$serverdb/stap.req" - -# Add the certificate to the server's certificate/key database as a trusted peer, ssl server and object signer -certutil -A -n stap-server -t "PCu,,PCu" -i "$serverdb/$stap_certfile" -d "$serverdb" -f "$serverdb/pw" - -# Print some information about the certificate. -echo "Certificate $serverdb/$stap_certfile created and added to database $serverdb" -certutil -L -d "$serverdb" -n stap-server | \ - awk '/Validity|Not After|Not Before/ { print $0 }' | \ - sed 's/^ */ /' - -exit 0 diff -Nru systemtap-1.4/stap-gen-cert.cxx systemtap-1.6/stap-gen-cert.cxx --- systemtap-1.4/stap-gen-cert.cxx 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/stap-gen-cert.cxx 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,121 @@ +/* + Generate the SSL/signing certificate used by the Systemtap Compile Server. + + Copyright (C) 2011 Red Hat Inc. + + This file is part of systemtap, and is free software. You can + redistribute it and/or modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ +#include "config.h" + +extern "C" { +#include +#include +} +#include + +#include "util.h" +#include "nsscommon.h" + +using namespace std; + +// Called from methods within nsscommon.cxx. +extern "C" +void +nsscommon_error (const char *msg, int logit __attribute ((unused))) +{ + clog << msg << endl; +} + +/* getopt variables */ +extern int optind; + +/* File scope statics */ +static bool use_db_password; +static string cert_db_path; +static string dnsNames; + +static void +parse_options (int argc, char **argv) +{ + // Examine the command line. + while (true) + { + int grc = getopt (argc, argv, "P"); + if (grc < 0) + break; + switch (grc) + { + case 'P': + use_db_password = true; + break; + case '?': + // Invalid/unrecognized option given. Message has already been issued. + break; + default: + // Reached when one added a getopt option but not a corresponding switch/case: + if (optarg) + nsscommon_error (_F("%s : unhandled option '%c %s'", argv[0], (char)grc, optarg)); + else + nsscommon_error (_F("%s : unhandled option '%c'", argv[0], (char)grc)); + break; + } + } + + if (optind < argc) + { + // The first non-option is the certificate database path. + cert_db_path = argv[optind]; + ++optind; + + // All other non options are additional dns names for the certificate. + for (int i = optind; i < argc; i++) + { + if (! dnsNames.empty ()) + dnsNames += ","; + dnsNames += argv[i]; + } + } +} + +int +main (int argc, char **argv) { + // Initial values. + dnsNames.clear (); + use_db_password = false; + + // Parse the arguments. + parse_options (argc, argv); + + // Where is the ssl certificate/key database? + if (cert_db_path.empty ()) + cert_db_path = server_cert_db_path (); + + // Make sure NSPR is initialized. Must be done before NSS is initialized + PR_Init (PR_SYSTEM_THREAD, PR_PRIORITY_NORMAL, 1); + /* Set the cert database password callback. */ + PK11_SetPasswordFunc (nssPasswordCallback); + + // Generate the certificate database. + int rc = gen_cert_db (cert_db_path, dnsNames, use_db_password); + if (rc != 0) + { + // NSS message already issued. + nsscommon_error (_("Unable to generate certificate")); + } + + /* Exit NSPR gracefully. */ + PR_Cleanup (); + + return rc; +} diff -Nru systemtap-1.4/staplog.c systemtap-1.6/staplog.c --- systemtap-1.4/staplog.c 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/staplog.c 2011-07-25 18:12:01.000000000 +0000 @@ -1,7 +1,7 @@ /* crash shared object for retrieving systemtap buffer Copyright (c) 2007, Hitachi, Ltd., - Copyright (C) 2009, Red Hat Inc. + Copyright (C) 2009-2011, Red Hat Inc. Created by Satoru Moriya Updated by Masami Hiramatsu @@ -16,8 +16,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + along with this program. If not, see . */ diff -Nru systemtap-1.4/stap-merge.1 systemtap-1.6/stap-merge.1 --- systemtap-1.4/stap-merge.1 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/stap-merge.1 2011-07-25 18:12:01.000000000 +0000 @@ -1,5 +1,5 @@ .\" -*- nroff -*- -.TH STAP-MERGE 1 +.TH STAP\-MERGE 1 .SH NAME stap\-merge \- systemtap per-cpu binary merger @@ -19,7 +19,7 @@ .SH SYNOPSIS .br -.B stap-merge +.B stap\-merge [ .I OPTIONS ] @@ -29,12 +29,12 @@ .SH DESCRIPTION -The stap-merge executable applies when the \-b option has been used +The stap\-merge executable applies when the \-b option has been used while running a .IR stap script. The \-b option will generate files -per\-cpu, based on the timestamp field. Stap-merge will -then merge and sort through the per\-cpu files based on the timestamp +per\-cpu, based on the timestamp field. Then stap\-merge will +merge and sort through the per-cpu files based on the timestamp field. .SH OPTIONS @@ -55,7 +55,7 @@ .SH EXAMPLES .SAMPLE -$ stap -v -b -e 'probe syscall.open { printf("%s(%d) open\\n", +$ stap \-v \-b \-e 'probe syscall.open { printf("%s(%d) open\\n", execname(), pid()) }' .ESAMPLE @@ -66,15 +66,15 @@ representing which cpu the file was produced from). .SAMPLE -$ stap-merge -v stpd_cpu0 stpd_cpu1 +$ stap\-merge \-v stpd_cpu0 stpd_cpu1 .ESAMPLE -Running the stap-merge program in the same directory as the stap +Running the stap\-merge program in the same directory as the stap script earlier in the example, will produce an ordered sequence of packets with the three part label for each set of data. This result will be pushed through the standard output. An output file -could have been specified using the "-o" option. +could have been specified using the "\-o" option. .SH FILES @@ -89,11 +89,11 @@ .IR staprun (8), .IR stapvars (3stap), .IR stapex (3stap), -.IR stap-server (8), +.IR stap\-server (8), .IR gdb (1) .SH BUGS Use the Bugzilla link of the project web page or our mailing list. .nh -.BR http://sources.redhat.com/systemtap/ , . +.BR http://sourceware.org/systemtap/ , . .hy diff -Nru systemtap-1.4/stappaths.7.in systemtap-1.6/stappaths.7.in --- systemtap-1.4/stappaths.7.in 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/stappaths.7.in 2011-07-25 18:12:01.000000000 +0000 @@ -68,15 +68,15 @@ /lib/modules/`uname \-r`/build/vmlinux /lib/modules/`uname \-r`/.debug/vmlinux.debug /usr/lib/debug/lib/modules/`uname \-r`/vmlinux.debug -/var/cache/abrt-di/usr/debug/lib/modules/`uname \-r`/ -/var/cache/abrt-di/usr/lib/debug/lib/modules/`uname \-r`/vmlinux.debug +/var/cache/abrt\-di/usr/debug/lib/modules/`uname \-r`/ +/var/cache/abrt\-di/usr/lib/debug/lib/modules/`uname \-r`/vmlinux.debug .PP .ESAMPLE .IP Debuginfo for user-space applications have source files located in /usr/src/debug/ Further file information on user-space applications can be determined per-basis using -rpm -ql -debuginfo. For supported user-space applications information please +rpm \-ql \-debuginfo. For supported user-space applications information please visit the systemtap wiki. .TP $HOME/.systemtap @@ -111,17 +111,17 @@ @prefix@/etc/systemtap/staprun/ \fIstaprun\fR\[aq]s trusted signer certificate database. .TP -@prefix@/etc/sysconfig/stap-server/ -stap-server service global configuration file. +@prefix@/etc/sysconfig/stap\-server/ +stap\-server service global configuration file. .TP -@prefix@/etc/stap-server/conf.d/*.conf -stap-server service configuration files for default servers. +@prefix@/etc/stap\-server/conf.d/*.conf +stap\-server service configuration files for default servers. .TP -@prefix@/var/run/stap-server/ -stap-server service default location of status files for running servers. +@prefix@/var/run/stap\-server/ +stap\-server service default location of status files for running servers. .TP -@prefix@/var/log/stap-server.log -stap-server service default log file. +@prefix@/var/log/stap\-server.log +stap\-server service default log file. .PP @@ -136,7 +136,7 @@ .IR staprun (8), .IR stapvars (3stap), .IR stapex (3stap), -.IR stap-server (8), +.IR stap\-server (8), .IR awk (1), .IR gdb (1) @@ -144,5 +144,5 @@ .SH BUGS Use the Bugzilla link of the project web page or our mailing list. .nh -.BR http://sources.redhat.com/systemtap/ , . +.BR http://sourceware.org/systemtap/ , . .hy diff -Nru systemtap-1.4/stapprobes.3stap systemtap-1.6/stapprobes.3stap --- systemtap-1.4/stapprobes.3stap 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/stapprobes.3stap 2011-07-25 18:12:01.000000000 +0000 @@ -1,4 +1,4 @@ -.\" -*- nroff -*- +.\" t .TH STAPPROBES 3stap .SH NAME stapprobes \- systemtap probe points @@ -73,7 +73,6 @@ kprobe.function("foo") .ESAMPLE - Probes may be broadly classified into "synchronous" and "asynchronous". A "synchronous" event is deemed to occur when any processor executes an instruction matched by the specification. This @@ -86,6 +85,40 @@ declaration may also contain several comma-separated specifications, all of which are probed. +.SH DWARF DEBUGINFO + +Resolving some probe points requires DWARF debuginfo or "debug +symbols" for the specific part being instrumented. For some others, +DWARF is automatically synthesized on the fly from source code header +files. For others, it is not needed at all. Since a systemtap script +may use any mixture of probe points together, the union of their DWARF +requirements has to be met on the computer where script compilation +occurs. (See the \fI\-\-use\-server\fR option and the \fBstap-server\ +(8)\fR man page for information about the remote compilation facility, +which allows these requirements to be met on a different machine.) +.PP +The following point lists many of the available probe point families, +to classify them with respect to their need for DWARF debuginfo. + +.TS +l l l. +\fBDWARF AUTO-DWARF NON-DWARF\fP + +kernel.function, .statement kernel.trace kernel.mark +module.function, .statement process.mark +process.function, .statement begin, end, error, never +process.mark \fI(backup)\fP timer + perf + procfs + kernel.statement.absolute + kernel.data + kprobe.function + process.statement.absolute + process.begin, .end, .error +.TE + +.SH PROBE POINT FAMILIES + .SS BEGIN/END/ERROR The probe points @@ -153,7 +186,7 @@ .IR .return probe. .PP -Each probe alias defines a variety of variables. Looking at the tapset source +Each probe alias provides a variety of variables. Looking at the tapset source code is the most reliable way. Generally, each variable listed in the standard manual page is made available as a script-level variable, so .IR syscall.open @@ -170,8 +203,11 @@ .IR retstr For return probes, a pretty-printed form of the system-call result. .PP -Not all probe aliases obey all of these general guidelines. Please report -any bothersome ones you encounter as a bug. +As usual for probe aliases, these variables are all simply initialized +once from the underlying $context variables, so that later changes to +$context variables are not automatically reflected. Not all probe +aliases obey all of these general guidelines. Please report any +bothersome ones you encounter as a bug. .SS TIMERS @@ -285,6 +321,8 @@ .br module(MPATTERN).function(PATTERN).inline .br +module(MPATTERN).function(PATTERN).label(LPATTERN) +.br .br kernel.statement(PATTERN) .br @@ -296,6 +334,10 @@ .br process("PATH").statement("*@FILE.c:123") .br +process("PATH").library("PATH").function("NAME") +.br +process("PATH").library("PATH").statement("*@FILE.c:123") +.br process("PATH").function("*").return .br process("PATH").function("myfun").label("foo") @@ -333,7 +375,7 @@ absolute line number if preceded by a ":", or relative to the entry of the function if preceded by a "+". All the lines in the function can be matched with ":*". -A range of lines x through y can be matched with ":x-y". +A range of lines x through y can be matched with ":x\-y". .PP As an alternative, PATTERN may be a numeric constant, indicating an address. Such an address may be found from symbol tables of the @@ -417,7 +459,7 @@ expands to 1 or 0 iff the given context variable expression is resolvable, for use in conditionals such as .SAMPLE -@defined($foo->bar) ? $foo->bar : 0 +@defined($foo\->bar) ? $foo\->bar : 0 .ESAMPLE .TP $EXPR$ @@ -572,9 +614,14 @@ .PP If a process probe is specified without a PID or FULLPATH, all user threads will be probed. However, if systemtap was invoked with the -.IR -c " or " -x +.IR \-c " or " \-x options, then process probes are restricted to the process -hierarchy associated with the target process. +hierarchy associated with the target process. If a process probe is +specified without a PID or FULLPATH, but with the +.IR \-c " +option, the PATH of the +.IR \-c " +cmd will be heuristically filled into the process PATH. .PP Third, symbolic static instrumentation compiled into programs and @@ -602,10 +649,12 @@ Finally, full symbolic source-level probes in user-space programs and shared libraries are supported. These are exactly analogous to the symbolic DWARF-based kernel/module probes described above, -and expose similar contextual $-variables. +and expose similar contextual $variables. .SAMPLE process("PATH").function("NAME") process("PATH").statement("*@FILE.c:123") +process("PATH").library("PATH").function("NAME") +process("PATH").library("PATH").statement("*@FILE.c:123") process("PATH").function("*").return process("PATH").function("myfun").label("foo") .ESAMPLE @@ -618,8 +667,11 @@ .BR $PATH . If PATH names refer to scripts, the actual interpreters (specified in the script in the first line after the #! characters) are probed. -PATH may also refer to shared libraries, in which case all proceses that -map it at runtime would be selected for probing. +If PATH is a process component parameter referring to shared libraries +then all processes that map it at runtime would be selected for +probing. If PATH is a library component parameter referring to shared +libraries then the process specified by the process component would be +selected. If the PATH string contains wildcards as in the MPATTERN case, then standard globbing is performed to find all matching paths. In this case, the @@ -907,6 +959,9 @@ probe perf.type(NN).config(MM).sample(XX) probe perf.type(NN).config(MM) .ESAMPLE +The systemtap probe handler is called once per XX increments +of the underlying performance counter. The default sampling +count is 1000000. The range of valid type/config is described by the .IR perf_event_open (2) system call, and/or the diff -Nru systemtap-1.4/stap-report systemtap-1.6/stap-report --- systemtap-1.4/stap-report 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/stap-report 2011-07-25 18:12:01.000000000 +0000 @@ -8,7 +8,8 @@ run "stap -V" run "which stap" run "locate --regex '/stap(run)?$' | xargs ls -ald" -run "printenv | egrep '^PATH=|^LD_LIBRARY_PATH=|^SYSTEMTAP_.*='" +run "printenv | egrep '^PATH=|^LD_LIBRARY_PATH=|^SYSTEMTAP_.*=|^XDG_DATA.*='" +run "stap -vv -p4 -e 'probe begin {exit()}'" run "gcc -v" run "uname -a" run "dmesg | egrep 'stap|systemtap' | tail -n 10" @@ -19,3 +20,4 @@ run "rpm -qa --qf '%{name}-%{version} %{release}.%{arch}\\n' | egrep 'systemtap|elfutils|kernel|gcc' | sort" fi run "egrep 'PROBE|TRACE|MARKER|_DEBUG_' /lib/modules/`uname -r`/build/.config | grep -v not.set | sort | fmt -w 80" +run "find /debugfs /proc /sys /dev -name '*kprobes*' 2>/dev/null | xargs grep ." diff -Nru systemtap-1.4/stap-server systemtap-1.6/stap-server --- systemtap-1.4/stap-server 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/stap-server 2011-07-25 18:12:01.000000000 +0000 @@ -44,6 +44,7 @@ # Default option settings # Optional global config file OPT_CONFIG_FILE= +OPT_OTHER= echo_usage () { echo $"Usage: $prog {start|stop|restart|condrestart|try-restart|force-reload|status} [options]" @@ -58,6 +59,7 @@ echo $" -i : specify a server for each installed kernel release." echo $" -n nickname : specify a server configuration by nickname." echo $" -p pid : specify a server or server configuration by process id." + echo $" -k : keep server temporary files." echo $"" echo $"All options, may be specified more than once." echo $"" @@ -82,7 +84,8 @@ echo $"nickname. When -n is specified, a currently running server with the" echo $"given nickname will be searched for. If no currently running server" echo $"with the given nickname is found, a server configuration with the" - echo $"given nickname will be searched for in $stap_sysconfdir/stap-server/conf.d/*.conf." + echo $"given nickname will be searched for in" + echo $"$stap_sysconfdir/stap-server/conf.d/*.conf." echo $"If a server configuration for the given nickname is found, the -a, -r," echo $"-I, -R, -B and -u options for that server will be used as if they were" echo $"specified on the command line. If no configuration with the given" @@ -100,6 +103,9 @@ echo $"-I, -R, -B and -u options for that server will be used as if they were" echo $"specified on the command line." echo $"" + echo $"The -k option tells the server to keep the temporary directories it creates" + echo $"during each transaction with a client." + echo $"" echo $"The specified action is performed for the server(s) specified on the" echo $"command line. If no servers are specified on the command line, the" echo $"behavior is as follows:" @@ -160,6 +166,10 @@ local rc=0 while [ -n "$1" ]; do case "$1" in + -k | -P) + OPT_OTHER="$OPT_OTHER $1" + shift 1 + ;; -a) SERVER_CMDS+=("ARCH=\"`quote_for_cmd "$2"`\"") shift 1 @@ -285,7 +295,7 @@ echo "Missing $version_file_name" return 1 fi - SERVER_CMDS+=("RELEASE=\"`quote_for_cmd "$kernel_release"`\"") + SERVER_CMDS+=("RELEASE=\"`quote_for_cmd "$1"`\"") # pass the path as-is return 0 fi @@ -628,7 +638,7 @@ fi # Construct the server start command. - local server_cmd="$STAP_START_SERVER -r \"`quote_for_cmd "$RELEASE"`\" -a \"`quote_for_cmd "$ARCH"`\"" + local server_cmd="$STAP_START_SERVER -r \"`quote_for_cmd "$RELEASE"`\" -a \"`quote_for_cmd "$ARCH"`\" $OPT_OTHER" for b in "${BUILD[@]}"; do server_cmd="$server_cmd -B \"`quote_for_cmd "$b"`\"" done @@ -999,7 +1009,7 @@ exit 1 fi -OPTS=`getopt -s bash -u -o 'a:B:c:iI:n:p:r:R:u:' -- "$@"` +OPTS=`getopt -s bash -u -o 'a:B:c:iI:n:p:kPr:R:u:' -- "$@"` if [ $? -ne 0 ]; then echo "Error: Argument parse error: $@" >&2 echo_usage diff -Nru systemtap-1.4/stap-server.8 systemtap-1.6/stap-server.8 --- systemtap-1.4/stap-server.8 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/stap-server.8 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,486 @@ +.\" -*- nroff -*- +.TH STAP\-SERVER 8 +.SH NAME +stap\-server \- systemtap compile server management + +.SH SYNOPSIS + +.br +[ +.B service +] +.B stap\-server +{ +.B start +| +.B stop +| +.B restart +| +.B condrestart +| +.B try\-restart +| +.B force\-reload +| +.B status +} [ +.I options +] + +.SH DESCRIPTION + +A systemtap compile server listens for connections from stap clients +on a secure SSL network port and accepts requests to run the +.I stap +front end. Each server advertises its presence and configuration on the local +network using mDNS (\fIavahi\fR) allowing for automatic detection by clients. + +.PP +The stap\-server script aims to provide: +.IP \(bu 4 +management of systemtap compile servers as a service. +.IP \(bu 4 +convenient control over configured servers and individual (ad\-hoc) servers. + +.SH ARGUMENTS +One of the actions below must be specified: +.TP +.B start +Start servers. The specified servers are started. +If no server is specified, the configured servers are started. If no servers +are configured, a server for the kernel release and architecture of the host +is started. +If a specified server is +already started, this action will +be ignored for that server. If a server fails to start, this action fails. + +.TP +.B stop +Stop server(s). The specified servers are stopped. +If no server is specified, all currently running servers are stopped. +If a specified server is +not running, this action +will be successful for that server. If a server fails to stop, this action +fails. + +.TP +.B restart +Stop and restart servers. The specified servers are stopped and restarted. +If no server is specified, all currently running servers are stopped and +restarted. If no servers are running, this action behaves like \fIstart\fR. + +.TP +.B condrestart +Stop and restart servers. The specified servers are stopped and restarted. +If a specified server is not running, it is not started. If no server is +specified, all currently running servers are stopped and restarted. If no +servers are running, none will be started. + +.TP +.B try\-restart +This action is identical to \fIcondrestart\fR. + +.TP +.B force\-reload +Stop all running servers, reload config files and restart the service as if +.I start +was specified. + +.TP +.B status +Print information about running servers. Information about the specified +server(s) will be printed. If no server is specified, information about all +running servers will be printed. + +.SH OPTIONS +The following options are used to provide additional configuration and +to specify servers to be managed: + +.TP +\fB\-c\fR \fIconfigfile\fR +This option specifies a global configuration file in addition to the default +global configuration file described +below. This file will be processed after the default global +configuration file. If the \fB\-c\fR option is specified more than once, the +last +configuration file specified will be used. + +.TP +\fB\-a\fR \fIarchitecture\fR +This option specifies the target architecture of the server and is +analogous to the \fB\-a\fR option of \fIstap\fR. See the +.IR stap (1) +manual page for more details. +The default architecture is the architecture of the host. + +.TP +\fB\-r\fR \fIkernel\-release\fR +This option specifies the target kernel release of the server and is +analogous to the \fB\-r\fR option of \fIstap\fR. See the +.IR stap (1) +manual page for more details. +The default release is that of the currently running kernel. + +.TP +\fB\-I\fR \fIpath\fR +This option specifies an additional path to be searched by the server(s) for +tapsets and is analogous to the \fB\-I\fR option of \fIstap\fR. +See the +.IR stap (1) +manual page for more details. + +.TP +\fB\-R\fR \fIpath\fR +This option specifies the location of the systemtap runtime to be used by the +server(s) and is analogous to the \fB\-R\fR option of \fIstap\fR. +See the +.IR stap (1) +manual page for more details. + +.TP +\fB\-B\fR \fIoptions\fR +This option specifies options to be passed to \fImake\fR when building systemtap +modules and is analogous to the \fB\-B\fR option of \fIstap\fR. +See the +.IR stap (1) +manual page for more details. + +.TP +\fB\-i\fR +This option is a shortcut which specifies one server for each kernel +release installed in \fI/lib/modules/\fR. Previous +\fB\-I\fR, \fB\-R\fR, \fB\-B\fR and \fB\-u\fR options will be +applied to each server, however previous \fB\-a\fR options will be ignored and +the default architecture will be used. + +.TP +\fB\-n\fR \fInickname\fR +This option allows the specification of a server configuration by nickname. +When \fB\-n\fR is specified, a currently running server with the given nickname +will be searched for. If no currently running server with the given nickname is +found, a server configuration with the given nickname will be searched for in +the configuration files for default servers, +or the path configured in the global configuration file or +the configuration file specified by the +\fB\-c\fR option. If a server configuration for the given +nickname is found, the +\fB\-a\fR, \fB\-r\fR, \fB\-I\fR, \fB\-R\fR, \fB\-B\fR and \fB\-u\fR options for +that server will be used as if they were specified on the command line. If no +configuration with the given nickname is found, and the action is +.I start +(or an action behaving like \fIstart\fR +(see \fBARGUMENTS\fR), the server will be started with the given nickname. +If no configuration with the given nickname is found, and the action is not +.I start +(or an action behaving like \fIstart\fR), it is an error. If a nickname is +not specified for a server which is being started, its nickname will be its +process id. + +.TP +\fB\-p\fR \fIpid\fR +This option allows the specification of a server configuration by process id. +When \fB\-p\fR is specified, a currently running server with the given process +id will be searched for. If no such server is found, it is an error. If a server +with the given procss id is found, the +\fB\-a\fR, \fB\-r\fR, \fB\-I\fR, \fB\-R\fR, \fB\-B\fR and \fB\-u\fR options for +that server will be used as if they were specified on the command line. + +.TP +\fB\-u\fR \fIuser\-name\fR +Each systemtap compile server is normally run by the user name +\fistap\-server\fR (for the initscript) or as the user invoking +\fIstap\-server\fR, +unless otherwise configured (see \fBFILES\fR). This option +specifies the user name used to run the server(s). The user name specified +must be a member of the group \fIstap\-server\fR. + +.SH CONFIGURATION + +Configuration files allow us to: +.IP \(bu 4 +specify global configuration of logging, server configuration files, status +files and other global parameters. +.IP \(bu 4 +specify which servers are to be started by default. + +.SH Global Configuration + +The Global Configuration file contains +variable assignments used to configure the overall operation of the service. +Each line beginning with a '#' character is ignored. All other lines must be +of the form \fIVARIABLE=VALUE\fR. This is not a shell script. The entire +contents of the line after the = will be assigned as\-is to the variable. + +The following variables may be assigned: + +.TP +.B CONFIG_PATH +Specifies the absolute path of the directory containing the default server +configurations. + +.TP +.B STAT_PATH +Specifies the absolute path of the running server status directory. + +.TP +.B LOG_FILE +Specifies the absolute path of the log file. + +.TP +.B STAP_USER +Specifies the userid which will be used to run the server(s) +(default: for the initscript \fIstap\-server\fR, otherwise the user running +\fIstap\-server\fR). + +.SH Individual Server Configuration + +Each server configuration file configures a server to be started when no +server is specified for the \fIstart\fR action, or an action behaving like the +\fIstart\fR action (see \fIARGUMENTS\fR). Each configuration file contains +variable assignments used to configure an individual server. + +Each line beginning with a '#' character is ignored. All other lines must be +of the form \fIVARIABLE=VALUE\fR. This is not a shell script. The entire +contents of the line after the = will be assigned as\-is to the variable. + +Each configuration file must have a +filename suffix of \fI.conf\fR. The default +location of these files can be +overridden in the global configuration file using the \fB\-c\fR option +(see \fIOPTIONS\fR). + +The following variables may be assigned: +.TP +.B ARCH +Specifies the target architecture for this server and corresponds to the +\fB\-a\fR option (see \fIOPTIONS\fR). If \fBARCH\fR is not set, the +architecture of the host will be used. + +.TP +.B RELEASE +Specifies the kernel release for this server +and corresponds to the +\fB\-r\fR option (see \fIOPTIONS\fR). If \fBRELEASE\fR is not set, the +release +of the kernel running on the host will be used. + +.TP +.B BUILD +Specifies options to be passed to the \fImake\fR process used by +\fIsystemtap\fR to build kernel modules. +This an array variable with each element corresponding to a +\fB\-B\fR option (see \fIOPTIONS\fR). Using the form \fBBUILD=STRING\fR clears +the array and sets the first element to \fBSTRING\fR. Using the form +\fBBUILD+=STRING\fR adds \fBSTRING\fR as an additional element to the array. + +.TP +.B INCLUDE +Specifies a list of directories to be searched by the server for tapsets. +This an array variable with each element corresponding to an +\fB\-I\fR option (see \fIOPTIONS\fR). Using the form \fBINCLUDE=PATH\fR clears +the array and sets the first element to \fBPATH\fR. Using the form +\fBINCLUDE+=PATH\fR adds \fBPATH\fR as an additional element to the array. + +.TP +.B RUNTIME +Specifies the directory which contains the systemtap runtime code to be used +by this server +and corresponds to the +\fB\-R\fR option (see \fIOPTIONS\fR). + +.TP +.B USER +Specifies the user name to be used to run this server +and corresponds to the +\fB\-u\fR option (see \fIOPTIONS\fR). + +.TP +.B NICKNAME +Specifies the nickname to be used to refer to this server +and corresponds to the +\fB\-n\fR option (see \fIOPTIONS\fR). + +.SH SERVER AUTHENTICAION +The security of the SSL network connection between the client and server +depends on the proper +management of server certificates. + +.PP +The trustworthiness of a given systemtap compile server can not be determined +automatically without a trusted certificate authority issuing systemtap compile server +certificates. This is +not practical in everyday use and so, clients must authenticate servers +against their own database of trusted server certificates. In this context, +establishing a given server as trusted by a given client means adding +that server\[aq]s certificate to the +client\[aq]s database of trusted servers. + +.PP +For the \fIstap\-server\fR initscript, on the local host, this is handled +automatically. +When the \fIsystemtap\-server\fR package is installed, the server\[aq]s +certificate for the default user (\fIstap\-server\fR) is automatically +generated and installed. This means that servers started by the +\fIstap\-server\fR initscript, +with the default user, are automatically trusted by clients on the local +host, both as an SSL peer and as a systemtap module signer. Furthermore, +when stap is invoked by an unprivileged user +(not root, not a member of the group stapdev, but a member of the group +stapusr), the options \fI\-\-use\-server\fR and \fI\-\-unprivileged\fR +are automatically added to the specified options. +This means that unprivileged users +on the local host can use a server on the local host +in unprivileged mode with no further setup or options required. + +.PP +In order to use a server running on another host, that server\[aq]s certificate +must be installed on the client\[aq]s host. +See the \fI\-\-trust\-servers\fR option in the +.IR stap (1) +manual page for more details and README.unprivileged in the systemtap sources +for more details.. + +.SH EXAMPLES +See the +.IR stapex (3stap) +manual page for a collection of sample \fIsystemtap\fR scripts. +.PP +To start the configured servers, or the default server, if none are configured: +.PP +.B \& $ [ service ] stap\-server start +.PP +To start a server for each kernel installed in /lib/modules: +.PP +.B \& $ [ service ] stap\-server start \-i +.PP +To obtain information about the running server(s): +.PP +.B \& $ [ service ] stap\-server status +.PP +To start a server like another one, except targeting a different architecture, +by referencing the first server\[aq]s nickname: +.PP +.B \& $ [ service ] stap\-server start \-n \fINICKNAME\fR \-a \fIARCH\fR +.PP +To stop one of the servers by referencing its process id (obtained by running +\fBstap\-server status\fR): +.PP +.B \& $ [ service ] stap\-server stop \-p \fIPID\fR +.PP +To run a script using a compile server: +.PP +.B \& $ stap SCRIPT \-\-use\-server +.PP +To run a script as an unprivileged user using a compile server: +.PP +.B \& $ stap SCRIPT +.PP +To stop all running servers: +.PP +.B \& $ [ service ] stap\-server stop + +.SH SAFETY AND SECURITY +Systemtap is an administrative tool. It exposes kernel internal data +structures and potentially private user information. See the +.IR stap (1) +manual page for additional information on safety and security. + +.PP +As a network server, stap\-server should be activated with care in +order to limit the potential effects of bugs or mischevious users. +Consider the following prophylactic measures. +.TP +1 +Run stap\-server as an unprivileged user, never as root. + +When invoked as a +service (i.e. \fBservice stap\-server\fR ...), each server is run, +by default, as the user \fIstap\-server\fR. +When invoked directly (i.e. \fBstap\-server\fR ...), each server is run, +by default, as the invoking user. In each case, another user may be selected by +using the \fI\-u\fR option on invocation, by specifying +\fISTAP_USER=\fRusername in the global configuration file or by specifying +\fIUSER=\fRusername in an individual server configuration file. The invoking +user must have authority to run processes as another user. +See \fICONFIGURATION\fR. + +The selected user must have write access to the server log file. +The location of the server log file may +be changed by setting \fILOG_FILE=\fRpath in the global configuration file. +See \fICONFIGURATION\fR. + +The selected user must have +read/write access to the directory containing the server status files. +The location of the server +status files may be changed by setting \fISTAT_PATH=\fRpath in the global +configuration file. +See \fICONFIGURATION\fR. + +The selected user must have +read/write access to the uprobes.ko build directory and its files. + +Neither form of stap\-server will run if the selected user is root. + +.TP +2 +Run stap\-server with resource limits that impose maximum +cpu time, file size, memory consumption, in order to bound +the effects of processing excessively large or bogus inputs. + +When the user running the servers is \fIstap\-server\fR, +each server is run with limits equivalent to + + ulimit \-f 50000 \-s 1000 \-t 60 \-u 20 \-v 500000 + +otherwise, no limits are imposed. + +.TP +3 +Run stap\-server with a TMPDIR environment variable that +points to a separate and/or quota-enforced directory, in +order to prevent filling up of important filesystems. + +The default TMPDIR is \fI/tmp/\fR. + +.TP +4 +Activate network firewalls to limit stap client connections +to relatively trustworthy networks. + +For automatic selection of servers by clients, \fIavahi\fR must be installed +on both the server and client hosts and \fImDNS\fR messages must be allowed through the firewall. + +.PP +The systemtap compile server and its related utilities use the Secure Socket Layer +(SSL) as implemented by Network Security Services (NSS) +for network security. NSS is also used +for the generation and management of certificates. The related +certificate databases must be protected in order to maintain the security of +the system. +Use of the utilities provided will help to ensure that the proper protection +is maintained. The systemtap client will check for proper +access permissions before making use of any certificate database. + +.SH FILES +.TP +Important files and their corresponding paths can be located in the +stappaths (7) manual page. + +.SH SEE ALSO +.IR stap (1), +.IR staprun (8), +.IR stapprobes (3stap), +.IR stapfuncs (3stap), +.IR stappaths (7), +.IR stapex (3stap), +.IR avahi , +.IR ulimit (1), +.IR NSS + +.SH BUGS +Use the Bugzilla link of the project web page or our mailing list. +.nh +.BR http://sourceware.org/systemtap/ ", " . +.hy + diff -Nru systemtap-1.4/stap-server.8.in systemtap-1.6/stap-server.8.in --- systemtap-1.4/stap-server.8.in 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/stap-server.8.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,494 +0,0 @@ -.\" -*- nroff -*- -.TH STAP-SERVER 8 -.SH NAME -stap\-server \- systemtap server management - -.SH SYNOPSIS - -.br -[ -.B service -] -.B stap\-server -{ -.B start -| -.B stop -| -.B restart -| -.B condrestart -| -.B try\-restart -| -.B force\-reload -| -.B status -} [ -.I options -] - -.SH DESCRIPTION - -A systemtap compile server listens for connections from stap clients -on a secure SSL network port and accepts requests to run the -.I stap -front end. Each server advertises its presence and configuration on the local -network using mDNS (\fIavahi\fR) allowing for automatic detection by clients. - -.PP -The stap\-server script aims to provide: -.IP \(bu 4 -management of systemtap compile servers as a service. -.IP \(bu 4 -convenient control over configured servers and individual (ad\-hoc) servers. - -.SH ARGUMENTS -One of the actions below must be specified: -.TP -.B start -Start servers. The specified servers are started. -If no server is specified, the configured servers are started. If no servers -are configured, a server for the kernel release and architecture of the host -is started. -If a specified server is -already started, this action will -be ignored for that server. If a server fails to start, this action fails. - -.TP -.B stop -Stop server(s). The specified servers are stopped. -If no server is specified, all currently running servers are stopped. -If a specified server is -not running, this action -will be successful for that server. If a server fails to stop, this action -fails. - -.TP -.B restart -Stop and restart servers. The specified servers are stopped and restarted. -If no server is specified, all currently running servers are stopped and -restarted. If no servers are running, this action behaves like \fIstart\fR. - -.TP -.B condrestart -Stop and restart servers. The specified servers are stopped and restarted. -If a specified server is not running, it is not started. If no server is -specified, all currently running servers are stopped and restarted. If no -servers are running, none will be started. - -.TP -.B try\-restart -This action is identical to \fIcondrestart\fR. - -.TP -.B force\-reload -Stop all running servers, reload config files and restart the service as if -.I start -was specified. - -.TP -.B status -Print information about running servers. Information about the specified -server(s) will be printed. If no server is specified, information about all -running servers will be printed. - -.SH OPTIONS -The following options are used to provide additional configuration and -to specify servers to be managed: - -.TP -\fB\-c\fR \fIconfigfile\fR -This option specifies a global configuration file in addition to the default -global configuration file described -below. This file will be processed after the default global -configuration file. If the \fB\-c\fR option is specified more than once, the -last -configuration file specified will be used. - -.TP -\fB\-a\fR \fIarchitecture\fR -This option specifies the target architecture of the server and is -analogous to the \fB\-a\fR option of \fIstap\fR. See the -.IR stap (1) -manual page for more details. -The default architecture is the architecture of the host. - -.TP -\fB\-r\fR \fIkernel\-release\fR -This option specifies the target kernel release of the server and is -analogous to the \fB\-r\fR option of \fIstap\fR. See the -.IR stap (1) -manual page for more details. -The default release is that of the currently running kernel. - -.TP -\fB\-I\fR \fIpath\fR -This option specifies an additional path to be searched by the server(s) for -tapsets and is analogous to the \fB\-I\fR option of \fIstap\fR. -See the -.IR stap (1) -manual page for more details. - -.TP -\fB\-R\fR \fIpath\fR -This option specifies the location of the systemtap runtime to be used by the -server(s) and is analogous to the \fB\-R\fR option of \fIstap\fR. -See the -.IR stap (1) -manual page for more details. - -.TP -\fB\-B\fR \fIoptions\fR -This option specifies options to be passed to \fImake\fR when building systemtap -modules and is analogous to the \fB\-B\fR option of \fIstap\fR. -See the -.IR stap (1) -manual page for more details. - -.TP -\fB\-i\fR -This option is a shortcut which specifies one server for each kernel -release installed in \fI/lib/modules/\fR. Previous -\fB\-I\fR, \fB\-R\fR, \fB\-B\fR and \fB\-u\fR options will be -applied to each server, however previous \fB\-a\fR options will be ignored and -the default architecture will be used. - -.TP -\fB\-n\fR \fInickname\fR -This option allows the specification of a server configuration by nickname. -When \fB\-n\fR is specified, a currently running server with the given nickname -will be searched for. If no currently running server with the given nickname is -found, a server configuration with the given nickname will be searched for in -\fI@prefix@/etc/stap\-server/conf.d/*.conf\fR, or the path configured in -\fI@prefix@/etc/sysconfig/stap\-server\fR or the config file specified by the -\fB\-c\fR option. If a server configuration for the given -nickname is found, the -\fB\-a\fR, \fB\-r\fR, \fB\-I\fR, \fB\-R\fR, \fB\-B\fR and \fB\-u\fR options for -that server will be used as if they were specified on the command line. If no -configuration with the given nickname is found, and the action is -.I start -(or an action behaving like \fIstart\fR -(see \fBARGUMENTS\fR), the server will be started with the given nickname. -If no configuration with the given nickname is found, and the action is not -.I start -(or an action behaving like \fIstart\fR), it is an error. If a nickname is -not specified for a server which is being started, its nickname will be its -process id. - -.TP -\fB\-p\fR \fIpid\fR -This option allows the specification of a server configuration by process id. -When \fB\-p\fR is specified, a currently running server with the given process -id will be searched for. If no such server is found, it is an error. If a server -with the given procss id is found, the -\fB\-a\fR, \fB\-r\fR, \fB\-I\fR, \fB\-R\fR, \fB\-B\fR and \fB\-u\fR options for -that server will be used as if they were specified on the command line. - -.TP -\fB\-u\fR \fIuser\-name\fR -Each systemtap compile server is normally run by the user name -\fistap\-server\fR (for the initscript) or as the user invoking -\fIstap-server\fR, -unless otherwise configured (see \fBFILES\fR). This option -specifies the user name used to run the server(s). The user name specified -must be a member of the group \fIstap\-server\fR. - -.SH CONFIGURATION - -Configuration files allow us to: -.IP \(bu 4 -specify global configuration of logging, server configuration files, status -files and other global parameters. -.IP \(bu 4 -specify which servers are to be started by default. - -.SH Global Configuration - -The Global Configuration file (\fI@prefix@/etc/sysconfig/stap\-server\fR) contains -variable assignments used to configure the overall operation of the service. -Each line beginning with a '#' character is ignored. All other lines must be -of the form \fIVARIABLE=VALUE\fR. This is not a shell script. The entire -contents of the line after the = will be assigned as\-is to the variable. - -The following variables may be assigned: - -.TP -.B CONFIG_PATH -Specifies the absolute path of the directory containing the default server -configurations -(default: \fI@prefix@/etc/stap\-server/conf.d/\fR). - -.TP -.B STAT_PATH -Specifies the absolute path of the running server status directory -(default: \fI@prefix@/var/run/stap\-server/\fR). - -.TP -.B LOG_FILE -Specifies the absolute path of the log file -(default: \fI@prefix@/var/log/stap\-server.log\fR). - -.TP -.B STAP_USER -Specifies the userid which will be used to run the server(s) -(default: for the initscript \fIstap\-server\fR, otherwise the user running -\fIstap-server\fR). - -.SH Individual Server Configuration - -Each server configuration file configures a server to be started when no -server is specified for the \fIstart\fR action, or an action behaving like the -\fIstart\fR action (see \fIARGUMENTS\fR). Each configuration file contains -variable assignments used to configure an individual server. - -Each line beginning with a '#' character is ignored. All other lines must be -of the form \fIVARIABLE=VALUE\fR. This is not a shell script. The entire -contents of the line after the = will be assigned as\-is to the variable. - -Each configuration file must have a -filename suffix of \fI.conf\fR. The default -location of these files is \fI@prefix@/etc/stap\-server/conf.d/\fR, but this can be -overridden in the global configuration file using the \fB\-c\fR option -(see \fIOPTIONS\fR). - -The following variables may be assigned: -.TP -.B ARCH -Specifies the target architecture for this server and corresponds to the -\fB\-a\fR option (see \fIOPTIONS\fR). If \fBARCH\fR is not set, the -architecture of the host will be used. - -.TP -.B RELEASE -Specifies the kernel release for this server -and corresponds to the -\fB\-r\fR option (see \fIOPTIONS\fR). If \fBRELEASE\fR is not set, the -release -of the kernel running on the host will be used. - -.TP -.B BUILD -Specifies options to be passed to the \fImake\fR process used by -\fIsystemtap\fR to build kernel modules. -This an array variable with each element corresponding to a -\fB\-B\fR option (see \fIOPTIONS\fR). Using the form \fBBUILD=STRING\fR clears -the array and sets the first element to \fBSTRING\fR. Using the form -\fBBUILD+=STRING\fR adds \fBSTRING\fR as an additional element to the array. - -.TP -.B INCLUDE -Specifies a list of directories to be searched by the server for tapsets. -This an array variable with each element corresponding to an -\fB\-I\fR option (see \fIOPTIONS\fR). Using the form \fBINCLUDE=PATH\fR clears -the array and sets the first element to \fBPATH\fR. Using the form -\fBINCLUDE+=PATH\fR adds \fBPATH\fR as an additional element to the array. - -.TP -.B RUNTIME -Specifies the directory which contains the systemtap runtime code to be used -by this server -and corresponds to the -\fB\-R\fR option (see \fIOPTIONS\fR). - -.TP -.B USER -Specifies the user name to be used to run this server -and corresponds to the -\fB\-u\fR option (see \fIOPTIONS\fR). - -.TP -.B NICKNAME -Specifies the nickname to be used to refer to this server -and corresponds to the -\fB\-n\fR option (see \fIOPTIONS\fR). - -.SH SERVER AUTHENTICAION -The security of the SSL network connection between the client and server -depends on the proper -management of server certificates. - -.PP -The trustworthiness of a given systemtap server can not be determined -automatically without a trusted certificate authority issuing systemtap server -certificates. This is -not practical in everyday use and so, clients must authenticate servers -against their own database of trusted server certificates. In this context, -establishing a given server as trusted by a given client means adding -that server\[aq]s certificate to the -client\[aq]s database of trusted servers. - -.PP -For the \fIstap\-server\fR initscript, on the local host, this is handled -automatically. -When the \fIsystemtap\-server\fR package is installed, the server\[aq]s -certificate for the default user (\fIstap\-server\fR) is automatically -generated and installed. This means that servers started by the -\fIstap\-server\fR initscript, -with the default user, are automatically trusted by clients on the local -host. - -.PP -In order to use a server running on another host, that server\[aq]s certificate -must be installed on the client\[aq]s host. -See the \fI\-\-trust\-servers\fR option in the -.IR stap (1) -manual page for more details. - -.SH EXAMPLES -See the -.IR stapex (3stap) -manual page for a collection of sample \fIsystemtap\fR scripts. -.PP -To start the configured servers, or the default server, if none are configured: -.PP -.B \& $ [ service ] stap\-server start -.PP -To start a server for each kernel installed in /lib/modules: -.PP -.B \& $ [ service ] stap\-server start \-i -.PP -To obtain information about the running server(s): -.PP -.B \& $ [ service ] stap\-server status -.PP -To start a server like another one, except targeting a different architecture, -by referencing the first server\[aq]s nickname: -.PP -.B \& $ [ service ] stap\-server start \-n \fINICKNAME\fR \-a \fIARCH\fR -.PP -To stop one of the servers by referencing its process id (obtained by running -\fBstap\-server status\fR): -.PP -.B \& $ [ service ] stap\-server stop \-p \fIPID\fR -.PP -To stop all running servers: -.PP -.B \& $ [ service ] stap\-server stop - -.SH SAFETY AND SECURITY -Systemtap is an administrative tool. It exposes kernel internal data -structures and potentially private user information. See the -.IR stap (1) -manual page for additional information on safety and security. - -.PP -As a network server, stap-server should be activated with care in -order to limit the potential effects of bugs or mischevious users. -Consider the following prophylactic measures. -.TP -1 -Run stap\-server as an unprivileged user, never as root. - -When invoked as a -service (i.e. \fBservice stap\-server\fR ...), each server is run, -by default, as the user \fIstap\-server\fR. -When invoked directly (i.e. \fBstap\-server\fR ...), each server is run, -by default, as the invoking user. In each case, another user may be selected by -using the \fI\-u\fR option on invocation, by specifying -\fISTAP_USER=\fRusername in the global configuration file or by specifying -\fIUSER=\fRusername in an individual server configuration file. The invoking -user must have authority to run processes as another user. -See \fICONFIGURATION\fR. - -The selected user must have write access to the server log file (default: \fI@prefix@/var/log/stap\-server.log\fR). The location of the server log file may -be changed by setting \fILOG_FILE=\fRpath in the global configuration file. -See \fICONFIGURATION\fR. - -The selected user must have -read/write access to the directory containing the server status files -(default: \fI@prefix@/var/run/stap\-server/\fR). The location of the server -status files may be changed by setting \fISTAT_PATH=\fRpath in the global -configuration file. -See \fICONFIGURATION\fR. - -The selected user must have -read/write access to the uprobes.ko build directory and its files -(default: \fI@prefix@/share/systemtap/runtime/uprobes/\fR). - -Neither form of stap\-server will run if the selected user is root. - -.TP -2 -Run stap-server with resource limits that impose maximum -cpu time, file size, memory consumption, in order to bound -the effects of processing excessively large or bogus inputs. - -When the user running the servers is \fIstap\-server\fR, -each server is run with limits equivalent to - - ulimit -f 50000 -s 1000 -t 60 -u 20 -v 500000 - -otherwise, no limits are imposed. - -.TP -3 -Run stap-server with a TMPDIR environment variable that -points to a separate and/or quota-enforced directory, in -order to prevent filling up of important filesystems. - -The default TMPDIR is \fI/tmp/\fR. - -.TP -4 -Activate network firewalls to limit stap client connections -to relatively trustworthy networks. - -For automatic selection of servers by clients, \fIavahi\fR must be installed -on both the server and client hosts and \fImDNS\fR messages must be allowed through the firewall. - -.PP -The systemtap server and its related utilities use the Secure Socket Layer -(SSL) as implemented by Network Security Services (NSS) -for network security. The NSS tool -.I certutil -is used for the generation of certificates. The related -certificate databases must be protected in order to maintain the security of -the system. -Use of the utilities provided will help to ensure that the proper protection -is maintained. The systemtap client will check for proper -access permissions before making use of any certificate database. - -.SH FILES -.TP -@prefix@/etc/sysconfig/stap\-server/ -Global configuration file. - -.TP -@prefix@/etc/stap\-server/conf.d/*.conf -Configuration files for default servers. - -.TP -@prefix@/var/run/stap\-server/ -Default location of status files for running servers. - -.TP -@prefix@/var/log/stap\-server.log -Default log file. - -.TP -@prefix@/share/systemtap/runtime/uprobes/ -Location of the uprobes.ko build directory. - -.TP -/lib/modules/ -Location of installed kernels. - -.SH SEE ALSO -.IR stap (1), -.IR staprun (8), -.IR stapprobes (3stap), -.IR stapfuncs (3stap), -.IR stappaths (7), -.IR stapex (3stap), -.IR avahi , -.IR ulimit (1), -.IR NSS , -.IR certutil - -.SH BUGS -Use the Bugzilla link of the project web page or our mailing list. -.nh -.BR http://sources.redhat.com/systemtap/ ", " . -.hy - diff -Nru systemtap-1.4/stap-server-connect.c systemtap-1.6/stap-server-connect.c --- systemtap-1.4/stap-server-connect.c 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/stap-server-connect.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,1153 +0,0 @@ -/* - SSL server program listens on a port, accepts client connection, reads - the data into a temporary file, calls the systemtap translator and - then transmits the resulting file back to the client. - - Copyright (C) 2008-2010 Red Hat Inc. - - This file is part of systemtap, and is free software. You can - redistribute it and/or modify it under the terms of the GNU General Public - License as published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include "config.h" -#include "nsscommon.h" - - -/* Global variables */ -static char *password = NULL; -static CERTCertificate *cert = NULL; -static SECKEYPrivateKey *privKey = NULL; -static char *dbdir = NULL; -static const char *stapOptions = ""; - - -static PRStatus spawn_and_wait (char **argv, - const char* fd0, const char* fd1, const char* fd2, const char *pwd); - - -static void -Usage(const char *progName) -{ - fprintf(stderr, - "Usage: %s -p port -d dbdir -n rsa_nickname -w passwordFile\n", - progName); - exit(1); -} - -static void -errWarn(char *function) -{ - fprintf(stderr, "Error in function %s: ", function); - nssError(); -} - -static void -exitErr(char *function) -{ - errWarn(function); - /* Exit gracefully. */ - /* ignoring return value of NSS_Shutdown as code exits with 1*/ - (void) NSS_Shutdown(); -#if 0 /* PR_Cleanup is known to hang on some systems */ - PR_Cleanup(); -#endif - exit(1); -} - - - - -/* Function: readDataFromSocket() - * - * Purpose: Read data from the socket into a temporary file. - * - */ -static SECStatus readDataFromSocket(PRFileDesc *sslSocket, const char *requestFileName) -{ - PRFileDesc *local_file_fd; - PRInt32 numBytesExpected; - PRInt32 numBytesRead; - PRInt32 numBytesWritten; - PRInt32 totalBytes; -#define READ_BUFFER_SIZE 4096 - char buffer[READ_BUFFER_SIZE]; - - /* Open the output file. */ - local_file_fd = PR_Open(requestFileName, PR_WRONLY | PR_CREATE_FILE | PR_TRUNCATE, - PR_IRUSR | PR_IWUSR); - if (local_file_fd == NULL) - { - fprintf (stderr, "could not open output file %s\n", requestFileName); - return SECFailure; - } - - /* Read the number of bytes to be received. */ - /* XXX: impose a limit to prevent disk space consumption DoS */ - numBytesRead = PR_Read(sslSocket, & numBytesExpected, sizeof (numBytesExpected)); - if (numBytesRead == 0) /* EOF */ - { - fprintf (stderr, "Error reading size of request file\n"); - return SECFailure; - } - if (numBytesRead < 0) - { - errWarn("PR_Read"); - return SECFailure; - } - /* Convert numBytesExpected from network byte order to host byte order. */ - numBytesExpected = ntohl (numBytesExpected); - - /* Read until EOF or until the expected number of bytes has been read. */ - for (totalBytes = 0; totalBytes < numBytesExpected; totalBytes += numBytesRead) - { - numBytesRead = PR_Read(sslSocket, buffer, READ_BUFFER_SIZE); - if (numBytesRead == 0) - break; /* EOF */ - if (numBytesRead < 0) - { - errWarn("PR_Read"); - break; - } - - /* Write to stdout */ - numBytesWritten = PR_Write(local_file_fd, buffer, numBytesRead); - if (numBytesWritten < 0 || (numBytesWritten != numBytesRead)) - { - fprintf (stderr, "could not write to output file %s\n", requestFileName); - break; - } -#if DEBUG - fprintf(stderr, "***** Connection read %d bytes.\n", numBytesRead); -#if 0 - buffer[numBytesRead] = '\0'; - fprintf(stderr, "************\n%s\n************\n", buffer); -#endif -#endif - } - - if (totalBytes != numBytesExpected) - { - fprintf (stderr, "Expected %d bytes, got %d\n", numBytesExpected, totalBytes); - return SECFailure; - } - - PR_Close(local_file_fd); - - return SECSuccess; -} - -/* Function: setupSSLSocket() - * - * Purpose: Configure a socket for SSL. - * - * - */ -static PRFileDesc * -setupSSLSocket(PRFileDesc *tcpSocket) -{ - PRFileDesc *sslSocket; - SSLKEAType certKEA; -#if 0 - int certErr = 0; -#endif - SECStatus secStatus; - - /* Inport the socket into SSL. */ - sslSocket = SSL_ImportFD(NULL, tcpSocket); - if (sslSocket == NULL) - { - errWarn("SSL_ImportFD"); - goto loser; - } - - /* Set the appropriate flags. */ - secStatus = SSL_OptionSet(sslSocket, SSL_SECURITY, PR_TRUE); - if (secStatus != SECSuccess) - { - errWarn("SSL_OptionSet SSL_SECURITY"); - goto loser; - } - - secStatus = SSL_OptionSet(sslSocket, SSL_HANDSHAKE_AS_SERVER, PR_TRUE); - if (secStatus != SECSuccess) - { - errWarn("SSL_OptionSet:SSL_HANDSHAKE_AS_SERVER"); - goto loser; - } - - secStatus = SSL_OptionSet(sslSocket, SSL_REQUEST_CERTIFICATE, PR_FALSE); - if (secStatus != SECSuccess) - { - errWarn("SSL_OptionSet:SSL_REQUEST_CERTIFICATE"); - goto loser; - } - - secStatus = SSL_OptionSet(sslSocket, SSL_REQUIRE_CERTIFICATE, PR_FALSE); - if (secStatus != SECSuccess) - { - errWarn("SSL_OptionSet:SSL_REQUIRE_CERTIFICATE"); - goto loser; - } - - /* Set the appropriate callback routines. */ -#if 0 /* use the default */ - secStatus = SSL_AuthCertificateHook(sslSocket, myAuthCertificate, - CERT_GetDefaultCertDB()); - if (secStatus != SECSuccess) - { - errWarn("SSL_AuthCertificateHook"); - goto loser; - } -#endif -#if 0 /* Use the default */ - secStatus = SSL_BadCertHook(sslSocket, - (SSLBadCertHandler)myBadCertHandler, &certErr); - if (secStatus != SECSuccess) - { - errWarn("SSL_BadCertHook"); - goto loser; - } -#endif -#if 0 /* no handshake callback */ - secStatus = SSL_HandshakeCallback(sslSocket, - myHandshakeCallback, - NULL); - if (secStatus != SECSuccess) - { - errWarn("SSL_HandshakeCallback"); - goto loser; - } -#endif - secStatus = SSL_SetPKCS11PinArg(sslSocket, password); - if (secStatus != SECSuccess) - { - errWarn("SSL_SetPKCS11PinArg"); - goto loser; - } - - certKEA = NSS_FindCertKEAType(cert); - - secStatus = SSL_ConfigSecureServer(sslSocket, cert, privKey, certKEA); - if (secStatus != SECSuccess) - { - errWarn("SSL_ConfigSecureServer"); - goto loser; - } - - return sslSocket; - -loser: - PR_Close(tcpSocket); - return NULL; -} - -#if 0 /* No client authentication and not authenticating after each transaction. */ -/* Function: authenticateSocket() - * - * Purpose: Perform client authentication on the socket. - * - */ -static SECStatus -authenticateSocket(PRFileDesc *sslSocket, PRBool requireCert) -{ - CERTCertificate *cert; - SECStatus secStatus; - - /* Returns NULL if client authentication is not enabled or if the - * client had no certificate. */ - cert = SSL_PeerCertificate(sslSocket); - if (cert) - { - /* Client had a certificate, so authentication is through. */ - CERT_DestroyCertificate(cert); - return SECSuccess; - } - - /* Request client to authenticate itself. */ - secStatus = SSL_OptionSet(sslSocket, SSL_REQUEST_CERTIFICATE, PR_TRUE); - if (secStatus != SECSuccess) - { - errWarn("SSL_OptionSet:SSL_REQUEST_CERTIFICATE"); - return SECFailure; - } - - /* If desired, require client to authenticate itself. Note - * SSL_REQUEST_CERTIFICATE must also be on, as above. */ - secStatus = SSL_OptionSet(sslSocket, SSL_REQUIRE_CERTIFICATE, requireCert); - if (secStatus != SECSuccess) - { - errWarn("SSL_OptionSet:SSL_REQUIRE_CERTIFICATE"); - return SECFailure; - } - - /* Having changed socket configuration parameters, redo handshake. */ - secStatus = SSL_ReHandshake(sslSocket, PR_TRUE); - if (secStatus != SECSuccess) - { - errWarn("SSL_ReHandshake"); - return SECFailure; - } - - /* Force the handshake to complete before moving on. */ - secStatus = SSL_ForceHandshake(sslSocket); - if (secStatus != SECSuccess) - { - errWarn("SSL_ForceHandshake"); - return SECFailure; - } - - return SECSuccess; -} -#endif /* No client authentication and not authenticating after each transaction. */ - -/* Function: writeDataToSocket - * - * Purpose: Write the server's response back to the socket. - * - */ -static SECStatus -writeDataToSocket(PRFileDesc *sslSocket, const char *responseFileName) -{ - int numBytes; - PRFileDesc *local_file_fd; - - local_file_fd = PR_Open(responseFileName, PR_RDONLY, 0); - if (local_file_fd == NULL) - { - fprintf (stderr, "Could not open input file %s\n", responseFileName); - return SECFailure; - } - - /* Transmit the local file across the socket. - */ - numBytes = PR_TransmitFile(sslSocket, local_file_fd, - NULL, 0, - PR_TRANSMITFILE_KEEP_OPEN, - PR_INTERVAL_NO_TIMEOUT); - - /* Error in transmission. */ - if (numBytes < 0) - { - errWarn("PR_TransmitFile"); - return SECFailure; - } -#if DEBUG - /* Transmitted bytes successfully. */ - fprintf(stderr, "PR_TransmitFile wrote %d bytes from %s\n", - numBytes, responseFileName); -#endif - - PR_Close(local_file_fd); - - return SECSuccess; -} - - -/* Run the translator on the data in the request directory, and produce output - in the given output directory. */ -static void handleRequest (const char* requestDirName, const char* responseDirName) -{ - char stapstdout[PATH_MAX]; - char stapstderr[PATH_MAX]; - char staprc[PATH_MAX]; - char stapsymvers[PATH_MAX]; -#define MAXSTAPARGC 1000 /* sorry, too lazy to dynamically allocate */ - char* stapargv[MAXSTAPARGC]; - int stapargc=0; - int rc; - wordexp_t words; - int i; - FILE* f; - int unprivileged = 0; - int stapargv_freestart = 0; - struct stat st; - - stapargv[stapargc++] = getenv ("SYSTEMTAP_STAP") ?: STAP_PREFIX "/bin/stap"; - - /* Transcribe stapOptions. We use plain wordexp(3), since these - options are coming from the local trusted user, so malicious - content is not a concern. */ - - rc = wordexp (stapOptions, & words, WRDE_NOCMD|WRDE_UNDEF); - if (rc) - { - errWarn("cannot parse -s stap options"); - return; - } - if (words.we_wordc+10 >= MAXSTAPARGC) /* 10: padding for literal entries */ - { - errWarn("too many -s options; MAXSTAPARGC"); - return; - } - - for (i=0; i= MAXSTAPARGC) - { - errWarn("too many stap options; MAXSTAPARGC"); - return; - } - - snprintf (stapargfile, PATH_MAX, "%s/argv%d", requestDirName, i); - - rc = stat(stapargfile, & st); - if (rc) break; - - arg = malloc (st.st_size+1); - if (!arg) - { - errWarn("stap arg malloc"); - return; - } - - argfile = fopen(stapargfile, "r"); - if (! argfile) - { - errWarn("stap arg fopen"); - return; - } - - rc = fread(arg, 1, st.st_size, argfile); - if (rc != st.st_size) - { - errWarn("stap arg fread"); - return; - } - - arg[st.st_size] = '\0'; - stapargv[stapargc++] = arg; /* freed later */ - fclose (argfile); - } - - snprintf (stapstdout, PATH_MAX, "%s/stdout", responseDirName); - snprintf (stapstderr, PATH_MAX, "%s/stderr", responseDirName); - - stapargv[stapargc] = NULL; /* spawn_and_wait expects NULL termination */ - - /* Check for the unprivileged flag; we need this so that we can decide to sign the module. */ - for (i=0; i= MAXSTAPARGC) - { - errWarn("too many stap options; MAXSTAPARGC"); - return; - } - - /* Shift all stapargv[] entries up one, including the NULL. */ - for (i=stapargc; i>=1; i--) - stapargv[i+1]=stapargv[i]; - stapargv_freestart ++; /* adjust for shift */ - - stapargv[1]="--unprivileged"; /* better not be resettable by later option */ - } - - /* All ready, let's run the translator! */ - rc = spawn_and_wait (stapargv, "/dev/null", stapstdout, stapstderr, requestDirName); - - /* Save the RC */ - snprintf (staprc, PATH_MAX, "%s/rc", responseDirName); - f = fopen(staprc, "w"); - if (f) - { - /* best effort basis */ - fprintf(f, "%d", rc); - fclose(f); - } - - /* Parse output to extract the -k-saved temprary directory. - XXX: bletch. */ - f = fopen(stapstderr, "r"); - if (!f) - { - errWarn("stap stderr open"); - return; - } - - while (1) - { - char line[PATH_MAX]; - char *l = fgets(line, PATH_MAX, f); /* NB: normally includes \n at end */ - if (!l) break; - char key[]="Keeping temporary directory \""; - - /* Look for line from main.cxx: s.keep_tmpdir */ - if (strncmp(l, key, strlen(key)) == 0 && - l[strlen(l)-2] == '"') /* "\n */ - { - /* Move this directory under responseDirName. We don't have to - preserve the exact stapXXXXXX suffix part, since stap-client - will accept anything ("stap......" regexp), and rewrite it - to a client-local string. - - We don't just symlink because then we'd have to - remember to delete it later anyhow. */ - char *mvargv[10]; - char *orig_staptmpdir = & l[strlen(key)]; - char new_staptmpdir[PATH_MAX]; - - orig_staptmpdir[strlen(orig_staptmpdir)-2] = '\0'; /* Kill the closing "\n */ - snprintf(new_staptmpdir, PATH_MAX, "%s/stap000000", responseDirName); - mvargv[0]="mv"; - mvargv[1]=orig_staptmpdir; - mvargv[2]=new_staptmpdir; - mvargv[3]=NULL; - rc = spawn_and_wait (mvargv, NULL, NULL, NULL, NULL); - if (rc != PR_SUCCESS) - errWarn("stap tmpdir move"); - - /* In unprivileged mode, if we have a module built, we need to - sign the sucker. */ - if (unprivileged) - { - glob_t globber; - char pattern[PATH_MAX]; - snprintf (pattern,PATH_MAX,"%s/*.ko", new_staptmpdir); - rc = glob (pattern, GLOB_ERR, NULL, &globber); - if (rc) - errWarn("stap tmpdir .ko glob"); - else if (globber.gl_pathc != 1) - errWarn("stap tmpdir too many .ko globs"); - else - { - char *signargv [10]; - signargv[0] = STAP_PREFIX "/libexec/systemtap/stap-sign-module"; - signargv[1] = globber.gl_pathv[0]; - signargv[2] = dbdir; - signargv[3] = NULL; - rc = spawn_and_wait (signargv, NULL, NULL, NULL, NULL); - if (rc != PR_SUCCESS) - errWarn("stap-sign-module"); - } - } - - /* If uprobes.ko is required, then we need to return it to the client. - uprobes.ko was requires if the file "Module.symvers" is not empty in - the temp directory. */ - snprintf (stapsymvers, PATH_MAX, "%s/Module.symvers", new_staptmpdir); - rc = stat (stapsymvers, & st); - if (rc == 0 && st.st_size != 0) - { - /* uprobes.ko is required. Link to it from the response directory. */ - char *lnargv[10]; - lnargv[0] = "/bin/ln"; - lnargv[1] = "-s"; - lnargv[2] = PKGDATADIR "/runtime/uprobes/uprobes.ko"; - lnargv[3] = (char*)responseDirName; - lnargv[4] = NULL; - rc = spawn_and_wait (lnargv, NULL, NULL, NULL, NULL); - if (rc != PR_SUCCESS) - errWarn("stap uprobes.ko link"); - - /* In unprivileged mode, we need to return the signature as well. */ - if (unprivileged) - { - lnargv[2] = PKGDATADIR "/runtime/uprobes/uprobes.ko.sgn"; - rc = spawn_and_wait (lnargv, NULL, NULL, NULL, NULL); - if (rc != PR_SUCCESS) - errWarn("stap uprobes.ko.sgn link"); - } - } - } - } - - /* Free up all the arg string copies. Note that the first few were alloc'd - by wordexp(), which wordfree() frees; others were hand-set to literal strings. */ - for (i= stapargv_freestart; i= 0) - { - int subrc; - subrc = fchdir (dotfd); - subrc |= close (dotfd); - if (subrc) - errWarn("spawn unchdir"); - } - - CHECKRC ("spawn"); - - rc = waitpid (pid, &status, 0); - if ((rc!=pid) || !WIFEXITED(status)) - { - errWarn ("waitpid"); - return PR_FAILURE; - } - - rc = posix_spawn_file_actions_destroy (&actions); - CHECKRC ("spawn file actions dtor"); - - return WEXITSTATUS(status) ? PR_FAILURE : PR_SUCCESS; -#undef CHECKRC -} - - - -/* Function: int handle_connection() - * - * Purpose: Handle a connection to a socket. Copy in request zip - * file, process it, copy out response. Temporary directories are - * created & destroyed here. - */ -static SECStatus -handle_connection(PRFileDesc *tcpSocket) -{ - PRFileDesc * sslSocket = NULL; - SECStatus secStatus = SECFailure; - PRStatus prStatus; - PRSocketOptionData socketOption; - int rc; - char *rc1; - char tmpdir[PATH_MAX]; - char requestFileName[PATH_MAX]; - char requestDirName[PATH_MAX]; - char responseDirName[PATH_MAX]; - char responseFileName[PATH_MAX]; - char *argv[10]; /* we use fewer than these in all the posix_spawn's below. */ - - tmpdir[0]='\0'; /* prevent cleanup-time /bin/rm of uninitialized directory */ - - /* Make sure the socket is blocking. */ - socketOption.option = PR_SockOpt_Nonblocking; - socketOption.value.non_blocking = PR_FALSE; - PR_SetSocketOption(tcpSocket, &socketOption); - - sslSocket = setupSSLSocket(tcpSocket); - if (sslSocket == NULL) - { - errWarn("setupSSLSocket"); - goto cleanup; - } - - secStatus = SSL_ResetHandshake(sslSocket, /* asServer */ PR_TRUE); - if (secStatus != SECSuccess) - { - errWarn("SSL_ResetHandshake"); - goto cleanup; - } - - /* Force the handshake to complete before moving on. */ - secStatus = SSL_ForceHandshake(sslSocket); - if (secStatus != SECSuccess) - { - errWarn("SSL_ForceHandshake"); - goto cleanup; - } - - snprintf(tmpdir, PATH_MAX, "%s/stap-server.XXXXXX", getenv("TMPDIR") ?: "/tmp"); - rc1 = mkdtemp(tmpdir); - if (! rc1) - { - fprintf (stderr, "Could not create temporary directory %s\n", tmpdir); - perror (""); - secStatus = SECFailure; - tmpdir[0]=0; /* prevent /bin/rm */ - goto cleanup; - } - - /* Create a temporary files names and directories. */ - snprintf (requestFileName, PATH_MAX, "%s/request.zip", tmpdir); - - snprintf (requestDirName, PATH_MAX, "%s/request", tmpdir); - rc = mkdir(requestDirName, 0700); - if (rc) - { - fprintf (stderr, "Could not create temporary directory %s\n", requestDirName); - perror (""); - secStatus = SECFailure; - goto cleanup; - } - - snprintf (responseDirName, PATH_MAX, "%s/response", tmpdir); - rc = mkdir(responseDirName, 0700); - if (rc) - { - fprintf (stderr, "Could not create temporary directory %s\n", responseDirName); - perror (""); - secStatus = SECFailure; - goto cleanup; - } - - snprintf (responseFileName, PATH_MAX, "%s/response.zip", tmpdir); - - /* Read data from the socket. - * If the user is requesting/requiring authentication, authenticate - * the socket. */ -#if DEBUG - fprintf(stdout, "\nReading data from socket...\n\n"); -#endif - secStatus = readDataFromSocket(sslSocket, requestFileName); - if (secStatus != SECSuccess) - goto cleanup; - -#if 0 /* Don't authenticate after each transaction */ - if (REQUEST_CERT_ALL) - { - fprintf(stdout, "\nAuthentication requested.\n\n"); - secStatus = authenticateSocket(sslSocket); - if (secStatus != SECSuccess) - goto cleanup; - } -#endif - - /* Unzip the request. */ - argv[0]="unzip"; - argv[1]="-q"; - argv[2]="-d"; - argv[3]=requestDirName; - argv[4]=requestFileName; - argv[5]=NULL; - rc = spawn_and_wait(argv, NULL, NULL, NULL, NULL); - if (rc != PR_SUCCESS) - { - errWarn ("request unzip"); - secStatus = SECFailure; - goto cleanup; - } - - /* Handle the request zip file. An error therein should still result - in a response zip file (containing stderr etc.) so we don't have to - have a result code here. */ - handleRequest(requestDirName, responseDirName); - - /* Zip the response. */ - argv[0]="zip"; - argv[1]="-q"; - argv[2]="-r"; - argv[3]=responseFileName; - argv[4]="."; - argv[5]=NULL; - rc = spawn_and_wait(argv, NULL, NULL, NULL, responseDirName); - if (rc != PR_SUCCESS) - { - errWarn ("response zip"); - secStatus = SECFailure; - goto cleanup; - } - -#if DEBUG - fprintf(stdout, "\nWriting data to socket...\n\n"); -#endif - secStatus = writeDataToSocket(sslSocket, responseFileName); - -cleanup: - /* Close down the socket. */ - prStatus = PR_Close(tcpSocket); - if (prStatus != PR_SUCCESS) - errWarn("PR_Close"); - - if (tmpdir[0]) - { - /* Remove the whole tmpdir and all that lies beneath. */ - argv[0]="rm"; - argv[1]="-r"; - argv[2]=tmpdir; - argv[3]=NULL; - rc = spawn_and_wait(argv, NULL, NULL, NULL, NULL); - if (rc != PR_SUCCESS) - errWarn ("tmpdir cleanup"); - } - - return secStatus; -} - -/* Function: int accept_connection() - * - * Purpose: Accept a connection to the socket. - * - */ -static SECStatus -accept_connection(PRFileDesc *listenSocket) -{ - PRNetAddr addr; - PRStatus prStatus; - PRFileDesc *tcpSocket; - SECStatus secStatus; - CERTCertDBHandle *dbHandle; - time_t now; - - dbHandle = CERT_GetDefaultCertDB(); - - while (PR_TRUE) - { -#if DEBUG - fprintf(stderr, "\n\n\nAbout to call accept.\n"); -#endif - - /* Accept a connection to the socket. */ - tcpSocket = PR_Accept(listenSocket, &addr, PR_INTERVAL_NO_TIMEOUT); - if (tcpSocket == NULL) - { - errWarn("PR_Accept"); - break; - } - - /* Log the accepted connection. */ - time (& now); - printf ("%sAccepted connection from %d.%d.%d.%d:%d\n", - ctime (& now), - (addr.inet.ip ) & 0xff, - (addr.inet.ip >> 8) & 0xff, - (addr.inet.ip >> 16) & 0xff, - (addr.inet.ip >> 24) & 0xff, - addr.inet.port); - fflush (stdout); - - /* XXX: alarm() or somesuch to set a timeout. */ - /* XXX: fork() or somesuch to handle concurrent requests. */ - - /* Accepted the connection, now handle it. */ - handle_connection (tcpSocket); - - time (& now); - printf ("%sRequest from %d.%d.%d.%d:%d complete\n", - ctime (& now), - (addr.inet.ip ) & 0xff, - (addr.inet.ip >> 8) & 0xff, - (addr.inet.ip >> 16) & 0xff, - (addr.inet.ip >> 24) & 0xff, - addr.inet.port); - fflush (stdout); - - /* If our certificate is no longer valid (e.g. has expired), - then exit. The daemon, (stap-serverd) will generate a new - certificate and restart the connection. */ - secStatus = CERT_VerifyCertNow(dbHandle, cert, PR_TRUE/*checkSig*/, - certUsageSSLServer, NULL/*wincx*/); - if (secStatus != SECSuccess) - { - errWarn ("CERT_VerifyCertNow"); - break; - } - } - -#if DEBUG - fprintf(stderr, "Closing listen socket.\n"); - fflush (stderr); -#endif - prStatus = PR_Close(listenSocket); - if (prStatus != PR_SUCCESS) - exitErr("PR_Close"); - -#if DEBUG - fprintf(stderr, "Closed listen socket.\n"); - fflush (stderr); -#endif - return SECSuccess; -} - -/* Function: void server_main() - * - * Purpose: This is the server's main function. It configures a socket - * and listens to it. - * - */ -static void -server_main(unsigned short port, SECKEYPrivateKey *privKey) -{ - SECStatus secStatus; - PRStatus prStatus; - PRFileDesc * listenSocket; - PRNetAddr addr; - PRSocketOptionData socketOption; - - /* Create a new socket. */ - listenSocket = PR_NewTCPSocket(); - if (listenSocket == NULL) - exitErr("PR_NewTCPSocket"); - - /* Set socket to be blocking - - * on some platforms the default is nonblocking. - */ - socketOption.option = PR_SockOpt_Nonblocking; - socketOption.value.non_blocking = PR_FALSE; - - prStatus = PR_SetSocketOption(listenSocket, &socketOption); - if (prStatus != PR_SUCCESS) - exitErr("PR_SetSocketOption"); - - /* Configure the network connection. */ - addr.inet.family = PR_AF_INET; - addr.inet.ip = PR_INADDR_ANY; - addr.inet.port = PR_htons(port); - - /* Bind the address to the listener socket. */ - prStatus = PR_Bind(listenSocket, &addr); - if (prStatus != PR_SUCCESS) - exitErr("PR_Bind"); - - /* Listen for connection on the socket. The second argument is - * the maximum size of the queue for pending connections. - */ - prStatus = PR_Listen(listenSocket, 5); - if (prStatus != PR_SUCCESS) - exitErr("PR_Listen"); - - /* Handle connections to the socket. */ - secStatus = accept_connection (listenSocket); - if (secStatus != SECSuccess) - PR_Close(listenSocket); -} - -/* Function: char * myPasswd() - * - * Purpose: This function is our custom password handler that is called by - * SSL when retreiving private certs and keys from the database. Returns a - * pointer to a string that with a password for the database. Password pointer - * should point to dynamically allocated memory that will be freed later. - */ -static char * -myPasswd(PK11SlotInfo *info, PRBool retry, void *arg) -{ - char * passwd = NULL; - - if (! retry && arg) - passwd = PORT_Strdup((char *)arg); - - return passwd; -} - -/* Obtain the certificate and key database password from the given file. */ -static char * -getPassword(char *fileName) -{ - PRFileDesc *local_file_fd; - PRFileInfo fileInfo; - PRInt32 numBytesRead; - PRStatus prStatus; - char *password; - PRInt32 i; - - prStatus = PR_GetFileInfo(fileName, &fileInfo); - if (prStatus != PR_SUCCESS || fileInfo.type != PR_FILE_FILE || fileInfo.size < 0) - { - fprintf (stderr, "Password file %s not found\n", fileName); - return NULL; - } - - local_file_fd = PR_Open(fileName, PR_RDONLY, 0); - if (local_file_fd == NULL) - { - fprintf (stderr, "Could not open password file %s\n", fileName); - return NULL; - } - - password = PORT_Alloc(fileInfo.size + 1); - if (! password) { - errWarn ("PORT_Alloc"); - return NULL; - } - - numBytesRead = PR_Read(local_file_fd, password, fileInfo.size); - if (numBytesRead <= 0) - { - fprintf (stderr, "Error reading password file\n"); - exitErr ("PR_Read"); - } - - PR_Close(local_file_fd); - - /* Keep only the first line of data. */ - for (i = 0; i < numBytesRead; ++i) - { - if (password[i] == '\n' || password[i] == '\r' || - password[i] == '\0') - break; - } - password[i] = '\0'; - - return password; -} - -/* Function: int main() - * - * Purpose: Parses command arguments and configures SSL server. - * - */ -int -main(int argc, char **argv) -{ - const char * progName = NULL; - const char * nickName = NULL; - char * passwordFile = NULL; - unsigned short port = 0; - SECStatus secStatus; - PLOptState * optstate; - PLOptStatus status; - - progName = PL_strdup(argv[0]); - - optstate = PL_CreateOptState(argc, argv, "d:p:n:w:s:"); - while ((status = PL_GetNextOpt(optstate)) == PL_OPT_OK) - { - switch(optstate->option) - { - case 'd': dbdir = PL_strdup(optstate->value); break; - case 'n': nickName = PL_strdup(optstate->value); break; - case 'p': port = PORT_Atoi(optstate->value); break; - case 'w': passwordFile = PL_strdup(optstate->value); break; - case 's': stapOptions = PL_strdup(optstate->value); break; - default: - case '?': Usage(progName); - } - } - - if (nickName == NULL || port == 0 || dbdir == NULL || passwordFile == NULL) - Usage(progName); - - password = getPassword (passwordFile); - - /* Call the NSPR initialization routines. */ - PR_Init( PR_SYSTEM_THREAD, PR_PRIORITY_NORMAL, 1); - - /* Set the cert database password callback. */ - PK11_SetPasswordFunc(myPasswd); - - /* Initialize NSS. */ - secStatus = NSS_Init(dbdir); - if (secStatus != SECSuccess) - exitErr("NSS_Init"); - - /* Set the policy for this server (REQUIRED - no default). */ - secStatus = NSS_SetDomesticPolicy(); - if (secStatus != SECSuccess) - exitErr("NSS_SetDomesticPolicy"); - - /* Get own certificate and private key. */ - cert = PK11_FindCertFromNickname(nickName, password); - if (cert == NULL) - exitErr("PK11_FindCertFromNickname"); - - privKey = PK11_FindKeyByAnyCert(cert, password); - if (privKey == NULL) - exitErr("PK11_FindKeyByAnyCert"); - - /* Configure the server's cache for a multi-process application - * using default timeout values (24 hrs) and directory location (/tmp). - */ - SSL_ConfigMPServerSIDCache(256, 0, 0, NULL); - - /* Launch server. */ - server_main(port, privKey); - - /* Shutdown NSS and exit NSPR gracefully. */ - NSS_Shutdown(); -#if 0 /* PR_Cleanup is known to hang on some systems */ - PR_Cleanup(); -#endif - - return 0; -} - -/* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ diff -Nru systemtap-1.4/stap-serverd systemtap-1.6/stap-serverd --- systemtap-1.4/stap-serverd 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/stap-serverd 1970-01-01 00:00:00.000000000 +0000 @@ -1,437 +0,0 @@ -#!/bin/bash - -# Compile server manager for systemtap -# -# Copyright (C) 2008-2010 Red Hat Inc. -# -# This file is part of systemtap, and is free software. You can -# redistribute it and/or modify it under the terms of the GNU General -# Public License (GPL); either version 2, or (at your option) any -# later version. - -# This script publishes its presence on the network and then listens for -# incoming connections. When a connection is detected, the stap-server script -# is run to handle the request. - -# Catch ctrl-c and other termination signals -trap 'terminate' SIGTERM SIGINT - -# Initialize the environment -. ${PKGLIBEXECDIR}stap-env - -# PR11197: security prophylactics -set_ulimits=0 -if [ -z "$STAP_PR11197_OVERRIDE" ]; then - # 1) reject use as root, except via a special environment variable - if [ `id -u` -eq 0 ]; then - echo "For security reasons, invocation of stap-server as root is not supported." 1>&2 - exit 1 - fi - # 2) resource limits should be set if the user is the 'stap-server' daemon - test `id -un` = "stap-server" && set_ulimits=1 -fi - - -#----------------------------------------------------------------------------- -# Helper functions. -#----------------------------------------------------------------------------- -# function: initialization PORT -function initialization { - # Initial values - port= - ssl_db= - stap_options= - uname_r="`uname -r`" - arch="`stap_get_arch`" - logfile=/dev/null - B_options= - I_options= - R_option= - - # Parse the arguments - parse_options "$@" - - echo ===== compile server pid $$ starting >> "$logfile" - - # What port will we listen on? - test "X$port" = "X" && port=$((1024+$RANDOM%64000)) - while netstat -atn | awk '{print $4}' | cut -f2 -d: | egrep -q "^$port\$"; - do - # Whoops, the port is busy; try another one. - echo "$0: Port $port is busy" >> "$logfile" - port=$((1024+($port + $RANDOM)%64000)) - done - - # Where is the ssl certificate/key database? - if test "X$ssl_db" = "X"; then - ssl_db="$stap_ssl_db/server" - fi - - nss_pw="$ssl_db/pw" - nss_cert=stap-server - - # Ensure that our certificate is valid. Generate a new one if - # not. - check_cert -} - -# function: parse_options [ STAP-OPTIONS ] -# -# Examine the command line. We need not do much checking, but we do need to -# parse all options in order to discover the ones we're interested in. -function parse_options { - while test $# != 0 - do - advance_p=0 - dash_seen=0 - - # Start of a new token. - first_token=$1 - - # Process the option. - until test $advance_p != 0 - do - # Identify the next option - first_char=`expr "$first_token" : '\(.\).*'` - if test $dash_seen = 0; then - if test "$first_char" = "-"; then - if test "$first_token" != "-"; then - # It's not a lone dash, so it's an option. - # Is it a long option (i.e. --option)? - second_char=`expr "$first_token" : '.\(.\).*'` - if test "X$second_char" = "X-"; then - case `expr "$first_token" : '--\([^=]*\)'` in - port) - get_long_arg "$first_token" "$2" - port="$stap_arg" - ;; - ssl) - get_long_arg "$first_token" "$2" - ssl_db="$stap_arg" - ;; - log) - get_long_arg "$first_token" "$2" - logfile="$stap_arg" - ;; - *) - warning "Option '$first_token' ignored" - advance_p=$(($advance_p + 1)) - break - ;; - esac - fi - # It's not a lone dash, or a long option, so it's a short option string. - # Remove the dash. - first_token=`expr "$first_token" : '-\(.*\)'` - dash_seen=1 - first_char=`expr "$first_token" : '\(.\).*'` - fi - fi - if test $dash_seen = 0; then - # The dash has not been seen. This is not an option at all. - warning "Option '$first_token' ignored" - advance_p=$(($advance_p + 1)) - break - fi - fi - - # We are at the start of an option. Look at the first character. - case $first_char in - a) - get_arg "$first_token" "$2" - process_a $stap_arg - ;; - B) - get_arg "$first_token" "$2" - B_options="$B_options $stap_arg" - stap_options="$stap_options -$first_char $stap_arg" - ;; - c) - get_arg "$first_token" "$2" - warning "Option '-$first_char $stap_arg' ignored" - ;; - d) - get_arg "$first_token" "$2" - warning "Option '-$first_char $stap_arg' ignored" - ;; - D) - get_arg "$first_token" "$2" - warning "Option '-$first_char $stap_arg' ignored" - ;; - e) - get_arg "$first_token" "$2" - warning "Option '-$first_char '$stap_arg' ignored'" - ;; - I) - get_arg "$first_token" "$2" - I_options="$I_options $stap_arg" - stap_options="$stap_options -$first_char $stap_arg" - ;; - l) - get_arg "$first_token" "$2" - warning "Option '-$first_char $stap_arg' ignored" - ;; - L) - get_arg "$first_token" "$2" - warning "Option '-$first_char $stap_arg' ignored" - ;; - m) - get_arg "$first_token" "$2" - warning "Option '-$first_char $stap_arg' ignored" - ;; - o) - get_arg "$first_token" "$2" - warning "Option '-$first_char $stap_arg' ignored" - ;; - p) - get_arg "$first_token" "$2" - warning "Option '-$first_char $stap_arg' ignored" - ;; - r) - get_arg "$first_token" "$2" - process_r $stap_arg - ;; - R) - get_arg "$first_token" "$2" - R_option="$stap_arg" - stap_options="$stap_options -$first_char $stap_arg" - ;; - s) - get_arg "$first_token" "$2" - warning "Option '-$first_char $stap_arg' ignored" - ;; - S) - get_arg "$first_token" "$2" - warning "Option '-$first_char $stap_arg' ignored" - ;; - x) - get_arg "$first_token" "$2" - warning "Option '-$first_char $stap_arg' ignored" - ;; - *) - # An unknown flag. Ignore it. - ;; - esac - - if test $advance_p = 0; then - # Just another flag character. Consume it. - warning "Option '-$first_char' ignored" - first_token=`expr "$first_token" : '.\(.*\)'` - if test "X$first_token" = "X"; then - advance_p=$(($advance_p + 1)) - fi - fi - done - - # Consume the arguments we just processed. - while test $advance_p != 0 - do - shift - advance_p=$(($advance_p - 1)) - done - done -} - -# function: get_arg FIRSTWORD SECONDWORD -# -# Collect an argument to the given short option -function get_arg { - # Remove first character. Advance to the next token, if the first one - # is exhausted. - local first=`expr "$1" : '.\(.*\)'` - if test "X$first" = "X"; then - shift - advance_p=$(($advance_p + 1)) - first="$1" - fi - stap_arg="$first" - advance_p=$(($advance_p + 1)) -} - -# function: get_arg FIRSTWORD SECONDWORD -# -# Collect an argument to the given long option -function get_long_arg { - # Remove first character. Advance to the next token, if the first one - # is exhausted. - local first=`expr "$1" : '.*\=\(.*\)'` - if test "X$first" = "X"; then - shift - advance_p=$(($advance_p + 1)) - first="$1" - fi - stap_arg="$first" - advance_p=$(($advance_p + 1)) -} - -# function: process_a ARGUMENT -# -# Process the -a flag. -function process_a { - if test "X$1" != "X$arch"; then - arch="$1" - stap_options="$stap_options -a $1" - fi -} - -# function: process_r ARGUMENT -# -# Process the -r flag. -function process_r { - local first_char=`expr "$1" : '\(.\).*'` - - if test "$first_char" = "/"; then # fully specified path - kernel_build_tree="$1" - version_file_name="$kernel_build_tree/include/config/kernel.release" - # The file include/config/kernel.release within the kernel - # build tree is used to pull out the version information - release=`cat $version_file_name 2>/dev/null` - if test "X$release" = "X"; then - fatal "Missing $version_file_name" - return - fi - else - # kernel release specified directly - release="$1" - fi - - if test "X$release" != "X$uname_r"; then - uname_r="$release" - stap_options="$stap_options -r $release" - fi -} - -# function: check_cert -# -# Ensure that our certificate exists and is valid. -# Generate a new one if not. -function check_cert { - # If our certificate exists, log some information about it. - if test -f "$ssl_db/cert8.db"; then - echo "Certificate found in database $ssl_db" >> "$logfile" - certutil -L -d "$ssl_db" -n $nss_cert | \ - awk '/Validity|Not After|Not Before/ { print $0 }' | \ - sed 's/^ */ /' >> "$logfile" 2>&1 - fi - - # If the certificate does not exist or the certificate - # is not valid, then generate a new one. - if test ! -d "$ssl_db" -o ! -f "$ssl_db/$stap_certfile" -o ! -f "$ssl_db/cert8.db" || \ - ! certutil -V -n $nss_cert -u V -d "$ssl_db" -e -f "$nss_pw" \ - -b `date +%g%m%d%H%M%S`+0005 >> "$logfile" 2>&1; then - # Our certificate does not exist or is not valid. - # Generate a new certificate database. - ${stap_pkglibexecdir}stap-gen-cert "$ssl_db" >> "$logfile" 2>&1 || exit 1 - - # Now add the new certificate to the client's database, - # making it a trusted peer for this user. - ${stap_pkglibexecdir}stap-authorize-cert "$ssl_db/$stap_certfile" "$stap_ssl_db/client" >> "$logfile" 2>&1 - elif ! test -f "$stap_ssl_db/client/cert8.db"; then - # Our certificate exists and is valid. - # If the client's database does not exist, then initialize it with our certificate. - ${stap_pkglibexecdir}stap-authorize-cert "$ssl_db/$stap_certfile" "$stap_ssl_db/client" >> "$logfile" 2>&1 - fi -} - -# function: advertise_presence -# -# Advertise the availability of the server on the network. -function advertise_presence { - # Build up a string representing our server's properties. - # The service name must differ for each server, so put the port number - # in it. - service_name="Systemtap Compile Server on port $port" - - # Target kernel and arch information - local sysinfo="sysinfo=$uname_r $arch" - - # Invocation option information - local optinfo="optinfo=" - test -n "$R_option" && optinfo="${optinfo}-R '$R_option'" - for opt in $B_options; do - optinfo="$optinfo -B '$opt'" - done - for opt in $I_options; do - optinfo="$optinfo -I '$opt'" - done - optinfo=`echo $optinfo | sed 's/optinfo= /optinfo=/'` - - # Certificate information - certinfo="certinfo=`certutil -L -n $nss_cert -d \"$ssl_db\" | \ - awk '{if (print_next == 1) {print $1; print_next = 0}};\ - /Serial Number/ {print_next = 1}'`" 2>>"$logfile" - - # Call avahi-publish-service to advertise our presence. - avahi-publish-service "$service_name" \ - $stap_avahi_service_tag $port "$sysinfo" "$optinfo" "$certinfo" \ - >> "$logfile" 2>&1 & -} - -# function: listen -# -# Listen for and handle requests to the server. -function listen { - # The stap-server-connect program will listen forever - # accepting requests. - # CVE-2009-4273 ... or at least, until resource limits fire - while true; do # NB: loop to avoid DoS by deliberate rlimit-induced halt - # NB: impose resource limits in case of mischevious data inducing - # too much / long computation - (test $set_ulimits = 1 && ulimit -f 50000 -s 1000 -t 60 -u 20 -v 500000; - exec ${stap_pkglibexecdir}stap-server-connect \ - -p $port -n $nss_cert -d "$ssl_db" -w "$nss_pw" \ - -s "$stap_options") & - stap_server_connect_pid=$! - echo "$service_name ready" - wait $stap_server_connect_pid - - # Ensure that our certificate is still valid. Generate a new one if - # not. - check_cert - - # NB: avoid superfast spinning in case of a ulimit or other failure - sleep 1 - done >> "$logfile" 2>&1 -} - -# function: warning [ MESSAGE ] -# -# Warning error -# Prints its arguments to stderr -function warning { - echo "$0: WARNING:" "$@" >> "$logfile" -} - -# function: fatal [ MESSAGE ] -# -# Fatal error -# Prints its arguments to stderr and exits -function fatal { - echo "$0: ERROR:" "$@" >> "$logfile" - terminate - exit 1 -} - -# function: terminate -# -# Terminate gracefully. -function terminate { - echo "$0: Exiting" >> "$logfile" - - # Kill the running 'avahi-publish-service' job - kill -s SIGTERM '%avahi-publish-service' >> "$logfile" 2>&1 - wait '%avahi-publish-service' >> "$logfile" 2>&1 - - # Kill any running 'stap-server-connect' job. - kill -s SIGTERM $stap_server_connect_pid >> "$logfile" 2>&1 - wait $stap_server_connect_pid >> "$logfile" 2>&1 - - exit -} - -#----------------------------------------------------------------------------- -# Beginning of main line execution. -#----------------------------------------------------------------------------- -initialization "$@" -advertise_presence -listen diff -Nru systemtap-1.4/stap-serverd.cxx systemtap-1.6/stap-serverd.cxx --- systemtap-1.4/stap-serverd.cxx 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/stap-serverd.cxx 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,1833 @@ +/* + SSL server program listens on a port, accepts client connection, reads + the data into a temporary file, calls the systemtap translator and + then transmits the resulting file back to the client. + + Copyright (C) 2011 Red Hat Inc. + + This file is part of systemtap, and is free software. You can + redistribute it and/or modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ +#include "config.h" + +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#if HAVE_AVAHI +#include +#include +#include +#include +#include +#endif +} + +#include "util.h" +#include "nsscommon.h" +#include "cscommon.h" + +using namespace std; + +static void cleanup (); +static PRStatus spawn_and_wait (const vector &argv, + const char* fd0, const char* fd1, const char* fd2, + const char *pwd, bool setrlimits = false, const vector& envVec = vector ()); + +/* getopt variables */ +extern int optind; + +/* File scope statics. Set during argument parsing and initialization. */ +static cs_protocol_version client_version; +static bool set_rlimits; +static bool use_db_password; +static int port; +static string cert_db_path; +static string stap_options; +static string uname_r; +static string arch; +static string cert_serial_number; +static string B_options; +static string I_options; +static string R_option; +static bool keep_temp; + +// Used to save our resource limits for these categories and impose smaller +// limits on the translator while servicing a request. +static struct rlimit our_RLIMIT_FSIZE; +static struct rlimit our_RLIMIT_STACK; +static struct rlimit our_RLIMIT_CPU; +static struct rlimit our_RLIMIT_NPROC; +static struct rlimit our_RLIMIT_AS; + +static struct rlimit translator_RLIMIT_FSIZE; +static struct rlimit translator_RLIMIT_STACK; +static struct rlimit translator_RLIMIT_CPU; +static struct rlimit translator_RLIMIT_NPROC; +static struct rlimit translator_RLIMIT_AS; + +static string stapstderr; + +// Message handling. +// Server_error messages are printed to stderr and logged, if requested. +static void +server_error (const string &msg, int logit = true) +{ + cerr << msg << endl << flush; + // Log it, but avoid repeated messages to the terminal. + if (logit && log_ok ()) + log (msg); +} + +// client_error messages are treated as server errors and also printed to the client's stderr. +static void +client_error (const string &msg) +{ + server_error (msg); + if (! stapstderr.empty ()) + { + ofstream errfile; + errfile.open (stapstderr.c_str (), ios_base::app); + if (! errfile.good ()) + server_error (_F("Could not open client stderr file %s: %s", stapstderr.c_str (), + strerror (errno))); + else + errfile << "Server: " << msg << endl; + // NB: No need to close errfile + } +} + +// Messages from the nss common code are treated as server errors. +extern "C" +void +nsscommon_error (const char *msg, int logit) +{ + server_error (msg, logit); +} + +// Fatal errors are treated as server errors but also result in termination +// of the server. +static void +fatal (const string &msg) +{ + server_error (msg); + cleanup (); + exit (1); +} + +// Argument handling +static void +process_a (const string &arg) +{ + arch = arg; + stap_options += " -a " + arg; +} + +static void +process_r (const string &arg) +{ + if (arg[0] == '/') // fully specified path + uname_r = kernel_release_from_build_tree (arg); + else + uname_r = arg; + stap_options += " -r " + arg; // Pass the argument to stap directly. +} + +static void +process_log (const char *arg) +{ + start_log (arg); +} + +static void +parse_options (int argc, char **argv) +{ + // Examine the command line. We need not do much checking, but we do need to + // parse all options in order to discover the ones we're interested in. + while (true) + { + int long_opt; + char *num_endptr; +#define LONG_OPT_PORT 1 +#define LONG_OPT_SSL 2 +#define LONG_OPT_LOG 3 + static struct option long_options[] = { + { "port", 1, & long_opt, LONG_OPT_PORT }, + { "ssl", 1, & long_opt, LONG_OPT_SSL }, + { "log", 1, & long_opt, LONG_OPT_LOG }, + { NULL, 0, NULL, 0 } + }; + int grc = getopt_long (argc, argv, "a:B:I:kPr:R:", long_options, NULL); + if (grc < 0) + break; + switch (grc) + { + case 'a': + process_a (optarg); + break; + case 'B': + B_options += optarg; + stap_options += string (" -") + (char)grc + optarg; + break; + case 'I': + I_options += optarg; + stap_options += string (" -") + (char)grc + optarg; + break; + case 'k': + keep_temp = true; + break; + case 'P': + use_db_password = true; + break; + case 'r': + process_r (optarg); + break; + case 'R': + R_option = optarg; + stap_options += string (" -") + (char)grc + optarg; + break; + case '?': + // Invalid/unrecognized option given. Message has already been issued. + break; + default: + // Reached when one added a getopt option but not a corresponding switch/case: + if (optarg) + server_error (_F("%s: unhandled option '%c %s'", argv[0], (char)grc, optarg)); + else + server_error (_F("%s: unhandled option '%c'", argv[0], (char)grc)); + break; + case 0: + switch (long_opt) + { + case LONG_OPT_PORT: + port = (int) strtoul (optarg, &num_endptr, 10); + break; + case LONG_OPT_SSL: + cert_db_path = optarg; + break; + case LONG_OPT_LOG: + process_log (optarg); + break; + default: + if (optarg) + server_error (_F("%s: unhandled option '--%s=%s'", argv[0], + long_options[long_opt - 1].name, optarg)); + else + server_error (_F("%s: unhandled option '--%s'", argv[0], + long_options[long_opt - 1].name)); + } + break; + } + } + + for (int i = optind; i < argc; i++) + server_error (_F("%s: unrecognized argument '%s'", argv[0], argv[i])); +} + +static string +server_cert_file () +{ + return server_cert_db_path () + "/stap.cert"; +} + +// Signal handling. When an interrupt is received, kill any spawned processes +// and exit. +extern "C" +void +handle_interrupt (int sig) +{ + // If one of the resource limits that we set for the translator was exceeded, then we can + // continue, as long as it wasn't our own limit that was exceeded. + int rc; + struct rlimit rl; + switch (sig) + { + case SIGXFSZ: + rc = getrlimit (RLIMIT_FSIZE, & rl); + if (rc == 0 && rl.rlim_cur < our_RLIMIT_FSIZE.rlim_cur) + return; + break; + case SIGXCPU: + rc = getrlimit (RLIMIT_CPU, & rl); + if (rc == 0 && rl.rlim_cur < our_RLIMIT_CPU.rlim_cur) + return; + break; + default: + break; + } + + // Otherwise, it's game over. + log (_F("Received signal %d, exiting", sig)); + kill_stap_spawn (sig); + cleanup (); + exit (0); +} + +static void +setup_signals (sighandler_t handler) +{ + struct sigaction sa; + + memset(&sa, 0, sizeof(sa)); + sa.sa_handler = handler; + sigemptyset (&sa.sa_mask); + if (handler != SIG_IGN) + { + sigaddset (&sa.sa_mask, SIGHUP); + sigaddset (&sa.sa_mask, SIGPIPE); + sigaddset (&sa.sa_mask, SIGINT); + sigaddset (&sa.sa_mask, SIGTERM); + sigaddset (&sa.sa_mask, SIGTTIN); + sigaddset (&sa.sa_mask, SIGTTOU); + sigaddset (&sa.sa_mask, SIGXFSZ); + sigaddset (&sa.sa_mask, SIGXCPU); + } + sa.sa_flags = SA_RESTART; + + sigaction (SIGHUP, &sa, NULL); + sigaction (SIGPIPE, &sa, NULL); + sigaction (SIGINT, &sa, NULL); + sigaction (SIGTERM, &sa, NULL); + sigaction (SIGTTIN, &sa, NULL); + sigaction (SIGTTOU, &sa, NULL); + sigaction (SIGXFSZ, &sa, NULL); + sigaction (SIGXCPU, &sa, NULL); +} + +#if HAVE_AVAHI +static AvahiEntryGroup *avahi_group = NULL; +static AvahiThreadedPoll *avahi_threaded_poll = NULL; +static char *avahi_service_name = NULL; +static AvahiClient *avahi_client = 0; + +static void create_services (AvahiClient *c); + +static void +entry_group_callback ( + AvahiEntryGroup *g, + AvahiEntryGroupState state, + AVAHI_GCC_UNUSED void *userdata +) { + assert(g == avahi_group || avahi_group == NULL); + avahi_group = g; + + // Called whenever the entry group state changes. + switch (state) + { + case AVAHI_ENTRY_GROUP_ESTABLISHED: + // The entry group has been established successfully. + log (_F("Service '%s' successfully established.", avahi_service_name)); + break; + + case AVAHI_ENTRY_GROUP_COLLISION: { + char *n; + // A service name collision with a remote service. + // happened. Let's pick a new name. + n = avahi_alternative_service_name (avahi_service_name); + avahi_free (avahi_service_name); + avahi_service_name = n; + server_error (_F("Avahi service name collision, renaming service to '%s'", avahi_service_name)); + + // And recreate the services. + create_services (avahi_entry_group_get_client (g)); + break; + } + + case AVAHI_ENTRY_GROUP_FAILURE: + server_error (_F("Avahi entry group failure: %s", + avahi_strerror (avahi_client_errno (avahi_entry_group_get_client (g))))); + // Some kind of failure happened while we were registering our services. + avahi_threaded_poll_stop (avahi_threaded_poll); + break; + + case AVAHI_ENTRY_GROUP_UNCOMMITED: + case AVAHI_ENTRY_GROUP_REGISTERING: + break; + } +} + +static void +create_services (AvahiClient *c) { + assert (c); + + // If this is the first time we're called, let's create a new + // entry group if necessary. + if (! avahi_group) + if (! (avahi_group = avahi_entry_group_new (c, entry_group_callback, NULL))) + { + server_error (_F("avahi_entry_group_new () failed: %s", + avahi_strerror (avahi_client_errno (c)))); + goto fail; + } + + // If the group is empty (either because it was just created, or + // because it was reset previously, add our entries. + if (avahi_entry_group_is_empty (avahi_group)) + { + log (_F("Adding Avahi service '%s'", avahi_service_name)); + + // Create the txt tags that will be registered with our service. + string sysinfo = "sysinfo=" + uname_r + " " + arch; + string certinfo = "certinfo=" + cert_serial_number; + string version = string ("version=") + CURRENT_CS_PROTOCOL_VERSION;; + string optinfo = "optinfo="; + string separator; + if (! R_option.empty ()) + { + optinfo += R_option; + separator = " "; + } + if (! B_options.empty ()) + { + optinfo += separator + B_options; + separator = " "; + } + if (! I_options.empty ()) + optinfo += separator + I_options; + + // We will now our service to the entry group. Only services with the + // same name should be put in the same entry group. + int ret; + if ((ret = avahi_entry_group_add_service (avahi_group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, + (AvahiPublishFlags)0, + avahi_service_name, "_stap._tcp", NULL, NULL, port, + sysinfo.c_str (), optinfo.c_str (), + version.c_str (), certinfo.c_str (), NULL)) < 0) + { + if (ret == AVAHI_ERR_COLLISION) + goto collision; + + server_error (_F("Failed to add _stap._tcp service: %s", avahi_strerror (ret))); + goto fail; + } + + // Tell the server to register the service. + if ((ret = avahi_entry_group_commit (avahi_group)) < 0) + { + server_error (_F("Failed to commit avahi entry group: %s", avahi_strerror (ret))); + goto fail; + } + } + return; + + collision: + // A service name collision with a local service happened. Let's + // pick a new name. + char *n; + n = avahi_alternative_service_name (avahi_service_name); + avahi_free(avahi_service_name); + avahi_service_name = n; + server_error (_F("Avahi service name collision, renaming service to '%s'", avahi_service_name)); + avahi_entry_group_reset (avahi_group); + create_services (c); + return; + + fail: + avahi_entry_group_reset (avahi_group); + avahi_threaded_poll_stop (avahi_threaded_poll); +} + +static void +client_callback (AvahiClient *c, AvahiClientState state, AVAHI_GCC_UNUSED void * userdata) +{ + assert(c); + + // Called whenever the client or server state changes. + switch (state) + { + case AVAHI_CLIENT_S_RUNNING: + // The server has startup successfully and registered its host + // name on the network, so it's time to create our services. + create_services (c); + break; + + case AVAHI_CLIENT_FAILURE: + server_error (_F("Avahi client failure: %s", avahi_strerror (avahi_client_errno (c)))); + avahi_threaded_poll_stop (avahi_threaded_poll); + break; + + case AVAHI_CLIENT_S_COLLISION: + // Let's drop our registered services. When the server is back + // in AVAHI_SERVER_RUNNING state we will register them + // again with the new host name. + // Fall through ... + case AVAHI_CLIENT_S_REGISTERING: + // The server records are now being established. This + // might be caused by a host name change. We need to wait + // for our own records to register until the host name is + // properly esatblished. + if (avahi_group) + avahi_entry_group_reset (avahi_group); + break; + + case AVAHI_CLIENT_CONNECTING: + break; + } +} + +static void +avahi_cleanup () { + if (avahi_service_name) + log (_F("Removing Avahi service '%s'", avahi_service_name)); + + // Stop the avahi client, if it's running + if (avahi_threaded_poll) + avahi_threaded_poll_stop (avahi_threaded_poll); + + // Clean up the avahi objects. The order of freeing these is significant. + if (avahi_group) { + avahi_entry_group_reset (avahi_group); + avahi_entry_group_free (avahi_group); + avahi_group = 0; + } + if (avahi_client) { + avahi_client_free (avahi_client); + avahi_client = 0; + } + if (avahi_threaded_poll) { + avahi_threaded_poll_free (avahi_threaded_poll); + avahi_threaded_poll = 0; + } + if (avahi_service_name) { + avahi_free (avahi_service_name); + avahi_service_name = 0; + } +} + +// The entry point for the avahi client thread. +static void +avahi_publish_service (CERTCertificate *cert) +{ + cert_serial_number = get_cert_serial_number (cert); + + string buf = "Systemtap Compile Server, pid=" + lex_cast (getpid ()); + avahi_service_name = avahi_strdup (buf.c_str ()); + + // Allocate main loop object. + if (! (avahi_threaded_poll = avahi_threaded_poll_new ())) + { + server_error (_("Failed to create avahi threaded poll object.")); + return; + } + + // Always allocate a new client. + int error; + avahi_client = avahi_client_new (avahi_threaded_poll_get (avahi_threaded_poll), + (AvahiClientFlags)0, + client_callback, NULL, & error); + // Check wether creating the client object succeeded. + if (! avahi_client) + { + server_error (_F("Failed to create avahi client: %s", avahi_strerror(error))); + return; + } + + // Run the main loop. + avahi_threaded_poll_start (avahi_threaded_poll); + + return; +} +#endif // HAVE_AVAHI + +static void +advertise_presence (CERTCertificate *cert __attribute ((unused))) +{ +#if HAVE_AVAHI + avahi_publish_service (cert); +#else + server_error (_("Unable to advertise presence on the network. Avahi is not available")); +#endif +} + +static void +unadvertise_presence () +{ +#if HAVE_AVAHI + avahi_cleanup (); +#endif +} + +static void +initialize (int argc, char **argv) { + setup_signals (& handle_interrupt); + + // PR11197: security prophylactics. + // 1) Reject use as root, except via a special environment variable. + if (! getenv ("STAP_PR11197_OVERRIDE")) { + if (geteuid () == 0) + fatal ("For security reasons, invocation of stap-serverd as root is not supported."); + } + // 2) resource limits should be set if the user is the 'stap-server' daemon. + string login = getlogin (); + if (login == "stap-server") { + // First obtain the current limits. + int rc = getrlimit (RLIMIT_FSIZE, & our_RLIMIT_FSIZE); + rc |= getrlimit (RLIMIT_STACK, & our_RLIMIT_STACK); + rc |= getrlimit (RLIMIT_CPU, & our_RLIMIT_CPU); + rc |= getrlimit (RLIMIT_NPROC, & our_RLIMIT_NPROC); + rc |= getrlimit (RLIMIT_AS, & our_RLIMIT_AS); + if (rc != 0) + fatal (_F("Unable to obtain current resource limits: %s", strerror (errno))); + + // Now establish limits for the translator. Make sure these limits do not exceed the current + // limits. + #define TRANSLATOR_LIMIT(category, limit) \ + do { \ + translator_RLIMIT_##category = our_RLIMIT_##category; \ + if (translator_RLIMIT_##category.rlim_cur > (limit)) \ + translator_RLIMIT_##category.rlim_cur = (limit); \ + } while (0); + TRANSLATOR_LIMIT (FSIZE, 50000 * 1024); + TRANSLATOR_LIMIT (STACK, 1000 * 1024); + TRANSLATOR_LIMIT (CPU, 60); + TRANSLATOR_LIMIT (NPROC, 20); + TRANSLATOR_LIMIT (AS, 500000 * 1024); + set_rlimits = true; + #undef TRANSLATOR_LIMIT + } + else + set_rlimits = false; + + // Seed the random number generator. Used to generate noise used during key generation. + srand (time (NULL)); + + // Initial values. + client_version = "1.0"; // Assumed until discovered otherwise + use_db_password = false; + port = 0; + keep_temp = false; + struct utsname utsname; + uname (& utsname); + uname_r = utsname.release; + arch = normalize_machine (utsname.machine); + + // Parse the arguments. + parse_options (argc, argv); + + pid_t pid = getpid (); + log (_F("===== compile server pid %d starting =====", pid)); + + // Where is the ssl certificate/key database? + if (cert_db_path.empty ()) + cert_db_path = server_cert_db_path (); + + // Make sure NSPR is initialized. Must be done before NSS is initialized + PR_Init (PR_SYSTEM_THREAD, PR_PRIORITY_NORMAL, 1); + /* Set the cert database password callback. */ + PK11_SetPasswordFunc (nssPasswordCallback); +} + +static void +cleanup () +{ + unadvertise_presence (); + end_log (); +} + +/* Function: readDataFromSocket() + * + * Purpose: Read data from the socket into a temporary file. + * + */ +static PRInt32 +readDataFromSocket(PRFileDesc *sslSocket, const char *requestFileName) +{ + PRFileDesc *local_file_fd = 0; + PRInt32 numBytesExpected; + PRInt32 numBytesRead; + PRInt32 numBytesWritten; + PRInt32 totalBytes = 0; +#define READ_BUFFER_SIZE 4096 + char buffer[READ_BUFFER_SIZE]; + + /* Read the number of bytes to be received. */ + /* XXX: impose a limit to prevent disk space consumption DoS */ + numBytesRead = PR_Read (sslSocket, & numBytesExpected, sizeof (numBytesExpected)); + if (numBytesRead == 0) /* EOF */ + { + server_error (_("Error reading size of request file")); + goto done; + } + if (numBytesRead < 0) + { + server_error (_("Error in PR_Read")); + nssError (); + goto done; + } + + /* Convert numBytesExpected from network byte order to host byte order. */ + numBytesExpected = ntohl (numBytesExpected); + + /* If 0 bytes are expected, then we were contacted only to obtain our certificate. + There is no client request. */ + if (numBytesExpected == 0) + return 0; + + /* Open the output file. */ + local_file_fd = PR_Open(requestFileName, PR_WRONLY | PR_CREATE_FILE | PR_TRUNCATE, + PR_IRUSR | PR_IWUSR); + if (local_file_fd == NULL) + { + server_error (_F("Could not open output file %s", requestFileName)); + nssError (); + return -1; + } + + /* Read until EOF or until the expected number of bytes has been read. */ + for (totalBytes = 0; totalBytes < numBytesExpected; totalBytes += numBytesRead) + { + numBytesRead = PR_Read(sslSocket, buffer, READ_BUFFER_SIZE); + if (numBytesRead == 0) + break; /* EOF */ + if (numBytesRead < 0) + { + server_error (_("Error in PR_Read")); + nssError (); + goto done; + } + + /* Write to the request file. */ + numBytesWritten = PR_Write(local_file_fd, buffer, numBytesRead); + if (numBytesWritten < 0 || (numBytesWritten != numBytesRead)) + { + server_error (_F("Could not write to output file %s", requestFileName)); + nssError (); + goto done; + } + } + + if (totalBytes != numBytesExpected) + { + server_error (_F("Expected %d bytes, got %d while reading client request from socket", + numBytesExpected, totalBytes)); + goto done; + } + + done: + if (local_file_fd) + PR_Close (local_file_fd); + return totalBytes; +} + +/* Function: setupSSLSocket() + * + * Purpose: Configure a socket for SSL. + * + * + */ +static PRFileDesc * +setupSSLSocket (PRFileDesc *tcpSocket, CERTCertificate *cert, SECKEYPrivateKey *privKey) +{ + PRFileDesc *sslSocket; + SSLKEAType certKEA; + SECStatus secStatus; + + /* Inport the socket into SSL. */ + sslSocket = SSL_ImportFD (NULL, tcpSocket); + if (sslSocket == NULL) + { + server_error (_("Could not import socket into SSL")); + nssError (); + return NULL; + } + + /* Set the appropriate flags. */ + secStatus = SSL_OptionSet (sslSocket, SSL_SECURITY, PR_TRUE); + if (secStatus != SECSuccess) + { + server_error (_("Error setting SSL security for socket")); + nssError (); + return NULL; + } + + secStatus = SSL_OptionSet(sslSocket, SSL_HANDSHAKE_AS_SERVER, PR_TRUE); + if (secStatus != SECSuccess) + { + server_error (_("Error setting handshake as server for socket")); + nssError (); + return NULL; + } + + secStatus = SSL_OptionSet(sslSocket, SSL_REQUEST_CERTIFICATE, PR_FALSE); + if (secStatus != SECSuccess) + { + server_error (_("Error setting SSL client authentication mode for socket")); + nssError (); + return NULL; + } + + secStatus = SSL_OptionSet(sslSocket, SSL_REQUIRE_CERTIFICATE, PR_FALSE); + if (secStatus != SECSuccess) + { + server_error (_("Error setting SSL client authentication mode for socket")); + nssError (); + return NULL; + } + + /* Set the appropriate callback routines. */ +#if 0 /* use the default */ + secStatus = SSL_AuthCertificateHook (sslSocket, myAuthCertificate, CERT_GetDefaultCertDB()); + if (secStatus != SECSuccess) + { + nssError (); + server_error (_("Error in SSL_AuthCertificateHook")); + return NULL; + } +#endif +#if 0 /* Use the default */ + secStatus = SSL_BadCertHook(sslSocket, (SSLBadCertHandler)myBadCertHandler, &certErr); + if (secStatus != SECSuccess) + { + nssError (); + server_error (_("Error in SSL_BadCertHook")); + return NULL; + } +#endif +#if 0 /* no handshake callback */ + secStatus = SSL_HandshakeCallback(sslSocket, myHandshakeCallback, NULL); + if (secStatus != SECSuccess) + { + server_error (_("Error in SSL_HandshakeCallback")); + nssError (); + return NULL; + } +#endif + + certKEA = NSS_FindCertKEAType (cert); + + secStatus = SSL_ConfigSecureServer (sslSocket, cert, privKey, certKEA); + if (secStatus != SECSuccess) + { + server_error (_("Error configuring SSL server")); + nssError (); + return NULL; + } + + return sslSocket; +} + +#if 0 /* No client authentication (for now) and not authenticating after each transaction. */ +/* Function: authenticateSocket() + * + * Purpose: Perform client authentication on the socket. + * + */ +static SECStatus +authenticateSocket (PRFileDesc *sslSocket, PRBool requireCert) +{ + CERTCertificate *cert; + SECStatus secStatus; + + /* Returns NULL if client authentication is not enabled or if the + * client had no certificate. */ + cert = SSL_PeerCertificate(sslSocket); + if (cert) + { + /* Client had a certificate, so authentication is through. */ + CERT_DestroyCertificate(cert); + return SECSuccess; + } + + /* Request client to authenticate itself. */ + secStatus = SSL_OptionSet(sslSocket, SSL_REQUEST_CERTIFICATE, PR_TRUE); + if (secStatus != SECSuccess) + { + server_error (_("Error in SSL_OptionSet:SSL_REQUEST_CERTIFICATE")); + nssError (); + return SECFailure; + } + + /* If desired, require client to authenticate itself. Note + * SSL_REQUEST_CERTIFICATE must also be on, as above. */ + secStatus = SSL_OptionSet(sslSocket, SSL_REQUIRE_CERTIFICATE, requireCert); + if (secStatus != SECSuccess) + { + server_error (_("Error in SSL_OptionSet:SSL_REQUIRE_CERTIFICATE")); + nssError (); + return SECFailure; + } + + /* Having changed socket configuration parameters, redo handshake. */ + secStatus = SSL_ReHandshake(sslSocket, PR_TRUE); + if (secStatus != SECSuccess) + { + server_error (_("Error in SSL_ReHandshake")); + nssError (); + return SECFailure; + } + + /* Force the handshake to complete before moving on. */ + secStatus = SSL_ForceHandshake(sslSocket); + if (secStatus != SECSuccess) + { + server_error (_("Error in SSL_ForceHandshake")); + nssError (); + return SECFailure; + } + + return SECSuccess; +} +#endif /* No client authentication and not authenticating after each transaction. */ + +/* Function: writeDataToSocket + * + * Purpose: Write the server's response back to the socket. + * + */ +static SECStatus +writeDataToSocket(PRFileDesc *sslSocket, const char *responseFileName) +{ + PRFileDesc *local_file_fd = PR_Open (responseFileName, PR_RDONLY, 0); + if (local_file_fd == NULL) + { + server_error (_F("Could not open input file %s", responseFileName)); + nssError (); + return SECFailure; + } + + /* Transmit the local file across the socket. + */ + int numBytes = PR_TransmitFile (sslSocket, local_file_fd, + NULL, 0, + PR_TRANSMITFILE_KEEP_OPEN, + PR_INTERVAL_NO_TIMEOUT); + + /* Error in transmission. */ + SECStatus secStatus = SECSuccess; + if (numBytes < 0) + { + server_error (_("Error writing response to socket")); + nssError (); + secStatus = SECFailure; + } + + PR_Close (local_file_fd); + return secStatus; +} + +static void +get_stap_locale (const string &staplang, vector &envVec) +{ + // If the client version is < 1.6, then no file containing environment + // variables defining the locale has been passed. + if (client_version < "1.6") + return; + + /* Go through each line of the file, verify it, then add it to the vector */ + ifstream langfile; + langfile.open(staplang.c_str()); + if (!langfile.is_open()) + { + // Not fatal. Proceed with the environment we have. + server_error(_F("Unable to open file %s for reading: %s", staplang.c_str(), + strerror (errno))); + return; + } + + /* Unpackage internationalization variables and verify their contents */ + map envMap; /* To temporarily store the entire array of strings */ + string line; + const set &locVars = localization_variables(); + + /* Copy the global environ variable into the map */ + for (unsigned i=0; environ[i]; i++) + { + vector environTok; + tokenize(environ[i], environTok, "="); + envMap[environTok[0]] = (string)getenv(environTok[0].c_str()); + } + + /* Create regular expression objects to verify lines read from file. Should not allow + spaces, ctrl characters, etc */ + regex_t checkre; + if ((regcomp(&checkre, "^[a-zA-Z0-9@_.=-]*$", REG_EXTENDED | REG_NOSUB) != 0)) + { + // Not fatal. Proceed with the environment we have. + server_error(_F("Error in regcomp: %s", strerror (errno))); + return; + } + + while (1) + { + getline(langfile, line); + if (!langfile.good()) + break; + + /* Extract key and value from the line. Note: value may contain "=". */ + string key; + string value; + size_t pos; + pos = line.find("="); + key = line.substr(0, pos); + pos++; + value = line.substr(pos); + + /* Make sure the key is found in the localization variables global set */ + if (locVars.find(key) == locVars.end()) + { + // Not fatal. Just ignore it. + client_error(_F("Localization key '%s' not found in global list", key.c_str())); + continue; + } + + /* Make sure the value does not contain illegal characters */ + if ((regexec(&checkre, value.c_str(), (size_t) 0, NULL, 0) != 0)) + { + // Not fatal. Just ignore it. + client_error(_F("Localization value '%s' contains illegal characters", value.c_str())); + continue; + } + + /* All is good, copy line into envMap, replacing if already there */ + envMap[key] = value; + } + + if (!langfile.eof()) + { + // Not fatal. Proceed with what we have. + server_error(_F("Error reading file %s: %s", staplang.c_str(), strerror (errno))); + } + + regfree(&checkre); + + /* Copy map into vector */ + for (map::iterator it = envMap.begin(); it != envMap.end(); it++) + envVec.push_back(it->first + "=" + it->second); +} + +// Filter paths prefixed with the server's home directory from the given file. +// +static void +filter_response_file (const string &file_name, const string &responseDirName) +{ + vector cmd; + + // Filter the server's home directory name + cmd.clear(); + cmd.push_back ("sed"); + cmd.push_back ("-i"); + cmd.push_back (string ("s,") + get_home_directory () + ",,g"); + cmd.push_back (file_name); + stap_system (0, cmd); + + // Filter the server's response directory name + cmd.clear(); + cmd.push_back ("sed"); + cmd.push_back ("-i"); + cmd.push_back (string ("s,") + responseDirName + ",,g"); + cmd.push_back (file_name); + stap_system (0, cmd); +} + +/* Run the translator on the data in the request directory, and produce output + in the given output directory. */ +static void +handleRequest (const string &requestDirName, const string &responseDirName) +{ + vector stapargv; + int rc; + wordexp_t words; + unsigned u; + unsigned i; + FILE* f; + int unprivileged = 0; + + // Save the server version. Do this early, so the client knows what version of the server + // it is dealing with, even if the request is not fully completed. + string stapversion = responseDirName + "/version"; + f = fopen (stapversion.c_str (), "w"); + if (f) + { + fputs (CURRENT_CS_PROTOCOL_VERSION, f); + fclose(f); + } + else + server_error (_F("Unable to open client version file %s", stapversion.c_str ())); + + // Get the client version. The default version is already set. Use it if we fail here. + string filename = requestDirName + "/version"; + if (file_exists (filename)) + read_from_file (filename, client_version); + log (_F("Client version is %s", client_version.v)); + + // The name of the translator executable. + stapargv.push_back ((char *)(getenv ("SYSTEMTAP_STAP") ?: STAP_PREFIX "/bin/stap")); + + /* Transcribe stap_options. We use plain wordexp(3), since these + options are coming from the local trusted user, so malicious + content is not a concern. */ + // TODO: Use tokenize here. + rc = wordexp (stap_options.c_str (), & words, WRDE_NOCMD|WRDE_UNDEF); + if (rc) + { + server_error (_("Cannot parse stap options")); + return; + } + + for (u=0; u envVec; + get_stap_locale (staplang, envVec); + + /* All ready, let's run the translator! */ + rc = spawn_and_wait(stapargv, "/dev/null", stapstdout.c_str (), stapstderr.c_str (), + requestDirName.c_str (), set_rlimits, envVec); + + /* Save the RC */ + string staprc = responseDirName + "/rc"; + f = fopen(staprc.c_str (), "w"); + if (f) + { + /* best effort basis */ + fprintf(f, "%d", rc); + fclose(f); + } + + /* In unprivileged mode, if we have a module built, we need to + sign the sucker. */ + if (unprivileged) + { + glob_t globber; + char pattern[PATH_MAX]; + snprintf (pattern, PATH_MAX, "%s/*.ko", new_staptmpdir.c_str()); + rc = glob (pattern, GLOB_ERR, NULL, &globber); + if (rc) + server_error (_F("Unable to find a module in %s", new_staptmpdir.c_str())); + else if (globber.gl_pathc != 1) + server_error (_F("Too many modules (%zu) in %s", globber.gl_pathc, new_staptmpdir.c_str())); + else + { + sign_file (cert_db_path, server_cert_nickname(), + globber.gl_pathv[0], string(globber.gl_pathv[0]) + ".sgn"); + } + } + + /* If uprobes.ko is required, it will have been built or cache-copied into + * the temp directory. We need to pack it into the response where the client + * can find it, and sign, if necessary, for unprivileged users. + */ + string uprobes_ko = new_staptmpdir + "/uprobes/uprobes.ko"; + if (get_file_size(uprobes_ko) > 0) + { + /* uprobes.ko is required. + * + * It's already underneath the stap tmpdir, but older stap clients + * don't know to look for it there, so, for these clients, we end up packing uprobes twice + * into the zip. We could move instead of symlink. + */ + string uprobes_response; + if (client_version < "1.6") + { + uprobes_response = (string)responseDirName + "/uprobes.ko"; + rc = symlink(uprobes_ko.c_str(), uprobes_response.c_str()); + if (rc != 0) + server_error (_F("Could not link to %s from %s", + uprobes_ko.c_str(), uprobes_response.c_str())); + } + else + uprobes_response = uprobes_ko; + + /* In unprivileged mode, we need a signature on uprobes as well. */ + if (unprivileged) + { + sign_file (cert_db_path, server_cert_nickname(), + uprobes_response, uprobes_response + ".sgn"); + } + } + + /* Free up all the arg string copies. Note that the first few were alloc'd + by wordexp(), which wordfree() frees; others were hand-set to literal strings. */ + wordfree (& words); + + // Filter paths prefixed with the server's home directory from the stdout and stderr + // files in the response. + filter_response_file (stapstdout, responseDirName); + filter_response_file (stapstderr, responseDirName); + + /* Sorry about the inconvenience. C string/file processing is such a pleasure. */ +} + + +/* A front end for stap_spawn that handles stdin, stdout, stderr, switches to a working + directory and returns overall success or failure. */ +static PRStatus +spawn_and_wait (const vector &argv, + const char* fd0, const char* fd1, const char* fd2, + const char *pwd, bool setrlimits, const vector& envVec) +{ + pid_t pid; + int rc; + posix_spawn_file_actions_t actions; + int dotfd = -1; + +#define CHECKRC(msg) do { if (rc) { server_error (_(msg)); return PR_FAILURE; } } while (0) + + rc = posix_spawn_file_actions_init (& actions); + CHECKRC ("Error in spawn file actions ctor"); + if (fd0) { + rc = posix_spawn_file_actions_addopen(& actions, 0, fd0, O_RDONLY, 0600); + CHECKRC ("Error in spawn file actions fd0"); + } + if (fd1) { + rc = posix_spawn_file_actions_addopen(& actions, 1, fd1, O_WRONLY|O_CREAT, 0600); + CHECKRC ("Error in spawn file actions fd1"); + } + if (fd2) { + // Use append mode for stderr because it gets written to in other places in the server. + rc = posix_spawn_file_actions_addopen(& actions, 2, fd2, O_WRONLY|O_APPEND|O_CREAT, 0600); + CHECKRC ("Error in spawn file actions fd2"); + } + + /* change temporarily to a directory if requested */ + if (pwd) + { + dotfd = open (".", O_RDONLY); + if (dotfd < 0) + { + server_error (_("Error in spawn getcwd")); + return PR_FAILURE; + } + + rc = chdir (pwd); + if (rc) + { + close(dotfd); + server_error(_("Error in spawn chdir")); + return PR_FAILURE; + } + } + + // Set resource limits, if requested, in order to prevent + // DOS. spawn_and_wait ultimately uses posix_spawp which behaves like + // fork (according to the posix_spawnbp man page), so the limits we set here will be + // respected (according to the setrlimit man page). + rc = 0; + if (setrlimits) { + rc = setrlimit (RLIMIT_FSIZE, & translator_RLIMIT_FSIZE); + rc |= setrlimit (RLIMIT_STACK, & translator_RLIMIT_STACK); + rc |= setrlimit (RLIMIT_CPU, & translator_RLIMIT_CPU); + rc |= setrlimit (RLIMIT_NPROC, & translator_RLIMIT_NPROC); + rc |= setrlimit (RLIMIT_AS, & translator_RLIMIT_AS); + } + if (rc == 0) + { + pid = stap_spawn (0, argv, & actions, envVec); + /* NB: don't react to pid==-1 right away; need to chdir back first. */ + } + else { + server_error (_F("Unable to set resource limits for %s: %s", + argv[0].c_str (), strerror (errno))); + pid = -1; + } + if (set_rlimits) { + int rrlrc = setrlimit (RLIMIT_FSIZE, & our_RLIMIT_FSIZE); + rrlrc |= setrlimit (RLIMIT_STACK, & our_RLIMIT_STACK); + rrlrc |= setrlimit (RLIMIT_CPU, & our_RLIMIT_CPU); + rrlrc |= setrlimit (RLIMIT_NPROC, & our_RLIMIT_NPROC); + rrlrc |= setrlimit (RLIMIT_AS, & our_RLIMIT_AS); + if (rrlrc != 0) + log (_F("Unable to restore resource limits after %s: %s", + argv[0].c_str (), strerror (errno))); + } + + if (pwd && dotfd >= 0) + { + int subrc; + subrc = fchdir (dotfd); + subrc |= close (dotfd); + if (subrc) + server_error (_("Error in spawn unchdir")); + } + + if (pid == -1) + { + server_error (_F("Error in spawn: %s", strerror (errno))); + return PR_FAILURE; + } + + rc = stap_waitpid (0, pid); + if (rc == -1) + { + server_error (_("Error in waitpid")); + return PR_FAILURE; + } + + rc = posix_spawn_file_actions_destroy (&actions); + CHECKRC ("Error in spawn file actions dtor"); + + return PR_SUCCESS; +#undef CHECKRC +} + +/* Function: int handle_connection() + * + * Purpose: Handle a connection to a socket. Copy in request zip + * file, process it, copy out response. Temporary directories are + * created & destroyed here. + */ +static SECStatus +handle_connection (PRFileDesc *tcpSocket, CERTCertificate *cert, SECKEYPrivateKey *privKey) +{ + PRFileDesc * sslSocket = NULL; + SECStatus secStatus = SECFailure; + int rc; + char *rc1; + char tmpdir[PATH_MAX]; + char requestFileName[PATH_MAX]; + char requestDirName[PATH_MAX]; + char responseDirName[PATH_MAX]; + char responseFileName[PATH_MAX]; + vector argv; + PRInt32 bytesRead; + + tmpdir[0]='\0'; /* prevent cleanup-time /bin/rm of uninitialized directory */ + +#if 0 // already done on the listenSocket + /* Make sure the socket is blocking. */ + PRSocketOptionData socketOption; + socketOption.option = PR_SockOpt_Nonblocking; + socketOption.value.non_blocking = PR_FALSE; + PR_SetSocketOption (tcpSocket, &socketOption); +#endif + secStatus = SECFailure; + sslSocket = setupSSLSocket (tcpSocket, cert, privKey); + if (sslSocket == NULL) + { + // Message already issued. + goto cleanup; + } + + secStatus = SSL_ResetHandshake(sslSocket, /* asServer */ PR_TRUE); + if (secStatus != SECSuccess) + { + server_error (_("Error resetting SSL handshake")); + nssError (); + goto cleanup; + } + +#if 0 // The client authenticates the server, so the client initiates the handshake + /* Force the handshake to complete before moving on. */ + secStatus = SSL_ForceHandshake(sslSocket); + if (secStatus != SECSuccess) + { + server_error (_("Error forcing SSL handshake")); + nssError (); + goto cleanup; + } +#endif + + secStatus = SECFailure; + snprintf(tmpdir, PATH_MAX, "%s/stap-server.XXXXXX", getenv("TMPDIR") ?: "/tmp"); + rc1 = mkdtemp(tmpdir); + if (! rc1) + { + server_error (_F("Could not create temporary directory %s: %s", tmpdir, strerror(errno))); + tmpdir[0]=0; /* prevent /bin/rm */ + goto cleanup; + } + + /* Create a temporary files names and directories. */ + snprintf (requestFileName, PATH_MAX, "%s/request.zip", tmpdir); + + snprintf (requestDirName, PATH_MAX, "%s/request", tmpdir); + rc = mkdir(requestDirName, 0700); + if (rc) + { + server_error (_F("Could not create temporary directory %s: %s", requestDirName, strerror (errno))); + goto cleanup; + } + + snprintf (responseDirName, PATH_MAX, "%s/response", tmpdir); + rc = mkdir(responseDirName, 0700); + if (rc) + { + server_error (_F("Could not create temporary directory %s: %s", responseDirName, strerror (errno))); + goto cleanup; + } + // Set this early, since it gets used for errors to be returned to the client. + stapstderr = string(responseDirName) + "/stderr"; + + snprintf (responseFileName, PATH_MAX, "%s/response.zip", tmpdir); + + /* Read data from the socket. + * If the user is requesting/requiring authentication, authenticate + * the socket. */ + bytesRead = readDataFromSocket(sslSocket, requestFileName); + if (bytesRead < 0) // Error + goto cleanup; + if (bytesRead == 0) // No request -- not an error + { + secStatus = SECSuccess; + goto cleanup; + } + +#if 0 /* Don't authenticate after each transaction */ + if (REQUEST_CERT_ALL) + { + secStatus = authenticateSocket(sslSocket); + if (secStatus != SECSuccess) + goto cleanup; + } +#endif + + /* Unzip the request. */ + secStatus = SECFailure; + argv.push_back ("unzip"); + argv.push_back ("-q"); + argv.push_back ("-d"); + argv.push_back (requestDirName); + argv.push_back (requestFileName); + rc = stap_system (0, argv); + if (rc != 0) + { + server_error (_("Unable to extract client request")); + goto cleanup; + } + + /* Handle the request zip file. An error therein should still result + in a response zip file (containing stderr etc.) so we don't have to + have a result code here. */ + handleRequest(requestDirName, responseDirName); + + /* Zip the response. */ + argv.clear (); + argv.push_back ("zip"); + argv.push_back ("-q"); + argv.push_back ("-r"); + argv.push_back (responseFileName); + argv.push_back ("."); + rc = spawn_and_wait (argv, NULL, NULL, NULL, responseDirName); + if (rc != PR_SUCCESS) + { + server_error (_("Unable to compress server response")); + goto cleanup; + } + + secStatus = writeDataToSocket (sslSocket, responseFileName); + +cleanup: + if (sslSocket) + if (PR_Close (sslSocket) != PR_SUCCESS) + { + server_error (_("Error closing ssl socket")); + nssError (); + } + + if (tmpdir[0]) + { + // Remove the whole tmpdir and all that lies beneath, unless -k was specified. + if (keep_temp) + log (_F("Keeping temporary directory %s", tmpdir)); + else + { + argv.clear (); + argv.push_back ("rm"); + argv.push_back ("-r"); + argv.push_back (tmpdir); + rc = stap_system (0, argv); + if (rc != 0) + server_error (_("Error in tmpdir cleanup")); + } + } + + return secStatus; +} + +/* Function: int accept_connection() + * + * Purpose: Accept a connection to the socket. + * + */ +static SECStatus +accept_connections (PRFileDesc *listenSocket, CERTCertificate *cert) +{ + PRNetAddr addr; + PRFileDesc *tcpSocket; + SECStatus secStatus; + CERTCertDBHandle *dbHandle; + + dbHandle = CERT_GetDefaultCertDB (); + + // cert_db_path gets passed to nssPasswordCallback. + SECKEYPrivateKey *privKey = PK11_FindKeyByAnyCert (cert, (void*)cert_db_path.c_str ()); + if (privKey == NULL) + { + server_error (_("Unable to obtain certificate private key")); + nssError (); + return SECFailure; + } + + while (PR_TRUE) + { + /* Accept a connection to the socket. */ + tcpSocket = PR_Accept (listenSocket, &addr, PR_INTERVAL_NO_TIMEOUT); + if (tcpSocket == NULL) + { + server_error (_("Error accepting client connection")); + break; + } + + /* Log the accepted connection. */ + log (_F("Accepted connection from %d.%d.%d.%d:%d", + (addr.inet.ip ) & 0xff, + (addr.inet.ip >> 8) & 0xff, + (addr.inet.ip >> 16) & 0xff, + (addr.inet.ip >> 24) & 0xff, + addr.inet.port)); + + /* XXX: alarm() or somesuch to set a timeout. */ + /* XXX: fork() or somesuch to handle concurrent requests. */ + + /* Accepted the connection, now handle it. */ + secStatus = handle_connection (tcpSocket, cert, privKey); + if (secStatus != SECSuccess) + server_error (_("Error processing client request")); + + // Log the end of the request. + log (_F("Request from %d.%d.%d.%d:%d complete", + (addr.inet.ip ) & 0xff, + (addr.inet.ip >> 8) & 0xff, + (addr.inet.ip >> 16) & 0xff, + (addr.inet.ip >> 24) & 0xff, + addr.inet.port)); + + // If our certificate is no longer valid (e.g. has expired), then exit. + secStatus = CERT_VerifyCertNow (dbHandle, cert, PR_TRUE/*checkSig*/, + certUsageSSLServer, NULL/*wincx*/); + if (secStatus != SECSuccess) + { + // Not an error. Exit the loop so a new cert can be generated. + break; + } + } + + SECKEY_DestroyPrivateKey (privKey); + return SECSuccess; +} + +/* Function: void server_main() + * + * Purpose: This is the server's main function. It configures a socket + * and listens to it. + * + */ +static SECStatus +server_main (PRFileDesc *listenSocket) +{ + // Initialize NSS. + SECStatus secStatus = nssInit (cert_db_path.c_str ()); + if (secStatus != SECSuccess) + { + // Message already issued. + return secStatus; + } + + // Preinitialized here due to jumps to the label 'done'. + CERTCertificate *cert = NULL; + bool serverCacheConfigured = false; + + // Enable cipher suites which are allowed by U.S. export regulations. + // NB: The NSS docs say that SSL_ClearSessionCache is required for the new settings to take + // effect, however, calling it puts NSS in a state where it will not shut down cleanly. + // We need to be able to shut down NSS cleanly if we are to generate a new certificate when + // ours expires. It should be noted however, thet SSL_ClearSessionCache only clears the + // client cache, and we are a server. + secStatus = NSS_SetExportPolicy (); + // SSL_ClearSessionCache (); + if (secStatus != SECSuccess) + { + server_error (_("Unable to set NSS export policy")); + nssError (); + goto done; + } + + // Configure the SSL session cache for a single process server with the default settings. + secStatus = SSL_ConfigServerSessionIDCache (0, 0, 0, NULL); + if (secStatus != SECSuccess) + { + server_error (_("Unable to configure SSL server session ID cache")); + nssError (); + goto done; + } + serverCacheConfigured = true; + + /* Get own certificate. */ + cert = PK11_FindCertFromNickname (server_cert_nickname (), NULL); + if (cert == NULL) + { + server_error (_F("Unable to find our certificate in the database at %s", + cert_db_path.c_str ())); + nssError (); + goto done; + } + + // Tell the world that we're listening. + advertise_presence (cert); + + /* Handle connections to the socket. */ + secStatus = accept_connections (listenSocket, cert); + + // Tell the world we're no longer listening. + unadvertise_presence (); + + done: + // Clean up + if (cert) + CERT_DestroyCertificate (cert); + + // Shutdown NSS + if (serverCacheConfigured && SSL_ShutdownServerSessionIDCache () != SECSuccess) + { + server_error (_("Unable to shut down server session ID cache")); + nssError (); + } + nssCleanup (cert_db_path.c_str ()); + + return secStatus; +} + +static void +listen () +{ + // Create a new socket. + PRFileDesc *listenSocket = PR_NewTCPSocket (); + if (listenSocket == NULL) + { + server_error (_("Error creating socket")); + nssError (); + return; + } + + // Set socket to be blocking - on some platforms the default is nonblocking. + PRSocketOptionData socketOption; + socketOption.option = PR_SockOpt_Nonblocking; + socketOption.value.non_blocking = PR_FALSE; + PRStatus prStatus = PR_SetSocketOption (listenSocket, & socketOption); + if (prStatus != PR_SUCCESS) + { + server_error (_("Error setting socket properties")); + nssError (); + goto done; + } + + // Allow the socket address to be reused, in case we want the same port across a + // 'service stap-server restart' + socketOption.option = PR_SockOpt_Reuseaddr; + socketOption.value.reuse_addr = PR_TRUE; + prStatus = PR_SetSocketOption (listenSocket, & socketOption); + if (prStatus != PR_SUCCESS) + { + server_error (_("Error setting socket properties")); + nssError (); + goto done; + } + + // Configure the network connection. + PRNetAddr addr; + addr.inet.family = PR_AF_INET; + addr.inet.ip = PR_INADDR_ANY; + + // Bind the socket to an address. Retry if the selected port is busy. + for (;;) + { + addr.inet.port = PR_htons (port); + + /* Bind the address to the listener socket. */ + prStatus = PR_Bind (listenSocket, & addr); + if (prStatus == PR_SUCCESS) + break; + + // If the selected port is busy. Try another. + PRErrorCode errorNumber = PR_GetError (); + switch (errorNumber) + { + case PR_ADDRESS_NOT_AVAILABLE_ERROR: + server_error (_F("Network port %d is unavailable. Trying another port", port)); + port = 0; // Will automatically select an available port + continue; + case PR_ADDRESS_IN_USE_ERROR: + server_error (_F("Network port %d is busy. Trying another port", port)); + port = 0; // Will automatically select an available port + continue; + default: + server_error (_("Error setting socket address")); + nssError (); + goto done; + } + } + + // Query the socket for the port that was assigned. + prStatus = PR_GetSockName (listenSocket, &addr); + if (prStatus != PR_SUCCESS) + { + server_error (_("Unable to obtain socket address")); + nssError (); + goto done; + } + port = PR_ntohs (addr.inet.port); + log (_F("Using network port %d", port)); + + // Listen for connection on the socket. The second argument is the maximum size of the queue + // for pending connections. + prStatus = PR_Listen (listenSocket, 5); + if (prStatus != PR_SUCCESS) + { + server_error (_("Error listening on socket")); + nssError (); + goto done; + } + + // Loop forever. We check our certificate (and regenerate, if necessary) and then start the + // server. The server will go down when our certificate is no longer valid (e.g. expired). We + // then generate a new one and start the server again. + for (;;) + { + // Ensure that our certificate is valid. Generate a new one if not. + if (check_cert (cert_db_path, server_cert_nickname (), use_db_password) != 0) + { + // Message already issued + goto done; + } + + // Ensure that our certificate is trusted by our local client. + // Construct the client database path relative to the server database path. + SECStatus secStatus = add_client_cert (server_cert_file (), + local_client_cert_db_path ()); + if (secStatus != SECSuccess) + { + server_error (_("Unable to authorize certificate for the local client")); + goto done; + } + + // Launch the server. + secStatus = server_main (listenSocket); + } // loop forever + + done: + if (PR_Close (listenSocket) != PR_SUCCESS) + { + server_error (_("Error closing listen socket")); + nssError (); + } +} + +int +main (int argc, char **argv) { + initialize (argc, argv); + listen (); + cleanup (); + return 0; +} + +/* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ diff -Nru systemtap-1.4/stap-sign-module.cxx systemtap-1.6/stap-sign-module.cxx --- systemtap-1.4/stap-sign-module.cxx 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/stap-sign-module.cxx 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,89 @@ +/* + This program signs the given file using the named certificate and private + key in the given certificate database and places the signature in the named + output file. + + Copyright (C) 2009-2011 Red Hat Inc. + + This file is part of systemtap, and is free software. You can + redistribute it and/or modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +#include "config.h" + +extern "C" { +#include +#include +} +#include + +#include "util.h" +#include "nsscommon.h" + +using namespace std; + +// Called by methods within nsscommon.cxx. +extern "C" +void +nsscommon_error (const char *msg, int logit __attribute ((unused))) +{ + clog << msg << endl << flush; +} + +int +main (int argc, char **argv) +{ + setlocale (LC_ALL, ""); + bindtextdomain (PACKAGE, LOCALEDIR); + textdomain (PACKAGE); + + if (argc < 2) { + nsscommon_error (_("Module name was not specified.")); + return 1; + } + string module_name = argv[1]; + + string cert_db_path; + if (argc >= 3) + cert_db_path = argv[2]; + else + cert_db_path = server_cert_db_path (); + + const char *nickName = server_cert_nickname (); + if (check_cert (cert_db_path, nickName) != 0) + return 1; + + /* Call the NSPR initialization routines. */ + PR_Init (PR_SYSTEM_THREAD, PR_PRIORITY_NORMAL, 1); + + /* Set the cert database password callback. */ + PK11_SetPasswordFunc (nssPasswordCallback); + + /* Initialize NSS. */ + SECStatus secStatus = nssInit (cert_db_path.c_str()); + if (secStatus != SECSuccess) + { + // Message already issued. + return 1; + } + + sign_file (cert_db_path, nickName, module_name, module_name + ".sgn"); + + /* Shutdown NSS and exit NSPR gracefully. */ + nssCleanup (cert_db_path.c_str ()); + PR_Cleanup (); + + return 0; +} + +/* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ diff -Nru systemtap-1.4/stap-start-server systemtap-1.6/stap-start-server --- systemtap-1.4/stap-start-server 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/stap-start-server 2011-07-25 18:12:01.000000000 +0000 @@ -2,7 +2,7 @@ # Start a systemtap server # -# Copyright (C) 2008, 2009 Red Hat Inc. +# Copyright (C) 2008-2011 Red Hat Inc. # # This file is part of systemtap, and is free software. You can # redistribute it and/or modify it under the terms of the GNU General @@ -18,7 +18,7 @@ startup_timeout=20 # start the server -${stap_pkglibexecdir}stap-serverd "$@" /dev/null & +${stap_pkglibexecdir}stap-serverd "$@" /dev/null 2>/dev/null & server_pid=$! # Make sure the server is started @@ -26,7 +26,6 @@ do server_started=0 avahi_advertising=0 - server_listening=0 # Has the server started? if ! (ps -e | grep stap-serverd | grep $server_pid) >/dev/null 2>&1; then @@ -38,19 +37,14 @@ server_started=1 # Is avahi advertizing the server? - if ! (ps -fe | grep avahi-publish-service | grep $server_pid) > /dev/null 2>&1; then + if ! (avahi-browse $stap_avahi_service_tag --terminate | \ + grep "Systemtap Compile Server" | grep $server_pid) \ + >/dev/null 2>&1; then sleep 1 continue fi avahi_advertising=1 - # Is the server listening? - if ! (ps -fe | grep stap-server-connect | grep $server_pid) > /dev/null 2>&1; then - sleep 1 - continue - fi - server_listening=1 - # The server is ready echo $server_pid exit 0 @@ -62,8 +56,6 @@ echo "${stap_pkglibexecdir}stap-serverd did not start" >&2 elif test $avahi_advertising = 0; then echo "avahi is not advertising the server" >&2 -elif test $server_listening = 0; then - echo "The server could not open a connection to listen on" >&2 fi # If the server partially started, then kill it. diff -Nru systemtap-1.4/staptree.cxx systemtap-1.6/staptree.cxx --- systemtap-1.4/staptree.cxx 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/staptree.cxx 2011-07-25 18:12:01.000000000 +0000 @@ -158,15 +158,15 @@ return; if (a == 0 && maxsize > 0) - throw semantic_error ("inconsistent arity", tok); + throw semantic_error (_("inconsistent arity"), tok); if (arity != a && arity >= 0) { - semantic_error err ("inconsistent arity (" + lex_cast(arity) + - " vs. " + lex_cast(a) + ")", t?:tok); + semantic_error err (_F("inconsistent arity (%s vs %d)", + lex_cast(arity).c_str(), a), t?:tok); if (arity_tok) - err.chain = new semantic_error ("arity " + lex_cast(arity) + - " first inferred here", arity_tok); + err.chain = new semantic_error (_F("arity %s first inferred here", + lex_cast(arity).c_str()), arity_tok); throw err; } @@ -200,10 +200,10 @@ functiondecl::join (systemtap_session& s) { if (!synthetic) - throw semantic_error ("internal error, joining a non-synthetic function", tok); + throw semantic_error (_("internal error, joining a non-synthetic function"), tok); if (!s.functions.insert (make_pair (name, this)).second) - throw semantic_error ("synthetic function '" + name + - "' conflicts with an existing function", tok); + throw semantic_error (_F("synthetic function '%s' conflicts with an existing function", + name.c_str()), tok); tok->location.file->functions.push_back (this); } @@ -248,23 +248,19 @@ { case comp_literal_array_index: case comp_expression_array_index: - throw semantic_error(tapset + " variable '" + name + - "' may not be used as array", - components[0].tok); + throw semantic_error(_F("%s variable '%s' may not be used as array", + tapset.c_str(), name.c_str()), components[0].tok); case comp_struct_member: - throw semantic_error(tapset + " variable '" + name + - "' may not be used as a structure", - components[0].tok); + throw semantic_error(_F("%s variable '%s' may not be used as a structure", + tapset.c_str(), name.c_str()), components[0].tok); case comp_pretty_print: if (!pretty_ok) - throw semantic_error(tapset + " variable '" + name + - "' may not be pretty-printed", - components[0].tok); + throw semantic_error(_F("%s variable '%s' may not be pretty-printed", + tapset.c_str(), name.c_str()), components[0].tok); return; default: - throw semantic_error ("invalid use of " + tapset + - " variable '" + name + "'", - components[0].tok); + throw semantic_error (_F("invalid use of %s variable '%s'", + tapset.c_str(), name.c_str()), components[0].tok); } } @@ -790,6 +786,17 @@ if (i == str.end()) break; + // Parse the type modifier + switch (*i) + { + case 'l': + ++i; + break; + } + + if (i == str.end()) + break; + // Parse the actual conversion specifier (bcsmdioupxXn) switch (*i) { @@ -844,7 +851,7 @@ } if (curr.type == conv_unspecified) - throw parse_error("invalid or missing conversion specifier"); + throw parse_error(_("invalid or missing conversion specifier")); ++i; res.push_back(curr); @@ -857,7 +864,7 @@ if (curr.type == conv_literal) res.push_back(curr); else - throw parse_error("trailing incomplete print format conversion"); + throw parse_error(_("trailing incomplete print format conversion")); } return res; @@ -1564,9 +1571,9 @@ array_out = NULL; hist_out = NULL; if (!(ix->is_symbol (array_out) || ix->is_hist_op (hist_out))) - throw semantic_error("Expecting symbol or histogram operator", ix->get_tok()); + throw semantic_error(_("Expecting symbol or histogram operator"), ix->get_tok()); if (ix && !(hist_out || array_out)) - throw semantic_error("Failed to classify indexable", ix->get_tok()); + throw semantic_error(_("Failed to classify indexable"), ix->get_tok()); } void @@ -1577,7 +1584,7 @@ array_out = NULL; hist_out = NULL; if (!(ix->is_const_symbol(array_out) || ix->is_const_hist_op(hist_out))) - throw semantic_error("Expecting symbol or histogram operator", ix->get_tok()); + throw semantic_error(_("Expecting symbol or histogram operator"), ix->get_tok()); } // ------------------------------------------------------------------------ @@ -1920,12 +1927,12 @@ if (session.unprivileged && s->code.find ("/* unprivileged */") == string::npos && s->code.find ("/* myproc-unprivileged */") == string::npos) - throw semantic_error ("function may not be used when --unprivileged is specified", + throw semantic_error (_("function may not be used when --unprivileged is specified"), current_function->tok); // Don't allow /* guru */ functions unless -g is active. if (!session.guru_mode && s->code.find ("/* guru */") != string::npos) - throw semantic_error ("function may not be used unless -g is specified", + throw semantic_error (_("function may not be used unless -g is specified"), current_function->tok); // We want to elide embedded-C functions when possible. For @@ -1954,12 +1961,12 @@ if (session.unprivileged && e->code.find ("/* unprivileged */") == string::npos && e->code.find ("/* myproc-unprivileged */") == string::npos) - throw semantic_error ("embedded expression may not be used when --unprivileged is specified", + throw semantic_error (_("embedded expression may not be used when --unprivileged is specified"), e->tok); // Don't allow /* guru */ functions unless -g is active. if (!session.guru_mode && e->code.find ("/* guru */") != string::npos) - throw semantic_error ("embedded expression may not be used unless -g is specified", + throw semantic_error (_("embedded expression may not be used unless -g is specified"), e->tok); // We want to elide embedded-C functions when possible. For @@ -2029,10 +2036,13 @@ // // But sprint and sprintf don't have side-effects. + bool last_lvalue_read = current_lvalue_read; + current_lvalue_read = true; if (e->print_to_stream) embedded_seen = true; // a proxy for "has unknown side-effects" functioncall_traversing_visitor::visit_print_format (e); + current_lvalue_read = last_lvalue_read; } @@ -2042,9 +2052,12 @@ if (e->op == "=" || e->op == "<<<") // pure writes { expression* last_lvalue = current_lvalue; + bool last_lvalue_read = current_lvalue_read; current_lvalue = e->left; // leave a mark for ::visit_symbol + current_lvalue_read = true; functioncall_traversing_visitor::visit_assignment (e); current_lvalue = last_lvalue; + current_lvalue_read = last_lvalue_read; } else // read-modify-writes { @@ -2059,7 +2072,7 @@ varuse_collecting_visitor::visit_symbol (symbol *e) { if (e->referent == 0) - throw semantic_error ("symbol without referent", e->tok); + throw semantic_error (_("symbol without referent"), e->tok); // We could handle initialized globals by marking them as "written". // However, this current visitor may be called for a function or @@ -2073,14 +2086,19 @@ if (current_lvalue == e || current_lrvalue == e) { written.insert (e->referent); - // clog << "write "; } if (current_lvalue != e || current_lrvalue == e) { read.insert (e->referent); - // clog << "read "; } - // clog << *e->tok << endl; + + if (current_lrvalue == e) + { + if (current_lvalue_read) + used.insert (e->referent); + } + else if (current_lvalue != e) + used.insert (e->referent); } // NB: stat_op need not be overridden, since it will get to @@ -2202,9 +2220,12 @@ // "delete" yet, so we pose more like a *crement ("lrvalue"). This // should protect the underlying value from optimizional mischief. expression* last_lrvalue = current_lrvalue; + bool last_lvalue_read = current_lvalue_read; current_lrvalue = s->value; // leave a mark for ::visit_symbol + current_lvalue_read = true; functioncall_traversing_visitor::visit_delete_statement (s); current_lrvalue = last_lrvalue; + current_lvalue_read = last_lvalue_read; } bool @@ -2240,7 +2261,7 @@ throwing_visitor::throwing_visitor (const std::string& m): msg (m) {} -throwing_visitor::throwing_visitor (): msg ("invalid element") {} +throwing_visitor::throwing_visitor (): msg (_("invalid element")) {} void diff -Nru systemtap-1.4/staptree.h systemtap-1.6/staptree.h --- systemtap-1.4/staptree.h 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/staptree.h 2011-07-25 18:12:01.000000000 +0000 @@ -1,5 +1,5 @@ // -*- C++ -*- -// Copyright (C) 2005-2010 Red Hat Inc. +// Copyright (C) 2005-2011 Red Hat Inc. // Copyright (C) 2006 Intel Corporation. // // This file is part of systemtap, and is free software. You can @@ -705,7 +705,7 @@ void print (std::ostream& o) const; virtual void printsig (std::ostream &o) const; virtual void collect_derivation_chain (std::vector &probes_list); - virtual void collect_derivation_pp_chain (std::vector &pp_list) {} + virtual void collect_derivation_pp_chain (std::vector &) {} virtual const probe_alias *get_alias () const { return 0; } virtual probe* create_alias(probe_point* l, probe_point* a); virtual const probe* basest () const { return this; } @@ -840,12 +840,15 @@ systemtap_session& session; std::set read; std::set written; + std::set used; bool embedded_seen; + bool current_lvalue_read; expression* current_lvalue; expression* current_lrvalue; varuse_collecting_visitor(systemtap_session& s): session (s), embedded_seen (false), + current_lvalue_read (false), current_lvalue(0), current_lrvalue(0) {} void visit_embeddedcode (embeddedcode *s); diff -Nru systemtap-1.4/stapvars.3stap systemtap-1.6/stapvars.3stap --- systemtap-1.4/stapvars.3stap 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/stapvars.3stap 2011-07-25 18:12:01.000000000 +0000 @@ -28,13 +28,13 @@ .BR $# value: the number of command line arguments passed to the systemtap script. -It is initialized with an implicit begin(-1) probe. +It is initialized with an implicit begin(\-1) probe. .TP argv:string [long] Contains each command line argument as a string. argv[1] will equal @1 if there was at least one command line argument. Arguments beyond #32 are not -transcribed, and produce a warning message within the begin(-1) probe that +transcribed, and produce a warning message within the begin(\-1) probe that initializes this array. .SS NULL diff -Nru systemtap-1.4/systemtap.spec systemtap-1.6/systemtap.spec --- systemtap-1.4/systemtap.spec 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/systemtap.spec 2011-07-25 18:12:01.000000000 +0000 @@ -3,7 +3,7 @@ %{!?with_crash: %global with_crash 1} %{!?with_rpm: %global with_rpm 1} %{!?with_bundled_elfutils: %global with_bundled_elfutils 0} -%{!?elfutils_version: %global elfutils_version 0.127} +%{!?elfutils_version: %global elfutils_version 0.142} %{!?pie_supported: %global pie_supported 1} %{!?with_grapher: %global with_grapher 1} %{!?with_boost: %global with_boost 0} @@ -11,7 +11,7 @@ %{!?publican_brand: %global publican_brand fedora} Name: systemtap -Version: 1.4 +Version: 1.6 Release: 1%{?dist} # for version, see also configure.ac Summary: Instrumentation System @@ -20,9 +20,12 @@ URL: http://sourceware.org/systemtap/ Source: ftp://sourceware.org/pub/%{name}/releases/%{name}-%{version}.tar.gz +Obsoletes: systemtap-client < 1.5 + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: kernel >= 2.6.9-11 +BuildRequires: gettext %if %{with_sqlite} BuildRequires: sqlite-devel %endif @@ -42,7 +45,11 @@ Requires: gcc make # Suggest: kernel-debuginfo Requires: systemtap-runtime = %{version}-%{release} -BuildRequires: nss-tools nss-devel avahi-devel pkgconfig +BuildRequires: nss-devel avahi-devel pkgconfig + +# Additional requires for things spawned by stap +Requires: coreutils grep sed unzip zip +Requires: openssh-clients %if %{with_bundled_elfutils} Source1: elfutils-%{elfutils_version}.tar.gz @@ -74,9 +81,10 @@ BuildRequires: boost-devel %endif %endif +BuildRequires: gettext-devel %description -SystemTap is an instrumentation system for systems running Linux 2.6. +SystemTap is an instrumentation system for systems running Linux. Developers can write instrumentation to collect data on the operation of the system. @@ -90,7 +98,7 @@ %description runtime SystemTap runtime is the runtime component of an instrumentation -system for systems running Linux 2.6. Developers can write +system for systems running Linux. Developers can write instrumentation to collect data on the operation of the system. %package testsuite @@ -98,34 +106,21 @@ Group: Development/System License: GPLv2+ URL: http://sourceware.org/systemtap/ -Requires: systemtap systemtap-sdt-devel dejagnu which prelink +Requires: systemtap = %{version}-%{release} +Requires: systemtap-sdt-devel = %{version}-%{release} +Requires: dejagnu which prelink %description testsuite The testsuite allows testing of the entire SystemTap toolchain without having to rebuild from sources. -%package client -Summary: Instrumentation System Client -Group: Development/System -License: GPLv2+ -URL: http://sourceware.org/systemtap/ -Requires: systemtap-runtime = %{version}-%{release} -Requires: avahi avahi-tools nss nss-tools mktemp -Requires: zip unzip - -%description client -This is the remote script compilation client component of systemtap. -It relies on a nearby compilation server to translate systemtap -scripts to kernel objects, so a client workstation only needs the -runtime, and not the compiler/etc toolchain. - %package server Summary: Instrumentation System Server Group: Development/System License: GPLv2+ URL: http://sourceware.org/systemtap/ -Requires: systemtap -Requires: avahi avahi-tools nss nss-tools mktemp +Requires: systemtap = %{version}-%{release} +Requires: avahi avahi-tools nss mktemp Requires: zip unzip Requires(post): chkconfig Requires(preun): chkconfig @@ -140,7 +135,7 @@ %package sdt-devel Summary: Static probe support tools Group: Development/System -License: GPLv2+, Public Domain +License: GPLv2+ and Public Domain URL: http://sourceware.org/systemtap/ %description sdt-devel @@ -151,7 +146,7 @@ Group: Development/System License: GPLv2+ URL: http://sourceware.org/systemtap/ -Requires: systemtap-runtime +Requires: systemtap-runtime = %{version}-%{release} Requires(post): chkconfig Requires(preun): chkconfig Requires(preun): initscripts @@ -166,7 +161,7 @@ Group: Development/System License: GPLv2+ URL: http://sourceware.org/systemtap/ -Requires: systemtap-runtime +Requires: systemtap-runtime = %{version}-%{release} %description grapher SystemTap grapher is a utility for real-time visualization of @@ -256,6 +251,7 @@ %install rm -rf ${RPM_BUILD_ROOT} make DESTDIR=$RPM_BUILD_ROOT install +%find_lang %{name} # We want the examples in the special doc dir, not the build install dir. # We build it in place and then move it away so it doesn't get installed @@ -266,6 +262,9 @@ # Fix paths in the example & testsuite scripts find examples testsuite -type f -name '*.stp' -print0 | xargs -0 sed -i -r -e '1s@^#!.+stap@#!%{_bindir}/stap@' +# To make rpmlint happy, remove any .gitignore files in the testsuite. +find testsuite -type f -name '.gitignore' -print0 | xargs -0 rm -f + # Because "make install" may install staprun with whatever mode, the # post-processing programs rpmbuild runs won't be able to read it. # So, we change permissions so that they can read it. We'll set the @@ -396,10 +395,10 @@ (make -C %{_datadir}/%{name}/runtime/uprobes clean) >/dev/null 2>&1 || true (/sbin/rmmod uprobes) >/dev/null 2>&1 || true -%files +%files -f %{name}.lang %defattr(-,root,root) -%doc README AUTHORS NEWS COPYING examples +%doc README README.unprivileged AUTHORS NEWS COPYING examples %if %{with_docs} %doc docs.installed/*.pdf %doc docs.installed/tapsets @@ -411,7 +410,8 @@ %{_bindir}/stap %{_bindir}/stap-prep %{_bindir}/stap-report -%{_mandir}/man1/* +%{_mandir}/man1/stap.1* +%{_mandir}/man1/stap-merge.1* %{_mandir}/man3/* %{_mandir}/man7/stappaths.7* @@ -426,12 +426,12 @@ # Make sure that the uprobes module can be built by root and by the server %dir %attr(0775,root,stap-server) %{_datadir}/%{name}/runtime/uprobes -%files runtime +%files runtime -f %{name}.lang %defattr(-,root,root) %attr(4110,root,stapusr) %{_bindir}/staprun +%{_bindir}/stapsh %{_bindir}/stap-merge %{_bindir}/stap-report -%{_bindir}/stap-authorize-signing-cert %{_libexecdir}/%{name}/stapio %{_libexecdir}/%{name}/stap-env %{_libexecdir}/%{name}/stap-authorize-cert @@ -440,46 +440,30 @@ %endif %{_mandir}/man7/stappaths.7* %{_mandir}/man8/staprun.8* -%{_mandir}/man8/stap-authorize-signing-cert.8* -%doc README AUTHORS NEWS COPYING +%doc README README.security AUTHORS NEWS COPYING %files testsuite %defattr(-,root,root) %{_datadir}/%{name}/testsuite -%files client +%files server -f %{name}.lang %defattr(-,root,root) -%{_bindir}/stap-client -%{_bindir}/stap-authorize-server-cert -%{_libexecdir}/%{name}/stap-find-servers -%{_libexecdir}/%{name}/stap-client-connect -%{_mandir}/man7/stappaths.7* -%{_mandir}/man8/stap-client.8* -%{_mandir}/man8/stap-authorize-server-cert.8* - -%files server -%defattr(-,root,root) -%{_bindir}/stap-authorize-server-cert %{_bindir}/stap-server %{_libexecdir}/%{name}/stap-serverd %{_libexecdir}/%{name}/stap-start-server -%{_libexecdir}/%{name}/stap-find-servers -%{_libexecdir}/%{name}/stap-find-or-start-server %{_libexecdir}/%{name}/stap-stop-server %{_libexecdir}/%{name}/stap-gen-cert -%{_libexecdir}/%{name}/stap-server-connect %{_libexecdir}/%{name}/stap-sign-module %{_mandir}/man7/stappaths.7* %{_mandir}/man8/stap-server.8* -%{_mandir}/man8/stap-authorize-server-cert.8* %{_sysconfdir}/rc.d/init.d/stap-server %config(noreplace) %{_sysconfdir}/logrotate.d/stap-server %dir %{_sysconfdir}/stap-server %dir %{_sysconfdir}/stap-server/conf.d %config(noreplace) %{_sysconfdir}/sysconfig/stap-server %dir %attr(0755,stap-server,stap-server) %{_localstatedir}/log/stap-server -%ghost %config %attr(0644,stap-server,stap-server) %{_localstatedir}/log/stap-server/log +%ghost %config(noreplace) %attr(0644,stap-server,stap-server) %{_localstatedir}/log/stap-server/log %ghost %attr(0755,stap-server,stap-server) %{_localstatedir}/run/stap-server %doc initscript/README.stap-server @@ -488,6 +472,7 @@ %{_bindir}/dtrace %{_includedir}/sys/sdt.h %{_includedir}/sys/sdt-config.h +%{_mandir}/man1/dtrace.1* %doc README AUTHORS NEWS COPYING %files initscript @@ -506,10 +491,14 @@ %defattr(-,root,root) %{_bindir}/stapgraph %{_datadir}/%{name}/*.glade +%{_mandir}/man1/stapgraph.1* %endif %changelog +* Mon Jan 17 2011 Frank Ch. Eigler - 1.4-1 +- Upstream release. + * Wed Jul 21 2010 Josh Stone - 1.3-1 - Upstream release. diff -Nru systemtap-1.4/tapset/arm/aux_syscalls.stp systemtap-1.6/tapset/arm/aux_syscalls.stp --- systemtap-1.4/tapset/arm/aux_syscalls.stp 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/tapset/arm/aux_syscalls.stp 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,40 @@ +# arch-specific requests of ptrace ___________________________ +# +function _arch_ptrace_argstr(request, pid, addr, data) +{ + if (request == %{ PTRACE_GETREGS %}) + // TODO: Retrieve *data in .return + return sprintf ("PTRACE_GETREGS, %d, data=%p", pid, data) + if (request == %{ PTRACE_SETREGS %}) + // TODO: Retrieve *data here + return sprintf ("PTRACE_SETREGS, %d, data=%p", pid, data) + if (request == %{ PTRACE_GETFPREGS %}) + // TODO: Retrieve *data in .return + return sprintf ("PTRACE_GETFPREGS, %d, data=%p", pid, data) + if (request == %{ PTRACE_SETFPREGS %}) + // TODO: Retrieve *data here + return sprintf ("PTRACE_SETFPREGS, %d, data=%p", pid, data) + if (request == %{ PTRACE_GETWMMXREGS %}) + // TODO: Retrieve *data in .return + return sprintf ("PTRACE_GETWMMXREGS, %d, data=%p", pid, data) + if (request == %{ PTRACE_SETWMMXREGS %}) + // TODO: Retrieve *data here + return sprintf ("PTRACE_SETWMMXREGS, %d, data=%p", pid, data) + if (request == %{ PTRACE_OLDSETOPTIONS %}) + return sprintf ("PTRACE_OLDSETOPTIONS, %d, %s", pid, _ptrace_options_str (data)) + if (request == %{ PTRACE_GET_THREAD_AREA %}) + // TODO: Retrieve *data in .return + return sprintf ("PTRACE_GET_THREAD_AREA, %d, index=%d, data=%p", pid, addr, data) + if (request == %{ PTRACE_SET_SYSCALL %}) + // TODO: Retrieve *data here + return sprintf ("PTRACE_SET_SYSCALL, %d, index=%p, data=%p", pid, addr, data) + if (request == %{ PTRACE_GETCRUNCHREGS %}) + return sprintf ("PTRACE_GETCRUNCHREGS, %d, %s", pid, _signal_name (data)) + if (request == %{ PTRACE_SETCRUNCHREGS %}) + return sprintf ("PTRACE_SETCRUNCHREGS, %d, %s", pid, _signal_name (data)) +} + +function _ptrace_return_arch_prctl_addr:long(request:long, addr:long, data:long) +{ + return 0 +} diff -Nru systemtap-1.4/tapset/arm/registers.stp systemtap-1.6/tapset/arm/registers.stp --- systemtap-1.4/tapset/arm/registers.stp 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/tapset/arm/registers.stp 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,158 @@ +/* Dwarfless register access for arm */ + +global _reg_offsets, _stp_regs_registered + +function _stp_register_regs() { + + /* Same order as pt_regs */ + _reg_offsets["r0"] = 0 _reg_offsets["a1"] = 0 + _reg_offsets["r1"] = 4 _reg_offsets["a2"] = 4 + _reg_offsets["r2"] = 8 _reg_offsets["a3"] = 8 + _reg_offsets["r3"] = 12 _reg_offsets["a4"] = 12 + _reg_offsets["r4"] = 16 _reg_offsets["v1"] = 16 + _reg_offsets["r5"] = 20 _reg_offsets["v2"] = 20 + _reg_offsets["r6"] = 24 _reg_offsets["v3"] = 24 + _reg_offsets["r7"] = 28 _reg_offsets["v4"] = 28 + _reg_offsets["r8"] = 32 _reg_offsets["v5"] = 32 + _reg_offsets["r9"] = 36 _reg_offsets["v6"] = 36 + _reg_offsets["r10"] = 40 _reg_offsets["v7"] = 40 + _reg_offsets["fp"] = 44 _reg_offsets["v8"] = 44 + _reg_offsets["ip"] = 48 + _reg_offsets["sp"] = 52 + _reg_offsets["lr"] = 56 + _reg_offsets["pc"] = 60 + _reg_offsets["cpsr"] = 64 + _reg_offsets["orig_r0"] = 68 + + _stp_regs_registered = 1 +} + +function _stp_get_register_by_offset:long (offset:long) %{ /* pure */ + long value; + if (!CONTEXT->regs) { + CONTEXT->last_error = "No registers available in this context"; + return; + } + if (THIS->offset < 0 || THIS->offset > sizeof(struct pt_regs) - sizeof(long)) { + snprintf(CONTEXT->error_buffer, sizeof(CONTEXT->error_buffer), + "Bad register offset: %lld", THIS->offset); + CONTEXT->last_error = CONTEXT->error_buffer; + return; + } + memcpy(&value, ((char *)CONTEXT->regs) + THIS->offset, sizeof(value)); + THIS->__retvalue = value; +%} + +function _stp_probing_kernel:long () %{ /* pure */ + THIS->__retvalue = !user_mode(CONTEXT->regs); +%} + +/* Return the named register value as a signed value. */ +function register:long (name:string) { + if (!registers_valid()) { + error("cannot access CPU registers in this context") + return 0 + } + if (!_stp_regs_registered) + _stp_register_regs() + offset = _reg_offsets[name] + if (offset == 0 && !(name in _reg_offsets)) { + error("Unknown register: " . name) + return 0 + } + return _stp_get_register_by_offset(offset) +} + +/* + * Return the named register value as an unsigned value. Specifically, + * don't sign-extend the register value when promoting it to 64 bits. + */ +function u_register:long (name:string) { + return register(name) & 0xffffffff; +} + +/* Return the value of function arg #argnum (1=first arg) as a signed value. + * + * We don't yet support extracting arg #5 and beyond, which are passed + * on stack + */ +function _stp_arg:long (argnum:long) { + val = 0 + if (argnum < 1 || argnum > 4) { + error(sprintf("Cannot access arg(%d)", argnum)) + return 0 + } + + if (argnum == 1) + val = u_register("r0") + else if (argnum == 2) + val = u_register("r1") + else if (argnum == 3) + val = u_register("r2") + else if (argnum == 4) + val = u_register("r3") + + return val; +} + +/* Return the value of function arg #argnum as a signed int. */ +function int_arg:long (argnum:long) { + return _stp_arg(argnum) +} + +/* Return the value of function arg #argnum as an unsigned int. */ +function uint_arg:long (argnum:long) { + return _stp_arg(argnum) & 0xffffffff; +} + +function long_arg:long (argnum:long) { + return int_arg(argnum) +} + +function ulong_arg:long (argnum:long) { + return uint_arg(argnum) +} + +function longlong_arg:long (argnum:long) { + /* + * TODO: If argnum == nr_regarg, gcc puts the whole 64-bit arg + * on the stack. + */ + lowbits = uint_arg(argnum) + highbits = uint_arg(argnum+1) + return ((highbits << 32) | lowbits) +} + +function ulonglong_arg:long (argnum:long) { + return longlong_arg(argnum) +} + +function pointer_arg:long (argnum:long) { + return ulong_arg(argnum) +} + +function s32_arg:long (argnum:long) { + return int_arg(argnum) +} + +function u32_arg:long (argnum:long) { + return uint_arg(argnum) +} + +function s64_arg:long (argnum:long) { + return longlong_arg(argnum) +} + +function u64_arg:long (argnum:long) { + return ulonglong_arg(argnum) +} + +function asmlinkage() %{ /* pure */ %} + +function fastcall() %{ /* pure */ %} + +function regparm() %{ + snprintf(CONTEXT->error_buffer, sizeof(CONTEXT->error_buffer), + "regparm is invalid on arm."); + CONTEXT->last_error = CONTEXT->error_buffer; +%} diff -Nru systemtap-1.4/tapset/aux_syscalls.stp systemtap-1.6/tapset/aux_syscalls.stp --- systemtap-1.4/tapset/aux_syscalls.stp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/tapset/aux_syscalls.stp 2011-07-25 18:12:01.000000000 +0000 @@ -732,22 +732,141 @@ return substr(bs,0,strlen(bs)-1) } +function _internal_wait_opt_str(f,bit_num,bit_str) { + retval="" + if (f & %{ WNOHANG %}) + { + f&=%{ ~WNOHANG %} + retval=retval."|WNOHANG" + } + if (f & bit_num) + { + f&=~bit_num + retval=retval."|".bit_str + } + if (f & %{ WEXITED %}) + { + f&=%{ ~WEXITED %} + retval=retval."|WEXITED" + } + if (f & %{ WCONTINUED %}) + { + f&=%{ ~WCONTINUED %} + retval=retval."|WCONTINUED" + } + if (f & %{ WNOWAIT %}) + { + f&=%{ ~WNOWAIT %} + retval=retval."|WNOWAIT" + } + if (f & %{ __WNOTHREAD %}) + { + f&=%{ ~__WNOTHREAD %} + retval=retval."|__WNOTHREAD" + } + if (f & %{ __WALL %}) + { + f&=%{ ~__WALL %} + retval=retval."|__WALL" + } + if (f & %{ __WCLONE %}) + { + f&=%{ ~__WCLONE %} + retval=retval."|__WCLONE" + } + if (f != 0) + retval=retval.sprintf ("|0x%x", f) + else if (retval == "") + return "0" + return substr(retval,1,strlen(retval)-1) +} + /* `man wait4` for more information */ function _wait4_opt_str(f) { - if(f & 8) bs="WCONTINUED|".bs - if(f & 2) bs="WUNTRACED|".bs - if(f & 1) bs="WNOHANG|".bs - return substr(bs,0,strlen(bs)-1) + return _internal_wait_opt_str(f,%{ WUNTRACED %},"WUNTRACED") } /* `man waitid` for more information */ function _waitid_opt_str(f) { - if(f & 0x01000000) bs="WNOWAIT|".bs - if(f & 8) bs="WCONTINUED|".bs - if(f & 4) bs="WEXITED|".bs - if(f & 2) bs="WSTOPPED|".bs - if(f & 1) bs="WNOHANG|".bs - return substr(bs,0,strlen(bs)-1) + return _internal_wait_opt_str(f,%{ WSTOPPED %},"WSTOPPED") +} + +function WIFEXITED(f) { + return (f & 0x7f) == 0 +} + +function WEXITSTATUS(f) { + return (f & 0xff00) >> 8 +} + +function WIFSIGNALED(f) { + return (f & 0x7f) != 0 && (f & 0x7f) != 0x7f +} + +function WCOREDUMP(f) { + return f & 0x80 +} + +function WTERMSIG(f) { + return f & 0x7f +} + +function WIFSTOPPED(f) { + return (f & 0xff) == 0x7f +} + +function WSTOPSIG(f) { + return (f & 0xff00) >> 8 +} + +function WIFCONTINUED(f) { + return f == 0xffff +} + +function _ptrace_event_name(f) +{ + if (f == %{ PTRACE_EVENT_FORK %}) + return "PTRACE_EVENT_FORK" + if (f == %{ PTRACE_EVENT_VFORK %}) + return "PTRACE_EVENT_VFORK" + if (f == %{ PTRACE_EVENT_CLONE %}) + return "PTRACE_EVENT_CLONE" + if (f == %{ PTRACE_EVENT_EXEC %}) + return "PTRACE_EVENT_EXEC" + if (f == %{ PTRACE_EVENT_VFORK_DONE %}) + return "PTRACE_EVENT_VFORK_DONE" + if (f == %{ PTRACE_EVENT_EXIT %}) + return "PTRACE_EVENT_EXIT" + return "" +} + +/* `man 2 wait` for more information */ +function _wait_status_str(f) { + if ((f >> 16) != 0) + tail = sprintf (" | 0x%x", f & ~0xffff) + else + tail = "" + + if (WIFEXITED(f)) + return sprintf ("WEXITSTATUS=%d", WEXITSTATUS(f)).tail + if (WIFSIGNALED(f)) { + if (WCOREDUMP(f)) + return "WCOREDUMP".tail + return sprintf ("WTERMSIG=%s", _signal_name(WTERMSIG(f))).tail + } + if (WIFSTOPPED(f)) + { + if (WSTOPSIG(f) == %{ SIGTRAP %}) + { + event = _ptrace_event_name (f >> 16) + if (event != "") + tail = " | ".event." << 8" + } + return sprintf ("WSTOPSIG=%s", _signal_name(WSTOPSIG(f))).tail + } + if (WIFCONTINUED(f)) + return "WIFCONTINUED".tail + return sprintf ("?=0x%x", f) } /* `man sendmsg` for more information */ @@ -1616,7 +1735,9 @@ V(CLONE_DETACHED), V(CLONE_UNTRACED), V(CLONE_CHILD_SETTID), +#ifdef CLONE_STOPPED V(CLONE_STOPPED), +#endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19) V(CLONE_NEWUTS), V(CLONE_NEWIPC), @@ -2059,3 +2180,108 @@ %{ /* pure */ _stp_lookup_or_str(_stp_irq_list, THIS->f, THIS->__retvalue, MAXSTRINGLEN); %} + +/* PTRACE_SETOPTIONS parser of the DATA parameter. */ +function _ptrace_options_str(f) +{ + retval="" + if (f & %{ PTRACE_O_TRACESYSGOOD %}) { + f&=%{ ~PTRACE_O_TRACESYSGOOD %} + retval=retval."|PTRACE_O_TRACESYSGOOD" + } + if (f & %{ PTRACE_O_TRACEFORK %}) { + f&=%{ ~PTRACE_O_TRACEFORK %} + retval=retval."|PTRACE_O_TRACEFORK" + } + if (f & %{ PTRACE_O_TRACEVFORK %}) { + f&=%{ ~PTRACE_O_TRACEVFORK %} + retval=retval."|PTRACE_O_TRACEVFORK" + } + if (f & %{ PTRACE_O_TRACECLONE %}) { + f&=%{ ~PTRACE_O_TRACECLONE %} + retval=retval."|PTRACE_O_TRACECLONE" + } + if (f & %{ PTRACE_O_TRACEEXEC %}) { + f&=%{ ~PTRACE_O_TRACEEXEC %} + retval=retval."|PTRACE_O_TRACEEXEC" + } + if (f & %{ PTRACE_O_TRACEVFORKDONE %}) { + f&=%{ ~PTRACE_O_TRACEVFORKDONE %} + retval=retval."|PTRACE_O_TRACEVFORKDONE" + } + if (f & %{ PTRACE_O_TRACEEXIT %}) { + f&=%{ ~PTRACE_O_TRACEEXIT %} + retval=retval."|PTRACE_O_TRACEEXIT" + } + if (f != 0) + retval=retval.sprintf("|0x%x",f) + else if (retval == "") + return "0" + return substr(retval,1,strlen(retval)-1) +} + +/* ptrace syscall provisioning of argstr. */ +%{ +#ifndef PTRACE_GETREGSET +# define PTRACE_GETREGSET 0x4204 +#endif +#ifndef PTRACE_SETREGSET +# define PTRACE_SETREGSET 0x4205 +#endif +%} +function _ptrace_argstr(request, pid, addr, data) +{ + retval=_arch_ptrace_argstr(request, pid, addr, data) + if (retval != "") + return retval + if (request == %{ PTRACE_TRACEME %}) + return "PTRACE_TRACEME" + if (request == %{ PTRACE_PEEKTEXT %}) + return sprintf ("PTRACE_PEEKTEXT, %d, addr=%p", pid, addr) + if (request == %{ PTRACE_PEEKDATA %}) + return sprintf ("PTRACE_PEEKDATA, %d, addr=%p", pid, addr) + if (request == %{ PTRACE_PEEKUSR %}) + return sprintf ("PTRACE_PEEKUSR, %d, addr=%p", pid, addr) + if (request == %{ PTRACE_POKETEXT %}) + return sprintf ("PTRACE_POKETEXT, %d, addr=%p, data=%p", pid, addr, data) + if (request == %{ PTRACE_POKEDATA %}) + return sprintf ("PTRACE_POKEDATA, %d, addr=%p, data=%p", pid, addr, data) + if (request == %{ PTRACE_POKEUSR %}) + return sprintf ("PTRACE_POKEUSR, %d, addr=%p, data=%p", pid, addr, data) + if (request == %{ PTRACE_CONT %}) + return sprintf ("PTRACE_CONT, %d, %s", pid, _signal_name (data)) + if (request == %{ PTRACE_KILL %}) + return sprintf ("PTRACE_KILL, %d", pid) + if (request == %{ PTRACE_SINGLESTEP %}) + return sprintf ("PTRACE_SINGLESTEP, %d, %s", pid, _signal_name (data)) + if (request == %{ PTRACE_ATTACH %}) + return sprintf ("PTRACE_ATTACH, %d", pid) + if (request == %{ PTRACE_DETACH %}) + return sprintf ("PTRACE_DETACH, %d, %s", pid, _signal_name (data)) + if (request == %{ PTRACE_SYSCALL %}) + return sprintf ("PTRACE_SYSCALL, %d, %s", pid, _signal_name (data)) + if (request == %{ PTRACE_SETOPTIONS %}) + return sprintf ("PTRACE_SETOPTIONS, %d, %s", pid, _ptrace_options_str (data)) + if (request == %{ PTRACE_GETEVENTMSG %}) + return sprintf ("PTRACE_GETEVENTMSG, %d, data=%p", pid, data) + if (request == %{ PTRACE_GETSIGINFO %}) + // TODO: Retrieve *data in .return + return sprintf ("PTRACE_GETSIGINFO, %d, data=%p", pid, data) + if (request == %{ PTRACE_SETSIGINFO %}) + // TODO: Retrieve *data here + return sprintf ("PTRACE_SETSIGINFO, %d, data=%p", pid, data) + if (request == %{ PTRACE_GETREGSET %}) + // TODO + return sprintf ("PTRACE_GETREGSET, %d, addr=%p, data=%p", pid, addr, data) + if (request == %{ PTRACE_SETREGSET %}) + // TODO + return sprintf ("PTRACE_SETREGSET, %d, addr=%p, data=%p", pid, addr, data) + return sprintf("?=%d, %d, %p, %p", request, pid, addr, data) +} + +/* ptrace.return syscall decoder for PTRACE_GETEVENTMSG. */ +function _ptrace_return_geteventmsg_data(request,data) +{ + if (request == %{ PTRACE_GETEVENTMSG %}) + return user_long(data) +} diff -Nru systemtap-1.4/tapset/context.stp systemtap-1.6/tapset/context.stp --- systemtap-1.4/tapset/context.stp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/tapset/context.stp 2011-07-25 18:12:01.000000000 +0000 @@ -37,7 +37,7 @@ /** * sfunction pid - Returns the ID of a target process * - * Description: This function returns the ID of a targer process. + * Description: This function returns the ID of a target process. */ function pid:long () %{ /* pure */ /* unprivileged */ @@ -187,12 +187,13 @@ %} -/* +%( systemtap_v <= "1.4" %? +/** * sfunction cpuid - Returns the current cpu number * * Description: This function returns the current cpu number. + * Deprecated in SystemTap 1.4 and removed in SystemTap 1.5. */ -%( systemtap_v <= "1.4" %? function cpuid:long () %{ /* pure */ THIS->__retvalue = smp_processor_id(); @@ -272,6 +273,7 @@ * * -x * target() returns the pid specified by -x + * * -c * target() returns the pid for the executed command specified by -c */ @@ -340,6 +342,19 @@ %} /** + * sfunction addr - Address of the current probe point. + * + * Description: Returns the instruction pointer from the current probe's + * register state. Not all probe types have registers though, in which case + * zero is returned. The returned address is suitable for use with functions + * like symname() and symdata(). + */ +function addr:long () +%{ /* pure */ + THIS->__retvalue = (intptr_t)(CONTEXT->regs ? REG_IP(CONTEXT->regs) : 0); +%} + +/** * sfunction uaddr - User space address of current running task (EXPERIMENTAL) * * Description: Returns the address in userspace that the current @@ -388,12 +403,17 @@ nr = 0; len = arg_end - arg_start; arg = user_string2(arg_start, ""); - while (arg != "" && len > 0) + while (len > 0) { if (nr == n) args = arg; else if (nr > n) - args .= delim . arg; + { + if (arg == "") + args .= delim . "\"\"" + else + args .= delim . arg; + } arg_len = strlen(arg); arg_start += arg_len + 1; diff -Nru systemtap-1.4/tapset/context-unwind.stp systemtap-1.6/tapset/context-unwind.stp --- systemtap-1.4/tapset/context-unwind.stp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/tapset/context-unwind.stp 2011-07-25 18:12:01.000000000 +0000 @@ -79,6 +79,7 @@ strlcpy (THIS->__retvalue, "", MAXSTRINGLEN); %} +%( systemtap_v <= "1.6" %? /** * sfunction task_backtrace - Hex backtrace of an arbitrary task * @task: pointer to task_struct @@ -86,12 +87,14 @@ * Description: This function returns a string of hex addresses * that are a backtrace of the stack of a particular task * Output may be truncated as per maximum string length. + * Deprecated in SystemTap 1.6. */ function task_backtrace:string (task:long) %{ /* pure */ _stp_stack_snprint_tsk(THIS->__retvalue, MAXSTRINGLEN, (struct task_struct *)(unsigned long)THIS->task, _STP_SYM_NONE, MAXTRACE); %} +%) /** * sfunction caller - Return name and address of calling function diff -Nru systemtap-1.4/tapset/DEVGUIDE systemtap-1.6/tapset/DEVGUIDE --- systemtap-1.4/tapset/DEVGUIDE 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/tapset/DEVGUIDE 2011-07-25 18:12:01.000000000 +0000 @@ -272,13 +272,13 @@ ------------------- All new tapsets and major changes should be reviewed "early and often" by the SystemTap community. You can sign up for the systemtap mailing -list at http://sources.redhat.com/systemtap/getinvolved.html. The -mailing list archive is found at http://sources.redhat.com/ml/systemtap/. +list at http://sourceware.org/systemtap/getinvolved.html. The +mailing list archive is found at http://sourceware.org/ml/systemtap/. The systemtap-cvs mailing list archive is at -http://sources.redhat.com/ml/systemtap-cvs/. +http://sourceware.org/ml/systemtap-cvs/. You can request GIT write access at -http://sources.redhat.com/cgi-bin/pdw/ps_form.cgi. +http://sourceware.org/cgi-bin/pdw/ps_form.cgi. REFERENCE MATERIAL @@ -297,7 +297,7 @@ (http://sourceware.org/systemtap/getinvolved.html) - GIT repository - (http://sources.redhat.com/git/?p=systemtap.git;a=summary) + (http://sourceware.org/git/?p=systemtap.git;a=summary) - HACKING file in the source directory. This file outlines what's expected of project contributors. diff -Nru systemtap-1.4/tapset/i386/aux_syscalls.stp systemtap-1.6/tapset/i386/aux_syscalls.stp --- systemtap-1.4/tapset/i386/aux_syscalls.stp 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/tapset/i386/aux_syscalls.stp 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,54 @@ +# arch-specific requests of ptrace ___________________________ +# = like tapset/x86_64/syscalls.stp but without PTRACE_ARCH_PRCTL +# +%{ +#ifndef PTRACE_SYSEMU +# define PTRACE_SYSEMU 31 +#endif +#ifndef PTRACE_SYSEMU_SINGLESTEP +# define PTRACE_SYSEMU_SINGLESTEP 32 +#endif +#ifndef PTRACE_SINGLEBLOCK +# define PTRACE_SINGLEBLOCK 33 +#endif +%} +function _arch_ptrace_argstr(request, pid, addr, data) +{ + if (request == %{ PTRACE_GETREGS %}) + // TODO: Retrieve *data in .return + return sprintf ("PTRACE_GETREGS, %d, data=%p", pid, data) + if (request == %{ PTRACE_SETREGS %}) + // TODO: Retrieve *data here + return sprintf ("PTRACE_SETREGS, %d, data=%p", pid, data) + if (request == %{ PTRACE_GETFPREGS %}) + // TODO: Retrieve *data in .return + return sprintf ("PTRACE_GETFPREGS, %d, data=%p", pid, data) + if (request == %{ PTRACE_SETFPREGS %}) + // TODO: Retrieve *data here + return sprintf ("PTRACE_SETFPREGS, %d, data=%p", pid, data) + if (request == %{ PTRACE_GETFPXREGS %}) + // TODO: Retrieve *data in .return + return sprintf ("PTRACE_GETFPXREGS, %d, data=%p", pid, data) + if (request == %{ PTRACE_SETFPXREGS %}) + // TODO: Retrieve *data here + return sprintf ("PTRACE_SETFPXREGS, %d, data=%p", pid, data) + if (request == %{ PTRACE_OLDSETOPTIONS %}) + return sprintf ("PTRACE_OLDSETOPTIONS, %d, %s", pid, _ptrace_options_str (data)) + if (request == %{ PTRACE_GET_THREAD_AREA %}) + // TODO: Retrieve *data in .return + return sprintf ("PTRACE_GET_THREAD_AREA, %d, index=%d, data=%p", pid, addr, data) + if (request == %{ PTRACE_SET_THREAD_AREA %}) + // TODO: Retrieve *data here + return sprintf ("PTRACE_SET_THREAD_AREA, %d, index=%p, data=%p", pid, addr, data) + if (request == %{ PTRACE_SYSEMU %}) + return sprintf ("PTRACE_SYSEMU, %d, %s", pid, _signal_name (data)) + if (request == %{ PTRACE_SYSEMU_SINGLESTEP %}) + return sprintf ("PTRACE_SYSEMU_SINGLESTEP, %d, %s", pid, _signal_name (data)) + if (request == %{ PTRACE_SINGLEBLOCK %}) + return sprintf ("PTRACE_SINGLEBLOCK, %d, %s", pid, _signal_name (data)) +} + +function _ptrace_return_arch_prctl_addr:long(request:long, addr:long, data:long) +{ + return 0 +} diff -Nru systemtap-1.4/tapset/ia64/aux_syscalls.stp systemtap-1.6/tapset/ia64/aux_syscalls.stp --- systemtap-1.4/tapset/ia64/aux_syscalls.stp 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/tapset/ia64/aux_syscalls.stp 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,26 @@ +# arch-specific requests of ptrace ___________________________ +# +function _arch_ptrace_argstr(request, pid, addr, data) +{ + if (request == %{ PTRACE_SINGLEBLOCK %}) + return sprintf ("PTRACE_SINGLEBLOCK, %d, %s", pid, _signal_name (data)) + if (request == %{ PTRACE_OLD_GETSIGINFO %}) + // TODO: Retrieve *data in .return + return sprintf ("PTRACE_OLD_GETSIGINFO, %d, data=%p", pid, data) + if (request == %{ PTRACE_OLD_SETSIGINFO %}) + // TODO: Retrieve *data here + return sprintf ("PTRACE_OLD_SETSIGINFO, %d, data=%p", pid, data) + if (request == %{ PTRACE_GETREGS %}) + // TODO: Retrieve *data in .return + return sprintf ("PTRACE_GETREGS, %d", pid) + if (request == %{ PTRACE_SETREGS %}) + // TODO: Retrieve *data here + return sprintf ("PTRACE_SETREGS, %d", pid) + if (request == %{ PTRACE_OLDSETOPTIONS %}) + return sprintf ("PTRACE_OLDSETOPTIONS, %d, %s", pid, _ptrace_options_str (data)) +} + +function _ptrace_return_arch_prctl_addr:long(request:long, addr:long, data:long) +{ + return 0 +} diff -Nru systemtap-1.4/tapset/ip.stp systemtap-1.6/tapset/ip.stp --- systemtap-1.4/tapset/ip.stp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/tapset/ip.stp 2011-07-25 18:12:01.000000000 +0000 @@ -49,11 +49,14 @@ /* return the destination IP address for a given sock */ function __ip_sock_daddr:long (sock:long) { - return (@defined(@cast(sock, "inet_sock")->inet_daddr) - ? @cast(sock, "inet_sock")->inet_daddr # kernel >= 2.6.33 - : (@defined(@cast(sock, "inet_sock")->daddr) - ? @cast(sock, "inet_sock", "kernel")->daddr # kernel >= 2.6.11 - : @cast(sock, "inet_sock", "kernel")->inet->daddr)) + return (@defined(@cast(sock, "inet_sock")->sk->__sk_common->skc_daddr) + ? # kernel >= 2.6.38 + @cast(sock, "inet_sock")->sk->__sk_common->skc_daddr + : (@defined(@cast(sock, "inet_sock")->inet_daddr) + ? @cast(sock, "inet_sock")->inet_daddr # kernel >= 2.6.33 + : (@defined(@cast(sock, "inet_sock")->daddr) + ? @cast(sock, "inet_sock", "kernel")->daddr # kernel >= 2.6.11 + : @cast(sock, "inet_sock", "kernel")->inet->daddr))) } /* Get the IP header from a sk_buff struct */ diff -Nru systemtap-1.4/tapset/irq.stp systemtap-1.6/tapset/irq.stp --- systemtap-1.4/tapset/irq.stp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/tapset/irq.stp 2011-07-25 18:12:01.000000000 +0000 @@ -132,12 +132,13 @@ * @action: pointer to softirq handler just about to execute * @vec_nr: softirq vector number */ -probe softirq.entry = kernel.trace("softirq_entry") ? +probe softirq.entry = kernel.trace("irq_softirq_entry") !, + kernel.trace("softirq_entry") ? { # kernels < 2.6.37 h = (@defined($h) ? $h : 0) vec = (@defined($vec) ? $vec : 0) - action = (@defined($h) ? $h->action : 0) + action = (@defined($h) ? @cast($h,"softirq_action","kernel")->action : 0) # kernels >= 2.6.37 vec_nr = (@defined($vec_nr) ? $vec_nr : 0) } @@ -149,12 +150,13 @@ * @action: pointer to softirq handler that just finished execution * @vec_nr: softirq vector number */ -probe softirq.exit = kernel.trace("softirq_exit") ? +probe softirq.exit = kernel.trace("irq_softirq_exit") !, + kernel.trace("softirq_exit") ? { # kernels < 2.6.37 h = (@defined($h) ? $h : 0) vec = (@defined($vec) ? $vec : 0) - action = (@defined($h) ? $h->action : 0) + action = (@defined($h) ? @cast($h,"softirq_action","kernel")->action : 0) # kernels >= 2.6.37 vec_nr = (@defined($vec_nr) ? $vec_nr : 0) } diff -Nru systemtap-1.4/tapset/kprocess.stp systemtap-1.6/tapset/kprocess.stp --- systemtap-1.4/tapset/kprocess.stp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/tapset/kprocess.stp 2011-07-25 18:12:01.000000000 +0000 @@ -15,8 +15,9 @@ /** - * probe kprocess.create - Fires whenever a new process is successfully created + * probe kprocess.create - Fires whenever a new process or thread is successfully created * @new_pid: The PID of the newly created process + * @new_tid: The TID of the newly created task * * Context: * Parent of the created process. @@ -28,6 +29,7 @@ task = $return if (_IS_ERR(task)) next new_pid = task_pid(task) + new_tid = task_tid(task) } @@ -99,7 +101,9 @@ /** * probe kprocess.release - Process released * @task: A task handle to the process being released - * @pid: PID of the process being released + * @released_pid: PID of the process being released + * @released_tid: TID of the task being released + * @pid: Same as @released_pid for compatibility (deprecated) * * Context: * The context of the parent, if it wanted notification of this process' @@ -112,4 +116,6 @@ probe kprocess.release = kernel.function("release_task") { task = $p pid = $p->pid; + released_pid = $p->pid; + released_tid = $p->tid; } diff -Nru systemtap-1.4/tapset/memory.stp systemtap-1.6/tapset/memory.stp --- systemtap-1.4/tapset/memory.stp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/tapset/memory.stp 2011-07-25 18:12:01.000000000 +0000 @@ -154,11 +154,17 @@ * Fires when a write to a shared page requires a page copy. This is * always preceded by a vm.shared_write. */ -probe vm.write_shared_copy = kernel.function("copy_cow_page") ? +probe vm.write_shared_copy = kernel.function("cow_user_page") ?, + kernel.function("copy_cow_page") ? { name = "write_shared_copy" - address = $address - zero = _IS_ZERO_PAGE($from, $address); + if (@defined($va)) { + address = $va + zero = _IS_ZERO_PAGE($src, $va); + } else { + address = $address + zero = _IS_ZERO_PAGE($from, $address); + } } diff -Nru systemtap-1.4/tapset/nd_syscalls2.stp systemtap-1.6/tapset/nd_syscalls2.stp --- systemtap-1.4/tapset/nd_syscalls2.stp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/tapset/nd_syscalls2.stp 2011-07-25 18:12:01.000000000 +0000 @@ -610,12 +610,16 @@ pid = long_arg(2) addr = long_arg(3) data = long_arg(4) - argstr = sprintf("%d, %d, %p, %p", request, pid, addr, data) + argstr = _ptrace_argstr(request, pid, addr, data) } probe nd_syscall.ptrace.return = kprobe.function("sys_ptrace").return ? { name = "ptrace" retstr = returnstr(1) + + // long_arg values are not available here. + geteventmsg_data = 0 + arch_prctl_addr = 0 } # pwrite64 ___________________________________________________ @@ -4114,8 +4118,8 @@ name = "wait4" // pid = (@defined($upid) ? $upid : $pid) // status_uaddr = $stat_addr - // options = $options - // options_str = _wait4_opt_str($options) + // options = $options & 0xffffffff + // options_str = _wait4_opt_str(options) // rusage_uaddr = $ru // argstr = sprintf("%d, %p, %s, %p", // (@defined($upid) ? $upid : $pid), @@ -4123,7 +4127,7 @@ asmlinkage() pid = int_arg(1) status_uaddr = pointer_arg(2) - options = int_arg(3) + options = int_arg(3) & 0xffffffff options_str = _wait4_opt_str(options) rusage_uaddr = pointer_arg(4) argstr = sprintf("%d, %p, %s, %p", pid, status_uaddr, _wait4_opt_str(options), rusage_uaddr) @@ -4132,6 +4136,15 @@ probe nd_syscall.wait4.return = kprobe.function("sys_wait4").return ? { name = "wait4" + + status_uaddr = pointer_arg(2) + if (returnval () <= 0) + status_str = "N/A" + else if (status_uaddr == 0) + status_str = "NULL" + else + status_str = _wait_status_str(user_int(status_uaddr)) + retstr = returnstr(1) } @@ -4186,8 +4199,8 @@ name = "waitpid" pid = $pid status_uaddr = $stat_addr - options = $options - options_str = _wait4_opt_str($options) + options = $options & 0xffffffff + options_str = _wait4_opt_str(options) rusage_uaddr = $ru argstr = sprintf("%d, %p, %s, %p", $pid, $stat_addr, options_str, $ru) diff -Nru systemtap-1.4/tapset/nd_syscalls.stp systemtap-1.6/tapset/nd_syscalls.stp --- systemtap-1.4/tapset/nd_syscalls.stp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/tapset/nd_syscalls.stp 2011-07-25 18:12:01.000000000 +0000 @@ -808,7 +808,6 @@ // filename = kernel_string($filename) // args = __get_argv($argv, 0) // argstr = sprintf("%s %s", filename, __get_argv($argv, 1)) - asmlinkage() filename = kernel_string(pointer_arg(1)) args = __get_argv(pointer_arg(2), 0) argstr = sprintf("%s %s", filename, __get_argv(pointer_arg(2), 1)) @@ -830,7 +829,6 @@ // filename = kernel_string($filename) // args = __get_compat_argv($argv, 0) // argstr = sprintf("%s %s", filename, __get_compat_argv($argv, 1)) - asmlinkage() filename = kernel_string(pointer_arg(1)) args = __get_compat_argv(pointer_arg(2), 0) argstr = sprintf("%s %s", filename, __get_compat_argv(pointer_arg(2), 1)) @@ -1244,7 +1242,6 @@ // stack_size = $stack_size // parent_tid_uaddr = $parent_tidptr // child_tid_uaddr = $child_tidptr - asmlinkage() clone_flags = ulong_arg(1) stack_start = ulong_arg(2) regs = pointer_arg(3) @@ -3384,7 +3381,7 @@ } %( kernel_v >= "2.6.33" %? -# In newer kernels (2.6.33+), all the sys_mmap() variants are just +# In newer kernels (2.6.33+), all the sys_mmap() variants are just # wrappers around sys_mmap_pgoff(), which is in arch-generic code. # # long sys_mmap_pgoff(unsigned long addr, unsigned long len, diff -Nru systemtap-1.4/tapset/powerpc/aux_syscalls.stp systemtap-1.6/tapset/powerpc/aux_syscalls.stp --- systemtap-1.4/tapset/powerpc/aux_syscalls.stp 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/tapset/powerpc/aux_syscalls.stp 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,99 @@ +# arch-specific requests of ptrace ___________________________ +# +%{ +#ifndef PPC_PTRACE_GETHWDBGINFO +# define PPC_PTRACE_GETHWDBGINFO 0x89 +#endif +#ifndef PPC_PTRACE_SETHWDEBUG +# define PPC_PTRACE_SETHWDEBUG 0x88 +#endif +#ifndef PPC_PTRACE_DELHWDEBUG +# define PPC_PTRACE_DELHWDEBUG 0x87 +#endif +%} +function _arch_ptrace_argstr(request, pid, addr, data) +{ + if (request == %{ PTRACE_GETVRREGS %}) + // TODO: Retrieve *data in .return + return sprintf ("PTRACE_GETVRREGS, %d, data=%p", pid, data) + if (request == %{ PTRACE_SETVRREGS %}) + // TODO: Retrieve *data here + return sprintf ("PTRACE_SETVRREGS, %d, data=%p", pid, data) + if (request == %{ PTRACE_GETEVRREGS %}) + // TODO: Retrieve *data in .return + return sprintf ("PTRACE_GETEVRREGS, %d, data=%p", pid, data) + if (request == %{ PTRACE_SETEVRREGS %}) + // TODO: Retrieve *data here + return sprintf ("PTRACE_SETEVRREGS, %d, data=%p", pid, data) + if (request == %{ PTRACE_GETVSRREGS %}) + // TODO: Retrieve *data in .return + return sprintf ("PTRACE_GETVSRREGS, %d, data=%p", pid, data) + if (request == %{ PTRACE_SETVSRREGS %}) + // TODO: Retrieve *data here + return sprintf ("PTRACE_SETVSRREGS, %d, data=%p", pid, data) + if (request == %{ PTRACE_GET_DEBUGREG %}) + // ADDR is now required by kernel to be 0. + return sprintf ("PTRACE_GET_DEBUGREG, %d, (addr=%p), data=%p", pid, addr, data) + if (request == %{ PTRACE_SET_DEBUGREG %}) + // ADDR is now required by kernel to be 0. + return sprintf ("PTRACE_SET_DEBUGREG, %d, (addr=%p), data=%p", pid, addr, data) + if (request == %{ PTRACE_GETREGS %}) + // TODO: Retrieve *data in .return + return sprintf ("PTRACE_GETREGS, %d, data=%p", pid, data) + if (request == %{ PTRACE_SETREGS %}) + // TODO: Retrieve *data here + return sprintf ("PTRACE_SETREGS, %d, data=%p", pid, data) + if (request == %{ PTRACE_GETFPREGS %}) + // TODO: Retrieve *data in .return + return sprintf ("PTRACE_GETFPREGS, %d, data=%p", pid, data) + if (request == %{ PTRACE_SETFPREGS %}) + // TODO: Retrieve *data here + return sprintf ("PTRACE_SETFPREGS, %d, data=%p", pid, data) + if (request == %{ PTRACE_GETREGS64 %}) + // TODO: Retrieve *data in .return + return sprintf ("PTRACE_GETREGS64, %d, data=%p", pid, data) + if (request == %{ PTRACE_SETREGS64 %}) + // TODO: Retrieve *data here + return sprintf ("PTRACE_SETREGS64, %d, data=%p", pid, data) + if (request == %{ PPC_PTRACE_GETREGS %}) + // TODO: Retrieve *data in .return + return sprintf ("PPC_PTRACE_GETREGS, %d, data=%p", pid, data) + if (request == %{ PPC_PTRACE_SETREGS %}) + // TODO: Retrieve *data here + return sprintf ("PPC_PTRACE_SETREGS, %d, data=%p", pid, data) + if (request == %{ PPC_PTRACE_GETFPREGS %}) + // TODO: Retrieve *data in .return + return sprintf ("PPC_PTRACE_GETFPREGS, %d, data=%p", pid, data) + if (request == %{ PPC_PTRACE_SETFPREGS %}) + // TODO: Retrieve *data here + return sprintf ("PPC_PTRACE_SETFPREGS, %d, data=%p", pid, data) + if (request == %{ PPC_PTRACE_PEEKTEXT_3264 %}) + // TODO: Retrieve *data in .return + return sprintf ("PPC_PTRACE_PEEKTEXT_3264, %d, *addr=%p, data=%p", pid, user_long(addr), data) + if (request == %{ PPC_PTRACE_PEEKDATA_3264 %}) + // TODO: Retrieve *data in .return + return sprintf ("PPC_PTRACE_PEEKDATA_3264, %d, *addr=%p, data=%p", pid, user_long(addr), data) + if (request == %{ PPC_PTRACE_POKETEXT_3264 %}) + return sprintf ("PPC_PTRACE_POKETEXT_3264, %d, *addr=%p, data=%p", pid, user_long(addr), data) + if (request == %{ PPC_PTRACE_POKEDATA_3264 %}) + return sprintf ("PPC_PTRACE_POKEDATA_3264, %d, *addr=%p, data=%p", pid, user_long(addr), data) + if (request == %{ PPC_PTRACE_PEEKUSR_3264 %}) + return sprintf ("PPC_PTRACE_PEEKUSR_3264, %d, addr=%p, data=%p", pid, addr, data) + if (request == %{ PPC_PTRACE_POKEUSR_3264 %}) + return sprintf ("PPC_PTRACE_POKEUSR_3264, %d, addr=%p, data=%p", pid, addr, data) + if (request == %{ PTRACE_SINGLEBLOCK %}) + return sprintf ("PTRACE_SINGLEBLOCK, %d, %s", pid, _signal_name (data)) + if (request == %{ PPC_PTRACE_GETHWDBGINFO %}) + // TODO: Retrieve *data in .return + return sprintf ("PPC_PTRACE_GETHWDBGINFO, %d, data=%p", pid, data) + if (request == %{ PPC_PTRACE_SETHWDEBUG %}) + // TODO: Retrieve *data here + return sprintf ("PPC_PTRACE_SETHWDEBUG, %d, data=%p", pid, data) + if (request == %{ PPC_PTRACE_DELHWDEBUG %}) + return sprintf ("PPC_PTRACE_DELHWDEBUG, %d, data=%d", pid, data) +} + +function _ptrace_return_arch_prctl_addr:long(request:long, addr:long, data:long) +{ + return 0 +} diff -Nru systemtap-1.4/tapset/README systemtap-1.6/tapset/README --- systemtap-1.4/tapset/README 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/tapset/README 2011-07-25 18:12:01.000000000 +0000 @@ -4,6 +4,6 @@ other scripts can pull in definitions from. For samples of end-user scripts, see the web -http://sources.redhat.com/systemtap/documentation.html +http://sourceware.org/systemtap/documentation.html -See also http://sources.redhat.com/systemtap/wiki/TapsetStatus +See also http://sourceware.org/systemtap/wiki/TapsetStatus diff -Nru systemtap-1.4/tapset/s390/aux_syscalls.stp systemtap-1.6/tapset/s390/aux_syscalls.stp --- systemtap-1.4/tapset/s390/aux_syscalls.stp 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/tapset/s390/aux_syscalls.stp 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,37 @@ +# arch-specific requests of ptrace ___________________________ +# +function _arch_ptrace_argstr(request, pid, addr, data) +{ + if (request == %{ PTRACE_OLDSETOPTIONS %}) + return sprintf ("PTRACE_OLDSETOPTIONS, %d, %s", pid, _ptrace_options_str (data)) + + if (request == %{ PTRACE_PEEKUSR_AREA %}) + area="PTRACE_PEEKUSR_AREA" + if (request == %{ PTRACE_POKEUSR_AREA %}) + area="PTRACE_POKEUSR_AREA" + if (request == %{ PTRACE_PEEKTEXT_AREA %}) + area="PTRACE_PEEKTEXT_AREA" + if (request == %{ PTRACE_PEEKDATA_AREA %}) + area="PTRACE_PEEKDATA_AREA" + if (request == %{ PTRACE_POKETEXT_AREA %}) + area="PTRACE_POKETEXT_AREA" + if (request == %{ PTRACE_POKEDATA_AREA %}) + area="PTRACE_POKEDATA_AREA" + if (area!="") + // FIXME: ptrace of 32-bit debuggers is not caught by SystemTap, + // use +4 and +8 offsets for them + return sprintf ("%s, %d, {len=%d, kernel_addr=%p, process_addr=%p}", area, pid, + user_int(addr), user_long(addr+8), user_long(addr+16)) + + if (request == %{ PTRACE_GET_LAST_BREAK %}) + // TODO: Retrieve *data in return + return sprintf ("PTRACE_GET_LAST_BREAK, %d, data=%p", pid, data) + if (request == %{ PTRACE_PROT %}) + // Not implemented in kernel + return sprintf ("PTRACE_PROT, %d, addr=%p, data=%p", pid, addr, data) +} + +function _ptrace_return_arch_prctl_addr:long(request:long, addr:long, data:long) +{ + return 0 +} diff -Nru systemtap-1.4/tapset/scheduler.stp systemtap-1.6/tapset/scheduler.stp --- systemtap-1.4/tapset/scheduler.stp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/tapset/scheduler.stp 2011-07-25 18:12:01.000000000 +0000 @@ -126,15 +126,14 @@ kernel.function("context_switch") %) { - if (@defined($prev)) { - prev_priority = $prev->prio - prev_pid = $prev->tgid - prev_tid = $prev->pid - prev_task = $prev - prev_task_name = task_execname($prev) - prevtsk_state = $prev->state - } - else { + /* + * Note that we prefer '$prev_p' here because on RHEL5 + * (2.6.18-238.1.1.el5) the '__switch_to()' function has both + * a '$prev_p' and a '$prev' argument. Since '$prev_p' is of + * the correct type (struct task_struct *), we need to look + * for it first. + */ + if (@defined($prev_p)) { prev_priority = $prev_p->prio prev_pid = $prev_p->tgid prev_tid = $prev_p->pid @@ -142,6 +141,14 @@ prev_task_name = task_execname($prev_p) prevtsk_state = $prev_p->state } + else { + prev_priority = $prev->prio + prev_pid = $prev->tgid + prev_tid = $prev->pid + prev_task = $prev + prev_task_name = task_execname($prev) + prevtsk_state = $prev->state + } if (@defined($next)) { next_priority = $next->prio diff -Nru systemtap-1.4/tapset/syscalls2.stp systemtap-1.6/tapset/syscalls2.stp --- systemtap-1.4/tapset/syscalls2.stp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/tapset/syscalls2.stp 2011-07-25 18:12:01.000000000 +0000 @@ -65,15 +65,17 @@ { name = "nfsservctl" cmd = $cmd -%( CONFIG_NFSD == "[ym]" %? - argp_uaddr = $arg - resp_uaddr = $res - argstr = sprintf("%s, %p, %p", _nfsctl_cmd_str($cmd), $arg, $res) -%: - argp_uaddr = $notused - resp_uaddr = $notused2 - argstr = sprintf("/* NI_SYSCALL */ %s, %p, %p", _nfsctl_cmd_str($cmd), $notused, $notused2) -%) + if (@defined($arg) && @defined($res)) { + argp_uaddr = $arg + resp_uaddr = $res + argstr = sprintf("%s, %p, %p", _nfsctl_cmd_str($cmd), + $arg, $res) + } else { + argp_uaddr = $notused + resp_uaddr = $notused2 + argstr = sprintf("/* NI_SYSCALL */ %s, %p, %p", + _nfsctl_cmd_str($cmd), $notused, $notused2) + } } probe syscall.nfsservctl.return = kernel.function("sys_nfsservctl").return ?, kernel.function("compat_sys_nfsservctl").return ? @@ -582,12 +584,16 @@ pid = $pid addr = $addr data = $data - argstr = sprintf("%d, %d, %p, %p", request, pid, addr, data) + + argstr = _ptrace_argstr($request, $pid, $addr, $data) } probe syscall.ptrace.return = kernel.function("sys_ptrace").return ? { name = "ptrace" retstr = return_str(1, $return) + + geteventmsg_data = _ptrace_return_geteventmsg_data($request, $data) + arch_prctl_addr = _ptrace_return_arch_prctl_addr($request, $addr, $data) } # pwrite64 ___________________________________________________ @@ -3469,16 +3475,24 @@ name = "wait4" pid = (@defined($upid) ? $upid : $pid) status_uaddr = $stat_addr - options = $options - options_str = _wait4_opt_str($options) + options = $options & 0xffffffff + options_str = _wait4_opt_str(options) rusage_uaddr = $ru argstr = sprintf("%d, %p, %s, %p", (@defined($upid) ? $upid : $pid), - $stat_addr, _wait4_opt_str($options), $ru) + $stat_addr, options_str, $ru) } probe syscall.wait4.return = kernel.function("sys_wait4").return { name = "wait4" + + if (returnval () <= 0) + status_str = "N/A" + else if ($stat_addr == 0) + status_str = "NULL" + else + status_str = _wait_status_str(user_int($stat_addr)) + retstr = return_str(1, $return) } # waitid _____________________________________________________ @@ -3521,8 +3535,8 @@ name = "waitpid" pid = $pid status_uaddr = $stat_addr - options = $options - options_str = _wait4_opt_str($options) + options = $options & 0xffffffff + options_str = _wait4_opt_str(options) rusage_uaddr = $ru argstr = sprintf("%d, %p, %s, %p", $pid, $stat_addr, options_str, $ru) diff -Nru systemtap-1.4/tapset/syscalls.stp systemtap-1.6/tapset/syscalls.stp --- systemtap-1.4/tapset/syscalls.stp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/tapset/syscalls.stp 2011-07-25 18:12:01.000000000 +0000 @@ -711,8 +711,10 @@ { name = "execve" filename = kernel_string($filename) - args = __get_argv($argv, 0) - argstr = sprintf("%s %s", filename, __get_argv($argv, 1)) + # kernel 3.0 changed the pointer's name to __argv + __argv = @defined($__argv) ? $__argv : $argv + args = __get_argv(__argv, 0) + argstr = sprintf("%s %s", filename, __get_argv(__argv, 1)) } # v2.6.15-rc2 or earlier has problems with sys_execve return probes # another reason to probe on do_execve @@ -729,8 +731,10 @@ { name = "compat_execve" filename = kernel_string($filename) - args = __get_compat_argv($argv, 0) - argstr = sprintf("%s %s", filename, __get_compat_argv($argv, 1)) + # kernel 3.0 changed the pointer's name to __argv + __argv = @defined($__argv) ? $__argv : $argv + args = __get_compat_argv(__argv, 0) + argstr = sprintf("%s %s", filename, __get_compat_argv(__argv, 1)) } probe syscall.compat_execve.return = kernel.function("compat_do_execve").return ? { diff -Nru systemtap-1.4/tapset/system.stp systemtap-1.6/tapset/system.stp --- systemtap-1.4/tapset/system.stp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/tapset/system.stp 2011-07-25 18:12:01.000000000 +0000 @@ -2,12 +2,15 @@ * sfunction system - Issue a command to the system * * @cmd: the command to issue to the system - * - * Description: This function runs a command on the system. - * The command is started in the background when the current - * probe completes. The command is run with the same UID as - * the user running the stap or staprun command. + * + * Description: This function runs a command on the system. The + * command is started in the background some time after the current + * probe completes. The command is run with the same UID as the user + * running the stap or staprun command. */ function system (cmd:string) %{ + /* NOTE this uses _stp_ctl_write and not _stp_ctl_send, + so this will only be flushed to the .cmd stream on + the next periodic _stp_ctl_work timer tick. */ _stp_ctl_write(STP_SYSTEM, THIS->cmd, strlen(THIS->cmd)+1); %} diff -Nru systemtap-1.4/tapset/target_set.stp systemtap-1.6/tapset/target_set.stp --- systemtap-1.4/tapset/target_set.stp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/tapset/target_set.stp 2011-07-25 18:12:01.000000000 +0000 @@ -12,6 +12,7 @@ _target_set[target()] = stp_pid() } +%( arch != "ia64" && kernel_v >= "2.6.18" %? probe nd_syscall.fork.return { pid = returnval() @@ -27,6 +28,26 @@ delete _target_set[pid()] } +%: + +# ia64 systems and pre-2.6.18 systems don't support dwarfless probes, +# so we'll use 'syscall' probes instead of 'nd_syscall' probes. +probe syscall.fork.return +{ + pid = $return + if (pid in _target_set) + next + ppid = pid() + if (ppid in _target_set) + _target_set[pid] = ppid +} + +probe syscall.exit +{ + delete _target_set[pid()] +} +%) + function target_set_report () { printf("target set:\n") diff -Nru systemtap-1.4/tapset/tcp.stp systemtap-1.6/tapset/tcp.stp --- systemtap-1.4/tapset/tcp.stp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/tapset/tcp.stp 2011-07-25 18:12:01.000000000 +0000 @@ -153,7 +153,7 @@ /* returns TCP destination port for a given sk_buff structure */ function __tcp_skb_dport:long (tcphdr:long){ - return @cast(tcphdr, "tcphdr")->dest + return ntohs(@cast(tcphdr, "tcphdr")->dest) } /* return the TCP source port for a given sock */ diff -Nru systemtap-1.4/tapset/timestamp.stp systemtap-1.6/tapset/timestamp.stp --- systemtap-1.4/tapset/timestamp.stp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/tapset/timestamp.stp 2011-07-25 18:12:01.000000000 +0000 @@ -11,6 +11,7 @@ //returned values can then be used to indicate when an event occurred, provide an ordering for events, //or compute the amount of time elapsed between two time stamps. // + /** * sfunction get_cycles - Processor cycle count * @@ -25,4 +26,28 @@ THIS->__retvalue = (int64_t) c; %} -// likewise jiffies, monotonic_clock ... + +/** + * sfunction jiffies - Kernel jiffies count + * + * Description: This function returns the value of the kernel jiffies + * variable. This value is incremented periodically by timer interrupts, + * and may wrap around a 32-bit or 64-bit boundary. See HZ(). + */ +function jiffies:long () %{ /* pure */ /* unprivileged */ + THIS->__retvalue = (int64_t) jiffies; +%} + + +/** + * sfunction HZ - Kernel HZ + * + * Description: This function returns the value of the kernel HZ macro, + * which corresponds to the rate of increase of the jiffies value. + */ +function HZ:long () %{ /* pure */ /* unprivileged */ + THIS->__retvalue = (int64_t) HZ; +%} + + +// likewise monotonic_clock ... diff -Nru systemtap-1.4/tapset/vfs.stp systemtap-1.6/tapset/vfs.stp --- systemtap-1.4/tapset/vfs.stp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/tapset/vfs.stp 2011-07-25 18:12:01.000000000 +0000 @@ -20,10 +20,15 @@ global __devnames function __find_bdevname:string(dev:long, bdev:long) { + /* bdevname() can't do anything without an actual bdev, so let's just + * return the same result early without wasting space in __devnames. */ + if (bdev == 0) + return "N/A" + if (dev in __devnames) return __devnames[dev] - else - return __devnames[dev] = bdevname(bdev) + + return __devnames[dev] = bdevname(bdev) } /* deprecated */ @@ -594,7 +599,7 @@ } } -probe vfs.block_sync_page = kernel.function("block_sync_page") +probe vfs.block_sync_page = kernel.function("block_sync_page") ? { dev = __page_dev($page) devname = __find_bdevname(dev, __page_bdev($page)) @@ -610,7 +615,7 @@ size = 1 units = "pages" } -probe vfs.block_sync_page.return = kernel.function("block_sync_page").return +probe vfs.block_sync_page.return = kernel.function("block_sync_page").return ? { name = "block_sync_page" retstr = sprintf("N/A") @@ -729,7 +734,9 @@ } } -probe vfs.remove_from_page_cache = kernel.function("__remove_from_page_cache") +probe vfs.remove_from_page_cache = + kernel.function("__delete_from_page_cache") !, + kernel.function("__remove_from_page_cache") { dev = __page_dev($page) devname = __find_bdevname(dev, __page_bdev($page)) @@ -741,6 +748,7 @@ argstr = sprintf("%d", ino) } probe vfs.remove_from_page_cache.return = + kernel.function("__delete_from_page_cache").return !, kernel.function("__remove_from_page_cache").return { name = "vfs.remove_from_page_cache" @@ -791,7 +799,7 @@ vlen = $vlen bytes_to_read = _get_fopv_size($vec, $vlen) - name = "vfs.read" + name = "vfs.readv" argstr = sprintf("%d, %d, %p", bytes_to_read, $pos, $vec) } diff -Nru systemtap-1.4/tapset/x86_64/aux_syscalls.stp systemtap-1.6/tapset/x86_64/aux_syscalls.stp --- systemtap-1.4/tapset/x86_64/aux_syscalls.stp 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/tapset/x86_64/aux_syscalls.stp 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,76 @@ +# Helper for _arch_ptrace_argstr below. +%{ +#include +%} +function _arch_ptrace_prctl_str(f) +{ + if (f == %{ ARCH_SET_GS %}) + return "ARCH_SET_GS" + else if (f == %{ ARCH_SET_FS %}) + return "ARCH_SET_FS" + else if (f == %{ ARCH_GET_FS %}) + return "ARCH_GET_FS" + else if (f == %{ ARCH_GET_GS %}) + return "ARCH_GET_GS" + else + return sprintf("?=%d",f) +} + +# arch-specific requests of ptrace ___________________________ +# = like tapset/x86_64/syscalls.stp but with PTRACE_ARCH_PRCTL +# +%{ +#ifndef PTRACE_SYSEMU +# define PTRACE_SYSEMU 31 +#endif +#ifndef PTRACE_SYSEMU_SINGLESTEP +# define PTRACE_SYSEMU_SINGLESTEP 32 +#endif +#ifndef PTRACE_SINGLEBLOCK +# define PTRACE_SINGLEBLOCK 33 +#endif +%} +function _arch_ptrace_argstr(request, pid, addr, data) +{ + if (request == %{ PTRACE_GETREGS %}) + // TODO: Retrieve *data in .return + return sprintf ("PTRACE_GETREGS, %d, data=%p", pid, data) + if (request == %{ PTRACE_SETREGS %}) + // TODO: Retrieve *data here + return sprintf ("PTRACE_SETREGS, %d, data=%p", pid, data) + if (request == %{ PTRACE_GETFPREGS %}) + // TODO: Retrieve *data in .return + return sprintf ("PTRACE_GETFPREGS, %d, data=%p", pid, data) + if (request == %{ PTRACE_SETFPREGS %}) + // TODO: Retrieve *data here + return sprintf ("PTRACE_SETFPREGS, %d, data=%p", pid, data) + if (request == %{ PTRACE_GETFPXREGS %}) + // TODO: Retrieve *data in .return + return sprintf ("PTRACE_GETFPXREGS, %d, data=%p", pid, data) + if (request == %{ PTRACE_SETFPXREGS %}) + // TODO: Retrieve *data here + return sprintf ("PTRACE_SETFPXREGS, %d, data=%p", pid, data) + if (request == %{ PTRACE_OLDSETOPTIONS %}) + return sprintf ("PTRACE_OLDSETOPTIONS, %d, %s", pid, _ptrace_options_str (data)) + if (request == %{ PTRACE_GET_THREAD_AREA %}) + // TODO: Retrieve *data in .return + return sprintf ("PTRACE_GET_THREAD_AREA, %d, index=%d, data=%p", pid, addr, data) + if (request == %{ PTRACE_SET_THREAD_AREA %}) + // TODO: Retrieve *data here + return sprintf ("PTRACE_SET_THREAD_AREA, %d, index=%p, data=%p", pid, addr, data) + if (request == %{ PTRACE_ARCH_PRCTL %}) + return sprintf ("PTRACE_ARCH_PRCTL, %d, addr=%p, %s", pid, addr, _arch_ptrace_prctl_str(data)) + if (request == %{ PTRACE_SYSEMU %}) + return sprintf ("PTRACE_SYSEMU, %d, %s", pid, _signal_name (data)) + if (request == %{ PTRACE_SYSEMU_SINGLESTEP %}) + return sprintf ("PTRACE_SYSEMU_SINGLESTEP, %d, %s", pid, _signal_name (data)) + if (request == %{ PTRACE_SINGLEBLOCK %}) + return sprintf ("PTRACE_SINGLEBLOCK, %d, %s", pid, _signal_name (data)) +} + +function _ptrace_return_arch_prctl_addr(request, addr, data) +{ + if (request == %{ PTRACE_ARCH_PRCTL %} + && (data == %{ ARCH_GET_FS %} || data == %{ ARCH_GET_GS %})) + return user_long(addr) +} diff -Nru systemtap-1.4/tapset-itrace.cxx systemtap-1.6/tapset-itrace.cxx --- systemtap-1.4/tapset-itrace.cxx 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/tapset-itrace.cxx 2011-07-25 18:12:01.000000000 +0000 @@ -76,7 +76,7 @@ derived_probe(p, l), has_path(hp), path(pn), pid(pd), single_step(ss) { if (s.kernel_config["CONFIG_UTRACE"] != string("y")) - throw semantic_error ("process probes not available without kernel CONFIG_UTRACE"); + throw semantic_error (_("process probes not available without kernel CONFIG_UTRACE")); } @@ -213,7 +213,7 @@ s.op->newline() << "rc = usr_itrace_init(p->single_step, tsk, p);"; s.op->newline(-1) << "else"; - s.op->newline(1) << "remove_usr_itrace_info(find_itrace_info(p->tgt.pid));"; + s.op->newline(1) << "remove_usr_itrace_info(find_itrace_info(tsk));"; s.op->newline(-1) << "return rc;"; s.op->newline(-1) << "}"; diff -Nru systemtap-1.4/tapset-mark.cxx systemtap-1.6/tapset-mark.cxx --- systemtap-1.4/tapset-mark.cxx 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/tapset-mark.cxx 2011-07-25 18:12:01.000000000 +0000 @@ -97,10 +97,10 @@ int argnum = atoi (argnum_s.c_str()); if (argnum < 1 || argnum > (int)mark_args.size()) - throw semantic_error ("invalid marker argument number", e->tok); + throw semantic_error (_("invalid marker argument number"), e->tok); if (is_active_lvalue (e)) - throw semantic_error("write to marker parameter not permitted", e->tok); + throw semantic_error(_("write to marker parameter not permitted"), e->tok); e->assert_no_components("marker"); @@ -120,7 +120,7 @@ string sname = e->name; if (is_active_lvalue (e)) - throw semantic_error("write to marker '" + sname + "' not permitted", e->tok); + throw semantic_error(_F("write to marker '%s' not permitted", sname.c_str()), e->tok); e->assert_no_components("marker"); @@ -184,7 +184,7 @@ try { if (e->addressof) - throw semantic_error("cannot take address of marker variable", e->tok); + throw semantic_error(_("cannot take address of marker variable"), e->tok); if (startswith(e->name, "$arg")) visit_target_symbol_arg (e); @@ -192,7 +192,7 @@ || e->name == "$$parms" || e->name == "$$vars") visit_target_symbol_context (e); else - throw semantic_error ("invalid target symbol for marker, $argN, $name, $format, $$parms or $$vars expected", + throw semantic_error (_("invalid target symbol for marker, $argN, $name, $format, $$parms or $$vars expected"), e->tok); } catch (const semantic_error &er) @@ -238,8 +238,8 @@ } if (sess.verbose > 2) - clog << "marker-based " << name << " mark=" << probe_name - << " fmt='" << probe_format << "'" << endl; + clog << "marker-based " << name << " mark=" << probe_name << " fmt='" << probe_format + << "'" << endl; } @@ -446,7 +446,7 @@ break; default: - throw semantic_error ("cannot expand unknown type"); + throw semantic_error (_("cannot expand unknown type")); break; } } @@ -579,7 +579,7 @@ if (! mark_cache.empty()) { if (s.verbose > 3) - clog << "mark_builder releasing cache" << endl; + clog << _("mark_builder releasing cache") << endl; mark_cache.clear(); } } @@ -616,7 +616,8 @@ if (! module_markers) { if (sess.verbose>3) - clog << module_markers_path << " cannot be opened: " + //TRANSLATORS: specific path cannot be opened + clog << module_markers_path << _(" cannot be opened: ") << strerror(errno) << endl; return; } diff -Nru systemtap-1.4/tapset-perfmon.cxx systemtap-1.6/tapset-perfmon.cxx --- systemtap-1.4/tapset-perfmon.cxx 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/tapset-perfmon.cxx 2011-07-25 18:12:01.000000000 +0000 @@ -15,6 +15,11 @@ #include +extern "C" { +#define __STDC_FORMAT_MACROS +#include +} + using namespace std; using namespace __gnu_cxx; @@ -192,9 +197,9 @@ // XXX need additional version checks too? // --- perhaps look for export of perf_event_create_kernel_counter if (sess.kernel_exports.find("perf_event_create_kernel_counter") == sess.kernel_exports.end()) - throw semantic_error ("perf probes not available without exported perf_event_create_kernel_counter"); + throw semantic_error (_("perf probes not available without exported perf_event_create_kernel_counter")); if (sess.kernel_config["CONFIG_PERF_EVENTS"] != "y") - throw semantic_error ("perf probes not available without CONFIG_PERF_EVENTS"); + throw semantic_error (_("perf probes not available without CONFIG_PERF_EVENTS")); int64_t type; bool has_type = get_param(parameters, TOK_TYPE, type); @@ -209,11 +214,11 @@ if (!has_period) period = 1000000; // XXX: better parametrize this default else if (period < 1) - throw semantic_error("invalid perf sample period " + lex_cast(period), + throw semantic_error(_("invalid perf sample period ") + lex_cast(period), parameters.find(TOK_SAMPLE)->second->tok); if (sess.verbose > 1) - clog << "perf probe type=" << type << " config=" << config << " period=" << period << endl; + clog << _F("perf probe type=%" PRId64 " config=%" PRId64 " period=%" PRId64, type, config, period) << endl; finished_results.push_back (new perf_derived_probe(base, location, type, config, period)); diff -Nru systemtap-1.4/tapset-procfs.cxx systemtap-1.6/tapset-procfs.cxx --- systemtap-1.4/tapset-procfs.cxx 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/tapset-procfs.cxx 2011-07-25 18:12:01.000000000 +0000 @@ -144,9 +144,9 @@ // You can only specify 1 read and 1 write probe. if (p->write && pset->write_probe != NULL) - throw semantic_error("only one write procfs probe can exist for procfs path \"" + p->path + "\""); + throw semantic_error(_("only one write procfs probe can exist for procfs path \"") + p->path + "\""); else if (! p->write && pset->read_probe != NULL) - throw semantic_error("only one read procfs probe can exist for procfs path \"" + p->path + "\""); + throw semantic_error(_("only one read procfs probe can exist for procfs path \"") + p->path + "\""); // XXX: multiple writes should be acceptable } @@ -403,19 +403,19 @@ assert(e->name.size() > 0 && e->name[0] == '$'); if (e->name != "$value") - throw semantic_error ("invalid target symbol for procfs probe, $value expected", + throw semantic_error (_("invalid target symbol for procfs probe, $value expected"), e->tok); e->assert_no_components("procfs"); bool lvalue = is_active_lvalue(e); if (write_probe && lvalue) - throw semantic_error("procfs $value variable is read-only in a procfs write probe", e->tok); + throw semantic_error(_("procfs $value variable is read-only in a procfs write probe"), e->tok); else if (! write_probe && ! lvalue) - throw semantic_error("procfs $value variable cannot be read in a procfs read probe", e->tok); + throw semantic_error(_("procfs $value variable cannot be read in a procfs read probe"), e->tok); if (e->addressof) - throw semantic_error("cannot take address of procfs variable", e->tok); + throw semantic_error(_("cannot take address of procfs variable"), e->tok); // Remember that we've seen a target variable. target_symbol_seen = true; @@ -456,9 +456,9 @@ } else { - throw semantic_error ("Only the following assign operators are" + throw semantic_error (_("Only the following assign operators are" " implemented on procfs read target variables:" - " '=', '.='", e->tok); + " '=', '.='"), e->tok); } } fname += lex_cast(++tick); @@ -544,7 +544,7 @@ if (get_param(parameters, TOK_MAXSIZE, maxsize_val)) { if (maxsize_val <= 0) - throw semantic_error ("maxsize must be greater than 0"); + throw semantic_error (_("maxsize must be greater than 0")); } // If no procfs path, default to "command". The runtime will do @@ -566,31 +566,31 @@ { // Make sure it doesn't start with '/'. if (end_pos == 0) - throw semantic_error ("procfs path cannot start with a '/'", + throw semantic_error (_("procfs path cannot start with a '/'"), location->components.front()->tok); component = path.substr(start_pos, end_pos - start_pos); // Make sure it isn't empty. if (component.size() == 0) - throw semantic_error ("procfs path component cannot be empty", + throw semantic_error (_("procfs path component cannot be empty"), location->components.front()->tok); // Make sure it isn't relative. else if (component == "." || component == "..") - throw semantic_error ("procfs path cannot be relative (and contain '.' or '..')", location->components.front()->tok); + throw semantic_error (_("procfs path cannot be relative (and contain '.' or '..')"), location->components.front()->tok); start_pos = end_pos + 1; } component = path.substr(start_pos); // Make sure it doesn't end with '/'. if (component.size() == 0) - throw semantic_error ("procfs path cannot end with a '/'", location->components.front()->tok); + throw semantic_error (_("procfs path cannot end with a '/'"), location->components.front()->tok); // Make sure it isn't relative. else if (component == "." || component == "..") - throw semantic_error ("procfs path cannot be relative (and contain '.' or '..')", location->components.front()->tok); + throw semantic_error (_("procfs path cannot be relative (and contain '.' or '..')"), location->components.front()->tok); } if (!(has_read ^ has_write)) - throw semantic_error ("need read/write component", location->components.front()->tok); + throw semantic_error (_("need read/write component"), location->components.front()->tok); finished_results.push_back(new procfs_derived_probe(sess, base, location, path, has_write, diff -Nru systemtap-1.4/tapsets.cxx systemtap-1.6/tapsets.cxx --- systemtap-1.4/tapsets.cxx 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/tapsets.cxx 2011-07-25 18:12:01.000000000 +0000 @@ -56,6 +56,7 @@ #include #include #include +#include #define __STDC_FORMAT_MACROS #include @@ -346,7 +347,7 @@ static bool null_die(Dwarf_Die *die) { - static Dwarf_Die null = { 0 }; + static Dwarf_Die null; return (!die || !memcmp(die, &null, sizeof(null))); } @@ -389,6 +390,7 @@ bool has_maxactive; bool has_library; long maxactive_val; + // dwarf_derived_probe_group::emit_module_decls uses this to emit sdt kprobe definition string user_path; string user_lib; bool access_vars; @@ -503,6 +505,9 @@ string const & k, long & v); static bool get_number_param(literal_map_t const & params, string const & k, Dwarf_Addr & v); + static void query_library_callback (void *object, const char *data); + virtual void query_library (const char *data) = 0; + // Extracted parameters. bool has_kernel; @@ -531,13 +536,18 @@ string library_name; has_process = get_string_param(params, TOK_PROCESS, module_val); has_library = get_string_param (params, TOK_LIBRARY, library_name); - if (has_library) - { - path = find_executable (module_val); - module_val = find_executable (library_name, "LD_LIBRARY_PATH"); - } - else if (has_process) + if (has_process) module_val = find_executable (module_val); + if (has_library) + { + if (! contains_glob_chars (library_name)) + { + path = module_val; + module_val = find_executable (library_name, "LD_LIBRARY_PATH"); + } + else + path = library_name; + } } assert (has_kernel || has_process || has_module); @@ -618,6 +628,7 @@ virtual void handle_query_module(); void query_module_dwarf(); void query_module_symtab(); + void query_library (const char *data); void add_probe_point(string const & funcname, char const * filename, @@ -711,7 +722,7 @@ } /* NB: not virtual, so can be called from dtor too: */ - void dwarf_build_no_more (bool verbose) + void dwarf_build_no_more (bool) { delete_map(kern_dw); delete_map(user_dw); @@ -858,13 +869,9 @@ if (function_str_val.find_first_not_of("*?") == string::npos) { // e.g., kernel.function("*") - cerr << "Error: Pattern '" - << function_str_val - << "' matches every instruction address in the symbol table," - << endl - << "some of which aren't even functions." - << " Please be more precise." - << endl; + cerr << _F("Error: Pattern '%s' matches every single " + "instruction address in the symbol table,\n" + "some of which aren't even functions.\n", function_str_val.c_str()) << endl; return; } symbol_table::iterator_t iter; @@ -896,10 +903,8 @@ if (!fi) { if (! sess.suppress_warnings) - cerr << "Warning: address " - << hex << addr << dec - << " out of range for module " - << dw.module_name; + cerr << _F("Warning: address %#" PRIx64 " out of range for module %s", + addr, dw.module_name.c_str()); return; } if (!null_die(&fi->die)) @@ -909,10 +914,8 @@ // match addr to any compilation unit, so addr must be // above that cu's address range. if (! sess.suppress_warnings) - cerr << "Warning: address " - << hex << addr << dec - << " maps to no known compilation unit in module " - << dw.module_name; + cerr << _F("Warning: address %#" PRIx64 " maps to no known compilation unit in module %s", + addr, dw.module_name.c_str()); return; } query_func_info(fi->addr, *fi, this); @@ -1020,7 +1023,8 @@ if (sess.verbose > 2) { - clog << "parsed '" << spec << "'"; + //clog << "parsed '" << spec << "'"; + clog << _F("parse '%s'", spec.c_str()); if (!scopes.empty()) clog << ", scope '" << scopes[0] << "'"; @@ -1061,7 +1065,7 @@ return; bad: - throw semantic_error("malformed specification '" + spec + "'", + throw semantic_error(_F("malformed specification '%s'", spec.c_str()), base_probe->tok); } @@ -1090,13 +1094,13 @@ if (sess.verbose > 1) { - clog << "probe " << funcname << "@" << filename << ":" << line; + clog << _("probe ") << funcname << "@" << filename << ":" << line; if (string(module) == TOK_KERNEL) - clog << " kernel"; + clog << _(" kernel"); else if (has_module) - clog << " module=" << module; + clog << _(" module=") << module; else if (has_process) - clog << " process=" << module; + clog << _(" process=") << module; if (reloc_section != "") clog << " reloc=" << reloc_section; clog << " pc=0x" << hex << addr << dec; } @@ -1310,13 +1314,13 @@ if (!q->has_mark && (!address_line || address_line.addr() != addr)) { stringstream msg; - msg << "address 0x" << hex << addr - << " does not match the beginning of a statement"; + msg << _F("address 0x%#" PRIx64 " does not match the beginning of a statement", + addr); if (address_line) - msg << " (try 0x" << hex << address_line.addr() << ")"; + msg << _F(" (try 0x%#" PRIx64 ")", address_line.addr()); else - msg << " (no line info found for '" << dw.cu_name() - << "', in module '" << dw.module_name << "')"; + msg << _F(" (no line info found for '%s', in module '%s')", + dw.cu_name().c_str(), dw.module_name.c_str()); if (! q->sess.guru_mode) throw semantic_error(msg.str()); else if (! q->sess.suppress_warnings) @@ -1369,9 +1373,8 @@ { assert (! q->has_return); // checked by caller already if (q->sess.verbose>2) - clog << "querying entrypc " - << hex << ii.entrypc << dec - << " of instance of inline '" << ii.name << "'\n"; + clog << _F("querying entrypc %#" PRIx64 " of instance of inline '%s'\n", + ii.entrypc, ii.name.c_str()); query_statement (ii.name, ii.decl_file, ii.decl_line, &ii.die, ii.entrypc, q); } @@ -1451,7 +1454,7 @@ if (q->dw.die_has_pc (i->die, addr)) { if (q->sess.verbose>3) - clog << "function DIE lands on srcfile\n"; + clog << _("function DIE lands on srcfile\n"); if (q->has_statement_str) { Dwarf_Die scope; @@ -1472,7 +1475,7 @@ if (q->dw.die_has_pc (i->die, addr)) { if (q->sess.verbose>3) - clog << "inline instance DIE lands on srcfile\n"; + clog << _("inline instance DIE lands on srcfile\n"); if (q->has_statement_str) { Dwarf_Die scope; @@ -1513,7 +1516,7 @@ try { if (q->sess.verbose>2) - clog << "selected inline instance of " << q->dw.function_name << "\n"; + clog << _F("selected inline instance of %s\n", q->dw.function_name.c_str()); Dwarf_Addr entrypc; if (q->dw.die_entrypc (die, &entrypc)) @@ -1569,8 +1572,7 @@ if (q->dw.func_is_inline () && (! q->has_call) && (! q->has_return)) { if (q->sess.verbose>3) - clog << "checking instances of inline " << q->dw.function_name - << "\n"; + clog << _F("checking instances of inline %s\n", q->dw.function_name.c_str()); q->dw.iterate_over_inline_instances (query_dwarf_inline_instance, q); } else if (q->dw.func_is_inline () && (q->has_return)) // PR 11553 @@ -1580,7 +1582,7 @@ else if (!q->dw.func_is_inline () && (! q->has_inline)) { if (q->sess.verbose>2) - clog << "selected function " << q->dw.function_name << "\n"; + clog << _F("selected function %s\n", q->dw.function_name.c_str()); func_info func; q->dw.function_die (&func.die); @@ -1618,8 +1620,8 @@ q->dw.focus_on_cu (cudie); if (false && q->sess.verbose>2) - clog << "focused on CU '" << q->dw.cu_name() - << "', in module '" << q->dw.module_name << "'\n"; + clog << _F("focused on CU '%s', in module '%s'\n", + q->dw.cu_name().c_str(), q->dw.module_name.c_str()); q->filtered_srcfiles.clear(); q->filtered_functions.clear(); @@ -1659,8 +1661,8 @@ { // .statement(...:NN) often gets mixed up with .function(...:NN) if (q->has_function_str && ! q->sess.suppress_warnings) - q->sess.print_warning ("For probing a particular line, use a " - ".statement() probe, not .function()", + q->sess.print_warning (_("For probing a particular line, use a " + ".statement() probe, not .function()"), q->base_probe->tok); // If we have a pattern string with target *line*, we @@ -1816,22 +1818,18 @@ fnmatch (expect_machine2.c_str(), sess_machine.c_str(), 0) != 0) { stringstream msg; - msg << "ELF machine " << expect_machine << "|" << expect_machine2 - << " (code " << elf_machine - << ") mismatch with target " << sess_machine - << " in '" << debug_filename << "'"; + msg << _F("ELF machine %s|%s (code %d) mismatch with target %s in '%s'", + expect_machine.c_str(), expect_machine2.c_str(), elf_machine, + sess_machine.c_str(), debug_filename); throw semantic_error(msg.str ()); } if (q->sess.verbose>2) - clog << "focused on module '" << q->dw.module_name - << " = [0x" << hex << q->dw.module_start - << "-0x" << q->dw.module_end - << ", bias 0x" << q->dw.module_bias << "]" << dec - << " file " << debug_filename - << " ELF machine " << expect_machine << "|" << expect_machine2 - << " (code " << elf_machine << ")" - << "\n"; + clog << _F("focused on module '%s' = [0x%#" PRIx64 ", -0x%#" PRIx64 ", bias 0x%#" PRIx64 + " file %s ELF machine %s|%s (code %d)\n", + q->dw.module_name.c_str(), q->dw.module_start, q->dw.module_end, + q->dw.module_bias, debug_filename, expect_machine.c_str(), + expect_machine2.c_str(), elf_machine); } @@ -1916,7 +1914,7 @@ assert(q->has_kernel); // and no vmlinux to examine if (q->sess.verbose>2) - cerr << "focused on module '" << q->dw.module_name << "'\n"; + cerr << _F("focused on module '%s'\n", q->dw.module_name.c_str()); // Collect a few kernel addresses. XXX: these belong better @@ -1931,8 +1929,12 @@ q->sess.sym_stext = lookup_symbol_address (mod, "_stext"); } - // Finally, search the module for matches of the probe point. - q->handle_query_module(); + if (q->has_library && contains_glob_chars (q->path)) + // handle .library(GLOB) + q->dw.iterate_over_libraries (&q->query_library_callback, q); + else + // search the module for matches of the probe point. + q->handle_query_module(); // If we know that there will be no more matches, abort early. @@ -1949,6 +1951,51 @@ } +void +base_query::query_library_callback (void *q, const char *data) +{ + base_query *me = (base_query*)q; + me->query_library (data); +} + + +void +query_one_library (const char *library, dwflpp & dw, + const string user_lib, probe * base_probe, probe_point *base_loc, + vector & results) +{ + if (dw.function_name_matches_pattern(library, user_lib)) + { + string library_path = find_executable (library, "LD_LIBRARY_PATH"); + probe_point* specific_loc = new probe_point(*base_loc); + specific_loc->optional = true; + vector derived_comps; + + vector::iterator it; + for (it = specific_loc->components.begin(); + it != specific_loc->components.end(); ++it) + if ((*it)->functor == TOK_LIBRARY) + derived_comps.push_back(new probe_point::component(TOK_LIBRARY, + new literal_string(library_path))); + else + derived_comps.push_back(*it); + probe_point* derived_loc = new probe_point(*specific_loc); + derived_loc->components = derived_comps; + probe *new_base = base_probe->create_alias(derived_loc, specific_loc); + derive_probes(dw.sess, new_base, results); + if (dw.sess.verbose > 2) + clog << _("module=") << library_path; + } +} + + +void +dwarf_query::query_library (const char *library) +{ + query_one_library (library, dw, user_lib, base_probe, base_loc, results); +} + + // This would more naturally fit into elaborate.cxx:semantic_pass_symbols, // but the needed declaration for module_cache is not available there. // Nor for that matter in session.cxx. Only in this CU is that field ever @@ -1958,7 +2005,7 @@ { if (s.module_cache) { if (s.verbose > 3) - clog << "deleting module_cache" << endl; + clog << _("deleting module_cache") << endl; delete s.module_cache; s.module_cache = 0; } @@ -2051,14 +2098,19 @@ // Build up a list of supported operators. string ops; std::set::iterator i; + int valid_ops_size = 0; for (i = valid_ops.begin(); i != valid_ops.end(); i++) + { ops += " " + *i + ","; + valid_ops_size++; + } ops.resize(ops.size() - 1); // chop off the last ',' // Throw the error. - throw semantic_error ("Only the following assign operators are" - " implemented on target variables:" + ops, - tok); + throw semantic_error (_F(ngettext("Only the following assign operator is implemented on target variables: %s", + "Only the following assign operators are implemented on target variables: %s", + valid_ops_size), ops.c_str()), tok); + } assert (lvalue == fcall); @@ -2248,11 +2300,11 @@ ts = new target_symbol (e); if (ts->addressof) - throw semantic_error("cannot take address of pretty-printed variable", ts->tok); + throw semantic_error(_("cannot take address of pretty-printed variable"), ts->tok); if (ts->components.empty() || ts->components.back().type != target_symbol::comp_pretty_print) - throw semantic_error("invalid target_symbol for pretty-print", ts->tok); + throw semantic_error(_("invalid target_symbol for pretty-print"), ts->tok); print_full = ts->components.back().member.length() > 1; ts->components.pop_back(); } @@ -3034,7 +3086,7 @@ getfn = "_get_kretprobe_long"; break; default: - throw semantic_error("unknown type to save in kretprobe", e->tok); + throw semantic_error(_("unknown type to save in kretprobe"), e->tok); } // Create the entry code @@ -3184,7 +3236,7 @@ for (semantic_error *c = tsym->saved_conversion_error; c != 0; c = c->chain) { - clog << "variable location problem: " << c->what() << endl; + clog << _("variable location problem: ") << c->what() << endl; } } @@ -3218,7 +3270,7 @@ { bool lvalue = is_active_lvalue(e); if (lvalue && !q.sess.guru_mode) - throw semantic_error("write to target variable not permitted", e->tok); + throw semantic_error(_("write to target variable not permitted"), e->tok); // XXX: process $context vars should be writeable @@ -3230,7 +3282,7 @@ && e->name != "$$return") // nor the other special variable handled below { if (lvalue) - throw semantic_error("write to target variable not permitted in .return probes", e->tok); + throw semantic_error(_("write to target variable not permitted in .return probes"), e->tok); visit_target_symbol_saved_return(e); return; } @@ -3239,10 +3291,10 @@ || (q.has_return && (e->name == "$$return"))) { if (lvalue) - throw semantic_error("cannot write to context variable", e->tok); + throw semantic_error(_("cannot write to context variable"), e->tok); if (e->addressof) - throw semantic_error("cannot take address of context variable", e->tok); + throw semantic_error(_("cannot take address of context variable"), e->tok); e->assert_no_components("dwarf", true); @@ -3254,7 +3306,7 @@ e->components.back().type == target_symbol::comp_pretty_print) { if (lvalue) - throw semantic_error("cannot write to pretty-printed variable", e->tok); + throw semantic_error(_("cannot write to pretty-printed variable"), e->tok); if (q.has_return && (e->name == "$return")) { @@ -3418,6 +3470,8 @@ { scopes = q.dw.getscopes(scope_die); if (scopes.empty()) + //throw semantic_error (_F("unable to find any scopes containing %d", addr), e->tok); + // ((scope_die == NULL) ? "" : (string (" in ") + (dwarf_diename(scope_die) ?: "") + "(" + (dwarf_diename(q.dw.cu) ?: "") ")" )) throw semantic_error ("unable to find any scopes containing " + lex_cast_hex(addr) + ((scope_die == NULL) ? "" @@ -3458,6 +3512,7 @@ userspace_p(userspace_p), result(result) {} void handle_query_module(); + void query_library (const char *) {} }; @@ -3512,7 +3567,7 @@ e.components.back().type == target_symbol::comp_pretty_print) { if (lvalue) - throw semantic_error("cannot write to pretty-printed variable", e.tok); + throw semantic_error(_("cannot write to pretty-printed variable"), e.tok); dwarf_pretty_print dpp(dw, type_die, e.operand, true, userspace_p, e); result = dpp.expand(); @@ -3631,7 +3686,8 @@ if (fd != -1) { if (s.verbose > 2) - clog << "Pass 2: using cached " << cached_module << endl; + //TRANSLATORS: Here we're using a cached module. + clog << _("Pass 2: using cached ") << cached_module << endl; module = cached_module; close(fd); return; @@ -3654,7 +3710,7 @@ { bool lvalue = is_active_lvalue(e); if (lvalue && !s.guru_mode) - throw semantic_error("write to typecast value not permitted", e->tok); + throw semantic_error(_("write to @cast context variable not permitted"), e->tok); if (e->module.empty()) e->module = "kernel"; // "*" may also be reasonable to search all kernel modules @@ -3794,9 +3850,9 @@ { // Assert kernel relocation invariants if (section == "" && dwfl_addr != addr) // addr should be absolute - throw semantic_error ("missing relocation base against", tok); + throw semantic_error (_("missing relocation basis"), tok); if (section != "" && dwfl_addr == addr) // addr should be an offset - throw semantic_error ("inconsistent relocation address", tok); + throw semantic_error (_("inconsistent relocation address"), tok); } // XXX: hack for strange g++/gcc's @@ -3806,9 +3862,8 @@ // Range limit maxactive() value if (has_maxactive && (maxactive_val < 0 || maxactive_val > USHRT_MAX)) - throw semantic_error ("maxactive value out of range [0," - + lex_cast(USHRT_MAX) + "]", - q.base_loc->components.front()->tok); + throw semantic_error (_F("maxactive value out of range [0,%s]", + lex_cast(USHRT_MAX).c_str()), q.base_loc->components.front()->tok); // Expand target variables in the probe body if (!null_die(scope_die)) @@ -3938,8 +3993,7 @@ bool verbose = q.sess.verbose > 2; if (verbose) - clog << "saveargs: examining '" << (dwarf_diename(scope_die) ?: "") - << "' (dieoffset: " << lex_cast_hex(dwarf_dieoffset(scope_die)) << ")\n"; + clog << _F("saveargs: examining '%s' (dieoffset: %#" PRIx64 ")\n", (dwarf_diename(scope_die)?: "unknown"), dwarf_dieoffset(scope_die)); if (has_return) { @@ -3951,9 +4005,8 @@ args.push_back("$return:"+type_name); else if (verbose) - clog << "saveargs: failed to retrieve type name for return value" - << " (dieoffset: " << lex_cast_hex(dwarf_dieoffset(scope_die)) - << ")\n"; + clog << _F("saveargs: failed to retrieve type name for return value (dieoffset: %s)\n", + lex_cast_hex(dwarf_dieoffset(scope_die)).c_str()); } Dwarf_Die arg; @@ -3980,15 +4033,14 @@ if (!arg_name) { if (verbose) - clog << "saveargs: failed to retrieve name for local (dieoffset: " - << lex_cast_hex(dwarf_dieoffset(&arg)) << ")\n"; + clog << _F("saveargs: failed to retrieve name for local (dieoffset: %s)\n", + lex_cast_hex(dwarf_dieoffset(&arg)).c_str()); continue; } if (verbose) - clog << "saveargs: finding location for local '" - << arg_name << "' (dieoffset: " - << lex_cast_hex(dwarf_dieoffset(&arg)) << ")\n"; + clog << _F("saveargs: finding location for local '%s' (dieoffset: %s)\n", + arg_name, lex_cast_hex(dwarf_dieoffset(&arg)).c_str()); /* Ignore this local if it has no location (or not at this PC). */ /* NB: It still may not be directly accessible, e.g. if it is an @@ -4002,19 +4054,16 @@ if (!dwarf_attr_integrate (&arg, DW_AT_location, &attr_mem)) { if (verbose) - clog << "saveargs: failed to resolve the location for local '" - << arg_name << "' (dieoffset: " - << lex_cast_hex(dwarf_dieoffset(&arg)) << ")\n"; + clog << _F("saveargs: failed to resolve the location for local '%s' (dieoffset: %s)\n", + arg_name, lex_cast_hex(dwarf_dieoffset(&arg)).c_str()); continue; } else if (!(dwarf_getlocation_addr(&attr_mem, dwfl_addr, &expr, &len, 1) == 1 && len > 0)) { if (verbose) - clog << "saveargs: local '" << arg_name << "' (dieoffset: " - << lex_cast_hex(dwarf_dieoffset(&arg)) - << ") is not available at this address (" - << lex_cast_hex(dwfl_addr) << ")\n"; + clog << _F("saveargs: local '%s' (dieoffset: %s) is not available at this address (%s)\n", + arg_name, lex_cast_hex(dwarf_dieoffset(&arg)).c_str(), lex_cast_hex(dwfl_addr).c_str()); continue; } } @@ -4026,9 +4075,8 @@ !dwarf_type_name(&type_die, type_name)) { if (verbose) - clog << "saveargs: failed to retrieve type name for local '" - << arg_name << "' (dieoffset: " - << lex_cast_hex(dwarf_dieoffset(&arg)) << ")\n"; + clog << _F("saveargs: failed to retrieve type name for local '%s' (dieoffset: %s)\n", + arg_name, lex_cast_hex(dwarf_dieoffset(&arg)).c_str()); continue; } @@ -4149,20 +4197,44 @@ root->bind(TOK_KERNEL)->bind_str(TOK_FUNCTION)->bind_str(TOK_LABEL) ->bind(dw); + root->bind_str(TOK_MODULE)->bind_str(TOK_FUNCTION)->bind_str(TOK_LABEL) + ->bind(dw); + register_function_and_statement_variants(root->bind_str(TOK_PROCESS), dw, true/*bind_unprivileged*/); + register_function_and_statement_variants(root->bind(TOK_PROCESS), dw, + true/*bind_unprivileged*/); + register_function_and_statement_variants(root->bind_str(TOK_PROCESS) + ->bind_str(TOK_LIBRARY), dw, + true/*bind_unprivileged*/); + register_function_and_statement_variants(root->bind(TOK_PROCESS) + ->bind_str(TOK_LIBRARY), dw, + true/*bind_unprivileged*/); + root->bind_str(TOK_PROCESS)->bind_str(TOK_FUNCTION)->bind_str(TOK_LABEL) ->bind_unprivileged() ->bind(dw); + root->bind(TOK_PROCESS)->bind_str(TOK_FUNCTION)->bind_str(TOK_LABEL) + ->bind_unprivileged() + ->bind(dw); root->bind_str(TOK_PROCESS)->bind_str(TOK_LIBRARY)->bind_str(TOK_MARK) ->bind_unprivileged() ->bind(dw); + root->bind(TOK_PROCESS)->bind_str(TOK_LIBRARY)->bind_str(TOK_MARK) + ->bind_unprivileged() + ->bind(dw); root->bind_str(TOK_PROCESS)->bind_str(TOK_LIBRARY)->bind_str(TOK_PROVIDER)->bind_str(TOK_MARK) ->bind_unprivileged() ->bind(dw); + root->bind(TOK_PROCESS)->bind_str(TOK_LIBRARY)->bind_str(TOK_PROVIDER)->bind_str(TOK_MARK) + ->bind_unprivileged() + ->bind(dw); root->bind_str(TOK_PROCESS)->bind_str(TOK_MARK) ->bind_unprivileged() ->bind(dw); + root->bind(TOK_PROCESS)->bind_str(TOK_MARK) + ->bind_unprivileged() + ->bind(dw); root->bind_str(TOK_PROCESS)->bind_str(TOK_PROVIDER)->bind_str(TOK_MARK) ->bind_unprivileged() ->bind(dw); @@ -4636,7 +4708,7 @@ arg_count (arg_count) { tokenize(arg_string, arg_tokens, " "); - assert(arg_count >= 0 && arg_count <= 10); + assert(arg_count <= 10); } const string & process_name; const string & provider_name; @@ -4650,6 +4722,7 @@ struct sdt_uprobe_var_expanding_visitor: public var_expanding_visitor { + enum regwidths {QI, QIh, HI, SI, DI}; sdt_uprobe_var_expanding_visitor(systemtap_session& s, int elf_machine, const string & process_name, @@ -4665,70 +4738,143 @@ /* Register name mapping table depends on the elf machine of this particular probe target process/file, not upon the host. So we can't just #ifdef _i686_ etc. */ + +#define DRI(name,num,width) dwarf_regs[name]=make_pair(num,width) if (elf_machine == EM_X86_64) { - dwarf_regs["%rax"] = dwarf_regs["%eax"] = dwarf_regs["%ax"] = dwarf_regs["%al"] = dwarf_regs["%ah"] = 0; - dwarf_regs["%rdx"] = dwarf_regs["%edx"] = dwarf_regs["%dx"] = dwarf_regs["%dl"] = dwarf_regs["%dh"] = 1; - dwarf_regs["%rcx"] = dwarf_regs["%ecx"] = dwarf_regs["%cx"] = dwarf_regs["%cl"] = dwarf_regs["%ch"] = 2; - dwarf_regs["%rbx"] = dwarf_regs["%ebx"] = dwarf_regs["%bx"] = dwarf_regs["%bl"] = dwarf_regs["%bh"] = 3; - dwarf_regs["%rsi"] = dwarf_regs["%esi"] = dwarf_regs["%si"] = dwarf_regs["%sil"] = 4; - dwarf_regs["%rdi"] = dwarf_regs["%edi"] = dwarf_regs["%di"] = dwarf_regs["%dil"] = 5; - dwarf_regs["%rbp"] = dwarf_regs["%ebp"] = dwarf_regs["%bp"] = 6; - dwarf_regs["%rsp"] = dwarf_regs["%esp"] = dwarf_regs["%sp"] = 7; - dwarf_regs["%r8"] = dwarf_regs["%r8d"] = dwarf_regs["%r8w"] = dwarf_regs["%r8b"] = 8; - dwarf_regs["%r9"] = dwarf_regs["%r9d"] = dwarf_regs["%r9w"] = dwarf_regs["%r9b"] = 9; - dwarf_regs["%r10"] = dwarf_regs["%r10d"] = dwarf_regs["%r10w"] = dwarf_regs["%r10b"] = 10; - dwarf_regs["%r11"] = dwarf_regs["%r11d"] = dwarf_regs["%r11w"] = dwarf_regs["%r11b"] = 11; - dwarf_regs["%r12"] = dwarf_regs["%r12d"] = dwarf_regs["%r12w"] = dwarf_regs["%r12b"] = 12; - dwarf_regs["%r13"] = dwarf_regs["%r13d"] = dwarf_regs["%r13w"] = dwarf_regs["%r13b"] = 13; - dwarf_regs["%r14"] = dwarf_regs["%r14d"] = dwarf_regs["%r14w"] = dwarf_regs["%r14b"] = 14; - dwarf_regs["%r15"] = dwarf_regs["%r15d"] = dwarf_regs["%r15w"] = dwarf_regs["%r15b"] = 15; + DRI ("%rax", 0, DI); DRI ("%eax", 0, SI); DRI ("%ax", 0, HI); + DRI ("%al", 0, QI); DRI ("%ah", 0, QIh); + DRI ("%rdx", 1, DI); DRI ("%edx", 1, SI); DRI ("%dx", 1, HI); + DRI ("%dl", 1, QI); DRI ("%dh", 1, QIh); + DRI ("%rcx", 2, DI); DRI ("%ecx", 2, SI); DRI ("%cx", 2, HI); + DRI ("%cl", 2, QI); DRI ("%ch", 2, QIh); + DRI ("%rbx", 3, DI); DRI ("%ebx", 3, SI); DRI ("%bx", 3, HI); + DRI ("%bl", 3, QI); DRI ("%bh", 3, QIh); + DRI ("%rsi", 4, DI); DRI ("%esi", 4, SI); DRI ("%si", 4, HI); + DRI ("%sil", 4, QI); + DRI ("%rdi", 5, DI); DRI ("%edi", 5, SI); DRI ("%di", 5, HI); + DRI ("%dil", 5, QI); + DRI ("%rbp", 6, DI); DRI ("%ebp", 6, SI); DRI ("%bp", 6, HI); + DRI ("%rsp", 7, DI); DRI ("%esp", 7, SI); DRI ("%sp", 7, HI); + DRI ("%r8", 8, DI); DRI ("%r8d", 8, SI); DRI ("%r8w", 8, HI); + DRI ("%r8b", 8, QI); + DRI ("%r9", 9, DI); DRI ("%r9d", 9, SI); DRI ("%r9w", 9, HI); + DRI ("%r9b", 9, QI); + DRI ("%r10", 10, DI); DRI ("%r10d", 10, SI); DRI ("%r10w", 10, HI); + DRI ("%r10b", 10, QI); + DRI ("%r11", 11, DI); DRI ("%r11d", 11, SI); DRI ("%r11w", 11, HI); + DRI ("%r11b", 11, QI); + DRI ("%r12", 12, DI); DRI ("%r12d", 12, SI); DRI ("%r12w", 12, HI); + DRI ("%r12b", 12, QI); + DRI ("%r13", 13, DI); DRI ("%r13d", 13, SI); DRI ("%r13w", 13, HI); + DRI ("%r13b", 13, QI); + DRI ("%r14", 14, DI); DRI ("%r14d", 14, SI); DRI ("%r14w", 14, HI); + DRI ("%r14b", 14, QI); + DRI ("%r15", 15, DI); DRI ("%r15d", 15, SI); DRI ("%r15w", 15, HI); + DRI ("%r15b", 15, QI); } else if (elf_machine == EM_386) { - dwarf_regs["%eax"] = dwarf_regs["%ax"] = dwarf_regs["%al"] = dwarf_regs["%ah"] = 0; - dwarf_regs["%ecx"] = dwarf_regs["%cx"] = dwarf_regs["%cl"] = dwarf_regs["%ch"] = 1; - dwarf_regs["%edx"] = dwarf_regs["%dx"] = dwarf_regs["%dl"] = dwarf_regs["%dh"] = 2; - dwarf_regs["%ebx"] = dwarf_regs["%bx"] = dwarf_regs["%bl"] = dwarf_regs["%bh"] = 3; - dwarf_regs["%esp"] = dwarf_regs["%sp"] = 4; - dwarf_regs["%ebp"] = dwarf_regs["%bp"] = 5; - dwarf_regs["%esi"] = dwarf_regs["%si"] = dwarf_regs["%sil"] = 6; - dwarf_regs["%edi"] = dwarf_regs["%di"] = dwarf_regs["%dil"] = 7; + DRI ("%eax", 0, SI); DRI ("%ax", 0, HI); DRI ("%al", 0, QI); + DRI ("%ah", 0, QIh); + DRI ("%ecx", 1, SI); DRI ("%cx", 1, HI); DRI ("%cl", 1, QI); + DRI ("%ch", 1, QIh); + DRI ("%edx", 2, SI); DRI ("%dx", 2, HI); DRI ("%dl", 2, QI); + DRI ("%dh", 2, QIh); + DRI ("%ebx", 3, SI); DRI ("%bx", 3, HI); DRI ("%bl", 3, QI); + DRI ("%bh", 3, QIh); + DRI ("%esp", 4, SI); DRI ("%sp", 4, HI); + DRI ("%ebp", 5, SI); DRI ("%bp", 5, HI); + DRI ("%esi", 6, SI); DRI ("%si", 6, HI); DRI ("%sil", 6, QI); + DRI ("%edi", 7, SI); DRI ("%di", 7, HI); DRI ("%dil", 7, QI); } else if (elf_machine == EM_PPC || elf_machine == EM_PPC64) { - dwarf_regs["%r0"] = 0; dwarf_regs["%r1"] = 1; dwarf_regs["%r2"] = 2; - dwarf_regs["%r3"] = 3; dwarf_regs["%r4"] = 4; dwarf_regs["%r5"] = 5; - dwarf_regs["%r6"] = 6; dwarf_regs["%r7"] = 7; dwarf_regs["%r8"] = 8; - dwarf_regs["%r9"] = 9; dwarf_regs["%r10"] = 10; dwarf_regs["%r11"] = 11; - dwarf_regs["%r12"] = 12; dwarf_regs["%r13"] = 13; dwarf_regs["%r14"] = 14; - dwarf_regs["%r15"] = 15; dwarf_regs["%r16"] = 16; dwarf_regs["%r17"] = 17; - dwarf_regs["%r18"] = 18; dwarf_regs["%r19"] = 19; dwarf_regs["%r20"] = 20; - dwarf_regs["%r21"] = 21; dwarf_regs["%r22"] = 22; dwarf_regs["%r23"] = 23; - dwarf_regs["%r24"] = 24; dwarf_regs["%r25"] = 25; dwarf_regs["%r26"] = 26; - dwarf_regs["%r27"] = 27; dwarf_regs["%r28"] = 28; dwarf_regs["%r29"] = 29; - dwarf_regs["%r30"] = 30; dwarf_regs["%r31"] = 31; + DRI ("%r0", 0, DI); + DRI ("%r1", 1, DI); + DRI ("%r2", 2, DI); + DRI ("%r3", 3, DI); + DRI ("%r4", 4, DI); + DRI ("%r5", 5, DI); + DRI ("%r6", 6, DI); + DRI ("%r7", 7, DI); + DRI ("%r8", 8, DI); + DRI ("%r9", 9, DI); + DRI ("%r10", 10, DI); + DRI ("%r11", 11, DI); + DRI ("%r12", 12, DI); + DRI ("%r13", 13, DI); + DRI ("%r14", 14, DI); + DRI ("%r15", 15, DI); + DRI ("%r16", 16, DI); + DRI ("%r17", 17, DI); + DRI ("%r18", 18, DI); + DRI ("%r19", 19, DI); + DRI ("%r20", 20, DI); + DRI ("%r21", 21, DI); + DRI ("%r22", 22, DI); + DRI ("%r23", 23, DI); + DRI ("%r24", 24, DI); + DRI ("%r25", 25, DI); + DRI ("%r26", 26, DI); + DRI ("%r27", 27, DI); + DRI ("%r28", 28, DI); + DRI ("%r29", 29, DI); + DRI ("%r30", 30, DI); + DRI ("%r31", 31, DI); // PR11821: unadorned register "names" without -mregnames - dwarf_regs["0"] = 0; dwarf_regs["1"] = 1; dwarf_regs["2"] = 2; - dwarf_regs["3"] = 3; dwarf_regs["4"] = 4; dwarf_regs["5"] = 5; - dwarf_regs["6"] = 6; dwarf_regs["7"] = 7; dwarf_regs["8"] = 8; - dwarf_regs["9"] = 9; dwarf_regs["10"] = 10; dwarf_regs["11"] = 11; - dwarf_regs["12"] = 12; dwarf_regs["13"] = 13; dwarf_regs["14"] = 14; - dwarf_regs["15"] = 15; dwarf_regs["16"] = 16; dwarf_regs["17"] = 17; - dwarf_regs["18"] = 18; dwarf_regs["19"] = 19; dwarf_regs["20"] = 20; - dwarf_regs["21"] = 21; dwarf_regs["22"] = 22; dwarf_regs["23"] = 23; - dwarf_regs["24"] = 24; dwarf_regs["25"] = 25; dwarf_regs["26"] = 26; - dwarf_regs["27"] = 27; dwarf_regs["28"] = 28; dwarf_regs["29"] = 29; - dwarf_regs["30"] = 30; dwarf_regs["31"] = 31; + DRI ("0", 0, DI); + DRI ("1", 1, DI); + DRI ("2", 2, DI); + DRI ("3", 3, DI); + DRI ("4", 4, DI); + DRI ("5", 5, DI); + DRI ("6", 6, DI); + DRI ("7", 7, DI); + DRI ("8", 8, DI); + DRI ("9", 9, DI); + DRI ("10", 10, DI); + DRI ("11", 11, DI); + DRI ("12", 12, DI); + DRI ("13", 13, DI); + DRI ("14", 14, DI); + DRI ("15", 15, DI); + DRI ("16", 16, DI); + DRI ("17", 17, DI); + DRI ("18", 18, DI); + DRI ("19", 19, DI); + DRI ("20", 20, DI); + DRI ("21", 21, DI); + DRI ("22", 22, DI); + DRI ("23", 23, DI); + DRI ("24", 24, DI); + DRI ("25", 25, DI); + DRI ("26", 26, DI); + DRI ("27", 27, DI); + DRI ("28", 28, DI); + DRI ("29", 29, DI); + DRI ("30", 30, DI); + DRI ("31", 31, DI); } else if (elf_machine == EM_S390) { - dwarf_regs["%r0"] = 0; dwarf_regs["%r1"] = 1; dwarf_regs["%r2"] = 2; - dwarf_regs["%r3"] = 3; dwarf_regs["%r4"] = 4; dwarf_regs["%r5"] = 5; - dwarf_regs["%r6"] = 6; dwarf_regs["%r7"] = 7; dwarf_regs["%r8"] = 8; - dwarf_regs["%r9"] = 9; dwarf_regs["%r10"] = 10; dwarf_regs["%r11"] = 11; - dwarf_regs["%r12"] = 12; dwarf_regs["%r13"] = 13; dwarf_regs["%r14"] = 14; - dwarf_regs["%r15"] = 15; + DRI ("%r0", 0, DI); + DRI ("%r1", 1, DI); + DRI ("%r2", 2, DI); + DRI ("%r3", 3, DI); + DRI ("%r4", 4, DI); + DRI ("%r5", 5, DI); + DRI ("%r6", 6, DI); + DRI ("%r7", 7, DI); + DRI ("%r8", 8, DI); + DRI ("%r9", 9, DI); + DRI ("%r10", 10, DI); + DRI ("%r11", 11, DI); + DRI ("%r12", 12, DI); + DRI ("%r13", 13, DI); + DRI ("%r14", 14, DI); + DRI ("%r15", 15, DI); } else if (arg_count) { /* permit this case; just fall back to dwarf */ } +#undef DRI need_debug_info = false; tokenize(arg_string, arg_tokens, " "); - assert(arg_count >= 0 && arg_count <= 10); + assert(arg_count <= 10); } systemtap_session& session; @@ -4739,40 +4885,83 @@ stap_sdt_probe_type probe_type; unsigned arg_count; vector arg_tokens; - map dwarf_regs; + map > dwarf_regs; bool need_debug_info; void visit_target_symbol (target_symbol* e); - __uint64_t get_register_width (string); + void visit_target_symbol_arg (target_symbol* e); + void visit_target_symbol_context (target_symbol* e); }; void -sdt_uprobe_var_expanding_visitor::visit_target_symbol (target_symbol *e) +sdt_uprobe_var_expanding_visitor::visit_target_symbol_context (target_symbol* e) { - try + if (e->addressof) + throw semantic_error(_("cannot take address of context variable"), e->tok); + + if (e->name == "$$name") { - if (e->name == "$$name") - { - if (e->addressof) - throw semantic_error("cannot take address of sdt context variable", e->tok); + literal_string *myname = new literal_string (probe_name); + myname->tok = e->tok; + provide(myname); + return; + } - literal_string *myname = new literal_string (probe_name); - myname->tok = e->tok; - provide(myname); - return; - } - if (e->name == "$$provider") - { - if (e->addressof) - throw semantic_error("cannot take address of sdt context variable", e->tok); + else if (e->name == "$$provider") + { + literal_string *myname = new literal_string (provider_name); + myname->tok = e->tok; + provide(myname); + return; + } + + else if (e->name == "$$vars" || e->name == "$$parms") + { + e->assert_no_components("sdt", true); + assert(arg_count <= 10); + + // Convert $$vars to sprintf of a list of vars which we recursively evaluate + // NB: we synthesize a new token here rather than reusing + // e->tok, because print_format::print likes to use + // its tok->content. + token* pf_tok = new token(*e->tok); + pf_tok->content = "sprintf"; + + print_format* pf = print_format::create(pf_tok); + + for (unsigned i = 1; i <= arg_count; ++i) + { + if (i > 1) + pf->raw_components += " "; + target_symbol *tsym = new target_symbol; + tsym->tok = e->tok; + tsym->name = "$arg" + lex_cast(i); + pf->raw_components += tsym->name; + tsym->components = e->components; + + expression *texp = require (tsym); + if (!e->components.empty() && + e->components[0].type == target_symbol::comp_pretty_print) + pf->raw_components += "=%s"; + else + pf->raw_components += "=%#x"; + pf->args.push_back(texp); + } + + pf->components = print_format::string_to_components(pf->raw_components); + provide (pf); + } + else + assert(0); // shouldn't get here +} - literal_string *myname = new literal_string (provider_name); - myname->tok = e->tok; - provide(myname); - return; - } +void +sdt_uprobe_var_expanding_visitor::visit_target_symbol_arg (target_symbol *e) +{ + try + { unsigned argno = 0; // the N in $argN try { @@ -4802,7 +4991,7 @@ // Now we try to parse this thing, which is an assembler operand // expression. If we can't, we warn, back down to need_debug_info // and hope for the best. Here is the syntax for a few architectures. - // Note that the power iN syntax is only for V3 sdt.h; gcc emits N. + // Note that the power iN syntax is only for V3 sdt.h; gcc emits the i. // literal reg reg reg + // indirect offset // x86 $N %rR (%rR) N(%rR) @@ -4884,7 +5073,7 @@ // Build regex pieces out of the known dwarf_regs. We keep two separate // lists: ones with the % prefix (and thus unambigiuous even despite PR11821), // and ones with no prefix (and thus only usable in unambiguous contexts). - for (map::iterator ri = dwarf_regs.begin(); ri != dwarf_regs.end(); ri++) + for (map >::iterator ri = dwarf_regs.begin(); ri != dwarf_regs.end(); ri++) { string regname = ri->first; assert (regname != ""); @@ -4905,29 +5094,41 @@ if (! rc) { string regname = matches[1]; - if (dwarf_regs.find (regname) != dwarf_regs.end()) // known register + map >::iterator ri = dwarf_regs.find (regname); + if (ri != dwarf_regs.end()) // known register { embedded_expr *get_arg1 = new embedded_expr; string width_adjust; - switch (get_register_width (regname)) + switch (ri->second.second) { - case 0xff: width_adjust = ") & 0xff"; break; - case 0xff00: width_adjust = ">>8) & 0xff"; break; - case 0xffff: + case QI: width_adjust = ") & 0xff)"; break; + case QIh: width_adjust = ">>8) & 0xff)"; break; + case HI: // preserve 16 bit register signness - width_adjust = (precision > 0) ? ") & 0xffff" : ")"; + width_adjust = ") & 0xffff)"; + if (precision < 0) + width_adjust += " << 48 >> 48"; + break; + case SI: + // preserve 32 bit register signness + width_adjust = ") & 0xffffffff)"; + if (precision < 0) + width_adjust += " << 32 >> 32"; break; - default: width_adjust = ")"; + default: width_adjust = "))"; } - string type = (precision < 0 ? "(int" : "(uint") - + lex_cast(abs(precision) * 8) + "_t)(("; + string type = ""; + if (probe_type == uprobe3_type) + type = (precision < 0 + ? "(int" : "(uint") + lex_cast(abs(precision) * 8) + "_t)"; + type = type + "(("; get_arg1->tok = e->tok; get_arg1->code = string("/* unprivileged */ /* pure */") - + string(" (int64_t)") + type + + string(" ((int64_t)") + type + (is_user_module (process_name) ? string("u_fetch_register(") : string("k_fetch_register(")) - + lex_cast(dwarf_regs[regname]) + string("))") + + lex_cast(dwarf_regs[regname].first) + string("))") + width_adjust; argexpr = get_arg1; goto matched; @@ -4935,21 +5136,29 @@ // invalid register name, fall through } - // test for OFFSET(REGISTER) + // test for OFFSET(REGISTER) where OFFSET is +-N+-N+-N // NB: Despite PR11821, we can use regnames here, since the parentheses - // make things unambiguous. - rc = regexp_match (asmarg, string("^([-]?[0-9]*)[(](")+regnames+string(")[)]$"), matches); + // make things unambiguous. (Note: gdb/stap-probe.c also parses this) + rc = regexp_match (asmarg, string("^([+-]?[0-9]*)([+-]?[0-9]*)([+-]?[0-9]*)[(](")+regnames+string(")[)]$"), matches); if (! rc) { - string dispstr = matches[1]; + string regname; int64_t disp = 0; - if (dispstr == "") - disp = 0; - else - try - { - disp = lex_cast(dispstr); // should decode positive/negative hex/decimal - } + + int idx; + for (idx = matches.size() - 1; idx > 0; idx--) + if (matches[idx].length()) + { + regname = matches[idx]; + break; + } + + for (int i=1; i < idx; i++) + if (matches[i].length()) + try + { + disp += lex_cast(matches[i]); // should decode positive/negative hex/decimal + } catch (const runtime_error& f) // unparseable offset { goto not_matched; // can't just 'break' out of @@ -4957,7 +5166,6 @@ // value, unfortunately } - string regname = matches[2]; if (dwarf_regs.find (regname) != dwarf_regs.end()) // known register { // synthesize user_long(%{fetch_register(R)%} + D) @@ -4968,7 +5176,7 @@ + (is_user_module (process_name) ? string("u_fetch_register(") : string("k_fetch_register(")) - + lex_cast(dwarf_regs[regname]) + string(")"); + + lex_cast(dwarf_regs[regname].first) + string(")"); // XXX: may we ever need to cast that to a narrower type? literal_number* inc = new literal_number(disp); @@ -5009,7 +5217,13 @@ not_matched: // The asmarg operand was not recognized. Back down to dwarf. if (! session.suppress_warnings) - session.print_warning ("Downgrading SDT_V2 probe argument to dwarf, can't parse '"+asmarg+"'", e->tok); + { + if (probe_type == UPROBE3_TYPE) + session.print_warning (_F("Can't parse SDT_V3 operand '%s'", asmarg.c_str()), e->tok); + else // must be *PROBE2; others don't get asm operands + session.print_warning (_F("Downgrading SDT_V2 probe argument to dwarf, can't parse '%s'", + asmarg.c_str()), e->tok); + } assert (argexpr == 0); need_debug_info = true; provide (e); @@ -5019,12 +5233,13 @@ assert (argexpr != 0); if (session.verbose > 2) - clog << "mapped asm operand " << asmarg << " to " << *argexpr << endl; + //TRANSLATORS: We're mapping the operand to a new expression*. + clog << _F("mapped asm operand %s to ", asmarg.c_str()) << *argexpr << endl; if (e->components.empty()) // We have a scalar { if (e->addressof) - throw semantic_error("cannot take address of sdt variable", e->tok); + throw semantic_error(_("cannot take address of sdt variable"), e->tok); provide (argexpr); return; } @@ -5051,28 +5266,23 @@ } -__uint64_t -sdt_uprobe_var_expanding_visitor::get_register_width (string regname) +void +sdt_uprobe_var_expanding_visitor::visit_target_symbol (target_symbol* e) { - if (elf_machine == EM_X86_64 || elf_machine == EM_386) { - int regno = dwarf_regs.find (regname)->second; - // al,bl,cl,dl - if (regno < 4 && regname[2] == 'l') return 0xff; - // ah,bh,ch,dh - else if (regno < 4 && regname[2] == 'h') return 0xff00; - // ax,bx,cx,dx - else if (regno < 4 && regname[2] == 'x') return 0xffff; - // sil,dil,bpl,spl - else if (regno < 8 && regname.rfind('l') != regname.npos) return 0xff; // sil - // si,di,bp,sp - else if (regno < 8 && regname.length() == 3) return 0xffff; // si - // r8b-r15b - else if (regno < 16 && regname.rfind('b') != regname.npos) return 0xff; // r8b - // r8w-r15w - else if (regno < 16 && regname.rfind('w') != regname.npos) return 0xffff; // r8w - else return 0xffffffff; - } - else return 0xffffffff; + try + { + assert(e->name.size() > 0 && e->name[0] == '$'); + + if (e->name == "$$name" || e->name == "$$provider" || e->name == "$$parms" || e->name == "$$vars") + visit_target_symbol_context (e); + else + visit_target_symbol_arg (e); + } + catch (const semantic_error &er) + { + e->chain (er); + provide (e); + } } @@ -5084,7 +5294,7 @@ if (e->name == "$$name") { if (e->addressof) - throw semantic_error("cannot take address of sdt context variable", e->tok); + throw semantic_error(_("cannot take address of sdt context variable"), e->tok); literal_string *myname = new literal_string (probe_name); myname->tok = e->tok; @@ -5094,7 +5304,7 @@ if (e->name == "$$provider") { if (e->addressof) - throw semantic_error("cannot take address of sdt context variable", e->tok); + throw semantic_error(_("cannot take address of sdt context variable"), e->tok); literal_string *myname = new literal_string (provider_name); myname->tok = e->tok; @@ -5112,9 +5322,9 @@ { } if (argno < 0) - throw semantic_error("invalid variable, must be of the form $argN", e->tok); + throw semantic_error(_("invalid variable, must be of the form $argN"), e->tok); if (argno < 1 || argno > arg_count) - throw semantic_error("invalid argument number", e->tok); + throw semantic_error(_("invalid argument number"), e->tok); bool lvalue = is_active_lvalue(e); functioncall *fc = new functioncall; @@ -5159,7 +5369,7 @@ if (e->components.empty()) // We have a scalar { if (e->addressof) - throw semantic_error("cannot take address of sdt variable", e->tok); + throw semantic_error(_("cannot take address of sdt variable"), e->tok); provide(fc); return; @@ -5186,8 +5396,9 @@ { sdt_query(probe * base_probe, probe_point * base_loc, dwflpp & dw, literal_map_t const & params, - vector & results); + vector & results, const string user_lib); + void query_library (const char *data); void handle_query_module(); private: @@ -5199,6 +5410,7 @@ vector & results; string pp_mark; string pp_provider; + string user_lib; set probes_handled; @@ -5236,9 +5448,9 @@ sdt_query::sdt_query(probe * base_probe, probe_point * base_loc, dwflpp & dw, literal_map_t const & params, - vector & results): + vector & results, const string user_lib): base_query(dw, params), base_probe(base_probe), - base_loc(base_loc), params(params), results(results) + base_loc(base_loc), params(params), results(results), user_lib(user_lib) { assert(get_string_param(params, TOK_MARK, pp_mark)); get_string_param(params, TOK_PROVIDER, pp_provider); // pp_provider == "" -> unspecified @@ -5267,7 +5479,9 @@ if (sess.verbose > 3) { - clog << "matched probe_name " << probe_name << " probe_type "; + //TRANSLATORS: Describing what probe type (kprobe or uprobe) the probe + //TRANSLATORS: is matched to. + clog << _F("matched probe_name %s probe type ", probe_name.c_str()); switch (probe_type) { case uprobe1_type: @@ -5292,17 +5506,18 @@ probe *new_base = convert_location(); probe_point *new_location = new_base->locations[0]; - bool kprobe_found = false; bool need_debug_info = false; + // We could get the Elf* from either dwarf_getelf(dwfl_module_getdwarf(...)) + // or dwfl_module_getelf(...). We only need it for the machine type, which + // should be the same. The bias is used for relocating debuginfoless probes, + // though, so that must come from the possibly-prelinked ELF file, not DWARF. Dwarf_Addr bias; - Elf* elf = (dwarf_getelf (dwfl_module_getdwarf (dw.mod_info->mod, &bias)) - ?: dwfl_module_getelf (dw.mod_info->mod, &bias)); + Elf* elf = dwfl_module_getelf (dw.mod_info->mod, &bias); if (have_kprobe()) { convert_probe(new_base); - kprobe_found = true; // Expand the local variables in the probe body sdt_kprobe_var_expanding_visitor svv (module_val, provider_name, @@ -5421,8 +5636,8 @@ probe_scn_addr = shdr->sh_addr; assert (pdata != NULL); if (sess.verbose > 4) - clog << "got .probes elf scn_addr@0x" << probe_scn_addr << dec - << ", size: " << pdata->d_size << endl; + clog << "got .probes elf scn_addr@0x" << probe_scn_addr << ", size: " + << pdata->d_size << endl; probe_loc = probe_section; return true; } @@ -5520,9 +5735,12 @@ semaphore += base - base_ref; pc += base - base_ref; + // The semaphore also needs the ELF bias added now, so + // record_semaphore can properly relocate it later. + semaphore += bias; + if (sess.verbose > 4) - clog << "saw .note.stapsdt " << probe_name << (provider_name != "" ? " (provider "+provider_name+") " : "") - << "@0x" << hex << pc << dec << endl; + clog << _F(" saw .note.stapsdt %s%s ", probe_name.c_str(), (provider_name != "" ? _(" (provider ")+provider_name+") " : "").c_str()) << "@0x" << hex << pc << dec << endl; handle_probe_entry(); } @@ -5543,8 +5761,7 @@ // because the name of the probe comes first, followed by // the sentinel. if (sess.verbose > 5) - clog << "got unknown probe_type: 0x" << hex << probe_type - << dec << endl; + clog << _F("got unknown probe_type : 0x%x", probe_type) << endl; probe_scn_offset += sizeof(__uint32_t); continue; } @@ -5587,7 +5804,7 @@ probe_scn_offset += sizeof (__uint32_t) - probe_scn_offset % sizeof (__uint32_t); } if (sess.verbose > 4) - clog << "saw .probes " << probe_name << (provider_name != "" ? " (provider "+provider_name+") " : "") + clog << _("saw .probes ") << probe_name << (provider_name != "" ? _(" (provider ")+provider_name+") " : "") << "@0x" << hex << pc << dec << endl; if (dw.function_name_matches_pattern (probe_name, pp_mark) @@ -5605,7 +5822,7 @@ string semaphore = (i==0 ? (provider_name+"_") : "") + probe_name + "_semaphore"; // XXX: multiple addresses? if (sess.verbose > 2) - clog << "looking for semaphore symbol " << semaphore; + clog << _F("looking for semaphore symbol %s ", semaphore.c_str()); Dwarf_Addr addr; if (this->semaphore) @@ -5614,19 +5831,18 @@ addr = lookup_symbol_address(dw.module, semaphore.c_str()); if (addr) { - if (probe_type != uprobe3_type - && dwfl_module_relocations (dw.module) > 0) + if (dwfl_module_relocations (dw.module) > 0) dwfl_module_relocate_address (dw.module, &addr); // XXX: relocation basis? for (unsigned i = start; i < results.size(); ++i) results[i]->sdt_semaphore_addr = addr; if (sess.verbose > 2) - clog << ", found at 0x" << hex << addr << dec << endl; + clog << _(", found at 0x") << hex << addr << dec << endl; return; } else if (sess.verbose > 2) - clog << ", not found" << endl; + clog << _(", not found") << endl; } } @@ -5753,15 +5969,15 @@ switch (probe_type) { case uprobe1_type: - clog << "probe_type == uprobe1, use statement addr: 0x" + clog << _("probe_type == uprobe1, use statement addr: 0x") << hex << pc << dec << endl; break; case uprobe2_type: - clog << "probe_type == uprobe2, use statement addr: 0x" + clog << _("probe_type == uprobe2, use statement addr: 0x") << hex << pc << dec << endl; break; case uprobe3_type: - clog << "probe_type == uprobe3, use statement addr: 0x" + clog << _("probe_type == uprobe3, use statement addr: 0x") << hex << pc << dec << endl; break; case kprobe1_type: @@ -5771,8 +5987,8 @@ clog << "probe_type == kprobe2" << endl; break; default: - clog << "probe_type == use_uprobe_no_dwarf, use label name: " - << "_stapprobe1_" << pp_mark << endl; + clog << _F("probe_type == use_uprobe_no_dwarf, use label name: _stapprobe1_%s", + pp_mark.c_str()) << endl; } switch (probe_type) @@ -5813,6 +6029,13 @@ void +sdt_query::query_library (const char *library) +{ + query_one_library (library, dw, user_lib, base_probe, base_loc, results); +} + + +void dwarf_builder::build(systemtap_session & sess, probe * base, probe_point * location, @@ -5824,6 +6047,7 @@ // may be reused if we try to cross-instrument multiple targets. dwflpp* dw = 0; + literal_map_t filled_parameters = parameters; string module_name; if (has_null_param (parameters, TOK_KERNEL)) @@ -5832,14 +6056,30 @@ } else if (get_param (parameters, TOK_MODULE, module_name)) { + size_t dash_pos = 0; + while((dash_pos=module_name.find('-'))!=string::npos) + module_name.replace(int(dash_pos),1,"_"); + filled_parameters[TOK_MODULE] = new literal_string(module_name); // NB: glob patterns get expanded later, during the offline // elfutils module listing. dw = get_kern_dw(sess, module_name); } - else if (get_param (parameters, TOK_PROCESS, module_name)) - { - string library_name; - + else if (get_param (parameters, TOK_PROCESS, module_name) || has_null_param(parameters, TOK_PROCESS)) + { + if(has_null_param(filled_parameters, TOK_PROCESS)) + { + wordexp_t words; + int rc = wordexp(sess.cmd.c_str(), &words, WRDE_NOCMD|WRDE_UNDEF); + if(rc || words.we_wordc <= 0) + throw semantic_error(_("unspecified process probe is invalid without a -c COMMAND")); + module_name = words.we_wordv[0]; + filled_parameters[TOK_PROCESS] = new literal_string(module_name);// this needs to be used in place of the blank map + // in the case of TOK_MARK we need to modify locations as well + if(location->components[0]->functor==TOK_PROCESS && + location->components[0]->arg == 0) + location->components[0]->arg = new literal_string(module_name); + wordfree (& words); + } // PR6456 process("/bin/*") glob handling if (contains_glob_chars (module_name)) { @@ -5855,7 +6095,8 @@ // Evaluate glob here, and call derive_probes recursively with each match. glob_t the_blob; int rc = glob (module_name.c_str(), 0, NULL, & the_blob); - if (rc) throw semantic_error ("glob " + module_name + " error (" + lex_cast (rc) + ")"); + if (rc) + throw semantic_error (_F("glob %s error (%s)", module_name.c_str(), lex_cast(rc).c_str() )); for (unsigned i = 0; i < the_blob.gl_pathc; ++i) { if (pending_interrupts) return; @@ -5876,8 +6117,8 @@ if (cf) globbed = cf; if (sess.verbose > 1) - clog << "Expanded process(\"" << module_name << "\") to " - << "process(\"" << globbed << "\")" << endl; + clog << _F("Expanded process(\"%s\") to process(\"%s\")", + module_name.c_str(), globbed) << endl; // synthesize a new probe_point, with the glob-expanded string probe_point *pp = new probe_point (*location); probe_point::component* ppc = new probe_point::component (TOK_PROCESS, @@ -5966,8 +6207,8 @@ && S_ISREG (st.st_mode)) // see find_executable() { if (sess.verbose > 1) - clog << "Expanded process(\"" << module_name << "\") to " - << "process(\"" << user_path << "\")" << endl; + clog << _F("Expanded process(\"%s\") to process(\"%s\")", + module_name.c_str(), user_path.c_str()) << endl; assert (location->components.size() > 0); assert (location->components[0]->functor == TOK_PROCESS); @@ -5995,16 +6236,14 @@ script_file.close(); } - if (get_param (parameters, TOK_LIBRARY, library_name)) - { - module_name = find_executable (library_name, "LD_LIBRARY_PATH"); - user_lib = module_name; - } + get_param (parameters, TOK_LIBRARY, user_lib); + if (user_lib.length() && ! contains_glob_chars (user_lib)) + module_name = find_executable (user_lib, "LD_LIBRARY_PATH"); else module_name = user_path; // canonicalize it if (sess.kernel_config["CONFIG_UTRACE"] != string("y")) - throw semantic_error ("process probes not available without kernel CONFIG_UTRACE"); + throw semantic_error (_("process probes not available without kernel CONFIG_UTRACE")); // user-space target; we use one dwflpp instance per module name // (= program or shared library) @@ -6012,18 +6251,18 @@ } if (sess.verbose > 3) - clog << "dwarf_builder::build for " << module_name << endl; + clog << _F("dwarf_builder::build for %s", module_name.c_str()) << endl; string dummy_mark_name; // NB: PR10245: dummy value, need not substitute - => __ if (get_param(parameters, TOK_MARK, dummy_mark_name)) { - sdt_query sdtq(base, location, *dw, parameters, finished_results); + sdt_query sdtq(base, location, *dw, filled_parameters, finished_results, user_lib); dw->iterate_over_modules(&query_module, &sdtq); return; } unsigned results_pre = finished_results.size(); - dwarf_query q(base, location, *dw, parameters, finished_results, user_path, user_lib); + dwarf_query q(base, location, *dw, filled_parameters, finished_results, user_path, user_lib); // XXX: kernel.statement.absolute is a special case that requires no // dwfl processing. This code should be in a separate builder. @@ -6032,7 +6271,7 @@ // assert guru mode for absolute probes if (! q.base_probe->privileged) { - throw semantic_error ("absolute statement probe in unprivileged script", + throw semantic_error (_("absolute statement probe in unprivileged script"), q.base_probe->tok); } @@ -6072,11 +6311,14 @@ } } - sess.print_warning ("cannot probe .return of " + lex_cast(i_n_r) + " inlined function(s):" + quicklist); + sess.print_warning (_F(ngettext("cannot probe .return of %u inlined function %s", + "cannot probe .return of %u inlined functions %s", + quicklist.size()), i_n_r, quicklist.c_str())); // There will be also a "no matches" semantic error generated. } if (sess.verbose > 1) - clog << "skipped .return probe of " + lex_cast(i_n_r) + " inlined function(s)" << endl; + clog << _F(ngettext("skipped .return probe of %u inlined function", + "skipped .return probe of %u inlined functions", i_n_r), i_n_r) << endl; if ((sess.verbose > 3) || (sess.verbose > 2 && results_pre == results_post)) // issue details with high verbosity { for (set::iterator it = q.inlined_non_returnable.begin(); @@ -6095,7 +6337,7 @@ void symbol_table::add_symbol(const char *name, bool weak, bool descriptor, - Dwarf_Addr addr, Dwarf_Addr *high_addr) + Dwarf_Addr addr, Dwarf_Addr */*high_addr*/) { #ifdef __powerpc__ // Map ".sys_foo" to "sys_foo". @@ -6133,11 +6375,8 @@ line++; if (ret < 3) { - cerr << "Symbol table error: Line " - << line - << " of symbol list from " - << path - << " is not in correct format: address type name [module]"; + cerr << _F("Symbol table error: Line %d of symbol list from %s is not in correct format: address type name [module]", + line, path.c_str()); // Caller should delete symbol_table object. return info_absent; } @@ -6153,8 +6392,8 @@ if (map_by_addr.size() < 1) { - cerr << "Symbol table error: " - << path << " contains no function symbols." << endl; + cerr << _F("Symbol table error: %s contains no function symbols.", + path.c_str()) << endl; return info_absent; } return info_present; @@ -6167,21 +6406,27 @@ symbol_table::read_from_elf_file(const string &path, const systemtap_session &sess) { + vector cmd; + cmd.push_back("/usr/bin/nm"); + cmd.push_back("-n"); + cmd.push_back("--defined-only"); + cmd.push_back("path"); + FILE *f; - string cmd = string("/usr/bin/nm -n --defined-only ") + path; - f = popen(cmd.c_str(), "r"); - if (!f) - { - // nm failures are detected by pclose, not popen. - cerr << "Internal error reading symbol table from " - << path << " -- " << strerror (errno); + int child_fd; + pid_t child = stap_spawn_piped(sess.verbose, cmd, NULL, &child_fd); + if (child <= 0 || !(f = fdopen(child_fd, "r"))) + { + // nm failures are detected by stap_waitpid + cerr << _F("Internal error reading symbol table from %s -- %s", + path.c_str(), strerror(errno)); return info_absent; } enum info_status status = read_symbols(f, path); - if (pclose(f) != 0) + if (fclose(f) || stap_waitpid(sess.verbose, child)) { if (status == info_present && ! sess.suppress_warnings) - cerr << "Warning: nm cannot read symbol table from " << path; + cerr << _F("Warning: nm cannot read symbol table from %s", path.c_str()); return info_absent; } return status; @@ -6195,8 +6440,8 @@ if (!f) { if (! sess.suppress_warnings) - cerr << "Warning: cannot read symbol table from " - << path << " -- " << strerror (errno); + cerr << _F("Warning: cannot read symbol table from %s -- %s", + path.c_str(), strerror(errno)); return info_absent; } enum info_status status = read_symbols(f, path); @@ -6205,7 +6450,7 @@ } void -symbol_table::prepare_section_rejection(Dwfl_Module *mod) +symbol_table::prepare_section_rejection(Dwfl_Module *mod __attribute__ ((unused))) { #ifdef __powerpc__ /* @@ -6345,11 +6590,8 @@ { if (name == TOK_KERNEL && !sess.kernel_symtab_path.empty() && ! sess.suppress_warnings) - cerr << "Warning: reading symbol table from " - << elf_path - << " -- ignoring " - << sess.kernel_symtab_path - << endl; + cerr << _F("Warning: reading symbol table from %s -- ignoring %s", + elf_path.c_str(), sess.kernel_symtab_path.c_str()) << endl; symtab_status = sym_table->get_from_elf(); } else @@ -6358,8 +6600,8 @@ if (sess.kernel_symtab_path.empty()) { symtab_status = info_absent; - cerr << "Error: Cannot find vmlinux." - << " Consider using --kmap instead of --kelf." + cerr << _("Error: Cannot find vmlinux." + " Consider using --kmap instead of --kelf.") << endl;; } else @@ -6502,7 +6744,7 @@ struct uprobe_builder: public derived_probe_builder { uprobe_builder() {} - virtual void build(systemtap_session & sess, + virtual void build(systemtap_session &, probe * base, probe_point * location, literal_map_t const & parameters, @@ -6599,20 +6841,19 @@ } else if (p->section != ".absolute") // ET_DYN { - if (p->has_library && p->sdt_semaphore_addr != 0) - s.op->line() << " .procname=\"" << p->path << "\", "; + if (p->has_library) + s.op->line() << " .procname=\"" << p->path << "\", "; s.op->line() << " .mmap_callback=&stap_uprobe_mmap_found, "; s.op->line() << " .munmap_callback=&stap_uprobe_munmap_found, "; s.op->line() << " .callback=&stap_uprobe_process_munmap,"; } - s.op->line() << " },"; if (p->module != "") s.op->line() << " .pathname=" << lex_cast_qstring(p->module) << ", "; s.op->line() << " },"; } else - ; // skip it in this pass, already have a suitable stap_uprobe_tf slot for it. + { } // skip it in this pass, already have a suitable stap_uprobe_tf slot for it. } s.op->newline(-1) << "};"; @@ -6648,8 +6889,13 @@ s.op->newline(1) << "struct stap_uprobe *sup = container_of(inst, struct stap_uprobe, up);"; s.op->newline() << "const struct stap_uprobe_spec *sups = &stap_uprobe_specs [sup->spec_index];"; common_probe_entryfn_prologue (s.op, "STAP_SESSION_RUNNING", "sups->probe"); - s.op->newline() << "if (sup->spec_index < 0 ||" - << "sup->spec_index >= " << probes.size() << ") return;"; // XXX: should not happen + s.op->newline() << "if (sup->spec_index < 0 || " + << "sup->spec_index >= " << probes.size() << ") {"; + s.op->newline(1) << "_stp_error (\"bad spec_index %d (max " << probes.size() + << "): %s\", sup->spec_index, c->probe_point);"; + s.op->newline() << "atomic_dec (&c->busy);"; + s.op->newline() << "goto probe_epilogue;"; + s.op->newline(-1) << "}"; s.op->newline() << "c->regs = regs;"; s.op->newline() << "c->ri = GET_PC_URETPROBE_NONE;"; s.op->newline() << "c->regflags |= _STP_REGS_USER_FLAG;"; @@ -6673,8 +6919,14 @@ s.op->newline() << "const struct stap_uprobe_spec *sups = &stap_uprobe_specs [sup->spec_index];"; common_probe_entryfn_prologue (s.op, "STAP_SESSION_RUNNING", "sups->probe"); s.op->newline() << "c->ri = inst;"; - s.op->newline() << "if (sup->spec_index < 0 ||" - << "sup->spec_index >= " << probes.size() << ") return;"; // XXX: should not happen + s.op->newline() << "if (sup->spec_index < 0 || " + << "sup->spec_index >= " << probes.size() << ") {"; + s.op->newline(1) << "_stp_error (\"bad spec_index %d (max " << probes.size() + << "): %s\", sup->spec_index, c->probe_point);"; + s.op->newline() << "atomic_dec (&c->busy);"; + s.op->newline() << "goto probe_epilogue;"; + s.op->newline(-1) << "}"; + // XXX: kretprobes saves "c->pi = inst;" too s.op->newline() << "c->regs = regs;"; s.op->newline() << "c->regflags |= _STP_REGS_USER_FLAG;"; @@ -7291,7 +7543,7 @@ void -kprobe_builder::build(systemtap_session & sess, +kprobe_builder::build(systemtap_session &, probe * base, probe_point * location, literal_map_t const & parameters, @@ -7338,7 +7590,7 @@ { // assert guru mode for absolute probes if ( has_statement_num && has_absolute && !base->privileged ) - throw semantic_error ("absolute statement probe in unprivileged script", base->tok); + throw semantic_error (_("absolute statement probe in unprivileged script"), base->tok); finished_results.push_back (new kprobe_derived_probe (base, location, "", @@ -7404,8 +7656,7 @@ unsigned int len, bool has_only_read_access, bool has_only_write_access, - bool has_rw_access - ): + bool): derived_probe (base, location, true /* .components soon rewritten */ ), hwbkpt_addr (addr), symbol_name (symname), @@ -7470,9 +7721,8 @@ if (hwbkpt_probes.size() >= max_hwbkpt_probes_by_arch) if (! s.suppress_warnings) - s.print_warning ("Too many hardware breakpoint probes requested for " + s.architecture - + "(" + lex_cast(hwbkpt_probes.size()) + - " vs. " + lex_cast(max_hwbkpt_probes_by_arch) + ")"); + s.print_warning (_F("Too many hardware breakpoint probes requested for %s (%zu vs. %u)", + s.architecture.c_str(), hwbkpt_probes.size(), max_hwbkpt_probes_by_arch)); } void @@ -7501,7 +7751,7 @@ s.op->newline() << "stap_hwbkpt_ret_array[" << hwbkpt_probes.size() << "];"; s.op->newline() << "static struct stap_hwbkpt_probe {"; s.op->newline() << "int registered_p:1;"; -// registered_p = 0 signifies a probe that failed registration +// registered_p = 0 signifies a probe that is unregistered (or failed) // registered_p = 1 signifies a probe that got registered successfully // Symbol Names are mostly small and uniform enough @@ -7519,7 +7769,6 @@ { hwbkpt_derived_probe* p = hwbkpt_probes.at(it); s.op->newline() << "{"; - s.op->line() << " .registered_p=1,"; if (p->symbol_name.size()) s.op->line() << " .address=(unsigned long)0x0" << "ULL,"; else @@ -7613,9 +7862,14 @@ s.op->newline() << "probe_point = sdp->probe->pp;"; // for error messages s.op->newline() << "stap_hwbkpt_ret_array[i] = register_wide_hw_breakpoint(hp, (void *)&enter_hwbkpt_probe);"; + s.op->newline() << "rc = 0;"; s.op->newline() << "if (IS_ERR(stap_hwbkpt_ret_array[i])) {"; - s.op->newline(1) << "int err_code = PTR_ERR(stap_hwbkpt_ret_array[i]);"; - s.op->newline(0) << "_stp_warn(\"Hwbkpt probe %s: registration error %d, addr %p, name %s\", probe_point, err_code, addr, hwbkpt_symbol_name);"; + s.op->newline(1) << "rc = PTR_ERR(stap_hwbkpt_ret_array[i]);"; + s.op->newline() << "stap_hwbkpt_ret_array[i] = 0;"; + s.op->newline(-1) << "}"; + s.op->newline() << "if (rc) {"; + s.op->newline(1) << "_stp_warn(\"Hwbkpt probe %s: registration error %d, addr %p, name %s\", probe_point, rc, addr, hwbkpt_symbol_name);"; + s.op->newline() << "sdp->registered_p = 0;"; s.op->newline(-1) << "}"; s.op->newline() << " else sdp->registered_p = 1;"; s.op->newline(-1) << "}"; // for loop @@ -7655,10 +7909,10 @@ bool has_addr, has_symbol_str, has_write, has_rw, has_len; if (! (sess.kernel_config["CONFIG_PERF_EVENTS"] == string("y"))) - throw semantic_error ("CONFIG_PERF_EVENTS not available on this kernel", + throw semantic_error (_("CONFIG_PERF_EVENTS not available on this kernel"), location->components[0]->tok); if (! (sess.kernel_config["CONFIG_HAVE_HW_BREAKPOINT"] == string("y"))) - throw semantic_error ("CONFIG_HAVE_HW_BREAKPOINT not available on this kernel", + throw semantic_error (_("CONFIG_HAVE_HW_BREAKPOINT not available on this kernel"), location->components[0]->tok); has_addr = get_param (parameters, TOK_HWBKPT, hwbkpt_address); @@ -7677,13 +7931,15 @@ "",len,0, has_write, has_rw)); - else // has symbol_str + else if (has_symbol_str) finished_results.push_back (new hwbkpt_derived_probe (base, location, 0, symbol_str_val,len,0, has_write, has_rw)); + else + assert (0); } // ------------------------------------------------------------------------ @@ -7763,8 +8019,8 @@ // We hope that this value ends up not being referenced after all, so it // can be optimized out quietly. - throw semantic_error("unable to find tracepoint variable '" + e->name - + "' (alternatives:" + alternatives.str () + ")", e->tok); + throw semantic_error(_F("unable to find tracepoint variable '%s' (alternatives: %s)", + e->name.c_str(), alternatives.str().c_str()), e->tok); // NB: we can have multiple errors, since a target variable // may be expanded in several different contexts: // trace ("*") { $foo->bar } @@ -7777,8 +8033,7 @@ // we can only write to dereferenced fields, and only if guru mode is on bool lvalue = is_active_lvalue(e); if (lvalue && (!dw.sess.guru_mode || e->components.empty())) - throw semantic_error("write to tracepoint variable '" + e->name - + "' not permitted", e->tok); + throw semantic_error(_F("write to tracepoint variable '%s' not permitted", e->name.c_str()), e->tok); // XXX: if a struct/union arg is passed by value, then writing to its fields // is also meaningless until you dereference past a pointer member. It's @@ -7787,7 +8042,7 @@ if (e->components.empty()) { if (e->addressof) - throw semantic_error("cannot take address of tracepoint variable", e->tok); + throw semantic_error(_("cannot take address of tracepoint variable"), e->tok); // Just grab the value from the probe locals symbol* sym = new symbol; @@ -7805,7 +8060,7 @@ if (e->components.back().type == target_symbol::comp_pretty_print) { if (lvalue) - throw semantic_error("cannot write to pretty-printed variable", e->tok); + throw semantic_error(_("cannot write to pretty-printed variable"), e->tok); dwarf_pretty_print dpp(dw, &arg->type_die, e2, arg->isptr, false, *e); dpp.expand()->visit (this); @@ -7908,10 +8163,10 @@ tracepoint_var_expanding_visitor::visit_target_symbol_context (target_symbol* e) { if (e->addressof) - throw semantic_error("cannot take address of context variable", e->tok); + throw semantic_error(_("cannot take address of context variable"), e->tok); if (is_active_lvalue (e)) - throw semantic_error("write to tracepoint '" + e->name + "' not permitted", e->tok); + throw semantic_error(_F("write to tracepoint '%s' not permitted", e->name.c_str()), e->tok); if (e->name == "$$name") { @@ -7928,10 +8183,6 @@ { e->assert_no_components("tracepoint", true); - // Convert $$vars to sprintf of a list of vars which we recursively evaluate - // NB: we synthesize a new token here rather than reusing - // e->tok, because print_format::print likes to use - // its tok->content. token* pf_tok = new token(*e->tok); pf_tok->content = "sprintf"; @@ -7957,7 +8208,7 @@ if (dw.sess.verbose>2) for (semantic_error *c = tsym->saved_conversion_error; c != 0; c = c->chain) - clog << "variable location problem: " << c->what() << endl; + clog << _("variable location problem: ") << c->what() << endl; pf->raw_components += "=?"; continue; } @@ -8051,8 +8302,7 @@ } if (sess.verbose > 2) - clog << "tracepoint-based " << name << " tracepoint='" << tracepoint_name - << "'" << endl; + clog << "tracepoint-based " << name << " tracepoint='" << tracepoint_name << "'" << endl; } @@ -8108,7 +8358,7 @@ void -tracepoint_derived_probe::build_args(dwflpp& dw, Dwarf_Die& func_die) +tracepoint_derived_probe::build_args(dwflpp&, Dwarf_Die& func_die) { Dwarf_Die arg; if (dwarf_child(&func_die, &arg) == 0) @@ -8122,16 +8372,14 @@ // read the type of this parameter if (!dwarf_attr_die (&arg, DW_AT_type, &tparg.type_die) || !dwarf_type_name(&tparg.type_die, tparg.c_type)) - throw semantic_error ("cannot get type of tracepoint '" - + tracepoint_name + "' parameter '" - + tparg.name + "'"); + throw semantic_error (_F("cannot get type of parameter '%s' of tracepoint '%s'", + tparg.name.c_str(), tracepoint_name.c_str())); tparg.usable = resolve_tracepoint_arg_type(tparg); args.push_back(tparg); if (sess.verbose > 4) - clog << "found parameter for tracepoint '" << tracepoint_name - << "': type:'" << tparg.c_type - << "' name:'" << tparg.name << "'" << endl; + clog << _F("found parameter for tracepoint '%s': type:'%s' name:'%s'", + tracepoint_name.c_str(), tparg.c_type.c_str(), tparg.name.c_str()) << endl; } while (dwarf_siblingof(&arg, &arg) == 0); } @@ -8183,6 +8431,7 @@ they_live.push_back ("struct xfs_inode;"); they_live.push_back ("struct xfs_buf;"); they_live.push_back ("struct xfs_bmbt_irec;"); + they_live.push_back ("struct xfs_trans;"); } if (s.kernel_config["CONFIG_NFSD"] != string("")) { @@ -8191,6 +8440,13 @@ they_live.push_back ("#include "); + // linux 3.0 + they_live.push_back ("struct cpu_workqueue_struct;"); + + if (s.kernel_config["CONFIG_EXT4_FS"] != string("")) + if (s.kernel_source_tree != "") + they_live.push_back ("#include \"fs/ext4/ext4.h\""); // in kernel-source tree + return they_live; } @@ -8372,6 +8628,7 @@ void handle_query_module(); int handle_query_cu(Dwarf_Die * cudie); int handle_query_func(Dwarf_Die * func); + void query_library (const char *) {} static int tracepoint_query_cu (Dwarf_Die * cudie, void * arg); static int tracepoint_query_func (Dwarf_Die * func, base_query * query); @@ -8452,7 +8709,7 @@ void build_no_more (systemtap_session& s) { if (dw && s.verbose > 3) - clog << "tracepoint_builder releasing dwflpp" << endl; + clog << _("tracepoint_builder releasing dwflpp") << endl; delete dw; dw = NULL; @@ -8472,8 +8729,7 @@ { if (s.verbose > 2) { - clog << "Pass 2: getting a tracequery for " - << headers.size() << " headers:" << endl; + clog << _F("Pass 2: getting a tracepoint query for %zu headers: ", headers.size()) << endl; for (size_t i = 0; i < headers.size(); ++i) clog << " " << headers[i] << endl; } @@ -8489,7 +8745,7 @@ if (fd != -1) { if (s.verbose > 2) - clog << "Pass 2: using cached " << tracequery_path << endl; + clog << _F("Pass 2: using cached %s", tracequery_path.c_str()) << endl; close(fd); return tracequery_path; } @@ -8555,7 +8811,7 @@ if (name) { if (s.verbose > 2) - clog << "Located kernel source tree (DW_AT_comp_dir) at '" << name << "'" << endl; + clog << _F("Located kernel source tree (DW_AT_comp_dir) at '%s'", name) << endl; s.kernel_source_tree = name; break; // skip others; modern Kbuild uses same comp_dir for them all @@ -8575,7 +8831,7 @@ glob_suffixes.push_back("include/trace/events/*.h"); glob_suffixes.push_back("include/trace/*.h"); glob_suffixes.push_back("arch/x86/kvm/*trace.h"); - glob_suffixes.push_back("fs/xfs/linux-2.6/xfs_tr*.h"); + glob_suffixes.push_back("fs/xfs/linux-*/xfs_tr*.h"); // compute cartesian product vector globs; @@ -8587,7 +8843,7 @@ { string glob_str = globs[z]; if (s.verbose > 3) - clog << "Checking tracepoint glob " << glob_str << endl; + clog << _("Checking tracepoint glob ") << glob_str << endl; glob(glob_str.c_str(), 0, NULL, &trace_glob); for (unsigned i = 0; i < trace_glob.gl_pathc; ++i) diff -Nru systemtap-1.4/tapset-timers.cxx systemtap-1.6/tapset-timers.cxx --- systemtap-1.4/tapset-timers.cxx 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/tapset-timers.cxx 2011-07-25 18:12:01.000000000 +0000 @@ -60,13 +60,15 @@ derived_probe (p, l), interval (i), randomize (r), time_is_msecs(ms) { if (interval <= 0 || interval > 1000000) // make i and r fit into plain ints - throw semantic_error ("invalid interval for jiffies timer"); + //TRANSLATORS: 'timer' is the name of a probe point + throw semantic_error (_("invalid interval for jiffies timer")); // randomize = 0 means no randomization if (randomize < 0 || randomize > interval) - throw semantic_error ("invalid randomize for jiffies timer"); + //TRANSLATORS: 'randomize' is a key word + throw semantic_error (_("invalid randomize for jiffies timer")); if (locations.size() != 1) - throw semantic_error ("expect single probe point"); + throw semantic_error (_("only expect one probe point")); // so we don't have to loop over them in the other functions } @@ -194,15 +196,13 @@ derived_probe (p, l), interval (i), randomize (r) { if ((i < min_ns_interval) || (i > max_ns_interval)) - throw semantic_error(string("interval value out of range (") - + lex_cast(scale < min_ns_interval - ? min_ns_interval/scale : 1) - + "," - + lex_cast(max_ns_interval/scale) + ")"); + throw semantic_error(_F("interval value out of range (%s, %s)", + (lex_cast(scale < min_ns_interval ? min_ns_interval/scale : 1).c_str()), + lex_cast(max_ns_interval/scale).c_str())); // randomize = 0 means no randomization if ((r < 0) || (r > i)) - throw semantic_error("randomization value out of range"); + throw semantic_error(_("randomization value out of range")); } void join_group (systemtap_session& s); @@ -550,7 +550,7 @@ else if (get_param(parameters, "hz", period)) { if (period <= 0) - throw semantic_error ("frequency must be greater than 0"); + throw semantic_error (_("frequency must be greater than 0")); period = (1000000000 + period - 1)/period; } else if (get_param(parameters, "s", period) || @@ -580,7 +580,7 @@ // ok } else - throw semantic_error ("unrecognized timer variant"); + throw semantic_error (_("unrecognized timer variant")); // Redirect wallclock-time based probes to hrtimer code on recent // enough kernels. @@ -669,7 +669,8 @@ ->bind_unprivileged() ->bind(builder); - // Not ok for unprivileged users. + // Not ok for unprivileged users, because register_timer_hook only allows a + // single attached callback. No resource-sharing -> no unprivileged access. root->bind("profile") ->bind(builder); } diff -Nru systemtap-1.4/tapset-utrace.cxx systemtap-1.6/tapset-utrace.cxx --- systemtap-1.4/tapset-utrace.cxx 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/tapset-utrace.cxx 2011-07-25 18:12:01.000000000 +0000 @@ -65,6 +65,7 @@ void emit_unprivileged_assertion (translator_output*); void print_dupe_stamp(ostream& o); + void getargs (std::list &arg_set) const; }; @@ -124,7 +125,7 @@ target_symbol_seen(false) { if (s.kernel_config["CONFIG_UTRACE"] != string("y")) - throw semantic_error ("process probes not available without kernel CONFIG_UTRACE"); + throw semantic_error (_("process probes not available without kernel CONFIG_UTRACE")); // Expand local variables in the probe body utrace_var_expanding_visitor v (s, l, name, flags); @@ -205,24 +206,36 @@ void utrace_derived_probe::emit_unprivileged_assertion (translator_output* o) { - // Process end probes are allowed for unprivileged users, even if the process - // does not belong to them. They are required to check is_myproc() from within - // their probe script before doing anything "dangerous". + // Process end probes can fire for unprivileged users even if the process + // does not belong to the user. On example is that process.end will fire + // at the end of a process which executes execve on an executable which + // has the setuid bit set. When the setuid executable ends, the process.end + // will fire even though the owner of the process is different than the + // original owner. + // Unprivileged users must use check is_myproc() from within any + // process.end variant in their script before doing anything "dangerous". if (flags == UDPF_END) return; - // Other process probes are allowed for unprivileged users, but only in the - // context of processes which they own. + // Other process probes should only fire for unprivileged users in the + // context of processes which they own. Generate an assertion to this effect + // as a safety net. emit_process_owner_assertion (o); } void utrace_derived_probe::print_dupe_stamp(ostream& o) { - // Process end probes are allowed for unprivileged users, even if the process - // does not belong to them. They are required to check is_myproc() from within - // their probe script before doing anything "dangerous". - // Other process probes are allowed for unprivileged users, but only in the + // Process end probes can fire for unprivileged users even if the process + // does not belong to the user. On example is that process.end will fire + // at the end of a process which executes execve on an executable which + // has the setuid bit set. When the setuid executable ends, the process.end + // will fire even though the owner of the process is different than the + // original owner. + // Unprivileged users must use check is_myproc() from within any + // process.end variant in their script before doing anything "dangerous". + // + // Other process probes should only fire for unprivileged users in the // context of processes which they own. if (flags == UDPF_END) print_dupe_stamp_unprivileged (o); @@ -230,6 +243,17 @@ print_dupe_stamp_unprivileged_process_owner (o); } +void +utrace_derived_probe::getargs(std::list &arg_set) const +{ + arg_set.push_back("$syscall:long"); + arg_set.push_back("$arg1:long"); + arg_set.push_back("$arg2:long"); + arg_set.push_back("$arg3:long"); + arg_set.push_back("$arg4:long"); + arg_set.push_back("$arg5:long"); + arg_set.push_back("$arg6:long"); +} void utrace_var_expanding_visitor::visit_target_symbol_cached (target_symbol* e) @@ -444,7 +468,7 @@ utrace_var_expanding_visitor::visit_target_symbol_arg (target_symbol* e) { if (flags != UDPF_SYSCALL) - throw semantic_error ("only \"process(PATH_OR_PID).syscall\" support $argN or $$parms.", e->tok); + throw semantic_error (_("only \"process(PATH_OR_PID).syscall\" support $argN or $$parms."), e->tok); if (e->name == "$$parms") { @@ -490,18 +514,18 @@ } catch (const runtime_error& f) // non-integral $arg suffix: e.g. $argKKKSDF { - throw semantic_error ("invalid syscall argument number (1-6)", e->tok); + throw semantic_error (_("invalid syscall argument number (1-6)"), e->tok); } e->assert_no_components("utrace"); // FIXME: max argnument number should not be hardcoded. if (argnum < 1 || argnum > 6) - throw semantic_error ("invalid syscall argument number (1-6)", e->tok); + throw semantic_error (_("invalid syscall argument number (1-6)"), e->tok); bool lvalue = is_active_lvalue(e); if (lvalue) - throw semantic_error("utrace '$argN' variable is read-only", e->tok); + throw semantic_error(_("utrace '$argN' variable is read-only"), e->tok); // Remember that we've seen a target variable. target_symbol_seen = true; @@ -530,13 +554,13 @@ bool lvalue = is_active_lvalue(e); if (lvalue) - throw semantic_error("utrace '" + sname + "' variable is read-only", e->tok); + throw semantic_error(_F("utrace '%s' variable is read-only", sname.c_str()), e->tok); string fname; if (sname == "$return") { if (flags != UDPF_SYSCALL_RETURN) - throw semantic_error ("only \"process(PATH_OR_PID).syscall.return\" support $return.", e->tok); + throw semantic_error (_("only \"process(PATH_OR_PID).syscall.return\" support $return."), e->tok); fname = "_utrace_syscall_return"; } else if (sname == "$syscall") @@ -561,7 +585,7 @@ } else { - throw semantic_error ("unknown target variable", e->tok); + throw semantic_error (_("unknown target variable"), e->tok); } // Remember that we've seen a target variable. @@ -585,18 +609,20 @@ try { if (flags != UDPF_SYSCALL && flags != UDPF_SYSCALL_RETURN) - throw semantic_error ("only \"process(PATH_OR_PID).syscall\" and \"process(PATH_OR_PID).syscall.return\" probes support target symbols", + throw semantic_error (_("only \"process(PATH_OR_PID).syscall\"" + " and \"process(PATH_OR_PID).syscall.return\" probes support target symbols"), e->tok); if (e->addressof) - throw semantic_error("cannot take address of utrace variable", e->tok); + throw semantic_error(_("cannot take address of utrace variable"), e->tok); if (startswith(e->name, "$arg") || e->name == "$$parms") visit_target_symbol_arg(e); else if (e->name == "$syscall" || e->name == "$return") visit_target_symbol_context(e); else - throw semantic_error ("invalid target symbol for utrace probe, $syscall, $return, $argN or $$parms expected", + throw semantic_error (_("invalid target symbol for utrace probe," + " $syscall, $return, $argN or $$parms expected"), e->tok); } catch (const semantic_error &er) @@ -661,7 +687,7 @@ { // We can't probe 'init' (pid 1). XXX: where does this limitation come from? if (pid < 2) - throw semantic_error ("process pid must be greater than 1", + throw semantic_error (_("process pid must be greater than 1"), location->components.front()->tok); // XXX: could we use /proc/$pid/exe in unwindsym_modules and elsewhere? diff -Nru systemtap-1.4/testsuite/buildok/aux_syscalls-embedded.stp systemtap-1.6/testsuite/buildok/aux_syscalls-embedded.stp --- systemtap-1.4/testsuite/buildok/aux_syscalls-embedded.stp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/buildok/aux_syscalls-embedded.stp 2011-07-25 18:12:01.000000000 +0000 @@ -109,4 +109,9 @@ print (_struct_old_sigaction32_u(0)) print (irqflags_str(0)) + + print (_ptrace_argstr(0,0,0,0)) + print (_ptrace_return_geteventmsg_data(0,0)) + # Implementation is in arch specific files but with compatible API. + print (_ptrace_return_arch_prctl_addr(0,0,0)) } diff -Nru systemtap-1.4/testsuite/buildok/context-embedded.stp systemtap-1.6/testsuite/buildok/context-embedded.stp --- systemtap-1.4/testsuite/buildok/context-embedded.stp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/buildok/context-embedded.stp 2011-07-25 18:12:01.000000000 +0000 @@ -23,6 +23,7 @@ printf("%s\n", module_name()) printf("%d\n", stp_pid() + stack_size() + stack_used() + stack_unused()) + printf("addr: 0x%x\n", addr()) printf("uaddr: 0x%x\n", uaddr()) log(cmdline_args(1, 1, "bar")) log(cmdline_arg(0)) diff -Nru systemtap-1.4/testsuite/buildok/nd_syscalls2-detailed.stp systemtap-1.6/testsuite/buildok/nd_syscalls2-detailed.stp --- systemtap-1.4/testsuite/buildok/nd_syscalls2-detailed.stp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/buildok/nd_syscalls2-detailed.stp 2011-07-25 18:12:01.000000000 +0000 @@ -1375,7 +1375,7 @@ } probe nd_syscall.wait4.return { - printf("%s, %s\n", name, retstr) + printf("%s, %s, %s\n", name, retstr, status_str) } probe nd_syscall.waitid diff -Nru systemtap-1.4/testsuite/buildok/syscalls2-detailed.stp systemtap-1.6/testsuite/buildok/syscalls2-detailed.stp --- systemtap-1.4/testsuite/buildok/syscalls2-detailed.stp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/buildok/syscalls2-detailed.stp 2011-07-25 18:12:01.000000000 +0000 @@ -1372,7 +1372,7 @@ } probe syscall.wait4.return { - printf("%s, %s\n", name, retstr) + printf("%s, %s, %s\n", name, retstr, status_str) } probe syscall.waitid diff -Nru systemtap-1.4/testsuite/buildok/timestamp-embedded.stp systemtap-1.6/testsuite/buildok/timestamp-embedded.stp --- systemtap-1.4/testsuite/buildok/timestamp-embedded.stp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/buildok/timestamp-embedded.stp 2011-07-25 18:12:01.000000000 +0000 @@ -5,4 +5,6 @@ println(tz_gmtoff()) println(tz_name()) println(tz_ctime(0)) + println(jiffies()) + println(HZ()) } diff -Nru systemtap-1.4/testsuite/buildok/twentyseven.stp systemtap-1.6/testsuite/buildok/twentyseven.stp --- systemtap-1.4/testsuite/buildok/twentyseven.stp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/buildok/twentyseven.stp 2011-07-25 18:12:01.000000000 +0000 @@ -2,5 +2,5 @@ probe syscall.execve { - print($argv[0]) + print(@defined($__argv) ? $__argv[0] : $argv[0]) } diff -Nru systemtap-1.4/testsuite/buildok/vfs-detailed.stp systemtap-1.6/testsuite/buildok/vfs-detailed.stp --- systemtap-1.4/testsuite/buildok/vfs-detailed.stp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/buildok/vfs-detailed.stp 2011-07-25 18:12:01.000000000 +0000 @@ -208,13 +208,13 @@ printf("%d\n", pos) } -probe vfs.block_sync_page +probe vfs.block_sync_page ? { printf("%s %s\n", name, argstr) printf("%p %s %d %d\n", dev, devname, ino, index) printf("%d %s\n", size, units) } -probe vfs.block_sync_page.return +probe vfs.block_sync_page.return ? { printf("%s %s\n", name, retstr) } diff -Nru systemtap-1.4/testsuite/configure systemtap-1.6/testsuite/configure --- systemtap-1.4/testsuite/configure 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/configure 2011-07-25 18:12:01.000000000 +0000 @@ -1,8 +1,8 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.66 for systemtap 1.4. +# Generated by GNU Autoconf 2.66 for systemtap 1.6. # -# Report bugs to . +# Report bugs to . # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -230,10 +230,10 @@ $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and -$0: systemtap@sources.redhat.com about your system, -$0: including any error possibly output before this -$0: message. Then install a modern shell, or manually run -$0: the script under such a shell if you do have one." +$0: systemtap@sourceware.org about your system, including +$0: any error possibly output before this message. Then +$0: install a modern shell, or manually run the script +$0: under such a shell if you do have one." fi exit 1 fi @@ -551,9 +551,9 @@ # Identity of this package. PACKAGE_NAME='systemtap' PACKAGE_TARNAME='systemtap' -PACKAGE_VERSION='1.4' -PACKAGE_STRING='systemtap 1.4' -PACKAGE_BUGREPORT='systemtap@sources.redhat.com' +PACKAGE_VERSION='1.6' +PACKAGE_STRING='systemtap 1.6' +PACKAGE_BUGREPORT='systemtap@sourceware.org' PACKAGE_URL='' ac_subst_vars='LTLIBOBJS @@ -1175,7 +1175,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures systemtap 1.4 to adapt to many kinds of systems. +\`configure' configures systemtap 1.6 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1241,7 +1241,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of systemtap 1.4:";; + short | recursive ) echo "Configuration of systemtap 1.6:";; esac cat <<\_ACEOF @@ -1260,7 +1260,7 @@ enable rebuilding of large external apps for testing markers -Report bugs to . +Report bugs to . _ACEOF ac_status=$? fi @@ -1323,7 +1323,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -systemtap configure 1.4 +systemtap configure 1.6 generated by GNU Autoconf 2.66 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1340,7 +1340,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by systemtap $as_me 1.4, which was +It was created by systemtap $as_me 1.6, which was generated by GNU Autoconf 2.66. Invocation command line was $ $0 $@ @@ -2157,7 +2157,7 @@ # Define the identity of the package. PACKAGE='systemtap' - VERSION='1.4' + VERSION='1.6' cat >>confdefs.h <<_ACEOF @@ -2801,7 +2801,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by systemtap $as_me 1.4, which was +This file was extended by systemtap $as_me 1.6, which was generated by GNU Autoconf 2.66. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -2848,13 +2848,13 @@ Configuration files: $config_files -Report bugs to ." +Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -systemtap config.status 1.4 +systemtap config.status 1.6 configured by $0, generated by GNU Autoconf 2.66, with options \\"\$ac_cs_config\\" diff -Nru systemtap-1.4/testsuite/configure.ac systemtap-1.6/testsuite/configure.ac --- systemtap-1.4/testsuite/configure.ac 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/configure.ac 2011-07-25 18:12:01.000000000 +0000 @@ -1,7 +1,7 @@ dnl configure.ac --- autoconf input file for systemtap testsuite dnl Process this file with autoconf to produce a configure script. -AC_INIT([systemtap], 1.4, systemtap@sources.redhat.com, systemtap) +AC_INIT([systemtap], 1.6, systemtap@sourceware.org, systemtap) AC_PREREQ(2.59) AC_CONFIG_AUX_DIR(..) diff -Nru systemtap-1.4/testsuite/.cvsignore systemtap-1.6/testsuite/.cvsignore --- systemtap-1.4/testsuite/.cvsignore 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/.cvsignore 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -Makefile probe.out site.exp systemtap.log systemtap.sum .systemtap -config.log config.status -access acct alarm chmod clock dir forkwait itimer link mmap mount net1 -openclose probe.out_0 readwrite rt_signal sendfile signal stat statfs -swap sync timer trunc uid uid16 umask unlink diff -Nru systemtap-1.4/testsuite/.gitignore systemtap-1.6/testsuite/.gitignore --- systemtap-1.4/testsuite/.gitignore 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/.gitignore 2011-07-25 18:12:01.000000000 +0000 @@ -2,6 +2,8 @@ site.exp systemtap.log systemtap.sum +dbg.log +server.log *.so *_exe *.exe.[0-9] diff -Nru systemtap-1.4/testsuite/lib/stap_run2.exp systemtap-1.6/testsuite/lib/stap_run2.exp --- systemtap-1.4/testsuite/lib/stap_run2.exp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/lib/stap_run2.exp 2011-07-25 18:12:01.000000000 +0000 @@ -15,7 +15,7 @@ if {[llength $args] == 0} { stap_run3 $TEST_NAME $TEST_FILE } else { - stap_run3 $TEST_NAME $TEST_FILE $args + eval stap_run3 "$TEST_NAME $TEST_FILE $args" } } diff -Nru systemtap-1.4/testsuite/lib/stap_run.exp systemtap-1.6/testsuite/lib/stap_run.exp --- systemtap-1.4/testsuite/lib/stap_run.exp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/lib/stap_run.exp 2011-07-25 18:12:01.000000000 +0000 @@ -118,5 +118,10 @@ } print_system_info + # tests better all be true -set all_pass_string "(systemtap test success\r\n)+$" +# +# BZ692445 was fixed by removing the '$' at the end of +# all_pass_string. Yet another expect regular expression oddity. The +# '\r\n' is good enough at finding the EOL. +set all_pass_string "(systemtap test success\r\n)+" diff -Nru systemtap-1.4/testsuite/lib/systemtap.exp systemtap-1.6/testsuite/lib/systemtap.exp --- systemtap-1.4/testsuite/lib/systemtap.exp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/lib/systemtap.exp 2011-07-25 18:12:01.000000000 +0000 @@ -27,22 +27,10 @@ proc uprobes_p {} { - global env - if {! [utrace_p]} { - return 0 - } - set uprobes $env(SYSTEMTAP_RUNTIME)/uprobes - set res [catch "exec make -q -C $uprobes uprobes.ko" output] - if {$res != 0} { - # build as user at $uprobes which will be the source - # tree for 'make check' and the install tree for - # 'make installcheck'. - verbose -log "exec make -C $uprobes" - set res [catch "exec make -C $uprobes" output] - verbose -log "OUT $output" - verbose -log "RC $res" - } - if {$res == 0} { return 1 } else { return 0 } + # If this is a utrace kernel, then we can use our version of uprobes. + # No need to build it now, stap will handle that itself. + if {[utrace_p]} { return 1 } + return 0 } @@ -113,7 +101,7 @@ # Make sure that the necessary resources are available to run the client/server. if {[catch {exec /usr/bin/which avahi-publish-service} dummy]} then { - print "Unable to start a server: avahi-publish-service is not found in PATH" + verbose -log "Unable to start a server: avahi-publish-service is not found in PATH" return 0 } @@ -133,25 +121,31 @@ # Make sure that stap can find the server. set use_server --use-server - set res [catch { exec stap --list-servers=online,trusted,compatible 2>@ stdout | grep "^ host" } looksee] - verbose -log "stap --list-servers found:\n$looksee" + set res [catch { exec stap --list-servers=online,trusted,compatible >& stap-list-servers.out } looksee] + verbose -log "stap --list-servers returned: res==$res" + verbose -log $looksee[exec cat stap-list-servers.out] + set res [catch { exec grep "^ host" stap-list-servers.out } looksee] + verbose -log "grep for servers returned: res==$res\n$looksee" + if {$res != 0} then { - print "Unable to automatically find a systemtap server -- check firewall settings for mDNS" + verbose -log "Unable to automatically find the systemtap server -- check firewall settings for mDNS" # Try to discover the port the server is listening on from the server # log. set res [catch { exec /bin/cat [exec pwd]/server.log | awk "/^Systemtap Compile Server on port .* ready/ {print \$6}" } server_port] if {$res != 0} then { - print "Unable to discover the port used by the systemtap server" + verbose -log "Unable to discover the port used by the systemtap server" + shutdown_server return 0 } - set server_spec $env(HOSTNAME):$server_port - print "Client/Server tests will be run by contacting the server directly as $server_spec" + set server_spec [info hostname]:$server_port + verbose -log "Client/Server tests will be run by contacting the server directly as $server_spec" # Make sure stap can contact the server directly set use_server --use-server=$server_spec set res [catch {exec stap $use_server -p2 -e {probe begin {exit()}}} looksee] if {$res != 0} then { - print "Unable to contact the server at $server_spec directly" + verbose -log "Unable to contact the server at $server_spec directly" + shutdown_server return 0 } } @@ -161,28 +155,32 @@ set path "$net_path/stap" set fp [open $path "w"] puts $fp "#!/bin/sh" - puts $fp "[exec which stap] $use_server \"\$@\"" + # NB: [which stap] does not necessarily work here, because + # $PATH might already have had .../testsuite/net added, + # leading to an infinite fork/exec loop. + puts $fp "exec $installed_stap $use_server \"\$@\"" close $fp exec chmod +x $path # Add the wrapper script to the PATH after creating it - set installed_stap [exec which stap] set env(PATH) "$net_path:$env(PATH)" return 1 } proc start_server {} { - global srcdir env server_pid + global srcdir env server_pid installed_stap # Server management scripts and data are installed if this is an # install test, otherwise there is some setup to do. # Make sure the server management scripts and tools are on the $PATH. if {! [installtest_p]} then { set env(PATH) "$srcdir/..:[exec pwd]/..:$env(PATH)" + set installed_stap "[exec pwd]/../stap" set env(SYSTEMTAP_SERVER_SCRIPTS) "$srcdir/.." } else { set env(PATH) "$env(PKGLIBDIR):$env(PATH)" + set installed_stap "$env(SYSTEMTAP_PATH)/stap" set env(SYSTEMTAP_SERVER_SCRIPTS) $env(PKGLIBDIR) } @@ -195,10 +193,21 @@ exec touch $logfile exec chmod 666 $logfile + # Start with fresh server certificates + exec rm -fr $env(SYSTEMTAP_DIR)/ssl + # Try to start the server. - set server_pid [exec env STAP_PR11197_OVERRIDE=1 env SYSTEMTAP_STAP=[exec which stap] stap-start-server --log=$logfile] - if { "$server_pid" == "" } then { - print "Cannot start a systemtap server" + set status 0 + if {[catch {exec env STAP_PR11197_OVERRIDE=1 \ + env SYSTEMTAP_STAP=[exec which stap] stap-start-server \ + --log=$logfile} server_pid]} { + if {[lindex $::errorCode 0] eq "CHILDSTATUS"} { + set status [lindex $::errorCode 2] + } + } + verbose -log "output: $server_pid" + if { "$server_pid" == "" || $status != 0 } then { + verbose -log "Cannot start a systemtap server" set server_pid 0 return 0 } else { @@ -230,6 +239,16 @@ } } +proc normalize_arch { arch } { + if {$arch == "ppc64"} then {return "powerpc"} + if {$arch == "s390x"} then {return "s390"} + if {$arch == "i686"} then {return "i386"} + if {$arch == "armv5tel"} then {return "arm"} + if {$arch == "armv7l"} then {return "arm"} + if {$arch == "armv7lh"} then {return "arm"} + return $arch +} + proc get_system_info {} { global Host Snapshot Distro GCC_Version env @@ -379,3 +398,10 @@ return $flags } + +proc stripped_p { EXE } { + if { [catch {eval exec "file $EXE | grep -q \"not stripped\""} dummy] } { + return 1 + } + return 0 +} diff -Nru systemtap-1.4/testsuite/Makefile.am systemtap-1.6/testsuite/Makefile.am --- systemtap-1.4/testsuite/Makefile.am 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/Makefile.am 2011-07-25 18:12:01.000000000 +0000 @@ -27,6 +27,7 @@ # but installcheck does not follow an implicit check-DEJAGNU, go figure installcheck: site.exp + -rmmod uprobes 2>/dev/null -$(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU RUNTESTFLAGS="$(RUNTESTFLAGS) --tool_opts \'install $(TOOL_OPTS)\'" if test -n "$(DEJAZILLA)"; then mail $(DEJAZILLA) < systemtap.sum; fi @@ -41,4 +42,4 @@ RUNTESTDEFAULTFLAGS = --tool $$tool --tool_opts \'$(TOOL_OPTS)\' --srcdir $$srcdir EXPECT = expect -RUNTEST="env SYSTEMTAP_TESTAPPS=$(TESTAPPS) SYSTEMTAP_RUNTIME=$(SYSTEMTAP_RUNTIME) SYSTEMTAP_TAPSET=$(SYSTEMTAP_TAPSET) LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) CRASH_LIBDIR=$(CRASH_LIBDIR) PATH=$(SYSTEMTAP_PATH):$$PATH SYSTEMTAP_PATH=$(SYSTEMTAP_PATH) SYSTEMTAP_INCLUDES=$(SYSTEMTAP_INCLUDES) PKGLIBDIR=$(pkglibexecdir) $(srcdir)/execrc runtest" +RUNTEST="env LANG=C SYSTEMTAP_TESTREMOTES=$(TESTREMOTES) SYSTEMTAP_TESTAPPS=$(TESTAPPS) SYSTEMTAP_RUNTIME=$(SYSTEMTAP_RUNTIME) SYSTEMTAP_TAPSET=$(SYSTEMTAP_TAPSET) LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) CRASH_LIBDIR=$(CRASH_LIBDIR) PATH=$(SYSTEMTAP_PATH):$$PATH SYSTEMTAP_PATH=$(SYSTEMTAP_PATH) SYSTEMTAP_INCLUDES=$(SYSTEMTAP_INCLUDES) PKGLIBDIR=$(pkglibexecdir) $(srcdir)/execrc runtest" diff -Nru systemtap-1.4/testsuite/Makefile.in systemtap-1.6/testsuite/Makefile.in --- systemtap-1.4/testsuite/Makefile.in 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/Makefile.in 2011-07-25 18:12:01.000000000 +0000 @@ -137,7 +137,7 @@ SYSTEMTAP_INCLUDES = $(DESTDIR)$(includedir) RUNTESTDEFAULTFLAGS = --tool $$tool --tool_opts \'$(TOOL_OPTS)\' --srcdir $$srcdir EXPECT = expect -RUNTEST = "env SYSTEMTAP_TESTAPPS=$(TESTAPPS) SYSTEMTAP_RUNTIME=$(SYSTEMTAP_RUNTIME) SYSTEMTAP_TAPSET=$(SYSTEMTAP_TAPSET) LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) CRASH_LIBDIR=$(CRASH_LIBDIR) PATH=$(SYSTEMTAP_PATH):$$PATH SYSTEMTAP_PATH=$(SYSTEMTAP_PATH) SYSTEMTAP_INCLUDES=$(SYSTEMTAP_INCLUDES) PKGLIBDIR=$(pkglibexecdir) $(srcdir)/execrc runtest" +RUNTEST = "env LANG=C SYSTEMTAP_TESTREMOTES=$(TESTREMOTES) SYSTEMTAP_TESTAPPS=$(TESTAPPS) SYSTEMTAP_RUNTIME=$(SYSTEMTAP_RUNTIME) SYSTEMTAP_TAPSET=$(SYSTEMTAP_TAPSET) LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) CRASH_LIBDIR=$(CRASH_LIBDIR) PATH=$(SYSTEMTAP_PATH):$$PATH SYSTEMTAP_PATH=$(SYSTEMTAP_PATH) SYSTEMTAP_INCLUDES=$(SYSTEMTAP_INCLUDES) PKGLIBDIR=$(pkglibexecdir) $(srcdir)/execrc runtest" all: all-am .SUFFIXES: @@ -345,6 +345,7 @@ # but installcheck does not follow an implicit check-DEJAGNU, go figure installcheck: site.exp + -rmmod uprobes 2>/dev/null -$(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU RUNTESTFLAGS="$(RUNTESTFLAGS) --tool_opts \'install $(TOOL_OPTS)\'" if test -n "$(DEJAZILLA)"; then mail $(DEJAZILLA) < systemtap.sum; fi diff -Nru systemtap-1.4/testsuite/parseko/cmdline22.stp systemtap-1.6/testsuite/parseko/cmdline22.stp --- systemtap-1.4/testsuite/parseko/cmdline22.stp 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/testsuite/parseko/cmdline22.stp 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,16 @@ +#!/bin/sh + +# Test a TMPDIR that is technically legal, but has "weird" characters. +# Anything that would trip up a shell or makefile is bad, including spaces. + +TMPDIR="/tmp/stap tmp here" +export TMPDIR + +mkdir "$TMPDIR" || exit 0 # "success" signals a problem for parseko + +stap -p1 -e 'probe begin { exit() }' +RC=$? + +rmdir "$TMPDIR" || exit 0 + +exit $RC diff -Nru systemtap-1.4/testsuite/parseko/source_context.stp systemtap-1.6/testsuite/parseko/source_context.stp --- systemtap-1.4/testsuite/parseko/source_context.stp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/parseko/source_context.stp 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -probe timer.ms(123) -{ -printf("Probe successful\n") - eeexit () -} diff -Nru systemtap-1.4/testsuite/semko/source_context.stp systemtap-1.6/testsuite/semko/source_context.stp --- systemtap-1.4/testsuite/semko/source_context.stp 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/testsuite/semko/source_context.stp 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,7 @@ +#! stap -p2 + +probe timer.ms(123) +{ +printf("Probe successful\n") + eeexit () +} diff -Nru systemtap-1.4/testsuite/sys/sdt.h systemtap-1.6/testsuite/sys/sdt.h --- systemtap-1.4/testsuite/sys/sdt.h 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/sys/sdt.h 2011-07-25 18:12:01.000000000 +0000 @@ -4,7 +4,12 @@ #if defined STAP_SDT_V1 || defined STAP_SDT_V2 || \ defined EXPERIMENTAL_KPROBE_SDT #include -#include "../../sdt_types.h" + +/* Also defined in "sdt_types.h" Defined here for systemtap-testsuite */ +#define UPROBE1_TYPE 0x31425250 /* "PRB1" (little-endian) */ +#define KPROBE1_TYPE 0x32425250 /* "PRB2" */ +#define UPROBE2_TYPE 0x32425055 /* "UPB2" */ +#define KPROBE2_TYPE 0x3242504b /* "KPB2" */ #ifdef __LP64__ #define STAP_PROBE_ADDR(arg) "\t.quad " arg diff -Nru systemtap-1.4/testsuite/systemtap.apps/mysql.exp systemtap-1.6/testsuite/systemtap.apps/mysql.exp --- systemtap-1.4/testsuite/systemtap.apps/mysql.exp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.apps/mysql.exp 2011-07-25 18:12:01.000000000 +0000 @@ -330,10 +330,12 @@ # mysql erroneously defines min/max which c++ limits (via sdt.h) also defines sed -i -e '/HAVE_DTRACE/i\\ +#pragma push_macro(\"max\")\\ +#pragma push_macro(\"min\")\\ #undef max\\ #undef min' -e '/endif.*PROBES_MYSQL_H/i\\ -#define max(a, b) ((a) > (b) ? (a) : (b))\\ -#define min(a, b) ((a) < (b) ? (a) : (b))' ../src/include/probes_mysql.h +#pragma pop_macro(\"max\")\\ +#pragma pop_macro(\"min\")' ../src/include/probes_mysql.h make -j\$J make install diff -Nru systemtap-1.4/testsuite/systemtap.apps/postgres.exp systemtap-1.6/testsuite/systemtap.apps/postgres.exp --- systemtap-1.4/testsuite/systemtap.apps/postgres.exp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.apps/postgres.exp 2011-07-25 18:12:01.000000000 +0000 @@ -12,11 +12,9 @@ } ########## Create /tmp/stap-postgres.stp ########## -set postgresrelease "8.4.4" -set postgresbuild "[pwd]/postgresql-$postgresrelease/bld" -set postgresdir "[pwd]/postgresql-$postgresrelease/install/" set pgdata "/tmp/stap-postgres" - +set postgresrelease "9.0.4" +set postgresdir "[pwd]/postgresql-$postgresrelease/install/" set fp [open "$pgdata.stp" "w"] puts $fp " @@ -83,7 +81,7 @@ sleep 5 done -(cd $postgresbuild/src/test/regress/ +(cd $postgresdir/../src/test/regress/ make installcheck > $pgdata.log 2>&1) ACQUIRE=\$(grep 'lwlock__acquire 0x\[0-9\]* 0x\[0-9\]*' $pgdata-markers.log | wc -l) @@ -96,18 +94,18 @@ : 44873 75325 591 489 0 if \[ \$ACQUIRE -gt 40000 -a \$RELEASE -gt 70000 -a \$START -gt 500 -a \$COMMIT -gt 400 \] ; then - echo PASS: postgres tests \$1 + echo PASS: postgres tests \$ACQUIRE/\$RELEASE/\$START/\$COMMIT else - echo FAIL: postgres tests \$1 + echo FAIL: postgres tests \$ACQUIRE/\$RELEASE/\$START/\$COMMIT fi if \[ \$OKAY -gt 100 \] ; then - echo PASS: postgres markers \$1 + echo PASS: postgres markers \$OKAY else - echo FAIL: postgres markers \$1 + echo FAIL: postgres markers \$OKAY fi -/usr/local/pgsql/bin/pg_ctl stop -D $pgdata +$postgresdir/bin/pg_ctl stop -D $pgdata kill \$STAPPID \} @@ -119,25 +117,25 @@ exit fi -if \[ ! -d $postgresbuild/src/backend \] ; then +if \[ ! -d $postgresdir/../src/backend \] ; then tar -x -f postgresql-${postgresrelease}.tar.bz2 fi cd postgresql-${postgresrelease}/ -mkdir bld;cd bld -../configure --enable-dtrace --prefix=$postgresdir -sed -i -e 's|^CFLAGS = -O2.*\$|& -g -DEXPERIMENTAL_KPROBE_SDT -I $env(SYSTEMTAP_INCLUDES)|' src/Makefile.global -# make -# make install -# run_tests kprobe - -sed -i -e 's/-DEXPERIMENTAL_KPROBE_SDT//' src/Makefile.global -# (cd src/backend/utils/ -# make clean) -make +# postgres 9.0.4 now seems to want build done from source dir +# mkdir bld;cd bld +./configure --enable-dtrace --prefix=$postgresdir +sed -i -e 's|^CFLAGS = -O2.*\$|& -g -I $env(SYSTEMTAP_INCLUDES)|' src/Makefile.global +if \[ \$(uname -m) = ppc64 \] ; then + sed -i -e 's|CFLAGS = |& -DSTAP_SDT_ARG_CONSTRAINT=nr |' src/Makefile.global +fi + +J=\$(getconf _NPROCESSORS_CONF) +make -j\$J make install -run_tests uprobe +run_tests " + ########## End /tmp/stap-postgres.sh ########## close $fp diff -Nru systemtap-1.4/testsuite/systemtap.apps/xulrunner.exp systemtap-1.6/testsuite/systemtap.apps/xulrunner.exp --- systemtap-1.4/testsuite/systemtap.apps/xulrunner.exp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.apps/xulrunner.exp 2011-07-25 18:12:01.000000000 +0000 @@ -104,7 +104,7 @@ echo FAIL: Need java-1.6.0-openjdk-devel exit fi -JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64 \ +JAVA_HOME=\$(dirname \$(dirname /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0*/include/jni.h)) \ CXXFLAGS='-g -I$env(SYSTEMTAP_INCLUDES)' \ CFLAGS='-g -I$env(SYSTEMTAP_INCLUDES)' \ PATH=$env(SYSTEMTAP_PATH)/:\$PATH \ diff -Nru systemtap-1.4/testsuite/systemtap.base/bench.exp systemtap-1.6/testsuite/systemtap.base/bench.exp --- systemtap-1.4/testsuite/systemtap.base/bench.exp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.base/bench.exp 2011-07-25 18:12:01.000000000 +0000 @@ -6,9 +6,9 @@ set ok 0 expect { -timeout 180 - -re {probe[^\r]*\r} { incr ok; exp_continue } + -re {^[^\r\n]+, hits: [0-9]+[^\r\n]+\r\n} { incr ok; exp_continue } timeout { fail "$test (timeout)" } eof { } } wait -if {$ok == 18} { pass "$test ($ok)" } { fail "$test ($ok)" } +if {$ok >= 18} { pass "$test ($ok)" } { fail "$test ($ok)" } diff -Nru systemtap-1.4/testsuite/systemtap.base/buildid.exp systemtap-1.6/testsuite/systemtap.base/buildid.exp --- systemtap-1.4/testsuite/systemtap.base/buildid.exp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.base/buildid.exp 2011-07-25 18:12:01.000000000 +0000 @@ -1,6 +1,8 @@ set test "buildid" +set bid_stp $srcdir/$subdir/buildid.stp if {![installtest_p]} { untested $test; return } +if {![uprobes_p]} { untested "$test (uprobes)"; return } proc cleanup_handler { verbose } { if { $verbose == 0 } { @@ -35,9 +37,14 @@ set res [target_compile "" $bid_exepath executable "additional_flags=buildid.ro"] if { [error_handler [expr {$res==""}] "$bid_exepath"] } { return } +# Since uprobes.ko may not be prebuilt in the runtime, and we don't yet have a +# way to discover the path to the cache-build uprobes.ko, we need to preload +# it. This dummy run lets us go through the motions to get uprobes loaded, and +# then we don't need to worry about each staprun -u finding its module. +spawn stap -m bid $bid_stp $bid_exepath -c /bin/true +wait + set ok 0 -set bid_stp $srcdir/$subdir/buildid.stp -system "stap -m bid -p4 $bid_stp $bid_exepath" spawn staprun -u [pwd]/bid.ko -c $bid_exepath expect { -timeout 180 @@ -46,7 +53,7 @@ eof { } } catch {close}; catch {wait} -error_handler [expr $ok==1] "nonshared build id ok ($ok)" +if { [error_handler [expr $ok==1] "nonshared build id ok ($ok)"] } { return } # now alter the build id using objcopy @@ -67,6 +74,22 @@ catch {close}; catch {wait} error_handler [expr $ok==1] "nonshared build id !ok ($ok)" +# stap -DSTP_NO_BUILDID_CHECK with altered build id + +set ok 0 +# system "stap -m bid -p4 -DSTP_NO_BUILDID_CHECK $bid_stp $bid_exepath" +spawn stap -m bid -p4 -DSTP_NO_BUILDID_CHECK $bid_stp $bid_exepath +wait +spawn staprun -u [pwd]/bid.ko -c $bid_exepath +expect { + -timeout 180 + -re {x=1} { incr ok; exp_continue } + timeout { fail "$test (timeout)" } + eof { } +} +catch {close}; catch {wait} +error_handler [expr $ok==1] "STP_NO_BUILDID_CHECK ($ok)" + # Shared set bid_flags "additional_flags=-DNO_MAIN" @@ -82,8 +105,10 @@ set res [target_compile $bid_srcpath "$bid_exepath" executable $bid_flags] if { [error_handler [expr {$res==""}] "$bid_exepath"] } { return } +spawn stap -m bid -p4 $bid_stp libbid.so +wait + set ok 0 -system "stap -m bid -p4 $bid_stp libbid.so" spawn staprun -u [pwd]/bid.ko -c $bid_exepath expect { -timeout 180 @@ -92,7 +117,7 @@ eof { } } catch {close}; catch {wait} -error_handler [expr $ok==1] "shared build id ok ($ok)" +if { [error_handler [expr $ok==1] "shared build id ok ($ok)"] } { return } # now alter the build id using objcopy @@ -107,6 +132,7 @@ timeout { fail "$test (timeout)" } eof { } } +catch {close}; catch {wait} error_handler [expr $ok==1] "shared build id !ok ($ok)" cleanup_handler $verbose diff -Nru systemtap-1.4/testsuite/systemtap.base/cmd_parse.exp systemtap-1.6/testsuite/systemtap.base/cmd_parse.exp --- systemtap-1.4/testsuite/systemtap.base/cmd_parse.exp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.base/cmd_parse.exp 2011-07-25 18:12:01.000000000 +0000 @@ -68,10 +68,12 @@ } wait;catch {close} +# slow test case; requires kernel tracepoint query modules spawn stap -l {vm.*} expect { - -timeout 60 - -re "vm.*" {pass "cmd_parse8"} + -timeout 240 + -re {^vm[^\r\n]*\r\n} {pass "cmd_parse8"} + -re "^Warning: make exited with status: 2\r\n" {exp_continue} timeout {fail "cmd_parse8: unexpected timeout"} eof {fail "cmd_parse8: unexpected EOF"} } @@ -131,9 +133,11 @@ wait;catch {close} set uname [exec uname -r] -set linux26ver [lindex [split $uname {.-}] 2] -if {$linux26ver < 29} { - verbose -log "kfail, see commit e0ccd3\n"; +set triplet [split $uname {.-}] +if {[lindex $triplet 0] == 2 && + [lindex $triplet 1] == 6 && + [lindex $triplet 2] < 29} { + # verbose -log "kfail, see commit e0ccd3\n"; setup_kfail 4186 "*-*-*" } spawn sh -c "stap -m do_not_cache_me -B kernelrelease -p4 -e 'probe begin {exit()}'" @@ -149,9 +153,7 @@ set uname [exec uname -i] # normalize arch -if {$uname == "ppc64"} then {set uname powerpc} -if {$uname == "s390x"} then {set uname s390} -if {$uname == "i686"} then {set uname i386} +set uname [normalize_arch $uname] spawn sh -c "stap -m do_not_cache_me -a $uname -p4 -e 'probe begin {exit()}'" # the \r below is meant to match the "kernelrelease" output, as distinct from diff -Nru systemtap-1.4/testsuite/systemtap.base/cxxclass.exp systemtap-1.6/testsuite/systemtap.base/cxxclass.exp --- systemtap-1.4/testsuite/systemtap.base/cxxclass.exp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.base/cxxclass.exp 2011-07-25 18:12:01.000000000 +0000 @@ -14,6 +14,10 @@ set test_flags "$test_flags additional_flags=-O2" set test_flags "$test_flags [sdt_includes]" set test_flags "$test_flags compiler=g++" +# ppc64 needs a more restrictive constraint for the probe args +if {[regexp "^(x86_64|i.86)$" $::tcl_platform(machine)] == 0} { +set test_flags "$test_flags additional_flags=-DSTAP_SDT_ARG_CONSTRAINT=nr" +} set res [target_compile $srcdir/$subdir/$test.cxx $test.exe executable "$test_flags"] if { $res != "" } { diff -Nru systemtap-1.4/testsuite/systemtap.base/dtrace.exp systemtap-1.6/testsuite/systemtap.base/dtrace.exp --- systemtap-1.4/testsuite/systemtap.base/dtrace.exp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.base/dtrace.exp 2011-07-25 18:12:01.000000000 +0000 @@ -60,12 +60,12 @@ verbose -log "$dtrace -G -s $dpath -o XXX" catch {exec $dtrace -G -s $dpath -o XXX} -if {[file exists XXX.o]} then { +if {[file exists XXX]} then { pass "dtrace -G -o XXX" } else { fail "dtrace -G -o XXX" } -exec rm -f XXX.o +exec rm -f XXX verbose -log "$dtrace -h -s $dpath -o XXX.h" catch {exec $dtrace -h -s $dpath -o XXX.h} @@ -96,12 +96,12 @@ verbose -log "$dtrace -G -s $dpath -o /tmp/XXX" catch {exec $dtrace -G -s $dpath -o /tmp/XXX} -if {[file exists /tmp/XXX.o]} then { - pass "dtrace -G -o /tmp/XXX.o" +if {[file exists /tmp/XXX]} then { + pass "dtrace -G -o /tmp/XXX" } else { - fail "dtrace -G -o /tmp/XXX.o" + fail "dtrace -G -o /tmp/XXX" } -exec rm -f /tmp/XXX.o +exec rm -f /tmp/XXX verbose -log "$dtrace -h -s $dpath -o /tmp/XXX.h" catch {exec $dtrace -h -s $dpath -o /tmp/XXX.h} @@ -140,6 +140,19 @@ exec rm -f test.o set ok 0 +verbose -log "CFLAGS=\"MYCFLAGS\" CC=echo $dtrace -G -s $dpath" +spawn env CFLAGS=MYCFLAGS CC=echo $dtrace -G -s $dpath +expect { + -re {-g MYCFLAGS} {incr ok} +} +catch {close}; catch {wait} +if { $ok != 0} { + pass "dtrace CFLAGS= CC=" +} else { + fail "dtrace CFLAGS= CC=" +} + +set ok 0 verbose -log "$dtrace -C -h -s $dpath -o XXX.h" catch {exec $dtrace -C -h -s $dpath -o XXX.h} spawn cat XXX.h diff -Nru systemtap-1.4/testsuite/systemtap.base/global_end.exp systemtap-1.6/testsuite/systemtap.base/global_end.exp --- systemtap-1.4/testsuite/systemtap.base/global_end.exp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.base/global_end.exp 2011-07-25 18:12:01.000000000 +0000 @@ -35,17 +35,21 @@ if {$ok == 12} { pass "$test ($ok)" } { fail "$test ($ok)" } +# test PR6954 set test "global_end_var" spawn stap $srcdir/$subdir/global_end_var.stp set ok 0 expect { -timeout 180 - -re {var=0x1} { incr ok; exp_continue } + -re {gs0_save=0x29} { incr ok; exp_continue } + -re {gs2=0x4} { incr ok; exp_continue } + -re {gs3=0x4} { incr ok; exp_continue } + -re {gs4=0x5} { incr ok; exp_continue } + -re {ga1."foo".=0x2} { incr ok; exp_continue } + -re {ga2."foo".=0x1} { incr ok; exp_continue } timeout { fail "$test (timeout)" } - eof { } -} + eof { }} + catch {close}; catch {wait} -# PR6954 -setup_kfail 6954 "*-*-*" -if {$ok == 1} { pass "$test ($ok)" } { fail "$test ($ok)" } +if {$ok == 6} { pass "$test ($ok)" } { fail "$test ($ok)" } diff -Nru systemtap-1.4/testsuite/systemtap.base/global_end_var.stp systemtap-1.6/testsuite/systemtap.base/global_end_var.stp --- systemtap-1.4/testsuite/systemtap.base/global_end_var.stp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.base/global_end_var.stp 2011-07-25 18:12:01.000000000 +0000 @@ -1,8 +1,55 @@ -// PR6954 ++ operations not triggering automatic global printing -global var +global gs0_save +global gs0 = 41 +global gs1 = 1 +global gs2 = 2 +global gs3 = 3 +global gs4 = 4 +global gs5 = 5 +global gs6 = 6 +global gs7 = 7 +global gs8 = 8 +global gs9 = 9 +global gs10 = 10 +global gs11 = 11 +global ga1 +global ga2 +global gtemp -probe begin -{ - var++; - exit(); -} +function fna(a:long) {return a} + +probe begin(-9223372036854775808) { + gs0_save = gs0 +} +probe begin +{ + temp = 2; + + gs1 = gs1 + 2; + gs2 += 2; + ++ gs3; + gs4 ++; + gs5 ++; + gs6 = gs6 + temp; + + printf ("gs7=%d ",fna(gs7)) + + gtemp = (gs8++) & (gtemp = (gs9++)) + + ls0 = gtemp + gs10++; + + println(gs11++) + + ga1 ["foo"] += 2; + ga2 ["foo"] ++; + + ls1 = ls1 + 2; + ls2 += ls2; + ls3 = 0; + printf ("ls0=%d ls1=%d ",ls0, ls1); + ++ ls3; + ls4 ++; + ls5 = gs5; + printf ("ls5=%d\n",ls5); + + exit() +} diff -Nru systemtap-1.4/testsuite/systemtap.base/labels.exp systemtap-1.6/testsuite/systemtap.base/labels.exp --- systemtap-1.4/testsuite/systemtap.base/labels.exp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.base/labels.exp 2011-07-25 18:12:01.000000000 +0000 @@ -58,7 +58,7 @@ # line number error (expect no output at all, since no label found) set ok 0 -spawn stap -l "process(\"$label_exepath\").function(\"foo@${label_srcpath}:10\").label(\"*\")" +spawn stap --use-server-on-error=no -l "process(\"$label_exepath\").function(\"foo@${label_srcpath}:10\").label(\"*\")" expect { -timeout 180 diff -Nru systemtap-1.4/testsuite/systemtap.base/library.exp systemtap-1.6/testsuite/systemtap.base/library.exp --- systemtap-1.4/testsuite/systemtap.base/library.exp 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.base/library.exp 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,117 @@ +set test "library" + +proc cleanup_handler { verbose } { + if { $verbose == 0 } { + catch {exec rm -f libsdt.so sdt_misc.x } + } + catch {exec rm -f sdt_misc_.c sdt_misc_.h sdt_misc_.o } +} + +proc error_handler { res message } { +global verbose +if { $res == 0 } { + verbose $message 2 + fail $message + cleanup_handler $verbose + return 1 +} else { + pass $message + return 0 +} +} + +if {![installtest_p]} {untested $test; return} +if {![uprobes_p]} {untested $test; return} +if {![utrace_p]} { + untested "$test" + cleanup_handler $verbose + return +} +set stap_path $env(SYSTEMTAP_PATH)/stap +set dpath "[pwd]/sdt_misc_.d" +set hpath "[pwd]/sdt_misc_.h" +set opath "[pwd]/sdt_misc_.o" + +set exepath "[pwd]/sdt_misc.x" +set sopath "[pwd]/libsdt.so" + +# Run dtrace + +if {[installtest_p]} { + set dtrace $env(SYSTEMTAP_PATH)/dtrace +} else { + set dtrace ../dtrace +} + +verbose -log "$dtrace -DSTAP_SDT_V3 --types -h -s $srcdir/$subdir/sdt_misc_.d" +if {[catch {exec $dtrace --types -h -s $srcdir/$subdir/sdt_misc_.d} res]} { + verbose -log "unable to run $dtrace: $res" +} +verbose -log "$dtrace -DSTAP_SDT_V3 --types -G -s $srcdir/$subdir/sdt_misc_.d" +if {[catch {exec $dtrace -DSTAP_SDT_V3 --types -G -s $srcdir/$subdir/sdt_misc_.d} res]} { + verbose -log "unable to run $dtrace: $res" +} +if { [error_handler [expr {[file exists $hpath] && [file exists $opath]}] "dtrace"] } { return } + +set F additional_flags +set flags "$F=[sdt_includes] $F=$opath $F=-I. $F=-shared $F=-fPIC $F=-DNO_MAIN $F=-g" +set res [target_compile $srcdir/$subdir/sdt_misc.c $sopath executable $flags ] +if { [error_handler [expr {$res == ""}] "target_compile"] } { return } + +set flags "$F=-Wl,-rpath,[pwd] $F=-L[pwd] $F=-lsdt $F=-DONLY_MAIN $F=-g" +set res [target_compile $srcdir/$subdir/sdt_misc.c $exepath executable $flags ] +if { [error_handler [expr {$res == ""}] "target_compile"] } { return } + +# Test globbing + +eval set globs "{{*} {*libsdt*} $sopath}" +foreach glob $globs { +set ok 0 +spawn $stap_path -c $exepath $srcdir/$subdir/library.stp $exepath "$glob" + +expect { + -timeout 180 + -re {^bar begin\r\n} {incr ok; exp_continue } + -re {^bar 2\r\n} {incr ok; exp_continue } + -re {^In test_probe_2 probe 0x2\r\n} { incr ok; exp_continue } + -re {^bar end\r\n} {incr ok; exp_continue } + -re {^baz begin\r\n} {incr ok; exp_continue } + -re {^baz 3 abc\r\n} {incr ok; exp_continue } + -re {^In test_probe_0 probe 0x3\r\n} { incr ok; exp_continue } + -re {^In test_probe_3 probe 0x3 0x[0-9a-f][0-9a-f]*\r\n} { incr ok; exp_continue } + -re {^baz end\r\n} {incr ok; exp_continue } + -re {^buz begin\r\n} {incr ok; exp_continue } + -re {^buz 4\r\n} {incr ok; exp_continue } + -re {^In test_probe_4 dtrace probe 0x[0-9a-f][0-9a-f]*\r\n} { incr ok; exp_continue } + -re {^In test_probe_1 probe 0x0\r\n} { incr ok; exp_continue } + -re {^buz end\r\n} {incr ok; exp_continue } + -re {^WARNING:.*No DWARF information found\r\n} { exp_continue } + -re {^Missing separate debuginfos.*\r\n} { exp_continue } + timeout { fail "$test (timeout)" } + eof { } +} + +catch {close}; catch {wait} + +error_handler [expr {$ok == 15}] "sdt_misc $glob ($ok != 15)" +} ; # glob + +# Test --ldd + +set ok 0 +spawn $stap_path --ldd -v -v -v -c $exepath -e "probe process(\"$exepath\").library(\"*\").statement(\"baz@sdt_misc.c\") \{printf(\"%s \", pn())\}" + +set ok 0 +expect { + -timeout 180 + -re {Added -d '.*libsdt.so' due to 'libsdt.so'} {incr ok; exp_continue } + -re {Added -d '/lib.*/libm.so.[0-9]' due to 'libm.so.[0-9]'} {incr ok; exp_continue } + -re {Added -d '/lib.*/libc.so.[0-9]' due to 'libc.so.[0-9]'} {incr ok; exp_continue } + -re {Added -d '/lib.*/.*ld.*so'} {incr ok; exp_continue } + timeout { fail "$test (timeout)" } + eof { } +} + +catch {close}; catch {wait} + +error_handler [expr {$ok == 4}] "printf --ldd ($ok) ($ok != 4)" diff -Nru systemtap-1.4/testsuite/systemtap.base/library.stp systemtap-1.6/testsuite/systemtap.base/library.stp --- systemtap-1.4/testsuite/systemtap.base/library.stp 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.base/library.stp 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,37 @@ +probe process (@1).library(@2).statement("bar@sdt_misc.c+9") {printf ("bar %d\n",$i)} +probe process (@1).library(@2).statement("baz@sdt_misc.c+1") {printf ("baz %d %s\n",$i,user_string($s))} +probe process (@1).library(@2).statement("buz@sdt_misc.c+1") {printf ("buz %d\n",$parm)} + +probe process (@1).library(@2).function("bar") {printf ("bar begin\n")} +probe process (@1).library(@2).function("baz") {printf ("baz begin\n")} +probe process (@1).library(@2).function("buz") {printf ("buz begin\n")} + +probe process (@1).library(@2).function("bar").return {printf ("bar end\n")} +probe process (@1).library(@2).function("baz").return {printf ("baz end\n")} +probe process (@1).library(@2).function("buz").return {printf ("buz end\n")} + +probe process(@1).library(@2).mark("test_probe_0") +{ + printf("In %s probe %#x\n", $$name, $arg1) +} + +probe process(@1).library(@2).mark("test_probe_1") +{ + printf("In %s probe %#x\n", $$name, $arg1) +} + +probe process(@1).library(@2).mark("test_probe_2") +{ + printf("In %s probe %#x\n", $$name, $arg1) +} + +probe process(@1).library(@2).mark("test_probe_3") +{ + printf("In %s probe %#x %#x\n", $$name, $arg1, $arg2) +} + +probe process(@1).library(@2).mark("test_probe_4") +{ + printf("In %s dtrace probe %#x\n", $$name, $arg1) +} + diff -Nru systemtap-1.4/testsuite/systemtap.base/pointer_array.stp systemtap-1.6/testsuite/systemtap.base/pointer_array.stp --- systemtap-1.4/testsuite/systemtap.base/pointer_array.stp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.base/pointer_array.stp 2011-07-25 18:12:01.000000000 +0000 @@ -1,9 +1,9 @@ probe syscall.execve { if (pid() == target()) { - println(user_string($argv[0])) + println(user_string(@defined($__argv) ? $__argv[0] : $argv[0])) for (i=0; i<9; ++i) - printf("%c\n", $argv[0][i]) - println($argv[0][9]) + printf("%c\n", @defined($__argv) ? $__argv[0][i] : $argv[0][i]) + println(@defined($__argv) ? $__argv[0][9] : $argv[0][9]) } } diff -Nru systemtap-1.4/testsuite/systemtap.base/pr10854.exp systemtap-1.6/testsuite/systemtap.base/pr10854.exp --- systemtap-1.4/testsuite/systemtap.base/pr10854.exp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.base/pr10854.exp 2011-07-25 18:12:01.000000000 +0000 @@ -23,9 +23,11 @@ # (this was usually enough to trigger the fault) for {set i 0} {$i < 10} {incr i} { spawn staprun $module -o /dev/null - while { [catch { exec pkill stapio -P [pid] } msg ] } { } - catch { close } - wait + sleep 1 + catch { exec pkill stapio -P [pid] 2>/dev/null } + catch { close } + catch { wait } + # don't delay before the next staprun } # if we're still alive, we pass :) diff -Nru systemtap-1.4/testsuite/systemtap.base/prcwildcard.exp systemtap-1.6/testsuite/systemtap.base/prcwildcard.exp --- systemtap-1.4/testsuite/systemtap.base/prcwildcard.exp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.base/prcwildcard.exp 2011-07-25 18:12:01.000000000 +0000 @@ -1,18 +1,23 @@ +set stap_path $env(SYSTEMTAP_PATH)/stap set test "prcwildcard function" -spawn stap -L {process("../sta*").function("*")} -set count 0 -expect { - -re {^process[^\r\n]+\r\n} { incr count; exp_continue } - timeout { } - eof { } +# Looking for functions in stap will only work if it isn't stripped. +if {[stripped_p $stap_path]} { + untested $test +} else { + spawn stap -L "process(\"$stap_path\").function(\"*\")" + set count 0 + expect { + -re {^process[^\r\n]+\r\n} { incr count; exp_continue } + timeout { } + eof { } + } + catch {close}; catch {wait} + if {$count > 100} then { pass $test } else { fail $test } } -catch {close}; catch {wait} -if {$count > 100} then { pass $test } else { fail $test } - set test "prcwildcard mark" -spawn stap -L {process("../sta*").mark("*")} +spawn stap -L "process(\"$stap_path\").mark(\"*\")" set count 0 expect { -re {^process[^\r\n]+\r\n} { incr count; exp_continue } diff -Nru systemtap-1.4/testsuite/systemtap.base/preprocessor.exp systemtap-1.6/testsuite/systemtap.base/preprocessor.exp --- systemtap-1.4/testsuite/systemtap.base/preprocessor.exp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.base/preprocessor.exp 2011-07-25 18:12:01.000000000 +0000 @@ -2,15 +2,13 @@ set kvr [exec uname -r] set kv [exec uname -r | cut -f1 -d-] # a pattern bound to match -set kr {2?[0-9]*} +set kr {[23]?[0-9]*} # a pattern bound to mismatch set krx {?noSuchKernel*} set arch [exec uname -i] # normalize arch; PR4186 -if {$arch == "ppc64"} then {set arch powerpc} -if {$arch == "s390x"} then {set arch s390} -if {$arch == "i686"} then {set arch i386} +set arch [normalize_arch $arch] set ar "?[string range $arch 1 end-1]?" set arx {?noSuchArch?} diff -Nru systemtap-1.4/testsuite/systemtap.base/process_by_cmd.c systemtap-1.6/testsuite/systemtap.base/process_by_cmd.c --- systemtap-1.4/testsuite/systemtap.base/process_by_cmd.c 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.base/process_by_cmd.c 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,15 @@ +#include "stdio.h" +#include "sys/sdt.h" + +void third(){} +void second(){third();} +void first(){second();} + +int main() +{ + l1: + STAP_PROBE(process_by_cmd, main_start); + first(); + STAP_PROBE(process_by_cmd, main_end); + return 0; +} diff -Nru systemtap-1.4/testsuite/systemtap.base/process_by_cmd.exp systemtap-1.6/testsuite/systemtap.base/process_by_cmd.exp --- systemtap-1.4/testsuite/systemtap.base/process_by_cmd.exp 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.base/process_by_cmd.exp 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,32 @@ +set test "process_by_cmd" +set ::result_string {func end +state end +func label end +mark end +state end +state end +state end +func return end +func return end +func return end +mark end +func return end} +set test_flags "additional_flags=-g" +set test_flags "$test_flags [sdt_includes]" + +set res [target_compile $srcdir/$subdir/$test.c $test executable "$test_flags"] +if {$res != ""} { + verbose -log "target_compile failed: $res" 2 + fail "$test.c compile" + untested "$test" + return +} else { + pass "$test.c compile" +} + +if {[installtest_p] && [utrace_p] && [uprobes_p]} { + stap_run2 $srcdir/$subdir/process_by_cmd.stp -c ./$test +} else { + untested "$test" +} +catch {exec rm -f $test} diff -Nru systemtap-1.4/testsuite/systemtap.base/process_by_cmd.stp systemtap-1.6/testsuite/systemtap.base/process_by_cmd.stp --- systemtap-1.4/testsuite/systemtap.base/process_by_cmd.stp 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.base/process_by_cmd.stp 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,5 @@ +probe process.function("main") { printf("func end\n") } +probe process.function("main").label("l1") { printf("func label end\n") } +probe process.function("*").return { printf("func return end\n") } +probe process.mark("*") { printf("mark end\n") } +probe process.statement("*@process_by_cmd.c") { printf("state end\n") } diff -Nru systemtap-1.4/testsuite/systemtap.base/proc_exec.c systemtap-1.6/testsuite/systemtap.base/proc_exec.c --- systemtap-1.4/testsuite/systemtap.base/proc_exec.c 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.base/proc_exec.c 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,20 @@ +#include +#include + +int +main(int argc, char **argv) +{ + char *new_argv[] = { NULL, "3", NULL }; + + if (argc != 2) { + fprintf(stderr, "Usage: %s exepath\n", argv[0]); + return -1; + } + + new_argv[0] = argv[1]; + + /* Actually run the command. */ + if (execv(new_argv[0], new_argv) < 0) + perror("execv"); + _exit(1); +} diff -Nru systemtap-1.4/testsuite/systemtap.base/proc_exec.exp systemtap-1.6/testsuite/systemtap.base/proc_exec.exp --- systemtap-1.4/testsuite/systemtap.base/proc_exec.exp 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.base/proc_exec.exp 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,190 @@ +# process exec tests. + +# value gets set later +set test_exepath "" + +# "load" generation function for stap_run. It spawns our test +# executable, which execs our copy of /bin/sleep. +proc run_test_exe {} { + global test_exepath + global exepath + + spawn $test_exepath $exepath + set exe_id $spawn_id + after 5000 + catch {close -i $exe_id} + catch {wait -i $exe_id} + return 0; +} + +# Set up our own copy of /bin/sleep, to make testing for a particular +# executable easy. We can't use 'ln' here, since we might be creating +# a cross-device link. We can't use 'ln -s' here, since the kernel +# resolves the symbolic link and reports that /bin/sleep is being +# exec'ed (instead of our local copy). +set exepath "[pwd]/sleep_[pid]" +if {[catch {exec cp /bin/sleep $exepath} res]} { + fail "unable to copy /bin/sleep: $res" + return +} + +# Note use of '%1$s' - the 'N$' is the 'argpos', the argument position +# passed to 'format'. +set test_script { + global output + global sleep_start, sleep_end + probe begin { printf("systemtap starting probe\n") } + probe process("%1$s").begin { + output .= sprintf("exe(%%d) begin\n", tid()) + } + probe process("%1$s").thread.begin { + output .= sprintf("exe(%%d) thread begin\n", tid()) + } + probe process("%1$s").end { + output .= sprintf("exe(%%d) end\n", tid()) + } + probe process("%1$s").thread.end { + output .= sprintf("exe(%%d) thread end\n", tid()) + } + probe process("%2$s").begin { + sleep_start = gettimeofday_s() + output .= sprintf("sleep(%%d) begin\n", tid()) + } + probe process("%2$s").end { + sleep_end = gettimeofday_s() + output .= sprintf("sleep(%%d) end\n", tid()) + } + probe end { + printf("systemtap ending probe\n%%s", output) + time_slept = sleep_end - sleep_start + if (time_slept >= 2 && time_slept <= 4) + printf("time slept: OK\n") + else + printf("time slept: ERROR (%%d)\n", time_slept) + } +} + +####### +# +# Test a normal fork/exec pair. +# + +set fork_exec_srcpath "$srcdir/systemtap.base/proc_fork_exec.c" +set fork_exec_exepath "[pwd]/proc_fork_exec_[pid]" +set fork_exec_flags "" + +# We make sure the outputs looks like the following using regexp +# subexpressions: +# exe(PARENT_PID) begin +# exe(CHILD_PID) begin +# exe(CHILD_PID) end +# sleep(CHILD_PID) begin +# sleep(CHILD_PID) end +# exe(PARENT_PID) end +# time slept: OK +set fork_exec_script_output "exe\\((\\d+)\\) begin\r\nexe\\((\\d+)\\) begin\r\nexe\\(\\2\\) end\r\nsleep\\(\\2\\) begin\r\nsleep\\(\\2\\) end\r\nexe\\(\\1\\) end\r\ntime slept: OK\r\n" + +# Compile our program that forks/exec's /bin/sleep. +set test_exepath $fork_exec_exepath +set res [target_compile $fork_exec_srcpath $fork_exec_exepath executable $fork_exec_flags] +if { $res != "" } { + verbose "target_compile failed: $res" 2 + fail "unable to compile $fork_exec_srcpath" + return +} + +set TEST_NAME "PROC_EXEC_01" +if {![utrace_p]} { + untested "$TEST_NAME : no kernel utrace support found" +} elseif {![installtest_p]} { + untested "$TEST_NAME" +} else { + set script [format $test_script $fork_exec_exepath $exepath] + stap_run $TEST_NAME run_test_exe $fork_exec_script_output -e $script +} + +####### +# +# Test a straight exec (no fork). +# + +set exec_srcpath "$srcdir/systemtap.base/proc_exec.c" +set exec_exepath "[pwd]/proc_exec_[pid]" +set exec_flags "" + +# We make sure the outputs looks like the following using regexp +# subexpressions: +# exe(PID) begin +# exe(PID) end +# sleep(PID) begin +# sleep(PID) end +# time slept: OK +set exec_script_output "exe\\((\\d+)\\) begin\r\nexe\\(\\1\\) end\r\nsleep\\(\\1\\) begin\r\nsleep\\(\\1\\) end\r\ntime slept: OK\r\n" + +# Compile our program that exec's /bin/sleep. +set test_exepath $exec_exepath +set res [target_compile $exec_srcpath $exec_exepath executable $exec_flags] +if { $res != "" } { + verbose "target_compile failed: $res" 2 + fail "unable to compile $exec_srcpath" + return +} + +set TEST_NAME "PROC_EXEC_02" +if {![utrace_p]} { + untested "$TEST_NAME : no kernel utrace support found" +} elseif {![installtest_p]} { + untested "$TEST_NAME" +} else { + set script [format $test_script $exec_exepath $exepath] + stap_run $TEST_NAME run_test_exe $exec_script_output -e $script +} + +####### +# +# Test a multi-threaded exec, which programs aren't supposed to do, +# but... +# + +set thread_exec_srcpath "$srcdir/systemtap.base/proc_thread_exec.c" +set thread_exec_exepath "[pwd]/proc_thread_exec_[pid]" +set thread_exec_flags "libs=-lpthread" + +# We make sure the outputs looks like the following using regexp +# subexpressions. +# exe(PID1) begin +# exe(PID2) thread begin +# exe(PID1) thread end +# exe(PID1) end +# sleep(PID1) begin +# sleep(PID1) end +# time slept: OK +# +# Why no PID2 thread end and why isn't sleep using PID2? When the +# thread calls exec (which it isn't supposed to do), the kernel has to +# clean up the best it can. It really kills the original task, +# promotes the thread to be the process group leader (and changes the +# thread's pid to the original process group leader's pid). +set thread_exec_script_output "exe\\((\\d+)\\) begin\r\nexe\\(\\d+\\) thread begin\r\nexe\\(\\1\\) thread end\r\nexe\\(\\1\\) end\r\nsleep\\(\\1\\) begin\r\nsleep\\(\\1\\) end\r\ntime slept: OK\r\n" + +# Compile our multi-threaded program that exec's /bin/sleep. +set test_exepath $thread_exec_exepath +set res [target_compile $thread_exec_srcpath $thread_exec_exepath executable $thread_exec_flags] +if { $res != "" } { + verbose "target_compile failed: $res" 2 + fail "unable to compile $exec_srcpath" + return +} + +set TEST_NAME "PROC_EXEC_03" +if {![utrace_p]} { + untested "$TEST_NAME : no kernel utrace support found" +} elseif {![installtest_p]} { + untested "$TEST_NAME" +} else { + set script [format $test_script $thread_exec_exepath $exepath] + stap_run $TEST_NAME run_test_exe $thread_exec_script_output -e $script +} + +# Cleanup +exec rm -f $exepath $fork_exec_exepath $exec_exepath $thread_exec_exepath diff -Nru systemtap-1.4/testsuite/systemtap.base/proc_fork_exec.c systemtap-1.6/testsuite/systemtap.base/proc_fork_exec.c --- systemtap-1.4/testsuite/systemtap.base/proc_fork_exec.c 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.base/proc_fork_exec.c 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,43 @@ +#include +#include +#include +#include + +int +main(int argc, char **argv) +{ + pid_t pid; + int rstatus; + char *new_argv[] = { NULL, "3", NULL }; + + if (argc != 2) { + fprintf(stderr, "Usage: %s exepath\n", argv[0]); + return -1; + } + + new_argv[0] = argv[1]; + + pid = fork(); + if (pid < 0) + { + perror("fork"); + return -1; + } + + if (pid == 0) /* child process */ + { + /* Actually run the command. */ + if (execv(new_argv[0], new_argv) < 0) + perror("execv"); + _exit(1); + } + + if (waitpid(pid, &rstatus, 0) < 0) { + perror("waitpid"); + return -1; + } + + if (WIFEXITED(rstatus)) + return WEXITSTATUS(rstatus); + return -1; +} diff -Nru systemtap-1.4/testsuite/systemtap.base/proc_thread_exec.c systemtap-1.6/testsuite/systemtap.base/proc_thread_exec.c --- systemtap-1.4/testsuite/systemtap.base/proc_thread_exec.c 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.base/proc_thread_exec.c 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,31 @@ +#include +#include +#include + +char *new_argv[] = { NULL, "3", NULL }; + +void *tfunc(void *arg) +{ + /* Actually run the command. */ + if (execv(new_argv[0], new_argv) < 0) + perror("execv"); + return NULL; +} + +int +main(int argc, char **argv) +{ + pthread_t thr; + + if (argc != 2) { + fprintf(stderr, "Usage: %s exepath\n", argv[0]); + return -1; + } + + new_argv[0] = argv[1]; + + pthread_create(&thr, NULL, tfunc, NULL); + pause(); + return 0; +} + diff -Nru systemtap-1.4/testsuite/systemtap.base/ptridx.exp systemtap-1.6/testsuite/systemtap.base/ptridx.exp --- systemtap-1.4/testsuite/systemtap.base/ptridx.exp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.base/ptridx.exp 2011-07-25 18:12:01.000000000 +0000 @@ -26,6 +26,9 @@ # the variables may have no location setup_xfail *-*-* } + -re {^17, 23\r\n} { + # output from ptridx.exe itself + exp_continue } -re {^[ap] (0x\[0-9a-f]+ => )?17, 23\r\n} { incr ok; exp_continue } timeout { fail "$test (timeout)" } eof { } diff -Nru systemtap-1.4/testsuite/systemtap.base/remote.exp systemtap-1.6/testsuite/systemtap.base/remote.exp --- systemtap-1.4/testsuite/systemtap.base/remote.exp 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.base/remote.exp 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,86 @@ +# Test that the --remote=host mechanism is working +# Requires the test user to specify hosts with automated ssh access. + +set test "remote" + +if {[info exists env(SYSTEMTAP_TESTREMOTES)]} { + set remotes [split $env(SYSTEMTAP_TESTREMOTES) ,] +} else { set remotes [list] } +set batch_remotes [list] + +if {![llength $remotes] || ![installtest_p]} { untested $test; return } +verbose -log "$test: $remotes" + +# Test each remote individually +foreach remote $remotes { + # Try building for the remote + spawn stap $srcdir/$subdir/$test.stp --remote=$remote -p4 + expect { + -timeout 180 + timeout { fail "$test build $remote (timeout)" } + eof { } + } + catch {close}; catch {wait} res + set rc [lindex $res 3] + if {$rc == 0} { + pass "$test build $remote" + } else { + fail "$test build $remote ($rc)" + untested "$test run $remote" + continue + } + + # Try running on the remote + set begin 0 + set end 0 + set err 0 + spawn stap $srcdir/$subdir/$test.stp --remote=$remote + expect { + -timeout 180 + -re {^begin\r\n} { incr begin; exec kill -INT [exp_pid]; exp_continue } + -re {^end\r\n} { incr end; exp_continue } + -re {^[^\r\n]*\r\n} { incr err; exp_continue } + timeout { fail "$test run $remote (timeout)" } + eof { } + } + catch {close}; catch {wait} + if {!$err && $begin == 1 && $end == 1} { + pass "$test run $remote" + lappend batch_remotes "--remote=$remote" + } else { + fail "$test run $remote ($begin $end $err)" + } +} + +verbose -log "$test: batch $batch_remotes" +if {[llength $batch_remotes] < 2} { + untested "$test batch" +} else { + # Try running the good ones together + set begin 0 + set end 0 + set err 0 + eval spawn stap {$srcdir/$subdir/$test.stp} $batch_remotes + expect { + -timeout 180 + -re {^begin\r\n} { + incr begin + if {$begin == [llength $batch_remotes]} {exec kill -INT [exp_pid]} + exp_continue + } + -re {^end\r\n} { incr end; exp_continue } + -re {^[^\r\n]*\r\n} { + incr err; + if {$err == 1} {exec kill -INT [exp_pid]} + exp_continue + } + timeout { fail "$test batch $batch_remotes (timeout)" } + eof { } + } + catch {close}; catch {wait} + if {!$err && [llength $batch_remotes] == $begin && $begin == $end} { + pass "$test batch $batch_remotes" + } else { + fail "$test batch $batch_remotes ($begin $end $err)" + } +} diff -Nru systemtap-1.4/testsuite/systemtap.base/remote.stp systemtap-1.6/testsuite/systemtap.base/remote.stp --- systemtap-1.4/testsuite/systemtap.base/remote.stp 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.base/remote.stp 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,8 @@ +probe begin, end { + println(pp()) +} + +probe timer.s(30) { + println("timeout!") + exit() +} diff -Nru systemtap-1.4/testsuite/systemtap.base/rename_module.exp systemtap-1.6/testsuite/systemtap.base/rename_module.exp --- systemtap-1.4/testsuite/systemtap.base/rename_module.exp 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.base/rename_module.exp 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,125 @@ +########## Inserting 2 Identical Modules: Basic Stap call ################# +# Should not give an error when inserting 2 identical modules +set test "Inserting 2 Identical Modules: Basic Stap Call" + +set failed1 1 +set failed2 1 + +# Run first module. Stays running since no exit() call. +# Also keep track of its PID, so we can kill it later. +spawn stap -e {probe begin{printf("Hello\n");}} +set firstid $spawn_id + +# Run second, identical module. Before, it would cause an +# error, since it would have the same name as the previous +# one, but now it inserts without a problem, since it is +# renamed. +# Note: The outputs must also be the same - they will have +# different names to begin with otherwise. +spawn stap -e {probe begin{printf("Hello\n");}} +set secondid $spawn_id + +# Make sure they both output "Hello" +expect { + -i $firstid Hello { + set failed1 0 + exp_continue + } + -i $secondid Hello { + set failed2 0 + exp_continue + } +} + +# Kill both of the hanging processes +set firstpid [exp_pid -i $firstid] +set secondpid [exp_pid -i $secondid] +exec kill $firstpid +exec kill $secondpid +catch { wait -i $firstid; wait -i $secondid; close } + +if {$failed1 == 1 || $failed2 == 1} { + fail "$test" + } else { + pass "$test" +} + +########## Inserting 2 Identical Modules: Staprun without -R ################# +# Should give an error when inserting 2 identical modules +# when calling staprun directly without using -R +set test "Inserting 2 Identical Modules: Staprun without -R" +set failed 0 +set compile { exec stap -e {probe begin{printf("Hello\n");}} -p4 } +set module [eval $compile] + +spawn staprun $module +set firstid $spawn_id + +spawn staprun $module +set secondid $spawn_id + +# Make sure it fails +expect { + -re {^Error inserting module .*: File exists\r\n} { + exp_continue + } + -re {^Rerun with staprun option '\-R' to rename this module.\r\n} { + exp_continue + } + -re {^[^\r\n]*\r\n} { + set failed 1 + } +} + +# Kill both of the hanging processes +set firstpid [exp_pid -i $firstid] +set secondpid [exp_pid -i $secondid] +exec kill $firstpid +exec kill $secondpid +catch { wait -i $firstid; wait -i $secondid; close } +if {$failed} { + fail "$test" + } else { + pass "$test" +} + + +########## Inserting 2 Identical Modules: Staprun with -R ################# +# Should not give an error when inserting 2 identical modules +# when calling staprun directly with -R +set test "Inserting 2 Identical Modules: Staprun with -R" +set failed1 1 +set failed2 1 +set compile { exec stap -e {probe begin{printf("Hello\n");}} -p4 } +set module [eval $compile] + +spawn staprun -R $module +set firstid $spawn_id + +spawn staprun -R $module +set secondid $spawn_id + +# Make sure they both output "Hello" +expect { + -i $firstid Hello { + set failed1 0 + exp_continue + } + -i $secondid Hello { + set failed2 0 + exp_continue + } +} + +# Kill both of the hanging processes +set firstpid [exp_pid -i $firstid] +set secondpid [exp_pid -i $secondid] +exec kill $firstpid +exec kill $secondpid +catch { wait -i $firstid; wait -i $secondid; close } + +if {$failed1 || $failed2} { + fail "$test" + } else { + pass "$test" +} diff -Nru systemtap-1.4/testsuite/systemtap.base/rep_ret.exp systemtap-1.6/testsuite/systemtap.base/rep_ret.exp --- systemtap-1.4/testsuite/systemtap.base/rep_ret.exp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.base/rep_ret.exp 2011-07-25 18:12:01.000000000 +0000 @@ -2,10 +2,9 @@ # This test is only for i386 and x86_64 # Test 32-on-64 when available -set arches [list "-default"] switch -regexp $::tcl_platform(machine) { - {^i\d86$} {} - {^x86_64$} { lappend arches "-m32" } + {^i\d86$} { set arches [list "-default"] } + {^x86_64$} { set arches [list "-m64" "-m32"]} default { unsupported "$test"; return } } @@ -40,15 +39,14 @@ expect { -re {^main\r\n} { incr ok; exp_continue } -re {^rep_ret\r\n} { incr ok; exp_continue } - -re {^repnz_ret\r\n} { incr bad; exp_continue } - -re {^WARNING: [^\r\n]*failed[^\r\n]*repnz_ret[^\r\n]*\r\n} { incr warn; exp_continue } - -re {^WARNING: Number of errors: 0, skipped probes: 1\r\n} { incr warn; exp_continue } + -re {^repnz_ret\r\n} { incr ok; exp_continue } + -re {^WARNING: Number of errors: 0, skipped probes: [^\r\n]*\r\n} { incr warn; exp_continue } timeout { fail "$exe (timeout)" } eof { } } wait - if {$ok == 2 && $bad == 0 && $warn == 2} { + if {$ok == 3 && $bad == 0 && $warn == 0} { pass "$exe" } else { fail "$exe ($ok, $bad, $warn)" diff -Nru systemtap-1.4/testsuite/systemtap.base/sdt_asm.S systemtap-1.6/testsuite/systemtap.base/sdt_asm.S --- systemtap-1.4/testsuite/systemtap.base/sdt_asm.S 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.base/sdt_asm.S 2011-07-25 18:12:01.000000000 +0000 @@ -6,39 +6,68 @@ .type main, @function main: .cfi_startproc -#if defined __x86_64__ || defined __i386__ - mov $305419896, %eax - STAP_PROBE3(provider,a,%ah,%al,%ax); - mov $305419896, %ebx - STAP_PROBE3(provider,b,%bh,%bl,%bx); - mov $305419896, %ecx - STAP_PROBE3(provider,c,%ch,%cl,%cx); - mov $305419896, %edx - STAP_PROBE3(provider,d,%dh,%dl,%dx); - mov $305419896, %esi - mov $305419896, %edi - STAP_PROBE1(provider,si,%si); - STAP_PROBE1(provider,di,%di); +#if defined __i386__ + pushl %ebp + movl %esp, %ebp + movl $7, -4(%ebp) + STAP_PROBE3(provider,memory,-4(%ebp),-8+4(%ebp),-8+3+1(%ebp)); +#elif defined __x86_64__ + pushq %rbp + mov %rsp, %rbp + movl $7, -4(%rbp) + STAP_PROBE3(provider,memory,-4(%rbp),-8+4(%rbp),-8+3+1(%rbp)); +#endif +#if defined __i386__ || defined __x86_64__ + mov $0x10203040, %eax + STAP_PROBE4(provider,a,%ah,%al,%ax,%eax); + mov $0x11213141, %ebx + STAP_PROBE4(provider,b,%bh,%bl,%bx,%ebx); + mov $0x12223242, %ecx + STAP_PROBE4(provider,c,%ch,%cl,%cx,%ecx); + mov $0x13233343, %edx + STAP_PROBE4(provider,d,%dh,%dl,%dx,%edx); + mov $0x14243444, %esi + STAP_PROBE3(provider,si,%sil,%si,%esi); + mov $0x15253545, %edi + STAP_PROBE3(provider,di,%dil,%di,%edi); + mov $0x16263646, %ebp + STAP_PROBE2(provider,bp,%bp,%ebp); + mov $0x17273747, %esp + STAP_PROBE2(provider,sp,%sp,%esp); #endif -#ifdef __x86_64__ - STAP_PROBE1(provider,sil,%sil); - STAP_PROBE1(provider,dil,%dil); - mov $305419896, %r8 - STAP_PROBE2(provider,r8,%r8b,%r8w); - mov $305419896, %r9 - STAP_PROBE2(provider,r9,%r9b,%r9w); - mov $305419896, %r10 - STAP_PROBE2(provider,r10,%r10b,%r10w); - mov $305419896, %r11 - STAP_PROBE2(provider,r11,%r11b,%r11w); - mov $305419896, %r12 - STAP_PROBE2(provider,r12,%r12b,%r12w); - mov $305419896, %r13 - STAP_PROBE2(provider,r13,%r13b,%r13w); - mov $305419896, %r14 - STAP_PROBE2(provider,r14,%r14b,%r14w); - mov $305419896, %r15 - STAP_PROBE2(provider,r15,%r15b,%r15w); +#if defined __x86_64__ + mov $0x1020304010203040, %rax + STAP_PROBE1(provider,rax,%rax); + mov $0x1121314111213141, %rbx + STAP_PROBE1(provider,rbx,%rbx); + mov $0x1222324212223242, %rcx + STAP_PROBE1(provider,rcx,%rcx); + mov $0x1323334313233343, %rdx + STAP_PROBE1(provider,rdx,%rdx); + mov $0x1424344414243444, %rsi + STAP_PROBE1(provider,rsi,%rsi); + mov $0x1525354515253545, %rdi + STAP_PROBE1(provider,rdi,%rdi); + mov $0x1626364616263646, %rbp + STAP_PROBE1(provider,rbp,%rbp); + mov $0x1727374717273747, %rsp + STAP_PROBE1(provider,rsp,%rsp); + mov $0x1828384818283848, %r8 + STAP_PROBE4(provider,r8,%r8b,%r8w,%r8d,%r8); + mov $0x1929394919293949, %r9 + STAP_PROBE4(provider,r9,%r9b,%r9w,%r9d,%r9); + mov $0x1a2a3a4a1a2a3a4a, %r10 + STAP_PROBE4(provider,r10,%r10b,%r10w,%r10d,%r10); + mov $0x1b2b3b4b1b2b3b4b, %r11 + STAP_PROBE4(provider,r11,%r11b,%r11w,%r11d,%r11); + mov $0x1c2c3c4c1c2c3c4c, %r12 + STAP_PROBE4(provider,r12,%r12b,%r12w,%r12d,%r12); + mov $0x1d2d3d4d1d2d3d4d, %r13 + STAP_PROBE4(provider,r13,%r13b,%r13w,%r13d,%r13); + mov $0x1e2e3e4e1e2e3e4e, %r14 + STAP_PROBE4(provider,r14,%r14b,%r14w,%r14d,%r14); + mov $0x1f2f3f4f1f2f3f4f, %r15 + STAP_PROBE4(provider,r15,%r15b,%r15w,%r15d,%r15); #endif ret .cfi_endproc diff -Nru systemtap-1.4/testsuite/systemtap.base/sdt_asm.stp systemtap-1.6/testsuite/systemtap.base/sdt_asm.stp --- systemtap-1.4/testsuite/systemtap.base/sdt_asm.stp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.base/sdt_asm.stp 2011-07-25 18:12:01.000000000 +0000 @@ -1,96 +1,204 @@ probe process(@1).mark("a") -{ if ($arg1 == 86) {printf ("PASS: %sh\n", $$name)} - else {printf ("FAIL: %sh (%#x != 0x78)\n",$$name, $arg1)} - if ($arg2 == 120) {printf ("PASS: %sl\n", $$name)} - else {printf ("FAIL: %sl (%#x != 0x56)\n", $$name, $arg2)} - if ($arg3 == 22136) {printf ("PASS: %sx\n", $$name)} - else {printf ("FAIL: %sx (%#x != 0x5678)\n", $$name, $arg3)}} +{ if ($arg1 == 0x30) {printf ("PASS: %sh\n", $$name)} + else {printf ("FAIL: %sh (%#x != 0x30)\n",$$name, $arg1)} + if ($arg2 == 0x40) {printf ("PASS: %sl\n", $$name)} + else {printf ("FAIL: %sl (%#x != 0x40)\n", $$name, $arg2)} + if ($arg3 == 0x3040) {printf ("PASS: %sx\n", $$name)} + else {printf ("FAIL: %sx (%#x != 0x3040)\n", $$name, $arg3)} + if ($arg4 == 0x10203040) {printf ("PASS: e%sx\n", $$name)} + else {printf ("FAIL: e%sx (%#x != 0x10203040)\n", $$name, $arg4)} +} + +probe process(@1).mark("rax") ? +{ if ($arg1 == 0x1020304010203040) {printf ("PASS: %s\n", $$name)} + else {printf ("FAIL: %s (%#x != 0x1020304010203040)\n", $$name, $arg1)} +} probe process(@1).mark("b") -{ if ($arg1 == 86) {printf ("PASS: %sh\n", $$name)} - else {printf ("FAIL: %sh (%#x != 0x78)\n",$$name, $arg1)} - if ($arg2 == 120) {printf ("PASS: %sl\n", $$name)} - else {printf ("FAIL: %sl (%#x != 0x56)\n", $$name, $arg2)} - if ($arg3 == 22136) {printf ("PASS: %sx\n", $$name)} - else {printf ("FAIL: %sx (%#x != 0x5678)\n", $$name, $arg3)}} +{ if ($arg1 == 0x31) {printf ("PASS: %sh\n", $$name)} + else {printf ("FAIL: %sh (%#x != 0x31)\n",$$name, $arg1)} + if ($arg2 == 0x41) {printf ("PASS: %sl\n", $$name)} + else {printf ("FAIL: %sl (%#x != 0x41)\n", $$name, $arg2)} + if ($arg3 == 0x3141) {printf ("PASS: %sx\n", $$name)} + else {printf ("FAIL: %sx (%#x != 0x3141)\n", $$name, $arg3)} + if ($arg4 == 0x11213141) {printf ("PASS: e%sx\n", $$name)} + else {printf ("FAIL: e%sx (%#x != 0x11213141)\n", $$name, $arg4)} +} + +probe process(@1).mark("rbx") ? +{ if ($arg1 == 0x1121314111213141) {printf ("PASS: %s\n", $$name)} + else {printf ("FAIL: %s (%#x != 0x1121314111213141)\n", $$name, $arg1)} +} probe process(@1).mark("c") -{ if ($arg1 == 86) {printf ("PASS: %sh\n", $$name)} - else {printf ("FAIL: %sh (%#x != 0x78)\n",$$name, $arg1)} - if ($arg2 == 120) {printf ("PASS: %sl\n", $$name)} - else {printf ("FAIL: %sl (%#x != 0x56)\n", $$name, $arg2)} - if ($arg3 == 22136) {printf ("PASS: %sx\n", $$name)} - else {printf ("FAIL: %sx (%#x != 0x5678)\n", $$name, $arg3)}} +{ if ($arg1 == 0x32) {printf ("PASS: %sh\n", $$name)} + else {printf ("FAIL: %sh (%#x != 0x32)\n",$$name, $arg1)} + if ($arg2 == 0x42) {printf ("PASS: %sl\n", $$name)} + else {printf ("FAIL: %sl (%#x != 0x42)\n", $$name, $arg2)} + if ($arg3 == 0x3242) {printf ("PASS: %sx\n", $$name)} + else {printf ("FAIL: %sx (%#x != 0x3242)\n", $$name, $arg3)} + if ($arg4 == 0x12223242) {printf ("PASS: e%sx\n", $$name)} + else {printf ("FAIL: e%sx (%#x != 0x12223242)\n", $$name, $arg4)} +} + +probe process(@1).mark("rcx") ? +{ if ($arg1 == 0x1222324212223242) {printf ("PASS: %s\n", $$name)} + else {printf ("FAIL: %s (%#x != 0x1222324212223242)\n", $$name, $arg1)} +} probe process(@1).mark("d") -{ if ($arg1 == 86) {printf ("PASS: %sh\n", $$name)} - else {printf ("FAIL: %sh (%#x != 0x78)\n",$$name, $arg1)} - if ($arg2 == 120) {printf ("PASS: %sl\n", $$name)} - else {printf ("FAIL: %sl (%#x != 0x56)\n", $$name, $arg2)} - if ($arg3 == 22136) {printf ("PASS: %sx\n", $$name)} - else {printf ("FAIL: %sx (%#x != 0x5678)\n", $$name, $arg3)}} - -probe process(@1).mark("sil") ? -{ if ($arg1 == 120) {printf ("PASS: %s\n", $$name)} - else {printf ("FAIL: %s (%#x != 0x56)\n",$$name, $arg1)}} - -probe process(@1).mark("dil") ? -{ if ($arg1 == 120) {printf ("PASS: %s\n", $$name)} - else {printf ("FAIL: %s (%#x != 0x56)\n",$$name, $arg1)}} +{ if ($arg1 == 0x33) {printf ("PASS: %sh\n", $$name)} + else {printf ("FAIL: %sh (%#x != 0x33)\n",$$name, $arg1)} + if ($arg2 == 0x43) {printf ("PASS: %sl\n", $$name)} + else {printf ("FAIL: %sl (%#x != 0x43)\n", $$name, $arg2)} + if ($arg3 == 0x3343) {printf ("PASS: %sx\n", $$name)} + else {printf ("FAIL: %sx (%#x != 0x3343)\n", $$name, $arg3)} + if ($arg4 == 0x13233343) {printf ("PASS: e%sx\n", $$name)} + else {printf ("FAIL: e%sx (%#x != 0x13233343)\n", $$name, $arg4)} +} + +probe process(@1).mark("rdx") ? +{ if ($arg1 == 0x1323334313233343) {printf ("PASS: %s\n", $$name)} + else {printf ("FAIL: %s (%#x != 0x1323334313233343)\n", $$name, $arg1)} +} probe process(@1).mark("si") -{ if ($arg1 == 22136) {printf ("PASS: %s\n", $$name)} - else {printf ("FAIL: %s (%#x != 0x5678)\n", $$name, $arg1)}} +{ if ($arg1 == 0x44) {printf ("PASS: %sl\n", $$name)} + else {printf ("FAIL: %sl (%#x != 0x44)\n",$$name, $arg1)} + if ($arg2 == 0x3444) {printf ("PASS: %s\n", $$name)} + else {printf ("FAIL: %s (%#x != 0x3444)\n", $$name, $arg2)} + if ($arg3 == 0x14243444) {printf ("PASS: e%s\n", $$name)} + else {printf ("FAIL: e%s (%#x != 0x14243444)\n", $$name, $arg3)} +} + +probe process(@1).mark("rsi") ? +{ if ($arg1 == 0x1424344414243444) {printf ("PASS: %s\n", $$name)} + else {printf ("FAIL: %s (%#x != 0x1424344414243444)\n", $$name, $arg1)} +} probe process(@1).mark("di") -{ if ($arg1 == 22136) {printf ("PASS: %s\n", $$name)} - else {printf ("FAIL: %s (%#x != 0x5678)\n", $$name, $arg1)}} +{ if ($arg1 == 0x45) {printf ("PASS: %sl\n", $$name)} + else {printf ("FAIL: %sl (%#x != 0x45)\n",$$name, $arg1)} + if ($arg2 == 0x3545) {printf ("PASS: %s\n", $$name)} + else {printf ("FAIL: %s (%#x != 0x3545)\n", $$name, $arg2)} + if ($arg3 == 0x15253545) {printf ("PASS: e%s\n", $$name)} + else {printf ("FAIL: e%s (%#x != 0x15253545)\n", $$name, $arg3)} +} + +probe process(@1).mark("rdi") ? +{ if ($arg1 == 0x1525354515253545) {printf ("PASS: %s\n", $$name)} + else {printf ("FAIL: %s (%#x != 0x1525354515253545)\n", $$name, $arg1)} +} + +probe process(@1).mark("bp") +{ if ($arg2 == 0x16263646) {printf ("PASS: e%s\n", $$name)} + else {printf ("FAIL: e%s (%#x != 0x16263646)\n", $$name, $arg2)} +} + +probe process(@1).mark("rbp") ? +{ if ($arg1 == 0x1626364616263646) {printf ("PASS: %s\n", $$name)} + else {printf ("FAIL: %s (%#x != 0x1626364616263646)\n", $$name, $arg1)} +} + +probe process(@1).mark("sp") +{ if ($arg2 == 0x17273747) {printf ("PASS: e%s\n", $$name)} + else {printf ("FAIL: e%s (%#x != 0x17273747)\n", $$name, $arg2)} +} + +probe process(@1).mark("rsp") ? +{ if ($arg1 == 0x1727374717273747) {printf ("PASS: %s\n", $$name)} + else {printf ("FAIL: %s (%#x != 0x1727374717273747)\n", $$name, $arg1)} +} probe process(@1).mark("r8") ? -{ if ($arg1 == 120) {printf ("PASS: %sb\n", $$name)} - else {printf ("FAIL: %sb (%#x != 0x56)\n",$$name, $arg1)} - if ($arg2 == 22136) {printf ("PASS: %sw\n", $$name)} - else {printf ("FAIL: %sw (%#x != 0x5678)\n", $$name, $arg2)}} +{ if ($arg1 == 0x48) {printf ("PASS: %sb\n", $$name)} + else {printf ("FAIL: %sb (%#x != 0x48)\n",$$name, $arg1)} + if ($arg2 == 0x3848) {printf ("PASS: %sw\n", $$name)} + else {printf ("FAIL: %sw (%#x != 0x3848)\n", $$name, $arg2)} + if ($arg3 == 0x18283848) {printf ("PASS: %s\n", $$name)} + else {printf ("FAIL: %sd (%#x != 0x18283848)\n", $$name, $arg3)} + if ($arg4 == 0x1828384818283848) {printf ("PASS: %s\n", $$name)} + else {printf ("FAIL: %sx (%#x != 0x1828384818283848)\n", $$name, $arg4)} +} probe process(@1).mark("r9") ? -{ if ($arg1 == 120) {printf ("PASS: %sb\n", $$name)} - else {printf ("FAIL: %sb (%#x != 0x56)\n",$$name, $arg1)} - if ($arg2 == 22136) {printf ("PASS: %sw\n", $$name)} - else {printf ("FAIL: %sw (%#x != 0x5678)\n", $$name, $arg2)}} +{ if ($arg1 == 0x49) {printf ("PASS: %sb\n", $$name)} + else {printf ("FAIL: %sb (%#x != 0x49)\n",$$name, $arg1)} + if ($arg2 == 0x3949) {printf ("PASS: %sw\n", $$name)} + else {printf ("FAIL: %sw (%#x != 0x3949)\n", $$name, $arg2)} + if ($arg3 == 0x19293949) {printf ("PASS: %s\n", $$name)} + else {printf ("FAIL: %sd (%#x != 0x19293949)\n", $$name, $arg3)} + if ($arg4 == 0x1929394919293949) {printf ("PASS: %s\n", $$name)} + else {printf ("FAIL: %sx (%#x != 0x1929394919293949)\n", $$name, $arg4)} +} probe process(@1).mark("r10") ? -{ if ($arg1 == 120) {printf ("PASS: %sb\n", $$name)} - else {printf ("FAIL: %sb (%#x != 0x56)\n",$$name, $arg1)} - if ($arg2 == 22136) {printf ("PASS: %sw\n", $$name)} - else {printf ("FAIL: %sw (%#x != 0x5678)\n", $$name, $arg2)}} +{ if ($arg1 == 0x4a) {printf ("PASS: %sb\n", $$name)} + else {printf ("FAIL: %sb (%#x != 0x4a)\n",$$name, $arg1)} + if ($arg2 == 0x3a4a) {printf ("PASS: %sw\n", $$name)} + else {printf ("FAIL: %sw (%#x != 0x3a4a)\n", $$name, $arg2)} + if ($arg3 == 0x1a2a3a4a) {printf ("PASS: %s\n", $$name)} + else {printf ("FAIL: %sd (%#x != 0x1a2a3a4a)\n", $$name, $arg3)} + if ($arg4 == 0x1a2a3a4a1a2a3a4a) {printf ("PASS: %s\n", $$name)} + else {printf ("FAIL: %sx (%#x != 0x1a2a3a4a1a2a3a4a)\n", $$name, $arg4)} +} probe process(@1).mark("r11") ? -{ if ($arg1 == 120) {printf ("PASS: %sb\n", $$name)} - else {printf ("FAIL: %sb (%#x != 0x56)\n",$$name, $arg1)} - if ($arg2 == 22136) {printf ("PASS: %sw\n", $$name)} - else {printf ("FAIL: %sw (%#x != 0x5678)\n", $$name, $arg2)}} +{ if ($arg1 == 0x4b) {printf ("PASS: %sb\n", $$name)} + else {printf ("FAIL: %sb (%#x != 0x4b)\n",$$name, $arg1)} + if ($arg2 == 0x3b4b) {printf ("PASS: %sw\n", $$name)} + else {printf ("FAIL: %sw (%#x != 0x3b4b)\n", $$name, $arg2)} + if ($arg3 == 0x1b2b3b4b) {printf ("PASS: %s\n", $$name)} + else {printf ("FAIL: %sd (%#x != 0x1b2b3b4b)\n", $$name, $arg3)} + if ($arg4 == 0x1b2b3b4b1b2b3b4b) {printf ("PASS: %s\n", $$name)} + else {printf ("FAIL: %sx (%#x != 0x1b2b3b4b1b2b3b4b)\n", $$name, $arg4)} +} probe process(@1).mark("r12") ? -{ if ($arg1 == 120) {printf ("PASS: %sb\n", $$name)} - else {printf ("FAIL: %sb (%#x != 0x56)\n",$$name, $arg1)} - if ($arg2 == 22136) {printf ("PASS: %sw\n", $$name)} - else {printf ("FAIL: %sw (%#x != 0x5678)\n", $$name, $arg2)}} +{ if ($arg1 == 0x4c) {printf ("PASS: %sb\n", $$name)} + else {printf ("FAIL: %sb (%#x != 0x4c)\n",$$name, $arg1)} + if ($arg2 == 0x3c4c) {printf ("PASS: %sw\n", $$name)} + else {printf ("FAIL: %sw (%#x != 0x3c4c)\n", $$name, $arg2)} + if ($arg3 == 0x1c2c3c4c) {printf ("PASS: %s\n", $$name)} + else {printf ("FAIL: %sd (%#x != 0x1c2c3c4c)\n", $$name, $arg3)} + if ($arg4 == 0x1c2c3c4c1c2c3c4c) {printf ("PASS: %s\n", $$name)} + else {printf ("FAIL: %sx (%#x != 0x1c2c3c4c1c2c3c4c)\n", $$name, $arg4)} +} probe process(@1).mark("r13") ? -{ if ($arg1 == 120) {printf ("PASS: %sb\n", $$name)} - else {printf ("FAIL: %sb (%#x != 0x56)\n",$$name, $arg1)} - if ($arg2 == 22136) {printf ("PASS: %sw\n", $$name)} - else {printf ("FAIL: %sw (%#x != 0x5678)\n", $$name, $arg2)}} +{ if ($arg1 == 0x4d) {printf ("PASS: %sb\n", $$name)} + else {printf ("FAIL: %sb (%#x != 0x4d)\n",$$name, $arg1)} + if ($arg2 == 0x3d4d) {printf ("PASS: %sw\n", $$name)} + else {printf ("FAIL: %sw (%#x != 0x3d4d)\n", $$name, $arg2)} + if ($arg3 == 0x1d2d3d4d) {printf ("PASS: %s\n", $$name)} + else {printf ("FAIL: %sd (%#x != 0x1d2d3d4d)\n", $$name, $arg3)} + if ($arg4 == 0x1d2d3d4d1d2d3d4d) {printf ("PASS: %s\n", $$name)} + else {printf ("FAIL: %sx (%#x != 0x1d2d3d4d1d2d3d4d)\n", $$name, $arg4)} +} probe process(@1).mark("r14") ? -{ if ($arg1 == 120) {printf ("PASS: %sb\n", $$name)} - else {printf ("FAIL: %sb (%#x != 0x56)\n",$$name, $arg1)} - if ($arg2 == 22136) {printf ("PASS: %sw\n", $$name)} - else {printf ("FAIL: %sw (%#x != 0x5678)\n", $$name, $arg2)}} +{ if ($arg1 == 0x4e) {printf ("PASS: %sb\n", $$name)} + else {printf ("FAIL: %sb (%#x != 0x4e)\n",$$name, $arg1)} + if ($arg2 == 0x3e4e) {printf ("PASS: %sw\n", $$name)} + else {printf ("FAIL: %sw (%#x != 0x3e4e)\n", $$name, $arg2)} + if ($arg3 == 0x1e2e3e4e) {printf ("PASS: %s\n", $$name)} + else {printf ("FAIL: %sd (%#x != 0x1e2e3e4e)\n", $$name, $arg3)} + if ($arg4 == 0x1e2e3e4e1e2e3e4e) {printf ("PASS: %s\n", $$name)} + else {printf ("FAIL: %sx (%#x != 0x1e2e3e4e1e2e3e4e)\n", $$name, $arg4)} +} probe process(@1).mark("r15") ? -{ if ($arg1 == 120) {printf ("PASS: %sb\n", $$name)} - else {printf ("FAIL: %sb (%#x != 0x56)\n",$$name, $arg1)} - if ($arg2 == 22136) {printf ("PASS: %sw\n", $$name)} - else {printf ("FAIL: %sw (%#x != 0x5678)\n", $$name, $arg2)}} - +{ if ($arg1 == 0x4f) {printf ("PASS: %sb\n", $$name)} + else {printf ("FAIL: %sb (%#x != 0x4f)\n",$$name, $arg1)} + if ($arg2 == 0x3f4f) {printf ("PASS: %sw\n", $$name)} + else {printf ("FAIL: %sw (%#x != 0x3f4f)\n", $$name, $arg2)} + if ($arg3 == 0x1f2f3f4f) {printf ("PASS: %s\n", $$name)} + else {printf ("FAIL: %sd (%#x != 0x1f2f3f4f)\n", $$name, $arg3)} + if ($arg4 == 0x1f2f3f4f1f2f3f4f) {printf ("PASS: %s\n", $$name)} + else {printf ("FAIL: %sx (%#x != 0x1f2f3f4f1f2f3f4f)\n", $$name, $arg4)} +} + +probe process(@1).mark("memory") ? +{ if ($arg1 == 7 && $arg2 == 7 && $arg3 == 7) {printf ("PASS: %s\n", $$name)} + else {printf ("FAIL: %s ((%d|%d|%d) != 7)\n", $$name, $arg1, $arg2, $arg3)} +} diff -Nru systemtap-1.4/testsuite/systemtap.base/sdt_misc.exp systemtap-1.6/testsuite/systemtap.base/sdt_misc.exp --- systemtap-1.4/testsuite/systemtap.base/sdt_misc.exp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.base/sdt_misc.exp 2011-07-25 18:12:01.000000000 +0000 @@ -195,7 +195,12 @@ for {set p 0} {$p < [lindex $type_pedantics_idx $j]} {incr p} { set type_pedantic_mssg [lindex $type_pedantic_mssgs $p] -set type_flags "$sup_flags [lindex $extra_type_flags $j] [lindex $type_pedantics $p] [lindex $has_long_long $j]" +set type_flags "[sdt_includes] additional_flags=-Wall additional_flags=-Werror" +set type_flags "$type_flags additional_flags=-I. $pbtype_flag" +set type_flags "$type_flags [lindex $extra_type_flags $j] [lindex $type_pedantics $p] [lindex $has_long_long $j]" +if {![regexp "^i.86$" $::tcl_platform(machine)]} { + set type_flags "$type_flags additional_flags=-m64" +} set res [target_compile $srcdir/$subdir/sdt_types.c sdt_types.x executable $type_flags] if { $res != "" } { verbose "target_compile failed: $res" 2 @@ -379,7 +384,7 @@ catch {close}; catch {wait} -if { $ok == 51 || ($ok == 42 && [regexp "^(i.86)$" $::tcl_platform(machine)])} { +if { $ok == 51 || ($ok == 43 && [regexp "^(i.86)$" $::tcl_platform(machine)])} { pass "$test wildcard $pbtype_mssg" } else { fail "$test wildcard ($ok) $pbtype_mssg" @@ -388,10 +393,8 @@ # 7. Test types defined in sdt_misc_.d. This requires -g set ok 0 - set supbc_flags "$sup_flags additional_flags=-g additional_flags=-DNO_SLEEP" set supbc_exepath "[pwd]/sdt_misc_${pbtype_mssg}_types.x" - set res [target_compile $srcdir/$subdir/sdt_misc.c $supbc_exepath executable $supbc_flags] if { $res != "" } { verbose "target_compile failed: $res" 2 @@ -456,4 +459,21 @@ } } ; # x86_64 | i.86 +set ok 0 +verbose -log "spawn $stap_path -c ./sdt_misc_V3_uprobe.x -e \"probe process(\"./sdt_misc_V3_uprobe.x\").mark(\"test_probe_5\") {printf(\"%s %s %s\\n\", \$\$provider, \$\$name, \$\$parms)}\"" +spawn $stap_path -c ./sdt_misc_V3_uprobe.x -e "probe process(\"./sdt_misc_V3_uprobe.x\").mark(\"test_probe_3\") {printf(\"%s %s %s\\n\", \$\$provider, \$\$name, \$\$parms)}" +expect { + -timeout 180 + -re {sdt_misc test_probe_3 \$arg1=0x3 \$arg2=0x[0-9a-f][0-9a-f]} { incr ok; exp_continue } + timeout { fail "$test (timeout)" } + eof { } +} + +if {$ok == 1} { + pass "$test \$\$parms" +} else { + fail "$test ($ok) \$\$parms" + return +} + cleanup_handler $verbose diff -Nru systemtap-1.4/testsuite/systemtap.base/sdt_types.c systemtap-1.6/testsuite/systemtap.base/sdt_types.c --- systemtap-1.4/testsuite/systemtap.base/sdt_types.c 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.base/sdt_types.c 2011-07-25 18:12:01.000000000 +0000 @@ -47,7 +47,7 @@ long int * volatile long_int_ptr_volatile_var = &long_int_var; /* c89 doesn't define __STDC_VERSION. With -pedantic warns about long long. */ -#if ! defined NO_LONG_LONG && ! defined __i386__ +#if ! defined NO_LONG_LONG && __SIZEOF_SIZE_T__ == 8 long long int long_long_int_var = 65536; const long long int const_long_long_int_var = -65536; volatile long long int volatile_long_long_int_var = -65536; @@ -74,7 +74,7 @@ char char_8; unsigned int bit1_9:1; unsigned int bit1_10:1; - } bitfields_small_var = { 1, 0, 'a', 1, 0, 'z', 1, 0}; + } bitfields_a_var = { 1, 0, 'a', 1, 0, 'z', 1, 0}; struct { unsigned char char_0; @@ -87,7 +87,7 @@ int bit9_16:9; unsigned int bit9_25:9; char char_34; - } bitfields_bit_var = {'A', -1, 1, 1, 3, 3, 7, 255, 511, 'Z'}; + } bitfields_b_var = {'A', -1, 1, 1, 3, 3, 7, 255, 511, 'Z'}; # if !defined(__cplusplus) || \ ((__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)) && __GXX_EXPERIMENTAL_CXX0X__) @@ -150,7 +150,7 @@ STAP_PROBE2(provider,long_int_ptr_volatile_var,long_int_ptr_volatile_var,&long_int_var); /* long long */ -#if ! defined NO_LONG_LONG && ! defined __i386__ +#if ! defined NO_LONG_LONG && __SIZEOF_SIZE_T__ == 8 STAP_PROBE1(provider,long_long_int_var,long_long_int_var); STAP_PROBE1(provider,const_long_long_int_var,const_long_long_int_var); STAP_PROBE1(provider,volatile_long_long_int_var,volatile_long_long_int_var); @@ -167,26 +167,26 @@ STAP_PROBE1(provider,arr_struct,ARRAY(arr_struct)); # endif - STAP_PROBE8(provider,bitfields_small_var, - (int)bitfields_small_var.bit1_0, - (int)bitfields_small_var.bit1_1, - bitfields_small_var.char_2, - (int)bitfields_small_var.bit1_6, - (int)bitfields_small_var.bit1_7, - bitfields_small_var.char_8, - (int)bitfields_small_var.bit1_9, - (int)bitfields_small_var.bit1_10); - - STAP_PROBE10(provider,bitfields_bit_var,bitfields_bit_var.char_0, - (int)bitfields_bit_var.bit1_4, - (int)bitfields_bit_var.bit1_5, - (int)bitfields_bit_var.bit2_6, - (int)bitfields_bit_var.bit2_8, - (int)bitfields_bit_var.bit3_10, - (int)bitfields_bit_var.bit3_13, - (int)bitfields_bit_var.bit9_16, - (int)bitfields_bit_var.bit9_25, - bitfields_bit_var.char_34); + STAP_PROBE8(provider,bitfields_a_var, + (int)bitfields_a_var.bit1_0, + (int)bitfields_a_var.bit1_1, + bitfields_a_var.char_2, + (int)bitfields_a_var.bit1_6, + (int)bitfields_a_var.bit1_7, + bitfields_a_var.char_8, + (int)bitfields_a_var.bit1_9, + (int)bitfields_a_var.bit1_10); + + STAP_PROBE10(provider,bitfields_b_var,bitfields_b_var.char_0, + (int)bitfields_b_var.bit1_4, + (int)bitfields_b_var.bit1_5, + (int)bitfields_b_var.bit2_6, + (int)bitfields_b_var.bit2_8, + (int)bitfields_b_var.bit3_10, + (int)bitfields_b_var.bit3_13, + (int)bitfields_b_var.bit9_16, + (int)bitfields_b_var.bit9_25, + bitfields_b_var.char_34); # if !defined(__cplusplus) || \ ((__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)) && __GXX_EXPERIMENTAL_CXX0X__) diff -Nru systemtap-1.4/testsuite/systemtap.base/sdt_types.stp systemtap-1.6/testsuite/systemtap.base/sdt_types.stp --- systemtap-1.4/testsuite/systemtap.base/sdt_types.stp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.base/sdt_types.stp 2011-07-25 18:12:01.000000000 +0000 @@ -373,23 +373,23 @@ printf("PASS: arr_struct_var\n") } -probe process(@1).mark("bitfields_small_var") +probe process(@1).mark("bitfields_a_var") { if ($arg1 != 1 || $arg2 != 0 || $arg3 != 97 || $arg4 != 1 || $arg5 != 0 || $arg6 != 122 || $arg7 != 1 || $arg8 != 0) - printf("FAIL: bitfields_small_var\n") + printf("FAIL: bitfields_a_var\n") else - printf("PASS: bitfields_small_var\n") + printf("PASS: bitfields_a_var\n") } -probe process(@1).mark("bitfields_bit_var") +probe process(@1).mark("bitfields_b_var") { if ($arg1 != 65 || ($arg2 != -1) || $arg3 != 1 || $arg4 != 1 || $arg5 != 3 || $arg6 != 3 || $arg7 != 7 || $arg8 != 255 || $arg9 != 511 || $arg10 != 90) - printf("FAIL: bitfields_bit_var (%#d/%#d/%#d/%#d/%#d/%#d/%#d/%#d/%#d/%#d != 65/-1/1/1/3/3/7/255/511/90\n",$arg1,$arg2,$arg3,$arg4,$arg5,$arg6,$arg7,$arg8,$arg9,$arg10) + printf("FAIL: bitfields_b_var (%#d/%#d/%#d/%#d/%#d/%#d/%#d/%#d/%#d/%#d != 65/-1/1/1/3/3/7/255/511/90\n",$arg1,$arg2,$arg3,$arg4,$arg5,$arg6,$arg7,$arg8,$arg9,$arg10) else - printf("PASS: bitfields_bit_var\n") + printf("PASS: bitfields_b_var\n") } diff -Nru systemtap-1.4/testsuite/systemtap.base/sdt_va_args.c systemtap-1.6/testsuite/systemtap.base/sdt_va_args.c --- systemtap-1.4/testsuite/systemtap.base/sdt_va_args.c 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.base/sdt_va_args.c 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,19 @@ +#define SDT_USE_VARIADIC +#include "sys/sdt.h" + +int main() +{ + STAP_PROBEV(test, mark_z); + STAP_PROBEV(test, mark_a, 1); + STAP_PROBEV(test, mark_b, 1, 2); + STAP_PROBEV(test, mark_c, 1, 2, 3); + STAP_PROBEV(test, mark_d, 1, 2, 3, 4); + STAP_PROBEV(test, mark_e, 1, 2, 3, 4, 5); + STAP_PROBEV(test, mark_f, 1, 2, 3, 4, 5, 6); + STAP_PROBEV(test, mark_g, 1, 2, 3, 4, 5, 6, 7); + STAP_PROBEV(test, mark_h, 1, 2, 3, 4, 5, 6, 7, 8); + STAP_PROBEV(test, mark_i, 1, 2, 3, 4, 5, 6, 7, 8, 9); + STAP_PROBEV(test, mark_j, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10); + + return 0; +} diff -Nru systemtap-1.4/testsuite/systemtap.base/sdt_va_args.exp systemtap-1.6/testsuite/systemtap.base/sdt_va_args.exp --- systemtap-1.4/testsuite/systemtap.base/sdt_va_args.exp 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.base/sdt_va_args.exp 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,58 @@ +set test "sdt_va_args" +set ::result_string {_ +1 +1 2 +1 2 3 +1 2 3 4 +1 2 3 4 5 +1 2 3 4 5 6 +1 2 3 4 5 6 7 +1 2 3 4 5 6 7 8 +1 2 3 4 5 6 7 8 9 +1 2 3 4 5 6 7 8 9 10} + +set extra_flags { + {} + {additional_flags=-std=c89} + {additional_flags=-std=c99} + {additional_flags=-std=gnu99} + {c++ additional_flags=-std=c++98 additional_flags=-x additional_flags=c++} + {c++ additional_flags=-std=gnu++98 additional_flags=-x additional_flags=c++} + {c++ additional_flags=-std=c++0x additional_flags=-x additional_flags=c++} + {c++ additional_flags=-std=gnu++0x additional_flags=-x additional_flags=c++} +} +set extra_mssgs {base c89 c99 gnu99 c++98 gnu++98 c++0x gnu++0x} + +# Iterate extra_flags, trying each with C and C++ +for {set i 0} {$i < [llength $extra_flags]} {incr i} { +set extra_flag [lindex $extra_flags $i] +set extra_mssg [lindex $extra_mssgs $i] +set testprog "$test.c.exe.$i" + +set test_flags "additional_flags=-g" +set test_flags "$test_flags [sdt_includes]" +set test_flags "$test_flags additional_flags=-Wall" +set test_flags "$test_flags additional_flags=-Wextra" +set test_flags "$test_flags additional_flags=-Werror" + +set saveidx 0 + +set res [target_compile $srcdir/$subdir/$test.c $testprog executable "$test_flags $extra_flag"] +if { $res != "" } { + verbose "target_compile failed: $res" 2 + fail "compiling $test.c $extra_mssg" + untested "$test $extra_mssg" + continue +} else { + pass "compiling $test.c $extra_mssg" +} + +if {[installtest_p] && [utrace_p] && [uprobes_p]} { + stap_run3 "$test $extra_mssg" -w $srcdir/$subdir/sdt.stp $testprog -c ./$testprog +} else { + untested "$test $extra_mssg" +} +catch {exec rm -f $testprog} + +} ; # for {set i 0} {$i < [llength $extra_flags]} + diff -Nru systemtap-1.4/testsuite/systemtap.base/setjmp.c systemtap-1.6/testsuite/systemtap.base/setjmp.c --- systemtap-1.4/testsuite/systemtap.base/setjmp.c 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.base/setjmp.c 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,48 @@ +#include + +#ifdef SIGJMP +# define SETJMP(env) sigsetjmp (env, 1) +# define LONGJMP(env, x) siglongjmp (env, x) +#elif defined UNDERJMP +# define SETJMP(env) _setjmp (env) +# define LONGJMP(env, x) _longjmp (env, x) +#else +# define SETJMP(env) setjmp (env) +# define LONGJMP(env, x) longjmp (env, x) +#endif + +struct env +{ + jmp_buf jmp; +}; + +struct env saved; + +void __attribute__ ((noinline)) +jumper (struct env *env, int x) +{ + if (x == 0) + siglongjmp (env->jmp, 1); +} + +void __attribute__ ((noinline)) +jumped (void) +{ + asm volatile (""); +} + +void __attribute__ ((noinline)) +setter (void) +{ + if (sigsetjmp (saved.jmp, 1) == 0) + jumper (&saved, 0); + else + jumped (); +} + +int +main (void) +{ + setter (); + return 0; +} diff -Nru systemtap-1.4/testsuite/systemtap.base/setjmp.exp systemtap-1.6/testsuite/systemtap.base/setjmp.exp --- systemtap-1.4/testsuite/systemtap.base/setjmp.exp 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.base/setjmp.exp 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,57 @@ +set test "setjmp" +set ::result_string {hit longjmp_target} + +foreach variant [list "" "-DSIGJMP" "-DUNDERJMP"] { + foreach flags [list "" "-D_FORTIFY_SOURCE=2"] { + + set this_test "$test $variant $flags" + + set testprog "setjmp.exe${variant}${flags}" + set test_flags "" + foreach arg [list "-g" "$flags"] { + set test_flags "$test_flags additional_flags=$arg " + } + + set res [target_compile $srcdir/$subdir/$test.c $testprog executable \ + "$test_flags"] + if {$res != ""} { + verbose "target_compile failed: $res" 2 + fail "compiling $test.c $variant $flags" + untested $this_test + continue + } else { + pass "compiling $test.c $variant $flags" + } + + if {[catch \ + {exec stap -l "process(\"/lib*/libc.so.*\").mark(\"*jmp*\")" \ + 2>@1} res]} { + if {[lindex $::errorCode 0] eq "CHILDSTATUS"} { + set status [lindex $::errorCode 2] + if {$status == 1} { + verbose -log "stap -l check found no libc probes" 1 + untested $this_test + continue + } + } + verbose -log "stap -l failed: $res" + fail "stap -l check for libc probes" + untested $this_test + continue + } else { + verbose -log "stap -l yields: $res" + if {$res == ""} { + verbose -log "stap -l check found no libc probes" 1 + untested $this_test + continue + } + } + + if {[installtest_p] && [utrace_p] && [uprobes_p]} { + stap_run3 $this_test -w --ldd $srcdir/$subdir/$test.stp \ + $testprog ./$testprog -c ./$testprog + } else { + untested $this_test + } + } +} diff -Nru systemtap-1.4/testsuite/systemtap.base/setjmp.stp systemtap-1.6/testsuite/systemtap.base/setjmp.stp --- systemtap-1.4/testsuite/systemtap.base/setjmp.stp 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.base/setjmp.stp 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,76 @@ +global jmp_buf, jmp_target, jmp_backtrace + +function callers:string() +{ + bt = ubacktrace(); + // Skip the first caller, which is setjmp or longjmp itself. + callers = ""; + token = tokenize(bt, " "); + while ((token = tokenize("", " ")) != "") + callers = callers . " " . token; + return callers; +} + +function nth_caller:long(n, bt) +{ + token = tokenize(bt, " "); + while (n-- > 0) + token = tokenize("", " "); + return strtol(token, 16); +} + +global started = 0 +probe process(@1).function("main") +{ + started = 1; +} + +probe process("/lib*/libc.so.*").mark("setjmp") +{ + if (!started) next; + + jmp_buf[tid()] = $arg1; + jmp_target[tid()] = $arg3; + bt = jmp_backtrace[tid()] = callers(); + for (i = 0; i < 5; ++i) + if (usymname(nth_caller(i, bt)) == "setter") + next; + printf("setjmp backtrace doesn't include setter:\n"); + print_ubacktrace(); +} + +function check_jmp(buf, target) +{ + if (jmp_buf[tid()] != buf) + printf("longjmp env %p, expected %p\n", buf, jmp_buf[tid()]); + if (jmp_target[tid()] != target) + printf("longjmp target %p, expected %p\n", target, jmp_target[tid()]); +} + +probe process("/lib*/libc.so.*").mark("longjmp") +{ + if (!started) next; + + check_jmp($arg1, $arg3); + bt = callers(); + if (bt == jmp_backtrace[tid()]) + printf("longjmp backtrace matches setjmp backtrace!\n"); + for (i = 0; i < 5; ++i) + if (usymname(nth_caller(i, bt)) == "jumper") + next; + printf("longjmp backtrace doesn't include jumper:\n"); + print_ubacktrace(); +} + +probe process("/lib*/libc.so.*").mark("longjmp_target") +{ + if (!started) next; + + check_jmp($arg1, $arg3); + bt = callers(); + if (bt != jmp_backtrace[tid()]) + printf("longjmp_target backtrace does not match setjmp:\n\t%s\nvs\t%s", + sprint_ustack(jmp_backtrace[tid()]), sprint_ustack(bt)); + + printf("hit longjmp_target\n"); +} diff -Nru systemtap-1.4/testsuite/systemtap.base/skipped.exp systemtap-1.6/testsuite/systemtap.base/skipped.exp --- systemtap-1.4/testsuite/systemtap.base/skipped.exp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.base/skipped.exp 2011-07-25 18:12:01.000000000 +0000 @@ -20,8 +20,8 @@ -re {^ERROR: Skipped too many probes, check MAXSKIPPED or try again with stap -t for more details.\r\n} { incr errs; exp_continue } -re {^WARNING: Number of errors: 0, skipped probes: [0-9]+\r\n} { incr warns; exp_continue } -re {^WARNING: Skipped due to global .f. lock timeout: [0-9]+\r\n} { incr warns; exp_continue } - -re {^[^\r\n]*probe hit report:\r\n} { exp_continue } - -re {^probe timer.profile[^\r\n]+, hits: [0-9]+[^\r\n]+\r\n} { incr oks; exp_continue } + -re {^[^\r\n]*probe hit report:[ ]*\r\n} { exp_continue } + -re {^timer.profile[^\r\n]+, hits: [0-9]+[^\r\n]+\r\n} { incr oks; exp_continue } eof { } timeout { fail "$test (timeout)" } } diff -Nru systemtap-1.4/testsuite/systemtap.base/stapsh.exp systemtap-1.6/testsuite/systemtap.base/stapsh.exp --- systemtap-1.4/testsuite/systemtap.base/stapsh.exp 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.base/stapsh.exp 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,12 @@ +# Test that the stapsh mechanism is working +# - ensure that stapsh is in our process hierarchy +# - ensure that a signal sent to the stap process is propagated correctly + +set test "stapsh" +set ::result_string {begin +^ stapio +^ stapsh +^ stap +timer.s(1) +end} +stap_run2 $srcdir/$subdir/$test.stp --remote=stapsh: diff -Nru systemtap-1.4/testsuite/systemtap.base/stapsh.stp systemtap-1.6/testsuite/systemtap.base/stapsh.stp --- systemtap-1.4/testsuite/systemtap.base/stapsh.stp 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.base/stapsh.stp 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,39 @@ +global kill_pid + +probe begin { + println(pp()) + + // Print our process chain, should be stapio, stapsh, stap + t = task_current() + while (t && task_parent(t) != t) { + name = task_execname(t) + println("^ ", name) + if (name == "stap") { + // Remember this pid for killing later + kill_pid = task_pid(t) + break + } + t = task_parent(t) + } +} + +probe timer.s(1) { + if (kill_pid) { + println(pp()) + + // Kill our stap pid, and it should be propagated back + // through stapsh to end this script. + system(sprint("/bin/kill -INT ", kill_pid)) + kill_pid = 0 + } +} + +probe timer.s(10) { + println(pp()) + println("timeout!") + exit() +} + +probe end { + println(pp()) +} diff -Nru systemtap-1.4/testsuite/systemtap.base/stmt_rel.c systemtap-1.6/testsuite/systemtap.base/stmt_rel.c --- systemtap-1.4/testsuite/systemtap.base/stmt_rel.c 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.base/stmt_rel.c 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,128 @@ +#include + +#define stackrange 3 +#define maxcells 18 +#define false 0 +#define true 1 + +int stack[stackrange + 1]; +int freelist, movesdone; +struct element +{ + int discsize; + int next; +}; + +struct element cellspace[maxcells + 1]; + +static inline void +Error (char *emsg) +{ + printf (" Error in Towers: %s\n", emsg); +} + +static inline void +Makenull (s) +{ + stack[s] = 0; +} + +static inline int +Getelement () +{ + int temp = 0; + if (freelist > 0) + { + temp = freelist; + freelist = cellspace[freelist].next; + } + else + Error ("out of space "); + return (temp); +} + +static inline void +Push (int i, int s) +{ + int errorfound, localel; + errorfound = false; + if (stack[s] > 0) + if (cellspace[stack[s]].discsize <= i) + { + errorfound = true; + Error ("disc size error"); + }; + if (!errorfound) + { + localel = Getelement (); + cellspace[localel].next = stack[s]; + stack[s] = localel; + cellspace[localel].discsize = i; + } +} + +static inline void +Init (int s, int n) +{ + int discctr; + Makenull (s); + for (discctr = n; discctr >= 1; discctr--) + Push (discctr, s); +} + +static inline int +Pop (int s) +{ + int temp, temp1; + if (stack[s] > 0) + { + temp1 = cellspace[stack[s]].discsize; + temp = cellspace[stack[s]].next; + cellspace[stack[s]].next = freelist; + freelist = stack[s]; + stack[s] = temp; + return (temp1); + } + else + Error ("nothing to pop "); + return -1; +} + +static inline void +Move (int s1, int s2) +{ + Push (Pop (s1), s2); + movesdone = movesdone + 1; +} + +static void +tower (int i, int j, int k) +{ + int other; + if (k == 1) + Move (i, j); + else + { + other = 6 - i - j; + tower (i, other, k - 1); + Move (i, j); + tower (other, j, k - 1); + } +} + +int +main () +{ + int i; + for (i = 1; i <= maxcells; i++) + cellspace[i].next = i - 1; + freelist = maxcells; + Init (1, 14); + Makenull (2); + Makenull (3); + movesdone = 0; + tower (1, 2, 14); + if (movesdone != 16383) + printf (" Error in Towers.\n"); + return 0; +} diff -Nru systemtap-1.4/testsuite/systemtap.base/stmt_rel.exp systemtap-1.6/testsuite/systemtap.base/stmt_rel.exp --- systemtap-1.4/testsuite/systemtap.base/stmt_rel.exp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.base/stmt_rel.exp 2011-07-25 18:12:01.000000000 +0000 @@ -43,3 +43,33 @@ } else { fail "$test wildcard ($ok)" } + +# Compile with inlining and check we can set a relative statement there +set ok 0 +set rel_flags "additional_flags=-Wall additional_flags=-Werror" +set rel_flags "$rel_flags additional_flags=-Winline" +set rel_flags "$rel_flags additional_flags=-O3 additional_flags=-g" +set res [target_compile $srcdir/$subdir/stmt_rel.c [pwd]/stmt_rel.x executable $rel_flags] +if { $res != "" } { + verbose "target_compile failed: $res" 2 + fail "$test compiling stmt_rel" + cleanup_handler $verbose + return +} else { + pass "$test compiling stmt_rel" +} + +spawn stap -c ./stmt_rel.x -e "probe process(\"./stmt_rel.x\").statement(\"Move@stmt_rel.c+1\") {printf(\"Move %d\\n\",\$s1)}" +expect { + -timeout 180 + -re {Move [0-9]} { incr ok; exp_continue } + timeout { fail "$test stmt_rel (timeout)" } + eof { } +} +catch {close}; catch {wait} + +if { $ok == 8192 } { + pass "$test stmt_rel" +} else { + fail "$test stmt_rel ($ok)" +} diff -Nru systemtap-1.4/testsuite/systemtap.base/target_set.exp systemtap-1.6/testsuite/systemtap.base/target_set.exp --- systemtap-1.4/testsuite/systemtap.base/target_set.exp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.base/target_set.exp 2011-07-25 18:12:01.000000000 +0000 @@ -10,15 +10,20 @@ set stap_cmd_sleep_count 3 set stap_cmd_child_level 3 -proc failtest {} { +proc failtest {reason} { global test - fail $test + catch close; catch wait; + fail "$test - $reason" } proc expect_target_set_string {} { expect { "^target set:\r\n" { } - timeout { failtest; return -code return } + -re {^Warning: child process exited.+\r\n} { exp_continue } + timeout { failtest "timeout (expect_target_set_string)" + return -code return } + eof { failtest "eof (expect_target_set_string)" + return -code return } } } @@ -28,13 +33,18 @@ for {set i 0} {$i < $generations} {incr i} { expect { -re {^([0-9]+) begat ([0-9]+)\r\n} { set pid_array($expect_out(1,string)) $expect_out(2,string) } - timeout { failtest; return -code return } + -re {^Warning: child process exited.+\r\n} { exp_continue } + timeout { failtest "timeout (expect_target_set_pids)" + return -code return } + eof { failtest "eof (expect_target_set_pids)" + return -code return } } } set pid_it $stp_pid while {[info exists pid_array($pid_it)]} { if {[exec pgrep -P $pid_it] != $pid_array($pid_it)} { - failtest; return -code return + failtest "(expect_target_set_pids)" + return -code return } set pid_it $pid_array($pid_it) } @@ -47,8 +57,10 @@ expect { -timeout 180 + -re "semantic error:" { failtest; return } -re {^(\d+)\r\n} { set stp_pid $expect_out(1,string) } - timeout { failtest; return } + timeout { failtest "timeout (main1)"; return } + eof { failtest "eof (main1)"; return } } expect_target_set_pids 1 @@ -61,8 +73,8 @@ expect { eof {} - timeout { failtest; return } + timeout { failtest "timeout (main2)"; return } } -wait +catch close; catch wait; pass $test diff -Nru systemtap-1.4/testsuite/systemtap.base/target_set.stp systemtap-1.6/testsuite/systemtap.base/target_set.stp --- systemtap-1.4/testsuite/systemtap.base/target_set.stp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.base/target_set.stp 2011-07-25 18:12:01.000000000 +0000 @@ -4,9 +4,19 @@ printf("%d\n%d begat %d\n", stp_pid, stp_pid, target()) } -probe syscall.nanosleep, syscall.compat_nanosleep ? +# Why is the @cast() necessary? Why not just do '$rqtp->tv_sec'? On +# s390x and ppc64, because of syscall wrappers, $rqtp gets turned into +# a long. +probe syscall.nanosleep { - if (target_set_pid(pid()) && $rqtp->tv_sec == $1) + if (target_set_pid(pid()) + && @cast($rqtp, "struct timespec")->tv_sec == $1) + target_set_report() +} +probe syscall.compat_nanosleep ? +{ + if (target_set_pid(pid()) + && @cast($rqtp, "struct compat_timespec")->tv_sec == $1) target_set_report() } diff -Nru systemtap-1.4/testsuite/systemtap.base/tracescripts.exp systemtap-1.6/testsuite/systemtap.base/tracescripts.exp --- systemtap-1.4/testsuite/systemtap.base/tracescripts.exp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.base/tracescripts.exp 2011-07-25 18:12:01.000000000 +0000 @@ -2,7 +2,7 @@ exec echo "#!$stap_path" > tracescripts.sh -if {[catch {exec stap -L {process("tracescripts.sh").function("main")}} res]} { +if {[catch {exec stap -L {process("tracescripts.sh").mark("*")}} res]} { fail "tracescripts $res" } else { pass "tracescripts" diff -Nru systemtap-1.4/testsuite/systemtap.base/trycatch.exp systemtap-1.6/testsuite/systemtap.base/trycatch.exp --- systemtap-1.4/testsuite/systemtap.base/trycatch.exp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.base/trycatch.exp 2011-07-25 18:12:01.000000000 +0000 @@ -9,6 +9,7 @@ -timeout 30 -re {^ERROR: MAXACTION[^\r\n]*\r\n} { incr ok; exp_continue } -re {^WARNING: Number of errors[^\r\n]*\r\n} { incr ok; exp_continue } + -re {^Warning:[^\r\n]* exited with status:[^\r\n]*\r\n} {incr ok; exp_continue } -re {^Pass 5: run failed[^\r\n]*\r\n} { incr ok; exp_continue } -re {^OK[^\r\n]*\r\n} { incr ok; exp_continue } -re {^KO[^\r\n]*\r\n} { incr ko; exp_continue } @@ -16,7 +17,7 @@ eof { } } wait; catch { close } -if {$ok == 12 && $ko == 0} then {pass $test} else {fail "$test ($ok $ko)"} +if {$ok == 13 && $ko == 0} then {pass $test} else {fail "$test ($ok $ko)"} set test "trycatch -u" @@ -28,6 +29,7 @@ -timeout 30 -re {^ERROR: MAXACTION[^\r\n]*\r\n} { incr ok; exp_continue } -re {^WARNING: Number of errors[^\r\n]*\r\n} { incr ok; exp_continue } + -re {^Warning:[^\r\n]* exited with status:[^\r\n]*\r\n} {incr ok; exp_continue } -re {^Pass 5: run failed[^\r\n]*\r\n} { incr ok; exp_continue } -re {^OK[^\r\n]*\r\n} { incr ok; exp_continue } -re {^KO[^\r\n]*\r\n} { incr ko; exp_continue } @@ -35,7 +37,7 @@ eof { } } wait; catch { close } -if {$ok == 12 && $ko == 0} then {pass $test} else {fail "$test ($ok $ko)"} +if {$ok == 13 && $ko == 0} then {pass $test} else {fail "$test ($ok $ko)"} diff -Nru systemtap-1.4/testsuite/systemtap.base/unresolved-struct-typedef.exp systemtap-1.6/testsuite/systemtap.base/unresolved-struct-typedef.exp --- systemtap-1.4/testsuite/systemtap.base/unresolved-struct-typedef.exp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.base/unresolved-struct-typedef.exp 2011-07-25 18:12:01.000000000 +0000 @@ -1,5 +1,7 @@ # test the resolution of unresolved struct typedefs set test "unresolved-struct-typedef" +# process probes need utrace +if {![utrace_p]} { untested "$test"; return } set test_flags "additional_flags=-g" set test_flags "$test_flags additional_flags=-O2" diff -Nru systemtap-1.4/testsuite/systemtap.base/utrace_syscall_args.stp systemtap-1.6/testsuite/systemtap.base/utrace_syscall_args.stp --- systemtap-1.4/testsuite/systemtap.base/utrace_syscall_args.stp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.base/utrace_syscall_args.stp 2011-07-25 18:12:01.000000000 +0000 @@ -224,7 +224,7 @@ if (mmap_args[5] != close_args[1]) { failures += 1 printf("close bad arg 1: 0x%x vs 0x%x\n", - close_args[0], mmap_args[5]) + close_args[1], mmap_args[5]) } # Validate syscall number diff -Nru systemtap-1.4/testsuite/systemtap.base/vta-test.exp systemtap-1.6/testsuite/systemtap.base/vta-test.exp --- systemtap-1.4/testsuite/systemtap.base/vta-test.exp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.base/vta-test.exp 2011-07-25 18:12:01.000000000 +0000 @@ -6,48 +6,53 @@ a: {17, 23} i: 0xdeadbeef87654321} + +# Force 64-bit (when necessary) to be sure of what we're testing. +switch -regexp $::tcl_platform(machine) { + {^(x86_64|ppc64|s390x)$} { set arches [list "-m64"] } + default { set arches [list "default"] } +} + # Test 32-on-64 when available -set arches [list "-default"] switch -regexp $::tcl_platform(machine) { {^(x86_64|ppc64)$} { lappend arches "-m32" } {^s390x$} { lappend arches "-m31" } } foreach arch $arches { + verbose "testing vta $arch" -verbose "testing vta $arch" - -set test_flags "additional_flags=-g" -set test_flags "$test_flags additional_flags=-O2" -set test_flags "$test_flags [sdt_includes]" - -if {$arch != "-default"} { - set test_flags "$test_flags additional_flags=$arch" -} - -set res [target_compile $srcdir/$subdir/$test.c ${test}${arch}.exe executable "$test_flags"] -if { $res != "" } { - verbose "target_compile ${test}${arch} failed: $res" 2 - fail "${test}.c compile ${arch}" - untested "${test}${arch}" - return -} else { - pass "${test}.c compile ${arch}" -} - -# Test only when we are running an install test (can execute) and when gcc -# vta generated DW_OP_{stack|implicit}_values for us. See PR10417. -if {[installtest_p] && [uprobes_p]} { - # See if GCC produce DW_OP_implicit_value and/or DW_OP_stack_value for us. - set regexp {[stack|implicit]_value} - if {![catch {exec readelf --debug-dump=loc ${test}${arch}.exe | egrep "$regexp"}]} { - stap_run3 ${test}${arch} $srcdir/$subdir/$test.stp ./${test}${arch}.exe -c ./${test}${arch}.exe - } { - untested "${test}${arch} (no-gcc-vta)" - } -} else { - untested "${test}${arch}" -} -catch {exec rm -f ${test}${arch}.exe} - + set test_flags "additional_flags=-g" + set test_flags "$test_flags additional_flags=-O2" + set test_flags "$test_flags [sdt_includes]" + + if {$arch != "default"} { + set test_flags "$test_flags additional_flags=$arch" + } + + set res [target_compile $srcdir/$subdir/$test.c ${test}${arch}.exe executable "$test_flags"] + if { $res != "" } { + verbose "target_compile ${test}${arch} failed: $res" 2 + fail "${test}.c compile ${arch}" + untested "${test}${arch}" + return + } else { + pass "${test}.c compile ${arch}" + } + + # Test only when we are running an install test (can execute) and + # when gcc vta generated DW_OP_{stack|implicit}_values for us. See + # PR10417. + if {[installtest_p] && [uprobes_p]} { + # See if GCC produce DW_OP_implicit_value and/or DW_OP_stack_value for us. + set regexp {[stack|implicit]_value} + if {![catch {exec readelf --debug-dump=loc ${test}${arch}.exe | egrep "$regexp"}]} { + stap_run3 ${test}${arch} $srcdir/$subdir/$test.stp ./${test}${arch}.exe -c ./${test}${arch}.exe + } else { + untested "${test}${arch} (no-gcc-vta)" + } + } else { + untested "${test}${arch}" + } + catch {exec rm -f ${test}${arch}.exe} } diff -Nru systemtap-1.4/testsuite/systemtap.base/warn_overflow.exp systemtap-1.6/testsuite/systemtap.base/warn_overflow.exp --- systemtap-1.4/testsuite/systemtap.base/warn_overflow.exp 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.base/warn_overflow.exp 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,30 @@ +# Test proper shutdown while "overflowing" warning and system messages + +set test "warn_overflow" +if {![installtest_p]} { untested $test; return } + +# -vv suppresses WARNING duplication filtering in staprun. +spawn stap -vv $srcdir/$subdir/$test.stp +set ok 0 +set warn 0 +expect { + -timeout 180 + + -re {^WARNING: too many pending \([a-z]+\) messages\r\n} { + incr warn; exp_continue + } + + -re {^stap_begin\r\n} { incr ok; exp_continue; } + -re {^stap_syscall\r\n} { incr ok; exp_continue; } + -re {^stap_end\r\n} { incr ok; exp_continue; } + + -re {^[^\r\n]*\r\n} { exp_continue } + timeout { fail "$test (timeout)" } + eof { } +} +wait +if {$ok == 3 && $warn == 3} { + pass "$test ($ok,$warn)" +} { + fail "$test ($ok,$warn)" +} diff -Nru systemtap-1.4/testsuite/systemtap.base/warn_overflow.stp systemtap-1.6/testsuite/systemtap.base/warn_overflow.stp --- systemtap-1.4/testsuite/systemtap.base/warn_overflow.stp 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.base/warn_overflow.stp 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,7 @@ +global i; +probe begin {while (++i < 128) warn("begin..."); log("stap_begin");} + +probe syscall.* {system("echo syscall: " . name); + if (++i > 256) { log("stap_syscall"); exit(); }} + +probe end {while (--i > 0) warn("end..."); log("stap_end");} diff -Nru systemtap-1.4/testsuite/systemtap.clone/dtrace_clone.c systemtap-1.6/testsuite/systemtap.clone/dtrace_clone.c --- systemtap-1.4/testsuite/systemtap.clone/dtrace_clone.c 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.clone/dtrace_clone.c 2011-07-25 18:12:01.000000000 +0000 @@ -7,6 +7,7 @@ * later version. */ +#define _GNU_SOURCE #include #include #include diff -Nru systemtap-1.4/testsuite/systemtap.context/backtrace.tcl systemtap-1.6/testsuite/systemtap.context/backtrace.tcl --- systemtap-1.4/testsuite/systemtap.context/backtrace.tcl 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.context/backtrace.tcl 2011-07-25 18:12:01.000000000 +0000 @@ -6,7 +6,8 @@ set m6 0 set module1 0 set kernel 0 -set script_exit 0; +set script_exit 0 +set eof_found 0 spawn stap -d kernel -d systemtap_test_module1 $srcdir/$subdir/backtrace.stp #exp_internal 1 @@ -39,8 +40,9 @@ if {$module1 == 1} {incr kernel} # we expect at least one [kernel] frame, maybe more. } + eof { set eof_found 1; fail "early test shutdown (m1 eof)" } } - exp_continue + if {! $eof_found} { exp_continue } } -re {.*--- yyy_func2 ---\r\nthe stack is 0x[a-f0-9]+ [^\r\n]+\r\n} { incr m2 @@ -62,8 +64,9 @@ if {$module1 == 2} {incr kernel} # we expect at least one [kernel] frame, maybe more. } + eof { set eof_found 1; fail "early test shutdown (m2 eof)" } } - exp_continue + if {! $eof_found} { exp_continue } } #backtrace from yyy_func3 @@ -91,8 +94,9 @@ if {$module1 == 3} {incr kernel} # we expect at least one [kernel] frame, maybe more. } + eof { set eof_found 1; fail "early test shutdown (m3 eof)" } } - exp_continue + if {! $eof_found} { exp_continue } } -re {.*--- yyy_func3 ---\r\nthe stack is 0x[a-f0-9]+ [^\r\n]+\r\n} { incr m4 @@ -118,8 +122,9 @@ if {$module1 == 4} {incr kernel} # we expect at least one [kernel] frame, maybe more. } + eof { set eof_found 1; fail "early test shutdown (m4 eof)" } } - exp_continue + if {! $eof_found} { exp_continue } } #backtrace from yyy_func4 @@ -151,8 +156,9 @@ if {$module1 == 5} {incr kernel} # we expect at least one [kernel] frame, maybe more. } + eof { set eof_found 1; fail "early test shutdown (m5 eof)" } } - exp_continue + if {! $eof_found} { exp_continue } } -re {.*--- yyy_func4 ---\r\nthe stack is 0x[a-f0-9]+ [^\r\n]+\r\n} { incr m6 @@ -182,8 +188,9 @@ if {$module1 == 6} {incr kernel} # we expect at least one [kernel] frame, maybe more. } + eof { set eof_found 1; fail "early test shutdown (m6 eof)" } } - exp_continue + if {! $eof_found} { exp_continue } } eof { # good backtrace.stp called exit(). diff -Nru systemtap-1.4/testsuite/systemtap.context/num_args.stp systemtap-1.6/testsuite/systemtap.context/num_args.stp --- systemtap-1.4/testsuite/systemtap.context/num_args.stp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.context/num_args.stp 2011-07-25 18:12:01.000000000 +0000 @@ -3,25 +3,25 @@ %( arch == "powerpc" %? global ir = "r3", lr = "r3" %) %( arch == "s390" %? global ir = "r2", lr = "r2" %) -probe module("systemtap_test_module2").function("yyy_int") { +probe module("systemtap-test-module2").function("yyy_int") { printf("yyy_int %d %d %d\n", int_arg(1), int_arg(2), int_arg(3)) } -probe module("systemtap_test_module2").function("yyy_int").return { +probe module("systemtap-test-module2").function("yyy_int").return { printf("yyy_int returns %d\n", register(ir)) } -probe module("systemtap_test_module2").function("yyy_uint") { +probe module("systemtap-test-module2").function("yyy_uint") { printf("yyy_uint %d %d %d\n", uint_arg(1), uint_arg(2), uint_arg(3)) } -probe module("systemtap_test_module2").function("yyy_uint").return { +probe module("systemtap-test-module2").function("yyy_uint").return { printf("yyy_uint returns %d\n", u_register(ir)) } -probe module("systemtap_test_module2").function("yyy_long") { +probe module("systemtap-test-module2").function("yyy_long") { printf("yyy_long %d %d %d\n", long_arg(1), long_arg(2), long_arg(3)) } -probe module("systemtap_test_module2").function("yyy_long").return { +probe module("systemtap_test-module2").function("yyy_long").return { printf("yyy_long returns %d\n", register(lr)) } -probe module("systemtap_test_module2").function("yyy_int64") { +probe module("systemtap-test_module2").function("yyy_int64") { # On i386, kernel is built with -mregparm=3. The first arg occupies the # first two registers. The 2nd arg is not split between the 3rd register # and the stack, but rather passed entirely on the stack. diff -Nru systemtap-1.4/testsuite/systemtap.context/uprobe_stmt_num.exp systemtap-1.6/testsuite/systemtap.context/uprobe_stmt_num.exp --- systemtap-1.4/testsuite/systemtap.context/uprobe_stmt_num.exp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.context/uprobe_stmt_num.exp 2011-07-25 18:12:01.000000000 +0000 @@ -26,9 +26,16 @@ catch {eval exec $cmd} output send_log "cmd output: $output\n" -# There should be at least 6 lines probes -# Function entry, 4 actual source lines and function exit. -set output_lines [split $output "\n"] +# There should be at least 6 address lines: function entry, 4 actual +# source lines and function exit. Be sure to ignore any non-numeric +# lines (since we only want to save the output addresses). +set output_lines {} +foreach line [split $output "\n"] { + if {[regexp {^0x[0-9]+} $line]} { + lappend output_lines "$line" + } +} + set lines [llength $output_lines] if { $lines >= 6 } { pass "$test-run-one" diff -Nru systemtap-1.4/testsuite/systemtap.context/uprobe_uaddr.exp systemtap-1.6/testsuite/systemtap.context/uprobe_uaddr.exp --- systemtap-1.4/testsuite/systemtap.context/uprobe_uaddr.exp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.context/uprobe_uaddr.exp 2011-07-25 18:12:01.000000000 +0000 @@ -28,7 +28,13 @@ catch {eval exec $cmd} output send_log "cmd output:\n $output\n" -set output_lines [split $output "\n"] +# Only save the address lines. +set output_lines {} +foreach line [split $output "\n"] { + if {[regexp {0x[0-9]+} $line]} { + lappend output_lines "$line" + } +} set lines [llength $output_lines] if { $lines == 6 } { diff -Nru systemtap-1.4/testsuite/systemtap.context/usymbols.c systemtap-1.6/testsuite/systemtap.context/usymbols.c --- systemtap-1.4/testsuite/systemtap.context/usymbols.c 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.context/usymbols.c 2011-07-25 18:12:01.000000000 +0000 @@ -36,4 +36,5 @@ // Use SIGFPE since we never expect that to be triggered. signal(SIGFPE, main_handler); lib_main(); + return 0; } diff -Nru systemtap-1.4/testsuite/systemtap.context/usymbols.exp systemtap-1.6/testsuite/systemtap.context/usymbols.exp --- systemtap-1.4/testsuite/systemtap.context/usymbols.exp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.context/usymbols.exp 2011-07-25 18:12:01.000000000 +0000 @@ -4,94 +4,115 @@ set testsrclib "$testpath/usymbols_lib.c" set testlibdir "[pwd]" set testflags "additional_flags=-g additional_flags=-O" -set testlibflags "testflags additional_flags=-fPIC additional_flags=-shared" # Only run on make installcheck and utrace present. if {! [installtest_p]} { untested "$test"; return } if {! [utrace_p]} { untested "$test"; return } if {! [uprobes_p]} { untested "$test"; return } -# Test 32-on-64 when available -set arches [list "default"] +# Force 64-bit (when necessary) to be sure of what we're testing. switch -regexp $::tcl_platform(machine) { - {^(x86_64|ppc64)$} { lappend arches "-m32" } - {^s390x$} { lappend arches "-m31" } + {^(x86_64|ppc64|s390x)$} { set arches [list "-m64"] } + default { set arches [list "default"] } } -foreach arch $arches { - -verbose "testing usymbols $arch" - -set testexename "usymbols" -set testlibname "usymbols" -set maintestflags "$testflags additional_flags=-L$testlibdir additional_flags=-Wl,-rpath,$testlibdir" -if {$arch != "default"} { - set testexename "${testexename}${arch}" - set testlibname "${testlibname}${arch}" - set maintestflags "$maintestflags additional_flags=-l$testlibname additional_flags=$arch" - set testlibflags "$testlibflags additional_flags=$arch" -} else { - set maintestflags "$maintestflags additional_flags=-l$testlibname" -} - -# Compile our test program and library. -set testso "$testlibdir/lib${testlibname}.so" -set res [target_compile $testsrclib $testso executable $testlibflags] -if { $res != "" } { - verbose "target_compile for $testso failed: $res" 2 - fail "unable to compile $testsrclib $arch" - return -} -set testexe "[pwd]/${testexename}" -set res [target_compile $testsrc $testexe executable $maintestflags] -if { $res != "" } { - verbose "target_compile failed: $res" 2 - fail "unable to compile $testsrc $arch" - return +# Test 32-on-64 when available. +switch -regexp $::tcl_platform(machine) { + {^(x86_64|ppc64)$} { lappend arches "-m32" } + {^s390x$} { lappend arches "-m31" } } -# We need the execname() trick to work around (the workaround of) PR6964 -# otherwise we get also the rt_sigactions of stapio. Get the handler -# (comes from the executable or the library). +# We need the execname() trick to work around (the workaround of) +# PR6964 otherwise we get also the rt_sigactions of stapio. Get +# the handler (comes from the executable or the library). +# +# We have to use @cast() on act_uaddr since syscall wrappers on +# ppc64/s390x systems turn the 'struct sigaction' into a 'long int'. set testscript { - probe syscall.rt_sigaction, syscall.rt_sigaction32? { + probe syscall.rt_sigaction { if (pid() == target() && execname() == "%s") { - handler = user_long(&$act->sa_handler); // Note user address. - printf("handler: %%s (%%s)\n", usymname(handler), umodname(handler)); + // Note user address. + handler = user_long(&@cast(act_uaddr, "struct sigaction")->sa_handler); + printf("handler: %%s (%%s)\n", usymname(handler), umodname(handler)); + } + } + probe syscall.rt_sigaction32 ? { + if (pid() == target() && execname() == "%s") { + // Note user address. + handler = user_long(&@cast(act_uaddr, "struct sigaction32")->sa_handler); + printf("handler: %%s (%%s)\n", usymname(handler), umodname(handler)); } } } -set output "handler: main_handler ([pwd]/$testexename) -handler: lib_handler ([pwd]/lib${testlibname}.so)" +foreach arch $arches { + verbose "testing usymbols $arch" -# Used to need to run stap with both the exe and the libraries used as -d args. -# Now use --ldd to pick up both exe and the library we just linked in. -set script [format $testscript $testexename] -send_log "script: $script\n" -set cmd [concat stap -w -d $testexe --ldd -c $testexe -e {$script}] -send_log "cmd: $cmd\n" -catch {eval exec $cmd} res -send_log "cmd output: $res\n" - -set n 0 -set m [llength [split $output "\n"]] -set expected [split $output "\n"] -foreach line [split $res "\n"] { - if {![string equal $line [lindex $expected $n]]} { - fail "usymbols $arch" - send_log "line [expr $n + 1]: expected \"[lindex $expected $n]\", " - send_log "Got \"$line\"\n" - return + set testexename "usymbols" + set testlibname "usymbols" + set maintestflags "$testflags additional_flags=-L$testlibdir additional_flags=-Wl,-rpath,$testlibdir" + set testlibflags "testflags additional_flags=-fPIC additional_flags=-shared" + if {$arch != "default"} { + set testexename "${testexename}${arch}" + set testlibname "${testlibname}${arch}" + set maintestflags "$maintestflags additional_flags=-l$testlibname additional_flags=$arch" + set testlibflags "$testlibflags additional_flags=$arch" + } else { + set maintestflags "$maintestflags additional_flags=-l$testlibname" } - incr n -} -if { $n != $m } { - fail "usymbols $arch" - send_log "Got \"$n\" lines, expected \"$m\" lines\n" -} else { - pass "usymbols $arch" -} -exec rm -f $testexe $testso + # Compile our test program and library. + set testso "$testlibdir/lib${testlibname}.so" + set res [target_compile $testsrclib $testso executable $testlibflags] + if { $res != "" } { + verbose "target_compile for $testso failed: $res" 2 + fail "unable to compile $testsrclib $arch" + return + } + set testexe "[pwd]/${testexename}" + set res [target_compile $testsrc $testexe executable $maintestflags] + if { $res != "" } { + verbose "target_compile failed: $res" 2 + fail "unable to compile $testsrc $arch" + return + } + + # Originally the output string used 'pwd' to get the full path to + # the testexename/testlibname. However, if the test directory has + # a long path, the start of the path gets truncated in systemtap + # output, so the test was failing. Now we just check for a path + # ending in the correct filename. + set output "handler: main_handler (.+/${testexename}) +handler: lib_handler (.+/lib${testlibname}.so)" + + # Used to need to run stap with both the exe and the libraries + # used as -d args. Now use --ldd to pick up both exe and the + # library we just linked in. + set script [format $testscript $testexename $testexename] + send_log "script: $script\n" + set cmd [concat stap -w -d $testexe --ldd -c $testexe -e {$script}] + send_log "cmd: $cmd\n" + catch {eval exec $cmd} res + send_log "cmd output: $res\n" + + set n 0 + set m [llength [split $output "\n"]] + set expected [split $output "\n"] + set nfails 0 + foreach line [split $res "\n"] { + if {![regexp [lindex $expected $n] $line]} { + fail "usymbols $arch" + send_log "line [expr $n + 1]: expected \"[lindex $expected $n]\", " + send_log "Got \"$line\"\n" + incr nfails + } + incr n + } + if { $n != $m } { + fail "usymbols $arch" + send_log "Got \"$n\" lines, expected \"$m\" lines\n" + } elseif { $nfails == 0 } { + pass "usymbols $arch" + exec rm -f $testexe $testso + } } diff -Nru systemtap-1.4/testsuite/systemtap.examples/general/badname.meta systemtap-1.6/testsuite/systemtap.examples/general/badname.meta --- systemtap-1.4/testsuite/systemtap.examples/general/badname.meta 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.examples/general/badname.meta 2011-07-25 18:12:01.000000000 +0000 @@ -10,4 +10,4 @@ scope: system-wide description: The badname.stp script shows how one could prevent the creation of files with undesirable names using guru mode. test_check: stap -g -p4 badname.stp -test_installcheck: stap -g badname.stp -c "touch /tmp/myXXXfile" 2>&1 | grep denied +test_installcheck: stap -g badname.stp -c "touch /tmp/myXXXbadnameXXXfile.$$ 2>&1 | grep denied" diff -Nru systemtap-1.4/testsuite/systemtap.examples/general/badname.stp systemtap-1.6/testsuite/systemtap.examples/general/badname.stp --- systemtap-1.4/testsuite/systemtap.examples/general/badname.stp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.examples/general/badname.stp 2011-07-25 18:12:01.000000000 +0000 @@ -6,7 +6,7 @@ # return non-zero if the filename should be blocked function filter:long (name:string) { - return euid() && isinstr(name, "XXX") + return isinstr(name, "XXXbadnameXXX") } global squash_inode_permission diff -Nru systemtap-1.4/testsuite/systemtap.examples/general/eventcount.meta systemtap-1.6/testsuite/systemtap.examples/general/eventcount.meta --- systemtap-1.4/testsuite/systemtap.examples/general/eventcount.meta 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.examples/general/eventcount.meta 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,13 @@ +title: Event Counter for eventcount.stp +name: eventcount.stp +version: 1.0 +author: Lukas Berk +keywords: event counter tid pid +subsystem: none +status: production +exit: user-controlled +output: text +scope: system-wide +description: The script prints a count of specified events and their related tid's over the course of execution. +test_check: stap -p4 eventcount.stp +test_installcheck: stap eventcount.stp syscall.* -c 'sleep 0.2' diff -Nru systemtap-1.4/testsuite/systemtap.examples/general/eventcount.stp systemtap-1.6/testsuite/systemtap.examples/general/eventcount.stp --- systemtap-1.4/testsuite/systemtap.examples/general/eventcount.stp 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.examples/general/eventcount.stp 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,77 @@ +#! /usr/bin/env stap + +global c + +probe %($# == 0 || $# > 32 %? begin %: never %) +{ + printf("Please specify between 1 and 32 events to count.\n") + exit() +} + +//paramaterize up to 32 arguments +probe %($# >= 1 %? $1 %: never %), + %($# >= 2 %? $2 %: never %), + %($# >= 3 %? $3 %: never %), + %($# >= 4 %? $4 %: never %), + %($# >= 5 %? $5 %: never %), + %($# >= 6 %? $6 %: never %), + %($# >= 7 %? $7 %: never %), + %($# >= 8 %? $8 %: never %), + %($# >= 9 %? $9 %: never %), + %($# >= 10 %? $10 %: never %), + %($# >= 11 %? $11 %: never %), + %($# >= 12 %? $12 %: never %), + %($# >= 13 %? $13 %: never %), + %($# >= 14 %? $14 %: never %), + %($# >= 15 %? $15 %: never %), + %($# >= 16 %? $16 %: never %), + %($# >= 17 %? $17 %: never %), + %($# >= 18 %? $18 %: never %), + %($# >= 19 %? $19 %: never %), + %($# >= 20 %? $20 %: never %), + %($# >= 21 %? $21 %: never %), + %($# >= 22 %? $22 %: never %), + %($# >= 23 %? $23 %: never %), + %($# >= 24 %? $24 %: never %), + %($# >= 25 %? $25 %: never %), + %($# >= 26 %? $26 %: never %), + %($# >= 27 %? $27 %: never %), + %($# >= 28 %? $28 %: never %), + %($# >= 29 %? $29 %: never %), + %($# >= 30 %? $30 %: never %), + %($# >= 31 %? $32 %: never %), + %($# >= 32 %? $32 %: never %) +{ + totalc <<< 1 + if (target() && ! target_set_pid(pid())) + next + filteredc <<< 1 + c[sprintf("%s(%d)",execname(),tid()), pn()]<<<1 +} + +global totalc, filteredc + +probe begin { + start_ms = gettimeofday_ms() + if (target()) msg = sprintf ("pid %d + children", target()) + else msg = "unfiltered"; + printf("Starting event counting at %s, %s\n", + tz_ctime(gettimeofday_s()), msg) +} +global start_ms + +probe end { + printf("Finished event counting at %s.\n", tz_ctime(gettimeofday_s())) + elapsed_ms = gettimeofday_ms() - start_ms + if (elapsed_ms < 0) elapsed_ms=1 + printf("Total time elapsed: %d ms, %d events total, %d filtered.\n", + elapsed_ms, @count(totalc), @count(filteredc)) + + printf("%-25s %-30s %s\n", "TID", "EVENT", "COUNT (RATE Hz)") + printf("%-25s %-30s %s\n", "---", "-----", "---------------") + foreach([tid+, name] in c) + printf("%-25s %-30s %d (%d.%02d)\n", tid, name, + @count(c[tid, name]), + (@count(c[tid,name])*100000/elapsed_ms)/100, + (@count(c[tid,name])*100000/elapsed_ms)%100) +} diff -Nru systemtap-1.4/testsuite/systemtap.examples/general/para-callgraph.meta systemtap-1.6/testsuite/systemtap.examples/general/para-callgraph.meta --- systemtap-1.4/testsuite/systemtap.examples/general/para-callgraph.meta 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.examples/general/para-callgraph.meta 2011-07-25 18:12:01.000000000 +0000 @@ -4,4 +4,4 @@ subsystem: general description: Print a timed per-thread callgraph, complete with function parameters and return values. The first parameter names the function probe points to trace. The optional second parameter names the probe points for trigger functions, which acts to enable tracing for only those functions that occur while the current thread is nested within the trigger. test_check: stap -p4 para-callgraph.stp 'kernel.function("*@fs/proc*.c")' 'kernel.function("vfs_read")' -test_installcheck: stap para-callgraph.stp 'kernel.function("*@fs/proc*.c")' 'kernel.function("vfs_read")' -c "cat /proc/sys/vm/*" +test_installcheck: stap para-callgraph.stp 'kernel.function("*@fs/proc*.c")' 'kernel.function("vfs_read")' -c "cat /proc/sys/vm/* || true" diff -Nru systemtap-1.4/testsuite/systemtap.examples/general/para-callgraph-verbose.meta systemtap-1.6/testsuite/systemtap.examples/general/para-callgraph-verbose.meta --- systemtap-1.4/testsuite/systemtap.examples/general/para-callgraph-verbose.meta 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.examples/general/para-callgraph-verbose.meta 2011-07-25 18:12:01.000000000 +0000 @@ -4,4 +4,4 @@ subsystem: general description: Print a timed per-thread callgraph, complete with pretty-printed function parameters and return values. The first parameter names the function probe points to trace. The optional second parameter names the probe points for trigger functions, which acts to enable tracing for only those functions that occur while the current thread is nested within the trigger. test_check: stap -p4 para-callgraph-verbose.stp 'kernel.function("*@fs/proc*.c")' 'kernel.function("vfs_read")' -test_installcheck: stap para-callgraph-verbose.stp 'kernel.function("*@fs/proc*.c")' 'kernel.function("vfs_read")' -c "cat /proc/sys/vm/*" +test_installcheck: stap para-callgraph-verbose.stp 'kernel.function("*@fs/proc*.c")' 'kernel.function("vfs_read")' -c "cat /proc/sys/vm/* || true" diff -Nru systemtap-1.4/testsuite/systemtap.examples/index.html systemtap-1.6/testsuite/systemtap.examples/index.html --- systemtap-1.4/testsuite/systemtap.examples/index.html 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.examples/index.html 2011-07-25 18:12:01.000000000 +0000 @@ -48,7 +48,11 @@

The script prints a table showing the available attributes (bold, underline, and inverse) with color combinations for the ans_set_color3() function in the ansi.stp tapset.

# stap ansi_colors2.stp

  • general/badname.stp - Bad Filename Filter
    keywords: FILESYSTEM HACK
    -

    The badname.stp script shows how one could prevent the creation of files with undesirable names using guru mode.

    # stap -g badname.stp -c "touch /tmp/myXXXfile" 2>&1 | grep denied

  • +

    The badname.stp script shows how one could prevent the creation of files with undesirable names using guru mode.

    # stap -g badname.stp -c "touch /tmp/myXXXbadnameXXXfile.$$ 2>&1 | grep \
    +denied"

    +
  • general/eventcount.stp - Event Counter for eventcount.stp
    +keywords: EVENT COUNTER TID PID
    +

    The script prints a count of specified events and their related tid's over the course of execution.

    # stap eventcount.stp syscall.* -c 'sleep 0.2'

  • general/graphs.stp - Graphing Disk and CPU Utilization
    keywords: DISK CPU USE GRAPH

    The script tracks the disk and CPU utilization. The resulting output of the script can be piped into gnuplot to generate a graph of disk and CPU USE.

    # stap graphs.stp -c "sleep 0.2"

  • @@ -58,11 +62,11 @@
  • general/para-callgraph-verbose.stp - Callgraph tracing with verbose arguments
    keywords: TRACE CALLGRAPH

    Print a timed per-thread callgraph, complete with pretty-printed function parameters and return values. The first parameter names the function probe points to trace. The optional second parameter names the probe points for trigger functions, which acts to enable tracing for only those functions that occur while the current thread is nested within the trigger.

    # stap para-callgraph-verbose.stp 'kernel.function("*@fs/proc*.c")' \
    -'kernel.function("vfs_read")' -c "cat /proc/sys/vm/*"

  • +'kernel.function("vfs_read")' -c "cat /proc/sys/vm/* || true"

  • general/para-callgraph.stp - Callgraph tracing with arguments
    keywords: TRACE CALLGRAPH

    Print a timed per-thread callgraph, complete with function parameters and return values. The first parameter names the function probe points to trace. The optional second parameter names the probe points for trigger functions, which acts to enable tracing for only those functions that occur while the current thread is nested within the trigger.

    # stap para-callgraph.stp 'kernel.function("*@fs/proc*.c")' \
    -'kernel.function("vfs_read")' -c "cat /proc/sys/vm/*"

  • +'kernel.function("vfs_read")' -c "cat /proc/sys/vm/* || true"

  • general/sizeof.stp - Print the size of a C type.
    keywords: STATISTICS MEMORY SIMPLE

    This script prints the size of a type, based on dwarf debuginfo for any kernel or userspace module, or trial-compilation of a given header file name.

    # stap sizeof.stp FILE '</usr/include/stdio.h>'

  • @@ -131,6 +135,13 @@
  • locks/bkl_stats.stp - Per Process Statistics on Big Kernel Lock (BKL) Use
    keywords: LOCKING

    The bkl_stats.stp script can indicate which processes have excessive waits for the Big Kernel Lock (BKL) and which processes are taking the BKL for long periods of time. The bkl_stats.stp script prints lists of all the processes that require the BKL. Every five seconds two tables are printed out. The first table lists the processes that waited for the BKL followed by the number of times that the process waited, the minimum time of the wait, the average and the maximum time waited. The second table lists has similar information for the time spent in holding the lock for each of the processes.

    # stap bkl_stats.stp -c "sleep 0.2"

  • +
  • memory/hw_watch_addr.stp - Watch access to a kernel address using breakpoint hardware
    +keywords: MEMORY WATCHPOINT
    +

    The script will watch accesses to a single kernel address and prints a traceback each time the address is accessed. This script needs to be run as root to allow access to the breakpoint hardware.

    # stap --all-modules hw_watch_addr.stp 0x`grep "pid_max$" /proc/kallsyms` \
    +-c "sleep 1"

  • +
  • memory/hw_watch_sym.stp - Watch to a kernel symbol using breakpoint hardware
    +keywords: MEMORY WATCHPOINT
    +

    The script will watch accesses to the starting address of a single kernel symbol and prints a traceback each time the symbol is accessed. This script needs to be run as root to allow access to the breakpoint hardware.

    # stap --all-modules hw_watch_sym.stp pid_max -c "sleep 1"

  • memory/kmalloc-top - Show Paths to Kernel Malloc (kmalloc) Invocations
    keywords: MEMORY

    The kmalloc-top perl program runs a small systemtap script to collect stack traces for each call to the kmalloc function and counts the time that each stack trace is observed. When kmalloc-top exits it prints out sorted list. The output can be filtered to print only the first N stack traces (-t), stack traces with a minimum counts (-m), or exclude certain stack traces (-e).

    # ./kmalloc-top -c "sleep 0.2"

  • @@ -182,6 +193,9 @@
  • network/tcp_connections.stp - Track Creation of Incoming TCP Connections
    keywords: NETWORK TCP SOCKET

    The tcp_connections.stp script prints information for each new incoming TCP connection accepted by the computer. The information includes the UID, the command accepting the connection, the PID of the command, the port the connection is on, and the IP address of the originator of the request.

    # stap tcp_connections.stp -c "sleep 0.2"

  • +
  • network/tcp_init_cwnd.stp - Increase initial tcp congestion window to 10.
    +keywords: NETWORK TCP SOCKET
    +

    Run the tcp_init_cwnd.stp script in the background to override a kernel's default tcp cwnd value to 10, which has been found to improve latency for web server type workloads. The script prints a count of cwnd value changes when it is stopped.

    # stap -g tcp_init_cwnd.stp -c "sleep 0.2"

  • network/tcp_trace.stp - Tcp connection tracing utility.
    keywords: NETWORK TRACE

    This scripts traces a given tcp connection based on the filter parameters given by the user. The indexing is done by the 4 tuples local address, remote address, local port, remote port.

    # stap tcp_trace.stp 127.0.0.1:*-127.0.0.1:* timeout=1

  • @@ -214,7 +228,7 @@

    The migrate.stp script takes an argument which is the executable name of the task it should monitor. Each time a task with that executable name migrates between processors an entry is printed with the process id (pid), the executable name, the processor off loading the task, and the process taking the task. Note that the task may or may not be executing at the time of the migration.

    # stap migrate.stp -c "sleep 0.2" bash

  • process/noptrace.stp - disable ptrace(2) from hierarchies of processes
    keywords: PROCESS SECURITY
    -

    noptrace.stp blocks ptrace(2) attempts from processes identified by stap -c/-x, as also specifiable from /proc/systemtap/stap_XXX/ control files. Processes may be added or removed from the blocked list.

    # stap -g noptrace.stp -c 'strace ls'

  • +

    noptrace.stp blocks ptrace(2) attempts from processes identified by stap -c/-x, as also specifiable from /proc/systemtap/stap_XXX/ control files. Processes may be added or removed from the blocked list.

    # stap -g noptrace.stp -c 'strace ls || true'

  • process/pf2.stp - Profile kernel functions
    keywords: PROFILING

    The pf2.stp script sets up time-based sampling. Every five seconds it prints out a sorted list with the top ten kernel functions with samples.

    # stap pf2.stp -c "sleep 0.2"

  • diff -Nru systemtap-1.4/testsuite/systemtap.examples/index.txt systemtap-1.6/testsuite/systemtap.examples/index.txt --- systemtap-1.4/testsuite/systemtap.examples/index.txt 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.examples/index.txt 2011-07-25 18:12:01.000000000 +0000 @@ -27,7 +27,17 @@ The badname.stp script shows how one could prevent the creation of files with undesirable names using guru mode. - # stap -g badname.stp -c "touch /tmp/myXXXfile" 2>&1 | grep denied + # stap -g badname.stp -c "touch /tmp/myXXXbadnameXXXfile.$$ 2>&1 | grep \ + denied" + + +general/eventcount.stp - Event Counter for eventcount.stp +keywords: event counter tid pid + + The script prints a count of specified events and their related tid's + over the course of execution. + + # stap eventcount.stp syscall.* -c 'sleep 0.2' general/graphs.stp - Graphing Disk and CPU Utilization @@ -60,7 +70,7 @@ nested within the trigger. # stap para-callgraph-verbose.stp 'kernel.function("*@fs/proc*.c")' \ - 'kernel.function("vfs_read")' -c "cat /proc/sys/vm/*" + 'kernel.function("vfs_read")' -c "cat /proc/sys/vm/* || true" general/para-callgraph.stp - Callgraph tracing with arguments @@ -74,7 +84,7 @@ the trigger. # stap para-callgraph.stp 'kernel.function("*@fs/proc*.c")' \ - 'kernel.function("vfs_read")' -c "cat /proc/sys/vm/*" + 'kernel.function("vfs_read")' -c "cat /proc/sys/vm/* || true" general/sizeof.stp - Print the size of a C type. @@ -328,6 +338,28 @@ # stap bkl_stats.stp -c "sleep 0.2" +memory/hw_watch_addr.stp - Watch access to a kernel address using breakpoint hardware +keywords: memory watchpoint + + The script will watch accesses to a single kernel address and prints + a traceback each time the address is accessed. This script needs to + be run as root to allow access to the breakpoint hardware. + + # stap --all-modules hw_watch_addr.stp 0x`grep "pid_max$" /proc/kallsyms` \ + -c "sleep 1" + + +memory/hw_watch_sym.stp - Watch to a kernel symbol using breakpoint hardware +keywords: memory watchpoint + + The script will watch accesses to the starting address of a single + kernel symbol and prints a traceback each time the symbol is + accessed. This script needs to be run as root to allow access to the + breakpoint hardware. + + # stap --all-modules hw_watch_sym.stp pid_max -c "sleep 1" + + memory/kmalloc-top - Show Paths to Kernel Malloc (kmalloc) Invocations keywords: memory @@ -527,6 +559,17 @@ # stap tcp_connections.stp -c "sleep 0.2" +network/tcp_init_cwnd.stp - Increase initial tcp congestion window to 10. +keywords: network tcp socket + + Run the tcp_init_cwnd.stp script in the background to override a + kernel's default tcp cwnd value to 10, which has been found to + improve latency for web server type workloads. The script prints a + count of cwnd value changes when it is stopped. + + # stap -g tcp_init_cwnd.stp -c "sleep 0.2" + + network/tcp_trace.stp - Tcp connection tracing utility. keywords: network trace @@ -651,7 +694,7 @@ control files. Processes may be added or removed from the blocked list. - # stap -g noptrace.stp -c 'strace ls' + # stap -g noptrace.stp -c 'strace ls || true' process/pf2.stp - Profile kernel functions diff -Nru systemtap-1.4/testsuite/systemtap.examples/io/iotime.stp systemtap-1.6/testsuite/systemtap.examples/io/iotime.stp --- systemtap-1.4/testsuite/systemtap.examples/io/iotime.stp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.examples/io/iotime.stp 2011-07-25 18:12:01.000000000 +0000 @@ -8,8 +8,7 @@ * of the GNU General Public License v.2. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * along with this program. If not, see . * * Print out the amount of time spent in the read and write systemcall * when each file opened by the process is closed. Note that the systemtap diff -Nru systemtap-1.4/testsuite/systemtap.examples/keyword-index.html systemtap-1.6/testsuite/systemtap.examples/keyword-index.html --- systemtap-1.4/testsuite/systemtap.examples/keyword-index.html 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.examples/keyword-index.html 2011-07-25 18:12:01.000000000 +0000 @@ -39,7 +39,7 @@

    Examples by Keyword

    -

    ALLOCATOR AUTOFS BACKTRACE BUFFER CALLGRAPH CPU DEVICE DISK FILES FILESYSTEM FORMAT FREE FUNCTIONS FUTEX GRAPH HACK INTERRUPT IO LOCKING MEMORY MONITORING NETWORK NFS NUMA PER-PROCESS PROCESS PROFILING READ SCHEDULER SCSI SECURITY SIGNALS SIMPLE SLAB SLEEP SOCKET STATISTICS SYSCALL TCP TIME TRACE TRACEPOINT TRAFFIC TTY USE WAIT4 WRITE

    +

    ALLOCATOR AUTOFS BACKTRACE BUFFER CALLGRAPH COUNTER CPU DEVICE DISK EVENT FILES FILESYSTEM FORMAT FREE FUNCTIONS FUTEX GRAPH HACK INTERRUPT IO LOCKING MEMORY MONITORING NETWORK NFS NUMA PER-PROCESS PID PROCESS PROFILING READ SCHEDULER SCSI SECURITY SIGNALS SIMPLE SLAB SLEEP SOCKET STATISTICS SYSCALL TCP TID TIME TRACE TRACEPOINT TRAFFIC TTY USE WAIT4 WATCHPOINT WRITE

    ALLOCATOR

    • memory/vm.tracepoints.stp - Collect slab allocation statistics
      @@ -81,11 +81,17 @@
    • general/para-callgraph-verbose.stp - Callgraph tracing with verbose arguments
      keywords: TRACE CALLGRAPH

      Print a timed per-thread callgraph, complete with pretty-printed function parameters and return values. The first parameter names the function probe points to trace. The optional second parameter names the probe points for trigger functions, which acts to enable tracing for only those functions that occur while the current thread is nested within the trigger.

      # stap para-callgraph-verbose.stp 'kernel.function("*@fs/proc*.c")' \
      -'kernel.function("vfs_read")' -c "cat /proc/sys/vm/*"

    • +'kernel.function("vfs_read")' -c "cat /proc/sys/vm/* || true"

    • general/para-callgraph.stp - Callgraph tracing with arguments
      keywords: TRACE CALLGRAPH

      Print a timed per-thread callgraph, complete with function parameters and return values. The first parameter names the function probe points to trace. The optional second parameter names the probe points for trigger functions, which acts to enable tracing for only those functions that occur while the current thread is nested within the trigger.

      # stap para-callgraph.stp 'kernel.function("*@fs/proc*.c")' \
      -'kernel.function("vfs_read")' -c "cat /proc/sys/vm/*"

    • +'kernel.function("vfs_read")' -c "cat /proc/sys/vm/* || true"

      +
    +

    COUNTER

    +
      +
    • general/eventcount.stp - Event Counter for eventcount.stp
      +keywords: EVENT COUNTER TID PID
      +

      The script prints a count of specified events and their related tid's over the course of execution.

      # stap eventcount.stp syscall.* -c 'sleep 0.2'

    CPU

      @@ -111,6 +117,12 @@ keywords: DISK

      Get the status of reading/writing disk every 5 seconds, output top ten entries during that period.

      # stap disktop.stp -c "sleep 0.2"

    +

    EVENT

    +
      +
    • general/eventcount.stp - Event Counter for eventcount.stp
      +keywords: EVENT COUNTER TID PID
      +

      The script prints a count of specified events and their related tid's over the course of execution.

      # stap eventcount.stp syscall.* -c 'sleep 0.2'

    • +

    FILES

    • process/pfiles.stp - print process file descriptors
      @@ -121,7 +133,8 @@
      • general/badname.stp - Bad Filename Filter
        keywords: FILESYSTEM HACK
        -

        The badname.stp script shows how one could prevent the creation of files with undesirable names using guru mode.

        # stap -g badname.stp -c "touch /tmp/myXXXfile" 2>&1 | grep denied

      • +

        The badname.stp script shows how one could prevent the creation of files with undesirable names using guru mode.

        # stap -g badname.stp -c "touch /tmp/myXXXbadnameXXXfile.$$ 2>&1 | grep \
        +denied"

      FORMAT

        @@ -163,7 +176,8 @@
        • general/badname.stp - Bad Filename Filter
          keywords: FILESYSTEM HACK
          -

          The badname.stp script shows how one could prevent the creation of files with undesirable names using guru mode.

          # stap -g badname.stp -c "touch /tmp/myXXXfile" 2>&1 | grep denied

        • +

          The badname.stp script shows how one could prevent the creation of files with undesirable names using guru mode.

          # stap -g badname.stp -c "touch /tmp/myXXXbadnameXXXfile.$$ 2>&1 | grep \
          +denied"

        INTERRUPT

          @@ -243,6 +257,13 @@
        • general/sizeof.stp - Print the size of a C type.
          keywords: STATISTICS MEMORY SIMPLE

          This script prints the size of a type, based on dwarf debuginfo for any kernel or userspace module, or trial-compilation of a given header file name.

          # stap sizeof.stp FILE '</usr/include/stdio.h>'

        • +
        • memory/hw_watch_addr.stp - Watch access to a kernel address using breakpoint hardware
          +keywords: MEMORY WATCHPOINT
          +

          The script will watch accesses to a single kernel address and prints a traceback each time the address is accessed. This script needs to be run as root to allow access to the breakpoint hardware.

          # stap --all-modules hw_watch_addr.stp 0x`grep "pid_max$" /proc/kallsyms` \
          +-c "sleep 1"

        • +
        • memory/hw_watch_sym.stp - Watch to a kernel symbol using breakpoint hardware
          +keywords: MEMORY WATCHPOINT
          +

          The script will watch accesses to the starting address of a single kernel symbol and prints a traceback each time the symbol is accessed. This script needs to be run as root to allow access to the breakpoint hardware.

          # stap --all-modules hw_watch_sym.stp pid_max -c "sleep 1"

        • memory/kmalloc-top - Show Paths to Kernel Malloc (kmalloc) Invocations
          keywords: MEMORY

          The kmalloc-top perl program runs a small systemtap script to collect stack traces for each call to the kmalloc function and counts the time that each stack trace is observed. When kmalloc-top exits it prints out sorted list. The output can be filtered to print only the first N stack traces (-t), stack traces with a minimum counts (-m), or exclude certain stack traces (-e).

          # ./kmalloc-top -c "sleep 0.2"

        • @@ -314,6 +335,9 @@
        • network/tcp_connections.stp - Track Creation of Incoming TCP Connections
          keywords: NETWORK TCP SOCKET

          The tcp_connections.stp script prints information for each new incoming TCP connection accepted by the computer. The information includes the UID, the command accepting the connection, the PID of the command, the port the connection is on, and the IP address of the originator of the request.

          # stap tcp_connections.stp -c "sleep 0.2"

        • +
        • network/tcp_init_cwnd.stp - Increase initial tcp congestion window to 10.
          +keywords: NETWORK TCP SOCKET
          +

          Run the tcp_init_cwnd.stp script in the background to override a kernel's default tcp cwnd value to 10, which has been found to improve latency for web server type workloads. The script prints a count of cwnd value changes when it is stopped.

          # stap -g tcp_init_cwnd.stp -c "sleep 0.2"

        • network/tcp_trace.stp - Tcp connection tracing utility.
          keywords: NETWORK TRACE

          This scripts traces a given tcp connection based on the filter parameters given by the user. The indexing is done by the 4 tuples local address, remote address, local port, remote port.

          # stap tcp_trace.stp 127.0.0.1:*-127.0.0.1:* timeout=1

        • @@ -345,6 +369,12 @@ keywords: NETWORK TRAFFIC PER-PROCESS

          Every five seconds the nettop.stp script prints out a list of processed (PID and command) with the number of packets sent/received and the amount of data sent/received by the process during that interval.

          # stap nettop.stp -c "sleep 0.2"

        +

        PID

        +
          +
        • general/eventcount.stp - Event Counter for eventcount.stp
          +keywords: EVENT COUNTER TID PID
          +

          The script prints a count of specified events and their related tid's over the course of execution.

          # stap eventcount.stp syscall.* -c 'sleep 0.2'

        • +

        PROCESS

        • memory/overcommit.stp - Log failed process memory allocation due to overcommit limits
          @@ -364,7 +394,7 @@

          The forktracker.stp script prints out a time-stamped entry showing each fork and exec operation on the machine. This can be useful to determine what process is creating a flurry of short-lived processes.

          # stap forktracker.stp -c "sleep 0.2"

        • process/noptrace.stp - disable ptrace(2) from hierarchies of processes
          keywords: PROCESS SECURITY
          -

          noptrace.stp blocks ptrace(2) attempts from processes identified by stap -c/-x, as also specifiable from /proc/systemtap/stap_XXX/ control files. Processes may be added or removed from the blocked list.

          # stap -g noptrace.stp -c 'strace ls'

        • +

          noptrace.stp blocks ptrace(2) attempts from processes identified by stap -c/-x, as also specifiable from /proc/systemtap/stap_XXX/ control files. Processes may be added or removed from the blocked list.

          # stap -g noptrace.stp -c 'strace ls || true'

        • process/pfiles.stp - print process file descriptors
          keywords: PROCESS FILES

          Run pfiles.stp to produce a human-readable summary of all open file descriptors of a given process. Specify the process-id as -x PID for fastest performance.

          # stap -g pfiles.stp -x $$

        • @@ -457,7 +487,7 @@
          • process/noptrace.stp - disable ptrace(2) from hierarchies of processes
            keywords: PROCESS SECURITY
            -

            noptrace.stp blocks ptrace(2) attempts from processes identified by stap -c/-x, as also specifiable from /proc/systemtap/stap_XXX/ control files. Processes may be added or removed from the blocked list.

            # stap -g noptrace.stp -c 'strace ls'

          • +

            noptrace.stp blocks ptrace(2) attempts from processes identified by stap -c/-x, as also specifiable from /proc/systemtap/stap_XXX/ control files. Processes may be added or removed from the blocked list.

            # stap -g noptrace.stp -c 'strace ls || true'

          SIGNALS

            @@ -506,6 +536,9 @@
          • network/tcp_connections.stp - Track Creation of Incoming TCP Connections
            keywords: NETWORK TCP SOCKET

            The tcp_connections.stp script prints information for each new incoming TCP connection accepted by the computer. The information includes the UID, the command accepting the connection, the PID of the command, the port the connection is on, and the IP address of the originator of the request.

            # stap tcp_connections.stp -c "sleep 0.2"

          • +
          • network/tcp_init_cwnd.stp - Increase initial tcp congestion window to 10.
            +keywords: NETWORK TCP SOCKET
            +

            Run the tcp_init_cwnd.stp script in the background to override a kernel's default tcp cwnd value to 10, which has been found to improve latency for web server type workloads. The script prints a count of cwnd value changes when it is stopped.

            # stap -g tcp_init_cwnd.stp -c "sleep 0.2"

          STATISTICS

            @@ -548,6 +581,15 @@
          • network/tcp_connections.stp - Track Creation of Incoming TCP Connections
            keywords: NETWORK TCP SOCKET

            The tcp_connections.stp script prints information for each new incoming TCP connection accepted by the computer. The information includes the UID, the command accepting the connection, the PID of the command, the port the connection is on, and the IP address of the originator of the request.

            # stap tcp_connections.stp -c "sleep 0.2"

          • +
          • network/tcp_init_cwnd.stp - Increase initial tcp congestion window to 10.
            +keywords: NETWORK TCP SOCKET
            +

            Run the tcp_init_cwnd.stp script in the background to override a kernel's default tcp cwnd value to 10, which has been found to improve latency for web server type workloads. The script prints a count of cwnd value changes when it is stopped.

            # stap -g tcp_init_cwnd.stp -c "sleep 0.2"

          • +
          +

          TID

          +
            +
          • general/eventcount.stp - Event Counter for eventcount.stp
            +keywords: EVENT COUNTER TID PID
            +

            The script prints a count of specified events and their related tid's over the course of execution.

            # stap eventcount.stp syscall.* -c 'sleep 0.2'

          TIME

            @@ -566,11 +608,11 @@
          • general/para-callgraph-verbose.stp - Callgraph tracing with verbose arguments
            keywords: TRACE CALLGRAPH

            Print a timed per-thread callgraph, complete with pretty-printed function parameters and return values. The first parameter names the function probe points to trace. The optional second parameter names the probe points for trigger functions, which acts to enable tracing for only those functions that occur while the current thread is nested within the trigger.

            # stap para-callgraph-verbose.stp 'kernel.function("*@fs/proc*.c")' \
            -'kernel.function("vfs_read")' -c "cat /proc/sys/vm/*"

          • +'kernel.function("vfs_read")' -c "cat /proc/sys/vm/* || true"

          • general/para-callgraph.stp - Callgraph tracing with arguments
            keywords: TRACE CALLGRAPH

            Print a timed per-thread callgraph, complete with function parameters and return values. The first parameter names the function probe points to trace. The optional second parameter names the probe points for trigger functions, which acts to enable tracing for only those functions that occur while the current thread is nested within the trigger.

            # stap para-callgraph.stp 'kernel.function("*@fs/proc*.c")' \
            -'kernel.function("vfs_read")' -c "cat /proc/sys/vm/*"

          • +'kernel.function("vfs_read")' -c "cat /proc/sys/vm/* || true"

          • network/tcp_trace.stp - Tcp connection tracing utility.
            keywords: NETWORK TRACE

            This scripts traces a given tcp connection based on the filter parameters given by the user. The indexing is done by the 4 tuples local address, remote address, local port, remote port.

            # stap tcp_trace.stp 127.0.0.1:*-127.0.0.1:* timeout=1

          • @@ -617,6 +659,16 @@ keywords: SYSCALL WAIT4

            The script watches each wait4 syscall on the system. At the end of each wait4 syscall the script prints out a line with a timestamp in microseconds, the pid, the executable name in parentheses, the "wait4:" key, the duration of the wait and the PID that the wait4 was waiting for. If the waited for PID is not specified , it is "-1".

            # stap wait4time.stp -c "sleep 0.2"

          +

          WATCHPOINT

          +
            +
          • memory/hw_watch_addr.stp - Watch access to a kernel address using breakpoint hardware
            +keywords: MEMORY WATCHPOINT
            +

            The script will watch accesses to a single kernel address and prints a traceback each time the address is accessed. This script needs to be run as root to allow access to the breakpoint hardware.

            # stap --all-modules hw_watch_addr.stp 0x`grep "pid_max$" /proc/kallsyms` \
            +-c "sleep 1"

          • +
          • memory/hw_watch_sym.stp - Watch to a kernel symbol using breakpoint hardware
            +keywords: MEMORY WATCHPOINT
            +

            The script will watch accesses to the starting address of a single kernel symbol and prints a traceback each time the symbol is accessed. This script needs to be run as root to allow access to the breakpoint hardware.

            # stap --all-modules hw_watch_sym.stp pid_max -c "sleep 1"

          • +

          WRITE

          • io/iotime.stp - Trace Time Spent in Read and Write for Files
            diff -Nru systemtap-1.4/testsuite/systemtap.examples/keyword-index.txt systemtap-1.6/testsuite/systemtap.examples/keyword-index.txt --- systemtap-1.4/testsuite/systemtap.examples/keyword-index.txt 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.examples/keyword-index.txt 2011-07-25 18:12:01.000000000 +0000 @@ -106,7 +106,7 @@ nested within the trigger. # stap para-callgraph-verbose.stp 'kernel.function("*@fs/proc*.c")' \ - 'kernel.function("vfs_read")' -c "cat /proc/sys/vm/*" + 'kernel.function("vfs_read")' -c "cat /proc/sys/vm/* || true" general/para-callgraph.stp - Callgraph tracing with arguments @@ -120,7 +120,18 @@ the trigger. # stap para-callgraph.stp 'kernel.function("*@fs/proc*.c")' \ - 'kernel.function("vfs_read")' -c "cat /proc/sys/vm/*" + 'kernel.function("vfs_read")' -c "cat /proc/sys/vm/* || true" + + += COUNTER = + +general/eventcount.stp - Event Counter for eventcount.stp +keywords: event counter tid pid + + The script prints a count of specified events and their related tid's + over the course of execution. + + # stap eventcount.stp syscall.* -c 'sleep 0.2' = CPU = @@ -176,6 +187,17 @@ # stap disktop.stp -c "sleep 0.2" += EVENT = + +general/eventcount.stp - Event Counter for eventcount.stp +keywords: event counter tid pid + + The script prints a count of specified events and their related tid's + over the course of execution. + + # stap eventcount.stp syscall.* -c 'sleep 0.2' + + = FILES = process/pfiles.stp - print process file descriptors @@ -196,7 +218,8 @@ The badname.stp script shows how one could prevent the creation of files with undesirable names using guru mode. - # stap -g badname.stp -c "touch /tmp/myXXXfile" 2>&1 | grep denied + # stap -g badname.stp -c "touch /tmp/myXXXbadnameXXXfile.$$ 2>&1 | grep \ + denied" = FORMAT = @@ -293,7 +316,8 @@ The badname.stp script shows how one could prevent the creation of files with undesirable names using guru mode. - # stap -g badname.stp -c "touch /tmp/myXXXfile" 2>&1 | grep denied + # stap -g badname.stp -c "touch /tmp/myXXXbadnameXXXfile.$$ 2>&1 | grep \ + denied" = INTERRUPT = @@ -562,6 +586,28 @@ # stap sizeof.stp FILE '' +memory/hw_watch_addr.stp - Watch access to a kernel address using breakpoint hardware +keywords: memory watchpoint + + The script will watch accesses to a single kernel address and prints + a traceback each time the address is accessed. This script needs to + be run as root to allow access to the breakpoint hardware. + + # stap --all-modules hw_watch_addr.stp 0x`grep "pid_max$" /proc/kallsyms` \ + -c "sleep 1" + + +memory/hw_watch_sym.stp - Watch to a kernel symbol using breakpoint hardware +keywords: memory watchpoint + + The script will watch accesses to the starting address of a single + kernel symbol and prints a traceback each time the symbol is + accessed. This script needs to be run as root to allow access to the + breakpoint hardware. + + # stap --all-modules hw_watch_sym.stp pid_max -c "sleep 1" + + memory/kmalloc-top - Show Paths to Kernel Malloc (kmalloc) Invocations keywords: memory @@ -808,6 +854,17 @@ # stap tcp_connections.stp -c "sleep 0.2" +network/tcp_init_cwnd.stp - Increase initial tcp congestion window to 10. +keywords: network tcp socket + + Run the tcp_init_cwnd.stp script in the background to override a + kernel's default tcp cwnd value to 10, which has been found to + improve latency for web server type workloads. The script prints a + count of cwnd value changes when it is stopped. + + # stap -g tcp_init_cwnd.stp -c "sleep 0.2" + + network/tcp_trace.stp - Tcp connection tracing utility. keywords: network trace @@ -888,6 +945,17 @@ # stap nettop.stp -c "sleep 0.2" += PID = + +general/eventcount.stp - Event Counter for eventcount.stp +keywords: event counter tid pid + + The script prints a count of specified events and their related tid's + over the course of execution. + + # stap eventcount.stp syscall.* -c 'sleep 0.2' + + = PROCESS = memory/overcommit.stp - Log failed process memory allocation due to overcommit limits @@ -955,7 +1023,7 @@ control files. Processes may be added or removed from the blocked list. - # stap -g noptrace.stp -c 'strace ls' + # stap -g noptrace.stp -c 'strace ls || true' process/pfiles.stp - print process file descriptors @@ -1279,7 +1347,7 @@ control files. Processes may be added or removed from the blocked list. - # stap -g noptrace.stp -c 'strace ls' + # stap -g noptrace.stp -c 'strace ls || true' = SIGNALS = @@ -1410,6 +1478,17 @@ # stap tcp_connections.stp -c "sleep 0.2" +network/tcp_init_cwnd.stp - Increase initial tcp congestion window to 10. +keywords: network tcp socket + + Run the tcp_init_cwnd.stp script in the background to override a + kernel's default tcp cwnd value to 10, which has been found to + improve latency for web server type workloads. The script prints a + count of cwnd value changes when it is stopped. + + # stap -g tcp_init_cwnd.stp -c "sleep 0.2" + + = STATISTICS = general/sizeof.stp - Print the size of a C type. @@ -1545,6 +1624,28 @@ # stap tcp_connections.stp -c "sleep 0.2" +network/tcp_init_cwnd.stp - Increase initial tcp congestion window to 10. +keywords: network tcp socket + + Run the tcp_init_cwnd.stp script in the background to override a + kernel's default tcp cwnd value to 10, which has been found to + improve latency for web server type workloads. The script prints a + count of cwnd value changes when it is stopped. + + # stap -g tcp_init_cwnd.stp -c "sleep 0.2" + + += TID = + +general/eventcount.stp - Event Counter for eventcount.stp +keywords: event counter tid pid + + The script prints a count of specified events and their related tid's + over the course of execution. + + # stap eventcount.stp syscall.* -c 'sleep 0.2' + + = TIME = io/iotime.stp - Trace Time Spent in Read and Write for Files @@ -1606,7 +1707,7 @@ nested within the trigger. # stap para-callgraph-verbose.stp 'kernel.function("*@fs/proc*.c")' \ - 'kernel.function("vfs_read")' -c "cat /proc/sys/vm/*" + 'kernel.function("vfs_read")' -c "cat /proc/sys/vm/* || true" general/para-callgraph.stp - Callgraph tracing with arguments @@ -1620,7 +1721,7 @@ the trigger. # stap para-callgraph.stp 'kernel.function("*@fs/proc*.c")' \ - 'kernel.function("vfs_read")' -c "cat /proc/sys/vm/*" + 'kernel.function("vfs_read")' -c "cat /proc/sys/vm/* || true" network/tcp_trace.stp - Tcp connection tracing utility. @@ -1742,6 +1843,30 @@ # stap wait4time.stp -c "sleep 0.2" += WATCHPOINT = + +memory/hw_watch_addr.stp - Watch access to a kernel address using breakpoint hardware +keywords: memory watchpoint + + The script will watch accesses to a single kernel address and prints + a traceback each time the address is accessed. This script needs to + be run as root to allow access to the breakpoint hardware. + + # stap --all-modules hw_watch_addr.stp 0x`grep "pid_max$" /proc/kallsyms` \ + -c "sleep 1" + + +memory/hw_watch_sym.stp - Watch to a kernel symbol using breakpoint hardware +keywords: memory watchpoint + + The script will watch accesses to the starting address of a single + kernel symbol and prints a traceback each time the symbol is + accessed. This script needs to be run as root to allow access to the + breakpoint hardware. + + # stap --all-modules hw_watch_sym.stp pid_max -c "sleep 1" + + = WRITE = io/iotime.stp - Trace Time Spent in Read and Write for Files diff -Nru systemtap-1.4/testsuite/systemtap.examples/locks/bkl_stats.stp systemtap-1.6/testsuite/systemtap.examples/locks/bkl_stats.stp --- systemtap-1.4/testsuite/systemtap.examples/locks/bkl_stats.stp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.examples/locks/bkl_stats.stp 2011-07-25 18:12:01.000000000 +0000 @@ -8,8 +8,7 @@ * of the GNU General Public License v.2. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * along with this program. If not, see . * * Description: displays statistics for waiting and holding big kernel lock (BKL) * diff -Nru systemtap-1.4/testsuite/systemtap.examples/locks/bkl.stp systemtap-1.6/testsuite/systemtap.examples/locks/bkl.stp --- systemtap-1.4/testsuite/systemtap.examples/locks/bkl.stp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.examples/locks/bkl.stp 2011-07-25 18:12:01.000000000 +0000 @@ -8,8 +8,7 @@ * of the GNU General Public License v.2. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * along with this program. If not, see . * * * Description: displays which task is holding big kernel lock (BKL) when the diff -Nru systemtap-1.4/testsuite/systemtap.examples/memory/hw_watch_addr.meta systemtap-1.6/testsuite/systemtap.examples/memory/hw_watch_addr.meta --- systemtap-1.4/testsuite/systemtap.examples/memory/hw_watch_addr.meta 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.examples/memory/hw_watch_addr.meta 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,14 @@ +title: Watch access to a kernel address using breakpoint hardware +name: hw_watch_addr.stp +version: 1.0 +author: William Cohen +keywords: memory watchpoint +subsystem: memory +status: production +exit: user-controlled +output: trace +scope: system-wide +description: The script will watch accesses to a single kernel address and prints a traceback each time the address is accessed. This script needs to be run as root to allow access to the breakpoint hardware. +test_support: perf stat --event=mem:0xc000000 /bin/true +test_check: stap --all-modules -p4 hw_watch_addr.stp 0x`grep "pid_max$" /proc/kallsyms` +test_installcheck: stap --all-modules hw_watch_addr.stp 0x`grep "pid_max$" /proc/kallsyms` -c "sleep 1" diff -Nru systemtap-1.4/testsuite/systemtap.examples/memory/hw_watch_addr.stp systemtap-1.6/testsuite/systemtap.examples/memory/hw_watch_addr.stp --- systemtap-1.4/testsuite/systemtap.examples/memory/hw_watch_addr.stp 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.examples/memory/hw_watch_addr.stp 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,6 @@ +#! /usr/bin/env stap +probe kernel.data($1).rw +{ + printf("%p value is accessed\n", $1); + print_backtrace(); +} diff -Nru systemtap-1.4/testsuite/systemtap.examples/memory/hw_watch_sym.meta systemtap-1.6/testsuite/systemtap.examples/memory/hw_watch_sym.meta --- systemtap-1.4/testsuite/systemtap.examples/memory/hw_watch_sym.meta 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.examples/memory/hw_watch_sym.meta 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,14 @@ +title: Watch to a kernel symbol using breakpoint hardware +name: hw_watch_sym.stp +version: 1.0 +author: William Cohen +keywords: memory watchpoint +subsystem: memory +status: production +exit: user-controlled +output: trace +scope: system-wide +description: The script will watch accesses to the starting address of a single kernel symbol and prints a traceback each time the symbol is accessed. This script needs to be run as root to allow access to the breakpoint hardware. +test_support: perf stat --event=mem:0xc000000 /bin/true +test_check: stap --all-modules -p4 hw_watch_sym.stp pid_max +test_installcheck: stap --all-modules hw_watch_sym.stp pid_max -c "sleep 1" diff -Nru systemtap-1.4/testsuite/systemtap.examples/memory/hw_watch_sym.stp systemtap-1.6/testsuite/systemtap.examples/memory/hw_watch_sym.stp --- systemtap-1.4/testsuite/systemtap.examples/memory/hw_watch_sym.stp 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.examples/memory/hw_watch_sym.stp 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,6 @@ +#! /usr/bin/env stap +probe kernel.data(@1).rw +{ + printf("%s value is accessed\n", @1); + print_backtrace(); +} diff -Nru systemtap-1.4/testsuite/systemtap.examples/network/tcp_init_cwnd.meta systemtap-1.6/testsuite/systemtap.examples/network/tcp_init_cwnd.meta --- systemtap-1.4/testsuite/systemtap.examples/network/tcp_init_cwnd.meta 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.examples/network/tcp_init_cwnd.meta 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,7 @@ +title: Increase initial tcp congestion window to 10. +name: tcp_init_cwnd.stp +keywords: network tcp socket +scope: system-wide +description: Run the tcp_init_cwnd.stp script in the background to override a kernel's default tcp cwnd value to 10, which has been found to improve latency for web server type workloads. The script prints a count of cwnd value changes when it is stopped. +test_check: stap -g -p4 tcp_init_cwnd.stp +test_installcheck: stap -g tcp_init_cwnd.stp -c "sleep 0.2" diff -Nru systemtap-1.4/testsuite/systemtap.examples/network/tcp_init_cwnd.stp systemtap-1.6/testsuite/systemtap.examples/network/tcp_init_cwnd.stp --- systemtap-1.4/testsuite/systemtap.examples/network/tcp_init_cwnd.stp 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.examples/network/tcp_init_cwnd.stp 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,15 @@ +#! /usr/bin/stap -g + +# Based upon http://blog.yufeng.info/archives/1173, bring the goodness +# of linux commit 442b9635c5 to the pre-2.6.39 masses. + +probe kernel.function("tcp_init_cwnd").return +{ + r = $return + if (r > 0 && r < 10) + $return = 10; + counts[r,$return] <<< 1 +} + +global counts # will be automatically summarized at shutdown + diff -Nru systemtap-1.4/testsuite/systemtap.examples/process/futexes.stp systemtap-1.6/testsuite/systemtap.examples/process/futexes.stp --- systemtap-1.4/testsuite/systemtap.examples/process/futexes.stp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.examples/process/futexes.stp 2011-07-25 18:12:01.000000000 +0000 @@ -4,12 +4,14 @@ # into the futex system call. global FUTEX_WAIT = 0 /*, FUTEX_WAKE = 1 */ +global FUTEX_PRIVATE_FLAG = 128 /* linux 2.6.22+ */ +global FUTEX_CLOCK_REALTIME = 256 /* linux 2.6.29+ */ global lock_waits # long-lived stats on (tid,lock) blockage elapsed time global process_names # long-lived pid-to-execname mapping probe syscall.futex.return { - if ($op != FUTEX_WAIT) next # don't care about WAKE event originator + if (($op & ~(FUTEX_PRIVATE_FLAG|FUTEX_CLOCK_REALTIME)) != FUTEX_WAIT) next process_names[pid()] = execname() elapsed = gettimeofday_us() - @entry(gettimeofday_us()) lock_waits[pid(), $uaddr] <<< elapsed diff -Nru systemtap-1.4/testsuite/systemtap.examples/process/noptrace.meta systemtap-1.6/testsuite/systemtap.examples/process/noptrace.meta --- systemtap-1.4/testsuite/systemtap.examples/process/noptrace.meta 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.examples/process/noptrace.meta 2011-07-25 18:12:01.000000000 +0000 @@ -2,6 +2,7 @@ name: noptrace.stp keywords: process security description: noptrace.stp blocks ptrace(2) attempts from processes identified by stap -c/-x, as also specifiable from /proc/systemtap/stap_XXX/ control files. Processes may be added or removed from the blocked list. +test_support: test -e /etc/redhat-release && grep -v "Nahant" /etc/redhat-release test_check: stap -gp4 noptrace.stp -x $$ -test_installcheck: stap -g noptrace.stp -c 'strace ls' +test_installcheck: stap -g noptrace.stp -c 'strace ls || true' diff -Nru systemtap-1.4/testsuite/systemtap.examples/process/proc_snoop_parser_instructions.txt systemtap-1.6/testsuite/systemtap.examples/process/proc_snoop_parser_instructions.txt --- systemtap-1.4/testsuite/systemtap.examples/process/proc_snoop_parser_instructions.txt 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.examples/process/proc_snoop_parser_instructions.txt 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,54 @@ +Example using LTTng TMF Eclipse Plugin with Example SystemTap Script proc_snoop.stp + +1. Installing the Plugin + - Follow instructions given below to setup and run the LTTng parsing library + and TMF eclipse plugin: + - Parsing library: http://wiki.eclipse.org/Linux_Tools_Project/LTTng + - TMF eclipse plugin: http://lttng.org/eclipse + + +2. Importing the Parser + - Once you have it up and running in eclipse, open the LTTng perspective. + - Window > Open Perspective > Other... > LTTng + + - Open the TMF/Projects view. + - Window > Show View > Other... > TMF > Projects + + - Open Manage Custom Parsers page + - Click the downward pointing arrow in the top right corner of the + TMF/Projects view. + + - Import the proc_snoop_parser.xml parser from: + systemtap/testsuite/systemtap.examples/process/proc_snoop_parser.xml + + +3. Running the Script + - Create a folder somewhere to store the tracefile. + - e.g. $ mkdir ~/Desktop/tracefile + + - Run the proc_snoop.stp script and pipe the output to a file in the above + folder. Let it run for a few seconds so you get a number of lines of output, + then stop it with ctrl-c. Look in the file and make sure there are less than + 50,000 lines before continuing. If there are more (or none) run the script + again, adjusting the running time accordingly. + + $ stap systemtap/testsuite/systemtap.examples/ + process/proc_snoop.stp > ~/Desktop/tracefile/tracefile.txt + + +4. Parsing the File + - In the TMF/Projects view, right click and choose "Import Trace". + - Right click again, and choose "New Experiment". Name it and click "OK". + - Right click on the new experiment and choose "Select Traces". Choose + tracefile.txt. + - In the new experiment, right click on tracefile.txt and choose + - Select Parser > Custom > Proc_Snoop_Parser + - Double Click on the tracefile to parse it. It will show up in a neatly + parsed list. + + NOTE: Due to the limitations of the custom text parser, the views + that use timestamp information will not function properly with this + script. Currently, to be able to use those views, timestamps must be in + the form of the SimpleDateFormat class- they cannot be just a large, + increasing number such as 43928472. + diff -Nru systemtap-1.4/testsuite/systemtap.examples/process/proc_snoop_parser.xml systemtap-1.6/testsuite/systemtap.examples/process/proc_snoop_parser.xml --- systemtap-1.4/testsuite/systemtap.examples/process/proc_snoop_parser.xml 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.examples/process/proc_snoop_parser.xml 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,24 @@ + + + + + + + *TIMESTAMP *PID *TID *EXECNAME *ACTION + + + + *(\d*) *(\d*) *(\d*) *(\S*) *(.*) + + + + + + + + + + + + + diff -Nru systemtap-1.4/testsuite/systemtap.examples/process/sleepingBeauties.stp systemtap-1.6/testsuite/systemtap.examples/process/sleepingBeauties.stp --- systemtap-1.4/testsuite/systemtap.examples/process/sleepingBeauties.stp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.examples/process/sleepingBeauties.stp 2011-07-25 18:12:01.000000000 +0000 @@ -11,7 +11,7 @@ probe kernel.function("wait_for_completion").call avoids have the kretprobe stuff in the backtrace. for more information see: - http://sources.redhat.com/bugzilla/show_bug.cgi?id=6436 + http://sourceware.org/bugzilla/show_bug.cgi?id=6436 */ diff -Nru systemtap-1.4/testsuite/systemtap.examples/process/sleeptime.stp systemtap-1.6/testsuite/systemtap.examples/process/sleeptime.stp --- systemtap-1.4/testsuite/systemtap.examples/process/sleeptime.stp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.examples/process/sleeptime.stp 2011-07-25 18:12:01.000000000 +0000 @@ -8,8 +8,7 @@ * of the GNU General Public License v.2. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * along with this program. If not, see . * * Print out the amount of time spent in the nanosleep and compat_nanosleep * systemcalls. This can help find which processes are waking based on time diff -Nru systemtap-1.4/testsuite/systemtap.examples/process/wait4time.stp systemtap-1.6/testsuite/systemtap.examples/process/wait4time.stp --- systemtap-1.4/testsuite/systemtap.examples/process/wait4time.stp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.examples/process/wait4time.stp 2011-07-25 18:12:01.000000000 +0000 @@ -8,8 +8,7 @@ * of the GNU General Public License v.2. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * along with this program. If not, see . * * Print out the time spent in wait4 systemcall * diff -Nru systemtap-1.4/testsuite/systemtap.examples/profiling/latencytap.stp systemtap-1.6/testsuite/systemtap.examples/profiling/latencytap.stp --- systemtap-1.4/testsuite/systemtap.examples/profiling/latencytap.stp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.examples/profiling/latencytap.stp 2011-07-25 18:12:01.000000000 +0000 @@ -15,7 +15,10 @@ global this_sleep; global debug = 0; -function log_event:long (p:long) { return (!traced_pid || traced_pid == p) } +function log_event:long (p:long) +{ + return (!traced_pid || traced_pid == task_pid(p)) +} #func names from hex addresses function func_backtrace:string (ips:string) @@ -50,14 +53,14 @@ # check to see if task is in appropriate state: # TASK_INTERRUPTIBLE 1 # TASK_UNINTERRUPTIBLE 2 - if (log_event($p->pid) && (s & 3)) { + if (log_event($p) && (s & 3)) { dequeue[$p] = gettimeofday_us(); } } probe kernel.trace("activate_task") !, kernel.function("activate_task") { - if (!log_event($p->pid)) next + if (!log_event($p)) next a = gettimeofday_us() d = dequeue[$p] diff -Nru systemtap-1.4/testsuite/systemtap.examples/README systemtap-1.6/testsuite/systemtap.examples/README --- systemtap-1.4/testsuite/systemtap.examples/README 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.examples/README 2011-07-25 18:12:01.000000000 +0000 @@ -1,7 +1,7 @@ This text describes contribution procedures for adding scripts to systemtap.examples directory. Please read before submitting SystemTap examples. Discussions take place on the - mailing list. + mailing list. - general @@ -100,7 +100,7 @@ When you have a SystemTap script that should be included as an example, submit it to the SystemTap mailing list, - systemtap@sources.redhat.com for review. Even if the script is not + systemtap@sourceware.org for review. Even if the script is not ready for submission as an example, feel free to ask questions or discuss the work-in-progress script with other people working with SystemTap. diff -Nru systemtap-1.4/testsuite/systemtap.exelib/libmarkunamestack.tcl systemtap-1.6/testsuite/systemtap.exelib/libmarkunamestack.tcl --- systemtap-1.4/testsuite/systemtap.exelib/libmarkunamestack.tcl 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.exelib/libmarkunamestack.tcl 2011-07-25 18:12:01.000000000 +0000 @@ -41,7 +41,6 @@ send_log "Running: stap -w --ldd $srcdir/$subdir/libmarkunamestack.stp $testexe $testlib -c $testexe\n" spawn stap -w --ldd $srcdir/$subdir/libmarkunamestack.stp $testexe $testlib -c $testexe -wait -i $spawn_id expect { -timeout 60 -re {^print_[^\r\n]+\r\n} {incr print; exp_continue} @@ -71,9 +70,12 @@ # libc/ld/startup -re {^ 0x[a-f0-9]+ : _[^\r\n]+\r\n} {incr start_func; exp_continue} - timeout { fail "libmarkunamestack-$testname (timeout)" } + timeout { fail "libmarkunamestack-$testname (timeout)"; exec kill -INT -[exp_pid] } eof { } } +# kill again for good measure +exec kill -INT -[exp_pid] +catch {close}; catch {wait -i $spawn_id} if {$lib == 8} { pass "lib-$testname" } { fail "lib-$testname ($lib)" diff -Nru systemtap-1.4/testsuite/systemtap.exelib/pthreadprobes.c systemtap-1.6/testsuite/systemtap.exelib/pthreadprobes.c --- systemtap-1.4/testsuite/systemtap.exelib/pthreadprobes.c 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.exelib/pthreadprobes.c 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,183 @@ +#include +#include +#include +#include +#include + +pthread_mutex_t mutex; +pthread_mutex_t count_mutex = PTHREAD_MUTEX_INITIALIZER; +pthread_rwlock_t rwlock; +pthread_cond_t cond; + +static int do_output; + +static void output(char *string) +{ + if (!do_output) + return; + + printf("%s", string); +} + +void *thread_func(void *p) +{ + output("thread_func\n"); + + pthread_mutex_lock(&mutex); + output("got mutex lock\n"); + + sleep(5); + + pthread_mutex_unlock(&mutex); + + output("thread done\n"); + + return NULL; +} + +void *wrlock_thread(void *p) +{ + pthread_rwlock_rdlock(&rwlock); + output("thread got read lock\n"); + + sleep(2); + pthread_rwlock_unlock(&rwlock); + + pthread_rwlock_wrlock(&rwlock); + output("thread got write lock\n"); + + return NULL; +} + +void *condvar_thread(void *p) +{ + int i; + + pthread_mutex_lock(&count_mutex); + + for (i=0; i < 10; i++) + { + output("Going for sleep for 1 sec\n"); + sleep(1); + } + + pthread_cond_signal(&cond); + + pthread_mutex_unlock(&count_mutex); + + return NULL; +} + +void *condvar_wait_thread(void *p) +{ + pthread_mutex_lock(&count_mutex); + pthread_cond_wait(&cond, &count_mutex); + + output("thread wakeup on cond var\n"); + + pthread_mutex_unlock(&count_mutex); + + return NULL; +} + + +int main(int argc, char *argv[]) +{ + pthread_t tid, tid2; + struct timespec abs_time; + + do_output = (argc > 1 && strcmp("-v", argv[1]) == 0); + + /* Simple mutex lock */ + + pthread_mutex_init(&mutex, NULL); + + pthread_mutex_lock(&mutex); + + pthread_create(&tid, NULL, thread_func, NULL); + + pthread_mutex_unlock(&mutex); + + sleep(1); + + while (1) + { + int ret; + + clock_gettime(CLOCK_REALTIME, &abs_time); + abs_time.tv_sec += 1; + + ret = pthread_mutex_timedlock(&mutex, &abs_time); + + if (ret == ETIMEDOUT) + { + output("ETIMEDOUT\n"); + } + else if (ret == 0) + { + output("pthread_mutex_timedlock succ.\n"); + break; + } + } + + pthread_mutex_destroy(&mutex); + + pthread_join(tid, NULL); + + /* Read-Write lock */ + + pthread_rwlock_init(&rwlock, NULL); + + pthread_create(&tid, NULL, wrlock_thread, NULL); + + pthread_rwlock_rdlock(&rwlock); + sleep(1); + + pthread_rwlock_unlock(&rwlock); + + pthread_join(tid, NULL); + + /* Condition Variable */ + + pthread_cond_init(&cond, NULL); + pthread_mutex_lock(&count_mutex); + + pthread_create(&tid, NULL, condvar_thread, NULL); + + pthread_cond_wait(&cond, &count_mutex); + + + pthread_cond_init(&cond, NULL); + pthread_mutex_init(&count_mutex, NULL); + + pthread_mutex_lock(&count_mutex); + + pthread_create(&tid, NULL, condvar_thread, NULL); + + clock_gettime(CLOCK_REALTIME, &abs_time); + abs_time.tv_sec += 1; + + if (pthread_cond_timedwait(&cond, &count_mutex, &abs_time) == ETIMEDOUT) + output("cond_timedwait ETIMEDOUT\n"); + + /* main thread calls pthread_cond_broadcast() this time */ + + pthread_cond_init(&cond, NULL); + pthread_mutex_init(&count_mutex, NULL); + + pthread_create(&tid, NULL, condvar_wait_thread, NULL); + pthread_create(&tid2, NULL, condvar_wait_thread, NULL); + + sleep(1); + + pthread_mutex_lock(&count_mutex); + + pthread_cond_broadcast(&cond); + + pthread_mutex_unlock(&count_mutex); + + pthread_join(tid, NULL); + pthread_join(tid2, NULL); + + return 0; +} diff -Nru systemtap-1.4/testsuite/systemtap.exelib/pthreadprobes.exp systemtap-1.6/testsuite/systemtap.exelib/pthreadprobes.exp --- systemtap-1.4/testsuite/systemtap.exelib/pthreadprobes.exp 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.exelib/pthreadprobes.exp 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,240 @@ +set test pthreadprobes +if {! [installtest_p]} { + untested $test + return +} + +# compile the testcase +catch {exec gcc -g -o $test $srcdir/$subdir/$test.c -lpthread -lrt} err +if {$err != "" && [file exists $test]} then { + fail "$test compile $err" + } else { + # find the location of the pthread library + catch {exec /usr/bin/ldd $test | egrep {^\s*libpthread.so} | awk {{print $3}} } res +} + +# First thing, do we have a version of glibc with the probes?? +set cmd [concat -L process(\"$res\").mark(\"pthread_create\")] +if {[catch {exec stap $cmd } res2]} { + # can happen on systems without pthread probes in glibc, so don't complain + buildok_known_failures $test $res2 + exec rm -f $test + return +} else { + pass "$test" +} + +# Now we exercise every probe available +set cmd2 [concat -e global cond_broadcast , cond_destroy , cond_init , cond_signal , cond_timedwait , cond_wait , mutex_acquired , mutex_destroy , mutex_entry , mutex_init , mutex_release , mutex_timedlock_acquired , mutex_timedlock_entry , pthread_create , pthread_join , pthread_join_ret , pthread_start , rdlock_entry , rwlock_destroy , wrlock_entry\; probe process(\"$res\").mark(\"cond_broadcast\") \{ cond_broadcast++ \} probe process(\"$res\").mark(\"cond_destroy\") \{ cond_destroy++ \} probe process(\"$res\").mark(\"cond_init\") \{ cond_init++ \} probe process(\"$res\").mark(\"cond_signal\") \{ cond_signal++ \} probe process(\"$res\").mark(\"cond_timedwait\") \{ cond_timedwait++ \} probe process(\"$res\").mark(\"cond_wait\") \{ cond_wait++ \} probe process(\"$res\").mark(\"mutex_acquired\") \{ mutex_acquired++ \} probe process(\"$res\").mark(\"mutex_destroy\") \{ mutex_destroy++ \} probe process(\"$res\").mark(\"mutex_entry\") \{ mutex_entry++ \} probe process(\"$res\").mark(\"mutex_init\") \{ mutex_init++ \} probe process(\"$res\").mark(\"mutex_release\") \{ mutex_release++ \} probe process(\"$res\").mark(\"mutex_timedlock_acquired\") \{ mutex_timedlock_acquired++ \} probe process(\"$res\").mark(\"mutex_timedlock_entry\") \{ mutex_timedlock_entry++ \} probe process(\"$res\").mark(\"pthread_create\") \{ pthread_create++ \} probe process(\"$res\").mark(\"pthread_join\") \{ pthread_join++ \} probe process(\"$res\").mark(\"pthread_join_ret\") \{ pthread_join_ret++ \} probe process(\"$res\").mark(\"pthread_start\") \{ pthread_start++ \} probe process(\"$res\").mark(\"rdlock_entry\") \{ rdlock_entry++ \} probe process(\"$res\").mark(\"rwlock_destroy\") \{ rwlock_destroy++ \} probe process(\"$res\").mark(\"wrlock_entry\") \{ wrlock_entry++ \} probe end \{ printf(\"cond_broadcast=%d\\n", cond_broadcast)\; printf(\"cond_destroy=%d\\n", cond_destroy)\; printf(\"cond_init=%d\\n", cond_init)\; printf(\"cond_signal=%d\\n", cond_signal)\; printf(\"cond_signal=%d\\n", cond_signal)\; printf(\"cond_timedwait=%d\\n", cond_timedwait)\; printf(\"cond_wait=%d\\n", cond_wait)\; printf(\"mutex_acquired=%d\\n", mutex_acquired)\; printf(\"mutex_destroy=%d\\n", mutex_destroy)\; printf(\"mutex_entry=%d\\n", mutex_entry)\; printf(\"mutex_init=%d\\n", mutex_init)\; printf(\"mutex_release=%d\\n", mutex_release)\; printf(\"mutex_timedlock_acquired=%d\\n", mutex_timedlock_acquired)\; printf(\"mutex_timedlock_entry=%d\\n", mutex_timedlock_entry)\; printf(\"pthread_create=%d\\n", pthread_create)\; printf(\"pthread_join=%d\\n", pthread_join)\; printf(\"pthread_join_ret=%d\\n", pthread_join_ret)\; printf(\"pthread_start=%d\\n", pthread_start)\; printf(\"rdlock_entry=%d\\n", rdlock_entry)\; printf(\"rwlock_destroy=%d\\n", rwlock_destroy)\; printf(\"wrlock_entry=%d\\n", wrlock_entry)\; \} ] + +# error executing? +if {[catch {exec stap $cmd2 -c ./$test } res3]} { + send "res = $res3" + fail $test + exec rm -f $test + return +} + +set cond_broadcast_correct 0 +set cond_destroy_correct 0 +set cond_init_correct 0 +set cond_signal_correct 0 +set cond_timedwait_correct 0 +set cond_wait_correct 0 +set mutex_acquired_correct 0 +set mutex_destroy_correct 0 +set mutex_entry_correct 0 +set mutex_init_correct 0 +set mutex_release_correct 0 +set mutex_timedlock_acquired_correct 0 +set mutex_timedlock_entry_correct 0 +set pthread_create_correct 0 +set pthread_join_correct 0 +set pthread_join_ret_correct 0 +set pthread_start_correct 0 +set rdlock_entry_correct 0 +set rwlock_destroy_correct 0 +set wrlock_entry_correct 0 + +# make sure the numbers match +foreach line $res3 { + if {[regexp "cond_broadcast=1" $line]} { + set cond_broadcast_correct 1 + } + if {[regexp "cond_destroy=0" $line]} { + set cond_destroy_correct 1 + } + if {[regexp "cond_init=3" $line]} { + set cond_init_correct 1 + } + if {[regexp "cond_signal=2" $line]} { + set cond_signal_correct 1 + } + if {[regexp "cond_timedwait=1" $line]} { + set cond_timedwait_correct 1 + } + if {[regexp "cond_wait=3" $line]} { + set cond_wait_correct 1 + } + if {[regexp "mutex_acquired=15" $line]} { + set mutex_acquired_correct 1 + } + if {[regexp "mutex_destroy=1" $line]} { + set mutex_destroy_correct 1 + } + if {[regexp "mutex_entry=15" $line]} { + set mutex_entry_correct 1 + } + if {[regexp "mutex_init=3" $line]} { + set mutex_init_correct 1 + } + if {[regexp "mutex_release=13" $line]} { + set mutex_release_correct 1 + } + if {[regexp "mutex_timedlock_acquired=1" $line]} { + set mutex_timedlock_acquired_correct 1 + } + if {[regexp "pthread_create=6" $line]} { + set pthread_create_correct 1 + } + if {[regexp "pthread_join=4" $line]} { + set pthread_join_correct 1 + } + if {[regexp "pthread_join_ret=4" $line]} { + set pthread_join_ret_correct 1 + } + if {[regexp "pthread_start=6" $line]} { + set pthread_start_correct 1 + } + if {[regexp "rdlock_entry=2" $line]} { + set rdlock_entry_correct 1 + } + if {[regexp "rwlock_destroy=0" $line]} { + set rwlock_destroy_correct 1 + } + if {[regexp "wrlock_entry=1" $line]} { + set wrlock_entry_correct 1 + } +} + +if { $cond_broadcast_correct == 0 } { + fail "$test cond_broadcast" +} else { + pass "$test" +} + +if { $cond_destroy_correct == 0 } { + fail "$test cond_destroy" +} else { + pass "$test" +} + +if { $cond_init_correct == 0 } { + fail "$test cond_init" +} else { + pass "$test" +} + +if { $cond_signal_correct == 0 } { + fail "$test cond_signal" +} else { + pass "$test" +} + +if { $cond_timedwait_correct == 0 } { + fail "$test cond_timedwait" +} else { + pass "$test" +} + +if { $cond_wait_correct == 0 } { + fail "$test cond_wait" +} else { + pass "$test" +} + +if { $mutex_acquired_correct == 0 } { + fail "$test mutex_acquired" +} else { + pass "$test" +} + +if { $mutex_destroy_correct == 0 } { + fail "$test mutex_destroy" +} else { + pass "$test" +} + +if { $mutex_entry_correct == 0 } { + fail "$test mutex_entry" +} else { + pass "$test" +} + +if { $mutex_init_correct == 0 } { + fail "$test mutex_init" +} else { + pass "$test" +} + +if { $mutex_release_correct == 0 } { + fail "$test mutex_release" +} else { + pass "$test" +} + +if { $mutex_timedlock_acquired_correct == 0 } { + fail "$test mutex_timedlock_acquired" +} else { + pass "$test" +} + +if { $mutex_timedlock_entry_correct == 0 } { + fail "$test mutex_timedlock_entry" +} else { + pass "$test" +} + +if { $pthread_create_correct == 0 } { + fail "$test pthread_create" +} else { + pass "$test" +} + +if { $pthread_join_correct == 0 } { + fail "$test pthread_join" +} else { + pass "$test" +} + +if { $pthread_join_ret_correct == 0 } { + fail "$test pthread_join_ret" +} else { + pass "$test" +} + +if { $pthread_start_correct == 0 } { + fail "$test pthread_start" +} else { + pass "$test" +} + +if { $rdlock_entry_correct == 0 } { + fail "$test rdlock_entry" +} else { + pass "$test" +} + +if { $rwlock_destroy_correct == 0 } { + fail "$test rwlock_destroy" +} else { + pass "$test" +} + +if { $wrlock_entry_correct == 0 } { + fail "$test wrlock_entry" +} else { + pass "$test" +} + +exec rm -f $test diff -Nru systemtap-1.4/testsuite/systemtap.exelib/ustack.tcl systemtap-1.6/testsuite/systemtap.exelib/ustack.tcl --- systemtap-1.4/testsuite/systemtap.exelib/ustack.tcl 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.exelib/ustack.tcl 2011-07-25 18:12:01.000000000 +0000 @@ -35,7 +35,6 @@ send_log "Running: stap -w --ldd $srcdir/$subdir/ustack.stp $testexe $testlib -c $testexe\n" spawn stap -w --ldd $srcdir/$subdir/ustack.stp $testexe $testlib -c $testexe -wait expect { -timeout 60 -re {^print_[^\r\n]+\r\n} {incr print; exp_continue} @@ -44,9 +43,12 @@ -re {^ 0x[a-f0-9]+ : lib_main\+0x[^\r\n]+\r\n} {incr lib_main; exp_continue} -re {^ 0x[a-f0-9]+ : lib_func\+0x[^\r\n]+\r\n} {incr lib_func; exp_continue} -re {^ 0x[a-f0-9]+ : _[^\r\n]+\r\n} {incr start_func; exp_continue} - timeout { fail "ustack-$testname (timeout)" } + timeout { fail "ustack-$testname (timeout)"; exec kill -INT -[exp_pid] } eof { } } +# kill again for good measure +exec kill -INT -[exp_pid] +catch {close}; catch {wait} if {$print == 4} { pass "ustack-$testname print" } { fail "ustack-$testname print ($print)" diff -Nru systemtap-1.4/testsuite/systemtap.maps/absentstats.exp systemtap-1.6/testsuite/systemtap.maps/absentstats.exp --- systemtap-1.4/testsuite/systemtap.maps/absentstats.exp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.maps/absentstats.exp 2011-07-25 18:12:01.000000000 +0000 @@ -20,4 +20,25 @@ catch close wait -if {$ok == 2 && $ko == 13} then { pass $test } else { fail "$test ($ok $ko)" } +# As of stap 1.5, @count and @sum are allowed, the rest fail +if {$ok == 4 && $ko == 11} then { pass $test } else { fail "$test ($ok $ko)" } + + +set ok 0 +set ko 0 + +spawn stap -DMAXERRORS=20 $srcdir/$subdir/$test.stp --compatible=1.4 +# spawn echo hello children 0 +expect { + -timeout 150 + -re {^ERROR: empty aggregate[^\r]*\r} { incr ko ; exp_continue } + -re {^WARNING: Number of errors} { incr ko ; exp_continue } + -re {^0\r} { incr ok ; exp_continue } + -re {\n} { exp_continue } + eof { } +} +catch close +wait + +# In stap <= 1.4, only @count is allowed, the rest fail +if {$ok == 2 && $ko == 13} then { pass "$test 1.4" } else { fail "$test 1.4 ($ok $ko)" } diff -Nru systemtap-1.4/testsuite/systemtap.maps/absentstats.stp systemtap-1.6/testsuite/systemtap.maps/absentstats.stp --- systemtap-1.4/testsuite/systemtap.maps/absentstats.stp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.maps/absentstats.stp 2011-07-25 18:12:01.000000000 +0000 @@ -1,12 +1,13 @@ # stap -DMAXERRORS=40 -# NB: PR 6538 will cause systemtap to warn about the read-only globals; -# we can't help that though since the point of this test is to see what -# happens when an empty (never written-to) aggregate is queried. +# NB: The never-deletes help us avoid WARNING about the read-only +# globals; the point of this test is to see what happens when an +# empty (never written-to) aggregate is queried. global sc +probe never { delete sc } probe begin { println(@count(sc)) } -probe begin { print(@sum(sc)) } +probe begin { println(@sum(sc)) } probe begin { print(@max(sc)) } probe begin { print(@min(sc)) } probe begin { print(@avg(sc)) } @@ -14,12 +15,13 @@ probe begin { x=@hist_log(sc)[5]; print(x) } global ry +probe never { delete ry } probe begin { println(@count(ry[4])) } -probe begin { print(@sum(ry[4])) } +probe begin { println(@sum(ry[4])) } probe begin { print(@max(ry[4])) } probe begin { print(@min(ry[4])) } probe begin { print(@avg(ry[4])) } probe begin { print(@hist_log(ry[4])) } probe begin { x=@hist_log(ry[4])[5]; print(x) } -probe begin { exit() } +probe begin(1) { exit() } diff -Nru systemtap-1.4/testsuite/systemtap.maps/ix_clear2.stp systemtap-1.6/testsuite/systemtap.maps/ix_clear2.stp --- systemtap-1.4/testsuite/systemtap.maps/ix_clear2.stp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.maps/ix_clear2.stp 2011-07-25 18:12:01.000000000 +0000 @@ -4,13 +4,13 @@ probe begin { foo[1] <<< 1 - printf("foo[1] = %d %d\n", @count(foo[1]), @sum(foo[1])) + printf("foo[1] = %d %d\n", @count(foo[1]), @min(foo[1])) delete foo } probe timer.ms(1000) { exit() } probe end { - printf("foo[1] = %d %d\n", @count(foo[1]), @sum(foo[1])) + printf("foo[1] = %d %d\n", @count(foo[1]), @min(foo[1])) } diff -Nru systemtap-1.4/testsuite/systemtap.maps/ix_clear3.stp systemtap-1.6/testsuite/systemtap.maps/ix_clear3.stp --- systemtap-1.4/testsuite/systemtap.maps/ix_clear3.stp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.maps/ix_clear3.stp 2011-07-25 18:12:01.000000000 +0000 @@ -4,7 +4,7 @@ probe begin { foo[1] <<< 1 - printf("foo[2] = %d %d\n", @count(foo[2]), @sum(foo[2])) + printf("foo[2] = %d %d\n", @count(foo[2]), @min(foo[2])) exit() } diff -Nru systemtap-1.4/testsuite/systemtap.maps/ix_clear.stp systemtap-1.6/testsuite/systemtap.maps/ix_clear.stp --- systemtap-1.4/testsuite/systemtap.maps/ix_clear.stp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.maps/ix_clear.stp 2011-07-25 18:12:01.000000000 +0000 @@ -4,12 +4,12 @@ probe begin { foo[1] <<< 1 - printf("foo[1] = %d %d\n", @count(foo[1]), @sum(foo[1])) + printf("foo[1] = %d %d\n", @count(foo[1]), @min(foo[1])) delete foo[1] } probe timer.ms(1000) { exit() } probe end { - printf("foo[1] = %d %d\n", @count(foo[1]), @sum(foo[1])) + printf("foo[1] = %d %d\n", @count(foo[1]), @min(foo[1])) } diff -Nru systemtap-1.4/testsuite/systemtap.printf/int1.exp systemtap-1.6/testsuite/systemtap.printf/int1.exp --- systemtap-1.4/testsuite/systemtap.printf/int1.exp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.printf/int1.exp 2011-07-25 18:12:01.000000000 +0000 @@ -3,11 +3,17 @@ 1,10,9000000000000,-1,-1024 1, 10, 9000000000000, -1, -1024 0000000000000001,0000000000000010,0009000000000000,-000000000000001,-000000000001024 +1,10,9000000000000,-1,-1024 +1,10,9000000000000,-1,-1024 +1,10,9000000000000,-1,-1024 1,10,9000000000000,18446744073709551615,18446744073709550592 1,10,9000000000000,18446744073709551615,18446744073709550592 1, 10, 9000000000000,18446744073709551615,18446744073709550592 0000000000000001,0000000000000010,0009000000000000,18446744073709551615,18446744073709550592 +1,10,9000000000000,18446744073709551615,18446744073709550592 +1,10,9000000000000,18446744073709551615,18446744073709550592 +1,10,9000000000000,18446744073709551615,18446744073709550592 1,a,82f79cd9000,ffffffffffffffff,fffffffffffffc00 1, a,82f79cd9000,ffffffffffffffff,fffffffffffffc00 @@ -15,9 +21,15 @@ 0000000000000001,000000000000000a,0000082f79cd9000,ffffffffffffffff,fffffffffffffc00 1, A, 82F79CD9000,FFFFFFFFFFFFFFFF,FFFFFFFFFFFFFC00 0000000000000001,000000000000000A,0000082F79CD9000,FFFFFFFFFFFFFFFF,FFFFFFFFFFFFFC00 +1,a,82f79cd9000,ffffffffffffffff,fffffffffffffc00 +0x1,0xa,0x82f79cd9000,0xffffffffffffffff,0xfffffffffffffc00 +0x1,0xa,0x82f79cd9000,0xffffffffffffffff,0xfffffffffffffc00 1,12,202757163310000,1777777777777777777777,1777777777777777776000 1,12,202757163310000,1777777777777777777777,1777777777777777776000 1, 12, 202757163310000,1777777777777777777777,1777777777777777776000 -0000000000000001,0000000000000012,0202757163310000,1777777777777777777777,1777777777777777776000} +0000000000000001,0000000000000012,0202757163310000,1777777777777777777777,1777777777777777776000 +1,12,202757163310000,1777777777777777777777,1777777777777777776000 +01,012,0202757163310000,01777777777777777777777,01777777777777777776000 +01,012,0202757163310000,01777777777777777777777,01777777777777777776000} stap_run2 $srcdir/$subdir/$test.stp diff -Nru systemtap-1.4/testsuite/systemtap.printf/int1.stp systemtap-1.6/testsuite/systemtap.printf/int1.stp --- systemtap-1.4/testsuite/systemtap.printf/int1.stp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.printf/int1.stp 2011-07-25 18:12:01.000000000 +0000 @@ -11,6 +11,9 @@ printf("%2d,%2d,%2d,%2d,%2d\n",i,j,k,m,n) printf("%16d,%16d,%16d,%16d,%16d\n",i,j,k,m,n) printf("%016d,%016d,%016d,%016d,%016d\n",i,j,k,m,n) + printf("%ld,%ld,%ld,%ld,%ld\n",i,j,k,m,n) + printf("%#d,%#d,%#d,%#d,%#d\n",i,j,k,m,n) + printf("%#ld,%#ld,%#ld,%#ld,%#ld\n",i,j,k,m,n) printf("\n") @@ -19,6 +22,9 @@ printf("%2u,%2u,%2u,%2u,%2u\n",i,j,k,m,n) printf("%16u,%16u,%16u,%16u,%16u\n",i,j,k,m,n) printf("%016u,%016u,%016u,%016u,%016u\n",i,j,k,m,n) + printf("%lu,%lu,%lu,%lu,%lu\n",i,j,k,m,n) + printf("%#u,%#u,%#u,%#u,%#u\n",i,j,k,m,n) + printf("%#lu,%#lu,%#lu,%#lu,%#lu\n",i,j,k,m,n) printf("\n") @@ -29,6 +35,9 @@ printf("%016x,%016x,%016x,%016x,%016x\n",i,j,k,m,n) printf("%16X,%16X,%16X,%16X,%16X\n",i,j,k,m,n) printf("%016X,%016X,%016X,%016X,%016X\n",i,j,k,m,n) + printf("%lx,%lx,%lx,%lx,%lx\n",i,j,k,m,n) + printf("%#x,%#x,%#x,%#x,%#x\n",i,j,k,m,n) + printf("%#lx,%#lx,%#lx,%#lx,%#lx\n",i,j,k,m,n) printf("\n") @@ -37,6 +46,9 @@ printf("%2o,%2o,%2o,%2o,%2o\n",i,j,k,m,n) printf("%16o,%16o,%16o,%16o,%16o\n",i,j,k,m,n) printf("%016o,%016o,%016o,%016o,%016o\n",i,j,k,m,n) + printf("%lo,%lo,%lo,%lo,%lo\n",i,j,k,m,n) + printf("%#o,%#o,%#o,%#o,%#o\n",i,j,k,m,n) + printf("%#lo,%#lo,%#lo,%#lo,%#lo\n",i,j,k,m,n) exit() } diff -Nru systemtap-1.4/testsuite/systemtap.printf/memory1.exp systemtap-1.6/testsuite/systemtap.printf/memory1.exp --- systemtap-1.4/testsuite/systemtap.printf/memory1.exp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.printf/memory1.exp 2011-07-25 18:12:01.000000000 +0000 @@ -1,3 +1,6 @@ set test "memory1" set ::result_string {Test passed} -stap_run2 $srcdir/$subdir/$test.stp + +# make sure we run some dummy workload, so the script doesn't block +# forever waiting for an open syscall +stap_run2 $srcdir/$subdir/$test.stp -w -c "/bin/sh < /dev/null" diff -Nru systemtap-1.4/testsuite/systemtap.printf/memory1.stp systemtap-1.6/testsuite/systemtap.printf/memory1.stp --- systemtap-1.4/testsuite/systemtap.printf/memory1.stp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.printf/memory1.stp 2011-07-25 18:12:01.000000000 +0000 @@ -133,3 +133,10 @@ exit(); } } + +probe timer.s(10) { + // If the script runs this long, something has gone wrong with providing + // a syscall.read-generating workload. + println ("syscall.read timeout") + exit() +} diff -Nru systemtap-1.4/testsuite/systemtap.printf/stap_merge.tcl systemtap-1.6/testsuite/systemtap.printf/stap_merge.tcl --- systemtap-1.4/testsuite/systemtap.printf/stap_merge.tcl 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.printf/stap_merge.tcl 2011-07-25 18:12:01.000000000 +0000 @@ -13,8 +13,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program. If not, see . # # Copyright (C) Red Hat Inc, 2007 # diff -Nru systemtap-1.4/testsuite/systemtap.server/client_args.exp systemtap-1.6/testsuite/systemtap.server/client_args.exp --- systemtap-1.4/testsuite/systemtap.server/client_args.exp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.server/client_args.exp 2011-07-25 18:12:01.000000000 +0000 @@ -13,19 +13,22 @@ "--unprivileged --client-options -I $srcdir/tmp" \ "--unprivileged --client-options -m test" \ "--unprivileged --client-options -R $srcdir/tmp" \ - "--unprivileged --client-options -B X=Y -D X=Y -I $srcdir/tmp -m test -R $srcdir/tmp -r [exec uname -r]" \ + "--unprivileged --client-options -k" \ + "--unprivileged --client-options -B X=Y -D X=Y -I $srcdir/tmp -m test -R $srcdir/tmp -k -r [exec uname -r]" \ "--client-options --unprivileged -B X=Y" \ "--client-options --unprivileged -D X=Y" \ "--client-options --unprivileged -I $srcdir/tmp" \ "--client-options --unprivileged -m test" \ "--client-options --unprivileged -R $srcdir/tmp" \ - "--client-options --unprivileged -B X=Y -D X=Y -I $srcdir/tmp -m test -R $srcdir/tmp -r [exec uname -r]" \ + "--client-options --unprivileged -k" \ + "--client-options --unprivileged -B X=Y -D X=Y -I $srcdir/tmp -m test -R $srcdir/tmp -k -r [exec uname -r]" \ "--client-options -B X=Y --unprivileged" \ "--client-options -D X=Y --unprivileged" \ "--client-options -I $srcdir/tmp --unprivileged" \ "--client-options -m test --unprivileged" \ "--client-options -R $srcdir/tmp --unprivileged" \ - "--client-options -B X=Y -D X=Y -I $srcdir/tmp -m test -R $srcdir/tmp -r [exec uname -r] --unprivileged" \ + "--client-options -k --unprivileged" \ + "--client-options -B X=Y -D X=Y -I $srcdir/tmp -m test -R $srcdir/tmp -k -r [exec uname -r] --unprivileged" \ "--client-options -R /path" \ "-D \"foo;bar\"" \ "-D 2=4" \ @@ -33,6 +36,7 @@ "--client-options -r /path" \ "-S /path" \ "--client-options -q" \ + "--client-options -k" \ ] foreach options $invalid_options { diff -Nru systemtap-1.4/testsuite/systemtap.server/client.exp systemtap-1.6/testsuite/systemtap.server/client.exp --- systemtap-1.4/testsuite/systemtap.server/client.exp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.server/client.exp 2011-07-25 18:12:01.000000000 +0000 @@ -32,6 +32,9 @@ incr n exp_continue } + -re {^No certificate found in database [^\r]*\r\n} { + exp_continue + } -re {^[^\r]*\r\n} { set failed 1 } @@ -196,7 +199,7 @@ # Our server should now be trusted, separate from the previously discovered # trusted servers. -list_servers "List current trusted servers" trusted +list_servers "List current trusted servers" online,trusted array unset current_trusted_servers array set current_trusted_servers [array get servers] @@ -340,7 +343,7 @@ # Our server should be trusted again, separate from the previously discovered # trusted servers. -list_servers "List current trusted servers after reinstatement by ip address" trusted +list_servers "List current trusted servers after reinstatement by ip address" online,trusted array unset current_trusted_servers array set current_trusted_servers [array get servers] @@ -414,7 +417,7 @@ # Our server should now be trusted as a signer, separate from the previously # discovered trusted signing servers. -list_servers "List current signing servers" signer +list_servers "List current signing servers" online,signer array unset current_signing_servers array set current_signing_servers [array get servers] @@ -491,20 +494,21 @@ fail $test } set test "Compile module using server" -set failed 0 +set failed 1 set module_name "" set cmd [concat stap -p4 --unprivileged $srcdir/systemtap.server/hello.stp --use-server=$host_name:$port_num] send_log "executing: $cmd\n" eval spawn $cmd expect { -timeout 150 - -re {^stap_[0-9]*\.ko\r\n} { + -re {^stap_[^ \t\r\n]*\.ko\r\n} { set module_name [string trim "$expect_out(0,string)" \r\n] + set failed 0 } + -re {^.*\r\n} { exp_continue } timeout { exec kill -INT -[exp_pid] wait - set failed 1 } } catch close @@ -514,65 +518,79 @@ send_log "'$module_name'\n" # Make sure that the module was returned +set no_module 0 set test "Module was created" +catch {exec /bin/ls $module_name $module_name.sgn} result +send_log "$result\n" if {[file exists $module_name]} { pass "$test" } else { fail "$test" + set no_module 1 } # Make sure that the module was signed +set no_signature 0 set test "Module was signed" if {[file exists $module_name.sgn]} { pass "$test" } else { fail "$test" + set no_signature 1 } # Make sure we can load the module. This will verify that the signature -# is correct and trusted. If we are not root or a member of either -# the group stapdev or stapusr, then we still won't be able to load -# the module. -set expect_failure 1 -if {$effective_pid == 0} { - set expect_failure 0 -} else { - set id_info [exec /usr/bin/id] - if {[regexp {.*\(stapdev\).*} "$id_info"]} { +# is correct and trusted. If the module was not created, or if we are not root +# or a member of the groups stapdev and stapusr, then we still won't be +# able to load the module. If there is no signature, then being a member of +# stapuse won't help. +if {$no_module == 0} { + set expect_failure 1 + if {$effective_pid == 0} { set expect_failure 0 - } elseif {[regexp {.*\(stapusr\).*} "$id_info"]} { - if {$effective_pid != 0} { - set expect_failure 0 - } - } -} -if {$expect_failure} { - setup_xfail *-*-* -} -set test "Load and run signed module when trusted" -set failed 1 -set cmd [concat staprun $module_name] -send_log "executing: $cmd\n" -eval spawn $cmd -expect { - -timeout 150 - -re {^Hello From Server\r\n} { - set failed 0 + } else { + set id_info [exec /usr/bin/id] + if {[regexp {.*\(stapusr\).*} "$id_info"]} { + if {[regexp {.*\(stapdev\).*} "$id_info"]} { + set expect_failure 0 + } else { + if {$no_signature == 0} { + set expect_failure 0 + } + } + } } - timeout { - exec kill -INT -[exp_pid] - wait - set failed 1 + if {$expect_failure} { + setup_xfail *-*-* } } -catch close -if {$failed == 0} { - pass "$test" +set test "Load and run signed module when trusted" +if {$no_module == 1} { + untested "$test" } else { - fail "$test" + set failed 1 + set cmd [concat staprun $module_name] + send_log "executing: $cmd\n" + eval spawn $cmd + expect { + -timeout 150 + -re {^Hello From Server\r\n} { + set failed 0 + } + timeout { + exec kill -INT -[exp_pid] + wait + set failed 1 + } + } + catch close + if {$failed == 0} { + pass "$test" + } else { + fail "$test" + } } - # Revoke trust in our server as a module signer. This must be done as root. # Specify the server by certificate serial number so that we don't accidentally # revoke trust in a previously trusted server. @@ -609,40 +627,48 @@ # Since our server is no longer a trusted signer, attempting # to load and run the module now should fail unless we -# are root or a member of the group stapdev. -set expect_failure 1 -if {[exec /usr/bin/id -u] == 0} { - set expect_failure 0 -} else { - if {[regexp {.*\(stapdev\).*} "$id_info"]} { +# are root or a member of the groups stapdev and stapusr. +if {$no_module == 0} { + set expect_failure 1 + if {[exec /usr/bin/id -u] == 0} { set expect_failure 0 + } else { + if {[regexp {.*\(stapdev\).*} "$id_info"]} { + if {[regexp {.*\(stapusr\).*} "$id_info"]} { + set expect_failure 0 + } + } + } + if {$expect_failure} { + setup_xfail *-*-* } -} -if {$expect_failure} { - setup_xfail *-*-* } set test "Load and run signed module when not trusted" -set failed 1 -set cmd [concat staprun $module_name] -send_log "executing: $cmd\n" -eval spawn $cmd -expect { - -timeout 150 - -re {^Hello From Server\r\n} { - set failed 0 +if {$no_module == 1} { + untested "$test" +} else { + set failed 1 + set cmd [concat staprun $module_name] + send_log "executing: $cmd\n" + eval spawn $cmd + expect { + -timeout 150 + -re {^Hello From Server\r\n} { + set failed 0 + } + timeout { + exec kill -INT -[exp_pid] + wait + set failed 1 + } } - timeout { - exec kill -INT -[exp_pid] - wait - set failed 1 + catch close + if {$failed == 0} { + pass "$test" + } else { + fail "$test" } } -catch close -if {$failed == 0} { - pass "$test" -} else { - fail "$test" -} # Shutdown the server we started shutdown_server diff -Nru systemtap-1.4/testsuite/systemtap.server/server_args.exp systemtap-1.6/testsuite/systemtap.server/server_args.exp --- systemtap-1.4/testsuite/systemtap.server/server_args.exp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.server/server_args.exp 2011-07-25 18:12:01.000000000 +0000 @@ -24,6 +24,38 @@ regsub -all "\[\"\\\\;\]" $options {\\\0} options regsub -all "\[\n\]" $options {\\n} options + # If the options contain -I/ or the equivalent, then the client will balk. + # So test that the client balks. + if {[regexp "\-I */$" $options] || [regexp "\-I */ " $options]} { + set passed 0 + set fallthrough 0 + set cmd [concat stap $options --use-server] + send_log "executing: $cmd\n" + eval spawn $cmd + expect { + -timeout 150 + -re {^Unable to send / to the server\r\n} { + set passed 1 + } + # Some other options can cause errors which occur before the one for -I/. + # If one of these errors occurs, then fall through to the normal test. + -re {^ERROR: Safety pattern mismatch for -D parameter .*\r\n} { + set fallthrough 1 + } + -re {^.*\r\n} { exp_continue } + timeout { + exec kill -INT -[exp_pid] + wait + } + } + catch close + if { $fallthrough == 0 } { + return $passed + } + } + + # Otherwise, check the that output from compiling directly and using + # the client/server are reasonable similar. verbose -log "eval exec $stap $options" catch {eval exec $stap $options} res_stap verbose -log $res_stap @@ -142,6 +174,12 @@ "-p1 -I285v7pl -eo5\\0 -D86s -c-c*v" \ "-l syscall.open* -- -p5" \ "-l syscall.open* -- -rfoo" \ + "-p1 -I/ 1\\nbzg3 -ebf -Do -ckrll=\\;oh -\S4" \ + "-p1 -I / 1\\nbzg3 -ebf -Do -ckrll=\\;oh -\S4" \ + "-p1 1\\nbzg3 -ebf -Do -ckrll=\\;oh -\S4 -I/" \ + "-p1 1\\nbzg3 -ebf -Do -ckrll=\\;oh -\S4 -I /" \ + "-p1 -I -e\\;/ -Dhn6 -cejijqmi0 -S3-k -" \ + "-p1 -I/ -e/ -D -c\\n1v\\;nd8 -S--" \ ] set i 0 diff -Nru systemtap-1.4/testsuite/systemtap.server/server_locale.exp systemtap-1.6/testsuite/systemtap.server/server_locale.exp --- systemtap-1.4/testsuite/systemtap.server/server_locale.exp 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.server/server_locale.exp 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,833 @@ +########### Startup Server ############# +# Don't attempt these tests if the client/server are not available +# Start a systemtap server, if one is not already started. +if {! [use_server_p]} then { + if {! [setup_server]} then { + untested "Server Tests" + return + } +} +###################################################### +################# General Tests ###################### +###################################################### + +###### Embedded '\n' in Environment Variables ######## +# Should not allow embedded '\n' in Environment Variables +set test "Embedded '\\n' in Env Vars" + +set failed 1 +set cmd [concat env \"LANG=en_US\\n.utf8\" stap -e \{probe begin\{printf\(\"Hello\\n\"\)\; exit\(\)\;\}\} --use-server] +send_log "executing: $cmd\n" +eval spawn $cmd +expect { + -timeout 150 + -re {^Server: Localization key '.utf8' not found in global list\r\n} { + set failed 0 + exp_continue + } + -re {^Hello\r\n} { + exp_continue + } + -re {^[^\r\n]*\r\n} { + set failed 1 + } + timeout { + exec kill -INT -[exp_pid] + wait + set failed 1 + } +} +catch close +if {$failed != 0} { + fail "$test" + } else { + pass "$test" +} + + + +###### Embedded ';' in Environment Variables ######## +# Should not allow embedded ';' in Environment Variables +# There are many disallowed chars, but let's just try one +set test "Embedded ';' in Env Vars" + +set failed 1 +set cmd [concat env \"LANG=en_US\;.utf8\" stap -e \{probe begin\{printf\(\"Hello\\n\"\)\; exit\(\)\;\}\} --use-server] +send_log "executing: $cmd\n" +eval spawn $cmd +expect { + -timeout 150 + -re "^Server: Localization value '\[^'\]*' contains illegal characters\r\n" { + # good, it was not passed through + set failed 0 + exp_continue + } + -re {^Hello\r\n} { + exp_continue + } + -re {^[^\r\n]*\r\n} { + set failed 1 + } + timeout { + exec kill -INT -[exp_pid] + wait + set failed 1 + } +} +catch close +if {$failed != 0} { + fail "$test" + } else { + pass "$test" +} + + + +###### Use of "_.-@=" in Environment Variables ######## +# Should allow "_.-@=" in Environment Variables +set test "Use of '_.-@=' in Env Vars" + +set failed 0 +set cmd [concat env LANG=en_US.utf-8@toronto=test stap -e \{probe begin\{printf\(\"Hello\\n\"\)\; exit\(\)\;\}\} --use-server] +send_log "executing: $cmd\n" +eval spawn $cmd +expect { + -timeout 150 + -re "^Hello\r\n" { + exp_continue + } + -re {^[^\r\n]*\r\n} { + set failed 1 + } + timeout { + exec kill -INT -[exp_pid] + wait + set failed 1 + } +} +catch close +if {$failed != 0} { + fail "$test" + } else { + pass "$test" +} + + +###################################################### +################### LANG TESTS ####################### +###################################################### + +########### LANG Proper Syntax Test (French) ############## +#Run a basic execution test in French. Should return only "Bonjour". +set test "LANG Proper Syntax Test (French)" + +set failed 0 +set cmd [concat env LANG=fr_FR.utf8 stap -e \{probe begin\{printf\(\"Bonjour\\n\"\)\; exit\(\)\;\}\} --use-server] +send_log "executing: $cmd\n" +eval spawn $cmd +expect { + -timeout 150 + -re "^Bonjour\r\n" { + exp_continue + } + -re {^[^\r\n]*\r\n} { + set failed 1 + } + timeout { + exec kill -INT -[exp_pid] + wait + set failed 1 + } +} +catch close +if {$failed != 0} { + fail "$test" + } else { + pass "$test" +} + + +########### LANG Proper Syntax Test (English) ############# +#Run a basic execution test in English. Should return only "Hello". +set test "LANG Proper Syntax Test (English)" + +set failed 0 +set cmd [concat env LANG=en_US.utf8 stap -e \{probe begin\{printf\(\"Hello\\n\"\)\; exit\(\)\;\}\} --use-server] +send_log "executing: $cmd\n" +eval spawn $cmd +expect { + -timeout 150 + -re "^Hello\r\n" { + exp_continue + } + -re {^[^\r\n]*\r\n} { + set failed 1 + } + timeout { + exec kill -INT -[exp_pid] + wait + set failed 1 + } +} +catch close +if {$failed != 0} { + fail "$test" + } else { + pass "$test" +} + +########### LANG Bad Syntax Test (French) ############# +# Run an execution test with a syntax error, in French. +set test "LANG Bad Syntax Test (French)" + +set failed 0 +set cmd [concat env LANG=fr_FR.utf8 stap -e \{probe begin\{printf\(\"Bonjour\)\; exit\(\)\;\}\} --use-server] +send_log "executing: $cmd\n" +eval spawn $cmd +expect { + -timeout 150 + -re {^No module was returned by the server.\r\n} { + exp_continue + } + -re {^Aucun module a été renvoyé par le serveur\r\n} { + exp_continue + } + -re {^erreur d'analyse syntaxique : Ne peut trouver la guillemet fermante\r\n} { + exp_continue + } + -re {^[ \t]*à : string 'Bonjour\); exit\(\);\}' at :1:20\r\n} { + exp_continue + } + -re {^[ \t]*source : probe begin\{printf\("Bonjour\); exit\(\);\}\r\n} { + exp_continue + } + -re {^[ \t]*\^\r\n} { + exp_continue + } + -re {^1 erreur d'analyse\.\r\n} { + exp_continue + } + -re {^Passe 1 : échec de l'analyse syntaxique\. Essayez encore avec une option '--vp 1' supplémentaire\.\r\n} { + exp_continue + } + -re {^Passes: via server failed. Try again with another '-v' option.\r\n} { + exp_continue + } + -re {^[^\r\n]*\r\n} { + set failed 1 + } + timeout { + exec kill -INT -[exp_pid] + wait + set failed 1 + } +} +catch close +if {$failed != 0} { + fail "$test" + } else { + pass "$test" +} + +########### LANG Bad Syntax Test (English) ############# +# Run an execution test with a syntax error, in English. +set test "LANG Bad Syntax Test (English)" + +set failed 0 +set cmd [concat env LANG=en_US.utf8 stap -e \{probe begin\{printf\(\"Hello\)\; exit\(\)\;\}\} --use-server] +send_log "executing: $cmd\n" +eval spawn $cmd +expect { + -timeout 150 + -re {^No module was returned by the server.\r\n} { + exp_continue + } + -re {^parse error: Could not find matching closing quote\r\n} { + exp_continue + } + -re {^[ \t]*at: string 'Hello\); exit\(\);\}' at :1:20\r\n} { + exp_continue + } + -re {^[ \t]*source: probe begin\{printf\("Hello\); exit\(\);\}\r\n} { + exp_continue + } + -re {^[ \t]*\^\r\n} { + exp_continue + } + -re {^1 parse error\.\r\n} { + exp_continue + } + -re {^Pass 1: parse failed\. Try again with another '--vp 1' option\.\r\n} { + exp_continue + } + -re {^Passes: via server failed. Try again with another '-v' option.\r\n} { + exp_continue + } + -re {^[^\r\n]*\r\n} { + set failed 1 + } + timeout { + exec kill -INT -[exp_pid] + wait + set failed 1 + } +} +catch close +if {$failed != 0} { + fail "$test" + } else { + pass "$test" +} + +########### LANG Proper Syntax Test (French, -k) ############# +#Run a basic execution test in French with -k. +set test "LANG Proper Syntax Test (French, -k)" + +set failed 0 +set cmd [concat env LANG=fr_FR.utf8 stap -e \{probe begin\{printf\(\"Bonjour\\n\"\)\; exit\(\)\;\}\} --use-server -k] +send_log "executing: $cmd\n" +eval spawn $cmd +expect { + -timeout 150 + -re "^Bonjour\r\n" { + exp_continue + } + -re {^Conservation du répertoire temporaire "/tmp/stap......"\r\n} { + exp_continue + } + -re {^[^\r\n]*\r\n} { + set failed 1 + } + timeout { + exec kill -INT -[exp_pid] + wait + set failed 1 + } +} +catch close +if {$failed != 0} { + fail "$test" + } else { + pass "$test" +} + +########### LANG Proper Syntax Test (English, -k) ############# +#Run a basic execution test in English with -k. +set test "LANG Proper Syntax Test (English, -k)" + +set failed 0 +set cmd [concat env LANG=en_US.utf8 stap -e \{probe begin\{printf\(\"Hello\\n\"\)\; exit\(\)\;\}\} --use-server -k] +send_log "executing: $cmd\n" +eval spawn $cmd +expect { + -timeout 150 + -re "^Hello\r\n" { + exp_continue + } + -re {^Keeping temporary directory "/tmp/stap......"\r\n} { + exp_continue + } + -re {^[^\r\n]*\r\n} { + set failed 1 + } + timeout { + exec kill -INT -[exp_pid] + wait + set failed 1 + } +} +catch close +if {$failed != 0} { + fail "$test" + } else { + pass "$test" +} + +########### LANG Bad Syntax Test (French, -k) ############# +# Run an execution test with a syntax error, in French, with -k. +set test "LANG Bad Syntax Test (French, -k)" + +set failed 0 +set cmd [concat env LANG=fr_FR.utf8 stap -e \{probe begin\{printf\(\"Bonjour\)\; exit\(\)\;\}\} --use-server -k] +send_log "executing: $cmd\n" +eval spawn $cmd +expect { + -timeout 150 + -re {^No module was returned by the server.\r\n} { + exp_continue + } + -re {^Aucun module a été renvoyé par le serveur\r\n} { + exp_continue + } + -re {^erreur d'analyse syntaxique : Ne peut trouver la guillemet fermante\r\n} { + exp_continue + } + -re {^[ \t]*à : string 'Bonjour\); exit\(\);\}' at :1:20\r\n} { + + exp_continue + } + -re {^[ \t]*source : probe begin\{printf\("Bonjour\); exit\(\);\}\r\n} { + + exp_continue + } + -re {^[ \t]*\^\r\n} { + exp_continue + } + -re {^1 erreur d'analyse\.\r\n} { + exp_continue + } + -re {^Passe 1 : échec de l'analyse syntaxique\. Essayez encore avec une option '--vp 1' supplémentaire\.\r\n} { + exp_continue + } + -re {^Conservation du répertoire temporaire "/tmp/stap......"\r\n} { + exp_continue + } + -re {^Passes: via server failed. Try again with another '-v' option.\r\n} { + exp_continue + } + -re {^[^\r\n]*\r\n} { + set failed 1 + } + timeout { + exec kill -INT -[exp_pid] + wait + set failed 1 + } +} +catch close +if {$failed != 0} { + fail "$test" + } else { + pass "$test" +} + +########### LANG Bad Syntax Test (English, -k) ############# +# Run an execution test with a syntax error, in English, with -k. +set test "LANG Bad Syntax Test (English, -k)" + +set failed 0 +set cmd [concat env LANG=en_US.utf8 stap -e \{probe begin\{printf\(\"Hello\)\; exit\(\)\;\}\} --use-server -k] +send_log "executing: $cmd\n" +eval spawn $cmd +expect { + -timeout 150 + -re {^No module was returned by the server.\r\n} { + exp_continue + } + -re {^parse error: Could not find matching closing quote\r\n} { + exp_continue + } + -re {^[ \t]*at: string 'Hello\); exit\(\);\}' at :1:20\r\n} { + exp_continue + } + -re {^[ \t]*source: probe begin\{printf\("Hello\); exit\(\);\}\r\n} { + exp_continue + } + -re {^[ \t]*\^\r\n} { + exp_continue + } + -re {^1 parse error\.\r\n} { + exp_continue + } + -re {^Pass 1: parse failed\. Try again with another '--vp 1' option\.\r\n} { + exp_continue + } + -re {^Passes: via server failed. Try again with another '-v' option.\r\n} { + exp_continue + } + -re {^Keeping temporary directory "/tmp/stap......"\r\n} { + exp_continue + } + -re {^[^\r\n]*\r\n} { + set failed 1 + } + timeout { + exec kill -INT -[exp_pid] + wait + set failed 1 + } +} +catch close +if {$failed != 0} { + fail "$test" + } else { + pass "$test" +} + +###################################################### +################## LC_ALL Tests ###################### +###################################################### + +########### LC_ALL Proper Syntax Test (French) ############## +#Run a basic execution test in French. Should return only "Bonjour". +set test "LC_ALL Proper Syntax Test (French)" + +set failed 0 +set cmd [concat env LC_ALL=fr_FR.utf8 stap -e \{probe begin\{printf\(\"Bonjour\\n\"\)\; exit\(\)\;\}\} --use-server] +send_log "executing: $cmd\n" +eval spawn $cmd +expect { + -timeout 150 + -re "^Bonjour\r\n" { + exp_continue + } + -re {^[^\r\n]*\r\n} { + set failed 1 + } + timeout { + exec kill -INT -[exp_pid] + wait + set failed 1 + } +} +catch close +if {$failed != 0} { + fail "$test" + } else { + pass "$test" +} + +########### LC_ALL Proper Syntax Test (English) ############# +#Run a basic execution test in English. Should return only "Hello". +set test "LC_ALL Proper Syntax Test (English)" + +set failed 0 +set cmd [concat env LC_ALL=en_US.utf8 stap -e \{probe begin\{printf\(\"Hello\\n\"\)\; exit\(\)\;\}\} --use-server] +send_log "executing: $cmd\n" +eval spawn $cmd +expect { + -timeout 150 + -re "^Hello\r\n" { + exp_continue + } + -re {^[^\r\n]*\r\n} { + set failed 1 + } + timeout { + exec kill -INT -[exp_pid] + wait + set failed 1 + } +} +catch close +if {$failed != 0} { + fail "$test" + } else { + pass "$test" +} + +########### LC_ALL Bad Syntax Test (French) ############# +# Run an execution test with a syntax error, in French. +set test "LC_ALL Bad Syntax Test (French)" + +set failed 0 +set cmd [concat env LC_ALL=fr_FR.utf8 stap -e \{probe begin\{printf\(\"Bonjour\)\; exit\(\)\;\}\} --use-server] +send_log "executing: $cmd\n" +eval spawn $cmd +expect { + -timeout 150 + -re {^No module was returned by the server.\r\n} { + exp_continue + } + -re {^Aucun module a été renvoyé par le serveur\r\n} { + exp_continue + } + -re {^erreur d'analyse syntaxique : Ne peut trouver la guillemet fermante\r\n} { + exp_continue + } + -re {^[ \t]*à : string 'Bonjour\); exit\(\);\}' at :1:20\r\n} { + exp_continue + } + -re {^[ \t]*source : probe begin\{printf\("Bonjour\); exit\(\);\}\r\n} { + exp_continue + } + -re {^[ \t]*\^\r\n} { + exp_continue + } + -re {^1 erreur d'analyse\.\r\n} { + exp_continue + } + -re {^Passe 1 : échec de l'analyse syntaxique\. Essayez encore avec une option '--vp 1' supplémentaire\.\r\n} { + exp_continue + } + -re {^Passes: via server failed. Try again with another '-v' option.\r\n} { + exp_continue + } + -re {^[^\r\n]*\r\n} { + set failed 1 + } + timeout { + exec kill -INT -[exp_pid] + wait + set failed 1 + } +} +catch close +if {$failed != 0} { + fail "$test" + } else { + pass "$test" +} + +########### LC_ALL Bad Syntax Test (English) ############# +# Run an execution test with a syntax error, in English. +set test "LC_ALL Bad Syntax Test (English)" + +set failed 0 +set cmd [concat env LC_ALL=en_US.utf8 stap -e \{probe begin\{printf\(\"Hello\)\; exit\(\)\;\}\} --use-server] +send_log "executing: $cmd\n" +eval spawn $cmd +expect { + -timeout 150 + -re {^No module was returned by the server.\r\n} { + exp_continue + } + -re {^parse error: Could not find matching closing quote\r\n} { + exp_continue + } + -re {^[ \t]*at: string 'Hello\); exit\(\);\}' at :1:20\r\n} { + exp_continue + } + -re {^[ \t]*source: probe begin\{printf\("Hello\); exit\(\);\}\r\n} { + exp_continue + } + -re {^[ \t]*\^\r\n} { + exp_continue + } + -re {^1 parse error\.\r\n} { + exp_continue + } + -re {^Pass 1: parse failed\. Try again with another '--vp 1' option\.\r\n} { + exp_continue + } + -re {^Passes: via server failed. Try again with another '-v' option.\r\n} { + exp_continue + } + -re {^[^\r\n]*\r\n} { + set failed 1 + } + timeout { + exec kill -INT -[exp_pid] + wait + set failed 1 + } +} +catch close +if {$failed != 0} { + fail "$test" + } else { + pass "$test" +} + +########### LC_ALL Proper Syntax Test (French, -k) ############# +#Run a basic execution test in French with -k. +set test "LC_ALL Proper Syntax Test (French, -k)" + +set failed 0 +set cmd [concat env LC_ALL=fr_FR.utf8 stap -e \{probe begin\{printf\(\"Bonjour\\n\"\)\; exit\(\)\;\}\} --use-server -k] +send_log "executing: $cmd\n" +eval spawn $cmd +expect { + -timeout 150 + -re "^Bonjour\r\n" { + exp_continue + } + -re {^Conservation du répertoire temporaire "/tmp/stap......"\r\n} { + exp_continue + } + -re {^[^\r\n]*\r\n} { + set failed 1 + } + timeout { + exec kill -INT -[exp_pid] + wait + set failed 1 + } +} +catch close +if {$failed != 0} { + fail "$test" + } else { + pass "$test" +} + + +########### LC_ALL Proper Syntax Test (English, -k) ############# +#Run a basic execution test in English with -k. +set test "LC_ALL Proper Syntax Test (English, -k)" + +set failed 0 +set cmd [concat env LC_ALL=en_US.utf8 stap -e \{probe begin\{printf\(\"Hello\\n\"\)\; exit\(\)\;\}\} --use-server -k] +send_log "executing: $cmd\n" +eval spawn $cmd +expect { + -timeout 150 + -re "^Hello\r\n" { + exp_continue + } + -re {^Keeping temporary directory "/tmp/stap......"\r\n} { + exp_continue + } + -re {^[^\r\n]*\r\n} { + set failed 1 + } + timeout { + exec kill -INT -[exp_pid] + wait + set failed 1 + } +} +catch close +if {$failed != 0} { + fail "$test" + } else { + pass "$test" +} + +########### LC_ALL Bad Syntax Test (French, -k) ############# +# Run an execution test with a syntax error, in French, with -k. +set test "LC_ALL Bad Syntax Test (French, -k)" + +set failed 0 +set cmd [concat env LC_ALL=fr_FR.utf8 stap -e \{probe begin\{printf\(\"Bonjour\)\; exit\(\)\;\}\} --use-server -k] +send_log "executing: $cmd\n" +eval spawn $cmd +expect { + -timeout 150 + -re {^No module was returned by the server.\r\n} { + exp_continue + } + -re {^Aucun module a été renvoyé par le serveur\r\n} { + exp_continue + } + -re {^erreur d'analyse syntaxique : Ne peut trouver la guillemet fermante\r\n} { + exp_continue + } + -re {^[ \t]*à : string 'Bonjour\); exit\(\);\}' at :1:20\r\n} { + + exp_continue + } + -re {^[ \t]*source : probe begin\{printf\("Bonjour\); exit\(\);\}\r\n} { + + exp_continue + } + -re {^[ \t]*\^\r\n} { + exp_continue + } + -re {^1 erreur d'analyse\.\r\n} { + exp_continue + } + -re {^Passe 1 : échec de l'analyse syntaxique\. Essayez encore avec une option '--vp 1' supplémentaire\.\r\n} { + exp_continue + } + -re {^Passes: via server failed. Try again with another '-v' option.\r\n} { + exp_continue + } + -re {^Conservation du répertoire temporaire "/tmp/stap......"\r\n} { + exp_continue + } + -re {^[^\r\n]*\r\n} { + set failed 1 + } + timeout { + exec kill -INT -[exp_pid] + wait + set failed 1 + } +} +catch close +if {$failed != 0} { + fail "$test" + } else { + pass "$test" +} + + +########### LC_ALL Bad Syntax Test (English, -k) ############# +# Run an execution test with a syntax error, in English, with -k. +set test "LC_ALL Bad Syntax Test (English, -k)" + +set failed 0 +set cmd [concat env LC_ALL=en_US.utf8 stap -e \{probe begin\{printf\(\"Hello\)\; exit\(\)\;\}\} --use-server -k] +send_log "executing: $cmd\n" +eval spawn $cmd +expect { + -timeout 150 + -re {^No module was returned by the server.\r\n} { + exp_continue + } + -re {^parse error: Could not find matching closing quote\r\n} { + exp_continue + } + -re {^[ \t]*at: string 'Hello\); exit\(\);\}' at :1:20\r\n} { + exp_continue + } + -re {^[ \t]*source: probe begin\{printf\("Hello\); exit\(\);\}\r\n} { + exp_continue + } + -re {^[ \t]*\^\r\n} { + exp_continue + } + -re {^1 parse error\.\r\n} { + exp_continue + } + -re {^Pass 1: parse failed\. Try again with another '--vp 1' option\.\r\n} { + exp_continue + } + -re {^Passes: via server failed. Try again with another '-v' option.\r\n} { + exp_continue + } + -re {^Keeping temporary directory "/tmp/stap......"\r\n} { + exp_continue + } + -re {^[^\r\n]*\r\n} { + set failed 1 + } + timeout { + exec kill -INT -[exp_pid] + wait + set failed 1 + } +} +catch close +if {$failed != 0} { + fail "$test" + } else { + pass "$test" +} + +###################################################### +################ LC_CTYPE Tests ###################### +###################################################### +# NOT YET TESTED - NO APPARENT EFFECT + +###################################################### +############### LC_COLLATE Tests ##################### +###################################################### +# NOT YET TESTED - NO APPARENT EFFECT + +###################################################### +############## LC_MESSAGES Tests ##################### +###################################################### +# NOT YET TESTED - NO APPARENT EFFECT + +###################################################### +################# LC_TIME Tests ###################### +###################################################### +# NOT YET TESTED - NO APPARENT EFFECT + +###################################################### +############### LC_MONETARY Tests #################### +###################################################### +# NOT YET TESTED - NO APPARENT EFFECT + +###################################################### +################ LC_NUMERIC Tests #################### +###################################################### +# NOT YET TESTED - NO APPARENT EFFECT + +########### Shutdown Server ############# +# Shudown the server, if we started it. +if {! [use_server_p]} then { + shutdown_server +} diff -Nru systemtap-1.4/testsuite/systemtap.stress/conversions.exp systemtap-1.6/testsuite/systemtap.stress/conversions.exp --- systemtap-1.4/testsuite/systemtap.stress/conversions.exp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.stress/conversions.exp 2011-07-25 18:12:01.000000000 +0000 @@ -7,7 +7,8 @@ if {[istarget ia64-*-*] && $value == 0xffffffffffffffff } { set value 0xafffffffffffffff } set test "conversions.stp $value" if {![installtest_p]} { untested $test; continue } - spawn stap -DMAXERRORS=40 $file $value + # Turn off the duplication elimination to get an accurate count (PR12168) + spawn stap -vv -DMAXERRORS=40 $file $value set errs 0 verbose -log "exp $test $errs" expect { diff -Nru systemtap-1.4/testsuite/systemtap.syscall/.cvsignore systemtap-1.6/testsuite/systemtap.syscall/.cvsignore --- systemtap-1.4/testsuite/systemtap.syscall/.cvsignore 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.syscall/.cvsignore 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -access acct alarm chmod clock dir forkwait itimer link mmap mount net1 -openclose readwrite rt_signal sendfile signal stat statfs swap sync -timer trunc uid uid16 umask unlink diff -Nru systemtap-1.4/testsuite/systemtap.syscall/rt_signal.c systemtap-1.6/testsuite/systemtap.syscall/rt_signal.c --- systemtap-1.4/testsuite/systemtap.syscall/rt_signal.c 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.syscall/rt_signal.c 2011-07-25 18:12:01.000000000 +0000 @@ -3,7 +3,7 @@ #include #include #include - +#include static void sig_act_handler(int signo) @@ -26,6 +26,7 @@ sigprocmask(SIG_UNBLOCK, &mask, NULL); //staptest// rt_sigprocmask (SIG_UNBLOCK, \[SIGUSR1\], 0x[0]+, 8) = 0 + memset(&sa, 0, sizeof(sa)); sa.sa_handler = SIG_IGN; sigemptyset(&sa.sa_mask); sigaddset(&sa.sa_mask, SIGALRM); diff -Nru systemtap-1.4/testsuite/systemtap.syscall/signal.c systemtap-1.6/testsuite/systemtap.syscall/signal.c --- systemtap-1.4/testsuite/systemtap.syscall/signal.c 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.syscall/signal.c 2011-07-25 18:12:01.000000000 +0000 @@ -32,11 +32,21 @@ #ifdef SYS_sigprocmask syscall (SYS_sigprocmask, SIG_BLOCK, &mask, NULL); + /* sigprocmask is unimplemented on powerpc64 */ +#ifdef __powerpc64__ + //staptest// ni_syscall () = -38 (ENOSYS) +#else //staptest// sigprocmask (SIG_BLOCK, XXXX, 0x0+) = 0 +#endif syscall (SYS_sigprocmask, SIG_UNBLOCK, &mask, NULL); + /* sigprocmask is unimplemented on powerpc64 */ +#ifdef __powerpc64__ + //staptest// ni_syscall () = -38 (ENOSYS) +#else //staptest// sigprocmask (SIG_UNBLOCK, XXXX, 0x0+) = 0 #endif +#endif memset(&sa, 0, sizeof(sa)); sigfillset(&sa.sa_mask); @@ -44,8 +54,13 @@ #ifdef SYS_sigaction syscall (SYS_sigaction, SIGUSR1, &sa, NULL); + /* sigaction is unimplemented on powerpc64 */ +#ifdef __powerpc64__ + //staptest// ni_syscall () = -38 (ENOSYS) +#else //staptest// sigaction (SIGUSR1, {SIG_IGN}, 0x0+) = 0 - #endif +#endif +#endif #ifdef SYS_tgkill syscall(SYS_tgkill, 1234, 5678, 0); diff -Nru systemtap-1.4/testsuite/systemtap.unprivileged/foo.c systemtap-1.6/testsuite/systemtap.unprivileged/foo.c --- systemtap-1.4/testsuite/systemtap.unprivileged/foo.c 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.unprivileged/foo.c 2011-07-25 18:12:01.000000000 +0000 @@ -4,4 +4,5 @@ main () { bar (); + return 0; } diff -Nru systemtap-1.4/testsuite/systemtap.unprivileged/unprivilegedko/five.stp systemtap-1.6/testsuite/systemtap.unprivileged/unprivilegedko/five.stp --- systemtap-1.4/testsuite/systemtap.unprivileged/unprivilegedko/five.stp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.unprivileged/unprivilegedko/five.stp 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -#! /bin/sh - -# This probe should not be acceptable to pass-2 -stap --unprivileged -p2 -e 'probe kernel.mark("*").format("*") { }' diff -Nru systemtap-1.4/testsuite/systemtap.unprivileged/unprivilegedko/four.stp systemtap-1.6/testsuite/systemtap.unprivileged/unprivilegedko/four.stp --- systemtap-1.4/testsuite/systemtap.unprivileged/unprivilegedko/four.stp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.unprivileged/unprivilegedko/four.stp 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -#! /bin/sh - -# This probe should not be acceptable to pass-2 -stap --unprivileged -p2 -e 'probe kernel.mark("*") {}' \ No newline at end of file diff -Nru systemtap-1.4/testsuite/systemtap.unprivileged/unprivilegedko/one.stp systemtap-1.6/testsuite/systemtap.unprivileged/unprivilegedko/one.stp --- systemtap-1.4/testsuite/systemtap.unprivileged/unprivilegedko/one.stp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.unprivileged/unprivilegedko/one.stp 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -#! /bin/sh - -# This probe should not be acceptable to pass-2 -stap --unprivileged -p2 -e 'probe kernel.function("sys_open") { }' diff -Nru systemtap-1.4/testsuite/systemtap.unprivileged/unprivilegedko/three.stp systemtap-1.6/testsuite/systemtap.unprivileged/unprivilegedko/three.stp --- systemtap-1.4/testsuite/systemtap.unprivileged/unprivilegedko/three.stp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.unprivileged/unprivilegedko/three.stp 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -#! /bin/sh - -# This probe should not be acceptable to pass-2 -stap --unprivileged -p2 -e 'probe module("*scsi*").function("*") { }' diff -Nru systemtap-1.4/testsuite/systemtap.unprivileged/unprivilegedko/two.stp systemtap-1.6/testsuite/systemtap.unprivileged/unprivilegedko/two.stp --- systemtap-1.4/testsuite/systemtap.unprivileged/unprivilegedko/two.stp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.unprivileged/unprivilegedko/two.stp 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -#! /bin/sh - -# This probe should not be acceptable to pass-2 -stap --unprivileged -p2 -e 'probe kernel.trace("*") {}' \ No newline at end of file diff -Nru systemtap-1.4/testsuite/systemtap.unprivileged/unprivilegedko.exp systemtap-1.6/testsuite/systemtap.unprivileged/unprivilegedko.exp --- systemtap-1.4/testsuite/systemtap.unprivileged/unprivilegedko.exp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.unprivileged/unprivilegedko.exp 2011-07-25 18:12:01.000000000 +0000 @@ -1,13 +1,23 @@ -set self unprivilegedko -foreach file [lsort [glob -nocomplain $srcdir/systemtap.unprivileged/$self/*.stp]] { - set test $self/[file tail $file] - verbose -log "Running $file" - set rc [stap_run_batch $file] - if {$rc < 0} { - # crashed - fail $test +set test unprivilegedko + +# These probes should not be acceptable to pass 2 +set invalid_probes [list \ + {kernel.function("sys_read") {}} \ + {kernel.trace("*") {}} \ + {module("*scsi*").function("*") {}} \ + {kernel.mark("*") {}} \ + {kernel.mark("*").format("*") {}} \ +] + +set error_regexp ".*semantic error: probe point is not allowed for unprivileged users.*" +foreach probe $invalid_probes { + set cmd [list stap --unprivileged -p2 -e "probe $probe" ] + verbose -log "eval exec $cmd" + catch {eval exec $cmd} res_stap + verbose -log $res_stap + if {[regexp $error_regexp $res_stap]} { + pass "$test: $probe" } else { - setup_xfail *-*-* - if {$rc == 0} { pass $test } else { fail $test } + fail "$test: $probe" } } diff -Nru systemtap-1.4/testsuite/systemtap.unprivileged/unprivilegedok/one.stp systemtap-1.6/testsuite/systemtap.unprivileged/unprivilegedok/one.stp --- systemtap-1.4/testsuite/systemtap.unprivileged/unprivilegedok/one.stp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.unprivileged/unprivilegedok/one.stp 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -#! /bin/sh - -# This probe should be ok -stap --unprivileged -p2 -t -e 'probe %(CONFIG_UTRACE=="y" %? process("foo").function("bar").call %: never %) { }' -c ./foo diff -Nru systemtap-1.4/testsuite/systemtap.unprivileged/unprivilegedok.exp systemtap-1.6/testsuite/systemtap.unprivileged/unprivilegedok.exp --- systemtap-1.4/testsuite/systemtap.unprivileged/unprivilegedok.exp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/systemtap.unprivileged/unprivilegedok.exp 2011-07-25 18:12:01.000000000 +0000 @@ -1,15 +1,27 @@ -set self unprivilegedok +set test unprivilegedok # Need to build a user application catch {exec gcc -g -o foo $srcdir/systemtap.unprivileged/foo.c} err -if {$err == "" && [file exists foo]} then { pass "$self compile" } else { fail "$self compile: $err" } +if {$err == "" && [file exists foo]} then { pass "$test compile" } else { fail "$test compile: $err" } -# Now run the tests -foreach file [lsort [glob -nocomplain $srcdir/systemtap.unprivileged/$self/*.stp]] { - set test $self/[file tail $file] - verbose -log "Running $file" - set rc [stap_run_batch $file] - if {$rc == 0} { pass $test } else { fail $test } +# These probes should be acceptable for unprivileged users +set valid_probes [list \ + {%(CONFIG_UTRACE=="y" %? process("foo").begin %: end %)} \ + {%(CONFIG_UTRACE=="y" %? process("foo").function("bar") %: end %)} \ + {%(CONFIG_UTRACE=="y" %? process("foo").function("bar").call %: end %)} \ + {%(CONFIG_UTRACE=="y" %? process("foo").function("bar").return %: end %)} \ +] + +foreach probe $valid_probes { + set cmd [list stap --unprivileged -e "probe $probe { println (\"Hello\"); }" -c ./foo ] + verbose -log "eval exec $cmd" + catch {eval exec $cmd} res_stap + verbose -log $res_stap + if { "$res_stap" == "Hello" } { + pass "$test: $probe" + } else { + fail "$test: $probe" + } } catch {exec rm -f foo} diff -Nru systemtap-1.4/testsuite/transok/tval-opt.stp systemtap-1.6/testsuite/transok/tval-opt.stp --- systemtap-1.4/testsuite/transok/tval-opt.stp 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/testsuite/transok/tval-opt.stp 2011-07-25 18:12:01.000000000 +0000 @@ -1,4 +1,4 @@ -#! /bin/sh +#! /bin/bash set -e set -o pipefail diff -Nru systemtap-1.4/translate.cxx systemtap-1.6/translate.cxx --- systemtap-1.4/translate.cxx 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/translate.cxx 2011-07-25 18:12:01.000000000 +0000 @@ -18,6 +18,7 @@ #include "dwarf_wrappers.h" #include "setupdwfl.h" #include "task_finder.h" +#include "dwflpp.h" #include #include @@ -33,6 +34,8 @@ #include #include #include +#define __STDC_FORMAT_MACROS +#include } // Max unwind table size (debug or eh) per module. Somewhat arbitrary @@ -41,6 +44,13 @@ // A larger value was recently found in a libxul.so build. #define MAX_UNWIND_TABLE_SIZE (6 * 1024 * 1024) +#define STAP_T_01 _("\"Array overflow, check ") +#define STAP_T_02 _("\"MAXNESTING exceeded\";") +#define STAP_T_03 _("\"division by 0\";") +#define STAP_T_04 _("\"MAXACTION exceeded\";") +#define STAP_T_05 _("\"aggregation overflow in ") +#define STAP_T_06 _("\"empty aggregate\";") +#define STAP_T_07 _("\"histogram index out of range\";") using namespace std; struct var; @@ -420,7 +430,7 @@ break; default: - throw semantic_error("unsupported stats type for " + value()); + throw semantic_error(_F("unsupported stats type for %s", value().c_str())); } prefix = prefix + "); "; @@ -428,7 +438,7 @@ } default: - throw semantic_error("unsupported initializer for " + value()); + throw semantic_error(_F("unsupported initializer for %s", value().c_str())); } } @@ -442,7 +452,7 @@ case pe_stats: return "_stp_stat_del (" + value () + ");"; default: - throw semantic_error("unsupported deallocator for " + value()); + throw semantic_error(_F("unsupported deallocator for %s", value().c_str())); } } @@ -572,7 +582,7 @@ result += 'x'; break; default: - throw semantic_error("unknown type of map"); + throw semantic_error(_("unknown type of map")); break; } } @@ -587,7 +597,7 @@ for (unsigned i = 0; i < indices.size(); ++i) { if (indices[i].type() != index_types[i]) - throw semantic_error("index type mismatch"); + throw semantic_error(_("index type mismatch")); result += ", "; result += indices[i].value(); } @@ -603,7 +613,7 @@ string calculate_aggregate() const { if (!is_parallel()) - throw semantic_error("aggregating non-parallel map type"); + throw semantic_error(_("aggregating non-parallel map type")); return "_stp_pmap_agg (" + value() + ")"; } @@ -611,7 +621,7 @@ string fetch_existing_aggregate() const { if (!is_parallel()) - throw semantic_error("fetching aggregate of non-parallel map type"); + throw semantic_error(_("fetching aggregate of non-parallel map type")); return "_stp_pmap_get_agg(" + value() + ")"; } @@ -629,7 +639,7 @@ return ("((uintptr_t)" + call_prefix("get", indices) + ") != (uintptr_t) 0)"); else - throw semantic_error("checking existence of an unsupported map type"); + throw semantic_error(_("checking existence of an unsupported map type")); } string get (vector const & indices, bool pre_agg=false) const @@ -642,7 +652,7 @@ else if (type() == pe_long || type() == pe_stats) return call_prefix("get", indices, pre_agg) + ")"; else - throw semantic_error("getting a value from an unsupported map type"); + throw semantic_error(_("getting a value from an unsupported map type")); } string add (vector const & indices, tmpvar const & val) const @@ -653,9 +663,10 @@ if (type() == pe_stats) res += (call_prefix("add", indices) + ", " + val.value() + ")"); else - throw semantic_error("adding a value of an unsupported map type"); + throw semantic_error(_("adding a value of an unsupported map type")); - res += "; if (unlikely(rc)) { c->last_error = \"Array overflow, check " + + res += "; if (unlikely(rc)) { c->last_error = "; + res += STAP_T_01 + lex_cast(maxsize > 0 ? "size limit (" + lex_cast(maxsize) + ")" : "MAXMAPENTRIES") + "\"; goto out; }}"; @@ -674,9 +685,10 @@ else if (type() == pe_long) res += (call_prefix("set", indices) + ", " + val.value() + ")"); else - throw semantic_error("setting a value of an unsupported map type"); + throw semantic_error(_("setting a value of an unsupported map type")); - res += "; if (unlikely(rc)) { c->last_error = \"Array overflow, check " + + res += "; if (unlikely(rc)) { c->last_error = "; + res += STAP_T_01 + lex_cast(maxsize > 0 ? "size limit (" + lex_cast(maxsize) + ")" : "MAXMAPENTRIES") + "\"; goto out; }}"; @@ -762,7 +774,7 @@ name("__tmp" + lex_cast(counter++)) { if (referent_ty == pe_unknown) - throw semantic_error("iterating over unknown reference type", e->tok); + throw semantic_error(_("iterating over unknown reference type"), e->tok); } string declare () const @@ -775,7 +787,7 @@ string res; if (mv.type() != referent_ty) - throw semantic_error("inconsistent iterator type in itervar::start()"); + throw semantic_error(_("inconsistent iterator type in itervar::start()")); if (mv.is_parallel()) return "_stp_map_start (" + mv.fetch_existing_aggregate() + ")"; @@ -786,7 +798,7 @@ string next (mapvar const & mv) const { if (mv.type() != referent_ty) - throw semantic_error("inconsistent iterator type in itervar::next()"); + throw semantic_error(_("inconsistent iterator type in itervar::next()")); if (mv.is_parallel()) return "_stp_map_iter (" + mv.fetch_existing_aggregate() + ", " + value() + ")"; @@ -811,14 +823,14 @@ // impedance matching: NULL -> empty strings return "(_stp_key_get_str ("+ value() + ", " + lex_cast(i+1) + ") ?: \"\")"; default: - throw semantic_error("illegal key type"); + throw semantic_error(_("illegal key type")); } } string get_value (exp_type ty) const { if (ty != referent_ty) - throw semantic_error("inconsistent iterator value in itervar::get_value()"); + throw semantic_error(_("inconsistent iterator value in itervar::get_value()")); switch (ty) { @@ -830,7 +842,7 @@ case pe_stats: return "_stp_get_stat ("+ value() + ")"; default: - throw semantic_error("illegal value type"); + throw semantic_error(_("illegal value type")); } } }; @@ -1367,6 +1379,8 @@ o->newline(1) << "int holdon;"; o->newline() << "int i=0, j=0;"; // for derived_probe_group use o->newline() << "int cpu;"; + o->newline() << "unsigned long hold_start;"; + o->newline() << "int hold_index;"; o->newline() << "(void) i;"; o->newline() << "(void) j;"; @@ -1404,14 +1418,47 @@ // NB: systemtap_module_exit is assumed to be called from ordinary // user context, say during module unload. Among other things, this // means we can sleep a while. + o->newline() << "hold_start = jiffies;"; + o->newline() << "hold_index = -1;"; o->newline() << "do {"; o->newline(1) << "int i;"; o->newline() << "holdon = 0;"; o->newline() << "for (i=0; i < NR_CPUS; i++)"; o->newline(1) << "if (cpu_possible (i) && " << "contexts[i] != NULL && " - << "atomic_read (& contexts[i]->busy)) " - << "holdon = 1;"; + << "atomic_read (& contexts[i]->busy)) {"; + o->newline(1) << "holdon = 1;"; + + // just in case things are really stuck, let's print some diagnostics + o->newline() << "if (time_after(jiffies, hold_start + HZ) "; // > 1 second + o->line() << "&& (i > hold_index)) {"; // not already printed + o->newline(1) << "hold_index = i;"; + o->newline() << "printk(KERN_ERR \"%s context[%d] stuck: %s\\n\", THIS_MODULE->name, i, contexts[i]->probe_point);"; + o->newline(-1) << "}"; + o->newline(-1) << "}"; + + // Just in case things are really really stuck, a handler probably + // suffered a fault, and the kernel probably killed a task/thread + // already. We can't be quite sure in what state everything is in, + // however auxiliary stuff like kprobes / uprobes / locks have + // already been unregistered. So it's *probably* safe to + // pretend/assume/hope everything is OK, and let the cleanup finish. + // + // In the worst case, there may occur a fault, as a genuinely + // running probe handler tries to access script globals (about to be + // freed), or something accesses module memory (about to be + // unloaded). This is sometimes stinky, so the alternative + // (default) is to change from a livelock to a livelock that sleeps + // awhile. + o->newline() << "#ifdef STAP_OVERRIDE_STUCK_CONTEXT"; + o->newline() << "if (time_after(jiffies, hold_start + HZ*10)) { "; // > 10 seconds + o->newline(1) << "printk(KERN_ERR \"%s overriding stuck context to allow module shutdown.\", THIS_MODULE->name);"; + o->newline() << "holdon = 0;"; // allow loop to exit + o->newline(-1) << "}"; + o->newline() << "#else"; + o->newline() << "msleep (250);"; // at least stop sucking down the staprun cpu + o->newline() << "#endif"; + // NB: we run at least one of these during the shutdown sequence: o->newline () << "yield ();"; // aka schedule() and then some o->newline(-2) << "} while (holdon);"; @@ -1540,7 +1587,8 @@ // stored in c->locals[c->nesting+1]. See also ::emit_common_header() for more. o->newline() << "if (unlikely (c->nesting+1 >= MAXNESTING)) {"; - o->newline(1) << "c->last_error = \"MAXNESTING exceeded\";"; + o->newline(1) << "c->last_error = "; + o->line() << STAP_T_02; o->newline() << "return;"; o->newline(-1) << "} else {"; o->newline(1) << "c->nesting ++;"; @@ -1551,7 +1599,7 @@ for (unsigned i=0; ilocals.size(); i++) { if (v->locals[i]->index_types.size() > 0) // array? - throw semantic_error ("array locals not supported, missing global declaration?", + throw semantic_error (_("array locals not supported, missing global declaration?"), v->locals[i]->tok); o->newline() << getvar (v->locals[i]).init(); @@ -1640,7 +1688,7 @@ // NB: Elision of context variable structs is a separate // operation which has already taken place by now. if (session->verbose > 1) - clog << v->name << " elided, duplicates " << dupe << endl; + clog << _F("%s elided, duplicates %s", v->name.c_str(), dupe.c_str()); #if DUPMETHOD_CALL // This one emits a direct call to the first copy. @@ -1706,7 +1754,7 @@ if (v->locals[j]->skip_init) continue; if (v->locals[j]->index_types.size() > 0) // array? - throw semantic_error ("array locals not supported, missing global declaration?", + throw semantic_error (_("array locals not supported, missing global declaration?"), v->locals[j]->tok); else if (v->locals[j]->type == pe_long) o->newline() << "l->" << c_varname (v->locals[j]->name) @@ -1715,7 +1763,7 @@ o->newline() << "l->" << c_varname (v->locals[j]->name) << "[0] = '\\0';"; else - throw semantic_error ("unsupported local variable type", + throw semantic_error (_("unsupported local variable type"), v->locals[j]->tok); } @@ -1811,7 +1859,7 @@ if (session->verbose > 1) { if (!numvars) - clog << "nothing"; + clog << _("nothing"); clog << endl; } } @@ -1827,7 +1875,7 @@ void -c_unparser::emit_unlocks(const varuse_collecting_visitor& vut) +c_unparser::emit_unlocks(const varuse_collecting_visitor&) { o->newline() << "stp_unlock_probe(locks, ARRAY_SIZE(locks));"; } @@ -1859,7 +1907,7 @@ case pe_stats: return "STAT"; default: - throw semantic_error("array type is neither string nor long"); + throw semantic_error(_("array type is neither string nor long")); } return ""; } @@ -1874,7 +1922,7 @@ case pe_string: return "STRING"; default: - throw semantic_error("array key is neither string nor long"); + throw semantic_error(_("array key is neither string nor long")); } return ""; } @@ -1889,7 +1937,7 @@ case pe_string: return "s"; default: - throw semantic_error("array type is neither string nor long"); + throw semantic_error(_("array type is neither string nor long")); } return ""; } @@ -1968,7 +2016,7 @@ case pe_stats: return string("Stat"); case pe_unknown: default: - throw semantic_error ("cannot expand unknown type"); + throw semantic_error (_("cannot expand unknown type")); } } @@ -2002,7 +2050,7 @@ // otherwise, limit the use of this function to literal numbers and // strings. if (e->tok->type != tok_number && e->tok->type != tok_string) - throw semantic_error("unsupported c_expression token type"); + throw semantic_error(_("unsupported c_expression token type")); // Create a fake output stream so we can grab the string output. ostringstream oss; @@ -2033,7 +2081,7 @@ o->newline() << lvalue << " = " << rvalue << ";"; break; default: - throw semantic_error ("unknown lvalue type in assignment", tok); + throw semantic_error (_("unknown lvalue type in assignment"), tok); } } @@ -2053,7 +2101,7 @@ } else { - string fullmsg = msg + " type unsupported"; + string fullmsg = msg + _(" type unsupported"); throw semantic_error (fullmsg, rvalue->tok); } } @@ -2073,7 +2121,7 @@ } else { - string fullmsg = msg + " type unsupported"; + string fullmsg = msg + _(" type unsupported"); throw semantic_error (fullmsg, tok); } } @@ -2102,22 +2150,21 @@ if (res.type() == pe_string) { if (post) - throw semantic_error ("post assignment on strings not supported", + throw semantic_error (_("post assignment on strings not supported"), tok); if (op == "=") { parent->c_strcpy (lval.value(), rval.value()); // no need for second copy res = rval; - } + } else if (op == ".=") { parent->c_strcat (lval.value(), rval.value()); res = lval; } else - throw semantic_error ("string assignment operator " + - op + " unsupported", tok); + throw semantic_error (_F("string assignment operator %s unsupported", op.c_str()), tok); } else if (op == "<<<") { @@ -2149,12 +2196,12 @@ macop = op; else // internal error - throw semantic_error ("unknown macop for assignment", tok); + throw semantic_error (_("unknown macop for assignment"), tok); if (post) { if (macop == "/" || macop == "%" || op == "=") - throw semantic_error ("invalid post-mode operator", tok); + throw semantic_error (_("invalid post-mode operator"), tok); o->newline() << res << " = " << lval << ";"; @@ -2175,7 +2222,8 @@ if (macop == "/=" || macop == "%=") { o->newline() << "if (unlikely(!" << rval << ")) {"; - o->newline(1) << "c->last_error = \"division by 0\";"; + o->newline(1) << "c->last_error = "; + o->line() << STAP_T_03; o->newline() << "c->last_stmt = " << lex_cast_qstring(*rvalue->tok) << ";"; o->newline() << "goto out;"; o->newline(-1) << "}"; @@ -2190,7 +2238,7 @@ } } else - throw semantic_error ("assignment type not yet implemented", tok); + throw semantic_error (_("assignment type not yet implemented"), tok); } @@ -2277,9 +2325,9 @@ } if (tok) - throw semantic_error ("unresolved symbol", tok); + throw semantic_error (_("unresolved symbol"), tok); else - throw semantic_error ("unresolved symbol: " + r->name); + throw semantic_error (_("unresolved symbol: ") + r->name); } @@ -2318,7 +2366,7 @@ c_unparser::getmap(vardecl *v, token const *tok) { if (v->arity < 1) - throw semantic_error("attempt to use scalar where map expected", tok); + throw semantic_error(_("attempt to use scalar where map expected"), tok); statistic_decl sd; std::map::const_iterator i; i = session->stat_decls.find(v->name); @@ -2350,7 +2398,8 @@ { o->newline() << "c->actionremaining -= " << action_counter << ";"; o->newline() << "if (unlikely (c->actionremaining <= 0)) {"; - o->newline(1) << "c->last_error = \"MAXACTION exceeded\";"; + o->newline(1) << "c->last_error = "; + o->line() << STAP_T_04; // XXX it really ought to be illegal for anything to be missing a token, // but until we're sure of that, we need to defend against NULL. @@ -2555,7 +2604,7 @@ o->newline() << "if (! ("; if (s->cond->type != pe_long) - throw semantic_error ("expected numeric type", s->cond->tok); + throw semantic_error (_("expected numeric type"), s->cond->tok); s->cond->visit (this); o->line() << ")) goto " << breaklabel << ";"; @@ -2700,7 +2749,7 @@ // our bucket index. if (s->indexes.size() != 1 || s->indexes[0]->referent->type != pe_long) - throw semantic_error("Invalid indexing of histogram", s->tok); + throw semantic_error(_("Invalid indexing of histogram"), s->tok); // Then declare what we need to form the aggregate we're // iterating over, and all the tmpvars needed by our call to @@ -2761,7 +2810,8 @@ if (mv.is_parallel()) { o->newline() << "if (unlikely(NULL == " << mv.calculate_aggregate() << ")) {"; - o->newline(1) << "c->last_error = \"aggregation overflow in " << mv << "\";"; + o->newline(1) << "c->last_error = "; + o->line() << STAP_T_05 << mv << "\";"; o->newline() << "c->last_stmt = " << lex_cast_qstring(*s->tok) << ";"; o->newline() << "goto out;"; o->newline(-1) << "}"; @@ -2962,10 +3012,10 @@ c_unparser::visit_return_statement (return_statement* s) { if (current_function == 0) - throw semantic_error ("cannot 'return' from probe", s->tok); + throw semantic_error (_("cannot 'return' from probe"), s->tok); if (s->value->type != current_function->type) - throw semantic_error ("return type mismatch", current_function->tok, + throw semantic_error (_("return type mismatch"), current_function->tok, "vs", s->tok); c_assign ("l->__retvalue", s->value, "return value"); @@ -2978,7 +3028,7 @@ c_unparser::visit_next_statement (next_statement* s) { if (current_probe == 0) - throw semantic_error ("cannot 'next' from function", s->tok); + throw semantic_error (_("cannot 'next' from function"), s->tok); record_actions(1, s->tok, true); o->newline() << "goto out;"; @@ -3002,7 +3052,7 @@ { c_unparser *parent; delete_statement_operand_visitor (c_unparser *p): - throwing_visitor ("invalid operand of delete expression"), + throwing_visitor (_("invalid operand of delete expression")), parent (p) {} void visit_symbol (symbol* e); @@ -3042,7 +3092,7 @@ break; case pe_unknown: default: - throw semantic_error("Cannot delete unknown expression type", e->tok); + throw semantic_error(_("Cannot delete unknown expression type"), e->tok); } } } @@ -3069,7 +3119,7 @@ } else { - throw semantic_error("cannot delete histogram bucket entries\n", e->tok); + throw semantic_error(_("cannot delete histogram bucket entries\n"), e->tok); } } @@ -3092,7 +3142,7 @@ } else { - throw semantic_error("cannot delete histogram bucket entries\n", e->tok); + throw semantic_error(_("cannot delete histogram bucket entries\n"), e->tok); } } @@ -3118,7 +3168,7 @@ c_unparser::visit_break_statement (break_statement* s) { if (loop_break_labels.empty()) - throw semantic_error ("cannot 'break' outside loop", s->tok); + throw semantic_error (_("cannot 'break' outside loop"), s->tok); record_actions(1, s->tok, true); o->newline() << "goto " << loop_break_labels.back() << ";"; @@ -3129,7 +3179,7 @@ c_unparser::visit_continue_statement (continue_statement* s) { if (loop_continue_labels.empty()) - throw semantic_error ("cannot 'continue' outside loop", s->tok); + throw semantic_error (_("cannot 'continue' outside loop"), s->tok); record_actions(1, s->tok, true); o->newline() << "goto " << loop_continue_labels.back() << ";"; @@ -3203,7 +3253,7 @@ else if (e->type == pe_string) o->line() << "((const char *) (" << e->code << "))"; else - throw semantic_error ("expected numeric or string type", e->tok); + throw semantic_error (_("expected numeric or string type"), e->tok); o->line() << ")"; } @@ -3215,7 +3265,7 @@ if (e->type != pe_long || e->left->type != pe_long || e->right->type != pe_long) - throw semantic_error ("expected numeric types", e->tok); + throw semantic_error (_("expected numeric types"), e->tok); if (e->op == "+" || e->op == "-" || @@ -3269,7 +3319,8 @@ } o->newline() << "if (unlikely(!" << right << ")) {"; - o->newline(1) << "c->last_error = \"division by 0\";"; + o->newline(1) << "c->last_error = "; + o->line() << STAP_T_03; o->newline() << "c->last_stmt = " << lex_cast_qstring(*e->tok) << ";"; o->newline() << "goto out;"; o->newline(-1) << "}"; @@ -3279,7 +3330,7 @@ o->newline(-1) << "})"; } else - throw semantic_error ("operator not yet implemented", e->tok); + throw semantic_error (_("operator not yet implemented"), e->tok); } @@ -3288,7 +3339,7 @@ { if (e->type != pe_long || e->operand->type != pe_long) - throw semantic_error ("expected numeric types", e->tok); + throw semantic_error (_("expected numeric types"), e->tok); if (e->op == "-") { @@ -3317,7 +3368,7 @@ if (e->type != pe_long || e->left->type != pe_long || e->right->type != pe_long) - throw semantic_error ("expected numeric types", e->tok); + throw semantic_error (_("expected numeric types"), e->tok); o->line() << "(("; e->left->visit (this); @@ -3333,7 +3384,7 @@ if (e->type != pe_long || e->left->type != pe_long || e->right->type != pe_long) - throw semantic_error ("expected numeric types", e->tok); + throw semantic_error (_("expected numeric types"), e->tok); o->line() << "(("; e->left->visit (this); @@ -3424,7 +3475,7 @@ if (e->left->type == pe_string) { if (e->right->type != pe_string) - throw semantic_error ("expected string types", e->tok); + throw semantic_error (_("expected string types"), e->tok); o->line() << "strncmp ("; e->left->visit (this); @@ -3436,7 +3487,7 @@ else if (e->left->type == pe_long) { if (e->right->type != pe_long) - throw semantic_error ("expected numeric types", e->tok); + throw semantic_error (_("expected numeric types"), e->tok); o->line() << "(("; e->left->visit (this); @@ -3445,7 +3496,7 @@ o->line() << "))"; } else - throw semantic_error ("unexpected type", e->left->tok); + throw semantic_error (_("unexpected type"), e->left->tok); o->line() << ")"; } @@ -3465,12 +3516,12 @@ c_unparser::visit_concatenation (concatenation* e) { if (e->op != ".") - throw semantic_error ("unexpected concatenation operator", e->tok); + throw semantic_error (_("unexpected concatenation operator"), e->tok); if (e->type != pe_string || e->left->type != pe_string || e->right->type != pe_string) - throw semantic_error ("expected string types", e->tok); + throw semantic_error (_("expected string types"), e->tok); tmpvar t = gensym (e->type); @@ -3488,12 +3539,12 @@ c_unparser::visit_ternary_expression (ternary_expression* e) { if (e->cond->type != pe_long) - throw semantic_error ("expected numeric condition", e->cond->tok); + throw semantic_error (_("expected numeric condition"), e->cond->tok); if (e->truevalue->type != e->falsevalue->type || e->type != e->truevalue->type || (e->truevalue->type != pe_long && e->truevalue->type != pe_string)) - throw semantic_error ("expected matching types", e->tok); + throw semantic_error (_("expected matching types"), e->tok); o->line() << "(("; e->cond->visit (this); @@ -3519,22 +3570,22 @@ if (e->op == "<<<") { if (e->type != pe_long) - throw semantic_error ("non-number <<< expression", e->tok); + throw semantic_error (_("non-number <<< expression"), e->tok); if (e->left->type != pe_stats) - throw semantic_error ("non-stats left operand to <<< expression", e->left->tok); + throw semantic_error (_("non-stats left operand to <<< expression"), e->left->tok); if (e->right->type != pe_long) - throw semantic_error ("non-number right operand to <<< expression", e->right->tok); + throw semantic_error (_("non-number right operand to <<< expression"), e->right->tok); } else { if (e->type != e->left->type) - throw semantic_error ("type mismatch", e->tok, + throw semantic_error (_("type mismatch"), e->tok, "vs", e->left->tok); if (e->right->type != e->left->type) - throw semantic_error ("type mismatch", e->right->tok, + throw semantic_error (_("type mismatch"), e->right->tok, "vs", e->left->tok); } @@ -3556,7 +3607,7 @@ { if (e->type != pe_long || e->type != e->operand->type) - throw semantic_error ("expected numeric type", e->tok); + throw semantic_error (_("expected numeric type"), e->tok); c_unparser_assignment tav (this, e->op, false); e->operand->visit (& tav); @@ -3576,7 +3627,7 @@ { if (e->type != pe_long || e->type != e->operand->type) - throw semantic_error ("expected numeric type", e->tok); + throw semantic_error (_("expected numeric type"), e->tok); c_unparser_assignment tav (this, e->op, true); e->operand->visit (& tav); @@ -3590,7 +3641,7 @@ vardecl* r = e->referent; if (r->index_types.size() != 0) - throw semantic_error ("invalid reference to array", e->tok); + throw semantic_error (_("invalid reference to array"), e->tok); var v = getvar(r, e->tok); o->line() << v; @@ -3685,7 +3736,7 @@ // "x += 1". rval.override("1"); else - throw semantic_error ("need rvalue for assignment", tok); + throw semantic_error (_("need rvalue for assignment"), tok); } } @@ -3696,7 +3747,7 @@ assert (e->referent != 0); if (e->referent->index_types.size() != 0) - throw semantic_error ("unexpected reference to array", e->tok); + throw semantic_error (_("unexpected reference to array"), e->tok); // parent->o->newline() << "c->last_stmt = " << lex_cast_qstring(*e->tok) << ";"; exp_type ty = rvalue ? rvalue->type : e->type; @@ -3715,28 +3766,28 @@ void c_unparser::visit_target_symbol (target_symbol* e) { - throw semantic_error("cannot translate general target-symbol expression", e->tok); + throw semantic_error(_("cannot translate general target-symbol expression"), e->tok); } void c_unparser::visit_cast_op (cast_op* e) { - throw semantic_error("cannot translate general @cast expression", e->tok); + throw semantic_error(_("cannot translate general @cast expression"), e->tok); } void c_unparser::visit_defined_op (defined_op* e) { - throw semantic_error("cannot translate general @defined expression", e->tok); + throw semantic_error(_("cannot translate general @defined expression"), e->tok); } void c_unparser::visit_entry_op (entry_op* e) { - throw semantic_error("cannot translate general @entry expression", e->tok); + throw semantic_error(_("cannot translate general @entry expression"), e->tok); } @@ -3787,12 +3838,12 @@ if (r->index_types.size() == 0 || r->index_types.size() != e->indexes.size()) - throw semantic_error ("invalid array reference", e->tok); + throw semantic_error (_("invalid array reference"), e->tok); for (unsigned i=0; iindex_types.size(); i++) { if (r->index_types[i] != e->indexes[i]->type) - throw semantic_error ("array index type mismatch", e->indexes[i]->tok); + throw semantic_error (_("array index type mismatch"), e->indexes[i]->tok); tmpvar ix = gensym (r->index_types[i]); if (e->indexes[i]->tok->type == tok_number @@ -3836,7 +3887,7 @@ !parent->get_foreach_loop_value(arr, agg_value)) { if (!arr) - throw semantic_error("expected arrayindex expression", e->tok); + throw semantic_error(_("expected arrayindex expression"), e->tok); load_map_indices (arr); } } @@ -3848,7 +3899,7 @@ symbol *sym = get_symbol_within_expression (e); if (sym->referent->type != pe_stats) - throw semantic_error ("unexpected aggregate of non-statistic", sym->tok); + throw semantic_error (_("unexpected aggregate of non-statistic"), sym->tok); var *v; if (sym->referent->arity == 0) @@ -3864,7 +3915,7 @@ arrayindex *arr = NULL; if (!expression_is_arrayindex (e, arr)) - throw semantic_error("unexpected aggregate of non-arrayindex", e->tok); + throw semantic_error(_("unexpected aggregate of non-arrayindex"), e->tok); // If we have a foreach_loop value, we don't need to index the map string agg_value; @@ -3946,7 +3997,7 @@ // First all the stuff related to indexing into the histogram if (e->indexes.size() != 1) - throw semantic_error("Invalid indexing of histogram", e->tok); + throw semantic_error(_("Invalid indexing of histogram"), e->tok); tmpvar ix = parent->gensym (pe_long); ix.declare (*parent); e->indexes[0]->visit(this); @@ -3982,7 +4033,7 @@ { // Visiting an statistic-valued array in a non-lvalue context is prohibited. if (array->referent->type == pe_stats) - throw semantic_error ("statistic-valued array in rvalue context", e->tok); + throw semantic_error (_("statistic-valued array in rvalue context"), e->tok); stmt_expr block(*this); @@ -4029,13 +4080,15 @@ // PR 2142+2610: empty aggregates o->newline() << "if (unlikely (" << agg.value() << " == NULL)" << " || " << agg.value() << "->count == 0) {"; - o->newline(1) << "c->last_error = \"empty aggregate\";"; + o->newline(1) << "c->last_error = "; + o->line() << STAP_T_06; o->newline() << "goto out;"; o->newline(-1) << "} else {"; o->newline(1) << "if (" << histogram_index_check(*v, idx[0]) << ")"; o->newline(1) << res << " = " << agg << "->histogram[" << idx[0] << "];"; o->newline(-1) << "else {"; - o->newline(1) << "c->last_error = \"histogram index out of range\";"; + o->newline(1) << "c->last_error = "; + o->line() << STAP_T_07; o->newline() << "goto out;"; o->newline(-1) << "}"; @@ -4074,7 +4127,7 @@ } else { - throw semantic_error("cannot assign to histogram buckets", e->tok); + throw semantic_error(_("cannot assign to histogram buckets"), e->tok); } } @@ -4094,7 +4147,7 @@ translator_output *o = parent->o; if (array->referent->index_types.size() == 0) - throw semantic_error ("unexpected reference to scalar", e->tok); + throw semantic_error (_("unexpected reference to scalar"), e->tok); // nb: Do not adjust the order of the next few lines; the tmpvar // allocation order must remain the same between @@ -4165,7 +4218,7 @@ } else { - throw semantic_error("cannot assign to histogram buckets", e->tok); + throw semantic_error(_("cannot assign to histogram buckets"), e->tok); } } @@ -4194,7 +4247,7 @@ functiondecl* r = e->referent; if (r->formal_args.size() != e->args.size()) - throw semantic_error ("invalid length argument list", e->tok); + throw semantic_error (_("invalid length argument list"), e->tok); stmt_expr block(*this); @@ -4210,7 +4263,7 @@ tmpvar t = gensym(e->args[i]->type); if (r->formal_args[i]->type != e->args[i]->type) - throw semantic_error ("function argument type mismatch", + throw semantic_error (_("function argument type mismatch"), e->args[i]->tok, "vs", r->formal_args[i]->tok); if (e->args[i]->tok->type == tok_number @@ -4221,7 +4274,7 @@ // o->newline() << "c->last_stmt = " // << lex_cast_qstring(*e->args[i]->tok) << ";"; c_assign (t.value(), e->args[i], - "function actual argument evaluation"); + _("function actual argument evaluation")); } tmp.push_back(t); } @@ -4230,7 +4283,7 @@ for (unsigned i=0; iargs.size(); i++) { if (r->formal_args[i]->type != e->args[i]->type) - throw semantic_error ("function argument type mismatch", + throw semantic_error (_("function argument type mismatch"), e->args[i]->tok, "vs", r->formal_args[i]->tok); c_assign ("c->locals[c->nesting+1].function_" + @@ -4281,7 +4334,7 @@ tmpvar t = parent->gensym (e->args[i]->type); if (e->args[i]->type == pe_unknown) { - throw semantic_error("unknown type of arg to print operator", + throw semantic_error(_("unknown type of arg to print operator"), e->args[i]->tok); } @@ -4319,7 +4372,8 @@ // PR 2142+2610: empty aggregates o->newline() << "if (unlikely (" << agg.value() << " == NULL)" << " || " << agg.value() << "->count == 0) {"; - o->newline(1) << "c->last_error = \"empty aggregate\";"; + o->newline(1) << "c->last_error = "; + o->line() << STAP_T_06; o->newline() << "c->last_stmt = " << lex_cast_qstring(*e->tok) << ";"; o->newline() << "goto out;"; o->newline(-1) << "} else"; @@ -4346,7 +4400,8 @@ // PR10750: Enforce a reasonable limit on # of varargs // 32 varargs leads to max 256 bytes on the stack if (e->args.size() > 32) - throw semantic_error("too many arguments to print", e->tok); + throw semantic_error(_F(ngettext("additional argument to print", "too many arguments to print (%zu)", + e->args.size()), e->args.size()), e->tok); // Compute actual arguments vector tmp; @@ -4391,9 +4446,9 @@ switch (e->args[i]->type) { case pe_unknown: - throw semantic_error("cannot print unknown expression type", e->args[i]->tok); + throw semantic_error(_("cannot print unknown expression type"), e->args[i]->tok); case pe_stats: - throw semantic_error("cannot print a raw stats object", e->args[i]->tok); + throw semantic_error(_("cannot print a raw stats object"), e->args[i]->tok); case pe_long: curr.type = print_format::conv_signed_decimal; break; @@ -4447,6 +4502,8 @@ if (components[i].prectype == print_format::prec_dynamic) prec_ix = arg_ix++; + (void) width_ix; /* XXX: notused */ + /* %m and %M need special care for digging into memory. */ if (components[i].type == print_format::conv_memory || components[i].type == print_format::conv_memory_hex) @@ -4581,7 +4638,9 @@ var *v = load_aggregate(e->stat, agg); { // PR 2142+2610: empty aggregates - if (e->ctype == sc_count) + if ((e->ctype == sc_count) || + (e->ctype == sc_sum && + strverscmp(session->compatible.c_str(), "1.5") >= 0)) { o->newline() << "if (unlikely (" << agg.value() << " == NULL))"; o->indent(1); @@ -4592,7 +4651,8 @@ { o->newline() << "if (unlikely (" << agg.value() << " == NULL)" << " || " << agg.value() << "->count == 0) {"; - o->newline(1) << "c->last_error = \"empty aggregate\";"; + o->newline(1) << "c->last_error = "; + o->line() << STAP_T_06; o->newline() << "c->last_stmt = " << lex_cast_qstring(*e->tok) << ";"; o->newline() << "goto out;"; o->newline(-1) << "}"; @@ -4670,7 +4730,6 @@ *debug_frame_hdr = NULL; *debug_frame_hdr_len = 0; -#if _ELFUTILS_PREREQ(0,142) int cies = 0; set< pair > fdes; set< pair >::iterator it; @@ -4683,7 +4742,7 @@ Dwarf_Off off = 0; Dwarf_CFI_Entry entry; - while (res != 1 && off >= 0) + while (res != 1) { Dwarf_Off next_off; res = dwarf_next_cfi (e_ident, debug_frame, false, off, &next_off, @@ -4762,7 +4821,6 @@ *table++ = (*it).second; } } -#endif } // Get the .debug_frame end .eh_frame sections for the given module. @@ -4887,7 +4945,7 @@ // In the future, we'll also care about data symbols. int syments = dwfl_module_getsymtab(m); - dwfl_assert ("Getting symbol table for " + modname, syments >= 0); + dwfl_assert (_F("Getting symbol table for %s", modname.c_str()), syments >= 0); //extract build-id from debuginfo file int build_id_len = 0; @@ -4898,26 +4956,6 @@ (const unsigned char **)&build_id_bits, &build_id_vaddr)) > 0) { - // Enable workaround for elfutils dwfl bug. - // see https://bugzilla.redhat.com/show_bug.cgi?id=465872 - // and http://sourceware.org/ml/systemtap/2008-q4/msg00579.html -#if !_ELFUTILS_PREREQ(0,138) - // Let's standardize to the new "start of build-id bits" behavior. - build_id_vaddr -= build_id_len; -#endif - - // And check for another workaround needed. - // see https://bugzilla.redhat.com/show_bug.cgi?id=489439 - // and http://sourceware.org/ml/systemtap/2009-q1/msg00513.html -#if !_ELFUTILS_PREREQ(0,141) - if (build_id_vaddr < base && dwfl_module_relocations (m) == 1) - { - GElf_Addr main_bias; - dwfl_module_getelf (m, &main_bias); - build_id_vaddr += main_bias; - } -#endif - if (modname != "kernel") { Dwarf_Addr reloc_vaddr = build_id_vaddr; @@ -4939,7 +4977,7 @@ if (modname[0] != '/') if (!secname || strcmp(secname, ".note.gnu.build-id")) - throw semantic_error ("unexpected build-id reloc section " + + throw semantic_error (_("unexpected build-id reloc section ") + string(secname ?: "null")); build_id_vaddr = reloc_vaddr; @@ -4947,10 +4985,8 @@ if (c->session.verbose > 1) { - clog << "Found build-id in " << name - << ", length " << build_id_len; - clog << ", start at 0x" << hex << build_id_vaddr - << dec << endl; + clog << _F("Found build-id in %s, length %d, start at 0x%#" PRIx64, + name, build_id_len, build_id_vaddr) << endl; } } @@ -4997,12 +5033,8 @@ ki = dwfl_module_relocate_address (m, &extra_offset); dwfl_assert ("dwfl_module_relocate_address extra_offset", ki >= 0); - // Sadly dwfl_module_relocate_address is broken on - // elfutils < 0.138, so we need to adjust for the module - // base address outself. (see also below). - extra_offset = sym.st_value - base; if (c->session.verbose > 2) - clog << "Found kernel _stext extra offset 0x" << hex << extra_offset << dec << endl; + clog << _F("Found kernel _stext extra offset 0x%#" PRIx64, extra_offset) << endl; } // We are only interested in "real" symbols. @@ -5025,14 +5057,6 @@ int ki = dwfl_module_relocate_address (m, &sym_addr); dwfl_assert ("dwfl_module_relocate_address", ki >= 0); secname = dwfl_module_relocation_info (m, ki, NULL); - - // For ET_DYN files (secname == "") we do ignore the - // dwfl_module_relocate_address adjustment. libdwfl - // up to 0.137 would substract the wrong bias. So we do - // it ourself, it is always just the module base address - // in this case. - if (ki == 0 && secname != NULL && secname[0] == '\0') - sym_addr = save_addr - base; } if (n == 1 && modname == "kernel") @@ -5183,8 +5207,9 @@ if (eh_frame_hdr_len > MAX_UNWIND_TABLE_SIZE) { if (! c->session.suppress_warnings) - c->session.print_warning ("skipping module " + modname + " eh_frame_hdr table (too big: " + - lex_cast(eh_frame_hdr_len) + " > " + lex_cast(MAX_UNWIND_TABLE_SIZE) + ")"); + c->session.print_warning (_F("skipping module %s eh_frame_hdr table (too big: %s > %s)", + modname.c_str(), lex_cast(eh_frame_hdr_len).c_str(), + lex_cast(MAX_UNWIND_TABLE_SIZE).c_str())); } else for (size_t i = 0; i < eh_frame_hdr_len; i++) @@ -5246,15 +5271,10 @@ if (debug_frame_hdr_len > MAX_UNWIND_TABLE_SIZE) { if (! c->session.suppress_warnings) - c->session.print_warning ("skipping module " - + modname - + ", section" + secname - + " debug_frame_hdr table" - + " (too big: " - + lex_cast(debug_frame_hdr_len) - + " > " - + lex_cast(MAX_UNWIND_TABLE_SIZE) - + ")"); + c->session.print_warning (_F("skipping module %s, section %s debug_frame_hdr" + " table (too big: %s > %s)", modname.c_str(), + secname.c_str(), lex_cast(debug_frame_hdr_len).c_str(), + lex_cast(MAX_UNWIND_TABLE_SIZE).c_str())); } else for (size_t i = 0; i < debug_frame_hdr_len; i++) @@ -5384,12 +5404,14 @@ /* Don't save build-id if it is located before _stext. * This probably means that build-id will not be loaded at all and - * happens for example with ARM kernel. + * happens for example with ARM kernel. Allow user space modules since the + * check fails for a shared object. * * See also: - * http://sources.redhat.com/ml/systemtap/2009-q4/msg00574.html + * http://sourceware.org/ml/systemtap/2009-q4/msg00574.html */ - if (build_id_len > 0) { + if (build_id_len > 0 + && (modname != "kernel" || (build_id_vaddr > base + extra_offset))) { c->output << ".build_id_bits = \"" ; for (int j=0; joutput << "\\x" << hex @@ -5435,16 +5457,30 @@ void +add_unwindsym_iol_callback (void *q, const char *data) +{ + std::set *added = (std::set*)q; + added->insert (string (data)); +} + + +static int +query_module (Dwfl_Module *mod, + void **, + const char *, + Dwarf_Addr, + void *arg) +{ + ((struct dwflpp*)arg)->focus_on_module(mod, NULL); + return DWARF_CB_OK; +} + + +void add_unwindsym_ldd (systemtap_session &s) { std::set added; - // NB: This is not entirely safe. It may be possible to create a - // handcrafted executable that sends ldd off to neverland, or even - // to execute the thing. - if (geteuid() == 0 && !s.suppress_warnings) - s.print_warning("/usr/bin/ldd may not be safe to run on untrustworthy executables"); - for (std::set::iterator it = s.unwindsym_modules.begin(); it != s.unwindsym_modules.end(); it++) @@ -5453,63 +5489,18 @@ assert (modname.length() != 0); if (! is_user_module (modname)) continue; - string ldd_command = "/usr/bin/ldd " + modname; - if (s.verbose > 2) - clog << "Running '" << ldd_command << "'" << endl; - - FILE *fp = popen (ldd_command.c_str(), "r"); - if (fp == 0) - clog << ldd_command << " failed: " << strerror(errno) << endl; - else - { - while (1) - { - char linebuf[256]; - char *soname = 0; - char *shlib = 0; - unsigned long int addr = 0; - - char *line = fgets (linebuf, 256, fp); - if (line == 0) break; // EOF or error - - // Try soname => shlib (0xaddr) - int nf = sscanf (line, "%as => %as (0x%lx)", - &soname, &shlib, &addr); - if (nf != 3 || shlib[0] != '/') - { - // Try shlib (0xaddr) - nf = sscanf (line, " %as (0x%lx)", &shlib, &addr); - if (nf != 2 || shlib[0] != '/') - continue; // fewer than expected fields, or bad shlib. - } - - if (added.find (shlib) == added.end()) - { - if (s.verbose > 2) - { - clog << "Added -d '" << shlib; - if (nf == 3) - clog << "' due to '" << soname << "'"; - else - clog << "'"; - clog << endl; - } - added.insert (shlib); - } - - free (soname); - free (shlib); - } - pclose (fp); - } + struct dwflpp *mod_dwflpp = new dwflpp(s, modname, false); + mod_dwflpp->iterate_over_modules(&query_module, mod_dwflpp); + mod_dwflpp->iterate_over_libraries (&add_unwindsym_iol_callback, &added); + delete mod_dwflpp; } - + s.unwindsym_modules.insert (added.begin(), added.end()); } static set vdso_paths; -static int find_vdso(const char *path, const struct stat *status, int type) +static int find_vdso(const char *path, const struct stat *, int type) { if (type == FTW_F) { @@ -5543,7 +5534,7 @@ vdso_dir = s.kernel_build_tree + "/arch/"; if (s.verbose > 1) - clog << "Searching for vdso candidates: " << vdso_dir << endl; + clog << _("Searching for vdso candidates: ") << vdso_dir << endl; ftw(vdso_dir.c_str(), find_vdso, 1); @@ -5553,7 +5544,7 @@ { s.unwindsym_modules.insert(*it); if (s.verbose > 1) - clog << "vdso candidate: " << *it << endl; + clog << _("vdso candidate: ") << *it << endl; } } @@ -5673,7 +5664,7 @@ for (set::iterator it = ctx->undone_unwindsym_modules.begin(); it != ctx->undone_unwindsym_modules.end(); it ++) - s.print_warning ("missing unwind/symbol data for module '" + s.print_warning (_("missing unwind/symbol data for module '") + (*it) + "'"); } @@ -5696,8 +5687,8 @@ if (nesting_max < nesting_depth) { if (sess.verbose > 3) - clog << "identified max-nested function: " << e->referent->name - << " (" << nesting_depth << ")" << endl; + clog << _F("identified max-nested function: %s (%d)", + e->referent->name.c_str(), nesting_depth) << endl; nesting_max = nesting_depth; } @@ -5707,7 +5698,7 @@ { recursive = true; if (sess.verbose > 3) - clog << "identified recursive function: " << e->referent->name << endl; + clog << _F("identified recursive function: %s", e->referent->name.c_str()) << endl; return; } @@ -5719,11 +5710,36 @@ }; +void translate_runtime(systemtap_session& s) +{ + s.op->newline() << "#define STAP_MSG_RUNTIME_H_01 " + << lex_cast_qstring(_("myproc-unprivileged tapset function called " + "without is_myproc checking for pid %d (euid %d)")); + + s.op->newline() << "#define STAP_MSG_LOC2C_01 " + << lex_cast_qstring(_("kernel read fault at 0x%p (%s)")); + s.op->newline() << "#define STAP_MSG_LOC2C_02 " + << lex_cast_qstring(_("kernel write fault at 0x%p (%s)")); + s.op->newline() << "#define STAP_MSG_LOC2C_03 " + << lex_cast_qstring(_("divide by zero in DWARF operand (%s)")); +} + + int prepare_translate_pass (systemtap_session& s) { - prepare_symbol_data (s); - return 0; + int rc = 0; + try + { + prepare_symbol_data (s); + } + catch (const semantic_error& e) + { + s.print_error (e); + rc = 1; + } + + return rc; } @@ -5735,6 +5751,7 @@ s.op = new translator_output (s.translated_source); c_unparser cup (& s); s.up = & cup; + translate_runtime(s); try { @@ -5748,14 +5765,14 @@ if (versions.size() >= 2) minor = lex_cast (versions[1]); if (versions.size() >= 3 && s.verbose > 1) - clog << "ignoring extra parts of compat version: " << s.compatible << endl; + clog << _F("ignoring extra parts of compat version: %s", s.compatible.c_str()) << endl; } catch (const runtime_error) { - throw semantic_error("parse error in compatibility version: " + s.compatible); + throw semantic_error(_F("parse error in compatibility version: %s", s.compatible.c_str())); } if (major < 0 || major > 255 || minor < 0 || minor > 255) - throw semantic_error("compatibility version out of range: " + s.compatible); + throw semantic_error(_F("compatibility version out of range: %s", s.compatible.c_str())); s.op->newline() << "#define STAP_VERSION(a, b) ( ((a) << 8) + (b) )"; s.op->newline() << "#ifndef STAP_COMPAT_VERSION"; s.op->newline() << "#define STAP_COMPAT_VERSION STAP_VERSION(" @@ -5774,8 +5791,8 @@ } if (s.verbose > 1) - clog << "function recursion-analysis: max-nesting " << ri.nesting_max - << (ri.recursive ? " recursive" : " non-recursive") << endl; + clog << _F("function recursion-analysis: max-nesting %d %s", ri.nesting_max, + (ri.recursive ? _(" recursive") : _(" non-recursive"))) << endl; unsigned nesting = ri.nesting_max + 1; /* to account for initial probe->function call */ if (ri.recursive) nesting += 10; diff -Nru systemtap-1.4/.tx/config systemtap-1.6/.tx/config --- systemtap-1.4/.tx/config 1970-01-01 00:00:00.000000000 +0000 +++ systemtap-1.6/.tx/config 2011-07-25 18:12:01.000000000 +0000 @@ -0,0 +1,10 @@ +[main] +host = https://www.transifex.net + +[systemtap.systemtappot] +file_filter = po/.po +source_file = po/systemtap.pot +source_lang = en +trans.fr = po/fr.po +trans.pl = po/pl.po + diff -Nru systemtap-1.4/util.cxx systemtap-1.6/util.cxx --- systemtap-1.4/util.cxx 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/util.cxx 2011-07-25 18:12:01.000000000 +0000 @@ -1,5 +1,5 @@ // Copyright (C) Andrew Tridgell 2002 (original file) -// Copyright (C) 2006-2010 Red Hat Inc. (systemtap changes) +// Copyright (C) 2006-2011 Red Hat Inc. (systemtap changes) // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License as @@ -12,8 +12,7 @@ // General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +// along with this program. If not, see . #include "util.h" #include "stap-probe.h" @@ -24,6 +23,7 @@ #include #include #include +#include extern "C" { #include @@ -37,9 +37,11 @@ #include #include #include +#include } using namespace std; +using namespace __gnu_cxx; // Return current users home directory or die. @@ -54,7 +56,7 @@ if (pwd) return pwd->pw_dir; - throw runtime_error("Unable to determine home directory"); + throw runtime_error(_("Unable to determine home directory")); return NULL; } @@ -108,7 +110,7 @@ mode_t mask; if (verbose) - clog << "Copying " << src << " to " << dest << endl; + clog << _F("Copying %s to %s", src.c_str(), dest.c_str()) << endl; // Open the src file. fd1 = open(src.c_str(), O_RDONLY); @@ -162,8 +164,8 @@ return true; error: - cerr << "Copy failed (\"" << src << "\" to \"" << dest << "\"): " - << strerror(errno) << endl; + cerr << _F("Copy failed (\"%s\" to \"%s\"): %s", src.c_str(), + dest.c_str(), strerror(errno)) << endl; return false; } @@ -219,7 +221,7 @@ if (remove (name) != 0) return 1; - cerr << "remove returned 0" << endl; + return 0; } @@ -245,7 +247,7 @@ } } if (ngids < 0) { - cerr << "Unable to retrieve group list" << endl; + cerr << _("Unable to retrieve group list") << endl; return false; } @@ -263,18 +265,16 @@ { static long sz = sysconf(_SC_PAGESIZE); - long pages, kb; + long pages; ostringstream oss; ifstream statm("/proc/self/statm"); statm >> pages; - kb = pages * sz / 1024; - oss << "using " << kb << "virt/"; + long kb1 = pages * sz / 1024; statm >> pages; - kb = pages * sz / 1024; - oss << kb << "res/"; + long kb2 = pages * sz / 1024; statm >> pages; - kb = pages * sz / 1024; - oss << kb << "shr kb, "; + long kb3 = pages * sz / 1024; + oss << _F("using %ldvirt/%ldres/%ldshr kb, ", kb1, kb2, kb3); return oss.str(); } @@ -393,81 +393,154 @@ } -string -git_revision(const string& path) +const string +cmdstr_join(const vector& cmds) { - string revision = "(not-a-git-repository)"; - string git_dir = path + "/.git/"; + if (cmds.empty()) + throw runtime_error(_("cmdstr_join called with an empty command!")); - struct stat st; - if (stat(git_dir.c_str(), &st) == 0) - { - string command = "git --git-dir=\"" + git_dir - + "\" rev-parse HEAD 2>/dev/null"; + stringstream cmd; + cmd << cmdstr_quoted(cmds[0]); + for (size_t i = 1; i < cmds.size(); ++i) + cmd << " " << cmdstr_quoted(cmds[i]); - char buf[50]; - FILE *fp = popen(command.c_str(), "r"); - if (fp != NULL) - { - char *bufp = fgets(buf, sizeof(buf), fp); - int rc = pclose(fp); - if (bufp != NULL && rc == 0) - revision = buf; - } - } - - return revision; + return cmd.str(); } -// XXX written only from the main thread, but can be read in a -// signal handler. synchronization needed? -static set spawned_pids; +// signal-safe set of pids +class spawned_pids_t { + private: + set pids; + + public: + bool contains (pid_t p) + { + stap_sigmasker masked; + return pids.count(p) == 0; + } + bool insert (pid_t p) + { + stap_sigmasker masked; + return (p > 0) ? pids.insert(p).second : false; + } + void erase (pid_t p) + { + stap_sigmasker masked; + pids.erase(p); + } + int killall (int sig) + { + int ret = 0; + stap_sigmasker masked; + for (set::const_iterator it = pids.begin(); + it != pids.end(); ++it) + ret = kill(*it, sig) ?: ret; + return ret; + } +}; +static spawned_pids_t spawned_pids; int stap_waitpid(int verbose, pid_t pid) { int ret, status; - if (verbose > 1 && spawned_pids.count(pid) == 0) - clog << "Spawn waitpid call on unmanaged pid " << pid << endl; + if (verbose > 1 && spawned_pids.contains(pid)) + clog << _F("Spawn waitpid call on unmanaged pid %d", pid) << endl; ret = waitpid(pid, &status, 0); if (ret == pid) { spawned_pids.erase(pid); ret = WIFEXITED(status) ? WEXITSTATUS(status) : 128 + WTERMSIG(status); - if (verbose > 2) - clog << "Spawn waitpid result (0x" << lex_cast_hex(status) << "): " << ret << endl; + if (verbose > 1) + clog << _F("Spawn waitpid result (0x%x): %d", status, ret) << endl; } else { if (verbose > 1) - clog << "Spawn waitpid error (" << ret << "): " << strerror(errno) << endl; + clog << _F("Spawn waitpid error (%d): %s", ret, strerror(errno)) << endl; ret = -1; } + PROBE2(stap, stap_system__complete, ret, pid); return ret; } +static int +pipe_child_fd(posix_spawn_file_actions_t* fa, int pipefd[2], int childfd) +{ + if (pipe(pipefd)) + return -1; + + int dir = childfd ? 1 : 0; + if (!fcntl(pipefd[0], F_SETFD, FD_CLOEXEC) && + !fcntl(pipefd[1], F_SETFD, FD_CLOEXEC) && + !posix_spawn_file_actions_adddup2(fa, pipefd[dir], childfd)) + return 0; + + close(pipefd[0]); + close(pipefd[1]); + return -1; +} + +static int +null_child_fd(posix_spawn_file_actions_t* fa, int childfd) +{ + int flags = childfd ? O_WRONLY : O_RDONLY; + return posix_spawn_file_actions_addopen(fa, childfd, "/dev/null", flags, 0); +} + // Runs a command with a saved PID, so we can kill it from the signal handler pid_t -stap_spawn(int verbose, const std::string& command) +stap_spawn(int verbose, const vector& args, + posix_spawn_file_actions_t* fa, const vector& envVec) { - const char *cmd = command.c_str(); - char const * const argv[] = { "sh", "-c", cmd, NULL }; - int ret; + string::const_iterator it; + it = args[0].begin(); + const char *cmd; + string command; + if(*it == '/' && (access(args[0].c_str(), X_OK)==-1)) //checking to see if staprun is executable + clog << _F("Warning: %s is not executable (%s)", args[0].c_str(), strerror(errno)) << endl; + for (size_t i = 0; i < args.size(); ++i) + command += " " + args[i]; + cmd = command.c_str(); + PROBE1(stap, stap_system__start, cmd); + if (verbose > 1) + clog << _("Running") << command << endl; - pid_t pid = 0; + char const * argv[args.size() + 1]; + for (size_t i = 0; i < args.size(); ++i) + argv[i] = args[i].c_str(); + argv[args.size()] = NULL; + + char** env; + bool allocated; + if(envVec.empty()) + { + env = environ; + allocated = false; + } + else + { + allocated = true; + env = new char*[envVec.size() + 1]; + + for (size_t i = 0; i < envVec.size(); ++i) + env[i] = (char*)envVec[i].c_str(); + env[envVec.size()] = NULL; + } - if (verbose > 1) - clog << "Running " << command << endl; + pid_t pid = 0; + int ret = posix_spawnp(&pid, argv[0], fa, NULL, + const_cast(argv), env); + if (allocated) + delete[] env; - ret = posix_spawn(&pid, "/bin/sh", NULL, NULL, - const_cast(argv), environ); PROBE2(stap, stap_system__spawn, ret, pid); if (ret != 0) { if (verbose > 1) - clog << "Spawn error (" << ret << "): " << strerror(ret) << endl; + clog << _F("Spawn error (%d): %s", ret, strerror(ret)) << endl; pid = -1; } else @@ -475,63 +548,132 @@ return pid; } -// Runs a command with a saved PID, so we can kill it from the signal handler, -// and wait for it to finish. -int -stap_system(int verbose, const std::string& command) +// The API version of stap_spawn doesn't expose file_actions, for now. +pid_t +stap_spawn(int verbose, const vector& args) { - const char *cmd; - cmd = command.c_str(); - PROBE1(stap, stap_system__start, cmd); - - int ret = -1; - pid_t pid = stap_spawn(verbose, command); - if (pid > 0) - ret = stap_waitpid(verbose, pid); - PROBE1(stap, stap_system__complete, ret); - return ret; + return stap_spawn(verbose, args, NULL); } -// Like stap_system, but capture stdout -int -stap_system_read(int verbose, const string& command, ostream& out) +pid_t +stap_spawn_piped(int verbose, const vector& args, + int *child_in, int *child_out, int* child_err) { - int ret, pfd[2]; + pid_t pid = -1; + int infd[2], outfd[2], errfd[2]; + posix_spawn_file_actions_t fa; + if (posix_spawn_file_actions_init(&fa) != 0) + return -1; + + if (child_in && pipe_child_fd(&fa, infd, 0) != 0) + goto cleanup_fa; + if (child_out && pipe_child_fd(&fa, outfd, 1) != 0) + goto cleanup_in; + if (child_err && pipe_child_fd(&fa, errfd, 2) != 0) + goto cleanup_out; - ret = pipe(pfd); - if (ret != 0) + pid = stap_spawn(verbose, args, &fa); + + if (child_err) { - return -1; + if (pid > 0) + *child_err = errfd[0]; + else + close(errfd[0]); + close(errfd[1]); } - pid_t child = fork(); - if (child < 0) +cleanup_out: + if (child_out) { - return -1; + if (pid > 0) + *child_out = outfd[0]; + else + close(outfd[0]); + close(outfd[1]); } - else if (child == 0) + +cleanup_in: + if (child_in) { - // remap the write fd to stdout - dup2(pfd[1], 1); - close(pfd[0]); - close(pfd[1]); + if (pid > 0) + *child_in = infd[1]; + else + close(infd[1]); + close(infd[0]); + } + +cleanup_fa: + posix_spawn_file_actions_destroy(&fa); + + return pid; +} - // exec the desired command - char const * const argv[] = { "sh", "-c", command.c_str(), NULL }; - ret = execv("/bin/sh", const_cast(argv)); - exit(ret); // only reached on exec error +// Global set of supported localization variables. Make changes here to +// add or remove variables. List of variables from: +// http://publib.boulder.ibm.com/infocenter/tivihelp/v8r1/index.jsp?topic=/ +// com.ibm.netcool_OMNIbus.doc_7.3.0/omnibus/wip/install/concept/omn_con_settingyourlocale.html +const set& +localization_variables() +{ + static set localeVars; + if (localeVars.empty()) + { + localeVars.insert("LANG"); + localeVars.insert("LC_ALL"); + localeVars.insert("LC_CTYPE"); + localeVars.insert("LC_COLLATE"); + localeVars.insert("LC_MESSAGES"); + localeVars.insert("LC_TIME"); + localeVars.insert("LC_MONETARY"); + localeVars.insert("LC_NUMERIC"); } + return localeVars; +} + +// Runs a command with a saved PID, so we can kill it from the signal handler, +// and wait for it to finish. +int +stap_system(int verbose, const vector& args, + bool null_out, bool null_err) +{ + int ret = 0; + posix_spawn_file_actions_t fa; + if (posix_spawn_file_actions_init(&fa) != 0) + return -1; + + if ((null_out && null_child_fd(&fa, 1) != 0) || + (null_err && null_child_fd(&fa, 2) != 0)) + ret = -1; else - spawned_pids.insert(child); + { + pid_t pid = stap_spawn(verbose, args, &fa); + ret = pid; + if (pid > 0){ + ret = stap_waitpid(verbose, pid); + if(ret) + clog << _F("Warning: %s exited with status: %d", args.front().c_str(), ret) << endl; + } + } - // read everything from the child - string readpath = "/proc/self/fd/" + lex_cast(pfd[0]); - ifstream in(readpath.c_str()); - close(pfd[0]); - close(pfd[1]); - out << in.rdbuf(); + posix_spawn_file_actions_destroy(&fa); + return ret; +} - return stap_waitpid(verbose, child); +// Like stap_system, but capture stdout +int +stap_system_read(int verbose, const vector& args, ostream& out) +{ + int child_fd = -1; + pid_t child = stap_spawn_piped(verbose, args, NULL, &child_fd); + if (child > 0) + { + // read everything from the child + stdio_filebuf in(child_fd, ios_base::in); + out << ∈ + return stap_waitpid(verbose, child); + } + return -1; } @@ -539,16 +681,7 @@ int kill_stap_spawn(int sig) { - int ret = 0; - for (set::iterator it = spawned_pids.begin(); - it != spawned_pids.end(); ++it) - if (*it > 0) - { - int pidret = kill(*it, sig); - if (!ret) - ret = pidret; - } - return ret; + return spawned_pids.killall(sig); } @@ -564,7 +697,7 @@ r = new regex_t; int rc = regcomp (r, re.c_str(), REG_ICASE|REG_NOSUB|REG_EXTENDED); if (rc) { - cerr << "regcomp " << re << " (" << name << ") error rc=" << rc << endl; + cerr << _F("regcomp %s (%s) error rc= %d", re.c_str(), name.c_str(), rc) << endl; exit(1); } compiled[re] = r; @@ -576,8 +709,8 @@ int rc = regexec (r, value.c_str(), 0, 0, 0); if (rc) { - cerr << "ERROR: Safety pattern mismatch for " << name - << " ('" << value << "' vs. '" << re << "') rc=" << rc << endl; + cerr << _F("ERROR: Safety pattern mismatch for %s ('%s' vs. '%s') rc=%d", + name.c_str(), value.c_str(), re.c_str(), rc) << endl; exit(1); } } @@ -594,8 +727,8 @@ r = new regex_t; int rc = regcomp (r, re.c_str(), REG_EXTENDED); /* REG_ICASE? */ if (rc) { - cerr << "regcomp " << re << " error rc=" << rc << endl; - exit(1); + cerr << _F("regcomp %s error rc=%d", re.c_str(), rc) << endl; + return rc; } compiled[re] = r; } @@ -639,6 +772,10 @@ // // This logic needs to match the logic in the stap_get_arch shell // function in stap-env. + // + // But: RHBZ669082 reminds us that this renaming post-dates some + // of the kernel versions we know and love. So in buildrun.cxx + // we undo this renaming for ancient powerpc. if (machine == "i486") return "i386"; else if (machine == "i586") return "i386"; @@ -655,5 +792,42 @@ return machine; } +string +kernel_release_from_build_tree (const string &kernel_build_tree, int verbose) +{ + string version_file_name = kernel_build_tree + "/include/config/kernel.release"; + // The file include/config/kernel.release within the + // build tree is used to pull out the version information + ifstream version_file (version_file_name.c_str()); + if (version_file.fail ()) + { + if (verbose > 1) + //TRANSLATORS: Missing a file + cerr << _F("Missing %s", version_file_name.c_str()) << endl; + return ""; + } + + string kernel_release; + char c; + while (version_file.get(c) && c != '\n') + kernel_release.push_back(c); + + return kernel_release; +} + +std::string autosprintf(const char* format, ...) +{ + va_list args; + char *str; + va_start (args, format); + int rc = vasprintf (&str, format, args); + if (rc < 0) + throw runtime_error (_F("autosprintf/vasprintf error %s", lex_cast(rc).c_str())); + string s = str; + va_end (args); + free (str); + return s; /* by copy */ +} + /* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ diff -Nru systemtap-1.4/util.h systemtap-1.6/util.h --- systemtap-1.4/util.h 2011-01-17 11:31:41.000000000 +0000 +++ systemtap-1.6/util.h 2011-07-25 18:12:01.000000000 +0000 @@ -1,3 +1,4 @@ +#include "config.h" #include #include #include @@ -6,10 +7,28 @@ #include #include #include +#include extern "C" { +#include +#include +#include #include +#include } +#if ENABLE_NLS +#define _(string) gettext(string) +#define _N(string, string_plural, count) \ + ngettext((string), (string_plural), (count)) +#else +#define _(string) (string) +#define _N(string, string_plural, count) \ + ( (count) == 1 ? (string) : (string_plural) ) +#endif +#define _F(format, ...) autosprintf(_(format), __VA_ARGS__) +#define _NF(format, format_plural, count, ...) \ + autosprintf(_N((format), (format_plural), (count)), __VA_ARGS__) + const char *get_home_directory(void); size_t get_file_size(const std::string &path); size_t get_file_size(int fd); @@ -25,16 +44,24 @@ std::string find_executable(const std::string& name, const std::string& env_path = "PATH"); const std::string cmdstr_quoted(const std::string& cmd); -std::string git_revision(const std::string& path); +const std::string cmdstr_join(const std::vector& cmds); int stap_waitpid(int verbose, pid_t pid); -pid_t stap_spawn(int verbose, const std::string& command); -int stap_system(int verbose, const std::string& command); -int stap_system_read(int verbose, const std::string& command, std::ostream& out); +pid_t stap_spawn(int verbose, const std::vector& args); +pid_t stap_spawn(int verbose, const std::vector& args, + posix_spawn_file_actions_t* fa, const std::vector& envVec = std::vector ()); +pid_t stap_spawn_piped(int verbose, const std::vector& args, + int* child_in=NULL, int* child_out=NULL, int* child_err=NULL); +int stap_system(int verbose, const std::vector& args, + bool null_out=false, bool null_err=false); +int stap_system_read(int verbose, const std::vector& args, std::ostream& out); int kill_stap_spawn(int sig); void assert_regexp_match (const std::string& name, const std::string& value, const std::string& re); int regexp_match (const std::string& value, const std::string& re, std::vector& matches); bool contains_glob_chars (const std::string &str); +std::string kernel_release_from_build_tree (const std::string &kernel_build_tree, int verbose = 0); std::string normalize_machine(const std::string& machine); +std::string autosprintf(const char* format, ...) __attribute__ ((format (printf, 1, 2))); +const std::set& localization_variables(); // stringification generics @@ -44,7 +71,7 @@ { std::ostringstream ss; if (!(ss << in)) - throw std::runtime_error("bad lexical cast"); + throw std::runtime_error(_("bad lexical cast")); return ss.str(); } @@ -55,7 +82,7 @@ std::istringstream ss(in); OUT out; if (!(ss >> out && ss.eof())) - throw std::runtime_error("bad lexical cast"); + throw std::runtime_error(_("bad lexical cast")); return out; } @@ -66,7 +93,7 @@ { int16_t out = lex_cast(in); if (out < -128 || out > 127) - throw std::runtime_error("bad lexical cast"); + throw std::runtime_error(_("bad lexical cast")); return out; } template <> @@ -74,7 +101,7 @@ { uint16_t out = lex_cast(in); if (out > 0xff && out < 0xff80) // don't error if it looks sign-extended - throw std::runtime_error("bad lexical cast"); + throw std::runtime_error(_("bad lexical cast")); return out; } @@ -85,7 +112,7 @@ { std::ostringstream ss; if (!(ss << std::showbase << std::hex << in)) - throw std::runtime_error("bad lexical cast"); + throw std::runtime_error(_("bad lexical cast")); return ss.str(); } @@ -98,7 +125,7 @@ { std::stringstream ss; if (!(ss << in)) - throw std::runtime_error("bad lexical cast"); + throw std::runtime_error(_("bad lexical cast")); return lex_cast_qstring(ss.str()); } @@ -163,4 +190,24 @@ } +// Mask our usual signals for the life of this object. +struct stap_sigmasker { + sigset_t old; + stap_sigmasker() + { + sigset_t mask; + sigemptyset (&mask); + sigaddset (&mask, SIGHUP); + sigaddset (&mask, SIGPIPE); + sigaddset (&mask, SIGINT); + sigaddset (&mask, SIGTERM); + sigprocmask (SIG_BLOCK, &mask, &old); + } + ~stap_sigmasker() + { + sigprocmask (SIG_SETMASK, &old, NULL); + } +}; + + /* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */