Tim Haines [Thu, 18 Feb 2021 23:18:44 +0000 (17:18 -0600)]
Clean up "unused parameter" warnings on Aarch64 (#1005)
Tim Haines [Thu, 18 Feb 2021 21:43:30 +0000 (15:43 -0600)]
Fix "unused parameter" warnings on PPC64 (#1004)
Xiaozhu Meng [Mon, 15 Feb 2021 18:36:28 +0000 (10:36 -0800)]
Fix PLT function call lookup (#1001)
Tim Haines [Fri, 12 Feb 2021 19:44:51 +0000 (13:44 -0600)]
Clean up PLTFunction in dyninstAPI/Parse (#1003)
This is purely an adaptor to account for Symtab::Function(Symtab::Symbol*)
being protected.
Tim Haines [Mon, 8 Feb 2021 18:01:27 +0000 (12:01 -0600)]
Remove assert in block_instance::callee(std::string const&) (#999)
This was introduce by
14b6941fc in 2020 (PR #875). This fix allows both types of lookup by name, but preserves the "return NULL if not found" semantics of block_instance::callee();
Tim Haines [Mon, 8 Feb 2021 04:32:46 +0000 (22:32 -0600)]
Remove dead code from ia32_decode (#989)
The STUB_OUT_TO_AVOID_RACE was added by
43dd5eb6eb in 2018. It's never set, so this entire calculation is never used.
Tim Haines [Mon, 8 Feb 2021 03:25:37 +0000 (21:25 -0600)]
Clean up sign-compare warnings (#991)
Xiaozhu Meng [Sun, 7 Feb 2021 23:17:56 +0000 (15:17 -0800)]
Add the default case in adhocMovementTransformer::isPCRelData to suppress compiler warning (#995)
Tim Haines [Sun, 7 Feb 2021 22:35:48 +0000 (16:35 -0600)]
Bump minimum Boost version to 1.67 (#993)
This is needed because we no longer support the headers deprecated in that version. See also #974
Tim Haines [Sun, 7 Feb 2021 20:09:13 +0000 (14:09 -0600)]
Fix breakage introduced by PR990 (#997)
This function call has side effects that were not properly tested for before committing PR990.
Keren Zhou [Fri, 5 Feb 2021 18:29:32 +0000 (12:29 -0600)]
Fix unhandled enum values for Intel GPUs (#955)
Tim Haines [Fri, 5 Feb 2021 04:52:26 +0000 (22:52 -0600)]
Clean up "unused variable" warnings (#990)
* Remove declaration of 'mostRecentLinenum' from Object::parseStabTypes
Its usage was removed in
41ef642f3.
* Remove unused variable 'tlsBssSize' from emitElfStatic::tlsLayoutVariant1
Its usage was removed by
760bfda6e in 2019.
* Remove unused variable 'ctp' from Parser::parse_frame_one_iteration
Its usage was removed by
c4914b9d1 in 2018.
* Remove unused variable 'nextBlock' from Parser::parse_frame_one_iteration
Its usage was removed by
07bdc17e2 in 2018.
* Remove unused variable 'block_exist' from Parser::set_edge_parsing_status
It was added by
07bdc17e2 in 2018, but never used.
* Remove unused variable 'usedTrap' in SpringboardBuilder::generateSpringboard
Its usage was removed by
d233ae7596 in 2020.
* Remove unused variable 'hasNoteSection' from Symtab::getFreeOffset
Its usage was removed by
cccad8ee928 in 2020.
* Remove unused variable 'isStaticBinary' from Symtab::getFreeOffset
Its usage was removed by
cccad8ee928 in 2020.
* Remove unused variable 'adjustedEnd' from emitElfStatic::tlsLayoutVariant1
Its usage was removed by
760bfda6e in 2019.
* Remove unused variable 'old' from DwarfWalker::parseSubprogram
Its usage was removed by
d233ae759 in 2020.
* Remove unused variables in int_thread::StateTracker::setState
Their usages were removed by
f7d9378cb14 in 2019.
* Remove unused variables from Parser::postProcessFrame
They were added by
62b7d1f21d in 2010, but never used.
* Remove unused variable 'tfunc' from Parser::parse_frame_one_iteration
It was added by
67fce2e5d in 2018, but never used.
* Remove unused variables from Parser::block_at
They were added by
62b7d1f21d7 in 2010, but never used.
* Remove unused variable 'original_block' from Parser::add_edge
It was added by
93cc790a in 2018, but never used.
* Remove unused variable 'tblock' from Parser::bind_call
It was added by
62b7d1f21d7 in 2010, but never used.
* Remove unused variables in Parser::relink
They were added by
a362bea48a4 in 2018, but never used.
* Remove unused variables from Parser::inspect_value_driven_jump_tables
There were added by
95e89bc34 in 2018, but never used.
* Move declaration of 'insn' into macro check in checkLinkerStub
It was created by
7afca634d7 in 2010
* Remove unused variable 'zero' from PCEventHandler::handleRTBreakpoint
It was added by
785d402904 in 2010, but never used.
* Remove unused variable 'size' in InstalledSpringboards::addBlocks
Tim Haines [Fri, 5 Feb 2021 04:19:19 +0000 (22:19 -0600)]
Correctly declare Aggregate::operator<< (#988)
The previous declaration relied on header inclusion ordering to be correct. The following example program failed to build:
\#include "Function.h"
int main(){}
Tim Haines [Fri, 5 Feb 2021 04:18:10 +0000 (22:18 -0600)]
Fix unhandled switch case in Region::regionType2Str (#987)
Tim Haines [Thu, 4 Feb 2021 21:32:49 +0000 (15:32 -0600)]
Fix unused values (#978)
* Correctly uppercase strings in AmdgpuFormatter::formatRegister and TernaryAST::format
This was introduced by
40f9295af in 2020
* Remove unused computed value in Parser::parse_frame_one_iteration
This was introduced by
5670e70600a in 2011.
Tim Haines [Thu, 4 Feb 2021 21:29:27 +0000 (15:29 -0600)]
Remove unused parameter 'b' from BoundFactsCalculator::Meet (#983)
Tim Haines [Thu, 4 Feb 2021 21:28:58 +0000 (15:28 -0600)]
Fix string truncations in parseThat (#982)
For some reason, these didn't show up when fixing those in #967.
Tim Haines [Thu, 4 Feb 2021 21:28:29 +0000 (15:28 -0600)]
Use std::locale when writing a timeStamp to a stream (#981)
The current implementation causes several -Wstringop-truncation
warnings. Yet, the whole thing can be replaced by using locales.
Tim Haines [Thu, 4 Feb 2021 21:27:26 +0000 (15:27 -0600)]
Remove ignored cast qualifier in SnippetGenerator::findParameter (#980)
Tim Haines [Thu, 4 Feb 2021 21:26:35 +0000 (15:26 -0600)]
Fix shifts of negative values (#976)
This is undefined behavior in C++.
Tim Haines [Thu, 4 Feb 2021 02:00:52 +0000 (20:00 -0600)]
Remove unused function 'InsertFrames' in parseAPI/Parser (#977)
Tim Haines [Thu, 4 Feb 2021 02:00:07 +0000 (20:00 -0600)]
Fix deprecated usage of boost::bind (#975)
* Remove unused inclusions of boost/bind.hpp
* Use fully-qualified boost::placeholders::_1
Tim Haines [Wed, 3 Feb 2021 21:39:33 +0000 (15:39 -0600)]
Fix inclusion of boost deprecated headers (#974)
* Fix inclusion of deprecated boost/function_output_iterator.hpp
* Use boost/range/iterator_range instead of boost/range
boost/range.hpp includes a deprecated header. This fix removes many
compiler warnings.
Tim Haines [Wed, 3 Feb 2021 21:18:28 +0000 (15:18 -0600)]
Fix constructor member intializer list reordering (#973)
* Fix copy ctor reorder in Instruction
* Fix ctor reorder in InstructionDecoder_X86
* Fix ctor reorder in Edge
* Fix ctor reorder in CFG/Function
* Fix copy ctor reorder in CFG/Function
Tim Haines [Wed, 3 Feb 2021 19:23:38 +0000 (13:23 -0600)]
Fix pointer arithmetic on 'void*' in codeGen::insert (#972)
Tim Haines [Wed, 3 Feb 2021 18:47:32 +0000 (12:47 -0600)]
Remove usage of designated initializer in dwarfHandle.C (#971)
Designated initializers aren't part of C++ until C++20; use
aggregate initialization, intead. This also fixes the missing
initializer for Dwfl_Callbacks::debuginfo_path.
Tim Haines [Wed, 3 Feb 2021 18:46:53 +0000 (12:46 -0600)]
Fix possibly uninitialized local variable in InstructionDecoder_aarch64 (#970)
Tim Haines [Wed, 3 Feb 2021 18:46:01 +0000 (12:46 -0600)]
Fix ignored qualifiers on some C-style casts in Object-elf::read_val_of_type (#969)
Tim Haines [Wed, 3 Feb 2021 18:45:27 +0000 (12:45 -0600)]
Fix C-string format specifier mismatch in Operand::getReadSet (#968)
Tim Haines [Wed, 3 Feb 2021 18:44:36 +0000 (12:44 -0600)]
Fix several C-string truncations in parseThat (#967)
Tim Haines [Wed, 3 Feb 2021 18:44:06 +0000 (12:44 -0600)]
Fix possible buffer overflow in parseThat::runHunt_binaryEdit (#966)
Tim Haines [Wed, 3 Feb 2021 18:43:23 +0000 (12:43 -0600)]
Clean up "unused parameter" warnings (#965)
* Remove unused 'mode_64' value from instruction constructors on ARM and PPC
The 'bool' still needs to be in the signature to match the x86 instruction class.
It's just not used on these platforms. This fixes -Wunused-parameter compiler
warnings.
* Remove unused parameter 's' from emitTimesImm
* Remove unused parameter 'input' from SpringboardBuilder::generateSpringboard
* Remove unused parameter 'needFlags' from Operation_impl:SetUpNonOperandData
* Remove unused parameter values in InstructionAPI::TernaryAST
* Remove unused parameter values from many IA_aarch64 member functions
* Remove 'scanTable' from IndirectAnalyzer::ReadTable
* Remove unused parameter 'src' from Parser::block_at
* Remove unused parameter 'mod' from internal vectorNameMatchKLUDGE
Tim Haines [Wed, 3 Feb 2021 18:42:30 +0000 (12:42 -0600)]
Fix misleading indentation compiler warning in codeRangeTree::remove (#964)
Tim Haines [Wed, 3 Feb 2021 01:30:00 +0000 (19:30 -0600)]
Remove empty region_data constructor (#960)
This was removed by
d327c37f216d in 2020
Tim Haines [Wed, 3 Feb 2021 00:46:22 +0000 (18:46 -0600)]
Remove JumpTableIndexPred::FillInOutEdges (#959)
This was partially removed by
f87d17ac036 in 2017
Tim Haines [Wed, 3 Feb 2021 00:06:30 +0000 (18:06 -0600)]
Remove BoundFactCalculator::CheckZeroExtend (#958)
This was remove by
f87d17ac036c1 in 2017
tomhaber [Tue, 2 Feb 2021 23:58:25 +0000 (00:58 +0100)]
add missing libiberty include dir (#950)
Tim Haines [Tue, 2 Feb 2021 23:41:05 +0000 (17:41 -0600)]
Remove BoundsFactCalculator::ThunkBound (#957)
This was removed by f87d17a in 2017
Tim Haines [Tue, 2 Feb 2021 23:39:41 +0000 (17:39 -0600)]
Fix -Wreturn-type warning (#956)
This was introduced by
38370b0ee48 in 2016
Tim Haines [Tue, 2 Feb 2021 03:20:11 +0000 (21:20 -0600)]
Remove unused parameter 'elf' from Object::parse_all_relocations (#962)
Tim Haines [Tue, 2 Feb 2021 03:19:01 +0000 (21:19 -0600)]
Remove unused 'name' parameter from Collections::addGlobalVariable (#961)
This was removed by
a8def5c64b5 in 2017
aaronmerey [Mon, 1 Feb 2021 19:06:46 +0000 (14:06 -0500)]
Add debuginfod support (#736)
* Add debuginfod support
Debuginfod is a lightweight web service that indexes ELF/DWARF debugging
resources by build-id and serves them over HTTP.
This patch enables dyninst to query debuginfod servers for a file's
separate debuginfo when it otherwise cannot be found.
This patch also adds a cmake option -DENABLE_DEBUGINFOD to control
whether dyninst is built with debuginfod support.
This requires having the debuginfod client library (libdebuginfod)
and header installed.
Debuginfod is distributed with elfutils, for more information see
https://sourceware.org/elfutils/Debuginfod.html
* cmake/ElfUtils.cmake: Remove unnecessary for LibDebuginfod_FOUND and ENABLE_DEBUGINFOD
bbiiggppiigg [Sun, 31 Jan 2021 21:06:59 +0000 (21:06 +0000)]
Fix compile warnings for AMDGPU for Release 11.0 (#954)
* this patch should fix most of the compile warnings
* remove unnecessary amdgpu_insn_entry in finalizeOperands
* add case for amdgpu_rdna
* remove name of unused function parameter to clean up compile warnings
Xiaozhu Meng [Fri, 22 Jan 2021 19:31:39 +0000 (11:31 -0800)]
Suppress parallelism in dwarf parsing when an alternative debug file is present (#929)
bbiiggppiigg [Thu, 21 Jan 2021 16:56:56 +0000 (16:56 +0000)]
Fixing another bug related to amdgpu register names (#948)
* Fix a bug in the logic of generating register id that doesn't reuse regid for registers of different type
common/h/amdgpu_vega_sys_regs.h
* fix a bug in the MachRegister::name that doesn't show the name of individual registers
* remove unnecessary debug message
James A. Kupsch [Fri, 18 Dec 2020 17:29:08 +0000 (11:29 -0600)]
add erase to 2 std::remove calls
- one a bug fix to this patch
- one existing in Symtab::changeSynbolOffset
James A. Kupsch [Tue, 8 Dec 2020 04:24:24 +0000 (22:24 -0600)]
Aggregate variable symbols based on offset and size (#933)
- changed findVariableByOffset that returned a Variable
to findVariablesByOffset that returns a vector of Variables
- changed Symtab::varsByOffset to map an offset to a vector of
variables each with a unique size.
- added undefined method Module::findVariablesByOffset
bbiiggppiigg [Wed, 16 Dec 2020 18:47:46 +0000 (18:47 +0000)]
Fix wrong return value in DwarfHandle::init_dbg (#939)
kupsch [Wed, 16 Dec 2020 01:15:36 +0000 (19:15 -0600)]
make Symbol methods const (#936)
The following methods should be const methods of the class Symbol:
- getVersions
- getVersionFileName
- getVersionNum
- getVersionHidden
- getReferringSymbol
Tim Haines [Tue, 15 Dec 2020 23:11:57 +0000 (17:11 -0600)]
Require gcc >= 6.0 (#932)
We've quietly required the ABI and API changes in libstdc++ for some time, but we make them explicit now.
Jiawei "Tyler" Gu [Tue, 15 Dec 2020 22:14:47 +0000 (16:14 -0600)]
Add direct tail call case for Point::getCallee (#931)
When an edge is direct branch or conditional taken branch, and it is inter-procedural, we consider it as a direct tail call and return the target of this edge as the callee.
bbiiggppiigg [Sat, 5 Dec 2020 00:03:22 +0000 (00:03 +0000)]
Fix a bug in MachRegister::name for AMD GPUs (#928)
We previously reported amdgpu vector register names even for non-amdgpu registers
kupsch [Fri, 4 Dec 2020 14:48:40 +0000 (08:48 -0600)]
Make assert expressions side effect free (#927)
bbiiggppiigg [Tue, 24 Nov 2020 05:28:27 +0000 (05:28 +0000)]
Add initial support for analyzing AMDGPU binaries (#900)
* remove unnecessary assertion for unknown phdr_type
* add initial stubs for amdgpu support
* add formatters for amdgpu
* add opcode table and register definition
* added support for register vector
* add untracked files
* commit stubs for xiaozhu to see
* initial cfg traversal done
* remove unused register-pair related files
* remove symbol patching since the 256 byte function header is no longer there
* Do not assert in getBaseRegister
* fix instruction length detection and decoding logic
* now decode will only decode operands for branch instructions
* added basic support for amdgpu in rose
* merged upstream
* fix a bug where we decode the vdst as ssrc
* improve the logic for computing len of instructions that might make use of literals, such that we no longer need to pass the buffer all over the place
* fix undefined behavior for std::transform
* Remove empty code blocks/Unreachable code/Unneeded
Comment out dead code
Restore sym_debug_parsing to default value 0
* Added meaningful name and comments to function prototype of getAMDGPURoseRegisters
Remove duplicate public modifiers in class declaration.
* remove unnecessary include of boost/format.hpp
* remove all amdgpu related stuff in dataflowAPI, and patched indirect analyzer so it skips for amdgpu
* renaming Arch_amdgpu to Arch_amdgpu_vega
* make changes to use namespace amdgpu_vega instead of amdgpu
* change the naming of c_NonReturnInsn to c_GPUKernelExitInsn as suggested
Co-authored-by: Xiaozhu Meng <mxz297@gmail.com>
Tim Haines [Tue, 24 Nov 2020 00:21:10 +0000 (18:21 -0600)]
Make libiberty detection more flexible (#922)
Some platforms don't install libiberty in a subdirectory (e.g., /usr/include/libiberty), so account for that.
Tim Haines [Fri, 20 Nov 2020 04:12:08 +0000 (22:12 -0600)]
API-breaking changes for 11.0 release (#920)
* Remove deprecated BPatch_snippet::getCost* (#832)
These were deprecated by 52f3437 in 2010.
* Remove deprecated BPatch_process::enableDumpPatchedImage (#831)
This was deprecated by 4d83371 in 2011.
* Remove AddressSpace::getAddressWidth from public API (#797)
This was originally part of https://github.com/dyninst/dyninst/pull/317.
* Fix memory leak of AddressSpace::patcher_ (#795)
This was originally part of https://github.com/dyninst/dyninst/pull/317.
This is an API-breaking change since AddressSpace is exported through
the BPatch interface.
* Remove deprecated insnCodeGen::generate (#836)
dyninstAPI/src/codegen-power.C: Removed by 5274e3b in 2011.
dyninstAPI/src/codegen-aarch64.C: Removed by 0cbe684 in 2015.
dyninstAPI/src/codegen-x86.C: git can't figure out when this was removed.
* Remove BPatch_addressSpace::findFunctionByAddr (#837)
This was deprecated by 7f20129 in 2010. Users should instead use either
BPatch_addressSpace::findFunctionByEntry or
BPatch_addressSpace::findFunctionsByAddr.
* Remove deprecated BPatch_regExpr (#838)
This was deprecated by 4d15de8 in 2008.
* Remove serialization (#805)
Remove all code guarded by SERIALIZATION_DISABLED
Remove code protected by cap_serialization
Remove serialize-bin
Remove serialization classes and their uses
Simplify Symtab::getObject
Because serialization doesn't exist, their is only one codepath here now.
* Remove CFGFactor::destroy_all (#881)
This removes the possiblity of object reuse and its associated undefined
behavior. This was originally part of #317.
Keren Zhou [Tue, 17 Nov 2020 02:06:25 +0000 (20:06 -0600)]
Improve single thread's backward slicing speed by 40% (#917)
Tim Haines [Sun, 1 Nov 2020 01:35:56 +0000 (20:35 -0500)]
Add note about minimum elfutils version (#912)
We need elfutils >=0.178 for parallel DWARF parsing because libdw isn't thread-safe before then.
Tim Haines [Fri, 30 Oct 2020 01:11:32 +0000 (20:11 -0500)]
Correctly set up libiberty to be consumed by build system (#901)
Tim Haines [Fri, 23 Oct 2020 06:38:15 +0000 (01:38 -0500)]
Fix memory leaks in emitElf (#895)
This was originally part of #317
James A. Kupsch [Fri, 16 Oct 2020 16:13:56 +0000 (11:13 -0500)]
SymElf: fix memory leak of cached demangled names
* the existing cache in SymElf did not free the char* string in each
cache entry
James A. Kupsch [Fri, 16 Oct 2020 16:12:15 +0000 (11:12 -0500)]
properly check for empty string in parseStabString
* fix bug in code that checked for empty std::string by checking the
first char of the string being null
James A. Kupsch [Fri, 16 Oct 2020 16:01:49 +0000 (11:01 -0500)]
fix duplicate Windows demangle code
* remove the 2 duplicate cplus_demangle and stripAtSuffix functions
to the common library in ntKludges.C
* change signature of cplus_demangle name param to be const char*
James A. Kupsch [Tue, 29 Sep 2020 05:05:45 +0000 (00:05 -0500)]
make symbol name demangling consistent (#872, #717)
* make all pretty and typed names consistent on linux and freebsd.
the pretty name is the value returned by 'c++filt -i -p <sym>' and the
typed name is the value returned by 'c++file -i <sym>'. In addition
C++ mangled and nonmangled symbols both have and symbol versioning or
stabs suffix removed (previously nonmangled symbols included this
suffix), also for C++ mangled symbols the pretty name now includes any
present function cloning suffix (previously not included)
* use libiberty's cplus_demangle to generate pretty and typed names
from the mangled names instead of abi::__cxa_demangle to get the typed
name and parsing the result to get the pretty name
* remove USE_GNU_DEMANGLE cmake variable as libiberty is now required
on non-windows platforms
* use common function symbol_demangle to implement both pretty and typed
names using cplus_demangle and removing suffixes (versioning and
stabs), and add function cloning suffixes back to the pretty name
so it is consistent with the mangled and types names.
* added a last result caching version of symbol_demangle,
symbol_demangle_with_cache used by P_cplus_demangle (matching current
behavior)
* change P_cplus_demangle interface to take and return a std::string
instead of a char*
* update SymtabAPI documentation improve the definitions of mangled,
pretty and typed name for correctness and to match current behavior
* removed demangleSymbol and demangleSymbols methods and other functions
that are unused or have no effect.
* remove native compiler support (pgcc) from P_cplus_demangle and all
other uses
kupsch [Mon, 19 Oct 2020 14:21:45 +0000 (09:21 -0500)]
Merge pull request #891 from kupsch/remove-muldivfuncs
code cleanup integer funcs to * and / by constants
Tim Haines [Fri, 16 Oct 2020 22:55:34 +0000 (17:55 -0500)]
Remove old InstrucIter class references (#890)
The definition and usage of this class was removed by
dee8900ad in 2011.
James A. Kupsch [Fri, 16 Oct 2020 20:34:01 +0000 (15:34 -0500)]
code cleanup integer funcs to * and / by constants
* remove functions to multiply and divide by 1000 and 1000000 using
adds, subtracts and shifts. Not used, not needed.
Tim Haines [Wed, 14 Oct 2020 01:51:31 +0000 (20:51 -0500)]
Ensure data is copied in memoryTracker::realloc (#886)
This bug was introduced by #876.
Tim Haines [Mon, 12 Oct 2020 00:29:12 +0000 (19:29 -0500)]
Include <iostream> in CodeTracker.C (#887)
This only showed up in gcc-10. I'm assuming they fixed some transitive includes in libstdc++.
Tim Haines [Fri, 9 Oct 2020 20:14:34 +0000 (15:14 -0500)]
clean up BoundFactCalculator constructor (#884)
* Default initialize BoundFactsCalculator::orderStamp
* Whitespace cleanup
Tim Haines [Wed, 7 Oct 2020 03:44:49 +0000 (22:44 -0500)]
CodeSource destructor cleanup (#883)
* removeRegion should take a pointer
This makes the interface types consistent.
* Move destruction of CodeSource::_regions to ~CodeSource
* Put 'removeRegion' in CodeSource
* Code cleanup
* Whitespace cleanup
* Move dtor implementation to source file
Tim Haines [Tue, 6 Oct 2020 18:59:52 +0000 (13:59 -0500)]
Fix memory leaks in BinaryEdit::openResolvedLibraryName (#879)
* Improve memory handling and simplify compatibility checks
* Use range-for loops
* Use emplacement for retMap
* Clean up string handling
* Simplify return paths
This also improves the error messages.
* Fix memory leaks in static executable case
* Cleanup whitespace
* Omit BinaryEdits for incompatible archives of static binaries
Tim Haines [Tue, 6 Oct 2020 04:24:11 +0000 (23:24 -0500)]
Require standards-compliant c++11 ABI (#882)
Tim Haines [Mon, 5 Oct 2020 18:32:25 +0000 (13:32 -0500)]
Add lookup by name in block_instance::callee (#875)
* Refactor callee lookup by name into separate function
* Add callee lookup by name if lookup by PLT address fails
* Code cleanup (c++11-ify)
* Get rid of fbtvector
It's just a copy of fbt.
* Cleanup comments
Tim Haines [Mon, 5 Oct 2020 04:17:27 +0000 (23:17 -0500)]
Remove unused lineDict class (#880)
This was originally part of #317.
Tim Haines [Sun, 4 Oct 2020 23:23:31 +0000 (18:23 -0500)]
cleanup memoryTracker memory handling (#876)
* Use a unique_ptr to manage object
* Use inline initializer for public members
This makes the constructors simpler.
* Whitespace cleanup
* Use new/delete to fix realloc
Tim Haines [Sun, 4 Oct 2020 03:08:25 +0000 (22:08 -0500)]
Provide correct default constructor for parse_func class (#878)
* Provide correct default constructor for parse_func
This fixes a memory corruption bug when destroying default-
constructed objects of this class.
* Clean up dead functions
Keren Zhou [Fri, 2 Oct 2020 03:48:53 +0000 (22:48 -0500)]
Add arch address for intel gen9 gpus (#874)
Tim Haines [Fri, 2 Oct 2020 01:53:57 +0000 (20:53 -0500)]
Correctly destruct AddressSpace objects (#871)
* Call deleteAddressSpace from ~AddressSpace
This was originally part of #317.
* Code cleanup
Tim Haines [Wed, 30 Sep 2020 23:13:09 +0000 (18:13 -0500)]
Update documentation for ParseAPI::CodeObject::CodeObject (#870)
* Update documentation for ParseAPI::CodeObject::CodeObject
Make an explicit note that the CodeSource is not owned by the
CodeObject. This clarifies the ownership semantics.
Tim Haines [Tue, 29 Sep 2020 20:09:25 +0000 (15:09 -0500)]
Remove binaryEdit::deleteBinaryEdit (#866)
This moves the same functionality into the destructor and prevents possible memory corruption when its usage would promote in-place object reuse. Originally part of #317.
Tim Haines [Tue, 29 Sep 2020 03:04:01 +0000 (22:04 -0500)]
Remove include cycle in dyntypes.h (#868)
This prevented using concurrent data structures in dyntypes.
Xiaozhu Meng [Mon, 28 Sep 2020 18:41:30 +0000 (11:41 -0700)]
Nvidia GPU slicing and support for opening Intel GPU binaries (#865)
* Add cuda registers and ops
* Make appendOperand available to external usage
* Add cuda register size (>=sm_50)
* Refactor slicing to use Block::getInsns to get instructions inside a basic block
* Add a placeholder for pc on cuda and remove a few asserts
* Not decode cuda instructions
* Fix register naming bug
* Change constant to 500 to find more dependencies
* Remove slicing constraint
* Add an interface to use external AssignmentConverter for Slicing
* Add support to share instruction cache between different slices
* Adding predicates fields to Operand classes
* Add predicate registers and methods to get predicate registers
* Add barrier registers
* Initial implementation of slicing support for predicated instructions
* Add missed code for copy predicate information in Operand class's copy constructor and equal operator
* Comment logs
* Add Turing registers
* Fix reg prefix
* added support for intel gen9 gpu
* Remove tab and logs
* Add support for intel gpu instructions
* Add slicing size limit factor
* 1. Avoid using Block pointer as key to a cache. Use block start address
2. Change the default value of bound size limit factor
3. Changes to suppress warning regarding to intel gpu
4. Other code cleanup
Co-authored-by: Jokeren <robinho364@gmail.com>
Co-authored-by: Aaron Cherian <aarontcopal2@jlselogin2.ftm.alcf.anl.gov>
Tim Haines [Wed, 23 Sep 2020 02:41:18 +0000 (21:41 -0500)]
Require c++11 thread_local support (#860)
* Require c++11 thread_local support
* Change TLS_VAR usage to dyn_tls
Tim Haines [Tue, 22 Sep 2020 22:51:39 +0000 (17:51 -0500)]
Fix undefined behavior in usage of std::transform (#862)
Starting in C++11, it is undefined behavior to have the destination
iterator be contained within the input range.
Tim Haines [Tue, 22 Sep 2020 21:22:19 +0000 (16:22 -0500)]
Cleanup dyn_hash_{set,map} (#861)
* Require std::unordered_{map,set} for dyn_hash_{map,set}
This also converts the dyn_hash_* macros to alias templates for better
type safety and error messages.
* Remove custom hashers for enums
* Use typed enums for IA32Regs, entryID, and prefixEntryID
This ensures that the std::hash implementation that uses
std::underlying_type will reflect the old custom hashers.
Tim Haines [Tue, 22 Sep 2020 18:17:31 +0000 (13:17 -0500)]
Remove bluegene support (#847)
* Remove Bluegene support
* Remove IBM_BPATCH_COMPAT usage
Tim Haines [Tue, 22 Sep 2020 02:54:02 +0000 (21:54 -0500)]
Remove vxworks support (#859)
Support for VxWorks was added by 02bc600 in March 2010, and the code broken by 0bc3980 in November 2011. It has also never been part of the CMake build system (ca. 2013).
Tim Haines [Mon, 21 Sep 2020 21:44:49 +0000 (16:44 -0500)]
Replace pdvector with std::vector (#856)
Tim Haines [Mon, 21 Sep 2020 21:15:03 +0000 (16:15 -0500)]
Remove vectorSet (#857)
This was an unused internal container. No user code is affected by this.
Tim Haines [Mon, 21 Sep 2020 20:49:26 +0000 (15:49 -0500)]
parseThat: remove autotools build files (#858)
It has been building with CMake since 2016, so we don't need a second
option.
Tim Haines [Mon, 21 Sep 2020 20:23:15 +0000 (15:23 -0500)]
Replace BPatch_vector internal implementation with std::vector (#844)
* Replace BPatch_vector internal implementation with std::vector
This keeps the BPatch_vector type, but only as an alias to std::vector.
* Remove '#pragma implementation'
* Remove friend declaration from BPatch_frame
Xiaozhu Meng [Mon, 21 Sep 2020 19:58:59 +0000 (12:58 -0700)]
Some necessary changes for overlapping text regions (#855)
Dyninst doesn't fully support binaries that contain text regions
with overlapping address ranges, e.g. CUBINs. This patch adds
necessary but not complete support for this case.
Co-authored-by: John Mellor-Crummey <johnmc@rice.edu>
Tim Haines [Wed, 16 Sep 2020 01:58:17 +0000 (20:58 -0500)]
Remove vestiges of sparc (#850)
Tim Haines [Tue, 15 Sep 2020 22:10:48 +0000 (17:10 -0500)]
Remove vestiges of AIX (#849)
Tim Haines [Tue, 15 Sep 2020 21:07:46 +0000 (16:07 -0500)]
InstructionAPI docs: Update InsnCategory values returned from Instruction::getCategory (#851)
Tim Haines [Thu, 10 Sep 2020 03:28:02 +0000 (22:28 -0500)]
V10.2.1 release updates (#842)
* Update CHANGELOG for v10.2.1 release
* Update version number for v10.2.1 release
Tim Haines [Thu, 10 Sep 2020 00:57:04 +0000 (19:57 -0500)]
Remove exception specifications (#841)
They were deprecated in c++11 and removed in c++17.
Tim Haines [Tue, 8 Sep 2020 18:34:06 +0000 (13:34 -0500)]
Fix memory leak in singleton_object_pool (#835)
Two memory leak fixes related singleton_object_pool.
1. The singleon_object_pool currently only destructs objects but does not deallocate memory space. This leak applies to all architectures.
2. On ppc and arm, instruction decoder does not use smart pointers to manage InstructionAPI::Instruction constructed by a singleon_object_pool, and thus cause memory leaks.
Xiaozhu Meng [Sun, 6 Sep 2020 19:44:41 +0000 (14:44 -0500)]
Fix power instruction decoding regression