X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=gdb-archer-pie-addons.patch;h=f8119643ba732419d261d2806f307eddf1bb4a2c;hb=a7de96f08d7d0577827ebaf3a902dac3b0cd3d59;hp=4bcc4b4a1ae976ee0f659c6802df16b6a71bceaf;hpb=51a5ef0fcc85578604905ccfa8d198db5dd6d324;p=packages%2Fgdb.git diff --git a/gdb-archer-pie-addons.patch b/gdb-archer-pie-addons.patch index 4bcc4b4..f811964 100644 --- a/gdb-archer-pie-addons.patch +++ b/gdb-archer-pie-addons.patch @@ -1,8 +1,8 @@ -Index: gdb-7.1.90.20100711/gdb/dwarf2read.c +Index: gdb-7.4.50.20120602/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.4.50.20120602.orig/gdb/dwarf2read.c 2012-06-02 19:14:38.000000000 +0200 ++++ gdb-7.4.50.20120602/gdb/dwarf2read.c 2012-06-02 19:51:29.977252338 +0200 +@@ -9746,7 +9746,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, +@@ -9755,6 +9760,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; +@@ -9807,12 +9813,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, +@@ -9826,7 +9835,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,35 +51,35 @@ 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.4.50.20120602/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 - enum field_loc_kind +--- gdb-7.4.50.20120602.orig/gdb/gdbtypes.h 2012-06-02 19:11:54.000000000 +0200 ++++ gdb-7.4.50.20120602/gdb/gdbtypes.h 2012-06-02 19:52:44.990230200 +0200 +@@ -401,6 +401,7 @@ enum field_loc_kind { FIELD_LOC_KIND_BITPOS, /* bitpos */ + FIELD_LOC_KIND_ENUMVAL, /* enumval */ + /* This address is unrelocated by the objfile's ANOFFSET. */ FIELD_LOC_KIND_PHYSADDR, /* physaddr */ - FIELD_LOC_KIND_PHYSNAME /* physname */ - }; -@@ -577,6 +578,7 @@ struct main_type + FIELD_LOC_KIND_PHYSNAME, /* physname */ + FIELD_LOC_KIND_DWARF_BLOCK /* dwarf_block */ +@@ -595,6 +596,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 - #define FIELD_LOC_KIND(thisfld) ((thisfld).loc_kind) - #define FIELD_BITPOS(thisfld) ((thisfld).loc.bitpos) + const char *physname; + +@@ -1200,6 +1202,7 @@ extern void allocate_gnat_aux_type (stru + #define FIELD_ENUMVAL_LVAL(thisfld) ((thisfld).loc.enumval) + #define FIELD_ENUMVAL(thisfld) (FIELD_ENUMVAL_LVAL (thisfld) + 0) #define FIELD_STATIC_PHYSNAME(thisfld) ((thisfld).loc.physname) +/* This address is unrelocated by the objfile's ANOFFSET. */ #define FIELD_STATIC_PHYSADDR(thisfld) ((thisfld).loc.physaddr) + #define FIELD_DWARF_BLOCK(thisfld) ((thisfld).loc.dwarf_block) #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 +@@ -1211,6 +1214,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,29 +87,29 @@ 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 - #define TYPE_FIELD_LOC_KIND(thistype, n) FIELD_LOC_KIND (TYPE_FIELD (thistype, n)) +@@ -1227,6 +1231,7 @@ extern void allocate_gnat_aux_type (stru #define TYPE_FIELD_BITPOS(thistype, n) FIELD_BITPOS (TYPE_FIELD (thistype, n)) + #define TYPE_FIELD_ENUMVAL(thistype, n) FIELD_ENUMVAL (TYPE_FIELD (thistype, n)) #define TYPE_FIELD_STATIC_PHYSNAME(thistype, n) FIELD_STATIC_PHYSNAME (TYPE_FIELD (thistype, n)) +/* This address is unrelocated by the objfile's ANOFFSET. */ #define TYPE_FIELD_STATIC_PHYSADDR(thistype, n) FIELD_STATIC_PHYSADDR (TYPE_FIELD (thistype, n)) + #define TYPE_FIELD_DWARF_BLOCK(thistype, n) FIELD_DWARF_BLOCK (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.4.50.20120602/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.4.50.20120602.orig/gdb/jv-lang.c 2012-05-10 21:59:12.000000000 +0200 ++++ gdb-7.4.50.20120602/gdb/jv-lang.c 2012-06-02 19:51:53.286245280 +0200 +@@ -431,7 +431,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 +@@ -479,7 +480,8 @@ java_link_class_type (struct gdbarch *gd SET_TYPE_FIELD_PROTECTED (type, i); } if (accflags & 0x0008) /* ACC_STATIC */ @@ -117,13 +117,13 @@ Index: gdb-7.1.90.20100711/gdb/jv-lang.c + SET_FIELD_PHYSADDR (TYPE_FIELD (type, i), boffset + - (TYPE_OBJFILE (type) == NULL ? 0 : ANOFFSET (TYPE_OBJFILE (type)->section_offsets, SECT_OFF_TEXT (TYPE_OBJFILE (type))))); else - TYPE_FIELD_BITPOS (type, i) = 8 * boffset; + SET_FIELD_BITPOS (TYPE_FIELD (type, i), 8 * boffset); if (accflags & 0x8000) /* FIELD_UNRESOLVED_FLAG */ -Index: gdb-7.1.90.20100711/gdb/value.c +Index: gdb-7.4.50.20120602/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.4.50.20120602.orig/gdb/value.c 2012-06-02 19:11:55.000000000 +0200 ++++ gdb-7.4.50.20120602/gdb/value.c 2012-06-02 19:51:30.031252317 +0200 +@@ -2592,7 +2592,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: