Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Include param.h on FreeBSD/i386
@ 2002-06-28 13:15 David O'Brien
  2002-06-30  7:54 ` Mark Kettenis
  0 siblings, 1 reply; 6+ messages in thread
From: David O'Brien @ 2002-06-28 13:15 UTC (permalink / raw)
  To: gdb-patches

I applied this patch to both mainline and 5.2_branch:

2002-06-28  David O'Brien  <obrien@FreeBSD.org>

	* config/i386/nm-fbsd.h: Include <sys/param.h>.
	* config/i386/tm-fbsd.h: Likewise.

Index: config/i386/nm-fbsd.h
===================================================================
RCS file: /cvs/src/src/gdb/config/i386/nm-fbsd.h,v
retrieving revision 1.6
diff -u -r1.6 nm-fbsd.h
--- config/i386/nm-fbsd.h	31 Mar 2002 17:47:17 -0000	1.6
+++ config/i386/nm-fbsd.h	28 Jun 2002 18:44:16 -0000
@@ -28,6 +28,10 @@
 
 #include "i386/nm-i386.h"
 
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+
 /* Provide access to the i386 hardware debugging registers.  */
 
 #define I386_DR_LOW_SET_CONTROL(control) \
Index: config/i386/tm-fbsd.h
===================================================================
RCS file: /cvs/src/src/gdb/config/i386/tm-fbsd.h,v
retrieving revision 1.7
diff -u -r1.7 tm-fbsd.h
--- config/i386/tm-fbsd.h	15 Jun 2002 18:09:31 -0000	1.7
+++ config/i386/tm-fbsd.h	28 Jun 2002 18:44:16 -0000
@@ -23,6 +23,10 @@
 
 #include "i386/tm-i386.h"
 
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+
 /* These defines allow the recognition of sigtramps as a function name
    <sigtramp>.
 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Include param.h on FreeBSD/i386
  2002-06-28 13:15 Include param.h on FreeBSD/i386 David O'Brien
@ 2002-06-30  7:54 ` Mark Kettenis
  2002-06-30 12:00   ` David O'Brien
  0 siblings, 1 reply; 6+ messages in thread
From: Mark Kettenis @ 2002-06-30  7:54 UTC (permalink / raw)
  To: obrien; +Cc: gdb-patches

"David O'Brien" <obrien@FreeBSD.org> writes:

> I applied this patch to both mainline and 5.2_branch:
> 
> 2002-06-28  David O'Brien  <obrien@FreeBSD.org>
> 
> 	* config/i386/nm-fbsd.h: Include <sys/param.h>.
> 	* config/i386/tm-fbsd.h: Likewise.

Hi David.  Can you tell me why this is needed?  Including
<sys/param.h> from config/i386/tm-fbsd.h isn't right since this file
is going to be removed in the not so distant future, and I have my
doubts about the change to config/i386/nm-fbsd.h too.  If there is GDB
code that needs <sys/param.h> we should probably add it to the
appropriate files, not to the global nm.h.

Mark


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Include param.h on FreeBSD/i386
  2002-06-30  7:54 ` Mark Kettenis
@ 2002-06-30 12:00   ` David O'Brien
  2002-06-30 12:05     ` Daniel Jacobowitz
  0 siblings, 1 reply; 6+ messages in thread
From: David O'Brien @ 2002-06-30 12:00 UTC (permalink / raw)
  To: Mark Kettenis; +Cc: gdb-patches

On Sun, Jun 30, 2002 at 04:54:48PM +0200, Mark Kettenis wrote:
> "David O'Brien" <obrien@FreeBSD.org> writes:
> 
> > I applied this patch to both mainline and 5.2_branch:
> > 
> > 2002-06-28  David O'Brien  <obrien@FreeBSD.org>
> > 
> > 	* config/i386/nm-fbsd.h: Include <sys/param.h>.
> > 	* config/i386/tm-fbsd.h: Likewise.
> 
> Hi David.  Can you tell me why this is needed?

Some code I added to GDB 5.2 in the FreeBSD source tree needs it.  That
code isn't ready to submit back yet.  Since the include is benign but I
wanted to reduce the diffs where easy.  I actually don't need it in
nm-fbsd.h any more.  

> Including
> <sys/param.h> from config/i386/tm-fbsd.h isn't right since this file
> is going to be removed in the not so distant future,

No problem, I'll reimpliment when that happens.

-- 
-- David  (obrien@FreeBSD.org)


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Include param.h on FreeBSD/i386
  2002-06-30 12:00   ` David O'Brien
@ 2002-06-30 12:05     ` Daniel Jacobowitz
  2002-06-30 12:33       ` David O'Brien
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Jacobowitz @ 2002-06-30 12:05 UTC (permalink / raw)
  To: David O'Brien; +Cc: Mark Kettenis, gdb-patches

On Sun, Jun 30, 2002 at 12:00:03PM -0700, David O'Brien wrote:
> On Sun, Jun 30, 2002 at 04:54:48PM +0200, Mark Kettenis wrote:
> > "David O'Brien" <obrien@FreeBSD.org> writes:
> > 
> > > I applied this patch to both mainline and 5.2_branch:
> > > 
> > > 2002-06-28  David O'Brien  <obrien@FreeBSD.org>
> > > 
> > > 	* config/i386/nm-fbsd.h: Include <sys/param.h>.
> > > 	* config/i386/tm-fbsd.h: Likewise.
> > 
> > Hi David.  Can you tell me why this is needed?
> 
> Some code I added to GDB 5.2 in the FreeBSD source tree needs it.  That
> code isn't ready to submit back yet.  Since the include is benign but I
> wanted to reduce the diffs where easy.  I actually don't need it in
> nm-fbsd.h any more.  
> 
> > Including
> > <sys/param.h> from config/i386/tm-fbsd.h isn't right since this file
> > is going to be removed in the not so distant future,
> 
> No problem, I'll reimpliment when that happens.

Including system headers from the tm file is always pretty dodgy - what
do you need it for?  How does that include affect cross-debuggers?

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Include param.h on FreeBSD/i386
  2002-06-30 12:05     ` Daniel Jacobowitz
@ 2002-06-30 12:33       ` David O'Brien
  2002-06-30 12:46         ` Daniel Jacobowitz
  0 siblings, 1 reply; 6+ messages in thread
From: David O'Brien @ 2002-06-30 12:33 UTC (permalink / raw)
  To: Mark Kettenis, gdb-patches

On Sun, Jun 30, 2002 at 03:04:36PM -0400, Daniel Jacobowitz wrote:
> > > > 2002-06-28  David O'Brien  <obrien@FreeBSD.org>
> > > > 
> > > > 	* config/i386/nm-fbsd.h: Include <sys/param.h>.
> > > > 	* config/i386/tm-fbsd.h: Likewise.
> > > 
> > > Hi David.  Can you tell me why this is needed?
> > 
> > Some code I added to GDB 5.2 in the FreeBSD source tree needs it.  That
> > code isn't ready to submit back yet.  Since the include is benign but I
> > wanted to reduce the diffs where easy.
..snip..
> Including system headers from the tm file is always pretty dodgy - what
> do you need it for?  How does that include affect cross-debuggers?

I needed the __FreeBSD_version symbol and a few of the headers param.h
includes.  For building a cross-debugger (cross-arch, not cross-OS) w/in
the FreeBSD source tree this is still needed (and works).

As I mentioned the commit was to reduce changes I have to make in he
FreeBSD tree.  I didn't think a benign include in a FreeBSD-specific
header would raise an eyebrow.  :-)


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Include param.h on FreeBSD/i386
  2002-06-30 12:33       ` David O'Brien
@ 2002-06-30 12:46         ` Daniel Jacobowitz
  0 siblings, 0 replies; 6+ messages in thread
From: Daniel Jacobowitz @ 2002-06-30 12:46 UTC (permalink / raw)
  To: David O'Brien; +Cc: Mark Kettenis, gdb-patches

On Sun, Jun 30, 2002 at 12:33:46PM -0700, David O'Brien wrote:
> On Sun, Jun 30, 2002 at 03:04:36PM -0400, Daniel Jacobowitz wrote:
> > > > > 2002-06-28  David O'Brien  <obrien@FreeBSD.org>
> > > > > 
> > > > > 	* config/i386/nm-fbsd.h: Include <sys/param.h>.
> > > > > 	* config/i386/tm-fbsd.h: Likewise.
> > > > 
> > > > Hi David.  Can you tell me why this is needed?
> > > 
> > > Some code I added to GDB 5.2 in the FreeBSD source tree needs it.  That
> > > code isn't ready to submit back yet.  Since the include is benign but I
> > > wanted to reduce the diffs where easy.
> ..snip..
> > Including system headers from the tm file is always pretty dodgy - what
> > do you need it for?  How does that include affect cross-debuggers?
> 
> I needed the __FreeBSD_version symbol and a few of the headers param.h
> includes.  For building a cross-debugger (cross-arch, not cross-OS) w/in
> the FreeBSD source tree this is still needed (and works).
> 
> As I mentioned the commit was to reduce changes I have to make in he
> FreeBSD tree.  I didn't think a benign include in a FreeBSD-specific
> header would raise an eyebrow.  :-)

Well, if you're going to use such a symbol please comment explicitly
why; it'll be a stumbling block for someone trying to build a cross-os
debugger.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2002-06-30 19:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-06-28 13:15 Include param.h on FreeBSD/i386 David O'Brien
2002-06-30  7:54 ` Mark Kettenis
2002-06-30 12:00   ` David O'Brien
2002-06-30 12:05     ` Daniel Jacobowitz
2002-06-30 12:33       ` David O'Brien
2002-06-30 12:46         ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox