Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F137750060
D37200.id112344.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D37200.id112344.diff
View Options
diff --git a/sys/amd64/amd64/db_trace.c b/sys/amd64/amd64/db_trace.c
--- a/sys/amd64/amd64/db_trace.c
+++ b/sys/amd64/amd64/db_trace.c
@@ -218,7 +218,7 @@
break;
case SYSCALL:
db_printf("--- syscall");
- db_decode_syscall(tf->tf_rax, td);
+ db_decode_syscall(td, tf->tf_rax);
break;
case INTERRUPT:
db_printf("--- interrupt");
diff --git a/sys/ddb/db_sym.h b/sys/ddb/db_sym.h
--- a/sys/ddb/db_sym.h
+++ b/sys/ddb/db_sym.h
@@ -105,6 +105,6 @@
void X_db_symbol_values(db_symtab_t *symtab, c_db_sym_t sym,
const char **namep, db_expr_t *valuep);
-void db_decode_syscall(int number, struct thread *td);
+void db_decode_syscall(struct thread *td, u_int number);
#endif /* !_DDB_DB_SYM_H_ */
diff --git a/sys/ddb/db_sym.c b/sys/ddb/db_sym.c
--- a/sys/ddb/db_sym.c
+++ b/sys/ddb/db_sym.c
@@ -485,23 +485,15 @@
}
void
-db_decode_syscall(int number, struct thread *td)
+db_decode_syscall(struct thread *td, u_int number)
{
struct proc *p;
- c_db_sym_t sym;
- db_expr_t diff;
- sy_call_t *f;
- const char *symname;
- db_printf(" (%d", number);
+ db_printf(" (%u", number);
p = (td != NULL) ? td->td_proc : NULL;
- if (p != NULL && 0 <= number && number < p->p_sysent->sv_size) {
- f = p->p_sysent->sv_table[number].sy_call;
- sym = db_search_symbol((db_addr_t)f, DB_STGY_ANY, &diff);
- if (sym != DB_SYM_NULL && diff == 0) {
- db_symbol_values(sym, &symname, NULL);
- db_printf(", %s, %s", p->p_sysent->sv_name, symname);
- }
+ if (p != NULL) {
+ db_printf(", %s, %s", p->p_sysent->sv_name,
+ syscallname(p, number));
}
db_printf(")");
}
diff --git a/sys/i386/i386/db_trace.c b/sys/i386/i386/db_trace.c
--- a/sys/i386/i386/db_trace.c
+++ b/sys/i386/i386/db_trace.c
@@ -372,7 +372,7 @@
break;
case SYSCALL:
db_printf("--- syscall");
- db_decode_syscall(tf->tf_eax, td);
+ db_decode_syscall(td, tf->tf_eax);
break;
case INTERRUPT:
db_printf("--- interrupt");
diff --git a/sys/riscv/riscv/db_trace.c b/sys/riscv/riscv/db_trace.c
--- a/sys/riscv/riscv/db_trace.c
+++ b/sys/riscv/riscv/db_trace.c
@@ -97,7 +97,7 @@
tf->tf_scause & SCAUSE_CODE);
} else if (tf->tf_scause == SCAUSE_ECALL_USER) {
db_printf("--- syscall");
- db_decode_syscall(td->td_sa.code, td);
+ db_decode_syscall(td, td->td_sa.code);
db_printf("\n");
} else {
db_printf("--- exception %ld, tval = %#lx\n",
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 26, 11:38 AM (15 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
26211216
Default Alt Text
D37200.id112344.diff (2 KB)
Attached To
Mode
D37200: ddb: print the actual syscall name
Attached
Detach File
Event Timeline
Log In to Comment