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

Method _parseMapsLine

KittyMemoryEx/KittyPtrValidator.cpp:118–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116#else
117
118bool KittyPtrValidator::_parseMapsLine(const char *line, RegionInfo *region)
119{
120 if (!line || *line == '\0')
121 return false;
122
123 char *endPtr;
124 uintptr_t start = (uintptr_t)strtoull(line, &endPtr, 16);
125 if (*endPtr != '-')
126 return false;
127
128 uintptr_t end = (uintptr_t)strtoull(endPtr + 1, &endPtr, 16);
129
130 while (*endPtr == ' ')
131 endPtr++;
132
133 if (!endPtr[0] || !endPtr[1] || !endPtr[2])
134 return false;
135
136 *region = RegionInfo(start, end, endPtr[0] == 'r', endPtr[1] == 'w', endPtr[2] == 'x');
137 return true;
138}
139
140bool KittyPtrValidator::_findRegion(uintptr_t addr, RegionInfo *out)
141{

Callers

nothing calls this directly

Calls 1

RegionInfoClass · 0.85

Tested by

no test coverage detected