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]

[patch] Allow default XXX_P() when not multi-arch


FYI,

This just makes the conversion process slightly easier / more robust. 
Some older targets do strange things like:

	#define SOFTWARE_SINGLE_STEP_P() 0
	#define SOFTWARE_SINGLE_STEP(...) internal_error()

who am I to argue :-)

	Andrew
2001-03-21  Andrew Cagney  <ac131313@redhat.com>

	* gdbarch.sh: Allow a non- multi-arch target to override a
	predicate.
	* gdbarch.h: Regenerate.

Index: gdbarch.h
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.h,v
retrieving revision 1.43
diff -p -r1.43 gdbarch.h
*** gdbarch.h	2001/02/08 06:03:53	1.43
--- gdbarch.h	2001/03/21 19:45:34
*************** extern void set_gdbarch_register_sim_reg
*** 623,630 ****
--- 623,632 ----
  
  #if defined (REGISTER_BYTES_OK)
  /* Legacy for systems yet to multi-arch REGISTER_BYTES_OK */
+ #if !defined (REGISTER_BYTES_OK_P)
  #define REGISTER_BYTES_OK_P() (1)
  #endif
+ #endif
  
  /* Default predicate for non- multi-arch targets. */
  #if (!GDB_MULTI_ARCH) && !defined (REGISTER_BYTES_OK_P)
*************** extern void set_gdbarch_frame_num_args (
*** 1310,1317 ****
--- 1312,1321 ----
  
  #if defined (STACK_ALIGN)
  /* Legacy for systems yet to multi-arch STACK_ALIGN */
+ #if !defined (STACK_ALIGN_P)
  #define STACK_ALIGN_P() (1)
  #endif
+ #endif
  
  /* Default predicate for non- multi-arch targets. */
  #if (!GDB_MULTI_ARCH) && !defined (STACK_ALIGN_P)
*************** extern void set_gdbarch_extra_stack_alig
*** 1352,1359 ****
--- 1356,1365 ----
  
  #if defined (REG_STRUCT_HAS_ADDR)
  /* Legacy for systems yet to multi-arch REG_STRUCT_HAS_ADDR */
+ #if !defined (REG_STRUCT_HAS_ADDR_P)
  #define REG_STRUCT_HAS_ADDR_P() (1)
  #endif
+ #endif
  
  /* Default predicate for non- multi-arch targets. */
  #if (!GDB_MULTI_ARCH) && !defined (REG_STRUCT_HAS_ADDR_P)
*************** extern void set_gdbarch_reg_struct_has_a
*** 1381,1387 ****
--- 1387,1395 ----
  
  #if defined (SAVE_DUMMY_FRAME_TOS)
  /* Legacy for systems yet to multi-arch SAVE_DUMMY_FRAME_TOS */
+ #if !defined (SAVE_DUMMY_FRAME_TOS_P)
  #define SAVE_DUMMY_FRAME_TOS_P() (1)
+ #endif
  #endif
  
  /* Default predicate for non- multi-arch targets. */
Index: gdbarch.sh
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.sh,v
retrieving revision 1.56
diff -p -r1.56 gdbarch.sh
*** gdbarch.sh	2001/03/21 19:25:03	1.56
--- gdbarch.sh	2001/03/21 19:45:35
*************** do
*** 668,674 ****
--- 668,676 ----
  	    printf "#if defined (${macro})\n"
  	    printf "/* Legacy for systems yet to multi-arch ${macro} */\n"
  	    #printf "#if (GDB_MULTI_ARCH <= GDB_MULTI_ARCH_PARTIAL) && defined (${macro})\n"
+ 	    printf "#if !defined (${macro}_P)\n"
  	    printf "#define ${macro}_P() (1)\n"
+ 	    printf "#endif\n"
  	    printf "#endif\n"
  	    printf "\n"
  	    printf "/* Default predicate for non- multi-arch targets. */\n"

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