mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-02 20:53:06 +08:00
gdb: remove BLOCKVECTOR_BLOCK and BLOCKVECTOR_NBLOCKS macros
Replace with calls to blockvector::blocks, and the appropriate method call on the returned array_view. Change-Id: I04d1f39603e4d4c21c96822421431d9a029d8ddd
This commit is contained in:

committed by
Simon Marchi

parent
6395b62847
commit
63d609debb
@ -176,13 +176,13 @@ static PyObject *
|
||||
stpy_global_block (PyObject *self, PyObject *args)
|
||||
{
|
||||
struct symtab *symtab = NULL;
|
||||
const struct block *block = NULL;
|
||||
const struct blockvector *blockvector;
|
||||
|
||||
STPY_REQUIRE_VALID (self, symtab);
|
||||
|
||||
blockvector = symtab->compunit ()->blockvector ();
|
||||
block = BLOCKVECTOR_BLOCK (blockvector, GLOBAL_BLOCK);
|
||||
const struct block *block = blockvector->global_block ();
|
||||
|
||||
return block_to_block_object (block, symtab->compunit ()->objfile ());
|
||||
}
|
||||
|
||||
@ -192,13 +192,13 @@ static PyObject *
|
||||
stpy_static_block (PyObject *self, PyObject *args)
|
||||
{
|
||||
struct symtab *symtab = NULL;
|
||||
const struct block *block = NULL;
|
||||
const struct blockvector *blockvector;
|
||||
|
||||
STPY_REQUIRE_VALID (self, symtab);
|
||||
|
||||
blockvector = symtab->compunit ()->blockvector ();
|
||||
block = BLOCKVECTOR_BLOCK (blockvector, STATIC_BLOCK);
|
||||
const struct block *block = blockvector->static_block ();
|
||||
|
||||
return block_to_block_object (block, symtab->compunit ()->objfile ());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user