@@ -1088,7 +1088,7 @@ static void text_poke_bp_batch(struct text_poke_loc *tp, unsigned int nr_entries
1088
1088
* First step: add a int3 trap to the address that will be patched.
1089
1089
*/
1090
1090
for (i = 0 ; i < nr_entries ; i ++ )
1091
- text_poke (text_poke_addr (& tp [i ]), & int3 , sizeof ( int3 ) );
1091
+ text_poke (text_poke_addr (& tp [i ]), & int3 , INT3_INSN_SIZE );
1092
1092
1093
1093
text_poke_sync ();
1094
1094
@@ -1098,10 +1098,10 @@ static void text_poke_bp_batch(struct text_poke_loc *tp, unsigned int nr_entries
1098
1098
for (do_sync = 0 , i = 0 ; i < nr_entries ; i ++ ) {
1099
1099
int len = text_opcode_size (tp [i ].opcode );
1100
1100
1101
- if (len - sizeof ( int3 ) > 0 ) {
1102
- text_poke (text_poke_addr (& tp [i ]) + sizeof ( int3 ) ,
1103
- (const char * )tp [i ].text + sizeof ( int3 ) ,
1104
- len - sizeof ( int3 ) );
1101
+ if (len - INT3_INSN_SIZE > 0 ) {
1102
+ text_poke (text_poke_addr (& tp [i ]) + INT3_INSN_SIZE ,
1103
+ (const char * )tp [i ].text + INT3_INSN_SIZE ,
1104
+ len - INT3_INSN_SIZE );
1105
1105
do_sync ++ ;
1106
1106
}
1107
1107
}
@@ -1123,7 +1123,7 @@ static void text_poke_bp_batch(struct text_poke_loc *tp, unsigned int nr_entries
1123
1123
if (tp [i ].text [0 ] == INT3_INSN_OPCODE )
1124
1124
continue ;
1125
1125
1126
- text_poke (text_poke_addr (& tp [i ]), tp [i ].text , sizeof ( int3 ) );
1126
+ text_poke (text_poke_addr (& tp [i ]), tp [i ].text , INT3_INSN_SIZE );
1127
1127
do_sync ++ ;
1128
1128
}
1129
1129
0 commit comments