From owner-freebsd-arm@FreeBSD.ORG Sun Dec 22 11:22:40 2013 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B094CB12 for ; Sun, 22 Dec 2013 11:22:40 +0000 (UTC) Received: from mail-qc0-x231.google.com (mail-qc0-x231.google.com [IPv6:2607:f8b0:400d:c01::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 699A115B9 for ; Sun, 22 Dec 2013 11:22:40 +0000 (UTC) Received: by mail-qc0-f177.google.com with SMTP id m20so3855951qcx.22 for ; Sun, 22 Dec 2013 03:22:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=fo1eOBz9SEvDCWPwGl6YZgQU9qs8MVrUk8zGv+CXnTo=; b=Hn0yBRFrbPEeu7839aF4vLDN+j1OaMxj51LQ2VI+xLCB/0lBoyzGL2/JaMBpzAFaRl jP4ny3BnhQCdFlTrRWj1EYPcbohvigz4vxu828ydf81+sMfz+5RPlIZBNFVLz59WUHU9 uasbfvkgM5RUzgdsnTTZ6Y1osPYI4QEMQuEtUN8kBi+xLSdBhJIw2Pbm/VRYnx9aneJE XrKUK0ejhr2/Z/J8OSyXkopusVXq+ply0WHXplQNJFFhvz6bWlc244WRi/A9mMQG4YMo VHWONBb/4kR7cqM0+Jjbom3AWsHwt4w/+05gSiiyumxOCkokXd+XL0DTmX+/T1kyBCoC 5+OQ== MIME-Version: 1.0 X-Received: by 10.224.127.74 with SMTP id f10mr31846107qas.56.1387711359658; Sun, 22 Dec 2013 03:22:39 -0800 (PST) Received: by 10.224.130.194 with HTTP; Sun, 22 Dec 2013 03:22:39 -0800 (PST) In-Reply-To: <20131222104721.22b1bd45@bender.Home> References: <20131215173042.0dead636@bender.Home> <20131222104721.22b1bd45@bender.Home> Date: Sun, 22 Dec 2013 19:22:39 +0800 Message-ID: Subject: Re: [PATCH] Add stack unwind support for the functions in .ko From: Howard Su To: Andrew Turner Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.17 Cc: freebsd-arm X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Dec 2013 11:22:40 -0000 On Sunday, December 22, 2013, Andrew Turner wrote: > On Sun, 22 Dec 2013 17:50:31 +0800 > Howard Su > wrote: > > > here is the new version which address the print registers out problem. > > There are a number of style bugs in this patch: make sure you limit > lines to 80 characters; indentation should use tabs, followed by 4 > spaces if you need to split a long line; braces should be at the end of > a line when used with an if, for or while statement. > Sure. I will fix style(9) issues. > > You've added the A0 register. I don't see where it is defined by ARM as > a register name or synonym. It is also used to adjust which bit from a > bitmask we check. This would mean we read the wrong bit and may get a > register that was never updated. Because of this we will never read r0. > Let me find a better name for this macro. What I want is the macro describe the register contains first parameter. > > Andrew > > > > > On Monday, December 16, 2013, Warner Losh wrote: > > > > > > > > On Dec 15, 2013, at 4:56 PM, Howard Su wrote: > > > > > > > On Monday, December 16, 2013, Andrew Turner wrote: > > > > > > > >> On Mon, 9 Dec 2013 22:44:14 +0800 > > > >> Howard Su > > > > > >> wrote: > > > >> > > > >>> Here is a new version which solve the unreadable $a problem. > > > >>> (the fix is in ddb/db_main.c in the end of the patch.) > > > >>> > > > >>> I attached the diff for review. > > > >> > > > >> I can't comment on the MD parts of the code, but the ARM change > > > >> looks good. My only request is to add a kernel option to turn on > > > >> printing the registers in the stack trace as it has been useful > > > >> for tracking down bugs. > > > >> > > > > I read the MD code of MIPS. seems it faces the same situation > > > > like arm (register pass parameter). I will follow its pattern to > > > > print out > > > register. > > > > better than an option? > > > > > > I thought MIPS printed the args from those registers as args and > > > ARM was the odd man out... > > > > > > Warner > > > > > > > > > > -- -Howard