12 years agoUse fixpoint analysis correctly.
Andrew Bernat [Mon, 9 Mar 2009 22:45:47 +0000 (17:45 -0500)]
Use fixpoint analysis correctly.

12 years agoMerge branch 'master' of git.dyninst.org:/pub/dyninst
Andrew Bernat [Mon, 9 Mar 2009 21:23:28 +0000 (16:23 -0500)]
Merge branch 'master' of git.dyninst.org:/pub/dyninst

12 years agoThe DDG code now uses the annotation interface to store the DDG at a function level...
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.

12 years agoWindows fix: with IA32 decoding getting consolidated in IAPI, we need to export the...
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.

12 years agoMerge branch 'master' of git.dyninst.org:/pub/dyninst
madhavi [Fri, 6 Mar 2009 17:18:40 +0000 (11:18 -0600)]
Merge branch 'master' of git.dyninst.org:/pub/dyninst

12 years agoCouple of build error fixes (1) polito build error - changed std::vector to pdvector...
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)

12 years agoMerge branch 'master' of legendre@git.dyninst.org:/pub/dyninst
Matthew Legendre [Thu, 5 Mar 2009 23:09:32 +0000 (17:09 -0600)]
Merge branch 'master' of legendre@git.dyninst.org:/pub/dyninst

12 years agoRemoved incorrect assert from generating long branches on power
Matthew Legendre [Thu, 5 Mar 2009 23:08:46 +0000 (17:08 -0600)]
Removed incorrect assert from generating long branches on power

12 years agoCompensate for InstructionAPI shared_ptr limitations.
Andrew Bernat [Thu, 5 Mar 2009 22:54:43 +0000 (16:54 -0600)]
Compensate for InstructionAPI shared_ptr limitations.

12 years agoMerge branch 'master' of git.dyninst.org:/pub/dyninst
Andrew Bernat [Thu, 5 Mar 2009 22:23:08 +0000 (16:23 -0600)]
Merge branch 'master' of git.dyninst.org:/pub/dyninst

12 years agoHandle aliasing correctly (in theory; pending bug fixes)
Andrew Bernat [Thu, 5 Mar 2009 22:22:56 +0000 (16:22 -0600)]
Handle aliasing correctly (in theory; pending bug fixes)

12 years agoCorrectly promote 64-bit registers that may show up in 32-bit mode.
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.

12 years agoFix dumb bug introduced yesterday; expand debugging output.
Andrew Bernat [Thu, 5 Mar 2009 22:22:23 +0000 (16:22 -0600)]
Fix dumb bug introduced yesterday; expand debugging output.

12 years agoFix for parseThat failures. While relocating functions, we also relocate functions...
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.

12 years agoMerge branch 'master' of git.dyninst.org:/pub/dyninst
Andrew Bernat [Wed, 4 Mar 2009 23:01:06 +0000 (17:01 -0600)]
Merge branch 'master' of git.dyninst.org:/pub/dyninst

12 years agoUpdate to new Graph::printDOT interface
Andrew Bernat [Wed, 4 Mar 2009 22:59:53 +0000 (16:59 -0600)]
Update to new Graph::printDOT interface

12 years agoImplement aliasing in the DDG.
Andrew Bernat [Wed, 4 Mar 2009 21:28:18 +0000 (15:28 -0600)]
Implement aliasing in the DDG.

12 years agoFix for incomplete parsing in the event of failures in parseDwarf.C. This commit...
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

12 years agoAdded real FP liveness tracking to AMD64. This fixes test1_20.
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.

12 years agoInstructionAPI documentation updates: properly integrated into make system, produces...
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.

12 years agoReally delete mutatees.
Andrew Bernat [Tue, 3 Mar 2009 22:48:20 +0000 (16:48 -0600)]
Really delete mutatees.

12 years agoAdd debugging print statement (DYNINST_DEBUG_STACKANALYSIS) for new stack analysis...
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.

12 years agoRemove compiler warning by initializing pointer to NULL.
Andrew Bernat [Tue, 3 Mar 2009 22:32:10 +0000 (16:32 -0600)]
Remove compiler warning by initializing pointer to NULL.

12 years agoReplace prototype "getContainingReg" with "promote".
Andrew Bernat [Tue, 3 Mar 2009 20:24:11 +0000 (14:24 -0600)]
Replace prototype "getContainingReg" with "promote".

12 years agoDDG updates:
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.

12 years agoTwo new methods in the image_func and int_function class hierarchies:
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

Add a conversion function from int_function Address to image_func Offset.

12 years agoAdd prototype stack depth analysis derived from Matt's initial
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

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

Debugging output should be made with stanalysis_printf.

12 years agoUse stl::queue instead of stl::list for worklist data structure.
Andrew Bernat [Fri, 27 Feb 2009 17:48:02 +0000 (11:48 -0600)]
Use stl::queue instead of stl::list for worklist data structure.

12 years agoAdd a new "Interval Tree" type. This is a templated version of our
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

One exception: overlapping ranges with the same value are allowed
(needed to handle overlapping basic blocks).

12 years agoFix problems with identifying thread starts on x86 based systems
Matthew Legendre [Tue, 3 Mar 2009 18:45:43 +0000 (12:45 -0600)]
Fix problems with identifying thread starts on x86 based systems

12 years agoFix performance issue in SymtabAPI for objects with lots of modules
Matthew Legendre [Mon, 2 Mar 2009 23:29:19 +0000 (17:29 -0600)]
Fix performance issue in SymtabAPI for objects with lots of modules

12 years agoMinor bug fixes to binary rewriter
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

12 years agoIn process.C, installInstrRequests(), vector of miniTramps was added to preExitInst...
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.

12 years agoEnable Frame pointer location list for all platforms. Previously. only on x86_64...
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.

12 years agoFixed test_instruction_read_write for correctness on AMD64.
Bill Williams [Tue, 24 Feb 2009 16:34:44 +0000 (10:34 -0600)]
Fixed test_instruction_read_write for correctness on AMD64.

12 years agoMerge branch 'master' of ssh://git.dyninst.org/pub/dyninst
Madhavi Krishnan [Tue, 24 Feb 2009 05:13:24 +0000 (23:13 -0600)]
Merge branch 'master' of ssh://git.dyninst.org/pub/dyninst

12 years agoFixed bug in checking FP register liveState. anyLiveFPRsAtEntry() returns true if...
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

12 years agoMerge branch 'master' of git.dyninst.org:/pub/dyninst
Andrew Bernat [Mon, 23 Feb 2009 23:00:13 +0000 (17:00 -0600)]
Merge branch 'master' of git.dyninst.org:/pub/dyninst

12 years agoCorrectly handle a case when a block contains no instructions that
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.

12 years agoConvert incoming registers (from InstructionAPI) to the "canonical"
Andrew Bernat [Mon, 23 Feb 2009 22:59:25 +0000 (16:59 -0600)]
Convert incoming registers (from InstructionAPI) to the "canonical"
containing register.

12 years agoAdd upconverting "getContainingReg" method.
Andrew Bernat [Mon, 23 Feb 2009 22:59:01 +0000 (16:59 -0600)]
Add upconverting "getContainingReg" method.

12 years agoAdd the "Auxiliary carry" flag to the set of ID->name mappings for
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.

12 years agoBug fix: readsMemory() and writesMemory() were converting an Operand's Expression...
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.

12 years agoMerge branch 'master' of git.dyninst.org:/pub/dyninst
Andrew Bernat [Mon, 23 Feb 2009 20:22:22 +0000 (14:22 -0600)]
Merge branch 'master' of git.dyninst.org:/pub/dyninst

12 years agoAdd necessary methods to get the new DDG component to link with a mutator.
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.

12 years agowindows binary rewriter
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.

12 years agoFix for variables in BSS section in icc. With icc, variables in bss are categorized...
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

12 years agoBugfix: AMD64 liveness
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.

12 years agoAvoid invalid stl::map iterator usage
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.

12 years agoProperly build block lists of shared functions
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.

12 years agoAdd additional BPatch_basicBlock::getInstructions<Instruction,Address> to complement
Andrew Bernat [Fri, 20 Feb 2009 02:29:30 +0000 (20:29 -0600)]
Add additional BPatch_basicBlock::getInstructions<Instruction,Address> to complement

12 years agoRemove obsolete CVS files
Andrew Bernat [Wed, 18 Feb 2009 17:21:15 +0000 (11:21 -0600)]
Remove obsolete CVS files

12 years agoWorking commit of new DDG component
Andrew Bernat [Wed, 4 Feb 2009 15:37:11 +0000 (09:37 -0600)]
Working commit of new DDG component

12 years agoAdd parallel BPatch_flowGraph::getAllBasicBlocks that takes an STL set as
Matthew Legendre [Fri, 20 Feb 2009 01:05:37 +0000 (19:05 -0600)]
Add parallel BPatch_flowGraph::getAllBasicBlocks that takes an STL set as


12 years agoMerge branch 'master' of legendre@git.dyninst.org:/pub/dyninst
Matthew Legendre [Fri, 20 Feb 2009 01:05:37 +0000 (19:05 -0600)]
Merge branch 'master' of legendre@git.dyninst.org:/pub/dyninst

12 years agoFixes for binary rewriter
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.

12 years agoFix for test1_33 on Windows.
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.

12 years agoThis commit fixes chaining of dieEntries in parsing DWARF information. test5_5.C...
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.

12 years agoC++ comments in mutatee files are bad.
Bill Williams [Wed, 18 Feb 2009 23:17:49 +0000 (17:17 -0600)]
C++ comments in mutatee files are bad.

12 years agoFixed test1_27 so that the mutatee will have correct type information on both gcc...
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.

12 years agoFix miniTramp uninstrument bug. uninstrument removes MT instances by iterating over...
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

12 years agoMerge branch 'master' of legendre@git.dyninst.org:/pub/dyninst
Matthew Legendre [Tue, 17 Feb 2009 17:56:39 +0000 (11:56 -0600)]
Merge branch 'master' of legendre@git.dyninst.org:/pub/dyninst

12 years agoFix memory corruption, remove debugging printfs
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.

12 years agoThis should fix the crash in test 1_29 on Windows.
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.

12 years agoFix printfs before nightly runs
Matthew Legendre [Tue, 17 Feb 2009 03:25:07 +0000 (21:25 -0600)]
Fix printfs before nightly runs

12 years agoAdd debugging prints for output in nightly tests
Matthew Legendre [Mon, 16 Feb 2009 23:29:44 +0000 (17:29 -0600)]
Add debugging prints for output in nightly tests

12 years agoFixes for Power platforms:
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

12 years agoBugfix: don't try to build instructionAPI component if we have no mutators (and thus...
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).

12 years agoMerge branch 'master' of legendre@git.dyninst.org:/pub/dyninst
Matthew Legendre [Mon, 16 Feb 2009 19:29:20 +0000 (13:29 -0600)]
Merge branch 'master' of legendre@git.dyninst.org:/pub/dyninst

12 years agoFix windows build problem in newtestsuite
Matthew Legendre [Mon, 16 Feb 2009 19:28:34 +0000 (13:28 -0600)]
Fix windows build problem in newtestsuite

12 years agoMerge branch 'master' of ssh://bill@git.dyninst.org/pub/dyninst
Bill Williams [Mon, 16 Feb 2009 18:56:41 +0000 (12:56 -0600)]
Merge branch 'master' of ssh://bill@git.dyninst.org/pub/dyninst

12 years agoAdded InstructionAPI test to new test suite on supported platforms; fixed a bug revea...
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.

12 years agoAdded InstructionAPI test to new test suite on supported platforms; fixed a bug revea...
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.

12 years agoAdd initial support for binary rewriting to newtestsuite
Matthew Legendre [Sat, 14 Feb 2009 00:32:36 +0000 (18:32 -0600)]
Add initial support for binary rewriting to newtestsuite

12 years agoBinary rewriter fixes
Matthew Legendre [Sat, 14 Feb 2009 00:32:00 +0000 (18:32 -0600)]
Binary rewriter fixes

12 years agoFix build warnings found on Linux/x86
Matthew Legendre [Fri, 13 Feb 2009 19:10:47 +0000 (13:10 -0600)]
Fix build warnings found on Linux/x86

12 years agoRecycling a stab at automagically generating make.config.local.
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...

12 years agoFixes parseThat build on x86_64
Michael Lam [Thu, 12 Feb 2009 21:48:09 +0000 (16:48 -0500)]
Fixes parseThat build on x86_64

12 years agoRemoved test_thread_4 from newtestsuite and its entry in spec-grouped.pl. Also genera...
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.

12 years agoFixed bug - eh_frame->page_start is subtracted from PC twice to convert pc
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.

12 years agoAdded full namespace specification to fix a build error.
Bill Williams [Thu, 12 Feb 2009 17:37:06 +0000 (11:37 -0600)]
Added full namespace specification to fix a build error.

12 years agoMerge branch 'master' of ssh://git.dyninst.org/pub/dyninst
Madhavi Krishnan [Thu, 12 Feb 2009 16:51:55 +0000 (10:51 -0600)]
Merge branch 'master' of ssh://git.dyninst.org/pub/dyninst

12 years agoHACK to handle kernel bug in VsysPage address range. vsys page address is randomized...
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.

12 years agoExpanded .gitignore
Michael Lam [Thu, 12 Feb 2009 16:44:16 +0000 (11:44 -0500)]
Expanded .gitignore

12 years agoInstructionAPI port to Windows.
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.

12 years agoWindows build & parsing fixes
Nathan Rosenblum [Wed, 11 Feb 2009 17:38:41 +0000 (11:38 -0600)]
Windows build & parsing fixes

1) Enforcement of correct const_iterator semantics by MSVS prevented
Dyninst from building on the Windows platform.

2) The recursive traversal parsing update attempted to conserve memory
by deleting image_func objects that failed to parse. Because our current
CFG design lacks a coherant mechanism for undoing all changes to global
state incurred by parsing, particular scenarios could lead to bad state
if we delete these spurious image_func objects. I've disabled this
feature for now; a design-level fix is necessary to solve the underlying

12 years agoRemoved -g debug info flag when building RT library assembly file
Matthew Legendre [Tue, 10 Feb 2009 20:54:22 +0000 (14:54 -0600)]
Removed -g debug info flag when building RT library assembly file

Madhavi discovered a problem when building the RT library with debug info enabled, where one of the assembly files would produce a .o file with un-resolvable relocations.  This almost seems like a bug in our assembler, as a debug info symbol should not need relocations in the first place.

I've fixed this by removing the -g option for building this file.  Debug info odesn't produce anything useful for assembly files anyways.

12 years agofix solaris 2.9 newtestsuite build. (add compiler parameter for test6 assembly files)
James Waskiewicz [Tue, 10 Feb 2009 20:00:11 +0000 (15:00 -0500)]
fix solaris 2.9 newtestsuite build.  (add compiler parameter for test6 assembly files)

12 years agoFix missing whitespace in makemake.py and regenerate newtestsuite files
Matthew Legendre [Tue, 10 Feb 2009 17:38:37 +0000 (11:38 -0600)]
Fix missing whitespace in makemake.py and regenerate newtestsuite files

12 years agoFix build failure in newtestsuite
Matthew Legendre [Mon, 9 Feb 2009 22:33:17 +0000 (16:33 -0600)]
Fix build failure in newtestsuite

12 years agoMerge branch 'master' of git.dyninst.org:/pub/dyninst
Matthew Legendre [Fri, 6 Feb 2009 22:18:26 +0000 (16:18 -0600)]
Merge branch 'master' of git.dyninst.org:/pub/dyninst


12 years agoBug fixes that go with the Binary Rewriter features
Matthew Legendre [Fri, 6 Feb 2009 22:16:05 +0000 (16:16 -0600)]
Bug fixes that go with the Binary Rewriter features

12 years agoIntroducing recursive traversal parsing into Dyninst.
Nathan Rosenblum [Thu, 22 Jan 2009 20:03:16 +0000 (14:03 -0600)]
Introducing recursive traversal parsing into Dyninst.

Instead of blindly parsing past call instructions, we now
parse the callee first, attempting to determine (if possible)
whether the function returns. If we can safely determine that
it _does not_, parsing is terminated at the call instruction
to prevent misparsed code.

This commit also disables speculative parsing of stripped
binaries using our current heuristics, which are known to
be faulty on some platforms.

A couple of other fixes crept in:

 - Functions created based on bad symbol table data
   (e.g., invalid addresses) are no longer parsed

 - A couple of build errors in the newtestsuite

12 years agoGracefully handle unexpectedly empty SYMTAB sections
Nathan Rosenblum [Fri, 6 Feb 2009 19:00:20 +0000 (13:00 -0600)]
Gracefully handle unexpectedly empty SYMTAB sections

We were not checking for validity of SYMTAB sections handed back by libelf;
this commit prevents faults in the case of empty but extant sections.

12 years agoWindows build fixes, take 1:
Bill Williams [Fri, 6 Feb 2009 18:43:59 +0000 (12:43 -0600)]
Windows build fixes, take 1:

* Test suite make gen-clean, make gen-all should work again.
* test2_10 removed from Windows genfiles
* Annotation test now passes on Windows
* Removed unused local from pdwinnt.C, thus removing a compiler warning

12 years agoMerge branch 'master' of git.dyninst.org:/pub/dyninst
Matthew Legendre [Thu, 5 Feb 2009 20:36:32 +0000 (14:36 -0600)]
Merge branch 'master' of git.dyninst.org:/pub/dyninst


12 years agoBug fixes from testing binaryEdit changes
Matthew Legendre [Thu, 5 Feb 2009 20:34:03 +0000 (14:34 -0600)]
Bug fixes from testing binaryEdit changes

12 years agoMerge branch 'master' of git.dyninst.org:/pub/dyninst
Matthew Legendre [Thu, 5 Feb 2009 20:33:09 +0000 (14:33 -0600)]
Merge branch 'master' of git.dyninst.org:/pub/dyninst


12 years agoThis commit allows us to return a correct set of types in BPatch_type::getComponents...
Tugrul Ince [Wed, 4 Feb 2009 20:39:20 +0000 (15:39 -0500)]
This commit allows us to return a correct set of types in BPatch_type::getComponents() for types whose base type (constituent type) is a structure/class.

In Dyninst::Symtab::Type::getComponents(), we were ignoring all derived types that are not typedefs. However, pointers to classes/structures are derived types that should be handled correctly. Instead of just dealing with typedeftypes, we now treat all derived types the same: return the components of the base type.

We never created BPatch_type objects for some Dyninst::Symtab::Type's. Therefore, the upPtr in Type was set to null. However, for derived types, Dyninst::Symtab::Type::getComponents() relies on correctly set upPtr's. Now, whenever we create a new BPatch_type from a Type object that is a derived type, we create a BPatch_type object for the base type as well. upPtr's are set accordingly in BPatch_type constructor. For now, we are not registering these new BPatch_type objects anywhere else.

12 years agoChanged reference to `stl::vector' to `pdvector', as AIX still uses
Nathan Rosenblum [Wed, 4 Feb 2009 16:39:49 +0000 (10:39 -0600)]
Changed reference to `stl::vector' to `pdvector', as AIX still uses
our home-rolled vector class.