From owner-freebsd-arch@FreeBSD.ORG Tue Jul 5 00:21:11 2005 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A775A16A41C for ; Tue, 5 Jul 2005 00:21:11 +0000 (GMT) (envelope-from marcel@xcllnt.net) Received: from ns1.xcllnt.net (209-128-86-226.bayarea.net [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 685EC43D45 for ; Tue, 5 Jul 2005 00:21:11 +0000 (GMT) (envelope-from marcel@xcllnt.net) Received: from [192.168.4.250] (dhcp50.pn.xcllnt.net [192.168.4.250]) by ns1.xcllnt.net (8.13.3/8.13.3) with ESMTP id j650L94W010232; Mon, 4 Jul 2005 17:21:10 -0700 (PDT) (envelope-from marcel@xcllnt.net) In-Reply-To: <20050704231359.GA58430@sandvine.com> References: <20050623102024.GA89874@frontfree.net> <200506231815.44052.peter@wemm.org> <20050704231359.GA58430@sandvine.com> Mime-Version: 1.0 (Apple Message framework v622) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <0674fbcfaecb08e9ffb3a39eaa9cf3d2@xcllnt.net> Content-Transfer-Encoding: 7bit From: Marcel Moolenaar Date: Mon, 4 Jul 2005 17:21:10 -0700 To: Ed Maste X-Mailer: Apple Mail (2.622) X-Mailman-Approved-At: Tue, 05 Jul 2005 12:35:15 +0000 Cc: freebsd-arch@freebsd.org Subject: Re: How to get stack from every thread when doing crash dump? X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jul 2005 00:21:11 -0000 On Jul 4, 2005, at 4:14 PM, Ed Maste wrote: > I tried changing the linker script to put both in the .debug_frame > section, but ld faild ("Not enough room for program headers"). The > .eh_frame section is marked loadable, so it seems ld still tries to > create a phdr entry for it. Once I can figure out how to address > that I'll test out adding the .cfi_ pseudo-ops to exception.s. This will not resolve the problem. The problem relates to how signal frames need to be handled in userland code. In order to unwind across traps and signal frames, the debugger needs to know 2 things: which functions are for kernel entry (or signal trampoline) and how to get to the saved registers. Only the first can possibly be addressed by unwind information. One still need to teach the debugger about the trapframes (or signal frames) themselves. I'm working on the import of GDB 6.3, which allows us to handle this case by registering special frame unwinders. Adding .cfi directives is probably a good idea, but it needs a bit more work to fix backtraces. -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net