gdb: remove COMPUNIT_OBJFILE macro

Remove the macro, update all users to use the getter directly.

Change-Id: I3f0fd6f4455d1c4ebd5da73b561eb18a979ef1f6
This commit is contained in:
Simon Marchi 2021-11-19 13:15:24 -05:00 committed by Simon Marchi
parent f1f58f102e
commit 9821f3fa56
7 changed files with 13 additions and 14 deletions

View file

@ -388,7 +388,7 @@ pspy_block_for_pc (PyObject *o, PyObject *args)
set_current_program_space (self->pspace);
cust = find_pc_compunit_symtab (pc);
if (cust != NULL && COMPUNIT_OBJFILE (cust) != NULL)
if (cust != NULL && cust->objfile () != NULL)
block = block_for_pc (pc);
}
catch (const gdb_exception &except)
@ -396,11 +396,11 @@ pspy_block_for_pc (PyObject *o, PyObject *args)
GDB_PY_HANDLE_EXCEPTION (except);
}
if (cust == NULL || COMPUNIT_OBJFILE (cust) == NULL)
if (cust == NULL || cust->objfile () == NULL)
Py_RETURN_NONE;
if (block)
return block_to_block_object (block, COMPUNIT_OBJFILE (cust));
return block_to_block_object (block, cust->objfile ());
Py_RETURN_NONE;
}