[commit] Fix OpenBSD/i386 and OpenBSD/amd64 kernel trapframe unwinders
Daniel Jacobowitz
drow@false.org
Thu Dec 22 19:45:00 GMT 2005
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
More information about the Gdb-patches
mailing list