Accepting request 181855 from devel:gcc
- Enable multi-target support - gdb-ia64-tdep.patch: build fixes - Use --build when configuring - Don't remove %buildroot in %install - Set pkgversion and bugurl (forwarded request 181773 from Andreas_Schwab) OBS-URL: https://build.opensuse.org/request/show/181855 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gdb?expand=0&rev=92
This commit is contained in:
committed by
Git OBS Bridge
parent
16b5661a6f
commit
9cdd33a15c
@@ -1,61 +1,8 @@
|
||||
Index: gdb-7.4.50.20120602/gdb/dwarf2read.c
|
||||
Index: gdb-7.5.50.20130118/gdb/gdbtypes.h
|
||||
===================================================================
|
||||
--- 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;
|
||||
- CORE_ADDR base = (CORE_ADDR) 0;
|
||||
+ struct objfile *objfile = cu->objfile;
|
||||
+ CORE_ADDR baseaddr = ANOFFSET (objfile->section_offsets,
|
||||
+ SECT_OFF_TEXT (objfile));
|
||||
+ /* This is used only for DW_AT_data_member_location entries. */
|
||||
+ CORE_ADDR base = 0;
|
||||
+ int base_p = 0;
|
||||
|
||||
attr = dwarf2_attr (die, DW_AT_location, cu);
|
||||
if (attr)
|
||||
@@ -9755,6 +9760,7 @@ read_common_block (struct die_info *die,
|
||||
if (attr_form_is_block (attr))
|
||||
{
|
||||
base = decode_locdesc (DW_BLOCK (attr), cu);
|
||||
+ base_p = 1;
|
||||
}
|
||||
else if (attr_form_is_section_offset (attr))
|
||||
{
|
||||
@@ -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 + offset + baseaddr;
|
||||
add_symbol_to_list (sym, &global_symbols);
|
||||
}
|
||||
|
||||
if (SYMBOL_CLASS (sym) == LOC_STATIC)
|
||||
- SET_FIELD_PHYSADDR (*field, SYMBOL_VALUE_ADDRESS (sym));
|
||||
+ SET_FIELD_PHYSADDR (*field, SYMBOL_VALUE_ADDRESS (sym) - baseaddr);
|
||||
else
|
||||
SET_FIELD_PHYSNAME (*field, SYMBOL_LINKAGE_NAME (sym));
|
||||
FIELD_TYPE (*field) = SYMBOL_TYPE (sym);
|
||||
@@ -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. */
|
||||
- SYMBOL_VALUE_ADDRESS (sym) = base;
|
||||
+ SYMBOL_VALUE_ADDRESS (sym) = base + baseaddr;
|
||||
|
||||
set_die_type (die, type, cu);
|
||||
}
|
||||
Index: gdb-7.4.50.20120602/gdb/gdbtypes.h
|
||||
===================================================================
|
||||
--- 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
|
||||
--- 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
|
||||
{
|
||||
FIELD_LOC_KIND_BITPOS, /* bitpos */
|
||||
FIELD_LOC_KIND_ENUMVAL, /* enumval */
|
||||
@@ -63,7 +10,7 @@ Index: gdb-7.4.50.20120602/gdb/gdbtypes.h
|
||||
FIELD_LOC_KIND_PHYSADDR, /* physaddr */
|
||||
FIELD_LOC_KIND_PHYSNAME, /* physname */
|
||||
FIELD_LOC_KIND_DWARF_BLOCK /* dwarf_block */
|
||||
@@ -595,6 +596,7 @@ struct main_type
|
||||
@@ -614,6 +615,7 @@ struct main_type
|
||||
is the location (in the target) of the static field.
|
||||
Otherwise, physname is the mangled label of the static field. */
|
||||
|
||||
@@ -71,7 +18,7 @@ Index: gdb-7.4.50.20120602/gdb/gdbtypes.h
|
||||
CORE_ADDR physaddr;
|
||||
const char *physname;
|
||||
|
||||
@@ -1200,6 +1202,7 @@ extern void allocate_gnat_aux_type (stru
|
||||
@@ -1237,6 +1239,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)
|
||||
@@ -79,7 +26,7 @@ Index: gdb-7.4.50.20120602/gdb/gdbtypes.h
|
||||
#define FIELD_STATIC_PHYSADDR(thisfld) ((thisfld).loc.physaddr)
|
||||
#define FIELD_DWARF_BLOCK(thisfld) ((thisfld).loc.dwarf_block)
|
||||
#define SET_FIELD_BITPOS(thisfld, bitpos) \
|
||||
@@ -1211,6 +1214,7 @@ extern void allocate_gnat_aux_type (stru
|
||||
@@ -1248,6 +1251,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 +34,7 @@ Index: gdb-7.4.50.20120602/gdb/gdbtypes.h
|
||||
#define SET_FIELD_PHYSADDR(thisfld, addr) \
|
||||
(FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_PHYSADDR, \
|
||||
FIELD_STATIC_PHYSADDR (thisfld) = (addr))
|
||||
@@ -1227,6 +1231,7 @@ extern void allocate_gnat_aux_type (stru
|
||||
@@ -1264,6 +1268,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))
|
||||
@@ -95,11 +42,11 @@ Index: gdb-7.4.50.20120602/gdb/gdbtypes.h
|
||||
#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))
|
||||
Index: gdb-7.4.50.20120602/gdb/jv-lang.c
|
||||
Index: gdb-7.5.50.20130118/gdb/jv-lang.c
|
||||
===================================================================
|
||||
--- 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
|
||||
--- 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
|
||||
|
||||
fields = NULL;
|
||||
nfields--; /* First set up dummy "class" field. */
|
||||
@@ -109,7 +56,7 @@ Index: gdb-7.4.50.20120602/gdb/jv-lang.c
|
||||
TYPE_FIELD_NAME (type, nfields) = "class";
|
||||
TYPE_FIELD_TYPE (type, nfields) = value_type (clas);
|
||||
SET_TYPE_FIELD_PRIVATE (type, nfields);
|
||||
@@ -479,7 +480,8 @@ java_link_class_type (struct gdbarch *gd
|
||||
@@ -478,7 +479,8 @@ java_link_class_type (struct gdbarch *gd
|
||||
SET_TYPE_FIELD_PROTECTED (type, i);
|
||||
}
|
||||
if (accflags & 0x0008) /* ACC_STATIC */
|
||||
@@ -119,11 +66,11 @@ Index: gdb-7.4.50.20120602/gdb/jv-lang.c
|
||||
else
|
||||
SET_FIELD_BITPOS (TYPE_FIELD (type, i), 8 * boffset);
|
||||
if (accflags & 0x8000) /* FIELD_UNRESOLVED_FLAG */
|
||||
Index: gdb-7.4.50.20120602/gdb/value.c
|
||||
Index: gdb-7.5.50.20130118/gdb/value.c
|
||||
===================================================================
|
||||
--- 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
|
||||
--- 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
|
||||
{
|
||||
case FIELD_LOC_KIND_PHYSADDR:
|
||||
retval = value_at_lazy (TYPE_FIELD_TYPE (type, fieldno),
|
||||
|
Reference in New Issue
Block a user