Age | Commit message (Collapse) | Author | Files | Lines |
|
Now that defs.h, server.h and common-defs.h are included via the
`-include` option, it is no longer necessary for source files to include
them. Remove all the inclusions of these files I could find. Update
the generation scripts where relevant.
Change-Id: Ia026cff269c1b7ae7386dd3619bc9bb6a5332837
Approved-By: Pedro Alves <pedro@palves.net>
|
|
This patch makes allocate_on_obstack a little bit safer, by enforcing
the rule that objects allocated on an obstack must have a trivial
destructor.
The static assert is done in a method -- doing it inside the class
itself won't work because the class is incomplete at that point.
|
|
I noticed that basic_lookup_transparent_type calls two different
functions that both proceed to create a lookup_name_info. It's more
efficient to create this object in the outermost layer possible.
Making this change required a few related changes, resulting in this
patch.
There are still more changes of this sort that could be made.
Regression tested on x86-64 Fedora 38.
|
|
This changes lookup_symbol and associated APIs to accept
domain_search_flags rather than a domain_enum.
Note that this introduces some new constants to Python and Guile. I
chose to break out the documentation patch for this, because the
internals here do not change until a later patch, and it seemed
simpler to patch the docs just once, rather than twice.
|
|
This commit is the result of the following actions:
- Running gdb/copyright.py to update all of the copyright headers to
include 2024,
- Manually updating a few files the copyright.py script told me to
update, these files had copyright headers embedded within the
file,
- Regenerating gdbsupport/Makefile.in to refresh it's copyright
date,
- Using grep to find other files that still mentioned 2023. If
these files were updated last year from 2022 to 2023 then I've
updated them this year to 2024.
I'm sure I've probably missed some dates. Feel free to fix them up as
you spot them.
|
|
This adds the method block::function_block, to easily access a block's
enclosing function block.
|
|
block_find_symbol takes a callback function, but only two callbacks
are ever passed to it -- and they are similar enough that it seems
cleaner to just have block_find_symbol do the work itself. Also,
block_find_symbol can take a lookup_name_info as an argument,
following the general idea of pushing the construction of these
objects as high in the call chain as feasible.
Regression tested on x86-64 Fedora 38.
Tested-By: Alexandra Petlanova Hajkova <ahajkova@redhat.com>
|
|
This adds symbol::matches, a wrapper for symbol_matches_domain. Most
places calling symbol_matches_domain can call this method instead,
which is a bit less wordy and also (IMO) clearer.
Approved-By: Simon Marchi <simon.marchi@efficios.com>
|
|
This converts contained_in to be a method of block.
|
|
This removes allocate_block and allocate_global_block in favor of
simply calling 'new'.
|
|
This changes global_block to inherit from block, which is what was
always intended.
|
|
This changes block and global_block to add initializers, and then to
use 'new' for allocation.
|
|
This removes ALL_BLOCK_SYMBOLS_WITH_NAME in favor of foreach.
|
|
This merges the two styles of block iterator, having the
initialization API decide which to use based on an optional parameter.
|
|
This changes the block_iterator to store the 'name' that is used by
block_iter_match_next. This avoids any problem where the name could
be passed inconsistently, and also makes the subsequent patches easier
to understand.
|
|
This converts block_static_link to be a method. This was mostly
written by script.
|
|
This converts set_block_compunit_symtab to be a method. This was
mostly written by script.
|
|
This converts block_static_block and block_global_block to be methods.
This was mostly written by script. It was simpler to convert them at
the same time because they're often used near each other.
|
|
This converts block_containing_function to be a method. This was
mostly written by script.
|
|
This converts block_linkage_function to be a method. This was mostly
written by script.
|
|
This converts block_scope, block_set_scope, block_using, and
block_set_using to be methods. These are all done at once to make it
easier to also convert block_initialize_namespace at the same time.
This was mostly written by script.
|
|
This converts block_inlined_p to be a method. This was mostly written
by script.
|
|
This converts block_gdbarch to be a method. This was mostly written
by script.
|
|
This converts block_objfile to be a method. This was mostly written
by script.
|
|
block_global_block has special behavior when the block is NULL.
Remove this and patch up the callers instead.
|
|
block_static_block has special behavior when the block is NULL.
Remove this and patch up the callers instead.
|
|
block_using has special behavior when the block is NULL.
Remove this. No caller seems to be affected.
|
|
block_set_scope and block_set_using unconditionally allocate the block
namespace object. However, this isn't truly needed, so arrange to
only allocate when it is.
|
|
Moving block_initialize_namespace before its callers lets us avoid a
forward declaration.
|
|
This commit is the result of running the gdb/copyright.py script,
which automated the update of the copyright year range for all
source files managed by the GDB project to be updated to include
year 2023.
|
|
This removes the various addrmap wrapper functions in favor of simple
method calls on the objects themselves.
|
|
Replace with equivalent methods.
Change-Id: I4e56c76dfc363c1447686fb29c4212ea18b4dba0
|
|
Replace with calls to blockvector::blocks, and the appropriate method
call on the returned array_view.
Change-Id: I04d1f39603e4d4c21c96822421431d9a029d8ddd
|
|
Replace with equivalent methods.
Change-Id: If86b8cbdfb0f52e22c929614cd53e73358bab76a
|
|
Replace with equivalent methods.
Change-Id: If9a239c511a664f2a59fecb6d1cd579881b23dc2
|
|
Replace with equivalent methods.
Change-Id: I334a319909a50b5cc5570a45c38c70e10dc00630
|
|
Replace with equivalent methods.
Change-Id: I31ec00f5bf85335c8b23d306ca0fe0b84d489101
|
|
Replace with equivalent methods.
Change-Id: I10a6c8a2a86462d9d4a6a6409a3f07a6bea66310
|
|
This turns symbol_arch into a method on symbol.
|
|
This turns symbol_objfile into a method on symbol.
|
|
Add a getter and a setter for a symbol's type. Remove the corresponding
macro and adjust all callers.
Change-Id: Ie1a137744c5bfe1df4d4f9ae5541c5299577c8de
|
|
Add a getter and a setter for whether a symbol is inlined. Remove the
corresponding macro and adjust all callers.
Change-Id: I934468da3b5a32dd6b161a6f252a6b1b94737279
|
|
Add a getter and a setter for whether a symbol is an argument. Remove
the corresponding macro and adjust all callers.
Change-Id: I71b4f0465f3dfd2ed8b9e140bd3f7d5eb8d9ee81
|
|
Add a getter and a setter for a symbol's domain. Remove the
corresponding macro and adjust all callers.
Change-Id: I54465b50ac89739c663859a726aef8cdc6e4b8f3
|
|
Change-Id: I83211d5a47efc0564386e5b5ea4a29c00b1fd46a
|
|
Add a getter and a setter for a compunit_symtab's blockvector. Remove
the corresponding macro and adjust all callers.
Change-Id: I99484c6619dcbbea7c5d89c72aa660316ca62f64
|
|
Remove the macro, update all users to use the getter directly.
Change-Id: I3f0fd6f4455d1c4ebd5da73b561eb18a979ef1f6
|
|
This moves the gdb-specific obstack code -- both extensions like
obconcat and obstack_strdup, and things like auto_obstack -- to
gdbsupport.
|
|
This commit brings all the changes made by running gdb/copyright.py
as per GDB's Start of New Year Procedure.
For the avoidance of doubt, all changes in this commits were
performed by the script.
|
|
Remove macro COMPUNIT_CALL_SITE_HTAB, and provide access to the htab using
member functions:
- compunit_symtab::find_call_site
- compunit_symtab::set_call_site_htab
Tested on x86_64-linux.
Co-Authored-By: Tom de Vries <tdevries@suse.de>
|