Skip to content

Commit 6e9fbdb

Browse files
committed
Fixes for aarch64/i386
1 parent 86db757 commit 6e9fbdb

3 files changed

Lines changed: 2 additions & 4 deletions

File tree

libpstack/arch.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,7 @@ using DwarfNames = std::vector<std::pair<int, std::string_view>>;
120120
// "general" registers.
121121
using ArchRegs = std::unordered_map<std::string_view, DwarfNames>;
122122

123-
#ifndef __aarch64__
124123
void gregset2user(user_regs_struct &core, const gregset_t greg);
125-
#endif
126124

127125
struct Get {
128126
template <typename T> using Val = T;

process.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include <iostream>
99
#include <limits>
1010
#include <set>
11-
#include <sys/ucontext.h>
11+
#include <ucontext.h>
1212
#include <sys/wait.h>
1313
#include <csignal>
1414
#include <sys/signal.h>

reader.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ AbstractMemReader::read(Off off, size_t count, char *ptr) const
6969
{
7070
if (off > Off(size()))
7171
throw (Exception() << "read past end of memory");
72-
size_t rc = std::min(count, size() - size_t(off));
72+
size_t rc = std::min(count, size_t(size()) - size_t(off));
7373
memcpy(ptr, ptroff(data(), off), rc);
7474
return rc;
7575
}

0 commit comments

Comments
 (0)