diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2025-06-03 22:35:06 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2025-06-03 22:35:06 +0200 |
commit | 2fa69c06ee0a02687100d159801eaba9c1597943 (patch) | |
tree | c127b4b0d20123a5085a11ee8552fcd7efc36855 | |
parent | 542f30e3092cab04eab413d9f14d28900fe3a59c (diff) |
ddb: Print vm_privilege in thread state
-rw-r--r-- | ddb/db_print.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ddb/db_print.c b/ddb/db_print.c index f08dd6ce..227a355b 100644 --- a/ddb/db_print.c +++ b/ddb/db_print.c @@ -133,7 +133,7 @@ db_show_regs( static char * db_thread_stat( const thread_t thread, - char *status) + char status[9]) { char *p = status; @@ -144,6 +144,8 @@ db_thread_stat( *p++ = (thread->state & TH_UNINT) ? 'N' : '.'; /* show if the FPU has been used */ *p++ = db_thread_fp_used(thread) ? 'F' : '.'; + /* show if thread is VM-privileged */ + *p++ = thread->vm_privilege ? 'P' : '.'; *p++ = 0; return(status); } @@ -154,8 +156,9 @@ db_print_thread( int thread_id, int flag) { + char status[9]; + if (flag & OPTION_USER) { - char status[8]; char *indent = ""; if (flag & OPTION_INDENT) indent = " "; @@ -227,7 +230,6 @@ db_print_thread( strncmp (thread->name, thread->task->name, THREAD_NAME_SIZE)) db_printf("%s ", thread->name); db_printf("(%0*X) ", 2*sizeof(vm_offset_t), thread); - char status[8]; db_printf("%s", db_thread_stat(thread, status)); if (thread->state & TH_SWAPPED) { if (thread->swap_func) { |