8000 How to get the instruction address in ELF from backtrace? · Issue #1068 · frida/frida-gum · GitHub
[go: up one dir, main page]

Skip to content

How to get the instruction address in ELF from backtrace? #1068

Open

Description

@Mech0n

When I use this function to retrieve the backtrace, I only obtain the instrumented addresses.

void print_bt() {
	void* frames[10];
	int num_frames = backtrace_aarch64(frames, 10);

	for (int i = 0; i < num_frames; i++) {
		gchar *symbol_name = gum_symbol_name_from_address(frames[i]);
		printf("  #%d: 0x%p, %s\n", i, frames[i], symbol_name);
	}
}

like this:

  #0: 0x0xfffff6fa9e48, print_bt
  #2: 0x0xfffff6feaf90, gum_stalker_invoke_callout
  #3: 0x0xfffff31653dc, (null)
  #4: 0x0xfffff6fad13c, on_main
  #5: 0x0xfffff6d5610c, (null)
  #6: 0x0xfffff6fad1e0, on_libc_start_main
  #7: 0x0xfffff6d5600c, (null)

How can I translate 0x0xfffff31653dc to the origin address in ELF ? maybe a API to access the GumExecFrame ?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0