* dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Expand parameter
authorSiddhesh Poyarekar <siddhesh@sourceware.org>
Thu, 26 Jul 2012 02:03:16 +0000 (02:03 +0000)
committerSiddhesh Poyarekar <siddhesh@sourceware.org>
Thu, 26 Jul 2012 02:03:16 +0000 (02:03 +0000)
SIZE to size_t.
(dwarf2_evaluate_loc_desc): Likewise.
(dwarf2_loc_desc_needs_frame): Likewise.
(locexpr_describe_location_1): Likewise.
* dwarf2loc.h (struct dwarf2_locexpr_baton): Make SIZE as
size_t.
(struct dwarf2_loclist_baton): Likewise.
* dwarf2read.c (struct dwarf_block): Likewise.
(dump_die_shallow): Use pulongest to print dwarf_block.size.
(decode_locdesc): Expand SIZE and I to size_t.

gdb/ChangeLog
gdb/dwarf2loc.c
gdb/dwarf2loc.h
gdb/dwarf2read.c

index 5aca850cb9f21420f14b3e5f9af6ac7c01778441..5c7e3764984f345613bdbc5d34dac411efaa5be1 100644 (file)
@@ -1,3 +1,17 @@
+2012-07-26  Siddhesh Poyarekar  <siddhesh@redhat.com>
+
+       * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Expand parameter
+       SIZE to size_t.
+       (dwarf2_evaluate_loc_desc): Likewise.
+       (dwarf2_loc_desc_needs_frame): Likewise.
+       (locexpr_describe_location_1): Likewise.
+       * dwarf2loc.h (struct dwarf2_locexpr_baton): Make SIZE as
+       size_t.
+       (struct dwarf2_loclist_baton): Likewise.
+       * dwarf2read.c (struct dwarf_block): Likewise.
+       (dump_die_shallow): Use pulongest to print dwarf_block.size.
+       (decode_locdesc): Expand SIZE and I to size_t.
+
 2012-07-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
        * contrib/cc-with-tweaks.sh: Put into comment path gdb/contrib/.
index 38e4814be8ca8862e6478c53e875c1fc124382da..67a31f8d050e674900addc77afe8918f0755de23 100644 (file)
@@ -54,8 +54,8 @@ static const struct dwarf_expr_context_funcs dwarf_expr_ctx_funcs;
 static struct value *dwarf2_evaluate_loc_desc_full (struct type *type,
                                                    struct frame_info *frame,
                                                    const gdb_byte *data,
-                                                   unsigned short size,
-                                             struct dwarf2_per_cu_data *per_cu,
+                                                   size_t size,
+                                                   struct dwarf2_per_cu_data *per_cu,
                                                    LONGEST byte_offset);
 
 /* Until these have formal names, we define these here.
@@ -2111,7 +2111,7 @@ static const struct dwarf_expr_context_funcs dwarf_expr_ctx_funcs =
 
 static struct value *
 dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame,
-                              const gdb_byte *data, unsigned short size,
+                              const gdb_byte *data, size_t size,
                               struct dwarf2_per_cu_data *per_cu,
                               LONGEST byte_offset)
 {
@@ -2312,7 +2312,7 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame,
 
 struct value *
 dwarf2_evaluate_loc_desc (struct type *type, struct frame_info *frame,
-                         const gdb_byte *data, unsigned short size,
+                         const gdb_byte *data, size_t size,
                          struct dwarf2_per_cu_data *per_cu)
 {
   return dwarf2_evaluate_loc_desc_full (type, frame, data, size, per_cu, 0);
@@ -2433,7 +2433,7 @@ static const struct dwarf_expr_context_funcs needs_frame_ctx_funcs =
    requires a frame to evaluate.  */
 
 static int
-dwarf2_loc_desc_needs_frame (const gdb_byte *data, unsigned short size,
+dwarf2_loc_desc_needs_frame (const gdb_byte *data, size_t size,
                             struct dwarf2_per_cu_data *per_cu)
 {
   struct needs_frame_baton baton;
@@ -3827,7 +3827,7 @@ disassemble_dwarf_expression (struct ui_file *stream,
 static void
 locexpr_describe_location_1 (struct symbol *symbol, CORE_ADDR addr,
                             struct ui_file *stream,
-                            const gdb_byte *data, int size,
+                            const gdb_byte *data, size_t size,
                             struct objfile *objfile, unsigned int addr_size,
                             int offset_size, struct dwarf2_per_cu_data *per_cu)
 {
index e9d06a330d3e3b6c12183682619cf708390b645a..326838f040ce0e6d4e884979632f0688d94ab256 100644 (file)
@@ -77,7 +77,7 @@ struct type *dwarf2_get_die_type (cu_offset die_offset,
 struct value *dwarf2_evaluate_loc_desc (struct type *type,
                                        struct frame_info *frame,
                                        const gdb_byte *data,
-                                       unsigned short size,
+                                       size_t size,
                                        struct dwarf2_per_cu_data *per_cu);
 
 CORE_ADDR dwarf2_read_addr_index (struct dwarf2_per_cu_data *per_cu,
@@ -97,7 +97,7 @@ struct dwarf2_locexpr_baton
 
   /* Length of the location expression.  For optimized out expressions it is
      zero.  */
-  unsigned long size;
+  size_t size;
 
   /* The compilation unit containing the symbol whose location
      we're computing.  */
@@ -114,7 +114,7 @@ struct dwarf2_loclist_baton
   const gdb_byte *data;
 
   /* Length of the location list.  */
-  unsigned long size;
+  size_t size;
 
   /* The compilation unit containing the symbol whose location
      we're computing.  */
index d5a8157ba246637ab020c6a586aee37e32567f9e..8295857ee56d25402bc5eb5fd8ab1c6ae64e48ae 100644 (file)
@@ -990,7 +990,7 @@ struct die_info
 /* Blocks are a bunch of untyped bytes.  */
 struct dwarf_block
   {
-    unsigned int size;
+    size_t size;
 
     /* Valid only if SIZE is not zero.  */
     gdb_byte *data;
@@ -16197,12 +16197,12 @@ dump_die_shallow (struct ui_file *f, int indent, struct die_info *die)
        case DW_FORM_block4:
        case DW_FORM_block:
        case DW_FORM_block1:
-         fprintf_unfiltered (f, "block: size %d",
-                             DW_BLOCK (&die->attrs[i])->size);
+         fprintf_unfiltered (f, "block: size %s",
+                             pulongest (DW_BLOCK (&die->attrs[i])->size));
          break;
        case DW_FORM_exprloc:
-         fprintf_unfiltered (f, "expression: size %u",
-                             DW_BLOCK (&die->attrs[i])->size);
+         fprintf_unfiltered (f, "expression: size %s",
+                             pulongest (DW_BLOCK (&die->attrs[i])->size));
          break;
        case DW_FORM_ref_addr:
          fprintf_unfiltered (f, "ref address: ");
@@ -16746,8 +16746,8 @@ static CORE_ADDR
 decode_locdesc (struct dwarf_block *blk, struct dwarf2_cu *cu)
 {
   struct objfile *objfile = cu->objfile;
-  int i;
-  int size = blk->size;
+  size_t i;
+  size_t size = blk->size;
   gdb_byte *data = blk->data;
   CORE_ADDR stack[64];
   int stacki;