Lines Matching refs:text

81     uint8_t *text, fasttrap_probe_spec_t *ftp, const GElf_Sym *symp)  in dt_pid_has_jump_table()  argument
94 size = dt_instr_size(&text[i], dtp, pid, symp->st_value + i, in dt_pid_has_jump_table()
110 if ((text[i] == 0xff && DT_MODRM_REG(text[i + 1]) == 4) || in dt_pid_has_jump_table()
111 (dmodel == PR_MODEL_LP64 && (text[i] & 0xf0) == 0x40 && in dt_pid_has_jump_table()
112 text[i + 1] == 0xff && DT_MODRM_REG(text[i + 2]) == 4)) { in dt_pid_has_jump_table()
127 uint8_t *text; in dt_pid_create_return_probe() local
137 if ((text = calloc(1, symp->st_size + 4)) == NULL) { in dt_pid_create_return_probe()
142 if (Pread(P, text, symp->st_size, symp->st_value) != symp->st_size) { in dt_pid_create_return_probe()
144 free(text); in dt_pid_create_return_probe()
166 if (dt_pid_has_jump_table(P, dtp, text, ftp, symp)) { in dt_pid_create_return_probe()
168 size = dt_instr_size(&text[i], dtp, pid, in dt_pid_create_return_probe()
175 if (text[i] == DT_LEAVE && text[i + 1] == DT_RET) { in dt_pid_create_return_probe()
179 } else if (text[i] == DT_LEAVE && in dt_pid_create_return_probe()
180 text[i + 1] == DT_REP && text[i + 2] == DT_RET) { in dt_pid_create_return_probe()
184 } else if (*(uint16_t *)&text[i] == DT_MOVL_EBP_ESP && in dt_pid_create_return_probe()
185 text[i + 2] == DT_POPL_EBP && in dt_pid_create_return_probe()
186 text[i + 3] == DT_RET) { in dt_pid_create_return_probe()
190 } else if (*(uint16_t *)&text[i] == DT_MOVL_EBP_ESP && in dt_pid_create_return_probe()
191 text[i + 2] == DT_POPL_EBP && in dt_pid_create_return_probe()
192 text[i + 3] == DT_REP && in dt_pid_create_return_probe()
193 text[i + 4] == DT_RET) { in dt_pid_create_return_probe()
201 size = dt_instr_size(&text[i], dtp, pid, in dt_pid_create_return_probe()
209 if (size == 1 && text[i] == DT_RET) in dt_pid_create_return_probe()
213 if (size == 2 && text[i] == DT_REP && in dt_pid_create_return_probe()
214 text[i + 1] == DT_RET) in dt_pid_create_return_probe()
218 if (size == 3 && text[i] == DT_RET16) in dt_pid_create_return_probe()
222 if (size == 4 && text[i] == DT_REP && in dt_pid_create_return_probe()
223 text[i + 1] == DT_RET16) in dt_pid_create_return_probe()
227 if (size == 5 && text[i] == DT_JMP32 && symp->st_size <= in dt_pid_create_return_probe()
228 (uintptr_t)(i + size + *(int32_t *)&text[i + 1])) in dt_pid_create_return_probe()
232 if (size == 2 && text[i] == DT_JMP8 && symp->st_size <= in dt_pid_create_return_probe()
233 (uintptr_t)(i + size + *(int8_t *)&text[i + 1])) in dt_pid_create_return_probe()
237 if (size == 6 && DT_ISJ32(*(uint16_t *)&text[i]) && in dt_pid_create_return_probe()
239 (uintptr_t)(i + size + *(int32_t *)&text[i + 2])) in dt_pid_create_return_probe()
243 if (size == 2 && DT_ISJ8(text[i]) && symp->st_size <= in dt_pid_create_return_probe()
244 (uintptr_t)(i + size + *(int8_t *)&text[i + 1])) in dt_pid_create_return_probe()
254 free(text); in dt_pid_create_return_probe()
279 uint8_t *text; in dt_pid_create_offset_probe() local
285 if ((text = malloc(symp->st_size)) == NULL) { in dt_pid_create_offset_probe()
290 if (Pread(P, text, symp->st_size, symp->st_value) != in dt_pid_create_offset_probe()
293 free(text); in dt_pid_create_offset_probe()
302 if (dt_pid_has_jump_table(P, dtp, text, ftp, symp)) { in dt_pid_create_offset_probe()
303 free(text); in dt_pid_create_offset_probe()
319 free(text); in dt_pid_create_offset_probe()
323 size = dt_instr_size(&text[i], dtp, pid, in dt_pid_create_offset_probe()
331 free(text); in dt_pid_create_offset_probe()
336 free(text); in dt_pid_create_offset_probe()
353 uint8_t *text; in dt_pid_create_glob_offset_probes() local
364 if ((text = malloc(symp->st_size)) == NULL) { in dt_pid_create_glob_offset_probes()
369 if (Pread(P, text, symp->st_size, symp->st_value) != symp->st_size) { in dt_pid_create_glob_offset_probes()
371 free(text); in dt_pid_create_glob_offset_probes()
379 if (dt_pid_has_jump_table(P, dtp, text, ftp, symp)) { in dt_pid_create_glob_offset_probes()
380 free(text); in dt_pid_create_glob_offset_probes()
388 size = dt_instr_size(&text[i], dtp, pid, in dt_pid_create_glob_offset_probes()
403 size = dt_instr_size(&text[i], dtp, pid, in dt_pid_create_glob_offset_probes()
412 free(text); in dt_pid_create_glob_offset_probes()