]> git.pld-linux.org Git - packages/gdb.git/blobdiff - gdb-archer-pie-addons.patch
- up to 7.3.1
[packages/gdb.git] / gdb-archer-pie-addons.patch
index 4bcc4b4a1ae976ee0f659c6802df16b6a71bceaf..a56870bc70f6fbdbf3772aa5f1c7c05aab9939e7 100644 (file)
@@ -1,8 +1,8 @@
-Index: gdb-7.1.90.20100711/gdb/dwarf2read.c
+Index: gdb-7.2.90.20110525/gdb/dwarf2read.c
 ===================================================================
---- gdb-7.1.90.20100711.orig/gdb/dwarf2read.c  2010-07-13 00:26:25.000000000 +0200
-+++ gdb-7.1.90.20100711/gdb/dwarf2read.c       2010-07-13 00:34:00.000000000 +0200
-@@ -5737,7 +5737,12 @@ read_common_block (struct die_info *die,
+--- gdb-7.2.90.20110525.orig/gdb/dwarf2read.c  2011-05-25 17:10:46.000000000 +0200
++++ gdb-7.2.90.20110525/gdb/dwarf2read.c       2011-05-25 17:12:35.000000000 +0200
+@@ -7675,7 +7675,12 @@ read_common_block (struct die_info *die,
  {
    struct attribute *attr;
    struct symbol *sym;
@@ -16,7 +16,7 @@ Index: gdb-7.1.90.20100711/gdb/dwarf2read.c
  
    attr = dwarf2_attr (die, DW_AT_location, cu);
    if (attr)
-@@ -5746,6 +5751,7 @@ read_common_block (struct die_info *die,
+@@ -7684,6 +7689,7 @@ read_common_block (struct die_info *die,
        if (attr_form_is_block (attr))
          {
            base = decode_locdesc (DW_BLOCK (attr), cu);
@@ -24,15 +24,15 @@ Index: gdb-7.1.90.20100711/gdb/dwarf2read.c
          }
        else if (attr_form_is_section_offset (attr))
          {
-@@ -5807,12 +5813,15 @@ read_common_block (struct die_info *die,
-             else
-               dwarf2_complex_location_expr_complaint ();
--            SYMBOL_VALUE_ADDRESS (sym) = base + byte_offset;
+@@ -7736,12 +7742,15 @@ read_common_block (struct die_info *die,
+         if (sym != NULL
+             && handle_data_member_location (child_die, cu, &offset))
+           {
+-            SYMBOL_VALUE_ADDRESS (sym) = base + offset;
 +            if (!base_p)
 +              dwarf2_invalid_attrib_class_complaint
 +                ("DW_AT_data_member_location", "common block member");
-+            SYMBOL_VALUE_ADDRESS (sym) = base + byte_offset + baseaddr;
++            SYMBOL_VALUE_ADDRESS (sym) = base + offset + baseaddr;
              add_symbol_to_list (sym, &global_symbols);
            }
  
@@ -42,7 +42,7 @@ Index: gdb-7.1.90.20100711/gdb/dwarf2read.c
          else
            SET_FIELD_PHYSNAME (*field, SYMBOL_LINKAGE_NAME (sym));
          FIELD_TYPE (*field) = SYMBOL_TYPE (sym);
-@@ -5826,7 +5835,7 @@ read_common_block (struct die_info *die,
+@@ -7755,7 +7764,7 @@ read_common_block (struct die_info *die,
  
        sym = new_symbol (die, type, cu);
        /* SYMBOL_VALUE_ADDRESS never gets used as all its fields are static.  */
@@ -51,11 +51,11 @@ Index: gdb-7.1.90.20100711/gdb/dwarf2read.c
  
        set_die_type (die, type, cu);
      }
-Index: gdb-7.1.90.20100711/gdb/gdbtypes.h
+Index: gdb-7.2.90.20110525/gdb/gdbtypes.h
 ===================================================================
---- gdb-7.1.90.20100711.orig/gdb/gdbtypes.h    2010-07-12 23:07:34.000000000 +0200
-+++ gdb-7.1.90.20100711/gdb/gdbtypes.h 2010-07-13 00:34:00.000000000 +0200
-@@ -395,6 +395,7 @@ enum type_instance_flag_value
+--- gdb-7.2.90.20110525.orig/gdb/gdbtypes.h    2011-05-25 17:05:21.000000000 +0200
++++ gdb-7.2.90.20110525/gdb/gdbtypes.h 2011-05-25 17:11:10.000000000 +0200
+@@ -396,6 +396,7 @@ enum type_instance_flag_value
  enum field_loc_kind
    {
      FIELD_LOC_KIND_BITPOS,    /* bitpos */
@@ -63,15 +63,15 @@ Index: gdb-7.1.90.20100711/gdb/gdbtypes.h
      FIELD_LOC_KIND_PHYSADDR,  /* physaddr */
      FIELD_LOC_KIND_PHYSNAME   /* physname */
    };
-@@ -577,6 +578,7 @@ struct main_type
+@@ -580,6 +581,7 @@ struct main_type
           is the location (in the target) of the static field.
-          Otherwise, physname is the mangled label of the static field. */
+          Otherwise, physname is the mangled label of the static field.  */
  
 +      /* This address is unrelocated by the objfile's ANOFFSET.  */
        CORE_ADDR physaddr;
        char *physname;
        }
-@@ -1073,6 +1075,7 @@ extern void allocate_gnat_aux_type (stru
+@@ -1106,6 +1108,7 @@ extern void allocate_gnat_aux_type (stru
  #define FIELD_LOC_KIND(thisfld) ((thisfld).loc_kind)
  #define FIELD_BITPOS(thisfld) ((thisfld).loc.bitpos)
  #define FIELD_STATIC_PHYSNAME(thisfld) ((thisfld).loc.physname)
@@ -79,7 +79,7 @@ Index: gdb-7.1.90.20100711/gdb/gdbtypes.h
  #define FIELD_STATIC_PHYSADDR(thisfld) ((thisfld).loc.physaddr)
  #define SET_FIELD_BITPOS(thisfld, bitpos)                     \
    (FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_BITPOS,          \
-@@ -1080,6 +1083,7 @@ extern void allocate_gnat_aux_type (stru
+@@ -1113,6 +1116,7 @@ extern void allocate_gnat_aux_type (stru
  #define SET_FIELD_PHYSNAME(thisfld, name)                     \
    (FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_PHYSNAME,                \
     FIELD_STATIC_PHYSNAME (thisfld) = (name))
@@ -87,7 +87,7 @@ Index: gdb-7.1.90.20100711/gdb/gdbtypes.h
  #define SET_FIELD_PHYSADDR(thisfld, addr)                     \
    (FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_PHYSADDR,                \
     FIELD_STATIC_PHYSADDR (thisfld) = (addr))
-@@ -1092,6 +1096,7 @@ extern void allocate_gnat_aux_type (stru
+@@ -1125,6 +1129,7 @@ extern void allocate_gnat_aux_type (stru
  #define TYPE_FIELD_LOC_KIND(thistype, n) FIELD_LOC_KIND (TYPE_FIELD (thistype, n))
  #define TYPE_FIELD_BITPOS(thistype, n) FIELD_BITPOS (TYPE_FIELD (thistype, n))
  #define TYPE_FIELD_STATIC_PHYSNAME(thistype, n) FIELD_STATIC_PHYSNAME (TYPE_FIELD (thistype, n))
@@ -95,21 +95,21 @@ Index: gdb-7.1.90.20100711/gdb/gdbtypes.h
  #define TYPE_FIELD_STATIC_PHYSADDR(thistype, n) FIELD_STATIC_PHYSADDR (TYPE_FIELD (thistype, n))
  #define TYPE_FIELD_ARTIFICIAL(thistype, n) FIELD_ARTIFICIAL(TYPE_FIELD(thistype,n))
  #define TYPE_FIELD_BITSIZE(thistype, n) FIELD_BITSIZE(TYPE_FIELD(thistype,n))
-Index: gdb-7.1.90.20100711/gdb/jv-lang.c
+Index: gdb-7.2.90.20110525/gdb/jv-lang.c
 ===================================================================
---- gdb-7.1.90.20100711.orig/gdb/jv-lang.c     2010-05-17 19:18:39.000000000 +0200
-+++ gdb-7.1.90.20100711/gdb/jv-lang.c  2010-07-13 00:34:00.000000000 +0200
-@@ -409,7 +409,8 @@ java_link_class_type (struct gdbarch *gd
+--- gdb-7.2.90.20110525.orig/gdb/jv-lang.c     2011-03-02 01:42:53.000000000 +0100
++++ gdb-7.2.90.20110525/gdb/jv-lang.c  2011-05-25 17:11:10.000000000 +0200
+@@ -414,7 +414,8 @@ java_link_class_type (struct gdbarch *gd
  
    fields = NULL;
-   nfields--;                  /* First set up dummy "class" field. */
+   nfields--;                  /* First set up dummy "class" field.  */
 -  SET_FIELD_PHYSADDR (TYPE_FIELD (type, nfields), value_address (clas));
 +  SET_FIELD_PHYSADDR (TYPE_FIELD (type, nfields), value_address (clas)
 +    - (TYPE_OBJFILE (type) == NULL ? 0 : ANOFFSET (TYPE_OBJFILE (type)->section_offsets, SECT_OFF_TEXT (TYPE_OBJFILE (type)))));
    TYPE_FIELD_NAME (type, nfields) = "class";
    TYPE_FIELD_TYPE (type, nfields) = value_type (clas);
    SET_TYPE_FIELD_PRIVATE (type, nfields);
-@@ -457,7 +458,8 @@ java_link_class_type (struct gdbarch *gd
+@@ -462,7 +463,8 @@ java_link_class_type (struct gdbarch *gd
          SET_TYPE_FIELD_PROTECTED (type, i);
        }
        if (accflags & 0x0008)  /* ACC_STATIC */
@@ -119,11 +119,11 @@ Index: gdb-7.1.90.20100711/gdb/jv-lang.c
        else
        TYPE_FIELD_BITPOS (type, i) = 8 * boffset;
        if (accflags & 0x8000)  /* FIELD_UNRESOLVED_FLAG */
-Index: gdb-7.1.90.20100711/gdb/value.c
+Index: gdb-7.2.90.20110525/gdb/value.c
 ===================================================================
---- gdb-7.1.90.20100711.orig/gdb/value.c       2010-07-12 23:07:33.000000000 +0200
-+++ gdb-7.1.90.20100711/gdb/value.c    2010-07-13 00:35:21.000000000 +0200
-@@ -1943,7 +1943,8 @@ value_static_field (struct type *type, i
+--- gdb-7.2.90.20110525.orig/gdb/value.c       2011-05-25 17:05:21.000000000 +0200
++++ gdb-7.2.90.20110525/gdb/value.c    2011-05-25 17:11:10.000000000 +0200
+@@ -2492,7 +2492,8 @@ value_static_field (struct type *type, i
      {
      case FIELD_LOC_KIND_PHYSADDR:
        retval = value_at_lazy (TYPE_FIELD_TYPE (type, fieldno),
@@ -133,13 +133,3 @@ Index: gdb-7.1.90.20100711/gdb/value.c
        break;
      case FIELD_LOC_KIND_PHYSNAME:
      {
-@@ -1977,7 +1978,8 @@ value_static_field (struct type *type, i
-       }
-       if (retval && VALUE_LVAL (retval) == lval_memory)
-       SET_FIELD_PHYSADDR (TYPE_FIELD (type, fieldno),
--                          value_address (retval));
-+                          value_address (retval)
-+                          - (TYPE_OBJFILE (type) == NULL ? 0 : ANOFFSET (TYPE_OBJFILE (type)->section_offsets, SECT_OFF_TEXT (TYPE_OBJFILE (type)))));
-       break;
-     }
-     default:
This page took 0.032434 seconds and 4 git commands to generate.