break;
}
- add_symbol_to_list (sym, ccp->builder->get_file_symbols ());
+ add_symbol_to_list (sym, ccp->builder->get_global_symbols ());
}
return sym;
sym->set_domain (VAR_DOMAIN);
sym->set_loc_class_index (LOC_OPTIMIZED_OUT);
sym->compute_and_set_names (name, false, ccp->of->per_bfd);
- add_symbol_to_list (sym, ccp->builder->get_file_symbols ());
+ add_symbol_to_list (sym, ccp->builder->get_global_symbols ());
break;
default:
complaint (_("ctf_add_var_cb: kind unsupported (%d)"), kind);
ccp->pst->add_psymbol (name, false,
domain, loc_class, section,
- psymbol_placement::STATIC,
+ psymbol_placement::GLOBAL,
unrelocated_addr (0),
language_c, ccp->partial_symtabs, ccp->of);
gdb_load $binfile
# Same thing with struct and union.
-gdb_test "ptype struct A" "type = struct A \{\[\r\n\]+\[ \t\]+struct B \\*foo;\[\r\n\]+\}.*" "ptype structure A"
-gdb_test "ptype struct B" "type = struct B \{\[\r\n\]+\[ \t\]+struct B \\*next;\[\r\n\]+\}.*" "ptype structure B"
+gdb_test "ptype struct A" "type = struct A \{\[\r\n\]+\[ \t\]+long a;\[\r\n\]+\[ \t\]+struct B \\*foo;\[\r\n\]+\}.*" "ptype structure A"
+gdb_test "ptype struct B" "type = struct B \{\[\r\n\]+\[ \t\]+int foo;\[\r\n\]+\[ \t\]+struct A \\*bar;\[\r\n\]+\}.*" "ptype structure B"
gdb_test "ptype struct C" "type = struct C \{\[\r\n\]+\[ \t\]+struct B \\*foo;\[\r\n\]+\[ \t\]+int b;\[\r\n\]+\}.*" "ptype structure C"