2013-01-19 22:41:55 +00:00
|
|
|
Index: gdb-7.5.50.20130118/gdb/gdbtypes.h
|
2010-01-16 22:32:10 +00:00
|
|
|
===================================================================
|
2013-01-19 22:41:55 +00:00
|
|
|
--- gdb-7.5.50.20130118.orig/gdb/gdbtypes.h 2013-01-18 23:07:03.488358315 +0100
|
|
|
|
+++ gdb-7.5.50.20130118/gdb/gdbtypes.h 2013-01-18 23:08:10.286451570 +0100
|
|
|
|
@@ -420,6 +420,7 @@ enum field_loc_kind
|
2010-01-16 22:32:10 +00:00
|
|
|
{
|
|
|
|
FIELD_LOC_KIND_BITPOS, /* bitpos */
|
2012-06-03 17:40:44 +00:00
|
|
|
FIELD_LOC_KIND_ENUMVAL, /* enumval */
|
2010-01-16 22:32:10 +00:00
|
|
|
+ /* This address is unrelocated by the objfile's ANOFFSET. */
|
|
|
|
FIELD_LOC_KIND_PHYSADDR, /* physaddr */
|
2012-01-03 15:00:12 +00:00
|
|
|
FIELD_LOC_KIND_PHYSNAME, /* physname */
|
|
|
|
FIELD_LOC_KIND_DWARF_BLOCK /* dwarf_block */
|
2013-01-19 22:41:55 +00:00
|
|
|
@@ -614,6 +615,7 @@ struct main_type
|
2010-01-16 22:32:10 +00:00
|
|
|
is the location (in the target) of the static field.
|
2011-01-17 15:31:43 +00:00
|
|
|
Otherwise, physname is the mangled label of the static field. */
|
2010-01-16 22:32:10 +00:00
|
|
|
|
|
|
|
+ /* This address is unrelocated by the objfile's ANOFFSET. */
|
|
|
|
CORE_ADDR physaddr;
|
2011-07-22 22:41:56 +00:00
|
|
|
const char *physname;
|
2012-01-03 15:00:12 +00:00
|
|
|
|
2013-01-19 22:41:55 +00:00
|
|
|
@@ -1237,6 +1239,7 @@ extern void allocate_gnat_aux_type (stru
|
2012-06-03 17:40:44 +00:00
|
|
|
#define FIELD_ENUMVAL_LVAL(thisfld) ((thisfld).loc.enumval)
|
|
|
|
#define FIELD_ENUMVAL(thisfld) (FIELD_ENUMVAL_LVAL (thisfld) + 0)
|
2010-01-12 22:15:57 +00:00
|
|
|
#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)
|
2012-01-03 15:00:12 +00:00
|
|
|
#define FIELD_DWARF_BLOCK(thisfld) ((thisfld).loc.dwarf_block)
|
2010-01-12 22:15:57 +00:00
|
|
|
#define SET_FIELD_BITPOS(thisfld, bitpos) \
|
2013-01-19 22:41:55 +00:00
|
|
|
@@ -1248,6 +1251,7 @@ extern void allocate_gnat_aux_type (stru
|
2010-01-12 22:15:57 +00:00
|
|
|
#define SET_FIELD_PHYSNAME(thisfld, name) \
|
|
|
|
(FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_PHYSNAME, \
|
|
|
|
FIELD_STATIC_PHYSNAME (thisfld) = (name))
|
|
|
|
+/* This address is unrelocated by the objfile's ANOFFSET. */
|
|
|
|
#define SET_FIELD_PHYSADDR(thisfld, addr) \
|
|
|
|
(FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_PHYSADDR, \
|
|
|
|
FIELD_STATIC_PHYSADDR (thisfld) = (addr))
|
2013-01-19 22:41:55 +00:00
|
|
|
@@ -1264,6 +1268,7 @@ extern void allocate_gnat_aux_type (stru
|
2010-01-12 22:15:57 +00:00
|
|
|
#define TYPE_FIELD_BITPOS(thistype, n) FIELD_BITPOS (TYPE_FIELD (thistype, n))
|
2012-06-03 17:40:44 +00:00
|
|
|
#define TYPE_FIELD_ENUMVAL(thistype, n) FIELD_ENUMVAL (TYPE_FIELD (thistype, n))
|
2010-01-12 22:15:57 +00:00
|
|
|
#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))
|
2012-01-03 15:00:12 +00:00
|
|
|
#define TYPE_FIELD_DWARF_BLOCK(thistype, n) FIELD_DWARF_BLOCK (TYPE_FIELD (thistype, n))
|
2010-01-12 22:15:57 +00:00
|
|
|
#define TYPE_FIELD_ARTIFICIAL(thistype, n) FIELD_ARTIFICIAL(TYPE_FIELD(thistype,n))
|
2013-01-19 22:41:55 +00:00
|
|
|
Index: gdb-7.5.50.20130118/gdb/jv-lang.c
|
2010-01-16 22:32:10 +00:00
|
|
|
===================================================================
|
2013-01-19 22:41:55 +00:00
|
|
|
--- gdb-7.5.50.20130118.orig/gdb/jv-lang.c 2013-01-18 23:07:03.488358315 +0100
|
|
|
|
+++ gdb-7.5.50.20130118/gdb/jv-lang.c 2013-01-18 23:08:10.286451570 +0100
|
|
|
|
@@ -430,7 +430,8 @@ java_link_class_type (struct gdbarch *gd
|
2010-01-12 22:15:57 +00:00
|
|
|
|
|
|
|
fields = NULL;
|
2011-01-17 15:31:43 +00:00
|
|
|
nfields--; /* First set up dummy "class" field. */
|
2010-01-12 22:15:57 +00:00
|
|
|
- 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);
|
2013-01-19 22:41:55 +00:00
|
|
|
@@ -478,7 +479,8 @@ java_link_class_type (struct gdbarch *gd
|
2010-01-12 22:15:57 +00:00
|
|
|
SET_TYPE_FIELD_PROTECTED (type, i);
|
|
|
|
}
|
|
|
|
if (accflags & 0x0008) /* ACC_STATIC */
|
|
|
|
- SET_FIELD_PHYSADDR (TYPE_FIELD (type, i), boffset);
|
|
|
|
+ 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
|
2012-06-03 17:40:44 +00:00
|
|
|
SET_FIELD_BITPOS (TYPE_FIELD (type, i), 8 * boffset);
|
2010-01-12 22:15:57 +00:00
|
|
|
if (accflags & 0x8000) /* FIELD_UNRESOLVED_FLAG */
|
2013-01-19 22:41:55 +00:00
|
|
|
Index: gdb-7.5.50.20130118/gdb/value.c
|
2010-01-16 22:32:10 +00:00
|
|
|
===================================================================
|
2013-01-19 22:41:55 +00:00
|
|
|
--- gdb-7.5.50.20130118.orig/gdb/value.c 2013-01-18 23:07:03.490358319 +0100
|
|
|
|
+++ gdb-7.5.50.20130118/gdb/value.c 2013-01-18 23:08:10.287451543 +0100
|
|
|
|
@@ -2624,7 +2624,8 @@ value_static_field (struct type *type, i
|
2010-01-12 22:15:57 +00:00
|
|
|
{
|
2010-07-21 21:30:20 +00:00
|
|
|
case FIELD_LOC_KIND_PHYSADDR:
|
|
|
|
retval = value_at_lazy (TYPE_FIELD_TYPE (type, fieldno),
|
|
|
|
- TYPE_FIELD_STATIC_PHYSADDR (type, fieldno));
|
|
|
|
+ TYPE_FIELD_STATIC_PHYSADDR (type, fieldno)
|
|
|
|
+ + (TYPE_OBJFILE (type) == NULL ? 0 : ANOFFSET (TYPE_OBJFILE (type)->section_offsets, SECT_OFF_TEXT (TYPE_OBJFILE (type)))));
|
|
|
|
break;
|
|
|
|
case FIELD_LOC_KIND_PHYSNAME:
|
2010-01-12 22:15:57 +00:00
|
|
|
{
|