diff --git a/gdb/ChangeLog b/gdb/ChangeLog index d3afbd9447..a6365f160f 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,13 @@ +2007-06-09 Markus Deuling + + * gdbarch.sh (ADDRESS_CLASS_TYPE_FLAGS): Replace by + gdbarch_address_class_type_flags. + * dwarf2read.c (read_tag_pointer_type): Likewise. + * gdbarch.sh (ADDRESS_CLASS_TYPE_FLAGS_P): Replace by + gdbarch_address_class_type_flags_p. + * dwarf2read.c (read_tag_pointer_type): Likewise. + * gdbarch.c, gdbarch.h: Regenerate. + 2007-06-09 Markus Deuling * gdbarch.sh (ADDR_BITS_REMOVE): Replace by gdbarch_addr_bits_remove. diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 80915a8845..2a33b9e581 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -4559,11 +4559,12 @@ read_tag_pointer_type (struct die_info *die, struct dwarf2_cu *cu) length accordingly. */ if (TYPE_LENGTH (type) != byte_size || addr_class != DW_ADDR_none) { - if (ADDRESS_CLASS_TYPE_FLAGS_P ()) + if (gdbarch_address_class_type_flags_p (current_gdbarch)) { int type_flags; - type_flags = ADDRESS_CLASS_TYPE_FLAGS (byte_size, addr_class); + type_flags = gdbarch_address_class_type_flags + (current_gdbarch, byte_size, addr_class); gdb_assert ((type_flags & ~TYPE_FLAG_ADDRESS_CLASS_ALL) == 0); type = make_type_with_address_space (type, type_flags); } diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index 7d2bf6868e..9edc8abfc6 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -670,21 +670,9 @@ gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file) fprintf_unfiltered (file, "gdbarch_dump: address_class_name_to_type_flags = <0x%lx>\n", (long) current_gdbarch->address_class_name_to_type_flags); -#ifdef ADDRESS_CLASS_TYPE_FLAGS_P - fprintf_unfiltered (file, - "gdbarch_dump: %s # %s\n", - "ADDRESS_CLASS_TYPE_FLAGS_P()", - XSTRING (ADDRESS_CLASS_TYPE_FLAGS_P ())); -#endif fprintf_unfiltered (file, "gdbarch_dump: gdbarch_address_class_type_flags_p() = %d\n", gdbarch_address_class_type_flags_p (current_gdbarch)); -#ifdef ADDRESS_CLASS_TYPE_FLAGS - fprintf_unfiltered (file, - "gdbarch_dump: %s # %s\n", - "ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class)", - XSTRING (ADDRESS_CLASS_TYPE_FLAGS (byte_size, dwarf2_addr_class))); -#endif fprintf_unfiltered (file, "gdbarch_dump: address_class_type_flags = <0x%lx>\n", (long) current_gdbarch->address_class_type_flags); diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index 37b72e4294..1632a5bc9f 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -1043,30 +1043,11 @@ extern void set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch, int can extern int gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch); extern void set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch, int have_nonsteppable_watchpoint); -#if defined (ADDRESS_CLASS_TYPE_FLAGS) -/* Legacy for systems yet to multi-arch ADDRESS_CLASS_TYPE_FLAGS */ -#if !defined (ADDRESS_CLASS_TYPE_FLAGS_P) -#define ADDRESS_CLASS_TYPE_FLAGS_P() (1) -#endif -#endif - extern int gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch); -#if !defined (GDB_TM_FILE) && defined (ADDRESS_CLASS_TYPE_FLAGS_P) -#error "Non multi-arch definition of ADDRESS_CLASS_TYPE_FLAGS" -#endif -#if !defined (ADDRESS_CLASS_TYPE_FLAGS_P) -#define ADDRESS_CLASS_TYPE_FLAGS_P() (gdbarch_address_class_type_flags_p (current_gdbarch)) -#endif typedef int (gdbarch_address_class_type_flags_ftype) (int byte_size, int dwarf2_addr_class); extern int gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class); extern void set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch, gdbarch_address_class_type_flags_ftype *address_class_type_flags); -#if !defined (GDB_TM_FILE) && defined (ADDRESS_CLASS_TYPE_FLAGS) -#error "Non multi-arch definition of ADDRESS_CLASS_TYPE_FLAGS" -#endif -#if !defined (ADDRESS_CLASS_TYPE_FLAGS) -#define ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class) (gdbarch_address_class_type_flags (current_gdbarch, byte_size, dwarf2_addr_class)) -#endif extern int gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch); diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh index 4df1da66b2..4e286c79cb 100755 --- a/gdb/gdbarch.sh +++ b/gdb/gdbarch.sh @@ -655,7 +655,7 @@ f::void:coff_make_msymbol_special:int val, struct minimal_symbol *msym:val, msym v:=:const char *:name_of_malloc:::"malloc":"malloc"::0:NAME_OF_MALLOC v::int:cannot_step_breakpoint:::0:0::0 v::int:have_nonsteppable_watchpoint:::0:0::0 -F:=:int:address_class_type_flags:int byte_size, int dwarf2_addr_class:byte_size, dwarf2_addr_class +F::int:address_class_type_flags:int byte_size, int dwarf2_addr_class:byte_size, dwarf2_addr_class M::const char *:address_class_type_flags_to_name:int type_flags:type_flags M::int:address_class_name_to_type_flags:const char *name, int *type_flags_ptr:name, type_flags_ptr # Is a register in a group