Skip to content

Commit

Permalink
libdrgn: stack_trace: don't bother masking address before reading memory
Browse files Browse the repository at this point in the history
drgn_program_read_memory() already takes care of masking the address.

Signed-off-by: Omar Sandoval <osandov@osandov.com>
  • Loading branch information
osandov committed Oct 6, 2023
1 parent e91fcbe commit 31bb9c0
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion libdrgn/stack_trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -933,7 +933,6 @@ drgn_unwind_one_register(struct drgn_program *prog, struct drgn_elf_file *file,
little_endian);
if (rule->kind == DRGN_CFI_RULE_AT_REGISTER_PLUS_OFFSET)
address += rule->offset;
address &= drgn_platform_address_mask(&prog->platform);
err = drgn_program_read_memory(prog, buf, address, size, false);
if (!err && rule->kind == DRGN_CFI_RULE_AT_REGISTER_ADD_OFFSET) {
drgn_add_to_register(buf, size, buf, size, rule->offset,
Expand Down

0 comments on commit 31bb9c0

Please sign in to comment.