]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
cris-tdep.c: Use unsigned variable for unsigned command.
authorPedro Alves <palves@redhat.com>
Fri, 19 Apr 2013 15:14:23 +0000 (15:14 +0000)
committerPedro Alves <palves@redhat.com>
Fri, 19 Apr 2013 15:14:23 +0000 (15:14 +0000)
"set cris-version" is an unsigned command:

    /* CRIS-specific user-commands.  */
    add_setshow_uinteger_cmd ("cris-version", class_support,
       &usr_cmd_cris_version,
       _("Set the current CRIS version."),
       _("Show the current CRIS version."),
       _("\
  Set to 10 for CRISv10 or 32 for CRISv32 if autodetection fails.\n\
  Defaults to 10. "),

Tested by building on x86_64 Fedora 17.

2013-04-19  Pedro Alves  <palves@redhat.com>

* cris-tdep.c (usr_cmd_cris_version): Make unsigned.
(struct gdbarch_tdep) <cris_version>: Make unsigned.
(cris_spec_reg_applicable, cris_gdbarch_init): Adjust locals.

gdb/ChangeLog
gdb/cris-tdep.c

index b1ce7ee152ff60eee8d5be06c1354a443ee0bfff..571b273c82b7d7e8ee4bfe8c118e113cd8e901cf 100644 (file)
@@ -1,3 +1,9 @@
+2013-04-19  Pedro Alves  <palves@redhat.com>
+
+       * cris-tdep.c (usr_cmd_cris_version): Make unsigned.
+       (struct gdbarch_tdep) <cris_version>: Make unsigned.
+       (cris_spec_reg_applicable, cris_gdbarch_init): Adjust locals.
+
 2013-04-19  Pedro Alves  <palves@redhat.com>
 
        * avr-tdep.c (avr_io_reg_read_command): New local 'bufstr'.  Use
index 2662513dafd1ad046d9c19525b895baa1c08b50c..03041e44040d6babc8cfc9b3039a99f1d5cc084c 100644 (file)
@@ -144,7 +144,7 @@ extern const struct cris_spec_reg cris_spec_regs[];
 
 /* CRIS version, set via the user command 'set cris-version'.  Affects
    register names and sizes.  */
-static int usr_cmd_cris_version;
+static unsigned int usr_cmd_cris_version;
 
 /* Indicates whether to trust the above variable.  */
 static int usr_cmd_cris_version_valid = 0;
@@ -167,7 +167,7 @@ static int usr_cmd_cris_dwarf2_cfi = 1;
 /* CRIS architecture specific information.  */
 struct gdbarch_tdep
 {
-  int cris_version;
+  unsigned int cris_version;
   const char *cris_mode;
   int cris_dwarf2_cfi;
 };
@@ -1439,7 +1439,7 @@ cris_spec_reg_applicable (struct gdbarch *gdbarch,
                          struct cris_spec_reg spec_reg)
 {
   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-  int version = tdep->cris_version;
+  unsigned int version = tdep->cris_version;
   
   switch (spec_reg.applicable_version)
     {
@@ -4013,7 +4013,7 @@ cris_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 {
   struct gdbarch *gdbarch;
   struct gdbarch_tdep *tdep;
-  int cris_version;
+  unsigned int cris_version;
 
   if (usr_cmd_cris_version_valid)
     {