mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 12:54:27 +00:00
ddb: Use bool for boolean variables in MD code
Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D43695
This commit is contained in:
parent
afb1a3e30c
commit
1027e838a8
File diff suppressed because it is too large
Load diff
|
@ -146,9 +146,9 @@ db_nextframe(db_addr_t *fp, db_addr_t *ip, struct thread *td)
|
||||||
const char *name;
|
const char *name;
|
||||||
|
|
||||||
rip = db_get_value(*fp + offsetof(struct amd64_frame, f_retaddr), 8,
|
rip = db_get_value(*fp + offsetof(struct amd64_frame, f_retaddr), 8,
|
||||||
FALSE);
|
false);
|
||||||
rbp = db_get_value(*fp + offsetof(struct amd64_frame, f_frame), 8,
|
rbp = db_get_value(*fp + offsetof(struct amd64_frame, f_frame), 8,
|
||||||
FALSE);
|
false);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Figure out frame type. We look at the address just before
|
* Figure out frame type. We look at the address just before
|
||||||
|
@ -245,12 +245,12 @@ db_backtrace(struct thread *td, struct trapframe *tf, db_addr_t frame,
|
||||||
const char *name;
|
const char *name;
|
||||||
db_expr_t offset;
|
db_expr_t offset;
|
||||||
c_db_sym_t sym;
|
c_db_sym_t sym;
|
||||||
boolean_t first;
|
bool first;
|
||||||
|
|
||||||
if (count == -1)
|
if (count == -1)
|
||||||
count = 1024;
|
count = 1024;
|
||||||
|
|
||||||
first = TRUE;
|
first = true;
|
||||||
while (count-- && !db_pager_quit) {
|
while (count-- && !db_pager_quit) {
|
||||||
sym = db_search_symbol(pc, DB_STGY_ANY, &offset);
|
sym = db_search_symbol(pc, DB_STGY_ANY, &offset);
|
||||||
db_symbol_values(sym, &name, NULL);
|
db_symbol_values(sym, &name, NULL);
|
||||||
|
@ -268,7 +268,7 @@ db_backtrace(struct thread *td, struct trapframe *tf, db_addr_t frame,
|
||||||
*/
|
*/
|
||||||
actframe = frame;
|
actframe = frame;
|
||||||
if (first) {
|
if (first) {
|
||||||
first = FALSE;
|
first = false;
|
||||||
if (sym == C_DB_SYM_NULL && sp != 0) {
|
if (sym == C_DB_SYM_NULL && sp != 0) {
|
||||||
/*
|
/*
|
||||||
* If a symbol couldn't be found, we've probably
|
* If a symbol couldn't be found, we've probably
|
||||||
|
@ -276,7 +276,7 @@ db_backtrace(struct thread *td, struct trapframe *tf, db_addr_t frame,
|
||||||
* the return address to find our caller.
|
* the return address to find our caller.
|
||||||
*/
|
*/
|
||||||
db_print_stack_entry(name, pc, 0);
|
db_print_stack_entry(name, pc, 0);
|
||||||
pc = db_get_value(sp, 8, FALSE);
|
pc = db_get_value(sp, 8, false);
|
||||||
if (db_search_symbol(pc, DB_STGY_PROC,
|
if (db_search_symbol(pc, DB_STGY_PROC,
|
||||||
&offset) == C_DB_SYM_NULL)
|
&offset) == C_DB_SYM_NULL)
|
||||||
break;
|
break;
|
||||||
|
@ -284,7 +284,7 @@ db_backtrace(struct thread *td, struct trapframe *tf, db_addr_t frame,
|
||||||
} else if (tf != NULL) {
|
} else if (tf != NULL) {
|
||||||
int instr;
|
int instr;
|
||||||
|
|
||||||
instr = db_get_value(pc, 4, FALSE);
|
instr = db_get_value(pc, 4, false);
|
||||||
if ((instr & 0xffffffff) == 0xe5894855) {
|
if ((instr & 0xffffffff) == 0xe5894855) {
|
||||||
/* pushq %rbp; movq %rsp, %rbp */
|
/* pushq %rbp; movq %rsp, %rbp */
|
||||||
actframe = tf->tf_rsp - 8;
|
actframe = tf->tf_rsp - 8;
|
||||||
|
@ -318,7 +318,7 @@ db_backtrace(struct thread *td, struct trapframe *tf, db_addr_t frame,
|
||||||
if (actframe != frame) {
|
if (actframe != frame) {
|
||||||
/* `frame' belongs to caller. */
|
/* `frame' belongs to caller. */
|
||||||
pc = db_get_value(actframe +
|
pc = db_get_value(actframe +
|
||||||
offsetof(struct amd64_frame, f_retaddr), 8, FALSE);
|
offsetof(struct amd64_frame, f_retaddr), 8, false);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -350,9 +350,9 @@ db_trace_self(void)
|
||||||
|
|
||||||
__asm __volatile("movq %%rbp,%0" : "=r" (rbp));
|
__asm __volatile("movq %%rbp,%0" : "=r" (rbp));
|
||||||
callpc = db_get_value(rbp + offsetof(struct amd64_frame, f_retaddr), 8,
|
callpc = db_get_value(rbp + offsetof(struct amd64_frame, f_retaddr), 8,
|
||||||
FALSE);
|
false);
|
||||||
frame = db_get_value(rbp + offsetof(struct amd64_frame, f_frame), 8,
|
frame = db_get_value(rbp + offsetof(struct amd64_frame, f_frame), 8,
|
||||||
FALSE);
|
false);
|
||||||
db_backtrace(curthread, NULL, frame, callpc, 0, -1);
|
db_backtrace(curthread, NULL, frame, callpc, 0, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -132,8 +132,8 @@ static int
|
||||||
db_backtrace(struct thread *td, db_addr_t fp, int count)
|
db_backtrace(struct thread *td, db_addr_t fp, int count)
|
||||||
{
|
{
|
||||||
db_addr_t stackframe, lr, *args;
|
db_addr_t stackframe, lr, *args;
|
||||||
boolean_t kernel_only = TRUE;
|
bool kernel_only = true;
|
||||||
boolean_t full = FALSE;
|
bool full = false;
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
{
|
{
|
||||||
|
@ -142,11 +142,11 @@ db_backtrace(struct thread *td, db_addr_t fp, int count)
|
||||||
|
|
||||||
while ((c = *cp++) != 0) {
|
while ((c = *cp++) != 0) {
|
||||||
if (c == 't')
|
if (c == 't')
|
||||||
trace_thread = TRUE;
|
trace_thread = true;
|
||||||
if (c == 'u')
|
if (c == 'u')
|
||||||
kernel_only = FALSE;
|
kernel_only = false;
|
||||||
if (c == 'f')
|
if (c == 'f')
|
||||||
full = TRUE;
|
full = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue