NetBSD Problem Report #16799
Received: (qmail 23001 invoked from network); 14 May 2002 03:27:44 -0000
Message-Id: <200205140248.g4E2m8o25441@mail.Pin.LU>
Date: Tue, 14 May 2002 04:48:08 +0200 (CEST)
From: chris@Pin.LU
Reply-To: chris@Pin.LU
To: gnats-bugs@gnats.netbsd.org
Subject: gdb can't set breakpoint on remote m68k target
X-Send-Pr-Version: 3.95
>Number: 16799
>Category: toolchain
>Synopsis: gdb can't set breakpoint on remote m68k target
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: toolchain-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue May 14 03:28:00 +0000 2002
>Closed-Date:
>Last-Modified:
>Originator: Christian Limpach
>Release: current (as of May 14 2002)
>Organization:
>Environment:
System: NetBSD clapper 1.5ZC NetBSD 1.5ZC (CLAPPER) #46: Mon May 13 20:51:50 CEST 2002 root@marble:/devel/netbsd/src-current/sys/arch/next68k/compile/CLAPPER next68k
>Description:
gdb uses the wrong trap to set remote breakpoints.
config/m68k/tm-nbsd.h doesn't define REMOTE_BPT_VECTOR, gdb uses the
default 0x1. REMOTE_BPT_VECTOR has to be defined to 0xf as it's done
in the non-toolchain gdb.
>How-To-Repeat:
Set a breakpoint with remote gdb on m68k target.
When the breakpoint is reached, the target machine panics
and drops to gdb but it's not possible to resume execution.
>Fix:
The following patch fixes the problem.
Index: dist/toolchain/gdb/config/m68k/tm-nbsd.h
===================================================================
RCS file: /cvsroot/gnusrc/gnu/dist/toolchain/gdb/config/m68k/tm-nbsd.h,v
retrieving revision 1.4
diff -u -r1.4 tm-nbsd.h
--- tm-nbsd.h 2002/05/10 21:24:51 1.4
+++ tm-nbsd.h 2002/05/14 02:58:46
@@ -21,10 +21,9 @@
#ifndef TM_NBSD_H
#define TM_NBSD_H
-/* Define BPT_VECTOR if it is different than the default.
- This is the vector number used by traps to indicate a breakpoint. */
-
-#define BPT_VECTOR 0x2
+/* NetBSD uses trap 15 for both user and kernel breakpoints. */
+#define BPT_VECTOR 0xf
+#define REMOTE_BPT_VECTOR 0xf
/* For NetBSD, sigtramp is 32 bytes before STACK_END_ADDR,
but we don't know where that is until run-time! */
>Release-Note:
>Audit-Trail:
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.