From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 17 19:32:21 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ABC8516A403 for ; Fri, 17 Nov 2006 19:32:21 +0000 (UTC) (envelope-from wyt168@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.173]) by mx1.FreeBSD.org (Postfix) with ESMTP id 067DC43D78 for ; Fri, 17 Nov 2006 19:32:14 +0000 (GMT) (envelope-from wyt168@gmail.com) Received: by ug-out-1314.google.com with SMTP id o2so712330uge for ; Fri, 17 Nov 2006 11:32:14 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=tHw9T3knY9y9uEmLgfqJswqRhDLowtCVB07oEhA5BXgbgOzPfvmbE0EYpG1ih1Vi5AZ9WLdx/HJtsmHaUNEs4bNNaQ91iAZOxkbh5+F8mA1UeS+JvD7XpJnIxAJJ6qht16saPgj/peHzl2yqK57DNlvefQY8kw/0MBa1FFaB6QQ= Received: by 10.67.117.2 with SMTP id u2mr1598329ugm.1163791933161; Fri, 17 Nov 2006 11:32:13 -0800 (PST) Received: by 10.67.87.1 with HTTP; Fri, 17 Nov 2006 11:32:13 -0800 (PST) Message-ID: <3dcda0520611171132q6f337e23j39f6fa8720feaf15@mail.gmail.com> Date: Fri, 17 Nov 2006 11:32:13 -0800 From: Winston To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Mailman-Approved-At: Fri, 17 Nov 2006 20:58:49 +0000 Subject: How to break into kernel debugger X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2006 19:32:21 -0000 I've set up kgdb for remote debugging over serial lines (null modem) between two machines. I can get into the debugger when I boot the target machine with "boot -d" and from the debugging machine with the command "target remote /dev/cuad1". However, once I let the debugger go with "continue" command, I can't break into the debugger anymore. If hit ctl-c once on the debugging machine, there is no response. Hit it again, I got: ^C Interrupted while waiting for the program. Give up (and stop debugging it)? (y or n) n The gdb doc mentioned this and stated: "Whenever gdb is waiting for the remote program, if you type the interrupt character (often Ctrl-c), gdb attempts to stop the program. This may or may not succeed, depending in part on the hardware and the serial drivers the remote system uses." However, it doesn't offer a suggestion as to how to make it work. I tried to set remotebreak to on with: set remotebreak on; But it still doesn't work. I search this mailing list and it appears there was an earlier thread "escape to kernel debugger" that enquired about the same thing. However, it was a while ago, and the options mentioned in the thread are not in the config file anymore. Any suggestions?