=== gdb/doc/gdb.texinfo ================================================================== --- gdb/doc/gdb.texinfo (/mirrors/gdb) (revision 338) +++ gdb/doc/gdb.texinfo (/patches/download_write_size/gdb) (revision 338) @@ -12133,23 +12133,10 @@ 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. +various aspects of this process. @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. - @item set hash @kindex set hash@r{, for remote monitors} @cindex hash mark while downloading === gdb/symfile.c ================================================================== --- gdb/symfile.c (/mirrors/gdb) (revision 338) +++ gdb/symfile.c (/patches/download_write_size/gdb) (revision 338) @@ -1521,15 +1521,6 @@ 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 @@ 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 @@ 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 @@ 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, _("\ === gdb/NEWS ================================================================== --- gdb/NEWS (/mirrors/gdb) (revision 338) +++ gdb/NEWS (/patches/download_write_size/gdb) (revision 338) @@ -18,6 +18,8 @@ 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: