static int default_region_ok_for_hw_watchpoint (CORE_ADDR, int);
-static int nosymbol (char *, CORE_ADDR *);
-
static void tcomplain (void) ATTRIBUTE_NORETURN;
static int nomemory (CORE_ADDR, char *, int, int, struct target_ops *);
static void debug_to_load (char *, int);
-static int debug_to_lookup_symbol (char *, CORE_ADDR *);
-
static int debug_to_can_run (void);
static void debug_to_notice_signals (ptid_t);
error (_("You can't do that without a process to debug."));
}
-static int
-nosymbol (char *name, CORE_ADDR *addrp)
-{
- return 1; /* Symbol does not exist in target env. */
-}
-
static void
default_terminal_info (char *args, int from_tty)
{
INHERIT (to_can_use_hw_breakpoint, t);
INHERIT (to_insert_hw_breakpoint, t);
INHERIT (to_remove_hw_breakpoint, t);
+ /* Do not inherit to_ranged_break_num_registers. */
INHERIT (to_insert_watchpoint, t);
INHERIT (to_remove_watchpoint, t);
INHERIT (to_stopped_data_address, t);
INHERIT (to_terminal_info, t);
/* Do not inherit to_kill. */
INHERIT (to_load, t);
- INHERIT (to_lookup_symbol, t);
/* Do no inherit to_create_inferior. */
INHERIT (to_post_startup_inferior, t);
INHERIT (to_insert_fork_catchpoint, t);
de_fault (to_load,
(void (*) (char *, int))
tcomplain);
- de_fault (to_lookup_symbol,
- (int (*) (char *, CORE_ADDR *))
- nosymbol);
de_fault (to_post_startup_inferior,
(void (*) (ptid_t))
target_ignore);
/* If we previously failed to read 1 byte, nothing can be done here. */
if (end - begin <= 1)
- return;
+ {
+ xfree (buf);
+ return;
+ }
/* Check that either first or the last byte is readable, and give up
if not. This heuristic is meant to permit reading accessible memory
}
else
{
+ xfree (buf);
return;
}
tcomplain ();
}
+/* The documentation for this function is in its prototype declaration
+ in target.h. */
+
+int
+target_ranged_break_num_registers (void)
+{
+ struct target_ops *t;
+
+ for (t = current_target.beneath; t != NULL; t = t->beneath)
+ if (t->to_ranged_break_num_registers != NULL)
+ return t->to_ranged_break_num_registers (t);
+
+ return -1;
+}
+
static void
debug_to_prepare_to_store (struct regcache *regcache)
{
fprintf_unfiltered (gdb_stdlog, "target_load (%s, %d)\n", args, from_tty);
}
-static int
-debug_to_lookup_symbol (char *name, CORE_ADDR *addrp)
-{
- int retval;
-
- retval = debug_target.to_lookup_symbol (name, addrp);
-
- fprintf_unfiltered (gdb_stdlog, "target_lookup_symbol (%s, xxx)\n", name);
-
- return retval;
-}
-
static void
debug_to_post_startup_inferior (ptid_t ptid)
{
current_target.to_terminal_save_ours = debug_to_terminal_save_ours;
current_target.to_terminal_info = debug_to_terminal_info;
current_target.to_load = debug_to_load;
- current_target.to_lookup_symbol = debug_to_lookup_symbol;
current_target.to_post_startup_inferior = debug_to_post_startup_inferior;
current_target.to_insert_fork_catchpoint = debug_to_insert_fork_catchpoint;
current_target.to_remove_fork_catchpoint = debug_to_remove_fork_catchpoint;