From c61596525811d9b0fe79be8f11e5a142ade96dab Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Fri, 19 Nov 2021 22:49:01 -0500 Subject: gdb: remove SYMTAB_COMPUNIT macro, add getter/setter Add a getter and a setter for a symtab's compunit_symtab. Remove the corresponding macro and adjust all callers. For brevity, I chose the name "compunit" instead of "compunit_symtab" the the field, getter and setter names. Since we are already in symtab context, the _symtab suffix seems redundant. Change-Id: I4b9b731c96e3594f7733e75af1e3d01bc0e4fe92 --- gdb/python/py-symtab.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/python/py-symtab.c') diff --git a/gdb/python/py-symtab.c b/gdb/python/py-symtab.c index b973b25..b5d102c 100644 --- a/gdb/python/py-symtab.c +++ b/gdb/python/py-symtab.c @@ -131,7 +131,7 @@ stpy_get_producer (PyObject *self, void *closure) struct compunit_symtab *cust; STPY_REQUIRE_VALID (self, symtab); - cust = SYMTAB_COMPUNIT (symtab); + cust = symtab->compunit (); if (cust->producer () != nullptr) { const char *producer = cust->producer (); -- cgit v1.1