Pinpoint plugin stage 1 pin rename
This commit is contained in:
parent
7d1b68d8ed
commit
6f95a9cd0b
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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>" */
|
||||||
|
|||||||
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user