MI: Add -a option to the "-data-disassemble" command
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
2
3 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
4 If used, use find_pc_partial_function to find address range
5 to disassemble.
6 * mi/mi-main.c (mi_cmd_list_features): Report
7 "data-disassemble-a-option" feature.
8 * NEWS: Mention new -data-disassemble option -a.
9
10 2018-08-13 Tom Tromey <tom@tromey.com>
11
12 * common/common-defs.h (_FORTIFY_SOURCE): Define.
13
14 2018-08-13 Alan Hayward <alan.hayward@arm.com>
15
16 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
17 (aarch64_linux_collect_sve_regset): Likewise.
18 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
19 * regcache.h (regcache_map_entry_size): New function.
20
21 2018-08-13 Alan Hayward <alan.hayward@arm.com>
22
23 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
24 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
25 (SVE_HEADER_VL_LENGTH): Likewise.
26 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
27 (SVE_HEADER_FLAGS_LENGTH): Likewise.
28 (SVE_HEADER_RESERVED_LENGTH): Likewise.
29 (SVE_HEADER_SIZE_OFFSET): Likewise.
30 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
31 (SVE_HEADER_VL_OFFSET): Likewise.
32 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
33 (SVE_HEADER_FLAGS_OFFSET): Likewise.
34 (SVE_HEADER_RESERVED_OFFSET): Likewise.
35 (SVE_HEADER_SIZE): Likewise.
36 (aarch64_linux_core_read_vq): Add function.
37 (aarch64_linux_core_read_description): Check for SVE section.
38
39 2018-08-13 Alan Hayward <alan.hayward@arm.com>
40
41 * aarch64-fbsd-tdep.c
42 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
43 collect_size.
44 * aarch64-linux-tdep.c
45 (aarch64_linux_iterate_over_regset_sections): Likewise.
46 * alpha-linux-tdep.c
47 (alpha_linux_iterate_over_regset_sections):
48 * alpha-nbsd-tdep.c
49 (alphanbsd_iterate_over_regset_sections): Likewise.
50 * amd64-fbsd-tdep.c
51 (amd64fbsd_iterate_over_regset_sections): Likewise.
52 * amd64-linux-tdep.c
53 (amd64_linux_iterate_over_regset_sections): Likewise.
54 * arm-bsd-tdep.c
55 (armbsd_iterate_over_regset_sections): Likewise.
56 * arm-fbsd-tdep.c
57 (arm_fbsd_iterate_over_regset_sections): Likewise.
58 * arm-linux-tdep.c
59 (arm_linux_iterate_over_regset_sections): Likewise.
60 * corelow.c (get_core_registers_cb): Likewise.
61 (core_target::fetch_registers): Likewise.
62 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
63 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
64 * gdbarch.h (void): Regenerate.
65 * gdbarch.sh: Add supply_size and collect_size.
66 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
67 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
68 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
69 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
70 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
71 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
72 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
73 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
74 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
75 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
76 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
77 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
78 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
79 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
80 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
81 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
82 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
83 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
84 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
85 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
86 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
87 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
88 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
89 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
90 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
91 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
92 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
93 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
94 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
95 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
96
97 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
98
99 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
100 with string_printf.
101
102 2018-08-10 Keith Seitz <keiths@redhat.com>
103
104 * compile/compile-c-support.c (add_code_header, add_code_footer):
105 Move into policy class.
106 (c_push_user_expression, pop_user_expression_nop)
107 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
108 (compile_program): New host class.
109 (c_compile_program): New typedef.
110 (c_compute_porgram): Use c_compile_program.
111
112 2018-08-10 Keith Seitz <keiths@redhat.com>
113
114 * compile/compile-internal.h (compile_instance::~compile_instance):
115 Remove calls to htab_delete.
116 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
117 * compile.c (compile_instance::compile_instance): Initialize
118 htab unique pointers.
119 (compile_instance::get_cached_type, compile_instance::insert_type)
120 (compile_instance::error_symbol_once): Update for unique_ptr.
121
122 2018-08-10 Keith Seitz <keiths@redhat.com>
123
124 * compile/compile-c-symbols.c (struct symbol_error)
125 (hash_symbol_error, eq_symbol_error, del_symbol_error)
126 (compile_instance::insert_symbol_error)
127 (compile_instance::error_symbol_once): Move to ...
128 * compile/compile.c: ... here.
129
130 2018-08-10 Keith Seitz <keiths@redhat.com>
131
132 * compile/compile-c-support.c (c_get_compile_context): Use `new'
133 instead of `new_compile_instance'.
134 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
135 Update description.
136 If the symbol error map is not initialized, create it.
137 (generate_c_for_for_one_symbol): Do not check/initialize
138 the symbol error map.
139 * compile/compile-c-types.c (compile_c_instance): Make a class.
140 Update all callers.
141 (compile_instance::compile_instance): Initialize the type cache.
142 (get_cached_type): New function.
143 (insert_type): Update description.
144 (compile_c_instance::m_default_cflags): Define.
145 (convert_type): Update description. Use get_cached_type.
146 (delete_instance): Moved to destructor.
147 (new_compile_instance): Moved to constructor.
148 * compile/compile-c.h (compile_c_instance): Make class inheriting
149 from compile_instance.
150 <base>: Remove field.
151 <type_map, symbol_err_map>: Move to base class.
152 <c_plugin>: Rename to `m_plugin' and remove pointer type.
153 * compile/compile-internal.h (compile_instance): Make class.
154 <type_map_t, symbol_err_map_t>: Define.
155 <fe>: Rename to `m_gcc_fe'.
156 <scope, block, gcc_target_options>: Add `m_' prefix.
157 <m_type_map, m_symbol_err_map>: New fields, moved from
158 compile_c_instance.
159 <destroy>: Remove.
160 (convert_type, new_compile_instance): Remove.
161 * compile/compile.c (cleanup_compile_instance): Remove.
162 (compile_to_object): Use unique_ptr to eliminate cleanups.
163 (compile_instance::set_print_callback, compile_instance::version)
164 (compile_instance::set_verbose)
165 (compile_instance::set_driver_filename)
166 (compile_instance::set_triplet_regexp)
167 (compile_instance::set_arguments)
168 (compile_instance::set_source_file)
169 (compile_instance::compile): Define.
170
171 2018-08-10 Keith Seitz <keiths@redhat.com>
172
173 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
174 * compile/compile-c-types.c: Define GCC_METHODN macros and include
175 gcc-c-fe.def to define C plugin.
176 (delete_instance): Delete `c_plugin'.
177 (new_compile_instance): Initialize `c_plugin'.
178 * compile/compile-c.h: Include gcc_c_plugin.h.
179 (struct compile_c_instance) <c_plugin>: New member.
180 * gcc-c-plugin.h: New file.
181 Update all callers with API change.
182
183 2018-08-10 Keith Seitz <keiths@redhat.com>
184
185 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
186 (HFILES_NO_SRCDIR): ... to here.
187 Add compile-internal.h and compile-c.h.
188 * compile/compile-c-support.c: Include compile-c.h.
189 * compile/compile-c-symbols.c: Include compile-c.h.
190 (generate_c_for_variable_locations): Update comment.
191 * compile/compile-c-types.c: Include compile-c.h.
192 * compile/compile-c.h: New file -- moved C language declarations
193 from other files here.
194 * compile/compile-internal.h: Do not include hashtab.h or
195 common/enum-flags.h.
196 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
197 (gcc_convert_symbol, gcc_symbol_address)
198 (generate_c_for_variable_locations, c_get_mode_for_size)
199 (c_get_range_decl_name): Definitions moved to compile-c.h.
200 * compile/compile-loc2c.c: Include compile-c.h.
201
202 2018-08-10 Keith Seitz <keiths@redhat.com>
203
204 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
205 (c_symbol_substitution_name): ... this.
206 Update all callers.
207
208 2018-08-10 Keith Seitz <keiths@redhat.com>
209
210 * compile/compile-c-support.c (c_compute_program): Use
211 unique_xmalloc_ptr to eliminate cleanup.
212 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
213 Return a unique_xmalloc_ptr and eliminate cleanup.
214 * compile/compile-internal.h (generate_c_for_variable_locations):
215 Return unique_xmalloc_ptr and update description.
216
217 2018-08-10 Alan Hayward <alan.hayward@arm.com>
218
219 * corelow.c (core_target::get_core_register_section): Rename
220 min_size to section_min_size.
221
222 2018-08-09 Jim Wilson <jimw@sifive.com>
223
224 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
225 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
226 * NEWS: Mention new GNU/Linux RISC-V target.
227 * configure.host: Add riscv*-*-linux*.
228 * configure.nat: Add riscv*.
229 * configure.tgt: Add riscv*-*-linux*.
230 * riscv-linux-nat.c: New file.
231 * riscv-linux-tdep.c: New file.
232
233 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
234
235 * infrun.c (resume): Make static, add forward declaration.
236 (proceed): Update header comment.
237 * infrun.h (resume): Delete declaration.
238
239 2018-08-09 Tom Tromey <tom@tromey.com>
240
241 * riscv-tdep.h: Minor formatting fixes.
242
243 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
244
245 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
246 * dwarf-index-cache.c (create_dir_and_check): Likewise.
247 (test_mkdir_recursive): Likewise.
248 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
249
250 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
251
252 * valarith.c (value_subscripted_rvalue): If an array is not in
253 memory, and we don't know the upper bound, then we can't know that
254 the requested element exists or not.
255
256 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
257
258 * target.c (str_comma_list_concat_elem): Fix typo in comment.
259 (target_options_to_string): Add comment.
260
261 2018-08-08 Tom Tromey <tom@tromey.com>
262
263 * unittests/scoped_mmap-selftests.c: Check result of "write".
264
265 2018-08-08 Jim Wilson <jimw@sifive.com>
266
267 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
268 (decode_register_index_short): New.
269 (decode_j_type_insn, decode_cj_type_insn): New.
270 (decode_b_type_insn, decode_cb_type_insn): New.
271 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
272 local xlen. Check xlen when decoding ambiguous compressed insns. In
273 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
274 is_c_sw_insn instead of is_sw_insn.
275 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
276 (riscv_software_single_step): New.
277 * riscv-tdep.h (riscv_software_single_step): Declare.
278
279 * riscv-tdep.c (riscv_isa_xlen): Drop static.
280 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
281
282 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
283
284 PR gdb/18050:
285 * target.c (dispose_inferior): Don't dispose of inferiors that are
286 already killed.
287
288 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
289
290 * remote.c (remote_target::download_tracepoint): Change char* to
291 const char*.
292
293 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
294
295 * target.h (target_options_to_string): Return an std::string.
296 * target.c (str_comma_list_concat_elem): Return void, use
297 std::string.
298 (do_option): Likewise.
299 (target_options_to_string): Return an std::string.
300 * linux-nat.c (linux_nat_target::wait): Adjust.
301 * target-debug.h (target_debug_print_options): Adjust.
302
303 2018-08-07 Tom Tromey <tom@tromey.com>
304
305 * Makefile.in (CPPFLAGS): New variable.
306 (INTERNAL_CPPFLAGS): Use it.
307
308 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
309
310 * NEWS: Mention the index cache.
311
312 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
313
314 * common/pathstuff.h (get_standard_cache_dir): New.
315 * common/pathstuff.c (get_standard_cache_dir): New.
316 * build-id.h (build_id_to_string): New.
317 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
318 DEBUG_STR_SUFFIX): Move to here.
319 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
320 DEBUG_STR_SUFFIX): Move from there.
321 (write_psymtabs_to_index): Make non-static, add basename
322 parameter. Write to temporary files, rename when done.
323 (save_gdb_index_command): Adjust call to
324 write_psymtabs_to_index.
325 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
326 field.
327 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
328 (get_gdb_index_contents_from_cache): New.
329 (get_gdb_index_contents_from_cache_dwz): New.
330 (dwarf2_initialize_objfile): Read index from cache.
331 (dwarf2_build_psymtabs): Save to index.
332 * dwarf-index-cache.h: New file.
333 * dwarf-index-cache.c: New file.
334 * dwarf-index-write.h: New file.
335
336 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
337
338 * gnulib/aclocal.m4: Re-generate.
339 * gnulib/config.in: Re-generate.
340 * gnulib/configure: Re-generate.
341 * gnulib/import/Makefile.am: Re-generate.
342 * gnulib/import/Makefile.in: Re-generate.
343 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
344 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
345 * gnulib/import/m4/mkdir.m4: New file.
346 * gnulib/import/mkdir.c: New file.
347 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
348 module.
349
350 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
351
352 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
353 * common/scoped_mmap.c: New file.
354 * common/scoped_mmap.h (destroy): New method.
355 (~scoped_mmap, reset): Use destroy.
356 (scoped_mmap): New move constructor.
357 (mmap_file): New declaration.
358 * unittests/scoped_mmap-selftests.c (test_normal,
359 test_invalid_filename, run_tests): New functions.
360 (_initialize_scoped_mmap_selftests): Register selftest.
361
362 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
363
364 * dwarf2read.c (read_gdb_index_from_section): Rename to...
365 (read_gdb_index_from_buffer): ... this. Remove section
366 parameter, add buffer parameter.
367 (get_gdb_index_contents_ftype,
368 get_gdb_index_contents_dwz_ftype): New typedefs.
369 (dwarf2_read_gdb_index): Add callback parameters to get the
370 index contents.
371 (get_gdb_index_contents_from_section): New.
372 (dwarf2_initialize_objfile): Update call to
373 dwarf2_read_gdb_index.
374
375 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
376
377 * common/filestuff.h (gdb_fopen_cloexec): New overload.
378 (gdb_open_cloexec): Likewise.
379 * nat/linux-osdata.c (command_from_pid): Use string_printf.
380 (commandline_from_pid): Likewise.
381 (linux_xfer_osdata_threads): Likewise.
382 (linux_xfer_osdata_fds): Likewise.
383 * ada-lang.c (is_package_name): Likewise.
384 * auxv.c (procfs_xfer_auxv): Likewise.
385 * breakpoint.c (print_one_breakpoint_location): Use
386 uiout::field_fmt.
387 (print_one_catch_solib): Use string_printf.
388 * coff-pe-read.c (add_pe_exported_sym): Likewise.
389 (add_pe_forwarded_sym): Likewise.
390 * dwarf2read.c (create_type_unit_group): Likewise.
391 (build_error_marker_type): Likewise.
392 * infcall.c (get_function_name): Likewise.
393 * valprint.c (print_converted_chars_to_obstack): Likewise.
394 * xtensa-tdep.c (xtensa_register_type): Likewise.
395
396 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
397
398 * remote.c (remote_target::download_tracepoint): Fix format
399 string errors.
400
401 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
402
403 * tracefile.c: Include common/byte-vector.h.
404 (trace_save): Change type of buf to gdb::byte_vector. Initialize
405 with trace_regblock_size if needed. Update uses of buf.
406
407 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
408
409 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
410 std::vector<unsigned char>.
411 * tracepoint.c (collection_list::collection_list): Remove
412 m_regs_mask initializer from initializer list. Resize
413 m_regs_mask using the largest remote register number.
414 (collection_list::add_remote_register): Remove size check on
415 m_regs_mask. Use at to access element.
416 (collection_list::stringify): Change type of temp_buf to
417 gdb::char_vector. Update uses of temp_buf. Resize if needed to
418 stringify the register mask. Use pack_hex_byte for the register
419 mask.
420
421 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
422
423 * tracepoint.h (class collection_list) <add_register>: Remove.
424 <add_remote_register, add_ax_registers, add_local_register>:
425 Declare.
426 <add_memrange>: Add scope parameter.
427 * tracepoint.c (encode_actions_1): Likewise.
428 (collection_list::add_register): Rename to ...
429 (collection_list::add_remote_register): ... this. Update
430 comment.
431 (collection_list::add_ax_registers, add_local_register): New
432 methods.
433 (collection_list::add_memrange): Add scope parameter. Call
434 add_local_register instead of add_register.
435 (finalize_tracepoint_aexpr): New function.
436 (collection_list::collect_symbol): Update calls to add_memrange.
437 Call add_local_register instead of add_register. Call
438 add_ax_registers. Call finalize_tracepoint_aexpr.
439 (encode_actions_1): Get remote regnos for $reg action. Call
440 add_remote_register, add_ax_registers, and add_local_register.
441 Update call to add_memrange. Call finalize_tracepoint_aexpr.
442 (validate_actionline): Call finalize_tracepoint_aexpr.
443
444 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
445
446 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
447 Replace array buf with gdb::char_vector buf, of size
448 get_remote_packet_size (). Replace references to buf and
449 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
450 and xsnprintf with snprintf. Raise errors if the buffer is too
451 small.
452
453 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
454
455 * remote.c (remote_target::download_tracepoint): Fix the has_more
456 predicate in the QTDP action list iteration.
457
458 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
459
460 * remote.c (remote_target::download_tracepoint): Fix indentation
461 in for block.
462
463 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
464
465 * proc-api.c (_initialize_proc_api): Remove c, unused.
466 * procfs.c (procfs_init_inferior): Remove signals, unused.
467 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
468 unused.
469
470 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
471 Andrew Burgess <andrew.burgess@embecosm.com>
472
473 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
474 'W_STOPCODE (0)' as this could be ambiguous.
475
476 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
477
478 * ser-tcp.c (net_open): Fix thinko when deciding whether to
479 disable TCP's Nagle algorithm (use "ai_protocol" instead of
480 "ai_socktype").
481
482 2018-08-02 Tom Tromey <tom@tromey.com>
483
484 PR symtab/16842.
485 * dwarf2read.c (read_func_scope): Set symtab on template parameter
486 symbols.
487 (process_structure_scope): Likewise.
488
489 2018-08-02 Xavier Roirand <roirand@adacore.com>
490
491 PR gdb/22629:
492 * darwin-nat.c (darwin_kill_inferior): Fix handling of
493 kill inferior.
494
495 2018-08-02 Tom Tromey <tom@tromey.com>
496
497 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
498 (darwin_suspend_inferior, darwin_resume_inferior)
499 (darwin_decode_notify_message, darwin_resume_inferior_threads)
500 (darwin_check_new_threads): Check result of get_darwin_inferior.
501
502 2018-07-31 Joel Brobecker <brobecker@adacore.com>
503
504 GDB 8.1.1 released.
505
506 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
507
508 * varobj.c (varobj_get_path_expr_parent): Report an error if
509 parent is a dynamic varobj.
510
511 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
512
513 * gnulib/aclocal.m4: Re-generate.
514 * gnulib/config.in: Re-generate.
515 * gnulib/configure: Re-generate.
516 * gnulib/import/Makefile.in: Re-generate.
517 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
518 * gnulib/import/m4/onceonly.m4: Re-generate.
519
520 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
521
522 * target-descriptions.c (struct xml_test_tdesc): New.
523 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
524 (record_xml_tdesc): Update.
525 (maintenance_check_xml_descriptions): Update.
526 * target-descriptions.h (record_xml_tdesc): Update comment.
527
528 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
529
530 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
531 checking array bounds are defined.
532
533 2018-07-30 Tom Tromey <tom@tromey.com>
534
535 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
536 irreflexivity violation.
537
538 2018-07-30 Tom Tromey <tom@tromey.com>
539
540 * cli/cli-decode.c (lookup_cmd): Remove lint code.
541 * value.c (unpack_long): Remove lint code.
542 * valops.c (value_ind): Remove lint code.
543 * valarith.c (value_x_binop, value_x_unop, value_equal)
544 (value_pos): Remove lint code.
545
546 2018-07-28 Tom de Vries <tdevries@suse.de>
547
548 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
549 with undefined upper bound as <optimized out>.
550
551 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
552
553 * gcore.in: Rename variable "name" to "prefix". Expand
554 "usage" text.
555
556 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
557
558 * windows-nat.c (windows_nat_target::create_inferior): Update to
559 call close() in global namespace.
560
561 2018-07-26 Tom Tromey <tom@tromey.com>
562
563 * dwarf-index-write.c (add_address_entry): Don't add objfile
564 offsets.
565 * dbxread.c (find_stab_function): Rename from
566 find_stab_function_addr. Return a bound_minimal_symbol.
567 (read_dbx_symtab): Use raw_text_low, raw_text_high.
568 Don't add objfile offsets.
569 (end_psymtab): Use raw_text_low, raw_text_high,
570 MSYMBOL_VALUE_RAW_ADDRESS.
571 (read_ofile_symtab): Update.
572 (process_one_symbol): Update.
573 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
574 offsets.
575 (dw2_relocate): Remove.
576 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
577 searching addrmap.
578 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
579 Update.
580 (process_psymtab_comp_unit_reader, add_partial_symbol)
581 (add_partial_subprogram, dwarf2_ranges_read): Update.
582 (load_partial_dies): Update.
583 (add_address_entry): Don't add objfile offsets.
584 (dwarf2_build_include_psymtabs): Update.
585 (create_addrmap_from_aranges): Don't add objfile offsets.
586 (dw2_find_pc_sect_compunit_symtab): Update.
587 * mdebugread.c (parse_symbol): Don't add objfile offsets.
588 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
589 Update.
590 (parse_partial_symbols): Don't add objfile offsets. Use
591 raw_text_low, raw_text_high. Update.
592 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
593 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
594 or call 'relocate' quick function. Clear psymbol_map.
595 * psympriv.h (struct partial_symbol) <address>: Add section
596 offset.
597 <set_unrelocated_address>: Rename from set_address.
598 <raw_text_low, raw_text_high>: New methods.
599 <text_low, text_high>: Add objfile parameter.
600 (add_psymbol_to_bcache): Add 'section' parameter. Call
601 set_unrelocated_address.
602 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
603 (find_pc_psymbol): Update.
604 (fixup_psymbol_section, relocate_psymtabs): Remove.
605 (dump_psymtab, psym_functions): Update.
606 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
607 parameter.
608 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
609 (start_psymtab_common): Update.
610 * symfile-debug.c (debug_qf_relocate): Remove.
611 (debug_sym_quick_functions): Update.
612 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
613 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
614 Update.
615
616 2018-07-26 Tom Tromey <tromey@redhat.com>
617
618 * dbxread.c (end_psymtab): Use text_high_valid and
619 text_low_valid.
620 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
621 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
622 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
623 Update comment.
624 <text_low_valid, text_high_valid>: New fields.
625 <set_text_low, set_text_high>: Update.
626 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
627
628 2018-07-26 Tom Tromey <tom@tromey.com>
629
630 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
631 Update.
632 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
633 textlow and texthigh fields.
634 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
635 Update.
636 * mdebugread.c (parse_lines, parse_partial_symbols)
637 (psymtab_to_symtab_1): Update.
638 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
639 Rename fields. Update comment. Now private.
640 <text_low, text_high, set_text_low, set_text_high>: New methods.
641 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
642 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
643 (start_psymtab_common, maintenance_info_psymtabs)
644 (maintenance_check_psymtabs): Update.
645 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
646 texthigh fields.
647 (scan_xcoff_symtab): Update.
648
649 2018-07-26 Tom Tromey <tromey@redhat.com>
650
651 * psympriv.h (struct partial_symbol) <unrelocated_address,
652 address, set_address>: New methods.
653 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
654 (fixup_psymbol_section, relocate_psymtabs): Update.
655 (print_partial_symbols): Add 'objfile' parameter. Update.
656 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
657 Update.
658
659 2018-07-26 Tom Tromey <tom@tromey.com>
660
661 * dwarf-index-write.c (write_psymbols, debug_names::insert)
662 (debug_names::write_psymbols): Update.
663 * psympriv.h (struct partial_symbol): Derive from
664 general_symbol_info.
665 <obj_section>: New method.
666 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
667 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
668 (find_pc_sect_psymbol, fixup_psymbol_section)
669 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
670 (print_partial_symbols, recursively_search_psymtabs)
671 (compare_psymbols, psymbol_hash, psymbol_compare)
672 (add_psymbol_to_bcache, maintenance_check_psymtabs)
673 (psymbol_name_matches, psym_fill_psymbol_map): Update.
674
675 2018-07-26 Tom Tromey <tromey@redhat.com>
676
677 * dbxread.c (end_psymtab): Remove dead code.
678
679 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
680
681 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
682 DWARF unwinders are disabled.
683 * dwarf2-frame.c: Add dwarf2read.h include.
684 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
685 disabled.
686 (dwarf2_frame_unwinders_enabled_p): Define.
687 (show_dwarf_unwinders_enabled_p): New function.
688 (_initialize_dwarf2_frame): Register switch to control DWARF
689 unwinder use.
690 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
691 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
692 (show_dwarf_cmdlist): Remove static keyword.
693 * dwarf2read.h (set_dwarf_cmdlist): Declare.
694 (show_dwarf_cmdlist): Declare.
695 * NEWS: Document new feature.
696
697 2018-07-26 Tom de Vries <tdevries@suse.de>
698
699 PR breakpoints/23366
700 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
701
702 2018-07-26 Tom de Vries <tdevries@suse.de>
703
704 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
705 DW_AT_count can't be translated to a dynamic prop.
706
707 2018-07-25 Tom de Vries <tdevries@suse.de>
708
709 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
710 try/catch.
711
712 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
713
714 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
715
716 2018-07-25 Joel Brobecker <brobecker@adacore.com>
717
718 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
719
720 2018-07-24 Keith Seitz <keiths@redhat.comt
721
722 PR symtab/23010
723 * dwarf2read.c (dw2_add_symbol_to_list): New function.
724 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
725 instead of add_symbol_to_list.
726 (read_file_scope): Call prepare_one_comp_unit before reading
727 any other DIEs.
728
729 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
730
731 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
732
733 2018-07-24 Tom Tromey <tom@tromey.com>
734
735 * utils.c (malloc, realloc, free): Don't declare.
736 * configure, config.in: Rebuild.
737 * configure.ac: Don't check for declarations of free, malloc, or
738 realloc.
739
740 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
741
742 * aarch64-linux-nat.c
743 (aarch64_linux_nat_target::stopped_data_address): Remove unused
744 variable.
745 * arm-linux-nat.c (fetch_regs): Likewise.
746 (store_regs): Likewise.
747 (fetch_vfp_regs): Likewise.
748 (store_vfp_regs): Likewise.
749 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
750 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
751 (arm_linux_nat_target::insert_watchpoint): Likewise.
752 (arm_linux_nat_target::remove_watchpoint): Likewise.
753 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
754 Likewise.
755 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
756 Likewise.
757 * ppc-linux-nat.c (fetch_register): Likewise.
758 (fetch_all_gp_regs): Likewise.
759 (fetch_ppc_registers): Likewise.
760 (store_all_gp_regs): Likewise.
761 (store_ppc_registers): Likewise.
762 (hwdebug_insert_point): Likewise.
763 (can_use_watchpoint_cond_accel): Likewise.
764 * remote-sim.c (gdb_os_write_stdout): Likewise.
765
766 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
767 Tom Tromey <tom@tromey.com>
768
769 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
770 test for it.
771 * configure: Rebuild.
772
773 2018-07-22 Tom Tromey <tom@tromey.com>
774
775 * regformats/regdat.sh: Define xmltarget_${name} inside
776 #ifndef IN_PROCESS_AGENT.
777
778 2018-07-22 Tom Tromey <tom@tromey.com>
779
780 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
781
782 2018-07-22 Tom Tromey <tom@tromey.com>
783
784 * symfile.c (reread_symbols): Notify iter, not objfile.
785
786 2018-07-22 Tom Tromey <tom@tromey.com>
787
788 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
789 Use arch_ops.
790 (ravenscar_thread_target::prepare_to_store): Likewise.
791
792 2018-07-22 Tom Tromey <tom@tromey.com>
793
794 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
795 unused variable. Call value_fetch_lazy when needed.
796 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
797 Remove unused variable. Call value_fetch_lazy when needed.
798
799 2018-07-22 Tom Tromey <tom@tromey.com>
800
801 * m32c-tdep.c (mark_dma): Return void.
802 (make_regs): Remove unused declarations.
803
804 2018-07-22 Tom Tromey <tom@tromey.com>
805
806 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
807 cmdscm_get_valid_command_smob_arg_unsafe for effect.
808 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
809 bkscm_get_valid_block_smob_arg_unsafe for effect.
810
811 2018-07-22 Tom Tromey <tom@tromey.com>
812
813 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
814 value_type.
815
816 2018-07-22 Tom Tromey <tom@tromey.com>
817
818 * windows-nat.c (saved_context): Conditionally define.
819 * remote.c (remote_target::remote_btrace_maybe_reopen):
820 Conditionally declare "warned".
821 * inflow.c (sigquit_ours): Conditionally define.
822 (new_tty): Move "tty" declaration inside #if.
823 * guile/guile.c (guile_datadir): Conditionally define.
824 * charset.c (set_be_le_names): Move some declarations inside #if.
825 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
826 #if.
827 (parse_xml_btrace_conf): Likewise.
828
829 2018-07-22 Tom Tromey <tom@tromey.com>
830
831 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
832
833 2018-07-22 Tom Tromey <tom@tromey.com>
834
835 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
836 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
837 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
838 * buildsym-legacy.c (get_macro_table): Remove unused variable.
839 * stack.c (frame_apply_level_command): Remove unused variable.
840 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
841 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
842 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
843 unused variable.
844 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
845 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
846 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
847 variable.
848 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
849 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
850 variable.
851 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
852 Remove unused variable.
853 * cli/cli-script.c (recurse_read_control_structure): Remove unused
854 variable.
855 * common/tdesc.c (print_xml_feature::visit): Remove unused
856 variable.
857 * compile/compile-object-load.c (store_regs): Remove unused
858 variables.
859 * complaints.c (clear_complaints): Remove unused variable.
860 * corelow.c (core_target_open): Remove unused variable.
861 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
862 variable.
863 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
864 variable.
865 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
866 variable.
867 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
868 variable.
869 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
870 variable.
871 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
872 variable.
873 * ia64-tdep.c (examine_prologue): Remove unused variable.
874 * infcall.c (run_inferior_call): Remove unused variable.
875 * inferior.c (exit_inferior): Remove unused variable.
876 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
877 * linespec.c (decode_line_2): Remove unused variable.
878 * linux-nat.c (super_close): Remove.
879 * linux-tdep.c (linux_info_proc): Remove unused variable.
880 * mi/mi-main.c (mi_execute_command): Remove unused variable.
881 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
882 Remove unused variable.
883 * parse.c (find_minsym_type_and_address): Remove unused variable.
884 * printcmd.c (info_symbol_command, printf_floating): Remove unused
885 variable.
886 * python/py-breakpoint.c (bppy_set_commands): Remove unused
887 variable.
888 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
889 variables.
890 * record-btrace.c (record_btrace_target::store_registers): Remove
891 unused variable.
892 (cmd_show_record_btrace_cpu): Remove unused variable.
893 * riscv-tdep.c (riscv_register_reggroup_p)
894 (riscv_push_dummy_call, riscv_return_value): Remove unused
895 variable.
896 * rust-exp.y (literal): Remove unused variable.
897 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
898 unused variable.
899 <STRUCTOP_ANONYMOUS>: Likewise.
900 * s390-linux-tdep.c (s390_linux_init_abi_31)
901 (s390_linux_init_abi_64): Remove unused variable.
902 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
903 (file_select_thread, net_windows_open, _initialize_ser_windows):
904 Remove unused variables.
905 * symtab.c (find_pc_sect_line): Remove unused variable.
906 * target-memory.c (compute_garbled_blocks): Remove unused
907 variable.
908 (target_write_memory_blocks): Remove unused variable.
909 * target.c (target_stack::unpush): Remove unused variables.
910 * tracepoint.c (start_tracing, all_tracepoint_actions)
911 (merge_uploaded_trace_state_variables)
912 (print_one_static_tracepoint_marker): Remove unused variable.
913 * unittests/basic_string_view/element_access/char/1.cc (test01):
914 Remove unused variable.
915 * windows-nat.c (windows_continue, windows_add_all_dlls)
916 (do_initial_windows_stuff, windows_nat_target::create_inferior):
917 Remove unused variables.
918
919 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
920
921 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
922 attr_profile in HAVE_ELF.
923 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
924 HAVE_ELF.
925
926 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
927
928 * frame.c (frame_register_unwind): Change parameter name.
929 (frame_unwind_register): Likewise.
930 (frame_unwind_register_value): Likewise.
931 (frame_unwind_register_signed): Likewise.
932 (frame_unwind_register_unsigned): Likewise.
933 * frame.h (frame_register_unwind): Likewise.
934 (frame_unwind_register): Likewise.
935 (frame_unwind_register_value): Likewise.
936 (frame_unwind_register_signed): Likewise.
937 (frame_unwind_register_unsigned): Likewise.
938 (frame_unwind_arch): Likewise.
939
940 2018-07-20 Maciej W. Rozycki <macro@mips.com>
941
942 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
943 ISA maintenance.
944
945 2018-07-20 Maciej W. Rozycki <macro@mips.com>
946
947 * mips-linux-nat.c (mips_linux_nat_target::read_description):
948 Call `get_ptrace_pid' rather than extracting the ptrace PID by
949 hand.
950
951 2018-07-20 Keith Seitz <keiths@redhat.com>
952
953 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
954 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
955 m_compunit_symtab, m_language>: Add "m_" prefix.
956 Update all uses.
957 * buildsym.c: Update all uses.
958
959 2018-07-20 Tom Tromey <tom@tromey.com>
960
961 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
962 * buildsym.h (record_line_ftype): Remove typedef.
963
964 2018-07-20 Tom Tromey <tom@tromey.com>
965
966 * buildsym-legacy.h (augment_type_symtab): Don't declare.
967 (end_expandable_symtab): Likewise.
968 (end_symtab_get_static_block): Likewise.
969 (end_symtab_from_static_block): Likewise.
970 * buildsym-legacy.c (augment_type_symtab): Remove.
971 (end_expandable_symtab): Remove.
972 (end_symtab_get_static_block): Remove.
973 (end_symtab_from_static_block): Remove.
974
975 2018-07-20 Tom Tromey <tom@tromey.com>
976
977 * dwarf2read.c: Include buildsym.h.
978 (struct dwarf2_cu) <builder>: New method.
979 (fixup_go_packaging): Update.
980 (process_full_comp_unit, process_full_type_unit): Update. Don't
981 use scoped_free_pendings.
982 (using_directives): Add "cu" parameter, remove "language".
983 (read_import_statement, setup_type_unit_groups, )
984 (read_func_scope, read_lexical_block_scope)
985 (dwarf2_record_block_ranges, read_namespace): Update.
986 (lnp_state_machine::lnp_state_machine): Add cu parameter.
987 (lnp_state_machine::handle_end_sequence): Update.
988 (class lnp_state_machine) <m_cu>: New member.
989 <m_record_line_callback>: Remove.
990 <m_currently_recording_lines>: New member.
991 (lnp_state_machine::handle_set_file): Update.
992 (noop_record_line): Remove.
993 (dwarf_record_line_p): Add cu parameter.
994 (dwarf_record_line_1, dwarf_finish_line): Likewise.
995 (lnp_state_machine::record_line)
996 (lnp_state_machine::lnp_state_machine)
997 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
998 (dwarf_decode_lines): Update.
999 (dwarf2_start_subfile): Add cu parameter.
1000 (dwarf2_start_symtab, new_symbol): Update.
1001 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
1002 Remove dwarf2_per_objfile parameter.
1003 (dwarf_decode_macros): Update.
1004
1005 2018-07-20 Tom Tromey <tom@tromey.com>
1006
1007 * stabsread.c (define_symbol): Update.
1008 * buildsym-legacy.h (get_buildsym_compunit): Declare.
1009 * dwarf2read.c (new_symbol): Update.
1010 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
1011 * cp-namespace.c: Include buildsym.h.
1012 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
1013 * buildsym-legacy.c (get_buildsym_compunit): New function.
1014
1015 2018-07-20 Tom Tromey <tom@tromey.com>
1016
1017 * xcoffread.c: Include buildsym-legacy.h.
1018 * windows-nat.c: Include buildsym-legacy.h.
1019 * stabsread.c: Include buildsym-legacy.h.
1020 * mdebugread.c: Include buildsym-legacy.h.
1021 * buildsym-legacy.h: New file.
1022 * buildsym-legacy.c: New file, from buildsym.c.
1023 * go32-nat.c: Include buildsym-legacy.h.
1024 * dwarf2read.c: Include buildsym-legacy.h.
1025 * dbxread.c: Include buildsym-legacy.h.
1026 * cp-namespace.c: Include buildsym-legacy.h.
1027 * coffread.c: Include buildsym-legacy.h.
1028 * buildsym.h: Move some contents to buildsym-legacy.h.
1029 * buildsym.c: Include buildsym-legacy.h. Move many functions to
1030 buildsym-legacy.c.
1031 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
1032
1033 2018-07-20 Tom Tromey <tom@tromey.com>
1034
1035 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
1036 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
1037 (buildsym_compunit::buildsym_compunit)
1038 (buildsym_compunit::~buildsym_compunit)
1039 (buildsym_compunit::get_macro_table): Define.
1040
1041 2018-07-20 Tom Tromey <tom@tromey.com>
1042
1043 * buildsym.c (reset_symtab_globals): Remove.
1044 (buildsym_compunit::end_symtab_from_static_block): Update.
1045 (buildsym_compunit::augment_type_symtab): Update.
1046 (end_symtab_from_static_block): Call free_buildsym_compunit.
1047 (augment_type_symtab, end_symtab, end_expandable_symtab):
1048 Likewise.
1049
1050 2018-07-20 Tom Tromey <tom@tromey.com>
1051
1052 * arch-utils.c: Do not include buildsym.h.
1053 * mipsread.c: Do not include buildsym.h.
1054 * machoread.c: Do not include buildsym.h.
1055 * elfread.c: Do not include buildsym.h.
1056
1057 2018-07-20 Tom Tromey <tom@tromey.com>
1058
1059 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
1060 initialization.
1061 (buildsym_compunit): Add new constructor.
1062 (struct buildsym_compunit) <get_last_source_file, finish_block,
1063 record_block_range, start_subfile, patch_subfile_names,
1064 push_subfile, pop_subfile, record_line, get_compunit_symtab,
1065 set_last_source_start_addr, get_last_source_start_addr,
1066 get_local_using_directives, set_local_using_directives,
1067 get_global_using_directives, outermost_context_p,
1068 get_current_context_stack, get_context_stack_depth,
1069 get_current_subfile, get_local_symbols, get_file_symbols,
1070 get_global_symbols, record_debugformat, record_producer,
1071 push_context, pop_context, end_symtab_get_static_block,
1072 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
1073 New public methods.
1074 <record_pending_block, finish_block_internal, make_blockvector,
1075 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
1076 private methods.
1077 Update all users.
1078
1079 2018-05-22 Tom Tromey <tom@tromey.com>
1080
1081 * buildsym.c (record_pending_block): Move earlier. Remove objfile
1082 parameter.
1083 (finish_block_internal): Update.
1084
1085 2018-07-20 Tom Tromey <tom@tromey.com>
1086
1087 * buildsym.c (record_pending_block): Move earlier. Remove objfile
1088 parameter.
1089 (finish_block_internal): Update.
1090
1091 2018-07-20 Tom Tromey <tom@tromey.com>
1092
1093 * buildsym.h (EXTERN): Don't define or undef.
1094 * buildsym.c (EXTERN): Don't define.
1095
1096 2018-07-20 Tom Tromey <tom@tromey.com>
1097
1098 * buildsym.c: Remove TODO comment.
1099
1100 2018-07-20 Tom Tromey <tom@tromey.com>
1101
1102 * coffread.c (coff_symtab_read): Update.
1103 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
1104 (xcoff_new_init): Update.
1105 * mipsread.c (mipscoff_new_init): Update.
1106 * mdebugread.c (mdebug_build_psymtabs): Update.
1107 * elfread.c (elf_new_init): Update.
1108 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1109 Update.
1110 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
1111 (coffstab_build_psymtabs, elfstab_build_psymtabs)
1112 (stabsect_build_psymtabs): Update.
1113 * buildsym.h (buildsym_init): Don't declare.
1114 * buildsym.c: Update comment.
1115 (prepare_for_building): Remove.
1116 (start_symtab, restart_symtab): Update.
1117 (reset_symtab_globals): Update comment.
1118 (buildsym_init): Remove.
1119
1120 2018-07-20 Tom Tromey <tom@tromey.com>
1121
1122 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
1123 * stabsread.c (patch_block_stabs, define_symbol, read_type)
1124 (read_enum_type, common_block_start, common_block_end)
1125 (cleanup_undefined_types_1, finish_global_stabs): Update.
1126 * mdebugread.c (psymtab_to_symtab_1): Update.
1127 * dwarf2read.c (fixup_go_packaging, read_func_scope)
1128 (read_lexical_block_scope, new_symbol): Update.
1129 * dbxread.c (process_one_symbol): Update.
1130 * coffread.c (coff_symtab_read, process_coff_symbol)
1131 (coff_read_enum_type): Update.
1132 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
1133 declare.
1134 (get_local_symbols, get_file_symbols, get_global_symbols): New
1135 functions.
1136 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
1137 m_global_symbols.
1138 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
1139 (~scoped_free_pendings): Update.
1140 (finish_block, prepare_for_building, reset_symtab_globals)
1141 (end_symtab_get_static_block, end_symtab_with_blockvector)
1142 (augment_type_symtab, push_context): Update.
1143 (get_local_symbols, get_file_symbols, get_global_symbols): New
1144 functions.
1145 (buildsym_init): Update.
1146
1147 2018-07-20 Tom Tromey <tom@tromey.com>
1148
1149 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
1150 (process_full_type_unit): Likewise.
1151 (dwarf2_start_symtab): Set list_in_scope.
1152
1153 2018-07-20 Tom Tromey <tom@tromey.com>
1154
1155 * dwarf2read.c (process_psymtab_comp_unit_reader)
1156 (build_type_psymtabs_reader): Do not set list_in_scope.
1157
1158 2018-07-20 Tom Tromey <tom@tromey.com>
1159
1160 * buildsym.c (free_pendings): Remove.
1161 (add_symbol_to_list, scoped_free_pendings)
1162 (finish_block_internal, buildsym_init): Update.
1163
1164 2018-07-20 Tom Tromey <tom@tromey.com>
1165
1166 * xcoffread.c (read_xcoff_symtab): Update.
1167 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
1168 Update.
1169 * dbxread.c (process_one_symbol): Update.
1170 * coffread.c (coff_symtab_read): Update.
1171 * buildsym.h (finish_block): Update.
1172 * buildsym.c (finish_block): Remove "listhead" argument.
1173 (end_symtab_get_static_block): Update.
1174
1175 2018-07-20 Tom Tromey <tom@tromey.com>
1176
1177 * buildsym.h (class scoped_free_pendings): Remove constructor.
1178 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
1179 method.
1180 <m_pending_block_obstack, m_pending_blocks>: New members.
1181 (pending_block_obstack, pending_blocks): Remove.
1182 (scoped_free_pendings::scoped_free_pendings): Default.
1183 (~scoped_free_pendings): Update.
1184 (free_pending_blocks): Remove.
1185 (finish_block_internal, record_pending_block, make_blockvector)
1186 (end_symtab_get_static_block, augment_type_symtab, push_context)
1187 (buildsym_init): Update.
1188
1189 2018-07-20 Tom Tromey <tom@tromey.com>
1190
1191 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
1192 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
1193 members.
1194 (pending_addrmap, pending_addrmap_obstack)
1195 (pending_addrmap_interesting): Remove.
1196 (scoped_free_pendings, record_block_range, make_blockvector)
1197 (prepare_for_building, reset_symtab_globals, buildsym_init):
1198 Update.
1199
1200 2018-07-20 Tom Tromey <tom@tromey.com>
1201
1202 * xcoffread.c (process_linenos): Update.
1203 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
1204 * mdebugread.c (psymtab_to_symtab_1): Update.
1205 * dwarf2read.c (setup_type_unit_groups)
1206 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
1207 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
1208 * dbxread.c (process_one_symbol): Update.
1209 * coffread.c (coff_symtab_read, enter_linenos)
1210 (process_coff_symbol): Update.
1211 * buildsym.h (current_subfile): Don't declare.
1212 (get_current_subfile): Declare.
1213 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
1214 member.
1215 (start_subfile, free_buildsym_compunit, push_subfile)
1216 (prepare_for_building, start_symtab): Update.
1217 (get_current_subfile): New function.
1218
1219 2018-07-20 Tom Tromey <tom@tromey.com>
1220
1221 * coffread.c (coff_symtab_read): Update.
1222 * xcoffread.c (read_xcoff_symtab): Update.
1223 * dwarf2read.c (new_symbol): Update.
1224 (read_func_scope, read_lexical_block_scope): Update.
1225 * dbxread.c (process_one_symbol): Update.
1226 * buildsym.h (context_stack, context_stack_depth): Don't declare.
1227 (outermost_context_p): Remove macro.
1228 (outermost_context_p, get_current_context_stack)
1229 (get_context_stack_depth): Declare.
1230 (pop_context): Return struct context_stack.
1231 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
1232 member.
1233 (context_stack_size): Remove.
1234 (INITIAL_CONTEXT_STACK_SIZE): Remove.
1235 (prepare_for_building, end_symtab_get_static_block)
1236 (augment_type_symtab, push_context): Update.
1237 (pop_context): Return struct context_stack.
1238 (outermost_context_p, get_current_context_stack)
1239 (get_context_stack_depth): New functions.
1240 (buildsym_init): Update.
1241
1242 2018-07-20 Tom Tromey <tom@tromey.com>
1243
1244 * rust-exp.y: Now a pure parser. Update all rules.
1245 (%union): Move earlier.
1246 (current_parser, work_obstack): Remove globals.
1247 (rust_parser, ~rust_parser): Update.
1248 (class rust_parser) <copy_name, concat3, crate_name, super_name,
1249 lex_character, lex_number, lex_string, lex_identifier,
1250 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
1251 convert_name, convert_params_to_expression,
1252 convert_ast_to_expression, ast_basic_type, ast_operation,
1253 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
1254 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
1255 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
1256 ast_array_type, ast_slice_type, ast_reference_type,
1257 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
1258 (rust_parse): Update.
1259 (rustyyerror, rustyylex): Add parser parameter.
1260 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
1261 (rust_lex_stringish_test, rust_lex_test_sequence)
1262 (rust_lex_test_trailing_dot, rust_lex_test_completion)
1263 (rust_lex_test_push_back, rust_lex_tests): Update.
1264
1265 2018-07-19 Pedro Alves <palves@redhat.com>
1266
1267 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
1268 gdb::unique_xmalloc_ptr.
1269 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
1270 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
1271 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
1272 copy-initialization.
1273 * guile/scm-pretty-print.c (ppscm_print_children): Use
1274 gdb::unique_xmalloc_ptr instead of cleanups.
1275 (gdbscm_apply_val_pretty_printer): Remove cleanups.
1276 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
1277 gdb::unique_xmalloc_ptr.
1278 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1279 Adjust to use gdb::unique_xmalloc_ptr.
1280 * guile/scm-utils.c (extract_arg): Adjust.
1281 * guile/scm-value.c (gdbscm_value_field): Adjust to use
1282 gdb::unique_xmalloc_ptr instead of a cleanup.
1283
1284 2018-07-19 Tom Tromey <tom@tromey.com>
1285
1286 * utils.c (do_value_free_to_mark)
1287 (make_cleanup_value_free_to_mark): Remove.
1288 * utils.h (make_cleanup_value_free_to_mark): Remove.
1289
1290 2018-07-19 Pedro Alves <palves@redhat.com>
1291
1292 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
1293 forwarding reference.
1294
1295 2018-07-18 Pedro Alves <palves@redhat.com>
1296
1297 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
1298 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
1299 cleanup.
1300
1301 2018-07-18 Pedro Alves <palves@redhat.com>
1302
1303 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
1304 exceptions.
1305 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
1306 (gdbscm_wrap): New.
1307 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
1308 directly instead of a cleanup.
1309 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
1310 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
1311 (vlscm_binop_gdbthrow): New, factored out from ...
1312 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
1313 (vlscm_rich_compare): Use gdbscm_wrap.
1314 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
1315 instead of a cleanup.
1316 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
1317 cleanup.
1318 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1319 Use xfree directly instead of a cleanup.
1320 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
1321 Adjust to use gdbscm_wrap and scoped_value_mark.
1322 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
1323 (gdbscm_value_address, gdbscm_value_dereference)
1324 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
1325 scoped_value_mark.
1326 (gdbscm_value_dynamic_type): Use scoped_value_mark.
1327 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
1328 scoped_value_mark.
1329 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
1330 gdbscm_wrap and scoped_value_mark.
1331 (gdbscm_value_to_string): Use xfree directly instead of a
1332 cleanup. Move 'buffer' unique_ptr to TRY scope.
1333 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
1334 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
1335 scoped_value_mark.
1336 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
1337 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
1338 scoped_value_mark.
1339 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
1340 gdbscm_wrap.
1341
1342 2018-07-18 Tom de Vries <tdevries@suse.de>
1343
1344 * findvar.c (default_read_var_value): Also resolve dynamic type for
1345 LOC_OPTIMIZED_OUT vars.
1346
1347 2018-07-18 Maciej W. Rozycki <macro@mips.com>
1348
1349 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
1350 decoding.
1351
1352 2018-07-17 Tom Tromey <tom@tromey.com>
1353
1354 * guile/scm-param.c (pascm_set_func, pascm_show_func)
1355 (compute_enum_list, pascm_set_param_value_x)
1356 (gdbscm_parameter_value): Update.
1357 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
1358 (gdbscm_scm_to_host_string): Update.
1359 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
1360 Update.
1361 * guile/scm-cmd.c (cmdscm_add_completion): Update.
1362 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
1363 * guile/scm-string.c (gdbscm_scm_to_string): Return
1364 unique_xmalloc_ptr.
1365 (gdbscm_scm_to_host_string): Likewise.
1366
1367 2018-07-17 Tom Tromey <tom@tromey.com>
1368
1369 * guile/guile.c (gdbscm_eval_from_control_command): Update.
1370 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
1371 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
1372 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
1373 unique_xmalloc_ptr.
1374
1375 2018-07-17 Tom Tromey <tom@tromey.com>
1376
1377 * guile/scm-param.c (pascm_signal_setshow_error): Update.
1378 * guile/guile-internal.h (gdbscm_exception_message_to_string):
1379 Update.
1380 * guile/scm-cmd.c (cmdscm_function): Update.
1381 * guile/scm-pretty-print.c
1382 (ppscm_print_exception_unless_memory_error): Update.
1383 * guile/scm-exception.c (gdbscm_exception_message_to_string):
1384 Return unique_xmalloc_ptr.
1385
1386 2018-07-17 Tom Tromey <tom@tromey.com>
1387
1388 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
1389 Use string_printf.
1390
1391 2018-07-17 Jim Wilson <jimw@sifive.com>
1392
1393 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
1394 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
1395 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
1396 unecessary braces after EF_RISCV_RVC test. Delete call to
1397 set_gdbarch_decr_pc_after_break.
1398
1399 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
1400 RISCV_LAST_FP_REGNUM + 1.
1401 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
1402
1403 2018-07-17 Tom Tromey <tom@tromey.com>
1404
1405 * configure.ac: Remove --disable-gdbcli.
1406 * configure: Rebuild.
1407 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
1408 (SUBDIR_CLI_CFLAGS): Remove.
1409 (SFILES): Use SUBDIR_CLI_SRCS.
1410 (COMMON_OBS): Use SUBDIR_CLI_OBS.
1411
1412 2018-07-17 Tom Tromey <tom@tromey.com>
1413
1414 PR gdb/18624:
1415 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
1416
1417 2018-07-16 Jim Wilson <jimw@sifive.com>
1418
1419 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
1420
1421 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1422
1423 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
1424 variable.
1425 (libunwind_frame_sniffer): Likewise.
1426 (libunwind_frame_prev_register): Likewise.
1427 (libunwind_sigtramp_frame_sniffer): Likewise.
1428 * ia64-tdep.c (ia64_access_reg): Likewise.
1429 (ia64_access_rse_reg): Likewise.
1430 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
1431 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
1432
1433 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1434
1435 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
1436
1437 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1438
1439 * remote-sim.c (gdbsim_target::close,
1440 gdbsim_target::mourn_inferior): Remove unused variables.
1441
1442 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
1443
1444 * ia64-tdep.c (ktab_buf): New global.
1445 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
1446 (get_kernel_table): Adjust.
1447
1448 2018-07-16 Tom Tromey <tom@tromey.com>
1449
1450 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
1451 * dwarf2read.c (using_directives, new_symbol): Use
1452 outermost_context_p.
1453 * dbxread.c (process_one_symbol): Use outermost_context_p.
1454 * coffread.c (coff_symtab_read): Use outermost_context_p.
1455
1456 2018-07-16 Tom Tromey <tom@tromey.com>
1457
1458 * dwarf2read.c (using_directives, read_func_scope)
1459 (read_lexical_block_scope): Update.
1460 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1461 * buildsym.h (local_using_directives, global_using_directives):
1462 Don't declare.
1463 (get_local_using_directives, set_local_using_directives)
1464 (get_global_using_directives): Declare.
1465 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
1466 m_global_using_directives>: New members.
1467 (finish_block_internal, prepare_for_building)
1468 (reset_symtab_globals, end_symtab_get_static_block)
1469 (push_context): Update.
1470 (get_local_using_directives, set_local_using_directives)
1471 (get_global_using_directives): New functions.
1472 (buildsym_init): Update.
1473
1474 2018-07-16 Tom Tromey <tom@tromey.com>
1475
1476 * xcoffread.c (xcoff_initial_scan): Don't call
1477 free_pending_blocks.
1478 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
1479 * buildsym.h (class scoped_free_pendings): Add constructor.
1480 (free_pending_blocks): Don't declare.
1481 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
1482 (free_pending_blocks): Now static.
1483
1484 2018-07-16 Tom Tromey <tom@tromey.com>
1485
1486 * buildsym.h (push_subfile, pop_subfile): Update declarations.
1487 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
1488 member.
1489 (struct subfile_stack): Remove.
1490 (subfile_stack): Remove.
1491 (push_subfile, pop_subfile, buildsym_init): Update.
1492
1493 2018-07-16 Tom Tromey <tom@tromey.com>
1494
1495 * buildsym.c (push_subfile): Use gdb_assert.
1496 (pop_subfile): Use gdb_assert.
1497
1498 2018-07-16 Tom Tromey <tom@tromey.com>
1499
1500 * buildsym.h (merge_symbol_lists): Remove.
1501 * buildsym.c (merge_symbol_lists): Remove.
1502
1503 2018-07-16 Tom Tromey <tom@tromey.com>
1504
1505 * stabsread.c (scan_file_globals): Update comment.
1506 * stabsread.h (scan_file_globals): Move from buildsym.h.
1507 * buildsym.h (scan_file_globals): Move to stabsread.h.
1508
1509 2018-07-16 Tom Tromey <tom@tromey.com>
1510
1511 * xcoffread.c (xcoff_new_init): Update.
1512 * mipsread.c (mipscoff_new_init): Update.
1513 * mdebugread.c (mdebug_build_psymtabs): Update.
1514 * elfread.c (elf_new_init): Update.
1515 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
1516 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
1517 * buildsym.h (buildsym_new_init): Don't declare.
1518 * buildsym.c (buildsym_new_init): Remove.
1519
1520 2018-07-16 Tom Tromey <tom@tromey.com>
1521
1522 * stabsread.h (within_function): Move from buildsym.h.
1523 * stabsread.c (start_stabs): Clear within_function.
1524 * coffread.c (coff_start_symtab): Clear within_function.
1525 * buildsym.h (within_function): Move to stabsread.h.
1526 * buildsym.c (prepare_for_building): Update.
1527
1528 2018-07-16 Tom Tromey <tom@tromey.com>
1529
1530 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
1531 * dwarf2read.c (dwarf2_start_symtab): Don't set
1532 processing_gcc_compilation.
1533 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
1534
1535 2018-07-16 Tom Tromey <tom@tromey.com>
1536
1537 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
1538 (next_symbol_text_func): Move from buildsym.h.
1539 * stabsread.c (hashname): Move from buildsym.c.
1540 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
1541 (next_symbol_text_func, hashname): Move to stabsread.h.
1542 * buildsym.c: Don't include bcache.h
1543 (hashname): Move to stasbread.c.
1544
1545 2018-07-16 Tom Tromey <tom@tromey.com>
1546
1547 * buildsym.h (context_stack_size): Don't declare.
1548 * buildsym.c (context_stack_size): New global.
1549
1550 2018-07-16 Tom Tromey <tom@tromey.com>
1551
1552 * dbxread.c (processing_acc_compilation): New global.
1553 * buildsym.h (processing_acc_compilation): Don't declare.
1554
1555 2018-07-16 Tom Tromey <tom@tromey.com>
1556
1557 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
1558 * dbxread.c (read_ofile_symtab): Update.
1559 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
1560 * buildsym.h (last_source_start_addr): Remove.
1561 (set_last_source_start_addr, get_last_source_start_addr):
1562 Declare.
1563 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
1564 parameter.
1565 (struct buildsym_compunit) <m_last_source_start_addr>: New
1566 member.
1567 (prepare_for_building): Remove start_addr parameter.
1568 (start_symtab, restart_symtab, end_symtab_get_static_block)
1569 (end_symtab_with_blockvector): Update.
1570 (set_last_source_start_addr, get_last_source_start_addr): New
1571 functions.
1572
1573 2018-07-16 Tom Tromey <tom@tromey.com>
1574
1575 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
1576 member.
1577 (have_line_numbers): Remove.
1578 (record_line, prepare_for_building, end_symtab_get_static_block)
1579 (augment_type_symtab): Update.
1580
1581 2018-07-16 Tom Tromey <tom@tromey.com>
1582
1583 * buildsym.c (~buildsym_compunit): Free the macro table.
1584 (struct buildsym_compunit) <get_macro_table, release_macros>: New
1585 methods.
1586 <m_pending_macros>: New member.
1587 (pending_macros): Remove.
1588 (~scoped_free_pendings, get_macro_table, prepare_for_building)
1589 (reset_symtab_globals, end_symtab_get_static_block)
1590 (end_symtab_with_blockvector, augment_type_symtab)
1591 (buildsym_init): Update.
1592
1593 2018-07-16 Tom Tromey <tom@tromey.com>
1594
1595 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
1596 parameter.
1597 (buildsym_compunit::set_last_source_file): New method.
1598 <m_last_source_file>: New member.
1599 (prepare_for_building): Remove "name" parameter.
1600 (start_symtab, restart_symtab, reset_symtab_globals): Update.
1601 (last_source_file): Remove.
1602 (set_last_source_file, get_last_source_file): Update.
1603
1604 2018-07-16 Tom Tromey <tom@tromey.com>
1605
1606 * buildsym.c (prepare_for_building): Add assert.
1607
1608 2018-07-16 Tom Tromey <tom@tromey.com>
1609
1610 * buildsym.c (~buildsym_compunit): Update.
1611 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
1612 (start_subfile, patch_subfile_names)
1613 (end_symtab_with_blockvector): Update.
1614
1615 2018-07-16 Tom Tromey <tom@tromey.com>
1616
1617 * buildsym.c (struct buildsym_compunit): Add constructor,
1618 destructor, initializers.
1619 (start_buildsym_compunit): Remove.
1620 (free_buildsym_compunit): Use "delete".
1621 (start_symtab, restart_symtab): Use "new".
1622
1623 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
1624
1625 * symfile.c (set_objfile_default_section_offset): Remove struct
1626 keyword.
1627
1628 2018-07-14 Stafford Horne <shorne@gmail.com>
1629
1630 * (Responsible Maintainers): Add myself as or1k maintainer.
1631
1632 2018-07-13 Tom Tromey <tom@tromey.com>
1633
1634 * symfile.c (set_objfile_default_section_offset): Use extra braces
1635 around initializer.
1636
1637 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1638
1639 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
1640 non-branching basr.
1641
1642 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1643
1644 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1645 unittests/cli-utils-selftests.c
1646 * unittests/cli-utils-selftests.c: New file.
1647
1648 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1649
1650 * NEWS: Mention new commands. Mention change to 'thread apply'.
1651
1652 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1653
1654 * thread.c (thr_try_catch_cmd): New function.
1655 (thread_apply_all_command): Handle qcs flags.
1656 (thread_apply_command): Handle qcs flags.
1657 (taas_command): New function.
1658 (tfaas_command): New function.
1659 (_initialize_thread): Update to setup the new commands 'taas
1660 and 'tfaas'. Change doc string for 'thread apply'.
1661
1662 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1663
1664 * stack.c: (trailing_outermost_frame): New function, mostly
1665 extracted from backtrace_command_1.
1666 (leading_innermost_frame): New function.
1667 (backtrace_command_1): Update to call trailing_outermost_frame.
1668 (frame_apply_command_count): New function.
1669 (frame_apply_level_command): New function.
1670 (frame_apply_all_command): New function.
1671 (frame_apply_command): New function.
1672 (faas_command): New function.
1673 (frame_cmd_list): New variable.
1674 (_initialize_stack): Update to setup the new commands 'frame apply'
1675 and 'faas'.
1676
1677 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1678
1679 * cli-utils.c (number_or_range_parser::get_number): Only handle
1680 numbers or convenience var as numbers.
1681 (parse_flags): New function.
1682 (parse_flags_qcs): New function.
1683 (number_or_range_parser::finished): Ensure parsing end is detected
1684 before end of string.
1685 * cli-utils.h (parse_flags): New function.
1686 (parse_flags_qcs): New function.
1687 (number_or_range_parser): Remove m_finished bool.
1688 (number_or_range_parser::skip_range): Set m_in_range to false.
1689
1690 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
1691
1692 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
1693 on Windows.
1694
1695 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1696 Jan Kratochvil <jan.kratochvil@redhat.com>
1697 Paul Fertser <fercerpav@gmail.com>
1698 Tsutomu Seki <sekiriki@gmail.com>
1699 Pedro Alves <palves@redhat.com>
1700
1701 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1702 'unittests/parse-connection-spec-selftests.c'.
1703 (COMMON_SFILES): Add 'common/netstuff.c'.
1704 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
1705 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
1706 * common/netstuff.c: New file.
1707 * common/netstuff.h: New file.
1708 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
1709 (wait_for_connect): Update comment. New parameter
1710 'gdb::optional<int> sock' instead of 'struct serial *scb'.
1711 Use 'sock' directly instead of 'scb->fd'.
1712 (try_connect): New function, with code from 'net_open'.
1713 (net_open): Rewrite main loop to deal with multiple
1714 sockets/addresses. Handle IPv6-style hostnames; implement
1715 support for IPv6 connections.
1716 * unittests/parse-connection-spec-selftests.c: New file.
1717
1718 2018-07-11 Pedro Alves <palves@redhat.com>
1719
1720 PR gdb/23377
1721 * remote.c (remote_target::remote_detach_pid): Call
1722 set_current_process.
1723
1724 2018-07-11 Pedro Alves <palves@redhat.com>
1725
1726 * h8300-tdep.c (h8300_gdbarch_init): Remove
1727 set_gdbarch_ecoff_reg_to_regnum calls.
1728
1729 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1730
1731 PR c++/23373
1732 * c-typeprint.c (c_type_print_base_struct_union): Don't print
1733 offsets/sizes for static members of a class/struct.
1734
1735 2018-07-11 Alan Hayward <alan.hayward@arm.com>
1736
1737 * target-descriptions.c (tdesc_register_bitsize): Rename.
1738 * target-descriptions.h (tdesc_register_bitsize): Likewise.
1739 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
1740 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
1741
1742 2018-07-10 Tom Tromey <tom@tromey.com>
1743
1744 * breakpoint.c (moribund_locations): Now static and a
1745 std::vector.
1746 (breakpoint_init_inferior, moribund_breakpoint_here_p)
1747 (build_bpstat_chain, update_global_location_list)
1748 (breakpoint_retire_moribund): Update.
1749 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
1750 VEC.
1751
1752 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
1753
1754 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
1755 (riscv_register_reggroup_p): Use new function, remove unneeded
1756 parenthesis.
1757 (riscv_push_dummy_call): Extend assert to compare against xlen or
1758 flen based on register type.
1759
1760 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
1761
1762 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
1763
1764 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
1765
1766 * remote.c (show_hardware_watchpoint_limit): New function.
1767 (show_hardware_watchpoint_length_limit): New function.
1768 (show_hardware_breakpoint_limit): New function.
1769 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
1770 where appropriate, update help text.
1771
1772 2018-07-09 Tom Tromey <tom@tromey.com>
1773
1774 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
1775 (CLIBS): Don't mention NAT_CLIBS.
1776
1777 2018-07-09 Tom Tromey <tom@tromey.com>
1778
1779 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
1780 (LIBGDB_OBS, clean mostlyclean): Update.
1781 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
1782
1783 2018-07-09 Tom Tromey <tom@tromey.com>
1784
1785 * Makefile.in (%.c: %.y): Use ECHO_YACC.
1786 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
1787 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
1788
1789 2018-07-09 Tom Tromey <tom@tromey.com>
1790
1791 * Makefile.in (ALLDEPFILES): Remove exec.c.
1792 (COMMON_OBS): Remove exec.o.
1793 (COMMON_SFILES): Add exec.c.
1794
1795 2018-07-09 Tom Tromey <tom@tromey.com>
1796
1797 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
1798
1799 2018-07-09 Tom Tromey <tom@tromey.com>
1800
1801 * Makefile.in (clean mostlyclean): Remove stamp-version.
1802 (version.c): Depend on stamp-version.
1803 (stamp-version): New rule, from version.c rule.
1804
1805 2018-07-09 Tom Tromey <tom@tromey.com>
1806
1807 * Makefile.in (init.c): Depend on stamp-init.
1808 (stamp-init): New rule, from init.c rule.
1809 (clean mostlyclean): Remove stamp-init.
1810
1811 2018-07-09 Tom Tromey <tom@tromey.com>
1812
1813 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
1814 SUBDIR_GCC_COMPILE_SRCS.
1815
1816 2018-07-09 Tom Tromey <tom@tromey.com>
1817
1818 * Makefile.in (init.c): Remove some unused sed rules.
1819
1820 2018-07-09 Tom Tromey <tom@tromey.com>
1821
1822 * Makefile.in (TSOBS): Remove.
1823 (INIT_FILES): Update.
1824 (LIBGDB_OBS): Update.
1825 (COMMON_SFILES): Add inflow.c.
1826 (SFILES): Remove inflow.c.
1827
1828 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1829
1830 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
1831
1832 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
1833
1834 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
1835 get_saveloc_name, is_signal_frame_name, step_name,
1836 init_remote_name, create_addr_space_name,
1837 destroy_addr_space_name, search_unwind_table_name,
1838 find_dyn_list_name): Constify.
1839
1840 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
1841
1842 * darwin-nat.c (darwin_pthread_kill): New function.
1843 (darwin_resume_thread): Use darwin_pthread_kill.
1844
1845 2018-07-05 Tom de Vries <tdevries@suse.de>
1846
1847 * macroexp.c (macro_buffer) <operator=>: New member function.
1848
1849 2018-07-04 Tom Tromey <tom@tromey.com>
1850
1851 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
1852
1853 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
1854
1855 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
1856 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
1857 * maint.c: Likewise.
1858 * top.c: Likewise.
1859
1860 2018-07-04 Joel Brobecker <brobecker@adacore.com>
1861
1862 * NEWS: Create a new section for the next release branch.
1863 Rename the section of the current branch, now that it has
1864 been cut.
1865
1866 2018-07-04 Joel Brobecker <brobecker@adacore.com>
1867
1868 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
1869 * version.in: Bump version to 8.2.50.DATE-git.
1870
1871 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1872 Pedro Alves <palves@redhat.com>
1873
1874 * linux-nat.c (linux_init_ptrace): Rename to ...
1875 (linux_init_ptrace_procfs): ... this. Call
1876 linux_proc_init_warnings.
1877 (linux_nat_target::post_attach)
1878 (linux_nat_target::post_startup_inferior): Adjust.
1879 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
1880 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
1881
1882 2018-07-04 Tom de Vries <tdevries@suse.de>
1883
1884 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
1885 check ...
1886 (read_comp_unit_head): ... here.
1887
1888 2018-07-03 Tom Tromey <tom@tromey.com>
1889
1890 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
1891 (stop_tracing, tstatus_command)
1892 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
1893 (print_one_static_tracepoint_marker): Update.
1894 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
1895 std::vector.
1896 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
1897 VEC.
1898 (all_tracepoints, static_tracepoints_here): Return std::vector.
1899
1900 2018-07-03 Tom Tromey <tom@tromey.com>
1901
1902 * common/ptid.c (ptid_equal): Remove.
1903 * common/ptid.h (ptid_equal): Don't declare.
1904 * ada-tasks.c: Update.
1905 * breakpoint.c: Update.
1906 * common/agent.c: Update.
1907 * corelow.c: Update.
1908 * darwin-nat-info.c: Update.
1909 * darwin-nat.c: Update.
1910 * dcache.c: Update.
1911 * dtrace-probe.c: Update.
1912 * dummy-frame.c: Update.
1913 * fbsd-nat.c: Update.
1914 * frame.c: Update.
1915 * gdbthread.h: Update.
1916 * gnu-nat.c: Update.
1917 * go32-nat.c: Update.
1918 * inf-loop.c: Update.
1919 * inf-ptrace.c: Update.
1920 * infcall.c: Update.
1921 * infcmd.c: Update.
1922 * inflow.c: Update.
1923 * infrun.c: Update.
1924 * linux-fork.c: Update.
1925 * linux-nat.c: Update.
1926 * linux-thread-db.c: Update.
1927 * mi/mi-cmd-var.c: Update.
1928 * mi/mi-interp.c: Update.
1929 * mi/mi-main.c: Update.
1930 * nto-procfs.c: Update.
1931 * ppc-linux-tdep.c: Update.
1932 * procfs.c: Update.
1933 * python/py-inferior.c: Update.
1934 * python/py-record-btrace.c: Update.
1935 * python/py-record.c: Update.
1936 * ravenscar-thread.c: Update.
1937 * regcache.c: Update.
1938 * remote-sim.c: Update.
1939 * remote.c: Update.
1940 * sol-thread.c: Update.
1941 * solib.c: Update.
1942 * target.c: Update.
1943 * tui/tui-stack.c: Update.
1944 * varobj.c: Update.
1945 * windows-nat.c: Update.
1946 * windows-tdep.c: Update.
1947
1948 2018-07-03 Tom Tromey <tom@tromey.com>
1949
1950 * common/ptid.c (ptid_match): Remove.
1951 * common/ptid.h (ptid_match): Don't declare.
1952 * fbsd-nat.c: Update.
1953 * infcmd.c: Update.
1954 * infrun.c: Update.
1955 * linux-nat.c: Update.
1956 * record-btrace.c: Update.
1957 * regcache.c: Update.
1958 * remote.c: Update.
1959
1960 2018-07-03 Tom Tromey <tom@tromey.com>
1961
1962 * common/ptid.c (ptid_tid_p): Remove.
1963 * common/ptid.h (ptid_tid_p): Don't declare.
1964 * sol-thread.c: Update.
1965
1966 2018-07-03 Tom Tromey <tom@tromey.com>
1967
1968 * common/ptid.c (ptid_lwp_p): Remove.
1969 * common/ptid.h (ptid_lwp_p): Don't declare.
1970 * fbsd-nat.c: Update.
1971 * linux-nat.c: Update.
1972 * nat/linux-procfs.c: Update.
1973 * nat/x86-linux-dregs.c: Update.
1974 * sol-thread.c: Update.
1975
1976 2018-07-03 Tom Tromey <tom@tromey.com>
1977
1978 * common/ptid.c (ptid_is_pid): Remove.
1979 * common/ptid.h (ptid_is_pid): Don't declare.
1980 * infrun.c: Update.
1981 * linux-nat.c: Update.
1982 * mi/mi-interp.c: Update.
1983 * remote.c: Update.
1984 * thread.c: Update.
1985
1986 2018-07-03 Tom Tromey <tom@tromey.com>
1987
1988 * common/ptid.c (ptid_get_tid): Remove.
1989 * common/ptid.h (ptid_get_tid): Don't declare.
1990 * ada-tasks.c: Update.
1991 * aix-thread.c: Update.
1992 * bsd-uthread.c: Update.
1993 * darwin-nat.c: Update.
1994 * fbsd-nat.c: Update.
1995 * i386-darwin-nat.c: Update.
1996 * infrun.c: Update.
1997 * linux-tdep.c: Update.
1998 * nto-procfs.c: Update.
1999 * ppc-ravenscar-thread.c: Update.
2000 * python/py-infthread.c: Update.
2001 * ravenscar-thread.c: Update.
2002 * sol-thread.c: Update.
2003 * sparc-ravenscar-thread.c: Update.
2004 * windows-nat.c: Update.
2005
2006 2018-07-03 Tom Tromey <tom@tromey.com>
2007
2008 * common/ptid.c (ptid_get_lwp): Remove.
2009 * common/ptid.h (ptid_get_lwp): Don't declare.
2010 * aarch64-linux-nat.c: Update.
2011 * ada-tasks.c: Update.
2012 * aix-thread.c: Update.
2013 * amd64-linux-nat.c: Update.
2014 * arm-linux-nat.c: Update.
2015 * corelow.c: Update.
2016 * fbsd-nat.c: Update.
2017 * fbsd-tdep.c: Update.
2018 * gnu-nat.c: Update.
2019 * i386-cygwin-tdep.c: Update.
2020 * i386-gnu-nat.c: Update.
2021 * i386-linux-nat.c: Update.
2022 * ia64-linux-nat.c: Update.
2023 * inf-ptrace.c: Update.
2024 * infrun.c: Update.
2025 * linux-fork.c: Update.
2026 * linux-nat.c: Update.
2027 * linux-tdep.c: Update.
2028 * linux-thread-db.c: Update.
2029 * mips-linux-nat.c: Update.
2030 * nat/aarch64-linux-hw-point.c: Update.
2031 * nat/aarch64-linux.c: Update.
2032 * nat/linux-btrace.c: Update.
2033 * nat/linux-osdata.c: Update.
2034 * nat/linux-procfs.c: Update.
2035 * nat/x86-linux-dregs.c: Update.
2036 * obsd-nat.c: Update.
2037 * ppc-fbsd-nat.c: Update.
2038 * ppc-linux-nat.c: Update.
2039 * procfs.c: Update.
2040 * python/py-infthread.c: Update.
2041 * ravenscar-thread.c: Update.
2042 * remote.c: Update.
2043 * s390-linux-nat.c: Update.
2044 * sol-thread.c: Update.
2045 * sol2-tdep.c: Update.
2046 * spu-linux-nat.c: Update.
2047 * x86-linux-nat.c: Update.
2048 * xtensa-linux-nat.c: Update.
2049
2050 2018-07-03 Tom Tromey <tom@tromey.com>
2051
2052 * common/ptid.c (ptid_get_pid): Remove.
2053 * common/ptid.h (ptid_get_pid): Don't declare.
2054 * aarch64-linux-nat.c: Update.
2055 * ada-lang.c: Update.
2056 * aix-thread.c: Update.
2057 * alpha-bsd-nat.c: Update.
2058 * amd64-fbsd-nat.c: Update.
2059 * amd64-linux-nat.c: Update.
2060 * arm-linux-nat.c: Update.
2061 * arm-nbsd-nat.c: Update.
2062 * auxv.c: Update.
2063 * break-catch-syscall.c: Update.
2064 * breakpoint.c: Update.
2065 * bsd-uthread.c: Update.
2066 * corelow.c: Update.
2067 * ctf.c: Update.
2068 * darwin-nat.c: Update.
2069 * fbsd-nat.c: Update.
2070 * fbsd-tdep.c: Update.
2071 * gcore.c: Update.
2072 * gnu-nat.c: Update.
2073 * hppa-nbsd-nat.c: Update.
2074 * hppa-obsd-nat.c: Update.
2075 * i386-fbsd-nat.c: Update.
2076 * ia64-linux-nat.c: Update.
2077 * inf-ptrace.c: Update.
2078 * infcmd.c: Update.
2079 * inferior.c: Update.
2080 * inferior.h: Update.
2081 * inflow.c: Update.
2082 * infrun.c: Update.
2083 * linux-fork.c: Update.
2084 * linux-nat.c: Update.
2085 * linux-tdep.c: Update.
2086 * linux-thread-db.c: Update.
2087 * m68k-bsd-nat.c: Update.
2088 * mi/mi-interp.c: Update.
2089 * mi/mi-main.c: Update.
2090 * mips-linux-nat.c: Update.
2091 * mips-nbsd-nat.c: Update.
2092 * mips64-obsd-nat.c: Update.
2093 * nat/aarch64-linux-hw-point.c: Update.
2094 * nat/aarch64-linux.c: Update.
2095 * nat/linux-btrace.c: Update.
2096 * nat/linux-osdata.c: Update.
2097 * nat/linux-procfs.c: Update.
2098 * nat/x86-linux-dregs.c: Update.
2099 * nto-procfs.c: Update.
2100 * obsd-nat.c: Update.
2101 * ppc-linux-nat.c: Update.
2102 * ppc-nbsd-nat.c: Update.
2103 * ppc-obsd-nat.c: Update.
2104 * proc-service.c: Update.
2105 * procfs.c: Update.
2106 * python/py-inferior.c: Update.
2107 * python/py-infthread.c: Update.
2108 * ravenscar-thread.c: Update.
2109 * record.c: Update.
2110 * remote-sim.c: Update.
2111 * remote.c: Update.
2112 * rs6000-nat.c: Update.
2113 * s390-linux-nat.c: Update.
2114 * sh-nbsd-nat.c: Update.
2115 * sol-thread.c: Update.
2116 * sparc-nat.c: Update.
2117 * sparc64-tdep.c: Update.
2118 * spu-linux-nat.c: Update.
2119 * spu-tdep.c: Update.
2120 * target-debug.h: Update.
2121 * target.c: Update.
2122 * thread.c: Update.
2123 * tid-parse.c: Update.
2124 * tracefile-tfile.c: Update.
2125 * vax-bsd-nat.c: Update.
2126 * windows-nat.c: Update.
2127 * x86-linux-nat.c: Update.
2128 * x86-nat.c: Update.
2129
2130 2018-07-03 Tom Tromey <tom@tromey.com>
2131
2132 * common/ptid.c (pid_to_ptid): Remove.
2133 * common/ptid.h (pid_to_ptid): Don't declare.
2134 * aix-thread.c: Update.
2135 * arm-linux-nat.c: Update.
2136 * common/ptid.c: Update.
2137 * common/ptid.h: Update.
2138 * corelow.c: Update.
2139 * ctf.c: Update.
2140 * darwin-nat.c: Update.
2141 * fbsd-nat.c: Update.
2142 * fork-child.c: Update.
2143 * gnu-nat.c: Update.
2144 * go32-nat.c: Update.
2145 * inf-ptrace.c: Update.
2146 * infcmd.c: Update.
2147 * inferior.c: Update.
2148 * infrun.c: Update.
2149 * linux-fork.c: Update.
2150 * linux-nat.c: Update.
2151 * nat/aarch64-linux-hw-point.c: Update.
2152 * nat/fork-inferior.c: Update.
2153 * nat/x86-linux-dregs.c: Update.
2154 * nto-procfs.c: Update.
2155 * obsd-nat.c: Update.
2156 * procfs.c: Update.
2157 * progspace.c: Update.
2158 * remote.c: Update.
2159 * rs6000-nat.c: Update.
2160 * s390-linux-nat.c: Update.
2161 * sol-thread.c: Update.
2162 * spu-linux-nat.c: Update.
2163 * target.c: Update.
2164 * top.c: Update.
2165 * tracefile-tfile.c: Update.
2166 * windows-nat.c: Update.
2167
2168 2018-07-03 Tom Tromey <tom@tromey.com>
2169
2170 * common/ptid.h (ptid_build): Don't declare.
2171 * common/ptid.c (ptid_build): Remove.
2172 * aix-thread.c: Update.
2173 * bsd-kvm.c: Update.
2174 * bsd-uthread.c: Update.
2175 * common/agent.c: Update.
2176 * common/ptid.c: Update.
2177 * common/ptid.h: Update.
2178 * corelow.c: Update.
2179 * darwin-nat.c: Update.
2180 * fbsd-nat.c: Update.
2181 * gnu-nat.c: Update.
2182 * linux-fork.c: Update.
2183 * linux-nat.c: Update.
2184 * linux-thread-db.c: Update.
2185 * nat/linux-osdata.c: Update.
2186 * nat/linux-procfs.c: Update.
2187 * nto-procfs.c: Update.
2188 * obsd-nat.c: Update.
2189 * proc-service.c: Update.
2190 * procfs.c: Update.
2191 * ravenscar-thread.c: Update.
2192 * remote-sim.c: Update.
2193 * remote.c: Update.
2194 * sol-thread.c: Update.
2195 * target.c: Update.
2196 * windows-nat.c: Update.
2197
2198 2018-07-03 Tom Tromey <tom@tromey.com>
2199
2200 * infrun.c (follow_exec): Use exit_inferior_silent.
2201 * inferior.c (exit_inferior_num_silent): Remove.
2202 * inferior.h (exit_inferior_num_silent): Don't declare.
2203
2204 2018-07-03 Tom Tromey <tom@tromey.com>
2205
2206 PR cli/23340:
2207 * darwin-nat.c (darwin_attach_pid): Reset inferior and
2208 inferior_ptid on error.
2209
2210 2018-07-02 Maciej W. Rozycki <macro@mips.com>
2211 Simon Marchi <simon.marchi@polymtl.ca>
2212
2213 PR tdep/8282
2214 * disasm.h (gdb_disassembler): Add
2215 `m_disassembler_options_holder'. member
2216 * disasm.c (get_all_disassembler_options): New function.
2217 (gdb_disassembler::gdb_disassembler): Use it.
2218 (gdb_buffered_insn_length_init_dis): Likewise.
2219 (gdb_buffered_insn_length): Adjust accordingly.
2220 (set_disassembler_options): Handle options with arguments.
2221 (show_disassembler_options_sfunc): Likewise. Add a leading new
2222 line if showing options with descriptions.
2223 (disassembler_options_completer): Adapt to using the
2224 `disasm_options_and_args_t' structure.
2225 * mips-tdep.c (mips_disassembler_options): New variable.
2226 (mips_disassembler_options_o32): Likewise.
2227 (mips_disassembler_options_n32): Likewise.
2228 (mips_disassembler_options_n64): Likewise.
2229 (gdb_print_insn_mips): Don't set `disassembler_options'.
2230 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
2231 functions.
2232 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
2233 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
2234 `gdbarch_disassembler_options_implicit' and
2235 `gdbarch_valid_disassembler_options'.
2236 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
2237 `disasm_options_and_args_t' structure.
2238 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
2239 method.
2240 (valid_disassembler_options): Switch from `disasm_options_t' to
2241 the `disasm_options_and_args_t' structure.
2242 * NEWS: Document `set disassembler-options' support for the MIPS
2243 target.
2244 * gdbarch.h: Regenerate.
2245 * gdbarch.c: Regenerate.
2246
2247 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
2248
2249 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
2250
2251 2018-06-29 Joel Brobecker <brobecker@adacore.com>
2252
2253 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
2254 parameter in call to amd64_target_description.
2255 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
2256 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
2257 (amd64fbsd_init_abi): Likewise.
2258 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
2259 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
2260 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
2261 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
2262
2263 2018-06-29 Pedro Alves <palves@redhat.com>
2264
2265 * gdb/amd64-tdep.h (amd64_create_target_description): Add
2266 "segments" parameter.
2267 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
2268 (_initialize_amd64_tdep): Update call to
2269 amd64_create_target_description.
2270 (amd64_target_description): Add "segments" parameter. Adjust
2271 the implementation to use it.
2272 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
2273 call to amd64_create_target_description.
2274 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
2275 * gdb/arch/amd64.h (amd64_create_target_description): Add
2276 "segments" register.
2277 * gdb/arch/amd64.c (amd64_create_target_description): Add
2278 "segments" parameter. Call create_feature_i386_64bit_segments
2279 only if SEGMENTS is true.
2280 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
2281 call to amd64_create_target_description.
2282
2283 2018-06-29 Pedro Alves <palves@redhat.com>
2284
2285 * thread.c (thread_target_id_str): New, factored out from ...
2286 (print_thread_info_1): ... here. Use it to compute the max
2287 "Target Id" column width.
2288
2289 2018-06-29 Pedro Alves <palves@redhat.com>
2290
2291 * remote.c (remote_target::extra_thread_info): Delete
2292 'display_buf' and 'n' locals. from the cache, regardless of
2293 packet mechanims is in use. Use cache for qThreadExtra and qP
2294 methods too.
2295
2296 2018-06-29 Pedro Alves <palves@redhat.com>
2297
2298 * blockframe.c (find_pc_sect_containing_function): New function.
2299 * breakpoint.c (print_breakpoint_location): Don't call
2300 find_pc_sect_function.
2301 * linespec.c (create_sals_line_offset): Record the location's
2302 symbol in the sal.
2303 * linespec.c (convert_address_location_to_sals): Fill in sal's
2304 symbol with find_pc_sect_containing_function.
2305 * symtab.c (find_function_start_sal): Rename to ...
2306 (find_function_start_sal_1): ... this.
2307 (find_function_start_sal): Reimplement as wrapper around
2308 find_function_start_sal_1, and use
2309 find_pc_sect_containing_function to fill in the sal's symbol.
2310 (find_function_start_sal(symbol*, bool)): Adjust.
2311 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
2312 comments.
2313 (find_pc_sect_containing_function): Declare.
2314
2315 2018-06-29 Pedro Alves <palves@redhat.com>
2316
2317 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
2318 true if the the location has no symbol.
2319
2320 2018-06-28 Tom Tromey <tom@tromey.com>
2321
2322 * NEWS: Mention --enable-codesign.
2323 * silent-rules.mk (ECHO_SIGN): New variable.
2324 * configure.ac: Add --enable-codesign.
2325 * configure: Rebuild.
2326 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
2327 (gdb$(EXEEXT)): Optionally invoke codesign.
2328
2329 2018-06-28 Pedro Alves <palves@redhat.com>
2330
2331 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
2332 comments.
2333 (switch_to_thread_no_regs): Adjust comment.
2334 * infcmd.c (stop_pc): Delete.
2335 (post_create_inferior, info_program_command): Replace references
2336 to stop_pc with references to thread_info->suspend.stop_pc.
2337 * inferior.h (stop_pc): Delete declaration.
2338 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
2339 (handle_inferior_event_1, handle_signal_stop)
2340 (process_event_stop_test, keep_going_stepped_thread)
2341 (handle_step_into_function, handle_step_into_function_backward)
2342 (print_stop_location): Replace references to stop_pc with
2343 references to thread_info->suspend.stop_pc.
2344 (struct infcall_suspend_state) <stop_pc>: Delete field.
2345 (save_infcall_suspend_state, restore_infcall_suspend_state):
2346 Remove references to inf_stat->stop_pc.
2347 * linux-fork.c (fork_load_infrun_state): Likewise.
2348 * record-btrace.c (record_btrace_set_replay): Likewise.
2349 * record-full.c (record_full_goto_entry): Likewise.
2350 * remote.c (print_one_stopped_thread): Likewise.
2351 * target.c (target_resume): Extend comment.
2352 * thread.c (set_executing_thread): New.
2353 (set_executing): Use it.
2354 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
2355 Remove references to stop_pc.
2356
2357 2018-06-28 Pedro Alves <palves@redhat.com>
2358
2359 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
2360 Moving fetching stop_pc until after ecs->event_thread is refreshed.
2361
2362 2018-06-28 Tom Tromey <tom@tromey.com>
2363
2364 * coffread.c (coff_symfile_finish): Update.
2365 * xcoffread.c (xcoff_symfile_finish): Update.
2366 * elfread.c (elf_symfile_finish): Update.
2367 * symfile.h (dwarf2_free_objfile): Don't declare.
2368 * dwarf2read.c (_initialize_dwarf2_read): Use
2369 register_objfile_data_with_cleanup.
2370 (dwarf2_free_objfile): Now static. Change signature.
2371
2372 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2373
2374 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
2375 option "-o" to add-symbol-file-load to add an offset to each
2376 section's load address.
2377 * symfile.c (set_objfile_default_section_offset): New function.
2378
2379 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2380
2381 * symfile.c (add_symbol_file_command): Make sure that sections
2382 with the same name are sorted in the same order.
2383
2384 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2385
2386 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
2387 require the second argument. If omitted, load sections at the
2388 addresses specified in the file.
2389
2390 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2391
2392 * symfile.c (symbol_file_command, symbol_file_add_main_1)
2393 (_initialize_symfile): Add option "-o" to symbol-file to add an
2394 offset to each section of the symbol file.
2395
2396 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2397
2398 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
2399
2400 2018-06-27 Tom Tromey <tom@tromey.com>
2401
2402 * stack.c (_initialize_stack): Update "func" help text.
2403
2404 2018-06-27 Tom Tromey <tom@tromey.com>
2405
2406 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
2407 std::vector.
2408 (unwind_infopy_str, pyuw_create_unwind_info)
2409 (unwind_infopy_add_saved_register, pyuw_sniffer)
2410 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
2411 Update.
2412 (struct saved_reg): Add constructor.
2413 <value>: Now a gdbpy_ref<>.
2414
2415 2018-06-27 Tom Tromey <tom@tromey.com>
2416
2417 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
2418
2419 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2420
2421 * gdb-gdb.py.in: Format using autopep8.
2422
2423 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2424
2425 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
2426 (type_lookup_function): Recognize CORE_ADDR values.
2427
2428 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2429
2430 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
2431 print tag_name.
2432
2433 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2434
2435 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
2436 <__lt__>: Add.
2437
2438 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2439
2440 * gdb-gdb.py: Move to...
2441 * gdb-gdb.py.in: ... here.
2442 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
2443 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
2444 dependencies.
2445 (distclean): Remove gdb-gdb.py when cleaning.
2446 (gdb-gdb.py, gdb-gdb.gdb): New rules.
2447 * configure: Re-generate.
2448
2449 2018-06-27 Pedro Alves <palves@redhat.com>
2450
2451 * proc-service.c (get_ps_regcache): New.
2452 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2453 (ps_lsetfpregs): Use it.
2454
2455 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
2456
2457 PR gdb/21695
2458 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
2459 (dwarf_decode_lines_1): Adjust.
2460
2461 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2462
2463 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
2464 override.
2465 <info_proc>: Likewise.
2466
2467 2018-06-26 Joel Brobecker <brobecker@adacore.com>
2468
2469 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
2470 to windows_fetch_one_register, and only handle the case of
2471 fetching one register. Move the code that reloads the context
2472 and iterates over all registers if R is negative to...
2473 (windows_nat_target::fetch_registers): ... here.
2474 (do_windows_store_inferior_registers): Rename to
2475 windows_store_one_register, and only handle the case of storing
2476 one register. Move the code that handles the case where r is
2477 negative to...
2478 (windows_nat_target::store_registers) ... here.
2479
2480 2018-06-26 Tom Tromey <tom@tromey.com>
2481
2482 PR rust/22574:
2483 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
2484 * rust-lang.c (rust_print_struct_def): Add podata parameter.
2485 Update.
2486 (rust_internal_print_type): Add podata parameter.
2487 (rust_print_type): Update.
2488
2489 2018-06-26 Tom Tromey <tom@tromey.com>
2490
2491 * typeprint.h (struct print_offset_data) <update, finish,
2492 maybe_print_hole>: New methods.
2493 <indentation>: New constant.
2494 * typeprint.c (print_offset_data::indentation): Define.
2495 (print_offset_data::maybe_print_hole, print_offset_data::update)
2496 (print_offset_data::finish): Move from c-typeprint.c and rename.
2497 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
2498 (print_spaces_filtered_with_print_options): Update.
2499 (c_print_type_union_field_offset, maybe_print_hole)
2500 (c_print_type_struct_field_offset): Move to typeprint.c and
2501 rename.
2502 (c_type_print_base_struct_union): Update.
2503
2504 2018-06-25 Pedro Alves <palves@redhat.com>
2505
2506 * gdbthread.h (thread_info_ref, delete_thread)
2507 (delete_thread_silent, first_thread_of_inferior)
2508 (any_thread_of_inferior, switch_to_thread)
2509 (enable_thread_stack_temporaries)
2510 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2511 (get_last_thread_stack_temporary)
2512 (value_in_thread_stack_temporaries, can_access_registers_thread):
2513 Spell out "struct thread_info" instead of just "thread_info".
2514 * inferior.h (notice_new_inferior): Likewise.
2515
2516 2018-06-25 Pedro Alves <palves@redhat.com>
2517
2518 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2519 pass thread_info pointer to delete_thread.
2520 (windows_nat_target::detach): Pass inferior pointer to
2521 detach_inferior.
2522 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
2523 delete_thread.
2524 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
2525 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
2526 and pass a thread_info pointer to delete_thread.
2527 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
2528 pass thread_info pointer to delete_thread.
2529 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
2530 delete_thread_silent call.
2531 * procfs.c (procfs_target::detach): Pass inferior pointer to
2532 detach_inferior.
2533 (procfs_target::wait): Pass thread_info pointer to delete_thread.
2534 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
2535 delete_thread_silent call.
2536 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2537 pass thread_info pointer to delete_thread.
2538 (windows_nat_target::detach): Pass inferior pointer to
2539 delete_inferior.
2540
2541 2018-06-22 Alan Hayward <alan.hayward@arm.com>
2542
2543 * regcache.c (readable_regcache::read_part): Fix asserts.
2544 (reg_buffer::raw_collect_part): New function.
2545 (regcache::write_part): Fix asserts.
2546 (reg_buffer::raw_supply_part): New function.
2547 (regcache::transfer_regset_register): New helper function.
2548 (regcache::transfer_regset): Call new functions.
2549 (regcache_supply_regset): Use gdb_byte*.
2550 (regcache::supply_regset): Likewise.
2551 (regcache_collect_regset): Likewise.
2552 (regcache::collect_regset): Likewise.
2553 * regcache.h (reg_buffer::raw_collect_part): New declaration.
2554 (reg_buffer::raw_supply_part): Likewise.
2555 (regcache::transfer_regset_register): Likewise.
2556 (regcache::transfer_regset): Use gdb_byte*.
2557
2558 2018-06-22 Alan Hayward <alan.hayward@arm.com>
2559
2560 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
2561
2562 2018-06-21 Pedro Alves <palves@redhat.com>
2563
2564 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
2565 instead of a ptid_t. All callers adjusted.
2566 * ada-tasks.c (ada_get_task_number): Likewise. All callers
2567 adjusted.
2568 (print_ada_task_info, display_current_task_id, task_command_1):
2569 Adjust.
2570 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
2571 inferior_thread.
2572 (breakpoint_kind): Adjust.
2573 (remove_breakpoints_pid): Rename to ...
2574 (remove_breakpoints_inf): ... this. Adjust to take an inferior
2575 pointer. All callers adjusted.
2576 (bpstat_clear_actions): Use inferior_thread.
2577 (get_bpstat_thread): New.
2578 (bpstat_do_actions): Use it.
2579 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
2580 to take a thread_info pointer. All callers adjusted.
2581 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
2582 (breakpoint_re_set_thread): Use inferior_thread.
2583 * breakpoint.h (struct inferior): Forward declare.
2584 (bpstat_stop_status): Update.
2585 (remove_breakpoints_pid): Delete.
2586 (remove_breakpoints_inf): New.
2587 * bsd-uthread.c (bsd_uthread_target::wait)
2588 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
2589 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
2590 (maint_btrace_packet_history_cmd)
2591 (maint_btrace_clear_packet_history_cmd): Adjust.
2592 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
2593 inferior_thread.
2594 * cli/cli-interp.c: Include "inferior.h".
2595 * common/refcounted-object.h (struct
2596 refcounted_object_ref_policy): New.
2597 * compile/compile-object-load.c: Include gdbthread.h.
2598 (store_regs): Use inferior_thread.
2599 * corelow.c (core_target::close): Use current_inferior.
2600 (core_target_open): Adjust to use first_thread_of_inferior and use
2601 the current inferior.
2602 * ctf.c (ctf_target::close): Adjust to use current_inferior.
2603 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
2604 <thread>: ... this new field. All references adjusted.
2605 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
2606 Take a thread_info pointer instead of a ptid_t.
2607 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
2608 (dummy_frame_discard, register_dummy_frame_dtor): Take a
2609 thread_info pointer instead of a ptid_t.
2610 * elfread.c: Include "inferior.h".
2611 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
2612 Use inferior_thread.
2613 * eval.c (evaluate_subexp): Likewise.
2614 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
2615 inferior_thread.
2616 * gdb_proc_service.h (struct thread_info): Forward declare.
2617 (struct ps_prochandle) <ptid>: Delete, replaced by ...
2618 <thread>: ... this new field. All references adjusted.
2619 * gdbarch.h, gdbarch.c: Regenerate.
2620 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
2621 'thread' parameter. All implementations and callers adjusted.
2622 * gdbthread.h (thread_info) <set_running>: New method.
2623 (delete_thread, delete_thread_silent): Take a thread_info pointer
2624 instead of a ptid.
2625 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
2626 (first_thread_of_process): Delete, replaced by ...
2627 (first_thread_of_inferior): ... this new function. All callers
2628 adjusted.
2629 (any_live_thread_of_process): Delete, replaced by ...
2630 (any_live_thread_of_inferior): ... this new function. All callers
2631 adjusted.
2632 (switch_to_thread, switch_to_no_thread): Declare.
2633 (is_executing): Delete.
2634 (enable_thread_stack_temporaries): Update comment.
2635 <enable_thread_stack_temporaries>: Take a thread_info pointer
2636 instead of a ptid_t. Incref the thread.
2637 <~enable_thread_stack_temporaries>: Decref the thread.
2638 <m_ptid>: Delete
2639 <m_thr>: New.
2640 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2641 (get_last_thread_stack_temporary)
2642 (value_in_thread_stack_temporaries, can_access_registers_thread):
2643 Take a thread_info pointer instead of a ptid_t. All callers
2644 adjusted.
2645 * infcall.c (get_call_return_value): Use inferior_thread.
2646 (run_inferior_call): Work with thread pointers instead of ptid_t.
2647 (call_function_by_hand_dummy): Work with thread pointers instead
2648 of ptid_t. Use thread_info_ref.
2649 * infcmd.c (proceed_thread_callback): Access thread's state
2650 directly.
2651 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
2652 access thread's state directly.
2653 (continue_command): Use inferior_thread.
2654 (info_program_command): Use find_thread_ptid and access thread
2655 state directly.
2656 (proceed_after_attach_callback): Use thread state directly.
2657 (notice_new_inferior): Take a thread_info pointer instead of a
2658 ptid_t. All callers adjusted.
2659 (exit_inferior): Take an inferior pointer instead of a pid. All
2660 callers adjusted.
2661 (exit_inferior_silent): New.
2662 (detach_inferior): Delete.
2663 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
2664 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
2665 (detach_inferior_command, kill_inferior_command): Use
2666 find_inferior_id instead of valid_gdb_inferior_id and
2667 gdb_inferior_id_to_pid.
2668 (inferior_command): Use inferior and thread pointers.
2669 * inferior.h (struct thread_info): Forward declare.
2670 (notice_new_inferior): Take a thread_info pointer instead of a
2671 ptid_t. All callers adjusted.
2672 (detach_inferior): Delete declaration.
2673 (exit_inferior, exit_inferior_silent): Take an inferior pointer
2674 instead of a pid. All callers adjusted.
2675 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
2676 (valid_gdb_inferior_id): Delete.
2677 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
2678 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
2679 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
2680 ...
2681 <inf>: ... this new field.
2682 <step_ptid>: Delete, replaced by ...
2683 <step_thread>: ... this new field.
2684 (get_displaced_stepping_state): Take an inferior pointer instead
2685 of a pid. All callers adjusted.
2686 (displaced_step_in_progress_any_inferior): Adjust.
2687 (displaced_step_in_progress_thread): Take a thread pointer instead
2688 of a ptid_t. All callers adjusted.
2689 (displaced_step_in_progress, add_displaced_stepping_state): Take
2690 an inferior pointer instead of a pid. All callers adjusted.
2691 (get_displaced_step_closure_by_addr): Adjust.
2692 (remove_displaced_stepping_state): Take an inferior pointer
2693 instead of a pid. All callers adjusted.
2694 (displaced_step_prepare_throw, displaced_step_prepare)
2695 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
2696 All callers adjusted.
2697 (start_step_over): Adjust.
2698 (infrun_thread_ptid_changed): Remove bit updating ptids in the
2699 displaced step queue.
2700 (do_target_resume): Adjust.
2701 (fetch_inferior_event): Use inferior_thread.
2702 (context_switch, get_inferior_stop_soon): Take an
2703 execution_control_state pointer instead of a ptid_t. All callers
2704 adjusted.
2705 (switch_to_thread_cleanup): Delete.
2706 (stop_all_threads): Use scoped_restore_current_thread.
2707 * inline-frame.c: Include "gdbthread.h".
2708 (inline_state) <inline_state>: Take a thread pointer instead of a
2709 ptid_t. All callers adjusted.
2710 <ptid>: Delete, replaced by ...
2711 <thread>: ... this new field.
2712 (find_inline_frame_state): Take a thread pointer instead of a
2713 ptid_t. All callers adjusted.
2714 (skip_inline_frames, step_into_inline_frame)
2715 (inline_skipped_frames, inline_skipped_symbol): Take a thread
2716 pointer instead of a ptid_t. All callers adjusted.
2717 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
2718 (inline_skipped_frames, inline_skipped_symbol): Likewise.
2719 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
2720 pointers directly.
2721 * linux-nat.c (get_detach_signal): Likewise.
2722 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
2723 (thread_db_notice_clone): Adjust.
2724 (thread_db_find_new_threads_silently)
2725 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
2726 a thread pointer instead of a ptid_t. All callers adjusted.
2727 * mi/mi-cmd-var.c: Include "inferior.h".
2728 (mi_cmd_var_update_iter): Update to use thread pointers.
2729 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
2730 inferior directly.
2731 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
2732 out to ...
2733 (mi_output_running): ... this new function.
2734 (mi_on_resume_1): Adjust to use it.
2735 (mi_user_selected_context_changed): Adjust to use inferior_thread.
2736 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
2737 directly.
2738 (interrupt_thread_callback): : Adjust to use thread and inferior
2739 pointers.
2740 * proc-service.c: Include "gdbthread.h".
2741 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
2742 * progspace-and-thread.c: Include "inferior.h".
2743 * progspace.c: Include "inferior.h".
2744 * python/py-exitedevent.c (create_exited_event_object): Adjust to
2745 hold a reference to an inferior_object.
2746 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
2747 inferior_thread.
2748 * python/py-inferior.c (struct inferior_object): Give the type a
2749 tag name instead of a typedef.
2750 (python_on_normal_stop): No need to check if the current thread is
2751 listed.
2752 (inferior_to_inferior_object): Change return type to
2753 inferior_object. All callers adjusted.
2754 (find_thread_object): Delete, bits factored out to ...
2755 (thread_to_thread_object): ... this new function.
2756 * python/py-infthread.c (create_thread_object): Use
2757 inferior_to_inferior_object.
2758 (thpy_is_stopped): Use thread pointer directly.
2759 (gdbpy_selected_thread): Use inferior_thread.
2760 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
2761 field, replaced with ...
2762 <thread>: ... this new field. All users adjusted.
2763 (btpy_insn_or_gap_new): Drop const.
2764 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
2765 callers adjusted.
2766 * python/py-record.c: Include "gdbthread.h".
2767 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2768 a ptid_t. All callers adjusted.
2769 (gdbpy_current_recording): Use inferior_thread.
2770 * python/py-record.h (recpy_record_object) <ptid>: Delete
2771 field, replaced with ...
2772 <thread>: ... this new field. All users adjusted.
2773 (recpy_element_object) <ptid>: Delete
2774 field, replaced with ...
2775 <thread>: ... this new field. All users adjusted.
2776 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2777 a ptid_t. All callers adjusted.
2778 * python/py-threadevent.c: Include "gdbthread.h".
2779 (get_event_thread): Use thread_to_thread_object.
2780 * python/python-internal.h (struct inferior_object): Forward
2781 declare.
2782 (find_thread_object, find_inferior_object): Delete declarations.
2783 (thread_to_thread_object, inferior_to_inferior_object): New
2784 declarations.
2785 * record-btrace.c: Include "inferior.h".
2786 (require_btrace_thread): Use inferior_thread.
2787 (record_btrace_frame_sniffer)
2788 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
2789 (get_thread_current_frame): Use scoped_restore_current_thread and
2790 switch_to_thread.
2791 (get_thread_current_frame): Use thread pointer directly.
2792 (record_btrace_replay_at_breakpoint): Use thread's inferior
2793 pointer directly.
2794 * record-full.c: Include "inferior.h".
2795 * regcache.c: Include "gdbthread.h".
2796 (get_thread_arch_regcache): Use the inferior's address space
2797 directly.
2798 (get_thread_regcache, registers_changed_thread): New.
2799 * regcache.h (get_thread_regcache(thread_info *thread)): New
2800 overload.
2801 (registers_changed_thread): New.
2802 (remote_target) <remote_detach_1>: Swap order of parameters.
2803 (remote_add_thread): <remote_add_thread>: Return the new thread.
2804 (get_remote_thread_info(ptid_t)): New overload.
2805 (remote_target::remote_notice_new_inferior): Use thread pointers
2806 directly.
2807 (remote_target::process_initial_stop_replies): Use
2808 thread_info::set_running.
2809 (remote_target::remote_detach_1, remote_target::detach)
2810 (extended_remote_target::detach): Adjust.
2811 * stack.c (frame_show_address): Use inferior_thread.
2812 * target-debug.h (target_debug_print_thread_info_pp): New.
2813 * target-delegates.c: Regenerate.
2814 * target.c (default_thread_address_space): Delete.
2815 (memory_xfer_partial_1): Use current_inferior.
2816 (target_detach): Use current_inferior.
2817 (target_thread_address_space): Delete.
2818 (generic_mourn_inferior): Use current_inferior.
2819 * target.h (struct target_ops) <thread_address_space>: Delete.
2820 (target_thread_address_space): Delete.
2821 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
2822 pointers directly.
2823 (delete_thread_1, delete_thread, delete_thread_silent): Take a
2824 thread pointer instead of a ptid_t. Adjust all callers.
2825 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
2826 (first_thread_of_process): Delete, replaced by ...
2827 (first_thread_of_inferior): ... this new function. All callers
2828 adjusted.
2829 (any_thread_of_process): Rename to ...
2830 (any_thread_of_inferior): ... this, and take an inferior pointer.
2831 (any_live_thread_of_process): Rename to ...
2832 (any_live_thread_of_inferior): ... this, and take an inferior
2833 pointer.
2834 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2835 (value_in_thread_stack_temporaries)
2836 (get_last_thread_stack_temporary): Take a thread pointer instead
2837 of a ptid_t. Adjust all callers.
2838 (thread_info::set_running): New.
2839 (validate_registers_access): Use inferior_thread.
2840 (can_access_registers_ptid): Rename to ...
2841 (can_access_registers_thread): ... this, and take a thread
2842 pointer.
2843 (print_thread_info_1): Adjust to compare thread pointers instead
2844 of ptids.
2845 (switch_to_no_thread, switch_to_thread): Make extern.
2846 (scoped_restore_current_thread::~scoped_restore_current_thread):
2847 Use m_thread pointer directly.
2848 (scoped_restore_current_thread::scoped_restore_current_thread):
2849 Use inferior_thread.
2850 (thread_command): Use thread pointer directly.
2851 (thread_num_make_value_helper): Use inferior_thread.
2852 * top.c (execute_command): Use inferior_thread.
2853 * tui/tui-interp.c: Include "inferior.h".
2854 * varobj.c (varobj_create): Use inferior_thread.
2855 (value_of_root_1): Use find_thread_global_id instead of
2856 global_thread_id_to_ptid.
2857
2858 2018-06-21 Alan Hayward <alan.hayward@arm.com>
2859
2860 * regcache.c (readable_regcache::read_part): Avoid memcpy when
2861 possible.
2862 (regcache::write_part): Likewise.
2863 (readable_regcache::cooked_read_part): Update comment.
2864 (readable_regcache::cooked_write_part): Likewise.
2865 * regcache.h: (readable_regcache::read_part): Likewise.
2866 (regcache::write_part): Likewise.
2867
2868 2018-06-21 Richard Bunt <richard.bunt@arm.com>
2869 Dirk Schubert <dirk.schubert@arm.com>
2870
2871 * aarch64-linux-nat.c (post_attach): New.
2872 (aarch64_linux_nat_target::post_attach): Override post_attach to
2873 record the number of hardware debug registers.
2874
2875 2018-06-20 Tom Tromey <tom@tromey.com>
2876
2877 * python/py-param.c (add_setshow_generic): Make parameters const.
2878 (parmpy_init): Update.
2879
2880 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
2881
2882 * regcache.h (regcache_cooked_read_ftype): Rename to...
2883 (register_read_ftype): ...this, change type to function_view.
2884 (class reg_buffer) <save>: Remove src parameter.
2885 (readonly_detached_regcache) <readonly_detached_regcache>: Make
2886 parameter non-const in first overload. Remove src parameter in
2887 second overload.
2888 * regcache.c (do_cooked_read): Remove.
2889 (readonly_detached_regcache::readonly_detached_regcache): Make
2890 parameter non-const, adjust call to other constructor.
2891 (reg_buffer::save): Remove src parameter.
2892 * frame.c (do_frame_register_read): Remove.
2893 (frame_save_as_regcache): Use lambda function.
2894 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
2895 parameter to ppu2spu_data *.
2896 (ppu2spu_sniffer): Use lambda function.
2897
2898 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
2899
2900 * record-full.c (record_full_target::insert_breakpoint): Remove
2901 "struct" keyword, add const.
2902
2903 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
2904
2905 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
2906 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
2907 * configure.ac: Remove AC_PREREQ, add missing quoting.
2908 * gnulib/configure.ac: Modernize usage of
2909 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
2910 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
2911 (AUTOMAKE_VERSION): Bump to 1.15.1.
2912 * configure: Re-generate.
2913 * config.in: Re-generate.
2914 * aclocal.m4: Re-generate.
2915 * gnulib/aclocal.m4: Re-generate.
2916 * gnulib/config.in: Re-generate.
2917 * gnulib/configure: Re-generate.
2918 * gnulib/import/Makefile.in: Re-generate.
2919
2920 2018-06-19 Pedro Alves <palves@redhat.com>
2921
2922 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
2923 (lookup_minimal_symbol_by_pc_section): ... here with
2924 gdb_assert_not_reached added.
2925
2926 2018-06-19 Pedro Alves <palves@redhat.com>
2927
2928 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
2929 parameter with a block parameter. Compare location's block symbol
2930 with the frame's block instead of addresses.
2931 (skip_inline_frames): Pass the current block instead of the
2932 frame's address. Break out as soon as we determine the frame
2933 should not be skipped.
2934
2935 2018-06-18 Tom Tromey <tom@tromey.com>
2936
2937 * solib-aix.c (solib_aix_get_section_offsets): Return
2938 unique_xmalloc_ptr.
2939 (solib_aix_solib_create_inferior_hook): Update.
2940
2941 2018-06-18 Tom Tromey <tom@tromey.com>
2942
2943 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
2944
2945 2018-06-18 Tom Tromey <tom@tromey.com>
2946
2947 * solib-frv.c (frv_relocate_main_executable): Use
2948 unique_xmalloc_ptr.
2949 * solib-dsbt.c (dsbt_relocate_main_executable): Use
2950 unique_xmalloc_ptr.
2951
2952 2018-06-18 Tom Tromey <tom@tromey.com>
2953
2954 * objfiles.h (inhibit_section_map_updates): Update.
2955 (resume_section_map_updates, resume_section_map_updates_cleanup):
2956 Remove.
2957 * solib-svr4.c (svr4_handle_solib_event): Update.
2958 * objfiles.c (inhibit_section_map_updates): Return
2959 scoped_restore_tmpl<int>.
2960 (resume_section_map_updates, resume_section_map_updates_cleanup):
2961 Remove.
2962
2963 2018-06-18 Tom Tromey <tom@tromey.com>
2964
2965 * valprint.h (read_string): Update.
2966 * valprint.c (read_string): Change type of "buffer".
2967 (val_print_string): Update.
2968 * python/py-value.c (valpy_string): Update.
2969 * language.h (struct language_defn) <la_get_string>: Change
2970 type of "buffer".
2971 (default_get_string, c_get_string): Update.
2972 * language.c (default_get_string): Change type of "buffer".
2973 * guile/scm-value.c (gdbscm_value_to_string): Update.
2974 * c-lang.c (c_get_string): Change type of "buffer".
2975
2976 2018-06-18 Tom Tromey <tom@tromey.com>
2977
2978 * ser-mingw.c (struct pipe_state_destroyer): New.
2979 (pipe_state_up): New typedef.
2980 (cleanup_pipe_state): Remove.
2981 (pipe_windows_open): Use pipe_state_up. Don't release argv.
2982
2983 2018-06-18 Tom Tromey <tom@tromey.com>
2984
2985 * rust-lang.h (rust_yyerror): Don't declare.
2986 * rust-lang.c (rust_language_defn): Update.
2987 * rust-exp.y (yyerror): Now static.
2988 * parse.c (parse_exp_in_context_1): Update.
2989 * p-lang.h (p_yyerror): Don't declare.
2990 * p-lang.c (p_language_defn): Update.
2991 * p-exp.y (yyerror): Now static.
2992 * opencl-lang.c (opencl_language_defn): Update.
2993 * objc-lang.c (objc_language_defn): Update.
2994 * m2-lang.h (m2_yyerror): Don't declare.
2995 * m2-lang.c (m2_language_defn): Update.
2996 * m2-exp.y (yyerror): Now static.
2997 * language.h (struct language_defn) <la_error>: Remove.
2998 * language.c (unk_lang_error): Remove.
2999 (unknown_language_defn, auto_language_defn): Remove.
3000 * go-lang.h (go_yyerror): Don't declare.
3001 * go-lang.c (go_language_defn): Update.
3002 * go-exp.y (yyerror): Now static.
3003 * f-lang.h (f_yyerror): Don't declare.
3004 * f-lang.c (f_language_defn): Update.
3005 * f-exp.y (yyerror): Now static.
3006 * d-lang.h (d_yyerror): Don't declare.
3007 * d-lang.c (d_language_defn): Update.
3008 * d-exp.y (yyerror): Now static.
3009 * c-lang.h (c_yyerror): Don't declare.
3010 * c-lang.c (c_language_defn, cplus_language_defn)
3011 (asm_language_defn, minimal_language_defn): Update.
3012 * c-exp.y (yyerror): Now static.
3013 * ada-lang.h (ada_yyerror): Don't declare.
3014 * ada-lang.c (ada_language_defn): Update.
3015 * ada-exp.y (yyerror): Now static.
3016
3017 2018-06-18 Alan Hayward <alan.hayward@arm.com>
3018
3019 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
3020 (store_sveregs_to_thread): Likewise.
3021 (aarch64_linux_fetch_inferior_registers): Check for SVE.
3022 (aarch64_linux_store_inferior_registers): Likewise.
3023 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
3024 function.
3025 (aarch64_sve_regs_copy_to_regcache): Likewise.
3026 (aarch64_sve_regs_copy_from_regcache): Likewise.
3027 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
3028 declaration.
3029 (aarch64_sve_regs_copy_to_regcache): Likewise.
3030 (aarch64_sve_regs_copy_from_regcache): Likewise.
3031 (sve_context): Structure from Linux headers.
3032 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
3033 (SVE_SIG_ZREG_SIZE): Likewise.
3034 (SVE_SIG_PREG_SIZE): Likewise.
3035 (SVE_SIG_FFR_SIZE): Likewise.
3036 (SVE_SIG_REGS_OFFSET): Likewise.
3037 (SVE_SIG_ZREGS_OFFSET): Likewise.
3038 (SVE_SIG_ZREG_OFFSET): Likewise.
3039 (SVE_SIG_ZREGS_SIZE): Likewise.
3040 (SVE_SIG_PREGS_OFFSET): Likewise.
3041 (SVE_SIG_PREG_OFFSET): Likewise.
3042 (SVE_SIG_PREGS_SIZE): Likewise.
3043 (SVE_SIG_FFR_OFFSET): Likewise.
3044 (SVE_SIG_REGS_SIZE): Likewise.
3045 (SVE_SIG_CONTEXT_SIZE): Likewise.
3046 (SVE_PT_REGS_MASK): Likewise.
3047 (SVE_PT_REGS_FPSIMD): Likewise.
3048 (SVE_PT_REGS_SVE): Likewise.
3049 (SVE_PT_VL_INHERIT): Likewise.
3050 (SVE_PT_VL_ONEXEC): Likewise.
3051 (SVE_PT_REGS_OFFSET): Likewise.
3052 (SVE_PT_FPSIMD_OFFSET): Likewise.
3053 (SVE_PT_FPSIMD_SIZE): Likewise.
3054 (SVE_PT_SVE_ZREG_SIZE): Likewise.
3055 (SVE_PT_SVE_PREG_SIZE): Likewise.
3056 (SVE_PT_SVE_FFR_SIZE): Likewise.
3057 (SVE_PT_SVE_FPSR_SIZE): Likewise.
3058 (SVE_PT_SVE_FPCR_SIZE): Likewise.
3059 (__SVE_SIG_TO_PT): Likewise.
3060 (SVE_PT_SVE_OFFSET): Likewise.
3061 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
3062 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
3063 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
3064 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
3065 (SVE_PT_SVE_PREG_OFFSET): Likewise.
3066 (SVE_PT_SVE_PREGS_SIZE): Likewise.
3067 (SVE_PT_SVE_FFR_OFFSET): Likewise.
3068 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
3069 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
3070 (SVE_PT_SVE_SIZE): Likewise.
3071 (SVE_PT_SIZE): Likewise.
3072 (HAS_SVE_STATE): New define.
3073
3074 2018-06-18 Alan Hayward <alan.hayward@arm.com>
3075
3076 * nat/aarch64-sve-linux-sigcontext.h: New file.
3077 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
3078 new files.
3079 (SVE_VQ_MIN): Likewise.
3080 (SVE_VQ_MAX): Likewise.
3081 (SVE_VL_MIN): Likewise.
3082 (SVE_VL_MAX): Likewise.
3083 (SVE_NUM_ZREGS): Likewise.
3084 (SVE_NUM_PREGS): Likewise.
3085 (sve_vl_valid): Likewise.
3086 (struct user_sve_header): Likewise.
3087
3088 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
3089 Richard Bunt <Richard.Bunt@arm.com>
3090
3091 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
3092 was requested by GDB.
3093
3094 2018-06-15 Tom de Vries <tdevries@suse.de>
3095
3096 * MAINTAINERS (Write After Approval): Add Tom de Vries.
3097
3098 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
3099
3100 * gnulib/update-gnulib.sh: Print expected versions of
3101 autoconf/aclocal.
3102
3103 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
3104
3105 * arch-utils.c (default_type_align): Use type_length_units.
3106 * gdbtypes.c (type_align): Use type_length_units.
3107
3108 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3109
3110 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
3111 of 'define' command.
3112
3113 2018-06-14 Tom de Vries <tdevries@suse.de>
3114
3115 PR cli/22573
3116 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
3117 get_no_prettyformat_print_options.
3118
3119 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
3120
3121 * sparc-nat.h: Include target.h.
3122 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
3123 <fetch_registers>: Remove this argument in function call.
3124 <store_registers>: Remove this argument in function call, remove
3125 extra semicolon.
3126 <low_forget_process>: Call sparc64_forget_process instead of
3127 sparc_forget_process.
3128
3129 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3130
3131 * procfs.c (_initialize_procfs): Use add_inf_child_target.
3132 (procfs_target::make_corefile_notes): Adjust to new
3133 target_read_alloc return type.
3134
3135 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3136 Stephen Roberts <stephen.roberts@arm.com>
3137
3138 PR gdb/22882
3139 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
3140 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
3141 Move should_notify_stop local into more inner scope.
3142
3143 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3144 Stephen Roberts <stephen.roberts@arm.com>
3145
3146 PR gdb/22882
3147 * infrun.c (resume_1): Add call to mark_async_event_handler.
3148
3149 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3150
3151 * infrun.c (do_target_wait): Change old version of $pc printed.
3152
3153 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
3154
3155 * dwarf2read.c (read_index_from_section): Rename to...
3156 (read_gdb_index_from_section): ... this, update all callers.
3157 (dwarf2_read_index): Rename to...
3158 (dwarf2_read_gdb_index): ... this, update all callers.
3159
3160 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
3161
3162 * gdb/hppa-linux-nat.c
3163 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
3164 hppa_linux_nat_target::fetch_registers.
3165
3166 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3167
3168 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
3169 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
3170 (AARCH64_DWARF_SVE_FFR): Likewise.
3171 (AARCH64_DWARF_SVE_P0): Likewise.
3172 (AARCH64_DWARF_SVE_Z0): Likewise.
3173
3174 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3175
3176 * common/common-regcache.h (raw_compare): New function.
3177 * regcache.c (regcache::raw_compare): Likewise.
3178 * regcache.h (regcache::raw_compare): New declaration.
3179
3180 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3181
3182 * common/common-regcache.h (reg_buffer_common): New structure.
3183 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
3184 (reg_buffer::raw_supply): Likewise.
3185 (reg_buffer::raw_supply_integer): Likewise.
3186 (reg_buffer::raw_supply_zeroed): Likewise.
3187 (reg_buffer::raw_collect): Likewise.
3188 (reg_buffer::raw_collect_integer): Likewise.
3189 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
3190 (reg_buffer::raw_supply): Likewise.
3191 (reg_buffer::raw_supply_integer): Likewise.
3192 (reg_buffer::raw_supply_zeroed): Likewise.
3193 (reg_buffer::raw_collect): Likewise.
3194 (reg_buffer::raw_collect_integer): Likewise.
3195
3196 2018-06-10 Tom Tromey <tom@tromey.com>
3197
3198 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
3199 (class remote_state) <stop_reply_queue>: Now std::vector.
3200 (remote_state::~remote_state)
3201 (remote_target::stop_reply_queue_length): Update.
3202 (struct queue_iter_param, remove_child_of_pending_fork)
3203 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
3204 (check_pending_event_prevents_wildcard_vcont_callback)
3205 (remove_stop_reply_for_inferior)
3206 (remove_stop_reply_of_remote_state)
3207 (remote_notif_remove_once_on_match)
3208 (stop_reply_match_ptid_and_ws)
3209 (remote_kill_child_of_pending_fork): Remove.
3210 (remote_target::remove_new_fork_children)
3211 (remote_target::check_pending_events_prevent_wildcard_vcont)
3212 (remote_target::discard_pending_stop_replies)
3213 (remote_target::discard_pending_stop_replies_in_queue)
3214 (remote_target::remote_notif_remove_queued_reply)
3215 (remote_target::queued_stop_reply)
3216 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
3217 (remote_target::wait, remote_target::kill_new_fork_children)
3218 (remote_target::async): Update.
3219
3220 2018-06-10 Tom Tromey <tom@tromey.com>
3221
3222 * record-full.c (record_full_arch_list_cleanups): Remove.
3223 (record_full_message): Use try/catch.
3224 (record_full_wait_cleanups): Remove.
3225 (record_full_wait_1): Use try/catch.
3226 (record_full_restore): Likewise.
3227
3228 2018-06-10 Tom Tromey <tom@tromey.com>
3229
3230 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
3231 declare VEC. Add constructor.
3232 <in_target_beneath>: Now bool.
3233 (record_full_breakpoints): Now a std::vector, static.
3234 (record_full_sync_record_breakpoints)
3235 (record_full_init_record_breakpoints)
3236 (record_full_target::insert_breakpoint)
3237 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
3238
3239 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
3240
3241 * dwarf2read.c (process_cu_includes): Remove struct keyword.
3242 * serial.c (serial_interface_lookup): Remove struct keyword.
3243
3244 2018-06-10 Tom Tromey <tom@tromey.com>
3245
3246 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
3247 method.
3248 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
3249 a method.
3250 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
3251 method.
3252 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
3253 "beneath" as a method.
3254 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
3255 Use "beneath" as a method.
3256
3257 2018-06-10 Tom Tromey <tom@tromey.com>
3258
3259 * tracefile.c (struct trace_file_writer_deleter): New.
3260 <operator()>: Rename from trace_file_writer_xfree.
3261 (trace_file_writer_up): New typedef.
3262 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
3263
3264 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
3265
3266 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
3267 <m_registers, m_register_status>: Change type to
3268 std::unique_ptr.
3269 * regcache.c (reg_buffer::reg_buffer): Use new instead of
3270 XCNEWVEC.
3271
3272 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
3273
3274 * common/common-regcache.h (enum register_status): Add
3275 underlying type "signed char".
3276 * regcache.h (reg_buffer) <m_register_status>: Change type to
3277 register_status *.
3278 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
3279 register_status instead of signed char.
3280 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
3281 (reg_buffer::get_register_status): Remove cast.
3282 (readable_regcache::raw_read): Remove cast.
3283 (readable_regcache::cooked_read): Remove cast.
3284
3285 2018-06-09 Tom Tromey <tom@tromey.com>
3286
3287 * source.c (reverse_search_command, forward_search_command): Use
3288 scoped_fd.
3289
3290 2018-06-09 Tom Tromey <tom@tromey.com>
3291
3292 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
3293 (serial_ops_list): Now static, std::vector.
3294 (serial_interface_lookup, serial_add_interface): Update.
3295
3296 2018-06-09 Tom Tromey <tom@tromey.com>
3297
3298 * dwarf2read.c (process_cu_includes): Update.
3299 (process_full_comp_unit): Update.
3300 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
3301 std::vector.
3302
3303 2018-06-08 Paul Koning <paul_koning@dell.com>
3304
3305 PR gdb/23252
3306
3307 * python/python.c (do_start_initialization):
3308 Avoid call to internal Python API.
3309 (init__gdb_module): New function.
3310
3311 2018-06-08 Gary Benson <gbenson@redhat.com>
3312
3313 * linux-thread-db.c (valprint.h): New include.
3314 (struct check_thread_db_info): New structure.
3315 (check_thread_db_on_load, tdb_testinfo): New static globals.
3316 (check_thread_db, check_thread_db_callback): New functions.
3317 (try_thread_db_load_1): Run integrity checks if requested.
3318 (maintenance_check_libthread_db): New function.
3319 (_initialize_thread_db): Register "maint check libthread-db"
3320 and "maint set/show check-libthread-db".
3321 * NEWS: Mention the above new commands.
3322
3323 2018-06-08 Tom Tromey <tom@tromey.com>
3324
3325 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
3326 now a method.
3327
3328 2018-06-08 Tom Tromey <tom@tromey.com>
3329
3330 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
3331
3332 2018-06-08 Tom Tromey <tom@tromey.com>
3333
3334 * common/btrace-common.h (struct btrace_data): Add constructor,
3335 destructor, move assignment operator.
3336 <empty, clear, fini>: New methods.
3337 <format>: Initialize.
3338 (btrace_data_init, btrace_data_fini, btrace_data_clear)
3339 (btrace_data_empty): Don't declare.
3340 * common/btrace-common.c (btrace_data_init): Remove.
3341 (btrace_data::fini): Rename from btrace_data_fini.
3342 (btrace_data::empty): Rename from btrace_data_empty.
3343 (btrace_data::clear): Rename from btrace_data_clear. Return
3344 bool.
3345 * btrace.h (make_cleanup_btrace_data): Don't declare.
3346 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
3347 (parse_xml_btrace): Update.
3348 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
3349 (maint_btrace_clear_packet_history_cmd): Update.
3350
3351 2018-06-07 Pedro Alves <palves@redhat.com>
3352
3353 * target.h (target_ops) <beneath>: Now a method. All references
3354 updated.
3355 (class target_stack): New.
3356 * target.c (g_target_stack): New.
3357 (g_current_top_target): Delete.
3358 (current_top_target): Get the top target out of g_target_stack.
3359 (target_stack::push, target_stack::unpush): New.
3360 (push_target, unpush_target): Reimplement.
3361 (target_is_pushed): Reimplement in terms of g_target_stack.
3362 (target_ops::beneath, target_stack::find_beneath): New.
3363
3364 2018-06-07 Pedro Alves <palves@redhat.com>
3365
3366 * target.h (find_target_beneath): Delete declaration.
3367 * target.c (find_target_beneath): Delete definition.
3368 * aix-thread.c: All callers of find_target_beneath adjusted to
3369 call target_ops::beneath instead.
3370 * bsd-uthread.c: Likewise.
3371 * linux-thread-db.c: Likewise.
3372 * ravenscar-thread.c: Likewise.
3373 * sol-thread.c: Likewise.
3374 * spu-multiarch.c: Likewise.
3375
3376 2018-06-07 Pedro Alves <palves@redhat.com>
3377
3378 * target.h (target_ops) <beneath>: Now a method. All references
3379 updated.
3380 (target_ops) <m_beneath>: New.
3381 * target.c (target_ops::beneath): New.
3382 * corelow.c: Adjust all references to target_ops::beneath.
3383 * linux-thread-db.c: Likewise.
3384 * make-target-delegates: Likewise.
3385 * record-btrace.c: Likewise.
3386 * record-full.c: Likewise.
3387 * remote.c: Likewise.
3388 * target.c: Likewise.
3389 * target-delegates.c: Regenerate.
3390
3391 2018-06-07 Pedro Alves <palves@redhat.com>
3392
3393 * target.h (target_stack): Delete.
3394 (current_top_target): Declare function.
3395 * target.c (target_stack): Delete.
3396 (g_current_top_target): New.
3397 (current_top_target): New function.
3398 * auxv.c: Use current_top_target instead of target_stack
3399 throughout.
3400 * avr-tdep.c: Likewise.
3401 * breakpoint.c: Likewise.
3402 * corefile.c: Likewise.
3403 * elfread.c: Likewise.
3404 * eval.c: Likewise.
3405 * exceptions.c: Likewise.
3406 * frame.c: Likewise.
3407 * gdbarch-selftests.c: Likewise.
3408 * gnu-v3-abi.c: Likewise.
3409 * ia64-tdep.c: Likewise.
3410 * ia64-vms-tdep.c: Likewise.
3411 * infcall.c: Likewise.
3412 * infcmd.c: Likewise.
3413 * infrun.c: Likewise.
3414 * linespec.c: Likewise.
3415 * linux-tdep.c: Likewise.
3416 * minsyms.c: Likewise.
3417 * ppc-linux-nat.c: Likewise.
3418 * ppc-linux-tdep.c: Likewise.
3419 * procfs.c: Likewise.
3420 * regcache.c: Likewise.
3421 * remote.c: Likewise.
3422 * rs6000-tdep.c: Likewise.
3423 * s390-linux-nat.c: Likewise.
3424 * s390-tdep.c: Likewise.
3425 * solib-aix.c: Likewise.
3426 * solib-darwin.c: Likewise.
3427 * solib-dsbt.c: Likewise.
3428 * solib-spu.c: Likewise.
3429 * solib-svr4.c: Likewise.
3430 * solib-target.c: Likewise.
3431 * sparc-tdep.c: Likewise.
3432 * sparc64-tdep.c: Likewise.
3433 * spu-tdep.c: Likewise.
3434 * symfile.c: Likewise.
3435 * symtab.c: Likewise.
3436 * target-descriptions.c: Likewise.
3437 * target-memory.c: Likewise.
3438 * target.c: Likewise.
3439 * target.h: Likewise.
3440 * tracefile-tfile.c: Likewise.
3441 * tracepoint.c: Likewise.
3442 * valops.c: Likewise.
3443 * valprint.c: Likewise.
3444 * value.c: Likewise.
3445 * windows-tdep.c: Likewise.
3446 * mi/mi-main.c: Likewise.
3447
3448 2018-06-07 Tom Tromey <tom@tromey.com>
3449
3450 * valprint.h (build_address_symbolic): Declare.
3451 * printcmd.c (print_address_symbolic): Update.
3452 (build_address_symbolic): Change "name" and "filename" to
3453 std::string.
3454 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
3455 Update.
3456 * defs.h (build_address_symbolic): Remove declaration.
3457
3458 2018-06-07 Alan Hayward <alan.hayward@arm.com>
3459
3460 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
3461 (aarch64_vnv_type): Add function.
3462 (aarch64_pseudo_register_name): Add V regs for SVE.
3463 (aarch64_pseudo_register_type): Likewise.
3464 (aarch64_pseudo_register_reggroup_p): Likewise.
3465 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
3466 (aarch64_pseudo_read_value): Add V regs for SVE.
3467 (aarch64_pseudo_write_2): Use V0 offset for SVE
3468 (aarch64_pseudo_write): Add V regs for SVE.
3469 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
3470
3471 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
3472
3473 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
3474 (sve_vl_from_vq): Likewise.
3475
3476 2018-06-05 Tom Tromey <tom@tromey.com>
3477
3478 * cli/cli-cmds.c (show_version): Update.
3479 * top.c (print_gdb_version): Add "interactive" parameter.
3480 Update.
3481 * main.c (captured_main_1): Update.
3482 * top.h (print_gdb_version): Add "interactive" parameter and a
3483 comment.
3484
3485 2018-06-05 David Malcolm <dmalcolm@redhat.com>
3486
3487 * common/enum-flags.h: Add trailing semicolon to example in
3488 comment.
3489
3490 2018-06-05 Tom Tromey <tom@tromey.com>
3491
3492 PR cli/12326:
3493 * NEWS: Add entry about pager.
3494 * utils.c (pagination_disabled_for_command): New global.
3495 (prompt_for_continue): Allow "c" response to prompt.
3496 (reinitialize_more_filter): Clear
3497 pagination_disabled_for_command.
3498 (fputs_maybe_filtered): Check pagination_disabled_for_command.
3499
3500 2018-06-04 Tom Tromey <tom@tromey.com>
3501
3502 * ada-lang.h (ada_lookup_symbol_list): Update.
3503 * ada-lang.c (resolve_subexp): Update.
3504 (symbols_are_identical_enums): Change type of syms. Remove nsyms
3505 parameter.
3506 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
3507 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
3508 results parameter to std::vector.
3509 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
3510 Update.
3511 * ada-exp.y (block_lookup): Update.
3512 (select_possible_type_sym): Change type of syms. Remove nsyms
3513 parameter.
3514 (write_var_or_type, write_name_assoc): Update.
3515
3516 2018-06-04 Joel Brobecker <brobecker@adacore.com>
3517
3518 * windows-nat.c (windows_nat_target::xfer_partial): Return
3519 TARGET_XFER_E_IO if we need to delegate to the target beneath
3520 but BENEATH is NULL.
3521
3522 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
3523
3524 * Makefile.in (config.status): Add configure.nat as a
3525 dependency.
3526
3527 2018-06-04 Tom Tromey <tom@tromey.com>
3528
3529 * cp-name-parser.y (cpname_state): Add method declarations.
3530 (HANDLE_QUAL): Update.
3531 (cpname_state::d_grab, cpname_state::fill_comp)
3532 (cpname_state::make_operator, cpname_state::make_dtor)
3533 (cpname_state::make_builtin_type, cpname_state::make_name)
3534 (cpname_state::d_qualify, cpname_state::d_int_type)
3535 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
3536 (%union): Move earlier.
3537
3538 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3539
3540 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
3541
3542 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3543
3544 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
3545 (aarch64_pseudo_write_1): Likewise.
3546 (aarch64_pseudo_read_value): Use helper.
3547 (aarch64_pseudo_write): Likewise.
3548
3549 2018-06-04 Pedro Alves <palves@redhat.com>
3550
3551 * darwin-nat.c (darwin_ops): Delete.
3552 (darwin_attach_pid): Use get_native_target.
3553
3554 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3555
3556 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
3557 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
3558
3559 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3560
3561 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
3562 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
3563 (aarch64_gdbarch_init): Check for SVE.
3564 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
3565
3566 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3567
3568 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
3569 * aarch64-tdep.h (aarch64_read_description): Likewise.
3570 * arch/aarch64.c (aarch64_create_target_description): Likewise.
3571 * arch/aarch64.h (aarch64_create_target_description): Likewise.
3572 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
3573 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
3574 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
3575
3576 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
3577
3578 * value.c (value_fetch_lazy_bitfield): New.
3579 (value_fetch_lazy_memory): New.
3580 (value_fetch_lazy_register): New.
3581 (value_fetch_lazy): Factor out to smaller functions.
3582
3583 2018-06-01 Tom Tromey <tom@tromey.com>
3584
3585 * cp-name-parser.y (backslashable, represented): Now const.
3586
3587 2018-06-01 Tom Tromey <tom@tromey.com>
3588
3589 * cp-name-parser.y: Include parser-defs.h.
3590 (parser_fprintf): Remove declaration.
3591
3592 2018-06-01 Tom Tromey <tom@tromey.com>
3593
3594 * cp-name-parser.y: Use %pure-parser, %lex-param, and
3595 %parse-param.
3596 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
3597 (global_result): Remove globals.
3598 (struct cpname_state): New.
3599 (yyparse): Don't declare.
3600 (yylex, yyerror): Move declarations after %union.
3601 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
3602 (make_name): Add state parameter.
3603 Update all callers.
3604 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
3605 parameter.
3606 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
3607 Update.
3608 (yylex): Add lvalp, state parameters.
3609 (yyerror): Add state parameter.
3610 (cp_demangled_name_to_comp): Update.
3611
3612 2018-06-01 Tom Tromey <tom@tromey.com>
3613
3614 * cp-name-parser.y (parser_fprintf): Declare.
3615 (GDB_YY_REMAP_PREFIX): Define.
3616 Include yy-remap.h. Don't redefine yy* identifiers.
3617
3618 2018-06-01 Tom Tromey <tom@tromey.com>
3619
3620 * python/py-type.c (typy_legacy_template_argument): Update.
3621 * cp-support.h (cp_demangled_name_to_comp): Update.
3622 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
3623 parameter to be a "std::string *".
3624 (main): Update.
3625
3626 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
3627
3628 * ada-lex.l: Include "diagnostics.h" instead of
3629 "common/diagnostics.h".
3630 * unittests/environ-selftests.c: Likewise.
3631 * common/diagnostics.h: Moved to ../include.
3632
3633 2018-06-01 Joel Brobecker <brobecker@adacore.com>
3634
3635 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
3636 to language_mode_manual while calling breakpoint_re_set_one.
3637
3638 2018-06-01 Tom Tromey <tom@tromey.com>
3639
3640 * valops.c (value_cast_structs, destructor_name_p): Update.
3641 * symtab.c (gdb_mangle_name): Update.
3642 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
3643 Update.
3644 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
3645 (pascal_object_print_value_fields, pascal_object_print_value):
3646 Update.
3647 * p-typeprint.c (pascal_type_print_derivation_info): Update.
3648 * linespec.c (find_methods): Update.
3649 * gdbtypes.h (type_name_no_tag): Remove.
3650 (type_name_or_error): Rename from type_name_no_tag_or_error.
3651 * gdbtypes.c (type_name_no_tag): Remove.
3652 (type_name_or_error): Rename from type_name_no_tag_or_error.
3653 (lookup_struct_elt_type, check_typedef): Update.
3654 * expprint.c (print_subexp_standard): Update.
3655 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
3656 * d-namespace.c (d_lookup_nested_symbol): Update.
3657 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
3658 (cp_print_class_member): Update.
3659 * cp-namespace.c (cp_lookup_nested_symbol): Update.
3660 * completer.c (add_struct_fields): Update.
3661 * c-typeprint.c (cp_type_print_derivation_info)
3662 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
3663 Update.
3664 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
3665 (ada_prefer_type, ada_is_exception_sym): Update.
3666
3667 2018-06-01 Tom Tromey <tom@tromey.com>
3668
3669 * valops.c (enum_constant_from_type, value_namespace_elt)
3670 (value_maybe_namespace_elt): Update.
3671 * valarith.c (find_size_for_pointer_math): Update.
3672 * target-descriptions.c (make_gdb_type): Update.
3673 * symmisc.c (print_symbol): Update.
3674 * stabsread.c (define_symbol, read_type)
3675 (complain_about_struct_wipeout, add_undefined_type)
3676 (cleanup_undefined_types_1): Update.
3677 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
3678 (rust_range_type_p, val_print_struct, rust_print_struct_def)
3679 (rust_internal_print_type, rust_composite_type)
3680 (rust_evaluate_funcall, rust_evaluate_subexp)
3681 (rust_inclusive_range_type_p): Update.
3682 * python/py-type.c (typy_get_tag): Update.
3683 * p-typeprint.c (pascal_type_print_base): Update.
3684 * mdebugread.c (parse_symbol, parse_type): Update.
3685 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
3686 Update.
3687 * guile/scm-type.c (gdbscm_type_tag): Update.
3688 * go-lang.c (sixg_string_p): Update.
3689 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
3690 Update.
3691 * gdbtypes.h (struct main_type) <tag_name>: Remove.
3692 (TYPE_TAG_NAME): Remove.
3693 * gdbtypes.c (type_name_no_tag): Simplify.
3694 (check_typedef, check_types_equal, recursive_dump_type)
3695 (copy_type_recursive, arch_composite_type): Update.
3696 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
3697 in summary mode when needed.
3698 * eval.c (evaluate_funcall): Update.
3699 * dwarf2read.c (fixup_go_packaging, read_structure_type)
3700 (process_structure_scope, read_enumeration_type)
3701 (read_namespace_type, read_module_type, determine_prefix): Update.
3702 * cp-support.c (inspect_type): Update.
3703 * coffread.c (process_coff_symbol, decode_base_type): Update.
3704 * c-varobj.c (c_is_path_expr_parent): Update.
3705 * c-typeprint.c (c_type_print_base_struct_union): Update.
3706 (c_type_print_base_1): Update. Print struct/class/union/enum in
3707 summary when using C language.
3708 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
3709 (gen_maybe_namespace_elt): Update.
3710 * ada-lang.c (ada_type_name): Simplify.
3711 (empty_record, ada_template_to_fixed_record_type_1)
3712 (template_to_static_fixed_type)
3713 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
3714
3715 2018-06-01 Tom Tromey <tom@tromey.com>
3716
3717 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
3718 c_print_type.
3719 * c-typeprint.c (c_print_type_1): Add "language" parameter.
3720 (c_print_type): Update.
3721 (c_print_type): New overload.
3722 (c_type_print_varspec_prefix, c_type_print_args)
3723 (c_type_print_varspec_suffix, c_print_type_no_offsets)
3724 (c_type_print_base_struct_union, c_type_print_base_1)
3725 (cp_type_print_method_args): Add "language" parameter.
3726 (c_type_print_base): Update.
3727 * c-lang.h (c_print_type): Add new overload.
3728
3729 2018-06-01 Tom Tromey <tom@tromey.com>
3730
3731 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
3732 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
3733
3734 2018-06-01 Alan Hayward <alan.hayward@arm.com>
3735
3736 * aarch64-tdep.c (aarch64_sve_register_names): New const
3737 var.
3738 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
3739 (AARCH64_SVE_Z_REGS_NUM): New define.
3740 (AARCH64_SVE_P_REGS_NUM): Likewise.
3741 (AARCH64_SVE_NUM_REGS): Likewise.
3742
3743 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
3744
3745 * nat/linux-ptrace.h [__alpha__]
3746 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
3747 definitions.
3748
3749 2018-05-31 Maciej W. Rozycki <macro@mips.com>
3750
3751 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
3752 the endianness selected.
3753 * NEWS: Document `set endian auto' mode operation update.
3754
3755 2018-05-31 Alan Hayward <alan.hayward@arm.com>
3756
3757 * Makefile.in: Add new header.
3758 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
3759 (sve_vl_from_vg): Likewise.
3760 (sve_vq_from_vl): Likewise.
3761 (sve_vl_from_vq): Likewise.
3762 (sve_vq_from_vg): Likewise.
3763 (sve_vg_from_vq): Likewise.
3764 * configure.nat: Add new c file.
3765 * nat/aarch64-sve-linux-ptrace.c: New file.
3766 * nat/aarch64-sve-linux-ptrace.h: New file.
3767
3768 2018-05-31 Alan Hayward <alan.hayward@arm.com>
3769
3770 * aarch64-linux-nat.c (aarch64_linux_read_description):
3771 Add parmeter zero.
3772 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
3773 Likewise.
3774 * aarch64-tdep.c (tdesc_aarch64_list): Add.
3775 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
3776 (aarch64_gdbarch_init): Add parmeter zero.
3777 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
3778 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
3779 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
3780 parmeter.
3781 * doc/gdb.texinfo: Describe SVE feature
3782 * features/aarch64-sve.c: New file.
3783
3784 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
3785
3786 PR gdb/23210
3787 * gdbarch.sh (significant_addr_bit): Default to zero when
3788 not set by target architecture.
3789 * gdbarch.c: Re-generated.
3790 * utils.c (address_significant): Update.
3791
3792 2018-05-30 Joel Brobecker <brobecker@adacore.com>
3793
3794 * stack.c (func_command): Remove trailing newline in call to error.
3795
3796 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3797
3798 * regcache.h (regcache_raw_collect): Remove, update callers to
3799 use regcache::raw_collect.
3800 * regcache.c (regcache_raw_collect): Remove.
3801
3802 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3803
3804 * regcache.h (regcache_raw_supply): Remove, update callers to
3805 use detached_regcache::raw_supply.
3806 * regcache.c (regcache_raw_supply): Remove.
3807
3808 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3809
3810 * regcache.h (regcache_cooked_write_part): Remove, update
3811 callers to use regcache::cooked_write_part.
3812 * regcache.c (regcache_cooked_write_part): Remove.
3813
3814 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3815
3816 * regcache.h (regcache_cooked_read_part): Remove, update callers
3817 to use readable_regcache::cooked_read_part.
3818 * regcache.c (regcache_cooked_read_part): Remove.
3819
3820 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3821
3822 * regcache.h (regcache_cooked_read_value): Remove, update
3823 callers to use readable_regcache::cooked_read_value.
3824 * regcache.c (regcache_cooked_read_value): Remove.
3825
3826 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3827
3828 * regcache.h (regcache_cooked_write): Remove, update callers to
3829 use regcache::cooked_write.
3830 * regcache.c (regcache_cooked_write): Remove.
3831
3832 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3833
3834 * regcache.h (regcache_invalidate): Remove, update callers to
3835 use detached_regcache::invalidate instead.
3836 * regcache.c (regcache_invalidate): Remove.
3837
3838 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3839
3840 * regcache.h (regcache_raw_write_part): Remove, update callers
3841 to use regcache::raw_write_part instead.
3842 * regcache.c (regcache_raw_write_part): Remove.
3843
3844 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3845
3846 * regcache.h (regcache_raw_read_part): Remove, update callers to
3847 use readable_regcache::raw_read_part instead.
3848 * regcache.c (regcache_raw_read_part): Remove.
3849
3850 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3851
3852 * regcache.h (regcache_cooked_read): Remove, update callers to
3853 use readable_regcache::cooked_read instead.
3854 * regcache.c (regcache_cooked_read): Remove.
3855
3856 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3857
3858 * regcache.h (regcache_raw_write): Remove, update callers to use
3859 regcache::raw_write instead.
3860 * regcache.c (regcache_raw_write): Remove.
3861
3862 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3863
3864 * regcache.h (regcache_raw_read): Remove, update callers to use
3865 readable_regcache::raw_read instead.
3866 * regcache.c (regcache_raw_read): Remove.
3867
3868 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3869
3870 * regcache.h (regcache_raw_update): Remove, update callers to
3871 use readable_regcache::raw_update instead.
3872 * regcache.c (regcache_raw_update): Remove.
3873
3874 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3875
3876 * regcache.h (regcache_register_status): Remove, update callers
3877 to use reg_buffer::get_register_status directly instead.
3878 * regcache.c (regcache_register_status): Remove.
3879
3880 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3881
3882 * regcache.h (regcache_get_ptid): Remove, update all callers to
3883 call regcache::ptid instead.
3884 * regcache.c (regcache_get_ptid): Remove.
3885
3886 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3887
3888 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
3889
3890 2018-05-30 Pedro Alves <palves@redhat.com>
3891
3892 * common/common-exceptions.h (exception_rethrow): Use
3893 ATTRIBUTE_NORETURN.
3894
3895 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
3896
3897 * breakpoint.c (print_solib_event, check_status_catch_solib):
3898 Remove struct keyword in range-based for loops.
3899 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
3900 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
3901 Likewise.
3902 * linespec.c (find_superclass_methods, search_minsyms_for_name):
3903 Likewise.
3904 * symfile.c (addr_info_make_relative): Likewise.
3905 * thread.c (value_in_thread_stack_temporaries): Likewise.
3906
3907 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
3908
3909 PR gdb/16841
3910 * valops.c (value_struct_elt_for_reference): Call check_typedef on
3911 aggregate type to get its real type before accessing it.
3912
3913 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
3914
3915 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
3916 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
3917 * coff-pe-read.c (add_pe_forwarded_sym): Replace
3918 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
3919 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
3920 * jit.c (jit_breakpoint_re_set_internal): Likewise.
3921 * printcmd.c (info_address_command): Likewise.
3922
3923 2018-05-29 Tom Tromey <tom@tromey.com>
3924
3925 * windows-nat.c (handle_exception): Update fall-through comment.
3926
3927 2018-05-29 Tom Tromey <tom@tromey.com>
3928
3929 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
3930 (struct program_space) <added_solibs>: Now a std::vector.
3931 * breakpoint.c (print_solib_event): Update.
3932 (check_status_catch_solib): Update.
3933 * progspace.c (clear_program_space_solib_cache): Update.
3934 * solib.c (update_solib_list): Update.
3935
3936 2018-05-29 Tom Tromey <tom@tromey.com>
3937
3938 * python/py-type.c (typy_richcompare): Update.
3939 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
3940 * gdbtypes.h (types_deeply_equal): Return bool.
3941 (types_equal): Likewise.
3942 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
3943 declare VEC.
3944 (check_types_equal): Change worklist to std::vector. Return
3945 bool.
3946 (struct type_equality_entry): Add constructor.
3947 (compare_maybe_null_strings): Return bool.
3948 (check_types_worklist): Return bool. Change worklist to
3949 std::vector.
3950 (types_deeply_equal): Use std::vector.
3951 (types_equal): Return bool.
3952 (compare_maybe_null_strings): Simplify.
3953
3954 2018-05-29 Tom Tromey <tom@tromey.com>
3955
3956 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
3957
3958 2018-05-29 Tom Tromey <tom@tromey.com>
3959
3960 * objc-lang.h: Don't include cp-support.h.
3961 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
3962 declare VEC.
3963
3964 2018-05-27 Tom Tromey <tom@tromey.com>
3965
3966 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
3967
3968 2018-05-25 Tom Tromey <tom@tromey.com>
3969
3970 * value.c (value::location): Initialize.
3971
3972 2018-05-25 Tom Tromey <tom@tromey.com>
3973
3974 * dbxread.c (init_bincl_list): Remove.
3975 (bincl_list): Now a std::vector.
3976 (bincls_allocated, next_bincl): Remove.
3977 (free_bincl_list, do_free_bincl_list_cleanup)
3978 (make_cleanup_free_bincl_list): Remove.
3979 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
3980 unique_xmalloc_ptr.
3981 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
3982 (struct header_file_location): Add constructor.
3983 (add_bincl_to_list): Remove.
3984
3985 2018-05-25 Tom Tromey <tom@tromey.com>
3986
3987 * tui/tui.c (tui_enable): Update.
3988 * mi/mi-interp.c (mi_interp::init): Update.
3989 * interps.h (class interp) <name>: New method.
3990 <m_name>: Rename from name.
3991 (~scoped_restore_interp): Update.
3992 * interps.c (interp::interp): Update.
3993 (interp_add, interp_set, interp_lookup_existing)
3994 (current_interp_named_p): Update.
3995
3996 2018-05-25 Tom Tromey <tom@tromey.com>
3997
3998 * interps.c (interp_name): Remove.
3999 * mi/mi-interp.c (mi_interp::init): Update.
4000 * interps.h (interp_name): Remove.
4001 (~scoped_restore_interp): Update.
4002 * tui/tui.c (tui_enable): Update.
4003
4004 2018-05-25 Tom Tromey <tom@tromey.com>
4005
4006 * utils.c (fputs_maybe_filtered): Update.
4007 * linespec.c (decode_line_full): Update.
4008 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
4009 (mi_print_breakpoint_for_event, mi_solib_loaded)
4010 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4011 (mi_user_selected_context_changed): Update.
4012 * mi/mi-main.c (mi_execute_command): Update.
4013 * cli/cli-script.c (execute_control_command): Update.
4014 * python/python.c (execute_gdb_command): Update.
4015 * solib.c (info_sharedlibrary_command): Update.
4016 * interps.c (interp_ui_out): Remove.
4017 * interps.h (interp_ui_out): Remove.
4018
4019 2018-05-25 Tom Tromey <tom@tromey.com>
4020
4021 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
4022 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
4023 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
4024
4025 2018-05-25 Tom Tromey <tom@tromey.com>
4026
4027 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
4028 * interps.c (interp_exec): Use scoped_restore.
4029
4030 2018-05-25 Tom Tromey <tom@tromey.com>
4031
4032 * remote.c (remote_target::remote_file_get): Use
4033 gdb::byte_vector.
4034 (remote_target::remote_file_put): Likewise.
4035
4036 2018-05-25 Tom Tromey <tom@tromey.com>
4037
4038 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
4039 a std::string.
4040 (get_pe_section_index, add_pe_exported_sym): Update.
4041 (read_pe_exported_syms): Use gdb::def_vector.
4042
4043 2018-05-25 Tom Tromey <tom@tromey.com>
4044
4045 * frame.c (remove_prev_frame): Remove.
4046 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
4047
4048 2018-05-25 Maciej W. Rozycki <macro@mips.com>
4049
4050 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
4051 Remove prototypes.
4052 * mips-linux-nat.c (supply_fpregset): Always call
4053 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
4054 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
4055 `mips_fill_fpregset'.
4056 * mips-linux-tdep.c (mips_supply_fpregset)
4057 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
4058 (mips_fill_fpregset_wrapper): Remove functions.
4059 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
4060 (mips_linux_fpregset): Remove variable.
4061 (mips_linux_iterate_over_regset_sections): Use
4062 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
4063 (mips_linux_o32_sigframe_init): Remove comment.
4064
4065 2018-05-25 Pedro Alves <palves@redhat.com>
4066
4067 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
4068 (struct readahead_cache, struct packet_reg, struct
4069 remote_arch_state, class remote_state): Move higher up in the
4070 file.
4071 (remote_target::m_remote_state): Now an object instead of a pointer.
4072 (remote_target::get_remote_state): Adjust.
4073
4074 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
4075
4076 * stack.c (select_and_print_frame): Delete.
4077 (struct function_bounds): Move struct within function.
4078 (func_command): Most content moved into new function
4079 find_frame_for_function, use new function, print result, add
4080 function comment.
4081 (find_frame_for_function): New function, now returns a result.
4082
4083 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4084
4085 * stack.c (iterate_over_block_arg_vars): Fix comment.
4086 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
4087
4088 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
4089
4090 PR gdb/23203
4091 * frame.c
4092 (scoped_restore_selected_frame::scoped_restore_selected_frame):
4093 Define.
4094 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
4095 Define.
4096 * frame.h (class scoped_restore_selected_frame): New class.
4097 * stack.c (print_frame_local_vars): Remove catching and rethrowing
4098 of any exception, use scoped_restore_selected_frame to restore the
4099 frame instead.
4100
4101 2018-05-24 Pedro Alves <palves@redhat.com>
4102
4103 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
4104 override.
4105
4106 2018-05-23 Tom Tromey <tom@tromey.com>
4107
4108 * complaints.c (struct complaints): Remove.
4109 (symfile_complaint_book): Remove.
4110 (series): New global.
4111 (complaint_internal): Update.
4112 (clear_complaints): Update.
4113
4114 2018-05-23 Tom Tromey <tom@tromey.com>
4115
4116 * complaints.c (counters): New global.
4117 (struct complain): Remove.
4118 (struct complaints) <root>: Remove.
4119 (complaint_sentinel): Remove.
4120 (symfile_complaint_book): Update.
4121 (find_complaint) Remove.
4122 (complaint_internal, clear_complaints): Update.
4123
4124 2018-05-23 Tom Tromey <tom@tromey.com>
4125
4126 * complaints.c (struct complain) <file, line>: Remove.
4127 (find_complaint): Remove file, line parameters.
4128 (complaint_internal): Update.
4129
4130 2018-05-23 Tom Tromey <tom@tromey.com>
4131
4132 * complaints.c (vcomplaint): Remove.
4133 (complaint_internal) Merge in contents of vcomplaint.
4134
4135 2018-05-23 Tom Tromey <tom@tromey.com>
4136
4137 * complaints.c (struct complaints) <explanation>: Remove.
4138 (symfile_explanations): Remove.
4139 (symfile_complaint_book): Update.
4140 (vcomplaint): Update.
4141 (struct explanation): Remove.
4142
4143 2018-05-23 Tom Tromey <tom@tromey.com>
4144
4145 * complaints.c (symfile_complaints): Remove.
4146 (complaint_internal): Remove "complaints" parameter.
4147 (clear_complaints, vcomplaint): Remove "c" parameter.
4148 (get_complaints): Remove.
4149 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
4150 (dwarf2_debug_line_missing_file_complaint)
4151 (dwarf2_debug_line_missing_end_sequence_complaint)
4152 (dwarf2_complex_location_expr_complaint)
4153 (dwarf2_const_value_length_mismatch_complaint)
4154 (dwarf2_section_buffer_overflow_complaint)
4155 (dwarf2_macro_malformed_definition_complaint)
4156 (dwarf2_invalid_attrib_class_complaint)
4157 (create_addrmap_from_index, dw2_symtab_iter_next)
4158 (dw2_expand_marked_cus)
4159 (dw2_debug_names_iterator::find_vec_in_debug_names)
4160 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
4161 (create_debug_type_hash_table, init_cutu_and_read_dies)
4162 (partial_die_parent_scope, add_partial_enumeration)
4163 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
4164 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
4165 (read_import_statement, read_file_scope, create_dwo_cu_reader)
4166 (create_cus_hash_table, create_dwp_hash_table)
4167 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
4168 (dwarf2_rnglists_process, dwarf2_ranges_process)
4169 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
4170 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
4171 (handle_struct_member_die, process_structure_scope)
4172 (read_array_type, read_common_block, read_module_type)
4173 (read_tag_pointer_type, read_typedef, read_base_type)
4174 (read_subrange_type, load_partial_dies, partial_die_info::read)
4175 (partial_die_info::read, partial_die_info::read)
4176 (partial_die_info::read, read_checked_initial_length_and_offset)
4177 (dwarf2_string_attr, read_formatted_entries)
4178 (dwarf_decode_line_header)
4179 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4180 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
4181 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
4182 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
4183 (get_signatured_type, get_DW_AT_signature_type)
4184 (decode_locdesc, file_file_name, consume_improper_spaces)
4185 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
4186 (dwarf_decode_macro_bytes, dwarf_decode_macros)
4187 (dwarf2_symbol_mark_computed, set_die_type)
4188 (read_attribute_value): Update.
4189 * stap-probe.c (handle_stap_probe, get_stap_base_address):
4190 Update.
4191 * dbxread.c (unknown_symtype_complaint)
4192 (lbrac_mismatch_complaint, repeated_header_complaint)
4193 (set_namestring, function_outside_compilation_unit_complaint)
4194 (read_dbx_symtab, process_one_symbol): Update.
4195 * gdbtypes.c (stub_noname_complaint): Update.
4196 * windows-nat.c (handle_unload_dll): Update.
4197 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
4198 (decode_base_type): Update.
4199 * xcoffread.c (bf_notfound_complaint, ef_complaint)
4200 (eb_complaint, record_include_begin, record_include_end)
4201 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
4202 (process_xcoff_symbol, read_symbol)
4203 (function_outside_compilation_unit_complaint)
4204 (scan_xcoff_symtab): Update.
4205 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
4206 * buildsym.c (finish_block_internal, make_blockvector)
4207 (end_symtab_get_static_block, augment_type_symtab): Update.
4208 * dtrace-probe.c (dtrace_process_dof)
4209 (dtrace_static_probe_ops::get_probes): Update.
4210 * complaints.h (struct complaint): Don't declare.
4211 (symfile_complaints): Remove.
4212 (complaint_internal): Remove "complaints" parameter.
4213 (complaint): Likewise.
4214 (clear_complaints): Likewise.
4215 * symfile.c (syms_from_objfile_1, finish_new_objfile)
4216 (reread_symbols): Update.
4217 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
4218 (dwarf2_frame_cache, decode_frame_entry): Update.
4219 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
4220 * objc-lang.c (lookup_objc_class, lookup_child_selector)
4221 (info_selectors_command): Update.
4222 * macrotab.c (macro_include, check_for_redefinition)
4223 (macro_undef): Update.
4224 * objfiles.c (filter_overlapping_sections): Update.
4225 * stabsread.c (invalid_cpp_abbrev_complaint)
4226 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
4227 (define_symbol, error_type, read_type, rs6000_builtin_type)
4228 (stabs_method_name_from_physname, read_member_functions)
4229 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
4230 (attach_fields_to_type, complain_about_struct_wipeout)
4231 (read_range_type, read_args, common_block_start)
4232 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
4233 Update.
4234 * mdebugread.c (index_complaint, unknown_ext_complaint)
4235 (basic_type_complaint, bad_tag_guess_complaint)
4236 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
4237 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
4238 (parse_procedure, parse_lines)
4239 (function_outside_compilation_unit_complaint)
4240 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
4241 (bad_tag_guess_complaint, reg_value_complaint): Update.
4242 * cp-support.c (demangled_name_complaint): Update.
4243 * macroscope.c (sal_macro_scope): Update.
4244 * dwarf-index-write.c (class debug_names): Update.
4245
4246 2018-05-23 Tom Tromey <tom@tromey.com>
4247
4248 * complaints.c (clear_complaints): Remove "noisy" parameter.
4249 * complaints.h (clear_complaints): Update.
4250 * symfile.c (syms_from_objfile_1, finish_new_objfile)
4251 (reread_symbols): Update.
4252
4253 2018-05-23 Tom Tromey <tom@tromey.com>
4254
4255 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
4256 SUBSEQUENT_MESSAGE.
4257 (vcomplaint, clear_complaints): Update.
4258 (symfile_explanations): Remove some messages.
4259
4260 2018-05-23 Tom Tromey <tom@tromey.com>
4261
4262 * complaints.c (internal_complaint): Remove.
4263 * complaints.h (internal_complaint): Remove.
4264
4265 2018-05-22 Maciej W. Rozycki <macro@mips.com>
4266
4267 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
4268
4269 2018-05-22 Pedro Alves <palves@redhat.com>
4270
4271 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
4272 (remote_fileio_badfd, remote_fileio_return_errno)
4273 (remote_fileio_return_success, remote_fileio_func_open)
4274 (remote_fileio_func_open, remote_fileio_func_close)
4275 (remote_fileio_func_read, remote_fileio_func_write)
4276 (remote_fileio_func_lseek, remote_fileio_func_rename)
4277 (remote_fileio_func_unlink, remote_fileio_func_stat)
4278 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
4279 (remote_fileio_func_isatty, remote_fileio_func_system): Add
4280 remote_target parameter.
4281 (remote_fio_func_map) <func>: Add remote_target parameter.
4282 (do_remote_fileio_request, remote_fileio_request):
4283 * remote-fileio.h (remote_fileio_request):
4284 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
4285 remote_target parameter.
4286 (remote_notif_process, handle_notification): Adjust to pass down
4287 the remote.
4288 (remote_notif_state_allocate): Add remote_target parameter. Save
4289 it.
4290 * remote-notif.h (struct remote_target): Forward declare.
4291 (struct notif_client) <parse, ack, can_get_pending_events>: Add
4292 remote_target parameter.
4293 (struct remote_notif_state) <remote>: New field.
4294 (remote_notif_ack, remote_notif_parse): Add remote_target
4295 parameter.
4296 (remote_notif_state_allocate, remote_notif_state_allocate): Add
4297 remote_target parameter.
4298 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
4299 (threads_listing_context, rmt_thread_action, protocol_feature)
4300 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
4301 (packet_result, struct threads_listing_context, remote_state):
4302 Move definitions and declarations higher up.
4303 (remote_target) <~remote_target>: Declare.
4304 (remote_download_command_source, remote_file_put, remote_file_get)
4305 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
4306 (remote_hostio_pread_vFile, remote_hostio_send_command)
4307 (remote_hostio_set_filesystem, remote_hostio_open)
4308 (remote_hostio_close, remote_hostio_unlink, remote_state)
4309 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
4310 (get_memory_write_packet_size, get_memory_read_packet_size)
4311 (append_pending_thread_resumptions, remote_detach_1)
4312 (append_resumption, remote_resume_with_vcont)
4313 (add_current_inferior_and_thread, wait_ns, wait_as)
4314 (process_stop_reply, remote_notice_new_inferior)
4315 (process_initial_stop_replies, remote_add_thread)
4316 (btrace_sync_conf, remote_btrace_maybe_reopen)
4317 (remove_new_fork_children, kill_new_fork_children)
4318 (discard_pending_stop_replies, stop_reply_queue_length)
4319 (check_pending_events_prevent_wildcard_vcont)
4320 (discard_pending_stop_replies_in_queue, stop_reply)
4321 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
4322 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
4323 (remote_interrupt_as, remote_interrupt_ns)
4324 (remote_get_noisy_reply, remote_query_attached)
4325 (remote_add_inferior, remote_current_thread, get_current_thread)
4326 (set_thread, set_general_thread, set_continue_thread)
4327 (set_general_process, write_ptid)
4328 (remote_unpack_thread_info_response, remote_get_threadinfo)
4329 (parse_threadlist_response, remote_get_threadlist)
4330 (remote_threadlist_iterator, remote_get_threads_with_ql)
4331 (remote_get_threads_with_qxfer)
4332 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
4333 (get_offsets, remote_check_symbols, remote_supported_packet)
4334 (remote_query_supported, remote_packet_size)
4335 (remote_serial_quit_handler, remote_detach_pid)
4336 (remote_vcont_probe, remote_resume_with_hc)
4337 (send_interrupt_sequence, interrupt_query)
4338 (remote_notif_get_pending_events, fetch_register_using_p)
4339 (send_g_packet, process_g_packet, fetch_registers_using_g)
4340 (store_register_using_P, store_registers_using_G)
4341 (set_remote_traceframe, check_binary_download)
4342 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
4343 (remote_xfer_live_readonly_partial, remote_read_bytes)
4344 (remote_send_printf, remote_flash_write, readchar)
4345 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
4346 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
4347 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
4348 (extended_remote_disable_randomization, extended_remote_run)
4349 (send_environment_packet, extended_remote_environment_support)
4350 (extended_remote_set_inferior_cwd, remote_write_qxfer)
4351 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
4352 (packet_command): Now methods of ...
4353 (remote_target): ... this class.
4354 (m_remote_state) <remote_target>: New field.
4355 (struct remote_state) <stop_reply_queue,
4356 remote_async_inferior_event_token, wait_forever_enabled_p>: New
4357 fields.
4358 (remote_state::remote_state): Allocate stop_reply_queue.
4359 (remote_state): Delete global.
4360 (get_remote_state_raw): Delete.
4361 (remote_target::get_remote_state): Allocate m_remote_state on
4362 demand.
4363 (get_current_remote_target): New.
4364 (remote_ops, extended_remote_ops): Delete.
4365 (wait_forever_enabled_p, remote_async_inferior_event_token):
4366 Delete, moved to struct remote_state.
4367 (remote_target::close): Delete self. Destruction bits split to
4368 ...
4369 (remote_target::~remote_target): ... this.
4370 (show_memory_packet_size): Adjust to use
4371 get_current_remote_target.
4372 (struct protocol_feature) <func>: Add remote_target parameter.
4373 All callers adjusted.
4374 (curr_quit_handler_target): New.
4375 (remote_serial_quit_handler): Reimplement.
4376 (remote_target::open_1): Adjust to use get_current_remote_target.
4377 Heap-allocate remote_target/extended_remote_target instances.
4378 (vcont_builder::vcont_builder): Add remote_target parameter, and
4379 save it in m_remote. All callers adjusted.
4380 (vcont_builder::m_remote): New field.
4381 (vcont_builder::restart, vcont_builder::flush)
4382 (vcont_builder::push_action): Use it.
4383 (remote_target::commit_resume): Use it.
4384 (struct queue_iter_param) <remote>: New field.
4385 (remote_target::remove_new_fork_children): Fill in 'remote' field.
4386 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
4387 (check_pending_event_prevents_wildcard_vcont_callback)
4388 (remote_target::check_pending_events_prevent_wildcard_vcont)
4389 (remote_target::discard_pending_stop_replies)
4390 (remote_target::discard_pending_stop_replies_in_queue)
4391 (remote_target::remote_notif_remove_queued_reply): Fill in
4392 'remote' field.
4393 (remote_notif_get_pending_events): New.
4394 (remote_target::readchar, remote_target::remote_serial_write):
4395 Save/restore curr_quit_handler_target.
4396 (putpkt): New.
4397 (kill_new_fork_children): Fill in 'remote' field.
4398 (packet_command): Use get_current_remote_target, defer to
4399 remote_target method of same name.
4400 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
4401 parameter, and save it in m_remote. All callers adjusted.
4402 (scoped_remote_fd::release): Use m_remote.
4403 (scoped_remote_fd::m_remote): New field.
4404 (remote_file_put, remote_file_get, remote_file_delete): Use
4405 get_current_remote_target, defer to remote_target method of same
4406 name.
4407 (remote_btrace_reset): Add remote_state paremeter. Update all
4408 callers.
4409 (remote_async_inferior_event_handler). Pass down 'data'.
4410 (remote_new_objfile): Use get_current_remote_target.
4411 (remote_target::vcont_r_supported): New.
4412 (set_range_stepping): Use get_current_remote_target and
4413 remote_target::vcont_r_supported.
4414 (_initialize_remote): Don't allocate 'remote_state' and
4415 'stop_reply_queue' globals.
4416 * remote.h (struct remote_target): Forward declare.
4417 (getpkt, putpkt, remote_notif_get_pending_events): Add
4418 'remote_target' parameter.
4419
4420 2018-05-22 Pedro Alves <palves@redhat.com>
4421
4422 * remote.c (vcont_builder): Now a class. Make all data members
4423 private.
4424 (vcont_builder) <vcont_builder, restart, flush, push_action>:
4425 Declare methods.
4426 (vcont_builder_restart): Rename to ...
4427 (vcont_builder::restart): ... this.
4428 (vcont_builder_flush): Rename to ...
4429 (vcont_builder::flush): ... this.
4430 (vcont_builder_push_action): Rename to ...
4431 (vcont_builder::push_action): ... this.
4432 (remote_target::commit_resume): Adjust.
4433
4434 2018-05-22 Pedro Alves <palves@redhat.com>
4435
4436 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
4437 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
4438 (get_fixed_memory_packet_size): New.
4439 (get_memory_packet_size): Use it.
4440 (set_memory_packet_size): Don't override the config size with
4441 DEFAULT_MAX_MEMORY_PACKET_SIZE.
4442 (show_memory_packet_size): Use get_fixed_memory_packet_size.
4443 Don't refer to get_memory_packet_size if not connected to a remote
4444 target. Show "(default)" if configured size is 0.
4445
4446 2018-05-22 Pedro Alves <palves@redhat.com>
4447
4448 * remote.c (remote_target::mourn_inferior): Move
4449 discard_pending_stop_replies call here from ...
4450 (_initialize_remote): ... here.
4451
4452 2018-05-22 Pedro Alves <palves@redhat.com>
4453
4454 * remote.c (compare_section_command): Remove set_general_process
4455 call.
4456
4457 2018-05-22 Pedro Alves <palves@redhat.com>
4458
4459 * remote.c (struct packet_reg, struct remote_arch_state):
4460 Move higher up in the file.
4461 (remote_state) <m_arch_states>: Store remote_arch_state values
4462 instead of remote_arch_state pointers.
4463 (remote_state::get_remote_arch_state): Adjust.
4464
4465 2018-05-22 Pedro Alves <palves@redhat.com>
4466
4467 * remote.c: Include <unordered_map>.
4468 (remote_state): Now a class.
4469 (remote_state) <get_remote_arch_state>: Declare method.
4470 <get_remote_arch_state>: New field.
4471 (remote_arch_state) <remote_arch_state>: Declare ctor.
4472 <regs>: Now a unique_ptr.
4473 (remote_gdbarch_data_handle): Delete.
4474 (get_remote_arch_state): Delete.
4475 (remote_state::get_remote_arch_state): New.
4476 (get_remote_state): Adjust to call remote_state's
4477 get_remote_arch_state method.
4478 (init_remote_state): Delete, bits factored out to ...
4479 (remote_arch_state::remote_arch_state): ... this new method.
4480 (get_remote_packet_size, get_memory_packet_size)
4481 (process_g_packet, remote_target::fetch_registers)
4482 (remote_target::prepare_to_store, store_registers_using_G)
4483 (remote_target::store_registers, remote_target::get_trace_status):
4484 Adjust to call remote_state's method.
4485 (_initialize_remote): Remove reference to
4486 remote_gdbarch_data_handle.
4487
4488 2018-05-22 Pedro Alves <palves@redhat.com>
4489
4490 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
4491 pread>: New method declarations.
4492 (remote_target::open_1): Adjust.
4493 (readahead_cache_invalidate): Rename to ...
4494 (readahead_cache::invalidate): ... this, and adjust to be a class
4495 method.
4496 (readahead_cache_invalidate_fd): Rename to ...
4497 (readahead_cache::invalidate_fd): ... this, and adjust to be a
4498 class method.
4499 (remote_hostio_pwrite): Adjust.
4500 (remote_hostio_pread_from_cache): Rename to ...
4501 (readahead_cache::pread): ... this, and adjust to be a class
4502 method.
4503 (remote_hostio_close): Adjust.
4504
4505 2018-05-22 Pedro Alves <palves@redhat.com>
4506
4507 * remote.c (remote_hostio_close_cleanup): Delete.
4508 (class scoped_remote_fd): New.
4509 (remote_file_put, remote_file_get): Use it.
4510
4511 2018-05-22 Pedro Alves <palves@redhat.com>
4512
4513 (struct vCont_action_support): Use bool and initialize all fields.
4514 (struct readahead_cache): Initialize all fields.
4515 (remote_state): Use bool and initialize all fields.
4516 (remote_state::remote_state, remote_state::~remote_state): New.
4517 (new_remote_state): Delete.
4518 (_initialize_remote): Use new to allocate remote_state.
4519
4520 2018-05-22 Pedro Alves <palves@redhat.com>
4521 張俊芝 <zjz@zjz.name>
4522
4523 PR gdb/22973
4524 * c-exp.y: Include "c-support.h".
4525 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
4526 of tolower. Use c_ident_is_alpha to scan names.
4527 * c-lang.c: Include "c-support.h".
4528 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
4529 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
4530 * c-support.h: New file, with bits factored out from ...
4531 * cp-name-parser.y: ... this file.
4532 Include "c-support.h".
4533 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
4534 c-support.h and renamed.
4535 (symbol_end, yylex): Adjust.
4536
4537 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4538
4539 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
4540 parameter type to CORE_ADDR.
4541 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
4542 parameter type in declaration to CORE_ADDR.
4543 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
4544 target_auxv_search to get AT_HWCAP and use the result to get the
4545 target description.
4546 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
4547 to CORE_ADDR. Remove the cast of the return value to unsigned
4548 long. Fix error predicate of target_auxv_search.
4549 (ppc_linux_nat_target::read_description): Change the type of the
4550 hwcap variable to CORE_ADDR.
4551
4552 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4553
4554 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
4555 if the size of fpscr is larger than 32 bits.
4556
4557 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4558
4559 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
4560 (ppc32_linux_vsxregmap): New global.
4561 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
4562 regcache_supply_regset, and regcache_collect_regset.
4563 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
4564 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
4565 (fetch_vsx_register, store_vsx_register): Remove.
4566 (fetch_vsx_registers): Add regno parameter. Get regset using
4567 ppc_linux_vsxregset. Use regset to supply registers.
4568 (store_vsx_registers): Add regno parameter. Get regset using
4569 ppc_linux_vsxregset. Use regset to collect registers.
4570 (fetch_register): Call fetch_vsx_registers instead of
4571 fetch_vsx_register.
4572 (store_register): Call store_vsx_registers instead of
4573 store_vsx_register.
4574 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
4575 new regno parameter.
4576 (store_ppc_registers): Call store_vsx_registers with -1 for the
4577 new regno parameter.
4578 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
4579 (ppc_collect_vsxregset): Remove.
4580
4581 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4582
4583 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
4584 offset fields.
4585 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
4586 for vector register offset fields.
4587 (ppc64_fbsd_reg_offsets): Likewise.
4588 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4589 to vector register offset fields.
4590 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4591 to vector register offset fields.
4592 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
4593 vector register offset fields.
4594 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
4595 initializers for vector register offset fields.
4596 (rs6000_aix64_reg_offsets): Likewise.
4597 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
4598 (ppc_supply_vrregset): Remove.
4599 (ppc_collect_vrregset): Remove.
4600 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
4601 (ppc_linux_vrregset) : New function.
4602 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
4603 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
4604 (ppc32_linux_vrregset): Remove.
4605 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
4606 and use result instead of ppc32_linux_vrregset.
4607 (ppc32_linux_reg_offsets): Remove initializers for vector register
4608 offset fields.
4609 (ppc64_linux_reg_offsets): Likewise.
4610 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
4611 * ppc-linux-nat.c: Include regset.h.
4612 (gdb_vrregset_t): Adjust comment to account for little-endian
4613 mode.
4614 (supply_vrregset, fill_vrregset): Remove.
4615 (fetch_altivec_register, store_altivec_register): Remove.
4616 (fetch_altivec_registers): Add regno parameter. Get regset using
4617 ppc_linux_vrregset. Use regset to supply registers.
4618 (store_altivec_registers): Add regno parameter. Get regset using
4619 ppc_linux_vrregset. Use regset to collect registers.
4620 (fetch_register): Call fetch_altivec_registers instead of
4621 fetch_altivec_register.
4622 (store_register): Call store_altivec_registers instead of
4623 store_altivec_register.
4624 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
4625 the new regno parameter.
4626 (store_ppc_registers): Call store_altivec_registers with -1 for
4627 the new regno parameter.
4628
4629 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4630
4631 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
4632 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
4633 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
4634 (gdb_vrregset_t): Change array type size to
4635 PPC_LINUX_SIZEOF_VRREGSET.
4636 (gdb_vsxregset_t): Change array type size to
4637 PPC_LINUX_SIZEOF_VSXREGSET.
4638 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
4639 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
4640 PPC_LINUX_SIZEOF_VSXREGSET.
4641
4642 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4643
4644 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
4645 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
4646 nat/ppc-linux.c.
4647 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
4648 ppc_linux_target_wordsize with tid.
4649 (ppc_linux_nat_target::read_description): Call ppc_linux_target
4650 wordsize with tid.
4651 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
4652 (ppc64_64bit_inferior_p): Add static and inline specifiers.
4653 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
4654 tid parameter. Remove static specifier.
4655 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
4656 (ppc_linux_target_wordsize): New declaration.
4657
4658 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4659
4660 * arch/ppc-linux-common.c: New file.
4661 * arch/ppc-linux-common.h: New file.
4662 * arch/ppc-linux-tdesc.h: New file.
4663 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
4664 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
4665 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
4666 arch/ppc-linux-tdesc.h.
4667 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
4668 arch/ppc-linux-tdesc.h.
4669 (ppc_linux_nat_target::read_description): Remove target
4670 description matching code. Fill a ppc_linux_features struct and
4671 call ppc_linux_match_description with it. Move comment about ISA
4672 2.05 to ppc-linux-common.c.
4673 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
4674 arch/ppc-linux-tdesc.h.
4675 (ppc_linux_core_read_description): Remove target description
4676 matching code. Fill a ppc_linux_features struct and call
4677 ppc_linux_match_description with it.
4678 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
4679 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
4680 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
4681 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
4682 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
4683 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
4684 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
4685 (tdesc_powerpc_e500l): Remove.
4686
4687 2018-05-22 Joel Brobecker <brobecker@adacore.com>
4688
4689 * ada-lang.c (catch_assert_command): Pass empty string instead
4690 of NULL for excep_string argument.
4691
4692 2018-05-22 Maciej W. Rozycki <macro@mips.com>
4693
4694 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
4695 the width of the requested register exceeds the width of the
4696 `ptrace' data type.
4697
4698 2018-05-21 Tom Tromey <tom@tromey.com>
4699
4700 * printcmd.c (output_command): Remove.
4701 (output_command_const): Rename to output_command.
4702 * valprint.h (output_command): Rename from output_command_const.
4703 * tracepoint.c (trace_dump_actions): Call output_command.
4704
4705 2018-05-21 Tom Tromey <tom@tromey.com>
4706
4707 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4708 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
4709 * ada-lang.h (create_ada_exception_catchpoint): Update.
4710 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
4711 std::string.
4712 (create_excep_cond_exprs, ~ada_catchpoint)
4713 (should_stop_exception, print_one_exception)
4714 (print_mention_exception, print_recreate_exception): Update.
4715 (ada_get_next_arg): Remove.
4716 (catch_ada_exception_command_split): Use std::string. Change type
4717 of "excep_string", "cond_string".
4718 (catch_ada_exception_command): Update.
4719 (create_ada_exception_catchpoint): Change type of excep_string.
4720 (ada_exception_sal): Remove excep_string parameter.
4721 (~ada_catchpoint): Remove.
4722
4723 2018-05-21 Tom Tromey <tom@tromey.com>
4724
4725 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
4726 cleanup.
4727
4728 2018-05-21 Tom Tromey <tom@tromey.com>
4729
4730 * ada-lang.c (ada_exception_message_1, ada_exception_message):
4731 Return unique_xmalloc_ptr.
4732 (print_it_exception): Update.
4733
4734 2018-05-21 Tom Tromey <tom@tromey.com>
4735
4736 * tracepoint.c (trace_dump_actions): Use std::string.
4737
4738 2018-05-21 Tom Tromey <tom@tromey.com>
4739
4740 * symfile.c (reread_symbols): Use std::string for original_name.
4741
4742 2018-05-21 Tom Tromey <tom@tromey.com>
4743
4744 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
4745 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
4746 constructor.
4747
4748 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
4749
4750 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
4751 instance to...
4752 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
4753 * objfiles.c (get_objfile_bfd_data): Allocate
4754 objfile_per_bfd_storage with obstack_new when allocating on
4755 obstack.
4756
4757 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
4758
4759 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
4760 OBSTACK_ZALLOC.
4761 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
4762 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
4763 * mdebugread.c (mdebug_build_psymtabs): Likewise.
4764 (add_pending): Likewise.
4765 (parse_symbol): Likewise.
4766 (parse_partial_symbols): Likewise.
4767 (psymtab_to_symtab_1): Likewise.
4768 (new_psymtab): Likewise.
4769 (elfmdebug_build_psymtabs): Likewise.
4770 * minsyms.c (terminate_minimal_symbol_table): Likewise.
4771 * objfiles.c (get_objfile_bfd_data): Likewise.
4772 (objfile_register_static_link): Likewise.
4773 * psymtab.c (allocate_psymtab): Likewise.
4774 * stabsread.c (read_member_functions): Likewise.
4775 * xcoffread.c (xcoff_end_psymtab): Likewise.
4776
4777 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
4778
4779 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
4780 compiler supports std::is_trivially_constructible.
4781 * common/poison.h: Include obstack.h.
4782 (IsMallocable): Define to is_trivially_constructible if the
4783 compiler supports it, define to true_type otherwise.
4784 (xobnew): New.
4785 (XOBNEW): Redefine.
4786 (xobnewvec): New.
4787 (XOBNEWVEC): Redefine.
4788 * gdb_obstack.h (obstack_zalloc): New.
4789 (OBSTACK_ZALLOC): Redefine.
4790 (obstack_calloc): New.
4791 (OBSTACK_CALLOC): Redefine.
4792 (obstack_new): New.
4793 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
4794 (gdbarch_obstack): New declaration in gdbarch.h, definition in
4795 gdbarch.c.
4796 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
4797 obstack_calloc/obstack_zalloc.
4798 (gdbarch_obstack_zalloc): Remove.
4799 * target-descriptions.c (tdesc_data_init): Use obstack_new.
4800
4801 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4802
4803 * stack.c (backtrace_command_1): Remove useless variable int i.
4804
4805 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4806
4807 * stack.c (print_frame_info): Fix comment.
4808
4809 2018-05-18 Tom Tromey <tom@tromey.com>
4810
4811 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
4812 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
4813 (~dwarf2_per_objfile): Update
4814 (dwarf2_get_dwz_file): Use new.
4815 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
4816 unique_ptr.
4817
4818 2018-05-18 Tom Tromey <tom@tromey.com>
4819
4820 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
4821 unique_ptr.
4822 * dwarf2read.c (struct dwp_file): Add constructor and
4823 initializers.
4824 (open_and_init_dwp_file): Return a unique_ptr.
4825 (dwarf2_per_objfile, create_dwp_hash_table)
4826 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
4827 (lookup_dwo_unit_in_dwp): Update.
4828 (open_and_init_dwp_file, get_dwp_file): Update.
4829
4830 2018-05-18 Tom Tromey <tom@tromey.com>
4831
4832 * dwarf2read.c (dwarf2_per_objfile): Update.
4833 (struct mapped_index): Add initializers.
4834 (dwarf2_read_index): Use new.
4835 (dw2_symtab_iter_init): Update.
4836 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
4837 unique_ptr.
4838
4839 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
4840
4841 * dwarf2read.c (mapped_index) <total_size>: Remove.
4842
4843 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
4844
4845 * unittests/format_pieces-selftests.c (test_format_specifier):
4846 Add ARI comments.
4847
4848 2018-05-18 Tom Tromey <tom@tromey.com>
4849
4850 * c-typeprint.c (maybe_print_hole): New function.
4851 (c_print_type_struct_field_offset): Update.
4852 (c_type_print_base_struct_union): Call maybe_print_hole.
4853
4854 2018-05-17 Keith Seitz <keiths@redhat.com>
4855
4856 * breakpoint.c (build_bpstat_chain): New function, moved from
4857 bpstat_stop_status.
4858 (bpstat_stop_status): Add optional parameter, `stop_chain'.
4859 If no stop chain is passed, call build_bpstat_chain to build it.
4860 * breakpoint.h (build_bpstat_chain): Declare.
4861 (bpstat_stop_status): Move documentation here from breakpoint.c.
4862 * infrun.c (handle_signal_stop): Before eliding inlined frames,
4863 build the stop chain and pass it to skip_inline_frames.
4864 Pass this stop chain to bpstat_stop_status.
4865 * inline-frame.c: Include breakpoint.h.
4866 (stopped_by_user_bp_inline_frame): New function.
4867 (skip_inline_frames): Add parameter `stop_chain'.
4868 Move documention to inline-frame.h.
4869 If non-NULL, use stopped_by_user_bp_inline_frame to determine
4870 whether the frame should be elided.
4871 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
4872 Add moved documentation and update for new parameter.
4873
4874 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
4875
4876 PR cli/14975
4877 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4878 unittests/format_pieces-selftests.c.
4879 * common/format.h (format_piece) <operator==>: New.
4880 (format_pieces) <operator[]>: Remove.
4881 * common/format.c (format_pieces::format_pieces): Handle \e.
4882 * unittests/format_pieces-selftests.c: New.
4883
4884 2018-05-17 Tom Tromey <tom@tromey.com>
4885
4886 PR symtab/23010:
4887 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
4888 (dw2_instantiate_symtab): Add skip_partial parameter.
4889 (dw2_find_last_source_symtab, dw2_map_expand_apply)
4890 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
4891 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
4892 (dw2_expand_symtabs_matching_one)
4893 (dw2_find_pc_sect_compunit_symtab)
4894 (dw2_debug_names_lookup_symbol)
4895 (dw2_debug_names_expand_symtabs_for_function): Update.
4896 (init_cutu_and_read_dies): Add skip_partial parameter.
4897 (process_psymtab_comp_unit, build_type_psymtabs_1)
4898 (process_skeletonless_type_unit, load_partial_comp_unit)
4899 (psymtab_to_symtab_1): Update.
4900 (load_full_comp_unit): Add skip_partial parameter.
4901 (process_imported_unit_die, dwarf2_read_addr_index)
4902 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
4903 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
4904 (read_signatured_type): Update.
4905
4906 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
4907
4908 * value.c (release_value): Remove unused variable.
4909 (record_latest_value): Likewise.
4910 (access_value_history): Likewise.
4911 (preserve_values): Likewise.
4912
4913 2018-05-17 Tom Tromey <tom@tromey.com>
4914
4915 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
4916 Initialize.
4917
4918 2018-05-16 Maciej W. Rozycki <macro@mips.com>
4919
4920 PR gdb/22286
4921 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
4922 Also handle registers whose width is not a multiple of
4923 PTRACE_TYPE_RET.
4924 (linux_nat_trad_target::store_register): Likewise.
4925
4926 2018-05-16 Tom Tromey <tom@tromey.com>
4927
4928 * gdbcore.h (core_bfd): Redefine.
4929 * corelow.c (core_target::close): Update.
4930 (core_target_open): Update.
4931 * progspace.h (struct program_space) <cbfd>: Now a
4932 gdb_bfd_ref_ptr.
4933
4934 2018-05-16 Tom Tromey <tom@tromey.com>
4935
4936 PR cli/19551:
4937 * symfile-add-flags.h (enum symfile_add_flags)
4938 <SYMFILE_NOT_FILENAME>: New constant.
4939 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
4940 objfile name from BFD.
4941 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
4942 * minidebug.c (find_separate_debug_file_in_section): Put
4943 ".gnu_debugdata" into BFD's file name.
4944
4945 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
4946
4947 * regcache.c (regcache_read_ftype, regcache_write_ftype):
4948 Remove.
4949
4950 2018-05-15 Tamar Christina <tamar.christina@arm.com>
4951
4952 PR binutils/21446
4953 * aarch64-tdep.c (aarch64_analyze_prologue,
4954 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
4955 Indicate not interested in errors.
4956
4957 2018-05-15 Maciej W. Rozycki <macro@mips.com>
4958
4959 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
4960 Supply the MIPS_ZERO_REGNUM register.
4961
4962 2018-05-15 Maciej W. Rozycki <macro@mips.com>
4963
4964 * mips-tdep.c (mask_address_var): Make variable static.
4965
4966 2018-05-14 Tom Tromey <tom@tromey.com>
4967
4968 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
4969
4970 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
4971
4972 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
4973 FXSAVE_ADDR for the mxcsr register.
4974
4975 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
4976
4977 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
4978
4979 2018-05-11 Pedro Alves <palves@redhat.com>
4980
4981 * corelow.c (core_target) <core_target>: No longer inline.
4982 Initialize m_core_gdbarch, m_core_vec and build the section table
4983 here.
4984 <~core_target>: New.
4985 <core_gdbarch, get_core_register_section>: New methods.
4986 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
4987 factored out from ...
4988 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
4989 (core_ops): Delete.
4990 (sniff_core_bfd): Add gdbarch parameter.
4991 (core_close): Delete, merged into ...
4992 (core_target::close): ... here. Delete self.
4993 (core_close_cleanup): Delete.
4994 (core_target_open): Allocate a core_target on the heap. Use a
4995 unique_ptr instead of a cleanup. Bits moved into the core_target
4996 ctor. Adjust to use core_target methods instead of globals.
4997 (get_core_register_section): Rename to ...
4998 (core_target::get_core_register_section): ... this and adjust.
4999 (struct get_core_registers_cb_data): New.
5000 (get_core_registers_cb): Use it. Use bool.
5001 (core_target::fetch_registers, core_target::files_info)
5002 (core_target::xfer_partial, core_target::read_description)
5003 (core_target::pid_to, core_target::thread_name): Adjust to
5004 reference class fields instead of globals.
5005 * target.h (struct target_ops_deleter, target_ops_up): New.
5006
5007 2018-05-11 Pedro Alves <palves@redhat.com>
5008
5009 * corefile.c (core_file_command): Move to corelow.c.
5010 * corelow.c (the_core_target): Delete.
5011 (core_file_command): Moved from corefile.c. Check exec_bfd
5012 instead of the_core_target. Use target_detach instead of calling
5013 into the_core_target directly.
5014 (maybe_say_no_core_file_now): New.
5015 (core_target::detach): Use it.
5016 (_initialize_corelow): Remove references to the_core_target.
5017 * gdbcore.h (the_core_target): Delete.
5018
5019 2018-05-11 Tom Tromey <tromey@redhat.com>
5020 Pedro Alves <palves@redhat.com>
5021
5022 * corefile.c (core_bfd): Remove.
5023 * gdbcore.h (core_bfd): Now a macro.
5024 * progspace.h (struct program_space) <cbfd>: New field.
5025
5026 2018-05-11 Tom Tromey <tom@tromey.com>
5027
5028 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
5029 gdb::def_vector.
5030
5031 2018-05-10 Tom Tromey <tom@tromey.com>
5032
5033 * configure: Rebuild.
5034 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
5035
5036 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5037
5038 PR server/23158:
5039 * regformats/regdat.sh: Adjust script, following the addition
5040 of the new expedite_regs parameter to init_target_desc.
5041
5042 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
5043
5044 PR gdb/23127
5045 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
5046 set_gdbarch_significant_addr_bit.
5047 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
5048 set_gdbarch_significant_addr_bit.
5049 * utils.c (address_significant): Update to sign extend addr.
5050
5051 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
5052
5053 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
5054 (xtensa_linux_init_abi): Limit tdep->num_regs by
5055 tdep->num_nopriv_regs.
5056 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
5057 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
5058 not initialized.
5059
5060 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
5061
5062 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
5063
5064 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
5065
5066 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
5067 (I387_MXCSR_INIT_VAL): New constant.
5068 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
5069 buffer if it was supplied by the inferior.
5070 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
5071 (i387_xsave_get_clear_bv): New function.
5072 (i387_supply_xsave): Only read x87 control registers from the
5073 xsave buffer if the feature is enabled, and the state will have
5074 been written, otherwise, provide a suitable default.
5075 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
5076 including x87 control registers. Update control registers if they
5077 have changed from the default value, and mark features as enabled
5078 as required.
5079 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
5080
5081 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
5082
5083 * spu-tdep.c (info_spu_event_command): Fix output formatting.
5084
5085 2018-05-07 Tom Tromey <tom@tromey.com>
5086
5087 * configure: Rebuild.
5088 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
5089
5090 2018-05-07 Tom Tromey <tom@tromey.com>
5091
5092 PR tdep/20362:
5093 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
5094 bit. Use correct value for VDIV.
5095
5096 2018-05-04 Tom Tromey <tom@tromey.com>
5097
5098 * configure: Rebuild.
5099 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
5100
5101 2018-05-04 Tom Tromey <tom@tromey.com>
5102
5103 * linux-record.c (record_linux_system_call) <case
5104 RECORD_SYS_RECVFROM>: Add "break".
5105
5106 2018-05-04 Tom Tromey <tom@tromey.com>
5107
5108 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
5109 Add missing "break".
5110 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
5111 Add missing "break".
5112
5113 2018-05-04 Tom Tromey <tom@tromey.com>
5114
5115 * rs6000-tdep.c (ppc_process_record_op4)
5116 (ppc_process_record_op63): Add fall-through comment.
5117
5118 2018-05-04 Tom Tromey <tom@tromey.com>
5119
5120 * i386-tdep.c (i386_process_record): Add fall-through comment.
5121
5122 2018-05-04 Tom Tromey <tom@tromey.com>
5123
5124 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
5125 comment.
5126
5127 2018-05-04 Tom Tromey <tom@tromey.com>
5128
5129 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
5130 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
5131 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
5132 comment.
5133 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
5134 comment.
5135 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
5136 comment.
5137
5138 2018-05-04 Tom Tromey <tom@tromey.com>
5139
5140 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
5141
5142 2018-05-04 Tom Tromey <tom@tromey.com>
5143
5144 * s390-tdep.c (s390_process_record): Fix fall-through comments.
5145 * xcoffread.c (scan_xcoff_symtab): Move comment later.
5146 * symfile.c (section_is_mapped): Fix fall-through comment.
5147 * stabsread.c (define_symbol, read_member_functions): Fix
5148 fall-through comment.
5149 * s390-linux-tdep.c (s390_process_record): Fix fall-through
5150 comment.
5151 * remote.c (remote_wait_as): Fix fall-through comment.
5152 * p-exp.y (yylex): Fix fall-through comment.
5153 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
5154 comment.
5155 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
5156 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
5157 * jv-exp.y (yylex): Fix fall-through comment.
5158 * go-exp.y (lex_one_token): Fix fall-through comment.
5159 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
5160 fall-through comment.
5161 * f-exp.y (yylex): Fix fall-through comment.
5162 * dwarf2read.c (process_die): Fix fall-through comments.
5163 * dbxread.c (process_one_symbol): Fix fall-through comment.
5164 * d-exp.y (lex_one_token): Fix fall-through comment.
5165 * cp-name-parser.y (yylex): Fix fall-through comment.
5166 * coffread.c (coff_symtab_read): Fix fall-through comment.
5167 * c-exp.y (lex_one_token): Fix fall-through comment.
5168 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
5169 comment.
5170 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
5171 comment.
5172
5173 2018-05-04 Tom Tromey <tom@tromey.com>
5174
5175 PR python/22730:
5176 * NEWS: Mention gdb.execute change.
5177 * gdbcmd.h (execute_control_command): Don't declare.
5178 * python/python.c (execute_gdb_command): Use read_command_lines_1,
5179 execute_control_commands, execute_control_commands_to_string.
5180 * cli/cli-script.h (execute_control_commands)
5181 (execute_control_commands_to_string): Declare.
5182 (execute_control_command): Add from_tty parameter.
5183 * cli/cli-script.c (execute_control_commands)
5184 (execute_control_commands_to_string): New functions.
5185 (execute_user_command): Use execute_control_commands.
5186 (execute_control_command_1): Add "from_tty" parameter. Update.
5187 (execute_control_command): Likewise.
5188
5189 2018-05-04 Tom Tromey <tom@tromey.com>
5190
5191 PR python/22731:
5192 * NEWS: Mention that breakpoint commands are writable.
5193 * python/py-breakpoint.c (bppy_set_commands): New function.
5194 (breakpoint_object_getset) <"commands">: Use it.
5195
5196 2018-05-04 Tom Tromey <tom@tromey.com>
5197
5198 * tracepoint.c (actions_command): Update.
5199 * mi/mi-cmd-break.c (mi_command_line_array)
5200 (mi_command_line_array_cnt, mi_command_line_array_ptr)
5201 (mi_read_next_line): Remove.
5202 (mi_cmd_break_commands): Update.
5203 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
5204 function_view.
5205 * cli/cli-script.c (get_command_line): Update.
5206 (process_next_line): Use function_view. Constify.
5207 (recurse_read_control_structure, read_command_lines)
5208 (read_command_lines_1): Change argument types to function_view.
5209 (do_define_command, document_command): Update.
5210 * breakpoint.h (check_tracepoint_command): Don't declare.
5211 * breakpoint.c (check_tracepoint_command): Remove.
5212 (commands_command_1, create_tracepoint_from_upload): Update.
5213
5214 2018-05-04 Tom Tromey <tom@tromey.com>
5215
5216 PR gdb/11750:
5217 * cli/cli-script.h (enum command_control_type) <define_control>:
5218 New constant.
5219 * cli/cli-script.c (multi_line_command_p): Handle define_control.
5220 (build_command_line, execute_control_command_1)
5221 (process_next_line): Likewise.
5222 (do_define_command): New function, extracted from define_command.
5223 (define_command): Use it.
5224
5225 2018-05-04 Tom Tromey <tom@tromey.com>
5226
5227 * tracepoint.c (actions_command): Update.
5228 * cli/cli-script.h (read_command_lines): Update.
5229 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
5230 (MAX_TMPBUF): Remove define.
5231 (define_command): Use string_printf.
5232 (document_command): Likewise.
5233 * breakpoint.c (commands_command_1): Update.
5234
5235 2018-05-04 Tom Tromey <tom@tromey.com>
5236
5237 * top.c (execute_command): Update.
5238 * cli/cli-script.h (print_command_lines): Now varargs.
5239 * cli/cli-script.c (print_command_lines): Now varargs.
5240 (execute_control_command_1) <case while_control, case if_control>:
5241 Update.
5242
5243 2018-05-04 Tom Tromey <tom@tromey.com>
5244
5245 * tracepoint.c (all_tracepoint_actions): Rename from
5246 all_tracepoint_actions_and_cleanup. Change return type.
5247 (actions_command, encode_actions_1, encode_actions)
5248 (trace_dump_actions, tdump_command): Update.
5249 * remote.c (remote_download_command_source): Update.
5250 * python/python.c (gdbpy_eval_from_control_command)
5251 (python_command, python_interactive_command): Update.
5252 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
5253 * guile/guile.c (guile_command)
5254 (gdbscm_eval_from_control_command, guile_command): Update.
5255 * compile/compile.c (compile_code_command)
5256 (compile_print_command, compile_to_object): Update.
5257 * cli/cli-script.h (struct command_lines_deleter): New.
5258 (counted_command_line): New typedef.
5259 (struct command_line): Add constructor, destructor.
5260 <body_list>: Remove.
5261 <body_list_0, body_list_1>: New members.
5262 (command_line_up): Remove typedef.
5263 (read_command_lines, read_command_lines_1, get_command_line):
5264 Update.
5265 (copy_command_lines): Don't declare.
5266 * cli/cli-script.c (build_command_line): Use "new".
5267 (get_command_line): Return counted_command_line.
5268 (print_command_lines, execute_user_command)
5269 (execute_control_command_1, while_command, if_command): Update.
5270 (realloc_body_list): Remove.
5271 (process_next_line, recurse_read_control_structure): Update.
5272 (read_command_lines, read_command_lines_1): Return counted_command_line.
5273 (free_command_lines): Use "delete".
5274 (copy_command_lines): Remove.
5275 (define_command, document_command, show_user_1): Update.
5276 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
5277 a counted_command_line.
5278 * breakpoint.h (counted_command_line): Remove typedef.
5279 (breakpoint_set_commands): Update.
5280 * breakpoint.c (check_no_tracepoint_commands)
5281 (validate_commands_for_breakpoint): Update.
5282 (breakpoint_set_commands): Change commands to be a
5283 counted_command_line.
5284 (commands_command_1, update_dprintf_command_list)
5285 (create_tracepoint_from_upload): Update.
5286
5287 2018-05-04 Tom Tromey <tom@tromey.com>
5288
5289 * cli/cli-decode.h (cmd_list_element): New constructor.
5290 (~cmd_list_element): New destructor.
5291 (struct cmd_list_element): Add initializers.
5292 * cli/cli-decode.c (do_add_cmd): Use "new".
5293 (delete_cmd): Use "delete".
5294
5295 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
5296 Pedro Alves <palves@redhat.com>
5297
5298 PR breakpoints/19806 and support for PR external/20207.
5299 * NEWS: Mention Aarch64 watchpoint improvements.
5300 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
5301 watchpoints and PR external/20207 watchpoints.
5302 * nat/aarch64-linux-hw-point.c
5303 (kernel_supports_any_contiguous_range): New.
5304 (aarch64_watchpoint_offset): New.
5305 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
5306 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
5307 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
5308 (aarch64_align_watchpoint): New parameters aligned_offset_p and
5309 next_addr_orig_p. Support PR external/20207 watchpoints.
5310 (aarch64_downgrade_regs): New.
5311 (aarch64_dr_state_insert_one_point): New parameters offset and
5312 addr_orig.
5313 (aarch64_dr_state_remove_one_point): Likewise.
5314 (aarch64_handle_breakpoint): Update caller.
5315 (aarch64_handle_aligned_watchpoint): Likewise.
5316 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
5317 aligned_offset.
5318 (aarch64_linux_set_debug_regs): Remove const from state. Call
5319 aarch64_downgrade_regs.
5320 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
5321 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
5322 (DR_CONTROL_MASK): ... this.
5323 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
5324 (unsigned int aarch64_watchpoint_offset): New prototype.
5325 (aarch64_linux_set_debug_regs): Remove const from state.
5326 * utils.c (align_up, align_down): Move to ...
5327 * common/common-utils.c (align_up, align_down): ... here.
5328 * utils.h (align_up, align_down): Move to ...
5329 * common/common-utils.h (align_up, align_down): ... here.
5330
5331 2018-05-04 Joel Brobecker <brobecker@adacore.com>
5332
5333 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
5334 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
5335 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
5336 Re-implement to match the ABI as summarized in GCC's
5337 gcc/config/sparc/sparc.c. All callers updated.
5338 (sparc32_store_arguments): Remove assertion.
5339
5340 2018-05-04 Tom Tromey <tom@tromey.com>
5341
5342 * printcmd.c: Don't include tui.h.
5343 (decode_format): Use skip_spaces.
5344
5345 2018-05-04 Tom Tromey <tom@tromey.com>
5346
5347 PR gdb/22619:
5348 * printcmd.c (last_count): New global.
5349 (x_command): Use saved count when repeating.
5350
5351 2018-05-04 Tom Tromey <tom@tromey.com>
5352
5353 * nto-procfs.c (do_closedir_cleanup): Remove.
5354 (procfs_pidlist): Use gdb_dir_up.
5355 * procfs.c (do_closedir_cleanup): Remove.
5356 (proc_update_threads): Use gdb_dir_up.
5357 * common/filestuff.h (struct gdb_dir_deleter): New.
5358 (gdb_dir_up): New typedef.
5359
5360 2018-05-04 Tom Tromey <tom@tromey.com>
5361
5362 * ada-lang.c (print_mention_exception): Use std::string.
5363
5364 2018-05-04 Tom Tromey <tom@tromey.com>
5365
5366 * ada-lang.c (create_excep_cond_exprs): Update.
5367 (ada_exception_catchpoint_cond_string): Use std::string.
5368
5369 2018-05-04 Tom Tromey <tom@tromey.com>
5370
5371 * ada-lang.c (xget_renaming_scope): Return std::string.
5372 (old_renaming_is_invisible): Update.
5373
5374 2018-05-04 Tom Tromey <tom@tromey.com>
5375
5376 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
5377 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
5378
5379 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
5380
5381 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
5382
5383 2018-05-04 Tom Tromey <tom@tromey.com>
5384
5385 * remote.c (remote_query_supported_append): Change type.
5386 (remote_check_symbols): Update.
5387
5388 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
5389
5390 PR gdb/11420
5391 * configure.ac: Prepend libpython.
5392 * python/python-config.py: Likewise.
5393 * configure: Regenerate.
5394
5395 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
5396
5397 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
5398
5399 2018-05-03 Pedro Alves <palves@redhat.com>
5400
5401 * s390-linux-nat.c
5402 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
5403 override. Write 'true' instead of '1'.
5404 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
5405 declaration.
5406
5407 2018-05-02 Pedro Alves <palves@redhat.com>
5408
5409 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
5410 add_inf_child_target.
5411 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
5412 add_inf_child_target.
5413 * aix-thread.c (aix_thread_target_info): New.
5414 (aix_thread_target) <shortname, longname, doc>: Delete.
5415 <info>: New.
5416 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
5417 add_inf_child_target.
5418 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
5419 add_inf_child_target.
5420 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
5421 add_inf_child_target.
5422 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
5423 add_inf_child_target.
5424 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
5425 add_inf_child_target.
5426 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
5427 add_inf_child_target.
5428 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
5429 add_inf_child_target.
5430 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
5431 add_inf_child_target.
5432 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
5433 add_inf_child_target.
5434 * bfd-target.c (target_bfd_target_info): New.
5435 (target_bfd) <shortname, longname, doc>: Delete.
5436 <info>: New.
5437 * bsd-kvm.c (bsd_kvm_target_info): New.
5438 (bsd_kvm_target) <shortname, longname, doc>: Delete.
5439 <info>: New.
5440 (bsd_kvm_target::open): Rename to ...
5441 (bsd_kvm_target_open): ... this. Adjust.
5442 * bsd-uthread.c (bsd_uthread_target_info): New.
5443 (bsd_uthread_target) <shortname, longname, doc>: Delete.
5444 <info>: New.
5445 * corefile.c (core_file_command): Adjust.
5446 * corelow.c (core_target_info): New.
5447 (core_target) <shortname, longname, doc>: Delete.
5448 <info>: New.
5449 (core_target::open): Rename to ...
5450 (core_target_open): ... this. Adjust.
5451 * ctf.c (ctf_target_info): New.
5452 (ctf_target) <shortname, longname, doc>: Delete.
5453 <info>: New.
5454 (ctf_target::open): Rename to ...
5455 (ctf_target_open): ... this.
5456 (_initialize_ctf): Adjust.
5457 * exec.c (exec_target_info): New.
5458 (exec_target) <shortname, longname, doc>: Delete.
5459 <info>: New.
5460 (exec_target::open): Rename to ...
5461 (exec_target_open): ... this.
5462 * gdbcore.h (core_target_open): Declare.
5463 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
5464 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
5465 add_inf_child_target.
5466 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
5467 add_inf_child_target.
5468 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
5469 add_inf_child_target.
5470 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
5471 add_inf_child_target.
5472 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
5473 add_inf_child_target.
5474 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
5475 add_inf_child_target.
5476 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
5477 add_inf_child_target.
5478 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
5479 add_inf_child_target.
5480 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
5481 add_inf_child_target.
5482 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
5483 add_inf_child_target.
5484 * inf-child.c (inf_child_target_info): New.
5485 (inf_child_target::info): New.
5486 (inf_child_open_target): Remove 'target' parameter. Use
5487 get_native_target instead.
5488 (inf_child_target::open): Delete.
5489 (add_inf_child_target): New.
5490 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
5491 Delete.
5492 <info>: New.
5493 (add_inf_child_target): Declare.
5494 (inf_child_open_target): Declare.
5495 * linux-thread-db.c (thread_db_target_info): New.
5496 (thread_db_target) <shortname, longname, doc>: Delete.
5497 <info>: New.
5498 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
5499 add_inf_child_target.
5500 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
5501 add_inf_child_target.
5502 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
5503 add_inf_child_target.
5504 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
5505 add_inf_child_target.
5506 * make-target-delegates (print_class): Adjust.
5507 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
5508 add_inf_child_target.
5509 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
5510 add_inf_child_target.
5511 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
5512 add_inf_child_target.
5513 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
5514 add_inf_child_target.
5515 * nto-procfs.c (nto_native_target_info): New.
5516 (nto_procfs_target_native) <shortname, longname, doc>:
5517 Delete.
5518 <info>: New.
5519 (nto_procfs_target_info): New.
5520 (nto_procfs_target_procfs) <shortname, longname, doc>:
5521 Delete.
5522 <info>: New.
5523 (init_procfs_targets): Adjust.
5524 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
5525 add_inf_child_target.
5526 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
5527 add_inf_child_target.
5528 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
5529 add_inf_child_target.
5530 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
5531 add_inf_child_target.
5532 * ravenscar-thread.c (ravenscar_target_info): New.
5533 (ravenscar_thread_target) <shortname, longname, doc>:
5534 Delete.
5535 <info>: New.
5536 * record-btrace.c (record_btrace_target_info):
5537 (record_btrace_target) <shortname, longname, doc>: Delete.
5538 <info>: New.
5539 (record_btrace_target::open): Rename to ...
5540 (record_btrace_target_open): ... this. Adjust.
5541 * record-full.c (record_longname, record_doc): New.
5542 (record_full_base_target) <shortname, longname, doc>: Delete.
5543 <info>: New.
5544 (record_full_target_info): New.
5545 (record_full_target): <shortname>: Delete.
5546 <info>: New.
5547 (record_full_core_open_1, record_full_open_1): Update comments.
5548 (record_full_base_target::open): Rename to ...
5549 (record_full_open): ... this.
5550 (cmd_record_full_restore): Update.
5551 (_initialize_record_full): Update.
5552 * remote-sim.c (remote_sim_target_info): New.
5553 (gdbsim_target) <shortname, longname, doc>: Delete.
5554 <info>: New.
5555 (gdbsim_target::open): Rename to ...
5556 (gdbsim_target_open): ... this.
5557 (_initialize_remote_sim): Adjust.
5558 * remote.c (remote_doc): New.
5559 (remote_target_info): New.
5560 (remote_target) <shortname, longname, doc>: Delete.
5561 <info>: New.
5562 (extended_remote_target_info): New.
5563 (extended_remote_target) <shortname, longname, doc>: Delete.
5564 <info>: New.
5565 (remote_target::open_1): Make static. Adjust.
5566 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
5567 * s390-linux-nat.c (_initialize_s390_nat): Use
5568 add_inf_child_target.
5569 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
5570 add_inf_child_target.
5571 * sol-thread.c (thread_db_target_info): New.
5572 (sol_thread_target) <shortname, longname, doc>: Delete.
5573 <info>: New.
5574 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
5575 add_inf_child_target.
5576 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
5577 add_inf_child_target.
5578 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
5579 add_inf_child_target.
5580 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
5581 add_inf_child_target.
5582 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
5583 add_inf_child_target.
5584 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
5585 add_inf_child_target.
5586 * spu-linux-nat.c (_initialize_spu_nat): Use
5587 add_inf_child_target.
5588 * spu-multiarch.c (spu_multiarch_target_info): New.
5589 (spu_multiarch_target) <shortname, longname, doc>: Delete.
5590 <info>: New.
5591 * target-delegates.c: Regenerate.
5592 * target.c: Include <unordered_map>.
5593 (target_ops_p): Delete.
5594 (DEF_VEC_P(target_ops_p)): Delete.
5595 (target_factories): New.
5596 (test_target_info): New.
5597 (test_target_ops::info): New.
5598 (open_target): Adjust to use target_factories.
5599 (add_target_with_completer): Rename to ...
5600 (add_target): ... this. Change prototype. Register target_info
5601 and open callback in target_factories. Register target_info in
5602 command context instead of target_ops.
5603 (add_target): Delete old implementation.
5604 (add_deprecated_target_alias): Change prototype. Adjust.
5605 (the_native_target): New.
5606 (set_native_target, get_native_target): New.
5607 (find_default_run_target): Use the_native_target.
5608 (find_attach_target, find_run_target): Simplify.
5609 (target_ops::open): Delete.
5610 (dummy_target_info): New.
5611 (dummy_target::shortname, dummy_target::longname)
5612 (dummy_target::doc): Delete.
5613 (dummy_target::info): New.
5614 (debug_target::shortname, debug_target::longname)
5615 (debug_target::doc): Delete.
5616 (debug_target::info): New.
5617 * target.h (struct target_info): New.
5618 (target_ops::~target_ops): Add comment.
5619 (target_ops::info): New.
5620 (target_ops::shortname, target_ops::longname, target_ops::doc): No
5621 longer virtual. Implement in terms of target_info.
5622 (set_native_target, get_native_target): Declare.
5623 (target_open_ftype): New.
5624 (add_target, add_target_with_completer)
5625 (add_deprecated_target_alias): Change prototype.
5626 (test_target) <shortname, longname, doc>: Delete.
5627 <info>: New.
5628 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
5629 add_inf_child_target.
5630 * tracefile-tfile.c (tfile_target_info): New.
5631 (tfile_target) <shortname, longname, doc>: Delete.
5632 <info>: New.
5633 (tfile_target::open): Rename to ...
5634 (tfile_target_open): ... this.
5635 (_initialize_tracefile_tfile): Adjust.
5636 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
5637 add_inf_child_target.
5638 * windows-nat.c (_initialize_windows_nat): Use
5639 add_inf_child_target.
5640 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
5641 add_inf_child_target.
5642
5643 2018-05-02 Pedro Alves <palves@redhat.com>
5644
5645 * linux-nat.h (linux_nat_target) <low_new_thread,
5646 low_delete_thread, low_new_fork, low_forget_process,
5647 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
5648 New virtual methods.
5649 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5650 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
5651 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
5652 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5653 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
5654 Delete.
5655 * linux-fork.c (delete_fork): Adjust to call low method.
5656 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
5657 (linux_nat_new_fork, linux_nat_forget_process_hook)
5658 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
5659 (linux_nat_status_is_event):
5660 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
5661 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
5662 to call low method.
5663 (sigtrap_is_event): Rename to ...
5664 (linux_nat_target::low_status_is_event): ... this.
5665 (linux_nat_set_status_is_event): Delete.
5666 (save_stop_reason, linux_nat_wait_1)
5667 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
5668 low methods.
5669 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5670 (linux_nat_set_new_fork, linux_nat_set_forget_process)
5671 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5672 (linux_nat_set_prepare_to_resume): Delete.
5673 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
5674 low virtual methods.
5675 * amd64-linux-nat.c: Likewise.
5676 * arm-linux-nat.c: Likewise.
5677 * i386-linux-nat.c: Likewise.
5678 * ia64-linux-nat.c: Likewise.
5679 * mips-linux-nat.c: Likewise.
5680 * ppc-linux-nat.c: Likewise.
5681 * s390-linux-nat.c: Likewise.
5682 * sparc64-linux-nat.c: Likewise.
5683 * x86-linux-nat.c: Likewise.
5684 * x86-linux-nat.h: Include "nat/x86-linux.h".
5685 (x86_linux_nat_target) <low_new_fork, low_forget_process,
5686 low_prepare_to_resume, low_new_thread, low_delete_thread>:
5687 Override methods.
5688
5689 2018-05-02 Pedro Alves <palves@redhat.com>
5690
5691 * target.h (target_ops)
5692 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5693 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
5694 stopped_by_watchpoint, have_continuable_watchpoint,
5695 stopped_data_address, watchpoint_addr_within_range,
5696 can_accel_watchpoint_condition, can_run, thread_alive,
5697 has_all_memory, has_memory, has_stack, has_registers,
5698 has_execution, can_async_p, is_async_p, supports_non_stop,
5699 always_non_stop_p, can_execute_reverse, supports_multi_process,
5700 supports_enable_disable_tracepoint,
5701 supports_disable_randomization, supports_string_tracing,
5702 supports_evaluation_of_breakpoint_conditions,
5703 can_run_breakpoint_commands, filesystem_is_local,
5704 can_download_tracepoint, get_trace_state_variable_value,
5705 set_trace_notes, get_tib_address, use_agent, can_use_agent,
5706 record_is_replaying, record_will_replay,
5707 augmented_libraries_svr4_read>: Adjust to return bool.
5708 * aarch64-linux-nat.c: All implementations adjusted.
5709 * aix-thread.c: All implementations adjusted.
5710 * arm-linux-nat.c: All implementations adjusted.
5711 * breakpoint.c: All implementations adjusted.
5712 * bsd-kvm.c: All implementations adjusted.
5713 * bsd-uthread.c: All implementations adjusted.
5714 * corelow.c: All implementations adjusted.
5715 * ctf.c: All implementations adjusted.
5716 * darwin-nat.c: All implementations adjusted.
5717 * darwin-nat.h: All implementations adjusted.
5718 * exec.c: All implementations adjusted.
5719 * fbsd-nat.c: All implementations adjusted.
5720 * fbsd-nat.h: All implementations adjusted.
5721 * gnu-nat.c: All implementations adjusted.
5722 * gnu-nat.h: All implementations adjusted.
5723 * go32-nat.c: All implementations adjusted.
5724 * ia64-linux-nat.c: All implementations adjusted.
5725 * inf-child.c: All implementations adjusted.
5726 * inf-child.h: All implementations adjusted.
5727 * inf-ptrace.c: All implementations adjusted.
5728 * inf-ptrace.h: All implementations adjusted.
5729 * linux-nat.c: All implementations adjusted.
5730 * linux-nat.h: All implementations adjusted.
5731 * mips-linux-nat.c: All implementations adjusted.
5732 * nto-procfs.c: All implementations adjusted.
5733 * ppc-linux-nat.c: All implementations adjusted.
5734 * procfs.c: All implementations adjusted.
5735 * ravenscar-thread.c: All implementations adjusted.
5736 * record-btrace.c: All implementations adjusted.
5737 * record-full.c: All implementations adjusted.
5738 * remote-sim.c: All implementations adjusted.
5739 * remote.c: All implementations adjusted.
5740 * s390-linux-nat.c: All implementations adjusted.
5741 * sol-thread.c: All implementations adjusted.
5742 * spu-multiarch.c: All implementations adjusted.
5743 * target-delegates.c: All implementations adjusted.
5744 * target.c: All implementations adjusted.
5745 * target.h: All implementations adjusted.
5746 * tracefile-tfile.c: All implementations adjusted.
5747 * tracefile.c: All implementations adjusted.
5748 * tracefile.h: All implementations adjusted.
5749 * windows-nat.c: All implementations adjusted.
5750 * x86-linux-nat.h: All implementations adjusted.
5751 * x86-nat.h: All implementations adjusted.
5752
5753 2018-05-02 Pedro Alves <palves@redhat.com>
5754
5755 * make-target-delegates (scan_target_h): Don't trim lines here.
5756 Replace sequences of tabs and/or whitespace with a single
5757 whitespace.
5758 (top level, parsing methods): Trim each line before processing it
5759 here.
5760
5761 2018-05-02 Pedro Alves <palves@redhat.com>
5762 John Baldwin <jhb@freebsd.org>
5763
5764 * target.h (enum strata) <debug_stratum>: New.
5765 (struct target_ops) <all delegation methods>: Replace by C++
5766 virtual methods, and drop "to_" prefix. All references updated
5767 throughout.
5768 <to_shortname, to_longname, to_doc, to_data,
5769 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
5770 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
5771 virtual methods. All references updated throughout.
5772 <can_attach, supports_terminal_ours, can_create_inferior,
5773 get_thread_control_capabilities, attach_no_wait>: New
5774 virtual methods.
5775 <insert_breakpoint, remove_breakpoint>: Now
5776 TARGET_DEFAULT_NORETURN methods.
5777 <info_proc>: Now returns bool.
5778 <to_magic>: Delete.
5779 (OPS_MAGIC): Delete.
5780 (current_target): Delete. All references replaced by references
5781 to ...
5782 (target_stack): ... this. New.
5783 (target_shortname, target_longname): Adjust.
5784 (target_can_run): Now a function declaration.
5785 (default_child_has_all_memory, default_child_has_memory)
5786 (default_child_has_stack, default_child_has_registers)
5787 (default_child_has_execution): Remove target_ops parameter.
5788 (complete_target_initialization): Delete.
5789 (memory_breakpoint_target): New template class.
5790 (test_target_ops): Refactor as a C++ class with virtual methods.
5791 * make-target-delegates (NAME_PART): Tighten.
5792 (POINTER_PART, CP_SYMBOL): New.
5793 (SIMPLE_RETURN_PART): Reimplement.
5794 (VEC_RETURN_PART): Expect less.
5795 (RETURN_PART, VIRTUAL_PART): New.
5796 (METHOD): Adjust to C++ virtual methods.
5797 (scan_target_h): Remove reference to C99.
5798 (dname): Output "target_ops::" prefix.
5799 (write_function_header): Adjust to output a C++ class method.
5800 (write_declaration): New.
5801 (write_delegator): Adjust to output a C++ class method.
5802 (tdname): Output "dummy_target::" prefix.
5803 (write_tdefault, write_debugmethod): Adjust to output a C++ class
5804 method.
5805 (tdefault_names, debug_names): Delete.
5806 (return_types, tdefaults, styles, argtypes_array): New.
5807 (top level): All methods are delegators.
5808 (print_class): New.
5809 (top level): Print dummy_target and debug_target classes.
5810 * target-delegates.c: Regenerate.
5811 * target-debug.h (target_debug_print_enum_info_proc_what)
5812 (target_debug_print_thread_control_capabilities)
5813 (target_debug_print_thread_info_p): New.
5814 * target.c (dummy_target): Delete.
5815 (the_dummy_target, the_debug_target): New.
5816 (target_stack): Now extern.
5817 (set_targetdebug): Push/unpush debug target.
5818 (default_child_has_all_memory, default_child_has_memory)
5819 (default_child_has_stack, default_child_has_registers)
5820 (default_child_has_execution): Remove target_ops parameter.
5821 (complete_target_initialization): Delete.
5822 (add_target_with_completer): No longer call
5823 complete_target_initialization.
5824 (target_supports_terminal_ours): Use regular delegation.
5825 (update_current_target): Delete.
5826 (push_target): No longer check magic number. Don't call
5827 update_current_target.
5828 (unpush_target): Don't call update_current_target.
5829 (target_is_pushed): No longer check magic number.
5830 (target_require_runnable): Skip for all stratums over
5831 process_stratum.
5832 (target_ops::info_proc): New.
5833 (target_info_proc): Use find_target_at and
5834 find_default_run_target.
5835 (target_supports_disable_randomization): Use regular delegation.
5836 (target_get_osdata): Use find_target_at.
5837 (target_ops::open, target_ops::close, target_ops::can_attach)
5838 (target_ops::attach, target_ops::can_create_inferior)
5839 (target_ops::create_inferior, target_ops::can_run)
5840 (target_can_run): New.
5841 (default_fileio_target): Use regular delegation.
5842 (target_ops::fileio_open, target_ops::fileio_pwrite)
5843 (target_ops::fileio_pread, target_ops::fileio_fstat)
5844 (target_ops::fileio_close, target_ops::fileio_unlink)
5845 (target_ops::fileio_readlink): New.
5846 (target_fileio_open_1, target_fileio_unlink)
5847 (target_fileio_readlink): Always call the target method. Handle
5848 FILEIO_ENOSYS.
5849 (return_zero, return_zero_has_execution): Delete.
5850 (init_dummy_target): Delete.
5851 (dummy_target::dummy_target, dummy_target::shortname)
5852 (dummy_target::longname, dummy_target::doc)
5853 (debug_target::debug_target, debug_target::shortname)
5854 (debug_target::longname, debug_target::doc): New.
5855 (target_supports_delete_record): Use regular delegation.
5856 (setup_target_debug): Delete.
5857 (maintenance_print_target_stack): Skip debug_stratum.
5858 (initialize_targets): Instantiate the_dummy_target and
5859 the_debug_target.
5860 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
5861 use target_stack.
5862 (target_auxv_search, fprint_target_auxv): Adjust.
5863 (info_auxv_command): Adjust to use target_stack.
5864 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
5865 * exceptions.c (print_flush): Handle a NULL target_stack.
5866 * regcache.c (target_ops_no_register): Refactor as class with
5867 virtual methods.
5868
5869 * exec.c (exec_target): New class.
5870 (exec_ops): Now an exec_target.
5871 (exec_open, exec_close_1, exec_get_section_table)
5872 (exec_xfer_partial, exec_files_info, exec_has_memory)
5873 (exec_make_note_section): Refactor as exec_target methods.
5874 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
5875 Delete.
5876 (exec_target::find_memory_regions): New.
5877 (_initialize_exec): Don't call init_exec_ops.
5878 * gdbcore.h (exec_file_clear): Delete.
5879
5880 * corefile.c (core_target): Delete.
5881 (core_file_command): Adjust.
5882 * corelow.c (core_target): New class.
5883 (the_core_target): New.
5884 (core_close): Remove target_ops parameter.
5885 (core_close_cleanup): Adjust.
5886 (core_target::close): New.
5887 (core_open, core_detach, get_core_registers, core_files_info)
5888 (core_xfer_partial, core_thread_alive, core_read_description)
5889 (core_pid_to_str, core_thread_name, core_has_memory)
5890 (core_has_stack, core_has_registers, core_info_proc): Rework as
5891 core_target methods.
5892 (ignore, core_remove_breakpoint, init_core_ops): Delete.
5893 (_initialize_corelow): Initialize the_core_target.
5894 * gdbcore.h (core_target): Delete.
5895 (the_core_target): New.
5896
5897 * ctf.c: (ctf_target): New class.
5898 (ctf_ops): Now a ctf_target.
5899 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
5900 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
5901 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
5902 methods.
5903 (init_ctf_ops): Delete.
5904 (_initialize_ctf): Don't call it.
5905 * tracefile-tfile.c (tfile_target): New class.
5906 (tfile_ops): Now a tfile_target.
5907 (tfile_open, tfile_close, tfile_files_info)
5908 (tfile_get_tracepoint_status, tfile_trace_find)
5909 (tfile_fetch_registers, tfile_xfer_partial)
5910 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
5911 Refactor as tfile_target methods.
5912 (tfile_xfer_partial_features): Remove target_ops parameter.
5913 (init_tfile_ops): Delete.
5914 (_initialize_tracefile_tfile): Don't call it.
5915 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
5916 (tracefile_has_stack, tracefile_has_registers)
5917 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
5918 tracefile_target methods.
5919 (init_tracefile_ops): Delete.
5920 (tracefile_target::tracefile_target): New.
5921 * tracefile.h: Include "target.h".
5922 (tracefile_target): New class.
5923 (init_tracefile_ops): Delete.
5924
5925 * spu-multiarch.c (spu_multiarch_target): New class.
5926 (spu_ops): Now a spu_multiarch_target.
5927 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
5928 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
5929 (spu_search_memory, spu_mourn_inferior): Refactor as
5930 spu_multiarch_target methods.
5931 (init_spu_ops): Delete.
5932 (_initialize_spu_multiarch): Remove references to init_spu_ops,
5933 complete_target_initialization.
5934
5935 * ravenscar-thread.c (ravenscar_thread_target): New class.
5936 (ravenscar_ops): Now a ravenscar_thread_target.
5937 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
5938 (ravenscar_thread_alive, ravenscar_pid_to_str)
5939 (ravenscar_fetch_registers, ravenscar_store_registers)
5940 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
5941 (ravenscar_stopped_by_hw_breakpoint)
5942 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
5943 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
5944 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
5945 methods.
5946 (init_ravenscar_thread_ops): Delete.
5947 (_initialize_ravenscar): Remove references to
5948 init_ravenscar_thread_ops and complete_target_initialization.
5949
5950 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
5951 (bsd_uthread_target): New class.
5952 (bsd_uthread_ops): Now a bsd_uthread_target.
5953 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
5954 (bsd_uthread_close, bsd_uthread_mourn_inferior)
5955 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
5956 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
5957 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
5958 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
5959 (bsd_uthread_target): Delete function.
5960 (_initialize_bsd_uthread): Remove reference to
5961 complete_target_initialization.
5962
5963 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
5964 (target_bfd): ... this new class.
5965 (target_bfd_xfer_partial, target_bfd_get_section_table)
5966 (target_bfd_close): Refactor as target_bfd methods.
5967 (target_bfd::~target_bfd): New.
5968 (target_bfd_reopen): Adjust.
5969 (target_bfd::close): New.
5970
5971 * record-btrace.c (record_btrace_target): New class.
5972 (record_btrace_ops): Now a record_btrace_target.
5973 (record_btrace_open, record_btrace_stop_recording)
5974 (record_btrace_disconnect, record_btrace_close)
5975 (record_btrace_async, record_btrace_info)
5976 (record_btrace_insn_history, record_btrace_insn_history_range)
5977 (record_btrace_insn_history_from, record_btrace_call_history)
5978 (record_btrace_call_history_range)
5979 (record_btrace_call_history_from, record_btrace_record_method)
5980 (record_btrace_is_replaying, record_btrace_will_replay)
5981 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
5982 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
5983 (record_btrace_store_registers, record_btrace_prepare_to_store)
5984 (record_btrace_to_get_unwinder)
5985 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
5986 (record_btrace_commit_resume, record_btrace_wait)
5987 (record_btrace_stop, record_btrace_can_execute_reverse)
5988 (record_btrace_stopped_by_sw_breakpoint)
5989 (record_btrace_supports_stopped_by_sw_breakpoint)
5990 (record_btrace_stopped_by_hw_breakpoint)
5991 (record_btrace_supports_stopped_by_hw_breakpoint)
5992 (record_btrace_update_thread_list, record_btrace_thread_alive)
5993 (record_btrace_goto_begin, record_btrace_goto_end)
5994 (record_btrace_goto, record_btrace_stop_replaying_all)
5995 (record_btrace_execution_direction)
5996 (record_btrace_prepare_to_generate_core)
5997 (record_btrace_done_generating_core): Refactor as
5998 record_btrace_target methods.
5999 (init_record_btrace_ops): Delete.
6000 (_initialize_record_btrace): Remove reference to
6001 init_record_btrace_ops.
6002 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
6003 the execution_direction global.
6004 (record_full_base_target, record_full_target)
6005 (record_full_core_target): New classes.
6006 (record_full_ops): Now a record_full_target.
6007 (record_full_core_ops): Now a record_full_core_target.
6008 (record_full_target::detach, record_full_target::disconnect)
6009 (record_full_core_target::disconnect)
6010 (record_full_target::mourn_inferior, record_full_target::kill):
6011 New.
6012 (record_full_open, record_full_close, record_full_async): Refactor
6013 as methods of the record_full_base_target class.
6014 (record_full_resume, record_full_commit_resume): Refactor
6015 as methods of the record_full_target class.
6016 (record_full_wait, record_full_stopped_by_watchpoint)
6017 (record_full_stopped_data_address)
6018 (record_full_stopped_by_sw_breakpoint)
6019 (record_full_supports_stopped_by_sw_breakpoint)
6020 (record_full_stopped_by_hw_breakpoint)
6021 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
6022 methods of the record_full_base_target class.
6023 (record_full_store_registers, record_full_xfer_partial)
6024 (record_full_insert_breakpoint, record_full_remove_breakpoint):
6025 Refactor as methods of the record_full_target class.
6026 (record_full_can_execute_reverse, record_full_get_bookmark)
6027 (record_full_goto_bookmark, record_full_execution_direction)
6028 (record_full_record_method, record_full_info, record_full_delete)
6029 (record_full_is_replaying, record_full_will_replay)
6030 (record_full_goto_begin, record_full_goto_end, record_full_goto)
6031 (record_full_stop_replaying): Refactor as methods of the
6032 record_full_base_target class.
6033 (record_full_core_resume, record_full_core_kill)
6034 (record_full_core_fetch_registers)
6035 (record_full_core_prepare_to_store)
6036 (record_full_core_store_registers, record_full_core_xfer_partial)
6037 (record_full_core_insert_breakpoint)
6038 (record_full_core_remove_breakpoint)
6039 (record_full_core_has_execution): Refactor
6040 as methods of the record_full_core_target class.
6041 (record_full_base_target::supports_delete_record): New.
6042 (init_record_full_ops): Delete.
6043 (init_record_full_core_ops): Delete.
6044 (record_full_save): Refactor as method of the
6045 record_full_base_target class.
6046 (_initialize_record_full): Remove references to
6047 init_record_full_ops and init_record_full_core_ops.
6048
6049 * remote.c (remote_target, extended_remote_target): New classes.
6050 (remote_ops): Now a remote_target.
6051 (extended_remote_ops): Now an extended_remote_target.
6052 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
6053 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
6054 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
6055 (remote_pass_signals, remote_set_syscall_catchpoint)
6056 (remote_program_signals, )
6057 (remote_thread_always_alive): Remove target_ops parameter.
6058 (remote_thread_alive, remote_thread_name)
6059 (remote_update_thread_list, remote_threads_extra_info)
6060 (remote_static_tracepoint_marker_at)
6061 (remote_static_tracepoint_markers_by_strid)
6062 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
6063 (remote_open): Refactor as methods of remote_target.
6064 (extended_remote_open, extended_remote_detach)
6065 (extended_remote_attach, extended_remote_post_attach):
6066 (extended_remote_supports_disable_randomization)
6067 (extended_remote_create_inferior): : Refactor as method of
6068 extended_remote_target.
6069 (remote_set_permissions, remote_open_1, remote_detach)
6070 (remote_follow_fork, remote_follow_exec, remote_disconnect)
6071 (remote_resume, remote_commit_resume, remote_stop)
6072 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
6073 (remote_terminal_ours, remote_wait, remote_fetch_registers)
6074 (remote_prepare_to_store, remote_store_registers)
6075 (remote_flash_erase, remote_flash_done, remote_files_info)
6076 (remote_kill, remote_mourn, remote_insert_breakpoint)
6077 (remote_remove_breakpoint, remote_insert_watchpoint)
6078 (remote_watchpoint_addr_within_range)
6079 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
6080 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
6081 (remote_supports_stopped_by_sw_breakpoint)
6082 (remote_stopped_by_hw_breakpoint)
6083 (remote_supports_stopped_by_hw_breakpoint)
6084 (remote_stopped_by_watchpoint, remote_stopped_data_address)
6085 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
6086 (remote_verify_memory): Refactor as methods of remote_target.
6087 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
6088 parameter.
6089 (remote_xfer_partial, remote_get_memory_xfer_limit)
6090 (remote_search_memory, remote_rcmd, remote_memory_map)
6091 (remote_pid_to_str, remote_get_thread_local_address)
6092 (remote_get_tib_address, remote_read_description): Refactor as
6093 methods of remote_target.
6094 (remote_target::fileio_open, remote_target::fileio_pwrite)
6095 (remote_target::fileio_pread, remote_target::fileio_close): New.
6096 (remote_hostio_readlink, remote_hostio_fstat)
6097 (remote_filesystem_is_local, remote_can_execute_reverse)
6098 (remote_supports_non_stop, remote_supports_disable_randomization)
6099 (remote_supports_multi_process, remote_supports_cond_breakpoints)
6100 (remote_supports_enable_disable_tracepoint)
6101 (remote_supports_string_tracing)
6102 (remote_can_run_breakpoint_commands, remote_trace_init)
6103 (remote_download_tracepoint, remote_can_download_tracepoint)
6104 (remote_download_trace_state_variable, remote_enable_tracepoint)
6105 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
6106 (remote_trace_start, remote_get_trace_status)
6107 (remote_get_tracepoint_status, remote_trace_stop)
6108 (remote_trace_find, remote_get_trace_state_variable_value)
6109 (remote_save_trace_data, remote_get_raw_trace_data)
6110 (remote_set_disconnected_tracing, remote_core_of_thread)
6111 (remote_set_circular_trace_buffer, remote_traceframe_info)
6112 (remote_get_min_fast_tracepoint_insn_len)
6113 (remote_set_trace_buffer_size, remote_set_trace_notes)
6114 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
6115 (remote_disable_btrace, remote_teardown_btrace)
6116 (remote_read_btrace, remote_btrace_conf)
6117 (remote_augmented_libraries_svr4_read, remote_load)
6118 (remote_pid_to_exec_file, remote_can_do_single_step)
6119 (remote_execution_direction, remote_thread_handle_to_thread_info):
6120 Refactor as methods of remote_target.
6121 (init_remote_ops, init_extended_remote_ops): Delete.
6122 (remote_can_async_p, remote_is_async_p, remote_async)
6123 (remote_thread_events, remote_upload_tracepoints)
6124 (remote_upload_trace_state_variables): Refactor as methods of
6125 remote_target.
6126 (_initialize_remote): Remove references to init_remote_ops and
6127 init_extended_remote_ops.
6128
6129 * remote-sim.c (gdbsim_target): New class.
6130 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
6131 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
6132 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
6133 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
6134 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
6135 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
6136 Refactor as methods of gdbsim_target.
6137 (gdbsim_ops): Now a gdbsim_target.
6138 (init_gdbsim_ops): Delete.
6139 (gdbsim_cntrl_c): Adjust.
6140 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
6141
6142 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
6143 (the_amd64_linux_nat_target): New.
6144 (amd64_linux_fetch_inferior_registers)
6145 (amd64_linux_store_inferior_registers): Refactor as methods of
6146 amd64_linux_nat_target.
6147 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
6148 * i386-linux-nat.c: Don't include "linux-nat.h".
6149 (i386_linux_nat_target): New class.
6150 (the_i386_linux_nat_target): New.
6151 (i386_linux_fetch_inferior_registers)
6152 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
6153 as methods of i386_linux_nat_target.
6154 (_initialize_i386_linux_nat): Adjust. Set linux_target.
6155 * inf-child.c (inf_child_ops): Delete.
6156 (inf_child_fetch_inferior_registers)
6157 (inf_child_store_inferior_registers): Delete.
6158 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
6159 methods of inf_child_target.
6160 (inf_child_target::supports_terminal_ours)
6161 (inf_child_target::terminal_init)
6162 (inf_child_target::terminal_inferior)
6163 (inf_child_target::terminal_ours_for_output)
6164 (inf_child_target::terminal_ours, inf_child_target::interrupt)
6165 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
6166 New.
6167 (inf_child_open, inf_child_disconnect, inf_child_close)
6168 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
6169 (inf_child_post_startup_inferior, inf_child_can_run)
6170 (inf_child_pid_to_exec_file): Refactor as methods of
6171 inf_child_target.
6172 (inf_child_follow_fork): Delete.
6173 (inf_child_target::can_create_inferior)
6174 (inf_child_target::can_attach): New.
6175 (inf_child_target::has_all_memory, inf_child_target::has_memory)
6176 (inf_child_target::has_stack, inf_child_target::has_registers)
6177 (inf_child_target::has_execution): New.
6178 (inf_child_fileio_open, inf_child_fileio_pwrite)
6179 (inf_child_fileio_pread, inf_child_fileio_fstat)
6180 (inf_child_fileio_close, inf_child_fileio_unlink)
6181 (inf_child_fileio_readlink, inf_child_use_agent)
6182 (inf_child_can_use_agent): Refactor as methods of
6183 inf_child_target.
6184 (return_zero, inf_child_target): Delete.
6185 (inf_child_target::inf_child_target): New.
6186 * inf-child.h: Include "target.h".
6187 (inf_child_target): Delete function prototype.
6188 (inf_child_target): New class.
6189 (inf_child_open_target, inf_child_mourn_inferior)
6190 (inf_child_maybe_unpush_target): Delete.
6191 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
6192 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
6193 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
6194 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
6195 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
6196 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
6197 (inf_ptrace_wait, inf_ptrace_xfer_partial)
6198 (inf_ptrace_thread_alive, inf_ptrace_files_info)
6199 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
6200 methods of inf_ptrace_target.
6201 (inf_ptrace_target): Delete function.
6202 * inf-ptrace.h: Include "inf-child.h".
6203 (inf_ptrace_target): Delete function declaration.
6204 (inf_ptrace_target): New class.
6205 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
6206 * linux-nat.c (linux_target): New.
6207 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
6208 (linux_nat_target::~linux_nat_target): New.
6209 (linux_child_post_attach, linux_child_post_startup_inferior)
6210 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
6211 (linux_child_remove_fork_catchpoint)
6212 (linux_child_insert_vfork_catchpoint)
6213 (linux_child_remove_vfork_catchpoint)
6214 (linux_child_insert_exec_catchpoint)
6215 (linux_child_remove_exec_catchpoint)
6216 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
6217 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
6218 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
6219 (linux_nat_stopped_data_address)
6220 (linux_nat_stopped_by_sw_breakpoint)
6221 (linux_nat_supports_stopped_by_sw_breakpoint)
6222 (linux_nat_stopped_by_hw_breakpoint)
6223 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
6224 (linux_nat_kill, linux_nat_mourn_inferior)
6225 (linux_nat_xfer_partial, linux_nat_thread_alive)
6226 (linux_nat_update_thread_list, linux_nat_pid_to_str)
6227 (linux_nat_thread_name, linux_child_pid_to_exec_file)
6228 (linux_child_static_tracepoint_markers_by_strid)
6229 (linux_nat_is_async_p, linux_nat_can_async_p)
6230 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
6231 (linux_nat_supports_multi_process)
6232 (linux_nat_supports_disable_randomization, linux_nat_async)
6233 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
6234 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
6235 (linux_nat_fileio_open, linux_nat_fileio_readlink)
6236 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
6237 methods of linux_nat_target.
6238 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
6239 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
6240 parameter.
6241 (check_stopped_by_watchpoint): Adjust.
6242 (linux_xfer_partial): Delete.
6243 (linux_target_install_ops, linux_target, linux_nat_add_target):
6244 Delete.
6245 (linux_nat_target::linux_nat_target): New.
6246 * linux-nat.h: Include "inf-ptrace.h".
6247 (linux_nat_target): New.
6248 (linux_target, linux_target_install_ops, linux_nat_add_target):
6249 Delete function declarations.
6250 (linux_target): Declare global.
6251 * linux-thread-db.c (thread_db_target): New.
6252 (thread_db_target::thread_db_target): New.
6253 (thread_db_ops): Delete.
6254 (the_thread_db_target): New.
6255 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
6256 (thread_db_update_thread_list, thread_db_pid_to_str)
6257 (thread_db_extra_thread_info)
6258 (thread_db_thread_handle_to_thread_info)
6259 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
6260 (thread_db_resume): Refactor as methods of thread_db_target.
6261 (init_thread_db_ops): Delete.
6262 (_initialize_thread_db): Remove reference to init_thread_db_ops.
6263 * x86-linux-nat.c: Don't include "linux-nat.h".
6264 (super_post_startup_inferior): Delete.
6265 (x86_linux_nat_target::~x86_linux_nat_target): New.
6266 (x86_linux_child_post_startup_inferior)
6267 (x86_linux_read_description, x86_linux_enable_btrace)
6268 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
6269 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
6270 methods of x86_linux_nat_target.
6271 (x86_linux_create_target): Delete. Bits folded ...
6272 (x86_linux_add_target): ... here. Now takes a linux_nat_target
6273 pointer.
6274 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
6275 (x86_linux_nat_target): New class.
6276 (x86_linux_create_target): Delete.
6277 (x86_linux_add_target): Now takes a linux_nat_target pointer.
6278 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
6279 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
6280 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
6281 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
6282 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
6283 make extern.
6284 (x86_use_watchpoints): Delete.
6285 * x86-nat.h: Include "breakpoint.h" and "target.h".
6286 (x86_use_watchpoints): Delete.
6287 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
6288 (x86_stopped_by_watchpoint, x86_stopped_data_address)
6289 (x86_insert_watchpoint, x86_remove_watchpoint)
6290 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
6291 (x86_stopped_by_hw_breakpoint): New declarations.
6292 (x86_nat_target): New template class.
6293
6294 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
6295 (the_ppc_linux_nat_target): New.
6296 (ppc_linux_fetch_inferior_registers)
6297 (ppc_linux_can_use_hw_breakpoint)
6298 (ppc_linux_region_ok_for_hw_watchpoint)
6299 (ppc_linux_ranged_break_num_registers)
6300 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
6301 (ppc_linux_insert_mask_watchpoint)
6302 (ppc_linux_remove_mask_watchpoint)
6303 (ppc_linux_can_accel_watchpoint_condition)
6304 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
6305 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
6306 (ppc_linux_watchpoint_addr_within_range)
6307 (ppc_linux_masked_watch_num_registers)
6308 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
6309 (ppc_linux_read_description): Refactor as methods of
6310 ppc_linux_nat_target.
6311 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
6312
6313 * procfs.c (procfs_xfer_partial): Delete forward declaration.
6314 (procfs_target): New class.
6315 (the_procfs_target): New.
6316 (procfs_target): Delete function.
6317 (procfs_auxv_parse, procfs_attach, procfs_detach)
6318 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
6319 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
6320 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
6321 (procfs_create_inferior, procfs_update_thread_list)
6322 (procfs_thread_alive, procfs_pid_to_str)
6323 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
6324 (procfs_stopped_data_address, procfs_insert_watchpoint)
6325 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
6326 (proc_find_memory_regions, procfs_info_proc)
6327 (procfs_make_note_section): Refactor as methods of procfs_target.
6328 (_initialize_procfs): Adjust.
6329 * sol-thread.c (sol_thread_target): New class.
6330 (sol_thread_ops): Now a sol_thread_target.
6331 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
6332 (sol_thread_fetch_registers, sol_thread_store_registers)
6333 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
6334 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
6335 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
6336 (init_sol_thread_ops): Delete.
6337 (_initialize_sol_thread): Adjust. Remove references to
6338 init_sol_thread_ops and complete_target_initialization.
6339
6340 * windows-nat.c (windows_nat_target): New class.
6341 (windows_fetch_inferior_registers)
6342 (windows_store_inferior_registers, windows_resume, windows_wait)
6343 (windows_attach, windows_detach, windows_pid_to_exec_file)
6344 (windows_files_info, windows_create_inferior)
6345 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
6346 (windows_close, windows_pid_to_str, windows_xfer_partial)
6347 (windows_get_tib_address, windows_get_ada_task_ptid)
6348 (windows_thread_name, windows_thread_alive): Refactor as
6349 windows_nat_target methods.
6350 (do_initial_windows_stuff): Adjust.
6351 (windows_target): Delete function.
6352 (_initialize_windows_nat): Adjust.
6353
6354 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
6355 (darwin_mourn_inferior, darwin_kill_inferior)
6356 (darwin_create_inferior, darwin_attach, darwin_detach)
6357 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
6358 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
6359 (darwin_supports_multi_process): Refactor as darwin_nat_target
6360 methods.
6361 (darwin_resume_to, darwin_files_info): Delete.
6362 (_initialize_darwin_inferior): Rename to ...
6363 (_initialize_darwin_nat): ... this. Adjust to C++ification.
6364 * darwin-nat.h: Include "inf-child.h".
6365 (darwin_nat_target): New class.
6366 (darwin_complete_target): Delete.
6367 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
6368 (darwin_target): New.
6369 (i386_darwin_fetch_inferior_registers)
6370 (i386_darwin_store_inferior_registers): Refactor as methods of
6371 darwin_nat_target.
6372 (darwin_complete_target): Delete, with ...
6373 (_initialize_i386_darwin_nat): ... bits factored out here.
6374
6375 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
6376 (the_alpha_linux_nat_target): New.
6377 (alpha_linux_register_u_offset): Refactor as
6378 alpha_linux_nat_target method.
6379 (_initialize_alpha_linux_nat): Adjust.
6380 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
6381 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6382 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
6383 methods of linux_nat_trad_target.
6384 (linux_trad_target): Delete.
6385 * linux-nat-trad.h (linux_trad_target): Delete function.
6386 (linux_nat_trad_target): New class.
6387 * mips-linux-nat.c (mips_linux_nat_target): New class.
6388 (super_fetch_registers, super_store_registers, super_close):
6389 Delete.
6390 (the_mips_linux_nat_target): New.
6391 (mips64_linux_regsets_fetch_registers)
6392 (mips64_linux_regsets_store_registers)
6393 (mips64_linux_fetch_registers, mips64_linux_store_registers)
6394 (mips_linux_register_u_offset, mips_linux_read_description)
6395 (mips_linux_can_use_hw_breakpoint)
6396 (mips_linux_stopped_by_watchpoint)
6397 (mips_linux_stopped_data_address)
6398 (mips_linux_region_ok_for_hw_watchpoint)
6399 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
6400 (mips_linux_close): Refactor as methods of mips_linux_nat.
6401 (_initialize_mips_linux_nat): Adjust to C++ification.
6402
6403 * aix-thread.c (aix_thread_target): New class.
6404 (aix_thread_ops): Now an aix_thread_target.
6405 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
6406 (aix_thread_fetch_registers, aix_thread_store_registers)
6407 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
6408 (aix_thread_thread_alive, aix_thread_pid_to_str)
6409 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
6410 Refactor as methods of aix_thread_target.
6411 (init_aix_thread_ops): Delete.
6412 (_initialize_aix_thread): Remove references to init_aix_thread_ops
6413 and complete_target_initialization.
6414 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
6415 (rs6000_nat_target): New class.
6416 (the_rs6000_nat_target): New.
6417 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
6418 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
6419 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
6420 (super_create_inferior): Delete.
6421 (_initialize_rs6000_nat): Adjust to C++ification.
6422
6423 * arm-linux-nat.c (arm_linux_nat_target): New class.
6424 (the_arm_linux_nat_target): New.
6425 (arm_linux_fetch_inferior_registers)
6426 (arm_linux_store_inferior_registers, arm_linux_read_description)
6427 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
6428 (arm_linux_remove_hw_breakpoint)
6429 (arm_linux_region_ok_for_hw_watchpoint)
6430 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
6431 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
6432 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
6433 arm_linux_nat_target.
6434 (_initialize_arm_linux_nat): Adjust to C++ification.
6435
6436 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
6437 (the_aarch64_linux_nat_target): New.
6438 (aarch64_linux_fetch_inferior_registers)
6439 (aarch64_linux_store_inferior_registers)
6440 (aarch64_linux_child_post_startup_inferior)
6441 (aarch64_linux_read_description)
6442 (aarch64_linux_can_use_hw_breakpoint)
6443 (aarch64_linux_insert_hw_breakpoint)
6444 (aarch64_linux_remove_hw_breakpoint)
6445 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
6446 (aarch64_linux_region_ok_for_hw_watchpoint)
6447 (aarch64_linux_stopped_data_address)
6448 (aarch64_linux_stopped_by_watchpoint)
6449 (aarch64_linux_watchpoint_addr_within_range)
6450 (aarch64_linux_can_do_single_step): Refactor as methods of
6451 aarch64_linux_nat_target.
6452 (super_post_startup_inferior): Delete.
6453 (_initialize_aarch64_linux_nat): Adjust to C++ification.
6454
6455 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
6456 (the_hppa_linux_nat_target): New.
6457 (hppa_linux_fetch_inferior_registers)
6458 (hppa_linux_store_inferior_registers): Refactor as methods of
6459 hppa_linux_nat_target.
6460 (_initialize_hppa_linux_nat): Adjust to C++ification.
6461
6462 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
6463 (the_ia64_linux_nat_target): New.
6464 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
6465 (ia64_linux_stopped_data_address)
6466 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
6467 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
6468 ia64_linux_nat_target methods.
6469 (super_xfer_partial): Delete.
6470 (_initialize_ia64_linux_nat): Adjust to C++ification.
6471
6472 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
6473 (the_m32r_linux_nat_target): New.
6474 (m32r_linux_fetch_inferior_registers)
6475 (m32r_linux_store_inferior_registers): Refactor as
6476 m32r_linux_nat_target methods.
6477 (_initialize_m32r_linux_nat): Adjust to C++ification.
6478
6479 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
6480 (the_m68k_linux_nat_target): New.
6481 (m68k_linux_fetch_inferior_registers)
6482 (m68k_linux_store_inferior_registers): Refactor as
6483 m68k_linux_nat_target methods.
6484 (_initialize_m68k_linux_nat): Adjust to C++ification.
6485
6486 * s390-linux-nat.c (s390_linux_nat_target): New class.
6487 (the_s390_linux_nat_target): New.
6488 (s390_linux_fetch_inferior_registers)
6489 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
6490 (s390_insert_watchpoint, s390_remove_watchpoint)
6491 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
6492 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
6493 (s390_auxv_parse, s390_read_description): Refactor as methods of
6494 s390_linux_nat_target.
6495 (_initialize_s390_nat): Adjust to C++ification.
6496
6497 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
6498 (the_sparc_linux_nat_target): New.
6499 (_initialize_sparc_linux_nat): Adjust to C++ification.
6500 * sparc-nat.c (sparc_fetch_inferior_registers)
6501 (sparc_store_inferior_registers): Remove target_ops parameter.
6502 * sparc-nat.h (sparc_fetch_inferior_registers)
6503 (sparc_store_inferior_registers): Remove target_ops parameter.
6504 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
6505 (the_sparc64_linux_nat_target): New.
6506 (_initialize_sparc64_linux_nat): Adjust to C++ification.
6507
6508 * spu-linux-nat.c (spu_linux_nat_target): New class.
6509 (the_spu_linux_nat_target): New.
6510 (spu_child_post_startup_inferior, spu_child_post_attach)
6511 (spu_child_wait, spu_fetch_inferior_registers)
6512 (spu_store_inferior_registers, spu_xfer_partial)
6513 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
6514 methods.
6515 (_initialize_spu_nat): Adjust to C++ification.
6516
6517 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
6518 (the_tilegx_linux_nat_target): New.
6519 (fetch_inferior_registers, store_inferior_registers):
6520 Refactor as methods.
6521 (_initialize_tile_linux_nat): Adjust to C++ification.
6522
6523 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
6524 (the_xtensa_linux_nat_target): New.
6525 (xtensa_linux_fetch_inferior_registers)
6526 (xtensa_linux_store_inferior_registers): Refactor as
6527 xtensa_linux_nat_target methods.
6528 (_initialize_xtensa_linux_nat): Adjust to C++ification.
6529
6530 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
6531 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
6532 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
6533 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
6534 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
6535 (fbsd_stopped_by_sw_breakpoint)
6536 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
6537 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
6538 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
6539 (fbsd_post_startup_inferior, fbsd_post_attach)
6540 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
6541 (fbsd_set_syscall_catchpoint)
6542 (super_xfer_partial, super_resume, super_wait)
6543 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
6544 (fbsd_handle_debug_trap): Remove target_ops parameter.
6545 (fbsd_nat_add_target): Delete.
6546 * fbsd-nat.h: Include "inf-ptrace.h".
6547 (fbsd_nat_add_target): Delete.
6548 (USE_SIGTRAP_SIGINFO): Define.
6549 (fbsd_nat_target): New class.
6550
6551 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
6552 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
6553 (amd64bsd_target): Delete.
6554 * amd64-bsd-nat.h: New file.
6555 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
6556 "x86-bsd-nat.h".
6557 (amd64_fbsd_nat_target): New class.
6558 (the_amd64_fbsd_nat_target): New.
6559 (amd64fbsd_read_description): Refactor as method of
6560 amd64_fbsd_nat_target.
6561 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6562 (_initialize_amd64fbsd_nat): Adjust to C++ification.
6563 * amd64-nat.h (amd64bsd_target): Delete function declaration.
6564 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
6565 (i386bsd_store_inferior_registers): Remove target_ops parameter.
6566 (i386bsd_target): Delete.
6567 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
6568 (i386bsd_fetch_inferior_registers)
6569 (i386bsd_store_inferior_registers): Declare.
6570 (i386_bsd_nat_target): New class.
6571 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
6572 (the_i386_fbsd_nat_target): New.
6573 (i386fbsd_resume, i386fbsd_read_description): Refactor as
6574 i386_fbsd_nat_target methods.
6575 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6576 (_initialize_i386fbsd_nat): Adjust to C++ification.
6577 * x86-bsd-nat.c (super_mourn_inferior): Delete.
6578 (x86bsd_mourn_inferior, x86bsd_target): Delete.
6579 (_initialize_x86_bsd_nat): Adjust to C++ification.
6580 * x86-bsd-nat.h: Include "x86-nat.h".
6581 (x86bsd_target): Delete declaration.
6582 (x86bsd_nat_target): New class.
6583
6584 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
6585 (the_aarch64_fbsd_nat_target): New.
6586 (aarch64_fbsd_fetch_inferior_registers)
6587 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
6588 aarch64_fbsd_nat_target.
6589 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
6590 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
6591 (the_alpha_bsd_nat_target): New.
6592 (alphabsd_fetch_inferior_registers)
6593 (alphabsd_store_inferior_registers): Refactor as
6594 alpha_bsd_nat_target methods.
6595 (_initialize_alphabsd_nat): Refactor as methods of
6596 alpha_bsd_nat_target.
6597 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
6598 (the_amd64_nbsd_nat_target): New.
6599 (_initialize_amd64nbsd_nat): Adjust to C++ification.
6600 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
6601 (the_amd64_obsd_nat_target): New.
6602 (_initialize_amd64obsd_nat): Adjust to C++ification.
6603 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
6604 (the_arm_fbsd_nat_target): New.
6605 (arm_fbsd_fetch_inferior_registers)
6606 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
6607 (_initialize_arm_fbsd_nat): Refactor as methods of
6608 arm_fbsd_nat_target.
6609 (_initialize_arm_fbsd_nat): Adjust to C++ification.
6610 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
6611 (the_arm_netbsd_nat_target): New.
6612 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
6613 arm_netbsd_nat_target.
6614 (_initialize_arm_netbsd_nat): Adjust to C++ification.
6615 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
6616 (the_hppa_nbsd_nat_target): New.
6617 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
6618 hppa_nbsd_nat_target methods.
6619 (_initialize_hppanbsd_nat): Adjust to C++ification.
6620 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
6621 (the_hppa_obsd_nat_target): New.
6622 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
6623 methods of hppa_obsd_nat_target.
6624 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
6625 add_target.
6626 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
6627 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
6628 add_target.
6629 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
6630 (_initialize_i386obsd_nat): Use add_target.
6631 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
6632 (the_m68k_bsd_nat_target): New.
6633 (m68kbsd_fetch_inferior_registers)
6634 (m68kbsd_store_inferior_registers): Refactor as methods of
6635 m68k_bsd_nat_target.
6636 (_initialize_m68kbsd_nat): Adjust to C++ification.
6637 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
6638 (the_mips_fbsd_nat_target): New.
6639 (mips_fbsd_fetch_inferior_registers)
6640 (mips_fbsd_store_inferior_registers): Refactor as methods of
6641 mips_fbsd_nat_target.
6642 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
6643 add_target.
6644 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
6645 (the_mips_nbsd_nat_target): New.
6646 (mipsnbsd_fetch_inferior_registers)
6647 (mipsnbsd_store_inferior_registers): Refactor as methods of
6648 mips_nbsd_nat_target.
6649 (_initialize_mipsnbsd_nat): Adjust to C++ification.
6650 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
6651 (the_mips64_obsd_nat_target): New.
6652 (mips64obsd_fetch_inferior_registers)
6653 (mips64obsd_store_inferior_registers): Refactor as methods of
6654 mips64_obsd_nat_target.
6655 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
6656 add_target.
6657 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
6658 nbsd_nat_target.
6659 * nbsd-nat.h: Include "inf-ptrace.h".
6660 (nbsd_nat_target): New class.
6661 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
6662 (obsd_wait): Refactor as methods of obsd_nat_target.
6663 (obsd_add_target): Delete.
6664 * obsd-nat.h: Include "inf-ptrace.h".
6665 (obsd_nat_target): New class.
6666 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
6667 (the_ppc_fbsd_nat_target): New.
6668 (ppcfbsd_fetch_inferior_registers)
6669 (ppcfbsd_store_inferior_registers): Refactor as methods of
6670 ppc_fbsd_nat_target.
6671 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
6672 add_target.
6673 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
6674 (the_ppc_nbsd_nat_target): New.
6675 (ppcnbsd_fetch_inferior_registers)
6676 (ppcnbsd_store_inferior_registers): Refactor as methods of
6677 ppc_nbsd_nat_target.
6678 (_initialize_ppcnbsd_nat): Adjust to C++ification.
6679 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
6680 (the_ppc_obsd_nat_target): New.
6681 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
6682 methods of ppc_obsd_nat_target.
6683 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
6684 add_target.
6685 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
6686 (the_sh_nbsd_nat_target): New.
6687 (shnbsd_fetch_inferior_registers)
6688 (shnbsd_store_inferior_registers): Refactor as methods of
6689 sh_nbsd_nat_target.
6690 (_initialize_shnbsd_nat): Adjust to C++ification.
6691 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
6692 (inf_ptrace_xfer_partial): Delete.
6693 (sparc_xfer_partial, sparc_target): Delete.
6694 * sparc-nat.h (sparc_fetch_inferior_registers)
6695 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
6696 (sparc_target): Delete function declaration.
6697 (sparc_target): New template class.
6698 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
6699 (_initialize_sparcnbsd_nat): Adjust to C++ification.
6700 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
6701 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
6702 add_target.
6703 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
6704 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
6705 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
6706 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
6707 add_target.
6708 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
6709 (the_vax_bsd_nat_target): New.
6710 (vaxbsd_fetch_inferior_registers)
6711 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
6712 methods.
6713 (_initialize_vaxbsd_nat): Adjust to C++ification.
6714
6715 * bsd-kvm.c (bsd_kvm_target): New class.
6716 (bsd_kvm_ops): Now a bsd_kvm_target.
6717 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
6718 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
6719 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
6720 bsd_kvm_target.
6721 (bsd_kvm_return_one): Delete.
6722 (bsd_kvm_add_target): Adjust to C++ification.
6723
6724 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
6725 (nto_procfs_target_procfs): New classes.
6726 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
6727 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
6728 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
6729 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
6730 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
6731 (procfs_remove_hw_breakpoint, procfs_resume)
6732 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
6733 (procfs_kill_inferior, procfs_store_registers)
6734 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
6735 as methods of nto_procfs_target.
6736 (nto_procfs_ops): Now an nto_procfs_target_procfs.
6737 (nto_native_ops): Delete.
6738 (procfs_open, procfs_native_open): Delete.
6739 (nto_native_ops): Now an nto_procfs_target_native.
6740 (init_procfs_targets): Adjust to C++ification.
6741 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
6742 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
6743 Refactor as methods of nto_procfs_target.
6744
6745 * go32-nat.c (go32_nat_target): New class.
6746 (the_go32_nat_target): New.
6747 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
6748 (go32_store_registers, go32_xfer_partial, go32_files_info)
6749 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
6750 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
6751 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
6752 (go32_pid_to_str): Refactor as methods of go32_nat_target.
6753 (go32_target): Delete.
6754 (_initialize_go32_nat): Adjust to C++ification.
6755
6756 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
6757 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
6758 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
6759 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
6760 gnu_nat_target.
6761 (gnu_target): Delete.
6762 * gnu-nat.h (gnu_target): Delete.
6763 (gnu_nat_target): New class.
6764 * i386-gnu-nat.c (gnu_base_target): New.
6765 (i386_gnu_nat_target): New class.
6766 (the_i386_gnu_nat_target): New.
6767 (_initialize_i386gnu_nat): Adjust to C++ification.
6768
6769 2018-05-02 Pedro Alves <palves@redhat.com>
6770
6771 * bfd-target.c (target_bfd_xclose): Rename to ...
6772 (target_bfd_close): ... this.
6773 (target_bfd_reopen): Adjust.
6774 * target.c (target_close): Remove references to to_xclose.
6775 * target.h (target_ops::to_xclose): Delete.
6776 (target_ops::to_close): Update comments.
6777
6778 2018-05-02 Pedro Alves <palves@redhat.com>
6779
6780 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
6781 "linux-nat.h".
6782 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
6783 * inf-ptrace.c (inf_ptrace_register_u_offset)
6784 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6785 (inf_ptrace_store_register, inf_ptrace_store_registers)
6786 (inf_ptrace_trad_target): Move to ...
6787 * linux-nat-trad.c: ... this new file.
6788 * linux-nat-trad.h: New file.
6789 * linux-nat.c (linux_target_install_ops): Make extern.
6790 (linux_trad_target): Delete.
6791 * linux-nat.h (linux_trad_target): Delete declaration.
6792 (linux_target_install_ops): Declare.
6793 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
6794 "linux-nat.h".
6795
6796 2018-05-02 Pedro Alves <palves@redhat.com>
6797
6798 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6799 procfs_target/add_target here.
6800 * procfs.c (procfs_target): Make static.
6801 (_initialize_procfs): Call add_target here.
6802 * procfs.h (struct target_ops): Remove forward declaration.
6803 (procfs_target): Remove declaration.
6804 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
6805
6806 2018-05-02 Pedro Alves <palves@redhat.com>
6807
6808 * procfs.c (procfs_stopped_by_watchpoint)
6809 (procfs_insert_watchpoint, procfs_remove_watchpoint)
6810 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
6811 Forward declare.
6812 (procfs_use_watchpoints): Delete, move contents...
6813 (procfs_target): ... here.
6814 * procfs.h (procfs_use_watchpoints): Delete declaration.
6815 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6816 procfs_use_watchpoints.
6817 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
6818 procfs_use_watchpoints.
6819
6820 2018-05-02 Tom Tromey <tom@tromey.com>
6821
6822 PR python/20084:
6823 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
6824 and var_zuinteger_unlimited.
6825 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
6826 and PARAM_ZUINTEGER_UNLIMITED.
6827 (set_parameter_value): Handle var_zuinteger and
6828 var_zuinteger_unlimited.
6829 (add_setshow_generic): Likewise.
6830 (parmpy_init): Likewise.
6831
6832 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
6833
6834 PR rust/23124
6835 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
6836 pointer is not null before dereferencing it.
6837
6838 2018-04-30 Tom Tromey <tom@tromey.com>
6839
6840 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
6841 is_mi_like_p.
6842
6843 2018-04-30 Tom Tromey <tom@tromey.com>
6844
6845 * breakpoint.c (mention): Remove use of is_mi_like_p.
6846 (print_mention_ranged_breakpoint): Likewise.
6847 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
6848 of is_mi_like_p.
6849
6850 2018-04-30 Tom Tromey <tom@tromey.com>
6851
6852 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
6853
6854 2018-04-30 Tom Tromey <tom@tromey.com>
6855
6856 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
6857 (info_spu_event_command): Remove some uses of is_mi_like_p.
6858
6859 2018-04-30 Tom Tromey <tom@tromey.com>
6860
6861 * python/py-framefilter.c (py_print_single_arg)
6862 (enumerate_locals, py_print_args, py_print_frame): Remove some
6863 uses of is_mi_like_p.
6864
6865 2018-04-30 Tom Tromey <tom@tromey.com>
6866
6867 * ui-out.c: Update.
6868 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
6869 * ui-out.h (ui_out::is_mi_like_p): Now const.
6870 (ui_out::do_is_mi_like_p): Now const.
6871 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
6872
6873 2018-04-30 Tom Tromey <tom@tromey.com>
6874
6875 * varobj.c (varobj_set_visualizer): Use new_reference.
6876 * python/python.c (gdbpy_decode_line): Use new_reference.
6877 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
6878 new_reference.
6879
6880 2018-04-30 Tom Tromey <tom@tromey.com>
6881
6882 * varobj.c (install_new_value): Use new_reference.
6883 * value.h (value_incref): Return void. Swap intro comment with
6884 value_decref.
6885 * value.c (set_value_parent): Use new_reference.
6886 (value_incref): Return void. Update intro comment.
6887 (release_value): Use new_reference.
6888 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
6889
6890 2018-04-30 Tom Tromey <tom@tromey.com>
6891
6892 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
6893 * gdb_bfd.h (new_bfd_ref): Remove.
6894 (gdb_bfd_open): Update comment.
6895 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
6896 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
6897 (gdb_bfd_fdopenr): Use new_reference.
6898 * exec.c (exec_file_attach): Use new_reference.
6899
6900 2018-04-30 Tom Tromey <tom@tromey.com>
6901
6902 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
6903 method.
6904
6905 2018-04-30 Tom Tromey <tom@tromey.com>
6906
6907 * jit.c (jit_read_code_entry): Use type_align.
6908 * i386-tdep.c (i386_gdbarch_init): Don't call
6909 set_gdbarch_long_long_align_bit.
6910 * gdbarch.sh: Remove long_long_align_bit.
6911 * gdbarch.c, gdbarch.h: Rebuild.
6912 * arc-tdep.c (arc_type_align): New function.
6913 (arc_gdbarch_init): Use arc_type_align. Don't call
6914 set_gdbarch_long_long_align_bit.
6915
6916 2018-04-30 Tom Tromey <tom@tromey.com>
6917
6918 * rust-lang.c (rust_type_alignment): Remove.
6919 (rust_composite_type): Use type_align.
6920
6921 2018-04-30 Tom Tromey <tom@tromey.com>
6922
6923 * NEWS: Mention Type.align.
6924 * python/py-type.c (typy_get_alignof): New function.
6925 (type_object_getset): Add "alignof".
6926
6927 2018-04-30 Tom Tromey <tom@tromey.com>
6928
6929 PR exp/17095:
6930 * NEWS: Update.
6931 * std-operator.def (UNOP_ALIGNOF): New operator.
6932 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
6933 New.
6934 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
6935 * c-lang.c (c_op_print_tab): Add alignof.
6936 * c-exp.y (ALIGNOF): New token.
6937 (exp): Add "ALIGNOF" production.
6938 (ident_tokens): Add _Alignof and alignof.
6939
6940 2018-04-30 Tom Tromey <tom@tromey.com>
6941
6942 * i386-tdep.c (i386_type_align): New function.
6943 (i386_gdbarch_init): Update.
6944 * gdbarch.sh (type_align): New method.
6945 * gdbarch.c, gdbarch.h: Rebuild.
6946 * arch-utils.h (default_type_align): Declare.
6947 * arch-utils.c (default_type_align): New function.
6948 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
6949 (struct type) <align_log2>: New field.
6950 <instance_flags>: Now a bitfield.
6951 (TYPE_RAW_ALIGN): New macro.
6952 (type_align, type_raw_align, set_type_align): Declare.
6953 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
6954 functions.
6955 * dwarf2read.c (quirk_rust_enum): Set type alignment.
6956 (get_alignment, maybe_set_alignment): New functions.
6957 (read_structure_type, read_enumeration_type, read_array_type)
6958 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
6959 (read_subrange_type, read_base_type): Set type alignment.
6960
6961 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
6962
6963 * dwarf2read.c (read_index_from_section): Use bool.
6964
6965 2018-04-29 Fabian Groffen <grobian@gentoo.org>
6966
6967 PR gdb/22950
6968 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
6969 with #ifdef.
6970
6971 2018-04-29 John Reiser <jreiser@BitWagon.com>
6972
6973 PR build/22873
6974 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
6975 last step, and do it atomically.
6976
6977 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
6978
6979 * compile/compile-c-types.c (convert_int, convert_float):
6980 Update for C FE v1.
6981
6982 2018-04-27 Tom Tromey <tom@tromey.com>
6983
6984 PR rust/22545:
6985 * rust-lang.c (rust_inclusive_range_type_p): New function.
6986 (rust_range): Handle inclusive ranges.
6987 (rust_compute_range): Likewise.
6988 * rust-exp.y (struct rust_op) <inclusive>: New field.
6989 (DOTDOTEQ): New constant.
6990 (range_expr): Add "..=" productions.
6991 (operator_tokens): Add "..=" token.
6992 (ast_range): Add "inclusive" parameter.
6993 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
6994 ranges.
6995 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
6996 bounds values.
6997 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
6998 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
6999 Update comments.
7000 * expprint.c (print_subexp_standard): Handle new bounds values.
7001 (dump_subexp_body_standard): Likewise.
7002
7003 2018-04-27 Tom Tromey <tom@tromey.com>
7004
7005 * configure: Rebuild.
7006 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
7007 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
7008 "OVERRIDE".
7009 (class symbol_needs_eval_context): Likewise.
7010 * dwarf2read.c (mock_mapped_index::symbol_name_count)
7011 (mock_mapped_index::symbol_name_at): Use "override". Remove
7012 "virtual".
7013 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
7014 "override".
7015 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
7016 * aarch64-tdep.c (instruction_reader::read): Use "override".
7017 (instruction_reader_test::read): Likewise.
7018 * arm-tdep.c (instruction_reader::read): Use "override".
7019 (instruction_reader_thumb::read): Likewise.
7020
7021 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
7022
7023 PR remote/9665
7024 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
7025 instead of remote_send.
7026 (remote_send): Remove.
7027
7028 2018-04-26 Pedro Alves <palves@redhat.com>
7029
7030 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
7031 find_function_start_sal instead of find_pc_line.
7032
7033 2018-04-26 Pedro Alves <palves@redhat.com>
7034
7035 * breakpoint.c (set_breakpoint_location_function): Handle
7036 mst_data_gnu_ifunc.
7037 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
7038 * elfread.c (elf_symtab_read): Give data symbols with
7039 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
7040 (elf_rel_plt_read): Update comment.
7041 * linespec.c (convert_linespec_to_sals): Handle
7042 mst_data_gnu_ifunc.
7043 (minsym_found): Handle mst_data_gnu_ifunc.
7044 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
7045 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
7046 * parse.c (find_minsym_type_and_address): Handle
7047 mst_data_gnu_ifunc.
7048 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
7049 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
7050 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
7051 comment.
7052 <mst_data_gnu_ifunc>: New enumerator.
7053
7054 2018-04-26 Pedro Alves <palves@redhat.com>
7055
7056 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
7057 (lookup_minimal_symbol_by_pc_section): ... this. Replace
7058 'want_trampoline' parameter by a lookup_msym_prefer parameter.
7059 Handle it.
7060 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
7061 (lookup_minimal_symbol_by_pc): Adjust.
7062 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
7063 (lookup_solib_trampoline_symbol_by_pc): Adjust.
7064 * minsyms.h (lookup_msym_prefer): New enum.
7065 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7066 parameter by a lookup_msym_prefer parameter.
7067
7068 2018-04-26 Pedro Alves <palves@redhat.com>
7069
7070 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
7071 ends in "@plt" instead of looking at the symbol's section.
7072
7073 2018-04-26 Pedro Alves <palves@redhat.com>
7074
7075 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
7076 all references.
7077 (find_pc_partial_function_gnu_ifunc): Rename to ...
7078 (find_pc_partial_function): ... this, and remove references to
7079 'is_gnu_ifunc_p'.
7080 (find_pc_partial_function): Delete old implementation.
7081 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
7082
7083 2018-04-26 Pedro Alves <palves@redhat.com>
7084
7085 * linespec.c (struct bound_minimal_symbol_search_key): New.
7086 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
7087 skip first line if we found a GNU ifunc minimal symbol by name.
7088 (compare_msymbols): Change parameters to work with a destructured
7089 lhs minsym.
7090 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
7091 functions.
7092
7093 2018-04-26 Pedro Alves <palves@redhat.com>
7094
7095 * breakpoint.c (set_breakpoint_location_function): Don't resolve
7096 ifunc targets here. Instead, if we have an ifunc minsym, use its
7097 address/name.
7098 (add_location_to_breakpoint): Store the minsym and the objfile in
7099 the breakpoint location.
7100 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
7101 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
7102 Record the minsym in the sal.
7103 * symtab.h (symtab_and_line) <msymbol>: New field.
7104
7105 2018-04-26 Pedro Alves <palves@redhat.com>
7106
7107 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
7108 unless we actually resolved the ifunc.
7109
7110 2018-04-26 Pedro Alves <palves@redhat.com>
7111
7112 * c-exp.y (variable production): Prefer ifunc minsyms over
7113 regular function symbols.
7114 * symtab.c (find_gnu_ifunc): New function.
7115 * minsyms.h (lookup_msym_prefer): New enum.
7116 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7117 parameter by a lookup_msym_prefer parameter.
7118 * symtab.h (find_gnu_ifunc): New declaration.
7119
7120 2018-04-26 Pedro Alves <palves@redhat.com>
7121
7122 * blockframe.c (find_gnu_ifunc_target_type): New function.
7123 (find_function_type): New.
7124 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
7125 return a value with a memory address.
7126 (eval_call): For calls to GNU ifunc functions, try to find the
7127 type of the target function from the type that the resolver
7128 returns.
7129 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
7130 symbols.
7131 * infcall.c (find_function_return_type): Delete.
7132 (find_function_addr): Add 'function_type' parameter. For calls to
7133 GNU ifunc functions, try to find the type of the target function
7134 from the type that the resolver returns, and return it via
7135 FUNCTION_TYPE.
7136 (call_function_by_hand_dummy): Adjust to use the function type
7137 returned by find_function_addr.
7138 (find_function_addr): Add 'function_type' parameter and move
7139 description here.
7140 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
7141 declarations.
7142
7143 2018-04-26 Pedro Alves <palves@redhat.com>
7144
7145 * c-exp.y (variable production): Skip finding an alias for ifunc
7146 symbols.
7147
7148 2018-04-26 Pedro Alves <palves@redhat.com>
7149
7150 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
7151
7152 2018-04-25 Pedro Alves <palves@redhat.com>
7153
7154 * infcmd.c (kill_command): Print the pid as string, not the whole
7155 thread's ptid. Add comment. s/has been killed/killed/ in output
7156 message.
7157 * remote.c (remote_detach_1): Print the pid as string, not the
7158 whole thread's ptid.
7159
7160 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7161 Sergio Durigan Junior <sergiodj@redhat.com>
7162 Pedro Alves <palves@redhat.com>
7163
7164 * infcmd.c (kill_command): Print message when inferior has
7165 been killed.
7166 * inferior.c (print_inferior_events): Remove 'static'. Set as
7167 '1'.
7168 (add_inferior): Improve message printed when
7169 'print_inferior_events' is on.
7170 (exit_inferior): Remove message printed when
7171 'print_inferior_events' is on.
7172 (detach_inferior): Improve message printed when
7173 'print_inferior_events' is on.
7174 (initialize_inferiors): Use 'add_inferior_silent' to set
7175 'current_inferior_'.
7176 * inferior.h (print_inferior_events): Declare here as
7177 'extern'.
7178 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
7179 '[Detaching...]' messages when 'print_inferior_events' is on.
7180 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
7181 as prefix/suffix for messages. Remove periods. Fix erroneous
7182 'Detaching after fork from child...', replace it by '... from
7183 parent...'.
7184 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
7185 prefix/suffix when printing 'Detaching...' messages. Print
7186 them when 'print_inferior_events' is on.
7187 * remote.c (remote_detach_1): Print message when detaching
7188 from inferior and '!is_fork_parent'.
7189
7190 2018-04-24 Tom Tromey <tom@tromey.com>
7191
7192 * cli-out.h: Reindent.
7193
7194 2018-04-24 Tom Tromey <tom@tromey.com>
7195
7196 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
7197 (cli_ui_out::do_field_string): Use fputs_filtered.
7198 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
7199
7200 2018-04-23 Tom Tromey <tom@tromey.com>
7201
7202 * guile/scm-frame.c (gdbscm_frame_read_var): Use
7203 gdb::unique_xmalloc_ptr.
7204
7205 2018-04-23 Tom Tromey <tom@tromey.com>
7206
7207 * configure: Rebuild.
7208
7209 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
7210
7211 PR gdb/23095
7212 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
7213 prepare_for_testing. Set normal_bp to r_debug_state if target
7214 is bsd.
7215
7216 2018-04-21 Pedro Alves <palves@redhat.com>
7217 Rajendra SY <rajendra.sy@gmail.com>
7218
7219 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
7220 * remote.c (extended_remote_attach): In all-stop mode, mark the
7221 thread as executing.
7222
7223 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7224
7225 * thread.c (thread_apply_all_command): Fix comment.
7226 (thread_command): Fix comment.
7227
7228 2018-04-10 Alan Hayward <alan.hayward@arm.com>
7229
7230 * common/tdesc.h (tdesc_create_feature): Remove xml filename
7231 parameter.
7232 * features/aarch64-core.c (create_feature_aarch64_core):
7233 Regenerate.
7234 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
7235 Likewise.
7236 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
7237 Likewise.
7238 * features/i386/32bit-avx512.c
7239 (create_feature_i386_32bit_avx512): Likewise.
7240 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
7241 Likewise.
7242 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
7243 Likewise.
7244 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
7245 Likewise.
7246 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
7247 Likewise.
7248 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
7249 Likewise.
7250 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
7251 Likewise.
7252 * features/i386/64bit-avx512.c
7253 (create_feature_i386_64bit_avx512): Likewise.
7254 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
7255 Likewise.
7256 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
7257 Likewise.
7258 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
7259 Likewise.
7260 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
7261 Likewise.
7262 * features/i386/64bit-segments.c
7263 (create_feature_i386_64bit_segments): Likewise.
7264 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
7265 Likewise.
7266 * features/i386/x32-core.c
7267 (create_feature_i386_x32_core): Likewise.
7268 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
7269 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
7270 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
7271 * target-descriptions.c: In generated code, don't pass xml
7272 filename.
7273
7274 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7275
7276 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
7277 (print_xml_feature::visit_post): Likewise.
7278 (print_xml_feature::visit): Likewise.
7279 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
7280 (print_xml_feature): Add new class.
7281 * regformats/regdat.sh: Null xmltarget on feature targets.
7282 * target-descriptions.c (struct target_desc): Add xmltarget.
7283 (maintenance_check_tdesc_xml_convert): Add unittest function.
7284 (tdesc_get_features_xml): Add function to get xml.
7285 (maintenance_check_xml_descriptions): Test xml generation.
7286 * xml-tdesc.c (string_read_description_xml): Add function.
7287 * xml-tdesc.h (string_read_description_xml): Add declaration.
7288
7289 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7290
7291 * features/Makefile: Add feature marker to targets with new style
7292 target descriptions.
7293 * regformats/aarch64.dat: Regenerate.
7294 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
7295 * regformats/i386/amd64-avx-linux.dat: Likewise.
7296 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
7297 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
7298 * regformats/i386/amd64-linux.dat: Likewise.
7299 * regformats/i386/amd64-mpx-linux.dat: Likewise.
7300 * regformats/i386/amd64.dat: Likewise.
7301 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
7302 * regformats/i386/i386-avx-linux.dat: Likewise.
7303 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
7304 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
7305 * regformats/i386/i386-linux.dat: Likewise.
7306 * regformats/i386/i386-mmx-linux.dat: Likewise.
7307 * regformats/i386/i386-mpx-linux.dat: Likewise.
7308 * regformats/i386/i386.dat: Likewise.
7309 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
7310 * regformats/i386/x32-avx-linux.dat: Likewise.
7311 * regformats/i386/x32-linux.dat: Likewise.
7312 * regformats/tic6x-c62x-linux.dat: Likewise.
7313 * regformats/tic6x-c64x-linux.dat: Likewise.
7314 * regformats/tic6x-c64xp-linux.dat: Likewise.
7315 * regformats/regdat.sh: Parse feature marker.
7316
7317 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7318
7319 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
7320 (tdesc_osabi_name): Likewise.
7321 * target-descriptions.c (tdesc_architecture_name): Add new
7322 function.
7323 (tdesc_osabi_name): Likewise.
7324
7325 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7326
7327 * common/tdesc.c (tdesc_predefined_type): Move to here.
7328 (tdesc_named_type): Likewise.
7329 (tdesc_create_vector): Likewise.
7330 (tdesc_create_struct): Likewise.
7331 (tdesc_set_struct_size): Likewise.
7332 (tdesc_create_union): Likewise.
7333 (tdesc_create_flags): Likewise.
7334 (tdesc_create_enum): Likewise.
7335 (tdesc_add_field): Likewise.
7336 (tdesc_add_typed_bitfield): Likewise.
7337 (tdesc_add_bitfield): Likewise.
7338 (tdesc_add_flag): Likewise.
7339 (tdesc_add_enum_value): Likewise.
7340 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
7341 (struct tdesc_type_vector): Likewise.
7342 (struct tdesc_type_field): Likewise.
7343 (struct tdesc_type_with_fields): Likewise.
7344 (tdesc_create_enum): Add declaration.
7345 (tdesc_add_typed_bitfield): Likewise.
7346 (tdesc_add_enum_value): Likewise.
7347 * target-descriptions.c (tdesc_type_field): Move from here.
7348 (tdesc_type_builtin): Likewise.
7349 (tdesc_type_vector): Likewise.
7350 (tdesc_type_with_fields): Likewise.
7351 (tdesc_predefined_types): Likewise.
7352 (tdesc_named_type): Likewise.
7353 (tdesc_create_vector): Likewise.
7354 (tdesc_create_struct): Likewise.
7355 (tdesc_set_struct_size): Likewise.
7356 (tdesc_create_union): Likewise.
7357 (tdesc_create_flags): Likewise.
7358 (tdesc_create_enum): Likewise.
7359 (tdesc_add_field): Likewise.
7360 (tdesc_add_typed_bitfield): Likewise.
7361 (tdesc_add_bitfield): Likewise.
7362 (tdesc_add_flag): Likewise.
7363 (tdesc_add_enum_value): Likewise.
7364 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
7365 (tdesc_add_typed_bitfield): Likewise.
7366 (tdesc_add_enum_value): Likewise.
7367
7368 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7369
7370 * common/tdesc.c (tdesc_feature::accept): Move to here.
7371 (tdesc_feature::operator==): Likewise.
7372 (tdesc_create_reg): Likewise.
7373 * common/tdesc.h (tdesc_type_kind): Likewise.
7374 (struct tdesc_type): Likewise.
7375 (struct tdesc_feature): Likewise.
7376 * regformats/regdat.sh: Create a feature.
7377 * target-descriptions.c (tdesc_type_kind): Move from here.
7378 (tdesc_type): Likewise.
7379 (tdesc_type_up): Likewise.
7380 (tdesc_feature): Likewise.
7381 (tdesc_create_reg): Likewise.
7382
7383 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7384
7385 * Makefile.in: Add arch/tdesc.c
7386 * common/tdesc.c: New file.
7387 * common/tdesc.h (tdesc_element_visitor): Move to here.
7388 (tdesc_element): Likewise.
7389 (tdesc_reg): Likewise.
7390 (tdesc_reg_up): Likewise.
7391 * regformats/regdef.h (reg): Add offset to constructors.
7392 * target-descriptions.c (tdesc_element_visitor): Move from here.
7393 (tdesc_element): Likewise.
7394 (tdesc_reg): Likewise.
7395 (tdesc_reg_up): Likewise.
7396
7397 2018-04-17 Tom Tromey <tom@tromey.com>
7398
7399 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
7400 discriminant field.
7401
7402 2018-04-17 Tom Tromey <tom@tromey.com>
7403
7404 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
7405
7406 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
7407
7408 * symtab.c (print_symbol_info): Skip printing filename and line
7409 number when `last' is NULL.
7410 (symtab_symbol_info): Use empty string instead of NULL for first
7411 invocation of print_symbol_info.
7412 (rbreak_command): Pass NULL to `last' parameter of
7413 print_symbol_info.
7414
7415 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
7416
7417 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
7418 instead of nullptr.
7419
7420 2018-04-16 Pedro Alves <palves@redhat.com>
7421
7422 * MAINTAINERS (sh): Remove.
7423 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
7424 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
7425 (ALLDEPFILES): Remove sh64-tdep.c.
7426 * NEWS: Mentions that support for SH-5/SH64 is removed.
7427 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
7428 (sh*-*-openbsd*): Ditto.
7429 (sh64-*-elf*): Remove.
7430 (sh*): Remove.
7431 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
7432 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
7433 * sh-tdep.c: No longer include "sh64-tdep.h".
7434 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
7435 * sh64-tdep.c, sh64-tdep.h: Remove files.
7436
7437 2018-04-16 Pedro Alves <palves@redhat.com>
7438
7439 * MAINTAINERS: Remove m88k.
7440 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
7441 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
7442 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
7443 * NEWS: Mention that support for m88k was removed.
7444 * configure.host (m88*-*-*): Remove support.
7445 * configure.nat (m88k-*-*): Remove support.
7446 * configure.tgt (m88*-*-openbsd*): Remove.
7447 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
7448
7449 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
7450
7451 * configure.tgt (x86_tobjs): New variable.
7452 (amd64_tobjs, i386_tobjs): Use it.
7453
7454 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7455
7456 * symtab.c (print_symbol_info): Precede the symbol definition by
7457 the line number when available.
7458 * NEWS: Advertise this enhancement.
7459
7460 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7461
7462 * NEWS (New options): announce set/show record btrace cpu.
7463 * btrace.c: Include record-btrace.h.
7464 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
7465 the vendor is unknown.
7466 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
7467 Maybe overwrite the btrace configuration's cpu.
7468 (btrace_compute_ftrace): Add cpu parameter. Update callers.
7469 (btrace_fetch): Add cpu parameter. Update callers.
7470 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
7471 Maybe overwrite the btrace configuration's cpu. Skip enabling
7472 errata workarounds if the vendor is unknown.
7473 * python/py-record-btrace.c: Include record-btrace.h.
7474 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
7475 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
7476 * record-btrace.c (record_btrace_cpu_state_kind): New.
7477 (record_btrace_cpu): New.
7478 (set_record_btrace_cpu_cmdlist): New.
7479 (record_btrace_get_cpu): New.
7480 (require_btrace_thread, record_btrace_info)
7481 (record_btrace_resume_thread): Call record_btrace_get_cpu.
7482 (cmd_set_record_btrace_cpu_none): New.
7483 (cmd_set_record_btrace_cpu_auto): New.
7484 (cmd_set_record_btrace_cpu): New.
7485 (cmd_show_record_btrace_cpu): New.
7486 (_initialize_record_btrace): Initialize set/show record btrace cpu
7487 commands.
7488 * record-btrace.h (record_btrace_get_cpu): New.
7489
7490 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7491
7492 * record.c (set_record_command): Fix typo in message.
7493
7494 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7495
7496 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
7497
7498 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7499
7500 * infrun.c (process_event_stop_test): Call
7501 gdbarch_in_indirect_branch_thunk.
7502 * gdbarch.sh (in_indirect_branch_thunk): New.
7503 * gdbarch.c: Regenerated.
7504 * gdbarch.h: Regenerated.
7505 * x86-tdep.h: New.
7506 * x86-tdep.c: New.
7507 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
7508 (HFILES_NO_SRCDIR): Add x86-tdep.h.
7509 (ALLDEPFILES): Add x86-tdep.c.
7510 * arch-utils.h (default_in_indirect_branch_thunk): New.
7511 * arch-utils.c (default_in_indirect_branch_thunk): New.
7512 * i386-tdep: Include x86-tdep.h.
7513 (i386_in_indirect_branch_thunk): New.
7514 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
7515 function.
7516 * amd64-tdep: Include x86-tdep.h.
7517 (amd64_in_indirect_branch_thunk): New.
7518 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
7519
7520 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
7521
7522 PR gdb/23053
7523 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
7524 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
7525 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
7526 regression.
7527
7528 2018-04-12 Tom Tromey <tom@tromey.com>
7529
7530 * rust-lang.c (rust_print_struct_def): Remove univariant code.
7531 (rust_evaluate_subexp): Likewise.
7532
7533 2018-04-12 Pedro Alves <palves@redhat.com>
7534
7535 * procfs.c (procfs_detach): Make forward declaration's prototype
7536 match definition's protototype.
7537 (proc_get_LDT_entry): Remove stale do_cleanups call.
7538
7539 2018-04-12 Pedro Alves <palves@redhat.com>
7540
7541 * target.h (target_ops::to_has_exited): Delete.
7542 (target_has_exited): Delete.
7543 * target-delegates.c: Regenerate.
7544
7545 2018-04-11 Pedro Alves <palves@redhat.com>
7546
7547 * target.c (fileio_fh_t::t): Add comment.
7548 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7549 (target_fileio_close): Handle a NULL target.
7550 (invalidate_fileio_fh): New.
7551 (target_close): Call it.
7552 * remote.c (remote_hostio_send_command): No longer check whether
7553 remote_desc is open.
7554
7555 2018-04-11 Pedro Alves <palves@redhat.com>
7556
7557 * target.c (fileio_fh_t): Make it a named struct instead of a
7558 typedef.
7559 (fileio_fh_t::is_closed): New method.
7560 (DEF_VEC_O (fileio_fh_t)): Remove.
7561 (fileio_fhandles): Now a std::vector.
7562 (is_closed_fileio_fh): Delete.
7563 (acquire_fileio_fd): Adjust. Rename parameters.
7564 (release_fileio_fd): Adjust.
7565 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
7566 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7567 (target_fileio_close): Adjust.
7568
7569 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
7570
7571 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
7572 index.
7573
7574 2018-04-10 Pedro Alves <palves@redhat.com>
7575
7576 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
7577 (scoped_finish_thread_state): New class.
7578 * infcmd.c (run_command_1): Use it instead of finish_thread_state
7579 cleanup.
7580 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
7581 (fetch_inferior_event, normal_stop): Likewise.
7582 * thread.c (finish_thread_state_cleanup): Delete.
7583
7584 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7585 Pedro Alves <palves@redhat.com>
7586
7587 * value.c: Include "selftest.h" and "common/array-view.h".
7588 (struct range) <operator ==>: New.
7589 (test_ranges_contain): New.
7590 (check_ranges_vector): New.
7591 (test_insert_into_bit_range_vector): New.
7592 (_initialize_values): Register selftests.
7593 * common/array-view.h (operator==, operator!=): New.
7594
7595 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7596
7597 * common/gdb_vecs.h (unordered_remove): Add overload that takes
7598 an iterator.
7599 * inline-frame.c: Include <algorithm>.
7600 (struct inline_state): Add constructor.
7601 (inline_state_s): Remove.
7602 (DEF_VEC_O(inline_state_s)): Remove.
7603 (inline_states): Change type to std::vector.
7604 (find_inline_frame_state): Adjust to std::vector.
7605 (allocate_inline_frame_state): Remove.
7606 (clear_inline_frame_state): Adjust to std::vector.
7607 (skip_inline_frames): Adjust to std::vector.
7608
7609 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7610
7611 * tracepoint.h (struct trace_state_variable): Add constructor.
7612 <name>: Change type to std::string.
7613 * tracepoint.c (tsv_s): Remove.
7614 (DEF_VEC_O(tsv_s)): Remove.
7615 (tvariables): Change to std::vector.
7616 (create_trace_state_variable): Adjust to std::vector.
7617 (find_trace_state_variable): Likewise.
7618 (find_trace_state_variable_by_number): Likewise.
7619 (delete_trace_state_variable): Likewise.
7620 (trace_variable_command): Adjust to std::string.
7621 (delete_trace_variable_command): Likewise.
7622 (tvariables_info_1): Adjust to std::vector.
7623 (save_trace_state_variables): Likewise.
7624 (start_tracing): Likewise.
7625 (merge_uploaded_trace_state_variables): Adjust to std::vector
7626 and std::string.
7627 * target.h (struct target_ops)
7628 <to_download_trace_state_variable>: Pass reference to
7629 trace_state_variable.
7630 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
7631 * target-delegates.c: Re-generate.
7632 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
7633 (mi_tsv_deleted): Likewise.
7634 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
7635 * remote.c (remote_download_trace_state_variable): Change
7636 pointer to reference and adjust.
7637 * make-target-delegates (parse_argtypes): Handle references.
7638 (write_function_header): Likewise.
7639 (munge_type): Likewise.
7640
7641 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7642
7643 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7644 string_view-selftests.c.
7645 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
7646 testsuite.
7647 * unittests/basic_string_view/cons/char/1.cc: Likewise.
7648 * unittests/basic_string_view/cons/char/2.cc: Likewise.
7649 * unittests/basic_string_view/cons/char/3.cc: Likewise.
7650 * unittests/basic_string_view/element_access/char/1.cc:
7651 Likewise.
7652 * unittests/basic_string_view/element_access/char/empty.cc:
7653 Likewise.
7654 * unittests/basic_string_view/element_access/char/front_back.cc:
7655 Likewise.
7656 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
7657 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
7658 Likewise.
7659 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
7660 Likewise.
7661 * unittests/basic_string_view/modifiers/swap/char/1.cc:
7662 Likewise.
7663 * unittests/basic_string_view/operations/compare/char/1.cc:
7664 Likewise.
7665 * unittests/basic_string_view/operations/compare/char/13650.cc:
7666 Likewise.
7667 * unittests/basic_string_view/operations/copy/char/1.cc:
7668 Likewise.
7669 * unittests/basic_string_view/operations/data/char/1.cc:
7670 Likewise.
7671 * unittests/basic_string_view/operations/find/char/1.cc:
7672 Likewise.
7673 * unittests/basic_string_view/operations/find/char/2.cc:
7674 Likewise.
7675 * unittests/basic_string_view/operations/find/char/3.cc:
7676 Likewise.
7677 * unittests/basic_string_view/operations/find/char/4.cc:
7678 Likewise.
7679 * unittests/basic_string_view/operations/rfind/char/1.cc:
7680 Likewise.
7681 * unittests/basic_string_view/operations/rfind/char/2.cc:
7682 Likewise.
7683 * unittests/basic_string_view/operations/rfind/char/3.cc:
7684 Likewise.
7685 * unittests/basic_string_view/operations/substr/char/1.cc:
7686 Likewise.
7687 * unittests/basic_string_view/operators/char/2.cc: Likewise.
7688 * unittests/string_view-selftests.c: New file.
7689
7690 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7691
7692 * unittests/basic_string_view/capacity/1.cc: New file.
7693 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
7694 * unittests/basic_string_view/cons/char/1.cc: New file.
7695 * unittests/basic_string_view/cons/char/2.cc: New file.
7696 * unittests/basic_string_view/cons/char/3.cc: New file.
7697 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
7698 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
7699 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
7700 * unittests/basic_string_view/element_access/char/1.cc: New file.
7701 * unittests/basic_string_view/element_access/char/2.cc: New file.
7702 * unittests/basic_string_view/element_access/char/empty.cc: New file.
7703 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
7704 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
7705 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
7706 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
7707 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
7708 * unittests/basic_string_view/include.cc: New file.
7709 * unittests/basic_string_view/inserters/char/1.cc: New file.
7710 * unittests/basic_string_view/inserters/char/2.cc: New file.
7711 * unittests/basic_string_view/inserters/char/3.cc: New file.
7712 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
7713 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
7714 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
7715 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
7716 * unittests/basic_string_view/literals/types.cc: New file.
7717 * unittests/basic_string_view/literals/values.cc: New file.
7718 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
7719 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
7720 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
7721 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
7722 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
7723 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
7724 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
7725 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
7726 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
7727 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
7728 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
7729 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
7730 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
7731 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
7732 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
7733 * unittests/basic_string_view/operations/data/char/1.cc: New file.
7734 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
7735 * unittests/basic_string_view/operations/find/char/1.cc: New file.
7736 * unittests/basic_string_view/operations/find/char/2.cc: New file.
7737 * unittests/basic_string_view/operations/find/char/3.cc: New file.
7738 * unittests/basic_string_view/operations/find/char/4.cc: New file.
7739 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
7740 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
7741 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
7742 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
7743 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
7744 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
7745 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
7746 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
7747 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
7748 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
7749 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
7750 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
7751 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
7752 * unittests/basic_string_view/operators/char/2.cc: New file.
7753 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
7754 * unittests/basic_string_view/range_access/char/1.cc: New file.
7755 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
7756 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
7757 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
7758 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
7759 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
7760 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
7761 * unittests/basic_string_view/requirements/typedefs.cc: New file.
7762 * unittests/basic_string_view/typedefs.cc: New file.
7763 * unittests/basic_string_view/types/1.cc: New file.
7764
7765 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7766
7767 * common/gdb_string_view.h: Remove libstdc++ implementation
7768 details, adjust to gdb reality.
7769 * common/gdb_string_view.tcc: Likewise.
7770 * cli/cli-script.c (struct string_view): Remove.
7771 (user_args) <m_args>: Change element type to gdb::string_view.
7772 (user_args::insert_args): Adjust.
7773
7774 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7775
7776 * common/gdb_string_view.h: New file.
7777 * common/gdb_string_view.tcc: New file.
7778
7779 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7780
7781 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
7782 * configure: Re-generate.
7783
7784 2018-04-09 Pedro Alves <palves@redhat.com>
7785
7786 * gdbarch.sh: Include "observable.h" instead of "observer.h".
7787 (set_target_gdbarch): Call
7788 gdb::observers::architecture_changed.notify instead of
7789 observer_notify_architecture_changed.
7790
7791 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7792
7793 * tracepoint.c (struct current_traceframe_cleanup): Remove.
7794 (do_restore_current_traceframe_cleanup): Remove.
7795 (restore_current_traceframe_cleanup_dtor): Remove.
7796 (make_cleanup_restore_current_traceframe): Remove.
7797 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
7798 New.
7799 * tracepoint.h (struct scoped_restore_current_traceframe): New.
7800 * infrun.c (fetch_inferior_event): Use
7801 scoped_restore_current_traceframe.
7802
7803 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7804
7805 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
7806 Remove.
7807 <n_allocated_type_units>: Remove.
7808 <all_type_units>: Change to std::vector.
7809 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7810 to std::vector change.
7811 (dwarf2_per_objfile::get_cutu): Likewise.
7812 (dwarf2_per_objfile::get_tu): Likewise.
7813 (create_signatured_type_table_from_index): Likewise.
7814 (create_signatured_type_table_from_debug_names): Likewise.
7815 (dw2_symtab_iter_next): Likewise.
7816 (dw2_print_stats): Likewise.
7817 (dw2_expand_all_symtabs): Likewise.
7818 (dw2_expand_marked_cus): Likewise.
7819 (dw2_debug_names_iterator::next): Likewise.
7820 (dwarf2_initialize_objfile): Likewise.
7821 (add_signatured_type_cu_to_table): Likewise.
7822 (create_all_type_units): Likewise.
7823 (add_type_unit): Likewise.
7824 (struct tu_abbrev_offset): Add constructor.
7825 (build_type_psymtabs_1): Adjust to std::vector change.
7826 (print_tu_stats): Likewise.
7827 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7828 (write_debug_names): Likewise.
7829
7830 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7831
7832 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
7833 Make an std::vector.
7834 <n_comp_units>: Remove.
7835 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7836 to std::vector change.
7837 (dwarf2_per_objfile::get_cutu): Likewise.
7838 (dwarf2_per_objfile::get_cu): Likewise.
7839 (create_cus_from_index): Likewise.
7840 (create_addrmap_from_index): Likewise.
7841 (create_addrmap_from_aranges): Likewise.
7842 (dwarf2_read_index): Likewise.
7843 (dw2_find_last_source_symtab): Likewise.
7844 (dw2_map_symtabs_matching_filename): Likewise.
7845 (dw2_symtab_iter_next): Likewise.
7846 (dw2_print_stats): Likewise.
7847 (dw2_expand_all_symtabs): Likewise.
7848 (dw2_expand_symtabs_with_fullname): Likewise.
7849 (dw2_expand_marked_cus): Likewise.
7850 (dw2_map_symbol_filenames): Likewise.
7851 (create_cus_from_debug_names): Likewise.
7852 (dwarf2_read_debug_names): Likewise.
7853 (dw2_debug_names_iterator::next): Likewise.
7854 (dwarf2_initialize_objfile): Likewise.
7855 (set_partial_user): Likewise.
7856 (dwarf2_build_psymtabs_hard): Likewise.
7857 (read_comp_units_from_section): Remove arguments, adjust to
7858 std::vector change.
7859 (create_all_comp_units): Adjust to std::vector and
7860 read_comp_units_from_section changes.
7861 (dwarf2_find_containing_comp_unit): Adjust to std::vector
7862 change.
7863 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7864 (psyms_seen_size): Likewise.
7865 (write_gdbindex): Likewise.
7866 (write_debug_names): Likewise.
7867
7868 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7869
7870 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
7871 with dwarf2_per_objfile.
7872 (create_cus_from_index): Likewise.
7873 (create_signatured_type_table_from_index): Likewise.
7874 (dwarf2_read_index): Likewise.
7875 (dwarf2_initialize_objfile): Likewise.
7876 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
7877 per_cu rather than get_dwarf2_per_objfile.
7878
7879 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7880
7881 * dwarf2read.h (struct signatured_type): Forward declare.
7882 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
7883 New methods.
7884 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
7885 (dw2_get_cutu): ...this.
7886 (dwarf2_per_objfile::get_cu): Rename from...
7887 (dw2_get_cu): ...this.
7888 (dwarf2_per_objfile::get_tu): New.
7889 (create_addrmap_from_index): Adjust.
7890 (create_addrmap_from_aranges): Adjust.
7891 (dw2_find_last_source_symtab): Adjust.
7892 (dw2_map_symtabs_matching_filename): Adjust.
7893 (dw2_symtab_iter_next): Adjust.
7894 (dw2_print_stats): Adjust.
7895 (dw2_expand_all_symtabs): Adjust.
7896 (dw2_expand_symtabs_with_fullname): Adjust.
7897 (dw2_expand_marked_cus): Adjust.
7898 (dw_expand_symtabs_matching_file_matcher): Adjust.
7899 (dw2_map_symbol_filenames): Adjust.
7900 (dw2_debug_names_iterator::next): Adjust.
7901 (dwarf2_initialize_objfile): Adjust.
7902 (set_partial_user): Adjust.
7903 (dwarf2_build_psymtabs_hard): Adjust.
7904
7905 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7906
7907 * dwarf2read.c (create_signatured_type_table_from_debug_names):
7908 Remove unused variables.
7909 (dw2_map_symtabs_matching_filename): Likewise.
7910 (dwarf2_record_block_ranges): Likewise.
7911 (dwarf2_read_addr_index): Likewise.
7912 (follow_die_offset): Likewise.
7913
7914 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7915
7916 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
7917 to symbol_file_add_main.
7918
7919 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7920
7921 PR mi/22299
7922 * mi/mi-console.c (do_fputc_async_safe): New.
7923 (mi_console_file::write_async_safe): New.
7924 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
7925 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
7926 New.
7927 * ui-file.c (ui_file::putstrn): Adjust call to
7928 fputstrn_unfiltered.
7929 * utils.c (printchar): Replace do_fputs and do_fprintf
7930 parameters by do_fputc.
7931 (fputstr_filtered): Adjust call to printchar.
7932 (fputstr_unfiltered): Likewise.
7933 (fputstrn_filtered): Likewise.
7934 (fputstrn_unfiltered): Add do_fputc parameter, pass to
7935 printchar.
7936 * utils.h (do_fputc_ftype): New typedef.
7937 (fputstrn_unfiltered): Add do_fputc parameter.
7938
7939 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7940
7941 * regformats/i386/i386-avx.dat: Remove.
7942
7943 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7944
7945 PR gdb/22979
7946 * amd64-tdep.c (amd64_none_init_abi): New function.
7947 (amd64_x32_none_init_abi): New function.
7948 (_initialize_amd64_tdep): Register handlers for x86-64 and
7949 x64_32 with GDB_OSABI_NONE.
7950 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
7951 GDB_OSABI_NONE osabi.
7952
7953 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7954
7955 PR gdb/22980
7956 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
7957 GDB_OSABI_NONE.
7958 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
7959 * osabi.c (gdb_osabi_names): Add "unknown" entry.
7960
7961 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7962
7963 * common/byte-vector.h (char_vector): New type.
7964 * target.h (target_read_alloc): Return
7965 gdb::optional<byte_vector>.
7966 (target_read_stralloc): Return gdb::optional<char_vector>.
7967 (target_get_osdata): Return gdb::optional<char_vector>.
7968 * target.c (target_read_alloc_1): Templatize. Replacement
7969 manual memory management with vector.
7970 (target_read_alloc): Change return type, adjust.
7971 (target_read_stralloc): Change return type, adjust.
7972 (target_get_osdata): Change return type, adjust.
7973 * auxv.c (struct auxv_info) <length>: Remove.
7974 <data>: Change type to gdb::optional<byte_vector>.
7975 (auxv_inferior_data_cleanup): Free auxv_info with delete.
7976 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
7977 (target_auxv_search): Adjust.
7978 (fprint_target_auxv): Adjust.
7979 * avr-tdep.c (avr_io_reg_read_command): Adjust.
7980 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
7981 (linux_make_corefile_notes): Adjust.
7982 * osdata.c (get_osdata): Adjust.
7983 * remote.c (remote_get_threads_with_qxfer): Adjust.
7984 (remote_memory_map): Adjust.
7985 (remote_traceframe_info): Adjust.
7986 (btrace_read_config): Adjust.
7987 (remote_read_btrace): Adjust.
7988 (remote_pid_to_exec_file): Adjust.
7989 * solib-aix.c (solib_aix_get_library_list): Adjust.
7990 * solib-dsbt.c (decode_loadmap): Don't free buf.
7991 (dsbt_get_initial_loadmaps): Adjust.
7992 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
7993 * solib-target.c (solib_target_current_sos): Adjust.
7994 * tracepoint.c (sdata_make_value): Adjust.
7995 * xml-support.c (xinclude_start_include): Adjust.
7996 (xml_fetch_content_from_file): Adjust.
7997 * xml-support.h (xml_fetch_another): Change return type.
7998 (xml_fetch_content_from_file): Change return type.
7999 * xml-syscall.c (xml_init_syscalls_info): Adjust.
8000 * xml-tdesc.c (file_read_description_xml): Adjust.
8001 (fetch_available_features_from_target): Change return type.
8002 (target_fetch_description_xml): Adjust.
8003 (target_read_description_xml): Adjust.
8004
8005 2018-04-06 Tom Tromey <tom@tromey.com>
8006
8007 * value.c (~value): Update.
8008 (struct value) <contents>: Now unique_xmalloc_ptr.
8009 (value_contents_bits_eq, allocate_value_contents)
8010 (value_contents_raw, value_contents_all_raw)
8011 (value_contents_for_printing, value_contents_for_printing_const)
8012 (set_value_enclosing_type): Update.
8013
8014 2018-04-06 Tom Tromey <tom@tromey.com>
8015
8016 * value.c (range_s): Remove typedef, VEC.
8017 (struct range): Add operator<.
8018 (range_lessthan): Remove.
8019 (ranges_contain): Change type.
8020 (~value): Update.
8021 (struct value) <unavailable, optimized_out>: Now std::vector.
8022 (value_entirely_available)
8023 (value_entirely_covered_by_range_vector)
8024 (value_entirely_unavailable, value_entirely_optimized_out):
8025 Update.
8026 (insert_into_bit_range_vector): Change argument type.
8027 (find_first_range_overlap): Likewise.
8028 (struct ranges_and_idx, value_contents_bits_eq)
8029 (require_not_optimized_out, require_available): Update.
8030 (ranges_copy_adjusted): Change argument types.
8031 (value_optimized_out, value_copy, value_fetch_lazy): Update.
8032
8033 2018-04-06 Tom Tromey <tom@tromey.com>
8034
8035 * value.c (~value): Update.
8036 (struct value) <parent>: Now a value_ref_ptr.
8037 (value_parent, set_value_parent, value_address, value_copy):
8038 Update.
8039
8040 2018-04-06 Tom Tromey <tom@tromey.com>
8041
8042 * value.c (struct value): Add constructor, destructor, and member
8043 initializers.
8044 (allocate_value_lazy, value_decref): Update.
8045
8046 2018-04-06 Tom Tromey <tom@tromey.com>
8047
8048 * value.c (struct value) <released, next>: Remove.
8049 (all_values): Now a std::vector.
8050 (allocate_value_lazy): Update.
8051 (value_next): Remove.
8052 (value_mark, value_free_to_mark, release_value)
8053 (value_release_to_mark): Update.
8054
8055 2018-04-06 Tom Tromey <tom@tromey.com>
8056
8057 * value.h (fetch_subexp_value, value_release_to_mark): Update.
8058 (free_value_chain): Remove.
8059 * value.c (free_value_chain): Remove.
8060 (value_release_to_mark): Return a std::vector.
8061 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
8062 std::vector.
8063 (check_condition): Update.
8064 * eval.c (fetch_subexp_value): Change "val_chain" to a
8065 std::vector.
8066 * breakpoint.c (update_watchpoint): Update.
8067 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
8068
8069 2018-04-06 Tom Tromey <tom@tromey.com>
8070
8071 * value.h (free_all_values): Remove.
8072 * value.c (free_all_values): Remove.
8073
8074 2018-04-06 Tom Tromey <tom@tromey.com>
8075
8076 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
8077 (value_history_chain, value_history_count): Remove.
8078 (value_history): New global.
8079 (record_latest_value, access_value_history, show_values)
8080 (preserve_values): Update.
8081
8082 2018-04-06 Tom Tromey <tom@tromey.com>
8083
8084 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
8085 * varobj.c (varobj_set_display_format, varobj_set_value)
8086 (install_default_visualizer, construct_visualizer)
8087 (install_new_value, ~varobj, varobj_get_value_type)
8088 (my_value_of_variable, varobj_editable_p): Update.
8089 * c-varobj.c (c_describe_child, c_value_of_variable)
8090 (cplus_number_of_children, cplus_describe_child): Update.
8091 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
8092 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
8093 (ada_value_of_variable, ada_value_is_changeable_p): Update.
8094
8095 2018-04-06 Tom Tromey <tom@tromey.com>
8096
8097 * printcmd.c (last_examine_address): Change type to
8098 value_ref_ptr.
8099 (do_examine, x_command): Update.
8100
8101 2018-04-06 Tom Tromey <tom@tromey.com>
8102
8103 * value.c (release_value): Update.
8104 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
8105 (struct bpstats) <val>: Now a value_ref_ptr.
8106 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8107 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8108 (~watchpoint, print_it_watchpoint, watch_command_1)
8109 (invalidate_bp_value_on_memory_change): Update.
8110
8111 2018-04-06 Tom Tromey <tom@tromey.com>
8112
8113 * varobj.c (varobj_clear_saved_item)
8114 (update_dynamic_varobj_children, install_new_value, ~varobj):
8115 Update.
8116 * value.h (value_incref): Move declaration earlier.
8117 (value_decref): Rename from value_free.
8118 (struct value_ref_policy): New.
8119 (value_ref_ptr): New typedef.
8120 (struct value_deleter): Remove.
8121 (gdb_value_up): Remove typedef.
8122 (release_value): Change return type.
8123 (release_value_or_incref): Remove.
8124 * value.c (set_value_parent): Update.
8125 (value_incref): Change return type.
8126 (value_decref): Rename from value_free.
8127 (value_free_to_mark, free_all_values, free_value_chain): Update.
8128 (release_value): Return value_ref_ptr.
8129 (release_value_or_incref): Remove.
8130 (record_latest_value, set_internalvar, clear_internalvar):
8131 Update.
8132 * stack.c (info_frame_command): Don't call value_free.
8133 * python/py-value.c (valpy_dealloc, valpy_new)
8134 (value_to_value_object): Update.
8135 * printcmd.c (do_examine): Update.
8136 * opencl-lang.c (lval_func_free_closure): Update.
8137 * mi/mi-main.c (register_changed_p): Don't call value_free.
8138 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
8139 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
8140 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
8141 value_free.
8142 * guile/scm-value.c (vlscm_free_value_smob)
8143 (vlscm_scm_from_value): Update.
8144 * frame.c (frame_register_unwind, frame_unwind_register_signed)
8145 (frame_unwind_register_unsigned, get_frame_register_bytes)
8146 (put_frame_register_bytes): Don't call value_free.
8147 * findvar.c (address_from_register): Don't call value_free.
8148 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
8149 * dwarf2loc.c (entry_data_value_free_closure)
8150 (value_of_dwarf_reg_entry, free_pieced_value_closure)
8151 (dwarf2_evaluate_loc_desc_full): Update.
8152 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8153 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8154 (~watchpoint, watch_command_1)
8155 (invalidate_bp_value_on_memory_change): Update.
8156 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
8157
8158 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
8159
8160 PR gdb/23022
8161 * warning.m4: Add -Wno-error=deprecated-register.
8162 * configure: Re-generate.
8163
8164 2018-04-05 Tom Tromey <tom@tromey.com>
8165
8166 * linespec.h: Remove include of "vec.h".
8167
8168 2018-04-05 Tom Tromey <tom@tromey.com>
8169
8170 * linespec.c (typep): Remove typedef.
8171 (find_methods, find_superclass_methods): Take a std::vector.
8172 (find_method): Use std::vector.
8173
8174 2018-04-05 Tom Tromey <tom@tromey.com>
8175
8176 * utils.c (compare_strings): Remove.
8177 * utils.h (compare_strings): Remove.
8178 * objc-lang.h (find_imps): Update.
8179 * objc-lang.c (find_methods): Take a std::vector.
8180 (uniquify_strings, find_imps): Likewise.
8181 * linespec.c (find_methods): Take a std::vector.
8182 (decode_objc): Use std::vector.
8183 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
8184 a std::vector.
8185 (find_method, find_function_symbols): Use std::vector.
8186
8187 2018-04-05 Tom Tromey <tom@tromey.com>
8188
8189 * completer.c (completion_tracker::completion_tracker): Remove
8190 cast.
8191 (completion_tracker::discard_completions): Likewise.
8192 * breakpoint.c (ambiguous_names_p): Remove cast.
8193 * ada-lang.c (_initialize_ada_language): Remove cast.
8194 * utils.h (streq): Update.
8195 (streq_hash): Add new declaration.
8196 * utils.c (streq): Return bool.
8197 (streq_hash): New function.
8198
8199 2018-04-05 Tom Tromey <tom@tromey.com>
8200
8201 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
8202 Remove a string copy.
8203
8204 2018-04-05 Tom Tromey <tom@tromey.com>
8205
8206 * linespec.c (filter_results): Use std::vector.
8207 (decode_line_2, decode_line_full): Update.
8208
8209 2018-04-05 Tom Tromey <tom@tromey.com>
8210
8211 * linespec.c (canonical_to_fullform): Return std::string.
8212 (filter_results): Update.
8213 (struct decode_line_2_item): Add constructor.
8214 <fullform, displayform>: Now std::string.
8215 (decode_line_2_compare_items): Now a std::sort comparator.
8216 (decode_line_2): Update.
8217
8218 2018-04-05 Tom Tromey <tom@tromey.com>
8219
8220 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
8221 (unexpected_linespec_error): Update.
8222 (linespec_parse_basic, parse_linespec): Update.
8223
8224 2018-04-05 Tom Tromey <tom@tromey.com>
8225
8226 * linespec.c (linespec_parse_basic): Reindent.
8227
8228 2018-04-05 Tom Tromey <tom@tromey.com>
8229
8230 * minsyms.h (iterate_over_minimal_symbols): Update.
8231 * minsyms.c (iterate_over_minimal_symbols): Take a
8232 gdb::function_view.
8233 * linespec.c (struct collect_minsyms): Remove.
8234 (compare_msyms): Now a std::sort comparator.
8235 (add_minsym): Add parameters.
8236 (search_minsyms_for_name): Update. Use std::vector.
8237
8238 2018-04-03 Tom Tromey <tom@tromey.com>
8239
8240 * mipsread.c (read_alphacoff_dynamic_symtab): Use
8241 gdb::byte_vector.
8242
8243 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
8244
8245 * MAINTAINERS (Write After Approval): Add Weimin Pan.
8246
8247 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
8248
8249 PR gdb/16959
8250 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
8251 printing static type.
8252
8253 2018-04-01 Tom Tromey <tom@tromey.com>
8254
8255 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
8256 (rs6000_xfer_shared_libraries): Update.
8257
8258 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
8259
8260 * common/gdb_vecs.h (char_ptr): Remove.
8261 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
8262
8263 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
8264
8265 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
8266 with std::vector.
8267 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
8268
8269 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
8270
8271 * tracepoint.h (struct uploaded_tp): Initialize fields.
8272 <actions, step_actions, cmd_strings>: Change type to
8273 std::vector<char *>.
8274 * tracepoint.c (get_uploaded_tp): Allocate with new.
8275 (free_uploaded_tps): Free with delete.
8276 (parse_tracepoint_definition): Adjust to std::vector change.
8277 * breakpoint.c (read_uploaded_action): Likewise.
8278 (create_tracepoint_from_upload): Likewise.
8279 * ctf.c (ctf_write_uploaded_tp): Likewise.
8280 (SET_ARRAY_FIELD): Likewise.
8281 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
8282
8283 2018-03-30 Tom Tromey <tom@tromey.com>
8284
8285 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
8286 std::unique_ptr.
8287 (svr4_keep_data_in_core): Update.
8288 (svr4_read_so_list): Update.
8289
8290 2018-03-30 Tom Tromey <tom@tromey.com>
8291
8292 * windows-nat.c (handle_output_debug_string, handle_exception):
8293 Update.
8294 * target.h (target_read_string): Update.
8295 * target.c (target_read_string): Change "string" to
8296 unique_xmalloc_ptr.
8297 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
8298 Update.
8299 * solib-frv.c (frv_current_sos): Update.
8300 * solib-dsbt.c (dsbt_current_sos): Update.
8301 * solib-darwin.c (darwin_current_sos): Update.
8302 * linux-thread-db.c (inferior_has_bug): Update.
8303 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
8304 Update. Remove alloca.
8305 * ada-lang.c (ada_main_name): Update.
8306
8307 2018-03-30 Tom Tromey <tom@tromey.com>
8308
8309 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
8310 (struct dwo_file_deleter): New.
8311 (dwo_file_up): New typedef.
8312 (open_and_init_dwo_file): Use dwo_file_up.
8313 (free_dwo_file_cleanup): Remove.
8314
8315 2018-03-30 Tom Tromey <tom@tromey.com>
8316
8317 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
8318 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
8319
8320 2018-03-30 Tom Tromey <tom@tromey.com>
8321
8322 * dwarf2read.c (class free_cached_comp_units): New class.
8323 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
8324 (free_cached_comp_units): Remove function.
8325
8326 2018-03-30 Tom Tromey <tom@tromey.com>
8327
8328 * utils.h (make_cleanup_unpush_target): Remove.
8329 * inf-ptrace.c (struct target_unpusher): New.
8330 (target_unpush_up) New typedef.
8331 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
8332 target_unpush_up.
8333 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
8334
8335 2018-03-27 Tom Tromey <tom@tromey.com>
8336
8337 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
8338
8339 2018-03-27 Pedro Alves <palves@redhat.com>
8340 Tom Tromey <tom@tromey.com>
8341
8342 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
8343 destructor. Now a class.
8344 (gdb_readline_wrapper_cleanup): Remove function.
8345 (gdb_readline_wrapper): Remove cleanups.
8346
8347 2018-03-27 Tom Tromey <tom@tromey.com>
8348
8349 * typeprint.h (struct type_print_options) <local_typedefs,
8350 global_typedefs>: Remove "struct" keyword.
8351 (class typedef_hash_table): New class.
8352 (recursively_update_typedef_hash, add_template_parameters)
8353 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
8354 (find_typedef_in_hash): Don't declare.
8355 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
8356 (typedef_hash_table::recursively_update): Rename from
8357 recursively_update_typedef_hash. Now a member.
8358 (typedef_hash_table::add_template_parameters): Rename from
8359 add_template_parameters. Now a member.
8360 (typedef_hash_table::typedef_hash_table): Now a constructor;
8361 rename from create_typedef_hash.
8362 (typedef_hash_table::~typedef_hash_table): Now a destructor;
8363 rename from free_typedef_hash.
8364 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
8365 (do_free_global_table): Remove.
8366 (typedef_hash_table::typedef_hash_table): New constructor; renamed
8367 from copy_type_recursive.
8368 (create_global_typedef_table): Remove.
8369 (typedef_hash_table::find_global_typedef): Now a member of
8370 typedef_hash_table.
8371 (typedef_hash_table::find_typedef): Rename from
8372 find_typedef_in_hash; now a member.
8373 (whatis_exp): Update.
8374 * extension.h (struct ext_lang_type_printers): Add constructor and
8375 destructor.
8376 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
8377 declare.
8378 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
8379 Now a constructor; rename from start_ext_lang_type_printers.
8380 (ext_lang_type_printers): Now a destructor; rename from
8381 free_ext_lang_type_printers.
8382 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
8383 Update.
8384 (c_type_print_base_struct_union): Update. Remove cleanups.
8385
8386 2018-03-27 Tom Tromey <tom@tromey.com>
8387
8388 * dwarf-index-write.c: Include <cmath>.
8389
8390 2018-03-27 Joel Brobecker <brobecker@adacore.com>
8391
8392 * NEWS: Add entry describing new "set|show varsize-limit" command.
8393 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
8394 command.
8395 * printcmd.c (_initialize_printcmd): Add "set var" alias of
8396 "set variable".
8397
8398 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
8399
8400 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
8401 dwarf-index-write.c
8402 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
8403 * dwarf-index-common.c: New file.
8404 * dwarf-index-common.h: New file.
8405 * dwarf-index-write.c: New file.
8406 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
8407 (struct dwarf2_section_info): Move from here.
8408 (dwarf2_section_info_def): Likewise.
8409 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
8410 (offset_type): Likewise.
8411 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
8412 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
8413 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
8414 (byte_swap): Likewise.
8415 (MAYBE_SWAP): Likewise.
8416 (dwarf2_per_cu_ptr): Likewise.
8417 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
8418 (struct tu_stats): Likewise.
8419 (struct dwarf2_per_objfile): Likewise.
8420 (struct dwarf2_per_cu_data): Likewise.
8421 (struct signatured_type): Likewise.
8422 (sig_type_ptr): Likewise.
8423 (DEF_VEC_P (sig_type_ptr)): Likewise.
8424 (INDEX4_SUFFIX): Likewise.
8425 (INDEX5_SUFFIX): Likewise.
8426 (DEBUG_STR_SUFFIX): Likewise.
8427 (dwarf2_read_section): Make non-static.
8428 (mapped_index_string_hash): Move from here.
8429 (dwarf5_djb_hash): Likewise.
8430 (file_write): Likewise.
8431 (class data_buf): Likewise.
8432 (struct symtab_index_entry): Likewise.
8433 (struct mapped_symtab): Likewise.
8434 (find_slot): Likewise.
8435 (hash_expand): Likewise.
8436 (add_index_entry): Likewise.
8437 (uniquify_cu_indices): Likewise.
8438 (class c_str_view): Likewise.
8439 (class c_str_view_hasher): Likewise.
8440 (class vector_hasher): Likewise.
8441 (write_hash_table): Likewise.
8442 (psym_index_map): Likewise.
8443 (struct addrmap_index_data): Likewise.
8444 (add_address_entry): Likewise.
8445 (add_address_entry_worker): Likewise.
8446 (write_address_map): Likewise.
8447 (symbol_kind): Likewise.
8448 (write_psymbols): Likewise.
8449 (struct signatured_type_index_data): Likewise.
8450 (write_one_signatured_type): Likewise.
8451 (recursively_count_psymbols): Likewise.
8452 (recursively_write_psymbols): Likewise.
8453 (class debug_names): Likewise.
8454 (check_dwarf64_offsets): Likewise.
8455 (psyms_seen_size): Likewise.
8456 (write_gdbindex): Likewise.
8457 (write_debug_names): Likewise.
8458 (assert_file_size): Likewise.
8459 (write_psymtabs_to_index): Likewise.
8460 (save_gdb_index_command): Likewise.
8461 (_initialize_dwarf2_read): Don't register the "save gdb-index"
8462 command.
8463 * dwarf2read.h: New file.
8464
8465 2018-03-27 Joel Brobecker <brobecker@adacore.com>
8466
8467 PR gdb/22670
8468 * dwarf2read.c (dwarf2_physname): Do not return the demangled
8469 symbol name if the CU's language stores symbol names in linkage
8470 format.
8471 * language.h (struct language_defn)
8472 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
8473 all instances of this struct.
8474
8475 2018-03-26 Tom Tromey <tom@tromey.com>
8476
8477 * stack.c (backtrace_command_1): Remove verbose code.
8478
8479 2018-03-26 Tom Tromey <tom@tromey.com>
8480
8481 * python/py-framefilter.c (py_print_type): Don't catch
8482 exceptions. Return void.
8483 (py_print_value): Likewise.
8484 (py_print_single_arg): Likewise.
8485 (enumerate_args): Don't catch exceptions.
8486 (py_print_args): Likewise.
8487 (py_print_frame): Likewise.
8488 (gdbpy_apply_frame_filter): Catch exceptions here.
8489
8490 2018-03-26 Tom Tromey <tom@tromey.com>
8491
8492 * stack.c (_initialize_stack): Remove trailing newlines from help
8493 text. Add "Usage" line to "backtrace" help.
8494
8495 2018-03-26 Tom Tromey <tom@tromey.com>
8496
8497 PR python/16486:
8498 * python/py-framefilter.c (py_print_args): Call wrap_hint.
8499
8500 2018-03-26 Tom Tromey <tom@tromey.com>
8501
8502 * python/py-framefilter.c (py_print_single_arg): Return
8503 EXT_LANG_BT_ERROR from catch.
8504
8505 2018-03-26 Tom Tromey <tom@tromey.com>
8506
8507 PR backtrace/15584:
8508 * stack.c (backtrace_command_1): Move some code into no-filters
8509 "if".
8510
8511 2018-03-26 Tom Tromey <tom@tromey.com>
8512
8513 * python/py-framefilter.c (throw_quit_or_print_exception): New
8514 function.
8515 (gdbpy_apply_frame_filter): Use it.
8516
8517 2018-03-26 Tom Tromey <tom@tromey.com>
8518
8519 PR cli/17716:
8520 * python/py-framefilter.c (py_print_type, py_print_value)
8521 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
8522 RETURN_MASK_ERROR.
8523
8524 2018-03-26 Tom Tromey <tom@tromey.com>
8525
8526 * python/py-framefilter.c (enumerate_args): Use
8527 gdb::unique_xmalloc_ptr.
8528
8529 2018-03-26 Tom Tromey <tom@tromey.com>
8530
8531 * python/py-framefilter.c (py_print_frame): Return
8532 EXT_LANG_BT_OK.
8533 (gdbpy_apply_frame_filter): Update comment.
8534 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
8535 Remove.
8536 <EXT_LANG_BT_NO_FILTERS>: Change value.
8537
8538 2018-03-26 Tom Tromey <tom@tromey.com>
8539
8540 PR backtrace/15582:
8541 * stack.c (backtrace_command): Parse "hide" argument.
8542 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
8543 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
8544 constant.
8545
8546 2018-03-26 Tom Tromey <tom@tromey.com>
8547
8548 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
8549 add "flags".
8550 (backtrace_command): Remove "fulltrace", add "flags".
8551
8552 2018-03-26 Tom Tromey <tom@tromey.com>
8553
8554 * stack.c (backtrace_command): Rewrite command line parsing.
8555
8556 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
8557
8558 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
8559
8560 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
8561
8562 * filename-seen-cache.h: Add include guard.
8563
8564 2018-03-26 Keith Seitz <keiths@redhat.com>
8565
8566 * symfile.c (place_section): Remove "struct" from section_addr_info
8567 in comment.
8568 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
8569 "struct" keyword from section_addr_info.
8570
8571 2018-03-26 Alan Hayward <alan.hayward@arm.com>
8572
8573 * regformats/regdef.h (reg): Add constructors.
8574
8575 2018-03-25 Pedro Alves <palves@redhat.com>
8576
8577 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
8578 if then/else bodies in var_func_name extraction.
8579
8580 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
8581
8582 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
8583 lookup_minimal_symbol() to find symbol entry.
8584 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
8585
8586 2018-03-23 Keith Seitz <keiths@redhat.com>
8587
8588 PR c++/22968
8589 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
8590 nested type definitions for C++, too.
8591
8592 2018-03-23 Tom Tromey <tom@tromey.com>
8593
8594 * machoread.c (struct oso_el): Add a constructor. Don't define as
8595 a typedef.
8596 (macho_register_oso): Remove.
8597 (macho_symtab_read): Take a std::vector.
8598 (oso_el_compare_name): Now a std::sort comparator.
8599 (macho_symfile_read_all_oso): Take a std::vector.
8600 (macho_symfile_read): Use std::vector. Remove cleanups.
8601
8602 2018-03-22 Tom Tromey <tom@tromey.com>
8603
8604 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
8605 (record_full_goto_bookmark): Use std::string.
8606
8607 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8608
8609 PR tdep/18295
8610 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
8611 a single mask.
8612
8613 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8614
8615 * rs6000-tdep.c (store_insn_p): New function.
8616 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
8617 and cr_reg to their unshifted values. Use store_insn_p to
8618 match LR saves using either R1 or fdata->alloca_reg. Use
8619 store_insn_p to match CR saves. Set alloca_reg_offset
8620 when alloca_reg and framep are set. Remove lr_reg shift
8621 when assigning to fdata->lr_register.
8622
8623 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
8624
8625 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
8626 command line args instead of emitting a warning.
8627
8628 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8629
8630 * tracepoint.h (struct static_tracepoint_marker): Initialize
8631 fields, define default constructor, move constructor and move
8632 assignment, disable the rest.
8633 <str_id, extra>: Make std::string.
8634 (release_static_tracepoint_marker): Remove.
8635 (free_current_marker): Remove.
8636 * tracepoint.c (free_current_marker): Remove.
8637 (parse_static_tracepoint_marker_definition): Adjust to
8638 std::string, use new hex2str overload.
8639 (release_static_tracepoint_marker): Remove.
8640 (print_one_static_tracepoint_marker): Get marker by reference
8641 and adjust to std::string.
8642 (info_static_tracepoint_markers_command): Adjust to std::vector
8643 changes
8644 * target.h (static_tracepoint_marker_p): Remove typedef.
8645 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
8646 (struct target_ops) <to_static_tracepoint_marker_at>: Return
8647 bool.
8648 <to_static_tracepoint_markers_by_strid>: Return std::vector.
8649 * target-debug.h
8650 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
8651 (target_debug_print_std_vector_static_tracepoint_marker): New.
8652 (target_debug_print_struct_static_tracepoint_marker_p): Rename
8653 to...
8654 (target_debug_print_static_tracepoint_marker_p): ... this.
8655 * target-delegates.c: Re-generate.
8656 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
8657 Make std::string.
8658 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
8659 (decode_static_tracepoint_spec): Adjust to std::vector.
8660 (tracepoint_print_one_detail): Adjust to std::string.
8661 (strace_marker_decode_location): Adjust to std::string.
8662 (update_static_tracepoint): Adjust to std::string, remove call
8663 to release_static_tracepoint_marker.
8664 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
8665 Adjust to std::vector.
8666 * remote.c (remote_static_tracepoint_marker_at): Return bool.
8667 (remote_static_tracepoint_markers_by_strid): Adjust to
8668 std::vector.
8669 * common/rsp-low.h (hex2str): New overload with explicit count
8670 of bytes.
8671 * common/rsp-low.c (hex2str): New overload with explicit count
8672 of bytes.
8673 * unittests/rsp-low-selftests.c (test_hex2str): New function.
8674 (_initialize_rsp_low_selftests): Add test_hex2str test.
8675 * unittests/tracepoint-selftests.c
8676 (test_parse_static_tracepoint_marker_definition): Adjust to
8677 std::string.
8678
8679 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8680
8681 * tracepoint.c (parse_static_tracepoint_marker_definition):
8682 Consider case where the definition is followed by more
8683 definitions.
8684 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8685 tracepoint-selftests.c.
8686 * unittests/tracepoint-selftests.c: New.
8687
8688 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8689
8690 * MAINTAINERS (Write After Approval): Add Pedro Franco de
8691 Carvalho.
8692
8693 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
8694
8695 * symtab.c (find_pc_sect_line): fixed indentation.
8696
8697 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
8698
8699 * symtab.c (find_pc_sect_line): now uses binary search.
8700
8701 2018-03-19 Tom Tromey <tom@tromey.com>
8702
8703 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
8704 "IDENT" production.
8705
8706 2018-03-19 Pedro Alves <palves@redhat.com>
8707 Tom Tromey <tom@tromey.com>
8708
8709 * unittests/observable-selftests.c: New file.
8710 * common/observable.h: New file.
8711 * observable.h: New file.
8712 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
8713 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
8714 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
8715 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
8716 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
8717 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
8718 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
8719 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
8720 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
8721 python/py-breakpoint.c, python/py-finishbreakpoint.c,
8722 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
8723 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
8724 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
8725 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
8726 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
8727 tui/tui-interp.c, valops.c: Update all users.
8728 * tui/tui-hooks.c (tui_bp_created_observer)
8729 (tui_bp_deleted_observer, tui_bp_modified_observer)
8730 (tui_inferior_exit_observer, tui_before_prompt_observer)
8731 (tui_normal_stop_observer, tui_register_changed_observer):
8732 Remove.
8733 (tui_observers_token): New global.
8734 (attach_or_detach, tui_attach_detach_observers): New functions.
8735 (tui_install_hooks, tui_remove_hooks): Use
8736 tui_attach_detach_observers.
8737 * record-btrace.c (record_btrace_thread_observer): Remove.
8738 (record_btrace_thread_observer_token): New global.
8739 * observer.sh: Remove.
8740 * observer.c: Rename to observable.c.
8741 * observable.c (namespace gdb_observers): Define new objects.
8742 (observer_debug): Move into gdb_observers namespace.
8743 (struct observer, struct observer_list, xalloc_observer_list_node)
8744 (xfree_observer_list_node, generic_observer_attach)
8745 (generic_observer_detach, generic_observer_notify): Remove.
8746 (_initialize_observer): Update.
8747 Don't include observer.inc.
8748 * Makefile.in (generated_files): Remove observer.h, observer.inc.
8749 (clean mostlyclean): Likewise.
8750 (observer.h, observer.inc): Remove targets.
8751 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
8752 (COMMON_SFILES): Use observable.c, not observer.c.
8753 * .gitignore: Remove observer.h.
8754
8755 2018-03-18 Tom Tromey <tom@tromey.com>
8756
8757 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
8758 gdb::def_vector.
8759 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
8760
8761 2018-03-17 Tom Tromey <tom@tromey.com>
8762
8763 * auto-load.c (auto_load_objfile_script_1): Use std::string.
8764
8765 2018-03-17 Tom Tromey <tom@tromey.com>
8766
8767 * target.c (class scoped_target_fd): New.
8768 (target_fileio_close_cleanup): Remove.
8769 (target_fileio_read_alloc_1): Use scoped_target_fd.
8770
8771 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
8772
8773 * silent-rules.mk: New.
8774 * Makefile.in: Include silent-rules.mk
8775 (srcdir, VPATH, top_srcdir): Move up.
8776 (COMPILE): Add ECHO_CXX.
8777 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
8778 (init.c): Add ECHO_INIT_C.
8779 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
8780 (version.c): Add ECHO_GEN.
8781 (printcmd.o): Add ECHO_CXX.
8782 (target-float.o): Add ECHO_CXX.
8783 (ada-exp.o): Add ECHO_CXX.
8784 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
8785 (insight$(EXEEXT)): Add ECHO_CXXLD.
8786 * gnulib/configure.ac: Add AM_SILENT_RULES.
8787 * gnulib/aclocal.m4: Re-generate.
8788 * gnulib/configure: Re-generate.
8789 * gnulib/import/Makefile.in: Re-generate.
8790
8791 2018-03-16 Tom Tromey <tom@tromey.com>
8792
8793 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
8794 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
8795 * utils.c (do_free_section_addr_info)
8796 (make_cleanup_free_section_addr_info): Remove.
8797 * symfile.h (struct other_sections): Add constructor.
8798 (struct section_addr_info): Remove.
8799 (section_addr_info): New typedef.
8800 (struct sym_fns) <sym_offsets>: Change type of parameter.
8801 (build_section_addr_info_from_objfile)
8802 (relative_addr_info_to_section_offsets, addr_info_make_relative)
8803 (default_symfile_offsets, symbol_file_add)
8804 (symbol_file_add_from_bfd)
8805 (build_section_addr_info_from_section_table): Update.
8806 (alloc_section_addr_info, free_section_addr_info): Don't declare.
8807 * symfile.c (alloc_section_addr_info): Remove.
8808 (build_section_addr_info_from_section_table): Change return type.
8809 Update.
8810 (build_section_addr_info_from_bfd)
8811 (build_section_addr_info_from_objfile): Likewise.
8812 (free_section_addr_info): Remove.
8813 (relative_addr_info_to_section_offsets): Change type of "addrs".
8814 (addrs_section_compar): Now a std::sort comparator.
8815 (addrs_section_sort): Change return type.
8816 (addr_info_make_relative): Change type of "addrs". Update.
8817 (default_symfile_offsets, syms_from_objfile_1)
8818 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
8819 (symbol_file_add_separate): Update.
8820 (symbol_file_add): Change type of "addrs". Update.
8821 (add_symbol_file_command): Update. Remove cleanups.
8822 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
8823 cleanups.
8824 * symfile-debug.c (debug_sym_offsets): Change type of "info".
8825 * solib.c (solib_read_symbols): Update.
8826 * objfiles.c (objfile_relocate): Update. Remove cleanups.
8827 * machoread.c (macho_symfile_offsets): Update.
8828 * jit.c (jit_bfd_try_read_symtab): Update.
8829
8830 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
8831
8832 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8833 unittests/utils-selftests.c.
8834 * unittests/utils-selftests.c: New file.
8835
8836 2018-03-14 Tom Tromey <tom@tromey.com>
8837
8838 PR cli/14977:
8839 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
8840 for NULL.
8841
8842 2018-03-14 Tom Tromey <tom@tromey.com>
8843
8844 PR cli/19918:
8845 * printcmd.c (printf_pointer): Allow "-" in format.
8846
8847 2018-03-14 Tom Tromey <tom@tromey.com>
8848
8849 * printcmd.c (_initialize_printcmd): Add usage to printf.
8850
8851 2018-03-14 Yao Qi <qiyao@sourceware.org>
8852
8853 * MAINTAINERS: Update my email address.
8854
8855 2018-03-13 Tom Tromey <tom@tromey.com>
8856
8857 * machoread.c (macho_check_dsym): Change filenamep to a
8858 std::string*.
8859 (macho_symfile_read): Update.
8860 * symfile.c (load_command): Use std::string.
8861
8862 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
8863
8864 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
8865 to error message string.
8866 (riscv_register_name): Use xsnprintf instead of sprintf.
8867 (riscv_insn::fetch_instruction): Use gdb_assert instead of
8868 internal_error.
8869 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
8870 error.
8871 (riscv_push_dummy_call): Likewise.
8872
8873 2018-03-12 Tom Tromey <tom@tromey.com>
8874
8875 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
8876 Use gdb::byte_vector.
8877 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
8878
8879 2018-03-12 Yao Qi <yao.qi@linaro.org>
8880
8881 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
8882 parameter type to readable_regcache.
8883 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
8884 the declaration.
8885
8886 2018-03-11 Tom Tromey <tom@tromey.com>
8887
8888 * dwarf2read.c (struct nextfield): Add initializers.
8889 (struct nextfnfield): Remove.
8890 (struct fnfieldlist): Add initializers. Remove "length" and
8891 "head", use std::vector.
8892 (struct decl_field_list): Remove.
8893 (struct field_info): Add initializers.
8894 <fields, baseclasses>: Now std::vector.
8895 <nbaseclasses, nfnfields, typedef_field_list_count,
8896 nested_types_list_count>: Remove.
8897 (dwarf2_add_field, dwarf2_add_type_defn)
8898 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
8899 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
8900 (process_structure_scope): Update.
8901
8902 2018-03-11 Tom Tromey <tom@tromey.com>
8903
8904 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
8905 for use by std::sort.
8906 (build_type_psymtabs_1): Use std::vector.
8907
8908 2018-03-09 Eli Zaretskii <eliz@gnu.org>
8909
8910 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
8911 and LIBMPFR in the printed configuration.
8912
8913 2018-03-08 Tom Tromey <tom@tromey.com>
8914
8915 * source.c (get_filename_and_charpos): Use scoped_fd.
8916 * nto-procfs.c (procfs_open_1): Use scoped_fd.
8917 (procfs_pidlist): Likewise.
8918 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
8919 (iterate_over_mappings): Likewise.
8920
8921 2018-03-08 Tom Tromey <tom@tromey.com>
8922
8923 * infcall.c (struct call_return_meta_info)
8924 <stack_temporaries_enabled>: Remove.
8925 (get_call_return_value, call_function_by_hand_dummy): Update.
8926 * thread.c (disable_thread_stack_temporaries): Remove.
8927 (enable_thread_stack_temporaries): Remove.
8928 (thread_stack_temporaries_enabled_p): Return bool.
8929 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
8930 (get_last_thread_stack_temporary): Update.
8931 * eval.c (evaluate_subexp): Update.
8932 * gdbthread.h (class enable_thread_stack_temporaries): Now a
8933 class, not a function.
8934 (value_ptr, value_vec): Remove typedefs.
8935 (class thread_info) <stack_temporaries_enabled>: Now bool.
8936 <stack_temporaries>: Now a std::vector.
8937 (thread_stack_temporaries_enabled_p)
8938 (value_in_thread_stack_temporaries): Return bool.
8939
8940 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
8941
8942 * remote.c (putpkt_binary): Fix omitted bytes reporting.
8943 (getpkt_or_notif_sane_1): Likewise.
8944
8945 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8946
8947 * build-id.c (build_id_to_debug_bfd): Use std::string.
8948
8949 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8950
8951 * build-id.c (find_separate_debug_file_by_buildid): Return
8952 std::string.
8953 * build-id.h (find_separate_debug_file_by_buildid): Return
8954 std::string.
8955 * coffread.c (coff_symfile_read): Adjust to std::string.
8956 * elfread.c (elf_symfile_read): Adjust to std::string.
8957 * symfile.c (separate_debug_file_exists): Change parameter to
8958 std::string.
8959 (find_separate_debug_file): Return std::string.
8960 (find_separate_debug_file_by_debuglink): Return std::string.
8961 * symfile.h (find_separate_debug_file_by_debuglink): Return
8962 std::string.
8963
8964 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8965
8966 * common/xml-utils.c (xml_escape_text): Move code to...
8967 (xml_escape_text_append): ... this new function.
8968 * common/xml-utils.h (xml_escape_text_append): New declaration.
8969 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
8970 New function.
8971 (_initialize_xml_utils): register test_xml_escape_text_append as
8972 a selftest.
8973
8974 2018-03-07 Alan Hayward <alan.hayward@arm.com>
8975
8976 * defs.h: Remove MAX_REGISTER_SIZE.
8977 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
8978 asserts.
8979 * python/py-unwind.c (pyuw_sniffer): Likewise.
8980
8981 2018-03-07 Tom Tromey <tom@tromey.com>
8982
8983 * linux-tdep.c (linux_info_proc): Update.
8984 * target.h (struct target_ops) <to_fileio_readlink>: Return
8985 optional<string>.
8986 (target_fileio_readlink): Return optional<string>.
8987 * remote.c (remote_hostio_readlink): Return optional<string>.
8988 * inf-child.c (inf_child_fileio_readlink): Return
8989 optional<string>.
8990 * target.c (target_fileio_readlink): Return optional<string>.
8991
8992 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
8993
8994 * regcache.c (cooked_read_test): Add riscv to the list of
8995 architectures that have a save_reggroup.
8996
8997 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
8998
8999 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
9000 value is not a dynamic class object.
9001
9002 2018-03-06 Tom Tromey <tom@tromey.com>
9003
9004 * rust-exp.y: Formatting fixes.
9005
9006 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9007
9008 * riscv-tdep.c (riscv_register_name): Remove target description
9009 support.
9010 (riscv_gdbarch_init): Remove target description check.
9011
9012 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9013
9014 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
9015 comment.
9016 * riscv-tdep.h: Likewise.
9017
9018 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9019
9020 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
9021 (riscv_pseudo_register_write): Delete.
9022 (riscv_gdbarch_init): Remove all use of pseudo registers.
9023
9024 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9025
9026 * record-btrace.c (btrace_print_lines): Replace cleanup
9027 parameter with RAII equivalents.
9028 (btrace_insn_history): Replace cleanup with RAII equivalents.
9029 * ui-out.h (make_cleanup_ui_out_list_begin_end,
9030 make_cleanup_ui_out_tuple_begin_end): Remove.
9031 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
9032 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
9033 make_cleanup_ui_out_list_begin_end): Remove.
9034
9035 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9036
9037 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
9038 parameter types to std::vector. Use bool.
9039 (record_btrace_wait): Replace VEC(tp_t) with
9040 std::vector<thread_info *>.
9041 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
9042
9043 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9044
9045 * record-btrace.c (record_btrace_disable_callback): Remove.
9046 (struct scoped_btrace_disable): New.
9047 (record_btrace_open): Use scoped_btrace_disable.
9048
9049 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9050
9051 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
9052 reading values from registers.
9053
9054 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9055
9056 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
9057 where appropriate.
9058
9059 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9060
9061 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
9062 change parameter type. Use GDB's print functions, and use
9063 core_addr_to_string where appropriate.
9064 (riscv_push_dummy_call): Use core_addr_to_string where
9065 appropriate, update call to riscv_print_arg_location, and reindent
9066 a few lines.
9067 (riscv_return_value): Update call to riscv_print_arg_location.
9068
9069 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9070 Tim Newsome <tim@sifive.com>
9071 Albert Ou <a0u@eecs.berkeley.edu>
9072 Darius Rad <darius@bluespec.com>
9073
9074 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
9075 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
9076 (ALLDEPFILES): Add riscv-tdep.c
9077 * configure.tgt: Add riscv support.
9078 * riscv-tdep.c: New file.
9079 * riscv-tdep.h: New file.
9080 * NEWS: Mention new target.
9081 * MAINTAINERS: Add entry for riscv.
9082
9083 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9084
9085 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
9086 fields within aggregates.
9087
9088 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
9089
9090 * record-btrace.c (btrace_print_lines): Change type of flags to
9091 gdb_disassembly_flags.
9092
9093 2018-03-04 John Baldwin <jhb@FreeBSD.org>
9094
9095 * fbsd-nat.c: Include "inf-ptrace.h".
9096 (USE_SIGTRAP_SIGINFO): Conditionally define.
9097 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
9098 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
9099 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
9100 function.
9101 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
9102 Likewise.
9103 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
9104 Likewise.
9105 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
9106 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
9107 "supports_stopped_by_hw_breakpoint" target methods.
9108
9109 2018-03-04 John Baldwin <jhb@FreeBSD.org>
9110
9111 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
9112 * fbsd-nat.c (debug_fbsd_nat): New variable.
9113 (show_fbsd_nat_debug): New function.
9114 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
9115 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
9116
9117 2018-03-04 John Baldwin <jhb@FreeBSD.org>
9118
9119 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
9120 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
9121 prototype.
9122 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
9123 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
9124 method.
9125
9126 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9127
9128 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
9129 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
9130
9131 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9132
9133 * charset.c (struct charset_vector): New.
9134 (charsets): Change type to charset_vector.
9135 (find_charset_names): Adjust.
9136 (add_one): Adjust.
9137 (_initialize_charset): Adjust.
9138
9139 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9140
9141 * progspace.h (struct program_space) <deleted_solibs>: Change
9142 type to std::vector<std::string>.
9143 * progspace.c (clear_program_space_solib_cache): Adjust.
9144 * breakpoint.c (print_solib_event): Adjust.
9145 (check_status_catch_solib): Adjust.
9146 * solib.c (update_solib_list): Adjust.
9147 * ui-out.h (class ui_out) <field_string>: New overload.
9148 * ui-out.c (ui_out::field_string): New overload.
9149
9150 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9151
9152 * progspace.h (struct program_space): Add constructor and
9153 destructor, initialize fields.
9154 (add_program_space): Remove.
9155 * progspace.c (add_program_space): Rename to...
9156 (program_space::program_space): ... this.
9157 (release_program_space): Rename to...
9158 (program_space::~program_space): ... this.
9159 (delete_program_space): Use delete to delete program_space.
9160 (initialize_progspace): Use new to allocate program_space.
9161 * inferior.c (add_inferior_with_spaces): Likewise.
9162 (clone_inferior_command): Likewise.
9163 * infrun.c (follow_fork_inferior): Likewise.
9164 (handle_vfork_child_exec_or_exit): Likewise.
9165
9166 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9167
9168 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
9169 (delim_string_to_char_ptr_vec): Return std::vector of
9170 gdb::unique_xmalloc_ptr.
9171 (dirnames_to_char_ptr_vec_append): Take std::vector of
9172 gdb::unique_xmalloc_ptr.
9173 (dirnames_to_char_ptr_vec): Return std::vector of
9174 gdb::unique_xmalloc_ptr.
9175 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
9176 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
9177 (delim_string_to_char_ptr_vec): Return an std::vector of
9178 gdb::unique_xmalloc_ptr, adjust the code.
9179 (dirnames_to_char_ptr_vec_append): Take an std::vector of
9180 gdb::unique_xmalloc_ptr, adjust the code.
9181 (dirnames_to_char_ptr_vec): Return an std::vector of
9182 gdb::unique_xmalloc_ptr, adjust the code.
9183 * auto-load.c (auto_load_safe_path_vec): Change type to
9184 std::vector of gdb::unique_xmalloc_ptr.
9185 (auto_load_expand_dir_vars): Return an std::vector of
9186 gdb::unique_xmalloc_ptr, adjust the code.
9187 (auto_load_safe_path_vec_update): Adjust.
9188 (filename_is_in_auto_load_safe_path_vec): Adjust.
9189 (auto_load_objfile_script_1): Adjust.
9190 * build-id.c (build_id_to_debug_bfd): Adjust.
9191 * linux-thread-db.c (thread_db_load_search): Adjust.
9192 * source.c (add_path): Adjust.
9193 (openp): Adjust.
9194 * symfile.c (find_separate_debug_file): Adjust.
9195 * utils.c (do_free_char_ptr_vec): Remove.
9196 (make_cleanup_free_char_ptr_vec): Remove.
9197
9198 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
9199
9200 PR gdb/22907
9201 * common/pathstuff.c: Conditionally include "<windows.h>".
9202
9203 2018-03-01 Georg Sauthoff <mail@georg.so>
9204
9205 PR gdb/22888
9206 * gcore.in: Quote variables and switch interpreter to bash.
9207
9208 2018-03-01 Tom Tromey <tom@tromey.com>
9209
9210 * dwarf2read.c (alloc_discriminant_info): Fix default_index
9211 assertion. Add assertion for discriminant_index.
9212 (quirk_rust_enum): Use correct base type name in univariant case.
9213
9214 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
9215
9216 * record.c (get_call_history_modifiers): Return a
9217 record_print_flags.
9218 (cmd_record_call_history): Adjust.
9219 * record-btrace.c (record_btrace_call_history): Adjust.
9220 (record_btrace_call_history_range): Adjust.
9221 (record_btrace_call_history_from): Adjust.
9222 * target-debug.h (target_debug_print_record_print_flags): New.
9223 * target-delegates.c: Re-generate.
9224 * target.c (target_call_history): Change flags type.
9225 (target_call_history_from): Likewise.
9226 (target_call_history_range): Likewise.
9227 * target.h (struct target_ops) <target_call_history>: Likewise.
9228 (target_call_history_from): Likewise.
9229 (target_call_history_range): Likewise.
9230
9231 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
9232 Simon Marchi <simon.marchi@polymtl.ca>
9233
9234 * common/common-utils.c: Include "sys/stat.h".
9235 (is_regular_file): Move here from "source.c"; change return
9236 type to "bool".
9237 * common/common-utils.h (is_regular_file): New prototype.
9238 * common/pathstuff.c (contains_dir_separator): New function.
9239 * common/pathstuff.h (contains_dir_separator): New prototype.
9240 * source.c: Don't include "sys/stat.h".
9241 (is_regular_file): Move to "common/common-utils.c".
9242
9243 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
9244
9245 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
9246 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
9247 * auto-load.c: Include "common/pathstuff.h".
9248 * common/common-def.h (current_directory): Move here.
9249 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
9250 function.
9251 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
9252 prototype.
9253 * common/pathstuff.c: New file.
9254 * common/pathstuff.h: New file.
9255 * compile/compile.c: Include "common/pathstuff.h".
9256 * defs.h (current_directory): Move to "common/common-defs.h".
9257 * dwarf2read.c: Include "common/pathstuff.h".
9258 * exec.c: Likewise.
9259 * guile/scm-safe-call.c: Likewise.
9260 * linux-thread-db.c: Likewise.
9261 * main.c: Likewise.
9262 * nto-tdep.c: Likewise.
9263 * objfiles.c: Likewise.
9264 * source.c: Likewise.
9265 * symtab.c: Likewise.
9266 * utils.c: Include "common/pathstuff.h".
9267 (gdb_realpath): Move to "common/pathstuff.c".
9268 (gdb_realpath_keepfile): Likewise.
9269 (gdb_abspath): Likewise.
9270 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
9271 (gdb_realpath_keepfile): Likewise.
9272 (gdb_abspath): Likewise.
9273
9274 2018-02-28 John Baldwin <jhb@FreeBSD.org>
9275
9276 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
9277 wildcard process pid for super_resume for kernels with a
9278 specific bug.
9279
9280 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
9281
9282 * compile/compile.c (get_args): Add additional comments
9283 explaining function.
9284
9285 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
9286 Tom Tromey <tom@tromey.com>
9287
9288 * target.h (memory_write_request_s): Remove typedef. Don't define
9289 VEC.
9290 (target_write_memory_blocks): Change argument to std::vector.
9291 (struct memory_write_request): Add constructor.
9292 * target-memory.c (compare_block_starting_address): Return bool.
9293 Change argument types.
9294 (claim_memory): Change arguments to use std::vector.
9295 (split_regular_and_flash_blocks, blocks_to_erase)
9296 (compute_garbled_blocks): Likewise.
9297 (cleanup_request_data, cleanup_write_requests_vector): Remove.
9298 (target_write_memory_blocks): Change argument to std::vector.
9299 * symfile.c (struct load_section_data): Add constructor and
9300 destructor. Use std::vector for "requests".
9301 (struct load_progress_data): Add initializers.
9302 (load_section_callback): Update. Use "new".
9303 (clear_memory_write_data): Remove.
9304 (generic_load): Update.
9305
9306 2018-02-27 Alan Hayward <alan.hayward@arm.com>
9307
9308 * arch/aarch64.h: Use common/tdesc.h.
9309
9310 2018-02-26 Maciej W. Rozycki <macro@mips.com>
9311
9312 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
9313 architecture with a 64-bit ABI.
9314
9315 2018-02-26 Maciej W. Rozycki <macro@mips.com>
9316
9317 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
9318 ahead of target description loading.
9319
9320 2018-02-26 Tom Tromey <tom@tromey.com>
9321
9322 * stack.c (backtrace_command_1): Update.
9323 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
9324 of "flags".
9325 * python/py-framefilter.c (py_print_frame)
9326 (gdbpy_apply_frame_filter): Change type of "flags".
9327 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
9328 of "flags".
9329 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
9330 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
9331 * extension.h (enum frame_filter_flag): Rename from
9332 frame_filter_flags.
9333 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
9334 (apply_ext_lang_frame_filter): Change type of "flags".
9335 * extension.c (apply_ext_lang_frame_filter): Change type of
9336 "flags".
9337 * extension-priv.h (struct extension_language_ops)
9338 <apply_frame_filter>: Change type of "flags".
9339
9340 2018-02-26 Tom Tromey <tom@tromey.com>
9341
9342 PR python/16497:
9343 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
9344 off-by-one in py_end computation.
9345 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
9346 PRINT_MORE_FRAMES.
9347 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
9348 constant.
9349
9350 2018-02-26 Tom Tromey <tom@tromey.com>
9351
9352 * dwarf2read.c (struct variant_field): New.
9353 (struct nextfield) <variant>: New field.
9354 (dwarf2_add_field): Handle DW_TAG_variant_part.
9355 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
9356 discriminated union.
9357 (read_structure_type): Handle DW_TAG_variant_part.
9358 (handle_struct_member_die): New function, extracted from
9359 process_structure_scope. Handle DW_TAG_variant.
9360 (process_structure_scope): Handle discriminated unions. Call
9361 handle_struct_member_die.
9362
9363 2018-02-26 Tom Tromey <tom@tromey.com>
9364
9365 * rust-lang.h (rust_last_path_segment): Declare.
9366 * rust-lang.c (rust_last_path_segment): Now public. Change
9367 contract.
9368 (struct disr_info): Remove.
9369 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
9370 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
9371 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
9372 (rust_enum_p, rust_enum_variant): New function.
9373 (rust_underscore_fields): Remove "offset" parameter.
9374 (rust_print_enum): New function.
9375 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
9376 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
9377 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
9378 enums.
9379 (rust_internal_print_type): New function, from rust_print_type.
9380 Remove enum code.
9381 (rust_print_type): Call rust_internal_print_type.
9382 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
9383 Update enum handling.
9384 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
9385 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
9386 (rust_union_quirks): New functions.
9387 (process_full_comp_unit, process_full_type_unit): Call
9388 rust_union_quirks.
9389 (process_structure_scope): Update rust_unions if necessary.
9390
9391 2018-02-26 Tom Tromey <tom@tromey.com>
9392
9393 * value.h (value_union_variant): Declare.
9394 * valops.c (value_union_variant): New function.
9395 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
9396 (struct discriminant_info): New.
9397 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
9398 enumerator.
9399 (struct main_type) <flag_discriminated_union>: New field.
9400
9401 2018-02-26 Tom Tromey <tom@tromey.com>
9402
9403 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9404 unittests/unpack-selftests.c.
9405 * unittests/unpack-selftests.c: New file.
9406 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
9407
9408 2018-02-26 Yao Qi <yao.qi@linaro.org>
9409
9410 * dwarf2read.c (struct partial_die_info) <read>: New method.
9411 (read_partial_die): Remove the declaration.
9412 (load_partial_dies): Update.
9413 (partial_die_info::partial_die_info):
9414 (read_partial_die): Change it to partial_die_info::read.
9415
9416 2018-02-26 Yao Qi <yao.qi@linaro.org>
9417
9418 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
9419 (fixup_partial_die): Remove declaration.
9420 (scan_partial_symbols): Update.
9421 (partial_die_parent_scope): Likewise.
9422 (partial_die_full_name): Likewise.
9423 (fixup_partial_die): Change it to partial_die_info::fixup.
9424
9425 2018-02-26 Yao Qi <yao.qi@linaro.org>
9426
9427 * dwarf2read.c (read_partial_die): Update the declaration.
9428 (load_partial_dies): Caller update.
9429 (read_partial_die): Remove one argument abbrev_len.
9430
9431 2018-02-26 Yao Qi <yao.qi@linaro.org>
9432
9433 * dwarf2read.c (struct partial_die_info): Add ctor, delete
9434 assignment operator.
9435 (load_partial_dies): Use ctor and copy ctor.
9436 (read_partial_die): Update.
9437 (dwarf2_cu::find_partial_die): Use ctor.
9438
9439 2018-02-26 Yao Qi <yao.qi@linaro.org>
9440
9441 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
9442 (find_partial_die_in_comp_unit): Change it to
9443 dwarf2_cu::find_partial_die.
9444 (find_partial_die): Update.
9445
9446 2018-02-26 Yao Qi <yao.qi@linaro.org>
9447
9448 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
9449 is NULL.
9450
9451 2018-02-26 Yao Qi <yao.qi@linaro.org>
9452
9453 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
9454
9455 2018-02-26 Alan Hayward <alan.hayward@arm.com>
9456
9457 * arch/amd64.h: Use common/tdesc.h.
9458 * arch/i386.c: Likewise.
9459 * arch/i386.h: Likewise.
9460 * arch/tic6x.c: Likewise.
9461 * arch/tdesc.h: Move file from here...
9462 * common/tdesc.h: ...to here.
9463 * features/aarch64-core.c: Regenerate.
9464 * features/aarch64-fpu.c: Regenerate.
9465 * features/i386/32bit-avx.c: Regenerate.
9466 * features/i386/32bit-avx512.c: Regenerate.
9467 * features/i386/32bit-core.c: Regenerate.
9468 * features/i386/32bit-linux.c: Regenerate.
9469 * features/i386/32bit-mpx.c: Regenerate.
9470 * features/i386/32bit-pkeys.c: Regenerate.
9471 * features/i386/32bit-sse.c: Regenerate.
9472 * features/i386/64bit-avx.c: Regenerate.
9473 * features/i386/64bit-avx512.c: Regenerate.
9474 * features/i386/64bit-core.c: Regenerate.
9475 * features/i386/64bit-linux.c: Regenerate.
9476 * features/i386/64bit-mpx.c: Regenerate.
9477 * features/i386/64bit-pkeys.c: Regenerate.
9478 * features/i386/64bit-segments.c: Regenerate.
9479 * features/i386/64bit-sse.c: Regenerate.
9480 * features/i386/x32-core.c: Regenerate.
9481 * features/tic6x-c6xp.c: Regenerate.
9482 * features/tic6x-core.c: Regenerate.
9483 * features/tic6x-gp.c: Regenerate.
9484 * target-descriptions.c: Use common/tdesc.h.
9485 * target-descriptions.h: Likewise.
9486
9487 2018-02-24 Tom Tromey <tom@tromey.com>
9488
9489 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
9490 (try_thread_db_load_from_dir, thread_db_load_search): Use
9491 std::string.
9492 (info_auto_load_libthread_db_compare): Return bool. Change
9493 argument types.
9494 (info_auto_load_libthread_db): Use std::vector, std::string.
9495 Remove cleanups.
9496
9497 2018-02-24 Tom Tromey <tom@tromey.com>
9498
9499 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
9500 std::string.
9501 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
9502 std::string*.
9503 * gdbarch.c: Rebuild.
9504 * gdbarch.h: Rebuild.
9505 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
9506 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
9507 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
9508 std::string*.
9509
9510 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
9511
9512 * gdbtypes.h (sect_offset): Change type to uint64_t.
9513 (sect_offset_str): New function.
9514 * dwarf2read.c (create_addrmap_from_aranges): Use
9515 sect_offset_str.
9516 (error_check_comp_unit_head): Likewise.
9517 (create_debug_type_hash_table): Likewise.
9518 (read_cutu_die_from_dwo): Likewise.
9519 (init_cutu_and_read_dies): Likewise.
9520 (init_cutu_and_read_dies_no_follow): Likewise.
9521 (process_psymtab_comp_unit_reader): Likewise.
9522 (partial_die_parent_scope): Likewise.
9523 (peek_die_abbrev): Likewise.
9524 (process_queue): Likewise.
9525 (dwarf2_physname): Likewise.
9526 (read_namespace_alias): Likewise.
9527 (read_import_statement): Likewise.
9528 (create_dwo_cu_reader): Likewise.
9529 (create_cus_hash_table): Likewise.
9530 (lookup_dwo_cutu): Likewise.
9531 (inherit_abstract_dies): Likewise.
9532 (read_func_scope): Likewise.
9533 (read_call_site_scope): Likewise.
9534 (dwarf2_add_member_fn): Likewise.
9535 (read_common_block): Likewise.
9536 (read_module_type): Likewise.
9537 (read_typedef): Likewise.
9538 (read_subrange_type): Likewise.
9539 (load_partial_dies): Likewise.
9540 (read_partial_die): Likewise.
9541 (find_partial_die): Likewise.
9542 (read_str_index): Likewise.
9543 (dwarf2_string_attr): Likewise.
9544 (build_error_marker_type): Likewise.
9545 (lookup_die_type): Likewise.
9546 (dump_die_shallow): Likewise.
9547 (follow_die_ref): Likewise.
9548 (dwarf2_fetch_die_loc_sect_off): Likewise.
9549 (dwarf2_fetch_constant_bytes): Likewise.
9550 (follow_die_sig): Likewise.
9551 (get_signatured_type): Likewise.
9552 (get_DW_AT_signature_type): Likewise.
9553 (dwarf2_find_containing_comp_unit): Likewise.
9554 (set_die_type): Likewise.
9555
9556 2018-02-21 John Baldwin <jhb@FreeBSD.org>
9557
9558 * arch/aarch64.c: Include "common-defs.h".
9559 * arch/amd64.c: Likewise.
9560 * arch/i386.c: Likewise.
9561
9562 2018-02-21 Tom Tromey <tom@tromey.com>
9563
9564 * value.h: (extract_field_op): Update.
9565 * eval.c (extract_field_op): Return a const char *.
9566 * expression.h (parse_expression_for_completion): Update.
9567 * completer.c (complete_expression): Update.
9568 (add_struct_fields): Make fieldname const.
9569 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
9570 (mark_completion_tag, parse_exp_in_context_1): Update.
9571 (parse_expression_for_completion): Change "name" to
9572 unique_xmalloc_ptr*.
9573
9574 2018-02-21 Tom Tromey <tom@tromey.com>
9575
9576 * infcall.c (call_function_by_hand_dummy): Use std::vector.
9577
9578 2018-02-21 Yao Qi <yao.qi@linaro.org>
9579
9580 * avr-tdep.c (avr_read_pc): Change parameter type to
9581 readable_regcache.
9582 * gdbarch.sh (read_pc): Likewise.
9583 * gdbarch.c: Re-generated.
9584 * gdbarch.h: Re-generated.
9585 * hppa-tdep.c (hppa_read_pc): Change parameter type to
9586 readable_regcache.
9587 * ia64-tdep.c (ia64_read_pc): Likewise.
9588 * mips-tdep.c (mips_read_pc): Likewise.
9589 * spu-tdep.c (spu_read_pc): Likewise.
9590
9591 2018-02-21 Yao Qi <yao.qi@linaro.org>
9592
9593 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
9594 * regcache-dump.c: New file.
9595 * regcache.c: Move register_dump to regcache-dump.c.
9596 (maintenance_print_registers): Likewise.
9597 (maintenance_print_raw_registers): Likewise.
9598 (maintenance_print_cooked_registers): Likewise.
9599 (maintenance_print_register_groups): Likewise.
9600 (maintenance_print_remote_registers): Likewise.
9601 (_initialize_regcache): Likewise.
9602 * regcache.h (register_dump): Moved from regcache.c.
9603
9604 2018-02-21 Yao Qi <yao.qi@linaro.org>
9605
9606 * regcache.c (regcache::regcache): Update.
9607 (regcache::invalidate): Move it to detached_regcache::invalidate.
9608 (get_thread_arch_aspace_regcache): Update.
9609 (regcache::raw_update): Update.
9610 (regcache::cooked_read): Remove some code.
9611 (regcache::cooked_read_value): Likewise.
9612 (regcache::raw_write): Remove assert on m_readonly_p.
9613 (regcache::raw_supply_integer): Move it to
9614 detached_regcache::raw_supply_integer.
9615 (regcache::raw_supply_zeroed): Likewise.
9616 * regcache.h (detached_regcache) <raw_supply_integer>: New
9617 declaration.
9618 <raw_supply_zeroed, invalidate>: Likewise.
9619 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
9620 <invalidate>: Likewise.
9621 <m_readonly_p>: Removed.
9622
9623 2018-02-21 Yao Qi <yao.qi@linaro.org>
9624
9625 * infcmd.c (get_return_value): Let stop_regs point to
9626 get_current_regcache.
9627 * regcache.c (regcache::regcache): Remove.
9628 (register_dump_reg_buffer): New class.
9629 (regcache_print): Adjust.
9630 * regcache.h (regcache): Remove constructors.
9631
9632 2018-02-21 Yao Qi <yao.qi@linaro.org>
9633
9634 * regcache.c (class register_dump): New class.
9635 (register_dump_regcache, register_dump_none): New class.
9636 (register_dump_remote, register_dump_groups): New class.
9637 (regcache_print): Update.
9638 * regcache.h (regcache_dump_what): Move it to regcache.c.
9639 (regcache) <dump>: Remove.
9640
9641 2018-02-21 Yao Qi <yao.qi@linaro.org>
9642
9643 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
9644 reg_buffer_rw *.
9645 (jit_unwind_reg_set_impl): Call raw_supply.
9646 (jit_frame_sniffer): Use reg_buffer_rw.
9647 * record-full.c (record_full_core_regbuf): Change its type.
9648 (record_full_core_open_1): Use reg_buffer_rw.
9649 (record_full_close): Likewise.
9650 (record_full_core_fetch_registers): Use regcache->raw_supply.
9651 (record_full_core_store_registers): Likewise.
9652 * regcache.c (regcache::get_register_status): Move it to
9653 reg_buffer.
9654 (regcache_raw_set_cached_value): Remove.
9655 (regcache::raw_set_cached_value): Remove.
9656 (regcache::raw_write): Call raw_supply.
9657 (regcache::raw_supply): Move it to reg_buffer_rw.
9658 * regcache.h (regcache_raw_set_cached_value): Remove.
9659 (reg_buffer_rw): New class.
9660
9661 2018-02-21 Yao Qi <yao.qi@linaro.org>
9662
9663 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
9664 readonly_detached_regcache.
9665 (dummy_frame_prev_register): Use regcache->cooked_read.
9666 * frame.c (frame_save_as_regcache): Change return type.
9667 (frame_pop): Update.
9668 * frame.h (frame_save_as_regcache): Update declaration.
9669 * inferior.h (get_infcall_suspend_state_regcache): Update
9670 declaration.
9671 * infrun.c (infcall_suspend_state) <registers>: use
9672 readonly_detached_regcache.
9673 (save_infcall_suspend_state): Don't use regcache_dup.
9674 (get_infcall_suspend_state_regcache): Change return type.
9675 * linux-fork.c (struct fork_info) <savedregs>: Change to
9676 readonly_detached_regcache.
9677 <pc>: New field.
9678 (fork_save_infrun_state): Don't use regcache_dup.
9679 (info_checkpoints_command): Adjust.
9680 * mi/mi-main.c (register_changed_p): Update declaration.
9681 (mi_cmd_data_list_changed_registers): Use
9682 readonly_detached_regcache.
9683 (register_changed_p): Change parameter type to
9684 readonly_detached_regcache.
9685 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
9686 readonly_detached_regcache.
9687 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
9688 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
9689 New.
9690 (regcache::save): Move it to reg_buffer.
9691 (regcache::restore): Change parameter type.
9692 (regcache_dup): Remove.
9693 * regcache.h (reg_buffer) <save>: New method.
9694 (readonly_detached_regcache): New class.
9695 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
9696 readonly_detached_regcache.
9697 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
9698
9699 2018-02-21 Yao Qi <yao.qi@linaro.org>
9700
9701 * frame.c (frame_save_as_regcache): Use regcache method save.
9702 (frame_pop): Use regcache method restore.
9703 * infrun.c (restore_infcall_suspend_state): Likewise.
9704 * linux-fork.c (fork_load_infrun_state): Likewise.
9705 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
9706 save.
9707 * regcache.c (regcache_save): Remove.
9708 (regcache::restore): More asserts.
9709 (regcache_cpy): Remove.
9710 * regcache.h (regcache_save): Remove the declaration.
9711 (regcache::restore): Move from private to public.
9712 Remove the friend declaration of regcache_cpy.
9713 (regcache_cpy): Remove declaration.
9714
9715 2018-02-21 Yao Qi <yao.qi@linaro.org>
9716
9717 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
9718 parameter type to 'readable_regcache *'.
9719 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9720 * arm-tdep.c (arm_neon_quad_read): Likewise.
9721 (arm_pseudo_read): Likewise.
9722 * avr-tdep.c (avr_pseudo_register_read): Likewise.
9723 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9724 * frv-tdep.c (frv_pseudo_register_read): Likewise.
9725 * gdbarch.c: Re-generated.
9726 * gdbarch.h: Re-generated.
9727 * gdbarch.sh (pseudo_register_read): Change parameter type to
9728 'readable_regcache *'.
9729 (pseudo_register_read_value): Likewise.
9730 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
9731 (h8300_pseudo_register_read): Likewise.
9732 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
9733 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9734 (i386_pseudo_register_read_into_value): Likewise.
9735 (i386_pseudo_register_read_value): Likewise.
9736 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
9737 declaration.
9738 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
9739 * m32c-tdep.c (m32c_raw_read): Likewise.
9740 (m32c_read_flg): Likewise.
9741 (m32c_banked_register): Likewise.
9742 (m32c_banked_read): Likewise.
9743 (m32c_sb_read): Likewise.
9744 (m32c_part_read): Likewise.
9745 (m32c_cat_read): Likewise.
9746 (m32c_r3r2r1r0_read): Likewise.
9747 (m32c_pseudo_register_read): Likewise.
9748 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9749 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9750 (mep_pseudo_cr64_read): Likewise.
9751 (mep_pseudo_register_read): Likewise.
9752 * mips-tdep.c (mips_pseudo_register_read): Likewise.
9753 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9754 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9755 * regcache.c (regcache::raw_read): Move it to readable_regcache.
9756 (regcache::cooked_read): Likewise.
9757 (regcache::cooked_read_value): Likewise.
9758 (regcache_cooked_read_signed):
9759 (regcache::cooked_read): Likewise.
9760 * regcache.h (readable_regcache): New class.
9761 (regcache): Inherit readable_regcache. Move some methods to
9762 readable_regcache.
9763 * rl78-tdep.c (rl78_pseudo_register_read): Change
9764 parameter type to 'readable_regcache *'.
9765 * rs6000-tdep.c (do_regcache_raw_read): Remove.
9766 (e500_pseudo_register_read): Change parameter type to
9767 'readable_regcache *'.
9768 (dfp_pseudo_register_read): Likewise.
9769 (vsx_pseudo_register_read): Likewise.
9770 (efpr_pseudo_register_read): Likewise.
9771 * s390-tdep.c (s390_pseudo_register_read): Likewise.
9772 * sh-tdep.c (sh_pseudo_register_read): Likewise.
9773 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
9774 (sh64_pseudo_register_read): Likewise.
9775 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9776 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9777 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9778 (spu_pseudo_register_read): Likewise.
9779 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9780 (xtensa_pseudo_register_read): Likewise.
9781
9782 2018-02-21 Yao Qi <yao.qi@linaro.org>
9783
9784 * regcache.c (regcache::regcache): Call reg_buffer ctor.
9785 (regcache::arch): Move it to reg_buffer::arch.
9786 (regcache::register_buffer): Likewise.
9787 (regcache::assert_regnum): Likewise.
9788 (regcache::num_raw_registers): Likewise.
9789 * regcache.h (reg_buffer): New class.
9790 (regcache): Inherit reg_buffer.
9791
9792 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
9793
9794 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
9795 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
9796
9797 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
9798
9799 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
9800
9801 2018-02-19 Alan Hayward <alan.hayward@arm.com>
9802
9803 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
9804 (SFILES): Remove common/*.c files.
9805 (COMMON_OBS): Remove some *.o files built from common/*.c files.
9806 * common/common.host: Add common reference.
9807 * configure.ac: Likewise.
9808 * configure: Regenerate.
9809
9810 2018-02-16 Yao Qi <yao.qi@linaro.org>
9811
9812 * block.c (block_namespace_info): Inherit allocate_on_obstack.
9813 (block_initialize_namespace): Use new.
9814 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
9815 (dwarf2_free_objfile): Use delete.
9816 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
9817 (copy_type_recursive): Use new.
9818 * gdb_obstack.h (allocate_on_obstack): New.
9819
9820 2018-02-15 Yao Qi <yao.qi@linaro.org>
9821
9822 PR gdb/22849
9823 * inferior.c (exit_inferior_1): Reset inf->control.
9824
9825 2018-02-15 Joel Brobecker <brobecker@adacore.com>
9826
9827 * ada-lang.c (ada_to_fixed_value_create): Delete advance
9828 declaration.
9829
9830 2018-02-14 Pedro Alves <palves@redhat.com>
9831
9832 * frame-unwind.c (frame_unwind_try_unwinder): Always call
9833 frame_cleanup_after_sniffer on exception.
9834
9835 2018-02-14 Tom Tromey <tom@tromey.com>
9836
9837 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
9838 const.
9839 (solib_bfd_open): Make pathname const.
9840 * solib.c (solib_bfd_open): Make pathname const.
9841 * solib-spu.c (spu_bfd_fopen): Make name const.
9842 (spu_bfd_open): Make pathname const.
9843 * solib-darwin.c (darwin_bfd_open): Make pathname const.
9844 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
9845
9846 2018-02-14 Tom Tromey <tom@tromey.com>
9847
9848 * symfile.c (symfile_bfd_open): Update.
9849 * source.h (openp, source_full_path_of, find_and_open_source):
9850 Change argument type to unique_xmalloc_ptr.
9851 * source.c (openp): Take a unique_xmalloc_ptr.
9852 (source_full_path_of, find_and_open_source): Likewise.
9853 (open_source_file, symtab_to_fullname): Update.
9854 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
9855 unique_xmalloc_ptr.
9856 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
9857 (exec_file_find): Update.
9858 * psymtab.c (psymtab_to_fullname): Update.
9859 * nto-tdep.h (nto_find_and_open_solib): Update.
9860 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
9861 unique_xmalloc_ptr.
9862 * exec.c (exec_file_attach): Update.
9863 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
9864 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
9865
9866 2018-02-14 Tom Tromey <tom@tromey.com>
9867
9868 * solib.c: Include source.h.
9869 * nto-tdep.c: Include source.h.
9870 * mi/mi-cmd-env.c: Include source.h.
9871 * infcmd.c: Include source.h.
9872 * exec.c: Include source.h.
9873 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
9874 (add_path, directory_switch, source_path, init_source_path): Move
9875 declarations...
9876 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
9877 (add_path, directory_switch, source_path, init_source_path):
9878 ...here.
9879
9880 2018-02-14 Tom Tromey <tom@tromey.com>
9881
9882 * solist.h (exec_file_find, solib_find): Return
9883 unique_xmalloc_ptr.
9884 (solib_bfd_fopen): Take a const char *.
9885 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
9886 (exec_file_find, solib_find): Likewise.
9887 (solib_bfd_fopen): Do not take ownership of "pathname".
9888 (solib_bfd_open): Use unique_xmalloc_ptr.
9889 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
9890 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
9891 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
9892 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
9893
9894 2018-02-14 Joel Brobecker <brobecker@adacore.com>
9895
9896 * ada-lang.c (name_match_type_from_name): Remove reference to
9897 ada_name_for_lookup in function's documentation.
9898 * ada-lang.h (ada_name_for_lookup): Delete declaration.
9899
9900 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
9901
9902 * defs.h (enum openp_flags): New enum.
9903 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
9904 Move to enum openp_flags.
9905 (openp_flags): New enum flags.
9906 (openp): Change parameter type to openp_flags.
9907 * source.c (openp): Change parameter type to openp_flags.
9908 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
9909 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
9910
9911 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
9912
9913 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
9914 per-command.
9915
9916 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
9917
9918 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
9919 into...
9920 (class dwarf2_queue_guard): ...the destructor of this new class.
9921 (dw2_do_instantiate_symtab): Create instance of the new class
9922 dwarf2_queue_guard, remove cleanup.
9923
9924 2018-02-09 Tom Tromey <tom@tromey.com>
9925
9926 * source.c (find_source_lines): Don't reference past the end of
9927 the vector.
9928
9929 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9930
9931 * remote.c (remote_btrace_maybe_reopen): Change error message.
9932 * btrace.c (btrace_enable): Likewise.
9933 (parse_xml_btrace): Likewise.
9934 (parse_xml_btrace_conf): Likewise.
9935
9936 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9937
9938 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
9939 (linux_enable_pt, linux_enable_bts): Call
9940 diagnose_perf_event_open_fail.
9941
9942 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9943
9944 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
9945 Remove parameter and change return type. Update callers. Move it.
9946 (linux_enable_bts, linux_enable_pt): Improve error message.
9947 (linux_enable_pt): Remove zero buffer size check.
9948 (linux_enable_btrace): Improve error messages. Remove NULL return
9949 check.
9950
9951 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9952
9953 * btrace.c (btrace_enable): Remove target_supports_btrace call.
9954 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
9955 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
9956 (linux_supports_pt, linux_supports_btrace): Remove.
9957 (linux_enable_bts): Call cpu_supports_bts.
9958 * nat/linux-btrace.h (linux_supports_btrace): Remove.
9959 * remote.c (remote_supports_btrace): Remove.
9960 (init_remote_ops): Remove remote_supports_btrace.
9961 * target-delegates.c: Regenerated.
9962 * target.c (target_supports_btrace): Remove.
9963 * target.h (target_ops) <to_supports_btrace>: Remove
9964 (target_supports_btrace): Remove.
9965 * x86-linux-nat.c (x86_linux_create_target): Remove
9966 linux_supports_btrace.
9967
9968 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9969
9970 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
9971 btrace failed.
9972 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
9973 exception and use message in own exception.
9974
9975 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9976
9977 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
9978 (perf_event_pt_event_type): Use gdb_file_up.
9979 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
9980 scoped_fd, and scoped_mmap.
9981
9982 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9983
9984 * common/scoped_mmap.h: New.
9985 * unittests/scoped_mmap-selftest.c: New.
9986 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9987 unittests/scoped_mmap-selftest.c.
9988
9989 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9990
9991 * common/scoped_fd.h: New.
9992 * unittests/scoped_fd-selftest.c: New.
9993 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9994 unittests/scoped_fd-selftest.c.
9995
9996 2018-02-09 Tom Tromey <tom@tromey.com>
9997
9998 * auto-load.c (auto_load_section_scripts): Use
9999 gdb::unique_xmalloc_ptr.
10000
10001 2018-02-09 Tom Tromey <tom@tromey.com>
10002
10003 * auto-load.c (execute_script_contents): Use std::string.
10004
10005 2018-02-09 Joel Brobecker <brobecker@adacore.com>
10006
10007 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
10008 Python function, rather than a new command.
10009
10010 2018-02-08 Tom Tromey <tom@tromey.com>
10011
10012 * solib.c (solib_find_1): Use std::string.
10013 (solib_bfd_fopen): Use unique_xmalloc_ptr.
10014
10015 2018-02-08 Tom Tromey <tom@tromey.com>
10016
10017 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
10018
10019 2018-02-08 Tom Tromey <tom@tromey.com>
10020
10021 * source.c (find_source_lines): Use gdb::def_vector.
10022
10023 2018-02-08 Tom Tromey <tom@tromey.com>
10024
10025 * macrocmd.c (struct temporary_macro_definition): New.
10026 (macro_define_command): Use temporary_macro_definition. Remove
10027 cleanups.
10028 (free_macro_definition_ptr): Remove.
10029
10030 2018-02-08 Tom Tromey <tom@tromey.com>
10031
10032 * macroexp.c (maybe_expand): Use std::string.
10033
10034 2018-02-08 Tom Tromey <tom@tromey.com>
10035
10036 * macroexp.c (struct macro_buffer): Add initializers for some
10037 members.
10038 (init_buffer, init_shared_buffer, free_buffer)
10039 (free_buffer_return_text): Remove.
10040 (macro_buffer): New constructors.
10041 (~macro_buffer): New destructor.
10042 (macro_buffer::set_shared): New method.
10043 (macro_buffer::resize_buffer, macro_buffer::appendc)
10044 (macro_buffer::appendmem): Now methods, not free functions.
10045 (set_token, append_tokens_without_splicing, stringify)
10046 (macro_stringify): Update.
10047 (gather_arguments): Change return type. Remove argc_p argument,
10048 add args_ptr argument. Use std::vector.
10049 (substitute_args): Remove argc argument. Accept std::vector.
10050 (expand): Update. Use std::vector.
10051 (scan, macro_expand, macro_expand_next): Update.
10052
10053 2018-02-08 Tom Tromey <tom@tromey.com>
10054
10055 * symtab.c (default_collect_symbol_completion_matches_break_on):
10056 Use unique_xmalloc_ptr.
10057 * macroscope.h: (sal_macro_scope, user_macro_scope)
10058 (default_macro_scope): Return unique_xmalloc_ptr.
10059 * macroscope.c (sal_macro_scope, user_macro_scope)
10060 (default_macro_scope): Return unique_xmalloc_ptr.
10061 * macroexp.h (macro_expand, macro_expand_once): Return
10062 unique_xmalloc_ptr.
10063 * macroexp.c (macro_expand, macro_expand_once): Return
10064 unique_xmalloc_ptr.
10065 * macrocmd.c (macro_expand_command, macro_expand_once_command)
10066 (info_macro_command, info_macros_command): Use
10067 unique_xmalloc_ptr.
10068 * compile/compile-c-support.c (write_macro_definitions): Use
10069 unique_xmalloc_ptr.
10070 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
10071
10072 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
10073
10074 * value.c (value_static_field): Assign field type instead of
10075 containing type when returning an optimized out value.
10076
10077 2018-02-06 Yao Qi <yao.qi@linaro.org>
10078
10079 * ft32-tdep.c (ft32_read_pc): Remove.
10080 (ft32_write_pc): Remove.
10081 (ft32_gdbarch_init): Update.
10082 * m32r-tdep.c (m32r_read_pc): Remove.
10083 (m32r_gdbarch_init): Update.
10084 * mep-tdep.c (mep_read_pc): Remove.
10085 (mep_gdbarch_init): Update.
10086 * microblaze-tdep.c (microblaze_write_pc): Remove.
10087 (microblaze_gdbarch_init): Update.
10088 * mn10300-tdep.c (mn10300_read_pc): Remove.
10089 (mn10300_write_pc): Remove.
10090 (mn10300_gdbarch_init): Update.
10091 * moxie-tdep.c (moxie_read_pc): Remove.
10092 (moxie_write_pc): Remove.
10093 (moxie_gdbarch_init): Update.
10094
10095 2018-02-06 Yao Qi <yao.qi@linaro.org>
10096
10097 * expprint.c (print_subexp_standard): Handle
10098 OP_F77_UNDETERMINED_ARGLIST.
10099 (dump_subexp_body_standard): Likewise.
10100
10101 2018-02-05 Alan Hayward <alan.hayward@arm.com>
10102
10103 * target-descriptions.c (tdesc_element_visitor) Add empty
10104 implementations.
10105 (tdesc_type): Move make_gdb_type from here.
10106 (tdesc_type_builtin): Likewise.
10107 (tdesc_type_vector): Likewise.
10108 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
10109 (make_gdb_type_struct): Move from tdesc_type_with_fields.
10110 (make_gdb_type_union): Likewise.
10111 (make_gdb_type_flags): Likewise.
10112 (make_gdb_type_enum): Likewise.
10113 (make_gdb_type): New function.
10114 (tdesc_register_type): Use static make_gdb_type.
10115
10116 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
10117
10118 * infcmd.c (default_print_one_register_info): Align natural-format
10119 column values consistently one under another.
10120 (pad_to_column): New function.
10121
10122 2018-02-05 Joel Brobecker <brobecker@adacore.com>
10123
10124 * dwarf2read.c (dwarf2_physname): Move commment.
10125
10126 2018-02-01 Leszek Swirski <leszeks@google.com>
10127
10128 * varobj.c (varobj_formatted_print_options): Allow recursive
10129 pretty printing if pretty printing is enabled.
10130
10131 2018-02-01 Leszek Swirski <leszeks@google.com>
10132
10133 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
10134 names after a structop as a filename.
10135
10136 2018-02-01 Yao Qi <yao.qi@linaro.org>
10137
10138 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
10139 (arm_record_coproc_data_proc): Likewise.
10140
10141 2018-02-01 Yao Qi <yao.qi@linaro.org>
10142
10143 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
10144
10145 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
10146
10147 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
10148 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
10149
10150 2018-01-31 Pedro Alves <palves@redhat.com>
10151
10152 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
10153 * inflow.c (child_terminal_save_inferior): Wrap reference to
10154 tcgetpgrp in HAVE_TERMIOS_H.
10155 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
10156 _WIN32.
10157 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
10158 always iterate over all inferiors.
10159 (gdbsim_cntrl_c): Adjust.
10160 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
10161
10162 2018-01-31 Joel Brobecker <brobecker@adacore.com>
10163
10164 * gdbtypes.c (lookup_array_range_type): Make sure the array's
10165 index type is objfile-owned if the element type is as well.
10166
10167 2018-01-31 Joel Brobecker <brobecker@adacore.com>
10168
10169 GDB 8.1 released.
10170
10171 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
10172
10173 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
10174 "features/s390x-linux64.c".
10175 (_initialize_s390_linux_tdep): Remove initialization of tdescs
10176 s390_linux32 and s390x_linux64.
10177 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
10178 default tdesc.
10179 * s390-tdep.c: Include "features/s390-linux32.c" and
10180 "features/s390x-linux64.c".
10181 (s390_tdesc_valid): Add check for tdesc_has_registers.
10182 (s390_gdbarch_init): Make sure there is always a valid tdesc.
10183 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
10184 tdesc_s390x_linux64.
10185 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
10186 tdesc_s390x_linux64 to...
10187 * s390-tdep.h: ...here.
10188
10189 2018-01-30 Pedro Alves <palves@redhat.com>
10190
10191 PR gdb/13211
10192 * config.in, configure: Regenerate.
10193 * configure.ac: Check for getpgid.
10194 * go32-nat.c (go32_pass_ctrlc): New.
10195 (go32_target): Install it.
10196 * inf-child.c (inf_child_target): Install
10197 child_terminal_save_inferior, child_pass_ctrlc and
10198 child_interrupt.
10199 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
10200 (inf_ptrace_target): No longer install it.
10201 * infcmd.c (interrupt_target_1): Adjust.
10202 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
10203 (child_interrupt): Declare.
10204 (inferior::terminal_state): New.
10205 * inflow.c (struct terminal_info): Update comments.
10206 (inferior_process_group): Delete.
10207 (terminal_is_ours): Delete.
10208 (gdb_tty_state): New.
10209 (child_terminal_init): Adjust.
10210 (is_gdb_terminal, sharing_input_terminal_1)
10211 (sharing_input_terminal): New functions.
10212 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
10213 Set the process's actual process group in the foreground if
10214 possible. Handle is_ours_for_output/is_ours distinction. Don't
10215 mark terminal as the inferior's if not sharing GDB's terminal.
10216 Don't check attach_flag.
10217 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
10218 pass down a target_terminal_state.
10219 (child_terminal_save_inferior): New, factored out from ...
10220 (child_terminal_ours_1): ... this. Handle
10221 target_terminal_state::is_ours_for_output.
10222 (child_interrupt, child_pass_ctrlc): New.
10223 (inflow_inferior_exit): Clear the inferior's terminal_state.
10224 (copy_terminal_info): Copy the inferior's terminal state.
10225 (_initialize_inflow): Remove reference to terminal_is_ours.
10226 * inflow.h (inferior_process_group): Delete.
10227 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
10228 * procfs.c (procfs_target): Don't install procfs_interrupt.
10229 (procfs_interrupt): Delete.
10230 * remote.c (remote_serial_quit_handler): Adjust.
10231 (remote_interrupt): Remove ptid parameter. Adjust.
10232 * target-delegates.c: Regenerate.
10233 * target.c: Include "terminal.h".
10234 (target_terminal::terminal_state): Rename to ...
10235 (target_terminal::m_terminal_state): ... this.
10236 (target_terminal::init): Adjust.
10237 (target_terminal::inferior): Adjust to per-inferior
10238 terminal_state.
10239 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
10240 (target_terminal::ours, target_terminal::ours_for_output): Use
10241 target_terminal_is_ours_kind.
10242 (target_interrupt): Remove ptid parameter. Adjust.
10243 (default_target_pass_ctrlc): Adjust.
10244 * target.h (target_ops::to_terminal_save_inferior): New field.
10245 (target_ops::to_interrupt): Remove ptid_t parameter.
10246 (target_interrupt): Remove ptid_t parameter. Update comment.
10247 (target_pass_ctrlc): Update comment.
10248 * target/target.h (target_terminal_state): New scoped enum,
10249 factored out of ...
10250 (target_terminal::terminal_state): ... here.
10251 (target_terminal::inferior): Update comments.
10252 (target_terminal::restore_inferior): New.
10253 (target_terminal::is_inferior, target_terminal::is_ours)
10254 (target_terminal::is_ours_for_output): Adjust.
10255 (target_terminal::scoped_restore_terminal_state): Adjust to
10256 rename, and call restore_inferior() instead of inferior().
10257 (target_terminal::scoped_restore_terminal_state::m_state): Change
10258 type.
10259 (target_terminal::terminal_state): Rename to ...
10260 (target_terminal::m_terminal_state): ... this and change type.
10261
10262 2018-01-30 Pedro Alves <palves@redhat.com>
10263
10264 * linux-nat.c (wait_for_signal): New function.
10265 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
10266 directly.
10267 (async_terminal_is_ours)
10268 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
10269 (linux_nat_add_target): Don't override
10270 to_terminal_inferior/to_terminal_ours.
10271
10272 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
10273
10274 * remote.c (remote_follow_fork): Don't call "detach_inferior".
10275
10276 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
10277
10278 * dwarf2read.c (free_dwo_files): Add forward-declaration.
10279 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
10280 dwarf2_per_objfile_free here.
10281 (dwarf2_per_objfile_free): Remove.
10282 (_initialize_dwarf2_read): Don't register
10283 dwarf2_per_objfile_free as a registry cleanup.
10284
10285 2018-01-27 Eli Zaretskii <eliz@gnu.org>
10286
10287 Avoid compilation errors in MinGW native builds
10288
10289 The error is triggered by including python-internal.h, and the
10290 error message is:
10291
10292 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
10293 from build-gnulib/import/math.h:27,
10294 from d:/usr/Python26/include/pyport.h:235,
10295 from d:/usr/Python26/include/Python.h:58,
10296 from python/python-internal.h:94,
10297 from python/py-arch.c:24:
10298 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
10299 using ::hypot;
10300 ^~~~~
10301
10302 This happens because Python headers define 'hypot' to expand t
10303 '_hypot' in the Windows builds.
10304 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
10305 'hypoth'. This avoids a compilation error.
10306
10307 2018-01-26 Alan Hayward <alan.hayward@arm.com>
10308
10309 * MAINTAINERS (Write After Approval): Fix ordering.
10310
10311 2018-01-26 Alan Hayward <alan.hayward@arm.com>
10312
10313 * MAINTAINERS (Write After Approval): Add Alan Hayward.
10314
10315 2018-01-26 Alan Modra <amodra@gmail.com>
10316
10317 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
10318 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
10319 Remove nop. Make const. Comment.
10320 (powerpc32_plt_stub_so_2): New.
10321 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
10322 Correct count. Update uses.
10323 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
10324 Move common code reading PLT entry word. Correct
10325 powerpc32_plt_stub PLT address calculation.
10326 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
10327 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
10328 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
10329 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
10330 (ppc64_standard_linkage8): Likewise.
10331 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
10332 Correct insns description.
10333 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
10334
10335 2018-01-24 Pedro Alves <palves@redhat.com>
10336
10337 GCC PR libstdc++/83906
10338 * gdbtypes.c (operator==(const dynamic_prop &,
10339 const dynamic_prop &)): New.
10340 (operator==(const range_bounds &, const range_bounds &)): New.
10341 (check_types_equal): Use them instead of memcmp.
10342 * gdbtypes.h (operator==(const dynamic_prop &,
10343 const dynamic_prop &)): Declare.
10344 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
10345 (operator==(const range_bounds &, const range_bounds &)): Declare.
10346 (operator!=(const range_bounds &, const range_bounds &)): Declare.
10347
10348 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10349
10350 * s390-linux-tdep.c (s390_record_address_mask)
10351 (s390_record_calc_disp_common, s390_record_calc_disp)
10352 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10353 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10354 (s390_process_record): Move to s390-tdep.c.
10355 (s390_linux_init_abi_any): Adjust.
10356 * s390-tdep.c (s390_record_address_mask)
10357 (s390_record_calc_disp_common, s390_record_calc_disp)
10358 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10359 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10360 (s390_process_record): Moved from s390-linux-tdep.c
10361 (s390_gdbarch_init): Adjust.
10362
10363 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10364
10365 * s390-linux-nat.c (s390-tdep.h): New include.
10366 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
10367 (HFILES_NO_SRCDIR): Add s390-tdep.h.
10368 (ALLDEPFILES): Add s390-tdep.c.
10369 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
10370 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
10371 * s390-tdep.h: ...this. New file.
10372 * s390-linux-tdep.c (s390-tdep.h): New include.
10373 (_initialize_s390_tdep): Rename to...
10374 (_initialize_s390_linux_tdep): ...this and adjust.
10375 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
10376 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
10377 s390-tdep.h.
10378 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
10379 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
10380 (s390_is_partial_instruction, s390_software_single_step)
10381 (is_non_branch_ril, s390_displaced_step_copy_insn)
10382 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
10383 (s390_prologue_data, s390_addr, s390_store, s390_load)
10384 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
10385 (s390_register_call_saved, s390_guess_tracepoint_registers)
10386 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
10387 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
10388 (s390_pseudo_register_name, s390_pseudo_register_type)
10389 (s390_pseudo_register_read, s390_pseudo_register_write)
10390 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
10391 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
10392 (s390_addr_bits_remove, s390_address_class_type_flags)
10393 (s390_address_class_type_flags_to_name)
10394 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
10395 (s390_function_arg_float, s390_function_arg_vector)
10396 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
10397 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
10398 (s390_frame_align, s390_register_return_value, s390_return_value)
10399 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
10400 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
10401 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
10402 (s390_trad_frame_prev_register, s390_unwind_cache)
10403 (s390_prologue_frame_unwind_cache)
10404 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
10405 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
10406 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
10407 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
10408 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
10409 (s390_frame_base_address, s390_local_base_address)
10410 (s390_frame_base, s390_gcc_target_options)
10411 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
10412 (s390_validate_reg_range, s390_tdesc_valid)
10413 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
10414 * s390-tdep.c: ...this. New file.
10415
10416 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10417
10418 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
10419 (s390_process_record, s390_gdbarch_tdep_alloc)
10420 (s390_linux_init_abi_any): Use/set new hook.
10421
10422 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10423
10424 * s390-linux-tdep.c (osabi.h): New include.
10425 (s390_linux_init_abi_31, s390_linux_init_abi_64)
10426 (s390_linux_init_abi_any): New functions.
10427 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
10428
10429 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10430
10431 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
10432 tdesc_has_registers check
10433
10434 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10435
10436 * s390-linux-tdep.c (s390_tdesc_valid): New function.
10437 (s390_validate_reg_range): New macro.
10438 (s390_gdbarch_init): Adjust.
10439
10440 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10441
10442 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
10443 (s390_gdbarch_tdep_alloc): Adjust.
10444 (s390_gdbarch_init): Adjust.
10445
10446 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10447
10448 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
10449 <have_tdb>: Change type to bool.
10450 (s390_gdbarch_tdep_alloc): Adjust.
10451 (s390_gdbarch_init): Adjust.
10452
10453 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10454
10455 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
10456 (gdbarch_tdep) <have_upper, have_vx>: New fields.
10457 (s390_gdbarch_tdep_alloc): New function.
10458 (s390_gdbarch_init): Allocate tdep at start and use its fields
10459 instead of separate variables.
10460
10461 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10462
10463 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
10464 when looking for cached gdbarch and add comment for remaining.
10465
10466 2018-01-22 Pedro Alves <palves@redhat.com>
10467 Sergio Durigan Junior <sergiodj@redhat.com>
10468
10469 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
10470 case.
10471
10472 2018-01-22 Maciej W. Rozycki <macro@mips.com>
10473
10474 * MAINTAINERS: Update my company e-mail address.
10475
10476 2018-01-22 Yao Qi <yao.qi@linaro.org>
10477
10478 * regcache.c (cooked_write_test): New function.
10479 (_initialize_regcache): Register the test.
10480
10481 2018-01-22 Yao Qi <yao.qi@linaro.org>
10482
10483 * ia64-tdep.c (ia64_pseudo_register_read): Call
10484 regcache->cooked_read instead of regcache_cooked_read_unsigned.
10485 * m32c-tdep.c (m32c_cat_read): Likewise.
10486 (m32c_r3r2r1r0_read): Likewise.
10487 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10488 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10489
10490 2018-01-22 Yao Qi <yao.qi@linaro.org>
10491
10492 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
10493 method raw_read instead of regcache_raw_read.
10494 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10495 * arm-tdep.c (arm_neon_quad_read): Likewise.
10496 * avr-tdep.c (avr_pseudo_register_read): Likewise.
10497 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10498 * frv-tdep.c (frv_pseudo_register_read): Likewise.
10499 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
10500 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10501 (i386_pseudo_register_read_into_value): Likewise.
10502 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10503 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10504 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10505 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
10506 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
10507 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10508 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10509 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10510 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
10511
10512 2018-01-22 Yao Qi <yao.qi@linaro.org>
10513
10514 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
10515 * configure.tgt: Remove target mt.
10516 * mt-tdep.c: Remove.
10517 * regcache.c (cooked_read_test): Remove the check for mt.
10518
10519 2018-01-22 Yao Qi <yao.qi@linaro.org>
10520
10521 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
10522 instead of gdbarch_pseudo_register_read_value.
10523
10524 2018-01-22 Joel Brobecker <brobecker@adacore.com>
10525
10526 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
10527 language is Ada.
10528
10529 2018-01-22 Joel Brobecker <brobecker@adacore.com>
10530
10531 * linespec.c (create_sals_line_offset): Remove code that preserved
10532 the symtab_and_line's line number.
10533
10534 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10535
10536 * varobj.c (varobj_create): Don't set valid_block when creating a
10537 floating varobj.
10538
10539 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10540
10541 * varobj.c (varobj_create): Remove out of date comment.
10542
10543 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10544
10545 PR mi/20395
10546 * ada-exp.y (write_var_from_sym): Pass extra parameter when
10547 updating innermost block.
10548 * parse.c (innermost_block_tracker::update): Take extra type
10549 parameter, and check types match before updating innermost block.
10550 (write_dollar_variable): Update innermost block for registers.
10551 * parser-defs.h (enum innermost_block_tracker_type): New enum.
10552 (innermost_block_tracker::innermost_block_tracker): Initialise
10553 m_types member.
10554 (innermost_block_tracker::reset): Take type parameter.
10555 (innermost_block_tracker::update): Take type parameter, and pass
10556 type through as needed.
10557 (innermost_block_tracker::m_types): New member.
10558 * varobj.c (varobj_create): Pass type when reseting innermost
10559 block.
10560
10561 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10562
10563 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
10564 * ada-lang.c (resolve_subexp): Likewise.
10565 * breakpoint.c (set_breakpoint_condition) Likewise.
10566 (watch_command_1) Likewise.
10567 * c-exp.y (variable): Likewise.
10568 * d-exp.y (PrimaryExpression): Likewise.
10569 * f-exp.y (variable): Likewise.
10570 * go-exp.y (variable): Likewise.
10571 * m2-exp.y (variable): Likewise.
10572 * objfiles.c (objfile::~objfile): Likewise.
10573 * p-exp.y (variable): Likewise.
10574 * parse.c (innermost_block): Change type.
10575 * parser-defs.h (class innermost_block_tracker): New.
10576 (innermost_block): Change to innermost_block_tracker.
10577 * printcmd.c (display_command): Switch to innermost_block API.
10578 (do_one_display): Likewise.
10579 * rust-exp.y (do_one_display): Likewise.
10580 * symfile.c (clear_symtab_users): Likewise.
10581 * varobj.c (varobj_create): Switch to innermost_block API, replace
10582 use of innermost_block with block stored on varobj object.
10583
10584 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10585
10586 * expression.h (innermost_block): Remove declaration.
10587 * varobj.c: Add 'parser-defs.h' include.
10588
10589 2018-01-19 Tom Tromey <tom@tromey.com>
10590
10591 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
10592 symbols in the static and global blocks.
10593
10594 2018-01-19 James Clarke <jrtc27@jrtc27.com>
10595
10596 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
10597 gdb_ptrace.h, and move including gdb_wait.h ...
10598 * nat/linux-ptrace.h: ... to here.
10599
10600 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10601
10602 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
10603 inf_ptrace_detach_success.
10604 (inf_ptrace_detach_success): Add inferior parameter, use it
10605 instead of inferior_ptid, pass it to detach_inferior.
10606 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
10607 parameter.
10608 * inferior.c (detach_inferior): Add overload that takes an
10609 inferior object.
10610 * inferior.h (detach_inferior): Likewise.
10611 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
10612 use inferior_ptid, adjust call to inf_ptrace_detach_success.
10613 * linux-thread-db.c (thread_db_detach): Use inf parameter.
10614
10615 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10616
10617 * target.h (struct target_ops) <to_detach>: Add inferior
10618 parameter.
10619 (target_detach): Likewise.
10620 * target.c (dispose_inferior): Pass inferior down.
10621 (target_detach): Pass inferior down. Assert that it is equal to
10622 the current inferior.
10623 * aix-thread.c (aix_thread_detach): Pass inferior down.
10624 * corefile.c (core_file_command): Pass current_inferior() down.
10625 * corelow.c (core_detach): Add inferior parameter.
10626 * darwin-nat.c (darwin_detach): Likewise.
10627 * gnu-nat.c (gnu_detach): Likewise.
10628 * inf-ptrace.c (inf_ptrace_detach): Likewise.
10629 * infcmd.c (detach_command): Pass current_inferior() down to
10630 target_detach.
10631 * infrun.c (follow_fork_inferior): Pass parent_inf to
10632 target_detach.
10633 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
10634 target_detach.
10635 * linux-nat.c (linux_nat_detach): Add inferior parameter.
10636 * linux-thread-db.c (thread_db_detach): Likewise.
10637 * nto-procfs.c (procfs_detach): Likewise.
10638 * procfs.c (procfs_detach): Likewise.
10639 * record.c (record_detach): Likewise.
10640 * record.h (struct inferior): Forward-declare.
10641 (record_detach): Add inferior parameter.
10642 * remote-sim.c (gdbsim_detach): Likewise.
10643 * remote.c (remote_detach_1): Likewise.
10644 (remote_detach): Likewise.
10645 (extended_remote_detach): Likewise.
10646 * sol-thread.c (sol_thread_detach): Likewise.
10647 * target-debug.h (target_debug_print_inferior_p): New macro.
10648 * target-delegates.c: Re-generate.
10649 * top.c (kill_or_detach): Pass inferior down to target_detach.
10650 * windows-nat.c (windows_detach): Add inferior parameter.
10651
10652 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10653
10654 * target.h (struct target_ops) <to_detach>: Remove args
10655 parameter.
10656 (target_detach): Likewise.
10657 * target.c (dispose_inferior): Adjust.
10658 (target_detach): Remove args parameter, adjust.
10659 * aix-thread.c (aix_thread_detach): Adjust.
10660 * corefile.c (core_file_command): Adjust.
10661 * corelow.c (core_detach): Adjust.
10662 * darwin-nat.c (darwin_detach): Adjust.
10663 * gnu-nat.c (gnu_detach): Adjust.
10664 * inf-ptrace.c (inf_ptrace_detach): Adjust.
10665 * infcmd.c (detach_command): Adjust
10666 * infrun.c (follow_fork_inferior): Adjust.
10667 (handle_vfork_child_exec_or_exit): Adjust.
10668 * linux-fork.c (linux_fork_detach): Remove args parameter.
10669 * linux-fork.h (linux_fork_detach): Likewise.
10670 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
10671 * linux-thread-db.c (thread_db_detach): Likewise.
10672 * nto-procfs.c (procfs_detach): Likewise.
10673 * procfs.c (procfs_detach): Likewise.
10674 (do_detach): Remove signo parameter.
10675 * record.c (record_detach): Remove args parameter.
10676 * record.h (record_detach): Likewise.
10677 * remote-sim.c (gdbsim_detach): Likewise.
10678 * remote.c (remote_detach_1): Likewise.
10679 (remote_detach): Likewise.
10680 (extended_remote_detach): Likewise.
10681 * sol-thread.c (sol_thread_detach): Likewise.
10682 * target-delegates.c: Re-generate.
10683 * top.c (struct qt_args) <args>: Remove field.
10684 (kill_or_detach): Don't pass args.
10685 (quit_force): Don't set args.
10686 * windows-nat.c (windows_detach): Remove args parameter.
10687
10688 2018-01-19 Yao Qi <yao.qi@linaro.org>
10689
10690 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
10691 (arm_linux_init_abi): Install it.
10692
10693 2018-01-19 Yao Qi <yao.qi@linaro.org>
10694
10695 * osabi.c (gdb_osabi_names): Extend the regexp for
10696 arm-linux-gnueabihf.
10697
10698 2018-01-18 Yao Qi <yao.qi@linaro.org>
10699
10700 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
10701 m_abbrevs.
10702 (abbrev_table::add_abbrev): Update.
10703 (abbrev_table::lookup_abbrev): Update.
10704
10705 2018-01-18 Yao Qi <yao.qi@linaro.org>
10706
10707 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
10708
10709 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
10710
10711 * compile/compile.c (compile_to_object): Convert "triplet_rx"
10712 to "std::string".
10713
10714 2018-01-17 Tom Tromey <tom@tromey.com>
10715
10716 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
10717
10718 2018-01-17 Tom Tromey <tom@tromey.com>
10719
10720 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
10721 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
10722 (create_array_type_with_stride): Update.
10723 * dwarf2read.c (set_die_type): Update.
10724
10725 2018-01-17 Tom Tromey <tom@tromey.com>
10726
10727 * dwarf2read.c (delayed_method_info): Remove typedef.
10728 (dwarf2_cu::method_info): Now a std::vector.
10729 (add_to_method_list): Update.
10730 (free_delayed_list): Remove.
10731 (compute_delayed_physnames): Update.
10732 (process_full_comp_unit, process_full_type_unit): Clear the method
10733 list. Remove cleanups.
10734 (psymtab_include_file_name): Add name_holder parameter. Use
10735 unique_xmalloc_ptr.
10736 (dwarf_decode_lines): Update.
10737
10738 2018-01-17 Tom Tromey <tom@tromey.com>
10739 Simon Marchi <simon.marchi@ericsson.com>
10740
10741 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
10742 (dwarf2_per_objfile::free_cached_comp_units)
10743 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10744 (init_cutu_and_read_dies_no_follow): Update.
10745 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
10746 (dwarf2_cu::~dwarf2_cu): New.
10747 (free_heap_comp_unit, free_stack_comp_unit): Remove.
10748 (age_cached_comp_units, free_one_cached_comp_unit): Update.
10749
10750 2018-01-17 Tom Tromey <tom@tromey.com>
10751 Simon Marchi <simon.marchi@ericsson.com>
10752
10753 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
10754 (struct die_reader_specs) <abbrev_table>: New member.
10755 (struct abbrev_table): Add constructor.
10756 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
10757 <abbrev_obstack>: Now an auto_obstack.
10758 (abbrev_table_up): New typedef.
10759 (init_cu_die_reader): Add abbrev_table parameter.
10760 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
10761 Add result_dwo_abbrev_table.
10762 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10763 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
10764 Update.
10765 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
10766 parameter.
10767 (skip_children): Update.
10768 (abbrev_table::alloc_abbrev): Rename from
10769 abbrev_table_alloc_abbrev.
10770 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
10771 (abbrev_table::lookup_abbrev): Rename from
10772 abbrev_table_lookup_abbrev.
10773 (abbrev_table_read_table): Return abbrev_table_up.
10774 (abbrev_table_free, abbrev_table_free_cleanup)
10775 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
10776 (load_partial_dies): Update.
10777
10778 2018-01-17 Tom Tromey <tom@tromey.com>
10779
10780 * dwarf2read.c (dwarf2_compute_name): Update comment.
10781 (read_func_scope, read_variable): Update.
10782 (new_symbol): Remove.
10783 (new_symbol_full): Rename to new_symbol.
10784
10785 2018-01-17 Mike Gulick <mgulick@mathworks.com>
10786
10787 PR gdb/16577
10788 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
10789 a warning instead of throwing an error, set section size to 0 and return
10790 NULL.
10791 * gdb_bfd.h (gdb_bfd_map_section): Update description.
10792
10793 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
10794
10795 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
10796 std::string.
10797 (linux_ptrace_attach_fail_reason_string): Likewise.
10798 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
10799 Likewise.
10800 (linux_ptrace_attach_fail_reason_string): Likewise.
10801 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
10802
10803 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
10804
10805 * linux-nat.c (linux_nat_attach): Remove xstrdup.
10806
10807 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
10808
10809 PR gdb/21559
10810 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
10811 checking for fs_base/gs_base fields in struct user_regs_struct.
10812 * configure: Regenerate.
10813
10814 2018-01-17 Yao Qi <yao.qi@linaro.org>
10815
10816 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
10817 function.
10818 (aarch64_linux_init_abi): Install it to gdbarch hook
10819 gcc_target_options.
10820
10821 2018-01-15 Pedro Alves <palves@redhat.com>
10822
10823 * common/signals-state-save-restore.c
10824 (save_original_signals_state): Fix typos.
10825
10826 2017-01-12 Tom Tromey <tom@tromey.com>
10827 Sergio Durigan Junior <sergiodj@redhat.com>
10828
10829 * Makefile.in (install-only): Install gdb-add-index.
10830
10831 2018-01-12 John Baldwin <jhb@FreeBSD.org>
10832
10833 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
10834
10835 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
10836
10837 * infrun.c (keep_going_pass_signal): Clear step-over info when
10838 insert_breakpoints fails.
10839
10840 2018-01-11 Pedro Alves <palves@redhat.com>
10841
10842 PR gdb/22583
10843 * infrun.c (resume): Rename to ...
10844 (resume_1): ... this.
10845 (resume): Reimplement as wrapper around resume_1.
10846
10847 2018-01-11 Pedro Alves <palves@redhat.com>
10848
10849 PR remote/22597
10850 * remote.c (remote_parse_stop_reply): Default to the last-set
10851 general thread instead of to 'magic_null_ptid'.
10852
10853 2018-01-10 Pedro Alves <palves@redhat.com>
10854
10855 * language.h (language_get_symbol_name_matcher): Rename ...
10856 (get_symbol_name_matcher): ... this.
10857 * language.c (language_get_symbol_name_matcher): Ditto.
10858 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
10859 callers adjusted.
10860
10861 2018-01-10 Pedro Alves <palves@redhat.com>
10862
10863 PR gdb/22670
10864 * dwarf2read.c
10865 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
10866 Adjust to use language_get_symbol_name_matcher instead of
10867 language_defn::la_get_symbol_name_matcher.
10868 * language.c (language_get_symbol_name_matcher): If in Ada mode
10869 and the lookup name is a verbatim match, return Ada's matcher.
10870 * language.h (language_get_symbol_name_matcher): Adjust comment.
10871 (ada_lookup_name_info::verbatim_p):: New method.
10872
10873 2018-01-10 Pedro Alves <palves@redhat.com>
10874
10875 PR gdb/22670
10876 * ada-lang.c (ada_collect_symbol_completion_matches): If the
10877 minsym's language is language_auto or language_cplus, pass down
10878 language_ada instead.
10879 * symtab.c (compare_symbol_name): Don't frob symbol language here.
10880
10881 2018-01-10 Pedro Alves <palves@redhat.com>
10882
10883 PR gdb/22670
10884 * minsyms.c (linkage_name_str): New function.
10885 (iterate_over_minimal_symbols): Use it.
10886
10887 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10888
10889 * NEWS: Document that 'info proc' now works on FreeBSD.
10890
10891 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10892
10893 * configure.ac: Check for kinfo_getfile in libutil.
10894 * configure: Regenerate.
10895 * config.in: Regenerate.
10896 * fbsd-nat.c: Include "fbsd-tdep.h".
10897 (fbsd_fetch_cmdline): New.
10898 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
10899 rather than calling error.
10900 (fbsd_info_proc): New.
10901 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
10902 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
10903 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
10904
10905 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10906
10907 * fbsd-nat.c (struct free_deleter): Remove.
10908 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
10909
10910 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10911
10912 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
10913 NULL for an empty pathname.
10914
10915 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10916
10917 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
10918 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
10919 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
10920 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
10921 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
10922 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
10923 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
10924 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
10925 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
10926 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
10927 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
10928 (fbsd_core_fetch_timeval, fbsd_print_sigset)
10929 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
10930 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
10931 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
10932
10933 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
10934
10935 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
10936 (gnu_xfer_auxv): New function.
10937 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
10938 TARGET_OBJECT_AUXV.
10939
10940 2018-01-08 Yao Qi <yao.qi@linaro.org>
10941 Simon Marchi <simon.marchi@ericsson.com>
10942
10943 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
10944 common/selftest.c.
10945 (COMMON_OBS): Remove selftest.o.
10946 * configure.ac: Append selftest-arch.c and common/selftest.c to
10947 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
10948 * configure: Re-generated.
10949 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
10950 GDB_SELF_TEST.
10951 (maintenance_info_selftests): Likewise.
10952
10953 2018-01-08 Xavier Roirand <roirand@adacore.com>
10954
10955 * ada-valprint.c (val_print_packed_array_elements): Use
10956 proper number of elements when printing an array indexed
10957 by an enumeration type.
10958
10959 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10960
10961 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
10962 (dw2_get_file_names_reader): Adjust.
10963 (lookup_dwo_signatured_type): Adjust.
10964 (lookup_dwp_signatured_type): Adjust.
10965 (lookup_signatured_type): Adjust.
10966 (create_type_unit_group): Adjust.
10967 (get_type_unit_group): Adjust.
10968 (process_psymtab_comp_unit_reader): Adjust.
10969 (build_type_psymtabs_reader): Adjust.
10970 (scan_partial_symbols): Adjust.
10971 (add_partial_symbol): Adjust.
10972 (add_partial_subprogram): Adjust.
10973 (peek_die_abbrev): Adjust.
10974 (fixup_go_packaging): Adjust.
10975 (process_imported_unit_die): Adjust.
10976 (dwarf2_compute_name): Adjust.
10977 (dwarf2_physname): Adjust.
10978 (read_import_statement): Adjust.
10979 (handle_DW_AT_stmt_list): Adjust.
10980 (read_file_scope): Adjust.
10981 (read_func_scope): Adjust.
10982 (read_lexical_block_scope): Adjust.
10983 (read_call_site_scope): Adjust.
10984 (read_variable): Adjust.
10985 (dwarf2_rnglists_process): Adjust.
10986 (dwarf2_ranges_process): Adjust.
10987 (dwarf2_ranges_read): Adjust.
10988 (dwarf2_get_pc_bounds): Adjust.
10989 (dwarf2_record_block_ranges): Adjust.
10990 (dwarf2_add_field): Adjust.
10991 (dwarf2_add_member_fn): Adjust.
10992 (read_structure_type): Adjust.
10993 (process_structure_scope): Adjust.
10994 (read_enumeration_type): Adjust.
10995 (read_array_type): Adjust.
10996 (mark_common_block_symbol_computed): Adjust.
10997 (read_common_block): Adjust.
10998 (read_namespace_type): Adjust.
10999 (read_namespace): Adjust.
11000 (read_module_type): Adjust.
11001 (read_tag_pointer_type): Adjust.
11002 (read_tag_ptr_to_member_type): Adjust.
11003 (read_tag_string_type): Adjust.
11004 (read_subroutine_type): Adjust.
11005 (read_typedef): Adjust.
11006 (read_base_type): Adjust.
11007 (attr_to_dynamic_prop): Adjust.
11008 (read_subrange_type): Adjust.
11009 (read_unspecified_type): Adjust.
11010 (dwarf2_read_abbrevs): Adjust.
11011 (load_partial_dies): Adjust.
11012 (read_partial_die): Adjust.
11013 (find_partial_die): Adjust.
11014 (guess_partial_die_structure_name): Adjust.
11015 (fixup_partial_die): Adjust.
11016 (read_attribute_value): Adjust.
11017 (read_addr_index): Adjust.
11018 (read_addr_index_from_leb128): Adjust.
11019 (read_str_index): Adjust.
11020 (dwarf2_string_attr): Adjust.
11021 (get_debug_line_section): Adjust.
11022 (dwarf_decode_line_header): Adjust.
11023 (lnp_state_machine::check_line_address): Adjust.
11024 (dwarf_decode_lines_1): Adjust.
11025 (dwarf_decode_lines): Adjust.
11026 (dwarf2_start_symtab): Adjust.
11027 (var_decode_location): Adjust.
11028 (new_symbol_full): Adjust.
11029 (dwarf2_const_value_data): Adjust.
11030 (dwarf2_const_value_attr): Adjust.
11031 (dwarf2_const_value): Adjust.
11032 (die_type): Adjust.
11033 (die_containing_type): Adjust.
11034 (build_error_marker_type): Adjust.
11035 (lookup_die_type): Adjust.
11036 (guess_full_die_structure_name): Adjust.
11037 (anonymous_struct_prefix): Adjust.
11038 (determine_prefix): Adjust.
11039 (dwarf2_name): Adjust.
11040 (follow_die_ref_or_sig): Adjust.
11041 (follow_die_offset): Adjust.
11042 (follow_die_ref): Adjust.
11043 (follow_die_sig_1): Adjust.
11044 (follow_die_sig): Adjust.
11045 (get_signatured_type): Adjust.
11046 (get_DW_AT_signature_type): Adjust.
11047 (decode_locdesc): Adjust.
11048 (dwarf_decode_macros): Adjust.
11049 (cu_debug_loc_section): Adjust.
11050 (fill_in_loclist_baton): Adjust.
11051 (dwarf2_symbol_mark_computed): Adjust.
11052 (init_one_comp_unit): Don't assign
11053 dwarf2_cu::dwarf2_per_objfile.
11054 (set_die_type): Adjust.
11055
11056 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11057
11058 * dwarf2read.c (struct mapped_debug_names): Add constructor.
11059 <dwarf2_per_objfile>: New field.
11060 (dwarf2_per_objfile): Remove global.
11061 (get_dwarf2_per_objfile): New function.
11062 (set_dwarf2_per_objfile): New function.
11063 (dwarf2_build_psymtabs_hard): Change objfile parameter to
11064 dwarf2_per_objfile.
11065 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
11066 (read_abbrev_offset): Likewise.
11067 (read_indirect_string): Likewise.
11068 (read_indirect_line_string): Likewise.
11069 (read_indirect_string_at_offset): Likewise.
11070 (read_indirect_string_from_dwz): Likewise.
11071 (dwarf2_find_containing_comp_unit): Change objfile parameter to
11072 dwarf2_per_objfile.
11073 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11074 (create_all_comp_units): Change objfile parameter to
11075 dwarf2_per_objfile.
11076 (create_all_type_units): Likewise.
11077 (process_queue): Add dwarf2_per_objfile parameter.
11078 (read_and_check_comp_unit_head): Likewise.
11079 (lookup_dwo_unit_in_dwp): Likewise.
11080 (get_dwp_file): Likewise.
11081 (process_cu_includes): Likewise.
11082 (struct free_dwo_file_cleanup_data): New struct.
11083 (dwarf2_has_info): Use get_dwarf2_per_objfile and
11084 set_dwarf2_per_objfile.
11085 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
11086 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
11087 context, adjust calls.
11088 (dw2_instantiate_symtab): Likewise.
11089 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
11090 (dw2_get_cu): Likewise.
11091 (create_cu_from_index_list): Change objfile parameter to
11092 dwarf2_per_objfile.
11093 (create_cus_from_index_list): Get dwarf2_per_objfile from
11094 context, adjust calls.
11095 (create_cus_from_index): Likewise.
11096 (create_signatured_type_table_from_index): Change objfile
11097 parameter to dwarf2_per_objfile.
11098 (create_signatured_type_table_from_debug_names): Change objfile
11099 parameter to dwarf2_per_objfile.
11100 (create_addrmap_from_index): Likewise.
11101 (create_addrmap_from_aranges): Likewise.
11102 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
11103 (dw2_setup): Remove.
11104 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
11105 context.
11106 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
11107 get_dwarf2_per_objfile.
11108 (dw2_forget_cached_source_info): Likewise.
11109 (dw2_map_symtabs_matching_filename): Likewise.
11110 (struct dw2_symtab_iterator) <index>: Remove.
11111 <dwarf2_per_objfile>: New field.
11112 (dw2_symtab_iter_init): Replace index parameter with
11113 dwarf2_per_objfile.
11114 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
11115 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
11116 (dw2_print_stats): Likewise.
11117 (dw2_dump): Likewise.
11118 (dw2_expand_symtabs_for_function): Likewise.
11119 (dw2_expand_all_symtabs): Likewise.
11120 (dw2_expand_symtabs_with_fullname): Likewise.
11121 (dw2_expand_marked_cus): Replace index and objfile parameters
11122 with dwarf2_per_objfile.
11123 (dw_expand_symtabs_matching_file_matcher): Add
11124 dwarf2_per_objfile parameter and adjust calls.
11125 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
11126 adjust calls.
11127 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
11128 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
11129 adjust calls.
11130 (create_cus_from_debug_names_list): Replace objfile parameter
11131 with dwarf2_per_objfile and adjust calls.
11132 (create_cus_from_debug_names): Likewise.
11133 (dwarf2_read_debug_names): Likewise.
11134 (mapped_debug_names::namei_to_name): Adjust call.
11135 (dw2_debug_names_iterator::next): Likewise.
11136 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
11137 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
11138 (dw2_debug_names_dump): Likewise.
11139 (dw2_debug_names_expand_symtabs_for_function): Likewise.
11140 (dw2_debug_names_expand_symtabs_matching): Likewise.
11141 (dwarf2_initialize_objfile): Likewise.
11142 (dwarf2_build_psymtabs): Likewise.
11143 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
11144 this_cu.
11145 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
11146 (read_and_check_comp_unit_head): Likewise.
11147 (read_abbrev_offset): Likewise.
11148 (create_debug_type_hash_table): Likewise.
11149 (create_debug_types_hash_table): Likewise.
11150 (create_all_type_units): Replace objfile parameter with
11151 dwarf2_per_objfile.
11152 (add_type_unit): Add dwarf2_per_objfile parameter.
11153 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
11154 with dwarf2_per_objfile.
11155 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
11156 (lookup_dwp_signatured_type): Likewise.
11157 (lookup_signatured_type): Likewise.
11158 (read_cutu_die_from_dwo): Likewise.
11159 (init_tu_and_read_dwo_dies): Likewise.
11160 (init_cutu_and_read_dies): Likewise.
11161 (init_cutu_and_read_dies_no_follow): Likewise.
11162 (allocate_type_unit_groups_table): Add objfile parameter.
11163 (create_type_unit_group): Use dwarf2_per_objfile from cu.
11164 (get_type_unit_group): Likewise.
11165 (process_psymtab_comp_unit): Update call.
11166 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
11167 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
11168 (print_tu_stats): Likewise.
11169 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
11170 in void* parameter.
11171 (build_type_psymtabs): Change objfile parameter to
11172 dwarf2_per_objfile.
11173 (process_skeletonless_type_unit): Use dwarf2_per_objfile
11174 passed in void* parameter.
11175 (process_skeletonless_type_units): Change objfile parameter to
11176 dwarf2_per_objfile.
11177 (set_partial_user): Likewise.
11178 (dwarf2_build_psymtabs_hard): Likewise.
11179 (read_comp_units_from_section): Likewise.
11180 (create_all_comp_units): Likewise.
11181 (scan_partial_symbols): Update calls.
11182 (add_partial_symbol): Likewise.
11183 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
11184 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
11185 (process_queue): Add dwarf2_per_objfile parameter.
11186 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
11187 (compute_compunit_symtab_includes): Likewise.
11188 (process_cu_includes): Add dwarf2_per_objfile parameter.
11189 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
11190 (process_full_type_unit): Likewise.
11191 (process_imported_unit_die): Update call.
11192 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
11193 (read_file_scope): Likewise.
11194 (allocate_dwo_file_hash_table): Add objfile parameter.
11195 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
11196 (create_cus_hash_table): Likewise.
11197 (create_dwp_hash_table): Likewise.
11198 (create_dwo_unit_in_dwp_v1): Likewise.
11199 (create_dwp_v2_section): Likewise.
11200 (create_dwo_unit_in_dwp_v2): Likewise.
11201 (lookup_dwo_unit_in_dwp): Likewise.
11202 (try_open_dwop_file): Likewise.
11203 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
11204 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
11205 cleanup to include a reference to dwarf2_per_objfile.
11206 (open_dwp_file): Add dwarf2_per_objfile parameter.
11207 (open_and_init_dwp_file): Likewise.
11208 (get_dwp_file): Likewise.
11209 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
11210 (queue_and_load_all_dwo_tus): Update call.
11211 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
11212 data.
11213 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
11214 (dwarf2_ranges_process): Likewise.
11215 (dwarf2_get_pc_bounds): Likewise.
11216 (mark_common_block_symbol_computed): Likewise.
11217 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
11218 (dwarf2_read_abbrevs): Update call.
11219 (read_partial_die): Use dwarf2_per_objfile from cu.
11220 (find_partial_die): Likewise.
11221 (fixup_partial_die): Likewise.
11222 (read_attribute_value): Likewise.
11223 (read_indirect_string_at_offset_from): Add objfile parameter.
11224 (read_indirect_string_at_offset): Add dwarf2_per_objfile
11225 parameter.
11226 (read_indirect_string_from_dwz): Add objfile parameter.
11227 (read_indirect_string): Add objfile parameter.
11228 (read_addr_index_1): Add dwarf2_per_objfile parameter.
11229 (read_addr_index): Use dwarf2_per_objfile from cu.
11230 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
11231 call dw2_setup.
11232 (read_str_index): Use dwarf2_per_objfile from cu.
11233 (get_debug_line_section): Likewise.
11234 (read_formatted_entries): Add dwarf2_per_objfile parameter.
11235 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
11236 (new_symbol_full): Use dwarf2_per_objfile from cu.
11237 (build_error_marker_type): Likewise.
11238 (lookup_die_type): Likewise.
11239 (determine_prefix): Likewise.
11240 (follow_die_offset): Likewise.
11241 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
11242 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
11243 (dwarf2_fetch_die_type_sect_off): Likewise.
11244 (dwarf2_get_die_type): Likewise.
11245 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
11246 (get_signatured_type): Likewise.
11247 (get_DW_AT_signature_type): Likewise.
11248 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
11249 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
11250 (cu_debug_loc_section): Likewise.
11251 (fill_in_loclist_baton): Likewise.
11252 (dwarf2_symbol_mark_computed): Likewise.
11253 (dwarf2_find_containing_comp_unit): Change objfile parameter to
11254 dwarf2_per_objfile.
11255 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
11256 parameter.
11257 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11258 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
11259 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
11260 (set_die_type): Use dwarf2_free_objfile from cu.
11261 (get_die_type_at_offset): Likewise.
11262 (dwarf2_per_objfile_free): Don't assign global variable.
11263 (debug_names) <constructor>: Add dwarf2_per_objfile
11264 parameter, update m_debugstrlookup construction.
11265 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
11266 parameter.
11267 <m_dwarf2_per_objfile>: New field.
11268 <lookup>: Use m_dwarf2_per_objfile.
11269 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
11270 (psyms_seen_size): Likewise.
11271 (write_gdbindex): Replace objfile parameter with
11272 dwarf2_per_objfile.
11273 (write_debug_names): Likewise.
11274 (write_psymtabs_to_index): Likewise.
11275 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
11276 calls.
11277
11278 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11279
11280 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
11281 <dwarf2_per_objfile>: New field.
11282 (struct dwarf2_per_cu_data) <objfile>: Remove.
11283 <dwarf2_per_objfile>: New field.
11284 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
11285 of objfile.
11286 (create_signatured_type_table_from_index): Likewise.
11287 (create_debug_type_hash_table): Likewise.
11288 (fill_in_sig_entry_from_dwo_entry): Likewise.
11289 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
11290 (create_type_unit_group): Assign dwarf2_per_objfile instead of
11291 objfile.
11292 (create_partial_symtab): Access objfile through
11293 dwarf2_per_objfile.
11294 (process_psymtab_comp_unit_reader): Likewise.
11295 (read_comp_units_from_section): Likewise.
11296 (scan_partial_symbols): Likewise.
11297 (add_partial_symbol): Likewise.
11298 (add_partial_subprogram): Likewise.
11299 (peek_die_abbrev): Likewise.
11300 (fixup_go_packaging): Likewise.
11301 (process_full_comp_unit): Likewise.
11302 (process_full_type_unit): Likewise.
11303 (process_imported_unit_die): Likewise.
11304 (dwarf2_compute_name): Likewise.
11305 (dwarf2_physname): Likewise.
11306 (read_import_statement): Likewise.
11307 (create_cus_hash_table): Assign dwarf2_physname instead of
11308 objfile.
11309 (read_func_scope): Access objfile through dwarf2_per_objfile.
11310 (read_lexical_block_scope): Likewise.
11311 (read_call_site_scope): Likewise.
11312 (read_variable): Likewise.
11313 (dwarf2_rnglists_process): Likewise.
11314 (dwarf2_ranges_process): Likewise.
11315 (dwarf2_ranges_read): Likewise.
11316 (dwarf2_record_block_ranges): Likewise.
11317 (dwarf2_add_field): Likewise.
11318 (dwarf2_add_member_fn): Likewise.
11319 (read_structure_type): Likewise.
11320 (process_structure_scope): Likewise.
11321 (read_enumeration_type): Likewise.
11322 (read_array_type): Likewise.
11323 (read_common_block): Likewise.
11324 (read_namespace_type): Likewise.
11325 (read_namespace): Likewise.
11326 (read_module_type): Likewise.
11327 (read_tag_pointer_type): Likewise.
11328 (read_tag_ptr_to_member_type): Likewise.
11329 (read_tag_string_type): Likewise.
11330 (read_subroutine_type): Likewise.
11331 (read_typedef): Likewise.
11332 (read_base_type): Likewise.
11333 (attr_to_dynamic_prop): Likewise.
11334 (read_subrange_type): Likewise.
11335 (read_unspecified_type): Likewise.
11336 (load_partial_dies): Likewise.
11337 (read_partial_die): Likewise.
11338 (find_partial_die): Likewise.
11339 (guess_partial_die_structure_name): Likewise.
11340 (fixup_partial_die): Likewise.
11341 (read_attribute_value): Likewise.
11342 (read_addr_index_from_leb128): Likewise.
11343 (dwarf2_read_addr_index): Likewise.
11344 (dwarf2_string_attr): Likewise.
11345 (lnp_state_machine::check_line_address): Likewise.
11346 (dwarf_decode_lines_1): Likewise.
11347 (dwarf_decode_lines): Likewise.
11348 (dwarf2_start_symtab): Likewise.
11349 (var_decode_location): Likewise.
11350 (new_symbol_full): Likewise.
11351 (dwarf2_const_value_data): Likewise.
11352 (dwarf2_const_value_attr): Likewise.
11353 (dwarf2_const_value): Likewise.
11354 (die_type): Likewise.
11355 (die_containing_type): Likewise.
11356 (lookup_die_type): Likewise.
11357 (guess_full_die_structure_name): Likewise.
11358 (anonymous_struct_prefix): Likewise.
11359 (dwarf2_name): Likewise.
11360 (follow_die_ref_or_sig): Likewise.
11361 (follow_die_offset): Likewise.
11362 (follow_die_ref): Likewise.
11363 (dwarf2_fetch_die_loc_sect_off): Likewise.
11364 (dwarf2_fetch_constant_bytes): Likewise.
11365 (dwarf2_fetch_die_type_sect_off): Likewise.
11366 (dwarf2_get_die_type): Likewise.
11367 (follow_die_sig): Likewise.
11368 (decode_locdesc): Likewise.
11369 (dwarf2_per_cu_objfile): Likewise.
11370 (dwarf2_per_cu_text_offset): Likewise.
11371 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
11372 objfile.
11373 (set_die_type): Access objfile through
11374 dwarf2_per_objfile.
11375
11376 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11377
11378 * valprint.c (converted_character_d): Remove typedef.
11379 (DEF_VEC_O (converted_character_d)): Remove.
11380 (count_next_character): Use std::vector.
11381 (print_converted_chars_to_obstack): Likewise.
11382 (generic_printstr): Likewise.
11383
11384 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11385
11386 * xml-support.h (struct gdb_xml_value): Add constructor.
11387 <value>: Change type to unique_xmalloc_ptr.
11388 (gdb_xml_value_s): Remove typedef.
11389 (DEF_VEC_O (gdb_xml_value_s)): Remove.
11390 (gdb_xml_element_start_handler): Change parameter type to
11391 std::vector.
11392 (xml_find_attribute): Likewise.
11393 * xml-support.c (xml_find_attribute): Change parameter type to
11394 std::vector and adjust.
11395 (gdb_xml_values_cleanup): Remove.
11396 (gdb_xml_parser::start_element): Adjust to std::vector.
11397 (xinclude_start_include): Change paraeter type to std::vector
11398 and adjust.
11399 * btrace.c (check_xml_btrace_version): Likewise.
11400 (parse_xml_btrace_block): Likewise.
11401 (parse_xml_btrace_pt_config_cpu): Likewise.
11402 (parse_xml_btrace_pt): Likewise.
11403 (parse_xml_btrace_conf_bts): Likewise.
11404 (parse_xml_btrace_conf_pt): Likewise.
11405 * memory-map.c (memory_map_start_memory): Likewise.
11406 (memory_map_start_property): Likewise.
11407 * osdata.c (osdata_start_osdata): Likewise.
11408 (osdata_start_item): Likewise.
11409 (osdata_start_column): Likewise.
11410 * remote.c (start_thread): Likewise.
11411 * solib-aix.c (library_list_start_library): Likewise.
11412 (library_list_start_list): Likewise.
11413 * solib-svr4.c (library_list_start_library): Likewise.
11414 (svr4_library_list_start_list): Likewise.
11415 * solib-target.c (library_list_start_segment): Likewise.
11416 (library_list_start_section): Likewise.
11417 (library_list_start_library): Likewise.
11418 (library_list_start_list): Likewise.
11419 * tracepoint.c (traceframe_info_start_memory): Likewise.
11420 (traceframe_info_start_tvar): Likewise.
11421 * xml-syscall.c (syscall_start_syscall): Likewise.
11422 * xml-tdesc.c (tdesc_start_target): Likewise.
11423 (tdesc_start_feature): Likewise.
11424 (tdesc_start_reg): Likewise.
11425 (tdesc_start_union): Likewise.
11426 (tdesc_start_struct): Likewise.
11427 (tdesc_start_flags): Likewise.
11428 (tdesc_start_enum): Likewise.
11429 (tdesc_start_field): Likewise.
11430 (tdesc_start_enum_value): Likewise.
11431 (tdesc_start_vector): Likewise.
11432
11433 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11434
11435 * extension.h (struct xmethod_worker) <clone>: Remove.
11436 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
11437 Remove.
11438 (python_xmethod_worker::clone): Remove.
11439 * valops.c (find_overload_match): Use std::move instead of
11440 clone.
11441
11442 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11443
11444 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
11445 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
11446 <free_xmethod_worker_data>: Remove.
11447 <get_matching_xmethod_workers>: Chance VEC to std::vector.
11448 <get_xmethod_arg_types>: Remove.
11449 <get_xmethod_result_type>: Remove.
11450 <invoke_xmethod>: Remove.
11451 * extension.c (new_xmethod_worker): Remove.
11452 (clone_xmethod_worker): Remove.
11453 (get_matching_xmethod_workers): Return void, pass std::vector by
11454 pointer.
11455 (get_xmethod_arg_types): Rename to...
11456 (xmethod_worker::get_arg_types): ... this, and adjust.
11457 (get_xmethod_result_type): Rename to...
11458 (xmethod_worker::get_result_type): ... this, and adjust.
11459 (invoke_xmethod): Remove.
11460 (free_xmethod_worker): Remove.
11461 (free_xmethod_worker_vec): Remove.
11462 * extension.h (enum ext_lang_rc): Move here from
11463 extension-priv.h.
11464 (struct xmethod_worker): Add constructor and destructor.
11465 <data>: Remove.
11466 <value>: Remove.
11467 <invoke, clone, do_get_result_type, do_get_arg_types>: New
11468 virtual pure methods.
11469 <get_arg_types, get_result_type>: New methods.
11470 (xmethod_worker_ptr): Remove typedef.
11471 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
11472 (xmethod_worker_vec): Remove typedef.
11473 (xmethod_worker_up): New typedef.
11474 (invoke_xmethod): Remove.
11475 (clone_xmethod_worker): Remove.
11476 (free_xmethod_worker): Remove.
11477 (free_xmethod_worker_vec): Remove.
11478 (get_xmethod_arg_types): Remove.
11479 (get_xmethod_result_type): Remove.
11480 * valops.c (find_method_list): Use std::vector, don't use
11481 intermediate vector.
11482 (value_find_oload_method_list): Use std::vector.
11483 (find_overload_match): Use std::vector.
11484 (find_oload_champ): Use std::vector.
11485 * value.c (value_free): Use operator delete.
11486 (value_of_xmethod): Rename to...
11487 (value_from_xmethod): ... this. Don't assign
11488 xmethod_worker::value, take rvalue-reference.
11489 (result_type_of_xmethod): Adjust.
11490 (call_xmethod): Adjust.
11491 * value.h: Include extension.h.
11492 (struct xmethod_worker): Don't forward-declare.
11493 (value_of_xmethod): Rename to...
11494 (value_from_xmethod): ... this, take rvalue-reference.
11495 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
11496 (struct python_xmethod_worker): ... this, add constructor and
11497 destructor.
11498 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
11499 (gdbpy_free_xmethod_worker_data): Rename to...
11500 (python_xmethod_worker::~python_xmethod_worker): ... this and
11501 adjust.
11502 (gdbpy_clone_xmethod_worker_data): Rename to...
11503 (python_xmethod_worker::clone): ... this and adjust.
11504 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
11505 temporary vector.
11506 (gdbpy_get_xmethod_arg_types): Rename to...
11507 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
11508 (gdbpy_get_xmethod_result_type): Rename to...
11509 (python_xmethod_worker::do_get_result_type): ... this and
11510 adjust.
11511 (gdbpy_invoke_xmethod): Rename to...
11512 (python_xmethod_worker::invoke): ... this and adjust.
11513 (new_python_xmethod_worker): Rename to...
11514 (python_xmethod_worker::python_xmethod_worker): ... this and
11515 adjust.
11516 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
11517 Remove.
11518 (gdbpy_free_xmethod_worker_data): Remove.
11519 (gdbpy_get_matching_xmethod_workers): Use std::vector.
11520 (gdbpy_get_xmethod_arg_types): Remove.
11521 (gdbpy_get_xmethod_result_type): Remove.
11522 (gdbpy_invoke_xmethod): Remove.
11523 * python/python.c (python_extension_ops): Remove obsolete
11524 callbacks.
11525
11526 2018-01-05 Pedro Alves <palves@redhat.com>
11527
11528 PR gdb/18653
11529 * common/signals-state-save-restore.c
11530 (save_original_signals_state): New parameter 'quiet'. Warn if we
11531 find a custom handler preinstalled, instead of internal erroring.
11532 But only warn if !quiet.
11533 * common/signals-state-save-restore.h
11534 (save_original_signals_state): New parameter 'quiet'.
11535 * main.c (captured_main_1): Move save_original_signals_state call
11536 after option handling, and pass QUIET.
11537
11538 2018-01-05 Pedro Alves <palves@redhat.com>
11539
11540 * spu-tdep.c (spu_catch_start): Pass
11541 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
11542
11543 2018-01-05 Pedro Alves <palves@redhat.com>
11544
11545 PR gdb/22670
11546 * ada-lang.c (literal_symbol_name_matcher): New function.
11547 (ada_get_symbol_name_matcher): Use it for
11548 symbol_name_match_type::SEARCH_NAME.
11549 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
11550 it down instead of assuming symbol_name_match_type::FULL.
11551 * block.h (block_lookup_symbol): New parameter 'match_type'.
11552 * c-valprint.c (print_unpacked_pointer): Use
11553 lookup_symbol_search_name instead of lookup_symbol.
11554 * compile/compile-object-load.c (get_out_value_type): Pass down
11555 symbol_name_match_type::SEARCH_NAME.
11556 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
11557 symbol_name_match_type::FULL.
11558 * cp-support.c (cp_get_symbol_name_matcher): Handle
11559 symbol_name_match_type::SEARCH_NAME.
11560 * infrun.c (insert_exception_resume_breakpoint): Use
11561 lookup_symbol_search_name.
11562 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
11563 * psymtab.c (maintenance_check_psymtabs): Use
11564 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
11565 * stack.c (print_frame_args): Use lookup_symbol_search_name and
11566 SYMBOL_SEARCH_NAME.
11567 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
11568 if symbol_name_match_type::SEARCH_NAME.
11569 (lookup_symbol_in_language): Pass down
11570 symbol_name_match_type::FULL.
11571 (lookup_symbol_search_name): New.
11572 (lookup_language_this): Pass down
11573 symbol_name_match_type::SEARCH_NAME.
11574 (lookup_symbol_aux, lookup_local_symbol): New parameter
11575 'match_type'. Pass it down.
11576 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
11577 (lookup_symbol_search_name): New declaration.
11578 (lookup_symbol_in_block): New 'match_type' parameter.
11579
11580 2018-01-05 Pedro Alves <palves@redhat.com>
11581
11582 PR gdb/22670
11583 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
11584 ada_lookup_symbol.
11585 (ada_lookup_symbol): Reimplement in terms of
11586 ada_lookup_symbol_list, bits factored out from
11587 ada_lookup_encoded_symbol.
11588
11589 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11590
11591 * ada-exp.y (write_object_renaming): When subscripting an array
11592 using a symbol as the index, pass the block in call to
11593 ada_lookup_encoded_symbol when looking that symbol up.
11594
11595 2018-01-05 Jerome Guitton <guitton@adacore.com>
11596
11597 * ada-lang.c (ada_array_length): Use ada_index_type instead of
11598 TYPE_INDEX_TYPE.
11599
11600 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11601
11602 * ada-lang.c (ada_to_fixed_value_create): Add handling of
11603 the case where VALUE_LVAL (val0) is not lval_memory.
11604
11605 2018-01-05 Xavier Roirand <roirand@adacore.com>
11606
11607 * ada-valprint.c (print_optional_low_bound): Handle
11608 character-indexed array printing like boolean-indexed array
11609 printing.
11610
11611 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11612
11613 * NEWS: Create a new section for the next release branch.
11614 Rename the section of the current branch, now that it has
11615 been cut.
11616
11617 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11618
11619 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
11620 * version.in: Bump version to 8.1.50.DATE-git.
11621
11622 2018-01-03 Xavier Roirand <roirand@adacore.com>
11623
11624 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
11625 Add field.
11626 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
11627 Add field.
11628 (default_exception_support_info) <catch_handlers_sym>: Add field.
11629 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
11630 (ada_exception_name_addr_1): Add "catch handlers" handling.
11631 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
11632 Update all callers.
11633 (create_excep_cond_exprs) <ex>: Add parameter.
11634 (re_set_exception): Update create_excep_cond_exprs call.
11635 (print_it_exception, print_one_exception, print_mention_exception)
11636 (print_recreate_exception): Add "catch handler" handling.
11637 (allocate_location_catch_handlers, re_set_catch_handlers)
11638 (check_status_catch_handlers, print_it_catch_handlers)
11639 (print_one_catch_handlers, print_mention_catch_handlers)
11640 (print_recreate_catch_handlers): New function.
11641 (catch_handlers_breakpoint_ops): New variable.
11642 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
11643 Add parameter. Add "catch handler" handling.
11644 (ada_exception_sym_name, ada_exception_breakpoint_ops):
11645 Add "catch handler" handling.
11646 (ada_exception_catchpoint_cond_string): Add "catch handler"
11647 handling.
11648 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
11649 call.
11650 (catch_ada_handlers_command): New function.
11651 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
11652 operations structure.
11653 (_initialize_ada_language): Add "catch handlers" command entry.
11654 * NEWS: Document "catch handlers" feature.
11655
11656 2018-01-02 Joel Brobecker <brobecker@adacore.com>
11657
11658 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
11659 account when creating the array type of the slice.
11660 (ada_value_slice): Likewise.
11661
11662 2018-01-02 Joel Brobecker <brobecker@adacore.com>
11663
11664 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
11665 New enum value.
11666 (create_array_type_with_stride): Add byte_stride_prop parameter.
11667 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
11668 New parameter. Update all callers in this file.
11669 (array_type_has_dynamic_stride): New function.
11670 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
11671 of arrays with dynamic byte strides.
11672 * dwarf2read.c (read_array_type): Add support for dynamic
11673 DW_AT_byte_stride attributes.
11674
11675 2018-01-02 Joel Brobecker <brobecker@adacore.com>
11676
11677 * dwarf2read.c (read_unspecified_type): Treat
11678 DW_TAG_enumeration_type DIEs from Ada units as stubs.
11679
11680 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11681
11682 Update copyright year range in all GDB files.
11683
11684 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11685
11686 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
11687 and gdb/testsuite/gdb.base/step-line.c.
11688
11689 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11690
11691 * copyright.py (main): Dump the contents of
11692 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
11693 even if BY_HAND is empty.
11694
11695 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11696
11697 * top.c (print_gdb_version): Update Copyright year in version
11698 message.
11699
11700 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11701
11702 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
11703
11704 For older changes see ChangeLog-2017.
11705 \f
11706 Local Variables:
11707 mode: change-log
11708 left-margin: 8
11709 fill-column: 74
11710 version-control: never
11711 coding: utf-8
11712 End:
This page took 0.304179 seconds and 4 git commands to generate.