void _initialize_amd64fbsd_nat (void) { struct target_ops *t; int offset; amd64_native_gregset32_reg_offset = amd64fbsd32_r_reg_offset; amd64_native_gregset64_reg_offset = amd64fbsd64_r_reg_offset; /* Add some extra features to the common *BSD/i386 target. */ t = amd64bsd_target (); #ifdef HAVE_PT_GETDBREGS i386_use_watchpoints (t); i386_dr_low.set_control = amd64bsd_dr_set_control; i386_dr_low.set_addr = amd64bsd_dr_set_addr; i386_dr_low.get_addr = amd64bsd_dr_get_addr; i386_dr_low.get_status = amd64bsd_dr_get_status; i386_dr_low.get_control = amd64bsd_dr_get_control; i386_set_debug_register_length (8); #endif /* HAVE_PT_GETDBREGS */ t->to_pid_to_exec_file = fbsd_pid_to_exec_file; t->to_find_memory_regions = fbsd_find_memory_regions; t->to_make_corefile_notes = fbsd_make_corefile_notes; add_target (t); /* Support debugging kernel virtual memory images. */ bsd_kvm_add_target (amd64fbsd_supply_pcb); /* To support the recognition of signal handlers, i386bsd-tdep.c hardcodes some constants. Inclusion of this file means that we are compiling a native debugger, which means that we can use the system header files and sysctl(3) to get at the relevant information. */ #define SC_REG_OFFSET amd64fbsd_sc_reg_offset /* We only check the program counter, stack pointer and frame pointer since these members of `struct sigcontext' are essential for providing backtraces. */ #define SC_RIP_OFFSET SC_REG_OFFSET[AMD64_RIP_REGNUM] #define SC_RSP_OFFSET SC_REG_OFFSET[AMD64_RSP_REGNUM] #define SC_RBP_OFFSET SC_REG_OFFSET[AMD64_RBP_REGNUM] /* Override the default value for the offset of the program counter in the sigcontext structure. */ offset = offsetof (struct sigcontext, sc_rip); if (SC_RIP_OFFSET != offset) { warning (_("\ offsetof (struct sigcontext, sc_rip) yields %d instead of %d.\n\ Please report this to <*****@*****.**>."), offset, SC_RIP_OFFSET); }
void _initialize_amd64nbsd_nat (void) { amd64_native_gregset32_reg_offset = amd64nbsd32_r_reg_offset; amd64_native_gregset32_num_regs = ARRAY_SIZE (amd64nbsd32_r_reg_offset); amd64_native_gregset64_reg_offset = amd64nbsd_r_reg_offset; /* We've got nothing to add to the common *BSD/amd64 target. */ add_target (amd64bsd_target ()); }
void _initialize_amd64obsd_nat (void) { amd64_native_gregset32_reg_offset = amd64obsd32_r_reg_offset; amd64_native_gregset32_num_regs = ARRAY_SIZE (amd64obsd32_r_reg_offset); amd64_native_gregset64_reg_offset = amd64obsd_r_reg_offset; /* We've got nothing to add to the common *BSD/amd64 target. */ add_target (amd64bsd_target ()); /* Support debugging kernel virtual memory images. */ bsd_kvm_add_target (amd64obsd_supply_pcb); }
void _initialize_amd64nbsd_nat (void) { struct target_ops *t; amd64_native_gregset32_reg_offset = amd64nbsd32_r_reg_offset; amd64_native_gregset32_num_regs = ARRAY_SIZE (amd64nbsd32_r_reg_offset); amd64_native_gregset64_reg_offset = amd64nbsd_r_reg_offset; /* Add some extra features to the common *BSD/amd64 target. */ t = amd64bsd_target (); t->to_pid_to_exec_file = nbsd_pid_to_exec_file; add_target (t); }
void _initialize_amd64dfly_nat (void) { struct target_ops *t; int offset; amd64_native_gregset32_reg_offset = amd64dfly32_r_reg_offset; amd64_native_gregset64_reg_offset = amd64dfly64_r_reg_offset; /* Add some extra features to the common *BSD/x86 target. */ t = amd64bsd_target (); t->to_read_description = amd64fbsd_read_description; dfly_nat_add_target (t); #ifdef DFLY_PCB_SUPPLY /* Support debugging kernel virtual memory images. */ bsd_kvm_add_target (amd64dfly_supply_pcb); #endif /* To support the recognition of signal handlers, i386bsd-tdep.c hardcodes some constants. Inclusion of this file means that we are compiling a native debugger, which means that we can use the system header files and sysctl(3) to get at the relevant information. */ #define SC_REG_OFFSET amd64dfly_sc_reg_offset /* We only check the program counter, stack pointer and frame pointer since these members of `struct sigcontext' are essential for providing backtraces. */ #define SC_RIP_OFFSET SC_REG_OFFSET[AMD64_RIP_REGNUM] #define SC_RSP_OFFSET SC_REG_OFFSET[AMD64_RSP_REGNUM] #define SC_RBP_OFFSET SC_REG_OFFSET[AMD64_RBP_REGNUM] /* Override the default value for the offset of the program counter in the sigcontext structure. */ offset = offsetof (struct sigcontext, sc_rip); if (SC_RIP_OFFSET != offset) { warning (_("\ offsetof (struct sigcontext, sc_rip) yields %d instead of %d.\n\ Please report this to <*****@*****.**>."), offset, SC_RIP_OFFSET); }