Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/i386/include Define PTRACE_BREAKPOINT_ASM for i386 ...



details:   https://anonhg.NetBSD.org/src/rev/3efe532e4e09
branches:  trunk
changeset: 319251:3efe532e4e09
user:      kamil <kamil%NetBSD.org@localhost>
date:      Tue May 22 21:03:09 2018 +0000

description:
Define PTRACE_BREAKPOINT_ASM for i386 in the MD part of <sys/ptrace.h>

x86 uses int3 for software breakpoint on i386 and amd64.

Sponsored by <The NetBSD Foundation>

diffstat:

 sys/arch/i386/include/ptrace.h |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (17 lines):

diff -r 107aa09b2ee5 -r 3efe532e4e09 sys/arch/i386/include/ptrace.h
--- a/sys/arch/i386/include/ptrace.h    Tue May 22 17:14:46 2018 +0000
+++ b/sys/arch/i386/include/ptrace.h    Tue May 22 21:03:09 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ptrace.h,v 1.19 2017/04/08 02:02:30 kamil Exp $        */
+/*     $NetBSD: ptrace.h,v 1.20 2018/05/22 21:03:09 kamil Exp $        */
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -112,6 +112,7 @@
 #define PTRACE_REG_INTRV(r)    (r)->r_eax
 
 #define PTRACE_BREAKPOINT      ((const uint8_t[]) { 0xcc })
+#define PTRACE_BREAKPOINT_ASM  __asm __volatile ("int3" : : : "memory")
 #define PTRACE_BREAKPOINT_SIZE 1
 #define PTRACE_BREAKPOINT_ADJ  sizeof(PTRACE_BREAKPOINT)
 



Home | Main Index | Thread Index | Old Index