+2017-10-03 Tom Tromey <tom@tromey.com>
+
+ * symfile.c (load_progress): Use gdb::byte_vector.
+
2017-10-03 Tom Tromey <tom@tromey.com>
* mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
#include "stack.h"
#include "gdb_bfd.h"
#include "cli/cli-utils.h"
+#include "common/byte-vector.h"
#include <sys/types.h>
#include <fcntl.h>
might add a verify_memory() method to the target vector and
then use that. remote.c could implement that method using
the ``qCRC'' packet. */
- gdb_byte *check = (gdb_byte *) xmalloc (bytes);
- struct cleanup *verify_cleanups = make_cleanup (xfree, check);
+ gdb::byte_vector check (bytes);
- if (target_read_memory (args->lma, check, bytes) != 0)
+ if (target_read_memory (args->lma, check.data (), bytes) != 0)
error (_("Download verify read failed at %s"),
paddress (target_gdbarch (), args->lma));
- if (memcmp (args->buffer, check, bytes) != 0)
+ if (memcmp (args->buffer, check.data (), bytes) != 0)
error (_("Download verify compare failed at %s"),
paddress (target_gdbarch (), args->lma));
- do_cleanups (verify_cleanups);
}
totals->data_count += bytes;
args->lma += bytes;