From owner-freebsd-current@FreeBSD.ORG Wed Sep 16 21:25:05 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 65F0F106566C for ; Wed, 16 Sep 2009 21:25:05 +0000 (UTC) (envelope-from andrew.cagney@gmail.com) Received: from mail-qy0-f189.google.com (mail-qy0-f189.google.com [209.85.221.189]) by mx1.freebsd.org (Postfix) with ESMTP id 23F8E8FC13 for ; Wed, 16 Sep 2009 21:25:04 +0000 (UTC) Received: by qyk27 with SMTP id 27so4341258qyk.13 for ; Wed, 16 Sep 2009 14:25:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:cc:content-type; bh=EwpXySvPg/27UD1cIZGIgv05oifvNM9BxjobxzNc21Q=; b=AcssFlXRd8wag1z9Ef64Pewo2AXYYn2ENxRKetBnTWMukCOkDKC9Z8eVprP+6zbwoi vs4z4/jtSfUAUmx9rOUv9dOzWNR8JKE7ghMYV2aJMvrcgw8eRzRCxQgevCcVIn98C//i 4tFS1/VCQfcDRErph9RjyyV1vSIx1xI0y7p18= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; b=fGxWnKz1ztqx2WtFVhsNmP6IiHiukgjQKGQiEzrWKQpsdEMbn1gZx2LGE3SwpfzcCu 14C5NPxuwJPrC9QvRno9TXBivV0hi/k6yQA3wGjZQabs5Mz3PUG55P0E0iTwaVrL3OHE TAbNGVcb7eEGxTnAXOUVi5G+rYWgY+5FJkx1s= MIME-Version: 1.0 Received: by 10.229.20.206 with SMTP id g14mr2675885qcb.32.1253133453214; Wed, 16 Sep 2009 13:37:33 -0700 (PDT) Date: Wed, 16 Sep 2009 16:37:33 -0400 Message-ID: From: Andrew Cagney To: dfr@rabson.org Content-Type: text/plain; charset=UTF-8 X-Mailman-Approved-At: Wed, 16 Sep 2009 21:39:01 +0000 Cc: freebsd-current@freebsd.org Subject: Re: New BSD licensed debugger X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Sep 2009 21:25:05 -0000 Wicked; the location code, in particular, is sick. As you've noticed, this isn't rocket science; and good language choice does make life easier. Several things to consider. Rather than frame-base, I'd use CFA or call-frame-address found in .debug_frame or CFI when identifying frames (and determining if the frame changed such as for step). In addition, since frameless functions don't modify the CFA (they don't use the stack) you'll want to be combining it with the function's address giving a FrameIdentifier (oh, and IA-64 has two stacks so ... :-) The unwinder looks to be trying to simultaneously handle both high-level inline and low-level ABI (CFA) frames, an alternative approach is to keep them separate (decorator pattern works well here) having an abi-only chain and then above that a chain of higher-level possibly inline frames. A non-polling implementation would make a long term goal - which requires a mechanism for simultaneously blocking on both process and i/o events - on linux, at least, this is still a rats nest of bugs.