Recognize GDB's default breakpoint instruction (as of GDB 5.0), in addition to

the instruction we used with GDB 4.x.  The new instruction has the advantage
of fitting the pattern that ARM recommend using for instructions that need to
stay undefined.
This commit is contained in:
bjh21 2001-10-18 21:26:21 +00:00
parent e45efd967f
commit d3d2d8bdd7
2 changed files with 7 additions and 5 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: undefined.c,v 1.8 2001/03/17 18:12:09 bjh21 Exp $ */
/* $NetBSD: undefined.c,v 1.9 2001/10/18 21:26:21 bjh21 Exp $ */
/*
* Copyright (c) 2001 Ben Harris.
@ -52,7 +52,7 @@
#include <sys/param.h>
__KERNEL_RCSID(0, "$NetBSD: undefined.c,v 1.8 2001/03/17 18:12:09 bjh21 Exp $");
__KERNEL_RCSID(0, "$NetBSD: undefined.c,v 1.9 2001/10/18 21:26:21 bjh21 Exp $");
#include <sys/malloc.h>
#include <sys/queue.h>
@ -124,7 +124,8 @@ static int
gdb_trapper(u_int addr, u_int insn, struct trapframe *frame, int code)
{
if (insn == GDB_BREAKPOINT && code == FAULT_USER) {
if ((insn == GDB_BREAKPOINT || insn == GDB5_BREAKPOINT) &&
code == FAULT_USER) {
trapsignal(curproc, SIGTRAP, 0);
return 0;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: trap.h,v 1.2 2001/01/18 20:42:03 bjh21 Exp $ */
/* $NetBSD: trap.h,v 1.3 2001/10/18 21:26:23 bjh21 Exp $ */
/*
* Copyright (c) 1995 Mark Brinicombe.
@ -54,8 +54,9 @@
* instructions that look like 0x.7f...f. .
*/
#define GDB_BREAKPOINT 0xe6000011 /* Used by GDB */
#define GDB_BREAKPOINT 0xe6000011 /* Used by GDB 4.x */
#define IPKDB_BREAKPOINT 0xe6000010 /* Used by IPKDB */
#define GDB5_BREAKPOINT 0xe7ffdefe /* Used by GDB 5.0 */
#define KERNEL_BREAKPOINT 0xe7ffffff /* Used by DDB */
#define USER_BREAKPOINT GDB_BREAKPOINT