James Jolly [Fri, 13 Mar 2009 01:33:48 +0000 (20:33 -0500)]
If an .so file is present for LIBDWARF, set LIBDWARFSTATIC to false, etc.
These checks are fragile and will probably be replaced later.
Automatically generating make.config.local...
(example for cs.wisc.edu machines with AFS access)
From the root of dyninst.git, run:
./autodyninst/configure --with-package-base=/afs/cs.wisc.edu/p/paradyn/packages
Bill Williams [Thu, 12 Mar 2009 21:13:33 +0000 (16:13 -0500)]
Added AMD64 support to test for dereferences.
Bill Williams [Thu, 12 Mar 2009 21:10:35 +0000 (16:10 -0500)]
Merge branch 'master' of ssh://bill@git.dyninst.org/pub/dyninst
Bill Williams [Thu, 12 Mar 2009 21:10:00 +0000 (16:10 -0500)]
Instruction API bugfix: use the correct size registers for all dereferences, and test this.
Andrew Bernat [Thu, 12 Mar 2009 18:37:30 +0000 (13:37 -0500)]
Remove erroneous assert. We were asserting in instrSideEffect that
an instPoint had at least one instPointInstance. This is not the case
for uninstrumentable code, and is correctly handled anyway.
This commit fixes bug 921.
Andrew Bernat [Wed, 11 Mar 2009 19:17:28 +0000 (14:17 -0500)]
Merge branch 'master' of git.dyninst.org:/pub/dyninst
Andrew Bernat [Wed, 11 Mar 2009 19:16:28 +0000 (14:16 -0500)]
Replace a printed error (perror) with a proccontrol_printf. Fixes bug 885.
Andrew Bernat [Wed, 11 Mar 2009 19:15:23 +0000 (14:15 -0500)]
Add an "analyze everything" test for overhead/bug finding purposes.
Andrew Bernat [Wed, 11 Mar 2009 19:14:56 +0000 (14:14 -0500)]
Add preliminary data tracking for hooking up function call parameters.
madhavi [Wed, 11 Mar 2009 17:04:55 +0000 (12:04 -0500)]
Removed more error messages
madhavi [Wed, 11 Mar 2009 16:28:49 +0000 (11:28 -0500)]
Removed more error messages printed from internal dyninst routines regarding invalid process to attach and non-existent file passed to dlopen
madhavi [Wed, 11 Mar 2009 16:10:43 +0000 (11:10 -0500)]
In Object-elf, we were not adding a non-unique symbol to the module. There are cases where the symbol name will be not be unique - for example, header file included by multiple files. But, we still want to add the symbol to the Module
madhavi [Wed, 11 Mar 2009 16:06:07 +0000 (11:06 -0500)]
Minor modification to sparc Makefile - to include CFLAGS that is configured depending on the host to include fpic or Kpic.
madhavi [Wed, 11 Mar 2009 15:57:27 +0000 (10:57 -0500)]
Removed print statements from sol_proc.C which produced undesirable output when a valid mutatee process doesnt exist for attaching. Instead we should just return an error code that will be handled by the mutator.
madhavi [Wed, 11 Mar 2009 15:53:35 +0000 (10:53 -0500)]
Fix for (1) power deadlock problem due to incorrect lock implementation. We now use dyn_pthread_self to get threadID instead of DYNINSTthreadSelf (2) Sparc test1_33 failure. plt calls are incorrectly categorized as non returning which causes problem with CFG analysis.
Andrew Bernat [Mon, 9 Mar 2009 22:45:47 +0000 (17:45 -0500)]
Use fixpoint analysis correctly.
Andrew Bernat [Mon, 9 Mar 2009 21:23:28 +0000 (16:23 -0500)]
Merge branch 'master' of git.dyninst.org:/pub/dyninst
Andrew Bernat [Mon, 9 Mar 2009 21:23:15 +0000 (16:23 -0500)]
The DDG code now uses the annotation interface to store the DDG at a function level whenever it is created.
Also includes misc. bugfixes.
Bill Williams [Mon, 9 Mar 2009 20:32:15 +0000 (15:32 -0500)]
Windows fix: with IA32 decoding getting consolidated in IAPI, we need to export the functions that are still used by legacy code in Dyninst.
madhavi [Fri, 6 Mar 2009 17:18:40 +0000 (11:18 -0600)]
Merge branch 'master' of git.dyninst.org:/pub/dyninst
madhavi [Fri, 6 Mar 2009 17:18:20 +0000 (11:18 -0600)]
Couple of build error fixes (1) polito build error - changed std::vector to pdvector for performInstrumentation (2) Solaris native compiler build error - because we were overwriting MUTATEE_CFLAGS_NATIVE. In make.module.tmpl, now MUTATEE_CFLAGS_NATIVE ?= ~(CFLAGS)
Matthew Legendre [Thu, 5 Mar 2009 23:09:32 +0000 (17:09 -0600)]
Merge branch 'master' of legendre@git.dyninst.org:/pub/dyninst
Matthew Legendre [Thu, 5 Mar 2009 23:08:46 +0000 (17:08 -0600)]
Removed incorrect assert from generating long branches on power
Andrew Bernat [Thu, 5 Mar 2009 22:54:43 +0000 (16:54 -0600)]
Compensate for InstructionAPI shared_ptr limitations.
Andrew Bernat [Thu, 5 Mar 2009 22:23:08 +0000 (16:23 -0600)]
Merge branch 'master' of git.dyninst.org:/pub/dyninst
Andrew Bernat [Thu, 5 Mar 2009 22:22:56 +0000 (16:22 -0600)]
Handle aliasing correctly (in theory; pending bug fixes)
Andrew Bernat [Thu, 5 Mar 2009 22:22:42 +0000 (16:22 -0600)]
Correctly promote 64-bit registers that may show up in 32-bit mode.
Andrew Bernat [Thu, 5 Mar 2009 22:22:23 +0000 (16:22 -0600)]
Fix dumb bug introduced yesterday; expand debugging output.
madhavi [Thu, 5 Mar 2009 20:05:17 +0000 (14:05 -0600)]
Fix for parseThat failures. While relocating functions, we also relocate functions that share code with the function being relocated. We did not install these dependent functions correctly. This commit generates, installs and links functions which share code with relocated functions.
Andrew Bernat [Wed, 4 Mar 2009 23:01:06 +0000 (17:01 -0600)]
Merge branch 'master' of git.dyninst.org:/pub/dyninst
Andrew Bernat [Wed, 4 Mar 2009 22:59:53 +0000 (16:59 -0600)]
Update to new Graph::printDOT interface
Andrew Bernat [Wed, 4 Mar 2009 21:28:18 +0000 (15:28 -0600)]
Implement aliasing in the DDG.
madhavi [Wed, 4 Mar 2009 21:38:30 +0000 (15:38 -0600)]
Fix for incomplete parsing in the event of failures in parseDwarf.C. This commit fixes test5_* failures on x86, x86_64 platforms
Bill Williams [Tue, 3 Mar 2009 22:12:12 +0000 (16:12 -0600)]
Added real FP liveness tracking to AMD64. This fixes test1_20.
This also includes several instruction cracking bug fixes for bugs that came to light along the way.
Bill Williams [Mon, 2 Mar 2009 16:49:18 +0000 (10:49 -0600)]
InstructionAPI documentation updates: properly integrated into make system, produces consistently named PDF with other manuals.
Andrew Bernat [Tue, 3 Mar 2009 22:48:20 +0000 (16:48 -0600)]
Really delete mutatees.
Andrew Bernat [Tue, 3 Mar 2009 22:32:27 +0000 (16:32 -0600)]
Add debugging print statement (DYNINST_DEBUG_STACKANALYSIS) for new stack analysis code.
Andrew Bernat [Tue, 3 Mar 2009 22:32:10 +0000 (16:32 -0600)]
Remove compiler warning by initializing pointer to NULL.
Andrew Bernat [Tue, 3 Mar 2009 20:24:11 +0000 (14:24 -0600)]
Replace prototype "getContainingReg" with "promote".
Andrew Bernat [Tue, 3 Mar 2009 20:21:57 +0000 (14:21 -0600)]
DDG updates:
1) Updates to handle stack slots as abslocs. Depends on the stack depth analysis in dyninstAPI/src/stackanalysis.[Ch]
2) Add "print graph in DOT format" call.
TODO: handle calls, intra-instruction use/def, aliasing.
Andrew Bernat [Fri, 27 Feb 2009 17:54:27 +0000 (11:54 -0600)]
Two new methods in the image_func and int_function class hierarchies:
Add a method to get a vector of InstructionAPI instances, represented
by (Instruction, Offset) pairs. This parallels the BPatch_basicBlock
method.
Add a conversion function from int_function Address to image_func Offset.
Andrew Bernat [Fri, 27 Feb 2009 17:53:40 +0000 (11:53 -0600)]
Add prototype stack depth analysis derived from Matt's initial
implementation. This analysis depends on the InstructionAPI and currently
has x86/AMD-64 specific logic that is unimplemented for other platforms.
Input: an image_func
Output: two interval trees (see earlier commit). The first tree contains
intervals of stack heights (see below) and presence (existence) of a stack
frame.
Stack height: the height of the stack is represented by a
StackAnalysis::StackHeight object. This object has the following methods:
height() - returns the height of the stack if defined; MINLONG (if
unknown/bottom); MAXLONG (if uninitialized/top)
isBottom(), isTop() - determine whether the stack height is unknown
due to lack of analysis (top) or more than one possible height (bottom)
Also, there are constant StackHeight::top and StackHeight::bottom
definitions.
Debugging output should be made with stanalysis_printf.
Andrew Bernat [Fri, 27 Feb 2009 17:48:02 +0000 (11:48 -0600)]
Use stl::queue instead of stl::list for worklist data structure.
Andrew Bernat [Fri, 27 Feb 2009 17:43:46 +0000 (11:43 -0600)]
Add a new "Interval Tree" type. This is a templated version of our
codeRangeTree data structure used in Dyninst.
IntervalTree<class K, class V>
K is the datatype for lower and upper bounds. It must have a <, >, and
== operator defined. The ranges are stored as [lB..ub).
V is the value. It must have a default and copy constructor, as well as
an equality/inequality operator.
This class assumes the incoming ranges are disjoint; very, very, very
weird things will happen if this assumption is not held. It's also
not checked, so be careful in your usage.
One implemented optimization: joint ranges with identical types are
merged.
One exception: overlapping ranges with the same value are allowed
(needed to handle overlapping basic blocks).
Matthew Legendre [Tue, 3 Mar 2009 18:45:43 +0000 (12:45 -0600)]
Fix problems with identifying thread starts on x86 based systems
Matthew Legendre [Mon, 2 Mar 2009 23:29:19 +0000 (17:29 -0600)]
Fix performance issue in SymtabAPI for objects with lots of modules
Michael Lam [Fri, 27 Feb 2009 16:29:25 +0000 (11:29 -0500)]
Minor bug fixes to binary rewriter
- recalculate program headers on x86_64
- initialize .hash section on x86 and x86_64
madhavi [Thu, 26 Feb 2009 21:28:34 +0000 (15:28 -0600)]
In process.C, installInstrRequests(), vector of miniTramps was added to preExitInst without being cleared each time. This lead to duplicate entries of miniTramps which eventually caused assertion. This fix clears the vector of miniTramps as soon as it is added to preExitInst vector.
madhavi [Thu, 26 Feb 2009 18:45:10 +0000 (12:45 -0600)]
Enable Frame pointer location list for all platforms. Previously. only on x86_64, we merged locations lists of frame pointer and variables together to get the final location list of variables. This commit enables all architectures to save location lists of frame pointers and merge it with variable's list if the variable's location is relative to frame pointer. This fixes test1_23,24 and 26 failures on x86.
Bill Williams [Tue, 24 Feb 2009 16:34:44 +0000 (10:34 -0600)]
Fixed test_instruction_read_write for correctness on AMD64.
Madhavi Krishnan [Tue, 24 Feb 2009 05:13:24 +0000 (23:13 -0600)]
Merge branch 'master' of ssh://git.dyninst.org/pub/dyninst
Madhavi Krishnan [Tue, 24 Feb 2009 05:12:57 +0000 (23:12 -0600)]
Fixed bug in checking FP register liveState. anyLiveFPRsAtEntry() returns true if the register is dead instead of live! Probably a typo, now fixed. This was causing failures in test1_20 with icc compiler
Andrew Bernat [Mon, 23 Feb 2009 23:00:13 +0000 (17:00 -0600)]
Merge branch 'master' of git.dyninst.org:/pub/dyninst
Andrew Bernat [Mon, 23 Feb 2009 22:59:51 +0000 (16:59 -0600)]
Correctly handle a case when a block contains no instructions that
define registers.
Andrew Bernat [Mon, 23 Feb 2009 22:59:25 +0000 (16:59 -0600)]
Convert incoming registers (from InstructionAPI) to the "canonical"
containing register.
Andrew Bernat [Mon, 23 Feb 2009 22:59:01 +0000 (16:59 -0600)]
Add upconverting "getContainingReg" method.
Andrew Bernat [Mon, 23 Feb 2009 22:58:10 +0000 (16:58 -0600)]
Add the "Auxiliary carry" flag to the set of ID->name mappings for
IA32/AMD64. Also reorder register IDs to make converting between
8/16/32/64-bit registers easier.
Bill Williams [Mon, 23 Feb 2009 21:37:02 +0000 (15:37 -0600)]
Bug fix: readsMemory() and writesMemory() were converting an Operand's Expression to the wrong type, and thus always returning false. Fixed.
Andrew Bernat [Mon, 23 Feb 2009 20:22:22 +0000 (14:22 -0600)]
Merge branch 'master' of git.dyninst.org:/pub/dyninst
Andrew Bernat [Mon, 23 Feb 2009 20:21:19 +0000 (14:21 -0600)]
Add necessary methods to get the new DDG component to link with a mutator.
I've also added a baby test case in the DDG/test directory. The mutator
takes two arguments: a program name to open and a function to analyze.
Min Qiu [Mon, 23 Feb 2009 18:47:54 +0000 (12:47 -0600)]
windows binary rewriter
This commit contains codes for windows binary rewriter, which currently is able to rewrite basic windows executable files. Two new files are added in this commit: emitWin.C and emitWin.h.
Madhavi Krishnan [Mon, 23 Feb 2009 05:55:35 +0000 (23:55 -0600)]
Fix for variables in BSS section in icc. With icc, variables in bss are categorized as ST_NOTYPE instead of ST_OBJECT. If an object is in BSS section and its size is greater than zero, we can almost always say, it is a variable. We check for this condition and change the type to ST_OBJECT from ST_NOTYPE. This fixes test1_24-28 failures in x86 icc compiler mode
Bill Williams [Fri, 20 Feb 2009 23:36:21 +0000 (17:36 -0600)]
Bugfix: AMD64 liveness
AMD64 uses the REX byte's B bit to switch between EAX...ESI and R9...R16. In cases where this register was not directly encoded in the opcode, we decoded this information correctly. When it was, we didn't. This fixes that bug.
Nathan Rosenblum [Fri, 20 Feb 2009 06:48:59 +0000 (00:48 -0600)]
Avoid invalid stl::map iterator usage
stl::map.erase invalidates the iterator of the erased element.
Deleting BPatch_function pointers while iterating over the map
containing them invoked an erase call in the BPatch_function
destructor. This bug was caught with valgrind while investigating
another failure.
Nathan Rosenblum [Thu, 19 Feb 2009 18:40:11 +0000 (12:40 -0600)]
Properly build block lists of shared functions
In some cases, shared code parsing could be triggered over a
partially-built control flow graph (due to recursive traversal
of call targets). This commit detects those situations, and
ensures that all functions built using shared code parsing
eventually contain the correct block lists.
Andrew Bernat [Fri, 20 Feb 2009 02:29:30 +0000 (20:29 -0600)]
Add additional BPatch_basicBlock::getInstructions<Instruction,Address> to complement
BPatch_basicBlock::getInstructions<Instruction>
Andrew Bernat [Wed, 18 Feb 2009 17:21:15 +0000 (11:21 -0600)]
Remove obsolete CVS files
Andrew Bernat [Wed, 4 Feb 2009 15:37:11 +0000 (09:37 -0600)]
Working commit of new DDG component
Matthew Legendre [Fri, 20 Feb 2009 01:05:37 +0000 (19:05 -0600)]
Add parallel BPatch_flowGraph::getAllBasicBlocks that takes an STL set as
argument:
BPatch_flowGraph::getAllBasicBlocks(std::set<BPatch_basicBlock*>&)
Matthew Legendre [Fri, 20 Feb 2009 01:05:37 +0000 (19:05 -0600)]
Merge branch 'master' of legendre@git.dyninst.org:/pub/dyninst
Matthew Legendre [Fri, 20 Feb 2009 00:56:45 +0000 (18:56 -0600)]
Fixes for binary rewriter
We were writting the executable and its dependant libraries to the same file name, one after the other, with each written file overriding the previous one. This led to things not working.
Bill Williams [Thu, 19 Feb 2009 22:18:22 +0000 (16:18 -0600)]
Fix for test1_33 on Windows.
On Windows, we subtract off the load address from all of our symbols and code references before they leave Symtab.
When we parse a jump table, we get addresses to parse that do not have the load address subtracted off. This makes that adjustment for both the table address and the table entries as needed. Jump tables emitted by VC2003 are now parsed correctly.
madhavi [Thu, 19 Feb 2009 21:19:59 +0000 (15:19 -0600)]
This commit fixes chaining of dieEntries in parsing DWARF information. test5_5.C adds a new test for checking if constructor is added to the object through getComponents. In baseTramp.c, we Null-ify references to baseTrampInstances before clearing them to avoid mempry corruption.
Bill Williams [Wed, 18 Feb 2009 23:17:49 +0000 (17:17 -0600)]
C++ comments in mutatee files are bad.
Bill Williams [Wed, 18 Feb 2009 20:52:44 +0000 (14:52 -0600)]
Fixed test1_27 so that the mutatee will have correct type information on both gcc and VC2003 platforms.
Also fixed a warning in BPatch_function (returned an undefined bool, rather than 'true' as was appropriate at that point).
Also reworked BPatch_type::isCompatible to go through the locking interface properly.
Madhavi Krishnan [Tue, 17 Feb 2009 23:55:18 +0000 (17:55 -0600)]
Fix miniTramp uninstrument bug. uninstrument removes MT instances by iterating over the list, first to last. But we should really iterate from last to first so that changes instances.size() doesn't affect the iterator
Matthew Legendre [Tue, 17 Feb 2009 17:56:39 +0000 (11:56 -0600)]
Merge branch 'master' of legendre@git.dyninst.org:/pub/dyninst
Matthew Legendre [Tue, 17 Feb 2009 17:49:18 +0000 (11:49 -0600)]
Fix memory corruption, remove debugging printfs
We had numerous tests across Linux/x86, Linux/PPC, and Linux/x86_64 that were failing in the nightly runs but working when people ran them manually. The culprit turned out to be a memory corruption bug in the newtestsuite that would only manifest when it was run in the database output mode--we were putting a vector to a local variable string into a global array.
This has been fixed, and the debugging printfs I added last night were removed.
Bill Williams [Tue, 17 Feb 2009 00:24:15 +0000 (18:24 -0600)]
This should fix the crash in test 1_29 on Windows.
We had several bugs in our decoding of Ap-style operands on x86. Since these only show up in far jumps and calls, this was not generally an issue.
I've added an InstructionAPI test that verifies that our decoding of far calls is correct, and it passes. This should fix Windows.
Matthew Legendre [Tue, 17 Feb 2009 03:25:07 +0000 (21:25 -0600)]
Fix printfs before nightly runs
Matthew Legendre [Mon, 16 Feb 2009 23:29:44 +0000 (17:29 -0600)]
Add debugging prints for output in nightly tests
Nathan Rosenblum [Mon, 16 Feb 2009 16:44:07 +0000 (10:44 -0600)]
Fixes for Power platforms:
- Check for bad call targets consistently across all platforms when parsing
call targets.
- Correctly interpret blrl as a return instruction when provided with the
right hint in the instruction encoding
Bill Williams [Mon, 16 Feb 2009 21:39:04 +0000 (15:39 -0600)]
Bugfix: don't try to build instructionAPI component if we have no mutators (and thus if instructionAPI is not implemented).
Matthew Legendre [Mon, 16 Feb 2009 19:29:20 +0000 (13:29 -0600)]
Merge branch 'master' of legendre@git.dyninst.org:/pub/dyninst
Matthew Legendre [Mon, 16 Feb 2009 19:28:34 +0000 (13:28 -0600)]
Fix windows build problem in newtestsuite
Bill Williams [Mon, 16 Feb 2009 18:56:41 +0000 (12:56 -0600)]
Merge branch 'master' of ssh://bill@git.dyninst.org/pub/dyninst
Bill Williams [Mon, 16 Feb 2009 18:52:46 +0000 (12:52 -0600)]
Added InstructionAPI test to new test suite on supported platforms; fixed a bug revealed by that test.
Updated InstructionAPI make.module.tmpl to copy include files to the right place.
Bill Williams [Mon, 16 Feb 2009 18:19:42 +0000 (12:19 -0600)]
Added InstructionAPI test to new test suite on supported platforms; fixed a bug revealed by that test.
Updated InstructionAPI make.module.tmpl to copy include files to the right place.
Matthew Legendre [Sat, 14 Feb 2009 00:32:36 +0000 (18:32 -0600)]
Add initial support for binary rewriting to newtestsuite
Matthew Legendre [Sat, 14 Feb 2009 00:32:00 +0000 (18:32 -0600)]
Binary rewriter fixes
Matthew Legendre [Fri, 13 Feb 2009 19:10:47 +0000 (13:10 -0600)]
Fix build warnings found on Linux/x86
James Jolly [Thu, 12 Feb 2009 23:16:30 +0000 (17:16 -0600)]
Recycling a stab at automagically generating make.config.local.
This work was originally pioneered by Dorian/Bill.
In an ideal world, we would use the Autotools to generate a
configure script for all of Dyninst; however, complete adoption
will probably require a non-trivial amount of effort.
Example use on cs.wisc.edu machines with AFS access:
From the root of dyninst.git, run...
./autodyninst/configure --with-package-base=/afs/cs.wisc.edu/p/paradyn/packages
make DyninstAPI
... note the above will blow away any make.config.local you may have in the
dyninst.git root directory.
It is possible to rebuild the configure script within the autodyninst directory.
Just use...
aclocal
autoconf
Michael Lam [Thu, 12 Feb 2009 21:48:09 +0000 (16:48 -0500)]
Fixes parseThat build on x86_64
Madhavi Krishnan [Thu, 12 Feb 2009 21:23:37 +0000 (15:23 -0600)]
Removed test_thread_4 from newtestsuite and its entry in spec-grouped.pl. Also generated tuples for all architectures.
Madhavi Krishnan [Thu, 12 Feb 2009 20:56:09 +0000 (14:56 -0600)]
Fixed bug - eh_frame->page_start is subtracted from PC twice to convert pc
from absolute address to relative address.
Bill Williams [Thu, 12 Feb 2009 17:37:06 +0000 (11:37 -0600)]
Added full namespace specification to fix a build error.
Madhavi Krishnan [Thu, 12 Feb 2009 16:51:55 +0000 (10:51 -0600)]
Merge branch 'master' of ssh://git.dyninst.org/pub/dyninst
Madhavi Krishnan [Thu, 12 Feb 2009 16:51:13 +0000 (10:51 -0600)]
HACK to handle kernel bug in VsysPage address range. vsys page address is randomized by the debug information is not updated with this address range.
Michael Lam [Thu, 12 Feb 2009 16:44:16 +0000 (11:44 -0500)]
Expanded .gitignore
Bill Williams [Mon, 9 Feb 2009 19:57:00 +0000 (13:57 -0600)]
InstructionAPI port to Windows.
New InstructionAPI feature: Expression::bind().
Arguments: another Expression subExpr and a Result r
Effect: Wherever subExpr appears in this Expression, assign it the value represented by r.
Returns: True if subExpr was found in this expression, false otherwise.