-/* $OpenBSD: db_trace.c,v 1.37 2017/12/08 08:54:03 mpi Exp $ */
+/* $OpenBSD: db_trace.c,v 1.38 2018/02/10 10:25:44 mpi Exp $ */
/* $NetBSD: db_trace.c,v 1.1 2003/04/26 18:39:27 fvdl Exp $ */
/*
continue;
}
- if (is_trap == INTERRUPT) {
+ if (is_trap == INTERRUPT && lastframe != NULL) {
/*
* Interrupt routines don't update %rbp, so it still
* points to the frame that was interrupted. Pull
* back to just above lastframe so we can find the
* trapframe as with syscalls and traps.
*/
- frame = (struct callframe *)db_get_value(
- (db_addr_t)&lastframe->f_retaddr, sizeof(long), 0);
+ frame = (struct callframe *)&lastframe->f_retaddr;
arg0 = &frame->f_arg0;
}
if (lastframe == NULL)
break;
- frame = (struct callframe *)db_get_value(
- (db_addr_t)&lastframe->f_retaddr,
- sizeof(long), 0);
+ frame =
+ (struct callframe *)&lastframe->f_retaddr;
}
lastframe = frame;