Lines Matching refs:text

86     uint8_t *text, fasttrap_probe_spec_t *ftp, const GElf_Sym *symp)  in dt_pid_has_jump_table()  argument
104 size = dt_instr_size(&text[i], dtp, pid, symp->st_value + i, in dt_pid_has_jump_table()
121 if ((text[i] == 0xff && DT_MODRM_REG(text[i + 1]) == 4) || in dt_pid_has_jump_table()
122 (dmodel == PR_MODEL_LP64 && (text[i] & 0xf0) == 0x40 && in dt_pid_has_jump_table()
123 text[i + 1] == 0xff && DT_MODRM_REG(text[i + 2]) == 4)) { in dt_pid_has_jump_table()
139 uint8_t *text; in dt_pid_create_return_probe() local
154 if ((text = calloc(1, symp->st_size + 4)) == NULL) { in dt_pid_create_return_probe()
159 if (Pread(P, text, symp->st_size, symp->st_value) != symp->st_size) { in dt_pid_create_return_probe()
161 free(text); in dt_pid_create_return_probe()
183 if (dt_pid_has_jump_table(P, dtp, text, ftp, symp)) { in dt_pid_create_return_probe()
185 size = dt_instr_size(&text[i], dtp, pid, in dt_pid_create_return_probe()
192 if (text[i] == DT_LEAVE && text[i + 1] == DT_RET) { in dt_pid_create_return_probe()
196 } else if (text[i] == DT_LEAVE && in dt_pid_create_return_probe()
197 text[i + 1] == DT_REP && text[i + 2] == DT_RET) { in dt_pid_create_return_probe()
201 } else if (*(uint16_t *)&text[i] == DT_MOVL_EBP_ESP && in dt_pid_create_return_probe()
202 text[i + 2] == DT_POPL_EBP && in dt_pid_create_return_probe()
203 text[i + 3] == DT_RET) { in dt_pid_create_return_probe()
207 } else if (*(uint16_t *)&text[i] == DT_MOVL_EBP_ESP && in dt_pid_create_return_probe()
208 text[i + 2] == DT_POPL_EBP && in dt_pid_create_return_probe()
209 text[i + 3] == DT_REP && in dt_pid_create_return_probe()
210 text[i + 4] == DT_RET) { in dt_pid_create_return_probe()
218 size = dt_instr_size(&text[i], dtp, pid, in dt_pid_create_return_probe()
226 if (size == 1 && text[i] == DT_RET) in dt_pid_create_return_probe()
230 if (size == 2 && text[i] == DT_REP && in dt_pid_create_return_probe()
231 text[i + 1] == DT_RET) in dt_pid_create_return_probe()
235 if (size == 3 && text[i] == DT_RET16) in dt_pid_create_return_probe()
239 if (size == 4 && text[i] == DT_REP && in dt_pid_create_return_probe()
240 text[i + 1] == DT_RET16) in dt_pid_create_return_probe()
244 if (size == 5 && text[i] == DT_JMP32 && symp->st_size <= in dt_pid_create_return_probe()
245 (uintptr_t)(i + size + *(int32_t *)&text[i + 1])) in dt_pid_create_return_probe()
249 if (size == 2 && text[i] == DT_JMP8 && symp->st_size <= in dt_pid_create_return_probe()
250 (uintptr_t)(i + size + *(int8_t *)&text[i + 1])) in dt_pid_create_return_probe()
254 if (size == 6 && DT_ISJ32(*(uint16_t *)&text[i]) && in dt_pid_create_return_probe()
256 (uintptr_t)(i + size + *(int32_t *)&text[i + 2])) in dt_pid_create_return_probe()
260 if (size == 2 && DT_ISJ8(text[i]) && symp->st_size <= in dt_pid_create_return_probe()
261 (uintptr_t)(i + size + *(int8_t *)&text[i + 1])) in dt_pid_create_return_probe()
271 free(text); in dt_pid_create_return_probe()
296 uint8_t *text; in dt_pid_create_offset_probe() local
307 if ((text = malloc(symp->st_size)) == NULL) { in dt_pid_create_offset_probe()
312 if (Pread(P, text, symp->st_size, symp->st_value) != in dt_pid_create_offset_probe()
315 free(text); in dt_pid_create_offset_probe()
324 if (dt_pid_has_jump_table(P, dtp, text, ftp, symp)) { in dt_pid_create_offset_probe()
325 free(text); in dt_pid_create_offset_probe()
341 free(text); in dt_pid_create_offset_probe()
345 size = dt_instr_size(&text[i], dtp, pid, in dt_pid_create_offset_probe()
353 free(text); in dt_pid_create_offset_probe()
358 free(text); in dt_pid_create_offset_probe()
375 uint8_t *text; in dt_pid_create_glob_offset_probes() local
391 if ((text = malloc(symp->st_size)) == NULL) { in dt_pid_create_glob_offset_probes()
396 if (Pread(P, text, symp->st_size, symp->st_value) != symp->st_size) { in dt_pid_create_glob_offset_probes()
398 free(text); in dt_pid_create_glob_offset_probes()
406 if (dt_pid_has_jump_table(P, dtp, text, ftp, symp)) { in dt_pid_create_glob_offset_probes()
407 free(text); in dt_pid_create_glob_offset_probes()
415 size = dt_instr_size(&text[i], dtp, pid, in dt_pid_create_glob_offset_probes()
430 size = dt_instr_size(&text[i], dtp, pid, in dt_pid_create_glob_offset_probes()
439 free(text); in dt_pid_create_glob_offset_probes()