gdb/
authorDaniel Jacobowitz <drow@false.org>
Tue, 8 Aug 2006 15:48:08 +0000 (15:48 +0000)
committerDaniel Jacobowitz <drow@false.org>
Tue, 8 Aug 2006 15:48:08 +0000 (15:48 +0000)
* symfile.c (download_write_size): Remove.
(show_download_write_size): Remove.
(load_section_callback): Don't use download_write_size.
(_initialize_symfile): Don't register download_write_size.
* NEWS: Mention 'download-write-size' removal.
gdb/doc/
* gdb.texinfo (Target Commands): Remove
'set download-write-size' and 'show download-write-size'.
gdb/testsuite/
* config/monitor.exp (gdb_load): Remove support for obsolete
download-write-size.
* gdb.base/remote.exp: Likewise.  Update all callers of
gdb_timed_load.

gdb/ChangeLog
gdb/NEWS
gdb/doc/ChangeLog
gdb/doc/gdb.texinfo
gdb/symfile.c
gdb/testsuite/ChangeLog
gdb/testsuite/config/monitor.exp
gdb/testsuite/gdb.base/remote.exp

index fb6e84ab1bd55e4307555267fa5c97d06fde177d..4669e8aee4d6079b1dd7eb3536926ddcdadaa16f 100644 (file)
@@ -1,3 +1,11 @@
+2006-08-08  Vladimir Prus  <vladimir@codesourcery.com>
+
+       * symfile.c (download_write_size): Remove.
+       (show_download_write_size): Remove.
+       (load_section_callback): Don't use download_write_size.
+       (_initialize_symfile): Don't register download_write_size.
+       * NEWS: Mention 'download-write-size' removal.
+
 2006-08-06  Daniel Jacobowitz  <dan@codesourcery.com>
 
        * expprint.c (print_subexp_standard, dump_subexp_body_standard): Add
index 9d54b251630e21baeeb05c5ca9a37c14c6a33592..d288c9d66c0c5be304647b56462b0d361aa2f522 100644 (file)
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -18,6 +18,8 @@ The ARM Demon monitor support (RDP protocol, "target rdp").
 Kernel Object Display, an embedded debugging feature which only worked with
 an obsolete version of Cisco IOS.
 
+The 'set download-write-size' and 'show download-write-size' commands.
+
 * New remote packets
 
 qSupported:
index b1e539bd82d3f817492e082c1a306433c244591d..40f443d3c70c7bb2c002364cb80566c1b6ade88e 100644 (file)
@@ -1,3 +1,8 @@
+2006-08-08  Vladimir Prus  <vladimir@codesourcery.com>
+
+       * gdb.texinfo (Target Commands): Remove 
+       'set download-write-size' and 'show download-write-size'.
+
 2006-08-01  Daniel Jacobowitz  <dan@codesourcery.com>
 
        * stabs.texinfo (Member Type Descriptor): Correct example for
index 1bac2b86f2d3929ec12c55d714c15cc08ef07d74..07a300402f54163daafdfc4350482ce8e06203f5 100644 (file)
@@ -12133,22 +12133,9 @@ your configuration may have more or fewer targets.
 
 Many remote targets require you to download the executable's code once
 you've successfully established a connection.  You may wish to control
-various aspects of this process, such as the size of the data chunks
-used by @value{GDBN} to download program parts to the remote target.
-
-@table @code
-@kindex set download-write-size
-@item set download-write-size @var{size}
-Set the write size used when downloading a program.  Only used when
-downloading a program onto a remote target.  Specify zero or a
-negative value to disable blocked writes.  The actual size of each
-transfer is also limited by the size of the target packet and the
-memory cache.
-
-@kindex show download-write-size
-@item show download-write-size
-@kindex show download-write-size
-Show the current value of the write size.
+various aspects of this process.
+
+@table @code
 
 @item set hash
 @kindex set hash@r{, for remote monitors}
index 7dbbb7b53ebe876e1a68a51c7b541a982628a57c..396be8f00e3b667726871951a67934e280cb2222 100644 (file)
@@ -1521,15 +1521,6 @@ load_command (char *arg, int from_tty)
    we don't want to run a subprocess.  On the other hand, I'm not sure how
    performance compares.  */
 
-static int download_write_size = 512;
-static void
-show_download_write_size (struct ui_file *file, int from_tty,
-                         struct cmd_list_element *c, const char *value)
-{
-  fprintf_filtered (file, _("\
-The write size used when downloading a program is %s.\n"),
-                   value);
-}
 static int validate_download = 0;
 
 /* Callback service function for generic_load (bfd_map_over_sections).  */
@@ -1570,11 +1561,6 @@ load_section_callback (bfd *abfd, asection *asec, void *data)
          const char *sect_name = bfd_get_section_name (abfd, asec);
          bfd_size_type sent;
 
-         if (download_write_size > 0 && size > download_write_size)
-           block_size = download_write_size;
-         else
-           block_size = size;
-
          buffer = xmalloc (size);
          old_chain = make_cleanup (xfree, buffer);
 
@@ -1591,8 +1577,6 @@ load_section_callback (bfd *abfd, asection *asec, void *data)
              int len;
              bfd_size_type this_transfer = size - sent;
 
-             if (this_transfer >= block_size)
-               this_transfer = block_size;
              len = target_write_memory_partial (lma, buffer,
                                                 this_transfer, &err);
              if (err)
@@ -3806,19 +3790,6 @@ Usage: set extension-language .foo bar"),
   add_info ("extensions", info_ext_lang_command,
            _("All filename extensions associated with a source language."));
 
-  add_setshow_integer_cmd ("download-write-size", class_obscure,
-                          &download_write_size, _("\
-Set the write size used when downloading a program."), _("\
-Show the write size used when downloading a program."), _("\
-Only used when downloading a program onto a remote\n\
-target. Specify zero, or a negative value, to disable\n\
-blocked writes. The actual size of each transfer is also\n\
-limited by the size of the target packet and the memory\n\
-cache."),
-                          NULL,
-                          show_download_write_size,
-                          &setlist, &showlist);
-
   debug_file_directory = xstrdup (DEBUGDIR);
   add_setshow_optional_filename_cmd ("debug-file-directory", class_support,
                                     &debug_file_directory, _("\
index 5782ce608d8550ac77e4dcba149465befc0b9a26..6785090128b419b79ff1443ce6ef8836ba237207 100644 (file)
@@ -1,3 +1,10 @@
+2006-08-08  Daniel Jacobowitz  <dan@codesourcery.com>
+
+       * config/monitor.exp (gdb_load): Remove support for obsolete
+       download-write-size.
+       * gdb.base/remote.exp: Likewise.  Update all callers of
+       gdb_timed_load.
+
 2006-08-02  Daniel Jacobowitz  <dan@codesourcery.com>
 
        * cursal.exp: Pass binfile to gdb_load.
index c0fb464fb9514a698fb3da342ef4f4881895204b..e71b99be3ddd6e54215bed7022dabb513966b574 100644 (file)
@@ -140,17 +140,6 @@ proc gdb_load { arg } {
     global timeout
     global last_gdb_file;
 
-    if [target_info exists gdb_download_size] {
-       send_gdb "set download-write-size [target_info gdb_download_size]\n";
-       gdb_expect 30 {
-           -re "$gdb_prompt $" { }
-           default {
-               perror "Setting download-write-size for target failed";
-               return -1;
-           }
-       }
-    }
-
     if { $arg == "" } {
        if [info exists last_gdb_file] {
            set arg $last_gdb_file;
index cf9e8530a3c36eebb0876df1b8c82efcbef925a6..1c3701714769f37d6c31d988b21c17080ba31420 100644 (file)
@@ -46,17 +46,6 @@ if {$result != "" } then {
 # Part ONE: Check the down load commands
 #
 
-gdb_test "show download-write-size" \
-       "The write size used when downloading a program is 512." \
-       "download limit default"
-
-gdb_test "set download-write-size" "Argument required.*"
-
-gdb_test "set download-write-size 0" ""
-gdb_test "show download-write-size" \
-       "The write size used when downloading a program is unlimited." \
-       "set download limit - unlimited"
-
 gdb_test "show remote memory-write-packet-size" \
        "The memory-write-packet-size is 0. Packets are limited to \[0-9\]+ bytes." \
        "write-packet default"
@@ -79,21 +68,14 @@ gdb_test "show remote memory-write-packet-size" \
 # Part TWO: Check the download behavour
 #
 
-proc gdb_load_timed {executable downloadsize class writesize} {
+proc gdb_load_timed {executable class writesize} {
     global test gdb_prompt
-    set test "timed download `[file tail $executable]' - $downloadsize, $class, $writesize"
+    set test "timed download `[file tail $executable]' - $class, $writesize"
 
     if {$writesize != ""} then {
        gdb_test "set remote memory-write-packet-size $writesize" \
                "" "$test - set packet size"
-    }
-
-    if {$downloadsize != ""} then {
-       gdb_test "set download-write-size $downloadsize" \
-               "" "$test - set download size"
-    }
 
-    if {$downloadsize != ""} then {
        send_gdb "set remote memory-write-packet-size $class\n"
        gdb_expect 5 {
            -re ".*Change the packet size.*$" {
@@ -127,18 +109,18 @@ proc gdb_load_timed {executable downloadsize class writesize} {
     pass $test
 }
 
-gdb_load_timed $binfile {} "" {}
+gdb_load_timed $binfile "" {}
 
 # Typically about 400-1 bytes can be downloaded
-gdb_load_timed $binfile "limit" 398
-gdb_load_timed $binfile "limit" 400
+gdb_load_timed $binfile "limit" 398
+gdb_load_timed $binfile "limit" 400
 
 # Absolute max is 16384
-gdb_load_timed $binfile "fixed" 0
-gdb_load_timed $binfile "fixed" 16385
+gdb_load_timed $binfile "fixed" 0
+gdb_load_timed $binfile "fixed" 16385
 
 # fall back to the default
-gdb_load_timed $binfile "limit" 0
+gdb_load_timed $binfile "limit" 0
 
 # Get size of data uploaded