+2009-11-09 Cary Coutant <ccoutant@google.com>
+
+ * dwarf2read.c (read_import_statement): Don't clobber original cu.
+
2009-11-09 Tom Tromey <tromey@redhat.com>
* python/python.c (execute_gdb_command): Copy the argument text.
{
struct attribute *import_attr;
struct die_info *imported_die;
+ struct dwarf2_cu *imported_cu;
const char *imported_name;
const char *imported_name_prefix;
const char *import_prefix;
return;
}
- imported_die = follow_die_ref_or_sig (die, import_attr, &cu);
- imported_name = dwarf2_name (imported_die, cu);
+ imported_cu = cu;
+ imported_die = follow_die_ref_or_sig (die, import_attr, &imported_cu);
+ imported_name = dwarf2_name (imported_die, imported_cu);
if (imported_name == NULL)
{
/* GCC bug: https://bugzilla.redhat.com/show_bug.cgi?id=506524
/* Figure out what the scope of the imported die is and prepend it
to the name of the imported die. */
- imported_name_prefix = determine_prefix (imported_die, cu);
+ imported_name_prefix = determine_prefix (imported_die, imported_cu);
if (strlen (imported_name_prefix) > 0)
{