+2021-04-26 Simon Marchi <simon.marchi@polymtl.ca>
+
+ PR gdb/27773
+ * cli/cli-dump.c (dump_binary_file): Check result of
+ gdb_fopen_cloexec.
+
2021-04-25 Sergei Trofimovich <siarheit@google.com>
* sparc-linux-nat.c (sparc_linux_nat_target): fix sparc build
int status;
gdb_file_up file = gdb_fopen_cloexec (filename, mode);
+ if (file == nullptr)
+ perror_with_name (filename);
+
status = fwrite (buf, len, 1, file.get ());
if (status != 1)
perror_with_name (filename);
+2021-04-26 Simon Marchi <simon.marchi@polymtl.ca>
+
+ PR gdb/27773
+ * gdb.base/dump.exp: Test dump to non-existent dir.
+
2021-04-26 Luis Machado <luis.machado@linaro.org>
* gdb.arch/aarch64-dbreg-contents.c (set_watchpoint): Fix arch level
set is64bitonly "no"
set endian "auto"
+set formats {binary ihex srec tekhex verilog}
+
if [istarget "alpha*-*-*"] then {
# SREC etc cannot handle 64-bit addresses. Force the test
# program into the low 31 bits of the address space.
}
+# Test writing a file of each format to a directory that does not exist.
+
+foreach_with_prefix format $formats {
+ gdb_test "dump $format memory /tmp/non/existent/directory/file $array_start $array_end" \
+ "/tmp/non/existent/directory/file: No such file or directory." \
+ "dump to non-existent directory"
+}
+
# Now start a fresh gdb session, and reload the saved value files.
gdb_exit