Blame SOURCES/gdb-archer-pie-addons.patch

e1d87d
Index: gdb-7.9.50.20150520/gdb/gdbtypes.h
e1d87d
===================================================================
e1d87d
--- gdb-7.9.50.20150520.orig/gdb/gdbtypes.h	2015-05-31 16:55:29.723475485 +0200
e1d87d
+++ gdb-7.9.50.20150520/gdb/gdbtypes.h	2015-05-31 16:55:49.716601669 +0200
e1d87d
@@ -462,6 +462,7 @@ enum field_loc_kind
e1d87d
   {
e1d87d
     FIELD_LOC_KIND_BITPOS,	/**< bitpos */
e1d87d
     FIELD_LOC_KIND_ENUMVAL,	/**< enumval */
e1d87d
+    /* This address is unrelocated by the objfile's ANOFFSET.  */
e1d87d
     FIELD_LOC_KIND_PHYSADDR,	/**< physaddr */
e1d87d
     FIELD_LOC_KIND_PHYSNAME,	/**< physname */
e1d87d
     FIELD_LOC_KIND_DWARF_BLOCK	/**< dwarf_block */
e1d87d
@@ -513,6 +514,7 @@ union field_location
e1d87d
      field.  Otherwise, physname is the mangled label of the
e1d87d
      static field.  */
e1d87d
 
e1d87d
+  /* This address is unrelocated by the objfile's ANOFFSET.  */
e1d87d
   CORE_ADDR physaddr;
e1d87d
   const char *physname;
e1d87d
 
e1d87d
@@ -1386,6 +1388,7 @@ extern void set_type_vptr_basetype (stru
e1d87d
 #define FIELD_ENUMVAL_LVAL(thisfld) ((thisfld).loc.enumval)
e1d87d
 #define FIELD_ENUMVAL(thisfld) (FIELD_ENUMVAL_LVAL (thisfld) + 0)
e1d87d
 #define FIELD_STATIC_PHYSNAME(thisfld) ((thisfld).loc.physname)
e1d87d
+/* This address is unrelocated by the objfile's ANOFFSET.  */
e1d87d
 #define FIELD_STATIC_PHYSADDR(thisfld) ((thisfld).loc.physaddr)
e1d87d
 #define FIELD_DWARF_BLOCK(thisfld) ((thisfld).loc.dwarf_block)
e1d87d
 #define SET_FIELD_BITPOS(thisfld, bitpos)			\
e1d87d
@@ -1397,6 +1400,7 @@ extern void set_type_vptr_basetype (stru
e1d87d
 #define SET_FIELD_PHYSNAME(thisfld, name)			\
e1d87d
   (FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_PHYSNAME,		\
e1d87d
    FIELD_STATIC_PHYSNAME (thisfld) = (name))
e1d87d
+/* This address is unrelocated by the objfile's ANOFFSET.  */
e1d87d
 #define SET_FIELD_PHYSADDR(thisfld, addr)			\
e1d87d
   (FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_PHYSADDR,		\
e1d87d
    FIELD_STATIC_PHYSADDR (thisfld) = (addr))
e1d87d
@@ -1413,6 +1417,7 @@ extern void set_type_vptr_basetype (stru
e1d87d
 #define TYPE_FIELD_BITPOS(thistype, n) FIELD_BITPOS (TYPE_FIELD (thistype, n))
e1d87d
 #define TYPE_FIELD_ENUMVAL(thistype, n) FIELD_ENUMVAL (TYPE_FIELD (thistype, n))
e1d87d
 #define TYPE_FIELD_STATIC_PHYSNAME(thistype, n) FIELD_STATIC_PHYSNAME (TYPE_FIELD (thistype, n))
e1d87d
+/* This address is unrelocated by the objfile's ANOFFSET.  */
e1d87d
 #define TYPE_FIELD_STATIC_PHYSADDR(thistype, n) FIELD_STATIC_PHYSADDR (TYPE_FIELD (thistype, n))
e1d87d
 #define TYPE_FIELD_DWARF_BLOCK(thistype, n) FIELD_DWARF_BLOCK (TYPE_FIELD (thistype, n))
e1d87d
 #define TYPE_FIELD_ARTIFICIAL(thistype, n) FIELD_ARTIFICIAL(TYPE_FIELD(thistype,n))
e1d87d
Index: gdb-7.9.50.20150520/gdb/value.c
e1d87d
===================================================================
e1d87d
--- gdb-7.9.50.20150520.orig/gdb/value.c	2015-05-31 16:55:29.725475497 +0200
e1d87d
+++ gdb-7.9.50.20150520/gdb/value.c	2015-05-31 16:55:30.821482415 +0200
e1d87d
@@ -2951,7 +2951,8 @@ value_static_field (struct type *type, i
e1d87d
     {
e1d87d
     case FIELD_LOC_KIND_PHYSADDR:
e1d87d
       retval = value_at_lazy (TYPE_FIELD_TYPE (type, fieldno),
e1d87d
-			      TYPE_FIELD_STATIC_PHYSADDR (type, fieldno));
e1d87d
+			      TYPE_FIELD_STATIC_PHYSADDR (type, fieldno)
e1d87d
+			      + (TYPE_OBJFILE (type) == NULL ? 0 : ANOFFSET (TYPE_OBJFILE (type)->section_offsets, SECT_OFF_TEXT (TYPE_OBJFILE (type)))));
e1d87d
       break;
e1d87d
     case FIELD_LOC_KIND_PHYSNAME:
e1d87d
     {