X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Fgdbarch.h;h=d2e6b6f63ecd6de28deb032f259549b20e9411a1;hb=dce2246a6c934bf35157e8970d0da5a11aefb282;hp=761790828a5c7951786c9bcbb495ef5336b4eb12;hpb=b41c5a85a734b9ca813d4a314b66ef4b4b4d1b11;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index 761790828a..d2e6b6f63e 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -35,6 +35,7 @@ #ifndef GDBARCH_H #define GDBARCH_H +#include #include "frame.h" #include "dis-asm.h" @@ -52,7 +53,6 @@ struct target_ops; struct obstack; struct bp_target_info; struct target_desc; -struct objfile; struct symbol; struct displaced_step_closure; struct syscall; @@ -61,7 +61,6 @@ struct axs_value; struct stap_parse_info; struct parser_state; struct ravenscar_arch_ops; -struct elf_internal_linux_prpsinfo; struct mem_range; struct syscalls_info; struct thread_info; @@ -127,11 +126,7 @@ extern const struct target_desc * gdbarch_target_desc (struct gdbarch *gdbarch); extern int gdbarch_bits_big_endian (struct gdbarch *gdbarch); extern void set_gdbarch_bits_big_endian (struct gdbarch *gdbarch, int bits_big_endian); -/* Number of bits in a char or unsigned char for the target machine. - Just like CHAR_BIT in but describes the target machine. - v:TARGET_CHAR_BIT:int:char_bit::::8 * sizeof (char):8::0: - - Number of bits in a short or unsigned short for the target machine. */ +/* Number of bits in a short or unsigned short for the target machine. */ extern int gdbarch_short_bit (struct gdbarch *gdbarch); extern void set_gdbarch_short_bit (struct gdbarch *gdbarch, int short_bit); @@ -700,8 +695,8 @@ extern void set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch, gdbarch_addr_ extern int gdbarch_software_single_step_p (struct gdbarch *gdbarch); -typedef VEC (CORE_ADDR) * (gdbarch_software_single_step_ftype) (struct regcache *regcache); -extern VEC (CORE_ADDR) * gdbarch_software_single_step (struct gdbarch *gdbarch, struct regcache *regcache); +typedef std::vector (gdbarch_software_single_step_ftype) (struct regcache *regcache); +extern std::vector gdbarch_software_single_step (struct gdbarch *gdbarch, struct regcache *regcache); extern void set_gdbarch_software_single_step (struct gdbarch *gdbarch, gdbarch_software_single_step_ftype *software_single_step); /* Return non-zero if the processor is executing a delay slot and a @@ -879,18 +874,6 @@ typedef char * (gdbarch_make_corefile_notes_ftype) (struct gdbarch *gdbarch, bfd extern char * gdbarch_make_corefile_notes (struct gdbarch *gdbarch, bfd *obfd, int *note_size); extern void set_gdbarch_make_corefile_notes (struct gdbarch *gdbarch, gdbarch_make_corefile_notes_ftype *make_corefile_notes); -/* The elfcore writer hook to use to write Linux prpsinfo notes to core - files. Most Linux architectures use the same prpsinfo32 or - prpsinfo64 layouts, and so won't need to provide this hook, as we - call the Linux generic routines in bfd to write prpsinfo notes by - default. */ - -extern int gdbarch_elfcore_write_linux_prpsinfo_p (struct gdbarch *gdbarch); - -typedef char * (gdbarch_elfcore_write_linux_prpsinfo_ftype) (bfd *obfd, char *note_data, int *note_size, const struct elf_internal_linux_prpsinfo *info); -extern char * gdbarch_elfcore_write_linux_prpsinfo (struct gdbarch *gdbarch, bfd *obfd, char *note_data, int *note_size, const struct elf_internal_linux_prpsinfo *info); -extern void set_gdbarch_elfcore_write_linux_prpsinfo (struct gdbarch *gdbarch, gdbarch_elfcore_write_linux_prpsinfo_ftype *elfcore_write_linux_prpsinfo); - /* Find core file memory regions */ extern int gdbarch_find_memory_regions_p (struct gdbarch *gdbarch); @@ -936,6 +919,16 @@ typedef const char * (gdbarch_core_thread_name_ftype) (struct gdbarch *gdbarch, extern const char * gdbarch_core_thread_name (struct gdbarch *gdbarch, struct thread_info *thr); extern void set_gdbarch_core_thread_name (struct gdbarch *gdbarch, gdbarch_core_thread_name_ftype *core_thread_name); +/* Read offset OFFSET of TARGET_OBJECT_SIGNAL_INFO signal information + from core file into buffer READBUF with length LEN. Return the number + of bytes read (zero indicates EOF, a negative value indicates failure). */ + +extern int gdbarch_core_xfer_siginfo_p (struct gdbarch *gdbarch); + +typedef LONGEST (gdbarch_core_xfer_siginfo_ftype) (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, ULONGEST len); +extern LONGEST gdbarch_core_xfer_siginfo (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, ULONGEST len); +extern void set_gdbarch_core_xfer_siginfo (struct gdbarch *gdbarch, gdbarch_core_xfer_siginfo_ftype *core_xfer_siginfo); + /* BFD target to use when generating a core file. */ extern int gdbarch_gcore_bfd_target_p (struct gdbarch *gdbarch); @@ -991,10 +984,6 @@ extern void set_gdbarch_max_insn_length (struct gdbarch *gdbarch, ULONGEST max_i If you do not provide this function, GDB assumes that the architecture does not support displaced stepping. - If your architecture doesn't need to adjust instructions before - single-stepping them, consider using simple_displaced_step_copy_insn - here. - If the instruction cannot execute out of line, return NULL. The core falls back to stepping past the instruction in-line instead in that case. */ @@ -1042,21 +1031,6 @@ typedef void (gdbarch_displaced_step_fixup_ftype) (struct gdbarch *gdbarch, stru extern void gdbarch_displaced_step_fixup (struct gdbarch *gdbarch, struct displaced_step_closure *closure, CORE_ADDR from, CORE_ADDR to, struct regcache *regs); extern void set_gdbarch_displaced_step_fixup (struct gdbarch *gdbarch, gdbarch_displaced_step_fixup_ftype *displaced_step_fixup); -/* Free a closure returned by gdbarch_displaced_step_copy_insn. - - If you provide gdbarch_displaced_step_copy_insn, you must provide - this function as well. - - If your architecture uses closures that don't need to be freed, then - you can use simple_displaced_step_free_closure here. - - For a general explanation of displaced stepping and how GDB uses it, - see the comments in infrun.c. */ - -typedef void (gdbarch_displaced_step_free_closure_ftype) (struct gdbarch *gdbarch, struct displaced_step_closure *closure); -extern void gdbarch_displaced_step_free_closure (struct gdbarch *gdbarch, struct displaced_step_closure *closure); -extern void set_gdbarch_displaced_step_free_closure (struct gdbarch *gdbarch, gdbarch_displaced_step_free_closure_ftype *displaced_step_free_closure); - /* Return the address of an appropriate place to put displaced instructions while we step over them. There need only be one such place, since we're only stepping one thread over a breakpoint at a @@ -1655,7 +1629,21 @@ struct gdbarch_info bfd *abfd; /* Use default: NULL (ZERO). */ - void *tdep_info; + union + { + /* Architecture-specific information. The generic form for targets + that have extra requirements. */ + struct gdbarch_tdep_info *tdep_info; + + /* Architecture-specific target description data. Numerous targets + need only this, so give them an easy way to hold it. */ + struct tdesc_arch_data *tdesc_data; + + /* SPU file system ID. This is a single integer, so using the + generic form would only complicate code. Other targets may + reuse this member if suitable. */ + int *id; + }; /* Use default: GDB_OSABI_UNINITIALIZED (-1). */ enum gdb_osabi osabi;