From: Tom Tromey <tromey@adacore.com>
To: gdb-patches@sourceware.org
Subject: [PATCH 3/5] Define symbol::value_block separately
Date: Tue, 14 Mar 2023 14:04:47 -0600 [thread overview]
Message-ID: <20230314-submit-pragma-import-export-v1-3-a235709f7e96@adacore.com> (raw)
In-Reply-To: <20230314-submit-pragma-import-export-v1-0-a235709f7e96@adacore.com>
This moves the definition of symbol::value_block outside of the class.
A subsequent patch will change this method to use SYMBOL_BLOCK_OPS,
and it seemed simplest to move this method out-of-line, and cleaner to
do this as a separate change.
---
gdb/symtab.h | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/gdb/symtab.h b/gdb/symtab.h
index 005b64b5a08..0a42fd2380c 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -1346,10 +1346,7 @@ struct symbol : public general_symbol_info, public allocate_on_obstack
m_value.common_block = common_block;
}
- const block *value_block () const
- {
- return m_value.block;
- }
+ const block *value_block () const;
void set_value_block (const block *block)
{
@@ -1507,6 +1504,12 @@ struct block_symbol
#define SYMBOL_REGISTER_OPS(symbol) ((symbol)->impl ().ops_register)
#define SYMBOL_LOCATION_BATON(symbol) (symbol)->aux_value
+inline const block *
+symbol::value_block () const
+{
+ return m_value.block;
+}
+
extern int register_symbol_computed_impl (enum address_class,
const struct symbol_computed_ops *);
--
2.39.1
next prev parent reply other threads:[~2023-03-14 20:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-14 20:04 [PATCH 0/5] Implement Ada Pragma Import and Pragma Export Tom Tromey
2023-03-14 20:04 ` [PATCH 1/5] Introduce lookup_minimal_symbol_linkage Tom Tromey
2023-03-14 20:04 ` [PATCH 2/5] Bump MAX_SYMBOL_IMPLS Tom Tromey
2023-03-14 20:04 ` Tom Tromey [this message]
2023-03-14 20:04 ` [PATCH 4/5] Introduce symbol_block_ops::get_block_value Tom Tromey
2023-03-14 20:04 ` [PATCH 5/5] Handle Ada Pragma Import and Pragma Export Tom Tromey
2023-03-29 16:10 ` [PATCH 0/5] Implement " Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230314-submit-pragma-import-export-v1-3-a235709f7e96@adacore.com \
--to=tromey@adacore.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).