- Archer update to the snapshot: 000db8b7bfef8581ef099ccca8689cfddfea1be8

- Archer backport: b8d3bea36b137effc929e02c4dadf73716cb330b
- Ignore explicit die representing global scope '::' (gcc 4.1 bug).
- Archer backport: c2d5c4a39b10994d86d8f2f90dfed769e8f216f3
- Fix parsing DW_AT_const_value using DW_FORM_string
- Archer backport: 8d9ab68fc0955c9de6320bec2821a21e3244600d
db41e11ae0a3aec7120ad6ce86450d838af74dd6
- Fix Fortran modules/namespaces parsing (but no change was visible in
    F11).
- Archer backport: 000db8b7bfef8581ef099ccca8689cfddfea1be8
- Fix "some Python error when displaying some C++ objects" (BZ 504356).
- testsuite: Support new rpmbuild option: --with parallel
- testsuite: gdb-orphanripper.c: Fix uninitialized `termios.c_line'.
This commit is contained in:
Jan Kratochvil 2009-06-09 15:06:05 +00:00
parent f6bd5cf63a
commit d6ca472c5a
2 changed files with 186 additions and 79 deletions

View File

@ -2,7 +2,7 @@ http://sourceware.org/gdb/wiki/ProjectArcher
http://sourceware.org/gdb/wiki/ArcherBranchManagement
GIT snapshot:
commit e2812eadef2c15baeccd003e11fdf3fbc0b90dc2
commit 000db8b7bfef8581ef099ccca8689cfddfea1be8
branch `archer' - the merge of branches:
archer-jankratochvil-merge-expr
@ -14653,7 +14653,7 @@ index 76577f1..bf46761 100644
#endif /* dwarf2loc.h */
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 55868da..c22866f 100644
index 55868da..b4720e8 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -1,8 +1,7 @@
@ -15866,15 +15866,22 @@ index 55868da..c22866f 100644
lowpc += baseaddr;
highpc += baseaddr;
@@ -3124,14 +3561,87 @@ read_func_scope (struct die_info *die, struct dwarf2_cu *cu)
@@ -3124,14 +3561,94 @@ read_func_scope (struct die_info *die, struct dwarf2_cu *cu)
cu->list_in_scope = &local_symbols;
- if (die->child != NULL)
+ switch (cu->language)
+ {
+ case language_fortran:
+ cu->language_specific.fortran.use = NULL;
+ break;
+ }
+
+ child_die = die->child;
+ die_children = 0;
+ while (child_die && child_die->tag)
{
+ {
+ process_die (child_die, cu);
+ child_die = sibling_die (child_die);
+ die_children++;
@ -15882,7 +15889,7 @@ index 55868da..c22866f 100644
+
+ attr = dwarf2_attr (die, DW_AT_abstract_origin, cu);
+ if (attr)
+ {
{
+ /* For the list of CHILD_DIEs. */
+ unsigned *offsets;
+ unsigned *offsets_end, *offsetp;
@ -15956,7 +15963,7 @@ index 55868da..c22866f 100644
}
new = pop_context ();
@@ -3145,6 +3655,13 @@ read_func_scope (struct die_info *die, struct dwarf2_cu *cu)
@@ -3145,6 +3662,13 @@ read_func_scope (struct die_info *die, struct dwarf2_cu *cu)
determine_prefix (die, cu),
processing_has_namespace_info);
@ -15970,7 +15977,7 @@ index 55868da..c22866f 100644
/* If we have address ranges, record them. */
dwarf2_record_block_ranges (die, block, baseaddr, cu);
@@ -3154,6 +3671,7 @@ read_func_scope (struct die_info *die, struct dwarf2_cu *cu)
@@ -3154,6 +3678,7 @@ read_func_scope (struct die_info *die, struct dwarf2_cu *cu)
back to building a containing block's symbol lists. */
local_symbols = new->locals;
param_symbols = new->params;
@ -15978,7 +15985,7 @@ index 55868da..c22866f 100644
/* If we've finished processing a top-level function, subsequent
symbols go in the file symbol list. */
@@ -3180,7 +3698,7 @@ read_lexical_block_scope (struct die_info *die, struct dwarf2_cu *cu)
@@ -3180,7 +3705,7 @@ read_lexical_block_scope (struct die_info *die, struct dwarf2_cu *cu)
as multiple lexical blocks? Handling children in a sane way would
be nasty. Might be easier to properly extend generic blocks to
describe ranges. */
@ -15987,7 +15994,7 @@ index 55868da..c22866f 100644
return;
lowpc += baseaddr;
highpc += baseaddr;
@@ -3197,7 +3715,7 @@ read_lexical_block_scope (struct die_info *die, struct dwarf2_cu *cu)
@@ -3197,7 +3722,7 @@ read_lexical_block_scope (struct die_info *die, struct dwarf2_cu *cu)
}
new = pop_context ();
@ -15996,7 +16003,7 @@ index 55868da..c22866f 100644
{
struct block *block
= finish_block (0, &local_symbols, new->old_blocks, new->start_addr,
@@ -3216,6 +3734,7 @@ read_lexical_block_scope (struct die_info *die, struct dwarf2_cu *cu)
@@ -3216,6 +3741,7 @@ read_lexical_block_scope (struct die_info *die, struct dwarf2_cu *cu)
dwarf2_record_block_ranges (die, block, baseaddr, cu);
}
local_symbols = new->locals;
@ -16004,7 +16011,7 @@ index 55868da..c22866f 100644
}
/* Get low and high pc attributes from DW_AT_ranges attribute value OFFSET.
@@ -3351,7 +3870,8 @@ dwarf2_ranges_read (unsigned offset, CORE_ADDR *low_return,
@@ -3351,7 +3877,8 @@ dwarf2_ranges_read (unsigned offset, CORE_ADDR *low_return,
discontinuous, i.e. derived from DW_AT_ranges information. */
static int
dwarf2_get_pc_bounds (struct die_info *die, CORE_ADDR *lowpc,
@ -16014,7 +16021,7 @@ index 55868da..c22866f 100644
{
struct attribute *attr;
CORE_ADDR low = 0;
@@ -3379,7 +3899,7 @@ dwarf2_get_pc_bounds (struct die_info *die, CORE_ADDR *lowpc,
@@ -3379,7 +3906,7 @@ dwarf2_get_pc_bounds (struct die_info *die, CORE_ADDR *lowpc,
{
/* Value of the DW_AT_ranges attribute is the offset in the
.debug_ranges section. */
@ -16023,7 +16030,7 @@ index 55868da..c22866f 100644
return 0;
/* Found discontinuous range of addresses. */
ret = -1;
@@ -3418,7 +3938,7 @@ dwarf2_get_subprogram_pc_bounds (struct die_info *die,
@@ -3418,7 +3945,7 @@ dwarf2_get_subprogram_pc_bounds (struct die_info *die,
CORE_ADDR low, high;
struct die_info *child = die->child;
@ -16032,7 +16039,7 @@ index 55868da..c22866f 100644
{
*lowpc = min (*lowpc, low);
*highpc = max (*highpc, high);
@@ -3455,7 +3975,7 @@ get_scope_pc_bounds (struct die_info *die,
@@ -3455,7 +3982,7 @@ get_scope_pc_bounds (struct die_info *die,
CORE_ADDR best_high = (CORE_ADDR) 0;
CORE_ADDR current_low, current_high;
@ -16041,7 +16048,7 @@ index 55868da..c22866f 100644
{
best_low = current_low;
best_high = current_high;
@@ -3750,8 +4270,14 @@ dwarf2_add_field (struct field_info *fip, struct die_info *die,
@@ -3750,8 +4277,14 @@ dwarf2_add_field (struct field_info *fip, struct die_info *die,
if (fieldname == NULL)
return;
@ -16057,7 +16064,7 @@ index 55868da..c22866f 100644
/* The name is already allocated along with this objfile, so we don't
need to duplicate it for the type. */
@@ -3881,8 +4407,14 @@ dwarf2_add_member_fn (struct field_info *fip, struct die_info *die,
@@ -3881,8 +4414,14 @@ dwarf2_add_member_fn (struct field_info *fip, struct die_info *die,
if (fieldname == NULL)
return;
@ -16073,7 +16080,7 @@ index 55868da..c22866f 100644
/* Look up member function name in fieldlist. */
for (i = 0; i < fip->nfnfields; i++)
@@ -3926,7 +4458,7 @@ dwarf2_add_member_fn (struct field_info *fip, struct die_info *die,
@@ -3926,7 +4465,7 @@ dwarf2_add_member_fn (struct field_info *fip, struct die_info *die,
/* The name is already allocated along with this objfile, so we don't
need to duplicate it for the type. */
fnp->physname = physname ? physname : "";
@ -16082,7 +16089,7 @@ index 55868da..c22866f 100644
this_type = read_type_die (die, cu);
if (this_type && TYPE_CODE (this_type) == TYPE_CODE_FUNC)
{
@@ -4110,7 +4642,7 @@ quirk_gcc_member_function_pointer (struct die_info *die, struct dwarf2_cu *cu)
@@ -4110,7 +4649,7 @@ quirk_gcc_member_function_pointer (struct die_info *die, struct dwarf2_cu *cu)
return NULL;
domain_type = TYPE_TARGET_TYPE (TYPE_FIELD_TYPE (pfn_type, 0));
@ -16091,7 +16098,7 @@ index 55868da..c22866f 100644
smash_to_method_type (type, domain_type, TYPE_TARGET_TYPE (pfn_type),
TYPE_FIELDS (pfn_type), TYPE_NFIELDS (pfn_type),
TYPE_VARARGS (pfn_type));
@@ -4147,7 +4679,7 @@ read_structure_type (struct die_info *die, struct dwarf2_cu *cu)
@@ -4147,7 +4686,7 @@ read_structure_type (struct die_info *die, struct dwarf2_cu *cu)
if (type)
return type;
@ -16100,7 +16107,7 @@ index 55868da..c22866f 100644
INIT_CPLUS_SPECIFIC (type);
name = dwarf2_name (die, cu);
if (name != NULL)
@@ -4360,7 +4892,7 @@ read_enumeration_type (struct die_info *die, struct dwarf2_cu *cu)
@@ -4360,7 +4899,7 @@ read_enumeration_type (struct die_info *die, struct dwarf2_cu *cu)
struct attribute *attr;
const char *name;
@ -16109,7 +16116,7 @@ index 55868da..c22866f 100644
TYPE_CODE (type) = TYPE_CODE_ENUM;
name = dwarf2_full_name (die, cu);
@@ -4410,10 +4942,15 @@ determine_class_name (struct die_info *die, struct dwarf2_cu *cu)
@@ -4410,10 +4949,15 @@ determine_class_name (struct die_info *die, struct dwarf2_cu *cu)
{
if (child->tag == DW_TAG_subprogram)
{
@ -16128,7 +16135,7 @@ index 55868da..c22866f 100644
if (phys_prefix != NULL)
{
@@ -4510,6 +5047,29 @@ process_enumeration_scope (struct die_info *die, struct dwarf2_cu *cu)
@@ -4510,6 +5054,29 @@ process_enumeration_scope (struct die_info *die, struct dwarf2_cu *cu)
new_symbol (die, this_type, cu);
}
@ -16158,7 +16165,7 @@ index 55868da..c22866f 100644
/* Extract all information from a DW_TAG_array_type DIE and put it in
the DIE's type field. For now, this only handles one dimensional
arrays. */
@@ -4523,7 +5083,7 @@ read_array_type (struct die_info *die, struct dwarf2_cu *cu)
@@ -4523,7 +5090,7 @@ read_array_type (struct die_info *die, struct dwarf2_cu *cu)
struct type *element_type, *range_type, *index_type;
struct type **range_types = NULL;
struct attribute *attr;
@ -16167,7 +16174,7 @@ index 55868da..c22866f 100644
struct cleanup *back_to;
char *name;
@@ -4570,16 +5130,11 @@ read_array_type (struct die_info *die, struct dwarf2_cu *cu)
@@ -4570,16 +5137,11 @@ read_array_type (struct die_info *die, struct dwarf2_cu *cu)
type = element_type;
if (read_array_order (die, cu) == DW_ORD_col_major)
@ -16189,7 +16196,7 @@ index 55868da..c22866f 100644
/* Understand Dwarf2 support for vector types (like they occur on
the PowerPC w/ AltiVec). Gcc just adds another attribute to the
@@ -4646,12 +5201,14 @@ read_set_type (struct die_info *die, struct dwarf2_cu *cu)
@@ -4646,12 +5208,14 @@ read_set_type (struct die_info *die, struct dwarf2_cu *cu)
return set_die_type (die, set_type, cu);
}
@ -16206,7 +16213,7 @@ index 55868da..c22866f 100644
struct attribute *attr;
struct symbol *sym;
CORE_ADDR base = (CORE_ADDR) 0;
@@ -4676,10 +5233,40 @@ read_common_block (struct die_info *die, struct dwarf2_cu *cu)
@@ -4676,10 +5240,40 @@ read_common_block (struct die_info *die, struct dwarf2_cu *cu)
}
if (die->child != NULL)
{
@ -16247,7 +16254,7 @@ index 55868da..c22866f 100644
attr = dwarf2_attr (child_die, DW_AT_data_member_location, cu);
if (attr)
{
@@ -4687,8 +5274,25 @@ read_common_block (struct die_info *die, struct dwarf2_cu *cu)
@@ -4687,8 +5281,25 @@ read_common_block (struct die_info *die, struct dwarf2_cu *cu)
base + decode_locdesc (DW_BLOCK (attr), cu);
add_symbol_to_list (sym, &global_symbols);
}
@ -16273,7 +16280,7 @@ index 55868da..c22866f 100644
}
}
@@ -4756,12 +5360,17 @@ read_namespace (struct die_info *die, struct dwarf2_cu *cu)
@@ -4756,9 +5367,7 @@ read_namespace (struct die_info *die, struct dwarf2_cu *cu)
if (is_anonymous)
{
const char *previous_prefix = determine_prefix (die, cu);
@ -16284,16 +16291,6 @@ index 55868da..c22866f 100644
}
}
+ switch (cu->language)
+ {
+ case language_fortran:
+ cu->language_specific.fortran.use = NULL;
+ break;
+ }
+
if (die->child != NULL)
{
struct die_info *child_die = die->child;
@@ -4774,20 +5383,155 @@ read_namespace (struct die_info *die, struct dwarf2_cu *cu)
}
}
@ -16340,9 +16337,10 @@ index 55868da..c22866f 100644
+ complaint (&symfile_complaints, _("DW_TAG_module has no name, offset 0x%x"),
+ die->offset);
+ type = init_type (TYPE_CODE_MODULE, 0, 0, module_name, objfile);
+
- /* FIXME: Support the separate Fortran module namespaces. */
+ /* Create a context for reading the module variables. */
+
+ new = push_context (0, 0);
+
+ save_file_symbols = file_symbols;
@ -16350,10 +16348,9 @@ index 55868da..c22866f 100644
+ save_global_symbols = global_symbols;
+ global_symbols = NULL;
+ save_list_in_scope = cu->list_in_scope;
- /* FIXME: Support the separate Fortran module namespaces. */
+
+ /* Process the child DIEs. */
+
+ child_die = die->child;
while (child_die && child_die->tag)
{
@ -17105,7 +17102,15 @@ index 55868da..c22866f 100644
default:
/* Not a tag we recognize. Hopefully we aren't processing
trash data, but since we must specifically ignore things
@@ -8042,12 +8963,18 @@ read_type_die (struct die_info *die, struct dwarf2_cu *cu)
@@ -7826,6 +8747,7 @@ dwarf2_const_value (struct attribute *attr, struct symbol *sym,
DW_ADDR (attr));
SYMBOL_CLASS (sym) = LOC_CONST_BYTES;
break;
+ case DW_FORM_string:
case DW_FORM_strp:
/* DW_STRING is already allocated on the obstack, point directly
to it. */
@@ -8042,12 +8964,18 @@ read_type_die (struct die_info *die, struct dwarf2_cu *cu)
case DW_TAG_namespace:
this_type = read_namespace_type (die, cu);
break;
@ -17124,7 +17129,29 @@ index 55868da..c22866f 100644
return this_type;
}
@@ -8128,6 +9055,19 @@ determine_prefix (struct die_info *die, struct dwarf2_cu *cu)
@@ -8113,9 +9041,18 @@ determine_prefix (struct die_info *die, struct dwarf2_cu *cu)
switch (parent->tag)
{
case DW_TAG_namespace:
- parent_type = read_type_die (parent, cu);
- /* We give a name to even anonymous namespaces. */
- return TYPE_TAG_NAME (parent_type);
+ {
+ char *prefix;
+ parent_type = read_type_die (parent, cu);
+ /* We give a name to even anonymous namespaces. */
+ prefix = TYPE_TAG_NAME (parent_type);
+ /* Special hack for bogus global namespace that is emitted as an
+ explicit namespace with the name '::' in g++ 4.1, for
+ some decls. */
+ if (strcmp(prefix, "::")==0)
+ return "";
+ return prefix;
+ }
case DW_TAG_class_type:
case DW_TAG_interface_type:
case DW_TAG_structure_type:
@@ -8128,6 +9065,19 @@ determine_prefix (struct die_info *die, struct dwarf2_cu *cu)
members; no typedefs, no member functions, et cetera.
So it does not need a prefix. */
return "";
@ -17144,7 +17171,7 @@ index 55868da..c22866f 100644
default:
return determine_prefix (parent, cu);
}
@@ -8192,12 +9132,64 @@ dwarf2_linkage_name (struct die_info *die, struct dwarf2_cu *cu)
@@ -8192,12 +9142,64 @@ dwarf2_linkage_name (struct die_info *die, struct dwarf2_cu *cu)
attr = dwarf2_attr (die, DW_AT_MIPS_linkage_name, cu);
if (attr && DW_STRING (attr))
return DW_STRING (attr);
@ -17212,7 +17239,7 @@ index 55868da..c22866f 100644
/* Get name of a die, return NULL if not found. */
static char *
@@ -8206,9 +9198,29 @@ dwarf2_name (struct die_info *die, struct dwarf2_cu *cu)
@@ -8206,9 +9208,29 @@ dwarf2_name (struct die_info *die, struct dwarf2_cu *cu)
struct attribute *attr;
attr = dwarf2_attr (die, DW_AT_name, cu);
@ -17245,7 +17272,7 @@ index 55868da..c22866f 100644
}
/* Return the die that this die in an extension of, or NULL if there
@@ -8703,6 +9715,8 @@ dwarf_form_name (unsigned form)
@@ -8703,6 +9725,8 @@ dwarf_form_name (unsigned form)
return "DW_FORM_ref_udata";
case DW_FORM_indirect:
return "DW_FORM_indirect";
@ -17254,7 +17281,7 @@ index 55868da..c22866f 100644
default:
return "DW_FORM_<unknown>";
}
@@ -9353,26 +10367,35 @@ dwarf2_get_ref_die_offset (struct attribute *attr)
@@ -9353,26 +10377,35 @@ dwarf2_get_ref_die_offset (struct attribute *attr)
return result;
}
@ -17284,7 +17311,7 @@ index 55868da..c22866f 100644
- return default_value;
+ *val_return = DW_SND (attr);
+ return dwarf2_attr_const;
}
+ }
+ if (attr->form == DW_FORM_udata
+ || attr->form == DW_FORM_data1
+ || attr->form == DW_FORM_data2
@ -17293,7 +17320,7 @@ index 55868da..c22866f 100644
+ {
+ *val_return = DW_UNSND (attr);
+ return dwarf2_attr_const;
+ }
}
+ if (attr->form == DW_FORM_block
+ || attr->form == DW_FORM_block1
+ || attr->form == DW_FORM_block2
@ -17305,7 +17332,7 @@ index 55868da..c22866f 100644
}
/* THIS_CU has a reference to PER_CU. If necessary, load the new compilation
@@ -9963,6 +10986,17 @@ dwarf_decode_macros (struct line_header *lh, unsigned int offset,
@@ -9963,6 +10996,17 @@ dwarf_decode_macros (struct line_header *lh, unsigned int offset,
{
gdb_byte *mac_ptr, *mac_end;
struct macro_source_file *current_file = 0;
@ -17323,7 +17350,7 @@ index 55868da..c22866f 100644
if (dwarf2_per_objfile->macinfo_buffer == NULL)
{
@@ -9970,19 +11004,24 @@ dwarf_decode_macros (struct line_header *lh, unsigned int offset,
@@ -9970,19 +11014,24 @@ dwarf_decode_macros (struct line_header *lh, unsigned int offset,
return;
}
@ -17352,7 +17379,7 @@ index 55868da..c22866f 100644
}
macinfo_type = read_1_byte (abfd, mac_ptr);
@@ -9993,7 +11032,81 @@ dwarf_decode_macros (struct line_header *lh, unsigned int offset,
@@ -9993,7 +11042,81 @@ dwarf_decode_macros (struct line_header *lh, unsigned int offset,
/* A zero macinfo type indicates the end of the macro
information. */
case 0:
@ -17435,7 +17462,7 @@ index 55868da..c22866f 100644
case DW_MACINFO_define:
case DW_MACINFO_undef:
@@ -10008,19 +11121,31 @@ dwarf_decode_macros (struct line_header *lh, unsigned int offset,
@@ -10008,19 +11131,31 @@ dwarf_decode_macros (struct line_header *lh, unsigned int offset,
mac_ptr += bytes_read;
if (! current_file)
@ -17478,7 +17505,7 @@ index 55868da..c22866f 100644
}
break;
@@ -10034,9 +11159,22 @@ dwarf_decode_macros (struct line_header *lh, unsigned int offset,
@@ -10034,9 +11169,22 @@ dwarf_decode_macros (struct line_header *lh, unsigned int offset,
file = read_unsigned_leb128 (abfd, mac_ptr, &bytes_read);
mac_ptr += bytes_read;
@ -17504,7 +17531,7 @@ index 55868da..c22866f 100644
}
break;
@@ -10090,7 +11228,7 @@ dwarf_decode_macros (struct line_header *lh, unsigned int offset,
@@ -10090,7 +11238,7 @@ dwarf_decode_macros (struct line_header *lh, unsigned int offset,
}
break;
}
@ -17513,7 +17540,7 @@ index 55868da..c22866f 100644
}
/* Check if the attribute's form is a DW_FORM_block*
@@ -10150,6 +11288,34 @@ attr_form_is_constant (struct attribute *attr)
@@ -10150,6 +11298,34 @@ attr_form_is_constant (struct attribute *attr)
}
}
@ -17548,7 +17575,7 @@ index 55868da..c22866f 100644
static void
dwarf2_symbol_mark_computed (struct attribute *attr, struct symbol *sym,
struct dwarf2_cu *cu)
@@ -10179,35 +11345,24 @@ dwarf2_symbol_mark_computed (struct attribute *attr, struct symbol *sym,
@@ -10179,35 +11355,24 @@ dwarf2_symbol_mark_computed (struct attribute *attr, struct symbol *sym,
SYMBOL_OPS (sym) = &dwarf2_loclist_funcs;
SYMBOL_LOCATION_BATON (sym) = baton;
}
@ -17598,7 +17625,7 @@ index 55868da..c22866f 100644
}
}
@@ -10482,6 +11637,31 @@ offset_and_type_eq (const void *item_lhs, const void *item_rhs)
@@ -10482,6 +11647,31 @@ offset_and_type_eq (const void *item_lhs, const void *item_rhs)
return ofs_lhs->offset == ofs_rhs->offset;
}
@ -17630,7 +17657,7 @@ index 55868da..c22866f 100644
/* Set the type associated with DIE to TYPE. Save it in CU's hash
table if necessary. For convenience, return TYPE. */
@@ -10490,6 +11670,8 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu)
@@ -10490,6 +11680,8 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu)
{
struct dwarf2_offset_and_type **slot, ofs;
@ -25217,10 +25244,10 @@ index 0000000..fe7c072
+register_libstdcxx_printers (gdb.current_objfile ())
diff --git a/gdb/python/lib/gdb/libstdcxx/v6/printers.py b/gdb/python/lib/gdb/libstdcxx/v6/printers.py
new file mode 100644
index 0000000..58fd91c
index 0000000..8c0efc5
--- /dev/null
+++ b/gdb/python/lib/gdb/libstdcxx/v6/printers.py
@@ -0,0 +1,629 @@
@@ -0,0 +1,631 @@
+# Pretty-printers for libstc++.
+
+# Copyright (C) 2008, 2009 Free Software Foundation, Inc.
@ -25250,9 +25277,11 @@ index 0000000..58fd91c
+ self.val = val
+
+ def to_string (self):
+ if self.val['_M_refcount']['_M_pi'] == 0:
+ return '%s (empty) %s' % (self.typename, self.val['_M_ptr'])
+ return '%s (count %d) %s' % (self.typename,
+ self.val['_M_refcount']['_M_pi']['_M_use_count'],
+ self.val['_M_ptr'])
+ self.val['_M_refcount']['_M_pi']['_M_use_count'],
+ self.val['_M_ptr'])
+
+class UniquePointerPrinter:
+ "Print a unique_ptr"
@ -39458,7 +39487,7 @@ index 0000000..1c6e84a
+ "func.* \\(.*\\) at .*" \
+ "step"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-strp.S b/gdb/testsuite/gdb.dwarf2/dw2-strp.S
index a1602a5..293cc1b 100644
index a1602a5..4dbb761 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-strp.S
+++ b/gdb/testsuite/gdb.dwarf2/dw2-strp.S
@@ -28,7 +28,8 @@
@ -39471,23 +39500,60 @@ index a1602a5..293cc1b 100644
.Larray_type:
.uleb128 2 /* Abbrev: DW_TAG_array_type */
@@ -60,6 +61,10 @@
@@ -51,15 +52,25 @@
.byte 1 /* DW_AT_byte_size */
.byte 6 /* DW_AT_encoding */
- .uleb128 5 /* Abbrev: DW_TAG_variable */
+ .uleb128 5 /* Abbrev: DW_TAG_variable DW_FORM_strp */
.4byte .Lvarname /* DW_AT_name */
.4byte .Lconst_type-.Lcu1_begin/* DW_AT_type */
.4byte .Lvarcontents /* DW_AT_const_value */
.byte 1 /* DW_AT_external */
+ .uleb128 6 /* Abbrev: DW_TAG_variable DW_FORM_string */
+ .string "a_string2" /* DW_AT_name */
+ .4byte .Lconst_type-.Lcu1_begin/* DW_AT_type */
+ .string "hello world2\n" /* DW_AT_const_value */
+ .byte 1 /* DW_AT_external */
+
.Lconst_type:
.uleb128 6 /* Abbrev: DW_TAG_const_type */
- .uleb128 6 /* Abbrev: DW_TAG_const_type */
+ .uleb128 7 /* Abbrev: DW_TAG_const_type */
.4byte .Larray_type-.Lcu1_begin/* DW_AT_type */
+
+ .uleb128 7 /* Abbrev: DW_TAG_variable (name "") */
+ .uleb128 8 /* Abbrev: DW_TAG_variable (name "") */
+ .4byte .Lemptyname /* DW_AT_name */
+
.byte 0 /* End of children of CU */
.Lcu1_end:
@@ -126,6 +131,15 @@
@@ -120,12 +131,35 @@
.byte 0x0 /* Terminator */
.uleb128 6 /* Abbrev code */
+ .uleb128 0x34 /* DW_TAG_variable */
+ .byte 0x0 /* no_children */
+ .uleb128 0x3 /* DW_AT_name */
+ .uleb128 0x8 /* DW_FORM_string */
+ .uleb128 0x49 /* DW_AT_type */
+ .uleb128 0x13 /* DW_FORM_ref4 */
+ .uleb128 0x1c /* DW_AT_const_value */
+ .uleb128 0x8 /* DW_FORM_string */
+ .uleb128 0x3f /* DW_AT_external */
+ .uleb128 0xc /* DW_FORM_flag */
+ .byte 0x0 /* Terminator */
+ .byte 0x0 /* Terminator */
+
+ .uleb128 7 /* Abbrev code */
.uleb128 0x26 /* DW_TAG_const_type */
.byte 0x0 /* DW_children_no */
.uleb128 0x49 /* DW_AT_type */
.uleb128 0x13 /* DW_FORM_ref4 */
.byte 0x0 /* Terminator */
.byte 0x0 /* Terminator */
+
+ .uleb128 7 /* Abbrev code */
+ .uleb128 8 /* Abbrev code */
+ .uleb128 0x34 /* DW_TAG_variable */
+ .byte 0x0 /* DW_children_no */
+ .uleb128 0x3 /* DW_AT_name */
@ -39498,12 +39564,26 @@ index a1602a5..293cc1b 100644
.byte 0x0 /* Terminator */
/* String table */
@@ -140,3 +154,5 @@
@@ -140,3 +174,5 @@
.string "a_string"
.Lvarcontents:
.string "hello world!\n"
+.Lemptyname:
+ .string ""
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-strp.exp b/gdb/testsuite/gdb.dwarf2/dw2-strp.exp
index 2201d30..41620a4 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-strp.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-strp.exp
@@ -48,5 +48,8 @@ gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
-gdb_test "p a_string" "\\\$1 = \"hello world!\\\\n\""
+gdb_test "p a_string" " = \"hello world!\\\\n\""
gdb_test "ptype a_string" "type = char \\\[14\\\]"
+
+gdb_test "p a_string2" " = \"hello world2\\\\n\""
+gdb_test "ptype a_string2" "type = char \\\[14\\\]"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-unresolved-main.c b/gdb/testsuite/gdb.dwarf2/dw2-unresolved-main.c
new file mode 100644
index 0000000..c24eb96
@ -40438,10 +40518,10 @@ index 0000000..4229304
+ l = .FALSE. ! stop-here
+end
diff --git a/gdb/testsuite/gdb.fortran/module.exp b/gdb/testsuite/gdb.fortran/module.exp
index 342ccee..5f078a3 100644
index 342ccee..c836c3c 100644
--- a/gdb/testsuite/gdb.fortran/module.exp
+++ b/gdb/testsuite/gdb.fortran/module.exp
@@ -15,21 +15,30 @@
@@ -15,21 +15,31 @@
set testfile "module"
set srcfile ${testfile}.f90
@ -40481,11 +40561,12 @@ index 342ccee..5f078a3 100644
+gdb_test "print var_b" " = 11"
+gdb_test "print var_c" "No symbol \"var_c\" in current context\\."
+gdb_test "print var_d" " = 12"
+gdb_test "print var_i" " = 14" "print var_i value 14"
diff --git a/gdb/testsuite/gdb.fortran/module.f90 b/gdb/testsuite/gdb.fortran/module.f90
index 501ccc8..99013dd 100644
index 501ccc8..118931d 100644
--- a/gdb/testsuite/gdb.fortran/module.f90
+++ b/gdb/testsuite/gdb.fortran/module.f90
@@ -13,10 +13,36 @@
@@ -13,10 +13,37 @@
! You should have received a copy of the GNU General Public License
! along with this program. If not, see <http://www.gnu.org/licenses/>.
@ -40503,7 +40584,7 @@ index 501ccc8..99013dd 100644
+end module mod2
+
+module modmany
+ integer :: var_a = 10, var_b = 11, var_c = 12
+ integer :: var_a = 10, var_b = 11, var_c = 12, var_i = 14
+end module modmany
+
+ subroutine sub1
@ -40518,13 +40599,14 @@ index 501ccc8..99013dd 100644
+ var_i = var_i ! i-is-2
+ end
+
+ use modmany, only: var_b, var_d => var_c
+ use modmany, only: var_b, var_d => var_c, var_i
+
+ call sub1
+ call sub2
+
+ if (var_b .ne. 11) call abort
+ if (var_d .ne. 12) call abort
+ if (var_i .ne. 14) call abort
+ var_b = var_b ! a-b-c-d
end
diff --git a/gdb/testsuite/gdb.fortran/string.exp b/gdb/testsuite/gdb.fortran/string.exp

View File

@ -1,5 +1,6 @@
# rpmbuild parameters:
# --with testsuite: Run the testsuite (biarch if possible). Default is without.
# --with parallel: Run the testsuite in maximum parallel mode.
# --with debug: Build without optimizations and without splitting the debuginfo.
# --with upstream: No Fedora specific patches get applied.
@ -13,7 +14,7 @@ Version: 6.8.50.20090302
# The release always contains a leading reserved number, start it at 1.
# `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
Release: 23%{?_with_upstream:.upstream}%{?dist}
Release: 24%{?_with_upstream:.upstream}%{?dist}
License: GPLv3+
Group: Development/Debuggers
@ -740,10 +741,20 @@ gcc -o ./orphanripper %{SOURCE2} -Wall -lutil
CHECK="$(echo $CHECK|sed 's#check//unix/[^ ]*#& &/-fPIE/-pie#g')"
%endif # 0%{!?_with_upstream:1}
%if 0%{?_with_parallel:1}
for CURRENT in $CHECK
do
./orphanripper make -k $CURRENT &
done
echo >&2 "Waiting for parallel testsuite runs to finish..."
wait
echo >&2 "Parallel testsuite runs finished."
%else # 0%{?_with_parallel:1}
for CURRENT in $CHECK
do
./orphanripper make -k $CURRENT || :
done
%endif # 0%{?_with_parallel:1}
)
for t in sum log
do
@ -865,6 +876,20 @@ fi
%endif
%changelog
* Tue Jun 9 2009 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.8.50.20090302-24
- Archer update to the snapshot: 000db8b7bfef8581ef099ccca8689cfddfea1be8
- Archer backport: b8d3bea36b137effc929e02c4dadf73716cb330b
- Ignore explicit die representing global scope '::' (gcc 4.1 bug).
- Archer backport: c2d5c4a39b10994d86d8f2f90dfed769e8f216f3
- Fix parsing DW_AT_const_value using DW_FORM_string
- Archer backport: 8d9ab68fc0955c9de6320bec2821a21e3244600d
+ db41e11ae0a3aec7120ad6ce86450d838af74dd6
- Fix Fortran modules/namespaces parsing (but no change was visible in F11).
- Archer backport: 000db8b7bfef8581ef099ccca8689cfddfea1be8
- Fix "some Python error when displaying some C++ objects" (BZ 504356).
- testsuite: Support new rpmbuild option: --with parallel
- testsuite: gdb-orphanripper.c: Fix uninitialized `termios.c_line'.
* Mon May 11 2009 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.8.50.20090302-23
- Fix crashes due to (missing) varobj revalidation, for VLA (for BZ 377541).