/* Interface between GDB and target environments, including files and processes
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001 Free Software Foundation, Inc.
+ 2000, 2001, 2002 Free Software Foundation, Inc.
Contributed by Cygnus Support. Written by John Gilmore.
This file is part of GDB.
void (*to_async) (void (*cb) (enum inferior_event_type, void *context),
void *context);
int to_async_mask_value;
+ int (*to_find_memory_regions) (int (*) (CORE_ADDR,
+ unsigned long,
+ int, int, int,
+ void *),
+ void *);
+ char * (*to_make_corefile_notes) (bfd *, int *);
int to_magic;
/* Need sub-structure for target machine related rather than comm related?
*/
(*current_target.to_resume) (ptid, step, siggnal); \
} while (0)
-/* Wait for process pid to do something. PTID = -1 to wait for any pid
- to do something. Return pid of child, or -1 in case of error;
+/* Wait for process pid to do something. PTID = -1 to wait for any
+ pid to do something. Return pid of child, or -1 in case of error;
store status through argument pointer STATUS. Note that it is
- *not* OK to return_to_top_level out of target_wait without popping
+ _NOT_ OK to throw_exception() out of target_wait() without popping
the debugging target from the stack; GDB isn't prepared to get back
to the prompt with a debugging target but without the frame cache,
stop_pc, etc., set up. */
#define target_pid_to_exec_file(pid) \
(current_target.to_pid_to_exec_file) (pid)
+/*
+ * Iterator function for target memory regions.
+ * Calls a callback function once for each memory region 'mapped'
+ * in the child process. Defined as a simple macro rather than
+ * as a function macro so that it can be tested for nullity.
+ */
+
+#define target_find_memory_regions(FUNC, DATA) \
+ (current_target.to_find_memory_regions) (FUNC, DATA)
+
+/*
+ * Compose corefile .note section.
+ */
+
+#define target_make_corefile_notes(BFD, SIZE_P) \
+ (current_target.to_make_corefile_notes) (BFD, SIZE_P)
+
/* Hook to call target-dependent code after reading in a new symbol table. */
#ifndef TARGET_SYMFILE_POSTREAD
((LONGEST)(byte_count) <= REGISTER_SIZE)
#endif
-/* However, some addresses may not be profitable to use hardware to watch,
- or may be difficult to understand when the addressed object is out of
- scope, and hence should be unwatched. On some targets, this may have
- severe performance penalties, such that we might as well use regular
- watchpoints, and save (possibly precious) hardware watchpoints for other
- locations. */
-
-#if !defined(TARGET_RANGE_PROFITABLE_FOR_HW_WATCHPOINT)
-#define TARGET_RANGE_PROFITABLE_FOR_HW_WATCHPOINT(pid,start,len) 0
-#endif
-
/* Set/clear a hardware watchpoint starting at ADDR, for LEN bytes. TYPE is 0
for write, 1 for read, and 2 for read/write accesses. Returns 0 for
extern int default_memory_insert_breakpoint (CORE_ADDR, char *);
-extern breakpoint_from_pc_fn memory_breakpoint_from_pc;
+extern const unsigned char *memory_breakpoint_from_pc (CORE_ADDR *pcptr,
+ int *lenptr);
/* From target.c */
/* Blank target vector entries are initialized to target_ignore. */
void target_ignore (void);
-/* Macro for getting target's idea of a frame pointer.
- FIXME: GDB's whole scheme for dealing with "frames" and
- "frame pointers" needs a serious shakedown. */
-#ifndef TARGET_VIRTUAL_FRAME_POINTER
-#define TARGET_VIRTUAL_FRAME_POINTER(ADDR, REGP, OFFP) \
- do { *(REGP) = FP_REGNUM; *(OFFP) = 0; } while (0)
-#endif /* TARGET_VIRTUAL_FRAME_POINTER */
-
#endif /* !defined (TARGET_H) */