Fix: add 4096 (page size) to calculated offset
This was missing in prior versions, causing unexpected behavior as the
offset passed to create the uprobe was not at the start of the expected
method.
Bug: 296108553
Test: `hello_uprobestats -t -n test_cm_addCall` (and make a phone call)
Change-Id: I598a2312a9a9e5ee2d156934305e3af203268273
diff --git a/src/UprobeStats.cpp b/src/UprobeStats.cpp
index 6bc2d51..a736ea6 100644
--- a/src/UprobeStats.cpp
+++ b/src/UprobeStats.cpp
@@ -81,7 +81,7 @@
int offset;
std::istringstream stream(hex_string);
stream >> std::hex >> offset;
- return offset;
+ return offset + 4096;
}
}
}