This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit] Delete some simulator dependent codes in gdb/score-tdep.[ch] of gdb_7_0-branch
- From: don dot lee at sunplusct dot com
- To: gdb-patches at sourceware dot org
- Cc: brobecker at adacore dot com, muller at ics dot u-strasbg dot fr
- Date: Mon, 19 Oct 2009 17:39:08 +0800
- Subject: [commit] Delete some simulator dependent codes in gdb/score-tdep.[ch] of gdb_7_0-branch
Hi all,
This patch delete some simulator dependent codes in gdb/score-tdep.[ch]
that is broken.
2009-10-19 Don Lee <don.lee@sunplusct.com>
* score-tdep.c: Delete some simulator dependent codes.
* score-tdep.h: Delete some simulator dependent macro definitions.
Index: score-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/score-tdep.c,v
retrieving revision 1.21
retrieving revision 1.21.2.1
diff -c -p -r1.21 -r1.21.2.1
*** score-tdep.c 6 Aug 2009 10:28:38 -0000 1.21
--- score-tdep.c 19 Oct 2009 09:02:18 -0000 1.21.2.1
*************** struct score_frame_cache
*** 56,113 ****
static int target_mach = bfd_mach_score7;
- #if WITH_SIM
- int
- score_target_can_use_watch (int type, int cnt, int othertype)
- {
- if (strcmp (current_target.to_shortname, "sim") == 0)
- return soc_gh_can_use_watch (type, cnt);
- return (*current_target.to_can_use_hw_breakpoint) (type, cnt,
othertype);
- }
-
- int
- score_stopped_by_watch (void)
- {
- if (strcmp (current_target.to_shortname, "sim") == 0)
- return soc_gh_stopped_by_watch ();
- return (*current_target.to_stopped_by_watchpoint) ();
- }
-
- int
- score_target_insert_watchpoint (CORE_ADDR addr, int len, int type)
- {
- if (strcmp (current_target.to_shortname, "sim") == 0)
- return soc_gh_add_watch (addr, len, type);
- return (*current_target.to_insert_watchpoint) (addr, len, type);
- }
-
- int
- score_target_remove_watchpoint (CORE_ADDR addr, int len, int type)
- {
- if (strcmp (current_target.to_shortname, "sim") == 0)
- return soc_gh_del_watch (addr, len, type);
- return (*current_target.to_remove_watchpoint) (addr, len, type);
- }
-
- int
- score_target_insert_hw_breakpoint (struct gdbarch *gdbarch,
- struct bp_target_info * bp_tgt)
- {
- if (strcmp (current_target.to_shortname, "sim") == 0)
- return soc_gh_add_hardbp (bp_tgt->placed_address);
- return (*current_target.to_insert_hw_breakpoint) (gdbarch, bp_tgt);
- }
-
- int
- score_target_remove_hw_breakpoint (struct gdbarch *gdbarch,
- struct bp_target_info * bp_tgt)
- {
- if (strcmp (current_target.to_shortname, "sim") == 0)
- return soc_gh_del_hardbp (bp_tgt->placed_address);
- return (*current_target.to_remove_hw_breakpoint) (gdbarch, bp_tgt);
- }
- #endif
-
static struct type *
score_register_type (struct gdbarch *gdbarch, int regnum)
{
--- 56,61 ----
Index: score-tdep.h
===================================================================
RCS file: /cvs/src/src/gdb/score-tdep.h,v
retrieving revision 1.6
retrieving revision 1.6.2.1
diff -c -p -r1.6 -r1.6.2.1
*** score-tdep.h 6 Aug 2009 10:28:38 -0000 1.6
--- score-tdep.h 19 Oct 2009 09:02:18 -0000 1.6.2.1
*************** struct pt_regs {
*** 85,152 ****
typedef struct pt_regs elf_gregset_t;
- #ifdef WITH_SIM
-
- #include <breakpoint.h>
-
- int soc_gh_can_use_watch(int type, int cnt);
- int soc_gh_add_watch(unsigned int addr, int len, int type);
- int soc_gh_del_watch(unsigned int addr, int len, int type);
- int soc_gh_stopped_by_watch(void);
- int soc_gh_add_hardbp(unsigned int addr);
- int soc_gh_del_hardbp(unsigned int addr);
-
- int score_target_can_use_watch(int type, int cnt, int ot);
- int score_stopped_by_watch(void);
- int score_target_insert_watchpoint (CORE_ADDR addr, int len, int type);
- int score_target_remove_watchpoint (CORE_ADDR addr, int len, int type);
- int score_target_insert_hw_breakpoint (struct gdbarch *gdbarch, struct
bp_target_info * bp_tgt);
- int score_target_remove_hw_breakpoint (struct gdbarch *gdbarch, struct
bp_target_info * bp_tgt);
-
- #define TARGET_HAS_HARDWARE_WATCHPOINTS
-
- #ifdef TARGET_CAN_USE_HARDWARE_WATCHPOINT
- #undef TARGET_CAN_USE_HARDWARE_WATCHPOINT
-
- #define TARGET_CAN_USE_HARDWARE_WATCHPOINT(type, cnt, ot) \
- score_target_can_use_watch(type, cnt, ot)
- #endif
-
- #ifdef STOPPED_BY_WATCHPOINT
- #undef STOPPED_BY_WATCHPOINT
-
- #define STOPPED_BY_WATCHPOINT(w) \
- score_stopped_by_watch()
- #endif
-
- #ifdef target_insert_watchpoint
- #undef target_insert_watchpoint
-
- #define target_insert_watchpoint(addr, len, type) \
- score_target_insert_watchpoint (addr, len, type)
- #endif
-
- #ifdef target_remove_watchpoint
- #undef target_remove_watchpoint
-
- #define target_remove_watchpoint(addr, len, type) \
- score_target_remove_watchpoint (addr, len, type)
- #endif
-
- #ifdef target_insert_hw_breakpoint
- #undef target_insert_hw_breakpoint
-
- #define target_insert_hw_breakpoint(gdbarch, bp_tgt) \
- score_target_insert_hw_breakpoint (gdbarch, bp_tgt)
- #endif
-
- #ifdef target_remove_hw_breakpoint
- #undef target_remove_hw_breakpoint
-
- #define target_remove_hw_breakpoint(gdbarch, bp_tgt) \
- score_target_remove_hw_breakpoint (gdbarch, bp_tgt)
- #endif
-
- #endif /* WITH_SIM */
-
#endif /* SCORE_TDEP_H */
--- 85,88 ----