From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27439 invoked by alias); 22 Dec 2005 14:20:20 -0000 Received: (qmail 27418 invoked by uid 22791); 22 Dec 2005 14:20:18 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Thu, 22 Dec 2005 14:20:16 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1EpRIj-0000pS-UZ; Thu, 22 Dec 2005 09:20:14 -0500 Date: Thu, 22 Dec 2005 19:45:00 -0000 From: Daniel Jacobowitz To: Mark Kettenis Cc: gdb-patches@sourceware.org Subject: Re: [commit] Fix OpenBSD/i386 and OpenBSD/amd64 kernel trapframe unwinders Message-ID: <20051222142013.GA3110@nevyn.them.org> Mail-Followup-To: Mark Kettenis , gdb-patches@sourceware.org References: <200512221409.jBME9L7W005129@elgar.sibelius.xs4all.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200512221409.jBME9L7W005129@elgar.sibelius.xs4all.nl> User-Agent: Mutt/1.5.8i X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2005-12/txt/msg00263.txt.bz2 On Thu, Dec 22, 2005 at 03:09:21PM +0100, Mark Kettenis wrote: > + > + find_pc_partial_function (func, &name, NULL, NULL); > + if (name && strncmp(name, "Xintr", 5) == 0) > + addr = sp + 8; /* It's an interrupt frame. */ > + else > + addr = sp; > + Is this series of patches really a good idea? I realize there's no way to configure GDB at runtime to do this sort of thing, and I accept that that's a serious shortcoming that we eventually need to fix. But you're adding bits to the OpenBSD target that only make sense in terms of the naming conventions of a single OpenBSD program (which happens to be the kernel); I've resisted doing this in the past both for The Server Then Known As XFree86 and for the Linux kernel. Why should GDB know the names of functions in a single one of the infinitely many things it might be debugging? On a less metaphysical note, I'd worry about any other program with a function named Xintr. On a nitpicking note, you missed a space before a parenthesis above :-) -- Daniel Jacobowitz CodeSourcery, LLC