Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] Display var_zinteger as signed
@ 2011-07-04 10:37 Andrew Burgess
  2011-07-04 11:40 ` Andreas Schwab
  0 siblings, 1 reply; 10+ messages in thread
From: Andrew Burgess @ 2011-07-04 10:37 UTC (permalink / raw)
  To: gdb-patches

Currently the behaviour of var_zinteger variables is to print as 
unsigned, so,

(gdb) set debug infrun -5
(gdb) show debug infrun
Inferior debugging is 4294967291.

With the patch it is displayed as -5.


Cheers,
Andrew

2011-07-04  Andrew Burgess  <aburgess@broadcom.com>

	* cli/cli-setshow.c (do_setshow_command): Display var_zinteger
	variables as signed, not unsigned.

diff --git a/gdb/cli/cli-setshow.c b/gdb/cli/cli-setshow.c
index 6acdd91..d35f43a 100644
--- a/gdb/cli/cli-setshow.c
+++ b/gdb/cli/cli-setshow.c
@@ -365,7 +365,6 @@ do_setshow_command (char *arg, int from_tty, struct 
cmd_list_element *c)
  	    }
  	  /* else fall through */
  	case var_zuinteger:
-	case var_zinteger:
  	  fprintf_filtered (stb->stream, "%u", *(unsigned int *) c->var);
  	  break;
  	case var_integer:
@@ -373,8 +372,9 @@ do_setshow_command (char *arg, int from_tty, struct 
cmd_list_element *c)
  	    {
  	      fputs_filtered ("unlimited", stb->stream);
  	    }
-	  else
-	    fprintf_filtered (stb->stream, "%d", *(int *) c->var);
+	  /* else fall through */
+	case var_zinteger:
+	  fprintf_filtered (stb->stream, "%d", *(int *) c->var);
  	  break;

  	default:


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-07-07  8:41 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-04 10:37 [PATCH] Display var_zinteger as signed Andrew Burgess
2011-07-04 11:40 ` Andreas Schwab
2011-07-04 11:58   ` Andrew Burgess
2011-07-04 18:12     ` Joel Brobecker
2011-07-04 20:51       ` Mark Kettenis
2011-07-05  8:37       ` Andrew Burgess
2011-07-05  8:53         ` Andreas Schwab
2011-07-05 13:33           ` Andrew Burgess
2011-07-05 15:14             ` Joel Brobecker
2011-07-07  9:19               ` Andrew Burgess

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox