Changeset View
Changeset View
Standalone View
Standalone View
devel/gdb/files/kgdb/mipsfbsd-kern.c
Show All 17 Lines | |||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | ||||
* IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, | * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, | ||||
* 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. | ||||
* | |||||
* from: src/gnu/usr.bin/gdb/kgdb/trgt_alpha.c,v 1.2.2.1 2005/09/15 05:32:10 marcel | |||||
*/ | */ | ||||
#include "defs.h" | #include "defs.h" | ||||
#include "frame-unwind.h" | #include "frame-unwind.h" | ||||
#include "osabi.h" | #include "osabi.h" | ||||
#include "regcache.h" | #include "regcache.h" | ||||
#include "solib.h" | #include "solib.h" | ||||
#include "trad-frame.h" | #include "trad-frame.h" | ||||
▲ Show 20 Lines • Show All 197 Lines • ▼ Show 20 Lines | mipsfbsd_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, "MipsKernIntr") == 0) || | return (name && ((strcmp(name, "MipsKernIntr") == 0) || | ||||
(strcmp(name, "MipsKernGenException") == 0) || | (strcmp(name, "MipsKernGenException") == 0) || | ||||
(strcmp(name, "MipsTLBInvalidException") == 0))); | (strcmp(name, "MipsTLBInvalidException") == 0))); | ||||
} | } | ||||
static const struct frame_unwind mipsfbsd_trapframe_unwind = { | static const struct frame_unwind mipsfbsd_trapframe_unwind = { | ||||
"mips FreeBSD kernel trap", | |||||
SIGTRAMP_FRAME, | SIGTRAMP_FRAME, | ||||
default_frame_unwind_stop_reason, | default_frame_unwind_stop_reason, | ||||
mipsfbsd_trapframe_this_id, | mipsfbsd_trapframe_this_id, | ||||
mipsfbsd_trapframe_prev_register, | mipsfbsd_trapframe_prev_register, | ||||
NULL, | NULL, | ||||
mipsfbsd_trapframe_sniffer | mipsfbsd_trapframe_sniffer | ||||
}; | }; | ||||
Show All 29 Lines | mipsfbsd_kernel_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) | ||||
frame_unwind_prepend_unwinder (gdbarch, &mipsfbsd_trapframe_unwind); | frame_unwind_prepend_unwinder (gdbarch, &mipsfbsd_trapframe_unwind); | ||||
set_solib_ops (gdbarch, &kld_so_ops); | set_solib_ops (gdbarch, &kld_so_ops); | ||||
fbsd_vmcore_set_supply_pcb (gdbarch, mipsfbsd_supply_pcb); | fbsd_vmcore_set_supply_pcb (gdbarch, mipsfbsd_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_mips_kgdb_tdep(void); | void _initialize_mips_kgdb_tdep (); | ||||
void | void | ||||
_initialize_mips_kgdb_tdep (void) | _initialize_mips_kgdb_tdep () | ||||
{ | { | ||||
gdbarch_register_osabi_sniffer(bfd_arch_mips, | gdbarch_register_osabi_sniffer(bfd_arch_mips, | ||||
bfd_target_elf_flavour, | bfd_target_elf_flavour, | ||||
fbsd_kernel_osabi_sniffer); | fbsd_kernel_osabi_sniffer); | ||||
gdbarch_register_osabi (bfd_arch_mips, 0, GDB_OSABI_FREEBSD_KERNEL, | gdbarch_register_osabi (bfd_arch_mips, 0, GDB_OSABI_FREEBSD_KERNEL, | ||||
mipsfbsd_kernel_init_abi); | mipsfbsd_kernel_init_abi); | ||||
} | } |