GDB - do we dare?
kettenis at chello.nl
Mon Jul 14 12:21:27 PDT 2003
Date: Sun, 13 Jul 2003 16:49:12 -0700
From: "David O'Brien" <obrien at FreeBSD.org>
On Sat, Jul 12, 2003 at 01:05:00PM +0200, Mark Kettenis wrote:
> Date: Fri, 11 Jul 2003 15:50:02 -0700
> From: Marcel Moolenaar <marcel at xcllnt.net>
> With the gcc(1) dust not even settled yet, I like to get some feedback
> on gdb(1). AFAICT, this is the deal:
> o Both ia64 and amd64 need gdb(1) support before they can become a
> tier 1 platform. I think this implies upgrading to 5.3 the least.
> Upgrading to 5.3 for amd64 won't really help. While 5.3 included
> support for amd64, I'm told it is seriously broken. Since then, I've
> almost completely reworked GDB's amd64 target, to bring it in line
> with the i386 target, and adapt it to some major architectural changes
> in GDB. Based on that work, I've finished a FreeBSD/amd64 port
> yesterday. I'll try to get it on GDB's 6.0 release branch. However,
> backporting it to 5.3 would be a major PITA and IMHO a tremendous
> waste of effort.
Not sure about that. I wish you would touch base with SuSE. AMD has had
SuSE do quite a lot of work to make GDB 5.3 very usable on AMD64. I know
there are parts of the work SuSE has yet to send to the GDB lists. I am
worried that FreeBSD's AMD64 bits will be too different from the Linux
ones and FreeBSD won't be able to leverage the work AMD is paying SuSE to
I'll ask Andreas about it. Rest assured that FreeBSD will benefit
from all the work that's being done on AMD64 Linux. I'm working
closely with both Andreas and Michal from SuSE to get their work
integrated as soon as possible although I've let some of the patches
they submitted slip through the cracks.
However, FreeBSD/sparc64 isn't properly supported in FSF GDB either.
When Jason Thorpe added NetBSD/sparc64 support he did it very NetBSD
specific rather than do it in a more general BSD/sparc64 way that all the
BSD's could leverage. Generalizing his bits is needed in the FSF GDB
I noticed, and have been working on this. Following Jason's track
isn't too difficult, and things can be made more generic rather
easily. I'll try to get my work integrated before the 6.0 release.
Unfortunately, GDB's sparc target has been unmaintained for quite some
time now. Because of architectural changes in GDB the code has become
a big mess of deprecated interfaces, and is almost unmaintainable
right now. I'll do my best to improve things but I can't guarantee
that all problems will be fixed before the 6.0 release.
> I'm not really familliar with the support for debugging FreeBSD
> kernels in GDB since that support is not in the FSF tree. Is there
> any chance that this code will be contributed back?
Probably not, but I'd love it if you would take a look at it -- the
times I've talked about to GDB guys hasn't been encouraging. How can we
work to get the bits in /usr/src/gnu/usr.bin/binutils/gdb made part of
stock FSF GDB (along with our diffs from the FSF vendor branch in
I've been snatching idea's from those places and incorporated them in
the FSF sources already. For larger chunks of code the status of its
copyright cleared up. Most of the code is definetly up to the
standards, and could be integrated without major changes. I can do
> This would involve a copyright assignment, which could prove to be a
> major obstacle.
We (I) can work to address this issue.
> A2 I'm volunteering to help out here. As the i386 target maintainer
> and FreeBSD host/native maintainer, I seem to have sufficient
> background in GDB I guess ;-). For almost two years now, I've been
> using FreeBSD/i386 as my primary (development) platform, and I hope
> at least some people have noticed that the upstream GDB works much
> better on FreeBSD/i386 and FreeBSD/Alpha now. Now that I've got it
> working on FreeBSD/amd64, I'll give FreeBSD/ia64 a shot.
Others may hate me for this, but getting stock GDB working on sparc64 is
of higher priority as it is a Tier-1 platform and we have more sparc64
users than ia64. Or maybe, you can help back me on the gdb-patches
mailing list and I can revive Jake's and my patches for sparc64.
I'll try to do that. As I said above, I've already been doing some
work, and I think I've most of the FreeBSD-specific code fleshed out
now (sharing things common with NetBSD). But if you find anything missing after I check things in, I'll try to back you, and approve patches myself if necessary.
> releases, I'm dedicated to FreeBSD, and I'm certainly willing to do
> work on integrating new versions of GDB into the FreeBSD tree.
I'm more than willing to mentor you what it takes to do a GDB import into
More information about the freebsd-current