diff options
author | Joel Brobecker <brobecker@gnat.com> | 2012-02-29 19:37:07 +0000 |
---|---|---|
committer | Joel Brobecker <brobecker@gnat.com> | 2012-02-29 19:37:07 +0000 |
commit | ffde82bff0610b4c4d9e047489303649acf7c6ea (patch) | |
tree | 769e46204cc67f24dcaa9c7d9437c2f2174aff48 /gdb | |
parent | 2ad01556c70780fe89eb7a7cc6e669de34a4b770 (diff) | |
download | gdb-ffde82bff0610b4c4d9e047489303649acf7c6ea.zip gdb-ffde82bff0610b4c4d9e047489303649acf7c6ea.tar.gz gdb-ffde82bff0610b4c4d9e047489303649acf7c6ea.tar.bz2 |
[Ada] Fix comment in ada-lang.c:ada_is_ignored_field
Fix a comment that completly mistunderstood the code...
gdb/ChangeLog:
* ada-lang.c (ada_is_ignored_field): Rewrite wrong comment.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/ada-lang.c | 11 |
2 files changed, 12 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 6684959..e2fe0a3 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,9 @@ 2012-02-29 Joel Brobecker <brobecker@adacore.com> + * ada-lang.c (ada_is_ignored_field): Rewrite wrong comment. + +2012-02-29 Joel Brobecker <brobecker@adacore.com> + * ada-lang.c (ada_lookup_symbol_list): Only cache the result of full searches. diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index cbdff3f..6382369 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -5882,7 +5882,7 @@ ada_is_ignored_field (struct type *type, int field_num) { if (field_num < 0 || field_num > TYPE_NFIELDS (type)) return 1; - + /* Check the name of that field. */ { const char *name = TYPE_FIELD_NAME (type, field_num); @@ -5893,8 +5893,13 @@ ada_is_ignored_field (struct type *type, int field_num) if (name == NULL) return 1; - /* A field named "_parent" is internally generated by GNAT for - tagged types, and should not be printed either. */ + /* Normally, fields whose name start with an underscore ("_") + are fields that have been internally generated by the compiler, + and thus should not be printed. The "_parent" field is special, + however: This is a field internally generated by the compiler + for tagged types, and it contains the components inherited from + the parent type. This field should not be printed as is, but + should not be ignored either. */ if (name[0] == '_' && strncmp (name, "_parent", 7) != 0) return 1; } |