Make "set/show remoteaddresssize" a zuinteger command instead of uinteger.
authorPedro Alves <palves@redhat.com>
Tue, 26 Mar 2013 20:19:31 +0000 (20:19 +0000)
committerPedro Alves <palves@redhat.com>
Tue, 26 Mar 2013 20:19:31 +0000 (20:19 +0000)
It makes no sense to talk about an "unlimited" address size in this
context.

 (gdb) show remoteaddresssize
 The maximum size of the address (in bits) in a memory packet is 0.
 (gdb) set remoteaddresssize 0
 (gdb) show remoteaddresssize
 The maximum size of the address (in bits) in a memory packet is unlimited.

"set remoteaddresssize 0" mapping to UINT_MAX means you can't
force gdb through this path twice in the same GDB run:

  static CORE_ADDR
  remote_address_masked (CORE_ADDR addr)
  {
    unsigned int address_size = remote_address_size;

    /* If "remoteaddresssize" was not set, default to target address size.  */
    if (!address_size)
      address_size = gdbarch_addr_bit (target_gdbarch ());

gdb/
2013-03-26  Pedro Alves  <palves@redhat.com>

* remote.c (_initialize_remote): Make "set remoteaddresssize"
a zuinteger command instead of uinteger.

gdb/ChangeLog
gdb/remote.c

index e18124283b5bea5770bb73b1bc4e2535cae01794..eef0a2535b797b6b66695e85d2c8ba014cc41660 100644 (file)
@@ -1,3 +1,8 @@
+2013-03-26  Pedro Alves  <palves@redhat.com>
+
+       * remote.c (_initialize_remote): Make "set remoteaddresssize"
+       a zuinteger command instead of uinteger.
+
 2013-03-26  Pedro Alves  <palves@redhat.com>
 
        * record-full.c (record_full_insn_num): Make it unsigned.
index c66618eb42df84efd18b0d9674677f6c93e191d3..ce477cfe6ad360e1f26894d0e9e440705139594e 100644 (file)
@@ -11773,13 +11773,13 @@ Specify a negative limit for unlimited."),
                                           breakpoints is %s.  */
                            &remote_set_cmdlist, &remote_show_cmdlist);
 
-  add_setshow_uinteger_cmd ("remoteaddresssize", class_obscure,
-                           &remote_address_size, _("\
+  add_setshow_zuinteger_cmd ("remoteaddresssize", class_obscure,
+                            &remote_address_size, _("\
 Set the maximum size of the address (in bits) in a memory packet."), _("\
 Show the maximum size of the address (in bits) in a memory packet."), NULL,
-                           NULL,
-                           NULL, /* FIXME: i18n: */
-                           &setlist, &showlist);
+                            NULL,
+                            NULL, /* FIXME: i18n: */
+                            &setlist, &showlist);
 
   add_packet_config_cmd (&remote_protocol_packets[PACKET_X],
                         "X", "binary-download", 1);