public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Add two new symbol domains
@ 2024-01-28 23:44 Tom Tromey
  0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2024-01-28 23:44 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=271157878868b0549ea00aa5de6be813ae5d3663

commit 271157878868b0549ea00aa5de6be813ae5d3663
Author: Tom Tromey <tom@tromey.com>
Date:   Thu Mar 2 15:07:47 2023 -0700

    Add two new symbol domains
    
    This adds two new symbol domain constants, TYPE_DOMAIN and
    FUNCTION_DOMAIN.
    
    Historically, gdb was a C debugger, and the symbol tables continue to
    reflect this.  In particular, symbol domains match the C language,
    with VAR_DOMAIN including variables, functions, and types.
    
    However, other languages have other approaches to namespacing.  And,
    in any case, it is often useful for other parts of gdb to be able to
    distinguish between some domains at lookup time, without resorting to
    examining a symbol's location -- in some situations, this sort of
    filtering happens too late.
    
    Nothing uses these new domains yet, but the idea behind the patch is
    to separate symbols into more domains and then let the
    language-specific parts of gdb implement their semantics in terms of
    these categories.

Diff:
---
 gdb/sym-domains.def | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/gdb/sym-domains.def b/gdb/sym-domains.def
index 251c66fa04b..cea25a5f5b3 100644
--- a/gdb/sym-domains.def
+++ b/gdb/sym-domains.def
@@ -45,3 +45,12 @@ DOMAIN (LABEL)
 /* Fortran common blocks.  Their naming must be separate from VAR_DOMAIN.
    They also always use LOC_COMMON_BLOCK.  */
 DOMAIN (COMMON_BLOCK)
+
+/* TYPE_DOMAIN is for types and typedefs.  Note that tags are not
+   found here, see STRUCT_DOMAIN above.  */
+
+DOMAIN (TYPE)
+
+/* FUNCTION_DOMAIN is for functions and methods.  */
+
+DOMAIN (FUNCTION)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-01-28 23:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-28 23:44 [binutils-gdb] Add two new symbol domains Tom Tromey

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).