Skip to content

Commit 86db757

Browse files
committed
remove "final" qualifiers from {Core,Live}Process
1 parent fbceb62 commit 86db757

2 files changed

Lines changed: 10 additions & 3 deletions

File tree

libpstack/proc.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ class LiveReader : public FileReader {
346346
};
347347

348348
struct LiveThreadList;
349-
class LiveProcess final : public Process {
349+
class LiveProcess : public Process {
350350
pid_t pid;
351351

352352
struct Lwp {
@@ -358,6 +358,7 @@ class LiveProcess final : public Process {
358358
public:
359359
// attach to existing process.
360360
LiveProcess(Context &, Elf::Object::sptr &, pid_t, bool alreadyStopped=false);
361+
LiveProcess(Context &, Elf::Object::sptr &, pid_t, Reader::sptr memory, bool alreadyStopped=false);
361362
LiveProcess(const LiveProcess &) = delete;
362363
LiveProcess(LiveProcess &&) = delete;
363364
LiveProcess &operator = (const LiveProcess &) = delete;
@@ -414,7 +415,7 @@ class CoreReader final : public Reader {
414415
std::string filename() const override { return "process memory"; }
415416
};
416417

417-
class CoreProcess final : public Process {
418+
class CoreProcess : public Process {
418419
std::vector<Elf::NoteDesc> notes;
419420
std::map<lwpid_t, size_t> lwpToPrStatusIdx;
420421
prpsinfo_t prpsinfo;

live.cc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,19 @@ LiveProcess::executableImage() {
2727
}
2828

2929
LiveProcess::LiveProcess(Context &context, Elf::Object::sptr &ex, pid_t pid_, bool alreadyStopped)
30-
: Process( context, ex, std::make_shared<CacheReader>(std::make_shared<LiveReader>(context, pid_, "mem")))
30+
: LiveProcess(context, ex, pid_, std::make_shared<CacheReader>(std::make_shared<LiveReader>(context, pid_, "mem")), alreadyStopped)
31+
{
32+
}
33+
34+
LiveProcess::LiveProcess(Context &context, Elf::Object::sptr &ex, pid_t pid_, Reader::sptr memory, bool alreadyStopped)
35+
: Process( context, ex, memory )
3136
, pid(pid_)
3237
{
3338
if (alreadyStopped)
3439
stoppedLWPs[pid].stopCount = 1;
3540
}
3641

42+
3743
Reader::csptr LiveProcess::getAUXV() const {
3844
return std::make_shared<LiveReader>(context, pid, "auxv");
3945
}

0 commit comments

Comments
 (0)