Compare commits
11 Commits
d48e6cb748
...
f45cd2e5e0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f45cd2e5e0 | ||
|
|
ca0f9c5c98 | ||
|
|
0ab004f895 | ||
|
|
41fe9a43a6 | ||
|
|
61e7fd70c0 | ||
|
|
e342254af7 | ||
|
|
544d052dc5 | ||
|
|
27716f31d4 | ||
|
|
b411f64a85 | ||
|
|
f3d8838ab0 | ||
|
|
62e815bb73 |
Binary file not shown.
265
dyninst-eliminate-deprecated-C-function-objects-1331.patch
Normal file
265
dyninst-eliminate-deprecated-C-function-objects-1331.patch
Normal file
@ -0,0 +1,265 @@
|
||||
From 6436c734eef50d55ed6c562aa3fabf0c7039c50c Mon Sep 17 00:00:00 2001
|
||||
From: "James A. Kupsch" <kupsch@cs.wisc.edu>
|
||||
Date: Wed, 7 Dec 2022 13:28:08 -0600
|
||||
Subject: [PATCH] eliminate deprecated C++ function objects (#1331)
|
||||
|
||||
fix function objects that were deprecate in C++ 11 and removed in C++ 17
|
||||
|
||||
- replace mem_fun with mem_fn
|
||||
- eliminate binary_function and unary_function base classes
|
||||
- use const iterator when constructing boost::transform_iterator
|
||||
---
|
||||
dyninstAPI/h/BPatch_basicBlock.h | 4 +++-
|
||||
dyninstAPI/src/StackMod/StackLocation.h | 5 +++--
|
||||
dyninstAPI/src/addressSpace.C | 10 +++++-----
|
||||
.../AMDGPU/cdna2/InstructionDecoder-amdgpu-cdna2.C | 2 +-
|
||||
.../src/AMDGPU/vega/InstructionDecoder-amdgpu-vega.C | 4 ++--
|
||||
instructionAPI/src/InstructionDecoder-aarch64.C | 2 +-
|
||||
instructionAPI/src/InstructionDecoder-power.C | 6 +++---
|
||||
symtabAPI/h/Aggregate.h | 2 +-
|
||||
symtabAPI/src/Aggregate.C | 12 ++++++------
|
||||
symtabAPI/src/Object-elf.C | 4 ++--
|
||||
10 files changed, 27 insertions(+), 24 deletions(-)
|
||||
|
||||
diff --git a/dyninstAPI/h/BPatch_basicBlock.h b/dyninstAPI/h/BPatch_basicBlock.h
|
||||
index 37547d40c..de26fd81f 100644
|
||||
--- a/dyninstAPI/h/BPatch_basicBlock.h
|
||||
+++ b/dyninstAPI/h/BPatch_basicBlock.h
|
||||
@@ -89,8 +89,10 @@ struct comparison <BPatch_basicBlock *> {
|
||||
*/
|
||||
class BPatch_flowGraph;
|
||||
|
||||
-struct BPATCH_DLL_EXPORT insnPredicate : public std::unary_function<Dyninst::InstructionAPI::Instruction, bool>
|
||||
+struct BPATCH_DLL_EXPORT insnPredicate
|
||||
{
|
||||
+ using result_type = bool;
|
||||
+ using argument_type = Dyninst::InstructionAPI::Instruction;
|
||||
virtual result_type operator()(argument_type arg) = 0;
|
||||
virtual ~insnPredicate() {}
|
||||
|
||||
diff --git a/dyninstAPI/src/StackMod/StackLocation.h b/dyninstAPI/src/StackMod/StackLocation.h
|
||||
index 4b1d731e6..51775e261 100644
|
||||
--- a/dyninstAPI/src/StackMod/StackLocation.h
|
||||
+++ b/dyninstAPI/src/StackMod/StackLocation.h
|
||||
@@ -132,7 +132,8 @@ class StackLocation {
|
||||
ValidPCRange* _valid;
|
||||
};
|
||||
|
||||
-struct less_StackLocation: public std::binary_function<StackLocation*, StackLocation*, bool> {
|
||||
+struct less_StackLocation
|
||||
+{
|
||||
bool operator()(StackLocation* a, StackLocation* b) const {
|
||||
if (a->isStackMemory() && b->isStackMemory()) {
|
||||
if (a->off().height() == b->off().height()) {
|
||||
@@ -178,7 +179,7 @@ class tmpObject
|
||||
ValidPCRange* _valid;
|
||||
};
|
||||
|
||||
-struct less_tmpObject: public std::binary_function<tmpObject, tmpObject, bool>
|
||||
+struct less_tmpObject
|
||||
{
|
||||
bool operator()(tmpObject a, tmpObject b) const {
|
||||
if (a.offset() < b.offset()) {
|
||||
diff --git a/dyninstAPI/src/addressSpace.C b/dyninstAPI/src/addressSpace.C
|
||||
index 3b4cf9eba..8978262f6 100644
|
||||
--- a/dyninstAPI/src/addressSpace.C
|
||||
+++ b/dyninstAPI/src/addressSpace.C
|
||||
@@ -284,7 +284,7 @@ void AddressSpace::inferiorFreeCompact() {
|
||||
unsigned i, nbuf = freeList.size();
|
||||
|
||||
/* sort buffers by address */
|
||||
- std::sort(freeList.begin(), freeList.end(), ptr_fun(heapItemLessByAddr));
|
||||
+ std::sort(freeList.begin(), freeList.end(), heapItemLessByAddr);
|
||||
|
||||
/* combine adjacent buffers */
|
||||
bool needToCompact = false;
|
||||
@@ -371,7 +371,7 @@ void AddressSpace::addHeap(heapItem *h) {
|
||||
heap_.heapFree.push_back(h2);
|
||||
|
||||
/* When we add an item to heapFree, make sure it remains in sorted order */
|
||||
- std::sort(heap_.heapFree.begin(), heap_.heapFree.end(), ptr_fun(heapItemLessByAddr));
|
||||
+ std::sort(heap_.heapFree.begin(), heap_.heapFree.end(), heapItemLessByAddr);
|
||||
|
||||
heap_.totalFreeMemAvailable += h2->length;
|
||||
}
|
||||
@@ -425,7 +425,7 @@ Address AddressSpace::inferiorMallocInternal(unsigned size,
|
||||
}
|
||||
|
||||
/* When we update an item in heapFree, make sure it remains in sorted order */
|
||||
- std::sort(heap_.heapFree.begin(), heap_.heapFree.end(), ptr_fun(heapItemLessByAddr));
|
||||
+ std::sort(heap_.heapFree.begin(), heap_.heapFree.end(), heapItemLessByAddr);
|
||||
|
||||
// add allocated block to active list
|
||||
h->length = size;
|
||||
@@ -455,7 +455,7 @@ void AddressSpace::inferiorFreeInternal(Address block) {
|
||||
heap_.heapFree.push_back(h);
|
||||
|
||||
/* When we add an item to heapFree, make sure it remains in sorted order */
|
||||
- std::sort(heap_.heapFree.begin(), heap_.heapFree.end(), ptr_fun(heapItemLessByAddr));
|
||||
+ std::sort(heap_.heapFree.begin(), heap_.heapFree.end(), heapItemLessByAddr);
|
||||
|
||||
heap_.totalFreeMemAvailable += h->length;
|
||||
heap_.freed += h->length;
|
||||
@@ -561,7 +561,7 @@ bool AddressSpace::inferiorShrinkBlock(heapItem *h,
|
||||
heap_.heapFree.push_back(freeEnd);
|
||||
|
||||
/* When we add an item to heapFree, make sure it remains sorted */
|
||||
- std::sort(heap_.heapFree.begin(), heap_.heapFree.end(), ptr_fun(heapItemLessByAddr));
|
||||
+ std::sort(heap_.heapFree.begin(), heap_.heapFree.end(), heapItemLessByAddr);
|
||||
}
|
||||
|
||||
heap_.totalFreeMemAvailable += shrink;
|
||||
diff --git a/instructionAPI/src/AMDGPU/cdna2/InstructionDecoder-amdgpu-cdna2.C b/instructionAPI/src/AMDGPU/cdna2/InstructionDecoder-amdgpu-cdna2.C
|
||||
index f62b1f546..daf7a4b7d 100644
|
||||
--- a/instructionAPI/src/AMDGPU/cdna2/InstructionDecoder-amdgpu-cdna2.C
|
||||
+++ b/instructionAPI/src/AMDGPU/cdna2/InstructionDecoder-amdgpu-cdna2.C
|
||||
@@ -235,7 +235,7 @@ namespace Dyninst {
|
||||
mainDecode();
|
||||
if(entryToCategory(insn_in_progress->getOperation().getID())==c_BranchInsn){
|
||||
//cout << "Is Branch Instruction !! , name = " << insn_in_progress -> getOperation().mnemonic << endl;
|
||||
- //std::mem_fun(decode_lookup_table[instr_family])(this);
|
||||
+ //std::mem_fn(decode_lookup_table[instr_family])(this);
|
||||
}
|
||||
b.start += insn_in_progress->size();
|
||||
return *insn_in_progress;
|
||||
diff --git a/instructionAPI/src/AMDGPU/vega/InstructionDecoder-amdgpu-vega.C b/instructionAPI/src/AMDGPU/vega/InstructionDecoder-amdgpu-vega.C
|
||||
index 3093ece41..ed7cbed78 100644
|
||||
--- a/instructionAPI/src/AMDGPU/vega/InstructionDecoder-amdgpu-vega.C
|
||||
+++ b/instructionAPI/src/AMDGPU/vega/InstructionDecoder-amdgpu-vega.C
|
||||
@@ -552,7 +552,7 @@ namespace Dyninst {
|
||||
bool InstructionDecoder_amdgpu_vega::decodeOperands(const amdgpu_vega_insn_entry & insn_entry) {
|
||||
if(insn_entry.operandCnt!=0){
|
||||
for (std::size_t i =0 ; i < insn_entry.operandCnt; i++){
|
||||
- std::mem_fun(insn_entry.operands[i])(this);
|
||||
+ std::mem_fn(insn_entry.operands[i])(this);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
@@ -721,7 +721,7 @@ namespace Dyninst {
|
||||
setupInsnWord(b);
|
||||
mainDecodeOpcode(b);
|
||||
if(entryToCategory(insn_in_progress->getOperation().getID())==c_BranchInsn){
|
||||
- std::mem_fun(decode_lookup_table[instr_family])(this);
|
||||
+ std::mem_fn(decode_lookup_table[instr_family])(this);
|
||||
}
|
||||
b.start += insn_in_progress->size();
|
||||
return *insn_in_progress;
|
||||
diff --git a/instructionAPI/src/InstructionDecoder-aarch64.C b/instructionAPI/src/InstructionDecoder-aarch64.C
|
||||
index 53a831c3c..2e8935923 100644
|
||||
--- a/instructionAPI/src/InstructionDecoder-aarch64.C
|
||||
+++ b/instructionAPI/src/InstructionDecoder-aarch64.C
|
||||
@@ -2960,7 +2960,7 @@ Expression::Ptr InstructionDecoder_aarch64::makeMemRefExPair2(){
|
||||
skipRm = true;
|
||||
|
||||
for (std::size_t i = 0; i < insn_table_entry.operandCnt; i++) {
|
||||
- std::mem_fun(insn_table_entry.operands[i])(this);
|
||||
+ std::mem_fn(insn_table_entry.operands[i])(this);
|
||||
}
|
||||
|
||||
if (insn_table_index == 0)
|
||||
diff --git a/instructionAPI/src/InstructionDecoder-power.C b/instructionAPI/src/InstructionDecoder-power.C
|
||||
index ffd38bcf3..34b903d11 100644
|
||||
--- a/instructionAPI/src/InstructionDecoder-power.C
|
||||
+++ b/instructionAPI/src/InstructionDecoder-power.C
|
||||
@@ -297,7 +297,7 @@ namespace Dyninst
|
||||
const power_entry* current = &power_entry::main_opcode_table[field<0,5>(insn)];
|
||||
while(current->next_table)
|
||||
{
|
||||
- current = &(std::mem_fun(current->next_table)(this));
|
||||
+ current = &(std::mem_fn(current->next_table)(this));
|
||||
}
|
||||
if (findRAAndRS(current)) {
|
||||
isRAWritten = true;
|
||||
@@ -314,7 +314,7 @@ namespace Dyninst
|
||||
curFn != current->operands.end();
|
||||
++curFn)
|
||||
{
|
||||
- std::mem_fun(*curFn)(this);
|
||||
+ std::mem_fn(*curFn)(this);
|
||||
}
|
||||
if(current->op == power_op_bclr)
|
||||
{
|
||||
@@ -1429,7 +1429,7 @@ using namespace boost::assign;
|
||||
const power_entry* current = &power_entry::main_opcode_table[field<0,5>(insn)];
|
||||
while(current->next_table)
|
||||
{
|
||||
- current = &(std::mem_fun(current->next_table)(this));
|
||||
+ current = &(std::mem_fn(current->next_table)(this));
|
||||
}
|
||||
insn_in_progress = makeInstruction(current->op, current->mnemonic, 4, reinterpret_cast<unsigned char*>(&insn));
|
||||
if(current->op == power_op_b ||
|
||||
diff --git a/symtabAPI/h/Aggregate.h b/symtabAPI/h/Aggregate.h
|
||||
index bcc930252..80caeb34b 100644
|
||||
--- a/symtabAPI/h/Aggregate.h
|
||||
+++ b/symtabAPI/h/Aggregate.h
|
||||
@@ -86,7 +86,7 @@ class SYMTAB_EXPORT Aggregate
|
||||
//std::vector<std::string> getAllMangledNames();
|
||||
//std::vector<std::string> getAllPrettyNames();
|
||||
//std::vector<std::string> getAllTypedNames();
|
||||
- typedef boost::transform_iterator<std::const_mem_fun_t<std::string, Symbol>, std::vector<Symbol*>::const_iterator> name_iter;
|
||||
+ using name_iter = boost::transform_iterator<decltype(std::mem_fn(&Symbol::getPrettyName)), std::vector<Symbol*>::const_iterator>;
|
||||
name_iter mangled_names_begin() const;
|
||||
name_iter mangled_names_end() const;
|
||||
name_iter pretty_names_begin() const;
|
||||
diff --git a/symtabAPI/src/Aggregate.C b/symtabAPI/src/Aggregate.C
|
||||
index 2fc69358d..f0de0b841 100644
|
||||
--- a/symtabAPI/src/Aggregate.C
|
||||
+++ b/symtabAPI/src/Aggregate.C
|
||||
@@ -307,26 +307,26 @@ bool Aggregate::operator==(const Aggregate &a)
|
||||
|
||||
Aggregate::name_iter Aggregate::mangled_names_begin() const
|
||||
{
|
||||
- return boost::make_transform_iterator(symbols_.begin(), std::mem_fun(&Symbol::getMangledName));
|
||||
+ return boost::make_transform_iterator(symbols_.cbegin(), std::mem_fn(&Symbol::getMangledName));
|
||||
}
|
||||
|
||||
Aggregate::name_iter Aggregate::mangled_names_end() const
|
||||
{
|
||||
- return boost::make_transform_iterator(symbols_.end(), std::mem_fun(&Symbol::getMangledName));
|
||||
+ return boost::make_transform_iterator(symbols_.cend(), std::mem_fn(&Symbol::getMangledName));
|
||||
}
|
||||
Aggregate::name_iter Aggregate::pretty_names_begin() const
|
||||
{
|
||||
- return boost::make_transform_iterator(symbols_.begin(), std::mem_fun(&Symbol::getPrettyName));
|
||||
+ return boost::make_transform_iterator(symbols_.cbegin(), std::mem_fn(&Symbol::getPrettyName));
|
||||
}
|
||||
Aggregate::name_iter Aggregate::pretty_names_end() const
|
||||
{
|
||||
- return boost::make_transform_iterator(symbols_.end(), std::mem_fun(&Symbol::getPrettyName));
|
||||
+ return boost::make_transform_iterator(symbols_.cend(), std::mem_fn(&Symbol::getPrettyName));
|
||||
}
|
||||
Aggregate::name_iter Aggregate::typed_names_begin() const
|
||||
{
|
||||
- return boost::make_transform_iterator(symbols_.begin(), std::mem_fun(&Symbol::getTypedName));
|
||||
+ return boost::make_transform_iterator(symbols_.cbegin(), std::mem_fn(&Symbol::getTypedName));
|
||||
}
|
||||
Aggregate::name_iter Aggregate::typed_names_end() const
|
||||
{
|
||||
- return boost::make_transform_iterator(symbols_.end(), std::mem_fun(&Symbol::getTypedName));
|
||||
+ return boost::make_transform_iterator(symbols_.cend(), std::mem_fn(&Symbol::getTypedName));
|
||||
}
|
||||
diff --git a/symtabAPI/src/Object-elf.C b/symtabAPI/src/Object-elf.C
|
||||
index 9eb7a1dc8..4e73e7a13 100644
|
||||
--- a/symtabAPI/src/Object-elf.C
|
||||
+++ b/symtabAPI/src/Object-elf.C
|
||||
@@ -129,7 +129,7 @@ const char *pdelf_get_shnames(Elf_X *elf) {
|
||||
//
|
||||
// Compare function for use with the Vector<T> sort method.
|
||||
//
|
||||
-struct SectionHeaderSortFunction : public binary_function<Elf_X_Shdr *, Elf_X_Shdr *, bool> {
|
||||
+struct SectionHeaderSortFunction {
|
||||
bool operator()(Elf_X_Shdr *hdr1, Elf_X_Shdr *hdr2) {
|
||||
return (hdr1->sh_addr() < hdr2->sh_addr());
|
||||
}
|
||||
@@ -3122,7 +3122,7 @@ int read_except_table_gcc3(
|
||||
}
|
||||
|
||||
|
||||
-struct exception_compare : public binary_function<const ExceptionBlock &, const ExceptionBlock &, bool> {
|
||||
+struct exception_compare {
|
||||
bool operator()(const ExceptionBlock &e1, const ExceptionBlock &e2) const {
|
||||
if (e1.tryStart() < e2.tryStart())
|
||||
return true;
|
||||
--
|
||||
2.33.0
|
||||
|
||||
112
dyninst-support-clang-build.patch
Normal file
112
dyninst-support-clang-build.patch
Normal file
@ -0,0 +1,112 @@
|
||||
From 6644c84edd08305f0305a1aaea20797cb01cb197 Mon Sep 17 00:00:00 2001
|
||||
From: luofeng <luofeng13@huawei.com>
|
||||
Date: Sat, 23 Sep 2023 10:17:45 +0800
|
||||
Subject: [PATCH] support clang build
|
||||
|
||||
---
|
||||
cmake/options.cmake | 3 ++-
|
||||
.../src/AMDGPU/cdna2/InstructionDecoder-amdgpu-cdna2.C | 4 ++--
|
||||
.../src/AMDGPU/cdna2/InstructionDecoder-amdgpu-cdna2.h | 2 +-
|
||||
.../src/AMDGPU/gfx908/InstructionDecoder-amdgpu-gfx908.C | 2 +-
|
||||
.../src/AMDGPU/gfx908/InstructionDecoder-amdgpu-gfx908.h | 2 +-
|
||||
.../src/AMDGPU/vega/InstructionDecoder-amdgpu-vega.C | 4 ++--
|
||||
6 files changed, 9 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/cmake/options.cmake b/cmake/options.cmake
|
||||
index 7cbe66b..0481463 100644
|
||||
--- a/cmake/options.cmake
|
||||
+++ b/cmake/options.cmake
|
||||
@@ -1,5 +1,6 @@
|
||||
# Use OpenMP?
|
||||
-option(USE_OpenMP "Use OpenMP for parallel parsing" ON)
|
||||
+# option(USE_OpenMP "Use OpenMP for parallel parsing" ON)
|
||||
+option(USE_OpenMP "Use OpenMP for parallel parsing" OFF)
|
||||
|
||||
# Use SymtabAPI or SymLite?
|
||||
option(
|
||||
diff --git a/instructionAPI/src/AMDGPU/cdna2/InstructionDecoder-amdgpu-cdna2.C b/instructionAPI/src/AMDGPU/cdna2/InstructionDecoder-amdgpu-cdna2.C
|
||||
index daf7a4b..66b4a3a 100644
|
||||
--- a/instructionAPI/src/AMDGPU/cdna2/InstructionDecoder-amdgpu-cdna2.C
|
||||
+++ b/instructionAPI/src/AMDGPU/cdna2/InstructionDecoder-amdgpu-cdna2.C
|
||||
@@ -162,7 +162,7 @@ namespace Dyninst {
|
||||
Expression::Ptr InstructionDecoder_amdgpu_cdna2::decodeOPR_WAITCNT(uint64_t input){
|
||||
return Immediate::makeImmediate(Result(s16, input));
|
||||
}
|
||||
- Expression::Ptr InstructionDecoder_amdgpu_cdna2::makeRegisterExpression(MachRegister registerID){
|
||||
+ Expression::Ptr InstructionDecoder_amdgpu_cdna2::makeRegisterExpression(MachRegister registerID, uint32_t){
|
||||
if(registerID == amdgpu_cdna2::src_literal){
|
||||
return Immediate::makeImmediate(Result(u32,decodeOPR_LITERAL()));
|
||||
}
|
||||
@@ -235,7 +235,7 @@ namespace Dyninst {
|
||||
mainDecode();
|
||||
if(entryToCategory(insn_in_progress->getOperation().getID())==c_BranchInsn){
|
||||
//cout << "Is Branch Instruction !! , name = " << insn_in_progress -> getOperation().mnemonic << endl;
|
||||
- //std::mem_fn(decode_lookup_table[instr_family])(this);
|
||||
+ //std::mem_fun(decode_lookup_table[instr_family])(this);
|
||||
}
|
||||
b.start += insn_in_progress->size();
|
||||
return *insn_in_progress;
|
||||
diff --git a/instructionAPI/src/AMDGPU/cdna2/InstructionDecoder-amdgpu-cdna2.h b/instructionAPI/src/AMDGPU/cdna2/InstructionDecoder-amdgpu-cdna2.h
|
||||
index d35482f..f194ac4 100644
|
||||
--- a/instructionAPI/src/AMDGPU/cdna2/InstructionDecoder-amdgpu-cdna2.h
|
||||
+++ b/instructionAPI/src/AMDGPU/cdna2/InstructionDecoder-amdgpu-cdna2.h
|
||||
@@ -306,7 +306,7 @@ namespace Dyninst {
|
||||
Expression::Ptr decodeOPR_SIMM32(uint64_t input);
|
||||
Expression::Ptr decodeOPR_WAITCNT(uint64_t input);
|
||||
using InstructionDecoderImpl::makeRegisterExpression;
|
||||
- Expression::Ptr makeRegisterExpression(MachRegister registerID);
|
||||
+ Expression::Ptr makeRegisterExpression(MachRegister registerID, uint32_t num_elements = 1);
|
||||
Expression::Ptr makeRegisterExpression(MachRegister registerID, uint32_t low , uint32_t high );
|
||||
void specialHandle();
|
||||
#include "amdgpu_cdna2_decoder_impl.h"
|
||||
diff --git a/instructionAPI/src/AMDGPU/gfx908/InstructionDecoder-amdgpu-gfx908.C b/instructionAPI/src/AMDGPU/gfx908/InstructionDecoder-amdgpu-gfx908.C
|
||||
index 70d9edc..a629b3c 100644
|
||||
--- a/instructionAPI/src/AMDGPU/gfx908/InstructionDecoder-amdgpu-gfx908.C
|
||||
+++ b/instructionAPI/src/AMDGPU/gfx908/InstructionDecoder-amdgpu-gfx908.C
|
||||
@@ -178,7 +178,7 @@ namespace Dyninst {
|
||||
Expression::Ptr InstructionDecoder_amdgpu_gfx908::decodeOPR_WAITCNT(uint64_t input){
|
||||
return Immediate::makeImmediate(Result(s16, input));
|
||||
}
|
||||
- Expression::Ptr InstructionDecoder_amdgpu_gfx908::makeRegisterExpression(MachRegister registerID){
|
||||
+ Expression::Ptr InstructionDecoder_amdgpu_gfx908::makeRegisterExpression(MachRegister registerID, uint32_t){
|
||||
if(registerID == amdgpu_gfx908::src_literal){
|
||||
return Immediate::makeImmediate(Result(u32,decodeOPR_LITERAL()));
|
||||
}
|
||||
diff --git a/instructionAPI/src/AMDGPU/gfx908/InstructionDecoder-amdgpu-gfx908.h b/instructionAPI/src/AMDGPU/gfx908/InstructionDecoder-amdgpu-gfx908.h
|
||||
index 7826af0..b5420d8 100644
|
||||
--- a/instructionAPI/src/AMDGPU/gfx908/InstructionDecoder-amdgpu-gfx908.h
|
||||
+++ b/instructionAPI/src/AMDGPU/gfx908/InstructionDecoder-amdgpu-gfx908.h
|
||||
@@ -299,7 +299,7 @@ namespace Dyninst {
|
||||
Expression::Ptr decodeOPR_SIMM32(uint64_t input);
|
||||
Expression::Ptr decodeOPR_WAITCNT(uint64_t input);
|
||||
using InstructionDecoderImpl::makeRegisterExpression;
|
||||
- Expression::Ptr makeRegisterExpression(MachRegister registerID);
|
||||
+ Expression::Ptr makeRegisterExpression(MachRegister registerID, uint32_t num_elements = 1);
|
||||
Expression::Ptr makeRegisterExpression(MachRegister registerID, uint32_t low , uint32_t high );
|
||||
void specialHandle();
|
||||
#include "amdgpu_gfx908_decoder_impl.h"
|
||||
diff --git a/instructionAPI/src/AMDGPU/vega/InstructionDecoder-amdgpu-vega.C b/instructionAPI/src/AMDGPU/vega/InstructionDecoder-amdgpu-vega.C
|
||||
index ed7cbed..3093ece 100644
|
||||
--- a/instructionAPI/src/AMDGPU/vega/InstructionDecoder-amdgpu-vega.C
|
||||
+++ b/instructionAPI/src/AMDGPU/vega/InstructionDecoder-amdgpu-vega.C
|
||||
@@ -552,7 +552,7 @@ namespace Dyninst {
|
||||
bool InstructionDecoder_amdgpu_vega::decodeOperands(const amdgpu_vega_insn_entry & insn_entry) {
|
||||
if(insn_entry.operandCnt!=0){
|
||||
for (std::size_t i =0 ; i < insn_entry.operandCnt; i++){
|
||||
- std::mem_fn(insn_entry.operands[i])(this);
|
||||
+ std::mem_fun(insn_entry.operands[i])(this);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
@@ -721,7 +721,7 @@ namespace Dyninst {
|
||||
setupInsnWord(b);
|
||||
mainDecodeOpcode(b);
|
||||
if(entryToCategory(insn_in_progress->getOperation().getID())==c_BranchInsn){
|
||||
- std::mem_fn(decode_lookup_table[instr_family])(this);
|
||||
+ std::mem_fun(decode_lookup_table[instr_family])(this);
|
||||
}
|
||||
b.start += insn_in_progress->size();
|
||||
return *insn_in_progress;
|
||||
--
|
||||
2.19.1
|
||||
|
||||
34
dyninst-warning-fix-std-iterator-is-deprecated-1394.patch
Normal file
34
dyninst-warning-fix-std-iterator-is-deprecated-1394.patch
Normal file
@ -0,0 +1,34 @@
|
||||
From 55d8a338e362d3aa4448aa9bae776eb90ca1292a Mon Sep 17 00:00:00 2001
|
||||
From: "James A. Kupsch" <kupsch@cs.wisc.edu>
|
||||
Date: Thu, 16 Feb 2023 10:11:59 -0600
|
||||
Subject: [PATCH] warning fix: std::iterator is deprecated (#1394)
|
||||
|
||||
- replace std::iterator with in class type aliass for required types
|
||||
---
|
||||
symtabAPI/h/Symtab.h | 8 +++++++-
|
||||
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/symtabAPI/h/Symtab.h b/symtabAPI/h/Symtab.h
|
||||
index 7731c1572..bf6d8ab23 100644
|
||||
--- a/symtabAPI/h/Symtab.h
|
||||
+++ b/symtabAPI/h/Symtab.h
|
||||
@@ -558,9 +558,15 @@ class SYMTAB_EXPORT Symtab : public LookupInterface,
|
||||
void erase(Symbol* s);
|
||||
|
||||
// Iterator for the symbols. Do not use in parallel.
|
||||
- class iterator : public std::iterator<std::forward_iterator_tag,Symbol*> {
|
||||
+ class iterator {
|
||||
master_t::iterator m;
|
||||
public:
|
||||
+ using iterator_category = std::forward_iterator_tag;
|
||||
+ using value_type = Symbol*;
|
||||
+ using difference_type = std::ptrdiff_t;
|
||||
+ using pointer = value_type*;
|
||||
+ using reference = value_type&;
|
||||
+
|
||||
iterator(master_t::iterator i) : m(i) {}
|
||||
bool operator==(const iterator& x) { return m == x.m; }
|
||||
bool operator!=(const iterator& x) { return !operator==(x); }
|
||||
--
|
||||
2.21.0.windows.1
|
||||
|
||||
51
dyninst.spec
51
dyninst.spec
@ -1,18 +1,22 @@
|
||||
Name: dyninst
|
||||
License: LGPLv2+
|
||||
Release: 1
|
||||
Version: 12.2.1
|
||||
Release: 4
|
||||
Version: 12.3.0
|
||||
Summary: An API for Run-time Code Generation
|
||||
ExclusiveArch: x86_64 aarch64
|
||||
|
||||
%global dyninst_base dyninst-%{version}
|
||||
%global testsuite_version 12.2.1
|
||||
%global testsuite_version 12.3.0
|
||||
%global testsuite_base testsuite-%{testsuite_version}
|
||||
|
||||
URL: http://www.dyninst.org
|
||||
Source0: https://github.com/dyninst/dyninst/archive/v%{version}/dyninst-%{version}.tar.gz
|
||||
Source1: https://github.com/dyninst/testsuite/archive/v%{testsuite_version}/%{testsuite_base}.tar.gz
|
||||
|
||||
Patch1: dyninst-eliminate-deprecated-C-function-objects-1331.patch
|
||||
Patch2: dyninst-warning-fix-std-iterator-is-deprecated-1394.patch
|
||||
Patch3: dyninst-support-clang-build.patch
|
||||
|
||||
BuildRequires: cmake gcc-c++
|
||||
BuildRequires: binutils-devel boost-devel
|
||||
BuildRequires: elfutils-libelf-devel
|
||||
@ -48,6 +52,12 @@ dyninst-doc contains API documentation for the Dyninst libraries.
|
||||
%setup -q -n %{name}-%{version} -c
|
||||
%setup -q -T -D -a 1
|
||||
|
||||
pushd %{dyninst_base}
|
||||
%patch 1 -p1
|
||||
%patch 2 -p1
|
||||
%patch 3 -p1
|
||||
popd
|
||||
|
||||
sed -i.cotire -e 's/USE_COTIRE true/USE_COTIRE false/' \
|
||||
%{dyninst_base}/cmake/shared.cmake
|
||||
|
||||
@ -74,26 +84,12 @@ find ../install -name '*.cmake' -execdir \
|
||||
sed -i -e 's!%{_prefix}!../install&!' '{}' '+'
|
||||
sed -i '/libtbb.so/ s/".*usr/"\/usr/' $PWD/../install%{_libdir}/cmake/Dyninst/commonTargets.cmake
|
||||
|
||||
cd ../%{testsuite_base}
|
||||
%cmake \
|
||||
-DDyninst_DIR:PATH=$PWD/../install%{_libdir}/cmake/Dyninst \
|
||||
-DINSTALL_DIR:PATH=%{_libdir}/dyninst/testsuite \
|
||||
-DCMAKE_BUILD_TYPE:STRING=Debug \
|
||||
-DCMAKE_SKIP_RPATH:BOOL=YES \
|
||||
.
|
||||
%make_build
|
||||
|
||||
%install
|
||||
cd %{dyninst_base}
|
||||
%make_install
|
||||
|
||||
cd ../%{testsuite_base}
|
||||
%make_install
|
||||
|
||||
mkdir -p %{buildroot}/etc/ld.so.conf.d
|
||||
echo "%{_libdir}/dyninst" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf
|
||||
find %{buildroot}%{_libdir}/dyninst/testsuite/ \
|
||||
-type f '!' -name '*.a' -execdir chmod 644 '{}' '+'
|
||||
|
||||
%post -p /sbin/ldconfig
|
||||
%postun -p /sbin/ldconfig
|
||||
@ -110,9 +106,6 @@ find %{buildroot}%{_libdir}/dyninst/testsuite/ \
|
||||
%{_libdir}/cmake/Dyninst
|
||||
%{_libdir}/dyninst/*.a
|
||||
%{_bindir}/parseThat
|
||||
%dir %{_libdir}/dyninst/testsuite/
|
||||
%attr(755,root,root) %{_libdir}/dyninst/testsuite/*[!a]
|
||||
%attr(644,root,root) %{_libdir}/dyninst/testsuite/*.a
|
||||
%exclude %{_bindir}/cfg_to_dot
|
||||
%exclude /usr/bin/codeCoverage
|
||||
%exclude /usr/bin/unstrip
|
||||
@ -134,6 +127,24 @@ find %{buildroot}%{_libdir}/dyninst/testsuite/ \
|
||||
%doc %{dyninst_base}/symtabAPI/doc/symtabAPI.pdf
|
||||
|
||||
%changelog
|
||||
* Sat Sep 23 2023 luofeng <luofeng13@huawei.com> - 12.3.0-4
|
||||
- support clang build
|
||||
|
||||
* Wed Aug 9 2023 Wenyu Liu <liuwenyu7@huawei.com> - 12.3.0-3
|
||||
- warning fix: std::iterator is deprecated
|
||||
|
||||
* Thu Jul 20 2023 Wenyu Liu <liuwenyu7@huawei.com> - 12.3.0-2
|
||||
- eliminate deprecated C++ function objects
|
||||
|
||||
* Wed Jul 19 2023 Wenyu Liu <liuwenyu7@huawei.com> - 12.3.0-1
|
||||
- update to 12.3.0
|
||||
|
||||
* Wed Mar 8 2023 Wenyu Liu <liuwenyu7@huawei.com> - 12.2.1-3
|
||||
- remove useless testsuitte in devel package
|
||||
|
||||
* Mon Feb 13 2023 Wenyu Liu <liuwenyu7@huawei.com> - 12.2.1-2
|
||||
- add missing #include <deque>
|
||||
|
||||
* Sun Jan 29 2023 Wenyu Liu <liuwenyu7@huawei.com> - 12.2.1-1
|
||||
- update to 12.2.1
|
||||
|
||||
|
||||
Binary file not shown.
BIN
testsuite-12.3.0.tar.gz
Normal file
BIN
testsuite-12.3.0.tar.gz
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user