diff options
author | Andrew Burgess <aburgess@broadcom.com> | 2011-07-07 08:38:37 +0000 |
---|---|---|
committer | Andrew Burgess <aburgess@broadcom.com> | 2011-07-07 08:38:37 +0000 |
commit | a40a111fc795c4c711a2c9d846efcb14145f642f (patch) | |
tree | c8db5cc37c1382626e6958fcd3bd291f30d42310 /gdb/cli | |
parent | e2bd3b15a8c8ad2b9cb61f74d8a9ad21eeee9924 (diff) | |
download | gdb-a40a111fc795c4c711a2c9d846efcb14145f642f.zip gdb-a40a111fc795c4c711a2c9d846efcb14145f642f.tar.gz gdb-a40a111fc795c4c711a2c9d846efcb14145f642f.tar.bz2 |
http://sourceware.org/ml/gdb-patches/2011-07/msg00085.html
* cli/cli-setshow.c (do_setshow_command): Display var_zinteger
variables as signed, not unsigned.
Diffstat (limited to 'gdb/cli')
-rw-r--r-- | gdb/cli/cli-setshow.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/gdb/cli/cli-setshow.c b/gdb/cli/cli-setshow.c index 6acdd91..8dbfaad 100644 --- a/gdb/cli/cli-setshow.c +++ b/gdb/cli/cli-setshow.c @@ -358,21 +358,18 @@ do_setshow_command (char *arg, int from_tty, struct cmd_list_element *c) } break; case var_uinteger: - if (*(unsigned int *) c->var == UINT_MAX) - { - fputs_filtered ("unlimited", stb->stream); - break; - } - /* else fall through */ case var_zuinteger: - case var_zinteger: - fprintf_filtered (stb->stream, "%u", *(unsigned int *) c->var); + if (c->var_type == var_uinteger + && *(unsigned int *) c->var == UINT_MAX) + fputs_filtered ("unlimited", stb->stream); + else + fprintf_filtered (stb->stream, "%u", *(unsigned int *) c->var); break; case var_integer: - if (*(int *) c->var == INT_MAX) - { - fputs_filtered ("unlimited", stb->stream); - } + case var_zinteger: + if (c->var_type == var_integer + && *(int *) c->var == INT_MAX) + fputs_filtered ("unlimited", stb->stream); else fprintf_filtered (stb->stream, "%d", *(int *) c->var); break; |