Skip to content

Commit

Permalink
macho-engine: Add cassert, format code
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonKagstrom committed Oct 14, 2023
1 parent 90a41d1 commit 4efe5e4
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/engines/mach-engine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,11 @@
#include <sys/types.h>
#include <sys/ptrace.h>
// clang-format on
#include <cassert>
#include <iostream>
#include <unistd.h>
#include <unordered_map>
#include <utils.hh>
#include <iostream>

using namespace kcov;
extern char** environ;
Expand Down Expand Up @@ -287,7 +288,8 @@ class MachEngine : public IEngine
return false;
}

if (!conf.keyAsInt("is-go-binary")) {
if (!conf.keyAsInt("is-go-binary"))
{
m_imageBase = findImageAddress();
}

Expand Down Expand Up @@ -502,7 +504,9 @@ class MachEngine : public IEngine
auto kr = vm_read_overwrite(m_task, patch_addr, sizeof(val), (vm_offset_t)&val, &size);
if (kr != KERN_SUCCESS)
{
panic("vm_read_overwrite failed for peekWord for addr 0x%llx, msg: %s", patch_addr, mach_error_string(kr));
panic("vm_read_overwrite failed for peekWord for addr 0x%llx, msg: %s",
patch_addr,
mach_error_string(kr));
return 0;
}

Expand Down

0 comments on commit 4efe5e4

Please sign in to comment.