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 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 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.

9 years agoTestsuite fix
Madhavi Krishnan [Wed, 19 Jan 2011 22:42:07 +0000 (16:42 -0600)]
Testsuite fix

The arguments to tests in rewriter mode was clobbered due to my
previous commit. Fixed.

9 years agoMore ppc32_bgp changes
Madhavi Krishnan [Tue, 18 Jan 2011 19:33:32 +0000 (13:33 -0600)]
More ppc32_bgp changes

Adding checks for ppc32_bgp for platform specific code in
dyninstAPI, SymtabAPI and testsuite.

9 years agoAdding ppc32_bgp to make.config
Madhavi Krishnan [Tue, 18 Jan 2011 18:02:19 +0000 (12:02 -0600)]
Adding ppc32_bgp to make.config

9 years agoAdding new platform:ppc32_bgp
Madhavi Krishnan [Fri, 14 Jan 2011 15:23:56 +0000 (09:23 -0600)]
Adding new platform:ppc32_bgp

This commit adds a new platform - ppc32_bgp. For now,
ppc32_bgp is the same as ppc32_linux for components.
This will change when proccontrol is commited.

The only difference between ppc32_linux and ppc32_bgp is
in the testsuite. For ppc32_bgp, we build only rewriter mutatees
and run them on on the compuet nodes. This requires a new
environment variable called "DYNINST_BGP_PARTITION" to be set.
This env variable determines which BGP partition the rewritten
mutatees must be executed.

9 years agoStackwalker: Fix x86 stack pointer calculation
Todd Frederick [Mon, 10 Jan 2011 18:42:08 +0000 (12:42 -0600)]
Stackwalker: Fix x86 stack pointer calculation

9 years agoAIX build fix.
David Aeschlimann [Fri, 7 Jan 2011 16:00:26 +0000 (10:00 -0600)]
AIX build fix.

9 years agoAIX build fix
David Aeschlimann [Fri, 7 Jan 2011 15:50:34 +0000 (09:50 -0600)]
AIX build fix

9 years agoi386 build fix for dynC generated source files.
David Aeschlimann [Thu, 6 Jan 2011 17:16:51 +0000 (11:16 -0600)]
i386 build fix for dynC generated source files.

9 years agoAIX fix
David Aeschlimann [Thu, 6 Jan 2011 16:44:27 +0000 (10:44 -0600)]
AIX fix

9 years agoFixed release number error
David Aeschlimann [Tue, 4 Jan 2011 17:39:42 +0000 (11:39 -0600)]
Fixed release number error

9 years agoMerge branch 'master' of ssh://git.dyninst.org/pub/dyninst
David Aeschlimann [Tue, 4 Jan 2011 16:17:29 +0000 (10:17 -0600)]
Merge branch 'master' of ssh://git.dyninst.org/pub/dyninst

9 years agoMerge branch 'master' of ssh://git.dyninst.org/pub/dyninst
David Aeschlimann [Tue, 4 Jan 2011 16:15:25 +0000 (10:15 -0600)]
Merge branch 'master' of ssh://git.dyninst.org/pub/dyninst

Adds dynC commands to dyner.


9 years agoMerge branch 'master' of ssh://bill@git.dyninst.org/pub/dyninst
Bill Williams [Wed, 22 Dec 2010 20:22:56 +0000 (14:22 -0600)]
Merge branch 'master' of ssh://bill@git.dyninst.org/pub/dyninst

9 years agoIAPI opcode fix: refer to si/addic aliased instructions by primary addic opcode.
Bill Williams [Tue, 21 Dec 2010 19:36:59 +0000 (13:36 -0600)]
IAPI opcode fix: refer to si/addic aliased instructions by primary addic opcode.

9 years agoAdd XMM registers per ABI to call/return read/write sets on AMD64.
Bill Williams [Thu, 2 Dec 2010 21:17:32 +0000 (15:17 -0600)]
Add XMM registers per ABI to call/return read/write sets on AMD64.

9 years agoExit early, falling back to using current file for debug info, if section header...
Bill Williams [Thu, 2 Dec 2010 21:17:10 +0000 (15:17 -0600)]
Exit early, falling back to using current file for debug info, if section header string table is absent.

9 years agoImplement IA_IAPI copy methods
Andrew Bernat [Tue, 21 Dec 2010 21:30:58 +0000 (15:30 -0600)]
Implement IA_IAPI copy methods

9 years agoMerge branch 'master' of git.dyninst.org:/pub/dyninst
Andrew Bernat [Tue, 21 Dec 2010 20:47:00 +0000 (14:47 -0600)]
Merge branch 'master' of git.dyninst.org:/pub/dyninst

9 years agoFix corruption bug copying IA_IAPI instruction adapters
Andrew Bernat [Tue, 21 Dec 2010 20:44:19 +0000 (14:44 -0600)]
Fix corruption bug copying IA_IAPI instruction adapters



9 years agoAdding missed files in parseAPI previous commit.
Madhavi Krishnan [Tue, 21 Dec 2010 20:37:35 +0000 (14:37 -0600)]
Adding missed files in parseAPI previous commit.

9 years agoMerge branch 'master' of git.dyninst.org:/pub/dyninst
Andrew Bernat [Tue, 21 Dec 2010 19:48:45 +0000 (13:48 -0600)]
Merge branch 'master' of git.dyninst.org:/pub/dyninst

9 years agoMerge branch 'master' of ssh://git.dyninst.org/pub/dyninst
Madhavi Krishnan [Tue, 21 Dec 2010 19:36:11 +0000 (13:36 -0600)]
Merge branch 'master' of ssh://git.dyninst.org/pub/dyninst

9 years agoSymbolic expansion now returns an error code if we fail to translate an instruction...
Andrew Bernat [Tue, 21 Dec 2010 19:35:34 +0000 (13:35 -0600)]
Symbolic expansion now returns an error code if we fail to translate an instruction or skip a possible substitution due to loops or overlapping inputs.

9 years agoAdding findFuncs to parseAPI manual.
Madhavi Krishnan [Tue, 21 Dec 2010 19:27:32 +0000 (13:27 -0600)]
Adding findFuncs to parseAPI manual.

9 years agoAdding semantics for stbx (ppc32) instruction.
Madhavi Krishnan [Tue, 21 Dec 2010 19:25:26 +0000 (13:25 -0600)]
Adding semantics for stbx (ppc32) instruction.

9 years agoMerge branch 'master' of git.dyninst.org:/pub/dyninst
Drew Bernat [Tue, 21 Dec 2010 19:24:53 +0000 (14:24 -0500)]
Merge branch 'master' of git.dyninst.org:/pub/dyninst

9 years agoAdd PPC return analysis-specific slicing predicates; fixes segfault.
Drew Bernat [Tue, 21 Dec 2010 19:24:11 +0000 (14:24 -0500)]
Add PPC return analysis-specific slicing predicates; fixes segfault.

9 years agoIdentify shared code regions
Madhavi Krishnan [Tue, 21 Dec 2010 17:26:03 +0000 (11:26 -0600)]
Identify shared code regions

Adding functionality to look up functions
in parseAPI by region (start address and
end address). This is infrastructure to
identify shared code regions.

9 years agoCheck widen/end predicates in slicing; don't assert fail if a widen node is encounter...
Andrew Bernat [Mon, 20 Dec 2010 20:28:12 +0000 (14:28 -0600)]
Check widen/end predicates in slicing; don't assert fail if a widen node is encountered in symbolic expansion.

9 years agoMerge branch 'master' of git.dyninst.org:/pub/dyninst
Andrew Bernat [Mon, 20 Dec 2010 18:45:13 +0000 (12:45 -0600)]
Merge branch 'master' of git.dyninst.org:/pub/dyninst

9 years agoPrototype implementation of "unknown" default semantics for missing PPC instructions
Andrew Bernat [Mon, 20 Dec 2010 18:44:26 +0000 (12:44 -0600)]
Prototype implementation of "unknown" default semantics for missing PPC instructions

9 years agoMerge branch 'master' of ssh://git.dyninst.org/pub/dyninst
Madhavi Krishnan [Sun, 19 Dec 2010 22:27:53 +0000 (16:27 -0600)]
Merge branch 'master' of ssh://git.dyninst.org/pub/dyninst

9 years agoMisc power rewriter commit
Madhavi Krishnan [Sun, 19 Dec 2010 22:27:05 +0000 (16:27 -0600)]
Misc power rewriter commit

1) rlwinm instruction is usually used for setting index and
    not the table start address of a jump table. This was
    causing ambiguity in the backward dataflow graph parsing
    of jump table start address. Hence, removing rlwinm
    instruction from the dataflow graph for checking
    jump table start address.
2) dgfreg was using pointers to the registers, which is not unique.
   Changed to use the register ID itself, which will be unique.
3) Indented IA_powerDetails.C - hence git blame will have my
   name on many lines.

9 years agoFix issue where 32-bit mutatees were not being filtered out on platforms that can...
Matthew Legendre [Fri, 17 Dec 2010 18:08:50 +0000 (12:08 -0600)]
Fix issue where 32-bit mutatees were not being filtered out on platforms that can't build 32-bit

9 years agoAdds placeholders for 5 additional PowerPC instructions in DataFlowAPI.
Ray Chen [Thu, 16 Dec 2010 20:40:57 +0000 (15:40 -0500)]
Adds placeholders for 5 additional PowerPC instructions in DataFlowAPI.

The PowerPC translation function for Rose in DataFlowAPI was missing
a number of cases in its switch statement.  The translation code still
needs to be implemented, but this prevents an assert in the nightly
tests at UMD.

9 years agoPower bug fix
Madhavi Krishnan [Wed, 15 Dec 2010 03:29:19 +0000 (21:29 -0600)]
Power bug fix

Nasty little bug in power code generation.
While generating code for an indirect load of
a variable in a shared library, absolute offset
was being used instead of relative offset. Fixed.

9 years agoREX.W overrides side prefix; fix incorrect decoding
Andrew Bernat [Tue, 14 Dec 2010 16:28:21 +0000 (10:28 -0600)]
REX.W overrides side prefix; fix incorrect decoding

9 years agoMerge branch 'athome'
Matthew Legendre [Mon, 13 Dec 2010 20:45:17 +0000 (14:45 -0600)]
Merge branch 'athome'

9 years agoBuild fix for AIX
Matt Legendre [Mon, 13 Dec 2010 20:41:53 +0000 (15:41 -0500)]
Build fix for AIX

9 years agoFix Windows build
U-azul\legendre [Mon, 13 Dec 2010 20:35:20 +0000 (12:35 -0800)]
Fix Windows build

9 years agoPower rewriter cleanup
Madhavi Krishnan [Mon, 13 Dec 2010 09:24:53 +0000 (03:24 -0600)]
Power rewriter cleanup

9 years agoMinor fixes
Madhavi Krishnan [Mon, 13 Dec 2010 09:16:02 +0000 (03:16 -0600)]
Minor fixes

1) Removing extraneous printf in dataflowAPI
2) Adding filename to error message when reintrumenting a file.
3) Cleanup power rewriter.

9 years agoMerge branch 'master' of git.dyninst.org:/pub/dyninst
Andrew Bernat [Fri, 10 Dec 2010 22:21:02 +0000 (16:21 -0600)]
Merge branch 'master' of git.dyninst.org:/pub/dyninst

9 years agoFixes for StackwalkerAPI on BlueGene
Matthew Legendre [Fri, 10 Dec 2010 18:16:56 +0000 (12:16 -0600)]
Fixes for StackwalkerAPI on BlueGene

9 years agoFix instrumentation side effects; we had been erroneously moving the PC when handling...
Andrew Bernat [Fri, 10 Dec 2010 15:14:23 +0000 (09:14 -0600)]
Fix instrumentation side effects; we had been erroneously moving the PC when handling a non-active stack frame. Fixes bug 1146

9 years agoMerge branch 'master' of legendre@git.dyninst.org:/pub/dyninst
Matthew P. Legendre [Fri, 10 Dec 2010 01:05:32 +0000 (17:05 -0800)]
Merge branch 'master' of legendre@git.dyninst.org:/pub/dyninst

9 years agoFixes for StackwalkerAPI on BlueGene
Matthew P. Legendre [Fri, 10 Dec 2010 01:05:07 +0000 (17:05 -0800)]
Fixes for StackwalkerAPI on BlueGene

9 years agoTurns off gap parsing for Dyninst's runtime library and removes compiler warnings
Kevin Roundy [Thu, 9 Dec 2010 20:06:19 +0000 (14:06 -0600)]
Turns off gap parsing for Dyninst's runtime library and removes compiler warnings

9 years agoWarning cleanup
Matthew P. Legendre [Tue, 7 Dec 2010 00:25:34 +0000 (16:25 -0800)]
Warning cleanup

9 years agoFixes for StackwalkerAPI on BlueGene
Matthew P. Legendre [Tue, 7 Dec 2010 00:25:22 +0000 (16:25 -0800)]
Fixes for StackwalkerAPI on BlueGene

9 years agox86 fix
Madhavi Krishnan [Mon, 6 Dec 2010 18:45:54 +0000 (12:45 -0600)]
x86 fix

isReturnInst is relevant only in power since a return instruction (blr) can
be a real return or indirect jump using LR. For x86, if the instruction
category is ReturnInsn, is it HAS to be a return. Hence, it is the same
as isReturn function.

9 years agoFix for vxWorks platform.
Ray Chen [Sun, 5 Dec 2010 21:32:55 +0000 (16:32 -0500)]
Fix for vxWorks platform.

Older 4.x versions of GCC cannot compare const_iters and regular iters.

9 years agoOptimize the x86/x86_64 stack alignment sequence.
Ray Chen [Sun, 5 Dec 2010 14:27:49 +0000 (09:27 -0500)]
Optimize the x86/x86_64 stack alignment sequence.
 - Only align the stack if we generate a function call or save the FP state.
 - If we must align the stack, only preserve the flags if they are live.

9 years agox86 build fix for previous commit
Madhavi Krishnan [Sun, 5 Dec 2010 02:46:21 +0000 (20:46 -0600)]
x86 build fix for previous commit

9 years agopowerpc rewriter commit
Madhavi Krishnan [Sat, 4 Dec 2010 23:32:52 +0000 (17:32 -0600)]
powerpc rewriter commit

This commit implements more accurate heuristics for parsing
powerpc jump tables using backward dataflow graph analysis.

This commit also implements heuristics and backward slicing
to determine if a blr instruction in a powerpc binary,
is a return or a jump table. This is specially relevant to BlueGene binaries.
To do slicing, an instruction adapter is always constructed/associated
with a specific block.

9 years agoForce FP saves
Madhavi Krishnan [Sat, 4 Dec 2010 01:49:14 +0000 (19:49 -0600)]
Force FP saves

As per user request, we are adding a force FP save option.
This will force FP registers to be saved. This is necessary because
right now, even if saveFP is set, analysis may incorrectly determine
no FP is ised and hence not save FP registers. This happens if
the instrumentation calls a function using FP in the rewriter case.
forceFPSave interface will not be published - since we hope to fix this for
the next release.

9 years agoEnable powerpc traps.
Madhavi Krishnan [Fri, 3 Dec 2010 23:53:02 +0000 (17:53 -0600)]
Enable powerpc traps.

1)This will cause sigtraps to be used for long jumps or when we do
  have free registers.
2)This will cause trap instructions to be used in placed of
  relocated instructions. This makes life easy for debugging when
 we have jumps into relocated code.

9 years agopowerpc instruction semantics
Madhavi Krishnan [Fri, 3 Dec 2010 23:39:05 +0000 (17:39 -0600)]
powerpc instruction semantics

Adding more instructions to powerpc semantics set.

9 years agoSlicing changes
Madhavi Krishnan [Fri, 3 Dec 2010 23:37:05 +0000 (17:37 -0600)]
Slicing changes

Slicing had a bug in labeling edges in the backward slicing case.
The edge from the instruction at which backward slicing
is applied, was labeled with the output of the instruction. Instead we
should create an edge for each of the inputs to the instruction (since
it is backward slicing) and label them based on the input.

9 years agoMinor commit
Madhavi Krishnan [Fri, 3 Dec 2010 23:31:23 +0000 (17:31 -0600)]
Minor commit

This commit includes many small changes:
1) Added semantics for si, subfz and ora powerpc instructions
2) Removed printf from dataflow Visitor
3) Added check to make sure we are not opening a
   rewritten binary using openFile. Opening rewritten file
   will cause symtabAPI and and parsing to fail.
4) Symtab was adding a new library dependency using the full
   path of the library. We should only add the library name
   without full path, so that LD_LIBRRAY_PATH of the user's
   environment will determine which library to use. This is
   very critical in bluegene type environment where the
   backend does not have access to the whole filesystem.

9 years agoMake symlinks local to the install directory, rather than including build residue.
Bill Williams [Thu, 2 Dec 2010 18:11:59 +0000 (12:11 -0600)]
Make symlinks local to the install directory, rather than including build residue.

9 years agoMake destination directories have absolute paths so that we don't screw up symlinks.
Bill Williams [Thu, 2 Dec 2010 16:59:46 +0000 (10:59 -0600)]
Make destination directories have absolute paths so that we don't screw up symlinks.

9 years agoRemove dead code (save_the_world, #if 0).
Bill Williams [Wed, 1 Dec 2010 16:44:27 +0000 (10:44 -0600)]
Remove dead code (save_the_world, #if 0).

9 years agoA few more fixes for RTlib naming.
Bill Williams [Wed, 1 Dec 2010 16:44:10 +0000 (10:44 -0600)]
A few more fixes for RTlib naming.

9 years agoAdd absolute conditionals and blrl to ppc semantics.
Bill Williams [Tue, 30 Nov 2010 19:11:27 +0000 (13:11 -0600)]
Add absolute conditionals and blrl to ppc semantics.

9 years agoAdd component versioning information to all components & filenames.
Bill Williams [Mon, 29 Nov 2010 23:23:18 +0000 (17:23 -0600)]
Add component versioning information to all components & filenames.

9 years agoChanges for library versioning; verified on linux/x86_64 and AIX
Bill Williams [Tue, 16 Nov 2010 20:04:33 +0000 (14:04 -0600)]
Changes for library versioning; verified on linux/x86_64 and AIX

9 years agoAdd --exe option for runhunt mode--allows runhunt to be used on a shared library...
Bill Williams [Mon, 8 Nov 2010 20:31:54 +0000 (14:31 -0600)]
Add --exe option for runhunt mode--allows runhunt to be used on a shared library driven by an un-rewritten executable.

9 years agoComment out debugging code in ProcControlAPI.
Daniel McNulty [Tue, 30 Nov 2010 15:46:29 +0000 (09:46 -0600)]
Comment out debugging code in ProcControlAPI.

9 years agoMerge branch 'master' into devel
Todd Frederick [Tue, 23 Nov 2010 22:56:29 +0000 (16:56 -0600)]
Merge branch 'master' into devel

9 years agoBPatch interface to specify non-returning functions
Todd Frederick [Tue, 23 Nov 2010 22:55:24 +0000 (16:55 -0600)]
BPatch interface to specify non-returning functions

9 years agoRemove cycle edges before populating expansion worklist. Expand from all
Emily Jacobson [Tue, 23 Nov 2010 22:11:32 +0000 (16:11 -0600)]
Remove cycle edges before populating expansion worklist. Expand from all
nodes, rather than just entryNodes.

9 years agoRemove self-loops from slices.
Emily Jacobson [Tue, 23 Nov 2010 22:10:31 +0000 (16:10 -0600)]
Remove self-loops from slices.

9 years agoEliminate spurious `thunk function' detection on x86
Nathan Rosenblum [Wed, 17 Nov 2010 21:31:38 +0000 (15:31 -0600)]
Eliminate spurious `thunk function' detection on x86

A `thunk function' is one that contains exactly two instructions:

mov (%esp),<a register>

This construct is used in position independent code to retrieve
the program counter---see for example the __i686.get_pc_thunk.*
functions in glibc. Previously, any function that had a mov
instruction that referenced the stack pointer followed by a return
would be treated as a thunk. This commit properly checks for a
zero-offset dereference of the stack pointer.

9 years agoOptimize order of slice expansion
Nathan Rosenblum [Fri, 12 Nov 2010 23:13:58 +0000 (17:13 -0600)]
Optimize order of slice expansion

The order that slice nodes are visited in slice -> AST expansion matters
quite a bit; bad visitation order can lead to a great deal of extra work
being done as nodes are repeatedly visited to fill in partially expanded
ASTS. Because cycles in the slice DAG are removed prior to expansion,
an optimal ordering is possible. This commit implements that ordering. It
also correctly avoids traversing the `skip edges' that are removed to
break cycles in all instances of edge enumeration.

9 years agoImproves efficiency of the slicing algorithm
Nathan Rosenblum [Thu, 11 Nov 2010 21:13:34 +0000 (15:13 -0600)]
Improves efficiency of the slicing algorithm

The previous slicing algorithm searched the control flow graph in a
sub-optimal fashion, leading to complexity that was quadratic in the
best case of CFGs that are chains (linear control flow without
branches). This commit introduces a recursive slicing algorithm that
avoids this structural problem.

9 years agoFixes for bug 1081, bug 1104 (fork test bugs)
Daniel McNulty [Tue, 16 Nov 2010 21:42:27 +0000 (15:42 -0600)]
Fixes for bug 1081, bug 1104 (fork test bugs)

Both of these bugs were caused by a combination of OS bugs and our fork tests
using mutatees where the parent can exit before the child and both the child
and parent are short lived. Both of the OS bugs were reproduced using test
programs separate from Dyninst, so I am confident we are indeed observing
kernel bugs.

This commit, in addition to fixes for these bugs, removes the extra continues
in our test_fork_* tests that were added to avoid leaving around a bunch of
stopped processes when the nightlies ran.

Bug 1081:

We were seeing the fork tests leave around stopped mutatees on AIX. This bug
was being triggered by our soft breakpoint mechanism in the RT library that has
a process send itself a SIGSTOP. The following chain of events triggers the

1) The parent forks a child
2) The child sends itself a SIGSTOP
3) Dyninst continues both the parent and child
4) The parent exits before the child
5) The child exits almost immediately after being forked
6) Dyninst sees the pre-exit stop of the child and continues it
7) After continue the child is delivered a SIGSTOP by the OS

We originally used the soft breakpoint mechanism because we could not rely on
AIX to attach to and stop a child after fork. This was a bug on version 5.2 of
AIX. Since we have decided to no longer support AIX 5.2, we can rely on the OS
to automatically mark forked processes as being traced by Dyninst. Ideally, we
would want to stop both the parent and child at the exit of fork to initiate
some updates in the RT library using the OS provided mechanism for this. Due to
some probably more OS bugs, this cannot be done.

AIX 5.3 still exhibits some odd behavior where LWPs cannot be modified
on syscall entry/exit. An existing workaround for this is to set a trap at
the exit of the system call. This is done by reading registers and walking
the stack (if necessary). However, for the child at the exit of fork, the
values read from the registers are unreliable.

Working around all these bugs, the solution becomes to use a SIGTRAP instead of
a SIGSTOP in our soft breakpoint mechansim.

Bug 1104:

For test4_2, we were seeing a race where the exit callback of the child was not
being delivered, causing the test to fail. This bug in Dyninst was being
triggered by another kernel bug where if the parent exited before the child
entered userland for the first time, the child process would never execute.

In this scenario, Dyninst would observe that the child process disappeared and
generate an approriate event. On UNIX platforms, we however don't deliver
callbacks on a normal process exit; we deliver them at the entrance to the exit
system call when the process' address space is still around.  In this case, the
child doesn't hit our pre-exit instrumentation and we therefore don't deliver
the callback.

The fix is to check whether a callback has been attempted to be delivered when
we receive the process exit event and deliver the callback if it hasn't been
delivered yet. Additionally, the type of callback delivered is the same as if
the process had exited due to a signal because the process' address space is
not around anymore. When the kernel bug occurs, this would still cause the
test to fail so I have modified the mutatee's parent to wait for the child.

9 years agoForce stack alignment on x86/x86_64 platforms.
Ray Chen [Fri, 12 Nov 2010 13:12:54 +0000 (08:12 -0500)]
Force stack alignment on x86/x86_64 platforms.

Both x86 and x86_64 platforms require an aligned stack pointer at certain
points of execution.  This commit introduces a preamble in our state saving
code to forcably align the stack pointer.

Care is also taken to ensure the stack is aligned before we generate a
function call on x86_64.  Similar functionality may be needed for x86
in the future.

9 years agoAdded missing instruction entries to IAPI string map
Mike Lam [Thu, 11 Nov 2010 17:47:28 +0000 (12:47 -0500)]
Added missing instruction entries to IAPI string map

9 years agoFix for non-cap_registers platforms
Mike Lam [Tue, 9 Nov 2010 23:35:38 +0000 (18:35 -0500)]
Fix for non-cap_registers platforms

9 years agoAdded optional parameter in getRegisters to return SPRs
Mike Lam [Tue, 9 Nov 2010 22:00:36 +0000 (17:00 -0500)]
Added optional parameter in getRegisters to return SPRs

9 years agoAdded missing header files
Mike Lam [Tue, 9 Nov 2010 21:59:26 +0000 (16:59 -0500)]
Added missing header files

9 years agoMerge branch 'master' into devel
Todd Frederick [Tue, 9 Nov 2010 17:55:41 +0000 (11:55 -0600)]
Merge branch 'master' into devel

9 years agoFix bug 1144, Register liveness on Power
Todd Frederick [Tue, 9 Nov 2010 17:53:07 +0000 (11:53 -0600)]
Fix bug 1144, Register liveness on Power