diff options
author | Peter Wemm <peter@FreeBSD.org> | 2005-01-21 05:54:05 +0000 |
---|---|---|
committer | Peter Wemm <peter@FreeBSD.org> | 2005-01-21 05:54:05 +0000 |
commit | 6db058b5f1c402d538a3fd3479e26bb07bd9c296 (patch) | |
tree | ad46f78823698d6592c86a5e7ea25a71c69f01c0 /sys/amd64/amd64/db_trace.c | |
parent | 008c60183792c747646506fc8af01815d78e3d36 (diff) | |
download | src-6db058b5f1c402d538a3fd3479e26bb07bd9c296.tar.gz src-6db058b5f1c402d538a3fd3479e26bb07bd9c296.zip |
MFi386: use %rip - 1 for the symbol search address (for noreturn funcs)
Notes
Notes:
svn path=/head/; revision=140552
Diffstat (limited to 'sys/amd64/amd64/db_trace.c')
-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 995f5a668c7f..ecdf277c7bbc 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 || |