9 years agoDataflowAPI-related Power Linux build fixes
Todd Frederick [Fri, 1 Apr 2011 19:46:59 +0000 (14:46 -0500)]
DataflowAPI-related Power Linux build fixes

9 years agoFix for forwarding signals to processes on Linux.
Daniel McNulty [Thu, 24 Mar 2011 21:51:43 +0000 (16:51 -0500)]
Fix for forwarding signals to processes on Linux.

9 years agoFix for forwarding signals to processes on FreeBSD
Dan McNulty [Thu, 24 Mar 2011 21:09:21 +0000 (16:09 -0500)]
Fix for forwarding signals to processes on FreeBSD

9 years agoEnable stack tests on FreeBSD.
Dan McNulty [Thu, 24 Mar 2011 20:22:46 +0000 (15:22 -0500)]
Enable stack tests on FreeBSD.

Also includes a fix for the FreeBSD signal handler stepper.

This is Todd's work, I am just committing it.

9 years agoMerge branch 'dyn_pc_integration' of ssh://git.dyninst.org/pub/dyninst into dyn_pc_in...
Daniel McNulty [Wed, 23 Mar 2011 18:26:35 +0000 (13:26 -0500)]
Merge branch 'dyn_pc_integration' of ssh://git.dyninst.org/pub/dyninst into dyn_pc_integration

9 years agoMerge branch 'dyn_pc_integration' of ssh://wasabi.cs.wisc.edu/p/paradyn/development...
Dan McNulty [Wed, 23 Mar 2011 18:21:30 +0000 (13:21 -0500)]
Merge branch 'dyn_pc_integration' of ssh://wasabi.cs.wisc.edu/p/paradyn/development/mcnulty/d0/dyninst into dyn_pc_integration

9 years agoFix for generating a call using insnCodeGen::generatePush64
Dan McNulty [Wed, 23 Mar 2011 18:18:16 +0000 (13:18 -0500)]
Fix for generating a call using insnCodeGen::generatePush64

We were incorrectly doing a cast of a 16-bit value to an unsigned char
and then assigning it to a short in generatePush64. This was causing
code generated to jump to trampolines to be incorrect.

Also includes some fixes specific to FreeBSD.

Improves some error handling and reporting in inferiorMalloc and
attaching to a non-existent process.

9 years agoAnother stack analysis fix from Kevin - summarize
Todd Frederick [Tue, 22 Mar 2011 21:41:52 +0000 (16:41 -0500)]
Another stack analysis fix from Kevin - summarize

9 years agoFreeBSD signal handler frame stepping
Todd Frederick [Tue, 22 Mar 2011 21:32:34 +0000 (16:32 -0500)]
FreeBSD signal handler frame stepping

9 years agoStack analysis fix from Kevin
Todd Frederick [Wed, 16 Mar 2011 20:44:53 +0000 (15:44 -0500)]
Stack analysis fix from Kevin

9 years agoFix bad merge in proccontrol
Todd Frederick [Wed, 16 Mar 2011 17:58:42 +0000 (12:58 -0500)]
Fix bad merge in proccontrol

9 years agoBuild fix for Linux Stackwalker.
Daniel McNulty [Tue, 15 Mar 2011 22:30:29 +0000 (17:30 -0500)]
Build fix for Linux Stackwalker.

9 years agoFixes for FreeBSD bugs introduced by last merge.
Dan McNulty [Tue, 15 Mar 2011 21:46:10 +0000 (16:46 -0500)]
Fixes for FreeBSD bugs introduced by last merge.

9 years agoMerge branch 'dyn_pc_integration' of ssh://wasabi.cs.wisc.edu/p/paradyn/development...
Dan McNulty [Tue, 15 Mar 2011 19:50:50 +0000 (14:50 -0500)]
Merge branch 'dyn_pc_integration' of ssh://wasabi.cs.wisc.edu/p/paradyn/development/mcnulty/d0/dyninst into dyn_pc_integration


9 years agoInitial support for dynamic instrumentation on FreeBSD.
Dan McNulty [Tue, 15 Mar 2011 19:42:34 +0000 (14:42 -0500)]
Initial support for dynamic instrumentation on FreeBSD.

This support is non-functional right now, it is a WIP.

Includes a fair amount of refactoring to share code between
Linux and FreeBSD.

Refactored syscallNotification to be platform-independent except
for names of system call functions.

Small fix for ProcControlAPI on FreeBSD where a thread wasn't being
resumed after all other threads in a process had already exited.

9 years agoMerge branch 'dyn_pc_integration' of ssh://git.dyninst.org/pub/dyninst into dyn_pc_in...
Daniel McNulty [Wed, 9 Mar 2011 21:55:25 +0000 (15:55 -0600)]
Merge branch 'dyn_pc_integration' of ssh://git.dyninst.org/pub/dyninst into dyn_pc_integration

9 years agoMerge branch 'dyn_pc_integration' of ssh://mcnulty@wasabi.cs.wisc.edu/p/paradyn/devel...
Daniel McNulty [Wed, 9 Mar 2011 21:51:54 +0000 (15:51 -0600)]
Merge branch 'dyn_pc_integration' of ssh://mcnulty@wasabi.cs.wisc.edu/p/paradyn/development/mcnulty/d0/dyninst into dyn_pc_integration

9 years agoProcControlAPI single-stepping support for ppc Linux
Daniel McNulty [Wed, 9 Mar 2011 21:32:16 +0000 (15:32 -0600)]
ProcControlAPI single-stepping support for ppc Linux

There were five sets of changes that go into providing single-stepping
support on ppc Linux. Single-stepping on ppc Linux requires being able
to detect atomic instruction sequences and use breakpoints to
effectively single step these instructions as a group.

1) Added an emulated single-step internal feature to support single
stepping with breakpoints. This required a new class emulated_singlestep
that represents a collection of int_breakpoints that are added to and
removed from a process as a whole. An emulated_singlestep can include
multiple breakpoints because the atomic instruction sequences can
contain control transfers. This also involved significant changes to
the breakpoint handlers to remove a emulated_singlestep after it
has been hit.

2) Bug fixes for when multiple threads hit a breakpoint before it is
handled. Before, a single step breakpoint would be removed in a
handler and a following Breakpoint event would go to work with the
breakpoint and run into problems. The fix was to store threads that
are currently clearing an installed_breakpoint with the
installed_breakpoint. Then, when removing the breakpoint, it is not
uninstalled until all threads and int_breakpoints no longer are
using the installed_breakpoint.

3) Bug fixes for reading registers from a pre-exited thread. This
causes an oops on ppc Linux and the kernel kills the thread that
attempted to read the registers. The workaround was to avoid
reading registers on a pre-exited thread on ppc Linux.

4) Added field to int_thread to store a pc before a single step on
ppc Linux. This field is needed to distinguish a single step to
an instruction that is a breakpoint and a single step that triggers
a breakpoint. In both cases, the PC after the corresponding trap
is the same.

5) Added code specific to ppc Linux to detect atomic instruction
sequences. This detection occurs immediately before attempting to
single step a thread. If a sequence is detected, the insertion of
the breakpoint is deferred until a process stop if other threads
are currently running. This deferred-process stop is triggered
with an asynchronous event PrepSingleStep.

9 years agoUpdate stack analysis from Defensive branch
Todd Frederick [Wed, 9 Mar 2011 21:16:09 +0000 (15:16 -0600)]
Update stack analysis from Defensive branch

Also fixes Stackwalker walking with stack analysis

9 years agoFixes to thread_db support for FreeBSD
Dan McNulty [Tue, 8 Mar 2011 15:21:29 +0000 (09:21 -0600)]
Fixes to thread_db support for FreeBSD

The most recent set of changes to the thread_db integration did not
work on FreeBSD. This commit fixes these bugs.

The biggest change is that FreeBSD needs to use PT_RESUME and PT_SUSPEND
to change the running state of threads once a process is stopped.

Also includes some changes to the thread test to account for a
difference in thread events and information available on FreeBSD.

9 years agoStackwalker/Dyninst Linux/ppc64 support fixes
Todd Frederick [Wed, 2 Mar 2011 21:32:55 +0000 (15:32 -0600)]
Stackwalker/Dyninst Linux/ppc64 support fixes

9 years agoMerge branch 'dyn_pc_integration' of ssh://mcnulty@wasabi.cs.wisc.edu/p/paradyn/devel...
Daniel McNulty [Fri, 25 Feb 2011 18:30:35 +0000 (12:30 -0600)]
Merge branch 'dyn_pc_integration' of ssh://mcnulty@wasabi.cs.wisc.edu/p/paradyn/development/mcnulty/d0/dyninst into dyn_pc_integration

9 years agoFix for determining if the process has passed main on ppc64 Linux.
Daniel McNulty [Fri, 25 Feb 2011 18:28:03 +0000 (12:28 -0600)]
Fix for determining if the process has passed main on ppc64 Linux.

To determine if the process is passed main, we determine the
entry addr of the dynamic linker and compare it to the pc of
the process. In the create case, these two values match indicating
that the process hasn't passed main.

On ppc64 Linux, the entry addr is actually the address of the opd
for the first function executed by the dynamic linker. This commit
adds code to dereference the entry addr, if necessary.

9 years agoFix for force loading RT library via an iRPC
Daniel McNulty [Fri, 25 Feb 2011 18:17:54 +0000 (12:17 -0600)]
Fix for force loading RT library via an iRPC

When libc and ld.so are stripped, our heuristics for identifying
a dlopen-like function to load the RT library were failing.

This commit adds functionality to use the __libc_dlopen_mode
function when libc is stripped. This function is exported via the
dynamic symbol table so it will be there even when the library
is stripped.

This approach is only used when symbols are not available because
it relies on an internal libc flag (__RTLD_DLOPEN) for correct
functionality on x86. See the comments in the code for more info.

9 years agoProcControlAPI on ppc64_linux
Daniel McNulty [Thu, 24 Feb 2011 18:28:21 +0000 (12:28 -0600)]
ProcControlAPI on ppc64_linux

Changes to account for ppc64's function pointer representation.
- the breakpoint address read out of the dynamic linker is a function
- the breakpoint addresses returned by thread_db are function pointers
- the addresses passed from the mutatee to the mutator in the
  proccontrol testsuite are function pointers

The iRPC test also requires the TOC value of the target function in
the mutatee to correctly construct the call.

9 years agoInitial PPC64/Linux Dyninst/Stackwalker support
Todd Frederick [Wed, 23 Feb 2011 21:45:24 +0000 (15:45 -0600)]
Initial PPC64/Linux Dyninst/Stackwalker support

9 years agoFix address width calculation on big-endian systems
Todd Frederick [Tue, 22 Feb 2011 21:44:48 +0000 (15:44 -0600)]
Fix address width calculation on big-endian systems

9 years agoMerge branch 'dyninst-master' into dyn_pc_integration
Todd Frederick [Tue, 22 Feb 2011 18:38:53 +0000 (12:38 -0600)]
Merge branch 'dyninst-master' into dyn_pc_integration


9 years agoPPC64/Linux build support
Todd Frederick [Mon, 21 Feb 2011 21:47:23 +0000 (15:47 -0600)]
PPC64/Linux build support

9 years agoDisable test_stack_4 on PPC/Linux
Todd Frederick [Mon, 21 Feb 2011 20:21:10 +0000 (14:21 -0600)]
Disable test_stack_4 on PPC/Linux

Because signal handler frame stepping is not yet implemented on this platform

9 years agoChange MachRegister::getFramePointer to return PPC's r1 register instead of FrameBase.
Daniel McNulty [Mon, 21 Feb 2011 19:16:13 +0000 (13:16 -0600)]
Change MachRegister::getFramePointer to return PPC's r1 register instead of FrameBase.

9 years agoFix for test_pt_ls
Daniel McNulty [Mon, 21 Feb 2011 18:54:19 +0000 (12:54 -0600)]
Fix for test_pt_ls

test_pt_ls was always running the create mode tests even when -create was not
specified. This change modifies the test so it only runs the create mode tests
when -create is specified.

This behavior was resulting in failures on FreeBSD where create mode is
currently unsupported.

9 years agoMerge branch 'dyn_pc_integration' of ssh://wasabi.cs.wisc.edu/p/paradyn/development...
Dan McNulty [Mon, 21 Feb 2011 18:20:26 +0000 (12:20 -0600)]
Merge branch 'dyn_pc_integration' of ssh://wasabi.cs.wisc.edu/p/paradyn/development/mcnulty/d0/dyninst into dyn_pc_integration

9 years agoInitial PPC32/Linux Dyninst/Stackwalker integration
Todd Frederick [Mon, 21 Feb 2011 17:54:27 +0000 (11:54 -0600)]
Initial PPC32/Linux Dyninst/Stackwalker integration

9 years agoContributed StackwalkerAPI documentation fix
Todd Frederick [Fri, 18 Feb 2011 22:55:45 +0000 (16:55 -0600)]
Contributed StackwalkerAPI documentation fix

9 years agoUpdate StackwalkerAPI 2.0 documentation
Todd Frederick [Fri, 18 Feb 2011 21:24:24 +0000 (15:24 -0600)]
Update StackwalkerAPI 2.0 documentation

9 years agoDisabling ppc64 rewriter tests
Madhavi Krishnan [Fri, 18 Feb 2011 20:31:44 +0000 (14:31 -0600)]
Disabling ppc64 rewriter tests

Rewriter tests are disabled for ppc64 platform for 7.0 release.

9 years agoMerge branch 'dyn_pc_integration' of ssh://wasabi.cs.wisc.edu/p/paradyn/development...
Dan McNulty [Thu, 17 Feb 2011 20:54:45 +0000 (14:54 -0600)]
Merge branch 'dyn_pc_integration' of ssh://wasabi.cs.wisc.edu/p/paradyn/development/mcnulty/d0/dyninst into dyn_pc_integration


9 years agoStackwalker AnalysisStepper and SigHandlerStepper corrections
Todd Frederick [Wed, 16 Feb 2011 16:17:28 +0000 (10:17 -0600)]
Stackwalker AnalysisStepper and SigHandlerStepper corrections

* The frame sizes for signals handlers were set incorrectly
* In the analysis stepper, the frame pointer was being calculated incorrectly

9 years agoSeparate Stackwalker frame steppers for Dyninst static and dynamic instrumentation
Todd Frederick [Mon, 7 Feb 2011 19:07:09 +0000 (13:07 -0600)]
Separate Stackwalker frame steppers for Dyninst static and dynamic instrumentation

9 years agoMinor fixes for building on Linux x86 introduced by previous commit.
Daniel McNulty [Wed, 16 Feb 2011 19:32:45 +0000 (13:32 -0600)]
Minor fixes for building on Linux x86 introduced by previous commit.

9 years agoEnabling DyninstAPI with ProcControlAPi on power Linux
Daniel McNulty [Wed, 16 Feb 2011 19:02:18 +0000 (13:02 -0600)]
Enabling DyninstAPI with ProcControlAPi on power Linux

Refactored RegisterConversion to allow a uniform interface for
converting Dyninst Register representations to ProcControlAPI's
MachRegister representations.

Refactored RT library load AST creation to linux.C as most of it
is not architecture specific (the only remaining architecture
specific functionality is in createUnprotectStackAST).

Removed syscall tracing as it is no longer required to locate main. The
syscall tracing was used to determine when libc was loaded. When this
occurs, we could determine the location of main from libc, if we can't
determine its address from our other heuristics. ProcControlAPI gives
us events when libc is loaded so we don't need to trace system calls
to get this event.

Removed vsyscall indentification from Dyninst -- this is now provided
by StackwalkerAPI.

Removed some old process control code from StackWalker to get it building
on Power Linux. This code is no longer needed with the integration of
ProcControlAPI into StackWalker.

9 years agoppc32_linux support to ProcControlAPI
Daniel McNulty [Tue, 15 Feb 2011 22:33:07 +0000 (16:33 -0600)]
ppc32_linux support to ProcControlAPI

Refactored arch specific process class to x86_process to be arch_process
so multiple architectures can be supported for a single OS (Linux in
this case).

Implemented mmap and munmap snippets for both ppc32_linux and

Implemented register access for ppc32_linux and ppc64_linux.

Added test iRPC snippets for ppc32 and ppc64 to pc_irpc.

Fixed a bug with pc_thread.

All ProcControl tests pass except for pc_singlestep. pc_singlestep
is not terminating due to a special case required to single step
an atomic instruction sequence (bookended by lwarx, stwcx.). More
to come on this soon.

9 years agoFix rewriter test failures
Madhavi Krishnan [Tue, 15 Feb 2011 17:44:52 +0000 (11:44 -0600)]
Fix rewriter test failures

In my previous commit, the arguments for rewritten binary included
"-attach" by mistake. This caused the rewriter tests to fail. Fixed.

9 years agoEnable extra output during build and tests.
Ray Chen [Fri, 11 Feb 2011 23:22:04 +0000 (18:22 -0500)]
Enable extra output during build and tests.

Print information about user, host, platform environment string, and date
to support loading data from a single machine regarding multiple platforms.

9 years agoEnable ProcControl testsuite on Power Linux
Daniel McNulty [Fri, 11 Feb 2011 21:22:01 +0000 (15:22 -0600)]
Enable ProcControl testsuite on Power Linux

9 years agoMinor fix for ProcControlAPI
Daniel McNulty [Fri, 11 Feb 2011 20:43:10 +0000 (14:43 -0600)]
Minor fix for ProcControlAPI

Fixes a compiler warning and moves some Linux specific event handling to a
Linux specific handler for the correct event (the handling code was being
executed for both pre-LWPDestroy and pre-UserThreadDestroy events, when it only
needed to execute for pre-LWPDestroy).

9 years agoUpdate distclean make target for parseThat and testsuite directores.
Ray Chen [Fri, 11 Feb 2011 12:34:45 +0000 (07:34 -0500)]
Update distclean make target for parseThat and testsuite directores.

9 years agoUpdate .gitignore files
Ray Chen [Fri, 11 Feb 2011 12:32:44 +0000 (07:32 -0500)]
Update .gitignore files

This makes "git status" more reasonable after building the testsuite.

9 years agoParsing performance improvement.
Ray Chen [Thu, 10 Feb 2011 22:47:20 +0000 (17:47 -0500)]
Parsing performance improvement.

The destructor for an IA_IAPI object at local scope inside the parsing
loop was determined to be responsible for 5-9% of total parsing time.

By replacing the IA_IAPI internal stl::map with an stl::vector, we are
able to move the object outside the loop, and reset it in constant time.

Thanks to Nate for finding and solving this problem.

9 years agoBuild fix for UMD machines.
Ray Chen [Thu, 10 Feb 2011 20:40:01 +0000 (15:40 -0500)]
Build fix for UMD machines.

UMD systems require limits.h for PATH_MAX to exist.

9 years agoBGP testsuite changes.
Madhavi Krishnan [Wed, 9 Feb 2011 21:02:14 +0000 (15:02 -0600)]
BGP testsuite changes.

Removing additional mpirun command.

9 years agoChanges to Dyninst to use the new thread information and events provided by
Daniel McNulty [Wed, 9 Feb 2011 19:48:52 +0000 (13:48 -0600)]
Changes to Dyninst to use the new thread information and events provided by

Modified PCThread and BPatch_thread so PCThread now encapsulates any
functionality required to extract thread information from a process instead of

PCEventHandler now creates and destroys PCThreads using the thread events
provided by ProcControlAPI, agnostic of the events actually available on a

The RT library now uses thread ids instead of lwp ids when locating a tramp
guard for a thread.

Also, fixes a bug in the ProcControl testsuite component where file
descriptors weren't being closed -- this was causing tests to fail when
run in combination with Dyninst.

9 years agoBGP testsuite changes
Madhavi Krishnan [Wed, 9 Feb 2011 18:31:00 +0000 (12:31 -0600)]
BGP testsuite changes

Matt's changes and bugs fixes to testsuite for running on LLNL BGP machine.

9 years agoMerge branch 'master' of legendre@git.dyninst.org:/pub/dyninst
Matthew P. Legendre [Tue, 8 Feb 2011 23:40:09 +0000 (15:40 -0800)]
Merge branch 'master' of legendre@git.dyninst.org:/pub/dyninst

9 years agoFix StackwalkerAPI segfault when looking up symbol names in libraries without symbol...
Matthew P. Legendre [Tue, 8 Feb 2011 23:35:37 +0000 (15:35 -0800)]
Fix StackwalkerAPI segfault when looking up symbol names in libraries without symbol tables.

9 years agoWork in progress on getting Stackwalker and Dyninst on FreeBSD.
Dan McNulty [Tue, 8 Feb 2011 21:59:56 +0000 (15:59 -0600)]
Work in progress on getting Stackwalker and Dyninst on FreeBSD.

9 years agoMerge branch 'master' of git.dyninst.org:/pub/dyninst
Andrew Bernat [Mon, 7 Feb 2011 18:29:50 +0000 (12:29 -0600)]
Merge branch 'master' of git.dyninst.org:/pub/dyninst

9 years agoEnable the ppc64_linux testsuite platform.
Ray Chen [Thu, 3 Feb 2011 23:08:11 +0000 (18:08 -0500)]
Enable the ppc64_linux testsuite platform.

Modifies ppc return instruction slicing to be ABI generic.  Enables correct
ABI flag when building ppc64_linux mutatees.

Also fixes 32-bit ABI flags for Intel and Portland Group compilers.

9 years agoAdd new method to ProcControl: allThreadsRunningWhenAttached
Daniel McNulty [Thu, 3 Feb 2011 19:25:13 +0000 (13:25 -0600)]
Add new method to ProcControl: allThreadsRunningWhenAttached

This methods is needed by Dyninst to implement
BPatch_process::wasRunningWhenAttached method. This functionality makes the
most sense in ProcControl because it requires querying the OS for the current
state of threads before they are attached. This is inherently

9 years agoFixes for new thread_db support on Linux
Daniel McNulty [Thu, 3 Feb 2011 15:58:09 +0000 (09:58 -0600)]
Fixes for new thread_db support on Linux

Fixed a few minor issues with ThreadDestroy and its derived classes. Updated
the tests to use these new events correctly.

Fixed a few bugs with debugging 32-bit debuggees from 64-bit processes
using thread_db. Implemented ps_lgetregs proc_service interface function.

9 years agoMerge branch 'dyn_pc_integration' of ssh://git.dyninst.org/pub/dyninst into dyn_pc_in...
Daniel McNulty [Wed, 2 Feb 2011 20:59:50 +0000 (14:59 -0600)]
Merge branch 'dyn_pc_integration' of ssh://git.dyninst.org/pub/dyninst into dyn_pc_integration

9 years agoMerge branch 'dyn_pc_integration' of legendre@git.dyninst.org:/pub/dyninst into dyn_p...
Matthew P. Legendre [Wed, 2 Feb 2011 19:02:34 +0000 (11:02 -0800)]
Merge branch 'dyn_pc_integration' of legendre@git.dyninst.org:/pub/dyninst into dyn_pc_integration

9 years agoFix issue where parallel make could build parseThat before Dyninst
Matthew P. Legendre [Wed, 2 Feb 2011 19:02:03 +0000 (11:02 -0800)]
Fix issue where parallel make could build parseThat before Dyninst

9 years agoFix Dyninst Stackwalker initialization
Todd Frederick [Wed, 2 Feb 2011 16:56:27 +0000 (10:56 -0600)]
Fix Dyninst Stackwalker initialization

Stackwalker must be initialized after the initial mapped objects so
stack bottom locations will be detected in stripped binaries.

9 years agoBuild fixes for UMD compilers
Matt Legendre [Tue, 1 Feb 2011 17:51:49 +0000 (12:51 -0500)]
Build fixes for UMD compilers

9 years agoMerge branch 'dyn_pc_integration' of ssh://git.dyninst.org/pub/dyninst into dyn_pc_in...
Daniel McNulty [Tue, 1 Feb 2011 16:09:59 +0000 (10:09 -0600)]
Merge branch 'dyn_pc_integration' of ssh://git.dyninst.org/pub/dyninst into dyn_pc_integration

9 years agoTrap-based instrumentation using control transfer breakpoints for dynamic
Daniel McNulty [Tue, 1 Feb 2011 15:56:34 +0000 (09:56 -0600)]
Trap-based instrumentation using control transfer breakpoints for dynamic

Adds some hooks to AddressSpace to allow the PCProcess to insert
control transfer breakpoints when a trap mapping is added. These hooks
don't do anything in BinaryEdit at the moment.

Also adds some handling for control-transfer breakpoints; the
corresponding events don't require user interaction so the ProcControl
event for these breakpoints is handled by the callback thread and
not passed to the Dyninst user.

9 years agoImplementation of control-transfer breakpoints
Daniel McNulty [Tue, 1 Feb 2011 15:50:49 +0000 (09:50 -0600)]
Implementation of control-transfer breakpoints

A control transfer breakpoint is a breakpoint where after the
breakpoint is hit, we change the PC to a pre-defined address. This
required adding some code to the HandlePostBreakpoint event handler
to set the PC to this pre-defined address when handling a control
transfer breakpoint.

Also includes a small fix for cases when the execv fails on Unix
platforms. The child fails the exec and exits. At exit, the ProcControl
library teardown code kicks in and was deadlocking on the ProcPool
lock. The solution was to unlock the ProcPool lock in the child
before the exec.

9 years agoFix issue where StackwalkerAPI build would finish everything, but then exit with...
Matthew P. Legendre [Tue, 1 Feb 2011 00:23:40 +0000 (16:23 -0800)]
Fix issue where StackwalkerAPI build would finish everything, but then exit with an error when testsuite directory was missing.

9 years agoFixes for accessing local variable via StackwalkerAPI
Matthew P. Legendre [Mon, 31 Jan 2011 23:47:19 +0000 (15:47 -0800)]
Fixes for accessing local variable via StackwalkerAPI

9 years agoDyninst frame object cleanup
Todd Frederick [Mon, 31 Jan 2011 20:31:23 +0000 (14:31 -0600)]
Dyninst frame object cleanup

9 years agoMerge branch 'dyn_pc_integration' of git.dyninst.org:/pub/dyninst into dyn_pc_integration
Matthew P. Legendre [Mon, 31 Jan 2011 19:32:52 +0000 (11:32 -0800)]
Merge branch 'dyn_pc_integration' of git.dyninst.org:/pub/dyninst into dyn_pc_integration

9 years agoRe-structure top level build system to be more component aware
Matthew P. Legendre [Mon, 31 Jan 2011 18:45:14 +0000 (10:45 -0800)]
Re-structure top level build system to be more component aware

9 years agoMerge ../../thrdb/dyninst into HEAD
Matthew P. Legendre [Sat, 29 Jan 2011 00:06:11 +0000 (16:06 -0800)]
Merge ../../thrdb/dyninst into HEAD



9 years agoLabel Stackwalker frames with outgoing stepper
Todd Frederick [Fri, 28 Jan 2011 17:01:43 +0000 (11:01 -0600)]
Label Stackwalker frames with outgoing stepper

9 years agoMerge branch 'pcint' into dyn_pc_integration
Daniel McNulty [Wed, 26 Jan 2011 21:21:42 +0000 (15:21 -0600)]
Merge branch 'pcint' into dyn_pc_integration


9 years agoAdd test_stack_4
Todd Frederick [Wed, 26 Jan 2011 18:34:29 +0000 (12:34 -0600)]
Add test_stack_4

Tests stackwalking out of an entry-instrumented signal handler

9 years agoFix Stackwalker DebugStepper and allow changing the default SymReader
Todd Frederick [Wed, 26 Jan 2011 18:30:40 +0000 (12:30 -0600)]
Fix Stackwalker DebugStepper and allow changing the default SymReader

9 years agoImplement Stackwalker frame stepper helpers for Dyninst
Todd Frederick [Wed, 19 Jan 2011 19:04:31 +0000 (13:04 -0600)]
Implement Stackwalker frame stepper helpers for Dyninst

9 years agoFix improperly inlined Dwarf wrapper functions
Todd Frederick [Wed, 12 Jan 2011 15:37:09 +0000 (09:37 -0600)]
Fix improperly inlined Dwarf wrapper functions

9 years agoConvert Dyninst to use StackwalkerAPI
Todd Frederick [Mon, 29 Nov 2010 14:32:36 +0000 (08:32 -0600)]
Convert Dyninst to use StackwalkerAPI

9 years agoFix a bug with LD_PRELOAD, add some debugging support code, small changes to
Daniel McNulty [Wed, 26 Jan 2011 15:52:22 +0000 (09:52 -0600)]
Fix a bug with LD_PRELOAD, add some debugging support code, small changes to

Modified the test_driver to do program_teardown after all the tests for a
specific module (aka Dyninst, Symtab, etc) have been run instead of when all
the tests for all modules have been executed. In the Dyninst component's
teardown, the BPatch object is destructed which in turn makes sure the
callback thread exits. If this doesn't occur before ProcControl tests are
executed, the callback thread will interfere with the event handling
performed by the user thread in the ProcControl tests, causing them to
exhibit confusing behavior.

The LD_PRELOAD cannot be set in the Dyninst parent process when creating a
mutatee because this setting will persist for multiple mutatees. This causes
problems for when working with 32-bit mutatees.

Adds some debugging support code to dump stack walks when a process recieves a
crash signal and debugging output is on.

Modifies the Dyninst break point on Linux to use tkill. It turns out that
there is no guarantee that kill(lwp, signal) will deliver the signal to the
correct lwp. To get this guarantee, we use tkill.

Modified the implementation of the tc_lock_lock in the RT library on Linux.
There was a possible ordering of threads that would result in the lock failing.
I didn't directly observe this ordering, but it could in theory cause problems.

9 years agoMore fixes for ProcControlAPI
Daniel McNulty [Wed, 26 Jan 2011 15:31:17 +0000 (09:31 -0600)]
More fixes for ProcControlAPI

Handling for a few cases of sending stops to exiting threads was missing.  The
first is the pre-exit of the initial thread. It wasn't being marked as exiting
and as such, ProcControl was waiting for pending stops that would never arrive.

The second case is where the stop and the pre-exit occur simultaneously (at
least from ProcControl's perspective). The generator processes the stop before
the pre-exit and as a result, when processing a pre-exit, an assertion was
failing because the thread was expected to be running instead of stopped. The
handling for this case requires setting a flag in the thread when the generator
sees an exit event so the assertion can check for this case.

Finally, when a pre-exit is received before a SIGSTOP (that may never come),
the pre-exit handler needs to mark the process stopped to maintain consistency
between the actual state of the process and the state maintained by

Fixes a bug with proc stopper events (such as a Breakpoint) where a event
would get dropped on the floor when the handler thread attempted to handle
a proc stopper event with a registered callback. Since the event has
a registered callback, the handler cannot handle the event. At this point,
the event is not added back to the collection of proc stopper events. The
solution is to only remove the event from the collection when it can be

9 years agoMerge branch 'master' of ssh://git.dyninst.org/pub/dyninst
Madhavi Krishnan [Mon, 24 Jan 2011 18:17:45 +0000 (12:17 -0600)]
Merge branch 'master' of ssh://git.dyninst.org/pub/dyninst

9 years agoBluegene testsuite fix
Madhavi Krishnan [Mon, 24 Jan 2011 18:17:27 +0000 (12:17 -0600)]
Bluegene testsuite fix

Adding LD_FLAGS (export-dynamic) to ppc32_bgp mutatee makefile -
so that all the functions are exported.

9 years agoMerge branch 'master' of git.dyninst.org:/pub/dyninst
Matthew P. Legendre [Mon, 24 Jan 2011 17:53:54 +0000 (09:53 -0800)]
Merge branch 'master' of git.dyninst.org:/pub/dyninst

9 years agoRemove BlueGene build warning
Matthew P. Legendre [Mon, 24 Jan 2011 17:49:43 +0000 (09:49 -0800)]
Remove BlueGene build warning

9 years agoPrototype fix for incorrect blocks in sharing functions
Andrew Bernat [Mon, 24 Jan 2011 15:55:13 +0000 (09:55 -0600)]
Prototype fix for incorrect blocks in sharing functions

9 years agoMakefiles for bluegene.
Madhavi Krishnan [Sat, 22 Jan 2011 09:50:37 +0000 (03:50 -0600)]
Makefiles for bluegene.

9 years agoMerge branch 'master' of ssh://git.dyninst.org/pub/dyninst
Madhavi Krishnan [Sat, 22 Jan 2011 09:42:57 +0000 (03:42 -0600)]
Merge branch 'master' of ssh://git.dyninst.org/pub/dyninst

9 years agoUpdating testsuite make files
Madhavi Krishnan [Sat, 22 Jan 2011 09:42:38 +0000 (03:42 -0600)]
Updating testsuite make files

This commit updates the tuples file and generated make files
for all the platforms based on my previous commit to spec-grouped.pl.

9 years agoBluegene testsuite fixes.
Madhavi Krishnan [Sat, 22 Jan 2011 09:37:16 +0000 (03:37 -0600)]
Bluegene testsuite fixes.

More fixes to spec for bluegene platform.

9 years agoMerge branch 'master' of legendre@git.dyninst.org:/pub/dyninst
Matthew P. Legendre [Sat, 22 Jan 2011 00:21:39 +0000 (16:21 -0800)]
Merge branch 'master' of legendre@git.dyninst.org:/pub/dyninst



9 years agoBuilt dedicated system for static binary library tracking
Matthew P. Legendre [Sat, 22 Jan 2011 00:16:45 +0000 (16:16 -0800)]
Built dedicated system for static binary library tracking

9 years agoNew debug prints to assist debugging
Matthew P. Legendre [Sat, 22 Jan 2011 00:16:26 +0000 (16:16 -0800)]
New debug prints to assist debugging

9 years agoFix attach hang on BlueGene.
Matthew P. Legendre [Sat, 22 Jan 2011 00:15:52 +0000 (16:15 -0800)]
Fix attach hang on BlueGene.

9 years agoFix libelf usage in BlueGene makefiles
Matthew P. Legendre [Sat, 22 Jan 2011 00:15:37 +0000 (16:15 -0800)]
Fix libelf usage in BlueGene makefiles

9 years agoBluegene testsuite fixes
Madhavi Krishnan [Fri, 21 Jan 2011 18:20:40 +0000 (12:20 -0600)]
Bluegene testsuite fixes

bgxlc compilers output statically linked binaries by default
unless -qnostaticlink flag is specified. As of now, dyninst
can rewrite only dynamically linked binaries on power platforms.
This commit adds -qnostaticlink flag to the testsuite makefile

9 years agoFix for bug in loading RT library during attach on Linux x86/x86_64.
Daniel McNulty [Fri, 21 Jan 2011 17:15:20 +0000 (11:15 -0600)]
Fix for bug in loading RT library during attach on Linux x86/x86_64.

To load the RT library into a process Dyninst has attached to, we
generate some code to load the library via libdl or to an internal libc
function, if libdl isn't in the process. The generated code was not
following the ABI and allowing space for a function to store local
variables below the stack pointer. Our base tramp code already takes
this possibility into account so the solution was to wrap this
generated code with the standard RPC header and trailer that internally
do a base tramp save and restore, respectively.