* dwarf.c (frame_display_row, display_debug_frames): Handle
authorJakub Jelinek <jakub@redhat.com>
Fri, 3 Mar 2006 18:29:40 +0000 (18:29 +0000)
committerJakub Jelinek <jakub@redhat.com>
Fri, 3 Mar 2006 18:29:40 +0000 (18:29 +0000)
DW_CFA_val_offset, DW_CFA_val_offset_sf and DW_CFA_val_expression.

binutils/ChangeLog
binutils/dwarf.c

index 99e3569e2a0f28f9c6b9652bb9d403e6fbac6255..85c5b667cd5c8b5afc1ccfc574ee719d4a6309f2 100644 (file)
@@ -1,3 +1,8 @@
+2006-03-03  Jakub Jelinek  <jakub@redhat.com>
+
+       * dwarf.c (frame_display_row, display_debug_frames): Handle
+       DW_CFA_val_offset, DW_CFA_val_offset_sf and DW_CFA_val_expression.
+
 2006-02-28  Nick Clifton  <nickc@redhat.com>
 
        * objcopy.c (use_alt_mach_code): Change type to unsigned long.
index b47a5bbbf5f0b4b4bb5d1f0507c628650752bf31..00422649dd3fb4ee29d6ba7f98d08d5081b3ff7a 100644 (file)
@@ -1,5 +1,5 @@
 /* dwarf.c -- display DWARF contents of a BFD binary file
-   Copyright 2005
+   Copyright 2005, 2006
    Free Software Foundation, Inc.
 
    This file is part of GNU Binutils.
@@ -2904,12 +2904,18 @@ frame_display_row (Frame_Chunk *fc, int *need_col_headers, int *max_regs)
            case DW_CFA_offset:
              sprintf (tmp, "c%+d", fc->col_offset[r]);
              break;
+           case DW_CFA_val_offset:
+             sprintf (tmp, "v%+d", fc->col_offset[r]);
+             break;
            case DW_CFA_register:
              sprintf (tmp, "r%d", fc->col_offset[r]);
              break;
            case DW_CFA_expression:
              strcpy (tmp, "exp");
              break;
+           case DW_CFA_val_expression:
+             strcpy (tmp, "vexp");
+             break;
            default:
              strcpy (tmp, "n/a");
              break;
@@ -3252,6 +3258,7 @@ display_debug_frames (struct dwarf_section *section,
                  start += 4;
                  break;
                case DW_CFA_offset_extended:
+               case DW_CFA_val_offset:
                  reg = LEB (); LEB ();
                  frame_need_space (fc, reg);
                  fc->col_type[reg] = DW_CFA_undefined;
@@ -3290,6 +3297,7 @@ display_debug_frames (struct dwarf_section *section,
                  start += tmp;
                  break;
                case DW_CFA_expression:
+               case DW_CFA_val_expression:
                  reg = LEB ();
                  tmp = LEB ();
                  start += tmp;
@@ -3297,6 +3305,7 @@ display_debug_frames (struct dwarf_section *section,
                  fc->col_type[reg] = DW_CFA_undefined;
                  break;
                case DW_CFA_offset_extended_sf:
+               case DW_CFA_val_offset_sf:
                  reg = LEB (); SLEB ();
                  frame_need_space (fc, reg);
                  fc->col_type[reg] = DW_CFA_undefined;
@@ -3426,6 +3435,16 @@ display_debug_frames (struct dwarf_section *section,
              fc->col_offset[reg] = roffs * fc->data_factor;
              break;
 
+           case DW_CFA_val_offset:
+             reg = LEB ();
+             roffs = LEB ();
+             if (! do_debug_frames_interp)
+               printf ("  DW_CFA_val_offset: r%ld at cfa%+ld\n",
+                       reg, roffs * fc->data_factor);
+             fc->col_type[reg] = DW_CFA_val_offset;
+             fc->col_offset[reg] = roffs * fc->data_factor;
+             break;
+
            case DW_CFA_restore_extended:
              reg = LEB ();
              if (! do_debug_frames_interp)
@@ -3543,6 +3562,19 @@ display_debug_frames (struct dwarf_section *section,
              start += ul;
              break;
 
+           case DW_CFA_val_expression:
+             reg = LEB ();
+             ul = LEB ();
+             if (! do_debug_frames_interp)
+               {
+                 printf ("  DW_CFA_val_expression: r%ld (", reg);
+                 decode_location_expression (start, eh_addr_size, ul, 0);
+                 printf (")\n");
+               }
+             fc->col_type[reg] = DW_CFA_val_expression;
+             start += ul;
+             break;
+
            case DW_CFA_offset_extended_sf:
              reg = LEB ();
              l = SLEB ();
@@ -3554,6 +3586,17 @@ display_debug_frames (struct dwarf_section *section,
              fc->col_offset[reg] = l * fc->data_factor;
              break;
 
+           case DW_CFA_val_offset_sf:
+             reg = LEB ();
+             l = SLEB ();
+             frame_need_space (fc, reg);
+             if (! do_debug_frames_interp)
+               printf ("  DW_CFA_val_offset_sf: r%ld at cfa%+ld\n",
+                       reg, l * fc->data_factor);
+             fc->col_type[reg] = DW_CFA_val_offset;
+             fc->col_offset[reg] = l * fc->data_factor;
+             break;
+
            case DW_CFA_def_cfa_sf:
              fc->cfa_reg = LEB ();
              fc->cfa_offset = SLEB ();