This is the mail archive of the gdb-patches@sourceware.cygnus.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]

Common defn of DECR_PC_AFTER_BREAK for VxWorks targets


VxWorks targets adjust the PC to point to address of the breakpoint
instruction after it has been hit.  

The enclosed patch moves the redefinitions of DECR_PC_AFTER_BREAK from
CPU specific VxWorks target headers to the generic target header.

1999-07-14  J.T. Conklin  <jtc@redback.com>

	* config/tm-vxworks.h (DECR_PC_AFTER_BREAK): Undefine and then
 	re-define as 0.  VxWorks Adjusts the PC after a breakpoint has
 	been hit.

	* config/a29k/tm-vx29k.h, config/i960/tm-vx960.h,
 	config/m68k/tm-vx68.h (DECR_PC_AFTER_BREAK): Remove definition.

Index: tm-vxworks.h
===================================================================
RCS file: /home/jtc/CVSROOT/gdb/gdb/config/tm-vxworks.h,v
retrieving revision 1.2
diff -c -r1.2 tm-vxworks.h
*** tm-vxworks.h	1999/07/09 00:35:40	1.2
--- tm-vxworks.h	1999/07/14 17:34:50
***************
*** 21,23 ****
--- 21,27 ----
  #define	GDBINIT_FILENAME	".vxgdbinit"
  
  #define	DEFAULT_PROMPT		"(vxgdb) "
+ 
+ /* VxWorks adjusts the PC after a breakpoint has been hit. */
+ #undef	DECR_PC_AFTER_BREAK
+ #define	DECR_PC_AFTER_BREAK 0
Index: a29k/tm-vx29k.h
===================================================================
RCS file: /home/jtc/CVSROOT/gdb/gdb/config/a29k/tm-vx29k.h,v
retrieving revision 1.3
diff -c -r1.3 tm-vx29k.h
*** tm-vx29k.h	1999/07/09 00:35:41	1.3
--- tm-vx29k.h	1999/07/14 17:35:16
***************
*** 179,189 ****
  #define GET_LONGJMP_TARGET(ADDR) get_longjmp_target(ADDR)
  extern int get_longjmp_target PARAMS ((CORE_ADDR *));
  
- /* VxWorks adjusts the PC after a breakpoint has been hit.  */
- 
- #undef DECR_PC_AFTER_BREAK
- #define DECR_PC_AFTER_BREAK 0
- 
  /* Do whatever promotions are appropriate on a value being returned
     from a function.  VAL is the user-supplied value, and FUNC_TYPE
     is the return type of the function if known, else 0.
--- 179,184 ----
Index: i960/tm-vx960.h
===================================================================
RCS file: /home/jtc/CVSROOT/gdb/gdb/config/i960/tm-vx960.h,v
retrieving revision 1.3
diff -c -r1.3 tm-vx960.h
*** tm-vx960.h	1999/07/09 00:35:43	1.3
--- tm-vx960.h	1999/07/14 17:35:27
***************
*** 27,37 ****
  #undef PC_REGNUM
  #define PC_REGNUM RIP_REGNUM
  
- /* We have more complex, useful breakpoints on the target.
-    Amount ip must be decremented by after a breakpoint.  */
- 
- #define	DECR_PC_AFTER_BREAK	0
- 
  /* We are guaranteed to have a zero frame pointer at bottom of stack, too. */
  
  #define FRAME_CHAIN_VALID(chain, thisframe) nonnull_frame_chain_valid (chain, thisframe)
--- 27,32 ----
Index: m68k/tm-vx68.h
===================================================================
RCS file: /home/jtc/CVSROOT/gdb/gdb/config/m68k/tm-vx68.h,v
retrieving revision 1.3
diff -c -r1.3 tm-vx68.h
*** tm-vx68.h	1999/07/09 00:35:44	1.3
--- tm-vx68.h	1999/07/14 17:38:04
***************
*** 19,35 ****
     Foundation, Inc., 59 Temple Place - Suite 330,
     Boston, MA 02111-1307, USA.  */
  
  /* GCC is probably the only compiler used on this configuration.  So
     get this right even if the code which detects gcc2_compiled. is
     still broken.  */
  
  #define BELIEVE_PCC_PROMOTION 1
- 
- /* We have more complex, useful breakpoints on the target.  */
- #define	DECR_PC_AFTER_BREAK	0
- 
- #include "m68k/tm-m68k.h"
- #include "tm-vxworks.h"
  
  /* Takes the current frame-struct pointer and returns the chain-pointer
     to get to the calling frame.
--- 19,32 ----
     Foundation, Inc., 59 Temple Place - Suite 330,
     Boston, MA 02111-1307, USA.  */
  
+ #include "m68k/tm-m68k.h"
+ #include "tm-vxworks.h"
+ 
  /* GCC is probably the only compiler used on this configuration.  So
     get this right even if the code which detects gcc2_compiled. is
     still broken.  */
  
  #define BELIEVE_PCC_PROMOTION 1
  
  /* Takes the current frame-struct pointer and returns the chain-pointer
     to get to the calling frame.


-- 
J.T. Conklin
RedBack Networks

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