diff options
author | Jim Kingdon <jkingdon@engr.sgi.com> | 1994-01-27 23:55:10 +0000 |
---|---|---|
committer | Jim Kingdon <jkingdon@engr.sgi.com> | 1994-01-27 23:55:10 +0000 |
commit | 0e4ad984b1d48b4fb12c3438abc6dec50b12786c (patch) | |
tree | 1559ccbfc97b41ba551175bca0b3da47eac8fa2d | |
parent | 6221fe20906e3236a456da5e9e7f8184558a470b (diff) | |
download | gdb-0e4ad984b1d48b4fb12c3438abc6dec50b12786c.zip gdb-0e4ad984b1d48b4fb12c3438abc6dec50b12786c.tar.gz gdb-0e4ad984b1d48b4fb12c3438abc6dec50b12786c.tar.bz2 |
* c-typeprint.c (c_type_print_base): Have SHOW == 0 mean to print
full details on structure elements without names. This partially
reverts the changes of 1 Jul 1993 and 31 Aug 1993; I think this aspect
of those changes was accidental.
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/c-typeprint.c | 16 |
2 files changed, 13 insertions, 8 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 1c4f1e3..1190734 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ Thu Jan 27 15:12:23 1994 Jim Kingdon (kingdon@lioth.cygnus.com) + * c-typeprint.c (c_type_print_base): Have SHOW == 0 mean to print + full details on structure elements without names. This partially + reverts the changes of 1 Jul 1993 and 31 Aug 1993; I think this aspect + of those changes was accidental. + * stack.c (parse_frame_specification): If SETUP_ARBITRARY_FRAME is defined, make it an error to specify a single argument which is not a frame number. diff --git a/gdb/c-typeprint.c b/gdb/c-typeprint.c index 8d72838..9654c47 100644 --- a/gdb/c-typeprint.c +++ b/gdb/c-typeprint.c @@ -443,12 +443,12 @@ c_type_print_varspec_suffix (type, stream, show, passed_a_ptr, demangled_args) SHOW positive means print details about the type (e.g. enum values), and print structure elements passing SHOW - 1 for show. - SHOW zero means just print the type name or struct tag if there is one. + SHOW negative means just print the type name or struct tag if there is one. If there is no name, print something sensible but concise like "struct {...}". - SHOW negative means the same things as SHOW zero. The difference is that - zero is used for printing structure elements and -1 is used for the - "whatis" command. But I don't see any need to distinguish. + SHOW zero means just print the type name or struct tag if there is one. + If there is no name, print something sensible but not as concise like + "struct {int x; int y;}". LEVEL is the number of spaces to indent by. We increase it for some recursive calls. */ @@ -523,13 +523,13 @@ c_type_print_base (type, stream, show, level) fputs_filtered (" ", stream); } wrap_here (" "); - if (show <= 0) + if (show < 0) { /* If we just printed a tag name, no need to print anything else. */ if (TYPE_TAG_NAME (type) == NULL) fprintf_filtered (stream, "{...}"); } - else if (show > 0) + else if (show > 0 || TYPE_TAG_NAME (type) == NULL) { cp_type_print_derivation_info (stream, type); @@ -730,13 +730,13 @@ c_type_print_base (type, stream, show, level) } wrap_here (" "); - if (show <= 0) + if (show < 0) { /* If we just printed a tag name, no need to print anything else. */ if (TYPE_TAG_NAME (type) == NULL) fprintf_filtered (stream, "{...}"); } - else if (show > 0) + else if (show > 0 || TYPE_TAG_NAME (type) == NULL) { fprintf_filtered (stream, "{"); len = TYPE_NFIELDS (type); |