diff options
Diffstat (limited to 'gdb/c-valprint.c')
-rw-r--r-- | gdb/c-valprint.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c index c4c0918..12b9086 100644 --- a/gdb/c-valprint.c +++ b/gdb/c-valprint.c @@ -454,6 +454,21 @@ c_val_print_int (struct type *type, struct type *unresolved_type, : options->output_format); val_print_scalar_formatted (type, embedded_offset, original_value, &opts, 0, stream); + + if (opts.print_suffix) + { + struct type *t = check_typedef (type); + + if (TYPE_UNSIGNED (t)) + fputc_filtered ('u', stream); + + /* Is there a better way to do this? Just looking at the size doesn't + work. */ + if (strstr (TYPE_NAME (t), "long long") != NULL) + fputs_filtered ("ll", stream); + else if (strstr (TYPE_NAME (t), "long") != NULL) + fputc_filtered ('l', stream); + } } else { |