diff options
author | peter <peter@FreeBSD.org> | 2005-01-21 05:54:05 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2005-01-21 05:54:05 +0000 |
commit | 5558cc24b7e0bd341f099d2b9730d1ae90a0eb3b (patch) | |
tree | ad46f78823698d6592c86a5e7ea25a71c69f01c0 /sys | |
parent | 353c32f9f87dd48d5d8232a48d4f67a124d6f534 (diff) | |
download | FreeBSD-src-5558cc24b7e0bd341f099d2b9730d1ae90a0eb3b.zip FreeBSD-src-5558cc24b7e0bd341f099d2b9730d1ae90a0eb3b.tar.gz |
MFi386: use %rip - 1 for the symbol search address (for noreturn funcs)
Diffstat (limited to 'sys')
-rw-r--r-- | sys/amd64/amd64/db_trace.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/amd64/amd64/db_trace.c b/sys/amd64/amd64/db_trace.c index 995f5a6..ecdf277 100644 --- a/sys/amd64/amd64/db_trace.c +++ b/sys/amd64/amd64/db_trace.c @@ -302,10 +302,16 @@ db_nextframe(struct amd64_frame **fp, db_addr_t *ip, struct thread *td) rbp = db_get_value((long) &(*fp)->f_frame, 8, FALSE); /* - * Figure out frame type. + * Figure out frame type. We look at the address just before + * the saved instruction pointer as the saved EIP is after the + * call function, and if the function being called is marked as + * dead (such as panic() at the end of dblfault_handler()), then + * the instruction at the saved EIP will be part of a different + * function (syscall() in this example) rather than the one that + * actually made the call. */ frame_type = NORMAL; - sym = db_search_symbol(rip, DB_STGY_ANY, &offset); + sym = db_search_symbol(rip - 1, DB_STGY_ANY, &offset); db_symbol_values(sym, &name, NULL); if (name != NULL) { if (strcmp(name, "calltrap") == 0 || |