Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [patch] arm-netbsd clean up native include file.
@ 2002-05-15  9:25 Richard Earnshaw
  2002-05-15 10:01 ` Andrew Cagney
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Earnshaw @ 2002-05-15  9:25 UTC (permalink / raw)
  To: gdb-patches; +Cc: Richard.Earnshaw

[-- Attachment #1: Type: text/plain, Size: 455 bytes --]


The native include file for arm*-*-netbsd* was

1) Using #include "nm-nbsd.h" which was potentially self-recursive

2) Defining REGISTER_U_ADDR to call a function that doesn't exist.

Fortunately we never compiled a file that needed this definition ;-)

2002-05-15  Richard Earnshaw  <rearnsha@arm.com>

	* config/arm/nm-nbsd.h: Use <> for include of config/nm-nbsd.h.
	(REGISTER_U_ADDR): Delete definition.
	(arm_register_u_addr): Delete declaration.



[-- Attachment #2: gdb-nbsdreg.patch --]
[-- Type: text/x-patch , Size: 747 bytes --]

Index: config/arm/nm-nbsd.h
===================================================================
RCS file: /cvs/src/src/gdb/config/arm/nm-nbsd.h,v
retrieving revision 1.2
diff -p -r1.2 nm-nbsd.h
*** config/arm/nm-nbsd.h	9 Jan 2002 18:39:37 -0000	1.2
--- config/arm/nm-nbsd.h	15 May 2002 16:17:29 -0000
***************
*** 22,33 ****
  #define NM_NBSD_H
  
  /* Get generic NetBSD native definitions. */
! #include "nm-nbsd.h"
! 
! #define REGISTER_U_ADDR(addr, blockend, regno) \
! 	(addr) = arm_register_u_addr ((blockend),(regno));
! 
! extern int
! arm_register_u_addr (int, int);
  
  #endif /* NM_NBSD_H */
--- 22,27 ----
  #define NM_NBSD_H
  
  /* Get generic NetBSD native definitions. */
! #include <nm-nbsd.h>
  
  #endif /* NM_NBSD_H */

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

* Re: [patch] arm-netbsd clean up native include file.
  2002-05-15  9:25 [patch] arm-netbsd clean up native include file Richard Earnshaw
@ 2002-05-15 10:01 ` Andrew Cagney
  2002-05-15 10:07   ` Richard Earnshaw
  0 siblings, 1 reply; 6+ messages in thread
From: Andrew Cagney @ 2002-05-15 10:01 UTC (permalink / raw)
  To: Richard.Earnshaw; +Cc: gdb-patches

>   /* Get generic NetBSD native definitions. */
> ! #include <nm-nbsd.h>

Use "config/nm-nbsd.h".  That way there is no question as to where it is 
comming from.

Andrew



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

* Re: [patch] arm-netbsd clean up native include file.
  2002-05-15 10:01 ` Andrew Cagney
@ 2002-05-15 10:07   ` Richard Earnshaw
  2002-05-15 10:31     ` Andrew Cagney
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Earnshaw @ 2002-05-15 10:07 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: Richard.Earnshaw, gdb-patches

> >   /* Get generic NetBSD native definitions. */
> > ! #include <nm-nbsd.h>
> 
> Use "config/nm-nbsd.h".  That way there is no question as to where it is 
> comming from.

Nor should there be with <nm-nbsd.h>, since config/arm isn't on the 
include path.  This is the convention in all the other include files I've 
seen that play this sort of game.

R.


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

* Re: [patch] arm-netbsd clean up native include file.
  2002-05-15 10:07   ` Richard Earnshaw
@ 2002-05-15 10:31     ` Andrew Cagney
  2002-05-15 10:41       ` Richard Earnshaw
  0 siblings, 1 reply; 6+ messages in thread
From: Andrew Cagney @ 2002-05-15 10:31 UTC (permalink / raw)
  To: Richard.Earnshaw; +Cc: gdb-patches

> 
> Nor should there be with <nm-nbsd.h>, since config/arm isn't on the 
> include path.  This is the convention in all the other include files I've 
> seen that play this sort of game.

True.  GDB tends to play this game:

config/i386/nm-nbsd.h:#include "config/nm-nbsd.h"
config/i386/tm-nbsd.h:#include "config/tm-nbsd.h"
config/sparc/nm-nbsd.h:#include "config/nm-nbsd.h"

So the question of <> behavour is avoided.

Andrew



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

* Re: [patch] arm-netbsd clean up native include file.
  2002-05-15 10:31     ` Andrew Cagney
@ 2002-05-15 10:41       ` Richard Earnshaw
  2002-05-16  7:01         ` Richard Earnshaw
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Earnshaw @ 2002-05-15 10:41 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: Richard.Earnshaw, gdb-patches

> > 
> > Nor should there be with <nm-nbsd.h>, since config/arm isn't on the 
> > include path.  This is the convention in all the other include files I've 
> > seen that play this sort of game.
> 
> True.  GDB tends to play this game:
> 
> config/i386/nm-nbsd.h:#include "config/nm-nbsd.h"
> config/i386/tm-nbsd.h:#include "config/tm-nbsd.h"
> config/sparc/nm-nbsd.h:#include "config/nm-nbsd.h"
> 
> So the question of <> behavour is avoided.
> 

True. I'll change it.

BTW

for i in `find . -name \*.h -print`
do
 base=`basename $i`
 fgrep \"$base\" $i /dev/null |grep include
done

./alpha/nm-linux.h:#include "nm-linux.h"
./arm/nm-linux.h:#include "nm-linux.h"
./arm/tm-linux.h:#include "tm-linux.h"
./arm/xm-nbsd.h:#include "xm-nbsd.h"
./i386/nm-gnu.h:#include "nm-gnu.h"
./i386/nm-m3.h:#include "nm-m3.h"
./i386/nm-linux.h:#include "nm-linux.h"
./i386/tm-linux.h:#include "tm-linux.h"
./i386/tm-vxworks.h:#include "tm-vxworks.h"
./i386/xm-nbsd.h:#include "xm-nbsd.h"
./ia64/nm-linux.h:#include "nm-linux.h"
./ia64/tm-linux.h:#include "tm-linux.h"
./m68k/nm-linux.h:#include "nm-linux.h"
./m68k/nm-nbsd.h:#include "nm-nbsd.h"
./m68k/nm-sysv4.h:#include "nm-sysv4.h"
./m68k/tm-linux.h:#include "tm-linux.h"
./m68k/tm-nbsd.h:#include "tm-nbsd.h"
./m68k/xm-nbsd.h:#include "xm-nbsd.h"
./mips/nm-linux.h:#include "nm-linux.h"
./mips/tm-linux.h:#include "tm-linux.h"
./ns32k/nm-nbsd.h:#include "nm-nbsd.h"
./ns32k/tm-nbsd.h:#include "tm-nbsd.h"
./ns32k/xm-nbsd.h:#include "xm-nbsd.h"
./powerpc/nm-linux.h:#include "nm-linux.h"
./powerpc/nm-nbsd.h:#include "nm-nbsd.h"
./powerpc/tm-linux.h:#include "tm-linux.h"
./powerpc/tm-nbsd.h:#include "tm-nbsd.h"
./powerpc/tm-vxworks.h:#include "tm-vxworks.h"
./rs6000/xm-aix4.h:#include "xm-aix4.h"
./sh/tm-linux.h:#include "tm-linux.h"
./sparc/nm-linux.h:#include "nm-linux.h"
./sparc/tm-linux.h:#include "tm-linux.h"
./sparc/tm-nbsd.h:#include "tm-nbsd.h"
./sparc/xm-nbsd.h:#include "xm-nbsd.h"



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

* Re: [patch] arm-netbsd clean up native include file.
  2002-05-15 10:41       ` Richard Earnshaw
@ 2002-05-16  7:01         ` Richard Earnshaw
  0 siblings, 0 replies; 6+ messages in thread
From: Richard Earnshaw @ 2002-05-16  7:01 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: Richard.Earnshaw, gdb-patches

 > True.  GDB tends to play this game:
> > 
> > config/i386/nm-nbsd.h:#include "config/nm-nbsd.h"
> > config/i386/tm-nbsd.h:#include "config/tm-nbsd.h"
> > config/sparc/nm-nbsd.h:#include "config/nm-nbsd.h"
> > 
> > So the question of <> behavour is avoided.
> > 
> 
> True. I'll change it.

I've fixed the above.  Maybe you could think of a way of ARI-ing the 
others.

R.

> 
> BTW
> 
> for i in `find . -name \*.h -print`
> do
>  base=`basename $i`
>  fgrep \"$base\" $i /dev/null |grep include
> done
> 
> ./alpha/nm-linux.h:#include "nm-linux.h"
> ./arm/nm-linux.h:#include "nm-linux.h"
> ... 
> 



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

end of thread, other threads:[~2002-05-16 14:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-15  9:25 [patch] arm-netbsd clean up native include file Richard Earnshaw
2002-05-15 10:01 ` Andrew Cagney
2002-05-15 10:07   ` Richard Earnshaw
2002-05-15 10:31     ` Andrew Cagney
2002-05-15 10:41       ` Richard Earnshaw
2002-05-16  7:01         ` Richard Earnshaw

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