diff options
author | Frank Ch. Eigler <fche@elastic.org> | 2008-09-10 17:21:51 -0400 |
---|---|---|
committer | Frank Ch. Eigler <fche@elastic.org> | 2008-09-10 17:21:51 -0400 |
commit | dd13da3b90d71b94c8dc09942fee97f8513df348 (patch) | |
tree | d490b811932be34445f3d02331b14d4f1c5b909a | |
parent | f76427a2bf80e4451e5e8d0c26b06aca65e4e2c4 (diff) | |
parent | da4c496a55b73e2a768d3b1c6cee44b43144bcc8 (diff) | |
download | systemtap-steved-dd13da3b90d71b94c8dc09942fee97f8513df348.tar.gz systemtap-steved-dd13da3b90d71b94c8dc09942fee97f8513df348.tar.xz systemtap-steved-dd13da3b90d71b94c8dc09942fee97f8513df348.zip |
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap
* 'master' of ssh://sources.redhat.com/git/systemtap:
backtrace fix for i386 with neither frame pointers nor dwarf unwinding
Add network security warning for the client/server.
Check for dwarf_getelf (elfutils 0.126+).
hangeLog entries for latest commits.
Move stap-find-* script to client sub rpm.
Rename _stp_module module_base output to dwarf_module_base and document.
Remove unnecessary dependencies.
Correct man page specs in systemtap.spec
Create systemtap-client and systemtap-server sub rpms
-rw-r--r-- | ChangeLog | 25 | ||||
-rw-r--r-- | Makefile.in | 17 | ||||
-rw-r--r-- | NEWS | 8 | ||||
-rw-r--r-- | aclocal.m4 | 38 | ||||
-rw-r--r-- | config.in | 6 | ||||
-rwxr-xr-x | configure | 139 | ||||
-rw-r--r-- | configure.ac | 5 | ||||
-rw-r--r-- | runtime/ChangeLog | 13 | ||||
-rw-r--r-- | runtime/runtime.h | 4 | ||||
-rw-r--r-- | runtime/stack-i386.c | 6 | ||||
-rw-r--r-- | runtime/sym.h | 7 | ||||
-rw-r--r-- | runtime/unwind.c | 6 | ||||
-rw-r--r-- | systemtap.spec | 51 | ||||
-rw-r--r-- | translate.cxx | 2 |
14 files changed, 226 insertions, 101 deletions
@@ -7,6 +7,31 @@ 2008-09-10 Mark Wielaard <mjw@redhat.com> + * configure.ac: Check for dwarf_getelf. elfutils 0.126+. + Use AM_PROG_MKDIR_P instead of AC_PROG_MKDIR_P. + * Makefile.in: Regenerated. + * aclocal.m4: Likewise. + * config.in: Likewise. + * configure: Likewise. + +2008-09-10 Dave Brolley <brolley@redhat.com> + + * systemtap.spec: Remove avahi-tools and nc from dependencies + for systemtap and systemtap-runtime packages. Remove stap-* + scripts from %files of systemtap and systemtap-runtime + packages. Make sure systemattap-runtime only picks up + staprun.8* man pages. Create new systemtap-client and + systemtap-server packages. + * NEWS: Add network security warning for the systemtap + client/server. + +2008-09-10 Mark Wielaard <mjw@redhat.com> + + * translate.cxx (dump_unwindsyms): Rename module_base output to + dwarf_module_base. + +2008-09-10 Mark Wielaard <mjw@redhat.com> + * translate.cxx (dump_unwindsyms): Output module_base. 2008-09-10 Mark Wielaard <mjw@redhat.com> diff --git a/Makefile.in b/Makefile.in index ff10a31d..08d82151 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. +# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in 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. @@ -1130,8 +1130,8 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS @@ -1156,8 +1156,8 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ @@ -1167,13 +1167,12 @@ ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ - here=`pwd`; \ list='$(SOURCES) $(HEADERS) config.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique @@ -57,7 +57,13 @@ 4, the client behaves like the 'stap' front end itself. This means, among other things, that the client will automatically load the resulting module on the local host unless -p[1234] - was specified. See stap-server(8) for more details. + was specified. + + This client/server implementation is a prototype. It provides + NO NETWORK SECURITY OF ANY KIND and should be used only + among trusted hosts on a trusted network. + + See stap-server(8) for more details. - Global variables which are written to but never read are now automatically displayed when the session does a shutdown. For example: @@ -1,7 +1,7 @@ -# generated automatically by aclocal 1.10 -*- Autoconf -*- +# generated automatically by aclocal 1.10.1 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006 Free Software Foundation, Inc. +# 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # 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. @@ -11,12 +11,15 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. -m4_if(m4_PACKAGE_VERSION, [2.61],, -[m4_fatal([this file was generated for autoconf 2.61. -You have another version of autoconf. If you want to use that, -you should regenerate the build system entirely.], [63])]) +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +m4_if(AC_AUTOCONF_VERSION, [2.61],, +[m4_warning([this file was generated for autoconf 2.61. +You have another version of autoconf. It may work, but is not guaranteed to. +If you have problems, you may need to regenerate the build system entirely. +To do so, use the procedure documented by the package, typically `autoreconf'.])]) -# Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc. +# Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -31,7 +34,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.10' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.10], [], +m4_if([$1], [1.10.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -47,8 +50,10 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.10])dnl -_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)]) +[AM_AUTOMAKE_VERSION([1.10.1])dnl +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +_AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- @@ -343,7 +348,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. - if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue @@ -391,13 +396,13 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006 Free Software Foundation, Inc. +# 2005, 2006, 2008 Free Software Foundation, Inc. # # 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. -# serial 12 +# serial 13 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. @@ -502,16 +507,17 @@ AC_PROVIDE_IFELSE([AC_PROG_OBJC], # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. +_am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in - $1 | $1:* ) + $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done -echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # @@ -872,7 +878,7 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])]) # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- -# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in. +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) @@ -12,9 +12,6 @@ /* Define to 1 if you have the <inttypes.h> header file. */ #undef HAVE_INTTYPES_H -/* Define to 1 if you have the `cap' library (-lcap). */ -#undef HAVE_LIBCAP - /* Define to 1 if you have the `dw' library (-ldw). */ #undef HAVE_LIBDW @@ -39,9 +36,6 @@ /* Define to 1 if you have the <string.h> header file. */ #undef HAVE_STRING_H -/* Define to 1 if you have the <sys/capability.h> header file. */ -#undef HAVE_SYS_CAPABILITY_H - /* Define to 1 if you have the <sys/stat.h> header file. */ #undef HAVE_SYS_STAT_H @@ -2294,47 +2294,11 @@ fi -{ echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 -echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; } -if test -z "$MKDIR_P"; then - if test "${ac_cv_path_mkdir+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in mkdir gmkdir; do - for ac_exec_ext in '' $ac_executable_extensions; do - { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue - case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( - 'mkdir (GNU coreutils) '* | \ - 'mkdir (coreutils) '* | \ - 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext - break 3;; - esac - done - done -done -IFS=$as_save_IFS - -fi - - if test "${ac_cv_path_mkdir+set}" = set; then - MKDIR_P="$ac_cv_path_mkdir -p" - else - # As a last resort, use the slow shell script. Don't cache a - # value for MKDIR_P within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - test -d ./--version && rmdir ./--version - MKDIR_P="$ac_install_sh -d" - fi -fi -{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5 -echo "${ECHO_T}$MKDIR_P" >&6; } +mkdir_p="$MKDIR_P" +case $mkdir_p in + [\\/$]* | ?:[\\/]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac { echo "$as_me:$LINENO: checking whether ln -s works" >&5 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; } @@ -6532,6 +6496,82 @@ echo "$as_me: error: missing elfutils development headers/libraries (install elf { (exit 1); exit 1; }; } fi + +{ echo "$as_me:$LINENO: checking for dwarf_getelf in -ldw" >&5 +echo $ECHO_N "checking for dwarf_getelf in -ldw... $ECHO_C" >&6; } +if test "${ac_cv_lib_dw_dwarf_getelf+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldw -Wl,--start-group -ldw -lebl -Wl,--end-group -lelf $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 dwarf_getelf (); +int +main () +{ +return dwarf_getelf (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dw_dwarf_getelf=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dw_dwarf_getelf=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dw_dwarf_getelf" >&5 +echo "${ECHO_T}$ac_cv_lib_dw_dwarf_getelf" >&6; } +if test $ac_cv_lib_dw_dwarf_getelf = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBDW 1 +_ACEOF + + LIBS="-ldw $LIBS" + +else + + { { echo "$as_me:$LINENO: error: elfutils, libdw too old, need 0.126+" >&5 +echo "$as_me: error: elfutils, libdw too old, need 0.126+" >&2;} + { (exit 1); exit 1; }; } +fi + stap_LIBS="-Wl,--start-group -ldw -lebl -Wl,--end-group -lelf" LIBS="$save_LIBS" else @@ -8220,21 +8260,22 @@ echo "$as_me: $ac_file is unchanged" >&6;} fi rm -f "$tmp/out12" # Compute $ac_file's index in $config_headers. +_am_arg=$ac_file _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in - $ac_file | $ac_file:* ) + $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done -echo "timestamp for $ac_file" >`$as_dirname -- $ac_file || -$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X$ac_file : 'X\(//\)[^/]' \| \ - X$ac_file : 'X\(//\)$' \| \ - X$ac_file : 'X\(/\)' \| . 2>/dev/null || -echo X$ac_file | +echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || +$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$_am_arg" : 'X\(//\)[^/]' \| \ + X"$_am_arg" : 'X\(//\)$' \| \ + X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || +echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -8271,7 +8312,7 @@ echo "$as_me: executing $ac_file commands" >&6;} # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. - if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ diff --git a/configure.ac b/configure.ac index 294fabe1..4a30bc99 100644 --- a/configure.ac +++ b/configure.ac @@ -8,7 +8,7 @@ AC_PREREQ(2.59) AM_INIT_AUTOMAKE AM_MAINTAINER_MODE -AC_PROG_MKDIR_P +AM_PROG_MKDIR_P AC_PROG_LN_S AC_PROG_CC AC_PROG_CXX @@ -183,6 +183,9 @@ if test $build_elfutils = no; then 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 -lebl -Wl,--end-group -lelf]) + AC_CHECK_LIB(dw, dwarf_getelf,[],[ + AC_MSG_ERROR([elfutils, libdw too old, need 0.126+])], + [-Wl,--start-group -ldw -lebl -Wl,--end-group -lelf]) stap_LIBS="-Wl,--start-group -ldw -lebl -Wl,--end-group -lelf" LIBS="$save_LIBS" else diff --git a/runtime/ChangeLog b/runtime/ChangeLog index 6ff15b8a..97b1a0c0 100644 --- a/runtime/ChangeLog +++ b/runtime/ChangeLog @@ -1,3 +1,16 @@ +2008-09-10 Frank Ch. Eigler <fche@elastic.org> + + * runtime.h (STP_USE_FRAME_POINTER): Remove architecture #if's. + All will activate it if CONFIG_FRAME_POINTER unless + STP_USE_DWARF_UNWINDER. + * stack-i386.c: (__stp_stack_print): Handle !DWARF and !FRAME + configuration. + +2008-09-10 Mark Wielaard <mjw@redhat.com> + + * sym.h (_stp_module): Rename module_base to dwarf_module_base. + * unwind.c (adjustStartLoc): Document and use dwarf_module_base. + 2008-09-10 Mark Wielaard <mjw@redhat.com> * runtime.h (CONFIG_FRAME_POINTER): Don't enable when diff --git a/runtime/runtime.h b/runtime/runtime.h index db793aa5..cd3d0b11 100644 --- a/runtime/runtime.h +++ b/runtime/runtime.h @@ -69,15 +69,13 @@ static struct #ifdef CONFIG_FRAME_POINTER /* Just because frame pointers are available does not mean we can trust them. */ #ifndef STP_USE_DWARF_UNWINDER -#if defined (__i386__) || defined (__arm__) #define STP_USE_FRAME_POINTER #endif #endif -#endif /* dwarf unwinder only tested so far on i386 and x86_64, but globally disabled for now */ -#if 0 +#if 0 // !defined(STP_USE_FRAME_BUFFER) && (defined(__i386__) || defined(__x86_64__)) #define STP_USE_DWARF_UNWINDER #endif diff --git a/runtime/stack-i386.c b/runtime/stack-i386.c index ad101889..ed7e2ce1 100644 --- a/runtime/stack-i386.c +++ b/runtime/stack-i386.c @@ -54,9 +54,10 @@ static void __stp_stack_print (struct pt_regs *regs, int verbose, int levels) fp = next_fp; } #else +#ifdef STP_USE_DWARF_UNWINDER struct unwind_frame_info info; arch_unw_init_frame_info(&info, regs); - + while (levels && !arch_unw_user_mode(&info)) { int ret = unwind(&info); dbug_unwind(1, "ret=%d PC=%lx SP=%lx\n", ret, UNW_PC(&info), UNW_SP(&info)); @@ -71,5 +72,8 @@ static void __stp_stack_print (struct pt_regs *regs, int verbose, int levels) _stp_stack_print_fallback(context, UNW_SP(&info), verbose, levels); break; } +#else /* ! STP_USE_DWARF_UNWINDER */ + _stp_stack_print_fallback(context, (unsigned long)®_SP(regs), verbose, levels); #endif /* STP_USE_FRAME_POINTER */ +#endif } diff --git a/runtime/sym.h b/runtime/sym.h index 564f4eb2..5888d2c7 100644 --- a/runtime/sym.h +++ b/runtime/sym.h @@ -33,8 +33,11 @@ struct _stp_module { /* any notifier hooks that will tell us when a module */ /* is unloading. */ unsigned long module; /* XXX: why not struct module * ? */ - - unsigned long module_base; + + /* This is to undo .debug_frame relocation performed by elfutils, */ + /* which is done during the translate phase when we encode the */ + /* unwind data into the module. See adjustStartLoc() in unwind.c. */ + unsigned long dwarf_module_base; /* the stack unwind data for this module */ void *unwind_data; diff --git a/runtime/unwind.c b/runtime/unwind.c index db8ae664..bc8a93dc 100644 --- a/runtime/unwind.c +++ b/runtime/unwind.c @@ -550,7 +550,9 @@ static int processCFI(const u8 *start, const u8 *end, unsigned long targetLoc, s return result && ptr.p8 == end && (targetLoc == 0 || state->label == NULL); } -// This is an address inside a module, adjust. +// If this is an address inside a module, adjust for section relocation +// and the elfutils base relocation done during loading of the .dwarf_frame +// in translate.cxx. static unsigned long adjustStartLoc (unsigned long startLoc, struct _stp_module *m, @@ -560,7 +562,7 @@ adjustStartLoc (unsigned long startLoc, { startLoc = _stp_module_relocate (m->name, s->name, startLoc); - startLoc -= m->module_base; + startLoc -= m->dwarf_module_base; } return startLoc; } diff --git a/systemtap.spec b/systemtap.spec index e9050d77..4a7d2b4a 100644 --- a/systemtap.spec +++ b/systemtap.spec @@ -45,7 +45,6 @@ Requires: crash %if %{with_docs} BuildRequires: /usr/bin/latex /usr/bin/dvips /usr/bin/ps2pdf latex2html %endif -Requires: avahi-tools nc %description SystemTap is an instrumentation system for systems running Linux 2.6. @@ -59,7 +58,6 @@ License: GPLv2+ URL: http://sourceware.org/systemtap/ Requires: kernel >= 2.6.9-11 Requires(pre): shadow-utils -Requires: avahi-tools nc %description runtime SystemTap runtime is the runtime component of an instrumentation @@ -77,6 +75,32 @@ Requires: systemtap dejagnu 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-tools nc mktemp + +%description client +SystemTap client is the client component of an instrumentation +system for systems running Linux 2.6. Developers can write +instrumentation to collect data on the operation of the system. + +%package server +Summary: Instrumentation System Server +Group: Development/System +License: GPLv2+ +URL: http://sourceware.org/systemtap/ +Requires: systemtap +Requires: avahi-tools nc net-tools mktemp + +%description server +SystemTap server is the server component of an instrumentation +system for systems running Linux 2.6. Developers can write +instrumentation to collect data on the operation of the system. + %prep %setup -q %{?setup_elfutils} @@ -183,8 +207,6 @@ exit 0 %endif %{_bindir}/stap -%{_bindir}/stap-server -%{_bindir}/stap-serverd %{_mandir}/man1/* %{_mandir}/man5/* @@ -205,13 +227,8 @@ exit 0 %files runtime %defattr(-,root,root) %attr(4111,root,root) %{_bindir}/staprun -%{_bindir}/stap-client -%{_bindir}/stap-find-servers -%{_bindir}/stap-start-server -%{_bindir}/stap-find-or-start-server -%{_bindir}/stap-stop-server %{_libexecdir}/%{name} -%{_mandir}/man8/* +%{_mandir}/man8/staprun.8* %doc README AUTHORS NEWS COPYING @@ -219,6 +236,20 @@ exit 0 %defattr(-,root,root) %{_datadir}/%{name}/testsuite +%files client +%defattr(-,root,root) +%{_bindir}/stap-client +%{_bindir}/stap-find-servers +%{_bindir}/stap-find-or-start-server +%{_mandir}/man8/stap-server.8* + +%files server +%defattr(-,root,root) +%{_bindir}/stap-server +%{_bindir}/stap-serverd +%{_bindir}/stap-start-server +%{_bindir}/stap-stop-server +%{_mandir}/man8/stap-server.8* %changelog * Tue Jul 15 2008 Frank Ch. Eigler <fche@redhat.com> - 0.7-1 diff --git a/translate.cxx b/translate.cxx index c1e56dcf..64308fe3 100644 --- a/translate.cxx +++ b/translate.cxx @@ -4551,7 +4551,7 @@ dump_unwindsyms (Dwfl_Module *m, c->output << "struct _stp_module _stp_module_" << stpmod_idx << " = {" << endl; c->output << ".name = " << lex_cast_qstring (modname) << ", " << endl; - c->output << ".module_base = 0x" << hex << base << dec << ", " << endl; + c->output << ".dwarf_module_base = 0x" << hex << base << dec << ", " << endl; if (unwind != NULL) { |