• R/O
  • HTTP
  • SSH
  • HTTPS

List of commits

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


users/linaro/gdb-aarch64-ilp32
RSS
Rev. Time Author
5e5a2a6 users/linaro/gdb-aarch64-ilp32 2017-10-23 22:52:28 Yao Qi

ILP32: GDB

gdb:

2017-03-06 Andrew Pinski <apinski@cavium.com>
Steve Ellcey <sellcey@cavium.com>
Yao Qi <yao.qi@linaro.org>

* aarch64-linux-nat.c (IS_ARM32): New macro.
(fetch_gregs_from_thread): Use IS_ARM32 macro.
(store_gregs_to_thread): Ditto.
(fetch_fpregs_from_thread): Ditto.
(store_fpregs_to_thread): Ditto.
(ps_get_thread_area): Ditto.
(aarch64_linux_siginfo_fixup): Ditto.
* aarch64-linux-tdep.c (aarch64_linux_init_abi): Set link
map offsets to 32 or 64 bits.
* aarch64-tdep.c (aarch64_ilp32_register_type): New function.
(aarch64_gdbarch_init): Setup ILP32 support.
Make sure the gdbarches have compatible ilp32 flags.
Set long and ptr sizes correctly for ilp32.
* aarch64-tdep.h (gdbarch_tdep) <ilp32>: New field.

gdb/gdbserver:

2017-03-06 Andrew Pinski <apinski@cavium.com>
Steve Ellcey <sellcey@cavium.com>

* linux-aarch64-low.c (aarch64_linux_read_description):

2c5e2ba 2017-10-23 22:50:18 Yao Qi

ILP32: BFD

bfd:

2017-03-06 Andrew Pinski <apinski@cavium.com>
Steve Ellcey <sellcey@cavium.com>

* cpu-aarch64.c (compatible):
Don't reject different ILP32/LP64 ABI's here.
* elfnn-aarch64.c (elfNN_aarch64_merge_private_bfd_data):
Add an error message on why endianess is rejected.
Reject different ILP32/LP64 ABI settings.
* elfxx-aarch64.c (_bfd_aarch64_elf_grok_prstatus): Handle
size and offset of ILP32 executables.
(_bfd_aarch64_elf_grok_psinfo): Ditto.

f6af9f3 2017-10-23 09:00:26 GDB Administrator

Automatic date update in version.in

67c0437 2017-10-22 20:32:44 Hans-Peter Nilsson

Fix spurious left-over quotes from last edit.

With a 32-bit bfd (default on an ILP32 system) the previous markings
on tests *were* correct. There, the results have been consistent
since they were added. The tests would appear to "spuriously" xpass
"only" on LP64 hosts, which were not the norm in 2000. (But, now CRIS
requires a 64-bit BFD.)

56fbd04 2017-10-22 20:05:07 Hans-Peter Nilsson

Fix gas/22304 by forcing a 64-bit bfd for cris*-*.

PR gas/22304
* config.bfd (cris-*-* | crisv32-*-*): Require a 64-bit BFD.

a73ca55 2017-10-22 09:00:28 GDB Administrator

Automatic date update in version.in

4e15b78 2017-10-22 02:46:22 Hans-Peter Nilsson

PR ld/21233

* testsuite/ld-elf/shared.exp: Remove kfails.

The test-cases started passing with 5c3261b0e834647c,
"ELF: Call check_relocs after opening all inputs".

The lists could now be re-concatenated (see other run_ld_link_tests
calls in shared.exp), but are for now left separate to simplify future
kfail/xfailing.

4d3bb80 2017-10-22 01:20:21 Simon Marchi

Add overloads of for_each_thread/find_thread that filter on pid

It happens often that we want to iterate or find threads restricted to a
given pid. I think it's worth having an overload to help with this.
Right now there is a single user of each of the find_thread and
for_each_thread overload, but as we replace the usages of find_inferior
with for_each_thread/find_thread, more usages will pop up.

gdb/gdbserver/ChangeLog:

* gdbthread.h (find_thread, for_each_thread): New functions.
* inferiors.c (thread_of_pid): Remove.
(find_any_thread_of_pid): Use find_thread.
* linux-low.c (num_lwps): Use for_each_thread.

a664f67 2017-10-22 01:15:42 Simon Marchi

Get rid of VEC (mem_region)

This patch removes VEC (mem_region). Doing so requires touching a lot
of little things here and there.

The fields in mem_attrib are now initialized during construction. The
values match those that were in default_mem_attrib (now removed).
unknown_mem_attrib is also removed, and replaced with a static method
(mem_attrib::unknown) that returns the equivalent.

mem_region is initialized in a way similar to mem_region_init (now
removed) did.

I found the organization of mem_region_list and target_mem_region_list a
bit confusing. Sometimes mem_region_list points to the same vector as
target_mem_region_list (and therefore does not own it), and sometimes
(when the user manually edits the mem regions) points to another vector,
and in this case owns it. To avoid this ambiguity, I think it is
simpler to have two vectors, one for target-defined regions and one for
user-defined regions, and have mem_region_list point to one or the
other. There are now no vector objects dynamically allocated, both are
static.

The make-target-delegates script does not generate valid code when a
target method returns a type with a parameter list. For this reason, I
created a typedef (mem_region_vector) that's only used in the target_ops
structure. If you speak perl, you are welcome to improve the script!

Regtested on the buildbot.

gdb/ChangeLog:

* memattr.h: Don't include vec.h.
(struct mem_attrib): Initialize fields.
<unknown>: New static method.
(struct mem_region): Add constructors, operator<, initialize
fields.
* memattr.c: Include algorithm.
(default_mem_attrib, unknown_mem_attrib): Remove.
(user_mem_region_list): New global.
(target_mem_region_list, mem_region_list): Change type to
std::vector<mem_region>.
(mem_use_target): Now a function.
(target_mem_regions_valid): Change type to bool.
(mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
(require_user_regions): Adjust.
(require_target_regions): Adjust.
(create_mem_region): Adjust.
(lookup_mem_region): Adjust.
(invalidate_target_mem_regions): Adjust.
(mem_clear): Rename to...
(user_mem_clear): ... this, and adjust.
(mem_command): Adjust.
(info_mem_command): Adjust.
(mem_enable, enable_mem_command, mem_disable,
disable_mem_command): Adjust.
(mem_delete): Adjust.
(delete_mem_command): Adjust.
* memory-map.h (parse_memory_map): Return an std::vector.
* memory-map.c (parse_memory_map): Likewise.
(struct memory_map_parsing_data): Add constructor.
<memory_map>: Point to std::vector.
(memory_map_start_memory): Adjust.
(memory_map_end_memory): Adjust.
(memory_map_end_property): Adjust.
(clear_result): Remove.
* remote.c (remote_memory_map): Return an std::vector.
* target-debug.h (target_debug_print_VEC_mem_region_s__p):
Remove.
(target_debug_print_mem_region_vector): New.
* target-delegates.c: Regenerate.
* target.h (mem_region_vector): New typedef.
(to_memory_map): Return mem_region_vector.
(target_memory_map): Return an std::vector.
* target.c (target_memory_map): Return an std::vector.
(flash_erase_command): Adjust.

6e17c56 2017-10-22 01:06:22 Simon Marchi

Use std::string in memory_map_parsing_data

Replace the fixed-size array with a string.

gdb/ChangeLog:

* memory-map.c (struct memory_map_parsing_data) <property_name>:
Change type to std::string.
(memory_map_start_property): Adjust.
(memory_map_end_property): Adjust.

cfba987 2017-10-22 00:27:52 Simon Marchi

Create a displaced_step_closure class hierarchy

displaced_step_closure is a type defined in multiple -tdep.c files.
Trying to xfree it from the common code (infrun.c) is a problem when we
try to poison xfree for non-POD types. Because there can be multiple of
these types in the same build, this patch makes a hierarchy of classes
with a virtual destructor. When the common code deletes the object
through a displaced_step_closure pointer, it will invoke the right
destructor.

The amd64 used a last-member array with a variable size. That doesn't
work with new, so I changed it for an std::vector. Other architectures
which used a simple byte buffer as a closure now use a shared
buf_displaced_step_closure, a closure type that only contains a
gdb::byte_vector.

Reg-tested on the buildbot.

gdb/ChangeLog:

* infrun.h: Include common/byte-vector.h.
(struct displaced_step_closure): New struct.
(struct buf_displaced_step_closure): New struct.
* infrun.c (displaced_step_closure::~displaced_step_closure):
Provide default implementation.
(displaced_step_clear): Deallocate step closure with delete.
* aarch64-tdep.c (displaced_step_closure): Rename to ...
(aarch64_displaced_step_closure): ... this, extend
displaced_step_closure.
(aarch64_displaced_step_data) <dsc>: Change type to
aarch64_displaced_step_closure.
(aarch64_displaced_step_copy_insn): Adjust to type change, use
unique_ptr.
(aarch64_displaced_step_fixup): Add cast for displaced step
closure.
* amd64-tdep.c (displaced_step_closure): Rename to ...
(amd64_displaced_step_closure): ... this, extend
displaced_step_closure.
<insn_buf>: Change type to std::vector<gdb_byte>.
<max_len>: Remove.
(fixup_riprel): Change type of DSC parameter, adjust to type
change of insn_buf.
(fixup_displaced_copy): Change type of DSC parameter.
(amd64_displaced_step_copy_insn): Instantiate
amd64_displaced_step_closure.
(amd64_displaced_step_fixup): Add cast for closure type, adjust
to type change of insn_buf.
* arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
parameter DSC.
(arm_linux_copy_svc): Likewise.
(cleanup_kernel_helper_return): Likewise.
(arm_catch_kernel_helper_return): Likewise.
(arm_linux_displaced_step_copy_insn): Instantiate
arm_displaced_step_closure.
* arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
(displaced_read_reg): Change type of parameter DSC.
(branch_write_pc): Likewise.
(load_write_pc): Likewise.
(alu_write_pc): Likewise.
(displaced_write_reg): Likewise.
(arm_copy_unmodified): Likewise.
(thumb_copy_unmodified_32bit): Likewise.
(thumb_copy_unmodified_16bit): Likewise.
(cleanup_preload): Likewise.
(install_preload): Likewise.
(arm_copy_preload): Likewise.
(thumb2_copy_preload): Likewise.
(install_preload_reg): Likewise.
(arm_copy_preload_reg): Likewise.
(cleanup_copro_load_store): Likewise.
(install_copro_load_store): Likewise.
(arm_copy_copro_load_store) Likewise.
(thumb2_copy_copro_load_store): Likewise.
(cleanup_branch): Likewise.
(install_b_bl_blx): Likewise.
(arm_copy_b_bl_blx): Likewise.
(thumb2_copy_b_bl_blx): Likewise.
(thumb_copy_b): Likewise.
(install_bx_blx_reg): Likewise.
(arm_copy_bx_blx_reg): Likewise.
(thumb_copy_bx_blx_reg): Likewise.
(cleanup_alu_imm): Likewise.
(arm_copy_alu_imm): Likewise.
(thumb2_copy_alu_imm): Likewise.
(cleanup_alu_reg): Likewise.
(install_alu_reg): Likewise.
(arm_copy_alu_reg): Likewise.
(thumb_copy_alu_reg): Likewise.
(cleanup_alu_shifted_reg): Likewise.
(install_alu_shifted_reg): Likewise.
(arm_copy_alu_shifted_reg): Likewise.
(cleanup_load): Likewise.
(cleanup_store): Likewise.
(arm_copy_extra_ld_st): Likewise.
(install_load_store): Likewise.
(thumb2_copy_load_literal): Likewise.
(thumb2_copy_load_reg_imm): Likewise.
(arm_copy_ldr_str_ldrb_strb): Likewise.
(cleanup_block_load_all): Likewise.
(cleanup_block_store_pc): Likewise.
(cleanup_block_load_pc): Likewise.
(arm_copy_block_xfer): Likewise.
(thumb2_copy_block_xfer): Likewise.
(cleanup_svc): Likewise.
(install_svc): Likewise.
(arm_copy_svc): Likewise.
(thumb_copy_svc): Likewise.
(arm_copy_undef): Likewise.
(thumb_32bit_copy_undef): Likewise.
(arm_copy_unpred): Likewise.
(arm_decode_misc_memhint_neon): Likewise.
(arm_decode_unconditional): Likewise.
(arm_decode_miscellaneous): Likewise.
(arm_decode_dp_misc): Likewise.
(arm_decode_ld_st_word_ubyte): Likewise.
(arm_decode_media): Likewise.
(arm_decode_b_bl_ldmstm): Likewise.
(arm_decode_ext_reg_ld_st): Likewise.
(thumb2_decode_dp_shift_reg): Likewise.
(thumb2_decode_ext_reg_ld_st): Likewise.
(arm_decode_svc_copro): Likewise.
(thumb2_decode_svc_copro): Likewise.
(install_pc_relative): Likewise.
(thumb_copy_pc_relative_16bit): Likewise.
(thumb_decode_pc_relative_16bit): Likewise.
(thumb_copy_pc_relative_32bit): Likewise.
(thumb_copy_16bit_ldr_literal): Likewise.
(thumb_copy_cbnz_cbz): Likewise.
(thumb2_copy_table_branch): Likewise.
(cleanup_pop_pc_16bit_all): Likewise.
(thumb_copy_pop_pc_16bit): Likewise.
(thumb_process_displaced_16bit_insn): Likewise.
(decode_thumb_32bit_ld_mem_hints): Likewise.
(thumb_process_displaced_32bit_insn): Likewise.
(thumb_process_displaced_insn): Likewise.
(arm_process_displaced_insn): Likewise.
(arm_displaced_init_closure): Likewise.
(arm_displaced_step_fixup): Add cast for closure.
* arm-tdep.h: Include infrun.h.
(displaced_step_closure): Rename to ...
(arm_displaced_step_closure): ... this, extend
displaced_step_closure.
<u::svc::copy_svc_os>: Change type of parameter DSC.
<cleanup>: Likewise.
(arm_process_displaced_insn): Likewise.
(arm_displaced_init_closure): Likewise.
(displaced_read_reg): Likewise.
(displaced_write_reg): Likewise.
* i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
Adjust.
* i386-tdep.h: Include infrun.h.
(i386_displaced_step_closure): New typedef.
* i386-tdep.c (i386_displaced_step_copy_insn): Use
i386_displaced_step_closure.
(i386_displaced_step_fixup): Adjust.
* rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
(ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
and unique_ptr.
(ppc_displaced_step_fixup): Adjust.
* s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
(s390_displaced_step_copy_insn): Use s390_displaced_step_closure
and unique_ptr.
(s390_displaced_step_fixup): Adjust.

b392b30 2017-10-21 23:15:48 Simon Marchi

Remove leftover declarations in interps.h

The corresponding definitions have already been removed.

gdb/ChangeLog:

* interps.h (interp_resume, interp_suspend, interp_set_temp):
Remove declarations.

881b337 2017-10-21 09:00:31 GDB Administrator

Automatic date update in version.in

d636135 2017-10-21 03:21:45 Sriraman Tallam

Fix ChangeLog entry.

3b4190c 2017-10-21 03:00:28 Sriraman Tallam

New gold linker option -z,text-unlikely-segment.

2017-10-04 Sriraman Tallam <tmsriram@google.com>

* options.h (-z,text_unlikely_segment): New option.
* layout.cc (Layout::layout): Create new output section
for .text.unlikely sections with the new option.
(Layout::segment_precedes): Check for the new option
when segment flags match.
* testsuite/text_unlikely_segment.cc: New test source.
* testsuite/text_unlikely_segment.sh: New test script.
* testsuite/Makefile.am (text_unlikely_segment): New test.
* testsuite/Makefile.in: Regenerate.

f301201 2017-10-21 01:47:08 H.J. Lu

Add a compile-time test for PR ld/22269

This compile-time test requires a target C compiler to run. It fails
on many targets where ELF backend linkers fail to check undefined weak
symbol in static PIE via UNDEFWEAK_NO_DYNAMIC_RELOC.

PR ld/22269
* testsuite/ld-elf/pr22269-1.rd: New file.
* testsuite/ld-elf/pr22269-1.c: Likewise.
* testsuite/ld-elf/shared.exp: Run pr22269-1.

d5833c6 2017-10-21 00:01:04 Tom Tromey

Use std::vector in gdb_bfd_data

This changes gdb_bfd_data to use std::vector rather than VEC.

ChangeLog
2017-10-20 Tom Tromey <tom@tromey.com>

* gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
std::vector.
(gdb_bfd_record_inclusion): Update.
(bfdp): Remove typedef.

06d5bbc 2017-10-21 00:01:03 Tom Tromey

Use "new" to allocate gdb_bfd_data

This changes gdb_bfd_data to be allocated with new and destroyed with
delete.

ChangeLog
2017-10-20 Tom Tromey <tom@tromey.com>

* gdb_bfd.c (gdb_bfd_ref): Use new.
(struct gdb_bfd_data): Add constructor, destructor, and member
initializers.
(gdb_bfd_unref): Use delete.

2712ce2 2017-10-21 00:01:03 Tom Tromey

Introduce new_bfd_ref

This introduces a helper function, new_bfd_ref, that calls gdb_bfd_ref
and returns a gdb_bfd_ref_ptr. Then it updates several places to use
this.

ChangeLog
2017-10-20 Tom Tromey <tom@tromey.com>

* exec.c (exec_file_attach): Use new_bfd_ref.
* symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
* gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
(gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
new_bfd_ref.
* gdb_bfd.h (new_bfd_ref): New function.

15763a0 2017-10-20 23:33:57 Pedro Alves

Fix 'gdb.base/quit.exp hangs forever' if the test fails

The [wait -i $gdb_spawn_id] in the test is dangerous in the sense that
it won't be subject to timeout logic. So if GDB fails quiting, this
testcase hangs forever, hanging the test run with it. See:
https://sourceware.org/ml/gdb-patches/2016-10/msg00728.html

Instead of 'wait'ing directly, use gdb_test_multiple and expect 'eof'.

Tested that the testcase no longer hangs by hacking the test to send
"info threads" instead of "quit".

Tested with
--target_board={unix, native-gdbserver,native-extended-gdbserver}
and tested with
--host_board=local-remote-host
as well.

gdb/testsuite/ChangeLog:
2017-10-20 Pedro Alves <palves@redhat.com>

* gdb.base/quit.exp: Use gdb_test_multiple and expect 'eof' before
'wait -i'. Use gdb_assert and remote_close.

fcc8fb2 2017-10-20 22:47:24 Pedro Alves

Fix gdb.gdb/ selftest tests when testing optimized GDB builds

After commit bf4692711232 ("Eliminate catch_errors"), GCC started
inlining captured_command_loop in captured_main. And setting a
breakpoint on captured_command_loop makes the inferior GDB stop in
captured_main, _after_ captured_command_loop's call to
interp_pre_command_loop, which prints the inferior GDB's prompt, has
already executed, confusing the gdb.gdb/ selftest tests:

(gdb) FAIL: gdb.gdb/complaints.exp: run until breakpoint at captured_command_loop
WARNING: Couldn't test self

Debugging GDB with GDB manually, we see:

(top-gdb) b captured_command_loop
Breakpoint 1 at 0x71ee60: file src/gdb/main.c, line 324.
(top-gdb) r
[....]
(gdb) <<<<<< PROMPT HERE
Thread 1 "gdb" hit Breakpoint 1, captured_main (data=<optimized out>) at src/gdb/main.c:1147
1147 captured_command_loop ();
(top-gdb)

Note the stop at 'captured_main', and the "PROMPT HERE" line. That
prompt does not show up when debugging a non-optimized build of GDB.

Fix this by preventing inlining of captured_command_loop.

Ref: https://sourceware.org/ml/gdb-patches/2017-10/msg00522.html

gdb/ChangeLog:
2017-10-20 Pedro Alves <palves@redhat.com>

* main.c (captured_command_loop): Add attribute noinline.

808811a 2017-10-20 19:45:19 Nick Clifton

Improve handling of REPT pseudo op with a negative count.

PR 22324
* read.c (s_rept): Use size_t type for count parameter.
(do_repeat): Change type of count parameter to size_t.
Issue an error is the count parameter is negative.
(do_repeat_with_expression): Likewise.
* read.h: Update prototypes for do_repeat and
do_repeat_with_expression.
* doc/as.texinfo (Rept): Document that a zero count is allowed but
negative counts are not.
* config/tc-rx.c (rx_rept): Use size_t type for count parameter.
* config/tc-tic54x.c (tic54x_loop): Cast count parameter to size_t
type.
* testsuite/gas/macros/end.s: Add a test using a negative repeat
count.
* testsuite/gas/macros/end.l: Add expected error message.

36862fc 2017-10-20 12:53:14 Umesh Kalappa

Implement BE8 support for ARM.

gold/
* arm.cc (Stub::do_fixed_endian_write):Far call stubs support for arm
in the be8 mode.
* testsuite/Makefile.am: New test cases.
* testsuite/Makefile.in: Regenerate.
* testsuite/arm_farcall_arm_arm_be8.sh: New script for arm to arm far
call stubs.
* testsuite/arm_farcall_thumb_thumb_be8.sh: New script for thumb to
thumb far call stubs.

4c2287b 2017-10-20 11:07:15 Simon Marchi

Get rid of VEC(interp_factory_p)

Replace it with an std::vector.

gdb/ChangeLog:

* interps.c (struct interp_factory): Add constructor.
(interp_factory_p): Remove typedef.
(DEF_VEC_P(interp_factory_p)): Remove.
(interpreter_factories): Change type to std::vector.
(interp_factory_register): Adjust.
(interp_lookup): Adjust.
(interpreter_completer): Adjust.

b5f6e74 2017-10-20 09:00:28 GDB Administrator

Automatic date update in version.in

3d415c2 2017-10-20 06:58:43 Tom Tromey

Remove cleanups from break-catch-syscall.c

This removes the remaining cleanups from break-catch-syscall.c by
storing temporary strings in a vector.

ChangeLog
2017-10-19 Tom Tromey <tom@tromey.com>

* break-catch-syscall.c (catch_syscall_completer): Use
std::string, gdb::unique_xmalloc_ptr.

395423c 2017-10-20 06:58:12 Tom Tromey

Remove cleanup from call_function_by_hand_dummy

This changes call_function_by_hand_dummy to use std::string, removing
a cleanup.

ChangeLog
2017-10-19 Tom Tromey <tom@tromey.com>

* infcall.c (call_function_by_hand_dummy): Use std::string.

54f70bc 2017-10-20 06:58:11 Tom Tromey

Remove cleanups from prepare_execute_command

This changes prepare_execute_command to return a scoped_value_mark
rather than a cleanup.

ChangeLog
2017-10-19 Tom Tromey <tom@tromey.com>

* mi/mi-main.c (mi_cmd_execute): Update.
* top.h (prepare_execute_command): Return scoped_value_mark.
* value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
Add move constructor.
* top.c (prepare_execute_command): Return scoped_value_mark.
(execute_command): Update.

49a4ce2 2017-10-20 04:50:42 Andrew Burgess

gdb: Remove hard-coded line number from test

Removes the use of a hard-coded line number from a test.

gdb/testsuite/ChangeLog:

* gdb.linespec/ls-errs.exp (do_test): Update comment, use line
number from variable rather than hard-coded.

63929e8 2017-10-20 02:12:03 Pedro Alves

Fix build breakage in gdb/xml-support.c

The buildbots are showing that the previous change to
xml_fetch_content_from_file causes __wur warnings/errors:

../../binutils-gdb/gdb/xml-support.c: In function gdb::unique_xmalloc_ptr<char> xml_fetch_content_from_file(const char*, void*):
../../binutils-gdb/gdb/xml-support.c:1028:43: error: ignoring return value of size_t fread(void*, size_t, size_t, FILE*), declared with attribute warn_unused_result [-Werror=unused-result]
fread (text.get (), 1, len, file.get ());
^

This commit fixes it.

gdb/ChangeLog:
2017-10-19 Pedro Alves <palves@redhat.com>

* xml-support.c (xml_fetch_content_from_file): Check fread's
return.