dyninst.git
3 years agoFinal bits of cleanup (warnings and version numbers).
Bill Williams [Fri, 11 Dec 2015 20:46:05 +0000 (14:46 -0600)]
Final bits of cleanup (warnings and version numbers).

3 years agoBPatch_object::findFunction should no longer spam BPatch errors for each of its modul...
Bill Williams [Thu, 10 Dec 2015 19:48:24 +0000 (13:48 -0600)]
BPatch_object::findFunction should no longer spam BPatch errors for each of its modules that don't contain the function requested.

3 years agoBPatch library callbacks now return a BPatch_object, in line with change from module...
Bill Williams [Thu, 10 Dec 2015 19:47:37 +0000 (13:47 -0600)]
BPatch library callbacks now return a BPatch_object, in line with change from module->object for representing libraries.

3 years agoUpdated READMEs
Bill Williams [Wed, 9 Dec 2015 22:24:33 +0000 (16:24 -0600)]
Updated READMEs

3 years agoDon't try to follow indirect catch blocks; they probably are not statically resolvabl...
Bill Williams [Mon, 7 Dec 2015 20:20:44 +0000 (14:20 -0600)]
Don't try to follow indirect catch blocks; they probably are not statically resolvable (and may segfault if we try).

3 years agoException block parsing fixes to match glibc internals:
Bill Williams [Mon, 7 Dec 2015 17:26:47 +0000 (11:26 -0600)]
Exception block parsing fixes to match glibc internals:

* DW_EH_PE_aligned refers to alignment within the .eh_frame section, not alignment of the target
* DW_EH_PE_indirect accounts for the "mysterious" bit at 0x80 in the type field, and should be respected.
* Zero values do not get the base added, but are ignored.
* Read the landing pad base if it's present, and use it; default to low_pc as before.
* Table end is always encoded as ULEB128, apparently.

3 years agoSlicing: ignore catch edges.
Bill Williams [Mon, 7 Dec 2015 17:23:12 +0000 (11:23 -0600)]
Slicing: ignore catch edges.

3 years agoFix string corruption in use of symtab names.
Bill Williams [Thu, 3 Dec 2015 17:17:36 +0000 (11:17 -0600)]
Fix string corruption in use of symtab names.

3 years agoFix bad handling of high_pc errors and bad default libdwarf error handler.
Bill Williams [Wed, 25 Nov 2015 22:17:23 +0000 (16:17 -0600)]
Fix bad handling of high_pc errors and bad default libdwarf error handler.

3 years agoFix dwarf_attr leak, which could get quite large with repeated line info queries.
Bill Williams [Fri, 20 Nov 2015 21:01:36 +0000 (15:01 -0600)]
Fix dwarf_attr leak, which could get quite large with repeated line info queries.

3 years agoFix bad decodes (per testsuite, which is actually correct on this one).
Bill Williams [Fri, 20 Nov 2015 21:01:11 +0000 (15:01 -0600)]
Fix bad decodes (per testsuite, which is actually correct on this one).

3 years agoModified byte-ordering used for instruction decoding for ARM64.
Sunny Shah [Mon, 7 Dec 2015 16:18:42 +0000 (10:18 -0600)]
Modified byte-ordering used for instruction decoding for ARM64.

The code was assuming ARM to be big endian while it is not. Modified the decode method to get instruction bytes according to litle-endian order.

3 years agoupdated the method to handle compiler bug when template functions appears first
SteveXiSong [Fri, 20 Nov 2015 22:40:37 +0000 (16:40 -0600)]
updated the method to handle compiler bug when template functions appears first

3 years agofixed the compiler bug when OPRimm appears at the first place of boost::list_of
SteveXiSong [Fri, 20 Nov 2015 21:37:27 +0000 (15:37 -0600)]
fixed the compiler bug when OPRimm appears at the first place of boost::list_of

4 years agoupdated decoder generator with class structure
SteveXiSong [Thu, 19 Nov 2015 00:08:49 +0000 (18:08 -0600)]
updated decoder generator with class structure

4 years agofixed insn_print merge conflicts
SteveXiSong [Wed, 18 Nov 2015 21:55:24 +0000 (15:55 -0600)]
fixed insn_print merge conflicts

4 years agofixed insn_printf
SteveXiSong [Wed, 18 Nov 2015 02:14:17 +0000 (20:14 -0600)]
fixed insn_printf

4 years agofixed insn_print bugs
SteveXiSong [Tue, 17 Nov 2015 18:55:12 +0000 (12:55 -0600)]
fixed insn_print bugs

4 years agoMerge branch 'v9.1.x' into arm64
SteveXiSong [Mon, 16 Nov 2015 23:06:06 +0000 (17:06 -0600)]
Merge branch 'v9.1.x' into arm64

4 years agoUpdated to 9.1
Bill Williams [Mon, 16 Nov 2015 16:13:54 +0000 (10:13 -0600)]
Updated to 9.1

4 years agoMerge branch 'v9.0.x' into v9.1.x
Bill Williams [Mon, 16 Nov 2015 15:46:52 +0000 (09:46 -0600)]
Merge branch 'v9.0.x' into v9.1.x

4 years agoMerge branch 'arm64' into v9.1.x
Sunny Shah [Sat, 14 Nov 2015 16:04:36 +0000 (10:04 -0600)]
Merge branch 'arm64' into v9.1.x

4 years agoMerge branch 'master' into arm64
SteveXiSong [Sat, 14 Nov 2015 01:22:22 +0000 (19:22 -0600)]
Merge branch 'master' into arm64

4 years agofixed merger conflicts
SteveXiSong [Fri, 13 Nov 2015 23:14:25 +0000 (17:14 -0600)]
fixed merger conflicts

4 years agouncommented reorder cases for ldst and fixed a bug in macro function for ldst_ex_pair...
SteveXiSong [Fri, 13 Nov 2015 23:04:10 +0000 (17:04 -0600)]
uncommented reorder cases for ldst and fixed a bug in macro function for ldst_ex_pair. Ready to be released.

4 years agoStack of IAPI fixes based on fuzz testing.
Bill Williams [Fri, 13 Nov 2015 22:47:26 +0000 (16:47 -0600)]
Stack of IAPI fixes based on fuzz testing.

4 years agoChanged names of right rotate, logical and arithmetic right shift functions displayed...
Sunny Shah [Fri, 13 Nov 2015 22:28:22 +0000 (16:28 -0600)]
Changed names of right rotate, logical and arithmetic right shift functions displayed when pretty printing the instruction

4 years agoModified handling of test-and-branch instructions to support our current operand...
Sunny Shah [Fri, 13 Nov 2015 22:14:52 +0000 (16:14 -0600)]
Modified handling of test-and-branch instructions to support our current operand re-ordering logic. (This will be reverted to the old code once we have ageneric ordering logic)

4 years agoA merge conflict was un-resolved in the previous commit. Resolving the same.
Sunny Shah [Fri, 13 Nov 2015 21:08:17 +0000 (15:08 -0600)]
A merge conflict was un-resolved in the previous commit. Resolving the same.

4 years agoFixed merge conflicts after merging with changes by Steve.wq
Sunny Shah [Fri, 13 Nov 2015 20:20:16 +0000 (14:20 -0600)]
Fixed merge conflicts after merging with changes by Steve.wq

4 years agoAdded logic to re-order the operands after delayed decoding.
Sunny Shah [Fri, 13 Nov 2015 20:13:32 +0000 (14:13 -0600)]
Added logic to re-order the operands after delayed decoding.

This is a temporary solution - will be replaced by a more generic solution in the coming weeks. For now, except for some instructions, the operand list is reversed after all operands are parsed. For the instructions that do not fit into this model, an operand swapping and rotating logic is used (at most there will be 1 swap and 2 rotates) to get the correct order.

4 years agoUpdated instruction table with output from the script with latest changes. This adds...
Sunny Shah [Fri, 13 Nov 2015 20:11:55 +0000 (14:11 -0600)]
Updated instruction table with output from the script with latest changes. This adds the setFlags method for instructions that need to set PSTATE.

4 years agocommented a line of debugging code
SteveXiSong [Fri, 13 Nov 2015 19:50:53 +0000 (13:50 -0600)]
commented a line of debugging code

4 years agoreversed the operand order and handled cases for ldst exceptions
SteveXiSong [Fri, 13 Nov 2015 19:44:28 +0000 (13:44 -0600)]
reversed the operand order and handled cases for ldst exceptions

4 years agoMerge branch 'arm64' of ssh://git.dyninst.org/pub/dyninst into arm64
Sunny Shah [Fri, 13 Nov 2015 13:10:52 +0000 (07:10 -0600)]
Merge branch 'arm64' of ssh://git.dyninst.org/pub/dyninst into arm64

4 years agoAdded operand re-ordering function skeleton.
Sunny Shah [Fri, 13 Nov 2015 13:09:06 +0000 (07:09 -0600)]
Added operand re-ordering function skeleton.

4 years agofixed some ls/st imm values bugs
SteveXiSong [Fri, 13 Nov 2015 04:49:30 +0000 (22:49 -0600)]
fixed some ls/st imm values bugs

4 years agoupdated the functions to generate setFlags
SteveXiSong [Fri, 13 Nov 2015 03:29:39 +0000 (21:29 -0600)]
updated the functions to generate setFlags

4 years agomodified the aarch64_opc_table and added coresponding function in header file
SteveXiSong [Thu, 12 Nov 2015 20:32:33 +0000 (14:32 -0600)]
modified the aarch64_opc_table and added coresponding function in header file

4 years agoadded setflags field function
SteveXiSong [Thu, 12 Nov 2015 20:24:18 +0000 (14:24 -0600)]
added setflags field function

4 years agoSupport for system registers.
Sunny Shah [Thu, 12 Nov 2015 17:48:23 +0000 (11:48 -0600)]
Support for system registers.

* Added all EL0 accessible system registers to dyn_regs.
* MSR and MRS (register) now add the system register (if EL0 accessible) and the source/destination register to the AST.
* Added a map from system register encodings to thier names. A function - buildSysRegMap - builds this map.

4 years agoModified logic for constructing an AST for a branch instruction.
Sunny Shah [Wed, 11 Nov 2015 20:14:48 +0000 (14:14 -0600)]
Modified logic for constructing an AST for a branch instruction.

Branches that are calls (BL and BLR) will add PC+4 as fallthrough instead of LR.

4 years agoFurther decoding fixes.
Bill Williams [Wed, 11 Nov 2015 20:10:36 +0000 (14:10 -0600)]
Further decoding fixes.

4 years agoresoleved conflicts
SteveXiSong [Tue, 10 Nov 2015 19:37:30 +0000 (13:37 -0600)]
resoleved conflicts

4 years agocommited weak solution to aliasing
SteveXiSong [Tue, 10 Nov 2015 19:34:42 +0000 (13:34 -0600)]
commited weak solution to aliasing

4 years agoFixed marking of an instruction as invalid by setting opcode to invalid and clearing...
Sunny Shah [Tue, 10 Nov 2015 17:41:45 +0000 (11:41 -0600)]
Fixed marking of an instruction as invalid by setting opcode to invalid and clearing the operands.
Modified read and write status of PSTATE for system instructions, as well as other changes to system instructions to handle operands correctly.

4 years agofixed bad switch cases
SteveXiSong [Tue, 10 Nov 2015 00:07:09 +0000 (18:07 -0600)]
fixed bad switch cases

4 years agoFixed detection of flaoting point compare instruction.
Sunny Shah [Mon, 9 Nov 2015 22:59:21 +0000 (16:59 -0600)]
Fixed detection of flaoting point compare instruction.

4 years agoFixed build issues relating to creating an immediate operand.
Sunny Shah [Mon, 9 Nov 2015 22:35:46 +0000 (16:35 -0600)]
Fixed build issues relating to creating an immediate operand.

4 years agoFixed build issues.
Sunny Shah [Mon, 9 Nov 2015 22:30:05 +0000 (16:30 -0600)]
Fixed build issues.

4 years agoFixed a minor bug in the instruction table.
Sunny Shah [Fri, 6 Nov 2015 21:48:21 +0000 (15:48 -0600)]
Fixed a minor bug in the instruction table.

No list_of() should be used when assigning an empty vector.

4 years agoChanged initialization of condStringMap to use the assign method which is passed...
Sunny Shah [Fri, 6 Nov 2015 20:49:16 +0000 (14:49 -0600)]
Changed initialization of condStringMap to use the assign method which is passed in an array.

4 years agoMerge branch 'arm64' of ssh://git.dyninst.org/pub/dyninst into arm64
Sunny Shah [Fri, 6 Nov 2015 15:29:02 +0000 (09:29 -0600)]
Merge branch 'arm64' of ssh://git.dyninst.org/pub/dyninst into arm64

Conflicts:
instructionAPI/src/InstructionDecoder-aarch64.C

4 years agoFixed handling of option field to match decode semantics in the manual as opposed...
Sunny Shah [Fri, 6 Nov 2015 15:26:14 +0000 (09:26 -0600)]
Fixed handling of option field to match decode semantics in the manual as opposed to the textual description of the field.

4 years agoadd field calls for '!=' fields
SteveXiSong [Fri, 6 Nov 2015 00:07:03 +0000 (18:07 -0600)]
add field calls for '!=' fields

4 years agoresolved conflicts
SteveXiSong [Thu, 5 Nov 2015 21:35:39 +0000 (15:35 -0600)]
resolved conflicts

4 years agofixed some minor bugs for ld/st
SteveXiSong [Thu, 5 Nov 2015 21:30:35 +0000 (15:30 -0600)]
fixed some minor bugs for ld/st

4 years agoFixes as part of validation.
Sunny Shah [Thu, 5 Nov 2015 17:31:39 +0000 (11:31 -0600)]
Fixes as part of validation.

* Added InstructionDecoder-aarch64 as a friend class of Operation so that mnemonics can be modified for conditional branches. Added a map of condition code to its string representation - the mnemonic is modified accordingly.
* Updated decoder and instruction table with output of most recent script.
* Added support for add/sub extended register instructions.
* Few other fixes for floating point instructions.

4 years agoMerge branch 'arm64' of ssh://git.dyninst.org/pub/dyninst into arm64
SteveXiSong [Wed, 4 Nov 2015 21:10:55 +0000 (15:10 -0600)]
Merge branch 'arm64' of ssh://git.dyninst.org/pub/dyninst into arm64

4 years agovalidated ld class.
SteveXiSong [Wed, 4 Nov 2015 21:10:47 +0000 (15:10 -0600)]
validated ld class.

4 years agoModified register names for floating point registers.
Sunny Shah [Wed, 4 Nov 2015 16:16:07 +0000 (10:16 -0600)]
Modified register names for floating point registers.

Register names for FP registers were using incorrect values from dyn_regs.h for half/single/double precision. Fixed these to use names according to the manual.
Added support for zero-variants of some FP isntructions.

4 years agoMerge branch 'arm64' of ssh://git.dyninst.org/pub/dyninst into arm64
SteveXiSong [Tue, 3 Nov 2015 03:40:07 +0000 (21:40 -0600)]
Merge branch 'arm64' of ssh://git.dyninst.org/pub/dyninst into arm64

4 years ago1.re-ordered the alias instructions as a weak solution. 2.fixed some ld/st bugs....
SteveXiSong [Tue, 3 Nov 2015 03:39:37 +0000 (21:39 -0600)]
1.re-ordered the alias instructions as a weak solution. 2.fixed some ld/st bugs. 3.fixed a bug in unsign_extend64

4 years agoFixed ARM64 register sizes. Floating point register sizes were specified in accordanc...
Sunny Shah [Fri, 30 Oct 2015 21:05:21 +0000 (16:05 -0500)]
Fixed ARM64 register sizes. Floating point register sizes were specified in accordance with the nomenclature in the ARM manual, which differ from their actual sizes.

4 years agoupdate generator: type field is generated with using template
SteveXiSong [Thu, 29 Oct 2015 21:59:11 +0000 (16:59 -0500)]
update generator: type field is generated with using template

4 years agorestore the operand calling order
SteveXiSong [Thu, 29 Oct 2015 02:43:27 +0000 (21:43 -0500)]
restore the operand calling order

4 years agoMerge branch 'arm64' of ssh://git.dyninst.org/pub/dyninst into arm64
SteveXiSong [Wed, 28 Oct 2015 19:57:02 +0000 (14:57 -0500)]
Merge branch 'arm64' of ssh://git.dyninst.org/pub/dyninst into arm64

4 years agomark TODO functions
SteveXiSong [Wed, 28 Oct 2015 19:56:54 +0000 (14:56 -0500)]
mark TODO functions

4 years agoInstructionAPI decoding fixes.
Bill Williams [Wed, 28 Oct 2015 19:29:38 +0000 (14:29 -0500)]
InstructionAPI decoding fixes.

4 years agoMerge branch 'arm64' of ssh://git.dyninst.org/pub/dyninst into arm64
Sunny Shah [Tue, 27 Oct 2015 22:16:04 +0000 (17:16 -0500)]
Merge branch 'arm64' of ssh://git.dyninst.org/pub/dyninst into arm64

4 years agoAdded complete instruction and decoder table generated from the python script.
Sunny Shah [Tue, 27 Oct 2015 22:14:48 +0000 (17:14 -0500)]
Added complete instruction and decoder table generated from the python script.

4 years agoMerge branch 'arm64' of ssh://git.dyninst.org/pub/dyninst into arm64
SteveXiSong [Tue, 27 Oct 2015 22:04:01 +0000 (17:04 -0500)]
Merge branch 'arm64' of ssh://git.dyninst.org/pub/dyninst into arm64

4 years agochange unallocated to IVALID
SteveXiSong [Tue, 27 Oct 2015 22:03:25 +0000 (17:03 -0500)]
change unallocated to IVALID

4 years agoMerge branch 'arm64' of ssh://git.dyninst.org/pub/dyninst into arm64
Sunny Shah [Tue, 27 Oct 2015 22:00:01 +0000 (17:00 -0500)]
Merge branch 'arm64' of ssh://git.dyninst.org/pub/dyninst into arm64

4 years agoChanged order of start and end bit names in oeprand templates and added updated ARM64...
Sunny Shah [Tue, 27 Oct 2015 21:59:38 +0000 (16:59 -0500)]
Changed order of start and end bit names in oeprand templates and added updated ARM64 opcode entry IDs to the entry ID enum.

4 years agoreplace ',' with COMMA
SteveXiSong [Tue, 27 Oct 2015 21:59:36 +0000 (16:59 -0500)]
replace ',' with COMMA

4 years agoMerge branch 'arm64' of ssh://git.dyninst.org/pub/dyninst into arm64
SteveXiSong [Tue, 27 Oct 2015 21:42:28 +0000 (16:42 -0500)]
Merge branch 'arm64' of ssh://git.dyninst.org/pub/dyninst into arm64

4 years agoadjust the decoder generator
SteveXiSong [Tue, 27 Oct 2015 21:42:01 +0000 (16:42 -0500)]
adjust the decoder generator

4 years agoAdded support for floating point immediate instruction category.
Sunny Shah [Tue, 27 Oct 2015 17:55:41 +0000 (12:55 -0500)]
Added support for floating point immediate instruction category.

4 years agoMerge branch 'arm64' of ssh://git.dyninst.org/pub/dyninst into arm64
SteveXiSong [Mon, 26 Oct 2015 22:08:05 +0000 (17:08 -0500)]
Merge branch 'arm64' of ssh://git.dyninst.org/pub/dyninst into arm64

4 years agoadded functions to distinguish single precision and double precision insn. Updated...
SteveXiSong [Mon, 26 Oct 2015 22:07:46 +0000 (17:07 -0500)]
added functions to distinguish single precision and double precision insn. Updated function names and resolved some consistency issues

4 years agoAdded remaining functionality for processing the option field.
Sunny Shah [Mon, 26 Oct 2015 21:40:49 +0000 (16:40 -0500)]
Added remaining functionality for processing the option field.

This takes care of cases which involve using LSL in the option field. The appropriate left shift or register expression will be made based on the value of "option", Rn and Rd registers and the shift amount.

4 years agoFixed bugs in newly added binary functions.
Sunny Shah [Mon, 26 Oct 2015 18:27:13 +0000 (13:27 -0500)]
Fixed bugs in newly added binary functions.

Following bugs fixed:
* Overload for | was calling doAnd, and vice versa.
* Right rotate wasn't correctly handling rotate amounts greater than the length of the field to be rotated.

4 years agofilled operand functions for ld/st reg
SteveXiSong [Fri, 23 Oct 2015 22:02:30 +0000 (17:02 -0500)]
filled operand functions for ld/st reg

4 years agoMerge branch 'arm64' of ssh://git.dyninst.org/pub/dyninst into arm64
SteveXiSong [Fri, 23 Oct 2015 19:52:43 +0000 (14:52 -0500)]
Merge branch 'arm64' of ssh://git.dyninst.org/pub/dyninst into arm64

4 years agoupdated generator and instructionDecoder
SteveXiSong [Fri, 23 Oct 2015 19:52:34 +0000 (14:52 -0500)]
updated generator and instructionDecoder

4 years agoAdded a new macro to check branching instructions and run doDelayedDecode immediately...
Sunny Shah [Fri, 23 Oct 2015 16:44:36 +0000 (11:44 -0500)]
Added a new macro to check branching instructions and run doDelayedDecode immediately is the macro is satisfied

4 years agoFixed build errors and removed unneeded functions from InstructionDecoderImpl
Sunny Shah [Fri, 23 Oct 2015 16:34:59 +0000 (11:34 -0500)]
Fixed build errors and removed unneeded functions from InstructionDecoderImpl

4 years agoRemoving the extendRequired attribute for Register. We don't say if extension is...
Sunny Shah [Fri, 23 Oct 2015 16:00:06 +0000 (11:00 -0500)]
Removing the extendRequired attribute for Register. We don't say if extension is reuqired and let the user handle it based on the type of the Register's Result member.

4 years agomerged two memRefs to one. fixed compiled errors for ld/st classes
SteveXiSong [Thu, 22 Oct 2015 22:31:47 +0000 (17:31 -0500)]
merged two memRefs to one. fixed compiled errors for ld/st classes

4 years agoupdated decoder aarch64
SteveXiSong [Thu, 22 Oct 2015 21:53:35 +0000 (16:53 -0500)]
updated decoder aarch64

4 years agoMake modules, from Symtab through BPatch, consistently correspond to .o files, with...
Bill Williams [Mon, 28 Sep 2015 18:46:44 +0000 (13:46 -0500)]
Make modules, from Symtab through BPatch, consistently correspond to .o files, with objects corresponding to executables and libraries.

4 years agoDon't special-case shared libraries with respect to modules.
Bill Williams [Thu, 17 Sep 2015 21:54:34 +0000 (16:54 -0500)]
Don't special-case shared libraries with respect to modules.

4 years agoFix for LD_PRELOAD logic
Bill Williams [Mon, 19 Oct 2015 21:25:25 +0000 (16:25 -0500)]
Fix for LD_PRELOAD logic

4 years agoFix unsafe string operations.
Bill Williams [Mon, 19 Oct 2015 21:22:45 +0000 (16:22 -0500)]
Fix unsafe string operations.

4 years agoWindows performance fixes
Bill Williams [Fri, 16 Oct 2015 16:18:04 +0000 (11:18 -0500)]
Windows performance fixes

4 years agoAdd boost additional versions through 1.59
Bill Williams [Wed, 14 Oct 2015 16:03:16 +0000 (11:03 -0500)]
Add boost additional versions through 1.59

4 years agoLink dyninstAPI against imagehlp (rewriter).
Bill Williams [Wed, 14 Oct 2015 16:03:03 +0000 (11:03 -0500)]
Link dyninstAPI against imagehlp (rewriter).

4 years agoLine information fix
Bill Williams [Wed, 14 Oct 2015 15:49:48 +0000 (10:49 -0500)]
Line information fix

4 years agoIntermodule variable reference fix
Bill Williams [Wed, 14 Oct 2015 15:49:41 +0000 (10:49 -0500)]
Intermodule variable reference fix