diff options
author | David Carlton <carlton@bactrian.org> | 2003-11-12 00:20:59 +0000 |
---|---|---|
committer | David Carlton <carlton@bactrian.org> | 2003-11-12 00:20:59 +0000 |
commit | 6b3c3de29663ffbdd17ddeffb80627f6aa33f751 (patch) | |
tree | dc5ed74b51da5717758d9ab769f7cad73137291f /gdb/valops.c | |
parent | 7c27792d1bb9f44a9d2af04d57796d08cdc683ee (diff) | |
download | gdb-6b3c3de29663ffbdd17ddeffb80627f6aa33f751.tar.gz |
2003-11-11 David Carlton <carlton@kealia.com>
* valops.c: Tweak comments to match proposed patch.
(value_aggregate_elt): Use internal_error instead of error.
* dwarf2read.c: Tweak comments to match proposed patch.
(new_symbol): Use SYMBOL_LINKAGE_NAME or SYMBOL_NATURAL_NAME
instead of DEPRECATED_SYMBOL_NAME.
* cp-namespace.c: Tweak comments to match proposed patch.
(cp_set_block_scope): Remove #if 0.
(cp_lookup_nested_type): Use internal_error instead of error.
2003-11-11 David Carlton <carlton@kealia.com>
* gdb.cp/namespace.exp: Remove doubled comment.
Diffstat (limited to 'gdb/valops.c')
-rw-r--r-- | gdb/valops.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/gdb/valops.c b/gdb/valops.c index 4d53dc04c6b..a946db25b36 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -2473,7 +2473,8 @@ value_aggregate_elt (struct type *curtype, case TYPE_CODE_NAMESPACE: return value_namespace_elt (curtype, name, noside); default: - error ("Internal error: non-aggregate type to value_aggregate_elt"); + internal_error (__FILE__, __LINE__, + "non-aggregate type in value_aggregate_elt"); } } @@ -2613,8 +2614,9 @@ value_struct_elt_for_reference (struct type *domain, int offset, return v; } - /* As a last chance, look it up using lookup_symbol_namespace: this - works for types. */ + /* As a last chance, pretend that CURTYPE is a namespace, and look + it up that way; this (frequently) works for types nested inside + classes. */ return value_maybe_namespace_elt (curtype, name, noside); } @@ -2638,7 +2640,10 @@ value_namespace_elt (const struct type *curtype, } /* A helper function used by value_namespace_elt and - value_struct_elt_for_reference. */ + value_struct_elt_for_reference. It looks up NAME inside the + context CURTYPE; this works if CURTYPE is a namespace or if CURTYPE + is a class and NAME refers to a type in CURTYPE itself (as opposed + to, say, some base class of CURTYPE). */ static struct value * value_maybe_namespace_elt (const struct type *curtype, |