Fix handling of undocumented SLL instruction for the Z80 target.
[binutils-gdb.git] / gdb / ChangeLog
1 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
2
3 PR gdb/17816
4 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
5 operator.
6
7 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
8
9 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
10
11 2018-08-19 Michael Spang <spang@google.com>
12
13 PR gdb/11786
14 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
15 for PT_TLS segments.
16
17 2018-08-18 Kevin Buettner <kevinb@redhat.com>
18
19 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
20 dwarf_variable_value.
21 * dwarf2-frame.c (class dwarf_expr_executor):
22 Add override for dwarf_variable_value.
23 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
24 (class symbol_needs_eval_context): Likewise.
25 (indirect_synthetic_pointer): Add forward declaration.
26 (sect_variable_value): New function.
27 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
28 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
29 for DW_OP_GNU_variable_value.
30
31 2018-08-16 Tom Tromey <tom@tromey.com>
32
33 * top.c (read_command_file): Update.
34 (command_line_input): Remove "repeat" argument.
35 * ada-lang.c (get_selections): Update.
36 * linespec.c (decode_line_2): Update.
37 * defs.h (command_line_input): Remove argument.
38 * cli/cli-script.c (read_next_line): Update.
39 * python/py-gdb-readline.c: Update.
40
41 2018-08-17 Tom Tromey <tom@tromey.com>
42
43 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
44 command_line_input.
45
46 2018-08-15 Tom Tromey <tom@tromey.com>
47
48 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
49
50 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
51
52 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
53 If used, use find_pc_partial_function to find address range
54 to disassemble.
55 * mi/mi-main.c (mi_cmd_list_features): Report
56 "data-disassemble-a-option" feature.
57 * NEWS: Mention new -data-disassemble option -a.
58
59 2018-08-13 Tom Tromey <tom@tromey.com>
60
61 * common/common-defs.h (_FORTIFY_SOURCE): Define.
62
63 2018-08-13 Alan Hayward <alan.hayward@arm.com>
64
65 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
66 (aarch64_linux_collect_sve_regset): Likewise.
67 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
68 * regcache.h (regcache_map_entry_size): New function.
69
70 2018-08-13 Alan Hayward <alan.hayward@arm.com>
71
72 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
73 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
74 (SVE_HEADER_VL_LENGTH): Likewise.
75 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
76 (SVE_HEADER_FLAGS_LENGTH): Likewise.
77 (SVE_HEADER_RESERVED_LENGTH): Likewise.
78 (SVE_HEADER_SIZE_OFFSET): Likewise.
79 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
80 (SVE_HEADER_VL_OFFSET): Likewise.
81 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
82 (SVE_HEADER_FLAGS_OFFSET): Likewise.
83 (SVE_HEADER_RESERVED_OFFSET): Likewise.
84 (SVE_HEADER_SIZE): Likewise.
85 (aarch64_linux_core_read_vq): Add function.
86 (aarch64_linux_core_read_description): Check for SVE section.
87
88 2018-08-13 Alan Hayward <alan.hayward@arm.com>
89
90 * aarch64-fbsd-tdep.c
91 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
92 collect_size.
93 * aarch64-linux-tdep.c
94 (aarch64_linux_iterate_over_regset_sections): Likewise.
95 * alpha-linux-tdep.c
96 (alpha_linux_iterate_over_regset_sections):
97 * alpha-nbsd-tdep.c
98 (alphanbsd_iterate_over_regset_sections): Likewise.
99 * amd64-fbsd-tdep.c
100 (amd64fbsd_iterate_over_regset_sections): Likewise.
101 * amd64-linux-tdep.c
102 (amd64_linux_iterate_over_regset_sections): Likewise.
103 * arm-bsd-tdep.c
104 (armbsd_iterate_over_regset_sections): Likewise.
105 * arm-fbsd-tdep.c
106 (arm_fbsd_iterate_over_regset_sections): Likewise.
107 * arm-linux-tdep.c
108 (arm_linux_iterate_over_regset_sections): Likewise.
109 * corelow.c (get_core_registers_cb): Likewise.
110 (core_target::fetch_registers): Likewise.
111 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
112 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
113 * gdbarch.h (void): Regenerate.
114 * gdbarch.sh: Add supply_size and collect_size.
115 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
116 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
117 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
118 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
119 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
120 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
121 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
122 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
123 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
124 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
125 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
126 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
127 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
128 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
129 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
130 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
131 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
132 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
133 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
134 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
135 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
136 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
137 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
138 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
139 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
140 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
141 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
142 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
143 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
144 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
145
146 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
147
148 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
149 with string_printf.
150
151 2018-08-10 Keith Seitz <keiths@redhat.com>
152
153 * compile/compile-c-support.c (add_code_header, add_code_footer):
154 Move into policy class.
155 (c_push_user_expression, pop_user_expression_nop)
156 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
157 (compile_program): New host class.
158 (c_compile_program): New typedef.
159 (c_compute_porgram): Use c_compile_program.
160
161 2018-08-10 Keith Seitz <keiths@redhat.com>
162
163 * compile/compile-internal.h (compile_instance::~compile_instance):
164 Remove calls to htab_delete.
165 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
166 * compile.c (compile_instance::compile_instance): Initialize
167 htab unique pointers.
168 (compile_instance::get_cached_type, compile_instance::insert_type)
169 (compile_instance::error_symbol_once): Update for unique_ptr.
170
171 2018-08-10 Keith Seitz <keiths@redhat.com>
172
173 * compile/compile-c-symbols.c (struct symbol_error)
174 (hash_symbol_error, eq_symbol_error, del_symbol_error)
175 (compile_instance::insert_symbol_error)
176 (compile_instance::error_symbol_once): Move to ...
177 * compile/compile.c: ... here.
178
179 2018-08-10 Keith Seitz <keiths@redhat.com>
180
181 * compile/compile-c-support.c (c_get_compile_context): Use `new'
182 instead of `new_compile_instance'.
183 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
184 Update description.
185 If the symbol error map is not initialized, create it.
186 (generate_c_for_for_one_symbol): Do not check/initialize
187 the symbol error map.
188 * compile/compile-c-types.c (compile_c_instance): Make a class.
189 Update all callers.
190 (compile_instance::compile_instance): Initialize the type cache.
191 (get_cached_type): New function.
192 (insert_type): Update description.
193 (compile_c_instance::m_default_cflags): Define.
194 (convert_type): Update description. Use get_cached_type.
195 (delete_instance): Moved to destructor.
196 (new_compile_instance): Moved to constructor.
197 * compile/compile-c.h (compile_c_instance): Make class inheriting
198 from compile_instance.
199 <base>: Remove field.
200 <type_map, symbol_err_map>: Move to base class.
201 <c_plugin>: Rename to `m_plugin' and remove pointer type.
202 * compile/compile-internal.h (compile_instance): Make class.
203 <type_map_t, symbol_err_map_t>: Define.
204 <fe>: Rename to `m_gcc_fe'.
205 <scope, block, gcc_target_options>: Add `m_' prefix.
206 <m_type_map, m_symbol_err_map>: New fields, moved from
207 compile_c_instance.
208 <destroy>: Remove.
209 (convert_type, new_compile_instance): Remove.
210 * compile/compile.c (cleanup_compile_instance): Remove.
211 (compile_to_object): Use unique_ptr to eliminate cleanups.
212 (compile_instance::set_print_callback, compile_instance::version)
213 (compile_instance::set_verbose)
214 (compile_instance::set_driver_filename)
215 (compile_instance::set_triplet_regexp)
216 (compile_instance::set_arguments)
217 (compile_instance::set_source_file)
218 (compile_instance::compile): Define.
219
220 2018-08-10 Keith Seitz <keiths@redhat.com>
221
222 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
223 * compile/compile-c-types.c: Define GCC_METHODN macros and include
224 gcc-c-fe.def to define C plugin.
225 (delete_instance): Delete `c_plugin'.
226 (new_compile_instance): Initialize `c_plugin'.
227 * compile/compile-c.h: Include gcc_c_plugin.h.
228 (struct compile_c_instance) <c_plugin>: New member.
229 * gcc-c-plugin.h: New file.
230 Update all callers with API change.
231
232 2018-08-10 Keith Seitz <keiths@redhat.com>
233
234 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
235 (HFILES_NO_SRCDIR): ... to here.
236 Add compile-internal.h and compile-c.h.
237 * compile/compile-c-support.c: Include compile-c.h.
238 * compile/compile-c-symbols.c: Include compile-c.h.
239 (generate_c_for_variable_locations): Update comment.
240 * compile/compile-c-types.c: Include compile-c.h.
241 * compile/compile-c.h: New file -- moved C language declarations
242 from other files here.
243 * compile/compile-internal.h: Do not include hashtab.h or
244 common/enum-flags.h.
245 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
246 (gcc_convert_symbol, gcc_symbol_address)
247 (generate_c_for_variable_locations, c_get_mode_for_size)
248 (c_get_range_decl_name): Definitions moved to compile-c.h.
249 * compile/compile-loc2c.c: Include compile-c.h.
250
251 2018-08-10 Keith Seitz <keiths@redhat.com>
252
253 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
254 (c_symbol_substitution_name): ... this.
255 Update all callers.
256
257 2018-08-10 Keith Seitz <keiths@redhat.com>
258
259 * compile/compile-c-support.c (c_compute_program): Use
260 unique_xmalloc_ptr to eliminate cleanup.
261 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
262 Return a unique_xmalloc_ptr and eliminate cleanup.
263 * compile/compile-internal.h (generate_c_for_variable_locations):
264 Return unique_xmalloc_ptr and update description.
265
266 2018-08-10 Alan Hayward <alan.hayward@arm.com>
267
268 * corelow.c (core_target::get_core_register_section): Rename
269 min_size to section_min_size.
270
271 2018-08-09 Jim Wilson <jimw@sifive.com>
272
273 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
274 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
275 * NEWS: Mention new GNU/Linux RISC-V target.
276 * configure.host: Add riscv*-*-linux*.
277 * configure.nat: Add riscv*.
278 * configure.tgt: Add riscv*-*-linux*.
279 * riscv-linux-nat.c: New file.
280 * riscv-linux-tdep.c: New file.
281
282 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
283
284 * infrun.c (resume): Make static, add forward declaration.
285 (proceed): Update header comment.
286 * infrun.h (resume): Delete declaration.
287
288 2018-08-09 Tom Tromey <tom@tromey.com>
289
290 * riscv-tdep.h: Minor formatting fixes.
291
292 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
293
294 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
295 * dwarf-index-cache.c (create_dir_and_check): Likewise.
296 (test_mkdir_recursive): Likewise.
297 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
298
299 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
300
301 * valarith.c (value_subscripted_rvalue): If an array is not in
302 memory, and we don't know the upper bound, then we can't know that
303 the requested element exists or not.
304
305 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
306
307 * target.c (str_comma_list_concat_elem): Fix typo in comment.
308 (target_options_to_string): Add comment.
309
310 2018-08-08 Tom Tromey <tom@tromey.com>
311
312 * unittests/scoped_mmap-selftests.c: Check result of "write".
313
314 2018-08-08 Jim Wilson <jimw@sifive.com>
315
316 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
317 (decode_register_index_short): New.
318 (decode_j_type_insn, decode_cj_type_insn): New.
319 (decode_b_type_insn, decode_cb_type_insn): New.
320 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
321 local xlen. Check xlen when decoding ambiguous compressed insns. In
322 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
323 is_c_sw_insn instead of is_sw_insn.
324 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
325 (riscv_software_single_step): New.
326 * riscv-tdep.h (riscv_software_single_step): Declare.
327
328 * riscv-tdep.c (riscv_isa_xlen): Drop static.
329 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
330
331 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
332
333 PR gdb/18050:
334 * target.c (dispose_inferior): Don't dispose of inferiors that are
335 already killed.
336
337 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
338
339 * remote.c (remote_target::download_tracepoint): Change char* to
340 const char*.
341
342 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
343
344 * target.h (target_options_to_string): Return an std::string.
345 * target.c (str_comma_list_concat_elem): Return void, use
346 std::string.
347 (do_option): Likewise.
348 (target_options_to_string): Return an std::string.
349 * linux-nat.c (linux_nat_target::wait): Adjust.
350 * target-debug.h (target_debug_print_options): Adjust.
351
352 2018-08-07 Tom Tromey <tom@tromey.com>
353
354 * Makefile.in (CPPFLAGS): New variable.
355 (INTERNAL_CPPFLAGS): Use it.
356
357 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
358
359 * NEWS: Mention the index cache.
360
361 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
362
363 * common/pathstuff.h (get_standard_cache_dir): New.
364 * common/pathstuff.c (get_standard_cache_dir): New.
365 * build-id.h (build_id_to_string): New.
366 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
367 DEBUG_STR_SUFFIX): Move to here.
368 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
369 DEBUG_STR_SUFFIX): Move from there.
370 (write_psymtabs_to_index): Make non-static, add basename
371 parameter. Write to temporary files, rename when done.
372 (save_gdb_index_command): Adjust call to
373 write_psymtabs_to_index.
374 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
375 field.
376 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
377 (get_gdb_index_contents_from_cache): New.
378 (get_gdb_index_contents_from_cache_dwz): New.
379 (dwarf2_initialize_objfile): Read index from cache.
380 (dwarf2_build_psymtabs): Save to index.
381 * dwarf-index-cache.h: New file.
382 * dwarf-index-cache.c: New file.
383 * dwarf-index-write.h: New file.
384
385 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
386
387 * gnulib/aclocal.m4: Re-generate.
388 * gnulib/config.in: Re-generate.
389 * gnulib/configure: Re-generate.
390 * gnulib/import/Makefile.am: Re-generate.
391 * gnulib/import/Makefile.in: Re-generate.
392 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
393 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
394 * gnulib/import/m4/mkdir.m4: New file.
395 * gnulib/import/mkdir.c: New file.
396 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
397 module.
398
399 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
400
401 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
402 * common/scoped_mmap.c: New file.
403 * common/scoped_mmap.h (destroy): New method.
404 (~scoped_mmap, reset): Use destroy.
405 (scoped_mmap): New move constructor.
406 (mmap_file): New declaration.
407 * unittests/scoped_mmap-selftests.c (test_normal,
408 test_invalid_filename, run_tests): New functions.
409 (_initialize_scoped_mmap_selftests): Register selftest.
410
411 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
412
413 * dwarf2read.c (read_gdb_index_from_section): Rename to...
414 (read_gdb_index_from_buffer): ... this. Remove section
415 parameter, add buffer parameter.
416 (get_gdb_index_contents_ftype,
417 get_gdb_index_contents_dwz_ftype): New typedefs.
418 (dwarf2_read_gdb_index): Add callback parameters to get the
419 index contents.
420 (get_gdb_index_contents_from_section): New.
421 (dwarf2_initialize_objfile): Update call to
422 dwarf2_read_gdb_index.
423
424 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
425
426 * common/filestuff.h (gdb_fopen_cloexec): New overload.
427 (gdb_open_cloexec): Likewise.
428 * nat/linux-osdata.c (command_from_pid): Use string_printf.
429 (commandline_from_pid): Likewise.
430 (linux_xfer_osdata_threads): Likewise.
431 (linux_xfer_osdata_fds): Likewise.
432 * ada-lang.c (is_package_name): Likewise.
433 * auxv.c (procfs_xfer_auxv): Likewise.
434 * breakpoint.c (print_one_breakpoint_location): Use
435 uiout::field_fmt.
436 (print_one_catch_solib): Use string_printf.
437 * coff-pe-read.c (add_pe_exported_sym): Likewise.
438 (add_pe_forwarded_sym): Likewise.
439 * dwarf2read.c (create_type_unit_group): Likewise.
440 (build_error_marker_type): Likewise.
441 * infcall.c (get_function_name): Likewise.
442 * valprint.c (print_converted_chars_to_obstack): Likewise.
443 * xtensa-tdep.c (xtensa_register_type): Likewise.
444
445 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
446
447 * remote.c (remote_target::download_tracepoint): Fix format
448 string errors.
449
450 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
451
452 * tracefile.c: Include common/byte-vector.h.
453 (trace_save): Change type of buf to gdb::byte_vector. Initialize
454 with trace_regblock_size if needed. Update uses of buf.
455
456 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
457
458 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
459 std::vector<unsigned char>.
460 * tracepoint.c (collection_list::collection_list): Remove
461 m_regs_mask initializer from initializer list. Resize
462 m_regs_mask using the largest remote register number.
463 (collection_list::add_remote_register): Remove size check on
464 m_regs_mask. Use at to access element.
465 (collection_list::stringify): Change type of temp_buf to
466 gdb::char_vector. Update uses of temp_buf. Resize if needed to
467 stringify the register mask. Use pack_hex_byte for the register
468 mask.
469
470 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
471
472 * tracepoint.h (class collection_list) <add_register>: Remove.
473 <add_remote_register, add_ax_registers, add_local_register>:
474 Declare.
475 <add_memrange>: Add scope parameter.
476 * tracepoint.c (encode_actions_1): Likewise.
477 (collection_list::add_register): Rename to ...
478 (collection_list::add_remote_register): ... this. Update
479 comment.
480 (collection_list::add_ax_registers, add_local_register): New
481 methods.
482 (collection_list::add_memrange): Add scope parameter. Call
483 add_local_register instead of add_register.
484 (finalize_tracepoint_aexpr): New function.
485 (collection_list::collect_symbol): Update calls to add_memrange.
486 Call add_local_register instead of add_register. Call
487 add_ax_registers. Call finalize_tracepoint_aexpr.
488 (encode_actions_1): Get remote regnos for $reg action. Call
489 add_remote_register, add_ax_registers, and add_local_register.
490 Update call to add_memrange. Call finalize_tracepoint_aexpr.
491 (validate_actionline): Call finalize_tracepoint_aexpr.
492
493 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
494
495 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
496 Replace array buf with gdb::char_vector buf, of size
497 get_remote_packet_size (). Replace references to buf and
498 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
499 and xsnprintf with snprintf. Raise errors if the buffer is too
500 small.
501
502 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
503
504 * remote.c (remote_target::download_tracepoint): Fix the has_more
505 predicate in the QTDP action list iteration.
506
507 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
508
509 * remote.c (remote_target::download_tracepoint): Fix indentation
510 in for block.
511
512 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
513
514 * proc-api.c (_initialize_proc_api): Remove c, unused.
515 * procfs.c (procfs_init_inferior): Remove signals, unused.
516 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
517 unused.
518
519 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
520 Andrew Burgess <andrew.burgess@embecosm.com>
521
522 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
523 'W_STOPCODE (0)' as this could be ambiguous.
524
525 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
526
527 * ser-tcp.c (net_open): Fix thinko when deciding whether to
528 disable TCP's Nagle algorithm (use "ai_protocol" instead of
529 "ai_socktype").
530
531 2018-08-02 Tom Tromey <tom@tromey.com>
532
533 PR symtab/16842.
534 * dwarf2read.c (read_func_scope): Set symtab on template parameter
535 symbols.
536 (process_structure_scope): Likewise.
537
538 2018-08-02 Xavier Roirand <roirand@adacore.com>
539
540 PR gdb/22629:
541 * darwin-nat.c (darwin_kill_inferior): Fix handling of
542 kill inferior.
543
544 2018-08-02 Tom Tromey <tom@tromey.com>
545
546 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
547 (darwin_suspend_inferior, darwin_resume_inferior)
548 (darwin_decode_notify_message, darwin_resume_inferior_threads)
549 (darwin_check_new_threads): Check result of get_darwin_inferior.
550
551 2018-07-31 Joel Brobecker <brobecker@adacore.com>
552
553 GDB 8.1.1 released.
554
555 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
556
557 * varobj.c (varobj_get_path_expr_parent): Report an error if
558 parent is a dynamic varobj.
559
560 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
561
562 * gnulib/aclocal.m4: Re-generate.
563 * gnulib/config.in: Re-generate.
564 * gnulib/configure: Re-generate.
565 * gnulib/import/Makefile.in: Re-generate.
566 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
567 * gnulib/import/m4/onceonly.m4: Re-generate.
568
569 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
570
571 * target-descriptions.c (struct xml_test_tdesc): New.
572 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
573 (record_xml_tdesc): Update.
574 (maintenance_check_xml_descriptions): Update.
575 * target-descriptions.h (record_xml_tdesc): Update comment.
576
577 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
578
579 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
580 checking array bounds are defined.
581
582 2018-07-30 Tom Tromey <tom@tromey.com>
583
584 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
585 irreflexivity violation.
586
587 2018-07-30 Tom Tromey <tom@tromey.com>
588
589 * cli/cli-decode.c (lookup_cmd): Remove lint code.
590 * value.c (unpack_long): Remove lint code.
591 * valops.c (value_ind): Remove lint code.
592 * valarith.c (value_x_binop, value_x_unop, value_equal)
593 (value_pos): Remove lint code.
594
595 2018-07-28 Tom de Vries <tdevries@suse.de>
596
597 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
598 with undefined upper bound as <optimized out>.
599
600 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
601
602 * gcore.in: Rename variable "name" to "prefix". Expand
603 "usage" text.
604
605 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
606
607 * windows-nat.c (windows_nat_target::create_inferior): Update to
608 call close() in global namespace.
609
610 2018-07-26 Tom Tromey <tom@tromey.com>
611
612 * dwarf-index-write.c (add_address_entry): Don't add objfile
613 offsets.
614 * dbxread.c (find_stab_function): Rename from
615 find_stab_function_addr. Return a bound_minimal_symbol.
616 (read_dbx_symtab): Use raw_text_low, raw_text_high.
617 Don't add objfile offsets.
618 (end_psymtab): Use raw_text_low, raw_text_high,
619 MSYMBOL_VALUE_RAW_ADDRESS.
620 (read_ofile_symtab): Update.
621 (process_one_symbol): Update.
622 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
623 offsets.
624 (dw2_relocate): Remove.
625 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
626 searching addrmap.
627 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
628 Update.
629 (process_psymtab_comp_unit_reader, add_partial_symbol)
630 (add_partial_subprogram, dwarf2_ranges_read): Update.
631 (load_partial_dies): Update.
632 (add_address_entry): Don't add objfile offsets.
633 (dwarf2_build_include_psymtabs): Update.
634 (create_addrmap_from_aranges): Don't add objfile offsets.
635 (dw2_find_pc_sect_compunit_symtab): Update.
636 * mdebugread.c (parse_symbol): Don't add objfile offsets.
637 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
638 Update.
639 (parse_partial_symbols): Don't add objfile offsets. Use
640 raw_text_low, raw_text_high. Update.
641 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
642 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
643 or call 'relocate' quick function. Clear psymbol_map.
644 * psympriv.h (struct partial_symbol) <address>: Add section
645 offset.
646 <set_unrelocated_address>: Rename from set_address.
647 <raw_text_low, raw_text_high>: New methods.
648 <text_low, text_high>: Add objfile parameter.
649 (add_psymbol_to_bcache): Add 'section' parameter. Call
650 set_unrelocated_address.
651 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
652 (find_pc_psymbol): Update.
653 (fixup_psymbol_section, relocate_psymtabs): Remove.
654 (dump_psymtab, psym_functions): Update.
655 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
656 parameter.
657 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
658 (start_psymtab_common): Update.
659 * symfile-debug.c (debug_qf_relocate): Remove.
660 (debug_sym_quick_functions): Update.
661 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
662 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
663 Update.
664
665 2018-07-26 Tom Tromey <tromey@redhat.com>
666
667 * dbxread.c (end_psymtab): Use text_high_valid and
668 text_low_valid.
669 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
670 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
671 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
672 Update comment.
673 <text_low_valid, text_high_valid>: New fields.
674 <set_text_low, set_text_high>: Update.
675 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
676
677 2018-07-26 Tom Tromey <tom@tromey.com>
678
679 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
680 Update.
681 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
682 textlow and texthigh fields.
683 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
684 Update.
685 * mdebugread.c (parse_lines, parse_partial_symbols)
686 (psymtab_to_symtab_1): Update.
687 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
688 Rename fields. Update comment. Now private.
689 <text_low, text_high, set_text_low, set_text_high>: New methods.
690 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
691 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
692 (start_psymtab_common, maintenance_info_psymtabs)
693 (maintenance_check_psymtabs): Update.
694 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
695 texthigh fields.
696 (scan_xcoff_symtab): Update.
697
698 2018-07-26 Tom Tromey <tromey@redhat.com>
699
700 * psympriv.h (struct partial_symbol) <unrelocated_address,
701 address, set_address>: New methods.
702 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
703 (fixup_psymbol_section, relocate_psymtabs): Update.
704 (print_partial_symbols): Add 'objfile' parameter. Update.
705 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
706 Update.
707
708 2018-07-26 Tom Tromey <tom@tromey.com>
709
710 * dwarf-index-write.c (write_psymbols, debug_names::insert)
711 (debug_names::write_psymbols): Update.
712 * psympriv.h (struct partial_symbol): Derive from
713 general_symbol_info.
714 <obj_section>: New method.
715 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
716 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
717 (find_pc_sect_psymbol, fixup_psymbol_section)
718 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
719 (print_partial_symbols, recursively_search_psymtabs)
720 (compare_psymbols, psymbol_hash, psymbol_compare)
721 (add_psymbol_to_bcache, maintenance_check_psymtabs)
722 (psymbol_name_matches, psym_fill_psymbol_map): Update.
723
724 2018-07-26 Tom Tromey <tromey@redhat.com>
725
726 * dbxread.c (end_psymtab): Remove dead code.
727
728 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
729
730 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
731 DWARF unwinders are disabled.
732 * dwarf2-frame.c: Add dwarf2read.h include.
733 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
734 disabled.
735 (dwarf2_frame_unwinders_enabled_p): Define.
736 (show_dwarf_unwinders_enabled_p): New function.
737 (_initialize_dwarf2_frame): Register switch to control DWARF
738 unwinder use.
739 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
740 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
741 (show_dwarf_cmdlist): Remove static keyword.
742 * dwarf2read.h (set_dwarf_cmdlist): Declare.
743 (show_dwarf_cmdlist): Declare.
744 * NEWS: Document new feature.
745
746 2018-07-26 Tom de Vries <tdevries@suse.de>
747
748 PR breakpoints/23366
749 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
750
751 2018-07-26 Tom de Vries <tdevries@suse.de>
752
753 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
754 DW_AT_count can't be translated to a dynamic prop.
755
756 2018-07-25 Tom de Vries <tdevries@suse.de>
757
758 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
759 try/catch.
760
761 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
762
763 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
764
765 2018-07-25 Joel Brobecker <brobecker@adacore.com>
766
767 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
768
769 2018-07-24 Keith Seitz <keiths@redhat.comt
770
771 PR symtab/23010
772 * dwarf2read.c (dw2_add_symbol_to_list): New function.
773 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
774 instead of add_symbol_to_list.
775 (read_file_scope): Call prepare_one_comp_unit before reading
776 any other DIEs.
777
778 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
779
780 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
781
782 2018-07-24 Tom Tromey <tom@tromey.com>
783
784 * utils.c (malloc, realloc, free): Don't declare.
785 * configure, config.in: Rebuild.
786 * configure.ac: Don't check for declarations of free, malloc, or
787 realloc.
788
789 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
790
791 * aarch64-linux-nat.c
792 (aarch64_linux_nat_target::stopped_data_address): Remove unused
793 variable.
794 * arm-linux-nat.c (fetch_regs): Likewise.
795 (store_regs): Likewise.
796 (fetch_vfp_regs): Likewise.
797 (store_vfp_regs): Likewise.
798 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
799 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
800 (arm_linux_nat_target::insert_watchpoint): Likewise.
801 (arm_linux_nat_target::remove_watchpoint): Likewise.
802 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
803 Likewise.
804 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
805 Likewise.
806 * ppc-linux-nat.c (fetch_register): Likewise.
807 (fetch_all_gp_regs): Likewise.
808 (fetch_ppc_registers): Likewise.
809 (store_all_gp_regs): Likewise.
810 (store_ppc_registers): Likewise.
811 (hwdebug_insert_point): Likewise.
812 (can_use_watchpoint_cond_accel): Likewise.
813 * remote-sim.c (gdb_os_write_stdout): Likewise.
814
815 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
816 Tom Tromey <tom@tromey.com>
817
818 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
819 test for it.
820 * configure: Rebuild.
821
822 2018-07-22 Tom Tromey <tom@tromey.com>
823
824 * regformats/regdat.sh: Define xmltarget_${name} inside
825 #ifndef IN_PROCESS_AGENT.
826
827 2018-07-22 Tom Tromey <tom@tromey.com>
828
829 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
830
831 2018-07-22 Tom Tromey <tom@tromey.com>
832
833 * symfile.c (reread_symbols): Notify iter, not objfile.
834
835 2018-07-22 Tom Tromey <tom@tromey.com>
836
837 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
838 Use arch_ops.
839 (ravenscar_thread_target::prepare_to_store): Likewise.
840
841 2018-07-22 Tom Tromey <tom@tromey.com>
842
843 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
844 unused variable. Call value_fetch_lazy when needed.
845 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
846 Remove unused variable. Call value_fetch_lazy when needed.
847
848 2018-07-22 Tom Tromey <tom@tromey.com>
849
850 * m32c-tdep.c (mark_dma): Return void.
851 (make_regs): Remove unused declarations.
852
853 2018-07-22 Tom Tromey <tom@tromey.com>
854
855 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
856 cmdscm_get_valid_command_smob_arg_unsafe for effect.
857 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
858 bkscm_get_valid_block_smob_arg_unsafe for effect.
859
860 2018-07-22 Tom Tromey <tom@tromey.com>
861
862 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
863 value_type.
864
865 2018-07-22 Tom Tromey <tom@tromey.com>
866
867 * windows-nat.c (saved_context): Conditionally define.
868 * remote.c (remote_target::remote_btrace_maybe_reopen):
869 Conditionally declare "warned".
870 * inflow.c (sigquit_ours): Conditionally define.
871 (new_tty): Move "tty" declaration inside #if.
872 * guile/guile.c (guile_datadir): Conditionally define.
873 * charset.c (set_be_le_names): Move some declarations inside #if.
874 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
875 #if.
876 (parse_xml_btrace_conf): Likewise.
877
878 2018-07-22 Tom Tromey <tom@tromey.com>
879
880 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
881
882 2018-07-22 Tom Tromey <tom@tromey.com>
883
884 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
885 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
886 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
887 * buildsym-legacy.c (get_macro_table): Remove unused variable.
888 * stack.c (frame_apply_level_command): Remove unused variable.
889 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
890 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
891 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
892 unused variable.
893 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
894 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
895 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
896 variable.
897 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
898 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
899 variable.
900 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
901 Remove unused variable.
902 * cli/cli-script.c (recurse_read_control_structure): Remove unused
903 variable.
904 * common/tdesc.c (print_xml_feature::visit): Remove unused
905 variable.
906 * compile/compile-object-load.c (store_regs): Remove unused
907 variables.
908 * complaints.c (clear_complaints): Remove unused variable.
909 * corelow.c (core_target_open): Remove unused variable.
910 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
911 variable.
912 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
913 variable.
914 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
915 variable.
916 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
917 variable.
918 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
919 variable.
920 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
921 variable.
922 * ia64-tdep.c (examine_prologue): Remove unused variable.
923 * infcall.c (run_inferior_call): Remove unused variable.
924 * inferior.c (exit_inferior): Remove unused variable.
925 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
926 * linespec.c (decode_line_2): Remove unused variable.
927 * linux-nat.c (super_close): Remove.
928 * linux-tdep.c (linux_info_proc): Remove unused variable.
929 * mi/mi-main.c (mi_execute_command): Remove unused variable.
930 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
931 Remove unused variable.
932 * parse.c (find_minsym_type_and_address): Remove unused variable.
933 * printcmd.c (info_symbol_command, printf_floating): Remove unused
934 variable.
935 * python/py-breakpoint.c (bppy_set_commands): Remove unused
936 variable.
937 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
938 variables.
939 * record-btrace.c (record_btrace_target::store_registers): Remove
940 unused variable.
941 (cmd_show_record_btrace_cpu): Remove unused variable.
942 * riscv-tdep.c (riscv_register_reggroup_p)
943 (riscv_push_dummy_call, riscv_return_value): Remove unused
944 variable.
945 * rust-exp.y (literal): Remove unused variable.
946 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
947 unused variable.
948 <STRUCTOP_ANONYMOUS>: Likewise.
949 * s390-linux-tdep.c (s390_linux_init_abi_31)
950 (s390_linux_init_abi_64): Remove unused variable.
951 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
952 (file_select_thread, net_windows_open, _initialize_ser_windows):
953 Remove unused variables.
954 * symtab.c (find_pc_sect_line): Remove unused variable.
955 * target-memory.c (compute_garbled_blocks): Remove unused
956 variable.
957 (target_write_memory_blocks): Remove unused variable.
958 * target.c (target_stack::unpush): Remove unused variables.
959 * tracepoint.c (start_tracing, all_tracepoint_actions)
960 (merge_uploaded_trace_state_variables)
961 (print_one_static_tracepoint_marker): Remove unused variable.
962 * unittests/basic_string_view/element_access/char/1.cc (test01):
963 Remove unused variable.
964 * windows-nat.c (windows_continue, windows_add_all_dlls)
965 (do_initial_windows_stuff, windows_nat_target::create_inferior):
966 Remove unused variables.
967
968 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
969
970 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
971 attr_profile in HAVE_ELF.
972 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
973 HAVE_ELF.
974
975 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
976
977 * frame.c (frame_register_unwind): Change parameter name.
978 (frame_unwind_register): Likewise.
979 (frame_unwind_register_value): Likewise.
980 (frame_unwind_register_signed): Likewise.
981 (frame_unwind_register_unsigned): Likewise.
982 * frame.h (frame_register_unwind): Likewise.
983 (frame_unwind_register): Likewise.
984 (frame_unwind_register_value): Likewise.
985 (frame_unwind_register_signed): Likewise.
986 (frame_unwind_register_unsigned): Likewise.
987 (frame_unwind_arch): Likewise.
988
989 2018-07-20 Maciej W. Rozycki <macro@mips.com>
990
991 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
992 ISA maintenance.
993
994 2018-07-20 Maciej W. Rozycki <macro@mips.com>
995
996 * mips-linux-nat.c (mips_linux_nat_target::read_description):
997 Call `get_ptrace_pid' rather than extracting the ptrace PID by
998 hand.
999
1000 2018-07-20 Keith Seitz <keiths@redhat.com>
1001
1002 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
1003 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
1004 m_compunit_symtab, m_language>: Add "m_" prefix.
1005 Update all uses.
1006 * buildsym.c: Update all uses.
1007
1008 2018-07-20 Tom Tromey <tom@tromey.com>
1009
1010 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
1011 * buildsym.h (record_line_ftype): Remove typedef.
1012
1013 2018-07-20 Tom Tromey <tom@tromey.com>
1014
1015 * buildsym-legacy.h (augment_type_symtab): Don't declare.
1016 (end_expandable_symtab): Likewise.
1017 (end_symtab_get_static_block): Likewise.
1018 (end_symtab_from_static_block): Likewise.
1019 * buildsym-legacy.c (augment_type_symtab): Remove.
1020 (end_expandable_symtab): Remove.
1021 (end_symtab_get_static_block): Remove.
1022 (end_symtab_from_static_block): Remove.
1023
1024 2018-07-20 Tom Tromey <tom@tromey.com>
1025
1026 * dwarf2read.c: Include buildsym.h.
1027 (struct dwarf2_cu) <builder>: New method.
1028 (fixup_go_packaging): Update.
1029 (process_full_comp_unit, process_full_type_unit): Update. Don't
1030 use scoped_free_pendings.
1031 (using_directives): Add "cu" parameter, remove "language".
1032 (read_import_statement, setup_type_unit_groups, )
1033 (read_func_scope, read_lexical_block_scope)
1034 (dwarf2_record_block_ranges, read_namespace): Update.
1035 (lnp_state_machine::lnp_state_machine): Add cu parameter.
1036 (lnp_state_machine::handle_end_sequence): Update.
1037 (class lnp_state_machine) <m_cu>: New member.
1038 <m_record_line_callback>: Remove.
1039 <m_currently_recording_lines>: New member.
1040 (lnp_state_machine::handle_set_file): Update.
1041 (noop_record_line): Remove.
1042 (dwarf_record_line_p): Add cu parameter.
1043 (dwarf_record_line_1, dwarf_finish_line): Likewise.
1044 (lnp_state_machine::record_line)
1045 (lnp_state_machine::lnp_state_machine)
1046 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
1047 (dwarf_decode_lines): Update.
1048 (dwarf2_start_subfile): Add cu parameter.
1049 (dwarf2_start_symtab, new_symbol): Update.
1050 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
1051 Remove dwarf2_per_objfile parameter.
1052 (dwarf_decode_macros): Update.
1053
1054 2018-07-20 Tom Tromey <tom@tromey.com>
1055
1056 * stabsread.c (define_symbol): Update.
1057 * buildsym-legacy.h (get_buildsym_compunit): Declare.
1058 * dwarf2read.c (new_symbol): Update.
1059 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
1060 * cp-namespace.c: Include buildsym.h.
1061 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
1062 * buildsym-legacy.c (get_buildsym_compunit): New function.
1063
1064 2018-07-20 Tom Tromey <tom@tromey.com>
1065
1066 * xcoffread.c: Include buildsym-legacy.h.
1067 * windows-nat.c: Include buildsym-legacy.h.
1068 * stabsread.c: Include buildsym-legacy.h.
1069 * mdebugread.c: Include buildsym-legacy.h.
1070 * buildsym-legacy.h: New file.
1071 * buildsym-legacy.c: New file, from buildsym.c.
1072 * go32-nat.c: Include buildsym-legacy.h.
1073 * dwarf2read.c: Include buildsym-legacy.h.
1074 * dbxread.c: Include buildsym-legacy.h.
1075 * cp-namespace.c: Include buildsym-legacy.h.
1076 * coffread.c: Include buildsym-legacy.h.
1077 * buildsym.h: Move some contents to buildsym-legacy.h.
1078 * buildsym.c: Include buildsym-legacy.h. Move many functions to
1079 buildsym-legacy.c.
1080 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
1081
1082 2018-07-20 Tom Tromey <tom@tromey.com>
1083
1084 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
1085 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
1086 (buildsym_compunit::buildsym_compunit)
1087 (buildsym_compunit::~buildsym_compunit)
1088 (buildsym_compunit::get_macro_table): Define.
1089
1090 2018-07-20 Tom Tromey <tom@tromey.com>
1091
1092 * buildsym.c (reset_symtab_globals): Remove.
1093 (buildsym_compunit::end_symtab_from_static_block): Update.
1094 (buildsym_compunit::augment_type_symtab): Update.
1095 (end_symtab_from_static_block): Call free_buildsym_compunit.
1096 (augment_type_symtab, end_symtab, end_expandable_symtab):
1097 Likewise.
1098
1099 2018-07-20 Tom Tromey <tom@tromey.com>
1100
1101 * arch-utils.c: Do not include buildsym.h.
1102 * mipsread.c: Do not include buildsym.h.
1103 * machoread.c: Do not include buildsym.h.
1104 * elfread.c: Do not include buildsym.h.
1105
1106 2018-07-20 Tom Tromey <tom@tromey.com>
1107
1108 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
1109 initialization.
1110 (buildsym_compunit): Add new constructor.
1111 (struct buildsym_compunit) <get_last_source_file, finish_block,
1112 record_block_range, start_subfile, patch_subfile_names,
1113 push_subfile, pop_subfile, record_line, get_compunit_symtab,
1114 set_last_source_start_addr, get_last_source_start_addr,
1115 get_local_using_directives, set_local_using_directives,
1116 get_global_using_directives, outermost_context_p,
1117 get_current_context_stack, get_context_stack_depth,
1118 get_current_subfile, get_local_symbols, get_file_symbols,
1119 get_global_symbols, record_debugformat, record_producer,
1120 push_context, pop_context, end_symtab_get_static_block,
1121 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
1122 New public methods.
1123 <record_pending_block, finish_block_internal, make_blockvector,
1124 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
1125 private methods.
1126 Update all users.
1127
1128 2018-05-22 Tom Tromey <tom@tromey.com>
1129
1130 * buildsym.c (record_pending_block): Move earlier. Remove objfile
1131 parameter.
1132 (finish_block_internal): Update.
1133
1134 2018-07-20 Tom Tromey <tom@tromey.com>
1135
1136 * buildsym.c (record_pending_block): Move earlier. Remove objfile
1137 parameter.
1138 (finish_block_internal): Update.
1139
1140 2018-07-20 Tom Tromey <tom@tromey.com>
1141
1142 * buildsym.h (EXTERN): Don't define or undef.
1143 * buildsym.c (EXTERN): Don't define.
1144
1145 2018-07-20 Tom Tromey <tom@tromey.com>
1146
1147 * buildsym.c: Remove TODO comment.
1148
1149 2018-07-20 Tom Tromey <tom@tromey.com>
1150
1151 * coffread.c (coff_symtab_read): Update.
1152 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
1153 (xcoff_new_init): Update.
1154 * mipsread.c (mipscoff_new_init): Update.
1155 * mdebugread.c (mdebug_build_psymtabs): Update.
1156 * elfread.c (elf_new_init): Update.
1157 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1158 Update.
1159 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
1160 (coffstab_build_psymtabs, elfstab_build_psymtabs)
1161 (stabsect_build_psymtabs): Update.
1162 * buildsym.h (buildsym_init): Don't declare.
1163 * buildsym.c: Update comment.
1164 (prepare_for_building): Remove.
1165 (start_symtab, restart_symtab): Update.
1166 (reset_symtab_globals): Update comment.
1167 (buildsym_init): Remove.
1168
1169 2018-07-20 Tom Tromey <tom@tromey.com>
1170
1171 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
1172 * stabsread.c (patch_block_stabs, define_symbol, read_type)
1173 (read_enum_type, common_block_start, common_block_end)
1174 (cleanup_undefined_types_1, finish_global_stabs): Update.
1175 * mdebugread.c (psymtab_to_symtab_1): Update.
1176 * dwarf2read.c (fixup_go_packaging, read_func_scope)
1177 (read_lexical_block_scope, new_symbol): Update.
1178 * dbxread.c (process_one_symbol): Update.
1179 * coffread.c (coff_symtab_read, process_coff_symbol)
1180 (coff_read_enum_type): Update.
1181 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
1182 declare.
1183 (get_local_symbols, get_file_symbols, get_global_symbols): New
1184 functions.
1185 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
1186 m_global_symbols.
1187 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
1188 (~scoped_free_pendings): Update.
1189 (finish_block, prepare_for_building, reset_symtab_globals)
1190 (end_symtab_get_static_block, end_symtab_with_blockvector)
1191 (augment_type_symtab, push_context): Update.
1192 (get_local_symbols, get_file_symbols, get_global_symbols): New
1193 functions.
1194 (buildsym_init): Update.
1195
1196 2018-07-20 Tom Tromey <tom@tromey.com>
1197
1198 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
1199 (process_full_type_unit): Likewise.
1200 (dwarf2_start_symtab): Set list_in_scope.
1201
1202 2018-07-20 Tom Tromey <tom@tromey.com>
1203
1204 * dwarf2read.c (process_psymtab_comp_unit_reader)
1205 (build_type_psymtabs_reader): Do not set list_in_scope.
1206
1207 2018-07-20 Tom Tromey <tom@tromey.com>
1208
1209 * buildsym.c (free_pendings): Remove.
1210 (add_symbol_to_list, scoped_free_pendings)
1211 (finish_block_internal, buildsym_init): Update.
1212
1213 2018-07-20 Tom Tromey <tom@tromey.com>
1214
1215 * xcoffread.c (read_xcoff_symtab): Update.
1216 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
1217 Update.
1218 * dbxread.c (process_one_symbol): Update.
1219 * coffread.c (coff_symtab_read): Update.
1220 * buildsym.h (finish_block): Update.
1221 * buildsym.c (finish_block): Remove "listhead" argument.
1222 (end_symtab_get_static_block): Update.
1223
1224 2018-07-20 Tom Tromey <tom@tromey.com>
1225
1226 * buildsym.h (class scoped_free_pendings): Remove constructor.
1227 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
1228 method.
1229 <m_pending_block_obstack, m_pending_blocks>: New members.
1230 (pending_block_obstack, pending_blocks): Remove.
1231 (scoped_free_pendings::scoped_free_pendings): Default.
1232 (~scoped_free_pendings): Update.
1233 (free_pending_blocks): Remove.
1234 (finish_block_internal, record_pending_block, make_blockvector)
1235 (end_symtab_get_static_block, augment_type_symtab, push_context)
1236 (buildsym_init): Update.
1237
1238 2018-07-20 Tom Tromey <tom@tromey.com>
1239
1240 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
1241 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
1242 members.
1243 (pending_addrmap, pending_addrmap_obstack)
1244 (pending_addrmap_interesting): Remove.
1245 (scoped_free_pendings, record_block_range, make_blockvector)
1246 (prepare_for_building, reset_symtab_globals, buildsym_init):
1247 Update.
1248
1249 2018-07-20 Tom Tromey <tom@tromey.com>
1250
1251 * xcoffread.c (process_linenos): Update.
1252 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
1253 * mdebugread.c (psymtab_to_symtab_1): Update.
1254 * dwarf2read.c (setup_type_unit_groups)
1255 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
1256 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
1257 * dbxread.c (process_one_symbol): Update.
1258 * coffread.c (coff_symtab_read, enter_linenos)
1259 (process_coff_symbol): Update.
1260 * buildsym.h (current_subfile): Don't declare.
1261 (get_current_subfile): Declare.
1262 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
1263 member.
1264 (start_subfile, free_buildsym_compunit, push_subfile)
1265 (prepare_for_building, start_symtab): Update.
1266 (get_current_subfile): New function.
1267
1268 2018-07-20 Tom Tromey <tom@tromey.com>
1269
1270 * coffread.c (coff_symtab_read): Update.
1271 * xcoffread.c (read_xcoff_symtab): Update.
1272 * dwarf2read.c (new_symbol): Update.
1273 (read_func_scope, read_lexical_block_scope): Update.
1274 * dbxread.c (process_one_symbol): Update.
1275 * buildsym.h (context_stack, context_stack_depth): Don't declare.
1276 (outermost_context_p): Remove macro.
1277 (outermost_context_p, get_current_context_stack)
1278 (get_context_stack_depth): Declare.
1279 (pop_context): Return struct context_stack.
1280 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
1281 member.
1282 (context_stack_size): Remove.
1283 (INITIAL_CONTEXT_STACK_SIZE): Remove.
1284 (prepare_for_building, end_symtab_get_static_block)
1285 (augment_type_symtab, push_context): Update.
1286 (pop_context): Return struct context_stack.
1287 (outermost_context_p, get_current_context_stack)
1288 (get_context_stack_depth): New functions.
1289 (buildsym_init): Update.
1290
1291 2018-07-20 Tom Tromey <tom@tromey.com>
1292
1293 * rust-exp.y: Now a pure parser. Update all rules.
1294 (%union): Move earlier.
1295 (current_parser, work_obstack): Remove globals.
1296 (rust_parser, ~rust_parser): Update.
1297 (class rust_parser) <copy_name, concat3, crate_name, super_name,
1298 lex_character, lex_number, lex_string, lex_identifier,
1299 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
1300 convert_name, convert_params_to_expression,
1301 convert_ast_to_expression, ast_basic_type, ast_operation,
1302 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
1303 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
1304 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
1305 ast_array_type, ast_slice_type, ast_reference_type,
1306 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
1307 (rust_parse): Update.
1308 (rustyyerror, rustyylex): Add parser parameter.
1309 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
1310 (rust_lex_stringish_test, rust_lex_test_sequence)
1311 (rust_lex_test_trailing_dot, rust_lex_test_completion)
1312 (rust_lex_test_push_back, rust_lex_tests): Update.
1313
1314 2018-07-19 Pedro Alves <palves@redhat.com>
1315
1316 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
1317 gdb::unique_xmalloc_ptr.
1318 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
1319 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
1320 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
1321 copy-initialization.
1322 * guile/scm-pretty-print.c (ppscm_print_children): Use
1323 gdb::unique_xmalloc_ptr instead of cleanups.
1324 (gdbscm_apply_val_pretty_printer): Remove cleanups.
1325 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
1326 gdb::unique_xmalloc_ptr.
1327 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1328 Adjust to use gdb::unique_xmalloc_ptr.
1329 * guile/scm-utils.c (extract_arg): Adjust.
1330 * guile/scm-value.c (gdbscm_value_field): Adjust to use
1331 gdb::unique_xmalloc_ptr instead of a cleanup.
1332
1333 2018-07-19 Tom Tromey <tom@tromey.com>
1334
1335 * utils.c (do_value_free_to_mark)
1336 (make_cleanup_value_free_to_mark): Remove.
1337 * utils.h (make_cleanup_value_free_to_mark): Remove.
1338
1339 2018-07-19 Pedro Alves <palves@redhat.com>
1340
1341 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
1342 forwarding reference.
1343
1344 2018-07-18 Pedro Alves <palves@redhat.com>
1345
1346 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
1347 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
1348 cleanup.
1349
1350 2018-07-18 Pedro Alves <palves@redhat.com>
1351
1352 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
1353 exceptions.
1354 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
1355 (gdbscm_wrap): New.
1356 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
1357 directly instead of a cleanup.
1358 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
1359 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
1360 (vlscm_binop_gdbthrow): New, factored out from ...
1361 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
1362 (vlscm_rich_compare): Use gdbscm_wrap.
1363 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
1364 instead of a cleanup.
1365 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
1366 cleanup.
1367 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1368 Use xfree directly instead of a cleanup.
1369 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
1370 Adjust to use gdbscm_wrap and scoped_value_mark.
1371 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
1372 (gdbscm_value_address, gdbscm_value_dereference)
1373 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
1374 scoped_value_mark.
1375 (gdbscm_value_dynamic_type): Use scoped_value_mark.
1376 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
1377 scoped_value_mark.
1378 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
1379 gdbscm_wrap and scoped_value_mark.
1380 (gdbscm_value_to_string): Use xfree directly instead of a
1381 cleanup. Move 'buffer' unique_ptr to TRY scope.
1382 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
1383 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
1384 scoped_value_mark.
1385 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
1386 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
1387 scoped_value_mark.
1388 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
1389 gdbscm_wrap.
1390
1391 2018-07-18 Tom de Vries <tdevries@suse.de>
1392
1393 * findvar.c (default_read_var_value): Also resolve dynamic type for
1394 LOC_OPTIMIZED_OUT vars.
1395
1396 2018-07-18 Maciej W. Rozycki <macro@mips.com>
1397
1398 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
1399 decoding.
1400
1401 2018-07-17 Tom Tromey <tom@tromey.com>
1402
1403 * guile/scm-param.c (pascm_set_func, pascm_show_func)
1404 (compute_enum_list, pascm_set_param_value_x)
1405 (gdbscm_parameter_value): Update.
1406 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
1407 (gdbscm_scm_to_host_string): Update.
1408 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
1409 Update.
1410 * guile/scm-cmd.c (cmdscm_add_completion): Update.
1411 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
1412 * guile/scm-string.c (gdbscm_scm_to_string): Return
1413 unique_xmalloc_ptr.
1414 (gdbscm_scm_to_host_string): Likewise.
1415
1416 2018-07-17 Tom Tromey <tom@tromey.com>
1417
1418 * guile/guile.c (gdbscm_eval_from_control_command): Update.
1419 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
1420 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
1421 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
1422 unique_xmalloc_ptr.
1423
1424 2018-07-17 Tom Tromey <tom@tromey.com>
1425
1426 * guile/scm-param.c (pascm_signal_setshow_error): Update.
1427 * guile/guile-internal.h (gdbscm_exception_message_to_string):
1428 Update.
1429 * guile/scm-cmd.c (cmdscm_function): Update.
1430 * guile/scm-pretty-print.c
1431 (ppscm_print_exception_unless_memory_error): Update.
1432 * guile/scm-exception.c (gdbscm_exception_message_to_string):
1433 Return unique_xmalloc_ptr.
1434
1435 2018-07-17 Tom Tromey <tom@tromey.com>
1436
1437 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
1438 Use string_printf.
1439
1440 2018-07-17 Jim Wilson <jimw@sifive.com>
1441
1442 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
1443 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
1444 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
1445 unecessary braces after EF_RISCV_RVC test. Delete call to
1446 set_gdbarch_decr_pc_after_break.
1447
1448 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
1449 RISCV_LAST_FP_REGNUM + 1.
1450 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
1451
1452 2018-07-17 Tom Tromey <tom@tromey.com>
1453
1454 * configure.ac: Remove --disable-gdbcli.
1455 * configure: Rebuild.
1456 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
1457 (SUBDIR_CLI_CFLAGS): Remove.
1458 (SFILES): Use SUBDIR_CLI_SRCS.
1459 (COMMON_OBS): Use SUBDIR_CLI_OBS.
1460
1461 2018-07-17 Tom Tromey <tom@tromey.com>
1462
1463 PR gdb/18624:
1464 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
1465
1466 2018-07-16 Jim Wilson <jimw@sifive.com>
1467
1468 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
1469
1470 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1471
1472 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
1473 variable.
1474 (libunwind_frame_sniffer): Likewise.
1475 (libunwind_frame_prev_register): Likewise.
1476 (libunwind_sigtramp_frame_sniffer): Likewise.
1477 * ia64-tdep.c (ia64_access_reg): Likewise.
1478 (ia64_access_rse_reg): Likewise.
1479 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
1480 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
1481
1482 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1483
1484 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
1485
1486 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1487
1488 * remote-sim.c (gdbsim_target::close,
1489 gdbsim_target::mourn_inferior): Remove unused variables.
1490
1491 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
1492
1493 * ia64-tdep.c (ktab_buf): New global.
1494 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
1495 (get_kernel_table): Adjust.
1496
1497 2018-07-16 Tom Tromey <tom@tromey.com>
1498
1499 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
1500 * dwarf2read.c (using_directives, new_symbol): Use
1501 outermost_context_p.
1502 * dbxread.c (process_one_symbol): Use outermost_context_p.
1503 * coffread.c (coff_symtab_read): Use outermost_context_p.
1504
1505 2018-07-16 Tom Tromey <tom@tromey.com>
1506
1507 * dwarf2read.c (using_directives, read_func_scope)
1508 (read_lexical_block_scope): Update.
1509 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1510 * buildsym.h (local_using_directives, global_using_directives):
1511 Don't declare.
1512 (get_local_using_directives, set_local_using_directives)
1513 (get_global_using_directives): Declare.
1514 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
1515 m_global_using_directives>: New members.
1516 (finish_block_internal, prepare_for_building)
1517 (reset_symtab_globals, end_symtab_get_static_block)
1518 (push_context): Update.
1519 (get_local_using_directives, set_local_using_directives)
1520 (get_global_using_directives): New functions.
1521 (buildsym_init): Update.
1522
1523 2018-07-16 Tom Tromey <tom@tromey.com>
1524
1525 * xcoffread.c (xcoff_initial_scan): Don't call
1526 free_pending_blocks.
1527 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
1528 * buildsym.h (class scoped_free_pendings): Add constructor.
1529 (free_pending_blocks): Don't declare.
1530 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
1531 (free_pending_blocks): Now static.
1532
1533 2018-07-16 Tom Tromey <tom@tromey.com>
1534
1535 * buildsym.h (push_subfile, pop_subfile): Update declarations.
1536 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
1537 member.
1538 (struct subfile_stack): Remove.
1539 (subfile_stack): Remove.
1540 (push_subfile, pop_subfile, buildsym_init): Update.
1541
1542 2018-07-16 Tom Tromey <tom@tromey.com>
1543
1544 * buildsym.c (push_subfile): Use gdb_assert.
1545 (pop_subfile): Use gdb_assert.
1546
1547 2018-07-16 Tom Tromey <tom@tromey.com>
1548
1549 * buildsym.h (merge_symbol_lists): Remove.
1550 * buildsym.c (merge_symbol_lists): Remove.
1551
1552 2018-07-16 Tom Tromey <tom@tromey.com>
1553
1554 * stabsread.c (scan_file_globals): Update comment.
1555 * stabsread.h (scan_file_globals): Move from buildsym.h.
1556 * buildsym.h (scan_file_globals): Move to stabsread.h.
1557
1558 2018-07-16 Tom Tromey <tom@tromey.com>
1559
1560 * xcoffread.c (xcoff_new_init): Update.
1561 * mipsread.c (mipscoff_new_init): Update.
1562 * mdebugread.c (mdebug_build_psymtabs): Update.
1563 * elfread.c (elf_new_init): Update.
1564 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
1565 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
1566 * buildsym.h (buildsym_new_init): Don't declare.
1567 * buildsym.c (buildsym_new_init): Remove.
1568
1569 2018-07-16 Tom Tromey <tom@tromey.com>
1570
1571 * stabsread.h (within_function): Move from buildsym.h.
1572 * stabsread.c (start_stabs): Clear within_function.
1573 * coffread.c (coff_start_symtab): Clear within_function.
1574 * buildsym.h (within_function): Move to stabsread.h.
1575 * buildsym.c (prepare_for_building): Update.
1576
1577 2018-07-16 Tom Tromey <tom@tromey.com>
1578
1579 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
1580 * dwarf2read.c (dwarf2_start_symtab): Don't set
1581 processing_gcc_compilation.
1582 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
1583
1584 2018-07-16 Tom Tromey <tom@tromey.com>
1585
1586 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
1587 (next_symbol_text_func): Move from buildsym.h.
1588 * stabsread.c (hashname): Move from buildsym.c.
1589 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
1590 (next_symbol_text_func, hashname): Move to stabsread.h.
1591 * buildsym.c: Don't include bcache.h
1592 (hashname): Move to stasbread.c.
1593
1594 2018-07-16 Tom Tromey <tom@tromey.com>
1595
1596 * buildsym.h (context_stack_size): Don't declare.
1597 * buildsym.c (context_stack_size): New global.
1598
1599 2018-07-16 Tom Tromey <tom@tromey.com>
1600
1601 * dbxread.c (processing_acc_compilation): New global.
1602 * buildsym.h (processing_acc_compilation): Don't declare.
1603
1604 2018-07-16 Tom Tromey <tom@tromey.com>
1605
1606 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
1607 * dbxread.c (read_ofile_symtab): Update.
1608 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
1609 * buildsym.h (last_source_start_addr): Remove.
1610 (set_last_source_start_addr, get_last_source_start_addr):
1611 Declare.
1612 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
1613 parameter.
1614 (struct buildsym_compunit) <m_last_source_start_addr>: New
1615 member.
1616 (prepare_for_building): Remove start_addr parameter.
1617 (start_symtab, restart_symtab, end_symtab_get_static_block)
1618 (end_symtab_with_blockvector): Update.
1619 (set_last_source_start_addr, get_last_source_start_addr): New
1620 functions.
1621
1622 2018-07-16 Tom Tromey <tom@tromey.com>
1623
1624 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
1625 member.
1626 (have_line_numbers): Remove.
1627 (record_line, prepare_for_building, end_symtab_get_static_block)
1628 (augment_type_symtab): Update.
1629
1630 2018-07-16 Tom Tromey <tom@tromey.com>
1631
1632 * buildsym.c (~buildsym_compunit): Free the macro table.
1633 (struct buildsym_compunit) <get_macro_table, release_macros>: New
1634 methods.
1635 <m_pending_macros>: New member.
1636 (pending_macros): Remove.
1637 (~scoped_free_pendings, get_macro_table, prepare_for_building)
1638 (reset_symtab_globals, end_symtab_get_static_block)
1639 (end_symtab_with_blockvector, augment_type_symtab)
1640 (buildsym_init): Update.
1641
1642 2018-07-16 Tom Tromey <tom@tromey.com>
1643
1644 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
1645 parameter.
1646 (buildsym_compunit::set_last_source_file): New method.
1647 <m_last_source_file>: New member.
1648 (prepare_for_building): Remove "name" parameter.
1649 (start_symtab, restart_symtab, reset_symtab_globals): Update.
1650 (last_source_file): Remove.
1651 (set_last_source_file, get_last_source_file): Update.
1652
1653 2018-07-16 Tom Tromey <tom@tromey.com>
1654
1655 * buildsym.c (prepare_for_building): Add assert.
1656
1657 2018-07-16 Tom Tromey <tom@tromey.com>
1658
1659 * buildsym.c (~buildsym_compunit): Update.
1660 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
1661 (start_subfile, patch_subfile_names)
1662 (end_symtab_with_blockvector): Update.
1663
1664 2018-07-16 Tom Tromey <tom@tromey.com>
1665
1666 * buildsym.c (struct buildsym_compunit): Add constructor,
1667 destructor, initializers.
1668 (start_buildsym_compunit): Remove.
1669 (free_buildsym_compunit): Use "delete".
1670 (start_symtab, restart_symtab): Use "new".
1671
1672 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
1673
1674 * symfile.c (set_objfile_default_section_offset): Remove struct
1675 keyword.
1676
1677 2018-07-14 Stafford Horne <shorne@gmail.com>
1678
1679 * (Responsible Maintainers): Add myself as or1k maintainer.
1680
1681 2018-07-13 Tom Tromey <tom@tromey.com>
1682
1683 * symfile.c (set_objfile_default_section_offset): Use extra braces
1684 around initializer.
1685
1686 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1687
1688 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
1689 non-branching basr.
1690
1691 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1692
1693 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1694 unittests/cli-utils-selftests.c
1695 * unittests/cli-utils-selftests.c: New file.
1696
1697 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1698
1699 * NEWS: Mention new commands. Mention change to 'thread apply'.
1700
1701 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1702
1703 * thread.c (thr_try_catch_cmd): New function.
1704 (thread_apply_all_command): Handle qcs flags.
1705 (thread_apply_command): Handle qcs flags.
1706 (taas_command): New function.
1707 (tfaas_command): New function.
1708 (_initialize_thread): Update to setup the new commands 'taas
1709 and 'tfaas'. Change doc string for 'thread apply'.
1710
1711 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1712
1713 * stack.c: (trailing_outermost_frame): New function, mostly
1714 extracted from backtrace_command_1.
1715 (leading_innermost_frame): New function.
1716 (backtrace_command_1): Update to call trailing_outermost_frame.
1717 (frame_apply_command_count): New function.
1718 (frame_apply_level_command): New function.
1719 (frame_apply_all_command): New function.
1720 (frame_apply_command): New function.
1721 (faas_command): New function.
1722 (frame_cmd_list): New variable.
1723 (_initialize_stack): Update to setup the new commands 'frame apply'
1724 and 'faas'.
1725
1726 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1727
1728 * cli-utils.c (number_or_range_parser::get_number): Only handle
1729 numbers or convenience var as numbers.
1730 (parse_flags): New function.
1731 (parse_flags_qcs): New function.
1732 (number_or_range_parser::finished): Ensure parsing end is detected
1733 before end of string.
1734 * cli-utils.h (parse_flags): New function.
1735 (parse_flags_qcs): New function.
1736 (number_or_range_parser): Remove m_finished bool.
1737 (number_or_range_parser::skip_range): Set m_in_range to false.
1738
1739 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
1740
1741 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
1742 on Windows.
1743
1744 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1745 Jan Kratochvil <jan.kratochvil@redhat.com>
1746 Paul Fertser <fercerpav@gmail.com>
1747 Tsutomu Seki <sekiriki@gmail.com>
1748 Pedro Alves <palves@redhat.com>
1749
1750 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1751 'unittests/parse-connection-spec-selftests.c'.
1752 (COMMON_SFILES): Add 'common/netstuff.c'.
1753 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
1754 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
1755 * common/netstuff.c: New file.
1756 * common/netstuff.h: New file.
1757 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
1758 (wait_for_connect): Update comment. New parameter
1759 'gdb::optional<int> sock' instead of 'struct serial *scb'.
1760 Use 'sock' directly instead of 'scb->fd'.
1761 (try_connect): New function, with code from 'net_open'.
1762 (net_open): Rewrite main loop to deal with multiple
1763 sockets/addresses. Handle IPv6-style hostnames; implement
1764 support for IPv6 connections.
1765 * unittests/parse-connection-spec-selftests.c: New file.
1766
1767 2018-07-11 Pedro Alves <palves@redhat.com>
1768
1769 PR gdb/23377
1770 * remote.c (remote_target::remote_detach_pid): Call
1771 set_current_process.
1772
1773 2018-07-11 Pedro Alves <palves@redhat.com>
1774
1775 * h8300-tdep.c (h8300_gdbarch_init): Remove
1776 set_gdbarch_ecoff_reg_to_regnum calls.
1777
1778 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1779
1780 PR c++/23373
1781 * c-typeprint.c (c_type_print_base_struct_union): Don't print
1782 offsets/sizes for static members of a class/struct.
1783
1784 2018-07-11 Alan Hayward <alan.hayward@arm.com>
1785
1786 * target-descriptions.c (tdesc_register_bitsize): Rename.
1787 * target-descriptions.h (tdesc_register_bitsize): Likewise.
1788 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
1789 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
1790
1791 2018-07-10 Tom Tromey <tom@tromey.com>
1792
1793 * breakpoint.c (moribund_locations): Now static and a
1794 std::vector.
1795 (breakpoint_init_inferior, moribund_breakpoint_here_p)
1796 (build_bpstat_chain, update_global_location_list)
1797 (breakpoint_retire_moribund): Update.
1798 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
1799 VEC.
1800
1801 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
1802
1803 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
1804 (riscv_register_reggroup_p): Use new function, remove unneeded
1805 parenthesis.
1806 (riscv_push_dummy_call): Extend assert to compare against xlen or
1807 flen based on register type.
1808
1809 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
1810
1811 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
1812
1813 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
1814
1815 * remote.c (show_hardware_watchpoint_limit): New function.
1816 (show_hardware_watchpoint_length_limit): New function.
1817 (show_hardware_breakpoint_limit): New function.
1818 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
1819 where appropriate, update help text.
1820
1821 2018-07-09 Tom Tromey <tom@tromey.com>
1822
1823 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
1824 (CLIBS): Don't mention NAT_CLIBS.
1825
1826 2018-07-09 Tom Tromey <tom@tromey.com>
1827
1828 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
1829 (LIBGDB_OBS, clean mostlyclean): Update.
1830 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
1831
1832 2018-07-09 Tom Tromey <tom@tromey.com>
1833
1834 * Makefile.in (%.c: %.y): Use ECHO_YACC.
1835 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
1836 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
1837
1838 2018-07-09 Tom Tromey <tom@tromey.com>
1839
1840 * Makefile.in (ALLDEPFILES): Remove exec.c.
1841 (COMMON_OBS): Remove exec.o.
1842 (COMMON_SFILES): Add exec.c.
1843
1844 2018-07-09 Tom Tromey <tom@tromey.com>
1845
1846 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
1847
1848 2018-07-09 Tom Tromey <tom@tromey.com>
1849
1850 * Makefile.in (clean mostlyclean): Remove stamp-version.
1851 (version.c): Depend on stamp-version.
1852 (stamp-version): New rule, from version.c rule.
1853
1854 2018-07-09 Tom Tromey <tom@tromey.com>
1855
1856 * Makefile.in (init.c): Depend on stamp-init.
1857 (stamp-init): New rule, from init.c rule.
1858 (clean mostlyclean): Remove stamp-init.
1859
1860 2018-07-09 Tom Tromey <tom@tromey.com>
1861
1862 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
1863 SUBDIR_GCC_COMPILE_SRCS.
1864
1865 2018-07-09 Tom Tromey <tom@tromey.com>
1866
1867 * Makefile.in (init.c): Remove some unused sed rules.
1868
1869 2018-07-09 Tom Tromey <tom@tromey.com>
1870
1871 * Makefile.in (TSOBS): Remove.
1872 (INIT_FILES): Update.
1873 (LIBGDB_OBS): Update.
1874 (COMMON_SFILES): Add inflow.c.
1875 (SFILES): Remove inflow.c.
1876
1877 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1878
1879 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
1880
1881 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
1882
1883 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
1884 get_saveloc_name, is_signal_frame_name, step_name,
1885 init_remote_name, create_addr_space_name,
1886 destroy_addr_space_name, search_unwind_table_name,
1887 find_dyn_list_name): Constify.
1888
1889 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
1890
1891 * darwin-nat.c (darwin_pthread_kill): New function.
1892 (darwin_resume_thread): Use darwin_pthread_kill.
1893
1894 2018-07-05 Tom de Vries <tdevries@suse.de>
1895
1896 * macroexp.c (macro_buffer) <operator=>: New member function.
1897
1898 2018-07-04 Tom Tromey <tom@tromey.com>
1899
1900 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
1901
1902 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
1903
1904 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
1905 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
1906 * maint.c: Likewise.
1907 * top.c: Likewise.
1908
1909 2018-07-04 Joel Brobecker <brobecker@adacore.com>
1910
1911 * NEWS: Create a new section for the next release branch.
1912 Rename the section of the current branch, now that it has
1913 been cut.
1914
1915 2018-07-04 Joel Brobecker <brobecker@adacore.com>
1916
1917 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
1918 * version.in: Bump version to 8.2.50.DATE-git.
1919
1920 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1921 Pedro Alves <palves@redhat.com>
1922
1923 * linux-nat.c (linux_init_ptrace): Rename to ...
1924 (linux_init_ptrace_procfs): ... this. Call
1925 linux_proc_init_warnings.
1926 (linux_nat_target::post_attach)
1927 (linux_nat_target::post_startup_inferior): Adjust.
1928 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
1929 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
1930
1931 2018-07-04 Tom de Vries <tdevries@suse.de>
1932
1933 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
1934 check ...
1935 (read_comp_unit_head): ... here.
1936
1937 2018-07-03 Tom Tromey <tom@tromey.com>
1938
1939 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
1940 (stop_tracing, tstatus_command)
1941 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
1942 (print_one_static_tracepoint_marker): Update.
1943 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
1944 std::vector.
1945 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
1946 VEC.
1947 (all_tracepoints, static_tracepoints_here): Return std::vector.
1948
1949 2018-07-03 Tom Tromey <tom@tromey.com>
1950
1951 * common/ptid.c (ptid_equal): Remove.
1952 * common/ptid.h (ptid_equal): Don't declare.
1953 * ada-tasks.c: Update.
1954 * breakpoint.c: Update.
1955 * common/agent.c: Update.
1956 * corelow.c: Update.
1957 * darwin-nat-info.c: Update.
1958 * darwin-nat.c: Update.
1959 * dcache.c: Update.
1960 * dtrace-probe.c: Update.
1961 * dummy-frame.c: Update.
1962 * fbsd-nat.c: Update.
1963 * frame.c: Update.
1964 * gdbthread.h: Update.
1965 * gnu-nat.c: Update.
1966 * go32-nat.c: Update.
1967 * inf-loop.c: Update.
1968 * inf-ptrace.c: Update.
1969 * infcall.c: Update.
1970 * infcmd.c: Update.
1971 * inflow.c: Update.
1972 * infrun.c: Update.
1973 * linux-fork.c: Update.
1974 * linux-nat.c: Update.
1975 * linux-thread-db.c: Update.
1976 * mi/mi-cmd-var.c: Update.
1977 * mi/mi-interp.c: Update.
1978 * mi/mi-main.c: Update.
1979 * nto-procfs.c: Update.
1980 * ppc-linux-tdep.c: Update.
1981 * procfs.c: Update.
1982 * python/py-inferior.c: Update.
1983 * python/py-record-btrace.c: Update.
1984 * python/py-record.c: Update.
1985 * ravenscar-thread.c: Update.
1986 * regcache.c: Update.
1987 * remote-sim.c: Update.
1988 * remote.c: Update.
1989 * sol-thread.c: Update.
1990 * solib.c: Update.
1991 * target.c: Update.
1992 * tui/tui-stack.c: Update.
1993 * varobj.c: Update.
1994 * windows-nat.c: Update.
1995 * windows-tdep.c: Update.
1996
1997 2018-07-03 Tom Tromey <tom@tromey.com>
1998
1999 * common/ptid.c (ptid_match): Remove.
2000 * common/ptid.h (ptid_match): Don't declare.
2001 * fbsd-nat.c: Update.
2002 * infcmd.c: Update.
2003 * infrun.c: Update.
2004 * linux-nat.c: Update.
2005 * record-btrace.c: Update.
2006 * regcache.c: Update.
2007 * remote.c: Update.
2008
2009 2018-07-03 Tom Tromey <tom@tromey.com>
2010
2011 * common/ptid.c (ptid_tid_p): Remove.
2012 * common/ptid.h (ptid_tid_p): Don't declare.
2013 * sol-thread.c: Update.
2014
2015 2018-07-03 Tom Tromey <tom@tromey.com>
2016
2017 * common/ptid.c (ptid_lwp_p): Remove.
2018 * common/ptid.h (ptid_lwp_p): Don't declare.
2019 * fbsd-nat.c: Update.
2020 * linux-nat.c: Update.
2021 * nat/linux-procfs.c: Update.
2022 * nat/x86-linux-dregs.c: Update.
2023 * sol-thread.c: Update.
2024
2025 2018-07-03 Tom Tromey <tom@tromey.com>
2026
2027 * common/ptid.c (ptid_is_pid): Remove.
2028 * common/ptid.h (ptid_is_pid): Don't declare.
2029 * infrun.c: Update.
2030 * linux-nat.c: Update.
2031 * mi/mi-interp.c: Update.
2032 * remote.c: Update.
2033 * thread.c: Update.
2034
2035 2018-07-03 Tom Tromey <tom@tromey.com>
2036
2037 * common/ptid.c (ptid_get_tid): Remove.
2038 * common/ptid.h (ptid_get_tid): Don't declare.
2039 * ada-tasks.c: Update.
2040 * aix-thread.c: Update.
2041 * bsd-uthread.c: Update.
2042 * darwin-nat.c: Update.
2043 * fbsd-nat.c: Update.
2044 * i386-darwin-nat.c: Update.
2045 * infrun.c: Update.
2046 * linux-tdep.c: Update.
2047 * nto-procfs.c: Update.
2048 * ppc-ravenscar-thread.c: Update.
2049 * python/py-infthread.c: Update.
2050 * ravenscar-thread.c: Update.
2051 * sol-thread.c: Update.
2052 * sparc-ravenscar-thread.c: Update.
2053 * windows-nat.c: Update.
2054
2055 2018-07-03 Tom Tromey <tom@tromey.com>
2056
2057 * common/ptid.c (ptid_get_lwp): Remove.
2058 * common/ptid.h (ptid_get_lwp): Don't declare.
2059 * aarch64-linux-nat.c: Update.
2060 * ada-tasks.c: Update.
2061 * aix-thread.c: Update.
2062 * amd64-linux-nat.c: Update.
2063 * arm-linux-nat.c: Update.
2064 * corelow.c: Update.
2065 * fbsd-nat.c: Update.
2066 * fbsd-tdep.c: Update.
2067 * gnu-nat.c: Update.
2068 * i386-cygwin-tdep.c: Update.
2069 * i386-gnu-nat.c: Update.
2070 * i386-linux-nat.c: Update.
2071 * ia64-linux-nat.c: Update.
2072 * inf-ptrace.c: Update.
2073 * infrun.c: Update.
2074 * linux-fork.c: Update.
2075 * linux-nat.c: Update.
2076 * linux-tdep.c: Update.
2077 * linux-thread-db.c: Update.
2078 * mips-linux-nat.c: Update.
2079 * nat/aarch64-linux-hw-point.c: Update.
2080 * nat/aarch64-linux.c: Update.
2081 * nat/linux-btrace.c: Update.
2082 * nat/linux-osdata.c: Update.
2083 * nat/linux-procfs.c: Update.
2084 * nat/x86-linux-dregs.c: Update.
2085 * obsd-nat.c: Update.
2086 * ppc-fbsd-nat.c: Update.
2087 * ppc-linux-nat.c: Update.
2088 * procfs.c: Update.
2089 * python/py-infthread.c: Update.
2090 * ravenscar-thread.c: Update.
2091 * remote.c: Update.
2092 * s390-linux-nat.c: Update.
2093 * sol-thread.c: Update.
2094 * sol2-tdep.c: Update.
2095 * spu-linux-nat.c: Update.
2096 * x86-linux-nat.c: Update.
2097 * xtensa-linux-nat.c: Update.
2098
2099 2018-07-03 Tom Tromey <tom@tromey.com>
2100
2101 * common/ptid.c (ptid_get_pid): Remove.
2102 * common/ptid.h (ptid_get_pid): Don't declare.
2103 * aarch64-linux-nat.c: Update.
2104 * ada-lang.c: Update.
2105 * aix-thread.c: Update.
2106 * alpha-bsd-nat.c: Update.
2107 * amd64-fbsd-nat.c: Update.
2108 * amd64-linux-nat.c: Update.
2109 * arm-linux-nat.c: Update.
2110 * arm-nbsd-nat.c: Update.
2111 * auxv.c: Update.
2112 * break-catch-syscall.c: Update.
2113 * breakpoint.c: Update.
2114 * bsd-uthread.c: Update.
2115 * corelow.c: Update.
2116 * ctf.c: Update.
2117 * darwin-nat.c: Update.
2118 * fbsd-nat.c: Update.
2119 * fbsd-tdep.c: Update.
2120 * gcore.c: Update.
2121 * gnu-nat.c: Update.
2122 * hppa-nbsd-nat.c: Update.
2123 * hppa-obsd-nat.c: Update.
2124 * i386-fbsd-nat.c: Update.
2125 * ia64-linux-nat.c: Update.
2126 * inf-ptrace.c: Update.
2127 * infcmd.c: Update.
2128 * inferior.c: Update.
2129 * inferior.h: Update.
2130 * inflow.c: Update.
2131 * infrun.c: Update.
2132 * linux-fork.c: Update.
2133 * linux-nat.c: Update.
2134 * linux-tdep.c: Update.
2135 * linux-thread-db.c: Update.
2136 * m68k-bsd-nat.c: Update.
2137 * mi/mi-interp.c: Update.
2138 * mi/mi-main.c: Update.
2139 * mips-linux-nat.c: Update.
2140 * mips-nbsd-nat.c: Update.
2141 * mips64-obsd-nat.c: Update.
2142 * nat/aarch64-linux-hw-point.c: Update.
2143 * nat/aarch64-linux.c: Update.
2144 * nat/linux-btrace.c: Update.
2145 * nat/linux-osdata.c: Update.
2146 * nat/linux-procfs.c: Update.
2147 * nat/x86-linux-dregs.c: Update.
2148 * nto-procfs.c: Update.
2149 * obsd-nat.c: Update.
2150 * ppc-linux-nat.c: Update.
2151 * ppc-nbsd-nat.c: Update.
2152 * ppc-obsd-nat.c: Update.
2153 * proc-service.c: Update.
2154 * procfs.c: Update.
2155 * python/py-inferior.c: Update.
2156 * python/py-infthread.c: Update.
2157 * ravenscar-thread.c: Update.
2158 * record.c: Update.
2159 * remote-sim.c: Update.
2160 * remote.c: Update.
2161 * rs6000-nat.c: Update.
2162 * s390-linux-nat.c: Update.
2163 * sh-nbsd-nat.c: Update.
2164 * sol-thread.c: Update.
2165 * sparc-nat.c: Update.
2166 * sparc64-tdep.c: Update.
2167 * spu-linux-nat.c: Update.
2168 * spu-tdep.c: Update.
2169 * target-debug.h: Update.
2170 * target.c: Update.
2171 * thread.c: Update.
2172 * tid-parse.c: Update.
2173 * tracefile-tfile.c: Update.
2174 * vax-bsd-nat.c: Update.
2175 * windows-nat.c: Update.
2176 * x86-linux-nat.c: Update.
2177 * x86-nat.c: Update.
2178
2179 2018-07-03 Tom Tromey <tom@tromey.com>
2180
2181 * common/ptid.c (pid_to_ptid): Remove.
2182 * common/ptid.h (pid_to_ptid): Don't declare.
2183 * aix-thread.c: Update.
2184 * arm-linux-nat.c: Update.
2185 * common/ptid.c: Update.
2186 * common/ptid.h: Update.
2187 * corelow.c: Update.
2188 * ctf.c: Update.
2189 * darwin-nat.c: Update.
2190 * fbsd-nat.c: Update.
2191 * fork-child.c: Update.
2192 * gnu-nat.c: Update.
2193 * go32-nat.c: Update.
2194 * inf-ptrace.c: Update.
2195 * infcmd.c: Update.
2196 * inferior.c: Update.
2197 * infrun.c: Update.
2198 * linux-fork.c: Update.
2199 * linux-nat.c: Update.
2200 * nat/aarch64-linux-hw-point.c: Update.
2201 * nat/fork-inferior.c: Update.
2202 * nat/x86-linux-dregs.c: Update.
2203 * nto-procfs.c: Update.
2204 * obsd-nat.c: Update.
2205 * procfs.c: Update.
2206 * progspace.c: Update.
2207 * remote.c: Update.
2208 * rs6000-nat.c: Update.
2209 * s390-linux-nat.c: Update.
2210 * sol-thread.c: Update.
2211 * spu-linux-nat.c: Update.
2212 * target.c: Update.
2213 * top.c: Update.
2214 * tracefile-tfile.c: Update.
2215 * windows-nat.c: Update.
2216
2217 2018-07-03 Tom Tromey <tom@tromey.com>
2218
2219 * common/ptid.h (ptid_build): Don't declare.
2220 * common/ptid.c (ptid_build): Remove.
2221 * aix-thread.c: Update.
2222 * bsd-kvm.c: Update.
2223 * bsd-uthread.c: Update.
2224 * common/agent.c: Update.
2225 * common/ptid.c: Update.
2226 * common/ptid.h: Update.
2227 * corelow.c: Update.
2228 * darwin-nat.c: Update.
2229 * fbsd-nat.c: Update.
2230 * gnu-nat.c: Update.
2231 * linux-fork.c: Update.
2232 * linux-nat.c: Update.
2233 * linux-thread-db.c: Update.
2234 * nat/linux-osdata.c: Update.
2235 * nat/linux-procfs.c: Update.
2236 * nto-procfs.c: Update.
2237 * obsd-nat.c: Update.
2238 * proc-service.c: Update.
2239 * procfs.c: Update.
2240 * ravenscar-thread.c: Update.
2241 * remote-sim.c: Update.
2242 * remote.c: Update.
2243 * sol-thread.c: Update.
2244 * target.c: Update.
2245 * windows-nat.c: Update.
2246
2247 2018-07-03 Tom Tromey <tom@tromey.com>
2248
2249 * infrun.c (follow_exec): Use exit_inferior_silent.
2250 * inferior.c (exit_inferior_num_silent): Remove.
2251 * inferior.h (exit_inferior_num_silent): Don't declare.
2252
2253 2018-07-03 Tom Tromey <tom@tromey.com>
2254
2255 PR cli/23340:
2256 * darwin-nat.c (darwin_attach_pid): Reset inferior and
2257 inferior_ptid on error.
2258
2259 2018-07-02 Maciej W. Rozycki <macro@mips.com>
2260 Simon Marchi <simon.marchi@polymtl.ca>
2261
2262 PR tdep/8282
2263 * disasm.h (gdb_disassembler): Add
2264 `m_disassembler_options_holder'. member
2265 * disasm.c (get_all_disassembler_options): New function.
2266 (gdb_disassembler::gdb_disassembler): Use it.
2267 (gdb_buffered_insn_length_init_dis): Likewise.
2268 (gdb_buffered_insn_length): Adjust accordingly.
2269 (set_disassembler_options): Handle options with arguments.
2270 (show_disassembler_options_sfunc): Likewise. Add a leading new
2271 line if showing options with descriptions.
2272 (disassembler_options_completer): Adapt to using the
2273 `disasm_options_and_args_t' structure.
2274 * mips-tdep.c (mips_disassembler_options): New variable.
2275 (mips_disassembler_options_o32): Likewise.
2276 (mips_disassembler_options_n32): Likewise.
2277 (mips_disassembler_options_n64): Likewise.
2278 (gdb_print_insn_mips): Don't set `disassembler_options'.
2279 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
2280 functions.
2281 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
2282 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
2283 `gdbarch_disassembler_options_implicit' and
2284 `gdbarch_valid_disassembler_options'.
2285 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
2286 `disasm_options_and_args_t' structure.
2287 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
2288 method.
2289 (valid_disassembler_options): Switch from `disasm_options_t' to
2290 the `disasm_options_and_args_t' structure.
2291 * NEWS: Document `set disassembler-options' support for the MIPS
2292 target.
2293 * gdbarch.h: Regenerate.
2294 * gdbarch.c: Regenerate.
2295
2296 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
2297
2298 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
2299
2300 2018-06-29 Joel Brobecker <brobecker@adacore.com>
2301
2302 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
2303 parameter in call to amd64_target_description.
2304 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
2305 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
2306 (amd64fbsd_init_abi): Likewise.
2307 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
2308 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
2309 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
2310 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
2311
2312 2018-06-29 Pedro Alves <palves@redhat.com>
2313
2314 * gdb/amd64-tdep.h (amd64_create_target_description): Add
2315 "segments" parameter.
2316 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
2317 (_initialize_amd64_tdep): Update call to
2318 amd64_create_target_description.
2319 (amd64_target_description): Add "segments" parameter. Adjust
2320 the implementation to use it.
2321 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
2322 call to amd64_create_target_description.
2323 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
2324 * gdb/arch/amd64.h (amd64_create_target_description): Add
2325 "segments" register.
2326 * gdb/arch/amd64.c (amd64_create_target_description): Add
2327 "segments" parameter. Call create_feature_i386_64bit_segments
2328 only if SEGMENTS is true.
2329 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
2330 call to amd64_create_target_description.
2331
2332 2018-06-29 Pedro Alves <palves@redhat.com>
2333
2334 * thread.c (thread_target_id_str): New, factored out from ...
2335 (print_thread_info_1): ... here. Use it to compute the max
2336 "Target Id" column width.
2337
2338 2018-06-29 Pedro Alves <palves@redhat.com>
2339
2340 * remote.c (remote_target::extra_thread_info): Delete
2341 'display_buf' and 'n' locals. from the cache, regardless of
2342 packet mechanims is in use. Use cache for qThreadExtra and qP
2343 methods too.
2344
2345 2018-06-29 Pedro Alves <palves@redhat.com>
2346
2347 * blockframe.c (find_pc_sect_containing_function): New function.
2348 * breakpoint.c (print_breakpoint_location): Don't call
2349 find_pc_sect_function.
2350 * linespec.c (create_sals_line_offset): Record the location's
2351 symbol in the sal.
2352 * linespec.c (convert_address_location_to_sals): Fill in sal's
2353 symbol with find_pc_sect_containing_function.
2354 * symtab.c (find_function_start_sal): Rename to ...
2355 (find_function_start_sal_1): ... this.
2356 (find_function_start_sal): Reimplement as wrapper around
2357 find_function_start_sal_1, and use
2358 find_pc_sect_containing_function to fill in the sal's symbol.
2359 (find_function_start_sal(symbol*, bool)): Adjust.
2360 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
2361 comments.
2362 (find_pc_sect_containing_function): Declare.
2363
2364 2018-06-29 Pedro Alves <palves@redhat.com>
2365
2366 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
2367 true if the the location has no symbol.
2368
2369 2018-06-28 Tom Tromey <tom@tromey.com>
2370
2371 * NEWS: Mention --enable-codesign.
2372 * silent-rules.mk (ECHO_SIGN): New variable.
2373 * configure.ac: Add --enable-codesign.
2374 * configure: Rebuild.
2375 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
2376 (gdb$(EXEEXT)): Optionally invoke codesign.
2377
2378 2018-06-28 Pedro Alves <palves@redhat.com>
2379
2380 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
2381 comments.
2382 (switch_to_thread_no_regs): Adjust comment.
2383 * infcmd.c (stop_pc): Delete.
2384 (post_create_inferior, info_program_command): Replace references
2385 to stop_pc with references to thread_info->suspend.stop_pc.
2386 * inferior.h (stop_pc): Delete declaration.
2387 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
2388 (handle_inferior_event_1, handle_signal_stop)
2389 (process_event_stop_test, keep_going_stepped_thread)
2390 (handle_step_into_function, handle_step_into_function_backward)
2391 (print_stop_location): Replace references to stop_pc with
2392 references to thread_info->suspend.stop_pc.
2393 (struct infcall_suspend_state) <stop_pc>: Delete field.
2394 (save_infcall_suspend_state, restore_infcall_suspend_state):
2395 Remove references to inf_stat->stop_pc.
2396 * linux-fork.c (fork_load_infrun_state): Likewise.
2397 * record-btrace.c (record_btrace_set_replay): Likewise.
2398 * record-full.c (record_full_goto_entry): Likewise.
2399 * remote.c (print_one_stopped_thread): Likewise.
2400 * target.c (target_resume): Extend comment.
2401 * thread.c (set_executing_thread): New.
2402 (set_executing): Use it.
2403 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
2404 Remove references to stop_pc.
2405
2406 2018-06-28 Pedro Alves <palves@redhat.com>
2407
2408 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
2409 Moving fetching stop_pc until after ecs->event_thread is refreshed.
2410
2411 2018-06-28 Tom Tromey <tom@tromey.com>
2412
2413 * coffread.c (coff_symfile_finish): Update.
2414 * xcoffread.c (xcoff_symfile_finish): Update.
2415 * elfread.c (elf_symfile_finish): Update.
2416 * symfile.h (dwarf2_free_objfile): Don't declare.
2417 * dwarf2read.c (_initialize_dwarf2_read): Use
2418 register_objfile_data_with_cleanup.
2419 (dwarf2_free_objfile): Now static. Change signature.
2420
2421 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2422
2423 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
2424 option "-o" to add-symbol-file-load to add an offset to each
2425 section's load address.
2426 * symfile.c (set_objfile_default_section_offset): New function.
2427
2428 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2429
2430 * symfile.c (add_symbol_file_command): Make sure that sections
2431 with the same name are sorted in the same order.
2432
2433 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2434
2435 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
2436 require the second argument. If omitted, load sections at the
2437 addresses specified in the file.
2438
2439 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2440
2441 * symfile.c (symbol_file_command, symbol_file_add_main_1)
2442 (_initialize_symfile): Add option "-o" to symbol-file to add an
2443 offset to each section of the symbol file.
2444
2445 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2446
2447 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
2448
2449 2018-06-27 Tom Tromey <tom@tromey.com>
2450
2451 * stack.c (_initialize_stack): Update "func" help text.
2452
2453 2018-06-27 Tom Tromey <tom@tromey.com>
2454
2455 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
2456 std::vector.
2457 (unwind_infopy_str, pyuw_create_unwind_info)
2458 (unwind_infopy_add_saved_register, pyuw_sniffer)
2459 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
2460 Update.
2461 (struct saved_reg): Add constructor.
2462 <value>: Now a gdbpy_ref<>.
2463
2464 2018-06-27 Tom Tromey <tom@tromey.com>
2465
2466 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
2467
2468 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2469
2470 * gdb-gdb.py.in: Format using autopep8.
2471
2472 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2473
2474 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
2475 (type_lookup_function): Recognize CORE_ADDR values.
2476
2477 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2478
2479 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
2480 print tag_name.
2481
2482 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2483
2484 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
2485 <__lt__>: Add.
2486
2487 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2488
2489 * gdb-gdb.py: Move to...
2490 * gdb-gdb.py.in: ... here.
2491 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
2492 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
2493 dependencies.
2494 (distclean): Remove gdb-gdb.py when cleaning.
2495 (gdb-gdb.py, gdb-gdb.gdb): New rules.
2496 * configure: Re-generate.
2497
2498 2018-06-27 Pedro Alves <palves@redhat.com>
2499
2500 * proc-service.c (get_ps_regcache): New.
2501 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2502 (ps_lsetfpregs): Use it.
2503
2504 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
2505
2506 PR gdb/21695
2507 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
2508 (dwarf_decode_lines_1): Adjust.
2509
2510 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2511
2512 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
2513 override.
2514 <info_proc>: Likewise.
2515
2516 2018-06-26 Joel Brobecker <brobecker@adacore.com>
2517
2518 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
2519 to windows_fetch_one_register, and only handle the case of
2520 fetching one register. Move the code that reloads the context
2521 and iterates over all registers if R is negative to...
2522 (windows_nat_target::fetch_registers): ... here.
2523 (do_windows_store_inferior_registers): Rename to
2524 windows_store_one_register, and only handle the case of storing
2525 one register. Move the code that handles the case where r is
2526 negative to...
2527 (windows_nat_target::store_registers) ... here.
2528
2529 2018-06-26 Tom Tromey <tom@tromey.com>
2530
2531 PR rust/22574:
2532 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
2533 * rust-lang.c (rust_print_struct_def): Add podata parameter.
2534 Update.
2535 (rust_internal_print_type): Add podata parameter.
2536 (rust_print_type): Update.
2537
2538 2018-06-26 Tom Tromey <tom@tromey.com>
2539
2540 * typeprint.h (struct print_offset_data) <update, finish,
2541 maybe_print_hole>: New methods.
2542 <indentation>: New constant.
2543 * typeprint.c (print_offset_data::indentation): Define.
2544 (print_offset_data::maybe_print_hole, print_offset_data::update)
2545 (print_offset_data::finish): Move from c-typeprint.c and rename.
2546 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
2547 (print_spaces_filtered_with_print_options): Update.
2548 (c_print_type_union_field_offset, maybe_print_hole)
2549 (c_print_type_struct_field_offset): Move to typeprint.c and
2550 rename.
2551 (c_type_print_base_struct_union): Update.
2552
2553 2018-06-25 Pedro Alves <palves@redhat.com>
2554
2555 * gdbthread.h (thread_info_ref, delete_thread)
2556 (delete_thread_silent, first_thread_of_inferior)
2557 (any_thread_of_inferior, switch_to_thread)
2558 (enable_thread_stack_temporaries)
2559 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2560 (get_last_thread_stack_temporary)
2561 (value_in_thread_stack_temporaries, can_access_registers_thread):
2562 Spell out "struct thread_info" instead of just "thread_info".
2563 * inferior.h (notice_new_inferior): Likewise.
2564
2565 2018-06-25 Pedro Alves <palves@redhat.com>
2566
2567 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2568 pass thread_info pointer to delete_thread.
2569 (windows_nat_target::detach): Pass inferior pointer to
2570 detach_inferior.
2571 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
2572 delete_thread.
2573 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
2574 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
2575 and pass a thread_info pointer to delete_thread.
2576 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
2577 pass thread_info pointer to delete_thread.
2578 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
2579 delete_thread_silent call.
2580 * procfs.c (procfs_target::detach): Pass inferior pointer to
2581 detach_inferior.
2582 (procfs_target::wait): Pass thread_info pointer to delete_thread.
2583 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
2584 delete_thread_silent call.
2585 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2586 pass thread_info pointer to delete_thread.
2587 (windows_nat_target::detach): Pass inferior pointer to
2588 delete_inferior.
2589
2590 2018-06-22 Alan Hayward <alan.hayward@arm.com>
2591
2592 * regcache.c (readable_regcache::read_part): Fix asserts.
2593 (reg_buffer::raw_collect_part): New function.
2594 (regcache::write_part): Fix asserts.
2595 (reg_buffer::raw_supply_part): New function.
2596 (regcache::transfer_regset_register): New helper function.
2597 (regcache::transfer_regset): Call new functions.
2598 (regcache_supply_regset): Use gdb_byte*.
2599 (regcache::supply_regset): Likewise.
2600 (regcache_collect_regset): Likewise.
2601 (regcache::collect_regset): Likewise.
2602 * regcache.h (reg_buffer::raw_collect_part): New declaration.
2603 (reg_buffer::raw_supply_part): Likewise.
2604 (regcache::transfer_regset_register): Likewise.
2605 (regcache::transfer_regset): Use gdb_byte*.
2606
2607 2018-06-22 Alan Hayward <alan.hayward@arm.com>
2608
2609 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
2610
2611 2018-06-21 Pedro Alves <palves@redhat.com>
2612
2613 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
2614 instead of a ptid_t. All callers adjusted.
2615 * ada-tasks.c (ada_get_task_number): Likewise. All callers
2616 adjusted.
2617 (print_ada_task_info, display_current_task_id, task_command_1):
2618 Adjust.
2619 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
2620 inferior_thread.
2621 (breakpoint_kind): Adjust.
2622 (remove_breakpoints_pid): Rename to ...
2623 (remove_breakpoints_inf): ... this. Adjust to take an inferior
2624 pointer. All callers adjusted.
2625 (bpstat_clear_actions): Use inferior_thread.
2626 (get_bpstat_thread): New.
2627 (bpstat_do_actions): Use it.
2628 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
2629 to take a thread_info pointer. All callers adjusted.
2630 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
2631 (breakpoint_re_set_thread): Use inferior_thread.
2632 * breakpoint.h (struct inferior): Forward declare.
2633 (bpstat_stop_status): Update.
2634 (remove_breakpoints_pid): Delete.
2635 (remove_breakpoints_inf): New.
2636 * bsd-uthread.c (bsd_uthread_target::wait)
2637 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
2638 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
2639 (maint_btrace_packet_history_cmd)
2640 (maint_btrace_clear_packet_history_cmd): Adjust.
2641 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
2642 inferior_thread.
2643 * cli/cli-interp.c: Include "inferior.h".
2644 * common/refcounted-object.h (struct
2645 refcounted_object_ref_policy): New.
2646 * compile/compile-object-load.c: Include gdbthread.h.
2647 (store_regs): Use inferior_thread.
2648 * corelow.c (core_target::close): Use current_inferior.
2649 (core_target_open): Adjust to use first_thread_of_inferior and use
2650 the current inferior.
2651 * ctf.c (ctf_target::close): Adjust to use current_inferior.
2652 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
2653 <thread>: ... this new field. All references adjusted.
2654 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
2655 Take a thread_info pointer instead of a ptid_t.
2656 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
2657 (dummy_frame_discard, register_dummy_frame_dtor): Take a
2658 thread_info pointer instead of a ptid_t.
2659 * elfread.c: Include "inferior.h".
2660 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
2661 Use inferior_thread.
2662 * eval.c (evaluate_subexp): Likewise.
2663 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
2664 inferior_thread.
2665 * gdb_proc_service.h (struct thread_info): Forward declare.
2666 (struct ps_prochandle) <ptid>: Delete, replaced by ...
2667 <thread>: ... this new field. All references adjusted.
2668 * gdbarch.h, gdbarch.c: Regenerate.
2669 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
2670 'thread' parameter. All implementations and callers adjusted.
2671 * gdbthread.h (thread_info) <set_running>: New method.
2672 (delete_thread, delete_thread_silent): Take a thread_info pointer
2673 instead of a ptid.
2674 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
2675 (first_thread_of_process): Delete, replaced by ...
2676 (first_thread_of_inferior): ... this new function. All callers
2677 adjusted.
2678 (any_live_thread_of_process): Delete, replaced by ...
2679 (any_live_thread_of_inferior): ... this new function. All callers
2680 adjusted.
2681 (switch_to_thread, switch_to_no_thread): Declare.
2682 (is_executing): Delete.
2683 (enable_thread_stack_temporaries): Update comment.
2684 <enable_thread_stack_temporaries>: Take a thread_info pointer
2685 instead of a ptid_t. Incref the thread.
2686 <~enable_thread_stack_temporaries>: Decref the thread.
2687 <m_ptid>: Delete
2688 <m_thr>: New.
2689 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2690 (get_last_thread_stack_temporary)
2691 (value_in_thread_stack_temporaries, can_access_registers_thread):
2692 Take a thread_info pointer instead of a ptid_t. All callers
2693 adjusted.
2694 * infcall.c (get_call_return_value): Use inferior_thread.
2695 (run_inferior_call): Work with thread pointers instead of ptid_t.
2696 (call_function_by_hand_dummy): Work with thread pointers instead
2697 of ptid_t. Use thread_info_ref.
2698 * infcmd.c (proceed_thread_callback): Access thread's state
2699 directly.
2700 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
2701 access thread's state directly.
2702 (continue_command): Use inferior_thread.
2703 (info_program_command): Use find_thread_ptid and access thread
2704 state directly.
2705 (proceed_after_attach_callback): Use thread state directly.
2706 (notice_new_inferior): Take a thread_info pointer instead of a
2707 ptid_t. All callers adjusted.
2708 (exit_inferior): Take an inferior pointer instead of a pid. All
2709 callers adjusted.
2710 (exit_inferior_silent): New.
2711 (detach_inferior): Delete.
2712 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
2713 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
2714 (detach_inferior_command, kill_inferior_command): Use
2715 find_inferior_id instead of valid_gdb_inferior_id and
2716 gdb_inferior_id_to_pid.
2717 (inferior_command): Use inferior and thread pointers.
2718 * inferior.h (struct thread_info): Forward declare.
2719 (notice_new_inferior): Take a thread_info pointer instead of a
2720 ptid_t. All callers adjusted.
2721 (detach_inferior): Delete declaration.
2722 (exit_inferior, exit_inferior_silent): Take an inferior pointer
2723 instead of a pid. All callers adjusted.
2724 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
2725 (valid_gdb_inferior_id): Delete.
2726 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
2727 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
2728 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
2729 ...
2730 <inf>: ... this new field.
2731 <step_ptid>: Delete, replaced by ...
2732 <step_thread>: ... this new field.
2733 (get_displaced_stepping_state): Take an inferior pointer instead
2734 of a pid. All callers adjusted.
2735 (displaced_step_in_progress_any_inferior): Adjust.
2736 (displaced_step_in_progress_thread): Take a thread pointer instead
2737 of a ptid_t. All callers adjusted.
2738 (displaced_step_in_progress, add_displaced_stepping_state): Take
2739 an inferior pointer instead of a pid. All callers adjusted.
2740 (get_displaced_step_closure_by_addr): Adjust.
2741 (remove_displaced_stepping_state): Take an inferior pointer
2742 instead of a pid. All callers adjusted.
2743 (displaced_step_prepare_throw, displaced_step_prepare)
2744 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
2745 All callers adjusted.
2746 (start_step_over): Adjust.
2747 (infrun_thread_ptid_changed): Remove bit updating ptids in the
2748 displaced step queue.
2749 (do_target_resume): Adjust.
2750 (fetch_inferior_event): Use inferior_thread.
2751 (context_switch, get_inferior_stop_soon): Take an
2752 execution_control_state pointer instead of a ptid_t. All callers
2753 adjusted.
2754 (switch_to_thread_cleanup): Delete.
2755 (stop_all_threads): Use scoped_restore_current_thread.
2756 * inline-frame.c: Include "gdbthread.h".
2757 (inline_state) <inline_state>: Take a thread pointer instead of a
2758 ptid_t. All callers adjusted.
2759 <ptid>: Delete, replaced by ...
2760 <thread>: ... this new field.
2761 (find_inline_frame_state): Take a thread pointer instead of a
2762 ptid_t. All callers adjusted.
2763 (skip_inline_frames, step_into_inline_frame)
2764 (inline_skipped_frames, inline_skipped_symbol): Take a thread
2765 pointer instead of a ptid_t. All callers adjusted.
2766 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
2767 (inline_skipped_frames, inline_skipped_symbol): Likewise.
2768 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
2769 pointers directly.
2770 * linux-nat.c (get_detach_signal): Likewise.
2771 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
2772 (thread_db_notice_clone): Adjust.
2773 (thread_db_find_new_threads_silently)
2774 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
2775 a thread pointer instead of a ptid_t. All callers adjusted.
2776 * mi/mi-cmd-var.c: Include "inferior.h".
2777 (mi_cmd_var_update_iter): Update to use thread pointers.
2778 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
2779 inferior directly.
2780 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
2781 out to ...
2782 (mi_output_running): ... this new function.
2783 (mi_on_resume_1): Adjust to use it.
2784 (mi_user_selected_context_changed): Adjust to use inferior_thread.
2785 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
2786 directly.
2787 (interrupt_thread_callback): : Adjust to use thread and inferior
2788 pointers.
2789 * proc-service.c: Include "gdbthread.h".
2790 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
2791 * progspace-and-thread.c: Include "inferior.h".
2792 * progspace.c: Include "inferior.h".
2793 * python/py-exitedevent.c (create_exited_event_object): Adjust to
2794 hold a reference to an inferior_object.
2795 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
2796 inferior_thread.
2797 * python/py-inferior.c (struct inferior_object): Give the type a
2798 tag name instead of a typedef.
2799 (python_on_normal_stop): No need to check if the current thread is
2800 listed.
2801 (inferior_to_inferior_object): Change return type to
2802 inferior_object. All callers adjusted.
2803 (find_thread_object): Delete, bits factored out to ...
2804 (thread_to_thread_object): ... this new function.
2805 * python/py-infthread.c (create_thread_object): Use
2806 inferior_to_inferior_object.
2807 (thpy_is_stopped): Use thread pointer directly.
2808 (gdbpy_selected_thread): Use inferior_thread.
2809 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
2810 field, replaced with ...
2811 <thread>: ... this new field. All users adjusted.
2812 (btpy_insn_or_gap_new): Drop const.
2813 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
2814 callers adjusted.
2815 * python/py-record.c: Include "gdbthread.h".
2816 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2817 a ptid_t. All callers adjusted.
2818 (gdbpy_current_recording): Use inferior_thread.
2819 * python/py-record.h (recpy_record_object) <ptid>: Delete
2820 field, replaced with ...
2821 <thread>: ... this new field. All users adjusted.
2822 (recpy_element_object) <ptid>: Delete
2823 field, replaced with ...
2824 <thread>: ... this new field. All users adjusted.
2825 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2826 a ptid_t. All callers adjusted.
2827 * python/py-threadevent.c: Include "gdbthread.h".
2828 (get_event_thread): Use thread_to_thread_object.
2829 * python/python-internal.h (struct inferior_object): Forward
2830 declare.
2831 (find_thread_object, find_inferior_object): Delete declarations.
2832 (thread_to_thread_object, inferior_to_inferior_object): New
2833 declarations.
2834 * record-btrace.c: Include "inferior.h".
2835 (require_btrace_thread): Use inferior_thread.
2836 (record_btrace_frame_sniffer)
2837 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
2838 (get_thread_current_frame): Use scoped_restore_current_thread and
2839 switch_to_thread.
2840 (get_thread_current_frame): Use thread pointer directly.
2841 (record_btrace_replay_at_breakpoint): Use thread's inferior
2842 pointer directly.
2843 * record-full.c: Include "inferior.h".
2844 * regcache.c: Include "gdbthread.h".
2845 (get_thread_arch_regcache): Use the inferior's address space
2846 directly.
2847 (get_thread_regcache, registers_changed_thread): New.
2848 * regcache.h (get_thread_regcache(thread_info *thread)): New
2849 overload.
2850 (registers_changed_thread): New.
2851 (remote_target) <remote_detach_1>: Swap order of parameters.
2852 (remote_add_thread): <remote_add_thread>: Return the new thread.
2853 (get_remote_thread_info(ptid_t)): New overload.
2854 (remote_target::remote_notice_new_inferior): Use thread pointers
2855 directly.
2856 (remote_target::process_initial_stop_replies): Use
2857 thread_info::set_running.
2858 (remote_target::remote_detach_1, remote_target::detach)
2859 (extended_remote_target::detach): Adjust.
2860 * stack.c (frame_show_address): Use inferior_thread.
2861 * target-debug.h (target_debug_print_thread_info_pp): New.
2862 * target-delegates.c: Regenerate.
2863 * target.c (default_thread_address_space): Delete.
2864 (memory_xfer_partial_1): Use current_inferior.
2865 (target_detach): Use current_inferior.
2866 (target_thread_address_space): Delete.
2867 (generic_mourn_inferior): Use current_inferior.
2868 * target.h (struct target_ops) <thread_address_space>: Delete.
2869 (target_thread_address_space): Delete.
2870 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
2871 pointers directly.
2872 (delete_thread_1, delete_thread, delete_thread_silent): Take a
2873 thread pointer instead of a ptid_t. Adjust all callers.
2874 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
2875 (first_thread_of_process): Delete, replaced by ...
2876 (first_thread_of_inferior): ... this new function. All callers
2877 adjusted.
2878 (any_thread_of_process): Rename to ...
2879 (any_thread_of_inferior): ... this, and take an inferior pointer.
2880 (any_live_thread_of_process): Rename to ...
2881 (any_live_thread_of_inferior): ... this, and take an inferior
2882 pointer.
2883 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2884 (value_in_thread_stack_temporaries)
2885 (get_last_thread_stack_temporary): Take a thread pointer instead
2886 of a ptid_t. Adjust all callers.
2887 (thread_info::set_running): New.
2888 (validate_registers_access): Use inferior_thread.
2889 (can_access_registers_ptid): Rename to ...
2890 (can_access_registers_thread): ... this, and take a thread
2891 pointer.
2892 (print_thread_info_1): Adjust to compare thread pointers instead
2893 of ptids.
2894 (switch_to_no_thread, switch_to_thread): Make extern.
2895 (scoped_restore_current_thread::~scoped_restore_current_thread):
2896 Use m_thread pointer directly.
2897 (scoped_restore_current_thread::scoped_restore_current_thread):
2898 Use inferior_thread.
2899 (thread_command): Use thread pointer directly.
2900 (thread_num_make_value_helper): Use inferior_thread.
2901 * top.c (execute_command): Use inferior_thread.
2902 * tui/tui-interp.c: Include "inferior.h".
2903 * varobj.c (varobj_create): Use inferior_thread.
2904 (value_of_root_1): Use find_thread_global_id instead of
2905 global_thread_id_to_ptid.
2906
2907 2018-06-21 Alan Hayward <alan.hayward@arm.com>
2908
2909 * regcache.c (readable_regcache::read_part): Avoid memcpy when
2910 possible.
2911 (regcache::write_part): Likewise.
2912 (readable_regcache::cooked_read_part): Update comment.
2913 (readable_regcache::cooked_write_part): Likewise.
2914 * regcache.h: (readable_regcache::read_part): Likewise.
2915 (regcache::write_part): Likewise.
2916
2917 2018-06-21 Richard Bunt <richard.bunt@arm.com>
2918 Dirk Schubert <dirk.schubert@arm.com>
2919
2920 * aarch64-linux-nat.c (post_attach): New.
2921 (aarch64_linux_nat_target::post_attach): Override post_attach to
2922 record the number of hardware debug registers.
2923
2924 2018-06-20 Tom Tromey <tom@tromey.com>
2925
2926 * python/py-param.c (add_setshow_generic): Make parameters const.
2927 (parmpy_init): Update.
2928
2929 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
2930
2931 * regcache.h (regcache_cooked_read_ftype): Rename to...
2932 (register_read_ftype): ...this, change type to function_view.
2933 (class reg_buffer) <save>: Remove src parameter.
2934 (readonly_detached_regcache) <readonly_detached_regcache>: Make
2935 parameter non-const in first overload. Remove src parameter in
2936 second overload.
2937 * regcache.c (do_cooked_read): Remove.
2938 (readonly_detached_regcache::readonly_detached_regcache): Make
2939 parameter non-const, adjust call to other constructor.
2940 (reg_buffer::save): Remove src parameter.
2941 * frame.c (do_frame_register_read): Remove.
2942 (frame_save_as_regcache): Use lambda function.
2943 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
2944 parameter to ppu2spu_data *.
2945 (ppu2spu_sniffer): Use lambda function.
2946
2947 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
2948
2949 * record-full.c (record_full_target::insert_breakpoint): Remove
2950 "struct" keyword, add const.
2951
2952 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
2953
2954 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
2955 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
2956 * configure.ac: Remove AC_PREREQ, add missing quoting.
2957 * gnulib/configure.ac: Modernize usage of
2958 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
2959 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
2960 (AUTOMAKE_VERSION): Bump to 1.15.1.
2961 * configure: Re-generate.
2962 * config.in: Re-generate.
2963 * aclocal.m4: Re-generate.
2964 * gnulib/aclocal.m4: Re-generate.
2965 * gnulib/config.in: Re-generate.
2966 * gnulib/configure: Re-generate.
2967 * gnulib/import/Makefile.in: Re-generate.
2968
2969 2018-06-19 Pedro Alves <palves@redhat.com>
2970
2971 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
2972 (lookup_minimal_symbol_by_pc_section): ... here with
2973 gdb_assert_not_reached added.
2974
2975 2018-06-19 Pedro Alves <palves@redhat.com>
2976
2977 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
2978 parameter with a block parameter. Compare location's block symbol
2979 with the frame's block instead of addresses.
2980 (skip_inline_frames): Pass the current block instead of the
2981 frame's address. Break out as soon as we determine the frame
2982 should not be skipped.
2983
2984 2018-06-18 Tom Tromey <tom@tromey.com>
2985
2986 * solib-aix.c (solib_aix_get_section_offsets): Return
2987 unique_xmalloc_ptr.
2988 (solib_aix_solib_create_inferior_hook): Update.
2989
2990 2018-06-18 Tom Tromey <tom@tromey.com>
2991
2992 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
2993
2994 2018-06-18 Tom Tromey <tom@tromey.com>
2995
2996 * solib-frv.c (frv_relocate_main_executable): Use
2997 unique_xmalloc_ptr.
2998 * solib-dsbt.c (dsbt_relocate_main_executable): Use
2999 unique_xmalloc_ptr.
3000
3001 2018-06-18 Tom Tromey <tom@tromey.com>
3002
3003 * objfiles.h (inhibit_section_map_updates): Update.
3004 (resume_section_map_updates, resume_section_map_updates_cleanup):
3005 Remove.
3006 * solib-svr4.c (svr4_handle_solib_event): Update.
3007 * objfiles.c (inhibit_section_map_updates): Return
3008 scoped_restore_tmpl<int>.
3009 (resume_section_map_updates, resume_section_map_updates_cleanup):
3010 Remove.
3011
3012 2018-06-18 Tom Tromey <tom@tromey.com>
3013
3014 * valprint.h (read_string): Update.
3015 * valprint.c (read_string): Change type of "buffer".
3016 (val_print_string): Update.
3017 * python/py-value.c (valpy_string): Update.
3018 * language.h (struct language_defn) <la_get_string>: Change
3019 type of "buffer".
3020 (default_get_string, c_get_string): Update.
3021 * language.c (default_get_string): Change type of "buffer".
3022 * guile/scm-value.c (gdbscm_value_to_string): Update.
3023 * c-lang.c (c_get_string): Change type of "buffer".
3024
3025 2018-06-18 Tom Tromey <tom@tromey.com>
3026
3027 * ser-mingw.c (struct pipe_state_destroyer): New.
3028 (pipe_state_up): New typedef.
3029 (cleanup_pipe_state): Remove.
3030 (pipe_windows_open): Use pipe_state_up. Don't release argv.
3031
3032 2018-06-18 Tom Tromey <tom@tromey.com>
3033
3034 * rust-lang.h (rust_yyerror): Don't declare.
3035 * rust-lang.c (rust_language_defn): Update.
3036 * rust-exp.y (yyerror): Now static.
3037 * parse.c (parse_exp_in_context_1): Update.
3038 * p-lang.h (p_yyerror): Don't declare.
3039 * p-lang.c (p_language_defn): Update.
3040 * p-exp.y (yyerror): Now static.
3041 * opencl-lang.c (opencl_language_defn): Update.
3042 * objc-lang.c (objc_language_defn): Update.
3043 * m2-lang.h (m2_yyerror): Don't declare.
3044 * m2-lang.c (m2_language_defn): Update.
3045 * m2-exp.y (yyerror): Now static.
3046 * language.h (struct language_defn) <la_error>: Remove.
3047 * language.c (unk_lang_error): Remove.
3048 (unknown_language_defn, auto_language_defn): Remove.
3049 * go-lang.h (go_yyerror): Don't declare.
3050 * go-lang.c (go_language_defn): Update.
3051 * go-exp.y (yyerror): Now static.
3052 * f-lang.h (f_yyerror): Don't declare.
3053 * f-lang.c (f_language_defn): Update.
3054 * f-exp.y (yyerror): Now static.
3055 * d-lang.h (d_yyerror): Don't declare.
3056 * d-lang.c (d_language_defn): Update.
3057 * d-exp.y (yyerror): Now static.
3058 * c-lang.h (c_yyerror): Don't declare.
3059 * c-lang.c (c_language_defn, cplus_language_defn)
3060 (asm_language_defn, minimal_language_defn): Update.
3061 * c-exp.y (yyerror): Now static.
3062 * ada-lang.h (ada_yyerror): Don't declare.
3063 * ada-lang.c (ada_language_defn): Update.
3064 * ada-exp.y (yyerror): Now static.
3065
3066 2018-06-18 Alan Hayward <alan.hayward@arm.com>
3067
3068 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
3069 (store_sveregs_to_thread): Likewise.
3070 (aarch64_linux_fetch_inferior_registers): Check for SVE.
3071 (aarch64_linux_store_inferior_registers): Likewise.
3072 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
3073 function.
3074 (aarch64_sve_regs_copy_to_regcache): Likewise.
3075 (aarch64_sve_regs_copy_from_regcache): Likewise.
3076 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
3077 declaration.
3078 (aarch64_sve_regs_copy_to_regcache): Likewise.
3079 (aarch64_sve_regs_copy_from_regcache): Likewise.
3080 (sve_context): Structure from Linux headers.
3081 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
3082 (SVE_SIG_ZREG_SIZE): Likewise.
3083 (SVE_SIG_PREG_SIZE): Likewise.
3084 (SVE_SIG_FFR_SIZE): Likewise.
3085 (SVE_SIG_REGS_OFFSET): Likewise.
3086 (SVE_SIG_ZREGS_OFFSET): Likewise.
3087 (SVE_SIG_ZREG_OFFSET): Likewise.
3088 (SVE_SIG_ZREGS_SIZE): Likewise.
3089 (SVE_SIG_PREGS_OFFSET): Likewise.
3090 (SVE_SIG_PREG_OFFSET): Likewise.
3091 (SVE_SIG_PREGS_SIZE): Likewise.
3092 (SVE_SIG_FFR_OFFSET): Likewise.
3093 (SVE_SIG_REGS_SIZE): Likewise.
3094 (SVE_SIG_CONTEXT_SIZE): Likewise.
3095 (SVE_PT_REGS_MASK): Likewise.
3096 (SVE_PT_REGS_FPSIMD): Likewise.
3097 (SVE_PT_REGS_SVE): Likewise.
3098 (SVE_PT_VL_INHERIT): Likewise.
3099 (SVE_PT_VL_ONEXEC): Likewise.
3100 (SVE_PT_REGS_OFFSET): Likewise.
3101 (SVE_PT_FPSIMD_OFFSET): Likewise.
3102 (SVE_PT_FPSIMD_SIZE): Likewise.
3103 (SVE_PT_SVE_ZREG_SIZE): Likewise.
3104 (SVE_PT_SVE_PREG_SIZE): Likewise.
3105 (SVE_PT_SVE_FFR_SIZE): Likewise.
3106 (SVE_PT_SVE_FPSR_SIZE): Likewise.
3107 (SVE_PT_SVE_FPCR_SIZE): Likewise.
3108 (__SVE_SIG_TO_PT): Likewise.
3109 (SVE_PT_SVE_OFFSET): Likewise.
3110 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
3111 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
3112 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
3113 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
3114 (SVE_PT_SVE_PREG_OFFSET): Likewise.
3115 (SVE_PT_SVE_PREGS_SIZE): Likewise.
3116 (SVE_PT_SVE_FFR_OFFSET): Likewise.
3117 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
3118 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
3119 (SVE_PT_SVE_SIZE): Likewise.
3120 (SVE_PT_SIZE): Likewise.
3121 (HAS_SVE_STATE): New define.
3122
3123 2018-06-18 Alan Hayward <alan.hayward@arm.com>
3124
3125 * nat/aarch64-sve-linux-sigcontext.h: New file.
3126 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
3127 new files.
3128 (SVE_VQ_MIN): Likewise.
3129 (SVE_VQ_MAX): Likewise.
3130 (SVE_VL_MIN): Likewise.
3131 (SVE_VL_MAX): Likewise.
3132 (SVE_NUM_ZREGS): Likewise.
3133 (SVE_NUM_PREGS): Likewise.
3134 (sve_vl_valid): Likewise.
3135 (struct user_sve_header): Likewise.
3136
3137 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
3138 Richard Bunt <Richard.Bunt@arm.com>
3139
3140 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
3141 was requested by GDB.
3142
3143 2018-06-15 Tom de Vries <tdevries@suse.de>
3144
3145 * MAINTAINERS (Write After Approval): Add Tom de Vries.
3146
3147 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
3148
3149 * gnulib/update-gnulib.sh: Print expected versions of
3150 autoconf/aclocal.
3151
3152 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
3153
3154 * arch-utils.c (default_type_align): Use type_length_units.
3155 * gdbtypes.c (type_align): Use type_length_units.
3156
3157 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3158
3159 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
3160 of 'define' command.
3161
3162 2018-06-14 Tom de Vries <tdevries@suse.de>
3163
3164 PR cli/22573
3165 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
3166 get_no_prettyformat_print_options.
3167
3168 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
3169
3170 * sparc-nat.h: Include target.h.
3171 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
3172 <fetch_registers>: Remove this argument in function call.
3173 <store_registers>: Remove this argument in function call, remove
3174 extra semicolon.
3175 <low_forget_process>: Call sparc64_forget_process instead of
3176 sparc_forget_process.
3177
3178 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3179
3180 * procfs.c (_initialize_procfs): Use add_inf_child_target.
3181 (procfs_target::make_corefile_notes): Adjust to new
3182 target_read_alloc return type.
3183
3184 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3185 Stephen Roberts <stephen.roberts@arm.com>
3186
3187 PR gdb/22882
3188 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
3189 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
3190 Move should_notify_stop local into more inner scope.
3191
3192 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3193 Stephen Roberts <stephen.roberts@arm.com>
3194
3195 PR gdb/22882
3196 * infrun.c (resume_1): Add call to mark_async_event_handler.
3197
3198 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3199
3200 * infrun.c (do_target_wait): Change old version of $pc printed.
3201
3202 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
3203
3204 * dwarf2read.c (read_index_from_section): Rename to...
3205 (read_gdb_index_from_section): ... this, update all callers.
3206 (dwarf2_read_index): Rename to...
3207 (dwarf2_read_gdb_index): ... this, update all callers.
3208
3209 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
3210
3211 * gdb/hppa-linux-nat.c
3212 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
3213 hppa_linux_nat_target::fetch_registers.
3214
3215 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3216
3217 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
3218 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
3219 (AARCH64_DWARF_SVE_FFR): Likewise.
3220 (AARCH64_DWARF_SVE_P0): Likewise.
3221 (AARCH64_DWARF_SVE_Z0): Likewise.
3222
3223 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3224
3225 * common/common-regcache.h (raw_compare): New function.
3226 * regcache.c (regcache::raw_compare): Likewise.
3227 * regcache.h (regcache::raw_compare): New declaration.
3228
3229 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3230
3231 * common/common-regcache.h (reg_buffer_common): New structure.
3232 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
3233 (reg_buffer::raw_supply): Likewise.
3234 (reg_buffer::raw_supply_integer): Likewise.
3235 (reg_buffer::raw_supply_zeroed): Likewise.
3236 (reg_buffer::raw_collect): Likewise.
3237 (reg_buffer::raw_collect_integer): Likewise.
3238 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
3239 (reg_buffer::raw_supply): Likewise.
3240 (reg_buffer::raw_supply_integer): Likewise.
3241 (reg_buffer::raw_supply_zeroed): Likewise.
3242 (reg_buffer::raw_collect): Likewise.
3243 (reg_buffer::raw_collect_integer): Likewise.
3244
3245 2018-06-10 Tom Tromey <tom@tromey.com>
3246
3247 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
3248 (class remote_state) <stop_reply_queue>: Now std::vector.
3249 (remote_state::~remote_state)
3250 (remote_target::stop_reply_queue_length): Update.
3251 (struct queue_iter_param, remove_child_of_pending_fork)
3252 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
3253 (check_pending_event_prevents_wildcard_vcont_callback)
3254 (remove_stop_reply_for_inferior)
3255 (remove_stop_reply_of_remote_state)
3256 (remote_notif_remove_once_on_match)
3257 (stop_reply_match_ptid_and_ws)
3258 (remote_kill_child_of_pending_fork): Remove.
3259 (remote_target::remove_new_fork_children)
3260 (remote_target::check_pending_events_prevent_wildcard_vcont)
3261 (remote_target::discard_pending_stop_replies)
3262 (remote_target::discard_pending_stop_replies_in_queue)
3263 (remote_target::remote_notif_remove_queued_reply)
3264 (remote_target::queued_stop_reply)
3265 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
3266 (remote_target::wait, remote_target::kill_new_fork_children)
3267 (remote_target::async): Update.
3268
3269 2018-06-10 Tom Tromey <tom@tromey.com>
3270
3271 * record-full.c (record_full_arch_list_cleanups): Remove.
3272 (record_full_message): Use try/catch.
3273 (record_full_wait_cleanups): Remove.
3274 (record_full_wait_1): Use try/catch.
3275 (record_full_restore): Likewise.
3276
3277 2018-06-10 Tom Tromey <tom@tromey.com>
3278
3279 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
3280 declare VEC. Add constructor.
3281 <in_target_beneath>: Now bool.
3282 (record_full_breakpoints): Now a std::vector, static.
3283 (record_full_sync_record_breakpoints)
3284 (record_full_init_record_breakpoints)
3285 (record_full_target::insert_breakpoint)
3286 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
3287
3288 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
3289
3290 * dwarf2read.c (process_cu_includes): Remove struct keyword.
3291 * serial.c (serial_interface_lookup): Remove struct keyword.
3292
3293 2018-06-10 Tom Tromey <tom@tromey.com>
3294
3295 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
3296 method.
3297 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
3298 a method.
3299 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
3300 method.
3301 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
3302 "beneath" as a method.
3303 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
3304 Use "beneath" as a method.
3305
3306 2018-06-10 Tom Tromey <tom@tromey.com>
3307
3308 * tracefile.c (struct trace_file_writer_deleter): New.
3309 <operator()>: Rename from trace_file_writer_xfree.
3310 (trace_file_writer_up): New typedef.
3311 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
3312
3313 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
3314
3315 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
3316 <m_registers, m_register_status>: Change type to
3317 std::unique_ptr.
3318 * regcache.c (reg_buffer::reg_buffer): Use new instead of
3319 XCNEWVEC.
3320
3321 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
3322
3323 * common/common-regcache.h (enum register_status): Add
3324 underlying type "signed char".
3325 * regcache.h (reg_buffer) <m_register_status>: Change type to
3326 register_status *.
3327 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
3328 register_status instead of signed char.
3329 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
3330 (reg_buffer::get_register_status): Remove cast.
3331 (readable_regcache::raw_read): Remove cast.
3332 (readable_regcache::cooked_read): Remove cast.
3333
3334 2018-06-09 Tom Tromey <tom@tromey.com>
3335
3336 * source.c (reverse_search_command, forward_search_command): Use
3337 scoped_fd.
3338
3339 2018-06-09 Tom Tromey <tom@tromey.com>
3340
3341 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
3342 (serial_ops_list): Now static, std::vector.
3343 (serial_interface_lookup, serial_add_interface): Update.
3344
3345 2018-06-09 Tom Tromey <tom@tromey.com>
3346
3347 * dwarf2read.c (process_cu_includes): Update.
3348 (process_full_comp_unit): Update.
3349 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
3350 std::vector.
3351
3352 2018-06-08 Paul Koning <paul_koning@dell.com>
3353
3354 PR gdb/23252
3355
3356 * python/python.c (do_start_initialization):
3357 Avoid call to internal Python API.
3358 (init__gdb_module): New function.
3359
3360 2018-06-08 Gary Benson <gbenson@redhat.com>
3361
3362 * linux-thread-db.c (valprint.h): New include.
3363 (struct check_thread_db_info): New structure.
3364 (check_thread_db_on_load, tdb_testinfo): New static globals.
3365 (check_thread_db, check_thread_db_callback): New functions.
3366 (try_thread_db_load_1): Run integrity checks if requested.
3367 (maintenance_check_libthread_db): New function.
3368 (_initialize_thread_db): Register "maint check libthread-db"
3369 and "maint set/show check-libthread-db".
3370 * NEWS: Mention the above new commands.
3371
3372 2018-06-08 Tom Tromey <tom@tromey.com>
3373
3374 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
3375 now a method.
3376
3377 2018-06-08 Tom Tromey <tom@tromey.com>
3378
3379 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
3380
3381 2018-06-08 Tom Tromey <tom@tromey.com>
3382
3383 * common/btrace-common.h (struct btrace_data): Add constructor,
3384 destructor, move assignment operator.
3385 <empty, clear, fini>: New methods.
3386 <format>: Initialize.
3387 (btrace_data_init, btrace_data_fini, btrace_data_clear)
3388 (btrace_data_empty): Don't declare.
3389 * common/btrace-common.c (btrace_data_init): Remove.
3390 (btrace_data::fini): Rename from btrace_data_fini.
3391 (btrace_data::empty): Rename from btrace_data_empty.
3392 (btrace_data::clear): Rename from btrace_data_clear. Return
3393 bool.
3394 * btrace.h (make_cleanup_btrace_data): Don't declare.
3395 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
3396 (parse_xml_btrace): Update.
3397 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
3398 (maint_btrace_clear_packet_history_cmd): Update.
3399
3400 2018-06-07 Pedro Alves <palves@redhat.com>
3401
3402 * target.h (target_ops) <beneath>: Now a method. All references
3403 updated.
3404 (class target_stack): New.
3405 * target.c (g_target_stack): New.
3406 (g_current_top_target): Delete.
3407 (current_top_target): Get the top target out of g_target_stack.
3408 (target_stack::push, target_stack::unpush): New.
3409 (push_target, unpush_target): Reimplement.
3410 (target_is_pushed): Reimplement in terms of g_target_stack.
3411 (target_ops::beneath, target_stack::find_beneath): New.
3412
3413 2018-06-07 Pedro Alves <palves@redhat.com>
3414
3415 * target.h (find_target_beneath): Delete declaration.
3416 * target.c (find_target_beneath): Delete definition.
3417 * aix-thread.c: All callers of find_target_beneath adjusted to
3418 call target_ops::beneath instead.
3419 * bsd-uthread.c: Likewise.
3420 * linux-thread-db.c: Likewise.
3421 * ravenscar-thread.c: Likewise.
3422 * sol-thread.c: Likewise.
3423 * spu-multiarch.c: Likewise.
3424
3425 2018-06-07 Pedro Alves <palves@redhat.com>
3426
3427 * target.h (target_ops) <beneath>: Now a method. All references
3428 updated.
3429 (target_ops) <m_beneath>: New.
3430 * target.c (target_ops::beneath): New.
3431 * corelow.c: Adjust all references to target_ops::beneath.
3432 * linux-thread-db.c: Likewise.
3433 * make-target-delegates: Likewise.
3434 * record-btrace.c: Likewise.
3435 * record-full.c: Likewise.
3436 * remote.c: Likewise.
3437 * target.c: Likewise.
3438 * target-delegates.c: Regenerate.
3439
3440 2018-06-07 Pedro Alves <palves@redhat.com>
3441
3442 * target.h (target_stack): Delete.
3443 (current_top_target): Declare function.
3444 * target.c (target_stack): Delete.
3445 (g_current_top_target): New.
3446 (current_top_target): New function.
3447 * auxv.c: Use current_top_target instead of target_stack
3448 throughout.
3449 * avr-tdep.c: Likewise.
3450 * breakpoint.c: Likewise.
3451 * corefile.c: Likewise.
3452 * elfread.c: Likewise.
3453 * eval.c: Likewise.
3454 * exceptions.c: Likewise.
3455 * frame.c: Likewise.
3456 * gdbarch-selftests.c: Likewise.
3457 * gnu-v3-abi.c: Likewise.
3458 * ia64-tdep.c: Likewise.
3459 * ia64-vms-tdep.c: Likewise.
3460 * infcall.c: Likewise.
3461 * infcmd.c: Likewise.
3462 * infrun.c: Likewise.
3463 * linespec.c: Likewise.
3464 * linux-tdep.c: Likewise.
3465 * minsyms.c: Likewise.
3466 * ppc-linux-nat.c: Likewise.
3467 * ppc-linux-tdep.c: Likewise.
3468 * procfs.c: Likewise.
3469 * regcache.c: Likewise.
3470 * remote.c: Likewise.
3471 * rs6000-tdep.c: Likewise.
3472 * s390-linux-nat.c: Likewise.
3473 * s390-tdep.c: Likewise.
3474 * solib-aix.c: Likewise.
3475 * solib-darwin.c: Likewise.
3476 * solib-dsbt.c: Likewise.
3477 * solib-spu.c: Likewise.
3478 * solib-svr4.c: Likewise.
3479 * solib-target.c: Likewise.
3480 * sparc-tdep.c: Likewise.
3481 * sparc64-tdep.c: Likewise.
3482 * spu-tdep.c: Likewise.
3483 * symfile.c: Likewise.
3484 * symtab.c: Likewise.
3485 * target-descriptions.c: Likewise.
3486 * target-memory.c: Likewise.
3487 * target.c: Likewise.
3488 * target.h: Likewise.
3489 * tracefile-tfile.c: Likewise.
3490 * tracepoint.c: Likewise.
3491 * valops.c: Likewise.
3492 * valprint.c: Likewise.
3493 * value.c: Likewise.
3494 * windows-tdep.c: Likewise.
3495 * mi/mi-main.c: Likewise.
3496
3497 2018-06-07 Tom Tromey <tom@tromey.com>
3498
3499 * valprint.h (build_address_symbolic): Declare.
3500 * printcmd.c (print_address_symbolic): Update.
3501 (build_address_symbolic): Change "name" and "filename" to
3502 std::string.
3503 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
3504 Update.
3505 * defs.h (build_address_symbolic): Remove declaration.
3506
3507 2018-06-07 Alan Hayward <alan.hayward@arm.com>
3508
3509 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
3510 (aarch64_vnv_type): Add function.
3511 (aarch64_pseudo_register_name): Add V regs for SVE.
3512 (aarch64_pseudo_register_type): Likewise.
3513 (aarch64_pseudo_register_reggroup_p): Likewise.
3514 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
3515 (aarch64_pseudo_read_value): Add V regs for SVE.
3516 (aarch64_pseudo_write_2): Use V0 offset for SVE
3517 (aarch64_pseudo_write): Add V regs for SVE.
3518 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
3519
3520 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
3521
3522 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
3523 (sve_vl_from_vq): Likewise.
3524
3525 2018-06-05 Tom Tromey <tom@tromey.com>
3526
3527 * cli/cli-cmds.c (show_version): Update.
3528 * top.c (print_gdb_version): Add "interactive" parameter.
3529 Update.
3530 * main.c (captured_main_1): Update.
3531 * top.h (print_gdb_version): Add "interactive" parameter and a
3532 comment.
3533
3534 2018-06-05 David Malcolm <dmalcolm@redhat.com>
3535
3536 * common/enum-flags.h: Add trailing semicolon to example in
3537 comment.
3538
3539 2018-06-05 Tom Tromey <tom@tromey.com>
3540
3541 PR cli/12326:
3542 * NEWS: Add entry about pager.
3543 * utils.c (pagination_disabled_for_command): New global.
3544 (prompt_for_continue): Allow "c" response to prompt.
3545 (reinitialize_more_filter): Clear
3546 pagination_disabled_for_command.
3547 (fputs_maybe_filtered): Check pagination_disabled_for_command.
3548
3549 2018-06-04 Tom Tromey <tom@tromey.com>
3550
3551 * ada-lang.h (ada_lookup_symbol_list): Update.
3552 * ada-lang.c (resolve_subexp): Update.
3553 (symbols_are_identical_enums): Change type of syms. Remove nsyms
3554 parameter.
3555 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
3556 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
3557 results parameter to std::vector.
3558 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
3559 Update.
3560 * ada-exp.y (block_lookup): Update.
3561 (select_possible_type_sym): Change type of syms. Remove nsyms
3562 parameter.
3563 (write_var_or_type, write_name_assoc): Update.
3564
3565 2018-06-04 Joel Brobecker <brobecker@adacore.com>
3566
3567 * windows-nat.c (windows_nat_target::xfer_partial): Return
3568 TARGET_XFER_E_IO if we need to delegate to the target beneath
3569 but BENEATH is NULL.
3570
3571 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
3572
3573 * Makefile.in (config.status): Add configure.nat as a
3574 dependency.
3575
3576 2018-06-04 Tom Tromey <tom@tromey.com>
3577
3578 * cp-name-parser.y (cpname_state): Add method declarations.
3579 (HANDLE_QUAL): Update.
3580 (cpname_state::d_grab, cpname_state::fill_comp)
3581 (cpname_state::make_operator, cpname_state::make_dtor)
3582 (cpname_state::make_builtin_type, cpname_state::make_name)
3583 (cpname_state::d_qualify, cpname_state::d_int_type)
3584 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
3585 (%union): Move earlier.
3586
3587 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3588
3589 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
3590
3591 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3592
3593 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
3594 (aarch64_pseudo_write_1): Likewise.
3595 (aarch64_pseudo_read_value): Use helper.
3596 (aarch64_pseudo_write): Likewise.
3597
3598 2018-06-04 Pedro Alves <palves@redhat.com>
3599
3600 * darwin-nat.c (darwin_ops): Delete.
3601 (darwin_attach_pid): Use get_native_target.
3602
3603 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3604
3605 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
3606 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
3607
3608 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3609
3610 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
3611 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
3612 (aarch64_gdbarch_init): Check for SVE.
3613 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
3614
3615 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3616
3617 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
3618 * aarch64-tdep.h (aarch64_read_description): Likewise.
3619 * arch/aarch64.c (aarch64_create_target_description): Likewise.
3620 * arch/aarch64.h (aarch64_create_target_description): Likewise.
3621 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
3622 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
3623 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
3624
3625 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
3626
3627 * value.c (value_fetch_lazy_bitfield): New.
3628 (value_fetch_lazy_memory): New.
3629 (value_fetch_lazy_register): New.
3630 (value_fetch_lazy): Factor out to smaller functions.
3631
3632 2018-06-01 Tom Tromey <tom@tromey.com>
3633
3634 * cp-name-parser.y (backslashable, represented): Now const.
3635
3636 2018-06-01 Tom Tromey <tom@tromey.com>
3637
3638 * cp-name-parser.y: Include parser-defs.h.
3639 (parser_fprintf): Remove declaration.
3640
3641 2018-06-01 Tom Tromey <tom@tromey.com>
3642
3643 * cp-name-parser.y: Use %pure-parser, %lex-param, and
3644 %parse-param.
3645 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
3646 (global_result): Remove globals.
3647 (struct cpname_state): New.
3648 (yyparse): Don't declare.
3649 (yylex, yyerror): Move declarations after %union.
3650 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
3651 (make_name): Add state parameter.
3652 Update all callers.
3653 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
3654 parameter.
3655 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
3656 Update.
3657 (yylex): Add lvalp, state parameters.
3658 (yyerror): Add state parameter.
3659 (cp_demangled_name_to_comp): Update.
3660
3661 2018-06-01 Tom Tromey <tom@tromey.com>
3662
3663 * cp-name-parser.y (parser_fprintf): Declare.
3664 (GDB_YY_REMAP_PREFIX): Define.
3665 Include yy-remap.h. Don't redefine yy* identifiers.
3666
3667 2018-06-01 Tom Tromey <tom@tromey.com>
3668
3669 * python/py-type.c (typy_legacy_template_argument): Update.
3670 * cp-support.h (cp_demangled_name_to_comp): Update.
3671 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
3672 parameter to be a "std::string *".
3673 (main): Update.
3674
3675 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
3676
3677 * ada-lex.l: Include "diagnostics.h" instead of
3678 "common/diagnostics.h".
3679 * unittests/environ-selftests.c: Likewise.
3680 * common/diagnostics.h: Moved to ../include.
3681
3682 2018-06-01 Joel Brobecker <brobecker@adacore.com>
3683
3684 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
3685 to language_mode_manual while calling breakpoint_re_set_one.
3686
3687 2018-06-01 Tom Tromey <tom@tromey.com>
3688
3689 * valops.c (value_cast_structs, destructor_name_p): Update.
3690 * symtab.c (gdb_mangle_name): Update.
3691 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
3692 Update.
3693 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
3694 (pascal_object_print_value_fields, pascal_object_print_value):
3695 Update.
3696 * p-typeprint.c (pascal_type_print_derivation_info): Update.
3697 * linespec.c (find_methods): Update.
3698 * gdbtypes.h (type_name_no_tag): Remove.
3699 (type_name_or_error): Rename from type_name_no_tag_or_error.
3700 * gdbtypes.c (type_name_no_tag): Remove.
3701 (type_name_or_error): Rename from type_name_no_tag_or_error.
3702 (lookup_struct_elt_type, check_typedef): Update.
3703 * expprint.c (print_subexp_standard): Update.
3704 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
3705 * d-namespace.c (d_lookup_nested_symbol): Update.
3706 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
3707 (cp_print_class_member): Update.
3708 * cp-namespace.c (cp_lookup_nested_symbol): Update.
3709 * completer.c (add_struct_fields): Update.
3710 * c-typeprint.c (cp_type_print_derivation_info)
3711 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
3712 Update.
3713 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
3714 (ada_prefer_type, ada_is_exception_sym): Update.
3715
3716 2018-06-01 Tom Tromey <tom@tromey.com>
3717
3718 * valops.c (enum_constant_from_type, value_namespace_elt)
3719 (value_maybe_namespace_elt): Update.
3720 * valarith.c (find_size_for_pointer_math): Update.
3721 * target-descriptions.c (make_gdb_type): Update.
3722 * symmisc.c (print_symbol): Update.
3723 * stabsread.c (define_symbol, read_type)
3724 (complain_about_struct_wipeout, add_undefined_type)
3725 (cleanup_undefined_types_1): Update.
3726 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
3727 (rust_range_type_p, val_print_struct, rust_print_struct_def)
3728 (rust_internal_print_type, rust_composite_type)
3729 (rust_evaluate_funcall, rust_evaluate_subexp)
3730 (rust_inclusive_range_type_p): Update.
3731 * python/py-type.c (typy_get_tag): Update.
3732 * p-typeprint.c (pascal_type_print_base): Update.
3733 * mdebugread.c (parse_symbol, parse_type): Update.
3734 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
3735 Update.
3736 * guile/scm-type.c (gdbscm_type_tag): Update.
3737 * go-lang.c (sixg_string_p): Update.
3738 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
3739 Update.
3740 * gdbtypes.h (struct main_type) <tag_name>: Remove.
3741 (TYPE_TAG_NAME): Remove.
3742 * gdbtypes.c (type_name_no_tag): Simplify.
3743 (check_typedef, check_types_equal, recursive_dump_type)
3744 (copy_type_recursive, arch_composite_type): Update.
3745 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
3746 in summary mode when needed.
3747 * eval.c (evaluate_funcall): Update.
3748 * dwarf2read.c (fixup_go_packaging, read_structure_type)
3749 (process_structure_scope, read_enumeration_type)
3750 (read_namespace_type, read_module_type, determine_prefix): Update.
3751 * cp-support.c (inspect_type): Update.
3752 * coffread.c (process_coff_symbol, decode_base_type): Update.
3753 * c-varobj.c (c_is_path_expr_parent): Update.
3754 * c-typeprint.c (c_type_print_base_struct_union): Update.
3755 (c_type_print_base_1): Update. Print struct/class/union/enum in
3756 summary when using C language.
3757 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
3758 (gen_maybe_namespace_elt): Update.
3759 * ada-lang.c (ada_type_name): Simplify.
3760 (empty_record, ada_template_to_fixed_record_type_1)
3761 (template_to_static_fixed_type)
3762 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
3763
3764 2018-06-01 Tom Tromey <tom@tromey.com>
3765
3766 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
3767 c_print_type.
3768 * c-typeprint.c (c_print_type_1): Add "language" parameter.
3769 (c_print_type): Update.
3770 (c_print_type): New overload.
3771 (c_type_print_varspec_prefix, c_type_print_args)
3772 (c_type_print_varspec_suffix, c_print_type_no_offsets)
3773 (c_type_print_base_struct_union, c_type_print_base_1)
3774 (cp_type_print_method_args): Add "language" parameter.
3775 (c_type_print_base): Update.
3776 * c-lang.h (c_print_type): Add new overload.
3777
3778 2018-06-01 Tom Tromey <tom@tromey.com>
3779
3780 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
3781 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
3782
3783 2018-06-01 Alan Hayward <alan.hayward@arm.com>
3784
3785 * aarch64-tdep.c (aarch64_sve_register_names): New const
3786 var.
3787 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
3788 (AARCH64_SVE_Z_REGS_NUM): New define.
3789 (AARCH64_SVE_P_REGS_NUM): Likewise.
3790 (AARCH64_SVE_NUM_REGS): Likewise.
3791
3792 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
3793
3794 * nat/linux-ptrace.h [__alpha__]
3795 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
3796 definitions.
3797
3798 2018-05-31 Maciej W. Rozycki <macro@mips.com>
3799
3800 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
3801 the endianness selected.
3802 * NEWS: Document `set endian auto' mode operation update.
3803
3804 2018-05-31 Alan Hayward <alan.hayward@arm.com>
3805
3806 * Makefile.in: Add new header.
3807 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
3808 (sve_vl_from_vg): Likewise.
3809 (sve_vq_from_vl): Likewise.
3810 (sve_vl_from_vq): Likewise.
3811 (sve_vq_from_vg): Likewise.
3812 (sve_vg_from_vq): Likewise.
3813 * configure.nat: Add new c file.
3814 * nat/aarch64-sve-linux-ptrace.c: New file.
3815 * nat/aarch64-sve-linux-ptrace.h: New file.
3816
3817 2018-05-31 Alan Hayward <alan.hayward@arm.com>
3818
3819 * aarch64-linux-nat.c (aarch64_linux_read_description):
3820 Add parmeter zero.
3821 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
3822 Likewise.
3823 * aarch64-tdep.c (tdesc_aarch64_list): Add.
3824 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
3825 (aarch64_gdbarch_init): Add parmeter zero.
3826 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
3827 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
3828 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
3829 parmeter.
3830 * doc/gdb.texinfo: Describe SVE feature
3831 * features/aarch64-sve.c: New file.
3832
3833 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
3834
3835 PR gdb/23210
3836 * gdbarch.sh (significant_addr_bit): Default to zero when
3837 not set by target architecture.
3838 * gdbarch.c: Re-generated.
3839 * utils.c (address_significant): Update.
3840
3841 2018-05-30 Joel Brobecker <brobecker@adacore.com>
3842
3843 * stack.c (func_command): Remove trailing newline in call to error.
3844
3845 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3846
3847 * regcache.h (regcache_raw_collect): Remove, update callers to
3848 use regcache::raw_collect.
3849 * regcache.c (regcache_raw_collect): Remove.
3850
3851 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3852
3853 * regcache.h (regcache_raw_supply): Remove, update callers to
3854 use detached_regcache::raw_supply.
3855 * regcache.c (regcache_raw_supply): Remove.
3856
3857 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3858
3859 * regcache.h (regcache_cooked_write_part): Remove, update
3860 callers to use regcache::cooked_write_part.
3861 * regcache.c (regcache_cooked_write_part): Remove.
3862
3863 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3864
3865 * regcache.h (regcache_cooked_read_part): Remove, update callers
3866 to use readable_regcache::cooked_read_part.
3867 * regcache.c (regcache_cooked_read_part): Remove.
3868
3869 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3870
3871 * regcache.h (regcache_cooked_read_value): Remove, update
3872 callers to use readable_regcache::cooked_read_value.
3873 * regcache.c (regcache_cooked_read_value): Remove.
3874
3875 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3876
3877 * regcache.h (regcache_cooked_write): Remove, update callers to
3878 use regcache::cooked_write.
3879 * regcache.c (regcache_cooked_write): Remove.
3880
3881 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3882
3883 * regcache.h (regcache_invalidate): Remove, update callers to
3884 use detached_regcache::invalidate instead.
3885 * regcache.c (regcache_invalidate): Remove.
3886
3887 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3888
3889 * regcache.h (regcache_raw_write_part): Remove, update callers
3890 to use regcache::raw_write_part instead.
3891 * regcache.c (regcache_raw_write_part): Remove.
3892
3893 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3894
3895 * regcache.h (regcache_raw_read_part): Remove, update callers to
3896 use readable_regcache::raw_read_part instead.
3897 * regcache.c (regcache_raw_read_part): Remove.
3898
3899 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3900
3901 * regcache.h (regcache_cooked_read): Remove, update callers to
3902 use readable_regcache::cooked_read instead.
3903 * regcache.c (regcache_cooked_read): Remove.
3904
3905 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3906
3907 * regcache.h (regcache_raw_write): Remove, update callers to use
3908 regcache::raw_write instead.
3909 * regcache.c (regcache_raw_write): Remove.
3910
3911 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3912
3913 * regcache.h (regcache_raw_read): Remove, update callers to use
3914 readable_regcache::raw_read instead.
3915 * regcache.c (regcache_raw_read): Remove.
3916
3917 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3918
3919 * regcache.h (regcache_raw_update): Remove, update callers to
3920 use readable_regcache::raw_update instead.
3921 * regcache.c (regcache_raw_update): Remove.
3922
3923 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3924
3925 * regcache.h (regcache_register_status): Remove, update callers
3926 to use reg_buffer::get_register_status directly instead.
3927 * regcache.c (regcache_register_status): Remove.
3928
3929 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3930
3931 * regcache.h (regcache_get_ptid): Remove, update all callers to
3932 call regcache::ptid instead.
3933 * regcache.c (regcache_get_ptid): Remove.
3934
3935 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3936
3937 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
3938
3939 2018-05-30 Pedro Alves <palves@redhat.com>
3940
3941 * common/common-exceptions.h (exception_rethrow): Use
3942 ATTRIBUTE_NORETURN.
3943
3944 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
3945
3946 * breakpoint.c (print_solib_event, check_status_catch_solib):
3947 Remove struct keyword in range-based for loops.
3948 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
3949 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
3950 Likewise.
3951 * linespec.c (find_superclass_methods, search_minsyms_for_name):
3952 Likewise.
3953 * symfile.c (addr_info_make_relative): Likewise.
3954 * thread.c (value_in_thread_stack_temporaries): Likewise.
3955
3956 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
3957
3958 PR gdb/16841
3959 * valops.c (value_struct_elt_for_reference): Call check_typedef on
3960 aggregate type to get its real type before accessing it.
3961
3962 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
3963
3964 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
3965 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
3966 * coff-pe-read.c (add_pe_forwarded_sym): Replace
3967 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
3968 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
3969 * jit.c (jit_breakpoint_re_set_internal): Likewise.
3970 * printcmd.c (info_address_command): Likewise.
3971
3972 2018-05-29 Tom Tromey <tom@tromey.com>
3973
3974 * windows-nat.c (handle_exception): Update fall-through comment.
3975
3976 2018-05-29 Tom Tromey <tom@tromey.com>
3977
3978 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
3979 (struct program_space) <added_solibs>: Now a std::vector.
3980 * breakpoint.c (print_solib_event): Update.
3981 (check_status_catch_solib): Update.
3982 * progspace.c (clear_program_space_solib_cache): Update.
3983 * solib.c (update_solib_list): Update.
3984
3985 2018-05-29 Tom Tromey <tom@tromey.com>
3986
3987 * python/py-type.c (typy_richcompare): Update.
3988 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
3989 * gdbtypes.h (types_deeply_equal): Return bool.
3990 (types_equal): Likewise.
3991 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
3992 declare VEC.
3993 (check_types_equal): Change worklist to std::vector. Return
3994 bool.
3995 (struct type_equality_entry): Add constructor.
3996 (compare_maybe_null_strings): Return bool.
3997 (check_types_worklist): Return bool. Change worklist to
3998 std::vector.
3999 (types_deeply_equal): Use std::vector.
4000 (types_equal): Return bool.
4001 (compare_maybe_null_strings): Simplify.
4002
4003 2018-05-29 Tom Tromey <tom@tromey.com>
4004
4005 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
4006
4007 2018-05-29 Tom Tromey <tom@tromey.com>
4008
4009 * objc-lang.h: Don't include cp-support.h.
4010 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
4011 declare VEC.
4012
4013 2018-05-27 Tom Tromey <tom@tromey.com>
4014
4015 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
4016
4017 2018-05-25 Tom Tromey <tom@tromey.com>
4018
4019 * value.c (value::location): Initialize.
4020
4021 2018-05-25 Tom Tromey <tom@tromey.com>
4022
4023 * dbxread.c (init_bincl_list): Remove.
4024 (bincl_list): Now a std::vector.
4025 (bincls_allocated, next_bincl): Remove.
4026 (free_bincl_list, do_free_bincl_list_cleanup)
4027 (make_cleanup_free_bincl_list): Remove.
4028 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
4029 unique_xmalloc_ptr.
4030 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
4031 (struct header_file_location): Add constructor.
4032 (add_bincl_to_list): Remove.
4033
4034 2018-05-25 Tom Tromey <tom@tromey.com>
4035
4036 * tui/tui.c (tui_enable): Update.
4037 * mi/mi-interp.c (mi_interp::init): Update.
4038 * interps.h (class interp) <name>: New method.
4039 <m_name>: Rename from name.
4040 (~scoped_restore_interp): Update.
4041 * interps.c (interp::interp): Update.
4042 (interp_add, interp_set, interp_lookup_existing)
4043 (current_interp_named_p): Update.
4044
4045 2018-05-25 Tom Tromey <tom@tromey.com>
4046
4047 * interps.c (interp_name): Remove.
4048 * mi/mi-interp.c (mi_interp::init): Update.
4049 * interps.h (interp_name): Remove.
4050 (~scoped_restore_interp): Update.
4051 * tui/tui.c (tui_enable): Update.
4052
4053 2018-05-25 Tom Tromey <tom@tromey.com>
4054
4055 * utils.c (fputs_maybe_filtered): Update.
4056 * linespec.c (decode_line_full): Update.
4057 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
4058 (mi_print_breakpoint_for_event, mi_solib_loaded)
4059 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4060 (mi_user_selected_context_changed): Update.
4061 * mi/mi-main.c (mi_execute_command): Update.
4062 * cli/cli-script.c (execute_control_command): Update.
4063 * python/python.c (execute_gdb_command): Update.
4064 * solib.c (info_sharedlibrary_command): Update.
4065 * interps.c (interp_ui_out): Remove.
4066 * interps.h (interp_ui_out): Remove.
4067
4068 2018-05-25 Tom Tromey <tom@tromey.com>
4069
4070 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
4071 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
4072 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
4073
4074 2018-05-25 Tom Tromey <tom@tromey.com>
4075
4076 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
4077 * interps.c (interp_exec): Use scoped_restore.
4078
4079 2018-05-25 Tom Tromey <tom@tromey.com>
4080
4081 * remote.c (remote_target::remote_file_get): Use
4082 gdb::byte_vector.
4083 (remote_target::remote_file_put): Likewise.
4084
4085 2018-05-25 Tom Tromey <tom@tromey.com>
4086
4087 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
4088 a std::string.
4089 (get_pe_section_index, add_pe_exported_sym): Update.
4090 (read_pe_exported_syms): Use gdb::def_vector.
4091
4092 2018-05-25 Tom Tromey <tom@tromey.com>
4093
4094 * frame.c (remove_prev_frame): Remove.
4095 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
4096
4097 2018-05-25 Maciej W. Rozycki <macro@mips.com>
4098
4099 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
4100 Remove prototypes.
4101 * mips-linux-nat.c (supply_fpregset): Always call
4102 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
4103 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
4104 `mips_fill_fpregset'.
4105 * mips-linux-tdep.c (mips_supply_fpregset)
4106 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
4107 (mips_fill_fpregset_wrapper): Remove functions.
4108 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
4109 (mips_linux_fpregset): Remove variable.
4110 (mips_linux_iterate_over_regset_sections): Use
4111 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
4112 (mips_linux_o32_sigframe_init): Remove comment.
4113
4114 2018-05-25 Pedro Alves <palves@redhat.com>
4115
4116 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
4117 (struct readahead_cache, struct packet_reg, struct
4118 remote_arch_state, class remote_state): Move higher up in the
4119 file.
4120 (remote_target::m_remote_state): Now an object instead of a pointer.
4121 (remote_target::get_remote_state): Adjust.
4122
4123 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
4124
4125 * stack.c (select_and_print_frame): Delete.
4126 (struct function_bounds): Move struct within function.
4127 (func_command): Most content moved into new function
4128 find_frame_for_function, use new function, print result, add
4129 function comment.
4130 (find_frame_for_function): New function, now returns a result.
4131
4132 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4133
4134 * stack.c (iterate_over_block_arg_vars): Fix comment.
4135 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
4136
4137 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
4138
4139 PR gdb/23203
4140 * frame.c
4141 (scoped_restore_selected_frame::scoped_restore_selected_frame):
4142 Define.
4143 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
4144 Define.
4145 * frame.h (class scoped_restore_selected_frame): New class.
4146 * stack.c (print_frame_local_vars): Remove catching and rethrowing
4147 of any exception, use scoped_restore_selected_frame to restore the
4148 frame instead.
4149
4150 2018-05-24 Pedro Alves <palves@redhat.com>
4151
4152 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
4153 override.
4154
4155 2018-05-23 Tom Tromey <tom@tromey.com>
4156
4157 * complaints.c (struct complaints): Remove.
4158 (symfile_complaint_book): Remove.
4159 (series): New global.
4160 (complaint_internal): Update.
4161 (clear_complaints): Update.
4162
4163 2018-05-23 Tom Tromey <tom@tromey.com>
4164
4165 * complaints.c (counters): New global.
4166 (struct complain): Remove.
4167 (struct complaints) <root>: Remove.
4168 (complaint_sentinel): Remove.
4169 (symfile_complaint_book): Update.
4170 (find_complaint) Remove.
4171 (complaint_internal, clear_complaints): Update.
4172
4173 2018-05-23 Tom Tromey <tom@tromey.com>
4174
4175 * complaints.c (struct complain) <file, line>: Remove.
4176 (find_complaint): Remove file, line parameters.
4177 (complaint_internal): Update.
4178
4179 2018-05-23 Tom Tromey <tom@tromey.com>
4180
4181 * complaints.c (vcomplaint): Remove.
4182 (complaint_internal) Merge in contents of vcomplaint.
4183
4184 2018-05-23 Tom Tromey <tom@tromey.com>
4185
4186 * complaints.c (struct complaints) <explanation>: Remove.
4187 (symfile_explanations): Remove.
4188 (symfile_complaint_book): Update.
4189 (vcomplaint): Update.
4190 (struct explanation): Remove.
4191
4192 2018-05-23 Tom Tromey <tom@tromey.com>
4193
4194 * complaints.c (symfile_complaints): Remove.
4195 (complaint_internal): Remove "complaints" parameter.
4196 (clear_complaints, vcomplaint): Remove "c" parameter.
4197 (get_complaints): Remove.
4198 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
4199 (dwarf2_debug_line_missing_file_complaint)
4200 (dwarf2_debug_line_missing_end_sequence_complaint)
4201 (dwarf2_complex_location_expr_complaint)
4202 (dwarf2_const_value_length_mismatch_complaint)
4203 (dwarf2_section_buffer_overflow_complaint)
4204 (dwarf2_macro_malformed_definition_complaint)
4205 (dwarf2_invalid_attrib_class_complaint)
4206 (create_addrmap_from_index, dw2_symtab_iter_next)
4207 (dw2_expand_marked_cus)
4208 (dw2_debug_names_iterator::find_vec_in_debug_names)
4209 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
4210 (create_debug_type_hash_table, init_cutu_and_read_dies)
4211 (partial_die_parent_scope, add_partial_enumeration)
4212 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
4213 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
4214 (read_import_statement, read_file_scope, create_dwo_cu_reader)
4215 (create_cus_hash_table, create_dwp_hash_table)
4216 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
4217 (dwarf2_rnglists_process, dwarf2_ranges_process)
4218 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
4219 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
4220 (handle_struct_member_die, process_structure_scope)
4221 (read_array_type, read_common_block, read_module_type)
4222 (read_tag_pointer_type, read_typedef, read_base_type)
4223 (read_subrange_type, load_partial_dies, partial_die_info::read)
4224 (partial_die_info::read, partial_die_info::read)
4225 (partial_die_info::read, read_checked_initial_length_and_offset)
4226 (dwarf2_string_attr, read_formatted_entries)
4227 (dwarf_decode_line_header)
4228 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4229 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
4230 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
4231 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
4232 (get_signatured_type, get_DW_AT_signature_type)
4233 (decode_locdesc, file_file_name, consume_improper_spaces)
4234 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
4235 (dwarf_decode_macro_bytes, dwarf_decode_macros)
4236 (dwarf2_symbol_mark_computed, set_die_type)
4237 (read_attribute_value): Update.
4238 * stap-probe.c (handle_stap_probe, get_stap_base_address):
4239 Update.
4240 * dbxread.c (unknown_symtype_complaint)
4241 (lbrac_mismatch_complaint, repeated_header_complaint)
4242 (set_namestring, function_outside_compilation_unit_complaint)
4243 (read_dbx_symtab, process_one_symbol): Update.
4244 * gdbtypes.c (stub_noname_complaint): Update.
4245 * windows-nat.c (handle_unload_dll): Update.
4246 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
4247 (decode_base_type): Update.
4248 * xcoffread.c (bf_notfound_complaint, ef_complaint)
4249 (eb_complaint, record_include_begin, record_include_end)
4250 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
4251 (process_xcoff_symbol, read_symbol)
4252 (function_outside_compilation_unit_complaint)
4253 (scan_xcoff_symtab): Update.
4254 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
4255 * buildsym.c (finish_block_internal, make_blockvector)
4256 (end_symtab_get_static_block, augment_type_symtab): Update.
4257 * dtrace-probe.c (dtrace_process_dof)
4258 (dtrace_static_probe_ops::get_probes): Update.
4259 * complaints.h (struct complaint): Don't declare.
4260 (symfile_complaints): Remove.
4261 (complaint_internal): Remove "complaints" parameter.
4262 (complaint): Likewise.
4263 (clear_complaints): Likewise.
4264 * symfile.c (syms_from_objfile_1, finish_new_objfile)
4265 (reread_symbols): Update.
4266 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
4267 (dwarf2_frame_cache, decode_frame_entry): Update.
4268 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
4269 * objc-lang.c (lookup_objc_class, lookup_child_selector)
4270 (info_selectors_command): Update.
4271 * macrotab.c (macro_include, check_for_redefinition)
4272 (macro_undef): Update.
4273 * objfiles.c (filter_overlapping_sections): Update.
4274 * stabsread.c (invalid_cpp_abbrev_complaint)
4275 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
4276 (define_symbol, error_type, read_type, rs6000_builtin_type)
4277 (stabs_method_name_from_physname, read_member_functions)
4278 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
4279 (attach_fields_to_type, complain_about_struct_wipeout)
4280 (read_range_type, read_args, common_block_start)
4281 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
4282 Update.
4283 * mdebugread.c (index_complaint, unknown_ext_complaint)
4284 (basic_type_complaint, bad_tag_guess_complaint)
4285 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
4286 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
4287 (parse_procedure, parse_lines)
4288 (function_outside_compilation_unit_complaint)
4289 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
4290 (bad_tag_guess_complaint, reg_value_complaint): Update.
4291 * cp-support.c (demangled_name_complaint): Update.
4292 * macroscope.c (sal_macro_scope): Update.
4293 * dwarf-index-write.c (class debug_names): Update.
4294
4295 2018-05-23 Tom Tromey <tom@tromey.com>
4296
4297 * complaints.c (clear_complaints): Remove "noisy" parameter.
4298 * complaints.h (clear_complaints): Update.
4299 * symfile.c (syms_from_objfile_1, finish_new_objfile)
4300 (reread_symbols): Update.
4301
4302 2018-05-23 Tom Tromey <tom@tromey.com>
4303
4304 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
4305 SUBSEQUENT_MESSAGE.
4306 (vcomplaint, clear_complaints): Update.
4307 (symfile_explanations): Remove some messages.
4308
4309 2018-05-23 Tom Tromey <tom@tromey.com>
4310
4311 * complaints.c (internal_complaint): Remove.
4312 * complaints.h (internal_complaint): Remove.
4313
4314 2018-05-22 Maciej W. Rozycki <macro@mips.com>
4315
4316 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
4317
4318 2018-05-22 Pedro Alves <palves@redhat.com>
4319
4320 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
4321 (remote_fileio_badfd, remote_fileio_return_errno)
4322 (remote_fileio_return_success, remote_fileio_func_open)
4323 (remote_fileio_func_open, remote_fileio_func_close)
4324 (remote_fileio_func_read, remote_fileio_func_write)
4325 (remote_fileio_func_lseek, remote_fileio_func_rename)
4326 (remote_fileio_func_unlink, remote_fileio_func_stat)
4327 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
4328 (remote_fileio_func_isatty, remote_fileio_func_system): Add
4329 remote_target parameter.
4330 (remote_fio_func_map) <func>: Add remote_target parameter.
4331 (do_remote_fileio_request, remote_fileio_request):
4332 * remote-fileio.h (remote_fileio_request):
4333 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
4334 remote_target parameter.
4335 (remote_notif_process, handle_notification): Adjust to pass down
4336 the remote.
4337 (remote_notif_state_allocate): Add remote_target parameter. Save
4338 it.
4339 * remote-notif.h (struct remote_target): Forward declare.
4340 (struct notif_client) <parse, ack, can_get_pending_events>: Add
4341 remote_target parameter.
4342 (struct remote_notif_state) <remote>: New field.
4343 (remote_notif_ack, remote_notif_parse): Add remote_target
4344 parameter.
4345 (remote_notif_state_allocate, remote_notif_state_allocate): Add
4346 remote_target parameter.
4347 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
4348 (threads_listing_context, rmt_thread_action, protocol_feature)
4349 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
4350 (packet_result, struct threads_listing_context, remote_state):
4351 Move definitions and declarations higher up.
4352 (remote_target) <~remote_target>: Declare.
4353 (remote_download_command_source, remote_file_put, remote_file_get)
4354 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
4355 (remote_hostio_pread_vFile, remote_hostio_send_command)
4356 (remote_hostio_set_filesystem, remote_hostio_open)
4357 (remote_hostio_close, remote_hostio_unlink, remote_state)
4358 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
4359 (get_memory_write_packet_size, get_memory_read_packet_size)
4360 (append_pending_thread_resumptions, remote_detach_1)
4361 (append_resumption, remote_resume_with_vcont)
4362 (add_current_inferior_and_thread, wait_ns, wait_as)
4363 (process_stop_reply, remote_notice_new_inferior)
4364 (process_initial_stop_replies, remote_add_thread)
4365 (btrace_sync_conf, remote_btrace_maybe_reopen)
4366 (remove_new_fork_children, kill_new_fork_children)
4367 (discard_pending_stop_replies, stop_reply_queue_length)
4368 (check_pending_events_prevent_wildcard_vcont)
4369 (discard_pending_stop_replies_in_queue, stop_reply)
4370 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
4371 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
4372 (remote_interrupt_as, remote_interrupt_ns)
4373 (remote_get_noisy_reply, remote_query_attached)
4374 (remote_add_inferior, remote_current_thread, get_current_thread)
4375 (set_thread, set_general_thread, set_continue_thread)
4376 (set_general_process, write_ptid)
4377 (remote_unpack_thread_info_response, remote_get_threadinfo)
4378 (parse_threadlist_response, remote_get_threadlist)
4379 (remote_threadlist_iterator, remote_get_threads_with_ql)
4380 (remote_get_threads_with_qxfer)
4381 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
4382 (get_offsets, remote_check_symbols, remote_supported_packet)
4383 (remote_query_supported, remote_packet_size)
4384 (remote_serial_quit_handler, remote_detach_pid)
4385 (remote_vcont_probe, remote_resume_with_hc)
4386 (send_interrupt_sequence, interrupt_query)
4387 (remote_notif_get_pending_events, fetch_register_using_p)
4388 (send_g_packet, process_g_packet, fetch_registers_using_g)
4389 (store_register_using_P, store_registers_using_G)
4390 (set_remote_traceframe, check_binary_download)
4391 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
4392 (remote_xfer_live_readonly_partial, remote_read_bytes)
4393 (remote_send_printf, remote_flash_write, readchar)
4394 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
4395 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
4396 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
4397 (extended_remote_disable_randomization, extended_remote_run)
4398 (send_environment_packet, extended_remote_environment_support)
4399 (extended_remote_set_inferior_cwd, remote_write_qxfer)
4400 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
4401 (packet_command): Now methods of ...
4402 (remote_target): ... this class.
4403 (m_remote_state) <remote_target>: New field.
4404 (struct remote_state) <stop_reply_queue,
4405 remote_async_inferior_event_token, wait_forever_enabled_p>: New
4406 fields.
4407 (remote_state::remote_state): Allocate stop_reply_queue.
4408 (remote_state): Delete global.
4409 (get_remote_state_raw): Delete.
4410 (remote_target::get_remote_state): Allocate m_remote_state on
4411 demand.
4412 (get_current_remote_target): New.
4413 (remote_ops, extended_remote_ops): Delete.
4414 (wait_forever_enabled_p, remote_async_inferior_event_token):
4415 Delete, moved to struct remote_state.
4416 (remote_target::close): Delete self. Destruction bits split to
4417 ...
4418 (remote_target::~remote_target): ... this.
4419 (show_memory_packet_size): Adjust to use
4420 get_current_remote_target.
4421 (struct protocol_feature) <func>: Add remote_target parameter.
4422 All callers adjusted.
4423 (curr_quit_handler_target): New.
4424 (remote_serial_quit_handler): Reimplement.
4425 (remote_target::open_1): Adjust to use get_current_remote_target.
4426 Heap-allocate remote_target/extended_remote_target instances.
4427 (vcont_builder::vcont_builder): Add remote_target parameter, and
4428 save it in m_remote. All callers adjusted.
4429 (vcont_builder::m_remote): New field.
4430 (vcont_builder::restart, vcont_builder::flush)
4431 (vcont_builder::push_action): Use it.
4432 (remote_target::commit_resume): Use it.
4433 (struct queue_iter_param) <remote>: New field.
4434 (remote_target::remove_new_fork_children): Fill in 'remote' field.
4435 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
4436 (check_pending_event_prevents_wildcard_vcont_callback)
4437 (remote_target::check_pending_events_prevent_wildcard_vcont)
4438 (remote_target::discard_pending_stop_replies)
4439 (remote_target::discard_pending_stop_replies_in_queue)
4440 (remote_target::remote_notif_remove_queued_reply): Fill in
4441 'remote' field.
4442 (remote_notif_get_pending_events): New.
4443 (remote_target::readchar, remote_target::remote_serial_write):
4444 Save/restore curr_quit_handler_target.
4445 (putpkt): New.
4446 (kill_new_fork_children): Fill in 'remote' field.
4447 (packet_command): Use get_current_remote_target, defer to
4448 remote_target method of same name.
4449 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
4450 parameter, and save it in m_remote. All callers adjusted.
4451 (scoped_remote_fd::release): Use m_remote.
4452 (scoped_remote_fd::m_remote): New field.
4453 (remote_file_put, remote_file_get, remote_file_delete): Use
4454 get_current_remote_target, defer to remote_target method of same
4455 name.
4456 (remote_btrace_reset): Add remote_state paremeter. Update all
4457 callers.
4458 (remote_async_inferior_event_handler). Pass down 'data'.
4459 (remote_new_objfile): Use get_current_remote_target.
4460 (remote_target::vcont_r_supported): New.
4461 (set_range_stepping): Use get_current_remote_target and
4462 remote_target::vcont_r_supported.
4463 (_initialize_remote): Don't allocate 'remote_state' and
4464 'stop_reply_queue' globals.
4465 * remote.h (struct remote_target): Forward declare.
4466 (getpkt, putpkt, remote_notif_get_pending_events): Add
4467 'remote_target' parameter.
4468
4469 2018-05-22 Pedro Alves <palves@redhat.com>
4470
4471 * remote.c (vcont_builder): Now a class. Make all data members
4472 private.
4473 (vcont_builder) <vcont_builder, restart, flush, push_action>:
4474 Declare methods.
4475 (vcont_builder_restart): Rename to ...
4476 (vcont_builder::restart): ... this.
4477 (vcont_builder_flush): Rename to ...
4478 (vcont_builder::flush): ... this.
4479 (vcont_builder_push_action): Rename to ...
4480 (vcont_builder::push_action): ... this.
4481 (remote_target::commit_resume): Adjust.
4482
4483 2018-05-22 Pedro Alves <palves@redhat.com>
4484
4485 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
4486 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
4487 (get_fixed_memory_packet_size): New.
4488 (get_memory_packet_size): Use it.
4489 (set_memory_packet_size): Don't override the config size with
4490 DEFAULT_MAX_MEMORY_PACKET_SIZE.
4491 (show_memory_packet_size): Use get_fixed_memory_packet_size.
4492 Don't refer to get_memory_packet_size if not connected to a remote
4493 target. Show "(default)" if configured size is 0.
4494
4495 2018-05-22 Pedro Alves <palves@redhat.com>
4496
4497 * remote.c (remote_target::mourn_inferior): Move
4498 discard_pending_stop_replies call here from ...
4499 (_initialize_remote): ... here.
4500
4501 2018-05-22 Pedro Alves <palves@redhat.com>
4502
4503 * remote.c (compare_section_command): Remove set_general_process
4504 call.
4505
4506 2018-05-22 Pedro Alves <palves@redhat.com>
4507
4508 * remote.c (struct packet_reg, struct remote_arch_state):
4509 Move higher up in the file.
4510 (remote_state) <m_arch_states>: Store remote_arch_state values
4511 instead of remote_arch_state pointers.
4512 (remote_state::get_remote_arch_state): Adjust.
4513
4514 2018-05-22 Pedro Alves <palves@redhat.com>
4515
4516 * remote.c: Include <unordered_map>.
4517 (remote_state): Now a class.
4518 (remote_state) <get_remote_arch_state>: Declare method.
4519 <get_remote_arch_state>: New field.
4520 (remote_arch_state) <remote_arch_state>: Declare ctor.
4521 <regs>: Now a unique_ptr.
4522 (remote_gdbarch_data_handle): Delete.
4523 (get_remote_arch_state): Delete.
4524 (remote_state::get_remote_arch_state): New.
4525 (get_remote_state): Adjust to call remote_state's
4526 get_remote_arch_state method.
4527 (init_remote_state): Delete, bits factored out to ...
4528 (remote_arch_state::remote_arch_state): ... this new method.
4529 (get_remote_packet_size, get_memory_packet_size)
4530 (process_g_packet, remote_target::fetch_registers)
4531 (remote_target::prepare_to_store, store_registers_using_G)
4532 (remote_target::store_registers, remote_target::get_trace_status):
4533 Adjust to call remote_state's method.
4534 (_initialize_remote): Remove reference to
4535 remote_gdbarch_data_handle.
4536
4537 2018-05-22 Pedro Alves <palves@redhat.com>
4538
4539 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
4540 pread>: New method declarations.
4541 (remote_target::open_1): Adjust.
4542 (readahead_cache_invalidate): Rename to ...
4543 (readahead_cache::invalidate): ... this, and adjust to be a class
4544 method.
4545 (readahead_cache_invalidate_fd): Rename to ...
4546 (readahead_cache::invalidate_fd): ... this, and adjust to be a
4547 class method.
4548 (remote_hostio_pwrite): Adjust.
4549 (remote_hostio_pread_from_cache): Rename to ...
4550 (readahead_cache::pread): ... this, and adjust to be a class
4551 method.
4552 (remote_hostio_close): Adjust.
4553
4554 2018-05-22 Pedro Alves <palves@redhat.com>
4555
4556 * remote.c (remote_hostio_close_cleanup): Delete.
4557 (class scoped_remote_fd): New.
4558 (remote_file_put, remote_file_get): Use it.
4559
4560 2018-05-22 Pedro Alves <palves@redhat.com>
4561
4562 (struct vCont_action_support): Use bool and initialize all fields.
4563 (struct readahead_cache): Initialize all fields.
4564 (remote_state): Use bool and initialize all fields.
4565 (remote_state::remote_state, remote_state::~remote_state): New.
4566 (new_remote_state): Delete.
4567 (_initialize_remote): Use new to allocate remote_state.
4568
4569 2018-05-22 Pedro Alves <palves@redhat.com>
4570 張俊芝 <zjz@zjz.name>
4571
4572 PR gdb/22973
4573 * c-exp.y: Include "c-support.h".
4574 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
4575 of tolower. Use c_ident_is_alpha to scan names.
4576 * c-lang.c: Include "c-support.h".
4577 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
4578 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
4579 * c-support.h: New file, with bits factored out from ...
4580 * cp-name-parser.y: ... this file.
4581 Include "c-support.h".
4582 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
4583 c-support.h and renamed.
4584 (symbol_end, yylex): Adjust.
4585
4586 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4587
4588 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
4589 parameter type to CORE_ADDR.
4590 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
4591 parameter type in declaration to CORE_ADDR.
4592 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
4593 target_auxv_search to get AT_HWCAP and use the result to get the
4594 target description.
4595 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
4596 to CORE_ADDR. Remove the cast of the return value to unsigned
4597 long. Fix error predicate of target_auxv_search.
4598 (ppc_linux_nat_target::read_description): Change the type of the
4599 hwcap variable to CORE_ADDR.
4600
4601 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4602
4603 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
4604 if the size of fpscr is larger than 32 bits.
4605
4606 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4607
4608 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
4609 (ppc32_linux_vsxregmap): New global.
4610 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
4611 regcache_supply_regset, and regcache_collect_regset.
4612 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
4613 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
4614 (fetch_vsx_register, store_vsx_register): Remove.
4615 (fetch_vsx_registers): Add regno parameter. Get regset using
4616 ppc_linux_vsxregset. Use regset to supply registers.
4617 (store_vsx_registers): Add regno parameter. Get regset using
4618 ppc_linux_vsxregset. Use regset to collect registers.
4619 (fetch_register): Call fetch_vsx_registers instead of
4620 fetch_vsx_register.
4621 (store_register): Call store_vsx_registers instead of
4622 store_vsx_register.
4623 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
4624 new regno parameter.
4625 (store_ppc_registers): Call store_vsx_registers with -1 for the
4626 new regno parameter.
4627 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
4628 (ppc_collect_vsxregset): Remove.
4629
4630 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4631
4632 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
4633 offset fields.
4634 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
4635 for vector register offset fields.
4636 (ppc64_fbsd_reg_offsets): Likewise.
4637 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4638 to vector register offset fields.
4639 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4640 to vector register offset fields.
4641 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
4642 vector register offset fields.
4643 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
4644 initializers for vector register offset fields.
4645 (rs6000_aix64_reg_offsets): Likewise.
4646 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
4647 (ppc_supply_vrregset): Remove.
4648 (ppc_collect_vrregset): Remove.
4649 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
4650 (ppc_linux_vrregset) : New function.
4651 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
4652 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
4653 (ppc32_linux_vrregset): Remove.
4654 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
4655 and use result instead of ppc32_linux_vrregset.
4656 (ppc32_linux_reg_offsets): Remove initializers for vector register
4657 offset fields.
4658 (ppc64_linux_reg_offsets): Likewise.
4659 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
4660 * ppc-linux-nat.c: Include regset.h.
4661 (gdb_vrregset_t): Adjust comment to account for little-endian
4662 mode.
4663 (supply_vrregset, fill_vrregset): Remove.
4664 (fetch_altivec_register, store_altivec_register): Remove.
4665 (fetch_altivec_registers): Add regno parameter. Get regset using
4666 ppc_linux_vrregset. Use regset to supply registers.
4667 (store_altivec_registers): Add regno parameter. Get regset using
4668 ppc_linux_vrregset. Use regset to collect registers.
4669 (fetch_register): Call fetch_altivec_registers instead of
4670 fetch_altivec_register.
4671 (store_register): Call store_altivec_registers instead of
4672 store_altivec_register.
4673 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
4674 the new regno parameter.
4675 (store_ppc_registers): Call store_altivec_registers with -1 for
4676 the new regno parameter.
4677
4678 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4679
4680 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
4681 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
4682 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
4683 (gdb_vrregset_t): Change array type size to
4684 PPC_LINUX_SIZEOF_VRREGSET.
4685 (gdb_vsxregset_t): Change array type size to
4686 PPC_LINUX_SIZEOF_VSXREGSET.
4687 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
4688 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
4689 PPC_LINUX_SIZEOF_VSXREGSET.
4690
4691 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4692
4693 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
4694 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
4695 nat/ppc-linux.c.
4696 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
4697 ppc_linux_target_wordsize with tid.
4698 (ppc_linux_nat_target::read_description): Call ppc_linux_target
4699 wordsize with tid.
4700 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
4701 (ppc64_64bit_inferior_p): Add static and inline specifiers.
4702 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
4703 tid parameter. Remove static specifier.
4704 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
4705 (ppc_linux_target_wordsize): New declaration.
4706
4707 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4708
4709 * arch/ppc-linux-common.c: New file.
4710 * arch/ppc-linux-common.h: New file.
4711 * arch/ppc-linux-tdesc.h: New file.
4712 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
4713 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
4714 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
4715 arch/ppc-linux-tdesc.h.
4716 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
4717 arch/ppc-linux-tdesc.h.
4718 (ppc_linux_nat_target::read_description): Remove target
4719 description matching code. Fill a ppc_linux_features struct and
4720 call ppc_linux_match_description with it. Move comment about ISA
4721 2.05 to ppc-linux-common.c.
4722 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
4723 arch/ppc-linux-tdesc.h.
4724 (ppc_linux_core_read_description): Remove target description
4725 matching code. Fill a ppc_linux_features struct and call
4726 ppc_linux_match_description with it.
4727 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
4728 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
4729 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
4730 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
4731 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
4732 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
4733 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
4734 (tdesc_powerpc_e500l): Remove.
4735
4736 2018-05-22 Joel Brobecker <brobecker@adacore.com>
4737
4738 * ada-lang.c (catch_assert_command): Pass empty string instead
4739 of NULL for excep_string argument.
4740
4741 2018-05-22 Maciej W. Rozycki <macro@mips.com>
4742
4743 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
4744 the width of the requested register exceeds the width of the
4745 `ptrace' data type.
4746
4747 2018-05-21 Tom Tromey <tom@tromey.com>
4748
4749 * printcmd.c (output_command): Remove.
4750 (output_command_const): Rename to output_command.
4751 * valprint.h (output_command): Rename from output_command_const.
4752 * tracepoint.c (trace_dump_actions): Call output_command.
4753
4754 2018-05-21 Tom Tromey <tom@tromey.com>
4755
4756 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4757 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
4758 * ada-lang.h (create_ada_exception_catchpoint): Update.
4759 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
4760 std::string.
4761 (create_excep_cond_exprs, ~ada_catchpoint)
4762 (should_stop_exception, print_one_exception)
4763 (print_mention_exception, print_recreate_exception): Update.
4764 (ada_get_next_arg): Remove.
4765 (catch_ada_exception_command_split): Use std::string. Change type
4766 of "excep_string", "cond_string".
4767 (catch_ada_exception_command): Update.
4768 (create_ada_exception_catchpoint): Change type of excep_string.
4769 (ada_exception_sal): Remove excep_string parameter.
4770 (~ada_catchpoint): Remove.
4771
4772 2018-05-21 Tom Tromey <tom@tromey.com>
4773
4774 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
4775 cleanup.
4776
4777 2018-05-21 Tom Tromey <tom@tromey.com>
4778
4779 * ada-lang.c (ada_exception_message_1, ada_exception_message):
4780 Return unique_xmalloc_ptr.
4781 (print_it_exception): Update.
4782
4783 2018-05-21 Tom Tromey <tom@tromey.com>
4784
4785 * tracepoint.c (trace_dump_actions): Use std::string.
4786
4787 2018-05-21 Tom Tromey <tom@tromey.com>
4788
4789 * symfile.c (reread_symbols): Use std::string for original_name.
4790
4791 2018-05-21 Tom Tromey <tom@tromey.com>
4792
4793 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
4794 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
4795 constructor.
4796
4797 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
4798
4799 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
4800 instance to...
4801 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
4802 * objfiles.c (get_objfile_bfd_data): Allocate
4803 objfile_per_bfd_storage with obstack_new when allocating on
4804 obstack.
4805
4806 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
4807
4808 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
4809 OBSTACK_ZALLOC.
4810 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
4811 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
4812 * mdebugread.c (mdebug_build_psymtabs): Likewise.
4813 (add_pending): Likewise.
4814 (parse_symbol): Likewise.
4815 (parse_partial_symbols): Likewise.
4816 (psymtab_to_symtab_1): Likewise.
4817 (new_psymtab): Likewise.
4818 (elfmdebug_build_psymtabs): Likewise.
4819 * minsyms.c (terminate_minimal_symbol_table): Likewise.
4820 * objfiles.c (get_objfile_bfd_data): Likewise.
4821 (objfile_register_static_link): Likewise.
4822 * psymtab.c (allocate_psymtab): Likewise.
4823 * stabsread.c (read_member_functions): Likewise.
4824 * xcoffread.c (xcoff_end_psymtab): Likewise.
4825
4826 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
4827
4828 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
4829 compiler supports std::is_trivially_constructible.
4830 * common/poison.h: Include obstack.h.
4831 (IsMallocable): Define to is_trivially_constructible if the
4832 compiler supports it, define to true_type otherwise.
4833 (xobnew): New.
4834 (XOBNEW): Redefine.
4835 (xobnewvec): New.
4836 (XOBNEWVEC): Redefine.
4837 * gdb_obstack.h (obstack_zalloc): New.
4838 (OBSTACK_ZALLOC): Redefine.
4839 (obstack_calloc): New.
4840 (OBSTACK_CALLOC): Redefine.
4841 (obstack_new): New.
4842 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
4843 (gdbarch_obstack): New declaration in gdbarch.h, definition in
4844 gdbarch.c.
4845 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
4846 obstack_calloc/obstack_zalloc.
4847 (gdbarch_obstack_zalloc): Remove.
4848 * target-descriptions.c (tdesc_data_init): Use obstack_new.
4849
4850 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4851
4852 * stack.c (backtrace_command_1): Remove useless variable int i.
4853
4854 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4855
4856 * stack.c (print_frame_info): Fix comment.
4857
4858 2018-05-18 Tom Tromey <tom@tromey.com>
4859
4860 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
4861 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
4862 (~dwarf2_per_objfile): Update
4863 (dwarf2_get_dwz_file): Use new.
4864 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
4865 unique_ptr.
4866
4867 2018-05-18 Tom Tromey <tom@tromey.com>
4868
4869 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
4870 unique_ptr.
4871 * dwarf2read.c (struct dwp_file): Add constructor and
4872 initializers.
4873 (open_and_init_dwp_file): Return a unique_ptr.
4874 (dwarf2_per_objfile, create_dwp_hash_table)
4875 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
4876 (lookup_dwo_unit_in_dwp): Update.
4877 (open_and_init_dwp_file, get_dwp_file): Update.
4878
4879 2018-05-18 Tom Tromey <tom@tromey.com>
4880
4881 * dwarf2read.c (dwarf2_per_objfile): Update.
4882 (struct mapped_index): Add initializers.
4883 (dwarf2_read_index): Use new.
4884 (dw2_symtab_iter_init): Update.
4885 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
4886 unique_ptr.
4887
4888 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
4889
4890 * dwarf2read.c (mapped_index) <total_size>: Remove.
4891
4892 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
4893
4894 * unittests/format_pieces-selftests.c (test_format_specifier):
4895 Add ARI comments.
4896
4897 2018-05-18 Tom Tromey <tom@tromey.com>
4898
4899 * c-typeprint.c (maybe_print_hole): New function.
4900 (c_print_type_struct_field_offset): Update.
4901 (c_type_print_base_struct_union): Call maybe_print_hole.
4902
4903 2018-05-17 Keith Seitz <keiths@redhat.com>
4904
4905 * breakpoint.c (build_bpstat_chain): New function, moved from
4906 bpstat_stop_status.
4907 (bpstat_stop_status): Add optional parameter, `stop_chain'.
4908 If no stop chain is passed, call build_bpstat_chain to build it.
4909 * breakpoint.h (build_bpstat_chain): Declare.
4910 (bpstat_stop_status): Move documentation here from breakpoint.c.
4911 * infrun.c (handle_signal_stop): Before eliding inlined frames,
4912 build the stop chain and pass it to skip_inline_frames.
4913 Pass this stop chain to bpstat_stop_status.
4914 * inline-frame.c: Include breakpoint.h.
4915 (stopped_by_user_bp_inline_frame): New function.
4916 (skip_inline_frames): Add parameter `stop_chain'.
4917 Move documention to inline-frame.h.
4918 If non-NULL, use stopped_by_user_bp_inline_frame to determine
4919 whether the frame should be elided.
4920 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
4921 Add moved documentation and update for new parameter.
4922
4923 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
4924
4925 PR cli/14975
4926 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4927 unittests/format_pieces-selftests.c.
4928 * common/format.h (format_piece) <operator==>: New.
4929 (format_pieces) <operator[]>: Remove.
4930 * common/format.c (format_pieces::format_pieces): Handle \e.
4931 * unittests/format_pieces-selftests.c: New.
4932
4933 2018-05-17 Tom Tromey <tom@tromey.com>
4934
4935 PR symtab/23010:
4936 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
4937 (dw2_instantiate_symtab): Add skip_partial parameter.
4938 (dw2_find_last_source_symtab, dw2_map_expand_apply)
4939 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
4940 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
4941 (dw2_expand_symtabs_matching_one)
4942 (dw2_find_pc_sect_compunit_symtab)
4943 (dw2_debug_names_lookup_symbol)
4944 (dw2_debug_names_expand_symtabs_for_function): Update.
4945 (init_cutu_and_read_dies): Add skip_partial parameter.
4946 (process_psymtab_comp_unit, build_type_psymtabs_1)
4947 (process_skeletonless_type_unit, load_partial_comp_unit)
4948 (psymtab_to_symtab_1): Update.
4949 (load_full_comp_unit): Add skip_partial parameter.
4950 (process_imported_unit_die, dwarf2_read_addr_index)
4951 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
4952 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
4953 (read_signatured_type): Update.
4954
4955 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
4956
4957 * value.c (release_value): Remove unused variable.
4958 (record_latest_value): Likewise.
4959 (access_value_history): Likewise.
4960 (preserve_values): Likewise.
4961
4962 2018-05-17 Tom Tromey <tom@tromey.com>
4963
4964 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
4965 Initialize.
4966
4967 2018-05-16 Maciej W. Rozycki <macro@mips.com>
4968
4969 PR gdb/22286
4970 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
4971 Also handle registers whose width is not a multiple of
4972 PTRACE_TYPE_RET.
4973 (linux_nat_trad_target::store_register): Likewise.
4974
4975 2018-05-16 Tom Tromey <tom@tromey.com>
4976
4977 * gdbcore.h (core_bfd): Redefine.
4978 * corelow.c (core_target::close): Update.
4979 (core_target_open): Update.
4980 * progspace.h (struct program_space) <cbfd>: Now a
4981 gdb_bfd_ref_ptr.
4982
4983 2018-05-16 Tom Tromey <tom@tromey.com>
4984
4985 PR cli/19551:
4986 * symfile-add-flags.h (enum symfile_add_flags)
4987 <SYMFILE_NOT_FILENAME>: New constant.
4988 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
4989 objfile name from BFD.
4990 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
4991 * minidebug.c (find_separate_debug_file_in_section): Put
4992 ".gnu_debugdata" into BFD's file name.
4993
4994 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
4995
4996 * regcache.c (regcache_read_ftype, regcache_write_ftype):
4997 Remove.
4998
4999 2018-05-15 Tamar Christina <tamar.christina@arm.com>
5000
5001 PR binutils/21446
5002 * aarch64-tdep.c (aarch64_analyze_prologue,
5003 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
5004 Indicate not interested in errors.
5005
5006 2018-05-15 Maciej W. Rozycki <macro@mips.com>
5007
5008 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
5009 Supply the MIPS_ZERO_REGNUM register.
5010
5011 2018-05-15 Maciej W. Rozycki <macro@mips.com>
5012
5013 * mips-tdep.c (mask_address_var): Make variable static.
5014
5015 2018-05-14 Tom Tromey <tom@tromey.com>
5016
5017 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
5018
5019 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
5020
5021 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
5022 FXSAVE_ADDR for the mxcsr register.
5023
5024 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
5025
5026 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
5027
5028 2018-05-11 Pedro Alves <palves@redhat.com>
5029
5030 * corelow.c (core_target) <core_target>: No longer inline.
5031 Initialize m_core_gdbarch, m_core_vec and build the section table
5032 here.
5033 <~core_target>: New.
5034 <core_gdbarch, get_core_register_section>: New methods.
5035 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
5036 factored out from ...
5037 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
5038 (core_ops): Delete.
5039 (sniff_core_bfd): Add gdbarch parameter.
5040 (core_close): Delete, merged into ...
5041 (core_target::close): ... here. Delete self.
5042 (core_close_cleanup): Delete.
5043 (core_target_open): Allocate a core_target on the heap. Use a
5044 unique_ptr instead of a cleanup. Bits moved into the core_target
5045 ctor. Adjust to use core_target methods instead of globals.
5046 (get_core_register_section): Rename to ...
5047 (core_target::get_core_register_section): ... this and adjust.
5048 (struct get_core_registers_cb_data): New.
5049 (get_core_registers_cb): Use it. Use bool.
5050 (core_target::fetch_registers, core_target::files_info)
5051 (core_target::xfer_partial, core_target::read_description)
5052 (core_target::pid_to, core_target::thread_name): Adjust to
5053 reference class fields instead of globals.
5054 * target.h (struct target_ops_deleter, target_ops_up): New.
5055
5056 2018-05-11 Pedro Alves <palves@redhat.com>
5057
5058 * corefile.c (core_file_command): Move to corelow.c.
5059 * corelow.c (the_core_target): Delete.
5060 (core_file_command): Moved from corefile.c. Check exec_bfd
5061 instead of the_core_target. Use target_detach instead of calling
5062 into the_core_target directly.
5063 (maybe_say_no_core_file_now): New.
5064 (core_target::detach): Use it.
5065 (_initialize_corelow): Remove references to the_core_target.
5066 * gdbcore.h (the_core_target): Delete.
5067
5068 2018-05-11 Tom Tromey <tromey@redhat.com>
5069 Pedro Alves <palves@redhat.com>
5070
5071 * corefile.c (core_bfd): Remove.
5072 * gdbcore.h (core_bfd): Now a macro.
5073 * progspace.h (struct program_space) <cbfd>: New field.
5074
5075 2018-05-11 Tom Tromey <tom@tromey.com>
5076
5077 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
5078 gdb::def_vector.
5079
5080 2018-05-10 Tom Tromey <tom@tromey.com>
5081
5082 * configure: Rebuild.
5083 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
5084
5085 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5086
5087 PR server/23158:
5088 * regformats/regdat.sh: Adjust script, following the addition
5089 of the new expedite_regs parameter to init_target_desc.
5090
5091 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
5092
5093 PR gdb/23127
5094 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
5095 set_gdbarch_significant_addr_bit.
5096 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
5097 set_gdbarch_significant_addr_bit.
5098 * utils.c (address_significant): Update to sign extend addr.
5099
5100 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
5101
5102 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
5103 (xtensa_linux_init_abi): Limit tdep->num_regs by
5104 tdep->num_nopriv_regs.
5105 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
5106 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
5107 not initialized.
5108
5109 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
5110
5111 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
5112
5113 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
5114
5115 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
5116 (I387_MXCSR_INIT_VAL): New constant.
5117 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
5118 buffer if it was supplied by the inferior.
5119 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
5120 (i387_xsave_get_clear_bv): New function.
5121 (i387_supply_xsave): Only read x87 control registers from the
5122 xsave buffer if the feature is enabled, and the state will have
5123 been written, otherwise, provide a suitable default.
5124 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
5125 including x87 control registers. Update control registers if they
5126 have changed from the default value, and mark features as enabled
5127 as required.
5128 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
5129
5130 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
5131
5132 * spu-tdep.c (info_spu_event_command): Fix output formatting.
5133
5134 2018-05-07 Tom Tromey <tom@tromey.com>
5135
5136 * configure: Rebuild.
5137 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
5138
5139 2018-05-07 Tom Tromey <tom@tromey.com>
5140
5141 PR tdep/20362:
5142 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
5143 bit. Use correct value for VDIV.
5144
5145 2018-05-04 Tom Tromey <tom@tromey.com>
5146
5147 * configure: Rebuild.
5148 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
5149
5150 2018-05-04 Tom Tromey <tom@tromey.com>
5151
5152 * linux-record.c (record_linux_system_call) <case
5153 RECORD_SYS_RECVFROM>: Add "break".
5154
5155 2018-05-04 Tom Tromey <tom@tromey.com>
5156
5157 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
5158 Add missing "break".
5159 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
5160 Add missing "break".
5161
5162 2018-05-04 Tom Tromey <tom@tromey.com>
5163
5164 * rs6000-tdep.c (ppc_process_record_op4)
5165 (ppc_process_record_op63): Add fall-through comment.
5166
5167 2018-05-04 Tom Tromey <tom@tromey.com>
5168
5169 * i386-tdep.c (i386_process_record): Add fall-through comment.
5170
5171 2018-05-04 Tom Tromey <tom@tromey.com>
5172
5173 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
5174 comment.
5175
5176 2018-05-04 Tom Tromey <tom@tromey.com>
5177
5178 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
5179 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
5180 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
5181 comment.
5182 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
5183 comment.
5184 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
5185 comment.
5186
5187 2018-05-04 Tom Tromey <tom@tromey.com>
5188
5189 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
5190
5191 2018-05-04 Tom Tromey <tom@tromey.com>
5192
5193 * s390-tdep.c (s390_process_record): Fix fall-through comments.
5194 * xcoffread.c (scan_xcoff_symtab): Move comment later.
5195 * symfile.c (section_is_mapped): Fix fall-through comment.
5196 * stabsread.c (define_symbol, read_member_functions): Fix
5197 fall-through comment.
5198 * s390-linux-tdep.c (s390_process_record): Fix fall-through
5199 comment.
5200 * remote.c (remote_wait_as): Fix fall-through comment.
5201 * p-exp.y (yylex): Fix fall-through comment.
5202 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
5203 comment.
5204 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
5205 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
5206 * jv-exp.y (yylex): Fix fall-through comment.
5207 * go-exp.y (lex_one_token): Fix fall-through comment.
5208 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
5209 fall-through comment.
5210 * f-exp.y (yylex): Fix fall-through comment.
5211 * dwarf2read.c (process_die): Fix fall-through comments.
5212 * dbxread.c (process_one_symbol): Fix fall-through comment.
5213 * d-exp.y (lex_one_token): Fix fall-through comment.
5214 * cp-name-parser.y (yylex): Fix fall-through comment.
5215 * coffread.c (coff_symtab_read): Fix fall-through comment.
5216 * c-exp.y (lex_one_token): Fix fall-through comment.
5217 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
5218 comment.
5219 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
5220 comment.
5221
5222 2018-05-04 Tom Tromey <tom@tromey.com>
5223
5224 PR python/22730:
5225 * NEWS: Mention gdb.execute change.
5226 * gdbcmd.h (execute_control_command): Don't declare.
5227 * python/python.c (execute_gdb_command): Use read_command_lines_1,
5228 execute_control_commands, execute_control_commands_to_string.
5229 * cli/cli-script.h (execute_control_commands)
5230 (execute_control_commands_to_string): Declare.
5231 (execute_control_command): Add from_tty parameter.
5232 * cli/cli-script.c (execute_control_commands)
5233 (execute_control_commands_to_string): New functions.
5234 (execute_user_command): Use execute_control_commands.
5235 (execute_control_command_1): Add "from_tty" parameter. Update.
5236 (execute_control_command): Likewise.
5237
5238 2018-05-04 Tom Tromey <tom@tromey.com>
5239
5240 PR python/22731:
5241 * NEWS: Mention that breakpoint commands are writable.
5242 * python/py-breakpoint.c (bppy_set_commands): New function.
5243 (breakpoint_object_getset) <"commands">: Use it.
5244
5245 2018-05-04 Tom Tromey <tom@tromey.com>
5246
5247 * tracepoint.c (actions_command): Update.
5248 * mi/mi-cmd-break.c (mi_command_line_array)
5249 (mi_command_line_array_cnt, mi_command_line_array_ptr)
5250 (mi_read_next_line): Remove.
5251 (mi_cmd_break_commands): Update.
5252 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
5253 function_view.
5254 * cli/cli-script.c (get_command_line): Update.
5255 (process_next_line): Use function_view. Constify.
5256 (recurse_read_control_structure, read_command_lines)
5257 (read_command_lines_1): Change argument types to function_view.
5258 (do_define_command, document_command): Update.
5259 * breakpoint.h (check_tracepoint_command): Don't declare.
5260 * breakpoint.c (check_tracepoint_command): Remove.
5261 (commands_command_1, create_tracepoint_from_upload): Update.
5262
5263 2018-05-04 Tom Tromey <tom@tromey.com>
5264
5265 PR gdb/11750:
5266 * cli/cli-script.h (enum command_control_type) <define_control>:
5267 New constant.
5268 * cli/cli-script.c (multi_line_command_p): Handle define_control.
5269 (build_command_line, execute_control_command_1)
5270 (process_next_line): Likewise.
5271 (do_define_command): New function, extracted from define_command.
5272 (define_command): Use it.
5273
5274 2018-05-04 Tom Tromey <tom@tromey.com>
5275
5276 * tracepoint.c (actions_command): Update.
5277 * cli/cli-script.h (read_command_lines): Update.
5278 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
5279 (MAX_TMPBUF): Remove define.
5280 (define_command): Use string_printf.
5281 (document_command): Likewise.
5282 * breakpoint.c (commands_command_1): Update.
5283
5284 2018-05-04 Tom Tromey <tom@tromey.com>
5285
5286 * top.c (execute_command): Update.
5287 * cli/cli-script.h (print_command_lines): Now varargs.
5288 * cli/cli-script.c (print_command_lines): Now varargs.
5289 (execute_control_command_1) <case while_control, case if_control>:
5290 Update.
5291
5292 2018-05-04 Tom Tromey <tom@tromey.com>
5293
5294 * tracepoint.c (all_tracepoint_actions): Rename from
5295 all_tracepoint_actions_and_cleanup. Change return type.
5296 (actions_command, encode_actions_1, encode_actions)
5297 (trace_dump_actions, tdump_command): Update.
5298 * remote.c (remote_download_command_source): Update.
5299 * python/python.c (gdbpy_eval_from_control_command)
5300 (python_command, python_interactive_command): Update.
5301 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
5302 * guile/guile.c (guile_command)
5303 (gdbscm_eval_from_control_command, guile_command): Update.
5304 * compile/compile.c (compile_code_command)
5305 (compile_print_command, compile_to_object): Update.
5306 * cli/cli-script.h (struct command_lines_deleter): New.
5307 (counted_command_line): New typedef.
5308 (struct command_line): Add constructor, destructor.
5309 <body_list>: Remove.
5310 <body_list_0, body_list_1>: New members.
5311 (command_line_up): Remove typedef.
5312 (read_command_lines, read_command_lines_1, get_command_line):
5313 Update.
5314 (copy_command_lines): Don't declare.
5315 * cli/cli-script.c (build_command_line): Use "new".
5316 (get_command_line): Return counted_command_line.
5317 (print_command_lines, execute_user_command)
5318 (execute_control_command_1, while_command, if_command): Update.
5319 (realloc_body_list): Remove.
5320 (process_next_line, recurse_read_control_structure): Update.
5321 (read_command_lines, read_command_lines_1): Return counted_command_line.
5322 (free_command_lines): Use "delete".
5323 (copy_command_lines): Remove.
5324 (define_command, document_command, show_user_1): Update.
5325 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
5326 a counted_command_line.
5327 * breakpoint.h (counted_command_line): Remove typedef.
5328 (breakpoint_set_commands): Update.
5329 * breakpoint.c (check_no_tracepoint_commands)
5330 (validate_commands_for_breakpoint): Update.
5331 (breakpoint_set_commands): Change commands to be a
5332 counted_command_line.
5333 (commands_command_1, update_dprintf_command_list)
5334 (create_tracepoint_from_upload): Update.
5335
5336 2018-05-04 Tom Tromey <tom@tromey.com>
5337
5338 * cli/cli-decode.h (cmd_list_element): New constructor.
5339 (~cmd_list_element): New destructor.
5340 (struct cmd_list_element): Add initializers.
5341 * cli/cli-decode.c (do_add_cmd): Use "new".
5342 (delete_cmd): Use "delete".
5343
5344 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
5345 Pedro Alves <palves@redhat.com>
5346
5347 PR breakpoints/19806 and support for PR external/20207.
5348 * NEWS: Mention Aarch64 watchpoint improvements.
5349 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
5350 watchpoints and PR external/20207 watchpoints.
5351 * nat/aarch64-linux-hw-point.c
5352 (kernel_supports_any_contiguous_range): New.
5353 (aarch64_watchpoint_offset): New.
5354 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
5355 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
5356 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
5357 (aarch64_align_watchpoint): New parameters aligned_offset_p and
5358 next_addr_orig_p. Support PR external/20207 watchpoints.
5359 (aarch64_downgrade_regs): New.
5360 (aarch64_dr_state_insert_one_point): New parameters offset and
5361 addr_orig.
5362 (aarch64_dr_state_remove_one_point): Likewise.
5363 (aarch64_handle_breakpoint): Update caller.
5364 (aarch64_handle_aligned_watchpoint): Likewise.
5365 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
5366 aligned_offset.
5367 (aarch64_linux_set_debug_regs): Remove const from state. Call
5368 aarch64_downgrade_regs.
5369 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
5370 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
5371 (DR_CONTROL_MASK): ... this.
5372 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
5373 (unsigned int aarch64_watchpoint_offset): New prototype.
5374 (aarch64_linux_set_debug_regs): Remove const from state.
5375 * utils.c (align_up, align_down): Move to ...
5376 * common/common-utils.c (align_up, align_down): ... here.
5377 * utils.h (align_up, align_down): Move to ...
5378 * common/common-utils.h (align_up, align_down): ... here.
5379
5380 2018-05-04 Joel Brobecker <brobecker@adacore.com>
5381
5382 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
5383 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
5384 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
5385 Re-implement to match the ABI as summarized in GCC's
5386 gcc/config/sparc/sparc.c. All callers updated.
5387 (sparc32_store_arguments): Remove assertion.
5388
5389 2018-05-04 Tom Tromey <tom@tromey.com>
5390
5391 * printcmd.c: Don't include tui.h.
5392 (decode_format): Use skip_spaces.
5393
5394 2018-05-04 Tom Tromey <tom@tromey.com>
5395
5396 PR gdb/22619:
5397 * printcmd.c (last_count): New global.
5398 (x_command): Use saved count when repeating.
5399
5400 2018-05-04 Tom Tromey <tom@tromey.com>
5401
5402 * nto-procfs.c (do_closedir_cleanup): Remove.
5403 (procfs_pidlist): Use gdb_dir_up.
5404 * procfs.c (do_closedir_cleanup): Remove.
5405 (proc_update_threads): Use gdb_dir_up.
5406 * common/filestuff.h (struct gdb_dir_deleter): New.
5407 (gdb_dir_up): New typedef.
5408
5409 2018-05-04 Tom Tromey <tom@tromey.com>
5410
5411 * ada-lang.c (print_mention_exception): Use std::string.
5412
5413 2018-05-04 Tom Tromey <tom@tromey.com>
5414
5415 * ada-lang.c (create_excep_cond_exprs): Update.
5416 (ada_exception_catchpoint_cond_string): Use std::string.
5417
5418 2018-05-04 Tom Tromey <tom@tromey.com>
5419
5420 * ada-lang.c (xget_renaming_scope): Return std::string.
5421 (old_renaming_is_invisible): Update.
5422
5423 2018-05-04 Tom Tromey <tom@tromey.com>
5424
5425 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
5426 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
5427
5428 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
5429
5430 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
5431
5432 2018-05-04 Tom Tromey <tom@tromey.com>
5433
5434 * remote.c (remote_query_supported_append): Change type.
5435 (remote_check_symbols): Update.
5436
5437 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
5438
5439 PR gdb/11420
5440 * configure.ac: Prepend libpython.
5441 * python/python-config.py: Likewise.
5442 * configure: Regenerate.
5443
5444 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
5445
5446 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
5447
5448 2018-05-03 Pedro Alves <palves@redhat.com>
5449
5450 * s390-linux-nat.c
5451 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
5452 override. Write 'true' instead of '1'.
5453 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
5454 declaration.
5455
5456 2018-05-02 Pedro Alves <palves@redhat.com>
5457
5458 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
5459 add_inf_child_target.
5460 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
5461 add_inf_child_target.
5462 * aix-thread.c (aix_thread_target_info): New.
5463 (aix_thread_target) <shortname, longname, doc>: Delete.
5464 <info>: New.
5465 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
5466 add_inf_child_target.
5467 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
5468 add_inf_child_target.
5469 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
5470 add_inf_child_target.
5471 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
5472 add_inf_child_target.
5473 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
5474 add_inf_child_target.
5475 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
5476 add_inf_child_target.
5477 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
5478 add_inf_child_target.
5479 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
5480 add_inf_child_target.
5481 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
5482 add_inf_child_target.
5483 * bfd-target.c (target_bfd_target_info): New.
5484 (target_bfd) <shortname, longname, doc>: Delete.
5485 <info>: New.
5486 * bsd-kvm.c (bsd_kvm_target_info): New.
5487 (bsd_kvm_target) <shortname, longname, doc>: Delete.
5488 <info>: New.
5489 (bsd_kvm_target::open): Rename to ...
5490 (bsd_kvm_target_open): ... this. Adjust.
5491 * bsd-uthread.c (bsd_uthread_target_info): New.
5492 (bsd_uthread_target) <shortname, longname, doc>: Delete.
5493 <info>: New.
5494 * corefile.c (core_file_command): Adjust.
5495 * corelow.c (core_target_info): New.
5496 (core_target) <shortname, longname, doc>: Delete.
5497 <info>: New.
5498 (core_target::open): Rename to ...
5499 (core_target_open): ... this. Adjust.
5500 * ctf.c (ctf_target_info): New.
5501 (ctf_target) <shortname, longname, doc>: Delete.
5502 <info>: New.
5503 (ctf_target::open): Rename to ...
5504 (ctf_target_open): ... this.
5505 (_initialize_ctf): Adjust.
5506 * exec.c (exec_target_info): New.
5507 (exec_target) <shortname, longname, doc>: Delete.
5508 <info>: New.
5509 (exec_target::open): Rename to ...
5510 (exec_target_open): ... this.
5511 * gdbcore.h (core_target_open): Declare.
5512 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
5513 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
5514 add_inf_child_target.
5515 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
5516 add_inf_child_target.
5517 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
5518 add_inf_child_target.
5519 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
5520 add_inf_child_target.
5521 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
5522 add_inf_child_target.
5523 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
5524 add_inf_child_target.
5525 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
5526 add_inf_child_target.
5527 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
5528 add_inf_child_target.
5529 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
5530 add_inf_child_target.
5531 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
5532 add_inf_child_target.
5533 * inf-child.c (inf_child_target_info): New.
5534 (inf_child_target::info): New.
5535 (inf_child_open_target): Remove 'target' parameter. Use
5536 get_native_target instead.
5537 (inf_child_target::open): Delete.
5538 (add_inf_child_target): New.
5539 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
5540 Delete.
5541 <info>: New.
5542 (add_inf_child_target): Declare.
5543 (inf_child_open_target): Declare.
5544 * linux-thread-db.c (thread_db_target_info): New.
5545 (thread_db_target) <shortname, longname, doc>: Delete.
5546 <info>: New.
5547 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
5548 add_inf_child_target.
5549 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
5550 add_inf_child_target.
5551 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
5552 add_inf_child_target.
5553 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
5554 add_inf_child_target.
5555 * make-target-delegates (print_class): Adjust.
5556 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
5557 add_inf_child_target.
5558 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
5559 add_inf_child_target.
5560 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
5561 add_inf_child_target.
5562 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
5563 add_inf_child_target.
5564 * nto-procfs.c (nto_native_target_info): New.
5565 (nto_procfs_target_native) <shortname, longname, doc>:
5566 Delete.
5567 <info>: New.
5568 (nto_procfs_target_info): New.
5569 (nto_procfs_target_procfs) <shortname, longname, doc>:
5570 Delete.
5571 <info>: New.
5572 (init_procfs_targets): Adjust.
5573 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
5574 add_inf_child_target.
5575 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
5576 add_inf_child_target.
5577 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
5578 add_inf_child_target.
5579 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
5580 add_inf_child_target.
5581 * ravenscar-thread.c (ravenscar_target_info): New.
5582 (ravenscar_thread_target) <shortname, longname, doc>:
5583 Delete.
5584 <info>: New.
5585 * record-btrace.c (record_btrace_target_info):
5586 (record_btrace_target) <shortname, longname, doc>: Delete.
5587 <info>: New.
5588 (record_btrace_target::open): Rename to ...
5589 (record_btrace_target_open): ... this. Adjust.
5590 * record-full.c (record_longname, record_doc): New.
5591 (record_full_base_target) <shortname, longname, doc>: Delete.
5592 <info>: New.
5593 (record_full_target_info): New.
5594 (record_full_target): <shortname>: Delete.
5595 <info>: New.
5596 (record_full_core_open_1, record_full_open_1): Update comments.
5597 (record_full_base_target::open): Rename to ...
5598 (record_full_open): ... this.
5599 (cmd_record_full_restore): Update.
5600 (_initialize_record_full): Update.
5601 * remote-sim.c (remote_sim_target_info): New.
5602 (gdbsim_target) <shortname, longname, doc>: Delete.
5603 <info>: New.
5604 (gdbsim_target::open): Rename to ...
5605 (gdbsim_target_open): ... this.
5606 (_initialize_remote_sim): Adjust.
5607 * remote.c (remote_doc): New.
5608 (remote_target_info): New.
5609 (remote_target) <shortname, longname, doc>: Delete.
5610 <info>: New.
5611 (extended_remote_target_info): New.
5612 (extended_remote_target) <shortname, longname, doc>: Delete.
5613 <info>: New.
5614 (remote_target::open_1): Make static. Adjust.
5615 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
5616 * s390-linux-nat.c (_initialize_s390_nat): Use
5617 add_inf_child_target.
5618 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
5619 add_inf_child_target.
5620 * sol-thread.c (thread_db_target_info): New.
5621 (sol_thread_target) <shortname, longname, doc>: Delete.
5622 <info>: New.
5623 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
5624 add_inf_child_target.
5625 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
5626 add_inf_child_target.
5627 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
5628 add_inf_child_target.
5629 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
5630 add_inf_child_target.
5631 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
5632 add_inf_child_target.
5633 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
5634 add_inf_child_target.
5635 * spu-linux-nat.c (_initialize_spu_nat): Use
5636 add_inf_child_target.
5637 * spu-multiarch.c (spu_multiarch_target_info): New.
5638 (spu_multiarch_target) <shortname, longname, doc>: Delete.
5639 <info>: New.
5640 * target-delegates.c: Regenerate.
5641 * target.c: Include <unordered_map>.
5642 (target_ops_p): Delete.
5643 (DEF_VEC_P(target_ops_p)): Delete.
5644 (target_factories): New.
5645 (test_target_info): New.
5646 (test_target_ops::info): New.
5647 (open_target): Adjust to use target_factories.
5648 (add_target_with_completer): Rename to ...
5649 (add_target): ... this. Change prototype. Register target_info
5650 and open callback in target_factories. Register target_info in
5651 command context instead of target_ops.
5652 (add_target): Delete old implementation.
5653 (add_deprecated_target_alias): Change prototype. Adjust.
5654 (the_native_target): New.
5655 (set_native_target, get_native_target): New.
5656 (find_default_run_target): Use the_native_target.
5657 (find_attach_target, find_run_target): Simplify.
5658 (target_ops::open): Delete.
5659 (dummy_target_info): New.
5660 (dummy_target::shortname, dummy_target::longname)
5661 (dummy_target::doc): Delete.
5662 (dummy_target::info): New.
5663 (debug_target::shortname, debug_target::longname)
5664 (debug_target::doc): Delete.
5665 (debug_target::info): New.
5666 * target.h (struct target_info): New.
5667 (target_ops::~target_ops): Add comment.
5668 (target_ops::info): New.
5669 (target_ops::shortname, target_ops::longname, target_ops::doc): No
5670 longer virtual. Implement in terms of target_info.
5671 (set_native_target, get_native_target): Declare.
5672 (target_open_ftype): New.
5673 (add_target, add_target_with_completer)
5674 (add_deprecated_target_alias): Change prototype.
5675 (test_target) <shortname, longname, doc>: Delete.
5676 <info>: New.
5677 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
5678 add_inf_child_target.
5679 * tracefile-tfile.c (tfile_target_info): New.
5680 (tfile_target) <shortname, longname, doc>: Delete.
5681 <info>: New.
5682 (tfile_target::open): Rename to ...
5683 (tfile_target_open): ... this.
5684 (_initialize_tracefile_tfile): Adjust.
5685 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
5686 add_inf_child_target.
5687 * windows-nat.c (_initialize_windows_nat): Use
5688 add_inf_child_target.
5689 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
5690 add_inf_child_target.
5691
5692 2018-05-02 Pedro Alves <palves@redhat.com>
5693
5694 * linux-nat.h (linux_nat_target) <low_new_thread,
5695 low_delete_thread, low_new_fork, low_forget_process,
5696 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
5697 New virtual methods.
5698 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5699 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
5700 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
5701 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5702 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
5703 Delete.
5704 * linux-fork.c (delete_fork): Adjust to call low method.
5705 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
5706 (linux_nat_new_fork, linux_nat_forget_process_hook)
5707 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
5708 (linux_nat_status_is_event):
5709 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
5710 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
5711 to call low method.
5712 (sigtrap_is_event): Rename to ...
5713 (linux_nat_target::low_status_is_event): ... this.
5714 (linux_nat_set_status_is_event): Delete.
5715 (save_stop_reason, linux_nat_wait_1)
5716 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
5717 low methods.
5718 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5719 (linux_nat_set_new_fork, linux_nat_set_forget_process)
5720 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5721 (linux_nat_set_prepare_to_resume): Delete.
5722 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
5723 low virtual methods.
5724 * amd64-linux-nat.c: Likewise.
5725 * arm-linux-nat.c: Likewise.
5726 * i386-linux-nat.c: Likewise.
5727 * ia64-linux-nat.c: Likewise.
5728 * mips-linux-nat.c: Likewise.
5729 * ppc-linux-nat.c: Likewise.
5730 * s390-linux-nat.c: Likewise.
5731 * sparc64-linux-nat.c: Likewise.
5732 * x86-linux-nat.c: Likewise.
5733 * x86-linux-nat.h: Include "nat/x86-linux.h".
5734 (x86_linux_nat_target) <low_new_fork, low_forget_process,
5735 low_prepare_to_resume, low_new_thread, low_delete_thread>:
5736 Override methods.
5737
5738 2018-05-02 Pedro Alves <palves@redhat.com>
5739
5740 * target.h (target_ops)
5741 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5742 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
5743 stopped_by_watchpoint, have_continuable_watchpoint,
5744 stopped_data_address, watchpoint_addr_within_range,
5745 can_accel_watchpoint_condition, can_run, thread_alive,
5746 has_all_memory, has_memory, has_stack, has_registers,
5747 has_execution, can_async_p, is_async_p, supports_non_stop,
5748 always_non_stop_p, can_execute_reverse, supports_multi_process,
5749 supports_enable_disable_tracepoint,
5750 supports_disable_randomization, supports_string_tracing,
5751 supports_evaluation_of_breakpoint_conditions,
5752 can_run_breakpoint_commands, filesystem_is_local,
5753 can_download_tracepoint, get_trace_state_variable_value,
5754 set_trace_notes, get_tib_address, use_agent, can_use_agent,
5755 record_is_replaying, record_will_replay,
5756 augmented_libraries_svr4_read>: Adjust to return bool.
5757 * aarch64-linux-nat.c: All implementations adjusted.
5758 * aix-thread.c: All implementations adjusted.
5759 * arm-linux-nat.c: All implementations adjusted.
5760 * breakpoint.c: All implementations adjusted.
5761 * bsd-kvm.c: All implementations adjusted.
5762 * bsd-uthread.c: All implementations adjusted.
5763 * corelow.c: All implementations adjusted.
5764 * ctf.c: All implementations adjusted.
5765 * darwin-nat.c: All implementations adjusted.
5766 * darwin-nat.h: All implementations adjusted.
5767 * exec.c: All implementations adjusted.
5768 * fbsd-nat.c: All implementations adjusted.
5769 * fbsd-nat.h: All implementations adjusted.
5770 * gnu-nat.c: All implementations adjusted.
5771 * gnu-nat.h: All implementations adjusted.
5772 * go32-nat.c: All implementations adjusted.
5773 * ia64-linux-nat.c: All implementations adjusted.
5774 * inf-child.c: All implementations adjusted.
5775 * inf-child.h: All implementations adjusted.
5776 * inf-ptrace.c: All implementations adjusted.
5777 * inf-ptrace.h: All implementations adjusted.
5778 * linux-nat.c: All implementations adjusted.
5779 * linux-nat.h: All implementations adjusted.
5780 * mips-linux-nat.c: All implementations adjusted.
5781 * nto-procfs.c: All implementations adjusted.
5782 * ppc-linux-nat.c: All implementations adjusted.
5783 * procfs.c: All implementations adjusted.
5784 * ravenscar-thread.c: All implementations adjusted.
5785 * record-btrace.c: All implementations adjusted.
5786 * record-full.c: All implementations adjusted.
5787 * remote-sim.c: All implementations adjusted.
5788 * remote.c: All implementations adjusted.
5789 * s390-linux-nat.c: All implementations adjusted.
5790 * sol-thread.c: All implementations adjusted.
5791 * spu-multiarch.c: All implementations adjusted.
5792 * target-delegates.c: All implementations adjusted.
5793 * target.c: All implementations adjusted.
5794 * target.h: All implementations adjusted.
5795 * tracefile-tfile.c: All implementations adjusted.
5796 * tracefile.c: All implementations adjusted.
5797 * tracefile.h: All implementations adjusted.
5798 * windows-nat.c: All implementations adjusted.
5799 * x86-linux-nat.h: All implementations adjusted.
5800 * x86-nat.h: All implementations adjusted.
5801
5802 2018-05-02 Pedro Alves <palves@redhat.com>
5803
5804 * make-target-delegates (scan_target_h): Don't trim lines here.
5805 Replace sequences of tabs and/or whitespace with a single
5806 whitespace.
5807 (top level, parsing methods): Trim each line before processing it
5808 here.
5809
5810 2018-05-02 Pedro Alves <palves@redhat.com>
5811 John Baldwin <jhb@freebsd.org>
5812
5813 * target.h (enum strata) <debug_stratum>: New.
5814 (struct target_ops) <all delegation methods>: Replace by C++
5815 virtual methods, and drop "to_" prefix. All references updated
5816 throughout.
5817 <to_shortname, to_longname, to_doc, to_data,
5818 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
5819 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
5820 virtual methods. All references updated throughout.
5821 <can_attach, supports_terminal_ours, can_create_inferior,
5822 get_thread_control_capabilities, attach_no_wait>: New
5823 virtual methods.
5824 <insert_breakpoint, remove_breakpoint>: Now
5825 TARGET_DEFAULT_NORETURN methods.
5826 <info_proc>: Now returns bool.
5827 <to_magic>: Delete.
5828 (OPS_MAGIC): Delete.
5829 (current_target): Delete. All references replaced by references
5830 to ...
5831 (target_stack): ... this. New.
5832 (target_shortname, target_longname): Adjust.
5833 (target_can_run): Now a function declaration.
5834 (default_child_has_all_memory, default_child_has_memory)
5835 (default_child_has_stack, default_child_has_registers)
5836 (default_child_has_execution): Remove target_ops parameter.
5837 (complete_target_initialization): Delete.
5838 (memory_breakpoint_target): New template class.
5839 (test_target_ops): Refactor as a C++ class with virtual methods.
5840 * make-target-delegates (NAME_PART): Tighten.
5841 (POINTER_PART, CP_SYMBOL): New.
5842 (SIMPLE_RETURN_PART): Reimplement.
5843 (VEC_RETURN_PART): Expect less.
5844 (RETURN_PART, VIRTUAL_PART): New.
5845 (METHOD): Adjust to C++ virtual methods.
5846 (scan_target_h): Remove reference to C99.
5847 (dname): Output "target_ops::" prefix.
5848 (write_function_header): Adjust to output a C++ class method.
5849 (write_declaration): New.
5850 (write_delegator): Adjust to output a C++ class method.
5851 (tdname): Output "dummy_target::" prefix.
5852 (write_tdefault, write_debugmethod): Adjust to output a C++ class
5853 method.
5854 (tdefault_names, debug_names): Delete.
5855 (return_types, tdefaults, styles, argtypes_array): New.
5856 (top level): All methods are delegators.
5857 (print_class): New.
5858 (top level): Print dummy_target and debug_target classes.
5859 * target-delegates.c: Regenerate.
5860 * target-debug.h (target_debug_print_enum_info_proc_what)
5861 (target_debug_print_thread_control_capabilities)
5862 (target_debug_print_thread_info_p): New.
5863 * target.c (dummy_target): Delete.
5864 (the_dummy_target, the_debug_target): New.
5865 (target_stack): Now extern.
5866 (set_targetdebug): Push/unpush debug target.
5867 (default_child_has_all_memory, default_child_has_memory)
5868 (default_child_has_stack, default_child_has_registers)
5869 (default_child_has_execution): Remove target_ops parameter.
5870 (complete_target_initialization): Delete.
5871 (add_target_with_completer): No longer call
5872 complete_target_initialization.
5873 (target_supports_terminal_ours): Use regular delegation.
5874 (update_current_target): Delete.
5875 (push_target): No longer check magic number. Don't call
5876 update_current_target.
5877 (unpush_target): Don't call update_current_target.
5878 (target_is_pushed): No longer check magic number.
5879 (target_require_runnable): Skip for all stratums over
5880 process_stratum.
5881 (target_ops::info_proc): New.
5882 (target_info_proc): Use find_target_at and
5883 find_default_run_target.
5884 (target_supports_disable_randomization): Use regular delegation.
5885 (target_get_osdata): Use find_target_at.
5886 (target_ops::open, target_ops::close, target_ops::can_attach)
5887 (target_ops::attach, target_ops::can_create_inferior)
5888 (target_ops::create_inferior, target_ops::can_run)
5889 (target_can_run): New.
5890 (default_fileio_target): Use regular delegation.
5891 (target_ops::fileio_open, target_ops::fileio_pwrite)
5892 (target_ops::fileio_pread, target_ops::fileio_fstat)
5893 (target_ops::fileio_close, target_ops::fileio_unlink)
5894 (target_ops::fileio_readlink): New.
5895 (target_fileio_open_1, target_fileio_unlink)
5896 (target_fileio_readlink): Always call the target method. Handle
5897 FILEIO_ENOSYS.
5898 (return_zero, return_zero_has_execution): Delete.
5899 (init_dummy_target): Delete.
5900 (dummy_target::dummy_target, dummy_target::shortname)
5901 (dummy_target::longname, dummy_target::doc)
5902 (debug_target::debug_target, debug_target::shortname)
5903 (debug_target::longname, debug_target::doc): New.
5904 (target_supports_delete_record): Use regular delegation.
5905 (setup_target_debug): Delete.
5906 (maintenance_print_target_stack): Skip debug_stratum.
5907 (initialize_targets): Instantiate the_dummy_target and
5908 the_debug_target.
5909 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
5910 use target_stack.
5911 (target_auxv_search, fprint_target_auxv): Adjust.
5912 (info_auxv_command): Adjust to use target_stack.
5913 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
5914 * exceptions.c (print_flush): Handle a NULL target_stack.
5915 * regcache.c (target_ops_no_register): Refactor as class with
5916 virtual methods.
5917
5918 * exec.c (exec_target): New class.
5919 (exec_ops): Now an exec_target.
5920 (exec_open, exec_close_1, exec_get_section_table)
5921 (exec_xfer_partial, exec_files_info, exec_has_memory)
5922 (exec_make_note_section): Refactor as exec_target methods.
5923 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
5924 Delete.
5925 (exec_target::find_memory_regions): New.
5926 (_initialize_exec): Don't call init_exec_ops.
5927 * gdbcore.h (exec_file_clear): Delete.
5928
5929 * corefile.c (core_target): Delete.
5930 (core_file_command): Adjust.
5931 * corelow.c (core_target): New class.
5932 (the_core_target): New.
5933 (core_close): Remove target_ops parameter.
5934 (core_close_cleanup): Adjust.
5935 (core_target::close): New.
5936 (core_open, core_detach, get_core_registers, core_files_info)
5937 (core_xfer_partial, core_thread_alive, core_read_description)
5938 (core_pid_to_str, core_thread_name, core_has_memory)
5939 (core_has_stack, core_has_registers, core_info_proc): Rework as
5940 core_target methods.
5941 (ignore, core_remove_breakpoint, init_core_ops): Delete.
5942 (_initialize_corelow): Initialize the_core_target.
5943 * gdbcore.h (core_target): Delete.
5944 (the_core_target): New.
5945
5946 * ctf.c: (ctf_target): New class.
5947 (ctf_ops): Now a ctf_target.
5948 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
5949 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
5950 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
5951 methods.
5952 (init_ctf_ops): Delete.
5953 (_initialize_ctf): Don't call it.
5954 * tracefile-tfile.c (tfile_target): New class.
5955 (tfile_ops): Now a tfile_target.
5956 (tfile_open, tfile_close, tfile_files_info)
5957 (tfile_get_tracepoint_status, tfile_trace_find)
5958 (tfile_fetch_registers, tfile_xfer_partial)
5959 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
5960 Refactor as tfile_target methods.
5961 (tfile_xfer_partial_features): Remove target_ops parameter.
5962 (init_tfile_ops): Delete.
5963 (_initialize_tracefile_tfile): Don't call it.
5964 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
5965 (tracefile_has_stack, tracefile_has_registers)
5966 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
5967 tracefile_target methods.
5968 (init_tracefile_ops): Delete.
5969 (tracefile_target::tracefile_target): New.
5970 * tracefile.h: Include "target.h".
5971 (tracefile_target): New class.
5972 (init_tracefile_ops): Delete.
5973
5974 * spu-multiarch.c (spu_multiarch_target): New class.
5975 (spu_ops): Now a spu_multiarch_target.
5976 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
5977 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
5978 (spu_search_memory, spu_mourn_inferior): Refactor as
5979 spu_multiarch_target methods.
5980 (init_spu_ops): Delete.
5981 (_initialize_spu_multiarch): Remove references to init_spu_ops,
5982 complete_target_initialization.
5983
5984 * ravenscar-thread.c (ravenscar_thread_target): New class.
5985 (ravenscar_ops): Now a ravenscar_thread_target.
5986 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
5987 (ravenscar_thread_alive, ravenscar_pid_to_str)
5988 (ravenscar_fetch_registers, ravenscar_store_registers)
5989 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
5990 (ravenscar_stopped_by_hw_breakpoint)
5991 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
5992 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
5993 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
5994 methods.
5995 (init_ravenscar_thread_ops): Delete.
5996 (_initialize_ravenscar): Remove references to
5997 init_ravenscar_thread_ops and complete_target_initialization.
5998
5999 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
6000 (bsd_uthread_target): New class.
6001 (bsd_uthread_ops): Now a bsd_uthread_target.
6002 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
6003 (bsd_uthread_close, bsd_uthread_mourn_inferior)
6004 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
6005 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
6006 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
6007 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
6008 (bsd_uthread_target): Delete function.
6009 (_initialize_bsd_uthread): Remove reference to
6010 complete_target_initialization.
6011
6012 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
6013 (target_bfd): ... this new class.
6014 (target_bfd_xfer_partial, target_bfd_get_section_table)
6015 (target_bfd_close): Refactor as target_bfd methods.
6016 (target_bfd::~target_bfd): New.
6017 (target_bfd_reopen): Adjust.
6018 (target_bfd::close): New.
6019
6020 * record-btrace.c (record_btrace_target): New class.
6021 (record_btrace_ops): Now a record_btrace_target.
6022 (record_btrace_open, record_btrace_stop_recording)
6023 (record_btrace_disconnect, record_btrace_close)
6024 (record_btrace_async, record_btrace_info)
6025 (record_btrace_insn_history, record_btrace_insn_history_range)
6026 (record_btrace_insn_history_from, record_btrace_call_history)
6027 (record_btrace_call_history_range)
6028 (record_btrace_call_history_from, record_btrace_record_method)
6029 (record_btrace_is_replaying, record_btrace_will_replay)
6030 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
6031 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
6032 (record_btrace_store_registers, record_btrace_prepare_to_store)
6033 (record_btrace_to_get_unwinder)
6034 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
6035 (record_btrace_commit_resume, record_btrace_wait)
6036 (record_btrace_stop, record_btrace_can_execute_reverse)
6037 (record_btrace_stopped_by_sw_breakpoint)
6038 (record_btrace_supports_stopped_by_sw_breakpoint)
6039 (record_btrace_stopped_by_hw_breakpoint)
6040 (record_btrace_supports_stopped_by_hw_breakpoint)
6041 (record_btrace_update_thread_list, record_btrace_thread_alive)
6042 (record_btrace_goto_begin, record_btrace_goto_end)
6043 (record_btrace_goto, record_btrace_stop_replaying_all)
6044 (record_btrace_execution_direction)
6045 (record_btrace_prepare_to_generate_core)
6046 (record_btrace_done_generating_core): Refactor as
6047 record_btrace_target methods.
6048 (init_record_btrace_ops): Delete.
6049 (_initialize_record_btrace): Remove reference to
6050 init_record_btrace_ops.
6051 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
6052 the execution_direction global.
6053 (record_full_base_target, record_full_target)
6054 (record_full_core_target): New classes.
6055 (record_full_ops): Now a record_full_target.
6056 (record_full_core_ops): Now a record_full_core_target.
6057 (record_full_target::detach, record_full_target::disconnect)
6058 (record_full_core_target::disconnect)
6059 (record_full_target::mourn_inferior, record_full_target::kill):
6060 New.
6061 (record_full_open, record_full_close, record_full_async): Refactor
6062 as methods of the record_full_base_target class.
6063 (record_full_resume, record_full_commit_resume): Refactor
6064 as methods of the record_full_target class.
6065 (record_full_wait, record_full_stopped_by_watchpoint)
6066 (record_full_stopped_data_address)
6067 (record_full_stopped_by_sw_breakpoint)
6068 (record_full_supports_stopped_by_sw_breakpoint)
6069 (record_full_stopped_by_hw_breakpoint)
6070 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
6071 methods of the record_full_base_target class.
6072 (record_full_store_registers, record_full_xfer_partial)
6073 (record_full_insert_breakpoint, record_full_remove_breakpoint):
6074 Refactor as methods of the record_full_target class.
6075 (record_full_can_execute_reverse, record_full_get_bookmark)
6076 (record_full_goto_bookmark, record_full_execution_direction)
6077 (record_full_record_method, record_full_info, record_full_delete)
6078 (record_full_is_replaying, record_full_will_replay)
6079 (record_full_goto_begin, record_full_goto_end, record_full_goto)
6080 (record_full_stop_replaying): Refactor as methods of the
6081 record_full_base_target class.
6082 (record_full_core_resume, record_full_core_kill)
6083 (record_full_core_fetch_registers)
6084 (record_full_core_prepare_to_store)
6085 (record_full_core_store_registers, record_full_core_xfer_partial)
6086 (record_full_core_insert_breakpoint)
6087 (record_full_core_remove_breakpoint)
6088 (record_full_core_has_execution): Refactor
6089 as methods of the record_full_core_target class.
6090 (record_full_base_target::supports_delete_record): New.
6091 (init_record_full_ops): Delete.
6092 (init_record_full_core_ops): Delete.
6093 (record_full_save): Refactor as method of the
6094 record_full_base_target class.
6095 (_initialize_record_full): Remove references to
6096 init_record_full_ops and init_record_full_core_ops.
6097
6098 * remote.c (remote_target, extended_remote_target): New classes.
6099 (remote_ops): Now a remote_target.
6100 (extended_remote_ops): Now an extended_remote_target.
6101 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
6102 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
6103 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
6104 (remote_pass_signals, remote_set_syscall_catchpoint)
6105 (remote_program_signals, )
6106 (remote_thread_always_alive): Remove target_ops parameter.
6107 (remote_thread_alive, remote_thread_name)
6108 (remote_update_thread_list, remote_threads_extra_info)
6109 (remote_static_tracepoint_marker_at)
6110 (remote_static_tracepoint_markers_by_strid)
6111 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
6112 (remote_open): Refactor as methods of remote_target.
6113 (extended_remote_open, extended_remote_detach)
6114 (extended_remote_attach, extended_remote_post_attach):
6115 (extended_remote_supports_disable_randomization)
6116 (extended_remote_create_inferior): : Refactor as method of
6117 extended_remote_target.
6118 (remote_set_permissions, remote_open_1, remote_detach)
6119 (remote_follow_fork, remote_follow_exec, remote_disconnect)
6120 (remote_resume, remote_commit_resume, remote_stop)
6121 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
6122 (remote_terminal_ours, remote_wait, remote_fetch_registers)
6123 (remote_prepare_to_store, remote_store_registers)
6124 (remote_flash_erase, remote_flash_done, remote_files_info)
6125 (remote_kill, remote_mourn, remote_insert_breakpoint)
6126 (remote_remove_breakpoint, remote_insert_watchpoint)
6127 (remote_watchpoint_addr_within_range)
6128 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
6129 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
6130 (remote_supports_stopped_by_sw_breakpoint)
6131 (remote_stopped_by_hw_breakpoint)
6132 (remote_supports_stopped_by_hw_breakpoint)
6133 (remote_stopped_by_watchpoint, remote_stopped_data_address)
6134 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
6135 (remote_verify_memory): Refactor as methods of remote_target.
6136 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
6137 parameter.
6138 (remote_xfer_partial, remote_get_memory_xfer_limit)
6139 (remote_search_memory, remote_rcmd, remote_memory_map)
6140 (remote_pid_to_str, remote_get_thread_local_address)
6141 (remote_get_tib_address, remote_read_description): Refactor as
6142 methods of remote_target.
6143 (remote_target::fileio_open, remote_target::fileio_pwrite)
6144 (remote_target::fileio_pread, remote_target::fileio_close): New.
6145 (remote_hostio_readlink, remote_hostio_fstat)
6146 (remote_filesystem_is_local, remote_can_execute_reverse)
6147 (remote_supports_non_stop, remote_supports_disable_randomization)
6148 (remote_supports_multi_process, remote_supports_cond_breakpoints)
6149 (remote_supports_enable_disable_tracepoint)
6150 (remote_supports_string_tracing)
6151 (remote_can_run_breakpoint_commands, remote_trace_init)
6152 (remote_download_tracepoint, remote_can_download_tracepoint)
6153 (remote_download_trace_state_variable, remote_enable_tracepoint)
6154 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
6155 (remote_trace_start, remote_get_trace_status)
6156 (remote_get_tracepoint_status, remote_trace_stop)
6157 (remote_trace_find, remote_get_trace_state_variable_value)
6158 (remote_save_trace_data, remote_get_raw_trace_data)
6159 (remote_set_disconnected_tracing, remote_core_of_thread)
6160 (remote_set_circular_trace_buffer, remote_traceframe_info)
6161 (remote_get_min_fast_tracepoint_insn_len)
6162 (remote_set_trace_buffer_size, remote_set_trace_notes)
6163 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
6164 (remote_disable_btrace, remote_teardown_btrace)
6165 (remote_read_btrace, remote_btrace_conf)
6166 (remote_augmented_libraries_svr4_read, remote_load)
6167 (remote_pid_to_exec_file, remote_can_do_single_step)
6168 (remote_execution_direction, remote_thread_handle_to_thread_info):
6169 Refactor as methods of remote_target.
6170 (init_remote_ops, init_extended_remote_ops): Delete.
6171 (remote_can_async_p, remote_is_async_p, remote_async)
6172 (remote_thread_events, remote_upload_tracepoints)
6173 (remote_upload_trace_state_variables): Refactor as methods of
6174 remote_target.
6175 (_initialize_remote): Remove references to init_remote_ops and
6176 init_extended_remote_ops.
6177
6178 * remote-sim.c (gdbsim_target): New class.
6179 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
6180 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
6181 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
6182 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
6183 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
6184 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
6185 Refactor as methods of gdbsim_target.
6186 (gdbsim_ops): Now a gdbsim_target.
6187 (init_gdbsim_ops): Delete.
6188 (gdbsim_cntrl_c): Adjust.
6189 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
6190
6191 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
6192 (the_amd64_linux_nat_target): New.
6193 (amd64_linux_fetch_inferior_registers)
6194 (amd64_linux_store_inferior_registers): Refactor as methods of
6195 amd64_linux_nat_target.
6196 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
6197 * i386-linux-nat.c: Don't include "linux-nat.h".
6198 (i386_linux_nat_target): New class.
6199 (the_i386_linux_nat_target): New.
6200 (i386_linux_fetch_inferior_registers)
6201 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
6202 as methods of i386_linux_nat_target.
6203 (_initialize_i386_linux_nat): Adjust. Set linux_target.
6204 * inf-child.c (inf_child_ops): Delete.
6205 (inf_child_fetch_inferior_registers)
6206 (inf_child_store_inferior_registers): Delete.
6207 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
6208 methods of inf_child_target.
6209 (inf_child_target::supports_terminal_ours)
6210 (inf_child_target::terminal_init)
6211 (inf_child_target::terminal_inferior)
6212 (inf_child_target::terminal_ours_for_output)
6213 (inf_child_target::terminal_ours, inf_child_target::interrupt)
6214 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
6215 New.
6216 (inf_child_open, inf_child_disconnect, inf_child_close)
6217 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
6218 (inf_child_post_startup_inferior, inf_child_can_run)
6219 (inf_child_pid_to_exec_file): Refactor as methods of
6220 inf_child_target.
6221 (inf_child_follow_fork): Delete.
6222 (inf_child_target::can_create_inferior)
6223 (inf_child_target::can_attach): New.
6224 (inf_child_target::has_all_memory, inf_child_target::has_memory)
6225 (inf_child_target::has_stack, inf_child_target::has_registers)
6226 (inf_child_target::has_execution): New.
6227 (inf_child_fileio_open, inf_child_fileio_pwrite)
6228 (inf_child_fileio_pread, inf_child_fileio_fstat)
6229 (inf_child_fileio_close, inf_child_fileio_unlink)
6230 (inf_child_fileio_readlink, inf_child_use_agent)
6231 (inf_child_can_use_agent): Refactor as methods of
6232 inf_child_target.
6233 (return_zero, inf_child_target): Delete.
6234 (inf_child_target::inf_child_target): New.
6235 * inf-child.h: Include "target.h".
6236 (inf_child_target): Delete function prototype.
6237 (inf_child_target): New class.
6238 (inf_child_open_target, inf_child_mourn_inferior)
6239 (inf_child_maybe_unpush_target): Delete.
6240 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
6241 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
6242 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
6243 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
6244 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
6245 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
6246 (inf_ptrace_wait, inf_ptrace_xfer_partial)
6247 (inf_ptrace_thread_alive, inf_ptrace_files_info)
6248 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
6249 methods of inf_ptrace_target.
6250 (inf_ptrace_target): Delete function.
6251 * inf-ptrace.h: Include "inf-child.h".
6252 (inf_ptrace_target): Delete function declaration.
6253 (inf_ptrace_target): New class.
6254 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
6255 * linux-nat.c (linux_target): New.
6256 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
6257 (linux_nat_target::~linux_nat_target): New.
6258 (linux_child_post_attach, linux_child_post_startup_inferior)
6259 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
6260 (linux_child_remove_fork_catchpoint)
6261 (linux_child_insert_vfork_catchpoint)
6262 (linux_child_remove_vfork_catchpoint)
6263 (linux_child_insert_exec_catchpoint)
6264 (linux_child_remove_exec_catchpoint)
6265 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
6266 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
6267 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
6268 (linux_nat_stopped_data_address)
6269 (linux_nat_stopped_by_sw_breakpoint)
6270 (linux_nat_supports_stopped_by_sw_breakpoint)
6271 (linux_nat_stopped_by_hw_breakpoint)
6272 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
6273 (linux_nat_kill, linux_nat_mourn_inferior)
6274 (linux_nat_xfer_partial, linux_nat_thread_alive)
6275 (linux_nat_update_thread_list, linux_nat_pid_to_str)
6276 (linux_nat_thread_name, linux_child_pid_to_exec_file)
6277 (linux_child_static_tracepoint_markers_by_strid)
6278 (linux_nat_is_async_p, linux_nat_can_async_p)
6279 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
6280 (linux_nat_supports_multi_process)
6281 (linux_nat_supports_disable_randomization, linux_nat_async)
6282 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
6283 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
6284 (linux_nat_fileio_open, linux_nat_fileio_readlink)
6285 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
6286 methods of linux_nat_target.
6287 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
6288 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
6289 parameter.
6290 (check_stopped_by_watchpoint): Adjust.
6291 (linux_xfer_partial): Delete.
6292 (linux_target_install_ops, linux_target, linux_nat_add_target):
6293 Delete.
6294 (linux_nat_target::linux_nat_target): New.
6295 * linux-nat.h: Include "inf-ptrace.h".
6296 (linux_nat_target): New.
6297 (linux_target, linux_target_install_ops, linux_nat_add_target):
6298 Delete function declarations.
6299 (linux_target): Declare global.
6300 * linux-thread-db.c (thread_db_target): New.
6301 (thread_db_target::thread_db_target): New.
6302 (thread_db_ops): Delete.
6303 (the_thread_db_target): New.
6304 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
6305 (thread_db_update_thread_list, thread_db_pid_to_str)
6306 (thread_db_extra_thread_info)
6307 (thread_db_thread_handle_to_thread_info)
6308 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
6309 (thread_db_resume): Refactor as methods of thread_db_target.
6310 (init_thread_db_ops): Delete.
6311 (_initialize_thread_db): Remove reference to init_thread_db_ops.
6312 * x86-linux-nat.c: Don't include "linux-nat.h".
6313 (super_post_startup_inferior): Delete.
6314 (x86_linux_nat_target::~x86_linux_nat_target): New.
6315 (x86_linux_child_post_startup_inferior)
6316 (x86_linux_read_description, x86_linux_enable_btrace)
6317 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
6318 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
6319 methods of x86_linux_nat_target.
6320 (x86_linux_create_target): Delete. Bits folded ...
6321 (x86_linux_add_target): ... here. Now takes a linux_nat_target
6322 pointer.
6323 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
6324 (x86_linux_nat_target): New class.
6325 (x86_linux_create_target): Delete.
6326 (x86_linux_add_target): Now takes a linux_nat_target pointer.
6327 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
6328 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
6329 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
6330 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
6331 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
6332 make extern.
6333 (x86_use_watchpoints): Delete.
6334 * x86-nat.h: Include "breakpoint.h" and "target.h".
6335 (x86_use_watchpoints): Delete.
6336 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
6337 (x86_stopped_by_watchpoint, x86_stopped_data_address)
6338 (x86_insert_watchpoint, x86_remove_watchpoint)
6339 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
6340 (x86_stopped_by_hw_breakpoint): New declarations.
6341 (x86_nat_target): New template class.
6342
6343 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
6344 (the_ppc_linux_nat_target): New.
6345 (ppc_linux_fetch_inferior_registers)
6346 (ppc_linux_can_use_hw_breakpoint)
6347 (ppc_linux_region_ok_for_hw_watchpoint)
6348 (ppc_linux_ranged_break_num_registers)
6349 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
6350 (ppc_linux_insert_mask_watchpoint)
6351 (ppc_linux_remove_mask_watchpoint)
6352 (ppc_linux_can_accel_watchpoint_condition)
6353 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
6354 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
6355 (ppc_linux_watchpoint_addr_within_range)
6356 (ppc_linux_masked_watch_num_registers)
6357 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
6358 (ppc_linux_read_description): Refactor as methods of
6359 ppc_linux_nat_target.
6360 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
6361
6362 * procfs.c (procfs_xfer_partial): Delete forward declaration.
6363 (procfs_target): New class.
6364 (the_procfs_target): New.
6365 (procfs_target): Delete function.
6366 (procfs_auxv_parse, procfs_attach, procfs_detach)
6367 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
6368 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
6369 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
6370 (procfs_create_inferior, procfs_update_thread_list)
6371 (procfs_thread_alive, procfs_pid_to_str)
6372 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
6373 (procfs_stopped_data_address, procfs_insert_watchpoint)
6374 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
6375 (proc_find_memory_regions, procfs_info_proc)
6376 (procfs_make_note_section): Refactor as methods of procfs_target.
6377 (_initialize_procfs): Adjust.
6378 * sol-thread.c (sol_thread_target): New class.
6379 (sol_thread_ops): Now a sol_thread_target.
6380 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
6381 (sol_thread_fetch_registers, sol_thread_store_registers)
6382 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
6383 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
6384 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
6385 (init_sol_thread_ops): Delete.
6386 (_initialize_sol_thread): Adjust. Remove references to
6387 init_sol_thread_ops and complete_target_initialization.
6388
6389 * windows-nat.c (windows_nat_target): New class.
6390 (windows_fetch_inferior_registers)
6391 (windows_store_inferior_registers, windows_resume, windows_wait)
6392 (windows_attach, windows_detach, windows_pid_to_exec_file)
6393 (windows_files_info, windows_create_inferior)
6394 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
6395 (windows_close, windows_pid_to_str, windows_xfer_partial)
6396 (windows_get_tib_address, windows_get_ada_task_ptid)
6397 (windows_thread_name, windows_thread_alive): Refactor as
6398 windows_nat_target methods.
6399 (do_initial_windows_stuff): Adjust.
6400 (windows_target): Delete function.
6401 (_initialize_windows_nat): Adjust.
6402
6403 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
6404 (darwin_mourn_inferior, darwin_kill_inferior)
6405 (darwin_create_inferior, darwin_attach, darwin_detach)
6406 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
6407 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
6408 (darwin_supports_multi_process): Refactor as darwin_nat_target
6409 methods.
6410 (darwin_resume_to, darwin_files_info): Delete.
6411 (_initialize_darwin_inferior): Rename to ...
6412 (_initialize_darwin_nat): ... this. Adjust to C++ification.
6413 * darwin-nat.h: Include "inf-child.h".
6414 (darwin_nat_target): New class.
6415 (darwin_complete_target): Delete.
6416 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
6417 (darwin_target): New.
6418 (i386_darwin_fetch_inferior_registers)
6419 (i386_darwin_store_inferior_registers): Refactor as methods of
6420 darwin_nat_target.
6421 (darwin_complete_target): Delete, with ...
6422 (_initialize_i386_darwin_nat): ... bits factored out here.
6423
6424 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
6425 (the_alpha_linux_nat_target): New.
6426 (alpha_linux_register_u_offset): Refactor as
6427 alpha_linux_nat_target method.
6428 (_initialize_alpha_linux_nat): Adjust.
6429 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
6430 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6431 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
6432 methods of linux_nat_trad_target.
6433 (linux_trad_target): Delete.
6434 * linux-nat-trad.h (linux_trad_target): Delete function.
6435 (linux_nat_trad_target): New class.
6436 * mips-linux-nat.c (mips_linux_nat_target): New class.
6437 (super_fetch_registers, super_store_registers, super_close):
6438 Delete.
6439 (the_mips_linux_nat_target): New.
6440 (mips64_linux_regsets_fetch_registers)
6441 (mips64_linux_regsets_store_registers)
6442 (mips64_linux_fetch_registers, mips64_linux_store_registers)
6443 (mips_linux_register_u_offset, mips_linux_read_description)
6444 (mips_linux_can_use_hw_breakpoint)
6445 (mips_linux_stopped_by_watchpoint)
6446 (mips_linux_stopped_data_address)
6447 (mips_linux_region_ok_for_hw_watchpoint)
6448 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
6449 (mips_linux_close): Refactor as methods of mips_linux_nat.
6450 (_initialize_mips_linux_nat): Adjust to C++ification.
6451
6452 * aix-thread.c (aix_thread_target): New class.
6453 (aix_thread_ops): Now an aix_thread_target.
6454 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
6455 (aix_thread_fetch_registers, aix_thread_store_registers)
6456 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
6457 (aix_thread_thread_alive, aix_thread_pid_to_str)
6458 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
6459 Refactor as methods of aix_thread_target.
6460 (init_aix_thread_ops): Delete.
6461 (_initialize_aix_thread): Remove references to init_aix_thread_ops
6462 and complete_target_initialization.
6463 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
6464 (rs6000_nat_target): New class.
6465 (the_rs6000_nat_target): New.
6466 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
6467 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
6468 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
6469 (super_create_inferior): Delete.
6470 (_initialize_rs6000_nat): Adjust to C++ification.
6471
6472 * arm-linux-nat.c (arm_linux_nat_target): New class.
6473 (the_arm_linux_nat_target): New.
6474 (arm_linux_fetch_inferior_registers)
6475 (arm_linux_store_inferior_registers, arm_linux_read_description)
6476 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
6477 (arm_linux_remove_hw_breakpoint)
6478 (arm_linux_region_ok_for_hw_watchpoint)
6479 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
6480 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
6481 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
6482 arm_linux_nat_target.
6483 (_initialize_arm_linux_nat): Adjust to C++ification.
6484
6485 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
6486 (the_aarch64_linux_nat_target): New.
6487 (aarch64_linux_fetch_inferior_registers)
6488 (aarch64_linux_store_inferior_registers)
6489 (aarch64_linux_child_post_startup_inferior)
6490 (aarch64_linux_read_description)
6491 (aarch64_linux_can_use_hw_breakpoint)
6492 (aarch64_linux_insert_hw_breakpoint)
6493 (aarch64_linux_remove_hw_breakpoint)
6494 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
6495 (aarch64_linux_region_ok_for_hw_watchpoint)
6496 (aarch64_linux_stopped_data_address)
6497 (aarch64_linux_stopped_by_watchpoint)
6498 (aarch64_linux_watchpoint_addr_within_range)
6499 (aarch64_linux_can_do_single_step): Refactor as methods of
6500 aarch64_linux_nat_target.
6501 (super_post_startup_inferior): Delete.
6502 (_initialize_aarch64_linux_nat): Adjust to C++ification.
6503
6504 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
6505 (the_hppa_linux_nat_target): New.
6506 (hppa_linux_fetch_inferior_registers)
6507 (hppa_linux_store_inferior_registers): Refactor as methods of
6508 hppa_linux_nat_target.
6509 (_initialize_hppa_linux_nat): Adjust to C++ification.
6510
6511 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
6512 (the_ia64_linux_nat_target): New.
6513 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
6514 (ia64_linux_stopped_data_address)
6515 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
6516 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
6517 ia64_linux_nat_target methods.
6518 (super_xfer_partial): Delete.
6519 (_initialize_ia64_linux_nat): Adjust to C++ification.
6520
6521 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
6522 (the_m32r_linux_nat_target): New.
6523 (m32r_linux_fetch_inferior_registers)
6524 (m32r_linux_store_inferior_registers): Refactor as
6525 m32r_linux_nat_target methods.
6526 (_initialize_m32r_linux_nat): Adjust to C++ification.
6527
6528 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
6529 (the_m68k_linux_nat_target): New.
6530 (m68k_linux_fetch_inferior_registers)
6531 (m68k_linux_store_inferior_registers): Refactor as
6532 m68k_linux_nat_target methods.
6533 (_initialize_m68k_linux_nat): Adjust to C++ification.
6534
6535 * s390-linux-nat.c (s390_linux_nat_target): New class.
6536 (the_s390_linux_nat_target): New.
6537 (s390_linux_fetch_inferior_registers)
6538 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
6539 (s390_insert_watchpoint, s390_remove_watchpoint)
6540 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
6541 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
6542 (s390_auxv_parse, s390_read_description): Refactor as methods of
6543 s390_linux_nat_target.
6544 (_initialize_s390_nat): Adjust to C++ification.
6545
6546 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
6547 (the_sparc_linux_nat_target): New.
6548 (_initialize_sparc_linux_nat): Adjust to C++ification.
6549 * sparc-nat.c (sparc_fetch_inferior_registers)
6550 (sparc_store_inferior_registers): Remove target_ops parameter.
6551 * sparc-nat.h (sparc_fetch_inferior_registers)
6552 (sparc_store_inferior_registers): Remove target_ops parameter.
6553 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
6554 (the_sparc64_linux_nat_target): New.
6555 (_initialize_sparc64_linux_nat): Adjust to C++ification.
6556
6557 * spu-linux-nat.c (spu_linux_nat_target): New class.
6558 (the_spu_linux_nat_target): New.
6559 (spu_child_post_startup_inferior, spu_child_post_attach)
6560 (spu_child_wait, spu_fetch_inferior_registers)
6561 (spu_store_inferior_registers, spu_xfer_partial)
6562 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
6563 methods.
6564 (_initialize_spu_nat): Adjust to C++ification.
6565
6566 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
6567 (the_tilegx_linux_nat_target): New.
6568 (fetch_inferior_registers, store_inferior_registers):
6569 Refactor as methods.
6570 (_initialize_tile_linux_nat): Adjust to C++ification.
6571
6572 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
6573 (the_xtensa_linux_nat_target): New.
6574 (xtensa_linux_fetch_inferior_registers)
6575 (xtensa_linux_store_inferior_registers): Refactor as
6576 xtensa_linux_nat_target methods.
6577 (_initialize_xtensa_linux_nat): Adjust to C++ification.
6578
6579 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
6580 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
6581 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
6582 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
6583 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
6584 (fbsd_stopped_by_sw_breakpoint)
6585 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
6586 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
6587 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
6588 (fbsd_post_startup_inferior, fbsd_post_attach)
6589 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
6590 (fbsd_set_syscall_catchpoint)
6591 (super_xfer_partial, super_resume, super_wait)
6592 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
6593 (fbsd_handle_debug_trap): Remove target_ops parameter.
6594 (fbsd_nat_add_target): Delete.
6595 * fbsd-nat.h: Include "inf-ptrace.h".
6596 (fbsd_nat_add_target): Delete.
6597 (USE_SIGTRAP_SIGINFO): Define.
6598 (fbsd_nat_target): New class.
6599
6600 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
6601 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
6602 (amd64bsd_target): Delete.
6603 * amd64-bsd-nat.h: New file.
6604 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
6605 "x86-bsd-nat.h".
6606 (amd64_fbsd_nat_target): New class.
6607 (the_amd64_fbsd_nat_target): New.
6608 (amd64fbsd_read_description): Refactor as method of
6609 amd64_fbsd_nat_target.
6610 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6611 (_initialize_amd64fbsd_nat): Adjust to C++ification.
6612 * amd64-nat.h (amd64bsd_target): Delete function declaration.
6613 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
6614 (i386bsd_store_inferior_registers): Remove target_ops parameter.
6615 (i386bsd_target): Delete.
6616 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
6617 (i386bsd_fetch_inferior_registers)
6618 (i386bsd_store_inferior_registers): Declare.
6619 (i386_bsd_nat_target): New class.
6620 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
6621 (the_i386_fbsd_nat_target): New.
6622 (i386fbsd_resume, i386fbsd_read_description): Refactor as
6623 i386_fbsd_nat_target methods.
6624 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6625 (_initialize_i386fbsd_nat): Adjust to C++ification.
6626 * x86-bsd-nat.c (super_mourn_inferior): Delete.
6627 (x86bsd_mourn_inferior, x86bsd_target): Delete.
6628 (_initialize_x86_bsd_nat): Adjust to C++ification.
6629 * x86-bsd-nat.h: Include "x86-nat.h".
6630 (x86bsd_target): Delete declaration.
6631 (x86bsd_nat_target): New class.
6632
6633 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
6634 (the_aarch64_fbsd_nat_target): New.
6635 (aarch64_fbsd_fetch_inferior_registers)
6636 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
6637 aarch64_fbsd_nat_target.
6638 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
6639 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
6640 (the_alpha_bsd_nat_target): New.
6641 (alphabsd_fetch_inferior_registers)
6642 (alphabsd_store_inferior_registers): Refactor as
6643 alpha_bsd_nat_target methods.
6644 (_initialize_alphabsd_nat): Refactor as methods of
6645 alpha_bsd_nat_target.
6646 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
6647 (the_amd64_nbsd_nat_target): New.
6648 (_initialize_amd64nbsd_nat): Adjust to C++ification.
6649 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
6650 (the_amd64_obsd_nat_target): New.
6651 (_initialize_amd64obsd_nat): Adjust to C++ification.
6652 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
6653 (the_arm_fbsd_nat_target): New.
6654 (arm_fbsd_fetch_inferior_registers)
6655 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
6656 (_initialize_arm_fbsd_nat): Refactor as methods of
6657 arm_fbsd_nat_target.
6658 (_initialize_arm_fbsd_nat): Adjust to C++ification.
6659 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
6660 (the_arm_netbsd_nat_target): New.
6661 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
6662 arm_netbsd_nat_target.
6663 (_initialize_arm_netbsd_nat): Adjust to C++ification.
6664 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
6665 (the_hppa_nbsd_nat_target): New.
6666 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
6667 hppa_nbsd_nat_target methods.
6668 (_initialize_hppanbsd_nat): Adjust to C++ification.
6669 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
6670 (the_hppa_obsd_nat_target): New.
6671 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
6672 methods of hppa_obsd_nat_target.
6673 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
6674 add_target.
6675 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
6676 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
6677 add_target.
6678 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
6679 (_initialize_i386obsd_nat): Use add_target.
6680 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
6681 (the_m68k_bsd_nat_target): New.
6682 (m68kbsd_fetch_inferior_registers)
6683 (m68kbsd_store_inferior_registers): Refactor as methods of
6684 m68k_bsd_nat_target.
6685 (_initialize_m68kbsd_nat): Adjust to C++ification.
6686 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
6687 (the_mips_fbsd_nat_target): New.
6688 (mips_fbsd_fetch_inferior_registers)
6689 (mips_fbsd_store_inferior_registers): Refactor as methods of
6690 mips_fbsd_nat_target.
6691 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
6692 add_target.
6693 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
6694 (the_mips_nbsd_nat_target): New.
6695 (mipsnbsd_fetch_inferior_registers)
6696 (mipsnbsd_store_inferior_registers): Refactor as methods of
6697 mips_nbsd_nat_target.
6698 (_initialize_mipsnbsd_nat): Adjust to C++ification.
6699 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
6700 (the_mips64_obsd_nat_target): New.
6701 (mips64obsd_fetch_inferior_registers)
6702 (mips64obsd_store_inferior_registers): Refactor as methods of
6703 mips64_obsd_nat_target.
6704 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
6705 add_target.
6706 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
6707 nbsd_nat_target.
6708 * nbsd-nat.h: Include "inf-ptrace.h".
6709 (nbsd_nat_target): New class.
6710 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
6711 (obsd_wait): Refactor as methods of obsd_nat_target.
6712 (obsd_add_target): Delete.
6713 * obsd-nat.h: Include "inf-ptrace.h".
6714 (obsd_nat_target): New class.
6715 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
6716 (the_ppc_fbsd_nat_target): New.
6717 (ppcfbsd_fetch_inferior_registers)
6718 (ppcfbsd_store_inferior_registers): Refactor as methods of
6719 ppc_fbsd_nat_target.
6720 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
6721 add_target.
6722 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
6723 (the_ppc_nbsd_nat_target): New.
6724 (ppcnbsd_fetch_inferior_registers)
6725 (ppcnbsd_store_inferior_registers): Refactor as methods of
6726 ppc_nbsd_nat_target.
6727 (_initialize_ppcnbsd_nat): Adjust to C++ification.
6728 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
6729 (the_ppc_obsd_nat_target): New.
6730 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
6731 methods of ppc_obsd_nat_target.
6732 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
6733 add_target.
6734 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
6735 (the_sh_nbsd_nat_target): New.
6736 (shnbsd_fetch_inferior_registers)
6737 (shnbsd_store_inferior_registers): Refactor as methods of
6738 sh_nbsd_nat_target.
6739 (_initialize_shnbsd_nat): Adjust to C++ification.
6740 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
6741 (inf_ptrace_xfer_partial): Delete.
6742 (sparc_xfer_partial, sparc_target): Delete.
6743 * sparc-nat.h (sparc_fetch_inferior_registers)
6744 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
6745 (sparc_target): Delete function declaration.
6746 (sparc_target): New template class.
6747 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
6748 (_initialize_sparcnbsd_nat): Adjust to C++ification.
6749 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
6750 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
6751 add_target.
6752 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
6753 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
6754 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
6755 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
6756 add_target.
6757 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
6758 (the_vax_bsd_nat_target): New.
6759 (vaxbsd_fetch_inferior_registers)
6760 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
6761 methods.
6762 (_initialize_vaxbsd_nat): Adjust to C++ification.
6763
6764 * bsd-kvm.c (bsd_kvm_target): New class.
6765 (bsd_kvm_ops): Now a bsd_kvm_target.
6766 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
6767 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
6768 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
6769 bsd_kvm_target.
6770 (bsd_kvm_return_one): Delete.
6771 (bsd_kvm_add_target): Adjust to C++ification.
6772
6773 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
6774 (nto_procfs_target_procfs): New classes.
6775 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
6776 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
6777 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
6778 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
6779 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
6780 (procfs_remove_hw_breakpoint, procfs_resume)
6781 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
6782 (procfs_kill_inferior, procfs_store_registers)
6783 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
6784 as methods of nto_procfs_target.
6785 (nto_procfs_ops): Now an nto_procfs_target_procfs.
6786 (nto_native_ops): Delete.
6787 (procfs_open, procfs_native_open): Delete.
6788 (nto_native_ops): Now an nto_procfs_target_native.
6789 (init_procfs_targets): Adjust to C++ification.
6790 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
6791 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
6792 Refactor as methods of nto_procfs_target.
6793
6794 * go32-nat.c (go32_nat_target): New class.
6795 (the_go32_nat_target): New.
6796 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
6797 (go32_store_registers, go32_xfer_partial, go32_files_info)
6798 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
6799 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
6800 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
6801 (go32_pid_to_str): Refactor as methods of go32_nat_target.
6802 (go32_target): Delete.
6803 (_initialize_go32_nat): Adjust to C++ification.
6804
6805 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
6806 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
6807 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
6808 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
6809 gnu_nat_target.
6810 (gnu_target): Delete.
6811 * gnu-nat.h (gnu_target): Delete.
6812 (gnu_nat_target): New class.
6813 * i386-gnu-nat.c (gnu_base_target): New.
6814 (i386_gnu_nat_target): New class.
6815 (the_i386_gnu_nat_target): New.
6816 (_initialize_i386gnu_nat): Adjust to C++ification.
6817
6818 2018-05-02 Pedro Alves <palves@redhat.com>
6819
6820 * bfd-target.c (target_bfd_xclose): Rename to ...
6821 (target_bfd_close): ... this.
6822 (target_bfd_reopen): Adjust.
6823 * target.c (target_close): Remove references to to_xclose.
6824 * target.h (target_ops::to_xclose): Delete.
6825 (target_ops::to_close): Update comments.
6826
6827 2018-05-02 Pedro Alves <palves@redhat.com>
6828
6829 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
6830 "linux-nat.h".
6831 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
6832 * inf-ptrace.c (inf_ptrace_register_u_offset)
6833 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6834 (inf_ptrace_store_register, inf_ptrace_store_registers)
6835 (inf_ptrace_trad_target): Move to ...
6836 * linux-nat-trad.c: ... this new file.
6837 * linux-nat-trad.h: New file.
6838 * linux-nat.c (linux_target_install_ops): Make extern.
6839 (linux_trad_target): Delete.
6840 * linux-nat.h (linux_trad_target): Delete declaration.
6841 (linux_target_install_ops): Declare.
6842 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
6843 "linux-nat.h".
6844
6845 2018-05-02 Pedro Alves <palves@redhat.com>
6846
6847 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6848 procfs_target/add_target here.
6849 * procfs.c (procfs_target): Make static.
6850 (_initialize_procfs): Call add_target here.
6851 * procfs.h (struct target_ops): Remove forward declaration.
6852 (procfs_target): Remove declaration.
6853 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
6854
6855 2018-05-02 Pedro Alves <palves@redhat.com>
6856
6857 * procfs.c (procfs_stopped_by_watchpoint)
6858 (procfs_insert_watchpoint, procfs_remove_watchpoint)
6859 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
6860 Forward declare.
6861 (procfs_use_watchpoints): Delete, move contents...
6862 (procfs_target): ... here.
6863 * procfs.h (procfs_use_watchpoints): Delete declaration.
6864 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6865 procfs_use_watchpoints.
6866 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
6867 procfs_use_watchpoints.
6868
6869 2018-05-02 Tom Tromey <tom@tromey.com>
6870
6871 PR python/20084:
6872 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
6873 and var_zuinteger_unlimited.
6874 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
6875 and PARAM_ZUINTEGER_UNLIMITED.
6876 (set_parameter_value): Handle var_zuinteger and
6877 var_zuinteger_unlimited.
6878 (add_setshow_generic): Likewise.
6879 (parmpy_init): Likewise.
6880
6881 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
6882
6883 PR rust/23124
6884 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
6885 pointer is not null before dereferencing it.
6886
6887 2018-04-30 Tom Tromey <tom@tromey.com>
6888
6889 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
6890 is_mi_like_p.
6891
6892 2018-04-30 Tom Tromey <tom@tromey.com>
6893
6894 * breakpoint.c (mention): Remove use of is_mi_like_p.
6895 (print_mention_ranged_breakpoint): Likewise.
6896 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
6897 of is_mi_like_p.
6898
6899 2018-04-30 Tom Tromey <tom@tromey.com>
6900
6901 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
6902
6903 2018-04-30 Tom Tromey <tom@tromey.com>
6904
6905 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
6906 (info_spu_event_command): Remove some uses of is_mi_like_p.
6907
6908 2018-04-30 Tom Tromey <tom@tromey.com>
6909
6910 * python/py-framefilter.c (py_print_single_arg)
6911 (enumerate_locals, py_print_args, py_print_frame): Remove some
6912 uses of is_mi_like_p.
6913
6914 2018-04-30 Tom Tromey <tom@tromey.com>
6915
6916 * ui-out.c: Update.
6917 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
6918 * ui-out.h (ui_out::is_mi_like_p): Now const.
6919 (ui_out::do_is_mi_like_p): Now const.
6920 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
6921
6922 2018-04-30 Tom Tromey <tom@tromey.com>
6923
6924 * varobj.c (varobj_set_visualizer): Use new_reference.
6925 * python/python.c (gdbpy_decode_line): Use new_reference.
6926 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
6927 new_reference.
6928
6929 2018-04-30 Tom Tromey <tom@tromey.com>
6930
6931 * varobj.c (install_new_value): Use new_reference.
6932 * value.h (value_incref): Return void. Swap intro comment with
6933 value_decref.
6934 * value.c (set_value_parent): Use new_reference.
6935 (value_incref): Return void. Update intro comment.
6936 (release_value): Use new_reference.
6937 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
6938
6939 2018-04-30 Tom Tromey <tom@tromey.com>
6940
6941 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
6942 * gdb_bfd.h (new_bfd_ref): Remove.
6943 (gdb_bfd_open): Update comment.
6944 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
6945 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
6946 (gdb_bfd_fdopenr): Use new_reference.
6947 * exec.c (exec_file_attach): Use new_reference.
6948
6949 2018-04-30 Tom Tromey <tom@tromey.com>
6950
6951 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
6952 method.
6953
6954 2018-04-30 Tom Tromey <tom@tromey.com>
6955
6956 * jit.c (jit_read_code_entry): Use type_align.
6957 * i386-tdep.c (i386_gdbarch_init): Don't call
6958 set_gdbarch_long_long_align_bit.
6959 * gdbarch.sh: Remove long_long_align_bit.
6960 * gdbarch.c, gdbarch.h: Rebuild.
6961 * arc-tdep.c (arc_type_align): New function.
6962 (arc_gdbarch_init): Use arc_type_align. Don't call
6963 set_gdbarch_long_long_align_bit.
6964
6965 2018-04-30 Tom Tromey <tom@tromey.com>
6966
6967 * rust-lang.c (rust_type_alignment): Remove.
6968 (rust_composite_type): Use type_align.
6969
6970 2018-04-30 Tom Tromey <tom@tromey.com>
6971
6972 * NEWS: Mention Type.align.
6973 * python/py-type.c (typy_get_alignof): New function.
6974 (type_object_getset): Add "alignof".
6975
6976 2018-04-30 Tom Tromey <tom@tromey.com>
6977
6978 PR exp/17095:
6979 * NEWS: Update.
6980 * std-operator.def (UNOP_ALIGNOF): New operator.
6981 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
6982 New.
6983 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
6984 * c-lang.c (c_op_print_tab): Add alignof.
6985 * c-exp.y (ALIGNOF): New token.
6986 (exp): Add "ALIGNOF" production.
6987 (ident_tokens): Add _Alignof and alignof.
6988
6989 2018-04-30 Tom Tromey <tom@tromey.com>
6990
6991 * i386-tdep.c (i386_type_align): New function.
6992 (i386_gdbarch_init): Update.
6993 * gdbarch.sh (type_align): New method.
6994 * gdbarch.c, gdbarch.h: Rebuild.
6995 * arch-utils.h (default_type_align): Declare.
6996 * arch-utils.c (default_type_align): New function.
6997 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
6998 (struct type) <align_log2>: New field.
6999 <instance_flags>: Now a bitfield.
7000 (TYPE_RAW_ALIGN): New macro.
7001 (type_align, type_raw_align, set_type_align): Declare.
7002 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
7003 functions.
7004 * dwarf2read.c (quirk_rust_enum): Set type alignment.
7005 (get_alignment, maybe_set_alignment): New functions.
7006 (read_structure_type, read_enumeration_type, read_array_type)
7007 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
7008 (read_subrange_type, read_base_type): Set type alignment.
7009
7010 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
7011
7012 * dwarf2read.c (read_index_from_section): Use bool.
7013
7014 2018-04-29 Fabian Groffen <grobian@gentoo.org>
7015
7016 PR gdb/22950
7017 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
7018 with #ifdef.
7019
7020 2018-04-29 John Reiser <jreiser@BitWagon.com>
7021
7022 PR build/22873
7023 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
7024 last step, and do it atomically.
7025
7026 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
7027
7028 * compile/compile-c-types.c (convert_int, convert_float):
7029 Update for C FE v1.
7030
7031 2018-04-27 Tom Tromey <tom@tromey.com>
7032
7033 PR rust/22545:
7034 * rust-lang.c (rust_inclusive_range_type_p): New function.
7035 (rust_range): Handle inclusive ranges.
7036 (rust_compute_range): Likewise.
7037 * rust-exp.y (struct rust_op) <inclusive>: New field.
7038 (DOTDOTEQ): New constant.
7039 (range_expr): Add "..=" productions.
7040 (operator_tokens): Add "..=" token.
7041 (ast_range): Add "inclusive" parameter.
7042 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
7043 ranges.
7044 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
7045 bounds values.
7046 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
7047 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
7048 Update comments.
7049 * expprint.c (print_subexp_standard): Handle new bounds values.
7050 (dump_subexp_body_standard): Likewise.
7051
7052 2018-04-27 Tom Tromey <tom@tromey.com>
7053
7054 * configure: Rebuild.
7055 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
7056 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
7057 "OVERRIDE".
7058 (class symbol_needs_eval_context): Likewise.
7059 * dwarf2read.c (mock_mapped_index::symbol_name_count)
7060 (mock_mapped_index::symbol_name_at): Use "override". Remove
7061 "virtual".
7062 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
7063 "override".
7064 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
7065 * aarch64-tdep.c (instruction_reader::read): Use "override".
7066 (instruction_reader_test::read): Likewise.
7067 * arm-tdep.c (instruction_reader::read): Use "override".
7068 (instruction_reader_thumb::read): Likewise.
7069
7070 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
7071
7072 PR remote/9665
7073 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
7074 instead of remote_send.
7075 (remote_send): Remove.
7076
7077 2018-04-26 Pedro Alves <palves@redhat.com>
7078
7079 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
7080 find_function_start_sal instead of find_pc_line.
7081
7082 2018-04-26 Pedro Alves <palves@redhat.com>
7083
7084 * breakpoint.c (set_breakpoint_location_function): Handle
7085 mst_data_gnu_ifunc.
7086 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
7087 * elfread.c (elf_symtab_read): Give data symbols with
7088 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
7089 (elf_rel_plt_read): Update comment.
7090 * linespec.c (convert_linespec_to_sals): Handle
7091 mst_data_gnu_ifunc.
7092 (minsym_found): Handle mst_data_gnu_ifunc.
7093 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
7094 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
7095 * parse.c (find_minsym_type_and_address): Handle
7096 mst_data_gnu_ifunc.
7097 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
7098 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
7099 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
7100 comment.
7101 <mst_data_gnu_ifunc>: New enumerator.
7102
7103 2018-04-26 Pedro Alves <palves@redhat.com>
7104
7105 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
7106 (lookup_minimal_symbol_by_pc_section): ... this. Replace
7107 'want_trampoline' parameter by a lookup_msym_prefer parameter.
7108 Handle it.
7109 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
7110 (lookup_minimal_symbol_by_pc): Adjust.
7111 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
7112 (lookup_solib_trampoline_symbol_by_pc): Adjust.
7113 * minsyms.h (lookup_msym_prefer): New enum.
7114 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7115 parameter by a lookup_msym_prefer parameter.
7116
7117 2018-04-26 Pedro Alves <palves@redhat.com>
7118
7119 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
7120 ends in "@plt" instead of looking at the symbol's section.
7121
7122 2018-04-26 Pedro Alves <palves@redhat.com>
7123
7124 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
7125 all references.
7126 (find_pc_partial_function_gnu_ifunc): Rename to ...
7127 (find_pc_partial_function): ... this, and remove references to
7128 'is_gnu_ifunc_p'.
7129 (find_pc_partial_function): Delete old implementation.
7130 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
7131
7132 2018-04-26 Pedro Alves <palves@redhat.com>
7133
7134 * linespec.c (struct bound_minimal_symbol_search_key): New.
7135 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
7136 skip first line if we found a GNU ifunc minimal symbol by name.
7137 (compare_msymbols): Change parameters to work with a destructured
7138 lhs minsym.
7139 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
7140 functions.
7141
7142 2018-04-26 Pedro Alves <palves@redhat.com>
7143
7144 * breakpoint.c (set_breakpoint_location_function): Don't resolve
7145 ifunc targets here. Instead, if we have an ifunc minsym, use its
7146 address/name.
7147 (add_location_to_breakpoint): Store the minsym and the objfile in
7148 the breakpoint location.
7149 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
7150 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
7151 Record the minsym in the sal.
7152 * symtab.h (symtab_and_line) <msymbol>: New field.
7153
7154 2018-04-26 Pedro Alves <palves@redhat.com>
7155
7156 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
7157 unless we actually resolved the ifunc.
7158
7159 2018-04-26 Pedro Alves <palves@redhat.com>
7160
7161 * c-exp.y (variable production): Prefer ifunc minsyms over
7162 regular function symbols.
7163 * symtab.c (find_gnu_ifunc): New function.
7164 * minsyms.h (lookup_msym_prefer): New enum.
7165 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7166 parameter by a lookup_msym_prefer parameter.
7167 * symtab.h (find_gnu_ifunc): New declaration.
7168
7169 2018-04-26 Pedro Alves <palves@redhat.com>
7170
7171 * blockframe.c (find_gnu_ifunc_target_type): New function.
7172 (find_function_type): New.
7173 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
7174 return a value with a memory address.
7175 (eval_call): For calls to GNU ifunc functions, try to find the
7176 type of the target function from the type that the resolver
7177 returns.
7178 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
7179 symbols.
7180 * infcall.c (find_function_return_type): Delete.
7181 (find_function_addr): Add 'function_type' parameter. For calls to
7182 GNU ifunc functions, try to find the type of the target function
7183 from the type that the resolver returns, and return it via
7184 FUNCTION_TYPE.
7185 (call_function_by_hand_dummy): Adjust to use the function type
7186 returned by find_function_addr.
7187 (find_function_addr): Add 'function_type' parameter and move
7188 description here.
7189 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
7190 declarations.
7191
7192 2018-04-26 Pedro Alves <palves@redhat.com>
7193
7194 * c-exp.y (variable production): Skip finding an alias for ifunc
7195 symbols.
7196
7197 2018-04-26 Pedro Alves <palves@redhat.com>
7198
7199 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
7200
7201 2018-04-25 Pedro Alves <palves@redhat.com>
7202
7203 * infcmd.c (kill_command): Print the pid as string, not the whole
7204 thread's ptid. Add comment. s/has been killed/killed/ in output
7205 message.
7206 * remote.c (remote_detach_1): Print the pid as string, not the
7207 whole thread's ptid.
7208
7209 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7210 Sergio Durigan Junior <sergiodj@redhat.com>
7211 Pedro Alves <palves@redhat.com>
7212
7213 * infcmd.c (kill_command): Print message when inferior has
7214 been killed.
7215 * inferior.c (print_inferior_events): Remove 'static'. Set as
7216 '1'.
7217 (add_inferior): Improve message printed when
7218 'print_inferior_events' is on.
7219 (exit_inferior): Remove message printed when
7220 'print_inferior_events' is on.
7221 (detach_inferior): Improve message printed when
7222 'print_inferior_events' is on.
7223 (initialize_inferiors): Use 'add_inferior_silent' to set
7224 'current_inferior_'.
7225 * inferior.h (print_inferior_events): Declare here as
7226 'extern'.
7227 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
7228 '[Detaching...]' messages when 'print_inferior_events' is on.
7229 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
7230 as prefix/suffix for messages. Remove periods. Fix erroneous
7231 'Detaching after fork from child...', replace it by '... from
7232 parent...'.
7233 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
7234 prefix/suffix when printing 'Detaching...' messages. Print
7235 them when 'print_inferior_events' is on.
7236 * remote.c (remote_detach_1): Print message when detaching
7237 from inferior and '!is_fork_parent'.
7238
7239 2018-04-24 Tom Tromey <tom@tromey.com>
7240
7241 * cli-out.h: Reindent.
7242
7243 2018-04-24 Tom Tromey <tom@tromey.com>
7244
7245 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
7246 (cli_ui_out::do_field_string): Use fputs_filtered.
7247 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
7248
7249 2018-04-23 Tom Tromey <tom@tromey.com>
7250
7251 * guile/scm-frame.c (gdbscm_frame_read_var): Use
7252 gdb::unique_xmalloc_ptr.
7253
7254 2018-04-23 Tom Tromey <tom@tromey.com>
7255
7256 * configure: Rebuild.
7257
7258 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
7259
7260 PR gdb/23095
7261 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
7262 prepare_for_testing. Set normal_bp to r_debug_state if target
7263 is bsd.
7264
7265 2018-04-21 Pedro Alves <palves@redhat.com>
7266 Rajendra SY <rajendra.sy@gmail.com>
7267
7268 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
7269 * remote.c (extended_remote_attach): In all-stop mode, mark the
7270 thread as executing.
7271
7272 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7273
7274 * thread.c (thread_apply_all_command): Fix comment.
7275 (thread_command): Fix comment.
7276
7277 2018-04-10 Alan Hayward <alan.hayward@arm.com>
7278
7279 * common/tdesc.h (tdesc_create_feature): Remove xml filename
7280 parameter.
7281 * features/aarch64-core.c (create_feature_aarch64_core):
7282 Regenerate.
7283 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
7284 Likewise.
7285 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
7286 Likewise.
7287 * features/i386/32bit-avx512.c
7288 (create_feature_i386_32bit_avx512): Likewise.
7289 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
7290 Likewise.
7291 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
7292 Likewise.
7293 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
7294 Likewise.
7295 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
7296 Likewise.
7297 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
7298 Likewise.
7299 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
7300 Likewise.
7301 * features/i386/64bit-avx512.c
7302 (create_feature_i386_64bit_avx512): Likewise.
7303 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
7304 Likewise.
7305 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
7306 Likewise.
7307 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
7308 Likewise.
7309 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
7310 Likewise.
7311 * features/i386/64bit-segments.c
7312 (create_feature_i386_64bit_segments): Likewise.
7313 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
7314 Likewise.
7315 * features/i386/x32-core.c
7316 (create_feature_i386_x32_core): Likewise.
7317 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
7318 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
7319 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
7320 * target-descriptions.c: In generated code, don't pass xml
7321 filename.
7322
7323 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7324
7325 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
7326 (print_xml_feature::visit_post): Likewise.
7327 (print_xml_feature::visit): Likewise.
7328 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
7329 (print_xml_feature): Add new class.
7330 * regformats/regdat.sh: Null xmltarget on feature targets.
7331 * target-descriptions.c (struct target_desc): Add xmltarget.
7332 (maintenance_check_tdesc_xml_convert): Add unittest function.
7333 (tdesc_get_features_xml): Add function to get xml.
7334 (maintenance_check_xml_descriptions): Test xml generation.
7335 * xml-tdesc.c (string_read_description_xml): Add function.
7336 * xml-tdesc.h (string_read_description_xml): Add declaration.
7337
7338 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7339
7340 * features/Makefile: Add feature marker to targets with new style
7341 target descriptions.
7342 * regformats/aarch64.dat: Regenerate.
7343 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
7344 * regformats/i386/amd64-avx-linux.dat: Likewise.
7345 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
7346 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
7347 * regformats/i386/amd64-linux.dat: Likewise.
7348 * regformats/i386/amd64-mpx-linux.dat: Likewise.
7349 * regformats/i386/amd64.dat: Likewise.
7350 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
7351 * regformats/i386/i386-avx-linux.dat: Likewise.
7352 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
7353 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
7354 * regformats/i386/i386-linux.dat: Likewise.
7355 * regformats/i386/i386-mmx-linux.dat: Likewise.
7356 * regformats/i386/i386-mpx-linux.dat: Likewise.
7357 * regformats/i386/i386.dat: Likewise.
7358 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
7359 * regformats/i386/x32-avx-linux.dat: Likewise.
7360 * regformats/i386/x32-linux.dat: Likewise.
7361 * regformats/tic6x-c62x-linux.dat: Likewise.
7362 * regformats/tic6x-c64x-linux.dat: Likewise.
7363 * regformats/tic6x-c64xp-linux.dat: Likewise.
7364 * regformats/regdat.sh: Parse feature marker.
7365
7366 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7367
7368 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
7369 (tdesc_osabi_name): Likewise.
7370 * target-descriptions.c (tdesc_architecture_name): Add new
7371 function.
7372 (tdesc_osabi_name): Likewise.
7373
7374 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7375
7376 * common/tdesc.c (tdesc_predefined_type): Move to here.
7377 (tdesc_named_type): Likewise.
7378 (tdesc_create_vector): Likewise.
7379 (tdesc_create_struct): Likewise.
7380 (tdesc_set_struct_size): Likewise.
7381 (tdesc_create_union): Likewise.
7382 (tdesc_create_flags): Likewise.
7383 (tdesc_create_enum): Likewise.
7384 (tdesc_add_field): Likewise.
7385 (tdesc_add_typed_bitfield): Likewise.
7386 (tdesc_add_bitfield): Likewise.
7387 (tdesc_add_flag): Likewise.
7388 (tdesc_add_enum_value): Likewise.
7389 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
7390 (struct tdesc_type_vector): Likewise.
7391 (struct tdesc_type_field): Likewise.
7392 (struct tdesc_type_with_fields): Likewise.
7393 (tdesc_create_enum): Add declaration.
7394 (tdesc_add_typed_bitfield): Likewise.
7395 (tdesc_add_enum_value): Likewise.
7396 * target-descriptions.c (tdesc_type_field): Move from here.
7397 (tdesc_type_builtin): Likewise.
7398 (tdesc_type_vector): Likewise.
7399 (tdesc_type_with_fields): Likewise.
7400 (tdesc_predefined_types): Likewise.
7401 (tdesc_named_type): Likewise.
7402 (tdesc_create_vector): Likewise.
7403 (tdesc_create_struct): Likewise.
7404 (tdesc_set_struct_size): Likewise.
7405 (tdesc_create_union): Likewise.
7406 (tdesc_create_flags): Likewise.
7407 (tdesc_create_enum): Likewise.
7408 (tdesc_add_field): Likewise.
7409 (tdesc_add_typed_bitfield): Likewise.
7410 (tdesc_add_bitfield): Likewise.
7411 (tdesc_add_flag): Likewise.
7412 (tdesc_add_enum_value): Likewise.
7413 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
7414 (tdesc_add_typed_bitfield): Likewise.
7415 (tdesc_add_enum_value): Likewise.
7416
7417 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7418
7419 * common/tdesc.c (tdesc_feature::accept): Move to here.
7420 (tdesc_feature::operator==): Likewise.
7421 (tdesc_create_reg): Likewise.
7422 * common/tdesc.h (tdesc_type_kind): Likewise.
7423 (struct tdesc_type): Likewise.
7424 (struct tdesc_feature): Likewise.
7425 * regformats/regdat.sh: Create a feature.
7426 * target-descriptions.c (tdesc_type_kind): Move from here.
7427 (tdesc_type): Likewise.
7428 (tdesc_type_up): Likewise.
7429 (tdesc_feature): Likewise.
7430 (tdesc_create_reg): Likewise.
7431
7432 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7433
7434 * Makefile.in: Add arch/tdesc.c
7435 * common/tdesc.c: New file.
7436 * common/tdesc.h (tdesc_element_visitor): Move to here.
7437 (tdesc_element): Likewise.
7438 (tdesc_reg): Likewise.
7439 (tdesc_reg_up): Likewise.
7440 * regformats/regdef.h (reg): Add offset to constructors.
7441 * target-descriptions.c (tdesc_element_visitor): Move from here.
7442 (tdesc_element): Likewise.
7443 (tdesc_reg): Likewise.
7444 (tdesc_reg_up): Likewise.
7445
7446 2018-04-17 Tom Tromey <tom@tromey.com>
7447
7448 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
7449 discriminant field.
7450
7451 2018-04-17 Tom Tromey <tom@tromey.com>
7452
7453 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
7454
7455 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
7456
7457 * symtab.c (print_symbol_info): Skip printing filename and line
7458 number when `last' is NULL.
7459 (symtab_symbol_info): Use empty string instead of NULL for first
7460 invocation of print_symbol_info.
7461 (rbreak_command): Pass NULL to `last' parameter of
7462 print_symbol_info.
7463
7464 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
7465
7466 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
7467 instead of nullptr.
7468
7469 2018-04-16 Pedro Alves <palves@redhat.com>
7470
7471 * MAINTAINERS (sh): Remove.
7472 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
7473 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
7474 (ALLDEPFILES): Remove sh64-tdep.c.
7475 * NEWS: Mentions that support for SH-5/SH64 is removed.
7476 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
7477 (sh*-*-openbsd*): Ditto.
7478 (sh64-*-elf*): Remove.
7479 (sh*): Remove.
7480 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
7481 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
7482 * sh-tdep.c: No longer include "sh64-tdep.h".
7483 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
7484 * sh64-tdep.c, sh64-tdep.h: Remove files.
7485
7486 2018-04-16 Pedro Alves <palves@redhat.com>
7487
7488 * MAINTAINERS: Remove m88k.
7489 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
7490 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
7491 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
7492 * NEWS: Mention that support for m88k was removed.
7493 * configure.host (m88*-*-*): Remove support.
7494 * configure.nat (m88k-*-*): Remove support.
7495 * configure.tgt (m88*-*-openbsd*): Remove.
7496 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
7497
7498 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
7499
7500 * configure.tgt (x86_tobjs): New variable.
7501 (amd64_tobjs, i386_tobjs): Use it.
7502
7503 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7504
7505 * symtab.c (print_symbol_info): Precede the symbol definition by
7506 the line number when available.
7507 * NEWS: Advertise this enhancement.
7508
7509 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7510
7511 * NEWS (New options): announce set/show record btrace cpu.
7512 * btrace.c: Include record-btrace.h.
7513 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
7514 the vendor is unknown.
7515 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
7516 Maybe overwrite the btrace configuration's cpu.
7517 (btrace_compute_ftrace): Add cpu parameter. Update callers.
7518 (btrace_fetch): Add cpu parameter. Update callers.
7519 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
7520 Maybe overwrite the btrace configuration's cpu. Skip enabling
7521 errata workarounds if the vendor is unknown.
7522 * python/py-record-btrace.c: Include record-btrace.h.
7523 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
7524 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
7525 * record-btrace.c (record_btrace_cpu_state_kind): New.
7526 (record_btrace_cpu): New.
7527 (set_record_btrace_cpu_cmdlist): New.
7528 (record_btrace_get_cpu): New.
7529 (require_btrace_thread, record_btrace_info)
7530 (record_btrace_resume_thread): Call record_btrace_get_cpu.
7531 (cmd_set_record_btrace_cpu_none): New.
7532 (cmd_set_record_btrace_cpu_auto): New.
7533 (cmd_set_record_btrace_cpu): New.
7534 (cmd_show_record_btrace_cpu): New.
7535 (_initialize_record_btrace): Initialize set/show record btrace cpu
7536 commands.
7537 * record-btrace.h (record_btrace_get_cpu): New.
7538
7539 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7540
7541 * record.c (set_record_command): Fix typo in message.
7542
7543 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7544
7545 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
7546
7547 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7548
7549 * infrun.c (process_event_stop_test): Call
7550 gdbarch_in_indirect_branch_thunk.
7551 * gdbarch.sh (in_indirect_branch_thunk): New.
7552 * gdbarch.c: Regenerated.
7553 * gdbarch.h: Regenerated.
7554 * x86-tdep.h: New.
7555 * x86-tdep.c: New.
7556 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
7557 (HFILES_NO_SRCDIR): Add x86-tdep.h.
7558 (ALLDEPFILES): Add x86-tdep.c.
7559 * arch-utils.h (default_in_indirect_branch_thunk): New.
7560 * arch-utils.c (default_in_indirect_branch_thunk): New.
7561 * i386-tdep: Include x86-tdep.h.
7562 (i386_in_indirect_branch_thunk): New.
7563 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
7564 function.
7565 * amd64-tdep: Include x86-tdep.h.
7566 (amd64_in_indirect_branch_thunk): New.
7567 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
7568
7569 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
7570
7571 PR gdb/23053
7572 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
7573 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
7574 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
7575 regression.
7576
7577 2018-04-12 Tom Tromey <tom@tromey.com>
7578
7579 * rust-lang.c (rust_print_struct_def): Remove univariant code.
7580 (rust_evaluate_subexp): Likewise.
7581
7582 2018-04-12 Pedro Alves <palves@redhat.com>
7583
7584 * procfs.c (procfs_detach): Make forward declaration's prototype
7585 match definition's protototype.
7586 (proc_get_LDT_entry): Remove stale do_cleanups call.
7587
7588 2018-04-12 Pedro Alves <palves@redhat.com>
7589
7590 * target.h (target_ops::to_has_exited): Delete.
7591 (target_has_exited): Delete.
7592 * target-delegates.c: Regenerate.
7593
7594 2018-04-11 Pedro Alves <palves@redhat.com>
7595
7596 * target.c (fileio_fh_t::t): Add comment.
7597 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7598 (target_fileio_close): Handle a NULL target.
7599 (invalidate_fileio_fh): New.
7600 (target_close): Call it.
7601 * remote.c (remote_hostio_send_command): No longer check whether
7602 remote_desc is open.
7603
7604 2018-04-11 Pedro Alves <palves@redhat.com>
7605
7606 * target.c (fileio_fh_t): Make it a named struct instead of a
7607 typedef.
7608 (fileio_fh_t::is_closed): New method.
7609 (DEF_VEC_O (fileio_fh_t)): Remove.
7610 (fileio_fhandles): Now a std::vector.
7611 (is_closed_fileio_fh): Delete.
7612 (acquire_fileio_fd): Adjust. Rename parameters.
7613 (release_fileio_fd): Adjust.
7614 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
7615 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7616 (target_fileio_close): Adjust.
7617
7618 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
7619
7620 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
7621 index.
7622
7623 2018-04-10 Pedro Alves <palves@redhat.com>
7624
7625 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
7626 (scoped_finish_thread_state): New class.
7627 * infcmd.c (run_command_1): Use it instead of finish_thread_state
7628 cleanup.
7629 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
7630 (fetch_inferior_event, normal_stop): Likewise.
7631 * thread.c (finish_thread_state_cleanup): Delete.
7632
7633 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7634 Pedro Alves <palves@redhat.com>
7635
7636 * value.c: Include "selftest.h" and "common/array-view.h".
7637 (struct range) <operator ==>: New.
7638 (test_ranges_contain): New.
7639 (check_ranges_vector): New.
7640 (test_insert_into_bit_range_vector): New.
7641 (_initialize_values): Register selftests.
7642 * common/array-view.h (operator==, operator!=): New.
7643
7644 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7645
7646 * common/gdb_vecs.h (unordered_remove): Add overload that takes
7647 an iterator.
7648 * inline-frame.c: Include <algorithm>.
7649 (struct inline_state): Add constructor.
7650 (inline_state_s): Remove.
7651 (DEF_VEC_O(inline_state_s)): Remove.
7652 (inline_states): Change type to std::vector.
7653 (find_inline_frame_state): Adjust to std::vector.
7654 (allocate_inline_frame_state): Remove.
7655 (clear_inline_frame_state): Adjust to std::vector.
7656 (skip_inline_frames): Adjust to std::vector.
7657
7658 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7659
7660 * tracepoint.h (struct trace_state_variable): Add constructor.
7661 <name>: Change type to std::string.
7662 * tracepoint.c (tsv_s): Remove.
7663 (DEF_VEC_O(tsv_s)): Remove.
7664 (tvariables): Change to std::vector.
7665 (create_trace_state_variable): Adjust to std::vector.
7666 (find_trace_state_variable): Likewise.
7667 (find_trace_state_variable_by_number): Likewise.
7668 (delete_trace_state_variable): Likewise.
7669 (trace_variable_command): Adjust to std::string.
7670 (delete_trace_variable_command): Likewise.
7671 (tvariables_info_1): Adjust to std::vector.
7672 (save_trace_state_variables): Likewise.
7673 (start_tracing): Likewise.
7674 (merge_uploaded_trace_state_variables): Adjust to std::vector
7675 and std::string.
7676 * target.h (struct target_ops)
7677 <to_download_trace_state_variable>: Pass reference to
7678 trace_state_variable.
7679 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
7680 * target-delegates.c: Re-generate.
7681 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
7682 (mi_tsv_deleted): Likewise.
7683 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
7684 * remote.c (remote_download_trace_state_variable): Change
7685 pointer to reference and adjust.
7686 * make-target-delegates (parse_argtypes): Handle references.
7687 (write_function_header): Likewise.
7688 (munge_type): Likewise.
7689
7690 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7691
7692 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7693 string_view-selftests.c.
7694 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
7695 testsuite.
7696 * unittests/basic_string_view/cons/char/1.cc: Likewise.
7697 * unittests/basic_string_view/cons/char/2.cc: Likewise.
7698 * unittests/basic_string_view/cons/char/3.cc: Likewise.
7699 * unittests/basic_string_view/element_access/char/1.cc:
7700 Likewise.
7701 * unittests/basic_string_view/element_access/char/empty.cc:
7702 Likewise.
7703 * unittests/basic_string_view/element_access/char/front_back.cc:
7704 Likewise.
7705 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
7706 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
7707 Likewise.
7708 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
7709 Likewise.
7710 * unittests/basic_string_view/modifiers/swap/char/1.cc:
7711 Likewise.
7712 * unittests/basic_string_view/operations/compare/char/1.cc:
7713 Likewise.
7714 * unittests/basic_string_view/operations/compare/char/13650.cc:
7715 Likewise.
7716 * unittests/basic_string_view/operations/copy/char/1.cc:
7717 Likewise.
7718 * unittests/basic_string_view/operations/data/char/1.cc:
7719 Likewise.
7720 * unittests/basic_string_view/operations/find/char/1.cc:
7721 Likewise.
7722 * unittests/basic_string_view/operations/find/char/2.cc:
7723 Likewise.
7724 * unittests/basic_string_view/operations/find/char/3.cc:
7725 Likewise.
7726 * unittests/basic_string_view/operations/find/char/4.cc:
7727 Likewise.
7728 * unittests/basic_string_view/operations/rfind/char/1.cc:
7729 Likewise.
7730 * unittests/basic_string_view/operations/rfind/char/2.cc:
7731 Likewise.
7732 * unittests/basic_string_view/operations/rfind/char/3.cc:
7733 Likewise.
7734 * unittests/basic_string_view/operations/substr/char/1.cc:
7735 Likewise.
7736 * unittests/basic_string_view/operators/char/2.cc: Likewise.
7737 * unittests/string_view-selftests.c: New file.
7738
7739 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7740
7741 * unittests/basic_string_view/capacity/1.cc: New file.
7742 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
7743 * unittests/basic_string_view/cons/char/1.cc: New file.
7744 * unittests/basic_string_view/cons/char/2.cc: New file.
7745 * unittests/basic_string_view/cons/char/3.cc: New file.
7746 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
7747 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
7748 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
7749 * unittests/basic_string_view/element_access/char/1.cc: New file.
7750 * unittests/basic_string_view/element_access/char/2.cc: New file.
7751 * unittests/basic_string_view/element_access/char/empty.cc: New file.
7752 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
7753 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
7754 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
7755 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
7756 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
7757 * unittests/basic_string_view/include.cc: New file.
7758 * unittests/basic_string_view/inserters/char/1.cc: New file.
7759 * unittests/basic_string_view/inserters/char/2.cc: New file.
7760 * unittests/basic_string_view/inserters/char/3.cc: New file.
7761 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
7762 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
7763 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
7764 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
7765 * unittests/basic_string_view/literals/types.cc: New file.
7766 * unittests/basic_string_view/literals/values.cc: New file.
7767 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
7768 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
7769 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
7770 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
7771 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
7772 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
7773 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
7774 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
7775 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
7776 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
7777 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
7778 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
7779 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
7780 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
7781 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
7782 * unittests/basic_string_view/operations/data/char/1.cc: New file.
7783 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
7784 * unittests/basic_string_view/operations/find/char/1.cc: New file.
7785 * unittests/basic_string_view/operations/find/char/2.cc: New file.
7786 * unittests/basic_string_view/operations/find/char/3.cc: New file.
7787 * unittests/basic_string_view/operations/find/char/4.cc: New file.
7788 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
7789 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
7790 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
7791 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
7792 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
7793 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
7794 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
7795 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
7796 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
7797 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
7798 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
7799 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
7800 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
7801 * unittests/basic_string_view/operators/char/2.cc: New file.
7802 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
7803 * unittests/basic_string_view/range_access/char/1.cc: New file.
7804 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
7805 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
7806 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
7807 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
7808 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
7809 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
7810 * unittests/basic_string_view/requirements/typedefs.cc: New file.
7811 * unittests/basic_string_view/typedefs.cc: New file.
7812 * unittests/basic_string_view/types/1.cc: New file.
7813
7814 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7815
7816 * common/gdb_string_view.h: Remove libstdc++ implementation
7817 details, adjust to gdb reality.
7818 * common/gdb_string_view.tcc: Likewise.
7819 * cli/cli-script.c (struct string_view): Remove.
7820 (user_args) <m_args>: Change element type to gdb::string_view.
7821 (user_args::insert_args): Adjust.
7822
7823 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7824
7825 * common/gdb_string_view.h: New file.
7826 * common/gdb_string_view.tcc: New file.
7827
7828 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7829
7830 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
7831 * configure: Re-generate.
7832
7833 2018-04-09 Pedro Alves <palves@redhat.com>
7834
7835 * gdbarch.sh: Include "observable.h" instead of "observer.h".
7836 (set_target_gdbarch): Call
7837 gdb::observers::architecture_changed.notify instead of
7838 observer_notify_architecture_changed.
7839
7840 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7841
7842 * tracepoint.c (struct current_traceframe_cleanup): Remove.
7843 (do_restore_current_traceframe_cleanup): Remove.
7844 (restore_current_traceframe_cleanup_dtor): Remove.
7845 (make_cleanup_restore_current_traceframe): Remove.
7846 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
7847 New.
7848 * tracepoint.h (struct scoped_restore_current_traceframe): New.
7849 * infrun.c (fetch_inferior_event): Use
7850 scoped_restore_current_traceframe.
7851
7852 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7853
7854 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
7855 Remove.
7856 <n_allocated_type_units>: Remove.
7857 <all_type_units>: Change to std::vector.
7858 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7859 to std::vector change.
7860 (dwarf2_per_objfile::get_cutu): Likewise.
7861 (dwarf2_per_objfile::get_tu): Likewise.
7862 (create_signatured_type_table_from_index): Likewise.
7863 (create_signatured_type_table_from_debug_names): Likewise.
7864 (dw2_symtab_iter_next): Likewise.
7865 (dw2_print_stats): Likewise.
7866 (dw2_expand_all_symtabs): Likewise.
7867 (dw2_expand_marked_cus): Likewise.
7868 (dw2_debug_names_iterator::next): Likewise.
7869 (dwarf2_initialize_objfile): Likewise.
7870 (add_signatured_type_cu_to_table): Likewise.
7871 (create_all_type_units): Likewise.
7872 (add_type_unit): Likewise.
7873 (struct tu_abbrev_offset): Add constructor.
7874 (build_type_psymtabs_1): Adjust to std::vector change.
7875 (print_tu_stats): Likewise.
7876 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7877 (write_debug_names): Likewise.
7878
7879 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7880
7881 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
7882 Make an std::vector.
7883 <n_comp_units>: Remove.
7884 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7885 to std::vector change.
7886 (dwarf2_per_objfile::get_cutu): Likewise.
7887 (dwarf2_per_objfile::get_cu): Likewise.
7888 (create_cus_from_index): Likewise.
7889 (create_addrmap_from_index): Likewise.
7890 (create_addrmap_from_aranges): Likewise.
7891 (dwarf2_read_index): Likewise.
7892 (dw2_find_last_source_symtab): Likewise.
7893 (dw2_map_symtabs_matching_filename): Likewise.
7894 (dw2_symtab_iter_next): Likewise.
7895 (dw2_print_stats): Likewise.
7896 (dw2_expand_all_symtabs): Likewise.
7897 (dw2_expand_symtabs_with_fullname): Likewise.
7898 (dw2_expand_marked_cus): Likewise.
7899 (dw2_map_symbol_filenames): Likewise.
7900 (create_cus_from_debug_names): Likewise.
7901 (dwarf2_read_debug_names): Likewise.
7902 (dw2_debug_names_iterator::next): Likewise.
7903 (dwarf2_initialize_objfile): Likewise.
7904 (set_partial_user): Likewise.
7905 (dwarf2_build_psymtabs_hard): Likewise.
7906 (read_comp_units_from_section): Remove arguments, adjust to
7907 std::vector change.
7908 (create_all_comp_units): Adjust to std::vector and
7909 read_comp_units_from_section changes.
7910 (dwarf2_find_containing_comp_unit): Adjust to std::vector
7911 change.
7912 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7913 (psyms_seen_size): Likewise.
7914 (write_gdbindex): Likewise.
7915 (write_debug_names): Likewise.
7916
7917 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7918
7919 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
7920 with dwarf2_per_objfile.
7921 (create_cus_from_index): Likewise.
7922 (create_signatured_type_table_from_index): Likewise.
7923 (dwarf2_read_index): Likewise.
7924 (dwarf2_initialize_objfile): Likewise.
7925 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
7926 per_cu rather than get_dwarf2_per_objfile.
7927
7928 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7929
7930 * dwarf2read.h (struct signatured_type): Forward declare.
7931 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
7932 New methods.
7933 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
7934 (dw2_get_cutu): ...this.
7935 (dwarf2_per_objfile::get_cu): Rename from...
7936 (dw2_get_cu): ...this.
7937 (dwarf2_per_objfile::get_tu): New.
7938 (create_addrmap_from_index): Adjust.
7939 (create_addrmap_from_aranges): Adjust.
7940 (dw2_find_last_source_symtab): Adjust.
7941 (dw2_map_symtabs_matching_filename): Adjust.
7942 (dw2_symtab_iter_next): Adjust.
7943 (dw2_print_stats): Adjust.
7944 (dw2_expand_all_symtabs): Adjust.
7945 (dw2_expand_symtabs_with_fullname): Adjust.
7946 (dw2_expand_marked_cus): Adjust.
7947 (dw_expand_symtabs_matching_file_matcher): Adjust.
7948 (dw2_map_symbol_filenames): Adjust.
7949 (dw2_debug_names_iterator::next): Adjust.
7950 (dwarf2_initialize_objfile): Adjust.
7951 (set_partial_user): Adjust.
7952 (dwarf2_build_psymtabs_hard): Adjust.
7953
7954 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7955
7956 * dwarf2read.c (create_signatured_type_table_from_debug_names):
7957 Remove unused variables.
7958 (dw2_map_symtabs_matching_filename): Likewise.
7959 (dwarf2_record_block_ranges): Likewise.
7960 (dwarf2_read_addr_index): Likewise.
7961 (follow_die_offset): Likewise.
7962
7963 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7964
7965 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
7966 to symbol_file_add_main.
7967
7968 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7969
7970 PR mi/22299
7971 * mi/mi-console.c (do_fputc_async_safe): New.
7972 (mi_console_file::write_async_safe): New.
7973 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
7974 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
7975 New.
7976 * ui-file.c (ui_file::putstrn): Adjust call to
7977 fputstrn_unfiltered.
7978 * utils.c (printchar): Replace do_fputs and do_fprintf
7979 parameters by do_fputc.
7980 (fputstr_filtered): Adjust call to printchar.
7981 (fputstr_unfiltered): Likewise.
7982 (fputstrn_filtered): Likewise.
7983 (fputstrn_unfiltered): Add do_fputc parameter, pass to
7984 printchar.
7985 * utils.h (do_fputc_ftype): New typedef.
7986 (fputstrn_unfiltered): Add do_fputc parameter.
7987
7988 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7989
7990 * regformats/i386/i386-avx.dat: Remove.
7991
7992 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7993
7994 PR gdb/22979
7995 * amd64-tdep.c (amd64_none_init_abi): New function.
7996 (amd64_x32_none_init_abi): New function.
7997 (_initialize_amd64_tdep): Register handlers for x86-64 and
7998 x64_32 with GDB_OSABI_NONE.
7999 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
8000 GDB_OSABI_NONE osabi.
8001
8002 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8003
8004 PR gdb/22980
8005 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
8006 GDB_OSABI_NONE.
8007 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
8008 * osabi.c (gdb_osabi_names): Add "unknown" entry.
8009
8010 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8011
8012 * common/byte-vector.h (char_vector): New type.
8013 * target.h (target_read_alloc): Return
8014 gdb::optional<byte_vector>.
8015 (target_read_stralloc): Return gdb::optional<char_vector>.
8016 (target_get_osdata): Return gdb::optional<char_vector>.
8017 * target.c (target_read_alloc_1): Templatize. Replacement
8018 manual memory management with vector.
8019 (target_read_alloc): Change return type, adjust.
8020 (target_read_stralloc): Change return type, adjust.
8021 (target_get_osdata): Change return type, adjust.
8022 * auxv.c (struct auxv_info) <length>: Remove.
8023 <data>: Change type to gdb::optional<byte_vector>.
8024 (auxv_inferior_data_cleanup): Free auxv_info with delete.
8025 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
8026 (target_auxv_search): Adjust.
8027 (fprint_target_auxv): Adjust.
8028 * avr-tdep.c (avr_io_reg_read_command): Adjust.
8029 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
8030 (linux_make_corefile_notes): Adjust.
8031 * osdata.c (get_osdata): Adjust.
8032 * remote.c (remote_get_threads_with_qxfer): Adjust.
8033 (remote_memory_map): Adjust.
8034 (remote_traceframe_info): Adjust.
8035 (btrace_read_config): Adjust.
8036 (remote_read_btrace): Adjust.
8037 (remote_pid_to_exec_file): Adjust.
8038 * solib-aix.c (solib_aix_get_library_list): Adjust.
8039 * solib-dsbt.c (decode_loadmap): Don't free buf.
8040 (dsbt_get_initial_loadmaps): Adjust.
8041 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
8042 * solib-target.c (solib_target_current_sos): Adjust.
8043 * tracepoint.c (sdata_make_value): Adjust.
8044 * xml-support.c (xinclude_start_include): Adjust.
8045 (xml_fetch_content_from_file): Adjust.
8046 * xml-support.h (xml_fetch_another): Change return type.
8047 (xml_fetch_content_from_file): Change return type.
8048 * xml-syscall.c (xml_init_syscalls_info): Adjust.
8049 * xml-tdesc.c (file_read_description_xml): Adjust.
8050 (fetch_available_features_from_target): Change return type.
8051 (target_fetch_description_xml): Adjust.
8052 (target_read_description_xml): Adjust.
8053
8054 2018-04-06 Tom Tromey <tom@tromey.com>
8055
8056 * value.c (~value): Update.
8057 (struct value) <contents>: Now unique_xmalloc_ptr.
8058 (value_contents_bits_eq, allocate_value_contents)
8059 (value_contents_raw, value_contents_all_raw)
8060 (value_contents_for_printing, value_contents_for_printing_const)
8061 (set_value_enclosing_type): Update.
8062
8063 2018-04-06 Tom Tromey <tom@tromey.com>
8064
8065 * value.c (range_s): Remove typedef, VEC.
8066 (struct range): Add operator<.
8067 (range_lessthan): Remove.
8068 (ranges_contain): Change type.
8069 (~value): Update.
8070 (struct value) <unavailable, optimized_out>: Now std::vector.
8071 (value_entirely_available)
8072 (value_entirely_covered_by_range_vector)
8073 (value_entirely_unavailable, value_entirely_optimized_out):
8074 Update.
8075 (insert_into_bit_range_vector): Change argument type.
8076 (find_first_range_overlap): Likewise.
8077 (struct ranges_and_idx, value_contents_bits_eq)
8078 (require_not_optimized_out, require_available): Update.
8079 (ranges_copy_adjusted): Change argument types.
8080 (value_optimized_out, value_copy, value_fetch_lazy): Update.
8081
8082 2018-04-06 Tom Tromey <tom@tromey.com>
8083
8084 * value.c (~value): Update.
8085 (struct value) <parent>: Now a value_ref_ptr.
8086 (value_parent, set_value_parent, value_address, value_copy):
8087 Update.
8088
8089 2018-04-06 Tom Tromey <tom@tromey.com>
8090
8091 * value.c (struct value): Add constructor, destructor, and member
8092 initializers.
8093 (allocate_value_lazy, value_decref): Update.
8094
8095 2018-04-06 Tom Tromey <tom@tromey.com>
8096
8097 * value.c (struct value) <released, next>: Remove.
8098 (all_values): Now a std::vector.
8099 (allocate_value_lazy): Update.
8100 (value_next): Remove.
8101 (value_mark, value_free_to_mark, release_value)
8102 (value_release_to_mark): Update.
8103
8104 2018-04-06 Tom Tromey <tom@tromey.com>
8105
8106 * value.h (fetch_subexp_value, value_release_to_mark): Update.
8107 (free_value_chain): Remove.
8108 * value.c (free_value_chain): Remove.
8109 (value_release_to_mark): Return a std::vector.
8110 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
8111 std::vector.
8112 (check_condition): Update.
8113 * eval.c (fetch_subexp_value): Change "val_chain" to a
8114 std::vector.
8115 * breakpoint.c (update_watchpoint): Update.
8116 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
8117
8118 2018-04-06 Tom Tromey <tom@tromey.com>
8119
8120 * value.h (free_all_values): Remove.
8121 * value.c (free_all_values): Remove.
8122
8123 2018-04-06 Tom Tromey <tom@tromey.com>
8124
8125 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
8126 (value_history_chain, value_history_count): Remove.
8127 (value_history): New global.
8128 (record_latest_value, access_value_history, show_values)
8129 (preserve_values): Update.
8130
8131 2018-04-06 Tom Tromey <tom@tromey.com>
8132
8133 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
8134 * varobj.c (varobj_set_display_format, varobj_set_value)
8135 (install_default_visualizer, construct_visualizer)
8136 (install_new_value, ~varobj, varobj_get_value_type)
8137 (my_value_of_variable, varobj_editable_p): Update.
8138 * c-varobj.c (c_describe_child, c_value_of_variable)
8139 (cplus_number_of_children, cplus_describe_child): Update.
8140 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
8141 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
8142 (ada_value_of_variable, ada_value_is_changeable_p): Update.
8143
8144 2018-04-06 Tom Tromey <tom@tromey.com>
8145
8146 * printcmd.c (last_examine_address): Change type to
8147 value_ref_ptr.
8148 (do_examine, x_command): Update.
8149
8150 2018-04-06 Tom Tromey <tom@tromey.com>
8151
8152 * value.c (release_value): Update.
8153 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
8154 (struct bpstats) <val>: Now a value_ref_ptr.
8155 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8156 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8157 (~watchpoint, print_it_watchpoint, watch_command_1)
8158 (invalidate_bp_value_on_memory_change): Update.
8159
8160 2018-04-06 Tom Tromey <tom@tromey.com>
8161
8162 * varobj.c (varobj_clear_saved_item)
8163 (update_dynamic_varobj_children, install_new_value, ~varobj):
8164 Update.
8165 * value.h (value_incref): Move declaration earlier.
8166 (value_decref): Rename from value_free.
8167 (struct value_ref_policy): New.
8168 (value_ref_ptr): New typedef.
8169 (struct value_deleter): Remove.
8170 (gdb_value_up): Remove typedef.
8171 (release_value): Change return type.
8172 (release_value_or_incref): Remove.
8173 * value.c (set_value_parent): Update.
8174 (value_incref): Change return type.
8175 (value_decref): Rename from value_free.
8176 (value_free_to_mark, free_all_values, free_value_chain): Update.
8177 (release_value): Return value_ref_ptr.
8178 (release_value_or_incref): Remove.
8179 (record_latest_value, set_internalvar, clear_internalvar):
8180 Update.
8181 * stack.c (info_frame_command): Don't call value_free.
8182 * python/py-value.c (valpy_dealloc, valpy_new)
8183 (value_to_value_object): Update.
8184 * printcmd.c (do_examine): Update.
8185 * opencl-lang.c (lval_func_free_closure): Update.
8186 * mi/mi-main.c (register_changed_p): Don't call value_free.
8187 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
8188 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
8189 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
8190 value_free.
8191 * guile/scm-value.c (vlscm_free_value_smob)
8192 (vlscm_scm_from_value): Update.
8193 * frame.c (frame_register_unwind, frame_unwind_register_signed)
8194 (frame_unwind_register_unsigned, get_frame_register_bytes)
8195 (put_frame_register_bytes): Don't call value_free.
8196 * findvar.c (address_from_register): Don't call value_free.
8197 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
8198 * dwarf2loc.c (entry_data_value_free_closure)
8199 (value_of_dwarf_reg_entry, free_pieced_value_closure)
8200 (dwarf2_evaluate_loc_desc_full): Update.
8201 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8202 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8203 (~watchpoint, watch_command_1)
8204 (invalidate_bp_value_on_memory_change): Update.
8205 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
8206
8207 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
8208
8209 PR gdb/23022
8210 * warning.m4: Add -Wno-error=deprecated-register.
8211 * configure: Re-generate.
8212
8213 2018-04-05 Tom Tromey <tom@tromey.com>
8214
8215 * linespec.h: Remove include of "vec.h".
8216
8217 2018-04-05 Tom Tromey <tom@tromey.com>
8218
8219 * linespec.c (typep): Remove typedef.
8220 (find_methods, find_superclass_methods): Take a std::vector.
8221 (find_method): Use std::vector.
8222
8223 2018-04-05 Tom Tromey <tom@tromey.com>
8224
8225 * utils.c (compare_strings): Remove.
8226 * utils.h (compare_strings): Remove.
8227 * objc-lang.h (find_imps): Update.
8228 * objc-lang.c (find_methods): Take a std::vector.
8229 (uniquify_strings, find_imps): Likewise.
8230 * linespec.c (find_methods): Take a std::vector.
8231 (decode_objc): Use std::vector.
8232 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
8233 a std::vector.
8234 (find_method, find_function_symbols): Use std::vector.
8235
8236 2018-04-05 Tom Tromey <tom@tromey.com>
8237
8238 * completer.c (completion_tracker::completion_tracker): Remove
8239 cast.
8240 (completion_tracker::discard_completions): Likewise.
8241 * breakpoint.c (ambiguous_names_p): Remove cast.
8242 * ada-lang.c (_initialize_ada_language): Remove cast.
8243 * utils.h (streq): Update.
8244 (streq_hash): Add new declaration.
8245 * utils.c (streq): Return bool.
8246 (streq_hash): New function.
8247
8248 2018-04-05 Tom Tromey <tom@tromey.com>
8249
8250 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
8251 Remove a string copy.
8252
8253 2018-04-05 Tom Tromey <tom@tromey.com>
8254
8255 * linespec.c (filter_results): Use std::vector.
8256 (decode_line_2, decode_line_full): Update.
8257
8258 2018-04-05 Tom Tromey <tom@tromey.com>
8259
8260 * linespec.c (canonical_to_fullform): Return std::string.
8261 (filter_results): Update.
8262 (struct decode_line_2_item): Add constructor.
8263 <fullform, displayform>: Now std::string.
8264 (decode_line_2_compare_items): Now a std::sort comparator.
8265 (decode_line_2): Update.
8266
8267 2018-04-05 Tom Tromey <tom@tromey.com>
8268
8269 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
8270 (unexpected_linespec_error): Update.
8271 (linespec_parse_basic, parse_linespec): Update.
8272
8273 2018-04-05 Tom Tromey <tom@tromey.com>
8274
8275 * linespec.c (linespec_parse_basic): Reindent.
8276
8277 2018-04-05 Tom Tromey <tom@tromey.com>
8278
8279 * minsyms.h (iterate_over_minimal_symbols): Update.
8280 * minsyms.c (iterate_over_minimal_symbols): Take a
8281 gdb::function_view.
8282 * linespec.c (struct collect_minsyms): Remove.
8283 (compare_msyms): Now a std::sort comparator.
8284 (add_minsym): Add parameters.
8285 (search_minsyms_for_name): Update. Use std::vector.
8286
8287 2018-04-03 Tom Tromey <tom@tromey.com>
8288
8289 * mipsread.c (read_alphacoff_dynamic_symtab): Use
8290 gdb::byte_vector.
8291
8292 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
8293
8294 * MAINTAINERS (Write After Approval): Add Weimin Pan.
8295
8296 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
8297
8298 PR gdb/16959
8299 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
8300 printing static type.
8301
8302 2018-04-01 Tom Tromey <tom@tromey.com>
8303
8304 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
8305 (rs6000_xfer_shared_libraries): Update.
8306
8307 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
8308
8309 * common/gdb_vecs.h (char_ptr): Remove.
8310 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
8311
8312 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
8313
8314 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
8315 with std::vector.
8316 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
8317
8318 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
8319
8320 * tracepoint.h (struct uploaded_tp): Initialize fields.
8321 <actions, step_actions, cmd_strings>: Change type to
8322 std::vector<char *>.
8323 * tracepoint.c (get_uploaded_tp): Allocate with new.
8324 (free_uploaded_tps): Free with delete.
8325 (parse_tracepoint_definition): Adjust to std::vector change.
8326 * breakpoint.c (read_uploaded_action): Likewise.
8327 (create_tracepoint_from_upload): Likewise.
8328 * ctf.c (ctf_write_uploaded_tp): Likewise.
8329 (SET_ARRAY_FIELD): Likewise.
8330 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
8331
8332 2018-03-30 Tom Tromey <tom@tromey.com>
8333
8334 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
8335 std::unique_ptr.
8336 (svr4_keep_data_in_core): Update.
8337 (svr4_read_so_list): Update.
8338
8339 2018-03-30 Tom Tromey <tom@tromey.com>
8340
8341 * windows-nat.c (handle_output_debug_string, handle_exception):
8342 Update.
8343 * target.h (target_read_string): Update.
8344 * target.c (target_read_string): Change "string" to
8345 unique_xmalloc_ptr.
8346 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
8347 Update.
8348 * solib-frv.c (frv_current_sos): Update.
8349 * solib-dsbt.c (dsbt_current_sos): Update.
8350 * solib-darwin.c (darwin_current_sos): Update.
8351 * linux-thread-db.c (inferior_has_bug): Update.
8352 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
8353 Update. Remove alloca.
8354 * ada-lang.c (ada_main_name): Update.
8355
8356 2018-03-30 Tom Tromey <tom@tromey.com>
8357
8358 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
8359 (struct dwo_file_deleter): New.
8360 (dwo_file_up): New typedef.
8361 (open_and_init_dwo_file): Use dwo_file_up.
8362 (free_dwo_file_cleanup): Remove.
8363
8364 2018-03-30 Tom Tromey <tom@tromey.com>
8365
8366 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
8367 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
8368
8369 2018-03-30 Tom Tromey <tom@tromey.com>
8370
8371 * dwarf2read.c (class free_cached_comp_units): New class.
8372 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
8373 (free_cached_comp_units): Remove function.
8374
8375 2018-03-30 Tom Tromey <tom@tromey.com>
8376
8377 * utils.h (make_cleanup_unpush_target): Remove.
8378 * inf-ptrace.c (struct target_unpusher): New.
8379 (target_unpush_up) New typedef.
8380 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
8381 target_unpush_up.
8382 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
8383
8384 2018-03-27 Tom Tromey <tom@tromey.com>
8385
8386 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
8387
8388 2018-03-27 Pedro Alves <palves@redhat.com>
8389 Tom Tromey <tom@tromey.com>
8390
8391 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
8392 destructor. Now a class.
8393 (gdb_readline_wrapper_cleanup): Remove function.
8394 (gdb_readline_wrapper): Remove cleanups.
8395
8396 2018-03-27 Tom Tromey <tom@tromey.com>
8397
8398 * typeprint.h (struct type_print_options) <local_typedefs,
8399 global_typedefs>: Remove "struct" keyword.
8400 (class typedef_hash_table): New class.
8401 (recursively_update_typedef_hash, add_template_parameters)
8402 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
8403 (find_typedef_in_hash): Don't declare.
8404 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
8405 (typedef_hash_table::recursively_update): Rename from
8406 recursively_update_typedef_hash. Now a member.
8407 (typedef_hash_table::add_template_parameters): Rename from
8408 add_template_parameters. Now a member.
8409 (typedef_hash_table::typedef_hash_table): Now a constructor;
8410 rename from create_typedef_hash.
8411 (typedef_hash_table::~typedef_hash_table): Now a destructor;
8412 rename from free_typedef_hash.
8413 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
8414 (do_free_global_table): Remove.
8415 (typedef_hash_table::typedef_hash_table): New constructor; renamed
8416 from copy_type_recursive.
8417 (create_global_typedef_table): Remove.
8418 (typedef_hash_table::find_global_typedef): Now a member of
8419 typedef_hash_table.
8420 (typedef_hash_table::find_typedef): Rename from
8421 find_typedef_in_hash; now a member.
8422 (whatis_exp): Update.
8423 * extension.h (struct ext_lang_type_printers): Add constructor and
8424 destructor.
8425 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
8426 declare.
8427 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
8428 Now a constructor; rename from start_ext_lang_type_printers.
8429 (ext_lang_type_printers): Now a destructor; rename from
8430 free_ext_lang_type_printers.
8431 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
8432 Update.
8433 (c_type_print_base_struct_union): Update. Remove cleanups.
8434
8435 2018-03-27 Tom Tromey <tom@tromey.com>
8436
8437 * dwarf-index-write.c: Include <cmath>.
8438
8439 2018-03-27 Joel Brobecker <brobecker@adacore.com>
8440
8441 * NEWS: Add entry describing new "set|show varsize-limit" command.
8442 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
8443 command.
8444 * printcmd.c (_initialize_printcmd): Add "set var" alias of
8445 "set variable".
8446
8447 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
8448
8449 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
8450 dwarf-index-write.c
8451 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
8452 * dwarf-index-common.c: New file.
8453 * dwarf-index-common.h: New file.
8454 * dwarf-index-write.c: New file.
8455 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
8456 (struct dwarf2_section_info): Move from here.
8457 (dwarf2_section_info_def): Likewise.
8458 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
8459 (offset_type): Likewise.
8460 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
8461 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
8462 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
8463 (byte_swap): Likewise.
8464 (MAYBE_SWAP): Likewise.
8465 (dwarf2_per_cu_ptr): Likewise.
8466 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
8467 (struct tu_stats): Likewise.
8468 (struct dwarf2_per_objfile): Likewise.
8469 (struct dwarf2_per_cu_data): Likewise.
8470 (struct signatured_type): Likewise.
8471 (sig_type_ptr): Likewise.
8472 (DEF_VEC_P (sig_type_ptr)): Likewise.
8473 (INDEX4_SUFFIX): Likewise.
8474 (INDEX5_SUFFIX): Likewise.
8475 (DEBUG_STR_SUFFIX): Likewise.
8476 (dwarf2_read_section): Make non-static.
8477 (mapped_index_string_hash): Move from here.
8478 (dwarf5_djb_hash): Likewise.
8479 (file_write): Likewise.
8480 (class data_buf): Likewise.
8481 (struct symtab_index_entry): Likewise.
8482 (struct mapped_symtab): Likewise.
8483 (find_slot): Likewise.
8484 (hash_expand): Likewise.
8485 (add_index_entry): Likewise.
8486 (uniquify_cu_indices): Likewise.
8487 (class c_str_view): Likewise.
8488 (class c_str_view_hasher): Likewise.
8489 (class vector_hasher): Likewise.
8490 (write_hash_table): Likewise.
8491 (psym_index_map): Likewise.
8492 (struct addrmap_index_data): Likewise.
8493 (add_address_entry): Likewise.
8494 (add_address_entry_worker): Likewise.
8495 (write_address_map): Likewise.
8496 (symbol_kind): Likewise.
8497 (write_psymbols): Likewise.
8498 (struct signatured_type_index_data): Likewise.
8499 (write_one_signatured_type): Likewise.
8500 (recursively_count_psymbols): Likewise.
8501 (recursively_write_psymbols): Likewise.
8502 (class debug_names): Likewise.
8503 (check_dwarf64_offsets): Likewise.
8504 (psyms_seen_size): Likewise.
8505 (write_gdbindex): Likewise.
8506 (write_debug_names): Likewise.
8507 (assert_file_size): Likewise.
8508 (write_psymtabs_to_index): Likewise.
8509 (save_gdb_index_command): Likewise.
8510 (_initialize_dwarf2_read): Don't register the "save gdb-index"
8511 command.
8512 * dwarf2read.h: New file.
8513
8514 2018-03-27 Joel Brobecker <brobecker@adacore.com>
8515
8516 PR gdb/22670
8517 * dwarf2read.c (dwarf2_physname): Do not return the demangled
8518 symbol name if the CU's language stores symbol names in linkage
8519 format.
8520 * language.h (struct language_defn)
8521 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
8522 all instances of this struct.
8523
8524 2018-03-26 Tom Tromey <tom@tromey.com>
8525
8526 * stack.c (backtrace_command_1): Remove verbose code.
8527
8528 2018-03-26 Tom Tromey <tom@tromey.com>
8529
8530 * python/py-framefilter.c (py_print_type): Don't catch
8531 exceptions. Return void.
8532 (py_print_value): Likewise.
8533 (py_print_single_arg): Likewise.
8534 (enumerate_args): Don't catch exceptions.
8535 (py_print_args): Likewise.
8536 (py_print_frame): Likewise.
8537 (gdbpy_apply_frame_filter): Catch exceptions here.
8538
8539 2018-03-26 Tom Tromey <tom@tromey.com>
8540
8541 * stack.c (_initialize_stack): Remove trailing newlines from help
8542 text. Add "Usage" line to "backtrace" help.
8543
8544 2018-03-26 Tom Tromey <tom@tromey.com>
8545
8546 PR python/16486:
8547 * python/py-framefilter.c (py_print_args): Call wrap_hint.
8548
8549 2018-03-26 Tom Tromey <tom@tromey.com>
8550
8551 * python/py-framefilter.c (py_print_single_arg): Return
8552 EXT_LANG_BT_ERROR from catch.
8553
8554 2018-03-26 Tom Tromey <tom@tromey.com>
8555
8556 PR backtrace/15584:
8557 * stack.c (backtrace_command_1): Move some code into no-filters
8558 "if".
8559
8560 2018-03-26 Tom Tromey <tom@tromey.com>
8561
8562 * python/py-framefilter.c (throw_quit_or_print_exception): New
8563 function.
8564 (gdbpy_apply_frame_filter): Use it.
8565
8566 2018-03-26 Tom Tromey <tom@tromey.com>
8567
8568 PR cli/17716:
8569 * python/py-framefilter.c (py_print_type, py_print_value)
8570 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
8571 RETURN_MASK_ERROR.
8572
8573 2018-03-26 Tom Tromey <tom@tromey.com>
8574
8575 * python/py-framefilter.c (enumerate_args): Use
8576 gdb::unique_xmalloc_ptr.
8577
8578 2018-03-26 Tom Tromey <tom@tromey.com>
8579
8580 * python/py-framefilter.c (py_print_frame): Return
8581 EXT_LANG_BT_OK.
8582 (gdbpy_apply_frame_filter): Update comment.
8583 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
8584 Remove.
8585 <EXT_LANG_BT_NO_FILTERS>: Change value.
8586
8587 2018-03-26 Tom Tromey <tom@tromey.com>
8588
8589 PR backtrace/15582:
8590 * stack.c (backtrace_command): Parse "hide" argument.
8591 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
8592 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
8593 constant.
8594
8595 2018-03-26 Tom Tromey <tom@tromey.com>
8596
8597 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
8598 add "flags".
8599 (backtrace_command): Remove "fulltrace", add "flags".
8600
8601 2018-03-26 Tom Tromey <tom@tromey.com>
8602
8603 * stack.c (backtrace_command): Rewrite command line parsing.
8604
8605 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
8606
8607 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
8608
8609 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
8610
8611 * filename-seen-cache.h: Add include guard.
8612
8613 2018-03-26 Keith Seitz <keiths@redhat.com>
8614
8615 * symfile.c (place_section): Remove "struct" from section_addr_info
8616 in comment.
8617 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
8618 "struct" keyword from section_addr_info.
8619
8620 2018-03-26 Alan Hayward <alan.hayward@arm.com>
8621
8622 * regformats/regdef.h (reg): Add constructors.
8623
8624 2018-03-25 Pedro Alves <palves@redhat.com>
8625
8626 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
8627 if then/else bodies in var_func_name extraction.
8628
8629 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
8630
8631 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
8632 lookup_minimal_symbol() to find symbol entry.
8633 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
8634
8635 2018-03-23 Keith Seitz <keiths@redhat.com>
8636
8637 PR c++/22968
8638 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
8639 nested type definitions for C++, too.
8640
8641 2018-03-23 Tom Tromey <tom@tromey.com>
8642
8643 * machoread.c (struct oso_el): Add a constructor. Don't define as
8644 a typedef.
8645 (macho_register_oso): Remove.
8646 (macho_symtab_read): Take a std::vector.
8647 (oso_el_compare_name): Now a std::sort comparator.
8648 (macho_symfile_read_all_oso): Take a std::vector.
8649 (macho_symfile_read): Use std::vector. Remove cleanups.
8650
8651 2018-03-22 Tom Tromey <tom@tromey.com>
8652
8653 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
8654 (record_full_goto_bookmark): Use std::string.
8655
8656 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8657
8658 PR tdep/18295
8659 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
8660 a single mask.
8661
8662 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8663
8664 * rs6000-tdep.c (store_insn_p): New function.
8665 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
8666 and cr_reg to their unshifted values. Use store_insn_p to
8667 match LR saves using either R1 or fdata->alloca_reg. Use
8668 store_insn_p to match CR saves. Set alloca_reg_offset
8669 when alloca_reg and framep are set. Remove lr_reg shift
8670 when assigning to fdata->lr_register.
8671
8672 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
8673
8674 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
8675 command line args instead of emitting a warning.
8676
8677 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8678
8679 * tracepoint.h (struct static_tracepoint_marker): Initialize
8680 fields, define default constructor, move constructor and move
8681 assignment, disable the rest.
8682 <str_id, extra>: Make std::string.
8683 (release_static_tracepoint_marker): Remove.
8684 (free_current_marker): Remove.
8685 * tracepoint.c (free_current_marker): Remove.
8686 (parse_static_tracepoint_marker_definition): Adjust to
8687 std::string, use new hex2str overload.
8688 (release_static_tracepoint_marker): Remove.
8689 (print_one_static_tracepoint_marker): Get marker by reference
8690 and adjust to std::string.
8691 (info_static_tracepoint_markers_command): Adjust to std::vector
8692 changes
8693 * target.h (static_tracepoint_marker_p): Remove typedef.
8694 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
8695 (struct target_ops) <to_static_tracepoint_marker_at>: Return
8696 bool.
8697 <to_static_tracepoint_markers_by_strid>: Return std::vector.
8698 * target-debug.h
8699 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
8700 (target_debug_print_std_vector_static_tracepoint_marker): New.
8701 (target_debug_print_struct_static_tracepoint_marker_p): Rename
8702 to...
8703 (target_debug_print_static_tracepoint_marker_p): ... this.
8704 * target-delegates.c: Re-generate.
8705 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
8706 Make std::string.
8707 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
8708 (decode_static_tracepoint_spec): Adjust to std::vector.
8709 (tracepoint_print_one_detail): Adjust to std::string.
8710 (strace_marker_decode_location): Adjust to std::string.
8711 (update_static_tracepoint): Adjust to std::string, remove call
8712 to release_static_tracepoint_marker.
8713 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
8714 Adjust to std::vector.
8715 * remote.c (remote_static_tracepoint_marker_at): Return bool.
8716 (remote_static_tracepoint_markers_by_strid): Adjust to
8717 std::vector.
8718 * common/rsp-low.h (hex2str): New overload with explicit count
8719 of bytes.
8720 * common/rsp-low.c (hex2str): New overload with explicit count
8721 of bytes.
8722 * unittests/rsp-low-selftests.c (test_hex2str): New function.
8723 (_initialize_rsp_low_selftests): Add test_hex2str test.
8724 * unittests/tracepoint-selftests.c
8725 (test_parse_static_tracepoint_marker_definition): Adjust to
8726 std::string.
8727
8728 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8729
8730 * tracepoint.c (parse_static_tracepoint_marker_definition):
8731 Consider case where the definition is followed by more
8732 definitions.
8733 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8734 tracepoint-selftests.c.
8735 * unittests/tracepoint-selftests.c: New.
8736
8737 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8738
8739 * MAINTAINERS (Write After Approval): Add Pedro Franco de
8740 Carvalho.
8741
8742 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
8743
8744 * symtab.c (find_pc_sect_line): fixed indentation.
8745
8746 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
8747
8748 * symtab.c (find_pc_sect_line): now uses binary search.
8749
8750 2018-03-19 Tom Tromey <tom@tromey.com>
8751
8752 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
8753 "IDENT" production.
8754
8755 2018-03-19 Pedro Alves <palves@redhat.com>
8756 Tom Tromey <tom@tromey.com>
8757
8758 * unittests/observable-selftests.c: New file.
8759 * common/observable.h: New file.
8760 * observable.h: New file.
8761 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
8762 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
8763 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
8764 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
8765 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
8766 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
8767 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
8768 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
8769 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
8770 python/py-breakpoint.c, python/py-finishbreakpoint.c,
8771 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
8772 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
8773 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
8774 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
8775 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
8776 tui/tui-interp.c, valops.c: Update all users.
8777 * tui/tui-hooks.c (tui_bp_created_observer)
8778 (tui_bp_deleted_observer, tui_bp_modified_observer)
8779 (tui_inferior_exit_observer, tui_before_prompt_observer)
8780 (tui_normal_stop_observer, tui_register_changed_observer):
8781 Remove.
8782 (tui_observers_token): New global.
8783 (attach_or_detach, tui_attach_detach_observers): New functions.
8784 (tui_install_hooks, tui_remove_hooks): Use
8785 tui_attach_detach_observers.
8786 * record-btrace.c (record_btrace_thread_observer): Remove.
8787 (record_btrace_thread_observer_token): New global.
8788 * observer.sh: Remove.
8789 * observer.c: Rename to observable.c.
8790 * observable.c (namespace gdb_observers): Define new objects.
8791 (observer_debug): Move into gdb_observers namespace.
8792 (struct observer, struct observer_list, xalloc_observer_list_node)
8793 (xfree_observer_list_node, generic_observer_attach)
8794 (generic_observer_detach, generic_observer_notify): Remove.
8795 (_initialize_observer): Update.
8796 Don't include observer.inc.
8797 * Makefile.in (generated_files): Remove observer.h, observer.inc.
8798 (clean mostlyclean): Likewise.
8799 (observer.h, observer.inc): Remove targets.
8800 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
8801 (COMMON_SFILES): Use observable.c, not observer.c.
8802 * .gitignore: Remove observer.h.
8803
8804 2018-03-18 Tom Tromey <tom@tromey.com>
8805
8806 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
8807 gdb::def_vector.
8808 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
8809
8810 2018-03-17 Tom Tromey <tom@tromey.com>
8811
8812 * auto-load.c (auto_load_objfile_script_1): Use std::string.
8813
8814 2018-03-17 Tom Tromey <tom@tromey.com>
8815
8816 * target.c (class scoped_target_fd): New.
8817 (target_fileio_close_cleanup): Remove.
8818 (target_fileio_read_alloc_1): Use scoped_target_fd.
8819
8820 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
8821
8822 * silent-rules.mk: New.
8823 * Makefile.in: Include silent-rules.mk
8824 (srcdir, VPATH, top_srcdir): Move up.
8825 (COMPILE): Add ECHO_CXX.
8826 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
8827 (init.c): Add ECHO_INIT_C.
8828 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
8829 (version.c): Add ECHO_GEN.
8830 (printcmd.o): Add ECHO_CXX.
8831 (target-float.o): Add ECHO_CXX.
8832 (ada-exp.o): Add ECHO_CXX.
8833 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
8834 (insight$(EXEEXT)): Add ECHO_CXXLD.
8835 * gnulib/configure.ac: Add AM_SILENT_RULES.
8836 * gnulib/aclocal.m4: Re-generate.
8837 * gnulib/configure: Re-generate.
8838 * gnulib/import/Makefile.in: Re-generate.
8839
8840 2018-03-16 Tom Tromey <tom@tromey.com>
8841
8842 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
8843 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
8844 * utils.c (do_free_section_addr_info)
8845 (make_cleanup_free_section_addr_info): Remove.
8846 * symfile.h (struct other_sections): Add constructor.
8847 (struct section_addr_info): Remove.
8848 (section_addr_info): New typedef.
8849 (struct sym_fns) <sym_offsets>: Change type of parameter.
8850 (build_section_addr_info_from_objfile)
8851 (relative_addr_info_to_section_offsets, addr_info_make_relative)
8852 (default_symfile_offsets, symbol_file_add)
8853 (symbol_file_add_from_bfd)
8854 (build_section_addr_info_from_section_table): Update.
8855 (alloc_section_addr_info, free_section_addr_info): Don't declare.
8856 * symfile.c (alloc_section_addr_info): Remove.
8857 (build_section_addr_info_from_section_table): Change return type.
8858 Update.
8859 (build_section_addr_info_from_bfd)
8860 (build_section_addr_info_from_objfile): Likewise.
8861 (free_section_addr_info): Remove.
8862 (relative_addr_info_to_section_offsets): Change type of "addrs".
8863 (addrs_section_compar): Now a std::sort comparator.
8864 (addrs_section_sort): Change return type.
8865 (addr_info_make_relative): Change type of "addrs". Update.
8866 (default_symfile_offsets, syms_from_objfile_1)
8867 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
8868 (symbol_file_add_separate): Update.
8869 (symbol_file_add): Change type of "addrs". Update.
8870 (add_symbol_file_command): Update. Remove cleanups.
8871 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
8872 cleanups.
8873 * symfile-debug.c (debug_sym_offsets): Change type of "info".
8874 * solib.c (solib_read_symbols): Update.
8875 * objfiles.c (objfile_relocate): Update. Remove cleanups.
8876 * machoread.c (macho_symfile_offsets): Update.
8877 * jit.c (jit_bfd_try_read_symtab): Update.
8878
8879 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
8880
8881 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8882 unittests/utils-selftests.c.
8883 * unittests/utils-selftests.c: New file.
8884
8885 2018-03-14 Tom Tromey <tom@tromey.com>
8886
8887 PR cli/14977:
8888 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
8889 for NULL.
8890
8891 2018-03-14 Tom Tromey <tom@tromey.com>
8892
8893 PR cli/19918:
8894 * printcmd.c (printf_pointer): Allow "-" in format.
8895
8896 2018-03-14 Tom Tromey <tom@tromey.com>
8897
8898 * printcmd.c (_initialize_printcmd): Add usage to printf.
8899
8900 2018-03-14 Yao Qi <qiyao@sourceware.org>
8901
8902 * MAINTAINERS: Update my email address.
8903
8904 2018-03-13 Tom Tromey <tom@tromey.com>
8905
8906 * machoread.c (macho_check_dsym): Change filenamep to a
8907 std::string*.
8908 (macho_symfile_read): Update.
8909 * symfile.c (load_command): Use std::string.
8910
8911 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
8912
8913 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
8914 to error message string.
8915 (riscv_register_name): Use xsnprintf instead of sprintf.
8916 (riscv_insn::fetch_instruction): Use gdb_assert instead of
8917 internal_error.
8918 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
8919 error.
8920 (riscv_push_dummy_call): Likewise.
8921
8922 2018-03-12 Tom Tromey <tom@tromey.com>
8923
8924 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
8925 Use gdb::byte_vector.
8926 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
8927
8928 2018-03-12 Yao Qi <yao.qi@linaro.org>
8929
8930 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
8931 parameter type to readable_regcache.
8932 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
8933 the declaration.
8934
8935 2018-03-11 Tom Tromey <tom@tromey.com>
8936
8937 * dwarf2read.c (struct nextfield): Add initializers.
8938 (struct nextfnfield): Remove.
8939 (struct fnfieldlist): Add initializers. Remove "length" and
8940 "head", use std::vector.
8941 (struct decl_field_list): Remove.
8942 (struct field_info): Add initializers.
8943 <fields, baseclasses>: Now std::vector.
8944 <nbaseclasses, nfnfields, typedef_field_list_count,
8945 nested_types_list_count>: Remove.
8946 (dwarf2_add_field, dwarf2_add_type_defn)
8947 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
8948 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
8949 (process_structure_scope): Update.
8950
8951 2018-03-11 Tom Tromey <tom@tromey.com>
8952
8953 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
8954 for use by std::sort.
8955 (build_type_psymtabs_1): Use std::vector.
8956
8957 2018-03-09 Eli Zaretskii <eliz@gnu.org>
8958
8959 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
8960 and LIBMPFR in the printed configuration.
8961
8962 2018-03-08 Tom Tromey <tom@tromey.com>
8963
8964 * source.c (get_filename_and_charpos): Use scoped_fd.
8965 * nto-procfs.c (procfs_open_1): Use scoped_fd.
8966 (procfs_pidlist): Likewise.
8967 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
8968 (iterate_over_mappings): Likewise.
8969
8970 2018-03-08 Tom Tromey <tom@tromey.com>
8971
8972 * infcall.c (struct call_return_meta_info)
8973 <stack_temporaries_enabled>: Remove.
8974 (get_call_return_value, call_function_by_hand_dummy): Update.
8975 * thread.c (disable_thread_stack_temporaries): Remove.
8976 (enable_thread_stack_temporaries): Remove.
8977 (thread_stack_temporaries_enabled_p): Return bool.
8978 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
8979 (get_last_thread_stack_temporary): Update.
8980 * eval.c (evaluate_subexp): Update.
8981 * gdbthread.h (class enable_thread_stack_temporaries): Now a
8982 class, not a function.
8983 (value_ptr, value_vec): Remove typedefs.
8984 (class thread_info) <stack_temporaries_enabled>: Now bool.
8985 <stack_temporaries>: Now a std::vector.
8986 (thread_stack_temporaries_enabled_p)
8987 (value_in_thread_stack_temporaries): Return bool.
8988
8989 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
8990
8991 * remote.c (putpkt_binary): Fix omitted bytes reporting.
8992 (getpkt_or_notif_sane_1): Likewise.
8993
8994 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8995
8996 * build-id.c (build_id_to_debug_bfd): Use std::string.
8997
8998 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8999
9000 * build-id.c (find_separate_debug_file_by_buildid): Return
9001 std::string.
9002 * build-id.h (find_separate_debug_file_by_buildid): Return
9003 std::string.
9004 * coffread.c (coff_symfile_read): Adjust to std::string.
9005 * elfread.c (elf_symfile_read): Adjust to std::string.
9006 * symfile.c (separate_debug_file_exists): Change parameter to
9007 std::string.
9008 (find_separate_debug_file): Return std::string.
9009 (find_separate_debug_file_by_debuglink): Return std::string.
9010 * symfile.h (find_separate_debug_file_by_debuglink): Return
9011 std::string.
9012
9013 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9014
9015 * common/xml-utils.c (xml_escape_text): Move code to...
9016 (xml_escape_text_append): ... this new function.
9017 * common/xml-utils.h (xml_escape_text_append): New declaration.
9018 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
9019 New function.
9020 (_initialize_xml_utils): register test_xml_escape_text_append as
9021 a selftest.
9022
9023 2018-03-07 Alan Hayward <alan.hayward@arm.com>
9024
9025 * defs.h: Remove MAX_REGISTER_SIZE.
9026 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
9027 asserts.
9028 * python/py-unwind.c (pyuw_sniffer): Likewise.
9029
9030 2018-03-07 Tom Tromey <tom@tromey.com>
9031
9032 * linux-tdep.c (linux_info_proc): Update.
9033 * target.h (struct target_ops) <to_fileio_readlink>: Return
9034 optional<string>.
9035 (target_fileio_readlink): Return optional<string>.
9036 * remote.c (remote_hostio_readlink): Return optional<string>.
9037 * inf-child.c (inf_child_fileio_readlink): Return
9038 optional<string>.
9039 * target.c (target_fileio_readlink): Return optional<string>.
9040
9041 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
9042
9043 * regcache.c (cooked_read_test): Add riscv to the list of
9044 architectures that have a save_reggroup.
9045
9046 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
9047
9048 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
9049 value is not a dynamic class object.
9050
9051 2018-03-06 Tom Tromey <tom@tromey.com>
9052
9053 * rust-exp.y: Formatting fixes.
9054
9055 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9056
9057 * riscv-tdep.c (riscv_register_name): Remove target description
9058 support.
9059 (riscv_gdbarch_init): Remove target description check.
9060
9061 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9062
9063 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
9064 comment.
9065 * riscv-tdep.h: Likewise.
9066
9067 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9068
9069 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
9070 (riscv_pseudo_register_write): Delete.
9071 (riscv_gdbarch_init): Remove all use of pseudo registers.
9072
9073 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9074
9075 * record-btrace.c (btrace_print_lines): Replace cleanup
9076 parameter with RAII equivalents.
9077 (btrace_insn_history): Replace cleanup with RAII equivalents.
9078 * ui-out.h (make_cleanup_ui_out_list_begin_end,
9079 make_cleanup_ui_out_tuple_begin_end): Remove.
9080 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
9081 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
9082 make_cleanup_ui_out_list_begin_end): Remove.
9083
9084 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9085
9086 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
9087 parameter types to std::vector. Use bool.
9088 (record_btrace_wait): Replace VEC(tp_t) with
9089 std::vector<thread_info *>.
9090 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
9091
9092 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9093
9094 * record-btrace.c (record_btrace_disable_callback): Remove.
9095 (struct scoped_btrace_disable): New.
9096 (record_btrace_open): Use scoped_btrace_disable.
9097
9098 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9099
9100 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
9101 reading values from registers.
9102
9103 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9104
9105 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
9106 where appropriate.
9107
9108 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9109
9110 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
9111 change parameter type. Use GDB's print functions, and use
9112 core_addr_to_string where appropriate.
9113 (riscv_push_dummy_call): Use core_addr_to_string where
9114 appropriate, update call to riscv_print_arg_location, and reindent
9115 a few lines.
9116 (riscv_return_value): Update call to riscv_print_arg_location.
9117
9118 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9119 Tim Newsome <tim@sifive.com>
9120 Albert Ou <a0u@eecs.berkeley.edu>
9121 Darius Rad <darius@bluespec.com>
9122
9123 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
9124 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
9125 (ALLDEPFILES): Add riscv-tdep.c
9126 * configure.tgt: Add riscv support.
9127 * riscv-tdep.c: New file.
9128 * riscv-tdep.h: New file.
9129 * NEWS: Mention new target.
9130 * MAINTAINERS: Add entry for riscv.
9131
9132 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9133
9134 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
9135 fields within aggregates.
9136
9137 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
9138
9139 * record-btrace.c (btrace_print_lines): Change type of flags to
9140 gdb_disassembly_flags.
9141
9142 2018-03-04 John Baldwin <jhb@FreeBSD.org>
9143
9144 * fbsd-nat.c: Include "inf-ptrace.h".
9145 (USE_SIGTRAP_SIGINFO): Conditionally define.
9146 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
9147 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
9148 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
9149 function.
9150 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
9151 Likewise.
9152 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
9153 Likewise.
9154 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
9155 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
9156 "supports_stopped_by_hw_breakpoint" target methods.
9157
9158 2018-03-04 John Baldwin <jhb@FreeBSD.org>
9159
9160 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
9161 * fbsd-nat.c (debug_fbsd_nat): New variable.
9162 (show_fbsd_nat_debug): New function.
9163 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
9164 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
9165
9166 2018-03-04 John Baldwin <jhb@FreeBSD.org>
9167
9168 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
9169 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
9170 prototype.
9171 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
9172 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
9173 method.
9174
9175 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9176
9177 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
9178 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
9179
9180 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9181
9182 * charset.c (struct charset_vector): New.
9183 (charsets): Change type to charset_vector.
9184 (find_charset_names): Adjust.
9185 (add_one): Adjust.
9186 (_initialize_charset): Adjust.
9187
9188 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9189
9190 * progspace.h (struct program_space) <deleted_solibs>: Change
9191 type to std::vector<std::string>.
9192 * progspace.c (clear_program_space_solib_cache): Adjust.
9193 * breakpoint.c (print_solib_event): Adjust.
9194 (check_status_catch_solib): Adjust.
9195 * solib.c (update_solib_list): Adjust.
9196 * ui-out.h (class ui_out) <field_string>: New overload.
9197 * ui-out.c (ui_out::field_string): New overload.
9198
9199 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9200
9201 * progspace.h (struct program_space): Add constructor and
9202 destructor, initialize fields.
9203 (add_program_space): Remove.
9204 * progspace.c (add_program_space): Rename to...
9205 (program_space::program_space): ... this.
9206 (release_program_space): Rename to...
9207 (program_space::~program_space): ... this.
9208 (delete_program_space): Use delete to delete program_space.
9209 (initialize_progspace): Use new to allocate program_space.
9210 * inferior.c (add_inferior_with_spaces): Likewise.
9211 (clone_inferior_command): Likewise.
9212 * infrun.c (follow_fork_inferior): Likewise.
9213 (handle_vfork_child_exec_or_exit): Likewise.
9214
9215 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9216
9217 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
9218 (delim_string_to_char_ptr_vec): Return std::vector of
9219 gdb::unique_xmalloc_ptr.
9220 (dirnames_to_char_ptr_vec_append): Take std::vector of
9221 gdb::unique_xmalloc_ptr.
9222 (dirnames_to_char_ptr_vec): Return std::vector of
9223 gdb::unique_xmalloc_ptr.
9224 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
9225 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
9226 (delim_string_to_char_ptr_vec): Return an std::vector of
9227 gdb::unique_xmalloc_ptr, adjust the code.
9228 (dirnames_to_char_ptr_vec_append): Take an std::vector of
9229 gdb::unique_xmalloc_ptr, adjust the code.
9230 (dirnames_to_char_ptr_vec): Return an std::vector of
9231 gdb::unique_xmalloc_ptr, adjust the code.
9232 * auto-load.c (auto_load_safe_path_vec): Change type to
9233 std::vector of gdb::unique_xmalloc_ptr.
9234 (auto_load_expand_dir_vars): Return an std::vector of
9235 gdb::unique_xmalloc_ptr, adjust the code.
9236 (auto_load_safe_path_vec_update): Adjust.
9237 (filename_is_in_auto_load_safe_path_vec): Adjust.
9238 (auto_load_objfile_script_1): Adjust.
9239 * build-id.c (build_id_to_debug_bfd): Adjust.
9240 * linux-thread-db.c (thread_db_load_search): Adjust.
9241 * source.c (add_path): Adjust.
9242 (openp): Adjust.
9243 * symfile.c (find_separate_debug_file): Adjust.
9244 * utils.c (do_free_char_ptr_vec): Remove.
9245 (make_cleanup_free_char_ptr_vec): Remove.
9246
9247 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
9248
9249 PR gdb/22907
9250 * common/pathstuff.c: Conditionally include "<windows.h>".
9251
9252 2018-03-01 Georg Sauthoff <mail@georg.so>
9253
9254 PR gdb/22888
9255 * gcore.in: Quote variables and switch interpreter to bash.
9256
9257 2018-03-01 Tom Tromey <tom@tromey.com>
9258
9259 * dwarf2read.c (alloc_discriminant_info): Fix default_index
9260 assertion. Add assertion for discriminant_index.
9261 (quirk_rust_enum): Use correct base type name in univariant case.
9262
9263 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
9264
9265 * record.c (get_call_history_modifiers): Return a
9266 record_print_flags.
9267 (cmd_record_call_history): Adjust.
9268 * record-btrace.c (record_btrace_call_history): Adjust.
9269 (record_btrace_call_history_range): Adjust.
9270 (record_btrace_call_history_from): Adjust.
9271 * target-debug.h (target_debug_print_record_print_flags): New.
9272 * target-delegates.c: Re-generate.
9273 * target.c (target_call_history): Change flags type.
9274 (target_call_history_from): Likewise.
9275 (target_call_history_range): Likewise.
9276 * target.h (struct target_ops) <target_call_history>: Likewise.
9277 (target_call_history_from): Likewise.
9278 (target_call_history_range): Likewise.
9279
9280 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
9281 Simon Marchi <simon.marchi@polymtl.ca>
9282
9283 * common/common-utils.c: Include "sys/stat.h".
9284 (is_regular_file): Move here from "source.c"; change return
9285 type to "bool".
9286 * common/common-utils.h (is_regular_file): New prototype.
9287 * common/pathstuff.c (contains_dir_separator): New function.
9288 * common/pathstuff.h (contains_dir_separator): New prototype.
9289 * source.c: Don't include "sys/stat.h".
9290 (is_regular_file): Move to "common/common-utils.c".
9291
9292 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
9293
9294 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
9295 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
9296 * auto-load.c: Include "common/pathstuff.h".
9297 * common/common-def.h (current_directory): Move here.
9298 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
9299 function.
9300 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
9301 prototype.
9302 * common/pathstuff.c: New file.
9303 * common/pathstuff.h: New file.
9304 * compile/compile.c: Include "common/pathstuff.h".
9305 * defs.h (current_directory): Move to "common/common-defs.h".
9306 * dwarf2read.c: Include "common/pathstuff.h".
9307 * exec.c: Likewise.
9308 * guile/scm-safe-call.c: Likewise.
9309 * linux-thread-db.c: Likewise.
9310 * main.c: Likewise.
9311 * nto-tdep.c: Likewise.
9312 * objfiles.c: Likewise.
9313 * source.c: Likewise.
9314 * symtab.c: Likewise.
9315 * utils.c: Include "common/pathstuff.h".
9316 (gdb_realpath): Move to "common/pathstuff.c".
9317 (gdb_realpath_keepfile): Likewise.
9318 (gdb_abspath): Likewise.
9319 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
9320 (gdb_realpath_keepfile): Likewise.
9321 (gdb_abspath): Likewise.
9322
9323 2018-02-28 John Baldwin <jhb@FreeBSD.org>
9324
9325 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
9326 wildcard process pid for super_resume for kernels with a
9327 specific bug.
9328
9329 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
9330
9331 * compile/compile.c (get_args): Add additional comments
9332 explaining function.
9333
9334 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
9335 Tom Tromey <tom@tromey.com>
9336
9337 * target.h (memory_write_request_s): Remove typedef. Don't define
9338 VEC.
9339 (target_write_memory_blocks): Change argument to std::vector.
9340 (struct memory_write_request): Add constructor.
9341 * target-memory.c (compare_block_starting_address): Return bool.
9342 Change argument types.
9343 (claim_memory): Change arguments to use std::vector.
9344 (split_regular_and_flash_blocks, blocks_to_erase)
9345 (compute_garbled_blocks): Likewise.
9346 (cleanup_request_data, cleanup_write_requests_vector): Remove.
9347 (target_write_memory_blocks): Change argument to std::vector.
9348 * symfile.c (struct load_section_data): Add constructor and
9349 destructor. Use std::vector for "requests".
9350 (struct load_progress_data): Add initializers.
9351 (load_section_callback): Update. Use "new".
9352 (clear_memory_write_data): Remove.
9353 (generic_load): Update.
9354
9355 2018-02-27 Alan Hayward <alan.hayward@arm.com>
9356
9357 * arch/aarch64.h: Use common/tdesc.h.
9358
9359 2018-02-26 Maciej W. Rozycki <macro@mips.com>
9360
9361 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
9362 architecture with a 64-bit ABI.
9363
9364 2018-02-26 Maciej W. Rozycki <macro@mips.com>
9365
9366 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
9367 ahead of target description loading.
9368
9369 2018-02-26 Tom Tromey <tom@tromey.com>
9370
9371 * stack.c (backtrace_command_1): Update.
9372 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
9373 of "flags".
9374 * python/py-framefilter.c (py_print_frame)
9375 (gdbpy_apply_frame_filter): Change type of "flags".
9376 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
9377 of "flags".
9378 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
9379 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
9380 * extension.h (enum frame_filter_flag): Rename from
9381 frame_filter_flags.
9382 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
9383 (apply_ext_lang_frame_filter): Change type of "flags".
9384 * extension.c (apply_ext_lang_frame_filter): Change type of
9385 "flags".
9386 * extension-priv.h (struct extension_language_ops)
9387 <apply_frame_filter>: Change type of "flags".
9388
9389 2018-02-26 Tom Tromey <tom@tromey.com>
9390
9391 PR python/16497:
9392 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
9393 off-by-one in py_end computation.
9394 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
9395 PRINT_MORE_FRAMES.
9396 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
9397 constant.
9398
9399 2018-02-26 Tom Tromey <tom@tromey.com>
9400
9401 * dwarf2read.c (struct variant_field): New.
9402 (struct nextfield) <variant>: New field.
9403 (dwarf2_add_field): Handle DW_TAG_variant_part.
9404 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
9405 discriminated union.
9406 (read_structure_type): Handle DW_TAG_variant_part.
9407 (handle_struct_member_die): New function, extracted from
9408 process_structure_scope. Handle DW_TAG_variant.
9409 (process_structure_scope): Handle discriminated unions. Call
9410 handle_struct_member_die.
9411
9412 2018-02-26 Tom Tromey <tom@tromey.com>
9413
9414 * rust-lang.h (rust_last_path_segment): Declare.
9415 * rust-lang.c (rust_last_path_segment): Now public. Change
9416 contract.
9417 (struct disr_info): Remove.
9418 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
9419 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
9420 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
9421 (rust_enum_p, rust_enum_variant): New function.
9422 (rust_underscore_fields): Remove "offset" parameter.
9423 (rust_print_enum): New function.
9424 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
9425 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
9426 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
9427 enums.
9428 (rust_internal_print_type): New function, from rust_print_type.
9429 Remove enum code.
9430 (rust_print_type): Call rust_internal_print_type.
9431 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
9432 Update enum handling.
9433 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
9434 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
9435 (rust_union_quirks): New functions.
9436 (process_full_comp_unit, process_full_type_unit): Call
9437 rust_union_quirks.
9438 (process_structure_scope): Update rust_unions if necessary.
9439
9440 2018-02-26 Tom Tromey <tom@tromey.com>
9441
9442 * value.h (value_union_variant): Declare.
9443 * valops.c (value_union_variant): New function.
9444 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
9445 (struct discriminant_info): New.
9446 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
9447 enumerator.
9448 (struct main_type) <flag_discriminated_union>: New field.
9449
9450 2018-02-26 Tom Tromey <tom@tromey.com>
9451
9452 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9453 unittests/unpack-selftests.c.
9454 * unittests/unpack-selftests.c: New file.
9455 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
9456
9457 2018-02-26 Yao Qi <yao.qi@linaro.org>
9458
9459 * dwarf2read.c (struct partial_die_info) <read>: New method.
9460 (read_partial_die): Remove the declaration.
9461 (load_partial_dies): Update.
9462 (partial_die_info::partial_die_info):
9463 (read_partial_die): Change it to partial_die_info::read.
9464
9465 2018-02-26 Yao Qi <yao.qi@linaro.org>
9466
9467 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
9468 (fixup_partial_die): Remove declaration.
9469 (scan_partial_symbols): Update.
9470 (partial_die_parent_scope): Likewise.
9471 (partial_die_full_name): Likewise.
9472 (fixup_partial_die): Change it to partial_die_info::fixup.
9473
9474 2018-02-26 Yao Qi <yao.qi@linaro.org>
9475
9476 * dwarf2read.c (read_partial_die): Update the declaration.
9477 (load_partial_dies): Caller update.
9478 (read_partial_die): Remove one argument abbrev_len.
9479
9480 2018-02-26 Yao Qi <yao.qi@linaro.org>
9481
9482 * dwarf2read.c (struct partial_die_info): Add ctor, delete
9483 assignment operator.
9484 (load_partial_dies): Use ctor and copy ctor.
9485 (read_partial_die): Update.
9486 (dwarf2_cu::find_partial_die): Use ctor.
9487
9488 2018-02-26 Yao Qi <yao.qi@linaro.org>
9489
9490 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
9491 (find_partial_die_in_comp_unit): Change it to
9492 dwarf2_cu::find_partial_die.
9493 (find_partial_die): Update.
9494
9495 2018-02-26 Yao Qi <yao.qi@linaro.org>
9496
9497 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
9498 is NULL.
9499
9500 2018-02-26 Yao Qi <yao.qi@linaro.org>
9501
9502 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
9503
9504 2018-02-26 Alan Hayward <alan.hayward@arm.com>
9505
9506 * arch/amd64.h: Use common/tdesc.h.
9507 * arch/i386.c: Likewise.
9508 * arch/i386.h: Likewise.
9509 * arch/tic6x.c: Likewise.
9510 * arch/tdesc.h: Move file from here...
9511 * common/tdesc.h: ...to here.
9512 * features/aarch64-core.c: Regenerate.
9513 * features/aarch64-fpu.c: Regenerate.
9514 * features/i386/32bit-avx.c: Regenerate.
9515 * features/i386/32bit-avx512.c: Regenerate.
9516 * features/i386/32bit-core.c: Regenerate.
9517 * features/i386/32bit-linux.c: Regenerate.
9518 * features/i386/32bit-mpx.c: Regenerate.
9519 * features/i386/32bit-pkeys.c: Regenerate.
9520 * features/i386/32bit-sse.c: Regenerate.
9521 * features/i386/64bit-avx.c: Regenerate.
9522 * features/i386/64bit-avx512.c: Regenerate.
9523 * features/i386/64bit-core.c: Regenerate.
9524 * features/i386/64bit-linux.c: Regenerate.
9525 * features/i386/64bit-mpx.c: Regenerate.
9526 * features/i386/64bit-pkeys.c: Regenerate.
9527 * features/i386/64bit-segments.c: Regenerate.
9528 * features/i386/64bit-sse.c: Regenerate.
9529 * features/i386/x32-core.c: Regenerate.
9530 * features/tic6x-c6xp.c: Regenerate.
9531 * features/tic6x-core.c: Regenerate.
9532 * features/tic6x-gp.c: Regenerate.
9533 * target-descriptions.c: Use common/tdesc.h.
9534 * target-descriptions.h: Likewise.
9535
9536 2018-02-24 Tom Tromey <tom@tromey.com>
9537
9538 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
9539 (try_thread_db_load_from_dir, thread_db_load_search): Use
9540 std::string.
9541 (info_auto_load_libthread_db_compare): Return bool. Change
9542 argument types.
9543 (info_auto_load_libthread_db): Use std::vector, std::string.
9544 Remove cleanups.
9545
9546 2018-02-24 Tom Tromey <tom@tromey.com>
9547
9548 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
9549 std::string.
9550 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
9551 std::string*.
9552 * gdbarch.c: Rebuild.
9553 * gdbarch.h: Rebuild.
9554 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
9555 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
9556 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
9557 std::string*.
9558
9559 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
9560
9561 * gdbtypes.h (sect_offset): Change type to uint64_t.
9562 (sect_offset_str): New function.
9563 * dwarf2read.c (create_addrmap_from_aranges): Use
9564 sect_offset_str.
9565 (error_check_comp_unit_head): Likewise.
9566 (create_debug_type_hash_table): Likewise.
9567 (read_cutu_die_from_dwo): Likewise.
9568 (init_cutu_and_read_dies): Likewise.
9569 (init_cutu_and_read_dies_no_follow): Likewise.
9570 (process_psymtab_comp_unit_reader): Likewise.
9571 (partial_die_parent_scope): Likewise.
9572 (peek_die_abbrev): Likewise.
9573 (process_queue): Likewise.
9574 (dwarf2_physname): Likewise.
9575 (read_namespace_alias): Likewise.
9576 (read_import_statement): Likewise.
9577 (create_dwo_cu_reader): Likewise.
9578 (create_cus_hash_table): Likewise.
9579 (lookup_dwo_cutu): Likewise.
9580 (inherit_abstract_dies): Likewise.
9581 (read_func_scope): Likewise.
9582 (read_call_site_scope): Likewise.
9583 (dwarf2_add_member_fn): Likewise.
9584 (read_common_block): Likewise.
9585 (read_module_type): Likewise.
9586 (read_typedef): Likewise.
9587 (read_subrange_type): Likewise.
9588 (load_partial_dies): Likewise.
9589 (read_partial_die): Likewise.
9590 (find_partial_die): Likewise.
9591 (read_str_index): Likewise.
9592 (dwarf2_string_attr): Likewise.
9593 (build_error_marker_type): Likewise.
9594 (lookup_die_type): Likewise.
9595 (dump_die_shallow): Likewise.
9596 (follow_die_ref): Likewise.
9597 (dwarf2_fetch_die_loc_sect_off): Likewise.
9598 (dwarf2_fetch_constant_bytes): Likewise.
9599 (follow_die_sig): Likewise.
9600 (get_signatured_type): Likewise.
9601 (get_DW_AT_signature_type): Likewise.
9602 (dwarf2_find_containing_comp_unit): Likewise.
9603 (set_die_type): Likewise.
9604
9605 2018-02-21 John Baldwin <jhb@FreeBSD.org>
9606
9607 * arch/aarch64.c: Include "common-defs.h".
9608 * arch/amd64.c: Likewise.
9609 * arch/i386.c: Likewise.
9610
9611 2018-02-21 Tom Tromey <tom@tromey.com>
9612
9613 * value.h: (extract_field_op): Update.
9614 * eval.c (extract_field_op): Return a const char *.
9615 * expression.h (parse_expression_for_completion): Update.
9616 * completer.c (complete_expression): Update.
9617 (add_struct_fields): Make fieldname const.
9618 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
9619 (mark_completion_tag, parse_exp_in_context_1): Update.
9620 (parse_expression_for_completion): Change "name" to
9621 unique_xmalloc_ptr*.
9622
9623 2018-02-21 Tom Tromey <tom@tromey.com>
9624
9625 * infcall.c (call_function_by_hand_dummy): Use std::vector.
9626
9627 2018-02-21 Yao Qi <yao.qi@linaro.org>
9628
9629 * avr-tdep.c (avr_read_pc): Change parameter type to
9630 readable_regcache.
9631 * gdbarch.sh (read_pc): Likewise.
9632 * gdbarch.c: Re-generated.
9633 * gdbarch.h: Re-generated.
9634 * hppa-tdep.c (hppa_read_pc): Change parameter type to
9635 readable_regcache.
9636 * ia64-tdep.c (ia64_read_pc): Likewise.
9637 * mips-tdep.c (mips_read_pc): Likewise.
9638 * spu-tdep.c (spu_read_pc): Likewise.
9639
9640 2018-02-21 Yao Qi <yao.qi@linaro.org>
9641
9642 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
9643 * regcache-dump.c: New file.
9644 * regcache.c: Move register_dump to regcache-dump.c.
9645 (maintenance_print_registers): Likewise.
9646 (maintenance_print_raw_registers): Likewise.
9647 (maintenance_print_cooked_registers): Likewise.
9648 (maintenance_print_register_groups): Likewise.
9649 (maintenance_print_remote_registers): Likewise.
9650 (_initialize_regcache): Likewise.
9651 * regcache.h (register_dump): Moved from regcache.c.
9652
9653 2018-02-21 Yao Qi <yao.qi@linaro.org>
9654
9655 * regcache.c (regcache::regcache): Update.
9656 (regcache::invalidate): Move it to detached_regcache::invalidate.
9657 (get_thread_arch_aspace_regcache): Update.
9658 (regcache::raw_update): Update.
9659 (regcache::cooked_read): Remove some code.
9660 (regcache::cooked_read_value): Likewise.
9661 (regcache::raw_write): Remove assert on m_readonly_p.
9662 (regcache::raw_supply_integer): Move it to
9663 detached_regcache::raw_supply_integer.
9664 (regcache::raw_supply_zeroed): Likewise.
9665 * regcache.h (detached_regcache) <raw_supply_integer>: New
9666 declaration.
9667 <raw_supply_zeroed, invalidate>: Likewise.
9668 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
9669 <invalidate>: Likewise.
9670 <m_readonly_p>: Removed.
9671
9672 2018-02-21 Yao Qi <yao.qi@linaro.org>
9673
9674 * infcmd.c (get_return_value): Let stop_regs point to
9675 get_current_regcache.
9676 * regcache.c (regcache::regcache): Remove.
9677 (register_dump_reg_buffer): New class.
9678 (regcache_print): Adjust.
9679 * regcache.h (regcache): Remove constructors.
9680
9681 2018-02-21 Yao Qi <yao.qi@linaro.org>
9682
9683 * regcache.c (class register_dump): New class.
9684 (register_dump_regcache, register_dump_none): New class.
9685 (register_dump_remote, register_dump_groups): New class.
9686 (regcache_print): Update.
9687 * regcache.h (regcache_dump_what): Move it to regcache.c.
9688 (regcache) <dump>: Remove.
9689
9690 2018-02-21 Yao Qi <yao.qi@linaro.org>
9691
9692 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
9693 reg_buffer_rw *.
9694 (jit_unwind_reg_set_impl): Call raw_supply.
9695 (jit_frame_sniffer): Use reg_buffer_rw.
9696 * record-full.c (record_full_core_regbuf): Change its type.
9697 (record_full_core_open_1): Use reg_buffer_rw.
9698 (record_full_close): Likewise.
9699 (record_full_core_fetch_registers): Use regcache->raw_supply.
9700 (record_full_core_store_registers): Likewise.
9701 * regcache.c (regcache::get_register_status): Move it to
9702 reg_buffer.
9703 (regcache_raw_set_cached_value): Remove.
9704 (regcache::raw_set_cached_value): Remove.
9705 (regcache::raw_write): Call raw_supply.
9706 (regcache::raw_supply): Move it to reg_buffer_rw.
9707 * regcache.h (regcache_raw_set_cached_value): Remove.
9708 (reg_buffer_rw): New class.
9709
9710 2018-02-21 Yao Qi <yao.qi@linaro.org>
9711
9712 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
9713 readonly_detached_regcache.
9714 (dummy_frame_prev_register): Use regcache->cooked_read.
9715 * frame.c (frame_save_as_regcache): Change return type.
9716 (frame_pop): Update.
9717 * frame.h (frame_save_as_regcache): Update declaration.
9718 * inferior.h (get_infcall_suspend_state_regcache): Update
9719 declaration.
9720 * infrun.c (infcall_suspend_state) <registers>: use
9721 readonly_detached_regcache.
9722 (save_infcall_suspend_state): Don't use regcache_dup.
9723 (get_infcall_suspend_state_regcache): Change return type.
9724 * linux-fork.c (struct fork_info) <savedregs>: Change to
9725 readonly_detached_regcache.
9726 <pc>: New field.
9727 (fork_save_infrun_state): Don't use regcache_dup.
9728 (info_checkpoints_command): Adjust.
9729 * mi/mi-main.c (register_changed_p): Update declaration.
9730 (mi_cmd_data_list_changed_registers): Use
9731 readonly_detached_regcache.
9732 (register_changed_p): Change parameter type to
9733 readonly_detached_regcache.
9734 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
9735 readonly_detached_regcache.
9736 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
9737 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
9738 New.
9739 (regcache::save): Move it to reg_buffer.
9740 (regcache::restore): Change parameter type.
9741 (regcache_dup): Remove.
9742 * regcache.h (reg_buffer) <save>: New method.
9743 (readonly_detached_regcache): New class.
9744 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
9745 readonly_detached_regcache.
9746 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
9747
9748 2018-02-21 Yao Qi <yao.qi@linaro.org>
9749
9750 * frame.c (frame_save_as_regcache): Use regcache method save.
9751 (frame_pop): Use regcache method restore.
9752 * infrun.c (restore_infcall_suspend_state): Likewise.
9753 * linux-fork.c (fork_load_infrun_state): Likewise.
9754 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
9755 save.
9756 * regcache.c (regcache_save): Remove.
9757 (regcache::restore): More asserts.
9758 (regcache_cpy): Remove.
9759 * regcache.h (regcache_save): Remove the declaration.
9760 (regcache::restore): Move from private to public.
9761 Remove the friend declaration of regcache_cpy.
9762 (regcache_cpy): Remove declaration.
9763
9764 2018-02-21 Yao Qi <yao.qi@linaro.org>
9765
9766 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
9767 parameter type to 'readable_regcache *'.
9768 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9769 * arm-tdep.c (arm_neon_quad_read): Likewise.
9770 (arm_pseudo_read): Likewise.
9771 * avr-tdep.c (avr_pseudo_register_read): Likewise.
9772 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9773 * frv-tdep.c (frv_pseudo_register_read): Likewise.
9774 * gdbarch.c: Re-generated.
9775 * gdbarch.h: Re-generated.
9776 * gdbarch.sh (pseudo_register_read): Change parameter type to
9777 'readable_regcache *'.
9778 (pseudo_register_read_value): Likewise.
9779 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
9780 (h8300_pseudo_register_read): Likewise.
9781 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
9782 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9783 (i386_pseudo_register_read_into_value): Likewise.
9784 (i386_pseudo_register_read_value): Likewise.
9785 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
9786 declaration.
9787 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
9788 * m32c-tdep.c (m32c_raw_read): Likewise.
9789 (m32c_read_flg): Likewise.
9790 (m32c_banked_register): Likewise.
9791 (m32c_banked_read): Likewise.
9792 (m32c_sb_read): Likewise.
9793 (m32c_part_read): Likewise.
9794 (m32c_cat_read): Likewise.
9795 (m32c_r3r2r1r0_read): Likewise.
9796 (m32c_pseudo_register_read): Likewise.
9797 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9798 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9799 (mep_pseudo_cr64_read): Likewise.
9800 (mep_pseudo_register_read): Likewise.
9801 * mips-tdep.c (mips_pseudo_register_read): Likewise.
9802 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9803 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9804 * regcache.c (regcache::raw_read): Move it to readable_regcache.
9805 (regcache::cooked_read): Likewise.
9806 (regcache::cooked_read_value): Likewise.
9807 (regcache_cooked_read_signed):
9808 (regcache::cooked_read): Likewise.
9809 * regcache.h (readable_regcache): New class.
9810 (regcache): Inherit readable_regcache. Move some methods to
9811 readable_regcache.
9812 * rl78-tdep.c (rl78_pseudo_register_read): Change
9813 parameter type to 'readable_regcache *'.
9814 * rs6000-tdep.c (do_regcache_raw_read): Remove.
9815 (e500_pseudo_register_read): Change parameter type to
9816 'readable_regcache *'.
9817 (dfp_pseudo_register_read): Likewise.
9818 (vsx_pseudo_register_read): Likewise.
9819 (efpr_pseudo_register_read): Likewise.
9820 * s390-tdep.c (s390_pseudo_register_read): Likewise.
9821 * sh-tdep.c (sh_pseudo_register_read): Likewise.
9822 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
9823 (sh64_pseudo_register_read): Likewise.
9824 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9825 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9826 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9827 (spu_pseudo_register_read): Likewise.
9828 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9829 (xtensa_pseudo_register_read): Likewise.
9830
9831 2018-02-21 Yao Qi <yao.qi@linaro.org>
9832
9833 * regcache.c (regcache::regcache): Call reg_buffer ctor.
9834 (regcache::arch): Move it to reg_buffer::arch.
9835 (regcache::register_buffer): Likewise.
9836 (regcache::assert_regnum): Likewise.
9837 (regcache::num_raw_registers): Likewise.
9838 * regcache.h (reg_buffer): New class.
9839 (regcache): Inherit reg_buffer.
9840
9841 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
9842
9843 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
9844 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
9845
9846 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
9847
9848 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
9849
9850 2018-02-19 Alan Hayward <alan.hayward@arm.com>
9851
9852 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
9853 (SFILES): Remove common/*.c files.
9854 (COMMON_OBS): Remove some *.o files built from common/*.c files.
9855 * common/common.host: Add common reference.
9856 * configure.ac: Likewise.
9857 * configure: Regenerate.
9858
9859 2018-02-16 Yao Qi <yao.qi@linaro.org>
9860
9861 * block.c (block_namespace_info): Inherit allocate_on_obstack.
9862 (block_initialize_namespace): Use new.
9863 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
9864 (dwarf2_free_objfile): Use delete.
9865 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
9866 (copy_type_recursive): Use new.
9867 * gdb_obstack.h (allocate_on_obstack): New.
9868
9869 2018-02-15 Yao Qi <yao.qi@linaro.org>
9870
9871 PR gdb/22849
9872 * inferior.c (exit_inferior_1): Reset inf->control.
9873
9874 2018-02-15 Joel Brobecker <brobecker@adacore.com>
9875
9876 * ada-lang.c (ada_to_fixed_value_create): Delete advance
9877 declaration.
9878
9879 2018-02-14 Pedro Alves <palves@redhat.com>
9880
9881 * frame-unwind.c (frame_unwind_try_unwinder): Always call
9882 frame_cleanup_after_sniffer on exception.
9883
9884 2018-02-14 Tom Tromey <tom@tromey.com>
9885
9886 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
9887 const.
9888 (solib_bfd_open): Make pathname const.
9889 * solib.c (solib_bfd_open): Make pathname const.
9890 * solib-spu.c (spu_bfd_fopen): Make name const.
9891 (spu_bfd_open): Make pathname const.
9892 * solib-darwin.c (darwin_bfd_open): Make pathname const.
9893 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
9894
9895 2018-02-14 Tom Tromey <tom@tromey.com>
9896
9897 * symfile.c (symfile_bfd_open): Update.
9898 * source.h (openp, source_full_path_of, find_and_open_source):
9899 Change argument type to unique_xmalloc_ptr.
9900 * source.c (openp): Take a unique_xmalloc_ptr.
9901 (source_full_path_of, find_and_open_source): Likewise.
9902 (open_source_file, symtab_to_fullname): Update.
9903 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
9904 unique_xmalloc_ptr.
9905 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
9906 (exec_file_find): Update.
9907 * psymtab.c (psymtab_to_fullname): Update.
9908 * nto-tdep.h (nto_find_and_open_solib): Update.
9909 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
9910 unique_xmalloc_ptr.
9911 * exec.c (exec_file_attach): Update.
9912 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
9913 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
9914
9915 2018-02-14 Tom Tromey <tom@tromey.com>
9916
9917 * solib.c: Include source.h.
9918 * nto-tdep.c: Include source.h.
9919 * mi/mi-cmd-env.c: Include source.h.
9920 * infcmd.c: Include source.h.
9921 * exec.c: Include source.h.
9922 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
9923 (add_path, directory_switch, source_path, init_source_path): Move
9924 declarations...
9925 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
9926 (add_path, directory_switch, source_path, init_source_path):
9927 ...here.
9928
9929 2018-02-14 Tom Tromey <tom@tromey.com>
9930
9931 * solist.h (exec_file_find, solib_find): Return
9932 unique_xmalloc_ptr.
9933 (solib_bfd_fopen): Take a const char *.
9934 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
9935 (exec_file_find, solib_find): Likewise.
9936 (solib_bfd_fopen): Do not take ownership of "pathname".
9937 (solib_bfd_open): Use unique_xmalloc_ptr.
9938 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
9939 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
9940 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
9941 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
9942
9943 2018-02-14 Joel Brobecker <brobecker@adacore.com>
9944
9945 * ada-lang.c (name_match_type_from_name): Remove reference to
9946 ada_name_for_lookup in function's documentation.
9947 * ada-lang.h (ada_name_for_lookup): Delete declaration.
9948
9949 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
9950
9951 * defs.h (enum openp_flags): New enum.
9952 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
9953 Move to enum openp_flags.
9954 (openp_flags): New enum flags.
9955 (openp): Change parameter type to openp_flags.
9956 * source.c (openp): Change parameter type to openp_flags.
9957 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
9958 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
9959
9960 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
9961
9962 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
9963 per-command.
9964
9965 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
9966
9967 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
9968 into...
9969 (class dwarf2_queue_guard): ...the destructor of this new class.
9970 (dw2_do_instantiate_symtab): Create instance of the new class
9971 dwarf2_queue_guard, remove cleanup.
9972
9973 2018-02-09 Tom Tromey <tom@tromey.com>
9974
9975 * source.c (find_source_lines): Don't reference past the end of
9976 the vector.
9977
9978 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9979
9980 * remote.c (remote_btrace_maybe_reopen): Change error message.
9981 * btrace.c (btrace_enable): Likewise.
9982 (parse_xml_btrace): Likewise.
9983 (parse_xml_btrace_conf): Likewise.
9984
9985 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9986
9987 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
9988 (linux_enable_pt, linux_enable_bts): Call
9989 diagnose_perf_event_open_fail.
9990
9991 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9992
9993 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
9994 Remove parameter and change return type. Update callers. Move it.
9995 (linux_enable_bts, linux_enable_pt): Improve error message.
9996 (linux_enable_pt): Remove zero buffer size check.
9997 (linux_enable_btrace): Improve error messages. Remove NULL return
9998 check.
9999
10000 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10001
10002 * btrace.c (btrace_enable): Remove target_supports_btrace call.
10003 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
10004 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
10005 (linux_supports_pt, linux_supports_btrace): Remove.
10006 (linux_enable_bts): Call cpu_supports_bts.
10007 * nat/linux-btrace.h (linux_supports_btrace): Remove.
10008 * remote.c (remote_supports_btrace): Remove.
10009 (init_remote_ops): Remove remote_supports_btrace.
10010 * target-delegates.c: Regenerated.
10011 * target.c (target_supports_btrace): Remove.
10012 * target.h (target_ops) <to_supports_btrace>: Remove
10013 (target_supports_btrace): Remove.
10014 * x86-linux-nat.c (x86_linux_create_target): Remove
10015 linux_supports_btrace.
10016
10017 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10018
10019 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
10020 btrace failed.
10021 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
10022 exception and use message in own exception.
10023
10024 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10025
10026 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
10027 (perf_event_pt_event_type): Use gdb_file_up.
10028 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
10029 scoped_fd, and scoped_mmap.
10030
10031 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10032
10033 * common/scoped_mmap.h: New.
10034 * unittests/scoped_mmap-selftest.c: New.
10035 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10036 unittests/scoped_mmap-selftest.c.
10037
10038 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10039
10040 * common/scoped_fd.h: New.
10041 * unittests/scoped_fd-selftest.c: New.
10042 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10043 unittests/scoped_fd-selftest.c.
10044
10045 2018-02-09 Tom Tromey <tom@tromey.com>
10046
10047 * auto-load.c (auto_load_section_scripts): Use
10048 gdb::unique_xmalloc_ptr.
10049
10050 2018-02-09 Tom Tromey <tom@tromey.com>
10051
10052 * auto-load.c (execute_script_contents): Use std::string.
10053
10054 2018-02-09 Joel Brobecker <brobecker@adacore.com>
10055
10056 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
10057 Python function, rather than a new command.
10058
10059 2018-02-08 Tom Tromey <tom@tromey.com>
10060
10061 * solib.c (solib_find_1): Use std::string.
10062 (solib_bfd_fopen): Use unique_xmalloc_ptr.
10063
10064 2018-02-08 Tom Tromey <tom@tromey.com>
10065
10066 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
10067
10068 2018-02-08 Tom Tromey <tom@tromey.com>
10069
10070 * source.c (find_source_lines): Use gdb::def_vector.
10071
10072 2018-02-08 Tom Tromey <tom@tromey.com>
10073
10074 * macrocmd.c (struct temporary_macro_definition): New.
10075 (macro_define_command): Use temporary_macro_definition. Remove
10076 cleanups.
10077 (free_macro_definition_ptr): Remove.
10078
10079 2018-02-08 Tom Tromey <tom@tromey.com>
10080
10081 * macroexp.c (maybe_expand): Use std::string.
10082
10083 2018-02-08 Tom Tromey <tom@tromey.com>
10084
10085 * macroexp.c (struct macro_buffer): Add initializers for some
10086 members.
10087 (init_buffer, init_shared_buffer, free_buffer)
10088 (free_buffer_return_text): Remove.
10089 (macro_buffer): New constructors.
10090 (~macro_buffer): New destructor.
10091 (macro_buffer::set_shared): New method.
10092 (macro_buffer::resize_buffer, macro_buffer::appendc)
10093 (macro_buffer::appendmem): Now methods, not free functions.
10094 (set_token, append_tokens_without_splicing, stringify)
10095 (macro_stringify): Update.
10096 (gather_arguments): Change return type. Remove argc_p argument,
10097 add args_ptr argument. Use std::vector.
10098 (substitute_args): Remove argc argument. Accept std::vector.
10099 (expand): Update. Use std::vector.
10100 (scan, macro_expand, macro_expand_next): Update.
10101
10102 2018-02-08 Tom Tromey <tom@tromey.com>
10103
10104 * symtab.c (default_collect_symbol_completion_matches_break_on):
10105 Use unique_xmalloc_ptr.
10106 * macroscope.h: (sal_macro_scope, user_macro_scope)
10107 (default_macro_scope): Return unique_xmalloc_ptr.
10108 * macroscope.c (sal_macro_scope, user_macro_scope)
10109 (default_macro_scope): Return unique_xmalloc_ptr.
10110 * macroexp.h (macro_expand, macro_expand_once): Return
10111 unique_xmalloc_ptr.
10112 * macroexp.c (macro_expand, macro_expand_once): Return
10113 unique_xmalloc_ptr.
10114 * macrocmd.c (macro_expand_command, macro_expand_once_command)
10115 (info_macro_command, info_macros_command): Use
10116 unique_xmalloc_ptr.
10117 * compile/compile-c-support.c (write_macro_definitions): Use
10118 unique_xmalloc_ptr.
10119 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
10120
10121 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
10122
10123 * value.c (value_static_field): Assign field type instead of
10124 containing type when returning an optimized out value.
10125
10126 2018-02-06 Yao Qi <yao.qi@linaro.org>
10127
10128 * ft32-tdep.c (ft32_read_pc): Remove.
10129 (ft32_write_pc): Remove.
10130 (ft32_gdbarch_init): Update.
10131 * m32r-tdep.c (m32r_read_pc): Remove.
10132 (m32r_gdbarch_init): Update.
10133 * mep-tdep.c (mep_read_pc): Remove.
10134 (mep_gdbarch_init): Update.
10135 * microblaze-tdep.c (microblaze_write_pc): Remove.
10136 (microblaze_gdbarch_init): Update.
10137 * mn10300-tdep.c (mn10300_read_pc): Remove.
10138 (mn10300_write_pc): Remove.
10139 (mn10300_gdbarch_init): Update.
10140 * moxie-tdep.c (moxie_read_pc): Remove.
10141 (moxie_write_pc): Remove.
10142 (moxie_gdbarch_init): Update.
10143
10144 2018-02-06 Yao Qi <yao.qi@linaro.org>
10145
10146 * expprint.c (print_subexp_standard): Handle
10147 OP_F77_UNDETERMINED_ARGLIST.
10148 (dump_subexp_body_standard): Likewise.
10149
10150 2018-02-05 Alan Hayward <alan.hayward@arm.com>
10151
10152 * target-descriptions.c (tdesc_element_visitor) Add empty
10153 implementations.
10154 (tdesc_type): Move make_gdb_type from here.
10155 (tdesc_type_builtin): Likewise.
10156 (tdesc_type_vector): Likewise.
10157 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
10158 (make_gdb_type_struct): Move from tdesc_type_with_fields.
10159 (make_gdb_type_union): Likewise.
10160 (make_gdb_type_flags): Likewise.
10161 (make_gdb_type_enum): Likewise.
10162 (make_gdb_type): New function.
10163 (tdesc_register_type): Use static make_gdb_type.
10164
10165 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
10166
10167 * infcmd.c (default_print_one_register_info): Align natural-format
10168 column values consistently one under another.
10169 (pad_to_column): New function.
10170
10171 2018-02-05 Joel Brobecker <brobecker@adacore.com>
10172
10173 * dwarf2read.c (dwarf2_physname): Move commment.
10174
10175 2018-02-01 Leszek Swirski <leszeks@google.com>
10176
10177 * varobj.c (varobj_formatted_print_options): Allow recursive
10178 pretty printing if pretty printing is enabled.
10179
10180 2018-02-01 Leszek Swirski <leszeks@google.com>
10181
10182 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
10183 names after a structop as a filename.
10184
10185 2018-02-01 Yao Qi <yao.qi@linaro.org>
10186
10187 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
10188 (arm_record_coproc_data_proc): Likewise.
10189
10190 2018-02-01 Yao Qi <yao.qi@linaro.org>
10191
10192 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
10193
10194 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
10195
10196 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
10197 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
10198
10199 2018-01-31 Pedro Alves <palves@redhat.com>
10200
10201 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
10202 * inflow.c (child_terminal_save_inferior): Wrap reference to
10203 tcgetpgrp in HAVE_TERMIOS_H.
10204 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
10205 _WIN32.
10206 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
10207 always iterate over all inferiors.
10208 (gdbsim_cntrl_c): Adjust.
10209 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
10210
10211 2018-01-31 Joel Brobecker <brobecker@adacore.com>
10212
10213 * gdbtypes.c (lookup_array_range_type): Make sure the array's
10214 index type is objfile-owned if the element type is as well.
10215
10216 2018-01-31 Joel Brobecker <brobecker@adacore.com>
10217
10218 GDB 8.1 released.
10219
10220 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
10221
10222 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
10223 "features/s390x-linux64.c".
10224 (_initialize_s390_linux_tdep): Remove initialization of tdescs
10225 s390_linux32 and s390x_linux64.
10226 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
10227 default tdesc.
10228 * s390-tdep.c: Include "features/s390-linux32.c" and
10229 "features/s390x-linux64.c".
10230 (s390_tdesc_valid): Add check for tdesc_has_registers.
10231 (s390_gdbarch_init): Make sure there is always a valid tdesc.
10232 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
10233 tdesc_s390x_linux64.
10234 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
10235 tdesc_s390x_linux64 to...
10236 * s390-tdep.h: ...here.
10237
10238 2018-01-30 Pedro Alves <palves@redhat.com>
10239
10240 PR gdb/13211
10241 * config.in, configure: Regenerate.
10242 * configure.ac: Check for getpgid.
10243 * go32-nat.c (go32_pass_ctrlc): New.
10244 (go32_target): Install it.
10245 * inf-child.c (inf_child_target): Install
10246 child_terminal_save_inferior, child_pass_ctrlc and
10247 child_interrupt.
10248 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
10249 (inf_ptrace_target): No longer install it.
10250 * infcmd.c (interrupt_target_1): Adjust.
10251 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
10252 (child_interrupt): Declare.
10253 (inferior::terminal_state): New.
10254 * inflow.c (struct terminal_info): Update comments.
10255 (inferior_process_group): Delete.
10256 (terminal_is_ours): Delete.
10257 (gdb_tty_state): New.
10258 (child_terminal_init): Adjust.
10259 (is_gdb_terminal, sharing_input_terminal_1)
10260 (sharing_input_terminal): New functions.
10261 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
10262 Set the process's actual process group in the foreground if
10263 possible. Handle is_ours_for_output/is_ours distinction. Don't
10264 mark terminal as the inferior's if not sharing GDB's terminal.
10265 Don't check attach_flag.
10266 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
10267 pass down a target_terminal_state.
10268 (child_terminal_save_inferior): New, factored out from ...
10269 (child_terminal_ours_1): ... this. Handle
10270 target_terminal_state::is_ours_for_output.
10271 (child_interrupt, child_pass_ctrlc): New.
10272 (inflow_inferior_exit): Clear the inferior's terminal_state.
10273 (copy_terminal_info): Copy the inferior's terminal state.
10274 (_initialize_inflow): Remove reference to terminal_is_ours.
10275 * inflow.h (inferior_process_group): Delete.
10276 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
10277 * procfs.c (procfs_target): Don't install procfs_interrupt.
10278 (procfs_interrupt): Delete.
10279 * remote.c (remote_serial_quit_handler): Adjust.
10280 (remote_interrupt): Remove ptid parameter. Adjust.
10281 * target-delegates.c: Regenerate.
10282 * target.c: Include "terminal.h".
10283 (target_terminal::terminal_state): Rename to ...
10284 (target_terminal::m_terminal_state): ... this.
10285 (target_terminal::init): Adjust.
10286 (target_terminal::inferior): Adjust to per-inferior
10287 terminal_state.
10288 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
10289 (target_terminal::ours, target_terminal::ours_for_output): Use
10290 target_terminal_is_ours_kind.
10291 (target_interrupt): Remove ptid parameter. Adjust.
10292 (default_target_pass_ctrlc): Adjust.
10293 * target.h (target_ops::to_terminal_save_inferior): New field.
10294 (target_ops::to_interrupt): Remove ptid_t parameter.
10295 (target_interrupt): Remove ptid_t parameter. Update comment.
10296 (target_pass_ctrlc): Update comment.
10297 * target/target.h (target_terminal_state): New scoped enum,
10298 factored out of ...
10299 (target_terminal::terminal_state): ... here.
10300 (target_terminal::inferior): Update comments.
10301 (target_terminal::restore_inferior): New.
10302 (target_terminal::is_inferior, target_terminal::is_ours)
10303 (target_terminal::is_ours_for_output): Adjust.
10304 (target_terminal::scoped_restore_terminal_state): Adjust to
10305 rename, and call restore_inferior() instead of inferior().
10306 (target_terminal::scoped_restore_terminal_state::m_state): Change
10307 type.
10308 (target_terminal::terminal_state): Rename to ...
10309 (target_terminal::m_terminal_state): ... this and change type.
10310
10311 2018-01-30 Pedro Alves <palves@redhat.com>
10312
10313 * linux-nat.c (wait_for_signal): New function.
10314 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
10315 directly.
10316 (async_terminal_is_ours)
10317 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
10318 (linux_nat_add_target): Don't override
10319 to_terminal_inferior/to_terminal_ours.
10320
10321 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
10322
10323 * remote.c (remote_follow_fork): Don't call "detach_inferior".
10324
10325 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
10326
10327 * dwarf2read.c (free_dwo_files): Add forward-declaration.
10328 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
10329 dwarf2_per_objfile_free here.
10330 (dwarf2_per_objfile_free): Remove.
10331 (_initialize_dwarf2_read): Don't register
10332 dwarf2_per_objfile_free as a registry cleanup.
10333
10334 2018-01-27 Eli Zaretskii <eliz@gnu.org>
10335
10336 Avoid compilation errors in MinGW native builds
10337
10338 The error is triggered by including python-internal.h, and the
10339 error message is:
10340
10341 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
10342 from build-gnulib/import/math.h:27,
10343 from d:/usr/Python26/include/pyport.h:235,
10344 from d:/usr/Python26/include/Python.h:58,
10345 from python/python-internal.h:94,
10346 from python/py-arch.c:24:
10347 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
10348 using ::hypot;
10349 ^~~~~
10350
10351 This happens because Python headers define 'hypot' to expand t
10352 '_hypot' in the Windows builds.
10353 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
10354 'hypoth'. This avoids a compilation error.
10355
10356 2018-01-26 Alan Hayward <alan.hayward@arm.com>
10357
10358 * MAINTAINERS (Write After Approval): Fix ordering.
10359
10360 2018-01-26 Alan Hayward <alan.hayward@arm.com>
10361
10362 * MAINTAINERS (Write After Approval): Add Alan Hayward.
10363
10364 2018-01-26 Alan Modra <amodra@gmail.com>
10365
10366 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
10367 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
10368 Remove nop. Make const. Comment.
10369 (powerpc32_plt_stub_so_2): New.
10370 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
10371 Correct count. Update uses.
10372 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
10373 Move common code reading PLT entry word. Correct
10374 powerpc32_plt_stub PLT address calculation.
10375 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
10376 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
10377 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
10378 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
10379 (ppc64_standard_linkage8): Likewise.
10380 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
10381 Correct insns description.
10382 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
10383
10384 2018-01-24 Pedro Alves <palves@redhat.com>
10385
10386 GCC PR libstdc++/83906
10387 * gdbtypes.c (operator==(const dynamic_prop &,
10388 const dynamic_prop &)): New.
10389 (operator==(const range_bounds &, const range_bounds &)): New.
10390 (check_types_equal): Use them instead of memcmp.
10391 * gdbtypes.h (operator==(const dynamic_prop &,
10392 const dynamic_prop &)): Declare.
10393 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
10394 (operator==(const range_bounds &, const range_bounds &)): Declare.
10395 (operator!=(const range_bounds &, const range_bounds &)): Declare.
10396
10397 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10398
10399 * s390-linux-tdep.c (s390_record_address_mask)
10400 (s390_record_calc_disp_common, s390_record_calc_disp)
10401 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10402 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10403 (s390_process_record): Move to s390-tdep.c.
10404 (s390_linux_init_abi_any): Adjust.
10405 * s390-tdep.c (s390_record_address_mask)
10406 (s390_record_calc_disp_common, s390_record_calc_disp)
10407 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10408 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10409 (s390_process_record): Moved from s390-linux-tdep.c
10410 (s390_gdbarch_init): Adjust.
10411
10412 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10413
10414 * s390-linux-nat.c (s390-tdep.h): New include.
10415 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
10416 (HFILES_NO_SRCDIR): Add s390-tdep.h.
10417 (ALLDEPFILES): Add s390-tdep.c.
10418 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
10419 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
10420 * s390-tdep.h: ...this. New file.
10421 * s390-linux-tdep.c (s390-tdep.h): New include.
10422 (_initialize_s390_tdep): Rename to...
10423 (_initialize_s390_linux_tdep): ...this and adjust.
10424 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
10425 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
10426 s390-tdep.h.
10427 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
10428 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
10429 (s390_is_partial_instruction, s390_software_single_step)
10430 (is_non_branch_ril, s390_displaced_step_copy_insn)
10431 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
10432 (s390_prologue_data, s390_addr, s390_store, s390_load)
10433 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
10434 (s390_register_call_saved, s390_guess_tracepoint_registers)
10435 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
10436 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
10437 (s390_pseudo_register_name, s390_pseudo_register_type)
10438 (s390_pseudo_register_read, s390_pseudo_register_write)
10439 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
10440 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
10441 (s390_addr_bits_remove, s390_address_class_type_flags)
10442 (s390_address_class_type_flags_to_name)
10443 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
10444 (s390_function_arg_float, s390_function_arg_vector)
10445 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
10446 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
10447 (s390_frame_align, s390_register_return_value, s390_return_value)
10448 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
10449 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
10450 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
10451 (s390_trad_frame_prev_register, s390_unwind_cache)
10452 (s390_prologue_frame_unwind_cache)
10453 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
10454 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
10455 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
10456 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
10457 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
10458 (s390_frame_base_address, s390_local_base_address)
10459 (s390_frame_base, s390_gcc_target_options)
10460 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
10461 (s390_validate_reg_range, s390_tdesc_valid)
10462 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
10463 * s390-tdep.c: ...this. New file.
10464
10465 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10466
10467 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
10468 (s390_process_record, s390_gdbarch_tdep_alloc)
10469 (s390_linux_init_abi_any): Use/set new hook.
10470
10471 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10472
10473 * s390-linux-tdep.c (osabi.h): New include.
10474 (s390_linux_init_abi_31, s390_linux_init_abi_64)
10475 (s390_linux_init_abi_any): New functions.
10476 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
10477
10478 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10479
10480 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
10481 tdesc_has_registers check
10482
10483 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10484
10485 * s390-linux-tdep.c (s390_tdesc_valid): New function.
10486 (s390_validate_reg_range): New macro.
10487 (s390_gdbarch_init): Adjust.
10488
10489 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10490
10491 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
10492 (s390_gdbarch_tdep_alloc): Adjust.
10493 (s390_gdbarch_init): Adjust.
10494
10495 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10496
10497 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
10498 <have_tdb>: Change type to bool.
10499 (s390_gdbarch_tdep_alloc): Adjust.
10500 (s390_gdbarch_init): Adjust.
10501
10502 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10503
10504 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
10505 (gdbarch_tdep) <have_upper, have_vx>: New fields.
10506 (s390_gdbarch_tdep_alloc): New function.
10507 (s390_gdbarch_init): Allocate tdep at start and use its fields
10508 instead of separate variables.
10509
10510 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10511
10512 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
10513 when looking for cached gdbarch and add comment for remaining.
10514
10515 2018-01-22 Pedro Alves <palves@redhat.com>
10516 Sergio Durigan Junior <sergiodj@redhat.com>
10517
10518 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
10519 case.
10520
10521 2018-01-22 Maciej W. Rozycki <macro@mips.com>
10522
10523 * MAINTAINERS: Update my company e-mail address.
10524
10525 2018-01-22 Yao Qi <yao.qi@linaro.org>
10526
10527 * regcache.c (cooked_write_test): New function.
10528 (_initialize_regcache): Register the test.
10529
10530 2018-01-22 Yao Qi <yao.qi@linaro.org>
10531
10532 * ia64-tdep.c (ia64_pseudo_register_read): Call
10533 regcache->cooked_read instead of regcache_cooked_read_unsigned.
10534 * m32c-tdep.c (m32c_cat_read): Likewise.
10535 (m32c_r3r2r1r0_read): Likewise.
10536 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10537 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10538
10539 2018-01-22 Yao Qi <yao.qi@linaro.org>
10540
10541 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
10542 method raw_read instead of regcache_raw_read.
10543 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10544 * arm-tdep.c (arm_neon_quad_read): Likewise.
10545 * avr-tdep.c (avr_pseudo_register_read): Likewise.
10546 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10547 * frv-tdep.c (frv_pseudo_register_read): Likewise.
10548 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
10549 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10550 (i386_pseudo_register_read_into_value): Likewise.
10551 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10552 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10553 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10554 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
10555 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
10556 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10557 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10558 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10559 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
10560
10561 2018-01-22 Yao Qi <yao.qi@linaro.org>
10562
10563 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
10564 * configure.tgt: Remove target mt.
10565 * mt-tdep.c: Remove.
10566 * regcache.c (cooked_read_test): Remove the check for mt.
10567
10568 2018-01-22 Yao Qi <yao.qi@linaro.org>
10569
10570 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
10571 instead of gdbarch_pseudo_register_read_value.
10572
10573 2018-01-22 Joel Brobecker <brobecker@adacore.com>
10574
10575 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
10576 language is Ada.
10577
10578 2018-01-22 Joel Brobecker <brobecker@adacore.com>
10579
10580 * linespec.c (create_sals_line_offset): Remove code that preserved
10581 the symtab_and_line's line number.
10582
10583 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10584
10585 * varobj.c (varobj_create): Don't set valid_block when creating a
10586 floating varobj.
10587
10588 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10589
10590 * varobj.c (varobj_create): Remove out of date comment.
10591
10592 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10593
10594 PR mi/20395
10595 * ada-exp.y (write_var_from_sym): Pass extra parameter when
10596 updating innermost block.
10597 * parse.c (innermost_block_tracker::update): Take extra type
10598 parameter, and check types match before updating innermost block.
10599 (write_dollar_variable): Update innermost block for registers.
10600 * parser-defs.h (enum innermost_block_tracker_type): New enum.
10601 (innermost_block_tracker::innermost_block_tracker): Initialise
10602 m_types member.
10603 (innermost_block_tracker::reset): Take type parameter.
10604 (innermost_block_tracker::update): Take type parameter, and pass
10605 type through as needed.
10606 (innermost_block_tracker::m_types): New member.
10607 * varobj.c (varobj_create): Pass type when reseting innermost
10608 block.
10609
10610 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10611
10612 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
10613 * ada-lang.c (resolve_subexp): Likewise.
10614 * breakpoint.c (set_breakpoint_condition) Likewise.
10615 (watch_command_1) Likewise.
10616 * c-exp.y (variable): Likewise.
10617 * d-exp.y (PrimaryExpression): Likewise.
10618 * f-exp.y (variable): Likewise.
10619 * go-exp.y (variable): Likewise.
10620 * m2-exp.y (variable): Likewise.
10621 * objfiles.c (objfile::~objfile): Likewise.
10622 * p-exp.y (variable): Likewise.
10623 * parse.c (innermost_block): Change type.
10624 * parser-defs.h (class innermost_block_tracker): New.
10625 (innermost_block): Change to innermost_block_tracker.
10626 * printcmd.c (display_command): Switch to innermost_block API.
10627 (do_one_display): Likewise.
10628 * rust-exp.y (do_one_display): Likewise.
10629 * symfile.c (clear_symtab_users): Likewise.
10630 * varobj.c (varobj_create): Switch to innermost_block API, replace
10631 use of innermost_block with block stored on varobj object.
10632
10633 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10634
10635 * expression.h (innermost_block): Remove declaration.
10636 * varobj.c: Add 'parser-defs.h' include.
10637
10638 2018-01-19 Tom Tromey <tom@tromey.com>
10639
10640 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
10641 symbols in the static and global blocks.
10642
10643 2018-01-19 James Clarke <jrtc27@jrtc27.com>
10644
10645 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
10646 gdb_ptrace.h, and move including gdb_wait.h ...
10647 * nat/linux-ptrace.h: ... to here.
10648
10649 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10650
10651 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
10652 inf_ptrace_detach_success.
10653 (inf_ptrace_detach_success): Add inferior parameter, use it
10654 instead of inferior_ptid, pass it to detach_inferior.
10655 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
10656 parameter.
10657 * inferior.c (detach_inferior): Add overload that takes an
10658 inferior object.
10659 * inferior.h (detach_inferior): Likewise.
10660 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
10661 use inferior_ptid, adjust call to inf_ptrace_detach_success.
10662 * linux-thread-db.c (thread_db_detach): Use inf parameter.
10663
10664 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10665
10666 * target.h (struct target_ops) <to_detach>: Add inferior
10667 parameter.
10668 (target_detach): Likewise.
10669 * target.c (dispose_inferior): Pass inferior down.
10670 (target_detach): Pass inferior down. Assert that it is equal to
10671 the current inferior.
10672 * aix-thread.c (aix_thread_detach): Pass inferior down.
10673 * corefile.c (core_file_command): Pass current_inferior() down.
10674 * corelow.c (core_detach): Add inferior parameter.
10675 * darwin-nat.c (darwin_detach): Likewise.
10676 * gnu-nat.c (gnu_detach): Likewise.
10677 * inf-ptrace.c (inf_ptrace_detach): Likewise.
10678 * infcmd.c (detach_command): Pass current_inferior() down to
10679 target_detach.
10680 * infrun.c (follow_fork_inferior): Pass parent_inf to
10681 target_detach.
10682 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
10683 target_detach.
10684 * linux-nat.c (linux_nat_detach): Add inferior parameter.
10685 * linux-thread-db.c (thread_db_detach): Likewise.
10686 * nto-procfs.c (procfs_detach): Likewise.
10687 * procfs.c (procfs_detach): Likewise.
10688 * record.c (record_detach): Likewise.
10689 * record.h (struct inferior): Forward-declare.
10690 (record_detach): Add inferior parameter.
10691 * remote-sim.c (gdbsim_detach): Likewise.
10692 * remote.c (remote_detach_1): Likewise.
10693 (remote_detach): Likewise.
10694 (extended_remote_detach): Likewise.
10695 * sol-thread.c (sol_thread_detach): Likewise.
10696 * target-debug.h (target_debug_print_inferior_p): New macro.
10697 * target-delegates.c: Re-generate.
10698 * top.c (kill_or_detach): Pass inferior down to target_detach.
10699 * windows-nat.c (windows_detach): Add inferior parameter.
10700
10701 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10702
10703 * target.h (struct target_ops) <to_detach>: Remove args
10704 parameter.
10705 (target_detach): Likewise.
10706 * target.c (dispose_inferior): Adjust.
10707 (target_detach): Remove args parameter, adjust.
10708 * aix-thread.c (aix_thread_detach): Adjust.
10709 * corefile.c (core_file_command): Adjust.
10710 * corelow.c (core_detach): Adjust.
10711 * darwin-nat.c (darwin_detach): Adjust.
10712 * gnu-nat.c (gnu_detach): Adjust.
10713 * inf-ptrace.c (inf_ptrace_detach): Adjust.
10714 * infcmd.c (detach_command): Adjust
10715 * infrun.c (follow_fork_inferior): Adjust.
10716 (handle_vfork_child_exec_or_exit): Adjust.
10717 * linux-fork.c (linux_fork_detach): Remove args parameter.
10718 * linux-fork.h (linux_fork_detach): Likewise.
10719 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
10720 * linux-thread-db.c (thread_db_detach): Likewise.
10721 * nto-procfs.c (procfs_detach): Likewise.
10722 * procfs.c (procfs_detach): Likewise.
10723 (do_detach): Remove signo parameter.
10724 * record.c (record_detach): Remove args parameter.
10725 * record.h (record_detach): Likewise.
10726 * remote-sim.c (gdbsim_detach): Likewise.
10727 * remote.c (remote_detach_1): Likewise.
10728 (remote_detach): Likewise.
10729 (extended_remote_detach): Likewise.
10730 * sol-thread.c (sol_thread_detach): Likewise.
10731 * target-delegates.c: Re-generate.
10732 * top.c (struct qt_args) <args>: Remove field.
10733 (kill_or_detach): Don't pass args.
10734 (quit_force): Don't set args.
10735 * windows-nat.c (windows_detach): Remove args parameter.
10736
10737 2018-01-19 Yao Qi <yao.qi@linaro.org>
10738
10739 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
10740 (arm_linux_init_abi): Install it.
10741
10742 2018-01-19 Yao Qi <yao.qi@linaro.org>
10743
10744 * osabi.c (gdb_osabi_names): Extend the regexp for
10745 arm-linux-gnueabihf.
10746
10747 2018-01-18 Yao Qi <yao.qi@linaro.org>
10748
10749 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
10750 m_abbrevs.
10751 (abbrev_table::add_abbrev): Update.
10752 (abbrev_table::lookup_abbrev): Update.
10753
10754 2018-01-18 Yao Qi <yao.qi@linaro.org>
10755
10756 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
10757
10758 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
10759
10760 * compile/compile.c (compile_to_object): Convert "triplet_rx"
10761 to "std::string".
10762
10763 2018-01-17 Tom Tromey <tom@tromey.com>
10764
10765 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
10766
10767 2018-01-17 Tom Tromey <tom@tromey.com>
10768
10769 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
10770 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
10771 (create_array_type_with_stride): Update.
10772 * dwarf2read.c (set_die_type): Update.
10773
10774 2018-01-17 Tom Tromey <tom@tromey.com>
10775
10776 * dwarf2read.c (delayed_method_info): Remove typedef.
10777 (dwarf2_cu::method_info): Now a std::vector.
10778 (add_to_method_list): Update.
10779 (free_delayed_list): Remove.
10780 (compute_delayed_physnames): Update.
10781 (process_full_comp_unit, process_full_type_unit): Clear the method
10782 list. Remove cleanups.
10783 (psymtab_include_file_name): Add name_holder parameter. Use
10784 unique_xmalloc_ptr.
10785 (dwarf_decode_lines): Update.
10786
10787 2018-01-17 Tom Tromey <tom@tromey.com>
10788 Simon Marchi <simon.marchi@ericsson.com>
10789
10790 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
10791 (dwarf2_per_objfile::free_cached_comp_units)
10792 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10793 (init_cutu_and_read_dies_no_follow): Update.
10794 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
10795 (dwarf2_cu::~dwarf2_cu): New.
10796 (free_heap_comp_unit, free_stack_comp_unit): Remove.
10797 (age_cached_comp_units, free_one_cached_comp_unit): Update.
10798
10799 2018-01-17 Tom Tromey <tom@tromey.com>
10800 Simon Marchi <simon.marchi@ericsson.com>
10801
10802 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
10803 (struct die_reader_specs) <abbrev_table>: New member.
10804 (struct abbrev_table): Add constructor.
10805 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
10806 <abbrev_obstack>: Now an auto_obstack.
10807 (abbrev_table_up): New typedef.
10808 (init_cu_die_reader): Add abbrev_table parameter.
10809 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
10810 Add result_dwo_abbrev_table.
10811 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10812 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
10813 Update.
10814 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
10815 parameter.
10816 (skip_children): Update.
10817 (abbrev_table::alloc_abbrev): Rename from
10818 abbrev_table_alloc_abbrev.
10819 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
10820 (abbrev_table::lookup_abbrev): Rename from
10821 abbrev_table_lookup_abbrev.
10822 (abbrev_table_read_table): Return abbrev_table_up.
10823 (abbrev_table_free, abbrev_table_free_cleanup)
10824 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
10825 (load_partial_dies): Update.
10826
10827 2018-01-17 Tom Tromey <tom@tromey.com>
10828
10829 * dwarf2read.c (dwarf2_compute_name): Update comment.
10830 (read_func_scope, read_variable): Update.
10831 (new_symbol): Remove.
10832 (new_symbol_full): Rename to new_symbol.
10833
10834 2018-01-17 Mike Gulick <mgulick@mathworks.com>
10835
10836 PR gdb/16577
10837 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
10838 a warning instead of throwing an error, set section size to 0 and return
10839 NULL.
10840 * gdb_bfd.h (gdb_bfd_map_section): Update description.
10841
10842 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
10843
10844 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
10845 std::string.
10846 (linux_ptrace_attach_fail_reason_string): Likewise.
10847 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
10848 Likewise.
10849 (linux_ptrace_attach_fail_reason_string): Likewise.
10850 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
10851
10852 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
10853
10854 * linux-nat.c (linux_nat_attach): Remove xstrdup.
10855
10856 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
10857
10858 PR gdb/21559
10859 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
10860 checking for fs_base/gs_base fields in struct user_regs_struct.
10861 * configure: Regenerate.
10862
10863 2018-01-17 Yao Qi <yao.qi@linaro.org>
10864
10865 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
10866 function.
10867 (aarch64_linux_init_abi): Install it to gdbarch hook
10868 gcc_target_options.
10869
10870 2018-01-15 Pedro Alves <palves@redhat.com>
10871
10872 * common/signals-state-save-restore.c
10873 (save_original_signals_state): Fix typos.
10874
10875 2017-01-12 Tom Tromey <tom@tromey.com>
10876 Sergio Durigan Junior <sergiodj@redhat.com>
10877
10878 * Makefile.in (install-only): Install gdb-add-index.
10879
10880 2018-01-12 John Baldwin <jhb@FreeBSD.org>
10881
10882 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
10883
10884 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
10885
10886 * infrun.c (keep_going_pass_signal): Clear step-over info when
10887 insert_breakpoints fails.
10888
10889 2018-01-11 Pedro Alves <palves@redhat.com>
10890
10891 PR gdb/22583
10892 * infrun.c (resume): Rename to ...
10893 (resume_1): ... this.
10894 (resume): Reimplement as wrapper around resume_1.
10895
10896 2018-01-11 Pedro Alves <palves@redhat.com>
10897
10898 PR remote/22597
10899 * remote.c (remote_parse_stop_reply): Default to the last-set
10900 general thread instead of to 'magic_null_ptid'.
10901
10902 2018-01-10 Pedro Alves <palves@redhat.com>
10903
10904 * language.h (language_get_symbol_name_matcher): Rename ...
10905 (get_symbol_name_matcher): ... this.
10906 * language.c (language_get_symbol_name_matcher): Ditto.
10907 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
10908 callers adjusted.
10909
10910 2018-01-10 Pedro Alves <palves@redhat.com>
10911
10912 PR gdb/22670
10913 * dwarf2read.c
10914 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
10915 Adjust to use language_get_symbol_name_matcher instead of
10916 language_defn::la_get_symbol_name_matcher.
10917 * language.c (language_get_symbol_name_matcher): If in Ada mode
10918 and the lookup name is a verbatim match, return Ada's matcher.
10919 * language.h (language_get_symbol_name_matcher): Adjust comment.
10920 (ada_lookup_name_info::verbatim_p):: New method.
10921
10922 2018-01-10 Pedro Alves <palves@redhat.com>
10923
10924 PR gdb/22670
10925 * ada-lang.c (ada_collect_symbol_completion_matches): If the
10926 minsym's language is language_auto or language_cplus, pass down
10927 language_ada instead.
10928 * symtab.c (compare_symbol_name): Don't frob symbol language here.
10929
10930 2018-01-10 Pedro Alves <palves@redhat.com>
10931
10932 PR gdb/22670
10933 * minsyms.c (linkage_name_str): New function.
10934 (iterate_over_minimal_symbols): Use it.
10935
10936 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10937
10938 * NEWS: Document that 'info proc' now works on FreeBSD.
10939
10940 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10941
10942 * configure.ac: Check for kinfo_getfile in libutil.
10943 * configure: Regenerate.
10944 * config.in: Regenerate.
10945 * fbsd-nat.c: Include "fbsd-tdep.h".
10946 (fbsd_fetch_cmdline): New.
10947 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
10948 rather than calling error.
10949 (fbsd_info_proc): New.
10950 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
10951 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
10952 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
10953
10954 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10955
10956 * fbsd-nat.c (struct free_deleter): Remove.
10957 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
10958
10959 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10960
10961 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
10962 NULL for an empty pathname.
10963
10964 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10965
10966 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
10967 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
10968 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
10969 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
10970 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
10971 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
10972 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
10973 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
10974 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
10975 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
10976 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
10977 (fbsd_core_fetch_timeval, fbsd_print_sigset)
10978 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
10979 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
10980 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
10981
10982 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
10983
10984 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
10985 (gnu_xfer_auxv): New function.
10986 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
10987 TARGET_OBJECT_AUXV.
10988
10989 2018-01-08 Yao Qi <yao.qi@linaro.org>
10990 Simon Marchi <simon.marchi@ericsson.com>
10991
10992 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
10993 common/selftest.c.
10994 (COMMON_OBS): Remove selftest.o.
10995 * configure.ac: Append selftest-arch.c and common/selftest.c to
10996 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
10997 * configure: Re-generated.
10998 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
10999 GDB_SELF_TEST.
11000 (maintenance_info_selftests): Likewise.
11001
11002 2018-01-08 Xavier Roirand <roirand@adacore.com>
11003
11004 * ada-valprint.c (val_print_packed_array_elements): Use
11005 proper number of elements when printing an array indexed
11006 by an enumeration type.
11007
11008 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11009
11010 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
11011 (dw2_get_file_names_reader): Adjust.
11012 (lookup_dwo_signatured_type): Adjust.
11013 (lookup_dwp_signatured_type): Adjust.
11014 (lookup_signatured_type): Adjust.
11015 (create_type_unit_group): Adjust.
11016 (get_type_unit_group): Adjust.
11017 (process_psymtab_comp_unit_reader): Adjust.
11018 (build_type_psymtabs_reader): Adjust.
11019 (scan_partial_symbols): Adjust.
11020 (add_partial_symbol): Adjust.
11021 (add_partial_subprogram): Adjust.
11022 (peek_die_abbrev): Adjust.
11023 (fixup_go_packaging): Adjust.
11024 (process_imported_unit_die): Adjust.
11025 (dwarf2_compute_name): Adjust.
11026 (dwarf2_physname): Adjust.
11027 (read_import_statement): Adjust.
11028 (handle_DW_AT_stmt_list): Adjust.
11029 (read_file_scope): Adjust.
11030 (read_func_scope): Adjust.
11031 (read_lexical_block_scope): Adjust.
11032 (read_call_site_scope): Adjust.
11033 (read_variable): Adjust.
11034 (dwarf2_rnglists_process): Adjust.
11035 (dwarf2_ranges_process): Adjust.
11036 (dwarf2_ranges_read): Adjust.
11037 (dwarf2_get_pc_bounds): Adjust.
11038 (dwarf2_record_block_ranges): Adjust.
11039 (dwarf2_add_field): Adjust.
11040 (dwarf2_add_member_fn): Adjust.
11041 (read_structure_type): Adjust.
11042 (process_structure_scope): Adjust.
11043 (read_enumeration_type): Adjust.
11044 (read_array_type): Adjust.
11045 (mark_common_block_symbol_computed): Adjust.
11046 (read_common_block): Adjust.
11047 (read_namespace_type): Adjust.
11048 (read_namespace): Adjust.
11049 (read_module_type): Adjust.
11050 (read_tag_pointer_type): Adjust.
11051 (read_tag_ptr_to_member_type): Adjust.
11052 (read_tag_string_type): Adjust.
11053 (read_subroutine_type): Adjust.
11054 (read_typedef): Adjust.
11055 (read_base_type): Adjust.
11056 (attr_to_dynamic_prop): Adjust.
11057 (read_subrange_type): Adjust.
11058 (read_unspecified_type): Adjust.
11059 (dwarf2_read_abbrevs): Adjust.
11060 (load_partial_dies): Adjust.
11061 (read_partial_die): Adjust.
11062 (find_partial_die): Adjust.
11063 (guess_partial_die_structure_name): Adjust.
11064 (fixup_partial_die): Adjust.
11065 (read_attribute_value): Adjust.
11066 (read_addr_index): Adjust.
11067 (read_addr_index_from_leb128): Adjust.
11068 (read_str_index): Adjust.
11069 (dwarf2_string_attr): Adjust.
11070 (get_debug_line_section): Adjust.
11071 (dwarf_decode_line_header): Adjust.
11072 (lnp_state_machine::check_line_address): Adjust.
11073 (dwarf_decode_lines_1): Adjust.
11074 (dwarf_decode_lines): Adjust.
11075 (dwarf2_start_symtab): Adjust.
11076 (var_decode_location): Adjust.
11077 (new_symbol_full): Adjust.
11078 (dwarf2_const_value_data): Adjust.
11079 (dwarf2_const_value_attr): Adjust.
11080 (dwarf2_const_value): Adjust.
11081 (die_type): Adjust.
11082 (die_containing_type): Adjust.
11083 (build_error_marker_type): Adjust.
11084 (lookup_die_type): Adjust.
11085 (guess_full_die_structure_name): Adjust.
11086 (anonymous_struct_prefix): Adjust.
11087 (determine_prefix): Adjust.
11088 (dwarf2_name): Adjust.
11089 (follow_die_ref_or_sig): Adjust.
11090 (follow_die_offset): Adjust.
11091 (follow_die_ref): Adjust.
11092 (follow_die_sig_1): Adjust.
11093 (follow_die_sig): Adjust.
11094 (get_signatured_type): Adjust.
11095 (get_DW_AT_signature_type): Adjust.
11096 (decode_locdesc): Adjust.
11097 (dwarf_decode_macros): Adjust.
11098 (cu_debug_loc_section): Adjust.
11099 (fill_in_loclist_baton): Adjust.
11100 (dwarf2_symbol_mark_computed): Adjust.
11101 (init_one_comp_unit): Don't assign
11102 dwarf2_cu::dwarf2_per_objfile.
11103 (set_die_type): Adjust.
11104
11105 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11106
11107 * dwarf2read.c (struct mapped_debug_names): Add constructor.
11108 <dwarf2_per_objfile>: New field.
11109 (dwarf2_per_objfile): Remove global.
11110 (get_dwarf2_per_objfile): New function.
11111 (set_dwarf2_per_objfile): New function.
11112 (dwarf2_build_psymtabs_hard): Change objfile parameter to
11113 dwarf2_per_objfile.
11114 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
11115 (read_abbrev_offset): Likewise.
11116 (read_indirect_string): Likewise.
11117 (read_indirect_line_string): Likewise.
11118 (read_indirect_string_at_offset): Likewise.
11119 (read_indirect_string_from_dwz): Likewise.
11120 (dwarf2_find_containing_comp_unit): Change objfile parameter to
11121 dwarf2_per_objfile.
11122 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11123 (create_all_comp_units): Change objfile parameter to
11124 dwarf2_per_objfile.
11125 (create_all_type_units): Likewise.
11126 (process_queue): Add dwarf2_per_objfile parameter.
11127 (read_and_check_comp_unit_head): Likewise.
11128 (lookup_dwo_unit_in_dwp): Likewise.
11129 (get_dwp_file): Likewise.
11130 (process_cu_includes): Likewise.
11131 (struct free_dwo_file_cleanup_data): New struct.
11132 (dwarf2_has_info): Use get_dwarf2_per_objfile and
11133 set_dwarf2_per_objfile.
11134 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
11135 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
11136 context, adjust calls.
11137 (dw2_instantiate_symtab): Likewise.
11138 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
11139 (dw2_get_cu): Likewise.
11140 (create_cu_from_index_list): Change objfile parameter to
11141 dwarf2_per_objfile.
11142 (create_cus_from_index_list): Get dwarf2_per_objfile from
11143 context, adjust calls.
11144 (create_cus_from_index): Likewise.
11145 (create_signatured_type_table_from_index): Change objfile
11146 parameter to dwarf2_per_objfile.
11147 (create_signatured_type_table_from_debug_names): Change objfile
11148 parameter to dwarf2_per_objfile.
11149 (create_addrmap_from_index): Likewise.
11150 (create_addrmap_from_aranges): Likewise.
11151 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
11152 (dw2_setup): Remove.
11153 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
11154 context.
11155 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
11156 get_dwarf2_per_objfile.
11157 (dw2_forget_cached_source_info): Likewise.
11158 (dw2_map_symtabs_matching_filename): Likewise.
11159 (struct dw2_symtab_iterator) <index>: Remove.
11160 <dwarf2_per_objfile>: New field.
11161 (dw2_symtab_iter_init): Replace index parameter with
11162 dwarf2_per_objfile.
11163 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
11164 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
11165 (dw2_print_stats): Likewise.
11166 (dw2_dump): Likewise.
11167 (dw2_expand_symtabs_for_function): Likewise.
11168 (dw2_expand_all_symtabs): Likewise.
11169 (dw2_expand_symtabs_with_fullname): Likewise.
11170 (dw2_expand_marked_cus): Replace index and objfile parameters
11171 with dwarf2_per_objfile.
11172 (dw_expand_symtabs_matching_file_matcher): Add
11173 dwarf2_per_objfile parameter and adjust calls.
11174 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
11175 adjust calls.
11176 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
11177 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
11178 adjust calls.
11179 (create_cus_from_debug_names_list): Replace objfile parameter
11180 with dwarf2_per_objfile and adjust calls.
11181 (create_cus_from_debug_names): Likewise.
11182 (dwarf2_read_debug_names): Likewise.
11183 (mapped_debug_names::namei_to_name): Adjust call.
11184 (dw2_debug_names_iterator::next): Likewise.
11185 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
11186 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
11187 (dw2_debug_names_dump): Likewise.
11188 (dw2_debug_names_expand_symtabs_for_function): Likewise.
11189 (dw2_debug_names_expand_symtabs_matching): Likewise.
11190 (dwarf2_initialize_objfile): Likewise.
11191 (dwarf2_build_psymtabs): Likewise.
11192 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
11193 this_cu.
11194 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
11195 (read_and_check_comp_unit_head): Likewise.
11196 (read_abbrev_offset): Likewise.
11197 (create_debug_type_hash_table): Likewise.
11198 (create_debug_types_hash_table): Likewise.
11199 (create_all_type_units): Replace objfile parameter with
11200 dwarf2_per_objfile.
11201 (add_type_unit): Add dwarf2_per_objfile parameter.
11202 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
11203 with dwarf2_per_objfile.
11204 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
11205 (lookup_dwp_signatured_type): Likewise.
11206 (lookup_signatured_type): Likewise.
11207 (read_cutu_die_from_dwo): Likewise.
11208 (init_tu_and_read_dwo_dies): Likewise.
11209 (init_cutu_and_read_dies): Likewise.
11210 (init_cutu_and_read_dies_no_follow): Likewise.
11211 (allocate_type_unit_groups_table): Add objfile parameter.
11212 (create_type_unit_group): Use dwarf2_per_objfile from cu.
11213 (get_type_unit_group): Likewise.
11214 (process_psymtab_comp_unit): Update call.
11215 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
11216 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
11217 (print_tu_stats): Likewise.
11218 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
11219 in void* parameter.
11220 (build_type_psymtabs): Change objfile parameter to
11221 dwarf2_per_objfile.
11222 (process_skeletonless_type_unit): Use dwarf2_per_objfile
11223 passed in void* parameter.
11224 (process_skeletonless_type_units): Change objfile parameter to
11225 dwarf2_per_objfile.
11226 (set_partial_user): Likewise.
11227 (dwarf2_build_psymtabs_hard): Likewise.
11228 (read_comp_units_from_section): Likewise.
11229 (create_all_comp_units): Likewise.
11230 (scan_partial_symbols): Update calls.
11231 (add_partial_symbol): Likewise.
11232 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
11233 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
11234 (process_queue): Add dwarf2_per_objfile parameter.
11235 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
11236 (compute_compunit_symtab_includes): Likewise.
11237 (process_cu_includes): Add dwarf2_per_objfile parameter.
11238 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
11239 (process_full_type_unit): Likewise.
11240 (process_imported_unit_die): Update call.
11241 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
11242 (read_file_scope): Likewise.
11243 (allocate_dwo_file_hash_table): Add objfile parameter.
11244 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
11245 (create_cus_hash_table): Likewise.
11246 (create_dwp_hash_table): Likewise.
11247 (create_dwo_unit_in_dwp_v1): Likewise.
11248 (create_dwp_v2_section): Likewise.
11249 (create_dwo_unit_in_dwp_v2): Likewise.
11250 (lookup_dwo_unit_in_dwp): Likewise.
11251 (try_open_dwop_file): Likewise.
11252 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
11253 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
11254 cleanup to include a reference to dwarf2_per_objfile.
11255 (open_dwp_file): Add dwarf2_per_objfile parameter.
11256 (open_and_init_dwp_file): Likewise.
11257 (get_dwp_file): Likewise.
11258 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
11259 (queue_and_load_all_dwo_tus): Update call.
11260 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
11261 data.
11262 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
11263 (dwarf2_ranges_process): Likewise.
11264 (dwarf2_get_pc_bounds): Likewise.
11265 (mark_common_block_symbol_computed): Likewise.
11266 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
11267 (dwarf2_read_abbrevs): Update call.
11268 (read_partial_die): Use dwarf2_per_objfile from cu.
11269 (find_partial_die): Likewise.
11270 (fixup_partial_die): Likewise.
11271 (read_attribute_value): Likewise.
11272 (read_indirect_string_at_offset_from): Add objfile parameter.
11273 (read_indirect_string_at_offset): Add dwarf2_per_objfile
11274 parameter.
11275 (read_indirect_string_from_dwz): Add objfile parameter.
11276 (read_indirect_string): Add objfile parameter.
11277 (read_addr_index_1): Add dwarf2_per_objfile parameter.
11278 (read_addr_index): Use dwarf2_per_objfile from cu.
11279 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
11280 call dw2_setup.
11281 (read_str_index): Use dwarf2_per_objfile from cu.
11282 (get_debug_line_section): Likewise.
11283 (read_formatted_entries): Add dwarf2_per_objfile parameter.
11284 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
11285 (new_symbol_full): Use dwarf2_per_objfile from cu.
11286 (build_error_marker_type): Likewise.
11287 (lookup_die_type): Likewise.
11288 (determine_prefix): Likewise.
11289 (follow_die_offset): Likewise.
11290 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
11291 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
11292 (dwarf2_fetch_die_type_sect_off): Likewise.
11293 (dwarf2_get_die_type): Likewise.
11294 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
11295 (get_signatured_type): Likewise.
11296 (get_DW_AT_signature_type): Likewise.
11297 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
11298 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
11299 (cu_debug_loc_section): Likewise.
11300 (fill_in_loclist_baton): Likewise.
11301 (dwarf2_symbol_mark_computed): Likewise.
11302 (dwarf2_find_containing_comp_unit): Change objfile parameter to
11303 dwarf2_per_objfile.
11304 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
11305 parameter.
11306 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11307 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
11308 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
11309 (set_die_type): Use dwarf2_free_objfile from cu.
11310 (get_die_type_at_offset): Likewise.
11311 (dwarf2_per_objfile_free): Don't assign global variable.
11312 (debug_names) <constructor>: Add dwarf2_per_objfile
11313 parameter, update m_debugstrlookup construction.
11314 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
11315 parameter.
11316 <m_dwarf2_per_objfile>: New field.
11317 <lookup>: Use m_dwarf2_per_objfile.
11318 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
11319 (psyms_seen_size): Likewise.
11320 (write_gdbindex): Replace objfile parameter with
11321 dwarf2_per_objfile.
11322 (write_debug_names): Likewise.
11323 (write_psymtabs_to_index): Likewise.
11324 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
11325 calls.
11326
11327 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11328
11329 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
11330 <dwarf2_per_objfile>: New field.
11331 (struct dwarf2_per_cu_data) <objfile>: Remove.
11332 <dwarf2_per_objfile>: New field.
11333 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
11334 of objfile.
11335 (create_signatured_type_table_from_index): Likewise.
11336 (create_debug_type_hash_table): Likewise.
11337 (fill_in_sig_entry_from_dwo_entry): Likewise.
11338 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
11339 (create_type_unit_group): Assign dwarf2_per_objfile instead of
11340 objfile.
11341 (create_partial_symtab): Access objfile through
11342 dwarf2_per_objfile.
11343 (process_psymtab_comp_unit_reader): Likewise.
11344 (read_comp_units_from_section): Likewise.
11345 (scan_partial_symbols): Likewise.
11346 (add_partial_symbol): Likewise.
11347 (add_partial_subprogram): Likewise.
11348 (peek_die_abbrev): Likewise.
11349 (fixup_go_packaging): Likewise.
11350 (process_full_comp_unit): Likewise.
11351 (process_full_type_unit): Likewise.
11352 (process_imported_unit_die): Likewise.
11353 (dwarf2_compute_name): Likewise.
11354 (dwarf2_physname): Likewise.
11355 (read_import_statement): Likewise.
11356 (create_cus_hash_table): Assign dwarf2_physname instead of
11357 objfile.
11358 (read_func_scope): Access objfile through dwarf2_per_objfile.
11359 (read_lexical_block_scope): Likewise.
11360 (read_call_site_scope): Likewise.
11361 (read_variable): Likewise.
11362 (dwarf2_rnglists_process): Likewise.
11363 (dwarf2_ranges_process): Likewise.
11364 (dwarf2_ranges_read): Likewise.
11365 (dwarf2_record_block_ranges): Likewise.
11366 (dwarf2_add_field): Likewise.
11367 (dwarf2_add_member_fn): Likewise.
11368 (read_structure_type): Likewise.
11369 (process_structure_scope): Likewise.
11370 (read_enumeration_type): Likewise.
11371 (read_array_type): Likewise.
11372 (read_common_block): Likewise.
11373 (read_namespace_type): Likewise.
11374 (read_namespace): Likewise.
11375 (read_module_type): Likewise.
11376 (read_tag_pointer_type): Likewise.
11377 (read_tag_ptr_to_member_type): Likewise.
11378 (read_tag_string_type): Likewise.
11379 (read_subroutine_type): Likewise.
11380 (read_typedef): Likewise.
11381 (read_base_type): Likewise.
11382 (attr_to_dynamic_prop): Likewise.
11383 (read_subrange_type): Likewise.
11384 (read_unspecified_type): Likewise.
11385 (load_partial_dies): Likewise.
11386 (read_partial_die): Likewise.
11387 (find_partial_die): Likewise.
11388 (guess_partial_die_structure_name): Likewise.
11389 (fixup_partial_die): Likewise.
11390 (read_attribute_value): Likewise.
11391 (read_addr_index_from_leb128): Likewise.
11392 (dwarf2_read_addr_index): Likewise.
11393 (dwarf2_string_attr): Likewise.
11394 (lnp_state_machine::check_line_address): Likewise.
11395 (dwarf_decode_lines_1): Likewise.
11396 (dwarf_decode_lines): Likewise.
11397 (dwarf2_start_symtab): Likewise.
11398 (var_decode_location): Likewise.
11399 (new_symbol_full): Likewise.
11400 (dwarf2_const_value_data): Likewise.
11401 (dwarf2_const_value_attr): Likewise.
11402 (dwarf2_const_value): Likewise.
11403 (die_type): Likewise.
11404 (die_containing_type): Likewise.
11405 (lookup_die_type): Likewise.
11406 (guess_full_die_structure_name): Likewise.
11407 (anonymous_struct_prefix): Likewise.
11408 (dwarf2_name): Likewise.
11409 (follow_die_ref_or_sig): Likewise.
11410 (follow_die_offset): Likewise.
11411 (follow_die_ref): Likewise.
11412 (dwarf2_fetch_die_loc_sect_off): Likewise.
11413 (dwarf2_fetch_constant_bytes): Likewise.
11414 (dwarf2_fetch_die_type_sect_off): Likewise.
11415 (dwarf2_get_die_type): Likewise.
11416 (follow_die_sig): Likewise.
11417 (decode_locdesc): Likewise.
11418 (dwarf2_per_cu_objfile): Likewise.
11419 (dwarf2_per_cu_text_offset): Likewise.
11420 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
11421 objfile.
11422 (set_die_type): Access objfile through
11423 dwarf2_per_objfile.
11424
11425 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11426
11427 * valprint.c (converted_character_d): Remove typedef.
11428 (DEF_VEC_O (converted_character_d)): Remove.
11429 (count_next_character): Use std::vector.
11430 (print_converted_chars_to_obstack): Likewise.
11431 (generic_printstr): Likewise.
11432
11433 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11434
11435 * xml-support.h (struct gdb_xml_value): Add constructor.
11436 <value>: Change type to unique_xmalloc_ptr.
11437 (gdb_xml_value_s): Remove typedef.
11438 (DEF_VEC_O (gdb_xml_value_s)): Remove.
11439 (gdb_xml_element_start_handler): Change parameter type to
11440 std::vector.
11441 (xml_find_attribute): Likewise.
11442 * xml-support.c (xml_find_attribute): Change parameter type to
11443 std::vector and adjust.
11444 (gdb_xml_values_cleanup): Remove.
11445 (gdb_xml_parser::start_element): Adjust to std::vector.
11446 (xinclude_start_include): Change paraeter type to std::vector
11447 and adjust.
11448 * btrace.c (check_xml_btrace_version): Likewise.
11449 (parse_xml_btrace_block): Likewise.
11450 (parse_xml_btrace_pt_config_cpu): Likewise.
11451 (parse_xml_btrace_pt): Likewise.
11452 (parse_xml_btrace_conf_bts): Likewise.
11453 (parse_xml_btrace_conf_pt): Likewise.
11454 * memory-map.c (memory_map_start_memory): Likewise.
11455 (memory_map_start_property): Likewise.
11456 * osdata.c (osdata_start_osdata): Likewise.
11457 (osdata_start_item): Likewise.
11458 (osdata_start_column): Likewise.
11459 * remote.c (start_thread): Likewise.
11460 * solib-aix.c (library_list_start_library): Likewise.
11461 (library_list_start_list): Likewise.
11462 * solib-svr4.c (library_list_start_library): Likewise.
11463 (svr4_library_list_start_list): Likewise.
11464 * solib-target.c (library_list_start_segment): Likewise.
11465 (library_list_start_section): Likewise.
11466 (library_list_start_library): Likewise.
11467 (library_list_start_list): Likewise.
11468 * tracepoint.c (traceframe_info_start_memory): Likewise.
11469 (traceframe_info_start_tvar): Likewise.
11470 * xml-syscall.c (syscall_start_syscall): Likewise.
11471 * xml-tdesc.c (tdesc_start_target): Likewise.
11472 (tdesc_start_feature): Likewise.
11473 (tdesc_start_reg): Likewise.
11474 (tdesc_start_union): Likewise.
11475 (tdesc_start_struct): Likewise.
11476 (tdesc_start_flags): Likewise.
11477 (tdesc_start_enum): Likewise.
11478 (tdesc_start_field): Likewise.
11479 (tdesc_start_enum_value): Likewise.
11480 (tdesc_start_vector): Likewise.
11481
11482 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11483
11484 * extension.h (struct xmethod_worker) <clone>: Remove.
11485 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
11486 Remove.
11487 (python_xmethod_worker::clone): Remove.
11488 * valops.c (find_overload_match): Use std::move instead of
11489 clone.
11490
11491 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11492
11493 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
11494 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
11495 <free_xmethod_worker_data>: Remove.
11496 <get_matching_xmethod_workers>: Chance VEC to std::vector.
11497 <get_xmethod_arg_types>: Remove.
11498 <get_xmethod_result_type>: Remove.
11499 <invoke_xmethod>: Remove.
11500 * extension.c (new_xmethod_worker): Remove.
11501 (clone_xmethod_worker): Remove.
11502 (get_matching_xmethod_workers): Return void, pass std::vector by
11503 pointer.
11504 (get_xmethod_arg_types): Rename to...
11505 (xmethod_worker::get_arg_types): ... this, and adjust.
11506 (get_xmethod_result_type): Rename to...
11507 (xmethod_worker::get_result_type): ... this, and adjust.
11508 (invoke_xmethod): Remove.
11509 (free_xmethod_worker): Remove.
11510 (free_xmethod_worker_vec): Remove.
11511 * extension.h (enum ext_lang_rc): Move here from
11512 extension-priv.h.
11513 (struct xmethod_worker): Add constructor and destructor.
11514 <data>: Remove.
11515 <value>: Remove.
11516 <invoke, clone, do_get_result_type, do_get_arg_types>: New
11517 virtual pure methods.
11518 <get_arg_types, get_result_type>: New methods.
11519 (xmethod_worker_ptr): Remove typedef.
11520 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
11521 (xmethod_worker_vec): Remove typedef.
11522 (xmethod_worker_up): New typedef.
11523 (invoke_xmethod): Remove.
11524 (clone_xmethod_worker): Remove.
11525 (free_xmethod_worker): Remove.
11526 (free_xmethod_worker_vec): Remove.
11527 (get_xmethod_arg_types): Remove.
11528 (get_xmethod_result_type): Remove.
11529 * valops.c (find_method_list): Use std::vector, don't use
11530 intermediate vector.
11531 (value_find_oload_method_list): Use std::vector.
11532 (find_overload_match): Use std::vector.
11533 (find_oload_champ): Use std::vector.
11534 * value.c (value_free): Use operator delete.
11535 (value_of_xmethod): Rename to...
11536 (value_from_xmethod): ... this. Don't assign
11537 xmethod_worker::value, take rvalue-reference.
11538 (result_type_of_xmethod): Adjust.
11539 (call_xmethod): Adjust.
11540 * value.h: Include extension.h.
11541 (struct xmethod_worker): Don't forward-declare.
11542 (value_of_xmethod): Rename to...
11543 (value_from_xmethod): ... this, take rvalue-reference.
11544 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
11545 (struct python_xmethod_worker): ... this, add constructor and
11546 destructor.
11547 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
11548 (gdbpy_free_xmethod_worker_data): Rename to...
11549 (python_xmethod_worker::~python_xmethod_worker): ... this and
11550 adjust.
11551 (gdbpy_clone_xmethod_worker_data): Rename to...
11552 (python_xmethod_worker::clone): ... this and adjust.
11553 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
11554 temporary vector.
11555 (gdbpy_get_xmethod_arg_types): Rename to...
11556 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
11557 (gdbpy_get_xmethod_result_type): Rename to...
11558 (python_xmethod_worker::do_get_result_type): ... this and
11559 adjust.
11560 (gdbpy_invoke_xmethod): Rename to...
11561 (python_xmethod_worker::invoke): ... this and adjust.
11562 (new_python_xmethod_worker): Rename to...
11563 (python_xmethod_worker::python_xmethod_worker): ... this and
11564 adjust.
11565 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
11566 Remove.
11567 (gdbpy_free_xmethod_worker_data): Remove.
11568 (gdbpy_get_matching_xmethod_workers): Use std::vector.
11569 (gdbpy_get_xmethod_arg_types): Remove.
11570 (gdbpy_get_xmethod_result_type): Remove.
11571 (gdbpy_invoke_xmethod): Remove.
11572 * python/python.c (python_extension_ops): Remove obsolete
11573 callbacks.
11574
11575 2018-01-05 Pedro Alves <palves@redhat.com>
11576
11577 PR gdb/18653
11578 * common/signals-state-save-restore.c
11579 (save_original_signals_state): New parameter 'quiet'. Warn if we
11580 find a custom handler preinstalled, instead of internal erroring.
11581 But only warn if !quiet.
11582 * common/signals-state-save-restore.h
11583 (save_original_signals_state): New parameter 'quiet'.
11584 * main.c (captured_main_1): Move save_original_signals_state call
11585 after option handling, and pass QUIET.
11586
11587 2018-01-05 Pedro Alves <palves@redhat.com>
11588
11589 * spu-tdep.c (spu_catch_start): Pass
11590 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
11591
11592 2018-01-05 Pedro Alves <palves@redhat.com>
11593
11594 PR gdb/22670
11595 * ada-lang.c (literal_symbol_name_matcher): New function.
11596 (ada_get_symbol_name_matcher): Use it for
11597 symbol_name_match_type::SEARCH_NAME.
11598 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
11599 it down instead of assuming symbol_name_match_type::FULL.
11600 * block.h (block_lookup_symbol): New parameter 'match_type'.
11601 * c-valprint.c (print_unpacked_pointer): Use
11602 lookup_symbol_search_name instead of lookup_symbol.
11603 * compile/compile-object-load.c (get_out_value_type): Pass down
11604 symbol_name_match_type::SEARCH_NAME.
11605 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
11606 symbol_name_match_type::FULL.
11607 * cp-support.c (cp_get_symbol_name_matcher): Handle
11608 symbol_name_match_type::SEARCH_NAME.
11609 * infrun.c (insert_exception_resume_breakpoint): Use
11610 lookup_symbol_search_name.
11611 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
11612 * psymtab.c (maintenance_check_psymtabs): Use
11613 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
11614 * stack.c (print_frame_args): Use lookup_symbol_search_name and
11615 SYMBOL_SEARCH_NAME.
11616 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
11617 if symbol_name_match_type::SEARCH_NAME.
11618 (lookup_symbol_in_language): Pass down
11619 symbol_name_match_type::FULL.
11620 (lookup_symbol_search_name): New.
11621 (lookup_language_this): Pass down
11622 symbol_name_match_type::SEARCH_NAME.
11623 (lookup_symbol_aux, lookup_local_symbol): New parameter
11624 'match_type'. Pass it down.
11625 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
11626 (lookup_symbol_search_name): New declaration.
11627 (lookup_symbol_in_block): New 'match_type' parameter.
11628
11629 2018-01-05 Pedro Alves <palves@redhat.com>
11630
11631 PR gdb/22670
11632 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
11633 ada_lookup_symbol.
11634 (ada_lookup_symbol): Reimplement in terms of
11635 ada_lookup_symbol_list, bits factored out from
11636 ada_lookup_encoded_symbol.
11637
11638 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11639
11640 * ada-exp.y (write_object_renaming): When subscripting an array
11641 using a symbol as the index, pass the block in call to
11642 ada_lookup_encoded_symbol when looking that symbol up.
11643
11644 2018-01-05 Jerome Guitton <guitton@adacore.com>
11645
11646 * ada-lang.c (ada_array_length): Use ada_index_type instead of
11647 TYPE_INDEX_TYPE.
11648
11649 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11650
11651 * ada-lang.c (ada_to_fixed_value_create): Add handling of
11652 the case where VALUE_LVAL (val0) is not lval_memory.
11653
11654 2018-01-05 Xavier Roirand <roirand@adacore.com>
11655
11656 * ada-valprint.c (print_optional_low_bound): Handle
11657 character-indexed array printing like boolean-indexed array
11658 printing.
11659
11660 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11661
11662 * NEWS: Create a new section for the next release branch.
11663 Rename the section of the current branch, now that it has
11664 been cut.
11665
11666 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11667
11668 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
11669 * version.in: Bump version to 8.1.50.DATE-git.
11670
11671 2018-01-03 Xavier Roirand <roirand@adacore.com>
11672
11673 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
11674 Add field.
11675 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
11676 Add field.
11677 (default_exception_support_info) <catch_handlers_sym>: Add field.
11678 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
11679 (ada_exception_name_addr_1): Add "catch handlers" handling.
11680 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
11681 Update all callers.
11682 (create_excep_cond_exprs) <ex>: Add parameter.
11683 (re_set_exception): Update create_excep_cond_exprs call.
11684 (print_it_exception, print_one_exception, print_mention_exception)
11685 (print_recreate_exception): Add "catch handler" handling.
11686 (allocate_location_catch_handlers, re_set_catch_handlers)
11687 (check_status_catch_handlers, print_it_catch_handlers)
11688 (print_one_catch_handlers, print_mention_catch_handlers)
11689 (print_recreate_catch_handlers): New function.
11690 (catch_handlers_breakpoint_ops): New variable.
11691 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
11692 Add parameter. Add "catch handler" handling.
11693 (ada_exception_sym_name, ada_exception_breakpoint_ops):
11694 Add "catch handler" handling.
11695 (ada_exception_catchpoint_cond_string): Add "catch handler"
11696 handling.
11697 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
11698 call.
11699 (catch_ada_handlers_command): New function.
11700 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
11701 operations structure.
11702 (_initialize_ada_language): Add "catch handlers" command entry.
11703 * NEWS: Document "catch handlers" feature.
11704
11705 2018-01-02 Joel Brobecker <brobecker@adacore.com>
11706
11707 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
11708 account when creating the array type of the slice.
11709 (ada_value_slice): Likewise.
11710
11711 2018-01-02 Joel Brobecker <brobecker@adacore.com>
11712
11713 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
11714 New enum value.
11715 (create_array_type_with_stride): Add byte_stride_prop parameter.
11716 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
11717 New parameter. Update all callers in this file.
11718 (array_type_has_dynamic_stride): New function.
11719 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
11720 of arrays with dynamic byte strides.
11721 * dwarf2read.c (read_array_type): Add support for dynamic
11722 DW_AT_byte_stride attributes.
11723
11724 2018-01-02 Joel Brobecker <brobecker@adacore.com>
11725
11726 * dwarf2read.c (read_unspecified_type): Treat
11727 DW_TAG_enumeration_type DIEs from Ada units as stubs.
11728
11729 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11730
11731 Update copyright year range in all GDB files.
11732
11733 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11734
11735 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
11736 and gdb/testsuite/gdb.base/step-line.c.
11737
11738 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11739
11740 * copyright.py (main): Dump the contents of
11741 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
11742 even if BY_HAND is empty.
11743
11744 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11745
11746 * top.c (print_gdb_version): Update Copyright year in version
11747 message.
11748
11749 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11750
11751 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
11752
11753 For older changes see ChangeLog-2017.
11754 \f
11755 Local Variables:
11756 mode: change-log
11757 left-margin: 8
11758 fill-column: 74
11759 version-control: never
11760 coding: utf-8
11761 End: