diff options
author | Peter Schauer <Peter.Schauer@mytum.de> | 1994-11-01 21:04:11 +0000 |
---|---|---|
committer | Peter Schauer <Peter.Schauer@mytum.de> | 1994-11-01 21:04:11 +0000 |
commit | c50e36c288125ecd2c2249fcf4e7fd7cb6d61ef9 (patch) | |
tree | 027549a43749394bb9839e856ddce14137a00b49 /gdb/c-valprint.c | |
parent | e574ddd43ab84053bcb24b5185b2d99b6e5981a6 (diff) | |
download | gdb-c50e36c288125ecd2c2249fcf4e7fd7cb6d61ef9.zip gdb-c50e36c288125ecd2c2249fcf4e7fd7cb6d61ef9.tar.gz gdb-c50e36c288125ecd2c2249fcf4e7fd7cb6d61ef9.tar.bz2 |
* c-valprint.c (c_value_print): Check for plain literal `char'
target type when suppressing `(char *)' output for strings.
Diffstat (limited to 'gdb/c-valprint.c')
-rw-r--r-- | gdb/c-valprint.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c index ee98fc4..5e5791b 100644 --- a/gdb/c-valprint.c +++ b/gdb/c-valprint.c @@ -494,9 +494,9 @@ c_value_print (val, stream, format, pretty) /* Hack: remove (char *) for char strings. Their type is indicated by the quoted string anyway. */ if (TYPE_CODE (type) == TYPE_CODE_PTR && - TYPE_LENGTH (TYPE_TARGET_TYPE (type)) == sizeof(char) && - TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_INT && - !TYPE_UNSIGNED (TYPE_TARGET_TYPE (type))) + TYPE_NAME (type) == NULL && + TYPE_NAME (TYPE_TARGET_TYPE (type)) != NULL && + STREQ (TYPE_NAME (TYPE_TARGET_TYPE (type)), "char")) { /* Print nothing */ } |