* 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.
This commit is contained in:
parent
6221fe2090
commit
0e4ad984b1
2 changed files with 13 additions and 8 deletions
|
@ -1,5 +1,10 @@
|
||||||
Thu Jan 27 15:12:23 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
|
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
|
* stack.c (parse_frame_specification): If SETUP_ARBITRARY_FRAME is
|
||||||
defined, make it an error to specify a single argument which is not
|
defined, make it an error to specify a single argument which is not
|
||||||
a frame number.
|
a frame number.
|
||||||
|
|
|
@ -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),
|
SHOW positive means print details about the type (e.g. enum values),
|
||||||
and print structure elements passing SHOW - 1 for show.
|
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
|
If there is no name, print something sensible but concise like
|
||||||
"struct {...}".
|
"struct {...}".
|
||||||
SHOW negative means the same things as SHOW zero. The difference is that
|
SHOW zero means just print the type name or struct tag if there is one.
|
||||||
zero is used for printing structure elements and -1 is used for the
|
If there is no name, print something sensible but not as concise like
|
||||||
"whatis" command. But I don't see any need to distinguish.
|
"struct {int x; int y;}".
|
||||||
|
|
||||||
LEVEL is the number of spaces to indent by.
|
LEVEL is the number of spaces to indent by.
|
||||||
We increase it for some recursive calls. */
|
We increase it for some recursive calls. */
|
||||||
|
@ -523,13 +523,13 @@ c_type_print_base (type, stream, show, level)
|
||||||
fputs_filtered (" ", stream);
|
fputs_filtered (" ", stream);
|
||||||
}
|
}
|
||||||
wrap_here (" ");
|
wrap_here (" ");
|
||||||
if (show <= 0)
|
if (show < 0)
|
||||||
{
|
{
|
||||||
/* If we just printed a tag name, no need to print anything else. */
|
/* If we just printed a tag name, no need to print anything else. */
|
||||||
if (TYPE_TAG_NAME (type) == NULL)
|
if (TYPE_TAG_NAME (type) == NULL)
|
||||||
fprintf_filtered (stream, "{...}");
|
fprintf_filtered (stream, "{...}");
|
||||||
}
|
}
|
||||||
else if (show > 0)
|
else if (show > 0 || TYPE_TAG_NAME (type) == NULL)
|
||||||
{
|
{
|
||||||
cp_type_print_derivation_info (stream, type);
|
cp_type_print_derivation_info (stream, type);
|
||||||
|
|
||||||
|
@ -730,13 +730,13 @@ c_type_print_base (type, stream, show, level)
|
||||||
}
|
}
|
||||||
|
|
||||||
wrap_here (" ");
|
wrap_here (" ");
|
||||||
if (show <= 0)
|
if (show < 0)
|
||||||
{
|
{
|
||||||
/* If we just printed a tag name, no need to print anything else. */
|
/* If we just printed a tag name, no need to print anything else. */
|
||||||
if (TYPE_TAG_NAME (type) == NULL)
|
if (TYPE_TAG_NAME (type) == NULL)
|
||||||
fprintf_filtered (stream, "{...}");
|
fprintf_filtered (stream, "{...}");
|
||||||
}
|
}
|
||||||
else if (show > 0)
|
else if (show > 0 || TYPE_TAG_NAME (type) == NULL)
|
||||||
{
|
{
|
||||||
fprintf_filtered (stream, "{");
|
fprintf_filtered (stream, "{");
|
||||||
len = TYPE_NFIELDS (type);
|
len = TYPE_NFIELDS (type);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue