freebsd-dev/sys/mips
John Baldwin 2aa82aeacc Fix stack traces in DDB for the debugger thread.
When the kernel debugger is entered, makectx() is called to store
appropriate state from the trapframe for the debugger into a global
kdb_pcb used as the thread context of the thread entering the
debugger.  Stack unwinders for DDB called via db_trace_thread() are
supposed to then use this saved context so that the stack trace for
the current thread starts at the location of the event that triggered
debugger entry.

MIPS was instead starting the stack trace of the current thread from
the context of db_trace_thread itself and unwinding back out through
the debugger to the original frame.  Fix a couple of things to bring
MIPS inline with other platforms:
- Fix makectx() to store the PC, SP, and RA in the right portion of
  the PCB used by db_trace_thread().
- Fix db_trace_thread() to always use kdb_thr_ctx() (and thus kdb_pcb
  for the debugger thread).
- Move the logic for tracing curthread from within the current
  function into db_trace_self() to match other architectures.

Sponsored by:	DARPA / AFRL
2016-12-13 22:30:48 +00:00
..
adm5120 Remove NULL checks after M_WAITOK allocations from sys/mips/. 2016-05-11 09:42:24 +00:00
alchemy Remove NULL checks after M_WAITOK allocations from sys/mips/. 2016-05-11 09:42:24 +00:00
atheros [spi] reformat message and ar5315_spi minor fix 2016-12-13 09:53:43 +00:00
beri Fix the resource_list_print_type() calls to use uintmax_t. 2016-03-22 22:25:08 +00:00
broadcom bhnd(4): Unify NVRAM/SPROM parsing, implement compact SPROM layout encoding. 2016-11-26 23:22:32 +00:00
cavium Fix device delete child function. 2016-10-17 10:20:38 +00:00
conf Add a COMPAT_FREEBSD11 kernel option. 2016-12-09 18:54:12 +00:00
gxemul Allow the use of soft-interrupts for sending IPIs. 2016-09-08 17:37:13 +00:00
idt Remove NULL checks after M_WAITOK allocations from sys/mips/. 2016-05-11 09:42:24 +00:00
include Increase pcpu size to 512 so it become both denominator 2016-11-23 11:30:40 +00:00
ingenic Apply clear_mask correctly. 2016-12-12 17:08:52 +00:00
malta Add SMP support for MTI Malta 34kf CPU. 2016-09-12 16:38:51 +00:00
mediatek Use the spibus accessor when applicable. 2016-12-12 20:04:31 +00:00
mips Fix stack traces in DDB for the debugger thread. 2016-12-13 22:30:48 +00:00
nlm Allow the use of soft-interrupts for sending IPIs. 2016-09-08 17:37:13 +00:00
rmi Fix device delete child function. 2016-10-17 10:20:38 +00:00
rt305x Use the spibus accessor when applicable. 2016-12-12 20:04:31 +00:00
sibyte Allow the use of soft-interrupts for sending IPIs. 2016-09-08 17:37:13 +00:00