WIP support for pure-userspace stap through dyninst

This is an early prototype of having a SystemTap mode that operates
purely in userspace, using the Dyninst library to place instrumentation.
There is much more to do - please see the stapdyn/README and TODO files
for details.
stapdyn: Add to configure and Makefile

This is my rough attempt to bring stapdyn and dynsdt into the build.
Now configure can take --with-dyninst=DIR to set the location of Dyninst
headers and libraries.  This doesn't yet try to be arch-aware, only
x86_64.  It's also only looking for a build-tree layout, not distro-
installed dyninst files.

* Makefile.am: Add stapdyn and dynsdt to the build.
* configure: Process --with-dyninst, with a mild sanity check.
* README: Note DYNINSTAPI_RT_LIB and suggest LD_LIBRARY_PATH.
* TODO: Mark this task partially done.
* ...: Update all other autoreconf-generated files too.
stapdyn: Excise the hard-coded STAPDYN flag

This introduces a new --runtime=dyninst option to select this mode
dynamically.  All the places that had compiled #ifdef STAPDYN checks are
now toggled with a session variable based on this option.

A few places in runtime/ and translator-generated code are now using
__KERNEL__ to differentiate modes when necessary.
stapdyn: install runtime/dyninst/*.[ch]
stapdyn: Note TODOs for remote and csclient modes.
Merge remote-tracking branch 'origin/master' into jistone/stapdyn
stapdyn: Use the renamed fileOffsetToAddr

This is keeping up with dyninst.git master, basically just
s/offsetToAddr/fileOffsetToAddr/
stapdyn: Add semaphore handling to dynsdt

To test data-offset handling, this patch fleshes out SDT semaphore
support in the dynsdt test program.

It actually required a bit of section gymnastics to figure out the raw
file offset of the semaphore, mainly because of the padding between the
load addresses of the text and data segments.

This code appears to work fine tested on a small executable (the
heapsort example, modified to gate on the semaphore).  For unknown
reasons, it doesn't seem to work on the semaphored SDT in libpython.
The semaphore address appears to be computed and value incremented
correctly, but the instrumentation never fires.  The semaphore even
appears already incremented with a simultaneous stap -DDEBUG_UPROBES,
and that handler does fire on the python function probes.  This may be a
case of dyninst failing silently, as it does with longjmp SDT, but more
investigation is required...
PR14179: Move staprun et al. out of runtime/

We will reserve runtime/ for those files that are built into the
stap-generated module, whereas staprun/ contains source for the various
prebuilt executables for running those modules.
PR14179: Merge staprun/configure into the root

We were duplicating some logic by having separate configure files.  The
especially doesn't make sense when you consider that staprun et al. even
build some ../ sources files as well.  Now the configuration is shared
all at once.  (Makefiles are kept separate though, at least for now.)

A few changes to highlight:

- The root configure now uses AC_SYS_LARGEFILE, which makes a more
  informed decision about _FILE_OFFSET_BITS=64.  Thus, rather than being
  forced in stap_CFLAGS, this will now be set in config.h, and only on
  targets that aren't natively 64-bit.

- staprun can now link to the --with-elfutils version of libelf.

- The run-staprun helper script now also passes LD_LIBRARY_PATH through
  sudo, to help the --with-elfutils case.  We generally don't support
  run-stap and run-staprun, except for power users/developers, so those
  people should make sure their environment is clean.
Merge remote-tracking branch 'origin/master' into jistone/pr14179
PR14240: Fixed another uncaught exception warning

lex_cast throws an exception, so calling it in autosprinf() caused
an uncaught exception. We really didn't need to cast the rc as a string
just to print it out.
Add panic tapset

Add a tapset to expose the kernel's panic() routine.
testsuite: activate buildok/pretty-uprobes.stp test

Its permissions needed +x.
tapset: panic() and friends

* doc/SystemTap_Tapset_Reference/tapsets.tmpl: Pull in panic.stp.
* tapset/guru-delay.stp: Fix typo.
* tapset/panic.stp: Fix 'nother super important typo.
* testsuite/buildok/guru.stp: Build-test the bad boys.
Add -lpthread to stap_serverd_LDADD.

Since we use sem_getvalue () in stap-serverd.cxx we should explicitly
link against libpthread.so.

Reported-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Mark Wielaard <mjw@redhat.com>
Regenerate examples index.

Adds process/psig.stp and network/netfilter_drop.stp.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
tweak authorship credits

The little commit f7707c31 was also previously produced by Jiry Slaby.
Fix typos.
PR10299: fix additional cases of variables emitted without a mangler.