* [patch/rfa] Check kernel version for header
@ 2004-06-07 1:35 Randolph Chung
2004-06-07 14:06 ` Andrew Cagney
0 siblings, 1 reply; 3+ messages in thread
From: Randolph Chung @ 2004-06-07 1:35 UTC (permalink / raw)
To: gdb-patches
I have a request from the Gentoo maintainers to include this patch. I
don't know if there's any policy/precedence for similar patches that
depends on kernel versions for header files. comments?
randolph
2004-06-06 Guy Martin <gmsoft@gentoo.org>
* hppa-linux-nat.c: Include the correct version of the header file
depending on the kernel version.
Index: hppa-linux-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/hppa-linux-nat.c,v
retrieving revision 1.3
diff -u -p -r1.3 hppa-linux-nat.c
--- hppa-linux-nat.c 8 May 2004 03:27:24 -0000 1.3
+++ hppa-linux-nat.c 7 Jun 2004 01:28:11 -0000
@@ -27,7 +27,13 @@
#include <sys/procfs.h>
#include <sys/ptrace.h>
#include <string.h>
+#include <linux/version.h>
+
+#if LINUX_VERSION_CODE < 0x02052c
+#include <asm/offset.h>
+#else
#include <asm/offsets.h>
+#endif
#include "hppa-tdep.h"
--
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch/rfa] Check kernel version for header
2004-06-07 1:35 [patch/rfa] Check kernel version for header Randolph Chung
@ 2004-06-07 14:06 ` Andrew Cagney
2004-06-07 15:05 ` Randolph Chung
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Cagney @ 2004-06-07 14:06 UTC (permalink / raw)
To: Randolph Chung; +Cc: gdb-patches
> I have a request from the Gentoo maintainers to include this patch. I
> don't know if there's any policy/precedence for similar patches that
> depends on kernel versions for header files. comments?
Short answer: I've no idea.
Long answer: I suspect that it is being included to gain access to
certain regset offsets used when handling regsets. The `correct fix' is
to move the code to hppa-linux-tdep.[hc], make it independant of
<asm/offsets.h>, and wire it into the regset framework.
(I can hear the groans :-). Just remember that the latter will be
needed anyway if both 32x64 and remote debugging are to be fully supported.
In the mean time `what ever' :-)
> randolph
>
> 2004-06-06 Guy Martin <gmsoft@gentoo.org>
Add a line here reading `Committed by ...'. It makes tracking paperwork
easier. You'll see other examples further down.
Andrew
> * hppa-linux-nat.c: Include the correct version of the header file
> depending on the kernel version.
>
> Index: hppa-linux-nat.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/hppa-linux-nat.c,v
> retrieving revision 1.3
> diff -u -p -r1.3 hppa-linux-nat.c
> --- hppa-linux-nat.c 8 May 2004 03:27:24 -0000 1.3
> +++ hppa-linux-nat.c 7 Jun 2004 01:28:11 -0000
> @@ -27,7 +27,13 @@
> #include <sys/procfs.h>
> #include <sys/ptrace.h>
> #include <string.h>
> +#include <linux/version.h>
> +
> +#if LINUX_VERSION_CODE < 0x02052c
> +#include <asm/offset.h>
> +#else
> #include <asm/offsets.h>
> +#endif
>
> #include "hppa-tdep.h"
>
> -- Randolph Chung Debian GNU/Linux Developer, hppa/ia64 ports http://www.tausq.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch/rfa] Check kernel version for header
2004-06-07 14:06 ` Andrew Cagney
@ 2004-06-07 15:05 ` Randolph Chung
0 siblings, 0 replies; 3+ messages in thread
From: Randolph Chung @ 2004-06-07 15:05 UTC (permalink / raw)
To: Andrew Cagney; +Cc: gdb-patches
> Long answer: I suspect that it is being included to gain access to
> certain regset offsets used when handling regsets.
Yes, correct.
> The `correct fix' is
> to move the code to hppa-linux-tdep.[hc], make it independant of
> <asm/offsets.h>, and wire it into the regset framework.
>
> (I can hear the groans :-). Just remember that the latter will be
> needed anyway if both 32x64 and remote debugging are to be fully supported.
>
> In the mean time `what ever' :-)
ok :)
randolph
--
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-06-07 15:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-07 1:35 [patch/rfa] Check kernel version for header Randolph Chung
2004-06-07 14:06 ` Andrew Cagney
2004-06-07 15:05 ` Randolph Chung
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox