summaryrefslogtreecommitdiff
path: root/gcc/dwarf2cfi.c
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2012-04-27 14:14:14 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2012-04-27 14:14:14 +0000
commitc9f465998fbdc8b3fc70f668a792b183e2c40a47 (patch)
tree575755334553a36f8125712174d0e7eda2bf9d9a /gcc/dwarf2cfi.c
parent678919fdc043aa1bae6cf8ca68402bd9d54396ac (diff)
downloadgcc-c9f465998fbdc8b3fc70f668a792b183e2c40a47.tar.gz
gcc
* dwarf2out.c (dwarf_stack_op_name): Use get_DW_OP_name. (dwarf_tag_name): Use get_DW_TAG_name. (dwarf_attr_name): Use get_DW_AT_name. (dwarf_form_name): Use get_DW_FORM_name. * dwarf2cfi.c (dwarf_cfi_name): Use get_DW_CFA_name. include * dwarf2.h (enum dwarf_tag, enum dwarf_form, enum dwarf_attribute) (enum dwarf_location_atom, enum dwarf_type, enum dwarf_call_frame_info): Remove. (DW_TAG, DW_TAG_DUP, DW_FORM, DW_AT, DW_AT_DUP, DW_OP) (DW_OP_DUP, DW_ATE, DW_ATE_DUP, DW_CFA): New macros. Include dwarf2.def. (get_DW_TAG_name, get_DW_AT_name, get_DW_FORM_name) (get_DW_OP_name, get_DW_ATE_name): Declare. * dwarf2.def: New file, from dwarf2.h. libiberty * dwarfnames.c: New file. * Makefile.in (CFILES): Add dwarfnames. (REQUIRED_OFILES): Add dwarfnames. (./dwarfnames.$(objext)): New target. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@186908 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/dwarf2cfi.c')
-rw-r--r--gcc/dwarf2cfi.c68
1 files changed, 4 insertions, 64 deletions
diff --git a/gcc/dwarf2cfi.c b/gcc/dwarf2cfi.c
index 4d75bb248b4..bf2d802ffae 100644
--- a/gcc/dwarf2cfi.c
+++ b/gcc/dwarf2cfi.c
@@ -2925,72 +2925,12 @@ execute_dwarf2_frame (void)
static const char *
dwarf_cfi_name (unsigned int cfi_opc)
{
- switch (cfi_opc)
- {
- case DW_CFA_advance_loc:
- return "DW_CFA_advance_loc";
- case DW_CFA_offset:
- return "DW_CFA_offset";
- case DW_CFA_restore:
- return "DW_CFA_restore";
- case DW_CFA_nop:
- return "DW_CFA_nop";
- case DW_CFA_set_loc:
- return "DW_CFA_set_loc";
- case DW_CFA_advance_loc1:
- return "DW_CFA_advance_loc1";
- case DW_CFA_advance_loc2:
- return "DW_CFA_advance_loc2";
- case DW_CFA_advance_loc4:
- return "DW_CFA_advance_loc4";
- case DW_CFA_offset_extended:
- return "DW_CFA_offset_extended";
- case DW_CFA_restore_extended:
- return "DW_CFA_restore_extended";
- case DW_CFA_undefined:
- return "DW_CFA_undefined";
- case DW_CFA_same_value:
- return "DW_CFA_same_value";
- case DW_CFA_register:
- return "DW_CFA_register";
- case DW_CFA_remember_state:
- return "DW_CFA_remember_state";
- case DW_CFA_restore_state:
- return "DW_CFA_restore_state";
- case DW_CFA_def_cfa:
- return "DW_CFA_def_cfa";
- case DW_CFA_def_cfa_register:
- return "DW_CFA_def_cfa_register";
- case DW_CFA_def_cfa_offset:
- return "DW_CFA_def_cfa_offset";
+ const char *name = get_DW_CFA_name (cfi_opc);
- /* DWARF 3 */
- case DW_CFA_def_cfa_expression:
- return "DW_CFA_def_cfa_expression";
- case DW_CFA_expression:
- return "DW_CFA_expression";
- case DW_CFA_offset_extended_sf:
- return "DW_CFA_offset_extended_sf";
- case DW_CFA_def_cfa_sf:
- return "DW_CFA_def_cfa_sf";
- case DW_CFA_def_cfa_offset_sf:
- return "DW_CFA_def_cfa_offset_sf";
+ if (name != NULL)
+ return name;
- /* SGI/MIPS specific */
- case DW_CFA_MIPS_advance_loc8:
- return "DW_CFA_MIPS_advance_loc8";
-
- /* GNU extensions */
- case DW_CFA_GNU_window_save:
- return "DW_CFA_GNU_window_save";
- case DW_CFA_GNU_args_size:
- return "DW_CFA_GNU_args_size";
- case DW_CFA_GNU_negative_offset_extended:
- return "DW_CFA_GNU_negative_offset_extended";
-
- default:
- return "DW_CFA_<unknown>";
- }
+ return "DW_CFA_<unknown>";
}
/* This routine will generate the correct assembly data for a location