object for each. Simultaneously, keep setting the real_block
fields. */
int block_idx = FIRST_LOCAL_BLOCK;
+ std::vector<symbol *> global_symbols;
for (gdb_block &gdb_block_iter : stab->blocks)
{
struct block *new_block = new (&objfile->objfile_obstack) block;
block_name->m_name = obstack_strdup (&objfile->objfile_obstack,
gdb_block_iter.name.get ());
+ global_symbols.push_back (block_name);
new_block->set_function (block_name);
struct block *new_block;
if (i == GLOBAL_BLOCK)
- new_block = new (&objfile->objfile_obstack) global_block;
+ {
+ new_block = new (&objfile->objfile_obstack) global_block;
+ new_block->set_multidict
+ (mdict_create_linear (&objfile->objfile_obstack, global_symbols));
+ }
else
- new_block = new (&objfile->objfile_obstack) block;
+ {
+ new_block = new (&objfile->objfile_obstack) block;
+ new_block->set_multidict
+ (mdict_create_linear (&objfile->objfile_obstack, {}));
+ }
- new_block->set_multidict
- (mdict_create_linear (&objfile->objfile_obstack, {}));
new_block->set_superblock (block_iter);
block_iter = new_block;
"<gdb.Objfile filename=<< JIT compiled code at $hex >>>" \
"python gdb.Progspace.objfile_for_address"
}
+
+ # Check that jitted symbol completion works
+ gdb_test "complete break jit_func" \
+ [multi_line "break jit_function_add" \
+ "break jit_function_stack_mangle" ] \
+
+ # Check that breakpoint can be set on jitted function
+ gdb_test "break jit_function_add" \
+ "Breakpoint 1 at 0x\[0-9a-f\]+"
+ gdb_test_no_output "del 1"
}
}