/* Target operations for the remote server for GDB.
- Copyright (C) 2002-2015 Free Software Foundation, Inc.
+ Copyright (C) 2002-2016 Free Software Foundation, Inc.
Contributed by MontaVista Software.
int (*create_inferior) (char *program, char **args);
- /* Architecture-specific setup. */
- void (*arch_setup) (void);
+ /* Do additional setup after a new process is created, including
+ exec-wrapper completion. */
+ void (*post_create_inferior) (void);
/* Attach to a running process.
/* Return the thread's name, or NULL if the target is unable to determine it.
The returned value must not be freed by the caller. */
const char *(*thread_name) (ptid_t thread);
+
+ /* Return the breakpoint kind for this target based on the current
+ processor state (e.g. the current instruction mode on ARM) and the
+ PC. The PCPTR is adjusted to the real memory location in case a flag
+ (e.g., the Thumb bit on ARM) is present in the PC. */
+ int (*breakpoint_kind_from_current_state) (CORE_ADDR *pcptr);
+
+ /* Returns true if the target can software single step. */
+ int (*supports_software_single_step) (void);
};
extern struct target_ops *the_target;
#define create_inferior(program, args) \
(*the_target->create_inferior) (program, args)
-#define target_arch_setup() \
- do \
- { \
- if (the_target->arch_setup != NULL) \
- (*the_target->arch_setup) (); \
+#define target_post_create_inferior() \
+ do \
+ { \
+ if (the_target->post_create_inferior != NULL) \
+ (*the_target->post_create_inferior) (); \
} while (0)
#define myattach(pid) \
? (*the_target->breakpoint_kind_from_pc) (pcptr) \
: default_breakpoint_kind_from_pc (pcptr))
+#define target_breakpoint_kind_from_current_state(pcptr) \
+ (the_target->breakpoint_kind_from_current_state \
+ ? (*the_target->breakpoint_kind_from_current_state) (pcptr) \
+ : target_breakpoint_kind_from_pc (pcptr))
+
+#define target_supports_software_single_step() \
+ (the_target->supports_software_single_step ? \
+ (*the_target->supports_software_single_step) () : 0)
+
/* Start non-stop mode, returns 0 on success, -1 on failure. */
int start_non_stop (int nonstop);