Skip to content

Commit

Permalink
whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
roachspray committed Aug 12, 2020
1 parent 3dabe21 commit 571df5d
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 36 deletions.
62 changes: 31 additions & 31 deletions cpp/SnapFork.cc
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
extern "C" {
#include <sys/wait.h>
#include <sys/ptrace.h>
#include <sys/user.h>
#include <sys/personality.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
}
#include <memory>
#include <vector>
#include <list>
#include <queue>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <iostream>
#include <fstream>
#include <chrono>
#include <random>
#include <cassert>
#include <sstream>
#include "SnapStuff.h"
#include "SnapDisassem.h"
#include "SnapUtil.h"
#include "SnapFork.h"
extern "C" {
#include <sys/wait.h>
#include <sys/ptrace.h>
#include <sys/user.h>
#include <sys/personality.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
}

#include <memory>
#include <vector>
#include <list>
#include <queue>

#include <cstdio>
#include <cstring>
#include <ctime>
#include <iostream>
#include <fstream>
#include <chrono>
#include <random>
#include <cassert>
#include <sstream>

#include "SnapStuff.h"
#include "SnapDisassem.h"
#include "SnapUtil.h"
#include "SnapFork.h"

void
SnapForkDumper::runParent(SnapContext &sCtx)
Expand Down Expand Up @@ -103,7 +103,7 @@ SnapForkDumper::runParent(SnapContext &sCtx)
kill(pid, SIGKILL);
std::exit(0);
} else {
IPRNT("Wrote snapshot to disk and continuing child process\n");
IPRNT("Wrote snapshot to disk and continuing child process\n");
}

if (ptrace(PTRACE_SETREGS, pid, 0, &regs) == -1) {
Expand Down Expand Up @@ -143,7 +143,7 @@ SnapForkReplayer::runParent(SnapContext &sCtx)
IPRNT("!WIFSTOPPED\n");
break;
}

if (ptrace(PTRACE_GETREGS, pid, 0, &regs) == -1) {
std::perror("ptrace(GETREGS)");
kill(pid, SIGKILL);
Expand Down
4 changes: 2 additions & 2 deletions cpp/SnapStuff.cc
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ SnapContext::writeProcMaps()
unsigned i = 0;

assert(this->entries.size() > 0 && "writeProcMaps: entries.size == 0");
struct iovec *src = new struct iovec[this->entries.size()];
struct iovec *dst = new struct iovec[this->entries.size()];
struct iovec *src = new struct iovec[this->entries.size()];
struct iovec *dst = new struct iovec[this->entries.size()];

for (auto &mp : this->entries) {
src[i].iov_base = mp->me_data;
Expand Down
6 changes: 3 additions & 3 deletions cpp/SnapStuff.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ struct ProcMapsEntry {
hma_t me_to;
char me_flags[5];
hma_t me_offset;
unsigned me_major;
unsigned me_major;
unsigned me_minor;
hma_t me_inode;
hma_t me_inode;
char me_name[256];
char *me_data;

Expand Down Expand Up @@ -100,7 +100,7 @@ class SnapContext {
// not sure i want this here.
pid_t pid;
std::string outputdir;

SnapContext(std::string _outdir) : outputdir(_outdir), pid(0) {
xed_tables_init();

Expand Down

0 comments on commit 571df5d

Please sign in to comment.