Pinpoint plugin stage 1 pin rename

This commit is contained in:
York Jasper Niebuhr 2025-10-26 13:39:41 +01:00
parent 7d1b68d8ed
commit 6f95a9cd0b
3 changed files with 5 additions and 5 deletions

View File

@ -28,7 +28,7 @@ void on_finish_unit(void* plugin_data, void* user_data) {
} }
for (const auto& [uid, ipin] : S1InstructionPin::all()) { for (const auto& [uid, ipin] : S1InstructionPin::all()) {
std::cout << " Instruction pin at symbol \"" << SPSLR_PINPOINT_STAGE1_SEPARATOR std::cout << " Instruction pin at symbol \"" << SPSLR_PINPOINT_STAGE1_PIN
<< "_" << uid << "\" -> target " << ipin.target << ", offset " << ipin.offset << std::endl; << uid << "\" -> target " << ipin.target << ", offset " << ipin.offset << std::endl;
} }
} }

View File

@ -2,4 +2,4 @@
#define SPSLR_ATTRIBUTE "spslr" #define SPSLR_ATTRIBUTE "spslr"
#define SPSLR_PINPOINT_STAGE0_SEPARATOR "__spslr_offsetof" #define SPSLR_PINPOINT_STAGE0_SEPARATOR "__spslr_offsetof"
#define SPSLR_PINPOINT_STAGE1_SEPARATOR "__spslr_pin" /* suffixed with "_<uid>" */ #define SPSLR_PINPOINT_STAGE1_PIN "__spslr_ipin_" /* suffixed with "<uid>" */

View File

@ -19,13 +19,13 @@ void S1InstructionPin::reset() {
static char asm_str_buf[1024]; static char asm_str_buf[1024];
static const char* make_asm_noarch(UID uid) { static const char* make_asm_noarch(UID uid) {
snprintf(asm_str_buf, sizeof(asm_str_buf), SPSLR_PINPOINT_STAGE1_SEPARATOR "_%lu:", uid); snprintf(asm_str_buf, sizeof(asm_str_buf), SPSLR_PINPOINT_STAGE1_PIN "%lu:", uid);
return nullptr; return nullptr;
} }
static const char* make_asm_x86_64(UID uid) { static const char* make_asm_x86_64(UID uid) {
// Asm has 1 output (%0) and 2 inputs for target (%1) and offset (%2) // Asm has 1 output (%0) and 2 inputs for target (%1) and offset (%2)
snprintf(asm_str_buf, sizeof(asm_str_buf), SPSLR_PINPOINT_STAGE1_SEPARATOR "_%lu: mov %2, %0", uid); snprintf(asm_str_buf, sizeof(asm_str_buf), SPSLR_PINPOINT_STAGE1_PIN "%lu: mov %2, %0", uid);
return asm_str_buf; return asm_str_buf;
} }