Skip to content

Commit

Permalink
Fix clang build
Browse files Browse the repository at this point in the history
  • Loading branch information
peadar committed Sep 11, 2023
1 parent e8079e2 commit dcc8ff9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ message(STATUS "Version: ${VERSION_TAG}")
add_definitions("-DVERSION=${VERSION_TAG}")

set(CMAKE_CXX_STANDARD 17)
add_definitions("-std=c++17") # the above does not work for clang.
set(CMAKE_CXX_EXTENSIONS ON)

add_definitions("-Wall -Wextra -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE")
# Adding frame pointers makes things easy to run performance measurements with,
Expand Down
2 changes: 0 additions & 2 deletions dump.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#endif

using namespace pstack;
namespace {
struct DumpCFAInsns {
Elf::Off start;
Elf::Off end;
Expand Down Expand Up @@ -207,7 +206,6 @@ dumpCFAInsn(std::ostream &os, Dwarf::DWARFReader *r)
throw (Exception() << "unknown CFA op " << std::hex << int(op)) << std::dec;
}
}
}

template <typename C>
static std::ostream &
Expand Down
5 changes: 3 additions & 2 deletions libpstack/proc.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ class StackFrame {
UnwindMechanism mechanism;
bool isSignalTrampoline;
StackFrame(UnwindMechanism mechanism, const Elf::CoreRegisters &regs);
StackFrame &operator = (const StackFrame &) = delete;
StackFrame &operator = (const StackFrame &) = default;
StackFrame(const StackFrame &) = default;
std::optional<Elf::CoreRegisters> unwind(Process &);
void setCoreRegs(const Elf::CoreRegisters &);
void getCoreRegs(Elf::CoreRegisters &) const;
Expand Down Expand Up @@ -299,7 +300,7 @@ class SelfProcess : public Process {
virtual Reader::csptr getAUXV() const override;
virtual pid_t getPID() const override;
protected:
virtual Elf::Addr findRDebugAddr();
virtual Elf::Addr findRDebugAddr() override;
bool loadSharedObjectsFromFileNote() override;
std::vector<AddressRange> addressSpace() const override;
};
Expand Down

0 comments on commit dcc8ff9

Please sign in to comment.