Changeset View
Changeset View
Standalone View
Standalone View
devel/gdb/files/kgdb/i386fbsd-kern.c
Show All 18 Lines | |||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||||
*/ | */ | ||||
#include <sys/cdefs.h> | |||||
#include "defs.h" | #include "defs.h" | ||||
#include "frame-unwind.h" | #include "frame-unwind.h" | ||||
#include "gdbcore.h" | #include "gdbcore.h" | ||||
#include "inferior.h" | #include "inferior.h" | ||||
#include "osabi.h" | #include "osabi.h" | ||||
#include "regcache.h" | #include "regcache.h" | ||||
#include "progspace.h" | #include "progspace.h" | ||||
#include "solib.h" | #include "solib.h" | ||||
▲ Show 20 Lines • Show All 240 Lines • ▼ Show 20 Lines | |||||
{ | { | ||||
const char *name; | const char *name; | ||||
find_pc_partial_function (get_frame_func (this_frame), &name, NULL, NULL); | find_pc_partial_function (get_frame_func (this_frame), &name, NULL, NULL); | ||||
return (name && strcmp (name, "dblfault_handler") == 0); | return (name && strcmp (name, "dblfault_handler") == 0); | ||||
} | } | ||||
static const struct frame_unwind i386fbsd_dblfault_unwind = { | static const struct frame_unwind i386fbsd_dblfault_unwind = { | ||||
"i386 FreeBSD double fault", | |||||
SIGTRAMP_FRAME, | SIGTRAMP_FRAME, | ||||
default_frame_unwind_stop_reason, | default_frame_unwind_stop_reason, | ||||
i386fbsd_dblfault_this_id, | i386fbsd_dblfault_this_id, | ||||
i386fbsd_dblfault_prev_register, | i386fbsd_dblfault_prev_register, | ||||
NULL, | NULL, | ||||
i386fbsd_dblfault_sniffer | i386fbsd_dblfault_sniffer | ||||
}; | }; | ||||
#endif | #endif | ||||
▲ Show 20 Lines • Show All 143 Lines • ▼ Show 20 Lines | i386fbsd_trapframe_sniffer (const struct frame_unwind *self, | ||||
find_pc_partial_function (get_frame_func (this_frame), &name, NULL, NULL); | find_pc_partial_function (get_frame_func (this_frame), &name, NULL, NULL); | ||||
return (name && ((strcmp (name, "calltrap") == 0) | return (name && ((strcmp (name, "calltrap") == 0) | ||||
|| (strcmp (name, "fork_trampoline") == 0) | || (strcmp (name, "fork_trampoline") == 0) | ||||
|| (name[0] == 'X' && name[1] != '_'))); | || (name[0] == 'X' && name[1] != '_'))); | ||||
} | } | ||||
static const struct frame_unwind i386fbsd_trapframe_unwind = { | static const struct frame_unwind i386fbsd_trapframe_unwind = { | ||||
"i386 FreeBSD kernel trap", | |||||
SIGTRAMP_FRAME, | SIGTRAMP_FRAME, | ||||
default_frame_unwind_stop_reason, | default_frame_unwind_stop_reason, | ||||
i386fbsd_trapframe_this_id, | i386fbsd_trapframe_this_id, | ||||
i386fbsd_trapframe_prev_register, | i386fbsd_trapframe_prev_register, | ||||
NULL, | NULL, | ||||
i386fbsd_trapframe_sniffer | i386fbsd_trapframe_sniffer | ||||
}; | }; | ||||
Show All 9 Lines | #endif | ||||
frame_unwind_prepend_unwinder(gdbarch, &i386fbsd_trapframe_unwind); | frame_unwind_prepend_unwinder(gdbarch, &i386fbsd_trapframe_unwind); | ||||
set_solib_ops(gdbarch, &kld_so_ops); | set_solib_ops(gdbarch, &kld_so_ops); | ||||
fbsd_vmcore_set_supply_pcb(gdbarch, i386fbsd_supply_pcb); | fbsd_vmcore_set_supply_pcb(gdbarch, i386fbsd_supply_pcb); | ||||
fbsd_vmcore_set_cpu_pcb_addr(gdbarch, kgdb_trgt_stop_pcb); | fbsd_vmcore_set_cpu_pcb_addr(gdbarch, kgdb_trgt_stop_pcb); | ||||
} | } | ||||
void _initialize_i386_kgdb_tdep(void); | void _initialize_i386_kgdb_tdep (); | ||||
void | void | ||||
_initialize_i386_kgdb_tdep(void) | _initialize_i386_kgdb_tdep () | ||||
{ | { | ||||
/* This is used for both i386 and amd64, but amd64 always | /* This is used for both i386 and amd64, but amd64 always | ||||
includes this target, so just include it here. */ | includes this target, so just include it here. */ | ||||
gdbarch_register_osabi_sniffer(bfd_arch_i386, | gdbarch_register_osabi_sniffer(bfd_arch_i386, | ||||
bfd_target_elf_flavour, | bfd_target_elf_flavour, | ||||
fbsd_kernel_osabi_sniffer); | fbsd_kernel_osabi_sniffer); | ||||
gdbarch_register_osabi (bfd_arch_i386, 0, | gdbarch_register_osabi (bfd_arch_i386, 0, | ||||
GDB_OSABI_FREEBSD_KERNEL, i386fbsd_kernel_init_abi); | GDB_OSABI_FREEBSD_KERNEL, i386fbsd_kernel_init_abi); | ||||
▲ Show 20 Lines • Show All 101 Lines • Show Last 20 Lines |