History log of /openbsd-current/sys/arch/powerpc/ddb/db_trace.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.20 26-Apr-2023 claudio

Implement dt(4) utrace support on amd64 and i386.

This adds stacktrace_save_utrace() to extract and save the userland stack
which is stubbed out on most archs. alpha and riscv64 do not even implement
dt(4) and stacktrace_save_at() so the stubs are excluded there.

Additionally add a new ioctl DTIOCGETAUXBASE which allows btrace to
fetch the AUX_BASE vallue from the AUX vector of a process.

OK mpi@ (some time ago) discussed with kettenis@


Revision tags: OPENBSD_7_1_BASE OPENBSD_7_2_BASE OPENBSD_7_3_BASE
# 1.19 07-Feb-2022 gkoehler

Allow "ddb{1}> trace" through interrupt on macppc

If cpu0 sends PPC_IPI_DDB to cpu1, then cpu1 stops on its interrupt
stack. Teach ININTSTK to allow traces through all interrupt stacks,
not only cpu0's.

ININTSTK now works by looping for all cpus. It doesn't remember which
cpu owns the stack. A macppc has at most 4 cpus.

ok kettenis@ miod@


# 1.18 28-Jan-2022 gkoehler

Give ddb more access to registers on macppc, powerpc64

Edit db_regs[] in db_trace.c on both powerpc and powerpc64, so ddb can
access $r14, $r15, $r16, $dar, $dsisr.

Only for powerpc: change db_trap_glue to copy all registers to and
from ddb_regs (it was skipping some); change db_set_single_step and
db_clear_single_step to flip the correct bit of srr1; delete
FIXUP_PC_AFTER_BREAK, which was off by 1 instruction.

"ddb{1}> s" on my PowerMac7,3 (dual G5 at 2700 MHz) began to panic
like, "*cpu0: mutex 0xa7d0a0 not held in tc_update_timekeep". Add an
arbitrary delay(100) after sending PPC_IPI_DDB; I want cpu0 to get the
ipi before it can see db_active == 1 and skip acquiring a mutex.

ok kettenis@


Revision tags: OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE
# 1.17 14-May-2020 mpi

Use '/t' on all architectures to get a trace via TID.

ok sthen@, patrick@


Revision tags: OPENBSD_6_7_BASE
# 1.16 18-Apr-2020 visa

Sync existing stacktrace_save() implementations

Upgrade stacktrace_save() to stacktrace_save_at() on architectures where
the latter is missing. Define stacktrace_save() as an inline function
in header <sys/stacktrace.h> to reduce duplication of code.

OK mpi@


# 1.15 10-Apr-2020 mpi

Implement stacktrace_save_at() required for upcoming WITNESS.

ok gkoehler@


# 1.14 07-Nov-2019 mpi

db_addr_t -> vaddr_t


Revision tags: OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE
# 1.13 18-Oct-2017 jasper

add support for printing function arguments when displaying a trace
from DDB. this uses CTF to get the correct number of arguments.

ok mpi@


Revision tags: OPENBSD_6_2_BASE
# 1.12 30-May-2017 mpi

Kill db_sym_t.

ok deraadt@, kettenis@, jasper@


Revision tags: OPENBSD_6_1_BASE
# 1.11 24-Jan-2017 mpi

Rename pfind(9) into tfind(9) to reflect that it deals with threads.

While here document prfind(9.

with and ok guenther@


# 1.10 10-Sep-2016 jasper

take it one step further and bring the message inline with arm/sparc64

pointed out by guenther@


# 1.9 09-Sep-2016 jasper

don't hardcode the filename in an error message; use the function name instead

ok jsg@ (who spotted the powerpc straggler too) millert@


Revision tags: OPENBSD_6_0_BASE
# 1.8 05-Mar-2016 mpi

Define db_reg_t like the other archs by typedef'ing "struct trapframe".

This will allow us to use some of the DDB macros on trapframe which are
not DDB_REGS.


# 1.7 02-Mar-2016 mpi

DDB_REGS -> ddb_regs in db_regs[], no reason to be different.


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE
# 1.6 06-Sep-2014 mpi

Rewrite the PowerPC stack dump routine to delimit the trap & interrupt
contexts with markers (---like on x86---) and print the associated type
or number when available.

While here, gyp' the support for process tracing (tr /p).

ok miod@


Revision tags: OPENBSD_5_6_BASE
# 1.5 13-Jul-2014 jasper

use nitems() instead of handrolling something identical

ok mpi@ sthen@


Revision tags: OPENBSD_3_5_BASE OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE SMP_SYNC_A SMP_SYNC_B
# 1.4 15-Oct-2003 drahn

Housecleaning, no binary change.


Revision tags: OPENBSD_3_3_BASE OPENBSD_3_4_BASE UBC_SYNC_A
# 1.3 26-Feb-2003 drahn

branches: 1.3.4;
Remove an unnecessary structure copy from useage of setfault(), call
by reference, not by value, ok matthieu#, miod@


# 1.2 12-Feb-2003 jason

move ddb_regs decl from .h to .c to avoid common


Revision tags: OPENBSD_3_2_BASE UBC_SYNC_B
# 1.1 08-Jun-2002 miod

branches: 1.1.4;
One ddb to rule them all.

Move the ddb files form macppc/macppc to powerpc/ddb, so that mvmeppc
can benefit from the better ddb that was in macppc.
db_interface.c is left as an md part.


# 1.19 07-Feb-2022 gkoehler

Allow "ddb{1}> trace" through interrupt on macppc

If cpu0 sends PPC_IPI_DDB to cpu1, then cpu1 stops on its interrupt
stack. Teach ININTSTK to allow traces through all interrupt stacks,
not only cpu0's.

ININTSTK now works by looping for all cpus. It doesn't remember which
cpu owns the stack. A macppc has at most 4 cpus.

ok kettenis@ miod@


# 1.18 28-Jan-2022 gkoehler

Give ddb more access to registers on macppc, powerpc64

Edit db_regs[] in db_trace.c on both powerpc and powerpc64, so ddb can
access $r14, $r15, $r16, $dar, $dsisr.

Only for powerpc: change db_trap_glue to copy all registers to and
from ddb_regs (it was skipping some); change db_set_single_step and
db_clear_single_step to flip the correct bit of srr1; delete
FIXUP_PC_AFTER_BREAK, which was off by 1 instruction.

"ddb{1}> s" on my PowerMac7,3 (dual G5 at 2700 MHz) began to panic
like, "*cpu0: mutex 0xa7d0a0 not held in tc_update_timekeep". Add an
arbitrary delay(100) after sending PPC_IPI_DDB; I want cpu0 to get the
ipi before it can see db_active == 1 and skip acquiring a mutex.

ok kettenis@


Revision tags: OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE
# 1.17 14-May-2020 mpi

Use '/t' on all architectures to get a trace via TID.

ok sthen@, patrick@


Revision tags: OPENBSD_6_7_BASE
# 1.16 18-Apr-2020 visa

Sync existing stacktrace_save() implementations

Upgrade stacktrace_save() to stacktrace_save_at() on architectures where
the latter is missing. Define stacktrace_save() as an inline function
in header <sys/stacktrace.h> to reduce duplication of code.

OK mpi@


# 1.15 10-Apr-2020 mpi

Implement stacktrace_save_at() required for upcoming WITNESS.

ok gkoehler@


# 1.14 07-Nov-2019 mpi

db_addr_t -> vaddr_t


Revision tags: OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE
# 1.13 18-Oct-2017 jasper

add support for printing function arguments when displaying a trace
from DDB. this uses CTF to get the correct number of arguments.

ok mpi@


Revision tags: OPENBSD_6_2_BASE
# 1.12 30-May-2017 mpi

Kill db_sym_t.

ok deraadt@, kettenis@, jasper@


Revision tags: OPENBSD_6_1_BASE
# 1.11 24-Jan-2017 mpi

Rename pfind(9) into tfind(9) to reflect that it deals with threads.

While here document prfind(9.

with and ok guenther@


# 1.10 10-Sep-2016 jasper

take it one step further and bring the message inline with arm/sparc64

pointed out by guenther@


# 1.9 09-Sep-2016 jasper

don't hardcode the filename in an error message; use the function name instead

ok jsg@ (who spotted the powerpc straggler too) millert@


Revision tags: OPENBSD_6_0_BASE
# 1.8 05-Mar-2016 mpi

Define db_reg_t like the other archs by typedef'ing "struct trapframe".

This will allow us to use some of the DDB macros on trapframe which are
not DDB_REGS.


# 1.7 02-Mar-2016 mpi

DDB_REGS -> ddb_regs in db_regs[], no reason to be different.


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE
# 1.6 06-Sep-2014 mpi

Rewrite the PowerPC stack dump routine to delimit the trap & interrupt
contexts with markers (---like on x86---) and print the associated type
or number when available.

While here, gyp' the support for process tracing (tr /p).

ok miod@


Revision tags: OPENBSD_5_6_BASE
# 1.5 13-Jul-2014 jasper

use nitems() instead of handrolling something identical

ok mpi@ sthen@


Revision tags: OPENBSD_3_5_BASE OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE SMP_SYNC_A SMP_SYNC_B
# 1.4 15-Oct-2003 drahn

Housecleaning, no binary change.


Revision tags: OPENBSD_3_3_BASE OPENBSD_3_4_BASE UBC_SYNC_A
# 1.3 26-Feb-2003 drahn

branches: 1.3.4;
Remove an unnecessary structure copy from useage of setfault(), call
by reference, not by value, ok matthieu#, miod@


# 1.2 12-Feb-2003 jason

move ddb_regs decl from .h to .c to avoid common


Revision tags: OPENBSD_3_2_BASE UBC_SYNC_B
# 1.1 08-Jun-2002 miod

branches: 1.1.4;
One ddb to rule them all.

Move the ddb files form macppc/macppc to powerpc/ddb, so that mvmeppc
can benefit from the better ddb that was in macppc.
db_interface.c is left as an md part.


# 1.18 28-Jan-2022 gkoehler

Give ddb more access to registers on macppc, powerpc64

Edit db_regs[] in db_trace.c on both powerpc and powerpc64, so ddb can
access $r14, $r15, $r16, $dar, $dsisr.

Only for powerpc: change db_trap_glue to copy all registers to and
from ddb_regs (it was skipping some); change db_set_single_step and
db_clear_single_step to flip the correct bit of srr1; delete
FIXUP_PC_AFTER_BREAK, which was off by 1 instruction.

"ddb{1}> s" on my PowerMac7,3 (dual G5 at 2700 MHz) began to panic
like, "*cpu0: mutex 0xa7d0a0 not held in tc_update_timekeep". Add an
arbitrary delay(100) after sending PPC_IPI_DDB; I want cpu0 to get the
ipi before it can see db_active == 1 and skip acquiring a mutex.

ok kettenis@


Revision tags: OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE
# 1.17 14-May-2020 mpi

Use '/t' on all architectures to get a trace via TID.

ok sthen@, patrick@


Revision tags: OPENBSD_6_7_BASE
# 1.16 18-Apr-2020 visa

Sync existing stacktrace_save() implementations

Upgrade stacktrace_save() to stacktrace_save_at() on architectures where
the latter is missing. Define stacktrace_save() as an inline function
in header <sys/stacktrace.h> to reduce duplication of code.

OK mpi@


# 1.15 10-Apr-2020 mpi

Implement stacktrace_save_at() required for upcoming WITNESS.

ok gkoehler@


# 1.14 07-Nov-2019 mpi

db_addr_t -> vaddr_t


Revision tags: OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE
# 1.13 18-Oct-2017 jasper

add support for printing function arguments when displaying a trace
from DDB. this uses CTF to get the correct number of arguments.

ok mpi@


Revision tags: OPENBSD_6_2_BASE
# 1.12 30-May-2017 mpi

Kill db_sym_t.

ok deraadt@, kettenis@, jasper@


Revision tags: OPENBSD_6_1_BASE
# 1.11 24-Jan-2017 mpi

Rename pfind(9) into tfind(9) to reflect that it deals with threads.

While here document prfind(9.

with and ok guenther@


# 1.10 10-Sep-2016 jasper

take it one step further and bring the message inline with arm/sparc64

pointed out by guenther@


# 1.9 09-Sep-2016 jasper

don't hardcode the filename in an error message; use the function name instead

ok jsg@ (who spotted the powerpc straggler too) millert@


Revision tags: OPENBSD_6_0_BASE
# 1.8 05-Mar-2016 mpi

Define db_reg_t like the other archs by typedef'ing "struct trapframe".

This will allow us to use some of the DDB macros on trapframe which are
not DDB_REGS.


# 1.7 02-Mar-2016 mpi

DDB_REGS -> ddb_regs in db_regs[], no reason to be different.


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE
# 1.6 06-Sep-2014 mpi

Rewrite the PowerPC stack dump routine to delimit the trap & interrupt
contexts with markers (---like on x86---) and print the associated type
or number when available.

While here, gyp' the support for process tracing (tr /p).

ok miod@


Revision tags: OPENBSD_5_6_BASE
# 1.5 13-Jul-2014 jasper

use nitems() instead of handrolling something identical

ok mpi@ sthen@


Revision tags: OPENBSD_3_5_BASE OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE SMP_SYNC_A SMP_SYNC_B
# 1.4 15-Oct-2003 drahn

Housecleaning, no binary change.


Revision tags: OPENBSD_3_3_BASE OPENBSD_3_4_BASE UBC_SYNC_A
# 1.3 26-Feb-2003 drahn

branches: 1.3.4;
Remove an unnecessary structure copy from useage of setfault(), call
by reference, not by value, ok matthieu#, miod@


# 1.2 12-Feb-2003 jason

move ddb_regs decl from .h to .c to avoid common


Revision tags: OPENBSD_3_2_BASE UBC_SYNC_B
# 1.1 08-Jun-2002 miod

branches: 1.1.4;
One ddb to rule them all.

Move the ddb files form macppc/macppc to powerpc/ddb, so that mvmeppc
can benefit from the better ddb that was in macppc.
db_interface.c is left as an md part.


# 1.17 14-May-2020 mpi

Use '/t' on all architectures to get a trace via TID.

ok sthen@, patrick@


Revision tags: OPENBSD_6_7_BASE
# 1.16 18-Apr-2020 visa

Sync existing stacktrace_save() implementations

Upgrade stacktrace_save() to stacktrace_save_at() on architectures where
the latter is missing. Define stacktrace_save() as an inline function
in header <sys/stacktrace.h> to reduce duplication of code.

OK mpi@


# 1.15 10-Apr-2020 mpi

Implement stacktrace_save_at() required for upcoming WITNESS.

ok gkoehler@


# 1.14 07-Nov-2019 mpi

db_addr_t -> vaddr_t


Revision tags: OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE
# 1.13 18-Oct-2017 jasper

add support for printing function arguments when displaying a trace
from DDB. this uses CTF to get the correct number of arguments.

ok mpi@


Revision tags: OPENBSD_6_2_BASE
# 1.12 30-May-2017 mpi

Kill db_sym_t.

ok deraadt@, kettenis@, jasper@


Revision tags: OPENBSD_6_1_BASE
# 1.11 24-Jan-2017 mpi

Rename pfind(9) into tfind(9) to reflect that it deals with threads.

While here document prfind(9.

with and ok guenther@


# 1.10 10-Sep-2016 jasper

take it one step further and bring the message inline with arm/sparc64

pointed out by guenther@


# 1.9 09-Sep-2016 jasper

don't hardcode the filename in an error message; use the function name instead

ok jsg@ (who spotted the powerpc straggler too) millert@


Revision tags: OPENBSD_6_0_BASE
# 1.8 05-Mar-2016 mpi

Define db_reg_t like the other archs by typedef'ing "struct trapframe".

This will allow us to use some of the DDB macros on trapframe which are
not DDB_REGS.


# 1.7 02-Mar-2016 mpi

DDB_REGS -> ddb_regs in db_regs[], no reason to be different.


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE
# 1.6 06-Sep-2014 mpi

Rewrite the PowerPC stack dump routine to delimit the trap & interrupt
contexts with markers (---like on x86---) and print the associated type
or number when available.

While here, gyp' the support for process tracing (tr /p).

ok miod@


Revision tags: OPENBSD_5_6_BASE
# 1.5 13-Jul-2014 jasper

use nitems() instead of handrolling something identical

ok mpi@ sthen@


Revision tags: OPENBSD_3_5_BASE OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE SMP_SYNC_A SMP_SYNC_B
# 1.4 15-Oct-2003 drahn

Housecleaning, no binary change.


Revision tags: OPENBSD_3_3_BASE OPENBSD_3_4_BASE UBC_SYNC_A
# 1.3 26-Feb-2003 drahn

branches: 1.3.4;
Remove an unnecessary structure copy from useage of setfault(), call
by reference, not by value, ok matthieu#, miod@


# 1.2 12-Feb-2003 jason

move ddb_regs decl from .h to .c to avoid common


Revision tags: OPENBSD_3_2_BASE UBC_SYNC_B
# 1.1 08-Jun-2002 miod

branches: 1.1.4;
One ddb to rule them all.

Move the ddb files form macppc/macppc to powerpc/ddb, so that mvmeppc
can benefit from the better ddb that was in macppc.
db_interface.c is left as an md part.


# 1.16 18-Apr-2020 visa

Sync existing stacktrace_save() implementations

Upgrade stacktrace_save() to stacktrace_save_at() on architectures where
the latter is missing. Define stacktrace_save() as an inline function
in header <sys/stacktrace.h> to reduce duplication of code.

OK mpi@


# 1.15 10-Apr-2020 mpi

Implement stacktrace_save_at() required for upcoming WITNESS.

ok gkoehler@


# 1.14 07-Nov-2019 mpi

db_addr_t -> vaddr_t


Revision tags: OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE
# 1.13 18-Oct-2017 jasper

add support for printing function arguments when displaying a trace
from DDB. this uses CTF to get the correct number of arguments.

ok mpi@


Revision tags: OPENBSD_6_2_BASE
# 1.12 30-May-2017 mpi

Kill db_sym_t.

ok deraadt@, kettenis@, jasper@


Revision tags: OPENBSD_6_1_BASE
# 1.11 24-Jan-2017 mpi

Rename pfind(9) into tfind(9) to reflect that it deals with threads.

While here document prfind(9.

with and ok guenther@


# 1.10 10-Sep-2016 jasper

take it one step further and bring the message inline with arm/sparc64

pointed out by guenther@


# 1.9 09-Sep-2016 jasper

don't hardcode the filename in an error message; use the function name instead

ok jsg@ (who spotted the powerpc straggler too) millert@


Revision tags: OPENBSD_6_0_BASE
# 1.8 05-Mar-2016 mpi

Define db_reg_t like the other archs by typedef'ing "struct trapframe".

This will allow us to use some of the DDB macros on trapframe which are
not DDB_REGS.


# 1.7 02-Mar-2016 mpi

DDB_REGS -> ddb_regs in db_regs[], no reason to be different.


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE
# 1.6 06-Sep-2014 mpi

Rewrite the PowerPC stack dump routine to delimit the trap & interrupt
contexts with markers (---like on x86---) and print the associated type
or number when available.

While here, gyp' the support for process tracing (tr /p).

ok miod@


Revision tags: OPENBSD_5_6_BASE
# 1.5 13-Jul-2014 jasper

use nitems() instead of handrolling something identical

ok mpi@ sthen@


Revision tags: OPENBSD_3_5_BASE OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE SMP_SYNC_A SMP_SYNC_B
# 1.4 15-Oct-2003 drahn

Housecleaning, no binary change.


Revision tags: OPENBSD_3_3_BASE OPENBSD_3_4_BASE UBC_SYNC_A
# 1.3 26-Feb-2003 drahn

branches: 1.3.4;
Remove an unnecessary structure copy from useage of setfault(), call
by reference, not by value, ok matthieu#, miod@


# 1.2 12-Feb-2003 jason

move ddb_regs decl from .h to .c to avoid common


Revision tags: OPENBSD_3_2_BASE UBC_SYNC_B
# 1.1 08-Jun-2002 miod

branches: 1.1.4;
One ddb to rule them all.

Move the ddb files form macppc/macppc to powerpc/ddb, so that mvmeppc
can benefit from the better ddb that was in macppc.
db_interface.c is left as an md part.


# 1.15 10-Apr-2020 mpi

Implement stacktrace_save_at() required for upcoming WITNESS.

ok gkoehler@


# 1.14 07-Nov-2019 mpi

db_addr_t -> vaddr_t


Revision tags: OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE
# 1.13 18-Oct-2017 jasper

add support for printing function arguments when displaying a trace
from DDB. this uses CTF to get the correct number of arguments.

ok mpi@


Revision tags: OPENBSD_6_2_BASE
# 1.12 30-May-2017 mpi

Kill db_sym_t.

ok deraadt@, kettenis@, jasper@


Revision tags: OPENBSD_6_1_BASE
# 1.11 24-Jan-2017 mpi

Rename pfind(9) into tfind(9) to reflect that it deals with threads.

While here document prfind(9.

with and ok guenther@


# 1.10 10-Sep-2016 jasper

take it one step further and bring the message inline with arm/sparc64

pointed out by guenther@


# 1.9 09-Sep-2016 jasper

don't hardcode the filename in an error message; use the function name instead

ok jsg@ (who spotted the powerpc straggler too) millert@


Revision tags: OPENBSD_6_0_BASE
# 1.8 05-Mar-2016 mpi

Define db_reg_t like the other archs by typedef'ing "struct trapframe".

This will allow us to use some of the DDB macros on trapframe which are
not DDB_REGS.


# 1.7 02-Mar-2016 mpi

DDB_REGS -> ddb_regs in db_regs[], no reason to be different.


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE
# 1.6 06-Sep-2014 mpi

Rewrite the PowerPC stack dump routine to delimit the trap & interrupt
contexts with markers (---like on x86---) and print the associated type
or number when available.

While here, gyp' the support for process tracing (tr /p).

ok miod@


Revision tags: OPENBSD_5_6_BASE
# 1.5 13-Jul-2014 jasper

use nitems() instead of handrolling something identical

ok mpi@ sthen@


Revision tags: OPENBSD_3_5_BASE OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE SMP_SYNC_A SMP_SYNC_B
# 1.4 15-Oct-2003 drahn

Housecleaning, no binary change.


Revision tags: OPENBSD_3_3_BASE OPENBSD_3_4_BASE UBC_SYNC_A
# 1.3 26-Feb-2003 drahn

branches: 1.3.4;
Remove an unnecessary structure copy from useage of setfault(), call
by reference, not by value, ok matthieu#, miod@


# 1.2 12-Feb-2003 jason

move ddb_regs decl from .h to .c to avoid common


Revision tags: OPENBSD_3_2_BASE UBC_SYNC_B
# 1.1 08-Jun-2002 miod

branches: 1.1.4;
One ddb to rule them all.

Move the ddb files form macppc/macppc to powerpc/ddb, so that mvmeppc
can benefit from the better ddb that was in macppc.
db_interface.c is left as an md part.


# 1.14 07-Nov-2019 mpi

db_addr_t -> vaddr_t


Revision tags: OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE
# 1.13 18-Oct-2017 jasper

add support for printing function arguments when displaying a trace
from DDB. this uses CTF to get the correct number of arguments.

ok mpi@


Revision tags: OPENBSD_6_2_BASE
# 1.12 30-May-2017 mpi

Kill db_sym_t.

ok deraadt@, kettenis@, jasper@


Revision tags: OPENBSD_6_1_BASE
# 1.11 24-Jan-2017 mpi

Rename pfind(9) into tfind(9) to reflect that it deals with threads.

While here document prfind(9.

with and ok guenther@


# 1.10 10-Sep-2016 jasper

take it one step further and bring the message inline with arm/sparc64

pointed out by guenther@


# 1.9 09-Sep-2016 jasper

don't hardcode the filename in an error message; use the function name instead

ok jsg@ (who spotted the powerpc straggler too) millert@


Revision tags: OPENBSD_6_0_BASE
# 1.8 05-Mar-2016 mpi

Define db_reg_t like the other archs by typedef'ing "struct trapframe".

This will allow us to use some of the DDB macros on trapframe which are
not DDB_REGS.


# 1.7 02-Mar-2016 mpi

DDB_REGS -> ddb_regs in db_regs[], no reason to be different.


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE
# 1.6 06-Sep-2014 mpi

Rewrite the PowerPC stack dump routine to delimit the trap & interrupt
contexts with markers (---like on x86---) and print the associated type
or number when available.

While here, gyp' the support for process tracing (tr /p).

ok miod@


Revision tags: OPENBSD_5_6_BASE
# 1.5 13-Jul-2014 jasper

use nitems() instead of handrolling something identical

ok mpi@ sthen@


Revision tags: OPENBSD_3_5_BASE OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE SMP_SYNC_A SMP_SYNC_B
# 1.4 15-Oct-2003 drahn

Housecleaning, no binary change.


Revision tags: OPENBSD_3_3_BASE OPENBSD_3_4_BASE UBC_SYNC_A
# 1.3 26-Feb-2003 drahn

branches: 1.3.4;
Remove an unnecessary structure copy from useage of setfault(), call
by reference, not by value, ok matthieu#, miod@


# 1.2 12-Feb-2003 jason

move ddb_regs decl from .h to .c to avoid common


Revision tags: OPENBSD_3_2_BASE UBC_SYNC_B
# 1.1 08-Jun-2002 miod

branches: 1.1.4;
One ddb to rule them all.

Move the ddb files form macppc/macppc to powerpc/ddb, so that mvmeppc
can benefit from the better ddb that was in macppc.
db_interface.c is left as an md part.


# 1.13 18-Oct-2017 jasper

add support for printing function arguments when displaying a trace
from DDB. this uses CTF to get the correct number of arguments.

ok mpi@


Revision tags: OPENBSD_6_2_BASE
# 1.12 30-May-2017 mpi

Kill db_sym_t.

ok deraadt@, kettenis@, jasper@


Revision tags: OPENBSD_6_1_BASE
# 1.11 24-Jan-2017 mpi

Rename pfind(9) into tfind(9) to reflect that it deals with threads.

While here document prfind(9.

with and ok guenther@


# 1.10 10-Sep-2016 jasper

take it one step further and bring the message inline with arm/sparc64

pointed out by guenther@


# 1.9 09-Sep-2016 jasper

don't hardcode the filename in an error message; use the function name instead

ok jsg@ (who spotted the powerpc straggler too) millert@


Revision tags: OPENBSD_6_0_BASE
# 1.8 05-Mar-2016 mpi

Define db_reg_t like the other archs by typedef'ing "struct trapframe".

This will allow us to use some of the DDB macros on trapframe which are
not DDB_REGS.


# 1.7 02-Mar-2016 mpi

DDB_REGS -> ddb_regs in db_regs[], no reason to be different.


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE
# 1.6 06-Sep-2014 mpi

Rewrite the PowerPC stack dump routine to delimit the trap & interrupt
contexts with markers (---like on x86---) and print the associated type
or number when available.

While here, gyp' the support for process tracing (tr /p).

ok miod@


Revision tags: OPENBSD_5_6_BASE
# 1.5 13-Jul-2014 jasper

use nitems() instead of handrolling something identical

ok mpi@ sthen@


Revision tags: OPENBSD_3_5_BASE OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE SMP_SYNC_A SMP_SYNC_B
# 1.4 15-Oct-2003 drahn

Housecleaning, no binary change.


Revision tags: OPENBSD_3_3_BASE OPENBSD_3_4_BASE UBC_SYNC_A
# 1.3 26-Feb-2003 drahn

branches: 1.3.4;
Remove an unnecessary structure copy from useage of setfault(), call
by reference, not by value, ok matthieu#, miod@


# 1.2 12-Feb-2003 jason

move ddb_regs decl from .h to .c to avoid common


Revision tags: OPENBSD_3_2_BASE UBC_SYNC_B
# 1.1 08-Jun-2002 miod

branches: 1.1.4;
One ddb to rule them all.

Move the ddb files form macppc/macppc to powerpc/ddb, so that mvmeppc
can benefit from the better ddb that was in macppc.
db_interface.c is left as an md part.