This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] Debug info detection.


For now I have...

const struct frame_unwind *
x86_64_frame_p (CORE_ADDR pc)
{
  struct frame_unwind *unwind_cfi = NULL;
  struct frame_unwind *unwind_asm = &x86_64_asm_frame_unwind;
  struct frame_unwind *unwind_sigtramp = &x86_64_sigtramp_frame_unwind;
  char *name;

  find_pc_partial_function (pc, &name, NULL, NULL);
  if (gdbarch_pc_in_sigtramp (current_gdbarch, pc, name))
    return unwind_sigtramp;
  else if (cfi_have_unwind_info (pc))
    return unwind_cfi;   /* Returns NULL here...  */
  else
    return unwind_asm;
}

The function x86-64-tdep.c:x86_64_frame_p() should contain: return x86_64_unwind;

The file/function dwarf2cfi-frame.c:dwarf2cfi_frame_p() should contain:
	if (cfi_have_unwind_info (pc))
	     return dwarf2cfi_unwind;

(Assuming sigtramps are os specific) The file/function x86-64-linux-tdep.c:x86_64_linux_sigtramp_frame_p() should contain:
> if (gdbarch_pc_in_sigtramp (current_gdbarch, pc, name))
> return x86_64_linux_sigtramp_unwind;


Andrew



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]