MCPcopy Create free account
hub / github.com/MJx0/KittyMemoryEx / seize

Method seize

KittyMemoryEx/KittyTrace.cpp:39–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37}
38
39bool KittyTraceMgr::seize(int options)
40{
41 if (_pid <= 0)
42 return false;
43
44 if (isAttached())
45 {
46 _attached = true;
47 return true;
48 }
49
50 errno = 0;
51 if (ptrace(PTRACE_SEIZE, _pid, nullptr, options) == -1L)
52 {
53 KITTY_LOGE("PTRACE_SEIZE failed for pid %d. \"%s\".", _pid, strerror(errno));
54 return false;
55 }
56
57 _seized = true;
58 _attached = true;
59
60 return true;
61}
62
63bool KittyTraceMgr::setOptions(int options)
64{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected