+2019-12-11 Tom Tromey <tromey@adacore.com>
+
+ * xml-support.c (xml_fetch_content_from_file): Use FOPEN_RB.
+
2019-12-18 Tom Tromey <tromey@adacore.com>
PR build/25268:
+2019-12-11 Tom Tromey <tromey@adacore.com>
+
+ * gdb.xml/tdesc-arch.exp (set_arch): Add "trans_mode" parameter.
+ Add crlf test.
+
2019-12-18 Simon Marchi <simon.marchi@efficios.com>
* gdb.base/default.exp: Update value of $_gdb_major.
# Run these tests twice, once for $arch1 and once for $arch2, to
# make sure that the tdesc file overrides the global default.
+# TRANS_MODE indicates how newlines should be represented; it should
+# be one of the values supported by "fconfigure -translation".
-proc set_arch { arch which } {
+proc set_arch { arch which trans_mode } {
global gdb_prompt
global subdir
set filename [standard_output_file tdesc-arch.xml]
set fd [open $filename w]
+ fconfigure $fd -translation $trans_mode
puts $fd \
"<target>
<architecture>$arch</architecture>
remote_file host delete $filename
}
-set_arch $arch1 first
-set_arch $arch2 second
+set_arch $arch1 first lf
+set_arch $arch2 second lf
+
+with_test_prefix crlf {
+ set_arch $arch1 first crlf
+ set_arch $arch2 second crlf
+}
# Check an invalid architecture setting.
set filename [standard_output_file tdesc-arch.xml]
{
char *fullname = concat (dirname, "/", filename, (char *) NULL);
- file = gdb_fopen_cloexec (fullname, FOPEN_RT);
+ file = gdb_fopen_cloexec (fullname, FOPEN_RB);
xfree (fullname);
}
else
- file = gdb_fopen_cloexec (filename, FOPEN_RT);
+ file = gdb_fopen_cloexec (filename, FOPEN_RB);
if (file == NULL)
return {};