From owner-freebsd-arch@FreeBSD.ORG Wed Feb 13 19:23:08 2013 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id D1224198; Wed, 13 Feb 2013 19:23:08 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-we0-x232.google.com (mail-we0-x232.google.com [IPv6:2a00:1450:400c:c03::232]) by mx1.freebsd.org (Postfix) with ESMTP id 1E438A7E; Wed, 13 Feb 2013 19:23:07 +0000 (UTC) Received: by mail-we0-f178.google.com with SMTP id x48so1299434wey.37 for ; Wed, 13 Feb 2013 11:23:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=jxLiSAcUoWuguSqRipZzyPZu5s5+nlbGKUG0AqX4wRQ=; b=EdZmBF/YrLwQLSE9lcPlcKzNB2mr6t4bHeQ+I4l8vDpBEQhf3KV36gc1ZlskH5oX4J 9mW/OR8+CBRBSpQGDyELNyfQZgFZmau/jdJa9X4ThArA1zLzafS8I+4dF+hbz520QemK urTgHNlBDpg9XIz+aPqRtoDIbXsiVc2YsNPU+rO+e/il3A6tnEdwixZvXqKdZfsi17bY MswfeKlTWDQRjYCjsxGHmvLdUFFV85DI9eA1jim8OxpuJ2vl2t9qWgj87Ov274ajGMx0 LxJ9D0PbNjGdleQV9sLieh6VpUlQzHa+vj7kz6VXKzM99EM9m7DwoSYX+lmFMc+Vaeem bsyw== MIME-Version: 1.0 X-Received: by 10.194.108.101 with SMTP id hj5mr40379962wjb.6.1360783387206; Wed, 13 Feb 2013 11:23:07 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.236.88 with HTTP; Wed, 13 Feb 2013 11:23:06 -0800 (PST) In-Reply-To: <201302131038.57250.jhb@freebsd.org> References: <201302120134.r1C1Ycfh026347@chez.mckusick.com> <201302131038.57250.jhb@freebsd.org> Date: Wed, 13 Feb 2013 11:23:06 -0800 X-Google-Sender-Auth: wVWnIARJg_dT9bHHv2m6nuuGH1g Message-ID: Subject: Re: Proposal: Unify printing the function name in panic messages() From: Adrian Chadd To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 Cc: Kirk McKusick , Christoph Mallon , Andriy Gapon , freebsd-arch@freebsd.org X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Feb 2013 19:23:08 -0000 ... I hate to be a jerk, but something tells me that relying on the output of text strings as to the panic cause and then parsing those is maybe not the right thing to do. If it were me, I'd do something like the gettext string API - ie, panic wouldn't take a string, but a panic string ID, which would translate to an enum as well as map to a string.. then you could pull that off. Adrian