Skip to content

Commit

Permalink
Merge branch 'master' into sasha/dwarf-redhat-issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Sasha (fedora33) committed Dec 20, 2020
2 parents c6e088d + 7e8b261 commit f89ff36
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 18 deletions.
5 changes: 2 additions & 3 deletions cmake/LanguageStandards.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)

# Require the standards-compliant C++11 ABI for gcc
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.1")
message(FATAL_ERROR "Dyninst requires gcc >= 5.1")
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.0")
message(FATAL_ERROR "Dyninst requires gcc >= 6.0")
endif()
add_definitions(-D_GLIBCXX_USE_CXX11_ABI=1)
endif()


Expand Down
9 changes: 5 additions & 4 deletions dwarf/src/dwarfHandle.C
Original file line number Diff line number Diff line change
Expand Up @@ -200,17 +200,18 @@ bool DwarfHandle::init_dbg()
unsigned int ef_amdgpu_mach = 0x000000ff & file->e_flags();
switch(ef_amdgpu_mach){
case 0x33: case 0x34: case 0x35: case 0x36: case 0x37: case 0x38:
return Dyninst::Arch_amdgpu_rdna;
assert( 0 && "rdna not supported yet " );
arch = Dyninst::Arch_amdgpu_rdna;
break;
case 0x28: case 0x29: case 0x2a: case 0x2b: case 0x2c: case 0x2d: case 0x2e: case 0x2f: case 0x30: case 0x31:
return Dyninst::Arch_amdgpu_vega;
arch = Dyninst::Arch_amdgpu_vega;
break;
case 0x11: case 0x12: case 0x13: case 0x14: case 0x15: case 0x16: case 0x17: case 0x18:
case 0x19: case 0x1a: case 0x1b: case 0x1c: case 0x1d: case 0x1e: case 0x1f:
assert(0 && "reserved for r600 architecture");
case 0x27: case 0x32 : case 0x39:
assert(0 && "reserved");
default:
assert(0 && "probabily won't be supported");
assert(0 && "probably won't be supported");
}

break;
Expand Down
5 changes: 3 additions & 2 deletions patchAPI/src/Point.C
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,9 @@ Point::getCallee() {
PatchBlock* b = the_block_;
PatchBlock::edgelist::const_iterator it = b->targets().begin();
for (; it != b->targets().end(); ++it) {
if ((*it)->type() == ParseAPI::CALL) {
PatchBlock* trg = (*it)->trg();
if ((*it)->type() == ParseAPI::CALL ||
((((*it)->type() == ParseAPI::DIRECT || (*it)->type() == ParseAPI::COND_TAKEN)) && (*it)->interproc())) {
PatchBlock* trg = (*it)->trg();
return obj()->getFunc(obj()->co()->findFuncByEntry(trg->block()->region(),
trg->block()->start()));
}
Expand Down
12 changes: 6 additions & 6 deletions symtabAPI/h/Symbol.h
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ class SYMTAB_EXPORT Symbol : public AnnotatableSparse
int getStrIndex() const { return strindex_; }
bool setStrIndex(int strindex) { strindex_ = strindex; return true; }
void setReferringSymbol (Symbol *referringSymbol);
Symbol* getReferringSymbol ();
Symbol* getReferringSymbol () const;

//////////////// Modification
bool setOffset (Offset newOffset);
Expand All @@ -236,17 +236,17 @@ class SYMTAB_EXPORT Symbol : public AnnotatableSparse
bool setVersionNum(unsigned verNum);
void setVersionHidden() { versionHidden_ = true; }

bool getVersionFileName(std::string &fileName);
bool getVersions(std::vector<std::string> *&vers);
bool getVersionNum(unsigned &verNum);
bool getVersionHidden() { return versionHidden_; }
bool getVersionFileName(std::string &fileName) const;
bool getVersions(std::vector<std::string> *&vers) const;
bool getVersionNum(unsigned &verNum) const;
bool getVersionHidden() const { return versionHidden_; }

friend
std::ostream& operator<< (std::ostream &os, const Symbol &s);

public:
static std::string emptyString;
int getInternalType() { return internal_type_; }
int getInternalType() const { return internal_type_; }
void setInternalType(int i) { internal_type_ = i; }

private:
Expand Down
7 changes: 4 additions & 3 deletions symtabAPI/src/Symbol.C
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ SYMTAB_EXPORT bool Symbol::setVersions(std::vector<std::string> &vers)
return true;
}

SYMTAB_EXPORT bool Symbol::getVersionFileName(std::string &fileName)
SYMTAB_EXPORT bool Symbol::getVersionFileName(std::string &fileName) const
{
std::string *fn_p = NULL;

Expand All @@ -224,7 +224,7 @@ SYMTAB_EXPORT bool Symbol::getVersionFileName(std::string &fileName)
return false;
}

SYMTAB_EXPORT bool Symbol::getVersions(std::vector<std::string> *&vers)
SYMTAB_EXPORT bool Symbol::getVersions(std::vector<std::string> *&vers) const
{
std::vector<std::string> *vn_p = NULL;

Expand Down Expand Up @@ -409,7 +409,8 @@ void Symbol::setReferringSymbol(Symbol* referringSymbol)
referring_= referringSymbol;
}

Symbol* Symbol::getReferringSymbol() {
Symbol* Symbol::getReferringSymbol() const
{
return referring_;
}

0 comments on commit f89ff36

Please sign in to comment.