MCPcopy Create free account
hub / github.com/F-Stack/f-stack / decode_syscall

Function decode_syscall

freebsd/amd64/amd64/db_trace.c:147–167  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

145}
146
147static void
148decode_syscall(int number, struct thread *td)
149{
150 struct proc *p;
151 c_db_sym_t sym;
152 db_expr_t diff;
153 sy_call_t *f;
154 const char *symname;
155
156 db_printf(" (%d", number);
157 p = (td != NULL) ? td->td_proc : NULL;
158 if (p != NULL && 0 <= number && number < p->p_sysent->sv_size) {
159 f = p->p_sysent->sv_table[number].sy_call;
160 sym = db_search_symbol((db_addr_t)f, DB_STGY_ANY, &diff);
161 if (sym != DB_SYM_NULL && diff == 0) {
162 db_symbol_values(sym, &symname, NULL);
163 db_printf(", %s, %s", p->p_sysent->sv_name, symname);
164 }
165 }
166 db_printf(")");
167}
168
169/*
170 * Figure out the next frame up in the call stack.

Callers 1

db_nextframeFunction · 0.70

Calls 3

db_printfFunction · 0.85
db_search_symbolFunction · 0.85
db_symbol_valuesFunction · 0.85

Tested by

no test coverage detected