btrace: remove leftover comment
[deliverable/binutils-gdb.git] / binutils / dwarf.c
index 95b33a8723ec4d3f8a41ac58c3339782b035d771..fee6a605e71d452fcb3166b7dac166b548b0b65b 100644 (file)
@@ -1824,6 +1824,7 @@ read_and_display_attr_value (unsigned long attribute,
        {
        case DW_AT_frame_base:
          have_frame_base = 1;
+         /* Fall through.  */
        case DW_AT_location:
        case DW_AT_string_length:
        case DW_AT_return_addr:
@@ -2099,6 +2100,7 @@ read_and_display_attr_value (unsigned long attribute,
 
     case DW_AT_frame_base:
       have_frame_base = 1;
+      /* Fall through.  */
     case DW_AT_location:
     case DW_AT_string_length:
     case DW_AT_return_addr:
@@ -5620,7 +5622,7 @@ frame_display_row (Frame_Chunk *fc, int *need_col_headers, unsigned int *max_reg
        if (fc->col_type[r] != DW_CFA_unreferenced)
          {
            if (r == fc->ra)
-             printf ("ra      ");
+             printf ("ra    ");
            else
              printf ("%-5s ", regname (r, 1));
          }
@@ -6331,19 +6333,25 @@ display_debug_frames (struct dwarf_section *section,
              break;
 
            case DW_CFA_restore:
-             if (opa >= (unsigned int) cie->ncols
-                 || opa >= (unsigned int) fc->ncols)
+             if (opa >= (unsigned int) fc->ncols)
                reg_prefix = bad_reg;
              if (! do_debug_frames_interp || *reg_prefix != '\0')
                printf ("  DW_CFA_restore: %s%s\n",
                        reg_prefix, regname (opa, 0));
-             if (*reg_prefix == '\0')
+             if (*reg_prefix != '\0')
+               break;
+
+             if (opa >= (unsigned int) cie->ncols
+                 || (do_debug_frames_interp
+                     && cie->col_type[opa] == DW_CFA_unreferenced))
+               {
+                 fc->col_type[opa] = DW_CFA_undefined;
+                 fc->col_offset[opa] = 0;
+               }
+             else
                {
                  fc->col_type[opa] = cie->col_type[opa];
                  fc->col_offset[opa] = cie->col_offset[opa];
-                 if (do_debug_frames_interp
-                     && fc->col_type[opa] == DW_CFA_unreferenced)
-                   fc->col_type[opa] = DW_CFA_undefined;
                }
              break;
 
@@ -6430,13 +6438,20 @@ display_debug_frames (struct dwarf_section *section,
 
            case DW_CFA_restore_extended:
              reg = LEB ();
-             if (reg >= (unsigned int) cie->ncols
-                 || reg >= (unsigned int) fc->ncols)
+             if (reg >= (unsigned int) fc->ncols)
                reg_prefix = bad_reg;
              if (! do_debug_frames_interp || *reg_prefix != '\0')
                printf ("  DW_CFA_restore_extended: %s%s\n",
                        reg_prefix, regname (reg, 0));
-             if (*reg_prefix == '\0')
+             if (*reg_prefix != '\0')
+               break;
+
+             if (reg >= (unsigned int) cie->ncols)
+               {
+                 fc->col_type[reg] = DW_CFA_undefined;
+                 fc->col_offset[reg] = 0;
+               }
+             else
                {
                  fc->col_type[reg] = cie->col_type[reg];
                  fc->col_offset[reg] = cie->col_offset[reg];
@@ -7641,6 +7656,7 @@ dwarf_select_sections_by_letters (const char *letters)
 
       case 'F':
        do_debug_frames_interp = 1;
+       /* Fall through.  */
       case 'f':
        do_debug_frames = 1;
        break;
This page took 0.025778 seconds and 4 git commands to generate.