summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2018-04-27 08:14:15 +0000
committerguenther <guenther@openbsd.org>2018-04-27 08:14:15 +0000
commit11754b8350858fe8e18e56a9c81a9f49a02b6227 (patch)
treea4902e812edf04119b6a899dfda4a3fa1ee4223d
parentDelete superfluous includes of <sys/file.> (diff)
downloadwireguard-openbsd-11754b8350858fe8e18e56a9c81a9f49a02b6227.tar.xz
wireguard-openbsd-11754b8350858fe8e18e56a9c81a9f49a02b6227.zip
Fix the prologue detection to match amd64 opcodes, not i386 opcodes
ok mlarkin@
-rw-r--r--sys/arch/amd64/amd64/db_trace.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/arch/amd64/amd64/db_trace.c b/sys/arch/amd64/amd64/db_trace.c
index 8428af0eac0..e8ec7a3f60e 100644
--- a/sys/arch/amd64/amd64/db_trace.c
+++ b/sys/arch/amd64/amd64/db_trace.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_trace.c,v 1.39 2018/04/26 12:47:02 guenther Exp $ */
+/* $OpenBSD: db_trace.c,v 1.40 2018/04/27 08:14:15 guenther Exp $ */
/* $NetBSD: db_trace.c,v 1.1 2003/04/26 18:39:27 fvdl Exp $ */
/*
@@ -155,10 +155,10 @@ db_stack_trace_print(db_expr_t addr, boolean_t have_addr, db_expr_t count,
unsigned long instr = db_get_value(callpc, 8, FALSE);
offset = 1;
- if ((instr & 0x00ffffff) == 0x00e58955 ||
- /* enter: pushl %ebp, movl %esp, %ebp */
- (instr & 0x0000ffff) == 0x0000e589
- /* enter+1: movl %esp, %ebp */) {
+ if (instr == 0xe5894855 ||
+ /* enter: pushl %rbp, movq %rsp, %rbp */
+ (instr & 0x00ffffff) == 0x00e58948
+ /* enter+1: movq %rsp, %rbp */) {
offset = 0;
}
}