dyninst.git
2 years agoMimic PLT behavior when replacing a call to a PLT stub [PPC] welton_diogenes
Benjamin Welton [Sat, 4 May 2019 21:35:14 +0000 (14:35 -0700)]
Mimic PLT behavior when replacing a call to a PLT stub [PPC]

PLT functions on Power have an instruction that stores the current TOC (R2)
onto the stack at position 24 (i.e. std r2,24(r1)). A new stack frame is not
created by the PLT, R2 is stored in the callers frame.

Upon return, the function that called the PLT stub tries to restore its
TOC from the stack (i.e. "bl pltStub" followed by a "ld r2,24(r1)").
We need to ensure that R2 is on the callers stack for any PLT function
we replace.

What this patch does is for any call to a PLT stub that has been modified,
we insert "std r2,24(r1)" to simulate that a PLT was called (even if we are
calling a function direct). The new pattern written is the following:

if original call was PLT:
write std r2,24(r1)
<Original CFWidget Call Generation for PPC>

We determine if the original call was a PLT by first saving the original target
of the call instruction in Modification.C, passing this address to the widget,
then checking if the original target address is listed in the image's pltstub list.

 expects to be able to restore R2 from stack position 24

2 years agoMerging local changes
Benjamin Welton [Thu, 25 Apr 2019 20:51:56 +0000 (13:51 -0700)]
Merging local changes

2 years agoUpdating diogenes branch
Benjamin Welton [Thu, 14 Feb 2019 21:43:29 +0000 (13:43 -0800)]
Updating diogenes branch

Diogenes branch update wrapping together latest fixes/changes.

This commit should not be moved to dyninst master or beyond this
branch.

2 years agoFix: BPatch_effectiveAddress to no longer truncate mem addresses on Power
Benjamin Welton [Thu, 3 Jan 2019 00:14:22 +0000 (16:14 -0800)]
Fix: BPatch_effectiveAddress to no longer truncate mem addresses on Power

In certain circumstances, BPatch_effectiveAddress would generate code that truncated
memory addresses to the bottom 32bits. The result is that instrimentation would see only
the bottom 32bits of any memory address.

Before this patch, the issue occured when instrimentation was applied to load/store instructions
where the address was located in registers r3-r11 (exclusive).

Ideally this function should just be straight removed in future releases (only used by emitASLoad).

2 years agoMinor cleanup on welton_diogenes branch
Benjamin Welton [Wed, 2 Jan 2019 21:46:44 +0000 (13:46 -0800)]
Minor cleanup on welton_diogenes branch

2 years agoTemporary fix for trampguard function finding issue
Benjamin Welton [Sat, 8 Dec 2018 01:00:39 +0000 (19:00 -0600)]
Temporary fix for trampguard function finding issue

2 years agoDebug test for DYNINST_unlock_tramp_guard issues
Benjamin Welton [Sat, 8 Dec 2018 00:51:11 +0000 (18:51 -0600)]
Debug test for DYNINST_unlock_tramp_guard issues

2 years agoint_process::waitAndHandleEvents now follows block parameter (if false)
Benjamin Welton [Tue, 27 Nov 2018 22:53:03 +0000 (14:53 -0800)]
int_process::waitAndHandleEvents now follows block parameter (if false)

If the block parameter is set to false, this function will no longer block (by setting "should_block = false").

No changes are made if block flag is set to true, the existing calculation for "should_block" will be used

(this is until clarification is given as to why should_block was ignored to begin with)

2 years agoMinor fix to indirect conditional branch handling on power.
Benjamin Welton [Fri, 16 Nov 2018 00:00:04 +0000 (16:00 -0800)]
Minor fix to indirect conditional branch handling on power.

Fix to emit a branch after a conditional indirect so that if the indirect is not taken, we jump to the next block

2 years agoConvert ThreadDB error message to info message (#574)
Tim Haines [Thu, 28 Mar 2019 21:11:58 +0000 (16:11 -0500)]
Convert ThreadDB error message to info message (#574)

By default, the cmake 'message' command generates an error message. This converts it to an informational message.

2 years agoA few fixes for parallel parsing (#572)
Xiaozhu Meng [Thu, 28 Mar 2019 21:04:40 +0000 (16:04 -0500)]
A few fixes for parallel parsing (#572)

1. Fix a scenario where the delayed work of call ft edges may be skipped
2. Augment indirect jump target check, so that if a jump target is decoded
   to be No_Entry, we treat this jump target invalid
3. Should only re-parse jump tables (not indirect tail calls) for fixed point
   analysis

On ppple, spring boards may need to be long branch (can be more than 5
instructions). Allocate enough space in codegen for long branch spring boards.

2 years agoShould set errno to zero before calling ptrace (#569)
Xiaozhu Meng [Tue, 26 Mar 2019 17:53:54 +0000 (12:53 -0500)]
Should set errno to zero before calling ptrace (#569)

2 years agoImplement ARMv8 IMFC and Load/Store Shared (#562)
L.E.R [Tue, 12 Mar 2019 17:59:45 +0000 (12:59 -0500)]
Implement ARMv8 IMFC and Load/Store Shared (#562)

* Implement AArch64 InterModule Function call
* fix memory access mistakes, now uses offset mode
* removed all the debug printout for imfc
* add rewriter mode check- delete unwanted functions
* fix break on dynamic mode
* aarch64 broken movePCToReg implementation
* movePCToReg still not working
* fix addressing mode for emitLoadRelative
* LoadShared: snip_ref_shlib_var test passes
* add assert details, remove debug code, and format patch
* inst-aarch64: sprintf -> snprintf, debug comments cleanup
* Minor cleanup- Remove commented-out code and debug print statements.

2 years agoFix ARM stack walking (#559)
Xiaozhu Meng [Tue, 12 Mar 2019 18:43:33 +0000 (13:43 -0500)]
Fix ARM stack walking (#559)

2 years agoFix unnecessary multiple calls to buildSysRegMap.
Sasha @leela [Fri, 15 Feb 2019 01:14:29 +0000 (19:14 -0600)]
Fix unnecessary multiple calls to buildSysRegMap.

This function should be called only once, but was being called for every
instruction to be decoded. As a result, dyninst would take a long time
to execute. Now to simply run test1_1 on create mode takes 28 seconds,
as opposed to 58 before this fix, and now closer to 20 seconds for x86_64.

2 years agoAttempts to fix legacy test failures in Dyninst test suite (#549)
Xiaozhu Meng [Thu, 7 Mar 2019 00:08:22 +0000 (18:08 -0600)]
Attempts to fix legacy test failures in Dyninst test suite (#549)

* In binary rewriting, when Dyninst needs to load a library,
    it does not check whether this library has been loaded before or not.
    Dyninst will create multiple binaryEdit objects for one library, which can cause inconsistent states between these objects.

    This fix adds a map to BPatch_binaryEdit to make sure each library is only loaded once.

* Fix pc_tls failures in dyamically linked binaries.
    The root cause is a broken library name matching code.
    Just should boost:filesystem::path to deal with file paths.

Closes #549

2 years agoFix tests in PIC mode (#553)
Xiaozhu Meng [Thu, 7 Mar 2019 00:06:54 +0000 (18:06 -0600)]
Fix tests in PIC mode (#553)

* In dynamic instrumentation for PIE, finding variables's locations needs to add the load base of the PIE.
    Get rid of wrong, special handling of finding the load base of PIE.
* On x86-64, when emulating call with push & jmp, the push needs to push all 64-bit of the callee addresses.
* A few fixes for PIC instrumentation on power
    1. Fix PC-relative load and store of variables
    2. The preamble of PIE uses R12 to set up R2. However,
    when generating intra-module calls, Dyninst does not
    set up R12 and will call the global entry, causing R2 to
    be incorrect. Since there is no need to change R2 for
    intra-module calls, we should call the local entry
* Fix function call replacment on power for PIC.
    Need to call local entry when doing an intra-module call
* Handle relocation type R_X86_64_REX_GOTPCRELX for binary rewriting of statically linked binaries on x86-64
* Fix endianess issues for generating _init and _fini functions on power

2 years agoElfutil version check (#558)
Tim Haines [Thu, 7 Mar 2019 00:04:05 +0000 (18:04 -0600)]
Elfutil version check (#558)

* Add Ubuntu locations
* Search for libelf.so instead of libelf.so.1
    This makes the likelihood of find a symlink more probable.
* Add version checking
    find_package_handle_standard_args doesn't check versions of shared
    libraries, so we need to do it manually.
* Always make the configuration for elfutils noisy

2 years agoAdd --enable-install-elfh when building elfutils from source (#555)
Tim Haines [Thu, 7 Mar 2019 00:03:38 +0000 (18:03 -0600)]
Add --enable-install-elfh when building elfutils from source (#555)

When building elfutils from source on systems that have old elfutils,
Dyninst couldn't find the correct version of elf.h due to it not
being copied from the elfutils build source directory to the include
directory. In the Feb 15 2019 release of elfutils, this flag was
added to fix this.

2 years agoFix separate debuginfo
Sasha Nicolas [Tue, 12 Feb 2019 23:44:30 +0000 (17:44 -0600)]
Fix separate debuginfo
Adding correct FrameFarser to static map
Parsing modules of correct debug file

2 years agoRevert the change from PR530 that will cause crashes in rewriting
Xiaozhu Meng [Fri, 8 Feb 2019 22:19:37 +0000 (16:19 -0600)]
Revert the change from PR530 that will cause crashes in rewriting
statically linked binaries.

2 years agoMerge pull request #548 from dyninst/dynsym_fix
Xiaozhu Meng [Fri, 8 Feb 2019 21:15:11 +0000 (15:15 -0600)]
Merge pull request #548 from dyninst/dynsym_fix

Do not put newly added functions to .dynsym, which may cause the load

2 years agoRemove undefined behavior from bit-shifting code
Tim Haines [Thu, 7 Feb 2019 22:33:13 +0000 (16:33 -0600)]
Remove undefined behavior from bit-shifting code

PR #536

Overflow of signed integer arithmetic (including shifting) is
undefined behavior in C++. Compilers are allowed to exploit
this UB for optimization purposes up to and including not
emitting any opcodes.

These were found using cppcheck.

2 years agoDo not put newly added functions to .dynsym, which may cause the load 548/head
Xiaozhu Meng [Wed, 6 Feb 2019 22:16:16 +0000 (16:16 -0600)]
Do not put newly added functions to .dynsym, which may cause the load
to behave abnormally due to duplicated symbols.

Note that adding symbols to .dynsym can be a legit use case, where
we expose hidden functions in shared libraries. But this use case
needs more development to support.

2 years agoMerge pull request #543 from dyninst/ppcle_rhel8_fix
Xiaozhu Meng [Wed, 6 Feb 2019 22:07:01 +0000 (16:07 -0600)]
Merge pull request #543 from dyninst/ppcle_rhel8_fix

Ppcle rhel8 fix

2 years agoFix several bugs in common/src/pathName.C
Tim Haines [Tue, 5 Feb 2019 19:31:10 +0000 (13:31 -0600)]
Fix several bugs in common/src/pathName.C

FIXED:
1. Tilde expansion is done _before_ the existence check.
Since `stat` does not do shell expansions, resolve_file_path("~")
    always returned an empty string instead of the expanded path.

2. Tilde detection logic was inverted

3. Remove possible buffer overflow when making path relative to CWD

ADDED features:

1. Removes leading and trailing whitespace

2. Add basic support for Windows file system by using Boost::filesystem
Expansion of Windows-specific shell variables, e.g. %HOME%, is _not_
    supported.

3. Leverage move semantics to reduce copying
This reduces the maximum number of string copies from 5 to 3. When
resolve_file_path is invoked with an r-value, there are only two
    copies.

2 years agoAdjust Dyninst to support injecting CFGs for CUBINs
Keren Zhou [Mon, 4 Feb 2019 19:17:52 +0000 (13:17 -0600)]
Adjust Dyninst to support injecting CFGs for CUBINs

See PR #530 for details.

2 years agoAdd some explicit casts from boost::tribool to bool for some code in (#541)
Mark W. Krentel [Fri, 1 Feb 2019 19:14:11 +0000 (13:14 -0600)]
Add some explicit casts from boost::tribool to bool for some code in (#541)

Add some explicit casts from boost::tribool to bool for some code in dataflowAPI/rose/util/Message.[Ch].  This was breaking the build when using boost >= 1.69.

2 years agoDo not generate new PLTs for IFUNC when rewriting statically linked 543/head
Xiaozhu Meng [Wed, 30 Jan 2019 20:53:08 +0000 (14:53 -0600)]
Do not generate new PLTs for IFUNC when rewriting statically linked
binaries on x86. IFUNC should be handled by the loader, not the
linker, which is Dyninst when rewriting statically linked binaries.

2 years agoMore fixes on ppcle rewriting of statically linked binaries
Xiaozhu Meng [Wed, 30 Jan 2019 19:46:16 +0000 (19:46 +0000)]
More fixes on ppcle rewriting of statically linked binaries

1. Revert the change made in "760bfda6e409b4b61a6acd093548afa5860b4af1" about undefined symbols.
Section with number 0 is NULL section, not .bss. So, symbols with section number 0 are indeed
undefined symbols.
2. libc.a depends on libgcc.a on fedora 28 ppcle. So, also open libgcc.a to resolve undefined symbols.
3. Fix the handling of relocation entry "R_PPC64_REL24". R_PPC64_REL24 means the caller has set
up R2, so we should call the local entry point. Calling the global entry may lead to wrong r2, because
r12 is not properly set at the call site.
4. IFUNC should not be treated as a need for PLT.

2 years agoFix crash caused by erasing an iterator from a std::map while looping the iterator
Xiaozhu Meng [Tue, 29 Jan 2019 04:07:53 +0000 (04:07 +0000)]
Fix crash caused by erasing an iterator from a std::map while looping the iterator

2 years agoA couple fixes for binary rewriting of statically linked binaries on ppcle
Xiaozhu Meng [Tue, 29 Jan 2019 00:38:39 +0000 (00:38 +0000)]
A couple fixes for binary rewriting of statically linked binaries on ppcle

1. The handling of the libc global constructor and destructor is out-of-date. Follow the handling for x86-64.
2. Replace [] operator with insert() for std::map. [] operator caused weird memory corruptions
3. Symbols defined in .bss sections should not be considered undefined symbosl
4. Add and fix handling for a couple of ppc64 relocation entries

2 years agoThese functions were moved to the Emitter class.
Sasha Nicolas [Thu, 24 Jan 2019 18:09:35 +0000 (12:09 -0600)]
These functions were moved to the Emitter class.

2 years agoMerge pull request #537 from hainest/remove_ci
Tim Haines [Thu, 24 Jan 2019 17:02:57 +0000 (11:02 -0600)]
Merge pull request #537 from hainest/remove_ci

Remove Travis and AppVeyor CI

2 years agoMerge pull request #539 from hainest/gitignore_eclipse
Tim Haines [Thu, 24 Jan 2019 16:59:19 +0000 (10:59 -0600)]
Merge pull request #539 from hainest/gitignore_eclipse

Ignore Eclipse settings files and folders

2 years agoIgnore Eclipse settings files and folders 539/head
Tim Haines [Thu, 24 Jan 2019 15:42:56 +0000 (09:42 -0600)]
Ignore Eclipse settings files and folders

2 years agoRemove Travis and AppVeyor CI 537/head
Tim Haines [Wed, 23 Jan 2019 23:31:16 +0000 (17:31 -0600)]
Remove Travis and AppVeyor CI

This will be replaced with the Gitlab CI

2 years agofix missing installation of libdw when installing elfutils
rafzi [Tue, 22 Jan 2019 14:23:41 +0000 (15:23 +0100)]
fix missing installation of libdw when installing elfutils

2 years agoMerge branch 'fix_elf_h'
Sasha @leela [Tue, 15 Jan 2019 23:42:59 +0000 (17:42 -0600)]
Merge branch 'fix_elf_h'

2 years agoMerge pull request #516 from jmellorcrummey/fix-linemap
Xiaozhu Meng [Tue, 15 Jan 2019 21:11:57 +0000 (15:11 -0600)]
Merge pull request #516 from jmellorcrummey/fix-linemap

Fix linemaps for CUBINs

2 years agoMerge pull request #528 from dyninst/ppc_pc_fix
Xiaozhu Meng [Tue, 15 Jan 2019 20:29:09 +0000 (14:29 -0600)]
Merge pull request #528 from dyninst/ppc_pc_fix

Ppc pc fix

2 years agoMerge pull request #518 from stanfordcox/scox/includes
Xiaozhu Meng [Tue, 15 Jan 2019 19:13:42 +0000 (13:13 -0600)]
Merge pull request #518 from stanfordcox/scox/includes

Don't use system header <> syntax for dyninst includes

2 years agoRemove asserts that cause test failures 528/head
Xiaozhu Meng [Tue, 15 Jan 2019 16:43:26 +0000 (10:43 -0600)]
Remove asserts that cause test failures

2 years agoFix a non-deterministic hang in test_thread_5
Xiaozhu Meng [Sat, 12 Jan 2019 20:05:12 +0000 (14:05 -0600)]
Fix a non-deterministic hang in test_thread_5

When the mutator stops the mutatee, the mutator will wait for
all the threads in the mutatee to stop by counting the number
of STOP events. If one of the thread exited, there will be no
STOP comeing back.

When a pre-exit event is handled, if the thread has pending stop
to be waited, we should no longer wait for this thread.

2 years agoMoving funtion emitElfUtils::updateRelocation to specific platform
Sasha @leela [Fri, 11 Jan 2019 00:54:16 +0000 (18:54 -0600)]
Moving funtion emitElfUtils::updateRelocation to specific platform
files, since this function uses machine specific macros from elf.h

2 years agoMerge branch 'master' into ARMv8
Sasha @leela [Thu, 10 Jan 2019 22:21:31 +0000 (16:21 -0600)]
Merge branch 'master' into ARMv8

2 years agoMerge branch 'ARMv8' of https://github.com/dyninst/dyninst into ARMv8
Sasha @leela [Thu, 10 Jan 2019 22:19:47 +0000 (16:19 -0600)]
Merge branch 'ARMv8' of https://github.com/dyninst/dyninst into ARMv8

2 years agoRealized effective address calculation, but still need debugging as the result is...
Yuhan Xie [Thu, 10 Jan 2019 13:58:38 +0000 (07:58 -0600)]
Realized effective address calculation, but still need debugging as the result is not always correct.

2 years agoCleaned up power_opcode_table.C, revised several duplications.
Yuhan Xie [Thu, 10 Jan 2019 12:38:11 +0000 (06:38 -0600)]
Cleaned up power_opcode_table.C, revised several duplications.
Some old instructions was not deleted in the previous release, which would cause the new instructions with the same opcode futile.
All duplications has been revised but two special duos (mfocrf & mfcr, fcfids & fcfid)

2 years agoFix on x86-64 the mov instruction for register of 16-bit size.
Sasha Nicolas [Fri, 4 Jan 2019 00:22:50 +0000 (18:22 -0600)]
Fix on x86-64 the mov instruction for register of 16-bit size.
The opcode 89h is for both 32-bit and 16-bit but to use
the 16-bit version it's necessary to add an operand-size prefix
byte of value 66h.
Test snip_ref_shlib_var now passing on x86-64 linux.

2 years agoMerge branch 'ARMv8' of https://github.com/dyninst/dyninst into ARMv8
Sasha @leela [Fri, 28 Dec 2018 20:15:35 +0000 (14:15 -0600)]
Merge branch 'ARMv8' of https://github.com/dyninst/dyninst into ARMv8

2 years agoMerge branch 'master' into ARMv8
Sasha @leela [Fri, 28 Dec 2018 20:15:28 +0000 (14:15 -0600)]
Merge branch 'master' into ARMv8

2 years agofmt mixed-indented line changes to space-indented
LER0ever [Thu, 27 Dec 2018 06:49:50 +0000 (00:49 -0600)]
fmt mixed-indented line changes to space-indented

2 years agoimplement params ref for more than 8 args for AArch64
LER0ever [Thu, 27 Dec 2018 06:45:48 +0000 (00:45 -0600)]
implement params ref for more than 8 args for AArch64
test1_36 now passes on ARMv8

2 years agoGenerating Load and Store of 1, 2, 4 or 8 bytes
Sasha @leela [Sat, 22 Dec 2018 01:35:40 +0000 (19:35 -0600)]
Generating Load and Store of 1, 2, 4 or 8 bytes
for general purpose registers.
The function generateMemAccess32or64 has been renamed
to generateMemAccess, and the boolean parameter changed
to integer to hold the size of bytes to be loaded or
stored.
test_snip_ref_shlib_var passes.

2 years agoDeal with relocation type R_PPC64_IRELATIVE
Xiaozhu Meng [Thu, 20 Dec 2018 21:48:39 +0000 (15:48 -0600)]
Deal with relocation type R_PPC64_IRELATIVE

2 years agoMerge pull request #519 from dyninst/power_abi_v2_fixes
Xiaozhu Meng [Wed, 19 Dec 2018 19:33:34 +0000 (13:33 -0600)]
Merge pull request #519 from dyninst/power_abi_v2_fixes

Power abi v2 fixes

2 years agoFix code gen for PLT call/jump in dynamic instrumentation on Power 519/head
Xiaozhu Meng [Wed, 19 Dec 2018 17:15:28 +0000 (11:15 -0600)]
Fix code gen for PLT call/jump in dynamic instrumentation on Power

2 years agoThe red zone in Power ABI v2 contains 288 bytes for user code and
Xiaozhu Meng [Wed, 19 Dec 2018 15:43:30 +0000 (09:43 -0600)]
The red zone in Power ABI v2 contains 288 bytes for user code and
224 more bytes for system code. To be safe, we move down stack pointer
512 bytes to avoid overwriting any useful data.

2 years agoSeveral bug fixes on binary rewriting on Power
Xiaozhu Meng [Wed, 19 Dec 2018 15:02:26 +0000 (09:02 -0600)]
Several bug fixes on binary rewriting on Power

1. Fix TOC address calculation
2. Fix PLT call/jump
3. Adjust GLINK entry in .dynamic section, which points to the PLT resolver
4. Adjust R_PPC64_RELATIVE relocation entries

2 years agoFix modifyData to correctly emit instructions
Sasha @leela [Fri, 14 Dec 2018 01:38:22 +0000 (19:38 -0600)]
Fix modifyData to correctly emit instructions
when the offset of LDR (literal) instructions, after a relocation,
is larger than +-1MB.
test_reloc passes.

2 years agoEnable detach from process and leave stopped
Benjamin Welton [Fri, 7 Dec 2018 23:13:57 +0000 (17:13 -0600)]
Enable detach from process and leave stopped

Enables the ability to detach from a process but leave it in a stopped state

(cherry picked from commit 8470129b60a6c13b21839234f9804c355a73d8a4)

2 years agoDon't use system header <> syntax for dyninst includes 518/head
Stan Cox [Mon, 10 Dec 2018 22:48:46 +0000 (17:48 -0500)]
Don't use system header <> syntax for dyninst includes

2 years agoalways compute line info for CUBINs using parseLineInfoForObject 516/head
John Mellor-Crummey [Fri, 7 Dec 2018 21:59:47 +0000 (15:59 -0600)]
always compute line info for CUBINs using parseLineInfoForObject

2 years agoMerge branch 'master' of https://github.com/dyninst/dyninst
John Mellor-Crummey [Sat, 8 Dec 2018 04:46:29 +0000 (22:46 -0600)]
Merge branch 'master' of https://github.com/dyninst/dyninst

2 years agoMerge pull request #510 from dyninst/fix/whileExpr
Xiaozhu Meng [Fri, 7 Dec 2018 23:18:19 +0000 (17:18 -0600)]
Merge pull request #510 from dyninst/fix/whileExpr

Fix whileExpr not generating the correct code and causing abort

2 years agoMerge pull request #513 from jmellorcrummey/fix-openmp-link
Xiaozhu Meng [Fri, 7 Dec 2018 16:42:48 +0000 (10:42 -0600)]
Merge pull request #513 from jmellorcrummey/fix-openmp-link

as needed, add -fopenmp flag when linking executables

2 years agoMerge pull request #507 from stanfordcox/scox/examples
Xiaozhu Meng [Fri, 7 Dec 2018 16:38:19 +0000 (10:38 -0600)]
Merge pull request #507 from stanfordcox/scox/examples

Add .dir suffix to examples/{codeCoverage,unstrip}

2 years agoMerge pull request #506 from stanfordcox/scox/doc
Xiaozhu Meng [Fri, 7 Dec 2018 16:32:29 +0000 (10:32 -0600)]
Merge pull request #506 from stanfordcox/scox/doc

Install docs into target doc dirs

2 years agoMerge pull request #509 from dyninst/fix_sign_unsigned
Xiaozhu Meng [Fri, 7 Dec 2018 16:26:00 +0000 (10:26 -0600)]
Merge pull request #509 from dyninst/fix_sign_unsigned

Fixes signed/unsigned operations for comparison, multiplication,

2 years agoThe right shift implementation on power is wrong. Do not use it for division. 509/head
Xiaozhu Meng [Fri, 7 Dec 2018 16:20:27 +0000 (10:20 -0600)]
The right shift implementation on power is wrong. Do not use it for division.

2 years agoFix 64-bit sign/unsigned comparison, multi, and division on ARM
Xiaozhu Meng [Fri, 7 Dec 2018 15:13:45 +0000 (09:13 -0600)]
Fix 64-bit sign/unsigned comparison, multi, and division on ARM

2 years agoas needed, add -fopenmp flag when linking executables 513/head
John Mellor-Crummey [Fri, 7 Dec 2018 04:24:20 +0000 (22:24 -0600)]
as needed, add -fopenmp flag when linking executables

2 years agoFix 64-bit sign/unsigned comparison, multi, and division on power
Xiaozhu Meng [Thu, 6 Dec 2018 20:03:49 +0000 (14:03 -0600)]
Fix 64-bit sign/unsigned comparison, multi, and division on power

2 years agoast: fix whileOp 510/head
LER0ever [Thu, 6 Dec 2018 05:56:49 +0000 (23:56 -0600)]
ast: fix whileOp

the current whileOp code is mostly from ifOp since they share mostly the
same high level logic.
We should update whileOp code whenever we make a future change to ifOp

2 years agocmake: export CompilerCommands for IDE jump-to-def support
LER0ever [Thu, 6 Dec 2018 05:56:22 +0000 (23:56 -0600)]
cmake: export CompilerCommands for IDE jump-to-def support

2 years agoImplements getDynamicCallSiteArgs to monitor dynamic call sites.
Sasha @leela [Thu, 6 Dec 2018 00:14:08 +0000 (18:14 -0600)]
Implements getDynamicCallSiteArgs to monitor dynamic call sites.
Implements emitLoadOrigRegister to get frame pointer register.
Test1_40 passes.

2 years agoStart to fix signed/unsigned operations for comparison, multiplication,
Xiaozhu Meng [Wed, 5 Dec 2018 22:07:42 +0000 (16:07 -0600)]
Start to fix signed/unsigned operations for comparison, multiplication,
and division.

This commit contains platform independent changes and platform dependent
changes for x86-64

2 years agoEmit 64-bit integer multiplication and division on power
Xiaozhu Meng [Mon, 3 Dec 2018 17:21:10 +0000 (11:21 -0600)]
Emit 64-bit integer multiplication and division on power

2 years agoAdd .dir suffix to examples/{codeCoverage,unstrip} 507/head
Stan Cox [Fri, 30 Nov 2018 17:20:14 +0000 (12:20 -0500)]
Add .dir suffix to examples/{codeCoverage,unstrip}

2 years agoUpdate the stack locations to find for parameters, as there is an ABI change since...
Xiaozhu Meng [Fri, 30 Nov 2018 17:05:19 +0000 (11:05 -0600)]
Update the stack locations to find for parameters, as there is an ABI change since power 8

2 years agoInstall docs into target doc dirs 506/head
Stan Cox [Fri, 30 Nov 2018 03:08:29 +0000 (22:08 -0500)]
Install docs into target doc dirs

2 years agoMerge branch 'master' into ARMv8
Sasha @leela [Wed, 28 Nov 2018 23:26:46 +0000 (17:26 -0600)]
Merge branch 'master' into ARMv8

2 years agoFix wrong handling for PTRACE_EVENT_EXIT in proccontrol. Currently, each time we...
Xiaozhu Meng [Wed, 28 Nov 2018 21:56:15 +0000 (15:56 -0600)]
Fix wrong handling for PTRACE_EVENT_EXIT in proccontrol. Currently, each time we see PTRACE_EVENT_EXIT, we assume the mutatee exited normally. However, this is a wrong assumption. Based on the man page of PTRACE:

PTRACE_EVENT_EXIT will happen before actual death,  This applies to exits via
exit(2), exit_group(2), and signal deaths

PTRACE_EVENT_EXIT will also be delivered to proccontrol when the mutatee
died of crashes/signals. So, we need to check whether the waitpid status
represents a normal exit or a signal exit

2 years agoFix long branch generation.
Sasha @leela [Wed, 21 Nov 2018 19:40:47 +0000 (13:40 -0600)]
Fix long branch generation.
Fix emit load register indirect.
Implements hasBeenBound for ARM.
Tests passing now: test1_14, 24, 26, 27, 28, 29, and 39.

2 years agoUpdate README.md
Xiaozhu Meng [Mon, 19 Nov 2018 17:02:42 +0000 (11:02 -0600)]
Update README.md

2 years agoImplementing emitLoadOrigRegRelative and emitStoreIndir.
Sasha @leela [Sat, 17 Nov 2018 01:21:32 +0000 (19:21 -0600)]
Implementing emitLoadOrigRegRelative and emitStoreIndir.
Adding case of loadRegRelativeOp and storeIndirOp for emitVload.
test1_23 passes.

2 years agoMerge branch 'master' of https://github.com/dyninst/dyninst
Sasha Nicolas [Fri, 9 Nov 2018 17:41:29 +0000 (11:41 -0600)]
Merge branch 'master' of https://github.com/dyninst/dyninst

2 years agoMerge branch 'master' into ARMv8
Sasha @leela [Fri, 9 Nov 2018 17:01:06 +0000 (11:01 -0600)]
Merge branch 'master' into ARMv8

2 years agoUpdate latex based manuals v10.0.0
Xiaozhu Meng [Fri, 9 Nov 2018 16:48:08 +0000 (10:48 -0600)]
Update latex based manuals

2 years agoMerge branch 'master' into ARMv8
Sasha @leela [Fri, 9 Nov 2018 16:28:31 +0000 (10:28 -0600)]
Merge branch 'master' into ARMv8

2 years agoMore updates to README and docx based manuals
Xiaozhu Meng [Fri, 9 Nov 2018 16:17:46 +0000 (10:17 -0600)]
More updates to README and docx based manuals

2 years agoFix generateLongBranch to make Replace Function work.
Sasha @leela [Fri, 9 Nov 2018 00:50:47 +0000 (18:50 -0600)]
Fix generateLongBranch to make Replace Function work.
test1_22 passes.

2 years agoClear debugging output
Xiaozhu Meng [Thu, 8 Nov 2018 21:57:08 +0000 (15:57 -0600)]
Clear debugging output

2 years agoUpdate README.md
Sasha NĂ­colas [Thu, 8 Nov 2018 21:40:02 +0000 (15:40 -0600)]
Update README.md

2 years agoCorrect LDR/STR instructions for SIMD&FP
Sasha @leela [Thu, 8 Nov 2018 21:22:27 +0000 (15:22 -0600)]
Correct LDR/STR instructions for SIMD&FP
Saving all FP registers in BaseTramp
Remove #if for DYNINST_snippetBreakpoint

2 years agoBump the version number to 10.0.0
Xiaozhu Meng [Thu, 8 Nov 2018 18:27:47 +0000 (12:27 -0600)]
Bump the version number to 10.0.0

2 years agoUpdate Spack information
Xiaozhu Meng [Thu, 8 Nov 2018 17:54:07 +0000 (11:54 -0600)]
Update Spack information

2 years agoUpdate README.md to rewrite install documentation
Xiaozhu Meng [Thu, 8 Nov 2018 16:52:28 +0000 (10:52 -0600)]
Update README.md to rewrite install documentation

2 years agoUpdate cmake setup explanation in README.md
Xiaozhu Meng [Wed, 7 Nov 2018 22:47:15 +0000 (16:47 -0600)]
Update cmake setup explanation in README.md