This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] preliminary support for hppa-linux


On Sat, Apr 03, 2004 at 10:44:32PM -0800, Randolph Chung wrote:
> Hi, this is part 1 of my attempt to get gdb support for hppa-linux
> upstream. There have been several failed attempts in the past... let's
> see if we can fix it for real this time :)
> 
> Attached is a "minimal" patch to get gdb building on hppa-linux and have
> some basic functionality. There are still many bugs which we will try to
> fix in subsequent patches. The bulk of this patch moves some
> hpux-specific code from hppa-tdep.c into hppa-hpux-tdep.c. This allows
> hppa-linux to share most of the code in hppa-tdep.c.
> 
> This patch contains a bit of code that has been floating around in
> Debian for a number of years. As far as I know, it was mostly 
> contributed by Alan Modra and David Huggin-Daines as part of LinuxCare's
> contract with HP for the initial hppa-linux work. In any case, there
> have been many changes to gdb since then and the patch has been changed
> many times by various people. As far as I know all the contributors have
> copyright assignment with the FSF.
> 
> Tested on hppa2.0w-hp-hpux11.11 (with gcc) and hppa-unknown-linux-gnu. 
> Comments appreciated.

This is too all-over-the-place.  This code has hung around for a number
of years now, and GDB's kept moving - so each bit of this needs to be
reviewed as we go along to make sure we don't re-add unnecessary
garbage.  For instance, GDB_TARGET_IS_PA_ELF is unused now, so there's
no content in tm-linux.h.

You also moved a lot of code out of hppa-tdep.c without ever adding
hppa-hpux-tdep.c to the HP/UX target - oops.

Let's do one thing at a time.  Could you submit a patch which just
moves the HP/UX code out of hppa-tdep.c, with the above problem fixed?
Preferably without changing any of it.

> 2004-04-03  Randolph Chung  <tausq@debian.org>
> 
> 	* hppa-tdep.c: (args_for_find_stub): Move to hppa-hpux-tdep.c
> 	(hp_som_som_object_present): Likewise.
> 	(exception_catchpoints_are_fragile): Likewise.

You can say:
	* hppa-tdep.c (args_for_find_stub, hp_som_som_object_present)
	(exception_catchpoints_are_fragile, find_stub_with_shl_get)
	[et cetera]
	(setup_d_pid_in_inferior): Move to hppa-hpux-tdep.c.
	* hppa-hpux-tdep.c: New file.


-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]