| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: db_machdep.h,v 1.35 2021/03/29 03:03:48 simonb Exp $ */ | | 1 | /* $NetBSD: db_machdep.h,v 1.36 2021/03/29 03:07:33 simonb Exp $ */ |
2 | | | 2 | |
3 | /* | | 3 | /* |
4 | * Copyright (c) 1997 Jonathan Stone (hereinafter referred to as the author) | | 4 | * Copyright (c) 1997 Jonathan Stone (hereinafter referred to as the author) |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * Redistribution and use in source and binary forms, with or without | | 7 | * Redistribution and use in source and binary forms, with or without |
8 | * modification, are permitted provided that the following conditions | | 8 | * modification, are permitted provided that the following conditions |
9 | * are met: | | 9 | * are met: |
10 | * 1. Redistributions of source code must retain the above copyright | | 10 | * 1. Redistributions of source code must retain the above copyright |
11 | * notice, this list of conditions and the following disclaimer. | | 11 | * notice, this list of conditions and the following disclaimer. |
12 | * 2. Redistributions in binary form must reproduce the above copyright | | 12 | * 2. Redistributions in binary form must reproduce the above copyright |
13 | * notice, this list of conditions and the following disclaimer in the | | 13 | * notice, this list of conditions and the following disclaimer in the |
14 | * documentation and/or other materials provided with the distribution. | | 14 | * documentation and/or other materials provided with the distribution. |
| @@ -118,27 +118,32 @@ bool inst_branch(int inst); | | | @@ -118,27 +118,32 @@ bool inst_branch(int inst); |
118 | bool inst_call(int inst); | | 118 | bool inst_call(int inst); |
119 | bool inst_return(int inst); | | 119 | bool inst_return(int inst); |
120 | bool inst_load(int inst); | | 120 | bool inst_load(int inst); |
121 | bool inst_store(int inst); | | 121 | bool inst_store(int inst); |
122 | bool inst_unconditional_flow_transfer(int inst); | | 122 | bool inst_unconditional_flow_transfer(int inst); |
123 | db_addr_t branch_taken(int inst, db_addr_t pc, db_regs_t *regs); | | 123 | db_addr_t branch_taken(int inst, db_addr_t pc, db_regs_t *regs); |
124 | db_addr_t next_instr_address(db_addr_t pc, bool bd); | | 124 | db_addr_t next_instr_address(db_addr_t pc, bool bd); |
125 | | | 125 | |
126 | bool ddb_running_on_this_cpu_p(void); | | 126 | bool ddb_running_on_this_cpu_p(void); |
127 | bool ddb_running_on_any_cpu_p(void); | | 127 | bool ddb_running_on_any_cpu_p(void); |
128 | void db_resume_others(void); | | 128 | void db_resume_others(void); |
129 | void db_mips_stack_trace(void *, void *, void (*pr)(const char *, ...)); | | 129 | void db_mips_stack_trace(void *, void *, void (*pr)(const char *, ...)); |
130 | | | 130 | |
131 | extern void (*cpu_reset_address)(void); | | | |
132 | | | 131 | |
133 | #ifdef _KERNEL | | 132 | #ifdef _KERNEL |
134 | /* | | 133 | /* |
| | | 134 | * Optional function to perform machine- or cpu-specific reset. |
| | | 135 | * Called from ddb "machine reset". |
| | | 136 | */ |
| | | 137 | extern void (*cpu_reset_address)(void); |
| | | 138 | |
| | | 139 | /* |
135 | * We have machine-dependent commands. | | 140 | * We have machine-dependent commands. |
136 | */ | | 141 | */ |
137 | #define DB_MACHINE_COMMANDS | | 142 | #define DB_MACHINE_COMMANDS |
138 | #endif | | 143 | #endif |
139 | | | 144 | |
140 | #define db_stacktrace_print(prfunc) \ | | 145 | #define db_stacktrace_print(prfunc) \ |
141 | db_mips_stack_trace(__builtin_return_address(0), \ | | 146 | db_mips_stack_trace(__builtin_return_address(0), \ |
142 | __builtin_frame_address(0), prfunc) | | 147 | __builtin_frame_address(0), prfunc) |
143 | | | 148 | |
144 | #endif /* _MIPS_DB_MACHDEP_H_ */ | | 149 | #endif /* _MIPS_DB_MACHDEP_H_ */ |