+2013-03-14 Keith Seitz <keiths@redhat.com>
+ Alan Matsuoka <alanm@redhat.com>
+
+ PR c++/15203
+ PR c++/15210
+ * cp-namespace.c (cp_lookup_nested_symbol): Handle TYPE_CODE_FUNC and
+ TYPE_CODE_METHOD.
+ * elfread.c (elf_symtab_read): Handle BSF_GNU_UNIQUE for certain
+ symbols.
+
2013-03-14 Yao Qi <yao@codesourcery.com>
* tracepoint.c (tfile_write_status): Write 'stop_desc' of trace
base classes. */
return find_symbol_in_baseclass (parent_type, nested_name, block);
}
+
+ case TYPE_CODE_FUNC:
+ case TYPE_CODE_METHOD:
+ return NULL;
+
default:
internal_error (__FILE__, __LINE__,
_("cp_lookup_nested_symbol called "
}
else if (sym->flags & BSF_SECTION_SYM)
continue;
- else if (sym->flags & (BSF_GLOBAL | BSF_LOCAL | BSF_WEAK))
+ else if (sym->flags & (BSF_GLOBAL | BSF_LOCAL | BSF_WEAK
+ | BSF_GNU_UNIQUE))
{
struct minimal_symbol *msym;
}
else if (sym->section->flags & SEC_CODE)
{
- if (sym->flags & (BSF_GLOBAL | BSF_WEAK))
+ if (sym->flags & (BSF_GLOBAL | BSF_WEAK | BSF_GNU_UNIQUE))
{
if (sym->flags & BSF_GNU_INDIRECT_FUNCTION)
ms_type = mst_text_gnu_ifunc;
}
else if (sym->section->flags & SEC_ALLOC)
{
- if (sym->flags & (BSF_GLOBAL | BSF_WEAK))
+ if (sym->flags & (BSF_GLOBAL | BSF_WEAK | BSF_GNU_UNIQUE))
{
if (sym->section->flags & SEC_LOAD)
{
+2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
+
+ PR c++/15203
+ PR c++/15210
+ * gdb.cp/m-static.cc (keepalive_int): New function.
+ (gnu_obj_1::method): New variable `sintvar', call `keepalive_int'.
+ * gdb.cp/m-static.exp: New test for `sintvar'.
+
2013-03-14 Yao Qi <yao@codesourcery.com>
* gdb.trace/tstatus.exp (run_trace_experiment): Save the output
enum region { oriental, egyptian, greek, etruscan, roman };
void keepalive(bool *var) { }
+void keepalive_int (int *var) { }
// Test one.
class gnu_obj_1
long method ()
{
+ static int sintvar = 4;
static bool svar = true;
+
keepalive (&svar);
+ keepalive_int (&sintvar);
return key2;
}
};
# One.
+# simple object, static const int, accessing via 'class::method::variable'
+# Regression test for PR c++/15203 and PR c++/15210
+gdb_test "print 'gnu_obj_1::method()::sintvar'" "\\$\[0-9\]+ = 4" \
+ "simple object, static const int, accessing via 'class::method::variable"
+
# simple object, static const bool
gdb_test "print test1.test" "\\$\[0-9\]* = true" "simple object, static const bool"