Replace xstrvprintf usages with string_vprintf
[binutils-gdb.git] / gdb / ChangeLog
1 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2
3 * guile/scm-string.c (gdbscm_scm_from_printf): Use
4 string_vprintf.
5 * guile/scm-utils.c (gdbscm_printf): Likewise.
6 * serial.c (serial_printf): Likewise.
7 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
8
9 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
10
11 * stack.c (print_frame): Print frame architecture when printing on
12 an MI output.
13 * NEWS: Mention new "arch" attribute in frame output.
14
15 2018-08-21 Alan Hayward <alan.hayward@arm.com>
16
17 * arch/aarch64.h (aarch64_regnum): Update comment.
18
19 2018-08-21 Alan Hayward <alan.hayward@arm.com>
20
21 * NEWS: Add SVE to 8.2 section.
22
23 2018-08-21 Pedro Alves <palves@redhat.com>
24
25 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
26 out from gdbscm_parse_function_args.
27 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
28 gdbscm_parse_function_args_1.
29
30 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
31
32 PR gdb/17816
33 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
34 operator.
35
36 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
37
38 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
39
40 2018-08-19 Michael Spang <spang@google.com>
41
42 PR gdb/11786
43 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
44 for PT_TLS segments.
45
46 2018-08-18 Kevin Buettner <kevinb@redhat.com>
47
48 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
49 dwarf_variable_value.
50 * dwarf2-frame.c (class dwarf_expr_executor):
51 Add override for dwarf_variable_value.
52 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
53 (class symbol_needs_eval_context): Likewise.
54 (indirect_synthetic_pointer): Add forward declaration.
55 (sect_variable_value): New function.
56 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
57 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
58 for DW_OP_GNU_variable_value.
59
60 2018-08-16 Tom Tromey <tom@tromey.com>
61
62 * top.c (read_command_file): Update.
63 (command_line_input): Remove "repeat" argument.
64 * ada-lang.c (get_selections): Update.
65 * linespec.c (decode_line_2): Update.
66 * defs.h (command_line_input): Remove argument.
67 * cli/cli-script.c (read_next_line): Update.
68 * python/py-gdb-readline.c: Update.
69
70 2018-08-17 Tom Tromey <tom@tromey.com>
71
72 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
73 command_line_input.
74
75 2018-08-15 Tom Tromey <tom@tromey.com>
76
77 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
78
79 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
80
81 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
82 If used, use find_pc_partial_function to find address range
83 to disassemble.
84 * mi/mi-main.c (mi_cmd_list_features): Report
85 "data-disassemble-a-option" feature.
86 * NEWS: Mention new -data-disassemble option -a.
87
88 2018-08-13 Tom Tromey <tom@tromey.com>
89
90 * common/common-defs.h (_FORTIFY_SOURCE): Define.
91
92 2018-08-13 Alan Hayward <alan.hayward@arm.com>
93
94 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
95 (aarch64_linux_collect_sve_regset): Likewise.
96 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
97 * regcache.h (regcache_map_entry_size): New function.
98
99 2018-08-13 Alan Hayward <alan.hayward@arm.com>
100
101 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
102 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
103 (SVE_HEADER_VL_LENGTH): Likewise.
104 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
105 (SVE_HEADER_FLAGS_LENGTH): Likewise.
106 (SVE_HEADER_RESERVED_LENGTH): Likewise.
107 (SVE_HEADER_SIZE_OFFSET): Likewise.
108 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
109 (SVE_HEADER_VL_OFFSET): Likewise.
110 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
111 (SVE_HEADER_FLAGS_OFFSET): Likewise.
112 (SVE_HEADER_RESERVED_OFFSET): Likewise.
113 (SVE_HEADER_SIZE): Likewise.
114 (aarch64_linux_core_read_vq): Add function.
115 (aarch64_linux_core_read_description): Check for SVE section.
116
117 2018-08-13 Alan Hayward <alan.hayward@arm.com>
118
119 * aarch64-fbsd-tdep.c
120 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
121 collect_size.
122 * aarch64-linux-tdep.c
123 (aarch64_linux_iterate_over_regset_sections): Likewise.
124 * alpha-linux-tdep.c
125 (alpha_linux_iterate_over_regset_sections):
126 * alpha-nbsd-tdep.c
127 (alphanbsd_iterate_over_regset_sections): Likewise.
128 * amd64-fbsd-tdep.c
129 (amd64fbsd_iterate_over_regset_sections): Likewise.
130 * amd64-linux-tdep.c
131 (amd64_linux_iterate_over_regset_sections): Likewise.
132 * arm-bsd-tdep.c
133 (armbsd_iterate_over_regset_sections): Likewise.
134 * arm-fbsd-tdep.c
135 (arm_fbsd_iterate_over_regset_sections): Likewise.
136 * arm-linux-tdep.c
137 (arm_linux_iterate_over_regset_sections): Likewise.
138 * corelow.c (get_core_registers_cb): Likewise.
139 (core_target::fetch_registers): Likewise.
140 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
141 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
142 * gdbarch.h (void): Regenerate.
143 * gdbarch.sh: Add supply_size and collect_size.
144 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
145 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
146 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
147 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
148 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
149 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
150 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
151 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
152 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
153 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
154 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
155 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
156 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
157 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
158 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
159 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
160 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
161 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
162 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
163 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
164 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
165 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
166 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
167 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
168 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
169 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
170 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
171 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
172 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
173 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
174
175 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
176
177 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
178 with string_printf.
179
180 2018-08-10 Keith Seitz <keiths@redhat.com>
181
182 * compile/compile-c-support.c (add_code_header, add_code_footer):
183 Move into policy class.
184 (c_push_user_expression, pop_user_expression_nop)
185 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
186 (compile_program): New host class.
187 (c_compile_program): New typedef.
188 (c_compute_porgram): Use c_compile_program.
189
190 2018-08-10 Keith Seitz <keiths@redhat.com>
191
192 * compile/compile-internal.h (compile_instance::~compile_instance):
193 Remove calls to htab_delete.
194 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
195 * compile.c (compile_instance::compile_instance): Initialize
196 htab unique pointers.
197 (compile_instance::get_cached_type, compile_instance::insert_type)
198 (compile_instance::error_symbol_once): Update for unique_ptr.
199
200 2018-08-10 Keith Seitz <keiths@redhat.com>
201
202 * compile/compile-c-symbols.c (struct symbol_error)
203 (hash_symbol_error, eq_symbol_error, del_symbol_error)
204 (compile_instance::insert_symbol_error)
205 (compile_instance::error_symbol_once): Move to ...
206 * compile/compile.c: ... here.
207
208 2018-08-10 Keith Seitz <keiths@redhat.com>
209
210 * compile/compile-c-support.c (c_get_compile_context): Use `new'
211 instead of `new_compile_instance'.
212 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
213 Update description.
214 If the symbol error map is not initialized, create it.
215 (generate_c_for_for_one_symbol): Do not check/initialize
216 the symbol error map.
217 * compile/compile-c-types.c (compile_c_instance): Make a class.
218 Update all callers.
219 (compile_instance::compile_instance): Initialize the type cache.
220 (get_cached_type): New function.
221 (insert_type): Update description.
222 (compile_c_instance::m_default_cflags): Define.
223 (convert_type): Update description. Use get_cached_type.
224 (delete_instance): Moved to destructor.
225 (new_compile_instance): Moved to constructor.
226 * compile/compile-c.h (compile_c_instance): Make class inheriting
227 from compile_instance.
228 <base>: Remove field.
229 <type_map, symbol_err_map>: Move to base class.
230 <c_plugin>: Rename to `m_plugin' and remove pointer type.
231 * compile/compile-internal.h (compile_instance): Make class.
232 <type_map_t, symbol_err_map_t>: Define.
233 <fe>: Rename to `m_gcc_fe'.
234 <scope, block, gcc_target_options>: Add `m_' prefix.
235 <m_type_map, m_symbol_err_map>: New fields, moved from
236 compile_c_instance.
237 <destroy>: Remove.
238 (convert_type, new_compile_instance): Remove.
239 * compile/compile.c (cleanup_compile_instance): Remove.
240 (compile_to_object): Use unique_ptr to eliminate cleanups.
241 (compile_instance::set_print_callback, compile_instance::version)
242 (compile_instance::set_verbose)
243 (compile_instance::set_driver_filename)
244 (compile_instance::set_triplet_regexp)
245 (compile_instance::set_arguments)
246 (compile_instance::set_source_file)
247 (compile_instance::compile): Define.
248
249 2018-08-10 Keith Seitz <keiths@redhat.com>
250
251 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
252 * compile/compile-c-types.c: Define GCC_METHODN macros and include
253 gcc-c-fe.def to define C plugin.
254 (delete_instance): Delete `c_plugin'.
255 (new_compile_instance): Initialize `c_plugin'.
256 * compile/compile-c.h: Include gcc_c_plugin.h.
257 (struct compile_c_instance) <c_plugin>: New member.
258 * gcc-c-plugin.h: New file.
259 Update all callers with API change.
260
261 2018-08-10 Keith Seitz <keiths@redhat.com>
262
263 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
264 (HFILES_NO_SRCDIR): ... to here.
265 Add compile-internal.h and compile-c.h.
266 * compile/compile-c-support.c: Include compile-c.h.
267 * compile/compile-c-symbols.c: Include compile-c.h.
268 (generate_c_for_variable_locations): Update comment.
269 * compile/compile-c-types.c: Include compile-c.h.
270 * compile/compile-c.h: New file -- moved C language declarations
271 from other files here.
272 * compile/compile-internal.h: Do not include hashtab.h or
273 common/enum-flags.h.
274 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
275 (gcc_convert_symbol, gcc_symbol_address)
276 (generate_c_for_variable_locations, c_get_mode_for_size)
277 (c_get_range_decl_name): Definitions moved to compile-c.h.
278 * compile/compile-loc2c.c: Include compile-c.h.
279
280 2018-08-10 Keith Seitz <keiths@redhat.com>
281
282 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
283 (c_symbol_substitution_name): ... this.
284 Update all callers.
285
286 2018-08-10 Keith Seitz <keiths@redhat.com>
287
288 * compile/compile-c-support.c (c_compute_program): Use
289 unique_xmalloc_ptr to eliminate cleanup.
290 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
291 Return a unique_xmalloc_ptr and eliminate cleanup.
292 * compile/compile-internal.h (generate_c_for_variable_locations):
293 Return unique_xmalloc_ptr and update description.
294
295 2018-08-10 Alan Hayward <alan.hayward@arm.com>
296
297 * corelow.c (core_target::get_core_register_section): Rename
298 min_size to section_min_size.
299
300 2018-08-09 Jim Wilson <jimw@sifive.com>
301
302 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
303 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
304 * NEWS: Mention new GNU/Linux RISC-V target.
305 * configure.host: Add riscv*-*-linux*.
306 * configure.nat: Add riscv*.
307 * configure.tgt: Add riscv*-*-linux*.
308 * riscv-linux-nat.c: New file.
309 * riscv-linux-tdep.c: New file.
310
311 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
312
313 * infrun.c (resume): Make static, add forward declaration.
314 (proceed): Update header comment.
315 * infrun.h (resume): Delete declaration.
316
317 2018-08-09 Tom Tromey <tom@tromey.com>
318
319 * riscv-tdep.h: Minor formatting fixes.
320
321 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
322
323 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
324 * dwarf-index-cache.c (create_dir_and_check): Likewise.
325 (test_mkdir_recursive): Likewise.
326 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
327
328 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
329
330 * valarith.c (value_subscripted_rvalue): If an array is not in
331 memory, and we don't know the upper bound, then we can't know that
332 the requested element exists or not.
333
334 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
335
336 * target.c (str_comma_list_concat_elem): Fix typo in comment.
337 (target_options_to_string): Add comment.
338
339 2018-08-08 Tom Tromey <tom@tromey.com>
340
341 * unittests/scoped_mmap-selftests.c: Check result of "write".
342
343 2018-08-08 Jim Wilson <jimw@sifive.com>
344
345 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
346 (decode_register_index_short): New.
347 (decode_j_type_insn, decode_cj_type_insn): New.
348 (decode_b_type_insn, decode_cb_type_insn): New.
349 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
350 local xlen. Check xlen when decoding ambiguous compressed insns. In
351 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
352 is_c_sw_insn instead of is_sw_insn.
353 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
354 (riscv_software_single_step): New.
355 * riscv-tdep.h (riscv_software_single_step): Declare.
356
357 * riscv-tdep.c (riscv_isa_xlen): Drop static.
358 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
359
360 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
361
362 PR gdb/18050:
363 * target.c (dispose_inferior): Don't dispose of inferiors that are
364 already killed.
365
366 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
367
368 * remote.c (remote_target::download_tracepoint): Change char* to
369 const char*.
370
371 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
372
373 * target.h (target_options_to_string): Return an std::string.
374 * target.c (str_comma_list_concat_elem): Return void, use
375 std::string.
376 (do_option): Likewise.
377 (target_options_to_string): Return an std::string.
378 * linux-nat.c (linux_nat_target::wait): Adjust.
379 * target-debug.h (target_debug_print_options): Adjust.
380
381 2018-08-07 Tom Tromey <tom@tromey.com>
382
383 * Makefile.in (CPPFLAGS): New variable.
384 (INTERNAL_CPPFLAGS): Use it.
385
386 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
387
388 * NEWS: Mention the index cache.
389
390 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
391
392 * common/pathstuff.h (get_standard_cache_dir): New.
393 * common/pathstuff.c (get_standard_cache_dir): New.
394 * build-id.h (build_id_to_string): New.
395 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
396 DEBUG_STR_SUFFIX): Move to here.
397 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
398 DEBUG_STR_SUFFIX): Move from there.
399 (write_psymtabs_to_index): Make non-static, add basename
400 parameter. Write to temporary files, rename when done.
401 (save_gdb_index_command): Adjust call to
402 write_psymtabs_to_index.
403 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
404 field.
405 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
406 (get_gdb_index_contents_from_cache): New.
407 (get_gdb_index_contents_from_cache_dwz): New.
408 (dwarf2_initialize_objfile): Read index from cache.
409 (dwarf2_build_psymtabs): Save to index.
410 * dwarf-index-cache.h: New file.
411 * dwarf-index-cache.c: New file.
412 * dwarf-index-write.h: New file.
413
414 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
415
416 * gnulib/aclocal.m4: Re-generate.
417 * gnulib/config.in: Re-generate.
418 * gnulib/configure: Re-generate.
419 * gnulib/import/Makefile.am: Re-generate.
420 * gnulib/import/Makefile.in: Re-generate.
421 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
422 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
423 * gnulib/import/m4/mkdir.m4: New file.
424 * gnulib/import/mkdir.c: New file.
425 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
426 module.
427
428 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
429
430 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
431 * common/scoped_mmap.c: New file.
432 * common/scoped_mmap.h (destroy): New method.
433 (~scoped_mmap, reset): Use destroy.
434 (scoped_mmap): New move constructor.
435 (mmap_file): New declaration.
436 * unittests/scoped_mmap-selftests.c (test_normal,
437 test_invalid_filename, run_tests): New functions.
438 (_initialize_scoped_mmap_selftests): Register selftest.
439
440 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
441
442 * dwarf2read.c (read_gdb_index_from_section): Rename to...
443 (read_gdb_index_from_buffer): ... this. Remove section
444 parameter, add buffer parameter.
445 (get_gdb_index_contents_ftype,
446 get_gdb_index_contents_dwz_ftype): New typedefs.
447 (dwarf2_read_gdb_index): Add callback parameters to get the
448 index contents.
449 (get_gdb_index_contents_from_section): New.
450 (dwarf2_initialize_objfile): Update call to
451 dwarf2_read_gdb_index.
452
453 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
454
455 * common/filestuff.h (gdb_fopen_cloexec): New overload.
456 (gdb_open_cloexec): Likewise.
457 * nat/linux-osdata.c (command_from_pid): Use string_printf.
458 (commandline_from_pid): Likewise.
459 (linux_xfer_osdata_threads): Likewise.
460 (linux_xfer_osdata_fds): Likewise.
461 * ada-lang.c (is_package_name): Likewise.
462 * auxv.c (procfs_xfer_auxv): Likewise.
463 * breakpoint.c (print_one_breakpoint_location): Use
464 uiout::field_fmt.
465 (print_one_catch_solib): Use string_printf.
466 * coff-pe-read.c (add_pe_exported_sym): Likewise.
467 (add_pe_forwarded_sym): Likewise.
468 * dwarf2read.c (create_type_unit_group): Likewise.
469 (build_error_marker_type): Likewise.
470 * infcall.c (get_function_name): Likewise.
471 * valprint.c (print_converted_chars_to_obstack): Likewise.
472 * xtensa-tdep.c (xtensa_register_type): Likewise.
473
474 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
475
476 * remote.c (remote_target::download_tracepoint): Fix format
477 string errors.
478
479 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
480
481 * tracefile.c: Include common/byte-vector.h.
482 (trace_save): Change type of buf to gdb::byte_vector. Initialize
483 with trace_regblock_size if needed. Update uses of buf.
484
485 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
486
487 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
488 std::vector<unsigned char>.
489 * tracepoint.c (collection_list::collection_list): Remove
490 m_regs_mask initializer from initializer list. Resize
491 m_regs_mask using the largest remote register number.
492 (collection_list::add_remote_register): Remove size check on
493 m_regs_mask. Use at to access element.
494 (collection_list::stringify): Change type of temp_buf to
495 gdb::char_vector. Update uses of temp_buf. Resize if needed to
496 stringify the register mask. Use pack_hex_byte for the register
497 mask.
498
499 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
500
501 * tracepoint.h (class collection_list) <add_register>: Remove.
502 <add_remote_register, add_ax_registers, add_local_register>:
503 Declare.
504 <add_memrange>: Add scope parameter.
505 * tracepoint.c (encode_actions_1): Likewise.
506 (collection_list::add_register): Rename to ...
507 (collection_list::add_remote_register): ... this. Update
508 comment.
509 (collection_list::add_ax_registers, add_local_register): New
510 methods.
511 (collection_list::add_memrange): Add scope parameter. Call
512 add_local_register instead of add_register.
513 (finalize_tracepoint_aexpr): New function.
514 (collection_list::collect_symbol): Update calls to add_memrange.
515 Call add_local_register instead of add_register. Call
516 add_ax_registers. Call finalize_tracepoint_aexpr.
517 (encode_actions_1): Get remote regnos for $reg action. Call
518 add_remote_register, add_ax_registers, and add_local_register.
519 Update call to add_memrange. Call finalize_tracepoint_aexpr.
520 (validate_actionline): Call finalize_tracepoint_aexpr.
521
522 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
523
524 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
525 Replace array buf with gdb::char_vector buf, of size
526 get_remote_packet_size (). Replace references to buf and
527 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
528 and xsnprintf with snprintf. Raise errors if the buffer is too
529 small.
530
531 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
532
533 * remote.c (remote_target::download_tracepoint): Fix the has_more
534 predicate in the QTDP action list iteration.
535
536 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
537
538 * remote.c (remote_target::download_tracepoint): Fix indentation
539 in for block.
540
541 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
542
543 * proc-api.c (_initialize_proc_api): Remove c, unused.
544 * procfs.c (procfs_init_inferior): Remove signals, unused.
545 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
546 unused.
547
548 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
549 Andrew Burgess <andrew.burgess@embecosm.com>
550
551 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
552 'W_STOPCODE (0)' as this could be ambiguous.
553
554 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
555
556 * ser-tcp.c (net_open): Fix thinko when deciding whether to
557 disable TCP's Nagle algorithm (use "ai_protocol" instead of
558 "ai_socktype").
559
560 2018-08-02 Tom Tromey <tom@tromey.com>
561
562 PR symtab/16842.
563 * dwarf2read.c (read_func_scope): Set symtab on template parameter
564 symbols.
565 (process_structure_scope): Likewise.
566
567 2018-08-02 Xavier Roirand <roirand@adacore.com>
568
569 PR gdb/22629:
570 * darwin-nat.c (darwin_kill_inferior): Fix handling of
571 kill inferior.
572
573 2018-08-02 Tom Tromey <tom@tromey.com>
574
575 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
576 (darwin_suspend_inferior, darwin_resume_inferior)
577 (darwin_decode_notify_message, darwin_resume_inferior_threads)
578 (darwin_check_new_threads): Check result of get_darwin_inferior.
579
580 2018-07-31 Joel Brobecker <brobecker@adacore.com>
581
582 GDB 8.1.1 released.
583
584 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
585
586 * varobj.c (varobj_get_path_expr_parent): Report an error if
587 parent is a dynamic varobj.
588
589 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
590
591 * gnulib/aclocal.m4: Re-generate.
592 * gnulib/config.in: Re-generate.
593 * gnulib/configure: Re-generate.
594 * gnulib/import/Makefile.in: Re-generate.
595 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
596 * gnulib/import/m4/onceonly.m4: Re-generate.
597
598 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
599
600 * target-descriptions.c (struct xml_test_tdesc): New.
601 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
602 (record_xml_tdesc): Update.
603 (maintenance_check_xml_descriptions): Update.
604 * target-descriptions.h (record_xml_tdesc): Update comment.
605
606 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
607
608 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
609 checking array bounds are defined.
610
611 2018-07-30 Tom Tromey <tom@tromey.com>
612
613 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
614 irreflexivity violation.
615
616 2018-07-30 Tom Tromey <tom@tromey.com>
617
618 * cli/cli-decode.c (lookup_cmd): Remove lint code.
619 * value.c (unpack_long): Remove lint code.
620 * valops.c (value_ind): Remove lint code.
621 * valarith.c (value_x_binop, value_x_unop, value_equal)
622 (value_pos): Remove lint code.
623
624 2018-07-28 Tom de Vries <tdevries@suse.de>
625
626 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
627 with undefined upper bound as <optimized out>.
628
629 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
630
631 * gcore.in: Rename variable "name" to "prefix". Expand
632 "usage" text.
633
634 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
635
636 * windows-nat.c (windows_nat_target::create_inferior): Update to
637 call close() in global namespace.
638
639 2018-07-26 Tom Tromey <tom@tromey.com>
640
641 * dwarf-index-write.c (add_address_entry): Don't add objfile
642 offsets.
643 * dbxread.c (find_stab_function): Rename from
644 find_stab_function_addr. Return a bound_minimal_symbol.
645 (read_dbx_symtab): Use raw_text_low, raw_text_high.
646 Don't add objfile offsets.
647 (end_psymtab): Use raw_text_low, raw_text_high,
648 MSYMBOL_VALUE_RAW_ADDRESS.
649 (read_ofile_symtab): Update.
650 (process_one_symbol): Update.
651 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
652 offsets.
653 (dw2_relocate): Remove.
654 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
655 searching addrmap.
656 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
657 Update.
658 (process_psymtab_comp_unit_reader, add_partial_symbol)
659 (add_partial_subprogram, dwarf2_ranges_read): Update.
660 (load_partial_dies): Update.
661 (add_address_entry): Don't add objfile offsets.
662 (dwarf2_build_include_psymtabs): Update.
663 (create_addrmap_from_aranges): Don't add objfile offsets.
664 (dw2_find_pc_sect_compunit_symtab): Update.
665 * mdebugread.c (parse_symbol): Don't add objfile offsets.
666 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
667 Update.
668 (parse_partial_symbols): Don't add objfile offsets. Use
669 raw_text_low, raw_text_high. Update.
670 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
671 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
672 or call 'relocate' quick function. Clear psymbol_map.
673 * psympriv.h (struct partial_symbol) <address>: Add section
674 offset.
675 <set_unrelocated_address>: Rename from set_address.
676 <raw_text_low, raw_text_high>: New methods.
677 <text_low, text_high>: Add objfile parameter.
678 (add_psymbol_to_bcache): Add 'section' parameter. Call
679 set_unrelocated_address.
680 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
681 (find_pc_psymbol): Update.
682 (fixup_psymbol_section, relocate_psymtabs): Remove.
683 (dump_psymtab, psym_functions): Update.
684 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
685 parameter.
686 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
687 (start_psymtab_common): Update.
688 * symfile-debug.c (debug_qf_relocate): Remove.
689 (debug_sym_quick_functions): Update.
690 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
691 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
692 Update.
693
694 2018-07-26 Tom Tromey <tromey@redhat.com>
695
696 * dbxread.c (end_psymtab): Use text_high_valid and
697 text_low_valid.
698 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
699 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
700 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
701 Update comment.
702 <text_low_valid, text_high_valid>: New fields.
703 <set_text_low, set_text_high>: Update.
704 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
705
706 2018-07-26 Tom Tromey <tom@tromey.com>
707
708 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
709 Update.
710 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
711 textlow and texthigh fields.
712 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
713 Update.
714 * mdebugread.c (parse_lines, parse_partial_symbols)
715 (psymtab_to_symtab_1): Update.
716 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
717 Rename fields. Update comment. Now private.
718 <text_low, text_high, set_text_low, set_text_high>: New methods.
719 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
720 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
721 (start_psymtab_common, maintenance_info_psymtabs)
722 (maintenance_check_psymtabs): Update.
723 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
724 texthigh fields.
725 (scan_xcoff_symtab): Update.
726
727 2018-07-26 Tom Tromey <tromey@redhat.com>
728
729 * psympriv.h (struct partial_symbol) <unrelocated_address,
730 address, set_address>: New methods.
731 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
732 (fixup_psymbol_section, relocate_psymtabs): Update.
733 (print_partial_symbols): Add 'objfile' parameter. Update.
734 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
735 Update.
736
737 2018-07-26 Tom Tromey <tom@tromey.com>
738
739 * dwarf-index-write.c (write_psymbols, debug_names::insert)
740 (debug_names::write_psymbols): Update.
741 * psympriv.h (struct partial_symbol): Derive from
742 general_symbol_info.
743 <obj_section>: New method.
744 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
745 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
746 (find_pc_sect_psymbol, fixup_psymbol_section)
747 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
748 (print_partial_symbols, recursively_search_psymtabs)
749 (compare_psymbols, psymbol_hash, psymbol_compare)
750 (add_psymbol_to_bcache, maintenance_check_psymtabs)
751 (psymbol_name_matches, psym_fill_psymbol_map): Update.
752
753 2018-07-26 Tom Tromey <tromey@redhat.com>
754
755 * dbxread.c (end_psymtab): Remove dead code.
756
757 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
758
759 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
760 DWARF unwinders are disabled.
761 * dwarf2-frame.c: Add dwarf2read.h include.
762 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
763 disabled.
764 (dwarf2_frame_unwinders_enabled_p): Define.
765 (show_dwarf_unwinders_enabled_p): New function.
766 (_initialize_dwarf2_frame): Register switch to control DWARF
767 unwinder use.
768 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
769 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
770 (show_dwarf_cmdlist): Remove static keyword.
771 * dwarf2read.h (set_dwarf_cmdlist): Declare.
772 (show_dwarf_cmdlist): Declare.
773 * NEWS: Document new feature.
774
775 2018-07-26 Tom de Vries <tdevries@suse.de>
776
777 PR breakpoints/23366
778 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
779
780 2018-07-26 Tom de Vries <tdevries@suse.de>
781
782 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
783 DW_AT_count can't be translated to a dynamic prop.
784
785 2018-07-25 Tom de Vries <tdevries@suse.de>
786
787 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
788 try/catch.
789
790 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
791
792 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
793
794 2018-07-25 Joel Brobecker <brobecker@adacore.com>
795
796 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
797
798 2018-07-24 Keith Seitz <keiths@redhat.comt
799
800 PR symtab/23010
801 * dwarf2read.c (dw2_add_symbol_to_list): New function.
802 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
803 instead of add_symbol_to_list.
804 (read_file_scope): Call prepare_one_comp_unit before reading
805 any other DIEs.
806
807 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
808
809 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
810
811 2018-07-24 Tom Tromey <tom@tromey.com>
812
813 * utils.c (malloc, realloc, free): Don't declare.
814 * configure, config.in: Rebuild.
815 * configure.ac: Don't check for declarations of free, malloc, or
816 realloc.
817
818 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
819
820 * aarch64-linux-nat.c
821 (aarch64_linux_nat_target::stopped_data_address): Remove unused
822 variable.
823 * arm-linux-nat.c (fetch_regs): Likewise.
824 (store_regs): Likewise.
825 (fetch_vfp_regs): Likewise.
826 (store_vfp_regs): Likewise.
827 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
828 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
829 (arm_linux_nat_target::insert_watchpoint): Likewise.
830 (arm_linux_nat_target::remove_watchpoint): Likewise.
831 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
832 Likewise.
833 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
834 Likewise.
835 * ppc-linux-nat.c (fetch_register): Likewise.
836 (fetch_all_gp_regs): Likewise.
837 (fetch_ppc_registers): Likewise.
838 (store_all_gp_regs): Likewise.
839 (store_ppc_registers): Likewise.
840 (hwdebug_insert_point): Likewise.
841 (can_use_watchpoint_cond_accel): Likewise.
842 * remote-sim.c (gdb_os_write_stdout): Likewise.
843
844 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
845 Tom Tromey <tom@tromey.com>
846
847 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
848 test for it.
849 * configure: Rebuild.
850
851 2018-07-22 Tom Tromey <tom@tromey.com>
852
853 * regformats/regdat.sh: Define xmltarget_${name} inside
854 #ifndef IN_PROCESS_AGENT.
855
856 2018-07-22 Tom Tromey <tom@tromey.com>
857
858 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
859
860 2018-07-22 Tom Tromey <tom@tromey.com>
861
862 * symfile.c (reread_symbols): Notify iter, not objfile.
863
864 2018-07-22 Tom Tromey <tom@tromey.com>
865
866 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
867 Use arch_ops.
868 (ravenscar_thread_target::prepare_to_store): Likewise.
869
870 2018-07-22 Tom Tromey <tom@tromey.com>
871
872 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
873 unused variable. Call value_fetch_lazy when needed.
874 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
875 Remove unused variable. Call value_fetch_lazy when needed.
876
877 2018-07-22 Tom Tromey <tom@tromey.com>
878
879 * m32c-tdep.c (mark_dma): Return void.
880 (make_regs): Remove unused declarations.
881
882 2018-07-22 Tom Tromey <tom@tromey.com>
883
884 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
885 cmdscm_get_valid_command_smob_arg_unsafe for effect.
886 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
887 bkscm_get_valid_block_smob_arg_unsafe for effect.
888
889 2018-07-22 Tom Tromey <tom@tromey.com>
890
891 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
892 value_type.
893
894 2018-07-22 Tom Tromey <tom@tromey.com>
895
896 * windows-nat.c (saved_context): Conditionally define.
897 * remote.c (remote_target::remote_btrace_maybe_reopen):
898 Conditionally declare "warned".
899 * inflow.c (sigquit_ours): Conditionally define.
900 (new_tty): Move "tty" declaration inside #if.
901 * guile/guile.c (guile_datadir): Conditionally define.
902 * charset.c (set_be_le_names): Move some declarations inside #if.
903 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
904 #if.
905 (parse_xml_btrace_conf): Likewise.
906
907 2018-07-22 Tom Tromey <tom@tromey.com>
908
909 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
910
911 2018-07-22 Tom Tromey <tom@tromey.com>
912
913 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
914 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
915 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
916 * buildsym-legacy.c (get_macro_table): Remove unused variable.
917 * stack.c (frame_apply_level_command): Remove unused variable.
918 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
919 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
920 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
921 unused variable.
922 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
923 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
924 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
925 variable.
926 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
927 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
928 variable.
929 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
930 Remove unused variable.
931 * cli/cli-script.c (recurse_read_control_structure): Remove unused
932 variable.
933 * common/tdesc.c (print_xml_feature::visit): Remove unused
934 variable.
935 * compile/compile-object-load.c (store_regs): Remove unused
936 variables.
937 * complaints.c (clear_complaints): Remove unused variable.
938 * corelow.c (core_target_open): Remove unused variable.
939 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
940 variable.
941 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
942 variable.
943 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
944 variable.
945 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
946 variable.
947 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
948 variable.
949 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
950 variable.
951 * ia64-tdep.c (examine_prologue): Remove unused variable.
952 * infcall.c (run_inferior_call): Remove unused variable.
953 * inferior.c (exit_inferior): Remove unused variable.
954 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
955 * linespec.c (decode_line_2): Remove unused variable.
956 * linux-nat.c (super_close): Remove.
957 * linux-tdep.c (linux_info_proc): Remove unused variable.
958 * mi/mi-main.c (mi_execute_command): Remove unused variable.
959 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
960 Remove unused variable.
961 * parse.c (find_minsym_type_and_address): Remove unused variable.
962 * printcmd.c (info_symbol_command, printf_floating): Remove unused
963 variable.
964 * python/py-breakpoint.c (bppy_set_commands): Remove unused
965 variable.
966 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
967 variables.
968 * record-btrace.c (record_btrace_target::store_registers): Remove
969 unused variable.
970 (cmd_show_record_btrace_cpu): Remove unused variable.
971 * riscv-tdep.c (riscv_register_reggroup_p)
972 (riscv_push_dummy_call, riscv_return_value): Remove unused
973 variable.
974 * rust-exp.y (literal): Remove unused variable.
975 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
976 unused variable.
977 <STRUCTOP_ANONYMOUS>: Likewise.
978 * s390-linux-tdep.c (s390_linux_init_abi_31)
979 (s390_linux_init_abi_64): Remove unused variable.
980 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
981 (file_select_thread, net_windows_open, _initialize_ser_windows):
982 Remove unused variables.
983 * symtab.c (find_pc_sect_line): Remove unused variable.
984 * target-memory.c (compute_garbled_blocks): Remove unused
985 variable.
986 (target_write_memory_blocks): Remove unused variable.
987 * target.c (target_stack::unpush): Remove unused variables.
988 * tracepoint.c (start_tracing, all_tracepoint_actions)
989 (merge_uploaded_trace_state_variables)
990 (print_one_static_tracepoint_marker): Remove unused variable.
991 * unittests/basic_string_view/element_access/char/1.cc (test01):
992 Remove unused variable.
993 * windows-nat.c (windows_continue, windows_add_all_dlls)
994 (do_initial_windows_stuff, windows_nat_target::create_inferior):
995 Remove unused variables.
996
997 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
998
999 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
1000 attr_profile in HAVE_ELF.
1001 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
1002 HAVE_ELF.
1003
1004 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
1005
1006 * frame.c (frame_register_unwind): Change parameter name.
1007 (frame_unwind_register): Likewise.
1008 (frame_unwind_register_value): Likewise.
1009 (frame_unwind_register_signed): Likewise.
1010 (frame_unwind_register_unsigned): Likewise.
1011 * frame.h (frame_register_unwind): Likewise.
1012 (frame_unwind_register): Likewise.
1013 (frame_unwind_register_value): Likewise.
1014 (frame_unwind_register_signed): Likewise.
1015 (frame_unwind_register_unsigned): Likewise.
1016 (frame_unwind_arch): Likewise.
1017
1018 2018-07-20 Maciej W. Rozycki <macro@mips.com>
1019
1020 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
1021 ISA maintenance.
1022
1023 2018-07-20 Maciej W. Rozycki <macro@mips.com>
1024
1025 * mips-linux-nat.c (mips_linux_nat_target::read_description):
1026 Call `get_ptrace_pid' rather than extracting the ptrace PID by
1027 hand.
1028
1029 2018-07-20 Keith Seitz <keiths@redhat.com>
1030
1031 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
1032 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
1033 m_compunit_symtab, m_language>: Add "m_" prefix.
1034 Update all uses.
1035 * buildsym.c: Update all uses.
1036
1037 2018-07-20 Tom Tromey <tom@tromey.com>
1038
1039 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
1040 * buildsym.h (record_line_ftype): Remove typedef.
1041
1042 2018-07-20 Tom Tromey <tom@tromey.com>
1043
1044 * buildsym-legacy.h (augment_type_symtab): Don't declare.
1045 (end_expandable_symtab): Likewise.
1046 (end_symtab_get_static_block): Likewise.
1047 (end_symtab_from_static_block): Likewise.
1048 * buildsym-legacy.c (augment_type_symtab): Remove.
1049 (end_expandable_symtab): Remove.
1050 (end_symtab_get_static_block): Remove.
1051 (end_symtab_from_static_block): Remove.
1052
1053 2018-07-20 Tom Tromey <tom@tromey.com>
1054
1055 * dwarf2read.c: Include buildsym.h.
1056 (struct dwarf2_cu) <builder>: New method.
1057 (fixup_go_packaging): Update.
1058 (process_full_comp_unit, process_full_type_unit): Update. Don't
1059 use scoped_free_pendings.
1060 (using_directives): Add "cu" parameter, remove "language".
1061 (read_import_statement, setup_type_unit_groups, )
1062 (read_func_scope, read_lexical_block_scope)
1063 (dwarf2_record_block_ranges, read_namespace): Update.
1064 (lnp_state_machine::lnp_state_machine): Add cu parameter.
1065 (lnp_state_machine::handle_end_sequence): Update.
1066 (class lnp_state_machine) <m_cu>: New member.
1067 <m_record_line_callback>: Remove.
1068 <m_currently_recording_lines>: New member.
1069 (lnp_state_machine::handle_set_file): Update.
1070 (noop_record_line): Remove.
1071 (dwarf_record_line_p): Add cu parameter.
1072 (dwarf_record_line_1, dwarf_finish_line): Likewise.
1073 (lnp_state_machine::record_line)
1074 (lnp_state_machine::lnp_state_machine)
1075 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
1076 (dwarf_decode_lines): Update.
1077 (dwarf2_start_subfile): Add cu parameter.
1078 (dwarf2_start_symtab, new_symbol): Update.
1079 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
1080 Remove dwarf2_per_objfile parameter.
1081 (dwarf_decode_macros): Update.
1082
1083 2018-07-20 Tom Tromey <tom@tromey.com>
1084
1085 * stabsread.c (define_symbol): Update.
1086 * buildsym-legacy.h (get_buildsym_compunit): Declare.
1087 * dwarf2read.c (new_symbol): Update.
1088 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
1089 * cp-namespace.c: Include buildsym.h.
1090 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
1091 * buildsym-legacy.c (get_buildsym_compunit): New function.
1092
1093 2018-07-20 Tom Tromey <tom@tromey.com>
1094
1095 * xcoffread.c: Include buildsym-legacy.h.
1096 * windows-nat.c: Include buildsym-legacy.h.
1097 * stabsread.c: Include buildsym-legacy.h.
1098 * mdebugread.c: Include buildsym-legacy.h.
1099 * buildsym-legacy.h: New file.
1100 * buildsym-legacy.c: New file, from buildsym.c.
1101 * go32-nat.c: Include buildsym-legacy.h.
1102 * dwarf2read.c: Include buildsym-legacy.h.
1103 * dbxread.c: Include buildsym-legacy.h.
1104 * cp-namespace.c: Include buildsym-legacy.h.
1105 * coffread.c: Include buildsym-legacy.h.
1106 * buildsym.h: Move some contents to buildsym-legacy.h.
1107 * buildsym.c: Include buildsym-legacy.h. Move many functions to
1108 buildsym-legacy.c.
1109 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
1110
1111 2018-07-20 Tom Tromey <tom@tromey.com>
1112
1113 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
1114 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
1115 (buildsym_compunit::buildsym_compunit)
1116 (buildsym_compunit::~buildsym_compunit)
1117 (buildsym_compunit::get_macro_table): Define.
1118
1119 2018-07-20 Tom Tromey <tom@tromey.com>
1120
1121 * buildsym.c (reset_symtab_globals): Remove.
1122 (buildsym_compunit::end_symtab_from_static_block): Update.
1123 (buildsym_compunit::augment_type_symtab): Update.
1124 (end_symtab_from_static_block): Call free_buildsym_compunit.
1125 (augment_type_symtab, end_symtab, end_expandable_symtab):
1126 Likewise.
1127
1128 2018-07-20 Tom Tromey <tom@tromey.com>
1129
1130 * arch-utils.c: Do not include buildsym.h.
1131 * mipsread.c: Do not include buildsym.h.
1132 * machoread.c: Do not include buildsym.h.
1133 * elfread.c: Do not include buildsym.h.
1134
1135 2018-07-20 Tom Tromey <tom@tromey.com>
1136
1137 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
1138 initialization.
1139 (buildsym_compunit): Add new constructor.
1140 (struct buildsym_compunit) <get_last_source_file, finish_block,
1141 record_block_range, start_subfile, patch_subfile_names,
1142 push_subfile, pop_subfile, record_line, get_compunit_symtab,
1143 set_last_source_start_addr, get_last_source_start_addr,
1144 get_local_using_directives, set_local_using_directives,
1145 get_global_using_directives, outermost_context_p,
1146 get_current_context_stack, get_context_stack_depth,
1147 get_current_subfile, get_local_symbols, get_file_symbols,
1148 get_global_symbols, record_debugformat, record_producer,
1149 push_context, pop_context, end_symtab_get_static_block,
1150 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
1151 New public methods.
1152 <record_pending_block, finish_block_internal, make_blockvector,
1153 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
1154 private methods.
1155 Update all users.
1156
1157 2018-05-22 Tom Tromey <tom@tromey.com>
1158
1159 * buildsym.c (record_pending_block): Move earlier. Remove objfile
1160 parameter.
1161 (finish_block_internal): Update.
1162
1163 2018-07-20 Tom Tromey <tom@tromey.com>
1164
1165 * buildsym.c (record_pending_block): Move earlier. Remove objfile
1166 parameter.
1167 (finish_block_internal): Update.
1168
1169 2018-07-20 Tom Tromey <tom@tromey.com>
1170
1171 * buildsym.h (EXTERN): Don't define or undef.
1172 * buildsym.c (EXTERN): Don't define.
1173
1174 2018-07-20 Tom Tromey <tom@tromey.com>
1175
1176 * buildsym.c: Remove TODO comment.
1177
1178 2018-07-20 Tom Tromey <tom@tromey.com>
1179
1180 * coffread.c (coff_symtab_read): Update.
1181 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
1182 (xcoff_new_init): Update.
1183 * mipsread.c (mipscoff_new_init): Update.
1184 * mdebugread.c (mdebug_build_psymtabs): Update.
1185 * elfread.c (elf_new_init): Update.
1186 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1187 Update.
1188 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
1189 (coffstab_build_psymtabs, elfstab_build_psymtabs)
1190 (stabsect_build_psymtabs): Update.
1191 * buildsym.h (buildsym_init): Don't declare.
1192 * buildsym.c: Update comment.
1193 (prepare_for_building): Remove.
1194 (start_symtab, restart_symtab): Update.
1195 (reset_symtab_globals): Update comment.
1196 (buildsym_init): Remove.
1197
1198 2018-07-20 Tom Tromey <tom@tromey.com>
1199
1200 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
1201 * stabsread.c (patch_block_stabs, define_symbol, read_type)
1202 (read_enum_type, common_block_start, common_block_end)
1203 (cleanup_undefined_types_1, finish_global_stabs): Update.
1204 * mdebugread.c (psymtab_to_symtab_1): Update.
1205 * dwarf2read.c (fixup_go_packaging, read_func_scope)
1206 (read_lexical_block_scope, new_symbol): Update.
1207 * dbxread.c (process_one_symbol): Update.
1208 * coffread.c (coff_symtab_read, process_coff_symbol)
1209 (coff_read_enum_type): Update.
1210 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
1211 declare.
1212 (get_local_symbols, get_file_symbols, get_global_symbols): New
1213 functions.
1214 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
1215 m_global_symbols.
1216 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
1217 (~scoped_free_pendings): Update.
1218 (finish_block, prepare_for_building, reset_symtab_globals)
1219 (end_symtab_get_static_block, end_symtab_with_blockvector)
1220 (augment_type_symtab, push_context): Update.
1221 (get_local_symbols, get_file_symbols, get_global_symbols): New
1222 functions.
1223 (buildsym_init): Update.
1224
1225 2018-07-20 Tom Tromey <tom@tromey.com>
1226
1227 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
1228 (process_full_type_unit): Likewise.
1229 (dwarf2_start_symtab): Set list_in_scope.
1230
1231 2018-07-20 Tom Tromey <tom@tromey.com>
1232
1233 * dwarf2read.c (process_psymtab_comp_unit_reader)
1234 (build_type_psymtabs_reader): Do not set list_in_scope.
1235
1236 2018-07-20 Tom Tromey <tom@tromey.com>
1237
1238 * buildsym.c (free_pendings): Remove.
1239 (add_symbol_to_list, scoped_free_pendings)
1240 (finish_block_internal, buildsym_init): Update.
1241
1242 2018-07-20 Tom Tromey <tom@tromey.com>
1243
1244 * xcoffread.c (read_xcoff_symtab): Update.
1245 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
1246 Update.
1247 * dbxread.c (process_one_symbol): Update.
1248 * coffread.c (coff_symtab_read): Update.
1249 * buildsym.h (finish_block): Update.
1250 * buildsym.c (finish_block): Remove "listhead" argument.
1251 (end_symtab_get_static_block): Update.
1252
1253 2018-07-20 Tom Tromey <tom@tromey.com>
1254
1255 * buildsym.h (class scoped_free_pendings): Remove constructor.
1256 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
1257 method.
1258 <m_pending_block_obstack, m_pending_blocks>: New members.
1259 (pending_block_obstack, pending_blocks): Remove.
1260 (scoped_free_pendings::scoped_free_pendings): Default.
1261 (~scoped_free_pendings): Update.
1262 (free_pending_blocks): Remove.
1263 (finish_block_internal, record_pending_block, make_blockvector)
1264 (end_symtab_get_static_block, augment_type_symtab, push_context)
1265 (buildsym_init): Update.
1266
1267 2018-07-20 Tom Tromey <tom@tromey.com>
1268
1269 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
1270 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
1271 members.
1272 (pending_addrmap, pending_addrmap_obstack)
1273 (pending_addrmap_interesting): Remove.
1274 (scoped_free_pendings, record_block_range, make_blockvector)
1275 (prepare_for_building, reset_symtab_globals, buildsym_init):
1276 Update.
1277
1278 2018-07-20 Tom Tromey <tom@tromey.com>
1279
1280 * xcoffread.c (process_linenos): Update.
1281 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
1282 * mdebugread.c (psymtab_to_symtab_1): Update.
1283 * dwarf2read.c (setup_type_unit_groups)
1284 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
1285 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
1286 * dbxread.c (process_one_symbol): Update.
1287 * coffread.c (coff_symtab_read, enter_linenos)
1288 (process_coff_symbol): Update.
1289 * buildsym.h (current_subfile): Don't declare.
1290 (get_current_subfile): Declare.
1291 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
1292 member.
1293 (start_subfile, free_buildsym_compunit, push_subfile)
1294 (prepare_for_building, start_symtab): Update.
1295 (get_current_subfile): New function.
1296
1297 2018-07-20 Tom Tromey <tom@tromey.com>
1298
1299 * coffread.c (coff_symtab_read): Update.
1300 * xcoffread.c (read_xcoff_symtab): Update.
1301 * dwarf2read.c (new_symbol): Update.
1302 (read_func_scope, read_lexical_block_scope): Update.
1303 * dbxread.c (process_one_symbol): Update.
1304 * buildsym.h (context_stack, context_stack_depth): Don't declare.
1305 (outermost_context_p): Remove macro.
1306 (outermost_context_p, get_current_context_stack)
1307 (get_context_stack_depth): Declare.
1308 (pop_context): Return struct context_stack.
1309 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
1310 member.
1311 (context_stack_size): Remove.
1312 (INITIAL_CONTEXT_STACK_SIZE): Remove.
1313 (prepare_for_building, end_symtab_get_static_block)
1314 (augment_type_symtab, push_context): Update.
1315 (pop_context): Return struct context_stack.
1316 (outermost_context_p, get_current_context_stack)
1317 (get_context_stack_depth): New functions.
1318 (buildsym_init): Update.
1319
1320 2018-07-20 Tom Tromey <tom@tromey.com>
1321
1322 * rust-exp.y: Now a pure parser. Update all rules.
1323 (%union): Move earlier.
1324 (current_parser, work_obstack): Remove globals.
1325 (rust_parser, ~rust_parser): Update.
1326 (class rust_parser) <copy_name, concat3, crate_name, super_name,
1327 lex_character, lex_number, lex_string, lex_identifier,
1328 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
1329 convert_name, convert_params_to_expression,
1330 convert_ast_to_expression, ast_basic_type, ast_operation,
1331 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
1332 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
1333 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
1334 ast_array_type, ast_slice_type, ast_reference_type,
1335 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
1336 (rust_parse): Update.
1337 (rustyyerror, rustyylex): Add parser parameter.
1338 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
1339 (rust_lex_stringish_test, rust_lex_test_sequence)
1340 (rust_lex_test_trailing_dot, rust_lex_test_completion)
1341 (rust_lex_test_push_back, rust_lex_tests): Update.
1342
1343 2018-07-19 Pedro Alves <palves@redhat.com>
1344
1345 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
1346 gdb::unique_xmalloc_ptr.
1347 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
1348 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
1349 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
1350 copy-initialization.
1351 * guile/scm-pretty-print.c (ppscm_print_children): Use
1352 gdb::unique_xmalloc_ptr instead of cleanups.
1353 (gdbscm_apply_val_pretty_printer): Remove cleanups.
1354 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
1355 gdb::unique_xmalloc_ptr.
1356 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1357 Adjust to use gdb::unique_xmalloc_ptr.
1358 * guile/scm-utils.c (extract_arg): Adjust.
1359 * guile/scm-value.c (gdbscm_value_field): Adjust to use
1360 gdb::unique_xmalloc_ptr instead of a cleanup.
1361
1362 2018-07-19 Tom Tromey <tom@tromey.com>
1363
1364 * utils.c (do_value_free_to_mark)
1365 (make_cleanup_value_free_to_mark): Remove.
1366 * utils.h (make_cleanup_value_free_to_mark): Remove.
1367
1368 2018-07-19 Pedro Alves <palves@redhat.com>
1369
1370 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
1371 forwarding reference.
1372
1373 2018-07-18 Pedro Alves <palves@redhat.com>
1374
1375 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
1376 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
1377 cleanup.
1378
1379 2018-07-18 Pedro Alves <palves@redhat.com>
1380
1381 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
1382 exceptions.
1383 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
1384 (gdbscm_wrap): New.
1385 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
1386 directly instead of a cleanup.
1387 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
1388 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
1389 (vlscm_binop_gdbthrow): New, factored out from ...
1390 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
1391 (vlscm_rich_compare): Use gdbscm_wrap.
1392 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
1393 instead of a cleanup.
1394 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
1395 cleanup.
1396 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1397 Use xfree directly instead of a cleanup.
1398 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
1399 Adjust to use gdbscm_wrap and scoped_value_mark.
1400 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
1401 (gdbscm_value_address, gdbscm_value_dereference)
1402 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
1403 scoped_value_mark.
1404 (gdbscm_value_dynamic_type): Use scoped_value_mark.
1405 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
1406 scoped_value_mark.
1407 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
1408 gdbscm_wrap and scoped_value_mark.
1409 (gdbscm_value_to_string): Use xfree directly instead of a
1410 cleanup. Move 'buffer' unique_ptr to TRY scope.
1411 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
1412 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
1413 scoped_value_mark.
1414 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
1415 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
1416 scoped_value_mark.
1417 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
1418 gdbscm_wrap.
1419
1420 2018-07-18 Tom de Vries <tdevries@suse.de>
1421
1422 * findvar.c (default_read_var_value): Also resolve dynamic type for
1423 LOC_OPTIMIZED_OUT vars.
1424
1425 2018-07-18 Maciej W. Rozycki <macro@mips.com>
1426
1427 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
1428 decoding.
1429
1430 2018-07-17 Tom Tromey <tom@tromey.com>
1431
1432 * guile/scm-param.c (pascm_set_func, pascm_show_func)
1433 (compute_enum_list, pascm_set_param_value_x)
1434 (gdbscm_parameter_value): Update.
1435 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
1436 (gdbscm_scm_to_host_string): Update.
1437 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
1438 Update.
1439 * guile/scm-cmd.c (cmdscm_add_completion): Update.
1440 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
1441 * guile/scm-string.c (gdbscm_scm_to_string): Return
1442 unique_xmalloc_ptr.
1443 (gdbscm_scm_to_host_string): Likewise.
1444
1445 2018-07-17 Tom Tromey <tom@tromey.com>
1446
1447 * guile/guile.c (gdbscm_eval_from_control_command): Update.
1448 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
1449 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
1450 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
1451 unique_xmalloc_ptr.
1452
1453 2018-07-17 Tom Tromey <tom@tromey.com>
1454
1455 * guile/scm-param.c (pascm_signal_setshow_error): Update.
1456 * guile/guile-internal.h (gdbscm_exception_message_to_string):
1457 Update.
1458 * guile/scm-cmd.c (cmdscm_function): Update.
1459 * guile/scm-pretty-print.c
1460 (ppscm_print_exception_unless_memory_error): Update.
1461 * guile/scm-exception.c (gdbscm_exception_message_to_string):
1462 Return unique_xmalloc_ptr.
1463
1464 2018-07-17 Tom Tromey <tom@tromey.com>
1465
1466 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
1467 Use string_printf.
1468
1469 2018-07-17 Jim Wilson <jimw@sifive.com>
1470
1471 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
1472 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
1473 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
1474 unecessary braces after EF_RISCV_RVC test. Delete call to
1475 set_gdbarch_decr_pc_after_break.
1476
1477 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
1478 RISCV_LAST_FP_REGNUM + 1.
1479 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
1480
1481 2018-07-17 Tom Tromey <tom@tromey.com>
1482
1483 * configure.ac: Remove --disable-gdbcli.
1484 * configure: Rebuild.
1485 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
1486 (SUBDIR_CLI_CFLAGS): Remove.
1487 (SFILES): Use SUBDIR_CLI_SRCS.
1488 (COMMON_OBS): Use SUBDIR_CLI_OBS.
1489
1490 2018-07-17 Tom Tromey <tom@tromey.com>
1491
1492 PR gdb/18624:
1493 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
1494
1495 2018-07-16 Jim Wilson <jimw@sifive.com>
1496
1497 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
1498
1499 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1500
1501 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
1502 variable.
1503 (libunwind_frame_sniffer): Likewise.
1504 (libunwind_frame_prev_register): Likewise.
1505 (libunwind_sigtramp_frame_sniffer): Likewise.
1506 * ia64-tdep.c (ia64_access_reg): Likewise.
1507 (ia64_access_rse_reg): Likewise.
1508 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
1509 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
1510
1511 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1512
1513 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
1514
1515 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1516
1517 * remote-sim.c (gdbsim_target::close,
1518 gdbsim_target::mourn_inferior): Remove unused variables.
1519
1520 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
1521
1522 * ia64-tdep.c (ktab_buf): New global.
1523 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
1524 (get_kernel_table): Adjust.
1525
1526 2018-07-16 Tom Tromey <tom@tromey.com>
1527
1528 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
1529 * dwarf2read.c (using_directives, new_symbol): Use
1530 outermost_context_p.
1531 * dbxread.c (process_one_symbol): Use outermost_context_p.
1532 * coffread.c (coff_symtab_read): Use outermost_context_p.
1533
1534 2018-07-16 Tom Tromey <tom@tromey.com>
1535
1536 * dwarf2read.c (using_directives, read_func_scope)
1537 (read_lexical_block_scope): Update.
1538 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1539 * buildsym.h (local_using_directives, global_using_directives):
1540 Don't declare.
1541 (get_local_using_directives, set_local_using_directives)
1542 (get_global_using_directives): Declare.
1543 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
1544 m_global_using_directives>: New members.
1545 (finish_block_internal, prepare_for_building)
1546 (reset_symtab_globals, end_symtab_get_static_block)
1547 (push_context): Update.
1548 (get_local_using_directives, set_local_using_directives)
1549 (get_global_using_directives): New functions.
1550 (buildsym_init): Update.
1551
1552 2018-07-16 Tom Tromey <tom@tromey.com>
1553
1554 * xcoffread.c (xcoff_initial_scan): Don't call
1555 free_pending_blocks.
1556 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
1557 * buildsym.h (class scoped_free_pendings): Add constructor.
1558 (free_pending_blocks): Don't declare.
1559 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
1560 (free_pending_blocks): Now static.
1561
1562 2018-07-16 Tom Tromey <tom@tromey.com>
1563
1564 * buildsym.h (push_subfile, pop_subfile): Update declarations.
1565 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
1566 member.
1567 (struct subfile_stack): Remove.
1568 (subfile_stack): Remove.
1569 (push_subfile, pop_subfile, buildsym_init): Update.
1570
1571 2018-07-16 Tom Tromey <tom@tromey.com>
1572
1573 * buildsym.c (push_subfile): Use gdb_assert.
1574 (pop_subfile): Use gdb_assert.
1575
1576 2018-07-16 Tom Tromey <tom@tromey.com>
1577
1578 * buildsym.h (merge_symbol_lists): Remove.
1579 * buildsym.c (merge_symbol_lists): Remove.
1580
1581 2018-07-16 Tom Tromey <tom@tromey.com>
1582
1583 * stabsread.c (scan_file_globals): Update comment.
1584 * stabsread.h (scan_file_globals): Move from buildsym.h.
1585 * buildsym.h (scan_file_globals): Move to stabsread.h.
1586
1587 2018-07-16 Tom Tromey <tom@tromey.com>
1588
1589 * xcoffread.c (xcoff_new_init): Update.
1590 * mipsread.c (mipscoff_new_init): Update.
1591 * mdebugread.c (mdebug_build_psymtabs): Update.
1592 * elfread.c (elf_new_init): Update.
1593 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
1594 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
1595 * buildsym.h (buildsym_new_init): Don't declare.
1596 * buildsym.c (buildsym_new_init): Remove.
1597
1598 2018-07-16 Tom Tromey <tom@tromey.com>
1599
1600 * stabsread.h (within_function): Move from buildsym.h.
1601 * stabsread.c (start_stabs): Clear within_function.
1602 * coffread.c (coff_start_symtab): Clear within_function.
1603 * buildsym.h (within_function): Move to stabsread.h.
1604 * buildsym.c (prepare_for_building): Update.
1605
1606 2018-07-16 Tom Tromey <tom@tromey.com>
1607
1608 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
1609 * dwarf2read.c (dwarf2_start_symtab): Don't set
1610 processing_gcc_compilation.
1611 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
1612
1613 2018-07-16 Tom Tromey <tom@tromey.com>
1614
1615 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
1616 (next_symbol_text_func): Move from buildsym.h.
1617 * stabsread.c (hashname): Move from buildsym.c.
1618 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
1619 (next_symbol_text_func, hashname): Move to stabsread.h.
1620 * buildsym.c: Don't include bcache.h
1621 (hashname): Move to stasbread.c.
1622
1623 2018-07-16 Tom Tromey <tom@tromey.com>
1624
1625 * buildsym.h (context_stack_size): Don't declare.
1626 * buildsym.c (context_stack_size): New global.
1627
1628 2018-07-16 Tom Tromey <tom@tromey.com>
1629
1630 * dbxread.c (processing_acc_compilation): New global.
1631 * buildsym.h (processing_acc_compilation): Don't declare.
1632
1633 2018-07-16 Tom Tromey <tom@tromey.com>
1634
1635 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
1636 * dbxread.c (read_ofile_symtab): Update.
1637 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
1638 * buildsym.h (last_source_start_addr): Remove.
1639 (set_last_source_start_addr, get_last_source_start_addr):
1640 Declare.
1641 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
1642 parameter.
1643 (struct buildsym_compunit) <m_last_source_start_addr>: New
1644 member.
1645 (prepare_for_building): Remove start_addr parameter.
1646 (start_symtab, restart_symtab, end_symtab_get_static_block)
1647 (end_symtab_with_blockvector): Update.
1648 (set_last_source_start_addr, get_last_source_start_addr): New
1649 functions.
1650
1651 2018-07-16 Tom Tromey <tom@tromey.com>
1652
1653 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
1654 member.
1655 (have_line_numbers): Remove.
1656 (record_line, prepare_for_building, end_symtab_get_static_block)
1657 (augment_type_symtab): Update.
1658
1659 2018-07-16 Tom Tromey <tom@tromey.com>
1660
1661 * buildsym.c (~buildsym_compunit): Free the macro table.
1662 (struct buildsym_compunit) <get_macro_table, release_macros>: New
1663 methods.
1664 <m_pending_macros>: New member.
1665 (pending_macros): Remove.
1666 (~scoped_free_pendings, get_macro_table, prepare_for_building)
1667 (reset_symtab_globals, end_symtab_get_static_block)
1668 (end_symtab_with_blockvector, augment_type_symtab)
1669 (buildsym_init): Update.
1670
1671 2018-07-16 Tom Tromey <tom@tromey.com>
1672
1673 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
1674 parameter.
1675 (buildsym_compunit::set_last_source_file): New method.
1676 <m_last_source_file>: New member.
1677 (prepare_for_building): Remove "name" parameter.
1678 (start_symtab, restart_symtab, reset_symtab_globals): Update.
1679 (last_source_file): Remove.
1680 (set_last_source_file, get_last_source_file): Update.
1681
1682 2018-07-16 Tom Tromey <tom@tromey.com>
1683
1684 * buildsym.c (prepare_for_building): Add assert.
1685
1686 2018-07-16 Tom Tromey <tom@tromey.com>
1687
1688 * buildsym.c (~buildsym_compunit): Update.
1689 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
1690 (start_subfile, patch_subfile_names)
1691 (end_symtab_with_blockvector): Update.
1692
1693 2018-07-16 Tom Tromey <tom@tromey.com>
1694
1695 * buildsym.c (struct buildsym_compunit): Add constructor,
1696 destructor, initializers.
1697 (start_buildsym_compunit): Remove.
1698 (free_buildsym_compunit): Use "delete".
1699 (start_symtab, restart_symtab): Use "new".
1700
1701 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
1702
1703 * symfile.c (set_objfile_default_section_offset): Remove struct
1704 keyword.
1705
1706 2018-07-14 Stafford Horne <shorne@gmail.com>
1707
1708 * (Responsible Maintainers): Add myself as or1k maintainer.
1709
1710 2018-07-13 Tom Tromey <tom@tromey.com>
1711
1712 * symfile.c (set_objfile_default_section_offset): Use extra braces
1713 around initializer.
1714
1715 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1716
1717 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
1718 non-branching basr.
1719
1720 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1721
1722 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1723 unittests/cli-utils-selftests.c
1724 * unittests/cli-utils-selftests.c: New file.
1725
1726 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1727
1728 * NEWS: Mention new commands. Mention change to 'thread apply'.
1729
1730 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1731
1732 * thread.c (thr_try_catch_cmd): New function.
1733 (thread_apply_all_command): Handle qcs flags.
1734 (thread_apply_command): Handle qcs flags.
1735 (taas_command): New function.
1736 (tfaas_command): New function.
1737 (_initialize_thread): Update to setup the new commands 'taas
1738 and 'tfaas'. Change doc string for 'thread apply'.
1739
1740 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1741
1742 * stack.c: (trailing_outermost_frame): New function, mostly
1743 extracted from backtrace_command_1.
1744 (leading_innermost_frame): New function.
1745 (backtrace_command_1): Update to call trailing_outermost_frame.
1746 (frame_apply_command_count): New function.
1747 (frame_apply_level_command): New function.
1748 (frame_apply_all_command): New function.
1749 (frame_apply_command): New function.
1750 (faas_command): New function.
1751 (frame_cmd_list): New variable.
1752 (_initialize_stack): Update to setup the new commands 'frame apply'
1753 and 'faas'.
1754
1755 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1756
1757 * cli-utils.c (number_or_range_parser::get_number): Only handle
1758 numbers or convenience var as numbers.
1759 (parse_flags): New function.
1760 (parse_flags_qcs): New function.
1761 (number_or_range_parser::finished): Ensure parsing end is detected
1762 before end of string.
1763 * cli-utils.h (parse_flags): New function.
1764 (parse_flags_qcs): New function.
1765 (number_or_range_parser): Remove m_finished bool.
1766 (number_or_range_parser::skip_range): Set m_in_range to false.
1767
1768 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
1769
1770 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
1771 on Windows.
1772
1773 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1774 Jan Kratochvil <jan.kratochvil@redhat.com>
1775 Paul Fertser <fercerpav@gmail.com>
1776 Tsutomu Seki <sekiriki@gmail.com>
1777 Pedro Alves <palves@redhat.com>
1778
1779 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1780 'unittests/parse-connection-spec-selftests.c'.
1781 (COMMON_SFILES): Add 'common/netstuff.c'.
1782 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
1783 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
1784 * common/netstuff.c: New file.
1785 * common/netstuff.h: New file.
1786 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
1787 (wait_for_connect): Update comment. New parameter
1788 'gdb::optional<int> sock' instead of 'struct serial *scb'.
1789 Use 'sock' directly instead of 'scb->fd'.
1790 (try_connect): New function, with code from 'net_open'.
1791 (net_open): Rewrite main loop to deal with multiple
1792 sockets/addresses. Handle IPv6-style hostnames; implement
1793 support for IPv6 connections.
1794 * unittests/parse-connection-spec-selftests.c: New file.
1795
1796 2018-07-11 Pedro Alves <palves@redhat.com>
1797
1798 PR gdb/23377
1799 * remote.c (remote_target::remote_detach_pid): Call
1800 set_current_process.
1801
1802 2018-07-11 Pedro Alves <palves@redhat.com>
1803
1804 * h8300-tdep.c (h8300_gdbarch_init): Remove
1805 set_gdbarch_ecoff_reg_to_regnum calls.
1806
1807 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1808
1809 PR c++/23373
1810 * c-typeprint.c (c_type_print_base_struct_union): Don't print
1811 offsets/sizes for static members of a class/struct.
1812
1813 2018-07-11 Alan Hayward <alan.hayward@arm.com>
1814
1815 * target-descriptions.c (tdesc_register_bitsize): Rename.
1816 * target-descriptions.h (tdesc_register_bitsize): Likewise.
1817 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
1818 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
1819
1820 2018-07-10 Tom Tromey <tom@tromey.com>
1821
1822 * breakpoint.c (moribund_locations): Now static and a
1823 std::vector.
1824 (breakpoint_init_inferior, moribund_breakpoint_here_p)
1825 (build_bpstat_chain, update_global_location_list)
1826 (breakpoint_retire_moribund): Update.
1827 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
1828 VEC.
1829
1830 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
1831
1832 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
1833 (riscv_register_reggroup_p): Use new function, remove unneeded
1834 parenthesis.
1835 (riscv_push_dummy_call): Extend assert to compare against xlen or
1836 flen based on register type.
1837
1838 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
1839
1840 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
1841
1842 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
1843
1844 * remote.c (show_hardware_watchpoint_limit): New function.
1845 (show_hardware_watchpoint_length_limit): New function.
1846 (show_hardware_breakpoint_limit): New function.
1847 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
1848 where appropriate, update help text.
1849
1850 2018-07-09 Tom Tromey <tom@tromey.com>
1851
1852 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
1853 (CLIBS): Don't mention NAT_CLIBS.
1854
1855 2018-07-09 Tom Tromey <tom@tromey.com>
1856
1857 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
1858 (LIBGDB_OBS, clean mostlyclean): Update.
1859 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
1860
1861 2018-07-09 Tom Tromey <tom@tromey.com>
1862
1863 * Makefile.in (%.c: %.y): Use ECHO_YACC.
1864 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
1865 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
1866
1867 2018-07-09 Tom Tromey <tom@tromey.com>
1868
1869 * Makefile.in (ALLDEPFILES): Remove exec.c.
1870 (COMMON_OBS): Remove exec.o.
1871 (COMMON_SFILES): Add exec.c.
1872
1873 2018-07-09 Tom Tromey <tom@tromey.com>
1874
1875 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
1876
1877 2018-07-09 Tom Tromey <tom@tromey.com>
1878
1879 * Makefile.in (clean mostlyclean): Remove stamp-version.
1880 (version.c): Depend on stamp-version.
1881 (stamp-version): New rule, from version.c rule.
1882
1883 2018-07-09 Tom Tromey <tom@tromey.com>
1884
1885 * Makefile.in (init.c): Depend on stamp-init.
1886 (stamp-init): New rule, from init.c rule.
1887 (clean mostlyclean): Remove stamp-init.
1888
1889 2018-07-09 Tom Tromey <tom@tromey.com>
1890
1891 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
1892 SUBDIR_GCC_COMPILE_SRCS.
1893
1894 2018-07-09 Tom Tromey <tom@tromey.com>
1895
1896 * Makefile.in (init.c): Remove some unused sed rules.
1897
1898 2018-07-09 Tom Tromey <tom@tromey.com>
1899
1900 * Makefile.in (TSOBS): Remove.
1901 (INIT_FILES): Update.
1902 (LIBGDB_OBS): Update.
1903 (COMMON_SFILES): Add inflow.c.
1904 (SFILES): Remove inflow.c.
1905
1906 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1907
1908 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
1909
1910 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
1911
1912 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
1913 get_saveloc_name, is_signal_frame_name, step_name,
1914 init_remote_name, create_addr_space_name,
1915 destroy_addr_space_name, search_unwind_table_name,
1916 find_dyn_list_name): Constify.
1917
1918 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
1919
1920 * darwin-nat.c (darwin_pthread_kill): New function.
1921 (darwin_resume_thread): Use darwin_pthread_kill.
1922
1923 2018-07-05 Tom de Vries <tdevries@suse.de>
1924
1925 * macroexp.c (macro_buffer) <operator=>: New member function.
1926
1927 2018-07-04 Tom Tromey <tom@tromey.com>
1928
1929 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
1930
1931 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
1932
1933 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
1934 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
1935 * maint.c: Likewise.
1936 * top.c: Likewise.
1937
1938 2018-07-04 Joel Brobecker <brobecker@adacore.com>
1939
1940 * NEWS: Create a new section for the next release branch.
1941 Rename the section of the current branch, now that it has
1942 been cut.
1943
1944 2018-07-04 Joel Brobecker <brobecker@adacore.com>
1945
1946 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
1947 * version.in: Bump version to 8.2.50.DATE-git.
1948
1949 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1950 Pedro Alves <palves@redhat.com>
1951
1952 * linux-nat.c (linux_init_ptrace): Rename to ...
1953 (linux_init_ptrace_procfs): ... this. Call
1954 linux_proc_init_warnings.
1955 (linux_nat_target::post_attach)
1956 (linux_nat_target::post_startup_inferior): Adjust.
1957 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
1958 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
1959
1960 2018-07-04 Tom de Vries <tdevries@suse.de>
1961
1962 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
1963 check ...
1964 (read_comp_unit_head): ... here.
1965
1966 2018-07-03 Tom Tromey <tom@tromey.com>
1967
1968 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
1969 (stop_tracing, tstatus_command)
1970 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
1971 (print_one_static_tracepoint_marker): Update.
1972 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
1973 std::vector.
1974 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
1975 VEC.
1976 (all_tracepoints, static_tracepoints_here): Return std::vector.
1977
1978 2018-07-03 Tom Tromey <tom@tromey.com>
1979
1980 * common/ptid.c (ptid_equal): Remove.
1981 * common/ptid.h (ptid_equal): Don't declare.
1982 * ada-tasks.c: Update.
1983 * breakpoint.c: Update.
1984 * common/agent.c: Update.
1985 * corelow.c: Update.
1986 * darwin-nat-info.c: Update.
1987 * darwin-nat.c: Update.
1988 * dcache.c: Update.
1989 * dtrace-probe.c: Update.
1990 * dummy-frame.c: Update.
1991 * fbsd-nat.c: Update.
1992 * frame.c: Update.
1993 * gdbthread.h: Update.
1994 * gnu-nat.c: Update.
1995 * go32-nat.c: Update.
1996 * inf-loop.c: Update.
1997 * inf-ptrace.c: Update.
1998 * infcall.c: Update.
1999 * infcmd.c: Update.
2000 * inflow.c: Update.
2001 * infrun.c: Update.
2002 * linux-fork.c: Update.
2003 * linux-nat.c: Update.
2004 * linux-thread-db.c: Update.
2005 * mi/mi-cmd-var.c: Update.
2006 * mi/mi-interp.c: Update.
2007 * mi/mi-main.c: Update.
2008 * nto-procfs.c: Update.
2009 * ppc-linux-tdep.c: Update.
2010 * procfs.c: Update.
2011 * python/py-inferior.c: Update.
2012 * python/py-record-btrace.c: Update.
2013 * python/py-record.c: Update.
2014 * ravenscar-thread.c: Update.
2015 * regcache.c: Update.
2016 * remote-sim.c: Update.
2017 * remote.c: Update.
2018 * sol-thread.c: Update.
2019 * solib.c: Update.
2020 * target.c: Update.
2021 * tui/tui-stack.c: Update.
2022 * varobj.c: Update.
2023 * windows-nat.c: Update.
2024 * windows-tdep.c: Update.
2025
2026 2018-07-03 Tom Tromey <tom@tromey.com>
2027
2028 * common/ptid.c (ptid_match): Remove.
2029 * common/ptid.h (ptid_match): Don't declare.
2030 * fbsd-nat.c: Update.
2031 * infcmd.c: Update.
2032 * infrun.c: Update.
2033 * linux-nat.c: Update.
2034 * record-btrace.c: Update.
2035 * regcache.c: Update.
2036 * remote.c: Update.
2037
2038 2018-07-03 Tom Tromey <tom@tromey.com>
2039
2040 * common/ptid.c (ptid_tid_p): Remove.
2041 * common/ptid.h (ptid_tid_p): Don't declare.
2042 * sol-thread.c: Update.
2043
2044 2018-07-03 Tom Tromey <tom@tromey.com>
2045
2046 * common/ptid.c (ptid_lwp_p): Remove.
2047 * common/ptid.h (ptid_lwp_p): Don't declare.
2048 * fbsd-nat.c: Update.
2049 * linux-nat.c: Update.
2050 * nat/linux-procfs.c: Update.
2051 * nat/x86-linux-dregs.c: Update.
2052 * sol-thread.c: Update.
2053
2054 2018-07-03 Tom Tromey <tom@tromey.com>
2055
2056 * common/ptid.c (ptid_is_pid): Remove.
2057 * common/ptid.h (ptid_is_pid): Don't declare.
2058 * infrun.c: Update.
2059 * linux-nat.c: Update.
2060 * mi/mi-interp.c: Update.
2061 * remote.c: Update.
2062 * thread.c: Update.
2063
2064 2018-07-03 Tom Tromey <tom@tromey.com>
2065
2066 * common/ptid.c (ptid_get_tid): Remove.
2067 * common/ptid.h (ptid_get_tid): Don't declare.
2068 * ada-tasks.c: Update.
2069 * aix-thread.c: Update.
2070 * bsd-uthread.c: Update.
2071 * darwin-nat.c: Update.
2072 * fbsd-nat.c: Update.
2073 * i386-darwin-nat.c: Update.
2074 * infrun.c: Update.
2075 * linux-tdep.c: Update.
2076 * nto-procfs.c: Update.
2077 * ppc-ravenscar-thread.c: Update.
2078 * python/py-infthread.c: Update.
2079 * ravenscar-thread.c: Update.
2080 * sol-thread.c: Update.
2081 * sparc-ravenscar-thread.c: Update.
2082 * windows-nat.c: Update.
2083
2084 2018-07-03 Tom Tromey <tom@tromey.com>
2085
2086 * common/ptid.c (ptid_get_lwp): Remove.
2087 * common/ptid.h (ptid_get_lwp): Don't declare.
2088 * aarch64-linux-nat.c: Update.
2089 * ada-tasks.c: Update.
2090 * aix-thread.c: Update.
2091 * amd64-linux-nat.c: Update.
2092 * arm-linux-nat.c: Update.
2093 * corelow.c: Update.
2094 * fbsd-nat.c: Update.
2095 * fbsd-tdep.c: Update.
2096 * gnu-nat.c: Update.
2097 * i386-cygwin-tdep.c: Update.
2098 * i386-gnu-nat.c: Update.
2099 * i386-linux-nat.c: Update.
2100 * ia64-linux-nat.c: Update.
2101 * inf-ptrace.c: Update.
2102 * infrun.c: Update.
2103 * linux-fork.c: Update.
2104 * linux-nat.c: Update.
2105 * linux-tdep.c: Update.
2106 * linux-thread-db.c: Update.
2107 * mips-linux-nat.c: Update.
2108 * nat/aarch64-linux-hw-point.c: Update.
2109 * nat/aarch64-linux.c: Update.
2110 * nat/linux-btrace.c: Update.
2111 * nat/linux-osdata.c: Update.
2112 * nat/linux-procfs.c: Update.
2113 * nat/x86-linux-dregs.c: Update.
2114 * obsd-nat.c: Update.
2115 * ppc-fbsd-nat.c: Update.
2116 * ppc-linux-nat.c: Update.
2117 * procfs.c: Update.
2118 * python/py-infthread.c: Update.
2119 * ravenscar-thread.c: Update.
2120 * remote.c: Update.
2121 * s390-linux-nat.c: Update.
2122 * sol-thread.c: Update.
2123 * sol2-tdep.c: Update.
2124 * spu-linux-nat.c: Update.
2125 * x86-linux-nat.c: Update.
2126 * xtensa-linux-nat.c: Update.
2127
2128 2018-07-03 Tom Tromey <tom@tromey.com>
2129
2130 * common/ptid.c (ptid_get_pid): Remove.
2131 * common/ptid.h (ptid_get_pid): Don't declare.
2132 * aarch64-linux-nat.c: Update.
2133 * ada-lang.c: Update.
2134 * aix-thread.c: Update.
2135 * alpha-bsd-nat.c: Update.
2136 * amd64-fbsd-nat.c: Update.
2137 * amd64-linux-nat.c: Update.
2138 * arm-linux-nat.c: Update.
2139 * arm-nbsd-nat.c: Update.
2140 * auxv.c: Update.
2141 * break-catch-syscall.c: Update.
2142 * breakpoint.c: Update.
2143 * bsd-uthread.c: Update.
2144 * corelow.c: Update.
2145 * ctf.c: Update.
2146 * darwin-nat.c: Update.
2147 * fbsd-nat.c: Update.
2148 * fbsd-tdep.c: Update.
2149 * gcore.c: Update.
2150 * gnu-nat.c: Update.
2151 * hppa-nbsd-nat.c: Update.
2152 * hppa-obsd-nat.c: Update.
2153 * i386-fbsd-nat.c: Update.
2154 * ia64-linux-nat.c: Update.
2155 * inf-ptrace.c: Update.
2156 * infcmd.c: Update.
2157 * inferior.c: Update.
2158 * inferior.h: Update.
2159 * inflow.c: Update.
2160 * infrun.c: Update.
2161 * linux-fork.c: Update.
2162 * linux-nat.c: Update.
2163 * linux-tdep.c: Update.
2164 * linux-thread-db.c: Update.
2165 * m68k-bsd-nat.c: Update.
2166 * mi/mi-interp.c: Update.
2167 * mi/mi-main.c: Update.
2168 * mips-linux-nat.c: Update.
2169 * mips-nbsd-nat.c: Update.
2170 * mips64-obsd-nat.c: Update.
2171 * nat/aarch64-linux-hw-point.c: Update.
2172 * nat/aarch64-linux.c: Update.
2173 * nat/linux-btrace.c: Update.
2174 * nat/linux-osdata.c: Update.
2175 * nat/linux-procfs.c: Update.
2176 * nat/x86-linux-dregs.c: Update.
2177 * nto-procfs.c: Update.
2178 * obsd-nat.c: Update.
2179 * ppc-linux-nat.c: Update.
2180 * ppc-nbsd-nat.c: Update.
2181 * ppc-obsd-nat.c: Update.
2182 * proc-service.c: Update.
2183 * procfs.c: Update.
2184 * python/py-inferior.c: Update.
2185 * python/py-infthread.c: Update.
2186 * ravenscar-thread.c: Update.
2187 * record.c: Update.
2188 * remote-sim.c: Update.
2189 * remote.c: Update.
2190 * rs6000-nat.c: Update.
2191 * s390-linux-nat.c: Update.
2192 * sh-nbsd-nat.c: Update.
2193 * sol-thread.c: Update.
2194 * sparc-nat.c: Update.
2195 * sparc64-tdep.c: Update.
2196 * spu-linux-nat.c: Update.
2197 * spu-tdep.c: Update.
2198 * target-debug.h: Update.
2199 * target.c: Update.
2200 * thread.c: Update.
2201 * tid-parse.c: Update.
2202 * tracefile-tfile.c: Update.
2203 * vax-bsd-nat.c: Update.
2204 * windows-nat.c: Update.
2205 * x86-linux-nat.c: Update.
2206 * x86-nat.c: Update.
2207
2208 2018-07-03 Tom Tromey <tom@tromey.com>
2209
2210 * common/ptid.c (pid_to_ptid): Remove.
2211 * common/ptid.h (pid_to_ptid): Don't declare.
2212 * aix-thread.c: Update.
2213 * arm-linux-nat.c: Update.
2214 * common/ptid.c: Update.
2215 * common/ptid.h: Update.
2216 * corelow.c: Update.
2217 * ctf.c: Update.
2218 * darwin-nat.c: Update.
2219 * fbsd-nat.c: Update.
2220 * fork-child.c: Update.
2221 * gnu-nat.c: Update.
2222 * go32-nat.c: Update.
2223 * inf-ptrace.c: Update.
2224 * infcmd.c: Update.
2225 * inferior.c: Update.
2226 * infrun.c: Update.
2227 * linux-fork.c: Update.
2228 * linux-nat.c: Update.
2229 * nat/aarch64-linux-hw-point.c: Update.
2230 * nat/fork-inferior.c: Update.
2231 * nat/x86-linux-dregs.c: Update.
2232 * nto-procfs.c: Update.
2233 * obsd-nat.c: Update.
2234 * procfs.c: Update.
2235 * progspace.c: Update.
2236 * remote.c: Update.
2237 * rs6000-nat.c: Update.
2238 * s390-linux-nat.c: Update.
2239 * sol-thread.c: Update.
2240 * spu-linux-nat.c: Update.
2241 * target.c: Update.
2242 * top.c: Update.
2243 * tracefile-tfile.c: Update.
2244 * windows-nat.c: Update.
2245
2246 2018-07-03 Tom Tromey <tom@tromey.com>
2247
2248 * common/ptid.h (ptid_build): Don't declare.
2249 * common/ptid.c (ptid_build): Remove.
2250 * aix-thread.c: Update.
2251 * bsd-kvm.c: Update.
2252 * bsd-uthread.c: Update.
2253 * common/agent.c: Update.
2254 * common/ptid.c: Update.
2255 * common/ptid.h: Update.
2256 * corelow.c: Update.
2257 * darwin-nat.c: Update.
2258 * fbsd-nat.c: Update.
2259 * gnu-nat.c: Update.
2260 * linux-fork.c: Update.
2261 * linux-nat.c: Update.
2262 * linux-thread-db.c: Update.
2263 * nat/linux-osdata.c: Update.
2264 * nat/linux-procfs.c: Update.
2265 * nto-procfs.c: Update.
2266 * obsd-nat.c: Update.
2267 * proc-service.c: Update.
2268 * procfs.c: Update.
2269 * ravenscar-thread.c: Update.
2270 * remote-sim.c: Update.
2271 * remote.c: Update.
2272 * sol-thread.c: Update.
2273 * target.c: Update.
2274 * windows-nat.c: Update.
2275
2276 2018-07-03 Tom Tromey <tom@tromey.com>
2277
2278 * infrun.c (follow_exec): Use exit_inferior_silent.
2279 * inferior.c (exit_inferior_num_silent): Remove.
2280 * inferior.h (exit_inferior_num_silent): Don't declare.
2281
2282 2018-07-03 Tom Tromey <tom@tromey.com>
2283
2284 PR cli/23340:
2285 * darwin-nat.c (darwin_attach_pid): Reset inferior and
2286 inferior_ptid on error.
2287
2288 2018-07-02 Maciej W. Rozycki <macro@mips.com>
2289 Simon Marchi <simon.marchi@polymtl.ca>
2290
2291 PR tdep/8282
2292 * disasm.h (gdb_disassembler): Add
2293 `m_disassembler_options_holder'. member
2294 * disasm.c (get_all_disassembler_options): New function.
2295 (gdb_disassembler::gdb_disassembler): Use it.
2296 (gdb_buffered_insn_length_init_dis): Likewise.
2297 (gdb_buffered_insn_length): Adjust accordingly.
2298 (set_disassembler_options): Handle options with arguments.
2299 (show_disassembler_options_sfunc): Likewise. Add a leading new
2300 line if showing options with descriptions.
2301 (disassembler_options_completer): Adapt to using the
2302 `disasm_options_and_args_t' structure.
2303 * mips-tdep.c (mips_disassembler_options): New variable.
2304 (mips_disassembler_options_o32): Likewise.
2305 (mips_disassembler_options_n32): Likewise.
2306 (mips_disassembler_options_n64): Likewise.
2307 (gdb_print_insn_mips): Don't set `disassembler_options'.
2308 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
2309 functions.
2310 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
2311 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
2312 `gdbarch_disassembler_options_implicit' and
2313 `gdbarch_valid_disassembler_options'.
2314 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
2315 `disasm_options_and_args_t' structure.
2316 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
2317 method.
2318 (valid_disassembler_options): Switch from `disasm_options_t' to
2319 the `disasm_options_and_args_t' structure.
2320 * NEWS: Document `set disassembler-options' support for the MIPS
2321 target.
2322 * gdbarch.h: Regenerate.
2323 * gdbarch.c: Regenerate.
2324
2325 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
2326
2327 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
2328
2329 2018-06-29 Joel Brobecker <brobecker@adacore.com>
2330
2331 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
2332 parameter in call to amd64_target_description.
2333 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
2334 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
2335 (amd64fbsd_init_abi): Likewise.
2336 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
2337 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
2338 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
2339 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
2340
2341 2018-06-29 Pedro Alves <palves@redhat.com>
2342
2343 * gdb/amd64-tdep.h (amd64_create_target_description): Add
2344 "segments" parameter.
2345 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
2346 (_initialize_amd64_tdep): Update call to
2347 amd64_create_target_description.
2348 (amd64_target_description): Add "segments" parameter. Adjust
2349 the implementation to use it.
2350 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
2351 call to amd64_create_target_description.
2352 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
2353 * gdb/arch/amd64.h (amd64_create_target_description): Add
2354 "segments" register.
2355 * gdb/arch/amd64.c (amd64_create_target_description): Add
2356 "segments" parameter. Call create_feature_i386_64bit_segments
2357 only if SEGMENTS is true.
2358 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
2359 call to amd64_create_target_description.
2360
2361 2018-06-29 Pedro Alves <palves@redhat.com>
2362
2363 * thread.c (thread_target_id_str): New, factored out from ...
2364 (print_thread_info_1): ... here. Use it to compute the max
2365 "Target Id" column width.
2366
2367 2018-06-29 Pedro Alves <palves@redhat.com>
2368
2369 * remote.c (remote_target::extra_thread_info): Delete
2370 'display_buf' and 'n' locals. from the cache, regardless of
2371 packet mechanims is in use. Use cache for qThreadExtra and qP
2372 methods too.
2373
2374 2018-06-29 Pedro Alves <palves@redhat.com>
2375
2376 * blockframe.c (find_pc_sect_containing_function): New function.
2377 * breakpoint.c (print_breakpoint_location): Don't call
2378 find_pc_sect_function.
2379 * linespec.c (create_sals_line_offset): Record the location's
2380 symbol in the sal.
2381 * linespec.c (convert_address_location_to_sals): Fill in sal's
2382 symbol with find_pc_sect_containing_function.
2383 * symtab.c (find_function_start_sal): Rename to ...
2384 (find_function_start_sal_1): ... this.
2385 (find_function_start_sal): Reimplement as wrapper around
2386 find_function_start_sal_1, and use
2387 find_pc_sect_containing_function to fill in the sal's symbol.
2388 (find_function_start_sal(symbol*, bool)): Adjust.
2389 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
2390 comments.
2391 (find_pc_sect_containing_function): Declare.
2392
2393 2018-06-29 Pedro Alves <palves@redhat.com>
2394
2395 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
2396 true if the the location has no symbol.
2397
2398 2018-06-28 Tom Tromey <tom@tromey.com>
2399
2400 * NEWS: Mention --enable-codesign.
2401 * silent-rules.mk (ECHO_SIGN): New variable.
2402 * configure.ac: Add --enable-codesign.
2403 * configure: Rebuild.
2404 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
2405 (gdb$(EXEEXT)): Optionally invoke codesign.
2406
2407 2018-06-28 Pedro Alves <palves@redhat.com>
2408
2409 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
2410 comments.
2411 (switch_to_thread_no_regs): Adjust comment.
2412 * infcmd.c (stop_pc): Delete.
2413 (post_create_inferior, info_program_command): Replace references
2414 to stop_pc with references to thread_info->suspend.stop_pc.
2415 * inferior.h (stop_pc): Delete declaration.
2416 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
2417 (handle_inferior_event_1, handle_signal_stop)
2418 (process_event_stop_test, keep_going_stepped_thread)
2419 (handle_step_into_function, handle_step_into_function_backward)
2420 (print_stop_location): Replace references to stop_pc with
2421 references to thread_info->suspend.stop_pc.
2422 (struct infcall_suspend_state) <stop_pc>: Delete field.
2423 (save_infcall_suspend_state, restore_infcall_suspend_state):
2424 Remove references to inf_stat->stop_pc.
2425 * linux-fork.c (fork_load_infrun_state): Likewise.
2426 * record-btrace.c (record_btrace_set_replay): Likewise.
2427 * record-full.c (record_full_goto_entry): Likewise.
2428 * remote.c (print_one_stopped_thread): Likewise.
2429 * target.c (target_resume): Extend comment.
2430 * thread.c (set_executing_thread): New.
2431 (set_executing): Use it.
2432 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
2433 Remove references to stop_pc.
2434
2435 2018-06-28 Pedro Alves <palves@redhat.com>
2436
2437 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
2438 Moving fetching stop_pc until after ecs->event_thread is refreshed.
2439
2440 2018-06-28 Tom Tromey <tom@tromey.com>
2441
2442 * coffread.c (coff_symfile_finish): Update.
2443 * xcoffread.c (xcoff_symfile_finish): Update.
2444 * elfread.c (elf_symfile_finish): Update.
2445 * symfile.h (dwarf2_free_objfile): Don't declare.
2446 * dwarf2read.c (_initialize_dwarf2_read): Use
2447 register_objfile_data_with_cleanup.
2448 (dwarf2_free_objfile): Now static. Change signature.
2449
2450 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2451
2452 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
2453 option "-o" to add-symbol-file-load to add an offset to each
2454 section's load address.
2455 * symfile.c (set_objfile_default_section_offset): New function.
2456
2457 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2458
2459 * symfile.c (add_symbol_file_command): Make sure that sections
2460 with the same name are sorted in the same order.
2461
2462 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2463
2464 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
2465 require the second argument. If omitted, load sections at the
2466 addresses specified in the file.
2467
2468 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2469
2470 * symfile.c (symbol_file_command, symbol_file_add_main_1)
2471 (_initialize_symfile): Add option "-o" to symbol-file to add an
2472 offset to each section of the symbol file.
2473
2474 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2475
2476 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
2477
2478 2018-06-27 Tom Tromey <tom@tromey.com>
2479
2480 * stack.c (_initialize_stack): Update "func" help text.
2481
2482 2018-06-27 Tom Tromey <tom@tromey.com>
2483
2484 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
2485 std::vector.
2486 (unwind_infopy_str, pyuw_create_unwind_info)
2487 (unwind_infopy_add_saved_register, pyuw_sniffer)
2488 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
2489 Update.
2490 (struct saved_reg): Add constructor.
2491 <value>: Now a gdbpy_ref<>.
2492
2493 2018-06-27 Tom Tromey <tom@tromey.com>
2494
2495 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
2496
2497 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2498
2499 * gdb-gdb.py.in: Format using autopep8.
2500
2501 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2502
2503 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
2504 (type_lookup_function): Recognize CORE_ADDR values.
2505
2506 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2507
2508 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
2509 print tag_name.
2510
2511 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2512
2513 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
2514 <__lt__>: Add.
2515
2516 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2517
2518 * gdb-gdb.py: Move to...
2519 * gdb-gdb.py.in: ... here.
2520 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
2521 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
2522 dependencies.
2523 (distclean): Remove gdb-gdb.py when cleaning.
2524 (gdb-gdb.py, gdb-gdb.gdb): New rules.
2525 * configure: Re-generate.
2526
2527 2018-06-27 Pedro Alves <palves@redhat.com>
2528
2529 * proc-service.c (get_ps_regcache): New.
2530 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2531 (ps_lsetfpregs): Use it.
2532
2533 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
2534
2535 PR gdb/21695
2536 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
2537 (dwarf_decode_lines_1): Adjust.
2538
2539 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2540
2541 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
2542 override.
2543 <info_proc>: Likewise.
2544
2545 2018-06-26 Joel Brobecker <brobecker@adacore.com>
2546
2547 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
2548 to windows_fetch_one_register, and only handle the case of
2549 fetching one register. Move the code that reloads the context
2550 and iterates over all registers if R is negative to...
2551 (windows_nat_target::fetch_registers): ... here.
2552 (do_windows_store_inferior_registers): Rename to
2553 windows_store_one_register, and only handle the case of storing
2554 one register. Move the code that handles the case where r is
2555 negative to...
2556 (windows_nat_target::store_registers) ... here.
2557
2558 2018-06-26 Tom Tromey <tom@tromey.com>
2559
2560 PR rust/22574:
2561 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
2562 * rust-lang.c (rust_print_struct_def): Add podata parameter.
2563 Update.
2564 (rust_internal_print_type): Add podata parameter.
2565 (rust_print_type): Update.
2566
2567 2018-06-26 Tom Tromey <tom@tromey.com>
2568
2569 * typeprint.h (struct print_offset_data) <update, finish,
2570 maybe_print_hole>: New methods.
2571 <indentation>: New constant.
2572 * typeprint.c (print_offset_data::indentation): Define.
2573 (print_offset_data::maybe_print_hole, print_offset_data::update)
2574 (print_offset_data::finish): Move from c-typeprint.c and rename.
2575 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
2576 (print_spaces_filtered_with_print_options): Update.
2577 (c_print_type_union_field_offset, maybe_print_hole)
2578 (c_print_type_struct_field_offset): Move to typeprint.c and
2579 rename.
2580 (c_type_print_base_struct_union): Update.
2581
2582 2018-06-25 Pedro Alves <palves@redhat.com>
2583
2584 * gdbthread.h (thread_info_ref, delete_thread)
2585 (delete_thread_silent, first_thread_of_inferior)
2586 (any_thread_of_inferior, switch_to_thread)
2587 (enable_thread_stack_temporaries)
2588 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2589 (get_last_thread_stack_temporary)
2590 (value_in_thread_stack_temporaries, can_access_registers_thread):
2591 Spell out "struct thread_info" instead of just "thread_info".
2592 * inferior.h (notice_new_inferior): Likewise.
2593
2594 2018-06-25 Pedro Alves <palves@redhat.com>
2595
2596 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2597 pass thread_info pointer to delete_thread.
2598 (windows_nat_target::detach): Pass inferior pointer to
2599 detach_inferior.
2600 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
2601 delete_thread.
2602 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
2603 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
2604 and pass a thread_info pointer to delete_thread.
2605 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
2606 pass thread_info pointer to delete_thread.
2607 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
2608 delete_thread_silent call.
2609 * procfs.c (procfs_target::detach): Pass inferior pointer to
2610 detach_inferior.
2611 (procfs_target::wait): Pass thread_info pointer to delete_thread.
2612 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
2613 delete_thread_silent call.
2614 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2615 pass thread_info pointer to delete_thread.
2616 (windows_nat_target::detach): Pass inferior pointer to
2617 delete_inferior.
2618
2619 2018-06-22 Alan Hayward <alan.hayward@arm.com>
2620
2621 * regcache.c (readable_regcache::read_part): Fix asserts.
2622 (reg_buffer::raw_collect_part): New function.
2623 (regcache::write_part): Fix asserts.
2624 (reg_buffer::raw_supply_part): New function.
2625 (regcache::transfer_regset_register): New helper function.
2626 (regcache::transfer_regset): Call new functions.
2627 (regcache_supply_regset): Use gdb_byte*.
2628 (regcache::supply_regset): Likewise.
2629 (regcache_collect_regset): Likewise.
2630 (regcache::collect_regset): Likewise.
2631 * regcache.h (reg_buffer::raw_collect_part): New declaration.
2632 (reg_buffer::raw_supply_part): Likewise.
2633 (regcache::transfer_regset_register): Likewise.
2634 (regcache::transfer_regset): Use gdb_byte*.
2635
2636 2018-06-22 Alan Hayward <alan.hayward@arm.com>
2637
2638 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
2639
2640 2018-06-21 Pedro Alves <palves@redhat.com>
2641
2642 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
2643 instead of a ptid_t. All callers adjusted.
2644 * ada-tasks.c (ada_get_task_number): Likewise. All callers
2645 adjusted.
2646 (print_ada_task_info, display_current_task_id, task_command_1):
2647 Adjust.
2648 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
2649 inferior_thread.
2650 (breakpoint_kind): Adjust.
2651 (remove_breakpoints_pid): Rename to ...
2652 (remove_breakpoints_inf): ... this. Adjust to take an inferior
2653 pointer. All callers adjusted.
2654 (bpstat_clear_actions): Use inferior_thread.
2655 (get_bpstat_thread): New.
2656 (bpstat_do_actions): Use it.
2657 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
2658 to take a thread_info pointer. All callers adjusted.
2659 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
2660 (breakpoint_re_set_thread): Use inferior_thread.
2661 * breakpoint.h (struct inferior): Forward declare.
2662 (bpstat_stop_status): Update.
2663 (remove_breakpoints_pid): Delete.
2664 (remove_breakpoints_inf): New.
2665 * bsd-uthread.c (bsd_uthread_target::wait)
2666 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
2667 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
2668 (maint_btrace_packet_history_cmd)
2669 (maint_btrace_clear_packet_history_cmd): Adjust.
2670 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
2671 inferior_thread.
2672 * cli/cli-interp.c: Include "inferior.h".
2673 * common/refcounted-object.h (struct
2674 refcounted_object_ref_policy): New.
2675 * compile/compile-object-load.c: Include gdbthread.h.
2676 (store_regs): Use inferior_thread.
2677 * corelow.c (core_target::close): Use current_inferior.
2678 (core_target_open): Adjust to use first_thread_of_inferior and use
2679 the current inferior.
2680 * ctf.c (ctf_target::close): Adjust to use current_inferior.
2681 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
2682 <thread>: ... this new field. All references adjusted.
2683 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
2684 Take a thread_info pointer instead of a ptid_t.
2685 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
2686 (dummy_frame_discard, register_dummy_frame_dtor): Take a
2687 thread_info pointer instead of a ptid_t.
2688 * elfread.c: Include "inferior.h".
2689 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
2690 Use inferior_thread.
2691 * eval.c (evaluate_subexp): Likewise.
2692 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
2693 inferior_thread.
2694 * gdb_proc_service.h (struct thread_info): Forward declare.
2695 (struct ps_prochandle) <ptid>: Delete, replaced by ...
2696 <thread>: ... this new field. All references adjusted.
2697 * gdbarch.h, gdbarch.c: Regenerate.
2698 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
2699 'thread' parameter. All implementations and callers adjusted.
2700 * gdbthread.h (thread_info) <set_running>: New method.
2701 (delete_thread, delete_thread_silent): Take a thread_info pointer
2702 instead of a ptid.
2703 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
2704 (first_thread_of_process): Delete, replaced by ...
2705 (first_thread_of_inferior): ... this new function. All callers
2706 adjusted.
2707 (any_live_thread_of_process): Delete, replaced by ...
2708 (any_live_thread_of_inferior): ... this new function. All callers
2709 adjusted.
2710 (switch_to_thread, switch_to_no_thread): Declare.
2711 (is_executing): Delete.
2712 (enable_thread_stack_temporaries): Update comment.
2713 <enable_thread_stack_temporaries>: Take a thread_info pointer
2714 instead of a ptid_t. Incref the thread.
2715 <~enable_thread_stack_temporaries>: Decref the thread.
2716 <m_ptid>: Delete
2717 <m_thr>: New.
2718 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2719 (get_last_thread_stack_temporary)
2720 (value_in_thread_stack_temporaries, can_access_registers_thread):
2721 Take a thread_info pointer instead of a ptid_t. All callers
2722 adjusted.
2723 * infcall.c (get_call_return_value): Use inferior_thread.
2724 (run_inferior_call): Work with thread pointers instead of ptid_t.
2725 (call_function_by_hand_dummy): Work with thread pointers instead
2726 of ptid_t. Use thread_info_ref.
2727 * infcmd.c (proceed_thread_callback): Access thread's state
2728 directly.
2729 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
2730 access thread's state directly.
2731 (continue_command): Use inferior_thread.
2732 (info_program_command): Use find_thread_ptid and access thread
2733 state directly.
2734 (proceed_after_attach_callback): Use thread state directly.
2735 (notice_new_inferior): Take a thread_info pointer instead of a
2736 ptid_t. All callers adjusted.
2737 (exit_inferior): Take an inferior pointer instead of a pid. All
2738 callers adjusted.
2739 (exit_inferior_silent): New.
2740 (detach_inferior): Delete.
2741 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
2742 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
2743 (detach_inferior_command, kill_inferior_command): Use
2744 find_inferior_id instead of valid_gdb_inferior_id and
2745 gdb_inferior_id_to_pid.
2746 (inferior_command): Use inferior and thread pointers.
2747 * inferior.h (struct thread_info): Forward declare.
2748 (notice_new_inferior): Take a thread_info pointer instead of a
2749 ptid_t. All callers adjusted.
2750 (detach_inferior): Delete declaration.
2751 (exit_inferior, exit_inferior_silent): Take an inferior pointer
2752 instead of a pid. All callers adjusted.
2753 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
2754 (valid_gdb_inferior_id): Delete.
2755 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
2756 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
2757 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
2758 ...
2759 <inf>: ... this new field.
2760 <step_ptid>: Delete, replaced by ...
2761 <step_thread>: ... this new field.
2762 (get_displaced_stepping_state): Take an inferior pointer instead
2763 of a pid. All callers adjusted.
2764 (displaced_step_in_progress_any_inferior): Adjust.
2765 (displaced_step_in_progress_thread): Take a thread pointer instead
2766 of a ptid_t. All callers adjusted.
2767 (displaced_step_in_progress, add_displaced_stepping_state): Take
2768 an inferior pointer instead of a pid. All callers adjusted.
2769 (get_displaced_step_closure_by_addr): Adjust.
2770 (remove_displaced_stepping_state): Take an inferior pointer
2771 instead of a pid. All callers adjusted.
2772 (displaced_step_prepare_throw, displaced_step_prepare)
2773 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
2774 All callers adjusted.
2775 (start_step_over): Adjust.
2776 (infrun_thread_ptid_changed): Remove bit updating ptids in the
2777 displaced step queue.
2778 (do_target_resume): Adjust.
2779 (fetch_inferior_event): Use inferior_thread.
2780 (context_switch, get_inferior_stop_soon): Take an
2781 execution_control_state pointer instead of a ptid_t. All callers
2782 adjusted.
2783 (switch_to_thread_cleanup): Delete.
2784 (stop_all_threads): Use scoped_restore_current_thread.
2785 * inline-frame.c: Include "gdbthread.h".
2786 (inline_state) <inline_state>: Take a thread pointer instead of a
2787 ptid_t. All callers adjusted.
2788 <ptid>: Delete, replaced by ...
2789 <thread>: ... this new field.
2790 (find_inline_frame_state): Take a thread pointer instead of a
2791 ptid_t. All callers adjusted.
2792 (skip_inline_frames, step_into_inline_frame)
2793 (inline_skipped_frames, inline_skipped_symbol): Take a thread
2794 pointer instead of a ptid_t. All callers adjusted.
2795 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
2796 (inline_skipped_frames, inline_skipped_symbol): Likewise.
2797 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
2798 pointers directly.
2799 * linux-nat.c (get_detach_signal): Likewise.
2800 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
2801 (thread_db_notice_clone): Adjust.
2802 (thread_db_find_new_threads_silently)
2803 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
2804 a thread pointer instead of a ptid_t. All callers adjusted.
2805 * mi/mi-cmd-var.c: Include "inferior.h".
2806 (mi_cmd_var_update_iter): Update to use thread pointers.
2807 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
2808 inferior directly.
2809 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
2810 out to ...
2811 (mi_output_running): ... this new function.
2812 (mi_on_resume_1): Adjust to use it.
2813 (mi_user_selected_context_changed): Adjust to use inferior_thread.
2814 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
2815 directly.
2816 (interrupt_thread_callback): : Adjust to use thread and inferior
2817 pointers.
2818 * proc-service.c: Include "gdbthread.h".
2819 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
2820 * progspace-and-thread.c: Include "inferior.h".
2821 * progspace.c: Include "inferior.h".
2822 * python/py-exitedevent.c (create_exited_event_object): Adjust to
2823 hold a reference to an inferior_object.
2824 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
2825 inferior_thread.
2826 * python/py-inferior.c (struct inferior_object): Give the type a
2827 tag name instead of a typedef.
2828 (python_on_normal_stop): No need to check if the current thread is
2829 listed.
2830 (inferior_to_inferior_object): Change return type to
2831 inferior_object. All callers adjusted.
2832 (find_thread_object): Delete, bits factored out to ...
2833 (thread_to_thread_object): ... this new function.
2834 * python/py-infthread.c (create_thread_object): Use
2835 inferior_to_inferior_object.
2836 (thpy_is_stopped): Use thread pointer directly.
2837 (gdbpy_selected_thread): Use inferior_thread.
2838 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
2839 field, replaced with ...
2840 <thread>: ... this new field. All users adjusted.
2841 (btpy_insn_or_gap_new): Drop const.
2842 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
2843 callers adjusted.
2844 * python/py-record.c: Include "gdbthread.h".
2845 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2846 a ptid_t. All callers adjusted.
2847 (gdbpy_current_recording): Use inferior_thread.
2848 * python/py-record.h (recpy_record_object) <ptid>: Delete
2849 field, replaced with ...
2850 <thread>: ... this new field. All users adjusted.
2851 (recpy_element_object) <ptid>: Delete
2852 field, replaced with ...
2853 <thread>: ... this new field. All users adjusted.
2854 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2855 a ptid_t. All callers adjusted.
2856 * python/py-threadevent.c: Include "gdbthread.h".
2857 (get_event_thread): Use thread_to_thread_object.
2858 * python/python-internal.h (struct inferior_object): Forward
2859 declare.
2860 (find_thread_object, find_inferior_object): Delete declarations.
2861 (thread_to_thread_object, inferior_to_inferior_object): New
2862 declarations.
2863 * record-btrace.c: Include "inferior.h".
2864 (require_btrace_thread): Use inferior_thread.
2865 (record_btrace_frame_sniffer)
2866 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
2867 (get_thread_current_frame): Use scoped_restore_current_thread and
2868 switch_to_thread.
2869 (get_thread_current_frame): Use thread pointer directly.
2870 (record_btrace_replay_at_breakpoint): Use thread's inferior
2871 pointer directly.
2872 * record-full.c: Include "inferior.h".
2873 * regcache.c: Include "gdbthread.h".
2874 (get_thread_arch_regcache): Use the inferior's address space
2875 directly.
2876 (get_thread_regcache, registers_changed_thread): New.
2877 * regcache.h (get_thread_regcache(thread_info *thread)): New
2878 overload.
2879 (registers_changed_thread): New.
2880 (remote_target) <remote_detach_1>: Swap order of parameters.
2881 (remote_add_thread): <remote_add_thread>: Return the new thread.
2882 (get_remote_thread_info(ptid_t)): New overload.
2883 (remote_target::remote_notice_new_inferior): Use thread pointers
2884 directly.
2885 (remote_target::process_initial_stop_replies): Use
2886 thread_info::set_running.
2887 (remote_target::remote_detach_1, remote_target::detach)
2888 (extended_remote_target::detach): Adjust.
2889 * stack.c (frame_show_address): Use inferior_thread.
2890 * target-debug.h (target_debug_print_thread_info_pp): New.
2891 * target-delegates.c: Regenerate.
2892 * target.c (default_thread_address_space): Delete.
2893 (memory_xfer_partial_1): Use current_inferior.
2894 (target_detach): Use current_inferior.
2895 (target_thread_address_space): Delete.
2896 (generic_mourn_inferior): Use current_inferior.
2897 * target.h (struct target_ops) <thread_address_space>: Delete.
2898 (target_thread_address_space): Delete.
2899 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
2900 pointers directly.
2901 (delete_thread_1, delete_thread, delete_thread_silent): Take a
2902 thread pointer instead of a ptid_t. Adjust all callers.
2903 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
2904 (first_thread_of_process): Delete, replaced by ...
2905 (first_thread_of_inferior): ... this new function. All callers
2906 adjusted.
2907 (any_thread_of_process): Rename to ...
2908 (any_thread_of_inferior): ... this, and take an inferior pointer.
2909 (any_live_thread_of_process): Rename to ...
2910 (any_live_thread_of_inferior): ... this, and take an inferior
2911 pointer.
2912 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2913 (value_in_thread_stack_temporaries)
2914 (get_last_thread_stack_temporary): Take a thread pointer instead
2915 of a ptid_t. Adjust all callers.
2916 (thread_info::set_running): New.
2917 (validate_registers_access): Use inferior_thread.
2918 (can_access_registers_ptid): Rename to ...
2919 (can_access_registers_thread): ... this, and take a thread
2920 pointer.
2921 (print_thread_info_1): Adjust to compare thread pointers instead
2922 of ptids.
2923 (switch_to_no_thread, switch_to_thread): Make extern.
2924 (scoped_restore_current_thread::~scoped_restore_current_thread):
2925 Use m_thread pointer directly.
2926 (scoped_restore_current_thread::scoped_restore_current_thread):
2927 Use inferior_thread.
2928 (thread_command): Use thread pointer directly.
2929 (thread_num_make_value_helper): Use inferior_thread.
2930 * top.c (execute_command): Use inferior_thread.
2931 * tui/tui-interp.c: Include "inferior.h".
2932 * varobj.c (varobj_create): Use inferior_thread.
2933 (value_of_root_1): Use find_thread_global_id instead of
2934 global_thread_id_to_ptid.
2935
2936 2018-06-21 Alan Hayward <alan.hayward@arm.com>
2937
2938 * regcache.c (readable_regcache::read_part): Avoid memcpy when
2939 possible.
2940 (regcache::write_part): Likewise.
2941 (readable_regcache::cooked_read_part): Update comment.
2942 (readable_regcache::cooked_write_part): Likewise.
2943 * regcache.h: (readable_regcache::read_part): Likewise.
2944 (regcache::write_part): Likewise.
2945
2946 2018-06-21 Richard Bunt <richard.bunt@arm.com>
2947 Dirk Schubert <dirk.schubert@arm.com>
2948
2949 * aarch64-linux-nat.c (post_attach): New.
2950 (aarch64_linux_nat_target::post_attach): Override post_attach to
2951 record the number of hardware debug registers.
2952
2953 2018-06-20 Tom Tromey <tom@tromey.com>
2954
2955 * python/py-param.c (add_setshow_generic): Make parameters const.
2956 (parmpy_init): Update.
2957
2958 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
2959
2960 * regcache.h (regcache_cooked_read_ftype): Rename to...
2961 (register_read_ftype): ...this, change type to function_view.
2962 (class reg_buffer) <save>: Remove src parameter.
2963 (readonly_detached_regcache) <readonly_detached_regcache>: Make
2964 parameter non-const in first overload. Remove src parameter in
2965 second overload.
2966 * regcache.c (do_cooked_read): Remove.
2967 (readonly_detached_regcache::readonly_detached_regcache): Make
2968 parameter non-const, adjust call to other constructor.
2969 (reg_buffer::save): Remove src parameter.
2970 * frame.c (do_frame_register_read): Remove.
2971 (frame_save_as_regcache): Use lambda function.
2972 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
2973 parameter to ppu2spu_data *.
2974 (ppu2spu_sniffer): Use lambda function.
2975
2976 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
2977
2978 * record-full.c (record_full_target::insert_breakpoint): Remove
2979 "struct" keyword, add const.
2980
2981 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
2982
2983 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
2984 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
2985 * configure.ac: Remove AC_PREREQ, add missing quoting.
2986 * gnulib/configure.ac: Modernize usage of
2987 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
2988 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
2989 (AUTOMAKE_VERSION): Bump to 1.15.1.
2990 * configure: Re-generate.
2991 * config.in: Re-generate.
2992 * aclocal.m4: Re-generate.
2993 * gnulib/aclocal.m4: Re-generate.
2994 * gnulib/config.in: Re-generate.
2995 * gnulib/configure: Re-generate.
2996 * gnulib/import/Makefile.in: Re-generate.
2997
2998 2018-06-19 Pedro Alves <palves@redhat.com>
2999
3000 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
3001 (lookup_minimal_symbol_by_pc_section): ... here with
3002 gdb_assert_not_reached added.
3003
3004 2018-06-19 Pedro Alves <palves@redhat.com>
3005
3006 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
3007 parameter with a block parameter. Compare location's block symbol
3008 with the frame's block instead of addresses.
3009 (skip_inline_frames): Pass the current block instead of the
3010 frame's address. Break out as soon as we determine the frame
3011 should not be skipped.
3012
3013 2018-06-18 Tom Tromey <tom@tromey.com>
3014
3015 * solib-aix.c (solib_aix_get_section_offsets): Return
3016 unique_xmalloc_ptr.
3017 (solib_aix_solib_create_inferior_hook): Update.
3018
3019 2018-06-18 Tom Tromey <tom@tromey.com>
3020
3021 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
3022
3023 2018-06-18 Tom Tromey <tom@tromey.com>
3024
3025 * solib-frv.c (frv_relocate_main_executable): Use
3026 unique_xmalloc_ptr.
3027 * solib-dsbt.c (dsbt_relocate_main_executable): Use
3028 unique_xmalloc_ptr.
3029
3030 2018-06-18 Tom Tromey <tom@tromey.com>
3031
3032 * objfiles.h (inhibit_section_map_updates): Update.
3033 (resume_section_map_updates, resume_section_map_updates_cleanup):
3034 Remove.
3035 * solib-svr4.c (svr4_handle_solib_event): Update.
3036 * objfiles.c (inhibit_section_map_updates): Return
3037 scoped_restore_tmpl<int>.
3038 (resume_section_map_updates, resume_section_map_updates_cleanup):
3039 Remove.
3040
3041 2018-06-18 Tom Tromey <tom@tromey.com>
3042
3043 * valprint.h (read_string): Update.
3044 * valprint.c (read_string): Change type of "buffer".
3045 (val_print_string): Update.
3046 * python/py-value.c (valpy_string): Update.
3047 * language.h (struct language_defn) <la_get_string>: Change
3048 type of "buffer".
3049 (default_get_string, c_get_string): Update.
3050 * language.c (default_get_string): Change type of "buffer".
3051 * guile/scm-value.c (gdbscm_value_to_string): Update.
3052 * c-lang.c (c_get_string): Change type of "buffer".
3053
3054 2018-06-18 Tom Tromey <tom@tromey.com>
3055
3056 * ser-mingw.c (struct pipe_state_destroyer): New.
3057 (pipe_state_up): New typedef.
3058 (cleanup_pipe_state): Remove.
3059 (pipe_windows_open): Use pipe_state_up. Don't release argv.
3060
3061 2018-06-18 Tom Tromey <tom@tromey.com>
3062
3063 * rust-lang.h (rust_yyerror): Don't declare.
3064 * rust-lang.c (rust_language_defn): Update.
3065 * rust-exp.y (yyerror): Now static.
3066 * parse.c (parse_exp_in_context_1): Update.
3067 * p-lang.h (p_yyerror): Don't declare.
3068 * p-lang.c (p_language_defn): Update.
3069 * p-exp.y (yyerror): Now static.
3070 * opencl-lang.c (opencl_language_defn): Update.
3071 * objc-lang.c (objc_language_defn): Update.
3072 * m2-lang.h (m2_yyerror): Don't declare.
3073 * m2-lang.c (m2_language_defn): Update.
3074 * m2-exp.y (yyerror): Now static.
3075 * language.h (struct language_defn) <la_error>: Remove.
3076 * language.c (unk_lang_error): Remove.
3077 (unknown_language_defn, auto_language_defn): Remove.
3078 * go-lang.h (go_yyerror): Don't declare.
3079 * go-lang.c (go_language_defn): Update.
3080 * go-exp.y (yyerror): Now static.
3081 * f-lang.h (f_yyerror): Don't declare.
3082 * f-lang.c (f_language_defn): Update.
3083 * f-exp.y (yyerror): Now static.
3084 * d-lang.h (d_yyerror): Don't declare.
3085 * d-lang.c (d_language_defn): Update.
3086 * d-exp.y (yyerror): Now static.
3087 * c-lang.h (c_yyerror): Don't declare.
3088 * c-lang.c (c_language_defn, cplus_language_defn)
3089 (asm_language_defn, minimal_language_defn): Update.
3090 * c-exp.y (yyerror): Now static.
3091 * ada-lang.h (ada_yyerror): Don't declare.
3092 * ada-lang.c (ada_language_defn): Update.
3093 * ada-exp.y (yyerror): Now static.
3094
3095 2018-06-18 Alan Hayward <alan.hayward@arm.com>
3096
3097 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
3098 (store_sveregs_to_thread): Likewise.
3099 (aarch64_linux_fetch_inferior_registers): Check for SVE.
3100 (aarch64_linux_store_inferior_registers): Likewise.
3101 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
3102 function.
3103 (aarch64_sve_regs_copy_to_regcache): Likewise.
3104 (aarch64_sve_regs_copy_from_regcache): Likewise.
3105 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
3106 declaration.
3107 (aarch64_sve_regs_copy_to_regcache): Likewise.
3108 (aarch64_sve_regs_copy_from_regcache): Likewise.
3109 (sve_context): Structure from Linux headers.
3110 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
3111 (SVE_SIG_ZREG_SIZE): Likewise.
3112 (SVE_SIG_PREG_SIZE): Likewise.
3113 (SVE_SIG_FFR_SIZE): Likewise.
3114 (SVE_SIG_REGS_OFFSET): Likewise.
3115 (SVE_SIG_ZREGS_OFFSET): Likewise.
3116 (SVE_SIG_ZREG_OFFSET): Likewise.
3117 (SVE_SIG_ZREGS_SIZE): Likewise.
3118 (SVE_SIG_PREGS_OFFSET): Likewise.
3119 (SVE_SIG_PREG_OFFSET): Likewise.
3120 (SVE_SIG_PREGS_SIZE): Likewise.
3121 (SVE_SIG_FFR_OFFSET): Likewise.
3122 (SVE_SIG_REGS_SIZE): Likewise.
3123 (SVE_SIG_CONTEXT_SIZE): Likewise.
3124 (SVE_PT_REGS_MASK): Likewise.
3125 (SVE_PT_REGS_FPSIMD): Likewise.
3126 (SVE_PT_REGS_SVE): Likewise.
3127 (SVE_PT_VL_INHERIT): Likewise.
3128 (SVE_PT_VL_ONEXEC): Likewise.
3129 (SVE_PT_REGS_OFFSET): Likewise.
3130 (SVE_PT_FPSIMD_OFFSET): Likewise.
3131 (SVE_PT_FPSIMD_SIZE): Likewise.
3132 (SVE_PT_SVE_ZREG_SIZE): Likewise.
3133 (SVE_PT_SVE_PREG_SIZE): Likewise.
3134 (SVE_PT_SVE_FFR_SIZE): Likewise.
3135 (SVE_PT_SVE_FPSR_SIZE): Likewise.
3136 (SVE_PT_SVE_FPCR_SIZE): Likewise.
3137 (__SVE_SIG_TO_PT): Likewise.
3138 (SVE_PT_SVE_OFFSET): Likewise.
3139 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
3140 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
3141 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
3142 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
3143 (SVE_PT_SVE_PREG_OFFSET): Likewise.
3144 (SVE_PT_SVE_PREGS_SIZE): Likewise.
3145 (SVE_PT_SVE_FFR_OFFSET): Likewise.
3146 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
3147 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
3148 (SVE_PT_SVE_SIZE): Likewise.
3149 (SVE_PT_SIZE): Likewise.
3150 (HAS_SVE_STATE): New define.
3151
3152 2018-06-18 Alan Hayward <alan.hayward@arm.com>
3153
3154 * nat/aarch64-sve-linux-sigcontext.h: New file.
3155 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
3156 new files.
3157 (SVE_VQ_MIN): Likewise.
3158 (SVE_VQ_MAX): Likewise.
3159 (SVE_VL_MIN): Likewise.
3160 (SVE_VL_MAX): Likewise.
3161 (SVE_NUM_ZREGS): Likewise.
3162 (SVE_NUM_PREGS): Likewise.
3163 (sve_vl_valid): Likewise.
3164 (struct user_sve_header): Likewise.
3165
3166 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
3167 Richard Bunt <Richard.Bunt@arm.com>
3168
3169 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
3170 was requested by GDB.
3171
3172 2018-06-15 Tom de Vries <tdevries@suse.de>
3173
3174 * MAINTAINERS (Write After Approval): Add Tom de Vries.
3175
3176 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
3177
3178 * gnulib/update-gnulib.sh: Print expected versions of
3179 autoconf/aclocal.
3180
3181 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
3182
3183 * arch-utils.c (default_type_align): Use type_length_units.
3184 * gdbtypes.c (type_align): Use type_length_units.
3185
3186 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3187
3188 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
3189 of 'define' command.
3190
3191 2018-06-14 Tom de Vries <tdevries@suse.de>
3192
3193 PR cli/22573
3194 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
3195 get_no_prettyformat_print_options.
3196
3197 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
3198
3199 * sparc-nat.h: Include target.h.
3200 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
3201 <fetch_registers>: Remove this argument in function call.
3202 <store_registers>: Remove this argument in function call, remove
3203 extra semicolon.
3204 <low_forget_process>: Call sparc64_forget_process instead of
3205 sparc_forget_process.
3206
3207 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3208
3209 * procfs.c (_initialize_procfs): Use add_inf_child_target.
3210 (procfs_target::make_corefile_notes): Adjust to new
3211 target_read_alloc return type.
3212
3213 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3214 Stephen Roberts <stephen.roberts@arm.com>
3215
3216 PR gdb/22882
3217 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
3218 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
3219 Move should_notify_stop local into more inner scope.
3220
3221 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3222 Stephen Roberts <stephen.roberts@arm.com>
3223
3224 PR gdb/22882
3225 * infrun.c (resume_1): Add call to mark_async_event_handler.
3226
3227 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3228
3229 * infrun.c (do_target_wait): Change old version of $pc printed.
3230
3231 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
3232
3233 * dwarf2read.c (read_index_from_section): Rename to...
3234 (read_gdb_index_from_section): ... this, update all callers.
3235 (dwarf2_read_index): Rename to...
3236 (dwarf2_read_gdb_index): ... this, update all callers.
3237
3238 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
3239
3240 * gdb/hppa-linux-nat.c
3241 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
3242 hppa_linux_nat_target::fetch_registers.
3243
3244 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3245
3246 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
3247 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
3248 (AARCH64_DWARF_SVE_FFR): Likewise.
3249 (AARCH64_DWARF_SVE_P0): Likewise.
3250 (AARCH64_DWARF_SVE_Z0): Likewise.
3251
3252 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3253
3254 * common/common-regcache.h (raw_compare): New function.
3255 * regcache.c (regcache::raw_compare): Likewise.
3256 * regcache.h (regcache::raw_compare): New declaration.
3257
3258 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3259
3260 * common/common-regcache.h (reg_buffer_common): New structure.
3261 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
3262 (reg_buffer::raw_supply): Likewise.
3263 (reg_buffer::raw_supply_integer): Likewise.
3264 (reg_buffer::raw_supply_zeroed): Likewise.
3265 (reg_buffer::raw_collect): Likewise.
3266 (reg_buffer::raw_collect_integer): Likewise.
3267 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
3268 (reg_buffer::raw_supply): Likewise.
3269 (reg_buffer::raw_supply_integer): Likewise.
3270 (reg_buffer::raw_supply_zeroed): Likewise.
3271 (reg_buffer::raw_collect): Likewise.
3272 (reg_buffer::raw_collect_integer): Likewise.
3273
3274 2018-06-10 Tom Tromey <tom@tromey.com>
3275
3276 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
3277 (class remote_state) <stop_reply_queue>: Now std::vector.
3278 (remote_state::~remote_state)
3279 (remote_target::stop_reply_queue_length): Update.
3280 (struct queue_iter_param, remove_child_of_pending_fork)
3281 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
3282 (check_pending_event_prevents_wildcard_vcont_callback)
3283 (remove_stop_reply_for_inferior)
3284 (remove_stop_reply_of_remote_state)
3285 (remote_notif_remove_once_on_match)
3286 (stop_reply_match_ptid_and_ws)
3287 (remote_kill_child_of_pending_fork): Remove.
3288 (remote_target::remove_new_fork_children)
3289 (remote_target::check_pending_events_prevent_wildcard_vcont)
3290 (remote_target::discard_pending_stop_replies)
3291 (remote_target::discard_pending_stop_replies_in_queue)
3292 (remote_target::remote_notif_remove_queued_reply)
3293 (remote_target::queued_stop_reply)
3294 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
3295 (remote_target::wait, remote_target::kill_new_fork_children)
3296 (remote_target::async): Update.
3297
3298 2018-06-10 Tom Tromey <tom@tromey.com>
3299
3300 * record-full.c (record_full_arch_list_cleanups): Remove.
3301 (record_full_message): Use try/catch.
3302 (record_full_wait_cleanups): Remove.
3303 (record_full_wait_1): Use try/catch.
3304 (record_full_restore): Likewise.
3305
3306 2018-06-10 Tom Tromey <tom@tromey.com>
3307
3308 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
3309 declare VEC. Add constructor.
3310 <in_target_beneath>: Now bool.
3311 (record_full_breakpoints): Now a std::vector, static.
3312 (record_full_sync_record_breakpoints)
3313 (record_full_init_record_breakpoints)
3314 (record_full_target::insert_breakpoint)
3315 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
3316
3317 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
3318
3319 * dwarf2read.c (process_cu_includes): Remove struct keyword.
3320 * serial.c (serial_interface_lookup): Remove struct keyword.
3321
3322 2018-06-10 Tom Tromey <tom@tromey.com>
3323
3324 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
3325 method.
3326 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
3327 a method.
3328 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
3329 method.
3330 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
3331 "beneath" as a method.
3332 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
3333 Use "beneath" as a method.
3334
3335 2018-06-10 Tom Tromey <tom@tromey.com>
3336
3337 * tracefile.c (struct trace_file_writer_deleter): New.
3338 <operator()>: Rename from trace_file_writer_xfree.
3339 (trace_file_writer_up): New typedef.
3340 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
3341
3342 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
3343
3344 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
3345 <m_registers, m_register_status>: Change type to
3346 std::unique_ptr.
3347 * regcache.c (reg_buffer::reg_buffer): Use new instead of
3348 XCNEWVEC.
3349
3350 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
3351
3352 * common/common-regcache.h (enum register_status): Add
3353 underlying type "signed char".
3354 * regcache.h (reg_buffer) <m_register_status>: Change type to
3355 register_status *.
3356 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
3357 register_status instead of signed char.
3358 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
3359 (reg_buffer::get_register_status): Remove cast.
3360 (readable_regcache::raw_read): Remove cast.
3361 (readable_regcache::cooked_read): Remove cast.
3362
3363 2018-06-09 Tom Tromey <tom@tromey.com>
3364
3365 * source.c (reverse_search_command, forward_search_command): Use
3366 scoped_fd.
3367
3368 2018-06-09 Tom Tromey <tom@tromey.com>
3369
3370 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
3371 (serial_ops_list): Now static, std::vector.
3372 (serial_interface_lookup, serial_add_interface): Update.
3373
3374 2018-06-09 Tom Tromey <tom@tromey.com>
3375
3376 * dwarf2read.c (process_cu_includes): Update.
3377 (process_full_comp_unit): Update.
3378 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
3379 std::vector.
3380
3381 2018-06-08 Paul Koning <paul_koning@dell.com>
3382
3383 PR gdb/23252
3384
3385 * python/python.c (do_start_initialization):
3386 Avoid call to internal Python API.
3387 (init__gdb_module): New function.
3388
3389 2018-06-08 Gary Benson <gbenson@redhat.com>
3390
3391 * linux-thread-db.c (valprint.h): New include.
3392 (struct check_thread_db_info): New structure.
3393 (check_thread_db_on_load, tdb_testinfo): New static globals.
3394 (check_thread_db, check_thread_db_callback): New functions.
3395 (try_thread_db_load_1): Run integrity checks if requested.
3396 (maintenance_check_libthread_db): New function.
3397 (_initialize_thread_db): Register "maint check libthread-db"
3398 and "maint set/show check-libthread-db".
3399 * NEWS: Mention the above new commands.
3400
3401 2018-06-08 Tom Tromey <tom@tromey.com>
3402
3403 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
3404 now a method.
3405
3406 2018-06-08 Tom Tromey <tom@tromey.com>
3407
3408 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
3409
3410 2018-06-08 Tom Tromey <tom@tromey.com>
3411
3412 * common/btrace-common.h (struct btrace_data): Add constructor,
3413 destructor, move assignment operator.
3414 <empty, clear, fini>: New methods.
3415 <format>: Initialize.
3416 (btrace_data_init, btrace_data_fini, btrace_data_clear)
3417 (btrace_data_empty): Don't declare.
3418 * common/btrace-common.c (btrace_data_init): Remove.
3419 (btrace_data::fini): Rename from btrace_data_fini.
3420 (btrace_data::empty): Rename from btrace_data_empty.
3421 (btrace_data::clear): Rename from btrace_data_clear. Return
3422 bool.
3423 * btrace.h (make_cleanup_btrace_data): Don't declare.
3424 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
3425 (parse_xml_btrace): Update.
3426 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
3427 (maint_btrace_clear_packet_history_cmd): Update.
3428
3429 2018-06-07 Pedro Alves <palves@redhat.com>
3430
3431 * target.h (target_ops) <beneath>: Now a method. All references
3432 updated.
3433 (class target_stack): New.
3434 * target.c (g_target_stack): New.
3435 (g_current_top_target): Delete.
3436 (current_top_target): Get the top target out of g_target_stack.
3437 (target_stack::push, target_stack::unpush): New.
3438 (push_target, unpush_target): Reimplement.
3439 (target_is_pushed): Reimplement in terms of g_target_stack.
3440 (target_ops::beneath, target_stack::find_beneath): New.
3441
3442 2018-06-07 Pedro Alves <palves@redhat.com>
3443
3444 * target.h (find_target_beneath): Delete declaration.
3445 * target.c (find_target_beneath): Delete definition.
3446 * aix-thread.c: All callers of find_target_beneath adjusted to
3447 call target_ops::beneath instead.
3448 * bsd-uthread.c: Likewise.
3449 * linux-thread-db.c: Likewise.
3450 * ravenscar-thread.c: Likewise.
3451 * sol-thread.c: Likewise.
3452 * spu-multiarch.c: Likewise.
3453
3454 2018-06-07 Pedro Alves <palves@redhat.com>
3455
3456 * target.h (target_ops) <beneath>: Now a method. All references
3457 updated.
3458 (target_ops) <m_beneath>: New.
3459 * target.c (target_ops::beneath): New.
3460 * corelow.c: Adjust all references to target_ops::beneath.
3461 * linux-thread-db.c: Likewise.
3462 * make-target-delegates: Likewise.
3463 * record-btrace.c: Likewise.
3464 * record-full.c: Likewise.
3465 * remote.c: Likewise.
3466 * target.c: Likewise.
3467 * target-delegates.c: Regenerate.
3468
3469 2018-06-07 Pedro Alves <palves@redhat.com>
3470
3471 * target.h (target_stack): Delete.
3472 (current_top_target): Declare function.
3473 * target.c (target_stack): Delete.
3474 (g_current_top_target): New.
3475 (current_top_target): New function.
3476 * auxv.c: Use current_top_target instead of target_stack
3477 throughout.
3478 * avr-tdep.c: Likewise.
3479 * breakpoint.c: Likewise.
3480 * corefile.c: Likewise.
3481 * elfread.c: Likewise.
3482 * eval.c: Likewise.
3483 * exceptions.c: Likewise.
3484 * frame.c: Likewise.
3485 * gdbarch-selftests.c: Likewise.
3486 * gnu-v3-abi.c: Likewise.
3487 * ia64-tdep.c: Likewise.
3488 * ia64-vms-tdep.c: Likewise.
3489 * infcall.c: Likewise.
3490 * infcmd.c: Likewise.
3491 * infrun.c: Likewise.
3492 * linespec.c: Likewise.
3493 * linux-tdep.c: Likewise.
3494 * minsyms.c: Likewise.
3495 * ppc-linux-nat.c: Likewise.
3496 * ppc-linux-tdep.c: Likewise.
3497 * procfs.c: Likewise.
3498 * regcache.c: Likewise.
3499 * remote.c: Likewise.
3500 * rs6000-tdep.c: Likewise.
3501 * s390-linux-nat.c: Likewise.
3502 * s390-tdep.c: Likewise.
3503 * solib-aix.c: Likewise.
3504 * solib-darwin.c: Likewise.
3505 * solib-dsbt.c: Likewise.
3506 * solib-spu.c: Likewise.
3507 * solib-svr4.c: Likewise.
3508 * solib-target.c: Likewise.
3509 * sparc-tdep.c: Likewise.
3510 * sparc64-tdep.c: Likewise.
3511 * spu-tdep.c: Likewise.
3512 * symfile.c: Likewise.
3513 * symtab.c: Likewise.
3514 * target-descriptions.c: Likewise.
3515 * target-memory.c: Likewise.
3516 * target.c: Likewise.
3517 * target.h: Likewise.
3518 * tracefile-tfile.c: Likewise.
3519 * tracepoint.c: Likewise.
3520 * valops.c: Likewise.
3521 * valprint.c: Likewise.
3522 * value.c: Likewise.
3523 * windows-tdep.c: Likewise.
3524 * mi/mi-main.c: Likewise.
3525
3526 2018-06-07 Tom Tromey <tom@tromey.com>
3527
3528 * valprint.h (build_address_symbolic): Declare.
3529 * printcmd.c (print_address_symbolic): Update.
3530 (build_address_symbolic): Change "name" and "filename" to
3531 std::string.
3532 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
3533 Update.
3534 * defs.h (build_address_symbolic): Remove declaration.
3535
3536 2018-06-07 Alan Hayward <alan.hayward@arm.com>
3537
3538 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
3539 (aarch64_vnv_type): Add function.
3540 (aarch64_pseudo_register_name): Add V regs for SVE.
3541 (aarch64_pseudo_register_type): Likewise.
3542 (aarch64_pseudo_register_reggroup_p): Likewise.
3543 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
3544 (aarch64_pseudo_read_value): Add V regs for SVE.
3545 (aarch64_pseudo_write_2): Use V0 offset for SVE
3546 (aarch64_pseudo_write): Add V regs for SVE.
3547 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
3548
3549 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
3550
3551 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
3552 (sve_vl_from_vq): Likewise.
3553
3554 2018-06-05 Tom Tromey <tom@tromey.com>
3555
3556 * cli/cli-cmds.c (show_version): Update.
3557 * top.c (print_gdb_version): Add "interactive" parameter.
3558 Update.
3559 * main.c (captured_main_1): Update.
3560 * top.h (print_gdb_version): Add "interactive" parameter and a
3561 comment.
3562
3563 2018-06-05 David Malcolm <dmalcolm@redhat.com>
3564
3565 * common/enum-flags.h: Add trailing semicolon to example in
3566 comment.
3567
3568 2018-06-05 Tom Tromey <tom@tromey.com>
3569
3570 PR cli/12326:
3571 * NEWS: Add entry about pager.
3572 * utils.c (pagination_disabled_for_command): New global.
3573 (prompt_for_continue): Allow "c" response to prompt.
3574 (reinitialize_more_filter): Clear
3575 pagination_disabled_for_command.
3576 (fputs_maybe_filtered): Check pagination_disabled_for_command.
3577
3578 2018-06-04 Tom Tromey <tom@tromey.com>
3579
3580 * ada-lang.h (ada_lookup_symbol_list): Update.
3581 * ada-lang.c (resolve_subexp): Update.
3582 (symbols_are_identical_enums): Change type of syms. Remove nsyms
3583 parameter.
3584 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
3585 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
3586 results parameter to std::vector.
3587 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
3588 Update.
3589 * ada-exp.y (block_lookup): Update.
3590 (select_possible_type_sym): Change type of syms. Remove nsyms
3591 parameter.
3592 (write_var_or_type, write_name_assoc): Update.
3593
3594 2018-06-04 Joel Brobecker <brobecker@adacore.com>
3595
3596 * windows-nat.c (windows_nat_target::xfer_partial): Return
3597 TARGET_XFER_E_IO if we need to delegate to the target beneath
3598 but BENEATH is NULL.
3599
3600 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
3601
3602 * Makefile.in (config.status): Add configure.nat as a
3603 dependency.
3604
3605 2018-06-04 Tom Tromey <tom@tromey.com>
3606
3607 * cp-name-parser.y (cpname_state): Add method declarations.
3608 (HANDLE_QUAL): Update.
3609 (cpname_state::d_grab, cpname_state::fill_comp)
3610 (cpname_state::make_operator, cpname_state::make_dtor)
3611 (cpname_state::make_builtin_type, cpname_state::make_name)
3612 (cpname_state::d_qualify, cpname_state::d_int_type)
3613 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
3614 (%union): Move earlier.
3615
3616 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3617
3618 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
3619
3620 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3621
3622 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
3623 (aarch64_pseudo_write_1): Likewise.
3624 (aarch64_pseudo_read_value): Use helper.
3625 (aarch64_pseudo_write): Likewise.
3626
3627 2018-06-04 Pedro Alves <palves@redhat.com>
3628
3629 * darwin-nat.c (darwin_ops): Delete.
3630 (darwin_attach_pid): Use get_native_target.
3631
3632 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3633
3634 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
3635 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
3636
3637 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3638
3639 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
3640 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
3641 (aarch64_gdbarch_init): Check for SVE.
3642 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
3643
3644 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3645
3646 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
3647 * aarch64-tdep.h (aarch64_read_description): Likewise.
3648 * arch/aarch64.c (aarch64_create_target_description): Likewise.
3649 * arch/aarch64.h (aarch64_create_target_description): Likewise.
3650 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
3651 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
3652 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
3653
3654 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
3655
3656 * value.c (value_fetch_lazy_bitfield): New.
3657 (value_fetch_lazy_memory): New.
3658 (value_fetch_lazy_register): New.
3659 (value_fetch_lazy): Factor out to smaller functions.
3660
3661 2018-06-01 Tom Tromey <tom@tromey.com>
3662
3663 * cp-name-parser.y (backslashable, represented): Now const.
3664
3665 2018-06-01 Tom Tromey <tom@tromey.com>
3666
3667 * cp-name-parser.y: Include parser-defs.h.
3668 (parser_fprintf): Remove declaration.
3669
3670 2018-06-01 Tom Tromey <tom@tromey.com>
3671
3672 * cp-name-parser.y: Use %pure-parser, %lex-param, and
3673 %parse-param.
3674 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
3675 (global_result): Remove globals.
3676 (struct cpname_state): New.
3677 (yyparse): Don't declare.
3678 (yylex, yyerror): Move declarations after %union.
3679 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
3680 (make_name): Add state parameter.
3681 Update all callers.
3682 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
3683 parameter.
3684 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
3685 Update.
3686 (yylex): Add lvalp, state parameters.
3687 (yyerror): Add state parameter.
3688 (cp_demangled_name_to_comp): Update.
3689
3690 2018-06-01 Tom Tromey <tom@tromey.com>
3691
3692 * cp-name-parser.y (parser_fprintf): Declare.
3693 (GDB_YY_REMAP_PREFIX): Define.
3694 Include yy-remap.h. Don't redefine yy* identifiers.
3695
3696 2018-06-01 Tom Tromey <tom@tromey.com>
3697
3698 * python/py-type.c (typy_legacy_template_argument): Update.
3699 * cp-support.h (cp_demangled_name_to_comp): Update.
3700 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
3701 parameter to be a "std::string *".
3702 (main): Update.
3703
3704 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
3705
3706 * ada-lex.l: Include "diagnostics.h" instead of
3707 "common/diagnostics.h".
3708 * unittests/environ-selftests.c: Likewise.
3709 * common/diagnostics.h: Moved to ../include.
3710
3711 2018-06-01 Joel Brobecker <brobecker@adacore.com>
3712
3713 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
3714 to language_mode_manual while calling breakpoint_re_set_one.
3715
3716 2018-06-01 Tom Tromey <tom@tromey.com>
3717
3718 * valops.c (value_cast_structs, destructor_name_p): Update.
3719 * symtab.c (gdb_mangle_name): Update.
3720 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
3721 Update.
3722 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
3723 (pascal_object_print_value_fields, pascal_object_print_value):
3724 Update.
3725 * p-typeprint.c (pascal_type_print_derivation_info): Update.
3726 * linespec.c (find_methods): Update.
3727 * gdbtypes.h (type_name_no_tag): Remove.
3728 (type_name_or_error): Rename from type_name_no_tag_or_error.
3729 * gdbtypes.c (type_name_no_tag): Remove.
3730 (type_name_or_error): Rename from type_name_no_tag_or_error.
3731 (lookup_struct_elt_type, check_typedef): Update.
3732 * expprint.c (print_subexp_standard): Update.
3733 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
3734 * d-namespace.c (d_lookup_nested_symbol): Update.
3735 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
3736 (cp_print_class_member): Update.
3737 * cp-namespace.c (cp_lookup_nested_symbol): Update.
3738 * completer.c (add_struct_fields): Update.
3739 * c-typeprint.c (cp_type_print_derivation_info)
3740 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
3741 Update.
3742 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
3743 (ada_prefer_type, ada_is_exception_sym): Update.
3744
3745 2018-06-01 Tom Tromey <tom@tromey.com>
3746
3747 * valops.c (enum_constant_from_type, value_namespace_elt)
3748 (value_maybe_namespace_elt): Update.
3749 * valarith.c (find_size_for_pointer_math): Update.
3750 * target-descriptions.c (make_gdb_type): Update.
3751 * symmisc.c (print_symbol): Update.
3752 * stabsread.c (define_symbol, read_type)
3753 (complain_about_struct_wipeout, add_undefined_type)
3754 (cleanup_undefined_types_1): Update.
3755 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
3756 (rust_range_type_p, val_print_struct, rust_print_struct_def)
3757 (rust_internal_print_type, rust_composite_type)
3758 (rust_evaluate_funcall, rust_evaluate_subexp)
3759 (rust_inclusive_range_type_p): Update.
3760 * python/py-type.c (typy_get_tag): Update.
3761 * p-typeprint.c (pascal_type_print_base): Update.
3762 * mdebugread.c (parse_symbol, parse_type): Update.
3763 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
3764 Update.
3765 * guile/scm-type.c (gdbscm_type_tag): Update.
3766 * go-lang.c (sixg_string_p): Update.
3767 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
3768 Update.
3769 * gdbtypes.h (struct main_type) <tag_name>: Remove.
3770 (TYPE_TAG_NAME): Remove.
3771 * gdbtypes.c (type_name_no_tag): Simplify.
3772 (check_typedef, check_types_equal, recursive_dump_type)
3773 (copy_type_recursive, arch_composite_type): Update.
3774 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
3775 in summary mode when needed.
3776 * eval.c (evaluate_funcall): Update.
3777 * dwarf2read.c (fixup_go_packaging, read_structure_type)
3778 (process_structure_scope, read_enumeration_type)
3779 (read_namespace_type, read_module_type, determine_prefix): Update.
3780 * cp-support.c (inspect_type): Update.
3781 * coffread.c (process_coff_symbol, decode_base_type): Update.
3782 * c-varobj.c (c_is_path_expr_parent): Update.
3783 * c-typeprint.c (c_type_print_base_struct_union): Update.
3784 (c_type_print_base_1): Update. Print struct/class/union/enum in
3785 summary when using C language.
3786 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
3787 (gen_maybe_namespace_elt): Update.
3788 * ada-lang.c (ada_type_name): Simplify.
3789 (empty_record, ada_template_to_fixed_record_type_1)
3790 (template_to_static_fixed_type)
3791 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
3792
3793 2018-06-01 Tom Tromey <tom@tromey.com>
3794
3795 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
3796 c_print_type.
3797 * c-typeprint.c (c_print_type_1): Add "language" parameter.
3798 (c_print_type): Update.
3799 (c_print_type): New overload.
3800 (c_type_print_varspec_prefix, c_type_print_args)
3801 (c_type_print_varspec_suffix, c_print_type_no_offsets)
3802 (c_type_print_base_struct_union, c_type_print_base_1)
3803 (cp_type_print_method_args): Add "language" parameter.
3804 (c_type_print_base): Update.
3805 * c-lang.h (c_print_type): Add new overload.
3806
3807 2018-06-01 Tom Tromey <tom@tromey.com>
3808
3809 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
3810 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
3811
3812 2018-06-01 Alan Hayward <alan.hayward@arm.com>
3813
3814 * aarch64-tdep.c (aarch64_sve_register_names): New const
3815 var.
3816 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
3817 (AARCH64_SVE_Z_REGS_NUM): New define.
3818 (AARCH64_SVE_P_REGS_NUM): Likewise.
3819 (AARCH64_SVE_NUM_REGS): Likewise.
3820
3821 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
3822
3823 * nat/linux-ptrace.h [__alpha__]
3824 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
3825 definitions.
3826
3827 2018-05-31 Maciej W. Rozycki <macro@mips.com>
3828
3829 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
3830 the endianness selected.
3831 * NEWS: Document `set endian auto' mode operation update.
3832
3833 2018-05-31 Alan Hayward <alan.hayward@arm.com>
3834
3835 * Makefile.in: Add new header.
3836 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
3837 (sve_vl_from_vg): Likewise.
3838 (sve_vq_from_vl): Likewise.
3839 (sve_vl_from_vq): Likewise.
3840 (sve_vq_from_vg): Likewise.
3841 (sve_vg_from_vq): Likewise.
3842 * configure.nat: Add new c file.
3843 * nat/aarch64-sve-linux-ptrace.c: New file.
3844 * nat/aarch64-sve-linux-ptrace.h: New file.
3845
3846 2018-05-31 Alan Hayward <alan.hayward@arm.com>
3847
3848 * aarch64-linux-nat.c (aarch64_linux_read_description):
3849 Add parmeter zero.
3850 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
3851 Likewise.
3852 * aarch64-tdep.c (tdesc_aarch64_list): Add.
3853 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
3854 (aarch64_gdbarch_init): Add parmeter zero.
3855 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
3856 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
3857 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
3858 parmeter.
3859 * doc/gdb.texinfo: Describe SVE feature
3860 * features/aarch64-sve.c: New file.
3861
3862 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
3863
3864 PR gdb/23210
3865 * gdbarch.sh (significant_addr_bit): Default to zero when
3866 not set by target architecture.
3867 * gdbarch.c: Re-generated.
3868 * utils.c (address_significant): Update.
3869
3870 2018-05-30 Joel Brobecker <brobecker@adacore.com>
3871
3872 * stack.c (func_command): Remove trailing newline in call to error.
3873
3874 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3875
3876 * regcache.h (regcache_raw_collect): Remove, update callers to
3877 use regcache::raw_collect.
3878 * regcache.c (regcache_raw_collect): Remove.
3879
3880 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3881
3882 * regcache.h (regcache_raw_supply): Remove, update callers to
3883 use detached_regcache::raw_supply.
3884 * regcache.c (regcache_raw_supply): Remove.
3885
3886 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3887
3888 * regcache.h (regcache_cooked_write_part): Remove, update
3889 callers to use regcache::cooked_write_part.
3890 * regcache.c (regcache_cooked_write_part): Remove.
3891
3892 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3893
3894 * regcache.h (regcache_cooked_read_part): Remove, update callers
3895 to use readable_regcache::cooked_read_part.
3896 * regcache.c (regcache_cooked_read_part): Remove.
3897
3898 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3899
3900 * regcache.h (regcache_cooked_read_value): Remove, update
3901 callers to use readable_regcache::cooked_read_value.
3902 * regcache.c (regcache_cooked_read_value): Remove.
3903
3904 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3905
3906 * regcache.h (regcache_cooked_write): Remove, update callers to
3907 use regcache::cooked_write.
3908 * regcache.c (regcache_cooked_write): Remove.
3909
3910 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3911
3912 * regcache.h (regcache_invalidate): Remove, update callers to
3913 use detached_regcache::invalidate instead.
3914 * regcache.c (regcache_invalidate): Remove.
3915
3916 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3917
3918 * regcache.h (regcache_raw_write_part): Remove, update callers
3919 to use regcache::raw_write_part instead.
3920 * regcache.c (regcache_raw_write_part): Remove.
3921
3922 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3923
3924 * regcache.h (regcache_raw_read_part): Remove, update callers to
3925 use readable_regcache::raw_read_part instead.
3926 * regcache.c (regcache_raw_read_part): Remove.
3927
3928 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3929
3930 * regcache.h (regcache_cooked_read): Remove, update callers to
3931 use readable_regcache::cooked_read instead.
3932 * regcache.c (regcache_cooked_read): Remove.
3933
3934 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3935
3936 * regcache.h (regcache_raw_write): Remove, update callers to use
3937 regcache::raw_write instead.
3938 * regcache.c (regcache_raw_write): Remove.
3939
3940 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3941
3942 * regcache.h (regcache_raw_read): Remove, update callers to use
3943 readable_regcache::raw_read instead.
3944 * regcache.c (regcache_raw_read): Remove.
3945
3946 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3947
3948 * regcache.h (regcache_raw_update): Remove, update callers to
3949 use readable_regcache::raw_update instead.
3950 * regcache.c (regcache_raw_update): Remove.
3951
3952 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3953
3954 * regcache.h (regcache_register_status): Remove, update callers
3955 to use reg_buffer::get_register_status directly instead.
3956 * regcache.c (regcache_register_status): Remove.
3957
3958 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3959
3960 * regcache.h (regcache_get_ptid): Remove, update all callers to
3961 call regcache::ptid instead.
3962 * regcache.c (regcache_get_ptid): Remove.
3963
3964 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3965
3966 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
3967
3968 2018-05-30 Pedro Alves <palves@redhat.com>
3969
3970 * common/common-exceptions.h (exception_rethrow): Use
3971 ATTRIBUTE_NORETURN.
3972
3973 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
3974
3975 * breakpoint.c (print_solib_event, check_status_catch_solib):
3976 Remove struct keyword in range-based for loops.
3977 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
3978 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
3979 Likewise.
3980 * linespec.c (find_superclass_methods, search_minsyms_for_name):
3981 Likewise.
3982 * symfile.c (addr_info_make_relative): Likewise.
3983 * thread.c (value_in_thread_stack_temporaries): Likewise.
3984
3985 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
3986
3987 PR gdb/16841
3988 * valops.c (value_struct_elt_for_reference): Call check_typedef on
3989 aggregate type to get its real type before accessing it.
3990
3991 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
3992
3993 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
3994 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
3995 * coff-pe-read.c (add_pe_forwarded_sym): Replace
3996 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
3997 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
3998 * jit.c (jit_breakpoint_re_set_internal): Likewise.
3999 * printcmd.c (info_address_command): Likewise.
4000
4001 2018-05-29 Tom Tromey <tom@tromey.com>
4002
4003 * windows-nat.c (handle_exception): Update fall-through comment.
4004
4005 2018-05-29 Tom Tromey <tom@tromey.com>
4006
4007 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
4008 (struct program_space) <added_solibs>: Now a std::vector.
4009 * breakpoint.c (print_solib_event): Update.
4010 (check_status_catch_solib): Update.
4011 * progspace.c (clear_program_space_solib_cache): Update.
4012 * solib.c (update_solib_list): Update.
4013
4014 2018-05-29 Tom Tromey <tom@tromey.com>
4015
4016 * python/py-type.c (typy_richcompare): Update.
4017 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
4018 * gdbtypes.h (types_deeply_equal): Return bool.
4019 (types_equal): Likewise.
4020 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
4021 declare VEC.
4022 (check_types_equal): Change worklist to std::vector. Return
4023 bool.
4024 (struct type_equality_entry): Add constructor.
4025 (compare_maybe_null_strings): Return bool.
4026 (check_types_worklist): Return bool. Change worklist to
4027 std::vector.
4028 (types_deeply_equal): Use std::vector.
4029 (types_equal): Return bool.
4030 (compare_maybe_null_strings): Simplify.
4031
4032 2018-05-29 Tom Tromey <tom@tromey.com>
4033
4034 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
4035
4036 2018-05-29 Tom Tromey <tom@tromey.com>
4037
4038 * objc-lang.h: Don't include cp-support.h.
4039 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
4040 declare VEC.
4041
4042 2018-05-27 Tom Tromey <tom@tromey.com>
4043
4044 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
4045
4046 2018-05-25 Tom Tromey <tom@tromey.com>
4047
4048 * value.c (value::location): Initialize.
4049
4050 2018-05-25 Tom Tromey <tom@tromey.com>
4051
4052 * dbxread.c (init_bincl_list): Remove.
4053 (bincl_list): Now a std::vector.
4054 (bincls_allocated, next_bincl): Remove.
4055 (free_bincl_list, do_free_bincl_list_cleanup)
4056 (make_cleanup_free_bincl_list): Remove.
4057 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
4058 unique_xmalloc_ptr.
4059 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
4060 (struct header_file_location): Add constructor.
4061 (add_bincl_to_list): Remove.
4062
4063 2018-05-25 Tom Tromey <tom@tromey.com>
4064
4065 * tui/tui.c (tui_enable): Update.
4066 * mi/mi-interp.c (mi_interp::init): Update.
4067 * interps.h (class interp) <name>: New method.
4068 <m_name>: Rename from name.
4069 (~scoped_restore_interp): Update.
4070 * interps.c (interp::interp): Update.
4071 (interp_add, interp_set, interp_lookup_existing)
4072 (current_interp_named_p): Update.
4073
4074 2018-05-25 Tom Tromey <tom@tromey.com>
4075
4076 * interps.c (interp_name): Remove.
4077 * mi/mi-interp.c (mi_interp::init): Update.
4078 * interps.h (interp_name): Remove.
4079 (~scoped_restore_interp): Update.
4080 * tui/tui.c (tui_enable): Update.
4081
4082 2018-05-25 Tom Tromey <tom@tromey.com>
4083
4084 * utils.c (fputs_maybe_filtered): Update.
4085 * linespec.c (decode_line_full): Update.
4086 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
4087 (mi_print_breakpoint_for_event, mi_solib_loaded)
4088 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4089 (mi_user_selected_context_changed): Update.
4090 * mi/mi-main.c (mi_execute_command): Update.
4091 * cli/cli-script.c (execute_control_command): Update.
4092 * python/python.c (execute_gdb_command): Update.
4093 * solib.c (info_sharedlibrary_command): Update.
4094 * interps.c (interp_ui_out): Remove.
4095 * interps.h (interp_ui_out): Remove.
4096
4097 2018-05-25 Tom Tromey <tom@tromey.com>
4098
4099 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
4100 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
4101 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
4102
4103 2018-05-25 Tom Tromey <tom@tromey.com>
4104
4105 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
4106 * interps.c (interp_exec): Use scoped_restore.
4107
4108 2018-05-25 Tom Tromey <tom@tromey.com>
4109
4110 * remote.c (remote_target::remote_file_get): Use
4111 gdb::byte_vector.
4112 (remote_target::remote_file_put): Likewise.
4113
4114 2018-05-25 Tom Tromey <tom@tromey.com>
4115
4116 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
4117 a std::string.
4118 (get_pe_section_index, add_pe_exported_sym): Update.
4119 (read_pe_exported_syms): Use gdb::def_vector.
4120
4121 2018-05-25 Tom Tromey <tom@tromey.com>
4122
4123 * frame.c (remove_prev_frame): Remove.
4124 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
4125
4126 2018-05-25 Maciej W. Rozycki <macro@mips.com>
4127
4128 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
4129 Remove prototypes.
4130 * mips-linux-nat.c (supply_fpregset): Always call
4131 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
4132 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
4133 `mips_fill_fpregset'.
4134 * mips-linux-tdep.c (mips_supply_fpregset)
4135 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
4136 (mips_fill_fpregset_wrapper): Remove functions.
4137 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
4138 (mips_linux_fpregset): Remove variable.
4139 (mips_linux_iterate_over_regset_sections): Use
4140 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
4141 (mips_linux_o32_sigframe_init): Remove comment.
4142
4143 2018-05-25 Pedro Alves <palves@redhat.com>
4144
4145 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
4146 (struct readahead_cache, struct packet_reg, struct
4147 remote_arch_state, class remote_state): Move higher up in the
4148 file.
4149 (remote_target::m_remote_state): Now an object instead of a pointer.
4150 (remote_target::get_remote_state): Adjust.
4151
4152 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
4153
4154 * stack.c (select_and_print_frame): Delete.
4155 (struct function_bounds): Move struct within function.
4156 (func_command): Most content moved into new function
4157 find_frame_for_function, use new function, print result, add
4158 function comment.
4159 (find_frame_for_function): New function, now returns a result.
4160
4161 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4162
4163 * stack.c (iterate_over_block_arg_vars): Fix comment.
4164 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
4165
4166 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
4167
4168 PR gdb/23203
4169 * frame.c
4170 (scoped_restore_selected_frame::scoped_restore_selected_frame):
4171 Define.
4172 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
4173 Define.
4174 * frame.h (class scoped_restore_selected_frame): New class.
4175 * stack.c (print_frame_local_vars): Remove catching and rethrowing
4176 of any exception, use scoped_restore_selected_frame to restore the
4177 frame instead.
4178
4179 2018-05-24 Pedro Alves <palves@redhat.com>
4180
4181 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
4182 override.
4183
4184 2018-05-23 Tom Tromey <tom@tromey.com>
4185
4186 * complaints.c (struct complaints): Remove.
4187 (symfile_complaint_book): Remove.
4188 (series): New global.
4189 (complaint_internal): Update.
4190 (clear_complaints): Update.
4191
4192 2018-05-23 Tom Tromey <tom@tromey.com>
4193
4194 * complaints.c (counters): New global.
4195 (struct complain): Remove.
4196 (struct complaints) <root>: Remove.
4197 (complaint_sentinel): Remove.
4198 (symfile_complaint_book): Update.
4199 (find_complaint) Remove.
4200 (complaint_internal, clear_complaints): Update.
4201
4202 2018-05-23 Tom Tromey <tom@tromey.com>
4203
4204 * complaints.c (struct complain) <file, line>: Remove.
4205 (find_complaint): Remove file, line parameters.
4206 (complaint_internal): Update.
4207
4208 2018-05-23 Tom Tromey <tom@tromey.com>
4209
4210 * complaints.c (vcomplaint): Remove.
4211 (complaint_internal) Merge in contents of vcomplaint.
4212
4213 2018-05-23 Tom Tromey <tom@tromey.com>
4214
4215 * complaints.c (struct complaints) <explanation>: Remove.
4216 (symfile_explanations): Remove.
4217 (symfile_complaint_book): Update.
4218 (vcomplaint): Update.
4219 (struct explanation): Remove.
4220
4221 2018-05-23 Tom Tromey <tom@tromey.com>
4222
4223 * complaints.c (symfile_complaints): Remove.
4224 (complaint_internal): Remove "complaints" parameter.
4225 (clear_complaints, vcomplaint): Remove "c" parameter.
4226 (get_complaints): Remove.
4227 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
4228 (dwarf2_debug_line_missing_file_complaint)
4229 (dwarf2_debug_line_missing_end_sequence_complaint)
4230 (dwarf2_complex_location_expr_complaint)
4231 (dwarf2_const_value_length_mismatch_complaint)
4232 (dwarf2_section_buffer_overflow_complaint)
4233 (dwarf2_macro_malformed_definition_complaint)
4234 (dwarf2_invalid_attrib_class_complaint)
4235 (create_addrmap_from_index, dw2_symtab_iter_next)
4236 (dw2_expand_marked_cus)
4237 (dw2_debug_names_iterator::find_vec_in_debug_names)
4238 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
4239 (create_debug_type_hash_table, init_cutu_and_read_dies)
4240 (partial_die_parent_scope, add_partial_enumeration)
4241 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
4242 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
4243 (read_import_statement, read_file_scope, create_dwo_cu_reader)
4244 (create_cus_hash_table, create_dwp_hash_table)
4245 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
4246 (dwarf2_rnglists_process, dwarf2_ranges_process)
4247 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
4248 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
4249 (handle_struct_member_die, process_structure_scope)
4250 (read_array_type, read_common_block, read_module_type)
4251 (read_tag_pointer_type, read_typedef, read_base_type)
4252 (read_subrange_type, load_partial_dies, partial_die_info::read)
4253 (partial_die_info::read, partial_die_info::read)
4254 (partial_die_info::read, read_checked_initial_length_and_offset)
4255 (dwarf2_string_attr, read_formatted_entries)
4256 (dwarf_decode_line_header)
4257 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4258 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
4259 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
4260 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
4261 (get_signatured_type, get_DW_AT_signature_type)
4262 (decode_locdesc, file_file_name, consume_improper_spaces)
4263 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
4264 (dwarf_decode_macro_bytes, dwarf_decode_macros)
4265 (dwarf2_symbol_mark_computed, set_die_type)
4266 (read_attribute_value): Update.
4267 * stap-probe.c (handle_stap_probe, get_stap_base_address):
4268 Update.
4269 * dbxread.c (unknown_symtype_complaint)
4270 (lbrac_mismatch_complaint, repeated_header_complaint)
4271 (set_namestring, function_outside_compilation_unit_complaint)
4272 (read_dbx_symtab, process_one_symbol): Update.
4273 * gdbtypes.c (stub_noname_complaint): Update.
4274 * windows-nat.c (handle_unload_dll): Update.
4275 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
4276 (decode_base_type): Update.
4277 * xcoffread.c (bf_notfound_complaint, ef_complaint)
4278 (eb_complaint, record_include_begin, record_include_end)
4279 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
4280 (process_xcoff_symbol, read_symbol)
4281 (function_outside_compilation_unit_complaint)
4282 (scan_xcoff_symtab): Update.
4283 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
4284 * buildsym.c (finish_block_internal, make_blockvector)
4285 (end_symtab_get_static_block, augment_type_symtab): Update.
4286 * dtrace-probe.c (dtrace_process_dof)
4287 (dtrace_static_probe_ops::get_probes): Update.
4288 * complaints.h (struct complaint): Don't declare.
4289 (symfile_complaints): Remove.
4290 (complaint_internal): Remove "complaints" parameter.
4291 (complaint): Likewise.
4292 (clear_complaints): Likewise.
4293 * symfile.c (syms_from_objfile_1, finish_new_objfile)
4294 (reread_symbols): Update.
4295 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
4296 (dwarf2_frame_cache, decode_frame_entry): Update.
4297 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
4298 * objc-lang.c (lookup_objc_class, lookup_child_selector)
4299 (info_selectors_command): Update.
4300 * macrotab.c (macro_include, check_for_redefinition)
4301 (macro_undef): Update.
4302 * objfiles.c (filter_overlapping_sections): Update.
4303 * stabsread.c (invalid_cpp_abbrev_complaint)
4304 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
4305 (define_symbol, error_type, read_type, rs6000_builtin_type)
4306 (stabs_method_name_from_physname, read_member_functions)
4307 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
4308 (attach_fields_to_type, complain_about_struct_wipeout)
4309 (read_range_type, read_args, common_block_start)
4310 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
4311 Update.
4312 * mdebugread.c (index_complaint, unknown_ext_complaint)
4313 (basic_type_complaint, bad_tag_guess_complaint)
4314 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
4315 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
4316 (parse_procedure, parse_lines)
4317 (function_outside_compilation_unit_complaint)
4318 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
4319 (bad_tag_guess_complaint, reg_value_complaint): Update.
4320 * cp-support.c (demangled_name_complaint): Update.
4321 * macroscope.c (sal_macro_scope): Update.
4322 * dwarf-index-write.c (class debug_names): Update.
4323
4324 2018-05-23 Tom Tromey <tom@tromey.com>
4325
4326 * complaints.c (clear_complaints): Remove "noisy" parameter.
4327 * complaints.h (clear_complaints): Update.
4328 * symfile.c (syms_from_objfile_1, finish_new_objfile)
4329 (reread_symbols): Update.
4330
4331 2018-05-23 Tom Tromey <tom@tromey.com>
4332
4333 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
4334 SUBSEQUENT_MESSAGE.
4335 (vcomplaint, clear_complaints): Update.
4336 (symfile_explanations): Remove some messages.
4337
4338 2018-05-23 Tom Tromey <tom@tromey.com>
4339
4340 * complaints.c (internal_complaint): Remove.
4341 * complaints.h (internal_complaint): Remove.
4342
4343 2018-05-22 Maciej W. Rozycki <macro@mips.com>
4344
4345 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
4346
4347 2018-05-22 Pedro Alves <palves@redhat.com>
4348
4349 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
4350 (remote_fileio_badfd, remote_fileio_return_errno)
4351 (remote_fileio_return_success, remote_fileio_func_open)
4352 (remote_fileio_func_open, remote_fileio_func_close)
4353 (remote_fileio_func_read, remote_fileio_func_write)
4354 (remote_fileio_func_lseek, remote_fileio_func_rename)
4355 (remote_fileio_func_unlink, remote_fileio_func_stat)
4356 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
4357 (remote_fileio_func_isatty, remote_fileio_func_system): Add
4358 remote_target parameter.
4359 (remote_fio_func_map) <func>: Add remote_target parameter.
4360 (do_remote_fileio_request, remote_fileio_request):
4361 * remote-fileio.h (remote_fileio_request):
4362 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
4363 remote_target parameter.
4364 (remote_notif_process, handle_notification): Adjust to pass down
4365 the remote.
4366 (remote_notif_state_allocate): Add remote_target parameter. Save
4367 it.
4368 * remote-notif.h (struct remote_target): Forward declare.
4369 (struct notif_client) <parse, ack, can_get_pending_events>: Add
4370 remote_target parameter.
4371 (struct remote_notif_state) <remote>: New field.
4372 (remote_notif_ack, remote_notif_parse): Add remote_target
4373 parameter.
4374 (remote_notif_state_allocate, remote_notif_state_allocate): Add
4375 remote_target parameter.
4376 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
4377 (threads_listing_context, rmt_thread_action, protocol_feature)
4378 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
4379 (packet_result, struct threads_listing_context, remote_state):
4380 Move definitions and declarations higher up.
4381 (remote_target) <~remote_target>: Declare.
4382 (remote_download_command_source, remote_file_put, remote_file_get)
4383 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
4384 (remote_hostio_pread_vFile, remote_hostio_send_command)
4385 (remote_hostio_set_filesystem, remote_hostio_open)
4386 (remote_hostio_close, remote_hostio_unlink, remote_state)
4387 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
4388 (get_memory_write_packet_size, get_memory_read_packet_size)
4389 (append_pending_thread_resumptions, remote_detach_1)
4390 (append_resumption, remote_resume_with_vcont)
4391 (add_current_inferior_and_thread, wait_ns, wait_as)
4392 (process_stop_reply, remote_notice_new_inferior)
4393 (process_initial_stop_replies, remote_add_thread)
4394 (btrace_sync_conf, remote_btrace_maybe_reopen)
4395 (remove_new_fork_children, kill_new_fork_children)
4396 (discard_pending_stop_replies, stop_reply_queue_length)
4397 (check_pending_events_prevent_wildcard_vcont)
4398 (discard_pending_stop_replies_in_queue, stop_reply)
4399 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
4400 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
4401 (remote_interrupt_as, remote_interrupt_ns)
4402 (remote_get_noisy_reply, remote_query_attached)
4403 (remote_add_inferior, remote_current_thread, get_current_thread)
4404 (set_thread, set_general_thread, set_continue_thread)
4405 (set_general_process, write_ptid)
4406 (remote_unpack_thread_info_response, remote_get_threadinfo)
4407 (parse_threadlist_response, remote_get_threadlist)
4408 (remote_threadlist_iterator, remote_get_threads_with_ql)
4409 (remote_get_threads_with_qxfer)
4410 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
4411 (get_offsets, remote_check_symbols, remote_supported_packet)
4412 (remote_query_supported, remote_packet_size)
4413 (remote_serial_quit_handler, remote_detach_pid)
4414 (remote_vcont_probe, remote_resume_with_hc)
4415 (send_interrupt_sequence, interrupt_query)
4416 (remote_notif_get_pending_events, fetch_register_using_p)
4417 (send_g_packet, process_g_packet, fetch_registers_using_g)
4418 (store_register_using_P, store_registers_using_G)
4419 (set_remote_traceframe, check_binary_download)
4420 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
4421 (remote_xfer_live_readonly_partial, remote_read_bytes)
4422 (remote_send_printf, remote_flash_write, readchar)
4423 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
4424 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
4425 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
4426 (extended_remote_disable_randomization, extended_remote_run)
4427 (send_environment_packet, extended_remote_environment_support)
4428 (extended_remote_set_inferior_cwd, remote_write_qxfer)
4429 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
4430 (packet_command): Now methods of ...
4431 (remote_target): ... this class.
4432 (m_remote_state) <remote_target>: New field.
4433 (struct remote_state) <stop_reply_queue,
4434 remote_async_inferior_event_token, wait_forever_enabled_p>: New
4435 fields.
4436 (remote_state::remote_state): Allocate stop_reply_queue.
4437 (remote_state): Delete global.
4438 (get_remote_state_raw): Delete.
4439 (remote_target::get_remote_state): Allocate m_remote_state on
4440 demand.
4441 (get_current_remote_target): New.
4442 (remote_ops, extended_remote_ops): Delete.
4443 (wait_forever_enabled_p, remote_async_inferior_event_token):
4444 Delete, moved to struct remote_state.
4445 (remote_target::close): Delete self. Destruction bits split to
4446 ...
4447 (remote_target::~remote_target): ... this.
4448 (show_memory_packet_size): Adjust to use
4449 get_current_remote_target.
4450 (struct protocol_feature) <func>: Add remote_target parameter.
4451 All callers adjusted.
4452 (curr_quit_handler_target): New.
4453 (remote_serial_quit_handler): Reimplement.
4454 (remote_target::open_1): Adjust to use get_current_remote_target.
4455 Heap-allocate remote_target/extended_remote_target instances.
4456 (vcont_builder::vcont_builder): Add remote_target parameter, and
4457 save it in m_remote. All callers adjusted.
4458 (vcont_builder::m_remote): New field.
4459 (vcont_builder::restart, vcont_builder::flush)
4460 (vcont_builder::push_action): Use it.
4461 (remote_target::commit_resume): Use it.
4462 (struct queue_iter_param) <remote>: New field.
4463 (remote_target::remove_new_fork_children): Fill in 'remote' field.
4464 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
4465 (check_pending_event_prevents_wildcard_vcont_callback)
4466 (remote_target::check_pending_events_prevent_wildcard_vcont)
4467 (remote_target::discard_pending_stop_replies)
4468 (remote_target::discard_pending_stop_replies_in_queue)
4469 (remote_target::remote_notif_remove_queued_reply): Fill in
4470 'remote' field.
4471 (remote_notif_get_pending_events): New.
4472 (remote_target::readchar, remote_target::remote_serial_write):
4473 Save/restore curr_quit_handler_target.
4474 (putpkt): New.
4475 (kill_new_fork_children): Fill in 'remote' field.
4476 (packet_command): Use get_current_remote_target, defer to
4477 remote_target method of same name.
4478 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
4479 parameter, and save it in m_remote. All callers adjusted.
4480 (scoped_remote_fd::release): Use m_remote.
4481 (scoped_remote_fd::m_remote): New field.
4482 (remote_file_put, remote_file_get, remote_file_delete): Use
4483 get_current_remote_target, defer to remote_target method of same
4484 name.
4485 (remote_btrace_reset): Add remote_state paremeter. Update all
4486 callers.
4487 (remote_async_inferior_event_handler). Pass down 'data'.
4488 (remote_new_objfile): Use get_current_remote_target.
4489 (remote_target::vcont_r_supported): New.
4490 (set_range_stepping): Use get_current_remote_target and
4491 remote_target::vcont_r_supported.
4492 (_initialize_remote): Don't allocate 'remote_state' and
4493 'stop_reply_queue' globals.
4494 * remote.h (struct remote_target): Forward declare.
4495 (getpkt, putpkt, remote_notif_get_pending_events): Add
4496 'remote_target' parameter.
4497
4498 2018-05-22 Pedro Alves <palves@redhat.com>
4499
4500 * remote.c (vcont_builder): Now a class. Make all data members
4501 private.
4502 (vcont_builder) <vcont_builder, restart, flush, push_action>:
4503 Declare methods.
4504 (vcont_builder_restart): Rename to ...
4505 (vcont_builder::restart): ... this.
4506 (vcont_builder_flush): Rename to ...
4507 (vcont_builder::flush): ... this.
4508 (vcont_builder_push_action): Rename to ...
4509 (vcont_builder::push_action): ... this.
4510 (remote_target::commit_resume): Adjust.
4511
4512 2018-05-22 Pedro Alves <palves@redhat.com>
4513
4514 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
4515 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
4516 (get_fixed_memory_packet_size): New.
4517 (get_memory_packet_size): Use it.
4518 (set_memory_packet_size): Don't override the config size with
4519 DEFAULT_MAX_MEMORY_PACKET_SIZE.
4520 (show_memory_packet_size): Use get_fixed_memory_packet_size.
4521 Don't refer to get_memory_packet_size if not connected to a remote
4522 target. Show "(default)" if configured size is 0.
4523
4524 2018-05-22 Pedro Alves <palves@redhat.com>
4525
4526 * remote.c (remote_target::mourn_inferior): Move
4527 discard_pending_stop_replies call here from ...
4528 (_initialize_remote): ... here.
4529
4530 2018-05-22 Pedro Alves <palves@redhat.com>
4531
4532 * remote.c (compare_section_command): Remove set_general_process
4533 call.
4534
4535 2018-05-22 Pedro Alves <palves@redhat.com>
4536
4537 * remote.c (struct packet_reg, struct remote_arch_state):
4538 Move higher up in the file.
4539 (remote_state) <m_arch_states>: Store remote_arch_state values
4540 instead of remote_arch_state pointers.
4541 (remote_state::get_remote_arch_state): Adjust.
4542
4543 2018-05-22 Pedro Alves <palves@redhat.com>
4544
4545 * remote.c: Include <unordered_map>.
4546 (remote_state): Now a class.
4547 (remote_state) <get_remote_arch_state>: Declare method.
4548 <get_remote_arch_state>: New field.
4549 (remote_arch_state) <remote_arch_state>: Declare ctor.
4550 <regs>: Now a unique_ptr.
4551 (remote_gdbarch_data_handle): Delete.
4552 (get_remote_arch_state): Delete.
4553 (remote_state::get_remote_arch_state): New.
4554 (get_remote_state): Adjust to call remote_state's
4555 get_remote_arch_state method.
4556 (init_remote_state): Delete, bits factored out to ...
4557 (remote_arch_state::remote_arch_state): ... this new method.
4558 (get_remote_packet_size, get_memory_packet_size)
4559 (process_g_packet, remote_target::fetch_registers)
4560 (remote_target::prepare_to_store, store_registers_using_G)
4561 (remote_target::store_registers, remote_target::get_trace_status):
4562 Adjust to call remote_state's method.
4563 (_initialize_remote): Remove reference to
4564 remote_gdbarch_data_handle.
4565
4566 2018-05-22 Pedro Alves <palves@redhat.com>
4567
4568 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
4569 pread>: New method declarations.
4570 (remote_target::open_1): Adjust.
4571 (readahead_cache_invalidate): Rename to ...
4572 (readahead_cache::invalidate): ... this, and adjust to be a class
4573 method.
4574 (readahead_cache_invalidate_fd): Rename to ...
4575 (readahead_cache::invalidate_fd): ... this, and adjust to be a
4576 class method.
4577 (remote_hostio_pwrite): Adjust.
4578 (remote_hostio_pread_from_cache): Rename to ...
4579 (readahead_cache::pread): ... this, and adjust to be a class
4580 method.
4581 (remote_hostio_close): Adjust.
4582
4583 2018-05-22 Pedro Alves <palves@redhat.com>
4584
4585 * remote.c (remote_hostio_close_cleanup): Delete.
4586 (class scoped_remote_fd): New.
4587 (remote_file_put, remote_file_get): Use it.
4588
4589 2018-05-22 Pedro Alves <palves@redhat.com>
4590
4591 (struct vCont_action_support): Use bool and initialize all fields.
4592 (struct readahead_cache): Initialize all fields.
4593 (remote_state): Use bool and initialize all fields.
4594 (remote_state::remote_state, remote_state::~remote_state): New.
4595 (new_remote_state): Delete.
4596 (_initialize_remote): Use new to allocate remote_state.
4597
4598 2018-05-22 Pedro Alves <palves@redhat.com>
4599 張俊芝 <zjz@zjz.name>
4600
4601 PR gdb/22973
4602 * c-exp.y: Include "c-support.h".
4603 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
4604 of tolower. Use c_ident_is_alpha to scan names.
4605 * c-lang.c: Include "c-support.h".
4606 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
4607 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
4608 * c-support.h: New file, with bits factored out from ...
4609 * cp-name-parser.y: ... this file.
4610 Include "c-support.h".
4611 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
4612 c-support.h and renamed.
4613 (symbol_end, yylex): Adjust.
4614
4615 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4616
4617 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
4618 parameter type to CORE_ADDR.
4619 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
4620 parameter type in declaration to CORE_ADDR.
4621 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
4622 target_auxv_search to get AT_HWCAP and use the result to get the
4623 target description.
4624 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
4625 to CORE_ADDR. Remove the cast of the return value to unsigned
4626 long. Fix error predicate of target_auxv_search.
4627 (ppc_linux_nat_target::read_description): Change the type of the
4628 hwcap variable to CORE_ADDR.
4629
4630 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4631
4632 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
4633 if the size of fpscr is larger than 32 bits.
4634
4635 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4636
4637 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
4638 (ppc32_linux_vsxregmap): New global.
4639 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
4640 regcache_supply_regset, and regcache_collect_regset.
4641 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
4642 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
4643 (fetch_vsx_register, store_vsx_register): Remove.
4644 (fetch_vsx_registers): Add regno parameter. Get regset using
4645 ppc_linux_vsxregset. Use regset to supply registers.
4646 (store_vsx_registers): Add regno parameter. Get regset using
4647 ppc_linux_vsxregset. Use regset to collect registers.
4648 (fetch_register): Call fetch_vsx_registers instead of
4649 fetch_vsx_register.
4650 (store_register): Call store_vsx_registers instead of
4651 store_vsx_register.
4652 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
4653 new regno parameter.
4654 (store_ppc_registers): Call store_vsx_registers with -1 for the
4655 new regno parameter.
4656 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
4657 (ppc_collect_vsxregset): Remove.
4658
4659 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4660
4661 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
4662 offset fields.
4663 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
4664 for vector register offset fields.
4665 (ppc64_fbsd_reg_offsets): Likewise.
4666 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4667 to vector register offset fields.
4668 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4669 to vector register offset fields.
4670 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
4671 vector register offset fields.
4672 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
4673 initializers for vector register offset fields.
4674 (rs6000_aix64_reg_offsets): Likewise.
4675 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
4676 (ppc_supply_vrregset): Remove.
4677 (ppc_collect_vrregset): Remove.
4678 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
4679 (ppc_linux_vrregset) : New function.
4680 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
4681 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
4682 (ppc32_linux_vrregset): Remove.
4683 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
4684 and use result instead of ppc32_linux_vrregset.
4685 (ppc32_linux_reg_offsets): Remove initializers for vector register
4686 offset fields.
4687 (ppc64_linux_reg_offsets): Likewise.
4688 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
4689 * ppc-linux-nat.c: Include regset.h.
4690 (gdb_vrregset_t): Adjust comment to account for little-endian
4691 mode.
4692 (supply_vrregset, fill_vrregset): Remove.
4693 (fetch_altivec_register, store_altivec_register): Remove.
4694 (fetch_altivec_registers): Add regno parameter. Get regset using
4695 ppc_linux_vrregset. Use regset to supply registers.
4696 (store_altivec_registers): Add regno parameter. Get regset using
4697 ppc_linux_vrregset. Use regset to collect registers.
4698 (fetch_register): Call fetch_altivec_registers instead of
4699 fetch_altivec_register.
4700 (store_register): Call store_altivec_registers instead of
4701 store_altivec_register.
4702 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
4703 the new regno parameter.
4704 (store_ppc_registers): Call store_altivec_registers with -1 for
4705 the new regno parameter.
4706
4707 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4708
4709 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
4710 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
4711 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
4712 (gdb_vrregset_t): Change array type size to
4713 PPC_LINUX_SIZEOF_VRREGSET.
4714 (gdb_vsxregset_t): Change array type size to
4715 PPC_LINUX_SIZEOF_VSXREGSET.
4716 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
4717 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
4718 PPC_LINUX_SIZEOF_VSXREGSET.
4719
4720 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4721
4722 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
4723 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
4724 nat/ppc-linux.c.
4725 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
4726 ppc_linux_target_wordsize with tid.
4727 (ppc_linux_nat_target::read_description): Call ppc_linux_target
4728 wordsize with tid.
4729 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
4730 (ppc64_64bit_inferior_p): Add static and inline specifiers.
4731 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
4732 tid parameter. Remove static specifier.
4733 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
4734 (ppc_linux_target_wordsize): New declaration.
4735
4736 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4737
4738 * arch/ppc-linux-common.c: New file.
4739 * arch/ppc-linux-common.h: New file.
4740 * arch/ppc-linux-tdesc.h: New file.
4741 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
4742 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
4743 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
4744 arch/ppc-linux-tdesc.h.
4745 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
4746 arch/ppc-linux-tdesc.h.
4747 (ppc_linux_nat_target::read_description): Remove target
4748 description matching code. Fill a ppc_linux_features struct and
4749 call ppc_linux_match_description with it. Move comment about ISA
4750 2.05 to ppc-linux-common.c.
4751 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
4752 arch/ppc-linux-tdesc.h.
4753 (ppc_linux_core_read_description): Remove target description
4754 matching code. Fill a ppc_linux_features struct and call
4755 ppc_linux_match_description with it.
4756 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
4757 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
4758 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
4759 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
4760 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
4761 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
4762 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
4763 (tdesc_powerpc_e500l): Remove.
4764
4765 2018-05-22 Joel Brobecker <brobecker@adacore.com>
4766
4767 * ada-lang.c (catch_assert_command): Pass empty string instead
4768 of NULL for excep_string argument.
4769
4770 2018-05-22 Maciej W. Rozycki <macro@mips.com>
4771
4772 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
4773 the width of the requested register exceeds the width of the
4774 `ptrace' data type.
4775
4776 2018-05-21 Tom Tromey <tom@tromey.com>
4777
4778 * printcmd.c (output_command): Remove.
4779 (output_command_const): Rename to output_command.
4780 * valprint.h (output_command): Rename from output_command_const.
4781 * tracepoint.c (trace_dump_actions): Call output_command.
4782
4783 2018-05-21 Tom Tromey <tom@tromey.com>
4784
4785 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4786 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
4787 * ada-lang.h (create_ada_exception_catchpoint): Update.
4788 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
4789 std::string.
4790 (create_excep_cond_exprs, ~ada_catchpoint)
4791 (should_stop_exception, print_one_exception)
4792 (print_mention_exception, print_recreate_exception): Update.
4793 (ada_get_next_arg): Remove.
4794 (catch_ada_exception_command_split): Use std::string. Change type
4795 of "excep_string", "cond_string".
4796 (catch_ada_exception_command): Update.
4797 (create_ada_exception_catchpoint): Change type of excep_string.
4798 (ada_exception_sal): Remove excep_string parameter.
4799 (~ada_catchpoint): Remove.
4800
4801 2018-05-21 Tom Tromey <tom@tromey.com>
4802
4803 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
4804 cleanup.
4805
4806 2018-05-21 Tom Tromey <tom@tromey.com>
4807
4808 * ada-lang.c (ada_exception_message_1, ada_exception_message):
4809 Return unique_xmalloc_ptr.
4810 (print_it_exception): Update.
4811
4812 2018-05-21 Tom Tromey <tom@tromey.com>
4813
4814 * tracepoint.c (trace_dump_actions): Use std::string.
4815
4816 2018-05-21 Tom Tromey <tom@tromey.com>
4817
4818 * symfile.c (reread_symbols): Use std::string for original_name.
4819
4820 2018-05-21 Tom Tromey <tom@tromey.com>
4821
4822 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
4823 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
4824 constructor.
4825
4826 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
4827
4828 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
4829 instance to...
4830 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
4831 * objfiles.c (get_objfile_bfd_data): Allocate
4832 objfile_per_bfd_storage with obstack_new when allocating on
4833 obstack.
4834
4835 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
4836
4837 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
4838 OBSTACK_ZALLOC.
4839 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
4840 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
4841 * mdebugread.c (mdebug_build_psymtabs): Likewise.
4842 (add_pending): Likewise.
4843 (parse_symbol): Likewise.
4844 (parse_partial_symbols): Likewise.
4845 (psymtab_to_symtab_1): Likewise.
4846 (new_psymtab): Likewise.
4847 (elfmdebug_build_psymtabs): Likewise.
4848 * minsyms.c (terminate_minimal_symbol_table): Likewise.
4849 * objfiles.c (get_objfile_bfd_data): Likewise.
4850 (objfile_register_static_link): Likewise.
4851 * psymtab.c (allocate_psymtab): Likewise.
4852 * stabsread.c (read_member_functions): Likewise.
4853 * xcoffread.c (xcoff_end_psymtab): Likewise.
4854
4855 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
4856
4857 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
4858 compiler supports std::is_trivially_constructible.
4859 * common/poison.h: Include obstack.h.
4860 (IsMallocable): Define to is_trivially_constructible if the
4861 compiler supports it, define to true_type otherwise.
4862 (xobnew): New.
4863 (XOBNEW): Redefine.
4864 (xobnewvec): New.
4865 (XOBNEWVEC): Redefine.
4866 * gdb_obstack.h (obstack_zalloc): New.
4867 (OBSTACK_ZALLOC): Redefine.
4868 (obstack_calloc): New.
4869 (OBSTACK_CALLOC): Redefine.
4870 (obstack_new): New.
4871 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
4872 (gdbarch_obstack): New declaration in gdbarch.h, definition in
4873 gdbarch.c.
4874 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
4875 obstack_calloc/obstack_zalloc.
4876 (gdbarch_obstack_zalloc): Remove.
4877 * target-descriptions.c (tdesc_data_init): Use obstack_new.
4878
4879 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4880
4881 * stack.c (backtrace_command_1): Remove useless variable int i.
4882
4883 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4884
4885 * stack.c (print_frame_info): Fix comment.
4886
4887 2018-05-18 Tom Tromey <tom@tromey.com>
4888
4889 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
4890 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
4891 (~dwarf2_per_objfile): Update
4892 (dwarf2_get_dwz_file): Use new.
4893 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
4894 unique_ptr.
4895
4896 2018-05-18 Tom Tromey <tom@tromey.com>
4897
4898 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
4899 unique_ptr.
4900 * dwarf2read.c (struct dwp_file): Add constructor and
4901 initializers.
4902 (open_and_init_dwp_file): Return a unique_ptr.
4903 (dwarf2_per_objfile, create_dwp_hash_table)
4904 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
4905 (lookup_dwo_unit_in_dwp): Update.
4906 (open_and_init_dwp_file, get_dwp_file): Update.
4907
4908 2018-05-18 Tom Tromey <tom@tromey.com>
4909
4910 * dwarf2read.c (dwarf2_per_objfile): Update.
4911 (struct mapped_index): Add initializers.
4912 (dwarf2_read_index): Use new.
4913 (dw2_symtab_iter_init): Update.
4914 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
4915 unique_ptr.
4916
4917 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
4918
4919 * dwarf2read.c (mapped_index) <total_size>: Remove.
4920
4921 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
4922
4923 * unittests/format_pieces-selftests.c (test_format_specifier):
4924 Add ARI comments.
4925
4926 2018-05-18 Tom Tromey <tom@tromey.com>
4927
4928 * c-typeprint.c (maybe_print_hole): New function.
4929 (c_print_type_struct_field_offset): Update.
4930 (c_type_print_base_struct_union): Call maybe_print_hole.
4931
4932 2018-05-17 Keith Seitz <keiths@redhat.com>
4933
4934 * breakpoint.c (build_bpstat_chain): New function, moved from
4935 bpstat_stop_status.
4936 (bpstat_stop_status): Add optional parameter, `stop_chain'.
4937 If no stop chain is passed, call build_bpstat_chain to build it.
4938 * breakpoint.h (build_bpstat_chain): Declare.
4939 (bpstat_stop_status): Move documentation here from breakpoint.c.
4940 * infrun.c (handle_signal_stop): Before eliding inlined frames,
4941 build the stop chain and pass it to skip_inline_frames.
4942 Pass this stop chain to bpstat_stop_status.
4943 * inline-frame.c: Include breakpoint.h.
4944 (stopped_by_user_bp_inline_frame): New function.
4945 (skip_inline_frames): Add parameter `stop_chain'.
4946 Move documention to inline-frame.h.
4947 If non-NULL, use stopped_by_user_bp_inline_frame to determine
4948 whether the frame should be elided.
4949 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
4950 Add moved documentation and update for new parameter.
4951
4952 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
4953
4954 PR cli/14975
4955 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4956 unittests/format_pieces-selftests.c.
4957 * common/format.h (format_piece) <operator==>: New.
4958 (format_pieces) <operator[]>: Remove.
4959 * common/format.c (format_pieces::format_pieces): Handle \e.
4960 * unittests/format_pieces-selftests.c: New.
4961
4962 2018-05-17 Tom Tromey <tom@tromey.com>
4963
4964 PR symtab/23010:
4965 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
4966 (dw2_instantiate_symtab): Add skip_partial parameter.
4967 (dw2_find_last_source_symtab, dw2_map_expand_apply)
4968 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
4969 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
4970 (dw2_expand_symtabs_matching_one)
4971 (dw2_find_pc_sect_compunit_symtab)
4972 (dw2_debug_names_lookup_symbol)
4973 (dw2_debug_names_expand_symtabs_for_function): Update.
4974 (init_cutu_and_read_dies): Add skip_partial parameter.
4975 (process_psymtab_comp_unit, build_type_psymtabs_1)
4976 (process_skeletonless_type_unit, load_partial_comp_unit)
4977 (psymtab_to_symtab_1): Update.
4978 (load_full_comp_unit): Add skip_partial parameter.
4979 (process_imported_unit_die, dwarf2_read_addr_index)
4980 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
4981 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
4982 (read_signatured_type): Update.
4983
4984 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
4985
4986 * value.c (release_value): Remove unused variable.
4987 (record_latest_value): Likewise.
4988 (access_value_history): Likewise.
4989 (preserve_values): Likewise.
4990
4991 2018-05-17 Tom Tromey <tom@tromey.com>
4992
4993 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
4994 Initialize.
4995
4996 2018-05-16 Maciej W. Rozycki <macro@mips.com>
4997
4998 PR gdb/22286
4999 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
5000 Also handle registers whose width is not a multiple of
5001 PTRACE_TYPE_RET.
5002 (linux_nat_trad_target::store_register): Likewise.
5003
5004 2018-05-16 Tom Tromey <tom@tromey.com>
5005
5006 * gdbcore.h (core_bfd): Redefine.
5007 * corelow.c (core_target::close): Update.
5008 (core_target_open): Update.
5009 * progspace.h (struct program_space) <cbfd>: Now a
5010 gdb_bfd_ref_ptr.
5011
5012 2018-05-16 Tom Tromey <tom@tromey.com>
5013
5014 PR cli/19551:
5015 * symfile-add-flags.h (enum symfile_add_flags)
5016 <SYMFILE_NOT_FILENAME>: New constant.
5017 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
5018 objfile name from BFD.
5019 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
5020 * minidebug.c (find_separate_debug_file_in_section): Put
5021 ".gnu_debugdata" into BFD's file name.
5022
5023 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
5024
5025 * regcache.c (regcache_read_ftype, regcache_write_ftype):
5026 Remove.
5027
5028 2018-05-15 Tamar Christina <tamar.christina@arm.com>
5029
5030 PR binutils/21446
5031 * aarch64-tdep.c (aarch64_analyze_prologue,
5032 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
5033 Indicate not interested in errors.
5034
5035 2018-05-15 Maciej W. Rozycki <macro@mips.com>
5036
5037 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
5038 Supply the MIPS_ZERO_REGNUM register.
5039
5040 2018-05-15 Maciej W. Rozycki <macro@mips.com>
5041
5042 * mips-tdep.c (mask_address_var): Make variable static.
5043
5044 2018-05-14 Tom Tromey <tom@tromey.com>
5045
5046 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
5047
5048 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
5049
5050 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
5051 FXSAVE_ADDR for the mxcsr register.
5052
5053 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
5054
5055 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
5056
5057 2018-05-11 Pedro Alves <palves@redhat.com>
5058
5059 * corelow.c (core_target) <core_target>: No longer inline.
5060 Initialize m_core_gdbarch, m_core_vec and build the section table
5061 here.
5062 <~core_target>: New.
5063 <core_gdbarch, get_core_register_section>: New methods.
5064 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
5065 factored out from ...
5066 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
5067 (core_ops): Delete.
5068 (sniff_core_bfd): Add gdbarch parameter.
5069 (core_close): Delete, merged into ...
5070 (core_target::close): ... here. Delete self.
5071 (core_close_cleanup): Delete.
5072 (core_target_open): Allocate a core_target on the heap. Use a
5073 unique_ptr instead of a cleanup. Bits moved into the core_target
5074 ctor. Adjust to use core_target methods instead of globals.
5075 (get_core_register_section): Rename to ...
5076 (core_target::get_core_register_section): ... this and adjust.
5077 (struct get_core_registers_cb_data): New.
5078 (get_core_registers_cb): Use it. Use bool.
5079 (core_target::fetch_registers, core_target::files_info)
5080 (core_target::xfer_partial, core_target::read_description)
5081 (core_target::pid_to, core_target::thread_name): Adjust to
5082 reference class fields instead of globals.
5083 * target.h (struct target_ops_deleter, target_ops_up): New.
5084
5085 2018-05-11 Pedro Alves <palves@redhat.com>
5086
5087 * corefile.c (core_file_command): Move to corelow.c.
5088 * corelow.c (the_core_target): Delete.
5089 (core_file_command): Moved from corefile.c. Check exec_bfd
5090 instead of the_core_target. Use target_detach instead of calling
5091 into the_core_target directly.
5092 (maybe_say_no_core_file_now): New.
5093 (core_target::detach): Use it.
5094 (_initialize_corelow): Remove references to the_core_target.
5095 * gdbcore.h (the_core_target): Delete.
5096
5097 2018-05-11 Tom Tromey <tromey@redhat.com>
5098 Pedro Alves <palves@redhat.com>
5099
5100 * corefile.c (core_bfd): Remove.
5101 * gdbcore.h (core_bfd): Now a macro.
5102 * progspace.h (struct program_space) <cbfd>: New field.
5103
5104 2018-05-11 Tom Tromey <tom@tromey.com>
5105
5106 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
5107 gdb::def_vector.
5108
5109 2018-05-10 Tom Tromey <tom@tromey.com>
5110
5111 * configure: Rebuild.
5112 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
5113
5114 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5115
5116 PR server/23158:
5117 * regformats/regdat.sh: Adjust script, following the addition
5118 of the new expedite_regs parameter to init_target_desc.
5119
5120 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
5121
5122 PR gdb/23127
5123 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
5124 set_gdbarch_significant_addr_bit.
5125 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
5126 set_gdbarch_significant_addr_bit.
5127 * utils.c (address_significant): Update to sign extend addr.
5128
5129 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
5130
5131 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
5132 (xtensa_linux_init_abi): Limit tdep->num_regs by
5133 tdep->num_nopriv_regs.
5134 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
5135 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
5136 not initialized.
5137
5138 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
5139
5140 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
5141
5142 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
5143
5144 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
5145 (I387_MXCSR_INIT_VAL): New constant.
5146 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
5147 buffer if it was supplied by the inferior.
5148 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
5149 (i387_xsave_get_clear_bv): New function.
5150 (i387_supply_xsave): Only read x87 control registers from the
5151 xsave buffer if the feature is enabled, and the state will have
5152 been written, otherwise, provide a suitable default.
5153 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
5154 including x87 control registers. Update control registers if they
5155 have changed from the default value, and mark features as enabled
5156 as required.
5157 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
5158
5159 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
5160
5161 * spu-tdep.c (info_spu_event_command): Fix output formatting.
5162
5163 2018-05-07 Tom Tromey <tom@tromey.com>
5164
5165 * configure: Rebuild.
5166 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
5167
5168 2018-05-07 Tom Tromey <tom@tromey.com>
5169
5170 PR tdep/20362:
5171 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
5172 bit. Use correct value for VDIV.
5173
5174 2018-05-04 Tom Tromey <tom@tromey.com>
5175
5176 * configure: Rebuild.
5177 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
5178
5179 2018-05-04 Tom Tromey <tom@tromey.com>
5180
5181 * linux-record.c (record_linux_system_call) <case
5182 RECORD_SYS_RECVFROM>: Add "break".
5183
5184 2018-05-04 Tom Tromey <tom@tromey.com>
5185
5186 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
5187 Add missing "break".
5188 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
5189 Add missing "break".
5190
5191 2018-05-04 Tom Tromey <tom@tromey.com>
5192
5193 * rs6000-tdep.c (ppc_process_record_op4)
5194 (ppc_process_record_op63): Add fall-through comment.
5195
5196 2018-05-04 Tom Tromey <tom@tromey.com>
5197
5198 * i386-tdep.c (i386_process_record): Add fall-through comment.
5199
5200 2018-05-04 Tom Tromey <tom@tromey.com>
5201
5202 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
5203 comment.
5204
5205 2018-05-04 Tom Tromey <tom@tromey.com>
5206
5207 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
5208 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
5209 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
5210 comment.
5211 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
5212 comment.
5213 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
5214 comment.
5215
5216 2018-05-04 Tom Tromey <tom@tromey.com>
5217
5218 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
5219
5220 2018-05-04 Tom Tromey <tom@tromey.com>
5221
5222 * s390-tdep.c (s390_process_record): Fix fall-through comments.
5223 * xcoffread.c (scan_xcoff_symtab): Move comment later.
5224 * symfile.c (section_is_mapped): Fix fall-through comment.
5225 * stabsread.c (define_symbol, read_member_functions): Fix
5226 fall-through comment.
5227 * s390-linux-tdep.c (s390_process_record): Fix fall-through
5228 comment.
5229 * remote.c (remote_wait_as): Fix fall-through comment.
5230 * p-exp.y (yylex): Fix fall-through comment.
5231 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
5232 comment.
5233 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
5234 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
5235 * jv-exp.y (yylex): Fix fall-through comment.
5236 * go-exp.y (lex_one_token): Fix fall-through comment.
5237 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
5238 fall-through comment.
5239 * f-exp.y (yylex): Fix fall-through comment.
5240 * dwarf2read.c (process_die): Fix fall-through comments.
5241 * dbxread.c (process_one_symbol): Fix fall-through comment.
5242 * d-exp.y (lex_one_token): Fix fall-through comment.
5243 * cp-name-parser.y (yylex): Fix fall-through comment.
5244 * coffread.c (coff_symtab_read): Fix fall-through comment.
5245 * c-exp.y (lex_one_token): Fix fall-through comment.
5246 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
5247 comment.
5248 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
5249 comment.
5250
5251 2018-05-04 Tom Tromey <tom@tromey.com>
5252
5253 PR python/22730:
5254 * NEWS: Mention gdb.execute change.
5255 * gdbcmd.h (execute_control_command): Don't declare.
5256 * python/python.c (execute_gdb_command): Use read_command_lines_1,
5257 execute_control_commands, execute_control_commands_to_string.
5258 * cli/cli-script.h (execute_control_commands)
5259 (execute_control_commands_to_string): Declare.
5260 (execute_control_command): Add from_tty parameter.
5261 * cli/cli-script.c (execute_control_commands)
5262 (execute_control_commands_to_string): New functions.
5263 (execute_user_command): Use execute_control_commands.
5264 (execute_control_command_1): Add "from_tty" parameter. Update.
5265 (execute_control_command): Likewise.
5266
5267 2018-05-04 Tom Tromey <tom@tromey.com>
5268
5269 PR python/22731:
5270 * NEWS: Mention that breakpoint commands are writable.
5271 * python/py-breakpoint.c (bppy_set_commands): New function.
5272 (breakpoint_object_getset) <"commands">: Use it.
5273
5274 2018-05-04 Tom Tromey <tom@tromey.com>
5275
5276 * tracepoint.c (actions_command): Update.
5277 * mi/mi-cmd-break.c (mi_command_line_array)
5278 (mi_command_line_array_cnt, mi_command_line_array_ptr)
5279 (mi_read_next_line): Remove.
5280 (mi_cmd_break_commands): Update.
5281 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
5282 function_view.
5283 * cli/cli-script.c (get_command_line): Update.
5284 (process_next_line): Use function_view. Constify.
5285 (recurse_read_control_structure, read_command_lines)
5286 (read_command_lines_1): Change argument types to function_view.
5287 (do_define_command, document_command): Update.
5288 * breakpoint.h (check_tracepoint_command): Don't declare.
5289 * breakpoint.c (check_tracepoint_command): Remove.
5290 (commands_command_1, create_tracepoint_from_upload): Update.
5291
5292 2018-05-04 Tom Tromey <tom@tromey.com>
5293
5294 PR gdb/11750:
5295 * cli/cli-script.h (enum command_control_type) <define_control>:
5296 New constant.
5297 * cli/cli-script.c (multi_line_command_p): Handle define_control.
5298 (build_command_line, execute_control_command_1)
5299 (process_next_line): Likewise.
5300 (do_define_command): New function, extracted from define_command.
5301 (define_command): Use it.
5302
5303 2018-05-04 Tom Tromey <tom@tromey.com>
5304
5305 * tracepoint.c (actions_command): Update.
5306 * cli/cli-script.h (read_command_lines): Update.
5307 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
5308 (MAX_TMPBUF): Remove define.
5309 (define_command): Use string_printf.
5310 (document_command): Likewise.
5311 * breakpoint.c (commands_command_1): Update.
5312
5313 2018-05-04 Tom Tromey <tom@tromey.com>
5314
5315 * top.c (execute_command): Update.
5316 * cli/cli-script.h (print_command_lines): Now varargs.
5317 * cli/cli-script.c (print_command_lines): Now varargs.
5318 (execute_control_command_1) <case while_control, case if_control>:
5319 Update.
5320
5321 2018-05-04 Tom Tromey <tom@tromey.com>
5322
5323 * tracepoint.c (all_tracepoint_actions): Rename from
5324 all_tracepoint_actions_and_cleanup. Change return type.
5325 (actions_command, encode_actions_1, encode_actions)
5326 (trace_dump_actions, tdump_command): Update.
5327 * remote.c (remote_download_command_source): Update.
5328 * python/python.c (gdbpy_eval_from_control_command)
5329 (python_command, python_interactive_command): Update.
5330 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
5331 * guile/guile.c (guile_command)
5332 (gdbscm_eval_from_control_command, guile_command): Update.
5333 * compile/compile.c (compile_code_command)
5334 (compile_print_command, compile_to_object): Update.
5335 * cli/cli-script.h (struct command_lines_deleter): New.
5336 (counted_command_line): New typedef.
5337 (struct command_line): Add constructor, destructor.
5338 <body_list>: Remove.
5339 <body_list_0, body_list_1>: New members.
5340 (command_line_up): Remove typedef.
5341 (read_command_lines, read_command_lines_1, get_command_line):
5342 Update.
5343 (copy_command_lines): Don't declare.
5344 * cli/cli-script.c (build_command_line): Use "new".
5345 (get_command_line): Return counted_command_line.
5346 (print_command_lines, execute_user_command)
5347 (execute_control_command_1, while_command, if_command): Update.
5348 (realloc_body_list): Remove.
5349 (process_next_line, recurse_read_control_structure): Update.
5350 (read_command_lines, read_command_lines_1): Return counted_command_line.
5351 (free_command_lines): Use "delete".
5352 (copy_command_lines): Remove.
5353 (define_command, document_command, show_user_1): Update.
5354 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
5355 a counted_command_line.
5356 * breakpoint.h (counted_command_line): Remove typedef.
5357 (breakpoint_set_commands): Update.
5358 * breakpoint.c (check_no_tracepoint_commands)
5359 (validate_commands_for_breakpoint): Update.
5360 (breakpoint_set_commands): Change commands to be a
5361 counted_command_line.
5362 (commands_command_1, update_dprintf_command_list)
5363 (create_tracepoint_from_upload): Update.
5364
5365 2018-05-04 Tom Tromey <tom@tromey.com>
5366
5367 * cli/cli-decode.h (cmd_list_element): New constructor.
5368 (~cmd_list_element): New destructor.
5369 (struct cmd_list_element): Add initializers.
5370 * cli/cli-decode.c (do_add_cmd): Use "new".
5371 (delete_cmd): Use "delete".
5372
5373 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
5374 Pedro Alves <palves@redhat.com>
5375
5376 PR breakpoints/19806 and support for PR external/20207.
5377 * NEWS: Mention Aarch64 watchpoint improvements.
5378 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
5379 watchpoints and PR external/20207 watchpoints.
5380 * nat/aarch64-linux-hw-point.c
5381 (kernel_supports_any_contiguous_range): New.
5382 (aarch64_watchpoint_offset): New.
5383 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
5384 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
5385 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
5386 (aarch64_align_watchpoint): New parameters aligned_offset_p and
5387 next_addr_orig_p. Support PR external/20207 watchpoints.
5388 (aarch64_downgrade_regs): New.
5389 (aarch64_dr_state_insert_one_point): New parameters offset and
5390 addr_orig.
5391 (aarch64_dr_state_remove_one_point): Likewise.
5392 (aarch64_handle_breakpoint): Update caller.
5393 (aarch64_handle_aligned_watchpoint): Likewise.
5394 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
5395 aligned_offset.
5396 (aarch64_linux_set_debug_regs): Remove const from state. Call
5397 aarch64_downgrade_regs.
5398 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
5399 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
5400 (DR_CONTROL_MASK): ... this.
5401 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
5402 (unsigned int aarch64_watchpoint_offset): New prototype.
5403 (aarch64_linux_set_debug_regs): Remove const from state.
5404 * utils.c (align_up, align_down): Move to ...
5405 * common/common-utils.c (align_up, align_down): ... here.
5406 * utils.h (align_up, align_down): Move to ...
5407 * common/common-utils.h (align_up, align_down): ... here.
5408
5409 2018-05-04 Joel Brobecker <brobecker@adacore.com>
5410
5411 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
5412 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
5413 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
5414 Re-implement to match the ABI as summarized in GCC's
5415 gcc/config/sparc/sparc.c. All callers updated.
5416 (sparc32_store_arguments): Remove assertion.
5417
5418 2018-05-04 Tom Tromey <tom@tromey.com>
5419
5420 * printcmd.c: Don't include tui.h.
5421 (decode_format): Use skip_spaces.
5422
5423 2018-05-04 Tom Tromey <tom@tromey.com>
5424
5425 PR gdb/22619:
5426 * printcmd.c (last_count): New global.
5427 (x_command): Use saved count when repeating.
5428
5429 2018-05-04 Tom Tromey <tom@tromey.com>
5430
5431 * nto-procfs.c (do_closedir_cleanup): Remove.
5432 (procfs_pidlist): Use gdb_dir_up.
5433 * procfs.c (do_closedir_cleanup): Remove.
5434 (proc_update_threads): Use gdb_dir_up.
5435 * common/filestuff.h (struct gdb_dir_deleter): New.
5436 (gdb_dir_up): New typedef.
5437
5438 2018-05-04 Tom Tromey <tom@tromey.com>
5439
5440 * ada-lang.c (print_mention_exception): Use std::string.
5441
5442 2018-05-04 Tom Tromey <tom@tromey.com>
5443
5444 * ada-lang.c (create_excep_cond_exprs): Update.
5445 (ada_exception_catchpoint_cond_string): Use std::string.
5446
5447 2018-05-04 Tom Tromey <tom@tromey.com>
5448
5449 * ada-lang.c (xget_renaming_scope): Return std::string.
5450 (old_renaming_is_invisible): Update.
5451
5452 2018-05-04 Tom Tromey <tom@tromey.com>
5453
5454 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
5455 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
5456
5457 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
5458
5459 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
5460
5461 2018-05-04 Tom Tromey <tom@tromey.com>
5462
5463 * remote.c (remote_query_supported_append): Change type.
5464 (remote_check_symbols): Update.
5465
5466 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
5467
5468 PR gdb/11420
5469 * configure.ac: Prepend libpython.
5470 * python/python-config.py: Likewise.
5471 * configure: Regenerate.
5472
5473 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
5474
5475 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
5476
5477 2018-05-03 Pedro Alves <palves@redhat.com>
5478
5479 * s390-linux-nat.c
5480 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
5481 override. Write 'true' instead of '1'.
5482 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
5483 declaration.
5484
5485 2018-05-02 Pedro Alves <palves@redhat.com>
5486
5487 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
5488 add_inf_child_target.
5489 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
5490 add_inf_child_target.
5491 * aix-thread.c (aix_thread_target_info): New.
5492 (aix_thread_target) <shortname, longname, doc>: Delete.
5493 <info>: New.
5494 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
5495 add_inf_child_target.
5496 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
5497 add_inf_child_target.
5498 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
5499 add_inf_child_target.
5500 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
5501 add_inf_child_target.
5502 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
5503 add_inf_child_target.
5504 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
5505 add_inf_child_target.
5506 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
5507 add_inf_child_target.
5508 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
5509 add_inf_child_target.
5510 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
5511 add_inf_child_target.
5512 * bfd-target.c (target_bfd_target_info): New.
5513 (target_bfd) <shortname, longname, doc>: Delete.
5514 <info>: New.
5515 * bsd-kvm.c (bsd_kvm_target_info): New.
5516 (bsd_kvm_target) <shortname, longname, doc>: Delete.
5517 <info>: New.
5518 (bsd_kvm_target::open): Rename to ...
5519 (bsd_kvm_target_open): ... this. Adjust.
5520 * bsd-uthread.c (bsd_uthread_target_info): New.
5521 (bsd_uthread_target) <shortname, longname, doc>: Delete.
5522 <info>: New.
5523 * corefile.c (core_file_command): Adjust.
5524 * corelow.c (core_target_info): New.
5525 (core_target) <shortname, longname, doc>: Delete.
5526 <info>: New.
5527 (core_target::open): Rename to ...
5528 (core_target_open): ... this. Adjust.
5529 * ctf.c (ctf_target_info): New.
5530 (ctf_target) <shortname, longname, doc>: Delete.
5531 <info>: New.
5532 (ctf_target::open): Rename to ...
5533 (ctf_target_open): ... this.
5534 (_initialize_ctf): Adjust.
5535 * exec.c (exec_target_info): New.
5536 (exec_target) <shortname, longname, doc>: Delete.
5537 <info>: New.
5538 (exec_target::open): Rename to ...
5539 (exec_target_open): ... this.
5540 * gdbcore.h (core_target_open): Declare.
5541 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
5542 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
5543 add_inf_child_target.
5544 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
5545 add_inf_child_target.
5546 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
5547 add_inf_child_target.
5548 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
5549 add_inf_child_target.
5550 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
5551 add_inf_child_target.
5552 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
5553 add_inf_child_target.
5554 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
5555 add_inf_child_target.
5556 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
5557 add_inf_child_target.
5558 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
5559 add_inf_child_target.
5560 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
5561 add_inf_child_target.
5562 * inf-child.c (inf_child_target_info): New.
5563 (inf_child_target::info): New.
5564 (inf_child_open_target): Remove 'target' parameter. Use
5565 get_native_target instead.
5566 (inf_child_target::open): Delete.
5567 (add_inf_child_target): New.
5568 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
5569 Delete.
5570 <info>: New.
5571 (add_inf_child_target): Declare.
5572 (inf_child_open_target): Declare.
5573 * linux-thread-db.c (thread_db_target_info): New.
5574 (thread_db_target) <shortname, longname, doc>: Delete.
5575 <info>: New.
5576 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
5577 add_inf_child_target.
5578 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
5579 add_inf_child_target.
5580 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
5581 add_inf_child_target.
5582 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
5583 add_inf_child_target.
5584 * make-target-delegates (print_class): Adjust.
5585 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
5586 add_inf_child_target.
5587 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
5588 add_inf_child_target.
5589 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
5590 add_inf_child_target.
5591 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
5592 add_inf_child_target.
5593 * nto-procfs.c (nto_native_target_info): New.
5594 (nto_procfs_target_native) <shortname, longname, doc>:
5595 Delete.
5596 <info>: New.
5597 (nto_procfs_target_info): New.
5598 (nto_procfs_target_procfs) <shortname, longname, doc>:
5599 Delete.
5600 <info>: New.
5601 (init_procfs_targets): Adjust.
5602 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
5603 add_inf_child_target.
5604 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
5605 add_inf_child_target.
5606 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
5607 add_inf_child_target.
5608 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
5609 add_inf_child_target.
5610 * ravenscar-thread.c (ravenscar_target_info): New.
5611 (ravenscar_thread_target) <shortname, longname, doc>:
5612 Delete.
5613 <info>: New.
5614 * record-btrace.c (record_btrace_target_info):
5615 (record_btrace_target) <shortname, longname, doc>: Delete.
5616 <info>: New.
5617 (record_btrace_target::open): Rename to ...
5618 (record_btrace_target_open): ... this. Adjust.
5619 * record-full.c (record_longname, record_doc): New.
5620 (record_full_base_target) <shortname, longname, doc>: Delete.
5621 <info>: New.
5622 (record_full_target_info): New.
5623 (record_full_target): <shortname>: Delete.
5624 <info>: New.
5625 (record_full_core_open_1, record_full_open_1): Update comments.
5626 (record_full_base_target::open): Rename to ...
5627 (record_full_open): ... this.
5628 (cmd_record_full_restore): Update.
5629 (_initialize_record_full): Update.
5630 * remote-sim.c (remote_sim_target_info): New.
5631 (gdbsim_target) <shortname, longname, doc>: Delete.
5632 <info>: New.
5633 (gdbsim_target::open): Rename to ...
5634 (gdbsim_target_open): ... this.
5635 (_initialize_remote_sim): Adjust.
5636 * remote.c (remote_doc): New.
5637 (remote_target_info): New.
5638 (remote_target) <shortname, longname, doc>: Delete.
5639 <info>: New.
5640 (extended_remote_target_info): New.
5641 (extended_remote_target) <shortname, longname, doc>: Delete.
5642 <info>: New.
5643 (remote_target::open_1): Make static. Adjust.
5644 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
5645 * s390-linux-nat.c (_initialize_s390_nat): Use
5646 add_inf_child_target.
5647 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
5648 add_inf_child_target.
5649 * sol-thread.c (thread_db_target_info): New.
5650 (sol_thread_target) <shortname, longname, doc>: Delete.
5651 <info>: New.
5652 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
5653 add_inf_child_target.
5654 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
5655 add_inf_child_target.
5656 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
5657 add_inf_child_target.
5658 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
5659 add_inf_child_target.
5660 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
5661 add_inf_child_target.
5662 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
5663 add_inf_child_target.
5664 * spu-linux-nat.c (_initialize_spu_nat): Use
5665 add_inf_child_target.
5666 * spu-multiarch.c (spu_multiarch_target_info): New.
5667 (spu_multiarch_target) <shortname, longname, doc>: Delete.
5668 <info>: New.
5669 * target-delegates.c: Regenerate.
5670 * target.c: Include <unordered_map>.
5671 (target_ops_p): Delete.
5672 (DEF_VEC_P(target_ops_p)): Delete.
5673 (target_factories): New.
5674 (test_target_info): New.
5675 (test_target_ops::info): New.
5676 (open_target): Adjust to use target_factories.
5677 (add_target_with_completer): Rename to ...
5678 (add_target): ... this. Change prototype. Register target_info
5679 and open callback in target_factories. Register target_info in
5680 command context instead of target_ops.
5681 (add_target): Delete old implementation.
5682 (add_deprecated_target_alias): Change prototype. Adjust.
5683 (the_native_target): New.
5684 (set_native_target, get_native_target): New.
5685 (find_default_run_target): Use the_native_target.
5686 (find_attach_target, find_run_target): Simplify.
5687 (target_ops::open): Delete.
5688 (dummy_target_info): New.
5689 (dummy_target::shortname, dummy_target::longname)
5690 (dummy_target::doc): Delete.
5691 (dummy_target::info): New.
5692 (debug_target::shortname, debug_target::longname)
5693 (debug_target::doc): Delete.
5694 (debug_target::info): New.
5695 * target.h (struct target_info): New.
5696 (target_ops::~target_ops): Add comment.
5697 (target_ops::info): New.
5698 (target_ops::shortname, target_ops::longname, target_ops::doc): No
5699 longer virtual. Implement in terms of target_info.
5700 (set_native_target, get_native_target): Declare.
5701 (target_open_ftype): New.
5702 (add_target, add_target_with_completer)
5703 (add_deprecated_target_alias): Change prototype.
5704 (test_target) <shortname, longname, doc>: Delete.
5705 <info>: New.
5706 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
5707 add_inf_child_target.
5708 * tracefile-tfile.c (tfile_target_info): New.
5709 (tfile_target) <shortname, longname, doc>: Delete.
5710 <info>: New.
5711 (tfile_target::open): Rename to ...
5712 (tfile_target_open): ... this.
5713 (_initialize_tracefile_tfile): Adjust.
5714 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
5715 add_inf_child_target.
5716 * windows-nat.c (_initialize_windows_nat): Use
5717 add_inf_child_target.
5718 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
5719 add_inf_child_target.
5720
5721 2018-05-02 Pedro Alves <palves@redhat.com>
5722
5723 * linux-nat.h (linux_nat_target) <low_new_thread,
5724 low_delete_thread, low_new_fork, low_forget_process,
5725 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
5726 New virtual methods.
5727 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5728 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
5729 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
5730 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5731 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
5732 Delete.
5733 * linux-fork.c (delete_fork): Adjust to call low method.
5734 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
5735 (linux_nat_new_fork, linux_nat_forget_process_hook)
5736 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
5737 (linux_nat_status_is_event):
5738 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
5739 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
5740 to call low method.
5741 (sigtrap_is_event): Rename to ...
5742 (linux_nat_target::low_status_is_event): ... this.
5743 (linux_nat_set_status_is_event): Delete.
5744 (save_stop_reason, linux_nat_wait_1)
5745 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
5746 low methods.
5747 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5748 (linux_nat_set_new_fork, linux_nat_set_forget_process)
5749 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5750 (linux_nat_set_prepare_to_resume): Delete.
5751 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
5752 low virtual methods.
5753 * amd64-linux-nat.c: Likewise.
5754 * arm-linux-nat.c: Likewise.
5755 * i386-linux-nat.c: Likewise.
5756 * ia64-linux-nat.c: Likewise.
5757 * mips-linux-nat.c: Likewise.
5758 * ppc-linux-nat.c: Likewise.
5759 * s390-linux-nat.c: Likewise.
5760 * sparc64-linux-nat.c: Likewise.
5761 * x86-linux-nat.c: Likewise.
5762 * x86-linux-nat.h: Include "nat/x86-linux.h".
5763 (x86_linux_nat_target) <low_new_fork, low_forget_process,
5764 low_prepare_to_resume, low_new_thread, low_delete_thread>:
5765 Override methods.
5766
5767 2018-05-02 Pedro Alves <palves@redhat.com>
5768
5769 * target.h (target_ops)
5770 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5771 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
5772 stopped_by_watchpoint, have_continuable_watchpoint,
5773 stopped_data_address, watchpoint_addr_within_range,
5774 can_accel_watchpoint_condition, can_run, thread_alive,
5775 has_all_memory, has_memory, has_stack, has_registers,
5776 has_execution, can_async_p, is_async_p, supports_non_stop,
5777 always_non_stop_p, can_execute_reverse, supports_multi_process,
5778 supports_enable_disable_tracepoint,
5779 supports_disable_randomization, supports_string_tracing,
5780 supports_evaluation_of_breakpoint_conditions,
5781 can_run_breakpoint_commands, filesystem_is_local,
5782 can_download_tracepoint, get_trace_state_variable_value,
5783 set_trace_notes, get_tib_address, use_agent, can_use_agent,
5784 record_is_replaying, record_will_replay,
5785 augmented_libraries_svr4_read>: Adjust to return bool.
5786 * aarch64-linux-nat.c: All implementations adjusted.
5787 * aix-thread.c: All implementations adjusted.
5788 * arm-linux-nat.c: All implementations adjusted.
5789 * breakpoint.c: All implementations adjusted.
5790 * bsd-kvm.c: All implementations adjusted.
5791 * bsd-uthread.c: All implementations adjusted.
5792 * corelow.c: All implementations adjusted.
5793 * ctf.c: All implementations adjusted.
5794 * darwin-nat.c: All implementations adjusted.
5795 * darwin-nat.h: All implementations adjusted.
5796 * exec.c: All implementations adjusted.
5797 * fbsd-nat.c: All implementations adjusted.
5798 * fbsd-nat.h: All implementations adjusted.
5799 * gnu-nat.c: All implementations adjusted.
5800 * gnu-nat.h: All implementations adjusted.
5801 * go32-nat.c: All implementations adjusted.
5802 * ia64-linux-nat.c: All implementations adjusted.
5803 * inf-child.c: All implementations adjusted.
5804 * inf-child.h: All implementations adjusted.
5805 * inf-ptrace.c: All implementations adjusted.
5806 * inf-ptrace.h: All implementations adjusted.
5807 * linux-nat.c: All implementations adjusted.
5808 * linux-nat.h: All implementations adjusted.
5809 * mips-linux-nat.c: All implementations adjusted.
5810 * nto-procfs.c: All implementations adjusted.
5811 * ppc-linux-nat.c: All implementations adjusted.
5812 * procfs.c: All implementations adjusted.
5813 * ravenscar-thread.c: All implementations adjusted.
5814 * record-btrace.c: All implementations adjusted.
5815 * record-full.c: All implementations adjusted.
5816 * remote-sim.c: All implementations adjusted.
5817 * remote.c: All implementations adjusted.
5818 * s390-linux-nat.c: All implementations adjusted.
5819 * sol-thread.c: All implementations adjusted.
5820 * spu-multiarch.c: All implementations adjusted.
5821 * target-delegates.c: All implementations adjusted.
5822 * target.c: All implementations adjusted.
5823 * target.h: All implementations adjusted.
5824 * tracefile-tfile.c: All implementations adjusted.
5825 * tracefile.c: All implementations adjusted.
5826 * tracefile.h: All implementations adjusted.
5827 * windows-nat.c: All implementations adjusted.
5828 * x86-linux-nat.h: All implementations adjusted.
5829 * x86-nat.h: All implementations adjusted.
5830
5831 2018-05-02 Pedro Alves <palves@redhat.com>
5832
5833 * make-target-delegates (scan_target_h): Don't trim lines here.
5834 Replace sequences of tabs and/or whitespace with a single
5835 whitespace.
5836 (top level, parsing methods): Trim each line before processing it
5837 here.
5838
5839 2018-05-02 Pedro Alves <palves@redhat.com>
5840 John Baldwin <jhb@freebsd.org>
5841
5842 * target.h (enum strata) <debug_stratum>: New.
5843 (struct target_ops) <all delegation methods>: Replace by C++
5844 virtual methods, and drop "to_" prefix. All references updated
5845 throughout.
5846 <to_shortname, to_longname, to_doc, to_data,
5847 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
5848 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
5849 virtual methods. All references updated throughout.
5850 <can_attach, supports_terminal_ours, can_create_inferior,
5851 get_thread_control_capabilities, attach_no_wait>: New
5852 virtual methods.
5853 <insert_breakpoint, remove_breakpoint>: Now
5854 TARGET_DEFAULT_NORETURN methods.
5855 <info_proc>: Now returns bool.
5856 <to_magic>: Delete.
5857 (OPS_MAGIC): Delete.
5858 (current_target): Delete. All references replaced by references
5859 to ...
5860 (target_stack): ... this. New.
5861 (target_shortname, target_longname): Adjust.
5862 (target_can_run): Now a function declaration.
5863 (default_child_has_all_memory, default_child_has_memory)
5864 (default_child_has_stack, default_child_has_registers)
5865 (default_child_has_execution): Remove target_ops parameter.
5866 (complete_target_initialization): Delete.
5867 (memory_breakpoint_target): New template class.
5868 (test_target_ops): Refactor as a C++ class with virtual methods.
5869 * make-target-delegates (NAME_PART): Tighten.
5870 (POINTER_PART, CP_SYMBOL): New.
5871 (SIMPLE_RETURN_PART): Reimplement.
5872 (VEC_RETURN_PART): Expect less.
5873 (RETURN_PART, VIRTUAL_PART): New.
5874 (METHOD): Adjust to C++ virtual methods.
5875 (scan_target_h): Remove reference to C99.
5876 (dname): Output "target_ops::" prefix.
5877 (write_function_header): Adjust to output a C++ class method.
5878 (write_declaration): New.
5879 (write_delegator): Adjust to output a C++ class method.
5880 (tdname): Output "dummy_target::" prefix.
5881 (write_tdefault, write_debugmethod): Adjust to output a C++ class
5882 method.
5883 (tdefault_names, debug_names): Delete.
5884 (return_types, tdefaults, styles, argtypes_array): New.
5885 (top level): All methods are delegators.
5886 (print_class): New.
5887 (top level): Print dummy_target and debug_target classes.
5888 * target-delegates.c: Regenerate.
5889 * target-debug.h (target_debug_print_enum_info_proc_what)
5890 (target_debug_print_thread_control_capabilities)
5891 (target_debug_print_thread_info_p): New.
5892 * target.c (dummy_target): Delete.
5893 (the_dummy_target, the_debug_target): New.
5894 (target_stack): Now extern.
5895 (set_targetdebug): Push/unpush debug target.
5896 (default_child_has_all_memory, default_child_has_memory)
5897 (default_child_has_stack, default_child_has_registers)
5898 (default_child_has_execution): Remove target_ops parameter.
5899 (complete_target_initialization): Delete.
5900 (add_target_with_completer): No longer call
5901 complete_target_initialization.
5902 (target_supports_terminal_ours): Use regular delegation.
5903 (update_current_target): Delete.
5904 (push_target): No longer check magic number. Don't call
5905 update_current_target.
5906 (unpush_target): Don't call update_current_target.
5907 (target_is_pushed): No longer check magic number.
5908 (target_require_runnable): Skip for all stratums over
5909 process_stratum.
5910 (target_ops::info_proc): New.
5911 (target_info_proc): Use find_target_at and
5912 find_default_run_target.
5913 (target_supports_disable_randomization): Use regular delegation.
5914 (target_get_osdata): Use find_target_at.
5915 (target_ops::open, target_ops::close, target_ops::can_attach)
5916 (target_ops::attach, target_ops::can_create_inferior)
5917 (target_ops::create_inferior, target_ops::can_run)
5918 (target_can_run): New.
5919 (default_fileio_target): Use regular delegation.
5920 (target_ops::fileio_open, target_ops::fileio_pwrite)
5921 (target_ops::fileio_pread, target_ops::fileio_fstat)
5922 (target_ops::fileio_close, target_ops::fileio_unlink)
5923 (target_ops::fileio_readlink): New.
5924 (target_fileio_open_1, target_fileio_unlink)
5925 (target_fileio_readlink): Always call the target method. Handle
5926 FILEIO_ENOSYS.
5927 (return_zero, return_zero_has_execution): Delete.
5928 (init_dummy_target): Delete.
5929 (dummy_target::dummy_target, dummy_target::shortname)
5930 (dummy_target::longname, dummy_target::doc)
5931 (debug_target::debug_target, debug_target::shortname)
5932 (debug_target::longname, debug_target::doc): New.
5933 (target_supports_delete_record): Use regular delegation.
5934 (setup_target_debug): Delete.
5935 (maintenance_print_target_stack): Skip debug_stratum.
5936 (initialize_targets): Instantiate the_dummy_target and
5937 the_debug_target.
5938 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
5939 use target_stack.
5940 (target_auxv_search, fprint_target_auxv): Adjust.
5941 (info_auxv_command): Adjust to use target_stack.
5942 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
5943 * exceptions.c (print_flush): Handle a NULL target_stack.
5944 * regcache.c (target_ops_no_register): Refactor as class with
5945 virtual methods.
5946
5947 * exec.c (exec_target): New class.
5948 (exec_ops): Now an exec_target.
5949 (exec_open, exec_close_1, exec_get_section_table)
5950 (exec_xfer_partial, exec_files_info, exec_has_memory)
5951 (exec_make_note_section): Refactor as exec_target methods.
5952 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
5953 Delete.
5954 (exec_target::find_memory_regions): New.
5955 (_initialize_exec): Don't call init_exec_ops.
5956 * gdbcore.h (exec_file_clear): Delete.
5957
5958 * corefile.c (core_target): Delete.
5959 (core_file_command): Adjust.
5960 * corelow.c (core_target): New class.
5961 (the_core_target): New.
5962 (core_close): Remove target_ops parameter.
5963 (core_close_cleanup): Adjust.
5964 (core_target::close): New.
5965 (core_open, core_detach, get_core_registers, core_files_info)
5966 (core_xfer_partial, core_thread_alive, core_read_description)
5967 (core_pid_to_str, core_thread_name, core_has_memory)
5968 (core_has_stack, core_has_registers, core_info_proc): Rework as
5969 core_target methods.
5970 (ignore, core_remove_breakpoint, init_core_ops): Delete.
5971 (_initialize_corelow): Initialize the_core_target.
5972 * gdbcore.h (core_target): Delete.
5973 (the_core_target): New.
5974
5975 * ctf.c: (ctf_target): New class.
5976 (ctf_ops): Now a ctf_target.
5977 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
5978 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
5979 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
5980 methods.
5981 (init_ctf_ops): Delete.
5982 (_initialize_ctf): Don't call it.
5983 * tracefile-tfile.c (tfile_target): New class.
5984 (tfile_ops): Now a tfile_target.
5985 (tfile_open, tfile_close, tfile_files_info)
5986 (tfile_get_tracepoint_status, tfile_trace_find)
5987 (tfile_fetch_registers, tfile_xfer_partial)
5988 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
5989 Refactor as tfile_target methods.
5990 (tfile_xfer_partial_features): Remove target_ops parameter.
5991 (init_tfile_ops): Delete.
5992 (_initialize_tracefile_tfile): Don't call it.
5993 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
5994 (tracefile_has_stack, tracefile_has_registers)
5995 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
5996 tracefile_target methods.
5997 (init_tracefile_ops): Delete.
5998 (tracefile_target::tracefile_target): New.
5999 * tracefile.h: Include "target.h".
6000 (tracefile_target): New class.
6001 (init_tracefile_ops): Delete.
6002
6003 * spu-multiarch.c (spu_multiarch_target): New class.
6004 (spu_ops): Now a spu_multiarch_target.
6005 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
6006 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
6007 (spu_search_memory, spu_mourn_inferior): Refactor as
6008 spu_multiarch_target methods.
6009 (init_spu_ops): Delete.
6010 (_initialize_spu_multiarch): Remove references to init_spu_ops,
6011 complete_target_initialization.
6012
6013 * ravenscar-thread.c (ravenscar_thread_target): New class.
6014 (ravenscar_ops): Now a ravenscar_thread_target.
6015 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
6016 (ravenscar_thread_alive, ravenscar_pid_to_str)
6017 (ravenscar_fetch_registers, ravenscar_store_registers)
6018 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
6019 (ravenscar_stopped_by_hw_breakpoint)
6020 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
6021 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
6022 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
6023 methods.
6024 (init_ravenscar_thread_ops): Delete.
6025 (_initialize_ravenscar): Remove references to
6026 init_ravenscar_thread_ops and complete_target_initialization.
6027
6028 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
6029 (bsd_uthread_target): New class.
6030 (bsd_uthread_ops): Now a bsd_uthread_target.
6031 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
6032 (bsd_uthread_close, bsd_uthread_mourn_inferior)
6033 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
6034 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
6035 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
6036 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
6037 (bsd_uthread_target): Delete function.
6038 (_initialize_bsd_uthread): Remove reference to
6039 complete_target_initialization.
6040
6041 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
6042 (target_bfd): ... this new class.
6043 (target_bfd_xfer_partial, target_bfd_get_section_table)
6044 (target_bfd_close): Refactor as target_bfd methods.
6045 (target_bfd::~target_bfd): New.
6046 (target_bfd_reopen): Adjust.
6047 (target_bfd::close): New.
6048
6049 * record-btrace.c (record_btrace_target): New class.
6050 (record_btrace_ops): Now a record_btrace_target.
6051 (record_btrace_open, record_btrace_stop_recording)
6052 (record_btrace_disconnect, record_btrace_close)
6053 (record_btrace_async, record_btrace_info)
6054 (record_btrace_insn_history, record_btrace_insn_history_range)
6055 (record_btrace_insn_history_from, record_btrace_call_history)
6056 (record_btrace_call_history_range)
6057 (record_btrace_call_history_from, record_btrace_record_method)
6058 (record_btrace_is_replaying, record_btrace_will_replay)
6059 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
6060 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
6061 (record_btrace_store_registers, record_btrace_prepare_to_store)
6062 (record_btrace_to_get_unwinder)
6063 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
6064 (record_btrace_commit_resume, record_btrace_wait)
6065 (record_btrace_stop, record_btrace_can_execute_reverse)
6066 (record_btrace_stopped_by_sw_breakpoint)
6067 (record_btrace_supports_stopped_by_sw_breakpoint)
6068 (record_btrace_stopped_by_hw_breakpoint)
6069 (record_btrace_supports_stopped_by_hw_breakpoint)
6070 (record_btrace_update_thread_list, record_btrace_thread_alive)
6071 (record_btrace_goto_begin, record_btrace_goto_end)
6072 (record_btrace_goto, record_btrace_stop_replaying_all)
6073 (record_btrace_execution_direction)
6074 (record_btrace_prepare_to_generate_core)
6075 (record_btrace_done_generating_core): Refactor as
6076 record_btrace_target methods.
6077 (init_record_btrace_ops): Delete.
6078 (_initialize_record_btrace): Remove reference to
6079 init_record_btrace_ops.
6080 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
6081 the execution_direction global.
6082 (record_full_base_target, record_full_target)
6083 (record_full_core_target): New classes.
6084 (record_full_ops): Now a record_full_target.
6085 (record_full_core_ops): Now a record_full_core_target.
6086 (record_full_target::detach, record_full_target::disconnect)
6087 (record_full_core_target::disconnect)
6088 (record_full_target::mourn_inferior, record_full_target::kill):
6089 New.
6090 (record_full_open, record_full_close, record_full_async): Refactor
6091 as methods of the record_full_base_target class.
6092 (record_full_resume, record_full_commit_resume): Refactor
6093 as methods of the record_full_target class.
6094 (record_full_wait, record_full_stopped_by_watchpoint)
6095 (record_full_stopped_data_address)
6096 (record_full_stopped_by_sw_breakpoint)
6097 (record_full_supports_stopped_by_sw_breakpoint)
6098 (record_full_stopped_by_hw_breakpoint)
6099 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
6100 methods of the record_full_base_target class.
6101 (record_full_store_registers, record_full_xfer_partial)
6102 (record_full_insert_breakpoint, record_full_remove_breakpoint):
6103 Refactor as methods of the record_full_target class.
6104 (record_full_can_execute_reverse, record_full_get_bookmark)
6105 (record_full_goto_bookmark, record_full_execution_direction)
6106 (record_full_record_method, record_full_info, record_full_delete)
6107 (record_full_is_replaying, record_full_will_replay)
6108 (record_full_goto_begin, record_full_goto_end, record_full_goto)
6109 (record_full_stop_replaying): Refactor as methods of the
6110 record_full_base_target class.
6111 (record_full_core_resume, record_full_core_kill)
6112 (record_full_core_fetch_registers)
6113 (record_full_core_prepare_to_store)
6114 (record_full_core_store_registers, record_full_core_xfer_partial)
6115 (record_full_core_insert_breakpoint)
6116 (record_full_core_remove_breakpoint)
6117 (record_full_core_has_execution): Refactor
6118 as methods of the record_full_core_target class.
6119 (record_full_base_target::supports_delete_record): New.
6120 (init_record_full_ops): Delete.
6121 (init_record_full_core_ops): Delete.
6122 (record_full_save): Refactor as method of the
6123 record_full_base_target class.
6124 (_initialize_record_full): Remove references to
6125 init_record_full_ops and init_record_full_core_ops.
6126
6127 * remote.c (remote_target, extended_remote_target): New classes.
6128 (remote_ops): Now a remote_target.
6129 (extended_remote_ops): Now an extended_remote_target.
6130 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
6131 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
6132 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
6133 (remote_pass_signals, remote_set_syscall_catchpoint)
6134 (remote_program_signals, )
6135 (remote_thread_always_alive): Remove target_ops parameter.
6136 (remote_thread_alive, remote_thread_name)
6137 (remote_update_thread_list, remote_threads_extra_info)
6138 (remote_static_tracepoint_marker_at)
6139 (remote_static_tracepoint_markers_by_strid)
6140 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
6141 (remote_open): Refactor as methods of remote_target.
6142 (extended_remote_open, extended_remote_detach)
6143 (extended_remote_attach, extended_remote_post_attach):
6144 (extended_remote_supports_disable_randomization)
6145 (extended_remote_create_inferior): : Refactor as method of
6146 extended_remote_target.
6147 (remote_set_permissions, remote_open_1, remote_detach)
6148 (remote_follow_fork, remote_follow_exec, remote_disconnect)
6149 (remote_resume, remote_commit_resume, remote_stop)
6150 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
6151 (remote_terminal_ours, remote_wait, remote_fetch_registers)
6152 (remote_prepare_to_store, remote_store_registers)
6153 (remote_flash_erase, remote_flash_done, remote_files_info)
6154 (remote_kill, remote_mourn, remote_insert_breakpoint)
6155 (remote_remove_breakpoint, remote_insert_watchpoint)
6156 (remote_watchpoint_addr_within_range)
6157 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
6158 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
6159 (remote_supports_stopped_by_sw_breakpoint)
6160 (remote_stopped_by_hw_breakpoint)
6161 (remote_supports_stopped_by_hw_breakpoint)
6162 (remote_stopped_by_watchpoint, remote_stopped_data_address)
6163 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
6164 (remote_verify_memory): Refactor as methods of remote_target.
6165 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
6166 parameter.
6167 (remote_xfer_partial, remote_get_memory_xfer_limit)
6168 (remote_search_memory, remote_rcmd, remote_memory_map)
6169 (remote_pid_to_str, remote_get_thread_local_address)
6170 (remote_get_tib_address, remote_read_description): Refactor as
6171 methods of remote_target.
6172 (remote_target::fileio_open, remote_target::fileio_pwrite)
6173 (remote_target::fileio_pread, remote_target::fileio_close): New.
6174 (remote_hostio_readlink, remote_hostio_fstat)
6175 (remote_filesystem_is_local, remote_can_execute_reverse)
6176 (remote_supports_non_stop, remote_supports_disable_randomization)
6177 (remote_supports_multi_process, remote_supports_cond_breakpoints)
6178 (remote_supports_enable_disable_tracepoint)
6179 (remote_supports_string_tracing)
6180 (remote_can_run_breakpoint_commands, remote_trace_init)
6181 (remote_download_tracepoint, remote_can_download_tracepoint)
6182 (remote_download_trace_state_variable, remote_enable_tracepoint)
6183 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
6184 (remote_trace_start, remote_get_trace_status)
6185 (remote_get_tracepoint_status, remote_trace_stop)
6186 (remote_trace_find, remote_get_trace_state_variable_value)
6187 (remote_save_trace_data, remote_get_raw_trace_data)
6188 (remote_set_disconnected_tracing, remote_core_of_thread)
6189 (remote_set_circular_trace_buffer, remote_traceframe_info)
6190 (remote_get_min_fast_tracepoint_insn_len)
6191 (remote_set_trace_buffer_size, remote_set_trace_notes)
6192 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
6193 (remote_disable_btrace, remote_teardown_btrace)
6194 (remote_read_btrace, remote_btrace_conf)
6195 (remote_augmented_libraries_svr4_read, remote_load)
6196 (remote_pid_to_exec_file, remote_can_do_single_step)
6197 (remote_execution_direction, remote_thread_handle_to_thread_info):
6198 Refactor as methods of remote_target.
6199 (init_remote_ops, init_extended_remote_ops): Delete.
6200 (remote_can_async_p, remote_is_async_p, remote_async)
6201 (remote_thread_events, remote_upload_tracepoints)
6202 (remote_upload_trace_state_variables): Refactor as methods of
6203 remote_target.
6204 (_initialize_remote): Remove references to init_remote_ops and
6205 init_extended_remote_ops.
6206
6207 * remote-sim.c (gdbsim_target): New class.
6208 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
6209 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
6210 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
6211 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
6212 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
6213 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
6214 Refactor as methods of gdbsim_target.
6215 (gdbsim_ops): Now a gdbsim_target.
6216 (init_gdbsim_ops): Delete.
6217 (gdbsim_cntrl_c): Adjust.
6218 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
6219
6220 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
6221 (the_amd64_linux_nat_target): New.
6222 (amd64_linux_fetch_inferior_registers)
6223 (amd64_linux_store_inferior_registers): Refactor as methods of
6224 amd64_linux_nat_target.
6225 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
6226 * i386-linux-nat.c: Don't include "linux-nat.h".
6227 (i386_linux_nat_target): New class.
6228 (the_i386_linux_nat_target): New.
6229 (i386_linux_fetch_inferior_registers)
6230 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
6231 as methods of i386_linux_nat_target.
6232 (_initialize_i386_linux_nat): Adjust. Set linux_target.
6233 * inf-child.c (inf_child_ops): Delete.
6234 (inf_child_fetch_inferior_registers)
6235 (inf_child_store_inferior_registers): Delete.
6236 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
6237 methods of inf_child_target.
6238 (inf_child_target::supports_terminal_ours)
6239 (inf_child_target::terminal_init)
6240 (inf_child_target::terminal_inferior)
6241 (inf_child_target::terminal_ours_for_output)
6242 (inf_child_target::terminal_ours, inf_child_target::interrupt)
6243 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
6244 New.
6245 (inf_child_open, inf_child_disconnect, inf_child_close)
6246 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
6247 (inf_child_post_startup_inferior, inf_child_can_run)
6248 (inf_child_pid_to_exec_file): Refactor as methods of
6249 inf_child_target.
6250 (inf_child_follow_fork): Delete.
6251 (inf_child_target::can_create_inferior)
6252 (inf_child_target::can_attach): New.
6253 (inf_child_target::has_all_memory, inf_child_target::has_memory)
6254 (inf_child_target::has_stack, inf_child_target::has_registers)
6255 (inf_child_target::has_execution): New.
6256 (inf_child_fileio_open, inf_child_fileio_pwrite)
6257 (inf_child_fileio_pread, inf_child_fileio_fstat)
6258 (inf_child_fileio_close, inf_child_fileio_unlink)
6259 (inf_child_fileio_readlink, inf_child_use_agent)
6260 (inf_child_can_use_agent): Refactor as methods of
6261 inf_child_target.
6262 (return_zero, inf_child_target): Delete.
6263 (inf_child_target::inf_child_target): New.
6264 * inf-child.h: Include "target.h".
6265 (inf_child_target): Delete function prototype.
6266 (inf_child_target): New class.
6267 (inf_child_open_target, inf_child_mourn_inferior)
6268 (inf_child_maybe_unpush_target): Delete.
6269 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
6270 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
6271 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
6272 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
6273 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
6274 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
6275 (inf_ptrace_wait, inf_ptrace_xfer_partial)
6276 (inf_ptrace_thread_alive, inf_ptrace_files_info)
6277 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
6278 methods of inf_ptrace_target.
6279 (inf_ptrace_target): Delete function.
6280 * inf-ptrace.h: Include "inf-child.h".
6281 (inf_ptrace_target): Delete function declaration.
6282 (inf_ptrace_target): New class.
6283 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
6284 * linux-nat.c (linux_target): New.
6285 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
6286 (linux_nat_target::~linux_nat_target): New.
6287 (linux_child_post_attach, linux_child_post_startup_inferior)
6288 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
6289 (linux_child_remove_fork_catchpoint)
6290 (linux_child_insert_vfork_catchpoint)
6291 (linux_child_remove_vfork_catchpoint)
6292 (linux_child_insert_exec_catchpoint)
6293 (linux_child_remove_exec_catchpoint)
6294 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
6295 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
6296 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
6297 (linux_nat_stopped_data_address)
6298 (linux_nat_stopped_by_sw_breakpoint)
6299 (linux_nat_supports_stopped_by_sw_breakpoint)
6300 (linux_nat_stopped_by_hw_breakpoint)
6301 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
6302 (linux_nat_kill, linux_nat_mourn_inferior)
6303 (linux_nat_xfer_partial, linux_nat_thread_alive)
6304 (linux_nat_update_thread_list, linux_nat_pid_to_str)
6305 (linux_nat_thread_name, linux_child_pid_to_exec_file)
6306 (linux_child_static_tracepoint_markers_by_strid)
6307 (linux_nat_is_async_p, linux_nat_can_async_p)
6308 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
6309 (linux_nat_supports_multi_process)
6310 (linux_nat_supports_disable_randomization, linux_nat_async)
6311 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
6312 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
6313 (linux_nat_fileio_open, linux_nat_fileio_readlink)
6314 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
6315 methods of linux_nat_target.
6316 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
6317 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
6318 parameter.
6319 (check_stopped_by_watchpoint): Adjust.
6320 (linux_xfer_partial): Delete.
6321 (linux_target_install_ops, linux_target, linux_nat_add_target):
6322 Delete.
6323 (linux_nat_target::linux_nat_target): New.
6324 * linux-nat.h: Include "inf-ptrace.h".
6325 (linux_nat_target): New.
6326 (linux_target, linux_target_install_ops, linux_nat_add_target):
6327 Delete function declarations.
6328 (linux_target): Declare global.
6329 * linux-thread-db.c (thread_db_target): New.
6330 (thread_db_target::thread_db_target): New.
6331 (thread_db_ops): Delete.
6332 (the_thread_db_target): New.
6333 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
6334 (thread_db_update_thread_list, thread_db_pid_to_str)
6335 (thread_db_extra_thread_info)
6336 (thread_db_thread_handle_to_thread_info)
6337 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
6338 (thread_db_resume): Refactor as methods of thread_db_target.
6339 (init_thread_db_ops): Delete.
6340 (_initialize_thread_db): Remove reference to init_thread_db_ops.
6341 * x86-linux-nat.c: Don't include "linux-nat.h".
6342 (super_post_startup_inferior): Delete.
6343 (x86_linux_nat_target::~x86_linux_nat_target): New.
6344 (x86_linux_child_post_startup_inferior)
6345 (x86_linux_read_description, x86_linux_enable_btrace)
6346 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
6347 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
6348 methods of x86_linux_nat_target.
6349 (x86_linux_create_target): Delete. Bits folded ...
6350 (x86_linux_add_target): ... here. Now takes a linux_nat_target
6351 pointer.
6352 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
6353 (x86_linux_nat_target): New class.
6354 (x86_linux_create_target): Delete.
6355 (x86_linux_add_target): Now takes a linux_nat_target pointer.
6356 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
6357 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
6358 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
6359 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
6360 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
6361 make extern.
6362 (x86_use_watchpoints): Delete.
6363 * x86-nat.h: Include "breakpoint.h" and "target.h".
6364 (x86_use_watchpoints): Delete.
6365 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
6366 (x86_stopped_by_watchpoint, x86_stopped_data_address)
6367 (x86_insert_watchpoint, x86_remove_watchpoint)
6368 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
6369 (x86_stopped_by_hw_breakpoint): New declarations.
6370 (x86_nat_target): New template class.
6371
6372 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
6373 (the_ppc_linux_nat_target): New.
6374 (ppc_linux_fetch_inferior_registers)
6375 (ppc_linux_can_use_hw_breakpoint)
6376 (ppc_linux_region_ok_for_hw_watchpoint)
6377 (ppc_linux_ranged_break_num_registers)
6378 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
6379 (ppc_linux_insert_mask_watchpoint)
6380 (ppc_linux_remove_mask_watchpoint)
6381 (ppc_linux_can_accel_watchpoint_condition)
6382 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
6383 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
6384 (ppc_linux_watchpoint_addr_within_range)
6385 (ppc_linux_masked_watch_num_registers)
6386 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
6387 (ppc_linux_read_description): Refactor as methods of
6388 ppc_linux_nat_target.
6389 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
6390
6391 * procfs.c (procfs_xfer_partial): Delete forward declaration.
6392 (procfs_target): New class.
6393 (the_procfs_target): New.
6394 (procfs_target): Delete function.
6395 (procfs_auxv_parse, procfs_attach, procfs_detach)
6396 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
6397 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
6398 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
6399 (procfs_create_inferior, procfs_update_thread_list)
6400 (procfs_thread_alive, procfs_pid_to_str)
6401 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
6402 (procfs_stopped_data_address, procfs_insert_watchpoint)
6403 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
6404 (proc_find_memory_regions, procfs_info_proc)
6405 (procfs_make_note_section): Refactor as methods of procfs_target.
6406 (_initialize_procfs): Adjust.
6407 * sol-thread.c (sol_thread_target): New class.
6408 (sol_thread_ops): Now a sol_thread_target.
6409 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
6410 (sol_thread_fetch_registers, sol_thread_store_registers)
6411 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
6412 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
6413 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
6414 (init_sol_thread_ops): Delete.
6415 (_initialize_sol_thread): Adjust. Remove references to
6416 init_sol_thread_ops and complete_target_initialization.
6417
6418 * windows-nat.c (windows_nat_target): New class.
6419 (windows_fetch_inferior_registers)
6420 (windows_store_inferior_registers, windows_resume, windows_wait)
6421 (windows_attach, windows_detach, windows_pid_to_exec_file)
6422 (windows_files_info, windows_create_inferior)
6423 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
6424 (windows_close, windows_pid_to_str, windows_xfer_partial)
6425 (windows_get_tib_address, windows_get_ada_task_ptid)
6426 (windows_thread_name, windows_thread_alive): Refactor as
6427 windows_nat_target methods.
6428 (do_initial_windows_stuff): Adjust.
6429 (windows_target): Delete function.
6430 (_initialize_windows_nat): Adjust.
6431
6432 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
6433 (darwin_mourn_inferior, darwin_kill_inferior)
6434 (darwin_create_inferior, darwin_attach, darwin_detach)
6435 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
6436 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
6437 (darwin_supports_multi_process): Refactor as darwin_nat_target
6438 methods.
6439 (darwin_resume_to, darwin_files_info): Delete.
6440 (_initialize_darwin_inferior): Rename to ...
6441 (_initialize_darwin_nat): ... this. Adjust to C++ification.
6442 * darwin-nat.h: Include "inf-child.h".
6443 (darwin_nat_target): New class.
6444 (darwin_complete_target): Delete.
6445 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
6446 (darwin_target): New.
6447 (i386_darwin_fetch_inferior_registers)
6448 (i386_darwin_store_inferior_registers): Refactor as methods of
6449 darwin_nat_target.
6450 (darwin_complete_target): Delete, with ...
6451 (_initialize_i386_darwin_nat): ... bits factored out here.
6452
6453 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
6454 (the_alpha_linux_nat_target): New.
6455 (alpha_linux_register_u_offset): Refactor as
6456 alpha_linux_nat_target method.
6457 (_initialize_alpha_linux_nat): Adjust.
6458 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
6459 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6460 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
6461 methods of linux_nat_trad_target.
6462 (linux_trad_target): Delete.
6463 * linux-nat-trad.h (linux_trad_target): Delete function.
6464 (linux_nat_trad_target): New class.
6465 * mips-linux-nat.c (mips_linux_nat_target): New class.
6466 (super_fetch_registers, super_store_registers, super_close):
6467 Delete.
6468 (the_mips_linux_nat_target): New.
6469 (mips64_linux_regsets_fetch_registers)
6470 (mips64_linux_regsets_store_registers)
6471 (mips64_linux_fetch_registers, mips64_linux_store_registers)
6472 (mips_linux_register_u_offset, mips_linux_read_description)
6473 (mips_linux_can_use_hw_breakpoint)
6474 (mips_linux_stopped_by_watchpoint)
6475 (mips_linux_stopped_data_address)
6476 (mips_linux_region_ok_for_hw_watchpoint)
6477 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
6478 (mips_linux_close): Refactor as methods of mips_linux_nat.
6479 (_initialize_mips_linux_nat): Adjust to C++ification.
6480
6481 * aix-thread.c (aix_thread_target): New class.
6482 (aix_thread_ops): Now an aix_thread_target.
6483 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
6484 (aix_thread_fetch_registers, aix_thread_store_registers)
6485 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
6486 (aix_thread_thread_alive, aix_thread_pid_to_str)
6487 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
6488 Refactor as methods of aix_thread_target.
6489 (init_aix_thread_ops): Delete.
6490 (_initialize_aix_thread): Remove references to init_aix_thread_ops
6491 and complete_target_initialization.
6492 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
6493 (rs6000_nat_target): New class.
6494 (the_rs6000_nat_target): New.
6495 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
6496 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
6497 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
6498 (super_create_inferior): Delete.
6499 (_initialize_rs6000_nat): Adjust to C++ification.
6500
6501 * arm-linux-nat.c (arm_linux_nat_target): New class.
6502 (the_arm_linux_nat_target): New.
6503 (arm_linux_fetch_inferior_registers)
6504 (arm_linux_store_inferior_registers, arm_linux_read_description)
6505 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
6506 (arm_linux_remove_hw_breakpoint)
6507 (arm_linux_region_ok_for_hw_watchpoint)
6508 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
6509 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
6510 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
6511 arm_linux_nat_target.
6512 (_initialize_arm_linux_nat): Adjust to C++ification.
6513
6514 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
6515 (the_aarch64_linux_nat_target): New.
6516 (aarch64_linux_fetch_inferior_registers)
6517 (aarch64_linux_store_inferior_registers)
6518 (aarch64_linux_child_post_startup_inferior)
6519 (aarch64_linux_read_description)
6520 (aarch64_linux_can_use_hw_breakpoint)
6521 (aarch64_linux_insert_hw_breakpoint)
6522 (aarch64_linux_remove_hw_breakpoint)
6523 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
6524 (aarch64_linux_region_ok_for_hw_watchpoint)
6525 (aarch64_linux_stopped_data_address)
6526 (aarch64_linux_stopped_by_watchpoint)
6527 (aarch64_linux_watchpoint_addr_within_range)
6528 (aarch64_linux_can_do_single_step): Refactor as methods of
6529 aarch64_linux_nat_target.
6530 (super_post_startup_inferior): Delete.
6531 (_initialize_aarch64_linux_nat): Adjust to C++ification.
6532
6533 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
6534 (the_hppa_linux_nat_target): New.
6535 (hppa_linux_fetch_inferior_registers)
6536 (hppa_linux_store_inferior_registers): Refactor as methods of
6537 hppa_linux_nat_target.
6538 (_initialize_hppa_linux_nat): Adjust to C++ification.
6539
6540 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
6541 (the_ia64_linux_nat_target): New.
6542 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
6543 (ia64_linux_stopped_data_address)
6544 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
6545 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
6546 ia64_linux_nat_target methods.
6547 (super_xfer_partial): Delete.
6548 (_initialize_ia64_linux_nat): Adjust to C++ification.
6549
6550 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
6551 (the_m32r_linux_nat_target): New.
6552 (m32r_linux_fetch_inferior_registers)
6553 (m32r_linux_store_inferior_registers): Refactor as
6554 m32r_linux_nat_target methods.
6555 (_initialize_m32r_linux_nat): Adjust to C++ification.
6556
6557 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
6558 (the_m68k_linux_nat_target): New.
6559 (m68k_linux_fetch_inferior_registers)
6560 (m68k_linux_store_inferior_registers): Refactor as
6561 m68k_linux_nat_target methods.
6562 (_initialize_m68k_linux_nat): Adjust to C++ification.
6563
6564 * s390-linux-nat.c (s390_linux_nat_target): New class.
6565 (the_s390_linux_nat_target): New.
6566 (s390_linux_fetch_inferior_registers)
6567 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
6568 (s390_insert_watchpoint, s390_remove_watchpoint)
6569 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
6570 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
6571 (s390_auxv_parse, s390_read_description): Refactor as methods of
6572 s390_linux_nat_target.
6573 (_initialize_s390_nat): Adjust to C++ification.
6574
6575 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
6576 (the_sparc_linux_nat_target): New.
6577 (_initialize_sparc_linux_nat): Adjust to C++ification.
6578 * sparc-nat.c (sparc_fetch_inferior_registers)
6579 (sparc_store_inferior_registers): Remove target_ops parameter.
6580 * sparc-nat.h (sparc_fetch_inferior_registers)
6581 (sparc_store_inferior_registers): Remove target_ops parameter.
6582 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
6583 (the_sparc64_linux_nat_target): New.
6584 (_initialize_sparc64_linux_nat): Adjust to C++ification.
6585
6586 * spu-linux-nat.c (spu_linux_nat_target): New class.
6587 (the_spu_linux_nat_target): New.
6588 (spu_child_post_startup_inferior, spu_child_post_attach)
6589 (spu_child_wait, spu_fetch_inferior_registers)
6590 (spu_store_inferior_registers, spu_xfer_partial)
6591 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
6592 methods.
6593 (_initialize_spu_nat): Adjust to C++ification.
6594
6595 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
6596 (the_tilegx_linux_nat_target): New.
6597 (fetch_inferior_registers, store_inferior_registers):
6598 Refactor as methods.
6599 (_initialize_tile_linux_nat): Adjust to C++ification.
6600
6601 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
6602 (the_xtensa_linux_nat_target): New.
6603 (xtensa_linux_fetch_inferior_registers)
6604 (xtensa_linux_store_inferior_registers): Refactor as
6605 xtensa_linux_nat_target methods.
6606 (_initialize_xtensa_linux_nat): Adjust to C++ification.
6607
6608 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
6609 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
6610 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
6611 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
6612 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
6613 (fbsd_stopped_by_sw_breakpoint)
6614 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
6615 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
6616 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
6617 (fbsd_post_startup_inferior, fbsd_post_attach)
6618 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
6619 (fbsd_set_syscall_catchpoint)
6620 (super_xfer_partial, super_resume, super_wait)
6621 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
6622 (fbsd_handle_debug_trap): Remove target_ops parameter.
6623 (fbsd_nat_add_target): Delete.
6624 * fbsd-nat.h: Include "inf-ptrace.h".
6625 (fbsd_nat_add_target): Delete.
6626 (USE_SIGTRAP_SIGINFO): Define.
6627 (fbsd_nat_target): New class.
6628
6629 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
6630 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
6631 (amd64bsd_target): Delete.
6632 * amd64-bsd-nat.h: New file.
6633 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
6634 "x86-bsd-nat.h".
6635 (amd64_fbsd_nat_target): New class.
6636 (the_amd64_fbsd_nat_target): New.
6637 (amd64fbsd_read_description): Refactor as method of
6638 amd64_fbsd_nat_target.
6639 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6640 (_initialize_amd64fbsd_nat): Adjust to C++ification.
6641 * amd64-nat.h (amd64bsd_target): Delete function declaration.
6642 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
6643 (i386bsd_store_inferior_registers): Remove target_ops parameter.
6644 (i386bsd_target): Delete.
6645 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
6646 (i386bsd_fetch_inferior_registers)
6647 (i386bsd_store_inferior_registers): Declare.
6648 (i386_bsd_nat_target): New class.
6649 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
6650 (the_i386_fbsd_nat_target): New.
6651 (i386fbsd_resume, i386fbsd_read_description): Refactor as
6652 i386_fbsd_nat_target methods.
6653 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6654 (_initialize_i386fbsd_nat): Adjust to C++ification.
6655 * x86-bsd-nat.c (super_mourn_inferior): Delete.
6656 (x86bsd_mourn_inferior, x86bsd_target): Delete.
6657 (_initialize_x86_bsd_nat): Adjust to C++ification.
6658 * x86-bsd-nat.h: Include "x86-nat.h".
6659 (x86bsd_target): Delete declaration.
6660 (x86bsd_nat_target): New class.
6661
6662 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
6663 (the_aarch64_fbsd_nat_target): New.
6664 (aarch64_fbsd_fetch_inferior_registers)
6665 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
6666 aarch64_fbsd_nat_target.
6667 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
6668 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
6669 (the_alpha_bsd_nat_target): New.
6670 (alphabsd_fetch_inferior_registers)
6671 (alphabsd_store_inferior_registers): Refactor as
6672 alpha_bsd_nat_target methods.
6673 (_initialize_alphabsd_nat): Refactor as methods of
6674 alpha_bsd_nat_target.
6675 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
6676 (the_amd64_nbsd_nat_target): New.
6677 (_initialize_amd64nbsd_nat): Adjust to C++ification.
6678 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
6679 (the_amd64_obsd_nat_target): New.
6680 (_initialize_amd64obsd_nat): Adjust to C++ification.
6681 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
6682 (the_arm_fbsd_nat_target): New.
6683 (arm_fbsd_fetch_inferior_registers)
6684 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
6685 (_initialize_arm_fbsd_nat): Refactor as methods of
6686 arm_fbsd_nat_target.
6687 (_initialize_arm_fbsd_nat): Adjust to C++ification.
6688 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
6689 (the_arm_netbsd_nat_target): New.
6690 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
6691 arm_netbsd_nat_target.
6692 (_initialize_arm_netbsd_nat): Adjust to C++ification.
6693 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
6694 (the_hppa_nbsd_nat_target): New.
6695 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
6696 hppa_nbsd_nat_target methods.
6697 (_initialize_hppanbsd_nat): Adjust to C++ification.
6698 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
6699 (the_hppa_obsd_nat_target): New.
6700 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
6701 methods of hppa_obsd_nat_target.
6702 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
6703 add_target.
6704 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
6705 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
6706 add_target.
6707 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
6708 (_initialize_i386obsd_nat): Use add_target.
6709 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
6710 (the_m68k_bsd_nat_target): New.
6711 (m68kbsd_fetch_inferior_registers)
6712 (m68kbsd_store_inferior_registers): Refactor as methods of
6713 m68k_bsd_nat_target.
6714 (_initialize_m68kbsd_nat): Adjust to C++ification.
6715 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
6716 (the_mips_fbsd_nat_target): New.
6717 (mips_fbsd_fetch_inferior_registers)
6718 (mips_fbsd_store_inferior_registers): Refactor as methods of
6719 mips_fbsd_nat_target.
6720 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
6721 add_target.
6722 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
6723 (the_mips_nbsd_nat_target): New.
6724 (mipsnbsd_fetch_inferior_registers)
6725 (mipsnbsd_store_inferior_registers): Refactor as methods of
6726 mips_nbsd_nat_target.
6727 (_initialize_mipsnbsd_nat): Adjust to C++ification.
6728 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
6729 (the_mips64_obsd_nat_target): New.
6730 (mips64obsd_fetch_inferior_registers)
6731 (mips64obsd_store_inferior_registers): Refactor as methods of
6732 mips64_obsd_nat_target.
6733 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
6734 add_target.
6735 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
6736 nbsd_nat_target.
6737 * nbsd-nat.h: Include "inf-ptrace.h".
6738 (nbsd_nat_target): New class.
6739 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
6740 (obsd_wait): Refactor as methods of obsd_nat_target.
6741 (obsd_add_target): Delete.
6742 * obsd-nat.h: Include "inf-ptrace.h".
6743 (obsd_nat_target): New class.
6744 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
6745 (the_ppc_fbsd_nat_target): New.
6746 (ppcfbsd_fetch_inferior_registers)
6747 (ppcfbsd_store_inferior_registers): Refactor as methods of
6748 ppc_fbsd_nat_target.
6749 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
6750 add_target.
6751 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
6752 (the_ppc_nbsd_nat_target): New.
6753 (ppcnbsd_fetch_inferior_registers)
6754 (ppcnbsd_store_inferior_registers): Refactor as methods of
6755 ppc_nbsd_nat_target.
6756 (_initialize_ppcnbsd_nat): Adjust to C++ification.
6757 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
6758 (the_ppc_obsd_nat_target): New.
6759 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
6760 methods of ppc_obsd_nat_target.
6761 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
6762 add_target.
6763 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
6764 (the_sh_nbsd_nat_target): New.
6765 (shnbsd_fetch_inferior_registers)
6766 (shnbsd_store_inferior_registers): Refactor as methods of
6767 sh_nbsd_nat_target.
6768 (_initialize_shnbsd_nat): Adjust to C++ification.
6769 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
6770 (inf_ptrace_xfer_partial): Delete.
6771 (sparc_xfer_partial, sparc_target): Delete.
6772 * sparc-nat.h (sparc_fetch_inferior_registers)
6773 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
6774 (sparc_target): Delete function declaration.
6775 (sparc_target): New template class.
6776 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
6777 (_initialize_sparcnbsd_nat): Adjust to C++ification.
6778 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
6779 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
6780 add_target.
6781 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
6782 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
6783 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
6784 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
6785 add_target.
6786 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
6787 (the_vax_bsd_nat_target): New.
6788 (vaxbsd_fetch_inferior_registers)
6789 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
6790 methods.
6791 (_initialize_vaxbsd_nat): Adjust to C++ification.
6792
6793 * bsd-kvm.c (bsd_kvm_target): New class.
6794 (bsd_kvm_ops): Now a bsd_kvm_target.
6795 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
6796 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
6797 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
6798 bsd_kvm_target.
6799 (bsd_kvm_return_one): Delete.
6800 (bsd_kvm_add_target): Adjust to C++ification.
6801
6802 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
6803 (nto_procfs_target_procfs): New classes.
6804 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
6805 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
6806 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
6807 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
6808 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
6809 (procfs_remove_hw_breakpoint, procfs_resume)
6810 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
6811 (procfs_kill_inferior, procfs_store_registers)
6812 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
6813 as methods of nto_procfs_target.
6814 (nto_procfs_ops): Now an nto_procfs_target_procfs.
6815 (nto_native_ops): Delete.
6816 (procfs_open, procfs_native_open): Delete.
6817 (nto_native_ops): Now an nto_procfs_target_native.
6818 (init_procfs_targets): Adjust to C++ification.
6819 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
6820 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
6821 Refactor as methods of nto_procfs_target.
6822
6823 * go32-nat.c (go32_nat_target): New class.
6824 (the_go32_nat_target): New.
6825 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
6826 (go32_store_registers, go32_xfer_partial, go32_files_info)
6827 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
6828 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
6829 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
6830 (go32_pid_to_str): Refactor as methods of go32_nat_target.
6831 (go32_target): Delete.
6832 (_initialize_go32_nat): Adjust to C++ification.
6833
6834 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
6835 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
6836 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
6837 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
6838 gnu_nat_target.
6839 (gnu_target): Delete.
6840 * gnu-nat.h (gnu_target): Delete.
6841 (gnu_nat_target): New class.
6842 * i386-gnu-nat.c (gnu_base_target): New.
6843 (i386_gnu_nat_target): New class.
6844 (the_i386_gnu_nat_target): New.
6845 (_initialize_i386gnu_nat): Adjust to C++ification.
6846
6847 2018-05-02 Pedro Alves <palves@redhat.com>
6848
6849 * bfd-target.c (target_bfd_xclose): Rename to ...
6850 (target_bfd_close): ... this.
6851 (target_bfd_reopen): Adjust.
6852 * target.c (target_close): Remove references to to_xclose.
6853 * target.h (target_ops::to_xclose): Delete.
6854 (target_ops::to_close): Update comments.
6855
6856 2018-05-02 Pedro Alves <palves@redhat.com>
6857
6858 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
6859 "linux-nat.h".
6860 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
6861 * inf-ptrace.c (inf_ptrace_register_u_offset)
6862 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6863 (inf_ptrace_store_register, inf_ptrace_store_registers)
6864 (inf_ptrace_trad_target): Move to ...
6865 * linux-nat-trad.c: ... this new file.
6866 * linux-nat-trad.h: New file.
6867 * linux-nat.c (linux_target_install_ops): Make extern.
6868 (linux_trad_target): Delete.
6869 * linux-nat.h (linux_trad_target): Delete declaration.
6870 (linux_target_install_ops): Declare.
6871 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
6872 "linux-nat.h".
6873
6874 2018-05-02 Pedro Alves <palves@redhat.com>
6875
6876 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6877 procfs_target/add_target here.
6878 * procfs.c (procfs_target): Make static.
6879 (_initialize_procfs): Call add_target here.
6880 * procfs.h (struct target_ops): Remove forward declaration.
6881 (procfs_target): Remove declaration.
6882 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
6883
6884 2018-05-02 Pedro Alves <palves@redhat.com>
6885
6886 * procfs.c (procfs_stopped_by_watchpoint)
6887 (procfs_insert_watchpoint, procfs_remove_watchpoint)
6888 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
6889 Forward declare.
6890 (procfs_use_watchpoints): Delete, move contents...
6891 (procfs_target): ... here.
6892 * procfs.h (procfs_use_watchpoints): Delete declaration.
6893 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6894 procfs_use_watchpoints.
6895 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
6896 procfs_use_watchpoints.
6897
6898 2018-05-02 Tom Tromey <tom@tromey.com>
6899
6900 PR python/20084:
6901 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
6902 and var_zuinteger_unlimited.
6903 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
6904 and PARAM_ZUINTEGER_UNLIMITED.
6905 (set_parameter_value): Handle var_zuinteger and
6906 var_zuinteger_unlimited.
6907 (add_setshow_generic): Likewise.
6908 (parmpy_init): Likewise.
6909
6910 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
6911
6912 PR rust/23124
6913 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
6914 pointer is not null before dereferencing it.
6915
6916 2018-04-30 Tom Tromey <tom@tromey.com>
6917
6918 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
6919 is_mi_like_p.
6920
6921 2018-04-30 Tom Tromey <tom@tromey.com>
6922
6923 * breakpoint.c (mention): Remove use of is_mi_like_p.
6924 (print_mention_ranged_breakpoint): Likewise.
6925 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
6926 of is_mi_like_p.
6927
6928 2018-04-30 Tom Tromey <tom@tromey.com>
6929
6930 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
6931
6932 2018-04-30 Tom Tromey <tom@tromey.com>
6933
6934 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
6935 (info_spu_event_command): Remove some uses of is_mi_like_p.
6936
6937 2018-04-30 Tom Tromey <tom@tromey.com>
6938
6939 * python/py-framefilter.c (py_print_single_arg)
6940 (enumerate_locals, py_print_args, py_print_frame): Remove some
6941 uses of is_mi_like_p.
6942
6943 2018-04-30 Tom Tromey <tom@tromey.com>
6944
6945 * ui-out.c: Update.
6946 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
6947 * ui-out.h (ui_out::is_mi_like_p): Now const.
6948 (ui_out::do_is_mi_like_p): Now const.
6949 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
6950
6951 2018-04-30 Tom Tromey <tom@tromey.com>
6952
6953 * varobj.c (varobj_set_visualizer): Use new_reference.
6954 * python/python.c (gdbpy_decode_line): Use new_reference.
6955 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
6956 new_reference.
6957
6958 2018-04-30 Tom Tromey <tom@tromey.com>
6959
6960 * varobj.c (install_new_value): Use new_reference.
6961 * value.h (value_incref): Return void. Swap intro comment with
6962 value_decref.
6963 * value.c (set_value_parent): Use new_reference.
6964 (value_incref): Return void. Update intro comment.
6965 (release_value): Use new_reference.
6966 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
6967
6968 2018-04-30 Tom Tromey <tom@tromey.com>
6969
6970 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
6971 * gdb_bfd.h (new_bfd_ref): Remove.
6972 (gdb_bfd_open): Update comment.
6973 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
6974 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
6975 (gdb_bfd_fdopenr): Use new_reference.
6976 * exec.c (exec_file_attach): Use new_reference.
6977
6978 2018-04-30 Tom Tromey <tom@tromey.com>
6979
6980 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
6981 method.
6982
6983 2018-04-30 Tom Tromey <tom@tromey.com>
6984
6985 * jit.c (jit_read_code_entry): Use type_align.
6986 * i386-tdep.c (i386_gdbarch_init): Don't call
6987 set_gdbarch_long_long_align_bit.
6988 * gdbarch.sh: Remove long_long_align_bit.
6989 * gdbarch.c, gdbarch.h: Rebuild.
6990 * arc-tdep.c (arc_type_align): New function.
6991 (arc_gdbarch_init): Use arc_type_align. Don't call
6992 set_gdbarch_long_long_align_bit.
6993
6994 2018-04-30 Tom Tromey <tom@tromey.com>
6995
6996 * rust-lang.c (rust_type_alignment): Remove.
6997 (rust_composite_type): Use type_align.
6998
6999 2018-04-30 Tom Tromey <tom@tromey.com>
7000
7001 * NEWS: Mention Type.align.
7002 * python/py-type.c (typy_get_alignof): New function.
7003 (type_object_getset): Add "alignof".
7004
7005 2018-04-30 Tom Tromey <tom@tromey.com>
7006
7007 PR exp/17095:
7008 * NEWS: Update.
7009 * std-operator.def (UNOP_ALIGNOF): New operator.
7010 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
7011 New.
7012 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
7013 * c-lang.c (c_op_print_tab): Add alignof.
7014 * c-exp.y (ALIGNOF): New token.
7015 (exp): Add "ALIGNOF" production.
7016 (ident_tokens): Add _Alignof and alignof.
7017
7018 2018-04-30 Tom Tromey <tom@tromey.com>
7019
7020 * i386-tdep.c (i386_type_align): New function.
7021 (i386_gdbarch_init): Update.
7022 * gdbarch.sh (type_align): New method.
7023 * gdbarch.c, gdbarch.h: Rebuild.
7024 * arch-utils.h (default_type_align): Declare.
7025 * arch-utils.c (default_type_align): New function.
7026 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
7027 (struct type) <align_log2>: New field.
7028 <instance_flags>: Now a bitfield.
7029 (TYPE_RAW_ALIGN): New macro.
7030 (type_align, type_raw_align, set_type_align): Declare.
7031 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
7032 functions.
7033 * dwarf2read.c (quirk_rust_enum): Set type alignment.
7034 (get_alignment, maybe_set_alignment): New functions.
7035 (read_structure_type, read_enumeration_type, read_array_type)
7036 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
7037 (read_subrange_type, read_base_type): Set type alignment.
7038
7039 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
7040
7041 * dwarf2read.c (read_index_from_section): Use bool.
7042
7043 2018-04-29 Fabian Groffen <grobian@gentoo.org>
7044
7045 PR gdb/22950
7046 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
7047 with #ifdef.
7048
7049 2018-04-29 John Reiser <jreiser@BitWagon.com>
7050
7051 PR build/22873
7052 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
7053 last step, and do it atomically.
7054
7055 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
7056
7057 * compile/compile-c-types.c (convert_int, convert_float):
7058 Update for C FE v1.
7059
7060 2018-04-27 Tom Tromey <tom@tromey.com>
7061
7062 PR rust/22545:
7063 * rust-lang.c (rust_inclusive_range_type_p): New function.
7064 (rust_range): Handle inclusive ranges.
7065 (rust_compute_range): Likewise.
7066 * rust-exp.y (struct rust_op) <inclusive>: New field.
7067 (DOTDOTEQ): New constant.
7068 (range_expr): Add "..=" productions.
7069 (operator_tokens): Add "..=" token.
7070 (ast_range): Add "inclusive" parameter.
7071 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
7072 ranges.
7073 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
7074 bounds values.
7075 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
7076 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
7077 Update comments.
7078 * expprint.c (print_subexp_standard): Handle new bounds values.
7079 (dump_subexp_body_standard): Likewise.
7080
7081 2018-04-27 Tom Tromey <tom@tromey.com>
7082
7083 * configure: Rebuild.
7084 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
7085 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
7086 "OVERRIDE".
7087 (class symbol_needs_eval_context): Likewise.
7088 * dwarf2read.c (mock_mapped_index::symbol_name_count)
7089 (mock_mapped_index::symbol_name_at): Use "override". Remove
7090 "virtual".
7091 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
7092 "override".
7093 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
7094 * aarch64-tdep.c (instruction_reader::read): Use "override".
7095 (instruction_reader_test::read): Likewise.
7096 * arm-tdep.c (instruction_reader::read): Use "override".
7097 (instruction_reader_thumb::read): Likewise.
7098
7099 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
7100
7101 PR remote/9665
7102 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
7103 instead of remote_send.
7104 (remote_send): Remove.
7105
7106 2018-04-26 Pedro Alves <palves@redhat.com>
7107
7108 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
7109 find_function_start_sal instead of find_pc_line.
7110
7111 2018-04-26 Pedro Alves <palves@redhat.com>
7112
7113 * breakpoint.c (set_breakpoint_location_function): Handle
7114 mst_data_gnu_ifunc.
7115 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
7116 * elfread.c (elf_symtab_read): Give data symbols with
7117 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
7118 (elf_rel_plt_read): Update comment.
7119 * linespec.c (convert_linespec_to_sals): Handle
7120 mst_data_gnu_ifunc.
7121 (minsym_found): Handle mst_data_gnu_ifunc.
7122 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
7123 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
7124 * parse.c (find_minsym_type_and_address): Handle
7125 mst_data_gnu_ifunc.
7126 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
7127 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
7128 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
7129 comment.
7130 <mst_data_gnu_ifunc>: New enumerator.
7131
7132 2018-04-26 Pedro Alves <palves@redhat.com>
7133
7134 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
7135 (lookup_minimal_symbol_by_pc_section): ... this. Replace
7136 'want_trampoline' parameter by a lookup_msym_prefer parameter.
7137 Handle it.
7138 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
7139 (lookup_minimal_symbol_by_pc): Adjust.
7140 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
7141 (lookup_solib_trampoline_symbol_by_pc): Adjust.
7142 * minsyms.h (lookup_msym_prefer): New enum.
7143 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7144 parameter by a lookup_msym_prefer parameter.
7145
7146 2018-04-26 Pedro Alves <palves@redhat.com>
7147
7148 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
7149 ends in "@plt" instead of looking at the symbol's section.
7150
7151 2018-04-26 Pedro Alves <palves@redhat.com>
7152
7153 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
7154 all references.
7155 (find_pc_partial_function_gnu_ifunc): Rename to ...
7156 (find_pc_partial_function): ... this, and remove references to
7157 'is_gnu_ifunc_p'.
7158 (find_pc_partial_function): Delete old implementation.
7159 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
7160
7161 2018-04-26 Pedro Alves <palves@redhat.com>
7162
7163 * linespec.c (struct bound_minimal_symbol_search_key): New.
7164 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
7165 skip first line if we found a GNU ifunc minimal symbol by name.
7166 (compare_msymbols): Change parameters to work with a destructured
7167 lhs minsym.
7168 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
7169 functions.
7170
7171 2018-04-26 Pedro Alves <palves@redhat.com>
7172
7173 * breakpoint.c (set_breakpoint_location_function): Don't resolve
7174 ifunc targets here. Instead, if we have an ifunc minsym, use its
7175 address/name.
7176 (add_location_to_breakpoint): Store the minsym and the objfile in
7177 the breakpoint location.
7178 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
7179 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
7180 Record the minsym in the sal.
7181 * symtab.h (symtab_and_line) <msymbol>: New field.
7182
7183 2018-04-26 Pedro Alves <palves@redhat.com>
7184
7185 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
7186 unless we actually resolved the ifunc.
7187
7188 2018-04-26 Pedro Alves <palves@redhat.com>
7189
7190 * c-exp.y (variable production): Prefer ifunc minsyms over
7191 regular function symbols.
7192 * symtab.c (find_gnu_ifunc): New function.
7193 * minsyms.h (lookup_msym_prefer): New enum.
7194 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7195 parameter by a lookup_msym_prefer parameter.
7196 * symtab.h (find_gnu_ifunc): New declaration.
7197
7198 2018-04-26 Pedro Alves <palves@redhat.com>
7199
7200 * blockframe.c (find_gnu_ifunc_target_type): New function.
7201 (find_function_type): New.
7202 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
7203 return a value with a memory address.
7204 (eval_call): For calls to GNU ifunc functions, try to find the
7205 type of the target function from the type that the resolver
7206 returns.
7207 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
7208 symbols.
7209 * infcall.c (find_function_return_type): Delete.
7210 (find_function_addr): Add 'function_type' parameter. For calls to
7211 GNU ifunc functions, try to find the type of the target function
7212 from the type that the resolver returns, and return it via
7213 FUNCTION_TYPE.
7214 (call_function_by_hand_dummy): Adjust to use the function type
7215 returned by find_function_addr.
7216 (find_function_addr): Add 'function_type' parameter and move
7217 description here.
7218 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
7219 declarations.
7220
7221 2018-04-26 Pedro Alves <palves@redhat.com>
7222
7223 * c-exp.y (variable production): Skip finding an alias for ifunc
7224 symbols.
7225
7226 2018-04-26 Pedro Alves <palves@redhat.com>
7227
7228 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
7229
7230 2018-04-25 Pedro Alves <palves@redhat.com>
7231
7232 * infcmd.c (kill_command): Print the pid as string, not the whole
7233 thread's ptid. Add comment. s/has been killed/killed/ in output
7234 message.
7235 * remote.c (remote_detach_1): Print the pid as string, not the
7236 whole thread's ptid.
7237
7238 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7239 Sergio Durigan Junior <sergiodj@redhat.com>
7240 Pedro Alves <palves@redhat.com>
7241
7242 * infcmd.c (kill_command): Print message when inferior has
7243 been killed.
7244 * inferior.c (print_inferior_events): Remove 'static'. Set as
7245 '1'.
7246 (add_inferior): Improve message printed when
7247 'print_inferior_events' is on.
7248 (exit_inferior): Remove message printed when
7249 'print_inferior_events' is on.
7250 (detach_inferior): Improve message printed when
7251 'print_inferior_events' is on.
7252 (initialize_inferiors): Use 'add_inferior_silent' to set
7253 'current_inferior_'.
7254 * inferior.h (print_inferior_events): Declare here as
7255 'extern'.
7256 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
7257 '[Detaching...]' messages when 'print_inferior_events' is on.
7258 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
7259 as prefix/suffix for messages. Remove periods. Fix erroneous
7260 'Detaching after fork from child...', replace it by '... from
7261 parent...'.
7262 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
7263 prefix/suffix when printing 'Detaching...' messages. Print
7264 them when 'print_inferior_events' is on.
7265 * remote.c (remote_detach_1): Print message when detaching
7266 from inferior and '!is_fork_parent'.
7267
7268 2018-04-24 Tom Tromey <tom@tromey.com>
7269
7270 * cli-out.h: Reindent.
7271
7272 2018-04-24 Tom Tromey <tom@tromey.com>
7273
7274 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
7275 (cli_ui_out::do_field_string): Use fputs_filtered.
7276 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
7277
7278 2018-04-23 Tom Tromey <tom@tromey.com>
7279
7280 * guile/scm-frame.c (gdbscm_frame_read_var): Use
7281 gdb::unique_xmalloc_ptr.
7282
7283 2018-04-23 Tom Tromey <tom@tromey.com>
7284
7285 * configure: Rebuild.
7286
7287 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
7288
7289 PR gdb/23095
7290 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
7291 prepare_for_testing. Set normal_bp to r_debug_state if target
7292 is bsd.
7293
7294 2018-04-21 Pedro Alves <palves@redhat.com>
7295 Rajendra SY <rajendra.sy@gmail.com>
7296
7297 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
7298 * remote.c (extended_remote_attach): In all-stop mode, mark the
7299 thread as executing.
7300
7301 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7302
7303 * thread.c (thread_apply_all_command): Fix comment.
7304 (thread_command): Fix comment.
7305
7306 2018-04-10 Alan Hayward <alan.hayward@arm.com>
7307
7308 * common/tdesc.h (tdesc_create_feature): Remove xml filename
7309 parameter.
7310 * features/aarch64-core.c (create_feature_aarch64_core):
7311 Regenerate.
7312 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
7313 Likewise.
7314 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
7315 Likewise.
7316 * features/i386/32bit-avx512.c
7317 (create_feature_i386_32bit_avx512): Likewise.
7318 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
7319 Likewise.
7320 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
7321 Likewise.
7322 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
7323 Likewise.
7324 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
7325 Likewise.
7326 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
7327 Likewise.
7328 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
7329 Likewise.
7330 * features/i386/64bit-avx512.c
7331 (create_feature_i386_64bit_avx512): Likewise.
7332 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
7333 Likewise.
7334 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
7335 Likewise.
7336 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
7337 Likewise.
7338 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
7339 Likewise.
7340 * features/i386/64bit-segments.c
7341 (create_feature_i386_64bit_segments): Likewise.
7342 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
7343 Likewise.
7344 * features/i386/x32-core.c
7345 (create_feature_i386_x32_core): Likewise.
7346 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
7347 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
7348 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
7349 * target-descriptions.c: In generated code, don't pass xml
7350 filename.
7351
7352 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7353
7354 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
7355 (print_xml_feature::visit_post): Likewise.
7356 (print_xml_feature::visit): Likewise.
7357 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
7358 (print_xml_feature): Add new class.
7359 * regformats/regdat.sh: Null xmltarget on feature targets.
7360 * target-descriptions.c (struct target_desc): Add xmltarget.
7361 (maintenance_check_tdesc_xml_convert): Add unittest function.
7362 (tdesc_get_features_xml): Add function to get xml.
7363 (maintenance_check_xml_descriptions): Test xml generation.
7364 * xml-tdesc.c (string_read_description_xml): Add function.
7365 * xml-tdesc.h (string_read_description_xml): Add declaration.
7366
7367 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7368
7369 * features/Makefile: Add feature marker to targets with new style
7370 target descriptions.
7371 * regformats/aarch64.dat: Regenerate.
7372 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
7373 * regformats/i386/amd64-avx-linux.dat: Likewise.
7374 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
7375 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
7376 * regformats/i386/amd64-linux.dat: Likewise.
7377 * regformats/i386/amd64-mpx-linux.dat: Likewise.
7378 * regformats/i386/amd64.dat: Likewise.
7379 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
7380 * regformats/i386/i386-avx-linux.dat: Likewise.
7381 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
7382 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
7383 * regformats/i386/i386-linux.dat: Likewise.
7384 * regformats/i386/i386-mmx-linux.dat: Likewise.
7385 * regformats/i386/i386-mpx-linux.dat: Likewise.
7386 * regformats/i386/i386.dat: Likewise.
7387 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
7388 * regformats/i386/x32-avx-linux.dat: Likewise.
7389 * regformats/i386/x32-linux.dat: Likewise.
7390 * regformats/tic6x-c62x-linux.dat: Likewise.
7391 * regformats/tic6x-c64x-linux.dat: Likewise.
7392 * regformats/tic6x-c64xp-linux.dat: Likewise.
7393 * regformats/regdat.sh: Parse feature marker.
7394
7395 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7396
7397 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
7398 (tdesc_osabi_name): Likewise.
7399 * target-descriptions.c (tdesc_architecture_name): Add new
7400 function.
7401 (tdesc_osabi_name): Likewise.
7402
7403 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7404
7405 * common/tdesc.c (tdesc_predefined_type): Move to here.
7406 (tdesc_named_type): Likewise.
7407 (tdesc_create_vector): Likewise.
7408 (tdesc_create_struct): Likewise.
7409 (tdesc_set_struct_size): Likewise.
7410 (tdesc_create_union): Likewise.
7411 (tdesc_create_flags): Likewise.
7412 (tdesc_create_enum): Likewise.
7413 (tdesc_add_field): Likewise.
7414 (tdesc_add_typed_bitfield): Likewise.
7415 (tdesc_add_bitfield): Likewise.
7416 (tdesc_add_flag): Likewise.
7417 (tdesc_add_enum_value): Likewise.
7418 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
7419 (struct tdesc_type_vector): Likewise.
7420 (struct tdesc_type_field): Likewise.
7421 (struct tdesc_type_with_fields): Likewise.
7422 (tdesc_create_enum): Add declaration.
7423 (tdesc_add_typed_bitfield): Likewise.
7424 (tdesc_add_enum_value): Likewise.
7425 * target-descriptions.c (tdesc_type_field): Move from here.
7426 (tdesc_type_builtin): Likewise.
7427 (tdesc_type_vector): Likewise.
7428 (tdesc_type_with_fields): Likewise.
7429 (tdesc_predefined_types): Likewise.
7430 (tdesc_named_type): Likewise.
7431 (tdesc_create_vector): Likewise.
7432 (tdesc_create_struct): Likewise.
7433 (tdesc_set_struct_size): Likewise.
7434 (tdesc_create_union): Likewise.
7435 (tdesc_create_flags): Likewise.
7436 (tdesc_create_enum): Likewise.
7437 (tdesc_add_field): Likewise.
7438 (tdesc_add_typed_bitfield): Likewise.
7439 (tdesc_add_bitfield): Likewise.
7440 (tdesc_add_flag): Likewise.
7441 (tdesc_add_enum_value): Likewise.
7442 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
7443 (tdesc_add_typed_bitfield): Likewise.
7444 (tdesc_add_enum_value): Likewise.
7445
7446 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7447
7448 * common/tdesc.c (tdesc_feature::accept): Move to here.
7449 (tdesc_feature::operator==): Likewise.
7450 (tdesc_create_reg): Likewise.
7451 * common/tdesc.h (tdesc_type_kind): Likewise.
7452 (struct tdesc_type): Likewise.
7453 (struct tdesc_feature): Likewise.
7454 * regformats/regdat.sh: Create a feature.
7455 * target-descriptions.c (tdesc_type_kind): Move from here.
7456 (tdesc_type): Likewise.
7457 (tdesc_type_up): Likewise.
7458 (tdesc_feature): Likewise.
7459 (tdesc_create_reg): Likewise.
7460
7461 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7462
7463 * Makefile.in: Add arch/tdesc.c
7464 * common/tdesc.c: New file.
7465 * common/tdesc.h (tdesc_element_visitor): Move to here.
7466 (tdesc_element): Likewise.
7467 (tdesc_reg): Likewise.
7468 (tdesc_reg_up): Likewise.
7469 * regformats/regdef.h (reg): Add offset to constructors.
7470 * target-descriptions.c (tdesc_element_visitor): Move from here.
7471 (tdesc_element): Likewise.
7472 (tdesc_reg): Likewise.
7473 (tdesc_reg_up): Likewise.
7474
7475 2018-04-17 Tom Tromey <tom@tromey.com>
7476
7477 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
7478 discriminant field.
7479
7480 2018-04-17 Tom Tromey <tom@tromey.com>
7481
7482 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
7483
7484 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
7485
7486 * symtab.c (print_symbol_info): Skip printing filename and line
7487 number when `last' is NULL.
7488 (symtab_symbol_info): Use empty string instead of NULL for first
7489 invocation of print_symbol_info.
7490 (rbreak_command): Pass NULL to `last' parameter of
7491 print_symbol_info.
7492
7493 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
7494
7495 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
7496 instead of nullptr.
7497
7498 2018-04-16 Pedro Alves <palves@redhat.com>
7499
7500 * MAINTAINERS (sh): Remove.
7501 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
7502 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
7503 (ALLDEPFILES): Remove sh64-tdep.c.
7504 * NEWS: Mentions that support for SH-5/SH64 is removed.
7505 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
7506 (sh*-*-openbsd*): Ditto.
7507 (sh64-*-elf*): Remove.
7508 (sh*): Remove.
7509 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
7510 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
7511 * sh-tdep.c: No longer include "sh64-tdep.h".
7512 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
7513 * sh64-tdep.c, sh64-tdep.h: Remove files.
7514
7515 2018-04-16 Pedro Alves <palves@redhat.com>
7516
7517 * MAINTAINERS: Remove m88k.
7518 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
7519 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
7520 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
7521 * NEWS: Mention that support for m88k was removed.
7522 * configure.host (m88*-*-*): Remove support.
7523 * configure.nat (m88k-*-*): Remove support.
7524 * configure.tgt (m88*-*-openbsd*): Remove.
7525 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
7526
7527 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
7528
7529 * configure.tgt (x86_tobjs): New variable.
7530 (amd64_tobjs, i386_tobjs): Use it.
7531
7532 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7533
7534 * symtab.c (print_symbol_info): Precede the symbol definition by
7535 the line number when available.
7536 * NEWS: Advertise this enhancement.
7537
7538 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7539
7540 * NEWS (New options): announce set/show record btrace cpu.
7541 * btrace.c: Include record-btrace.h.
7542 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
7543 the vendor is unknown.
7544 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
7545 Maybe overwrite the btrace configuration's cpu.
7546 (btrace_compute_ftrace): Add cpu parameter. Update callers.
7547 (btrace_fetch): Add cpu parameter. Update callers.
7548 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
7549 Maybe overwrite the btrace configuration's cpu. Skip enabling
7550 errata workarounds if the vendor is unknown.
7551 * python/py-record-btrace.c: Include record-btrace.h.
7552 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
7553 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
7554 * record-btrace.c (record_btrace_cpu_state_kind): New.
7555 (record_btrace_cpu): New.
7556 (set_record_btrace_cpu_cmdlist): New.
7557 (record_btrace_get_cpu): New.
7558 (require_btrace_thread, record_btrace_info)
7559 (record_btrace_resume_thread): Call record_btrace_get_cpu.
7560 (cmd_set_record_btrace_cpu_none): New.
7561 (cmd_set_record_btrace_cpu_auto): New.
7562 (cmd_set_record_btrace_cpu): New.
7563 (cmd_show_record_btrace_cpu): New.
7564 (_initialize_record_btrace): Initialize set/show record btrace cpu
7565 commands.
7566 * record-btrace.h (record_btrace_get_cpu): New.
7567
7568 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7569
7570 * record.c (set_record_command): Fix typo in message.
7571
7572 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7573
7574 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
7575
7576 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7577
7578 * infrun.c (process_event_stop_test): Call
7579 gdbarch_in_indirect_branch_thunk.
7580 * gdbarch.sh (in_indirect_branch_thunk): New.
7581 * gdbarch.c: Regenerated.
7582 * gdbarch.h: Regenerated.
7583 * x86-tdep.h: New.
7584 * x86-tdep.c: New.
7585 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
7586 (HFILES_NO_SRCDIR): Add x86-tdep.h.
7587 (ALLDEPFILES): Add x86-tdep.c.
7588 * arch-utils.h (default_in_indirect_branch_thunk): New.
7589 * arch-utils.c (default_in_indirect_branch_thunk): New.
7590 * i386-tdep: Include x86-tdep.h.
7591 (i386_in_indirect_branch_thunk): New.
7592 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
7593 function.
7594 * amd64-tdep: Include x86-tdep.h.
7595 (amd64_in_indirect_branch_thunk): New.
7596 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
7597
7598 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
7599
7600 PR gdb/23053
7601 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
7602 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
7603 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
7604 regression.
7605
7606 2018-04-12 Tom Tromey <tom@tromey.com>
7607
7608 * rust-lang.c (rust_print_struct_def): Remove univariant code.
7609 (rust_evaluate_subexp): Likewise.
7610
7611 2018-04-12 Pedro Alves <palves@redhat.com>
7612
7613 * procfs.c (procfs_detach): Make forward declaration's prototype
7614 match definition's protototype.
7615 (proc_get_LDT_entry): Remove stale do_cleanups call.
7616
7617 2018-04-12 Pedro Alves <palves@redhat.com>
7618
7619 * target.h (target_ops::to_has_exited): Delete.
7620 (target_has_exited): Delete.
7621 * target-delegates.c: Regenerate.
7622
7623 2018-04-11 Pedro Alves <palves@redhat.com>
7624
7625 * target.c (fileio_fh_t::t): Add comment.
7626 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7627 (target_fileio_close): Handle a NULL target.
7628 (invalidate_fileio_fh): New.
7629 (target_close): Call it.
7630 * remote.c (remote_hostio_send_command): No longer check whether
7631 remote_desc is open.
7632
7633 2018-04-11 Pedro Alves <palves@redhat.com>
7634
7635 * target.c (fileio_fh_t): Make it a named struct instead of a
7636 typedef.
7637 (fileio_fh_t::is_closed): New method.
7638 (DEF_VEC_O (fileio_fh_t)): Remove.
7639 (fileio_fhandles): Now a std::vector.
7640 (is_closed_fileio_fh): Delete.
7641 (acquire_fileio_fd): Adjust. Rename parameters.
7642 (release_fileio_fd): Adjust.
7643 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
7644 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7645 (target_fileio_close): Adjust.
7646
7647 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
7648
7649 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
7650 index.
7651
7652 2018-04-10 Pedro Alves <palves@redhat.com>
7653
7654 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
7655 (scoped_finish_thread_state): New class.
7656 * infcmd.c (run_command_1): Use it instead of finish_thread_state
7657 cleanup.
7658 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
7659 (fetch_inferior_event, normal_stop): Likewise.
7660 * thread.c (finish_thread_state_cleanup): Delete.
7661
7662 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7663 Pedro Alves <palves@redhat.com>
7664
7665 * value.c: Include "selftest.h" and "common/array-view.h".
7666 (struct range) <operator ==>: New.
7667 (test_ranges_contain): New.
7668 (check_ranges_vector): New.
7669 (test_insert_into_bit_range_vector): New.
7670 (_initialize_values): Register selftests.
7671 * common/array-view.h (operator==, operator!=): New.
7672
7673 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7674
7675 * common/gdb_vecs.h (unordered_remove): Add overload that takes
7676 an iterator.
7677 * inline-frame.c: Include <algorithm>.
7678 (struct inline_state): Add constructor.
7679 (inline_state_s): Remove.
7680 (DEF_VEC_O(inline_state_s)): Remove.
7681 (inline_states): Change type to std::vector.
7682 (find_inline_frame_state): Adjust to std::vector.
7683 (allocate_inline_frame_state): Remove.
7684 (clear_inline_frame_state): Adjust to std::vector.
7685 (skip_inline_frames): Adjust to std::vector.
7686
7687 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7688
7689 * tracepoint.h (struct trace_state_variable): Add constructor.
7690 <name>: Change type to std::string.
7691 * tracepoint.c (tsv_s): Remove.
7692 (DEF_VEC_O(tsv_s)): Remove.
7693 (tvariables): Change to std::vector.
7694 (create_trace_state_variable): Adjust to std::vector.
7695 (find_trace_state_variable): Likewise.
7696 (find_trace_state_variable_by_number): Likewise.
7697 (delete_trace_state_variable): Likewise.
7698 (trace_variable_command): Adjust to std::string.
7699 (delete_trace_variable_command): Likewise.
7700 (tvariables_info_1): Adjust to std::vector.
7701 (save_trace_state_variables): Likewise.
7702 (start_tracing): Likewise.
7703 (merge_uploaded_trace_state_variables): Adjust to std::vector
7704 and std::string.
7705 * target.h (struct target_ops)
7706 <to_download_trace_state_variable>: Pass reference to
7707 trace_state_variable.
7708 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
7709 * target-delegates.c: Re-generate.
7710 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
7711 (mi_tsv_deleted): Likewise.
7712 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
7713 * remote.c (remote_download_trace_state_variable): Change
7714 pointer to reference and adjust.
7715 * make-target-delegates (parse_argtypes): Handle references.
7716 (write_function_header): Likewise.
7717 (munge_type): Likewise.
7718
7719 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7720
7721 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7722 string_view-selftests.c.
7723 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
7724 testsuite.
7725 * unittests/basic_string_view/cons/char/1.cc: Likewise.
7726 * unittests/basic_string_view/cons/char/2.cc: Likewise.
7727 * unittests/basic_string_view/cons/char/3.cc: Likewise.
7728 * unittests/basic_string_view/element_access/char/1.cc:
7729 Likewise.
7730 * unittests/basic_string_view/element_access/char/empty.cc:
7731 Likewise.
7732 * unittests/basic_string_view/element_access/char/front_back.cc:
7733 Likewise.
7734 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
7735 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
7736 Likewise.
7737 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
7738 Likewise.
7739 * unittests/basic_string_view/modifiers/swap/char/1.cc:
7740 Likewise.
7741 * unittests/basic_string_view/operations/compare/char/1.cc:
7742 Likewise.
7743 * unittests/basic_string_view/operations/compare/char/13650.cc:
7744 Likewise.
7745 * unittests/basic_string_view/operations/copy/char/1.cc:
7746 Likewise.
7747 * unittests/basic_string_view/operations/data/char/1.cc:
7748 Likewise.
7749 * unittests/basic_string_view/operations/find/char/1.cc:
7750 Likewise.
7751 * unittests/basic_string_view/operations/find/char/2.cc:
7752 Likewise.
7753 * unittests/basic_string_view/operations/find/char/3.cc:
7754 Likewise.
7755 * unittests/basic_string_view/operations/find/char/4.cc:
7756 Likewise.
7757 * unittests/basic_string_view/operations/rfind/char/1.cc:
7758 Likewise.
7759 * unittests/basic_string_view/operations/rfind/char/2.cc:
7760 Likewise.
7761 * unittests/basic_string_view/operations/rfind/char/3.cc:
7762 Likewise.
7763 * unittests/basic_string_view/operations/substr/char/1.cc:
7764 Likewise.
7765 * unittests/basic_string_view/operators/char/2.cc: Likewise.
7766 * unittests/string_view-selftests.c: New file.
7767
7768 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7769
7770 * unittests/basic_string_view/capacity/1.cc: New file.
7771 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
7772 * unittests/basic_string_view/cons/char/1.cc: New file.
7773 * unittests/basic_string_view/cons/char/2.cc: New file.
7774 * unittests/basic_string_view/cons/char/3.cc: New file.
7775 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
7776 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
7777 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
7778 * unittests/basic_string_view/element_access/char/1.cc: New file.
7779 * unittests/basic_string_view/element_access/char/2.cc: New file.
7780 * unittests/basic_string_view/element_access/char/empty.cc: New file.
7781 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
7782 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
7783 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
7784 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
7785 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
7786 * unittests/basic_string_view/include.cc: New file.
7787 * unittests/basic_string_view/inserters/char/1.cc: New file.
7788 * unittests/basic_string_view/inserters/char/2.cc: New file.
7789 * unittests/basic_string_view/inserters/char/3.cc: New file.
7790 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
7791 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
7792 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
7793 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
7794 * unittests/basic_string_view/literals/types.cc: New file.
7795 * unittests/basic_string_view/literals/values.cc: New file.
7796 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
7797 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
7798 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
7799 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
7800 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
7801 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
7802 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
7803 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
7804 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
7805 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
7806 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
7807 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
7808 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
7809 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
7810 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
7811 * unittests/basic_string_view/operations/data/char/1.cc: New file.
7812 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
7813 * unittests/basic_string_view/operations/find/char/1.cc: New file.
7814 * unittests/basic_string_view/operations/find/char/2.cc: New file.
7815 * unittests/basic_string_view/operations/find/char/3.cc: New file.
7816 * unittests/basic_string_view/operations/find/char/4.cc: New file.
7817 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
7818 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
7819 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
7820 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
7821 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
7822 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
7823 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
7824 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
7825 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
7826 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
7827 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
7828 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
7829 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
7830 * unittests/basic_string_view/operators/char/2.cc: New file.
7831 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
7832 * unittests/basic_string_view/range_access/char/1.cc: New file.
7833 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
7834 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
7835 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
7836 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
7837 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
7838 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
7839 * unittests/basic_string_view/requirements/typedefs.cc: New file.
7840 * unittests/basic_string_view/typedefs.cc: New file.
7841 * unittests/basic_string_view/types/1.cc: New file.
7842
7843 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7844
7845 * common/gdb_string_view.h: Remove libstdc++ implementation
7846 details, adjust to gdb reality.
7847 * common/gdb_string_view.tcc: Likewise.
7848 * cli/cli-script.c (struct string_view): Remove.
7849 (user_args) <m_args>: Change element type to gdb::string_view.
7850 (user_args::insert_args): Adjust.
7851
7852 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7853
7854 * common/gdb_string_view.h: New file.
7855 * common/gdb_string_view.tcc: New file.
7856
7857 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7858
7859 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
7860 * configure: Re-generate.
7861
7862 2018-04-09 Pedro Alves <palves@redhat.com>
7863
7864 * gdbarch.sh: Include "observable.h" instead of "observer.h".
7865 (set_target_gdbarch): Call
7866 gdb::observers::architecture_changed.notify instead of
7867 observer_notify_architecture_changed.
7868
7869 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7870
7871 * tracepoint.c (struct current_traceframe_cleanup): Remove.
7872 (do_restore_current_traceframe_cleanup): Remove.
7873 (restore_current_traceframe_cleanup_dtor): Remove.
7874 (make_cleanup_restore_current_traceframe): Remove.
7875 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
7876 New.
7877 * tracepoint.h (struct scoped_restore_current_traceframe): New.
7878 * infrun.c (fetch_inferior_event): Use
7879 scoped_restore_current_traceframe.
7880
7881 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7882
7883 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
7884 Remove.
7885 <n_allocated_type_units>: Remove.
7886 <all_type_units>: Change to std::vector.
7887 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7888 to std::vector change.
7889 (dwarf2_per_objfile::get_cutu): Likewise.
7890 (dwarf2_per_objfile::get_tu): Likewise.
7891 (create_signatured_type_table_from_index): Likewise.
7892 (create_signatured_type_table_from_debug_names): Likewise.
7893 (dw2_symtab_iter_next): Likewise.
7894 (dw2_print_stats): Likewise.
7895 (dw2_expand_all_symtabs): Likewise.
7896 (dw2_expand_marked_cus): Likewise.
7897 (dw2_debug_names_iterator::next): Likewise.
7898 (dwarf2_initialize_objfile): Likewise.
7899 (add_signatured_type_cu_to_table): Likewise.
7900 (create_all_type_units): Likewise.
7901 (add_type_unit): Likewise.
7902 (struct tu_abbrev_offset): Add constructor.
7903 (build_type_psymtabs_1): Adjust to std::vector change.
7904 (print_tu_stats): Likewise.
7905 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7906 (write_debug_names): Likewise.
7907
7908 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7909
7910 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
7911 Make an std::vector.
7912 <n_comp_units>: Remove.
7913 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7914 to std::vector change.
7915 (dwarf2_per_objfile::get_cutu): Likewise.
7916 (dwarf2_per_objfile::get_cu): Likewise.
7917 (create_cus_from_index): Likewise.
7918 (create_addrmap_from_index): Likewise.
7919 (create_addrmap_from_aranges): Likewise.
7920 (dwarf2_read_index): Likewise.
7921 (dw2_find_last_source_symtab): Likewise.
7922 (dw2_map_symtabs_matching_filename): Likewise.
7923 (dw2_symtab_iter_next): Likewise.
7924 (dw2_print_stats): Likewise.
7925 (dw2_expand_all_symtabs): Likewise.
7926 (dw2_expand_symtabs_with_fullname): Likewise.
7927 (dw2_expand_marked_cus): Likewise.
7928 (dw2_map_symbol_filenames): Likewise.
7929 (create_cus_from_debug_names): Likewise.
7930 (dwarf2_read_debug_names): Likewise.
7931 (dw2_debug_names_iterator::next): Likewise.
7932 (dwarf2_initialize_objfile): Likewise.
7933 (set_partial_user): Likewise.
7934 (dwarf2_build_psymtabs_hard): Likewise.
7935 (read_comp_units_from_section): Remove arguments, adjust to
7936 std::vector change.
7937 (create_all_comp_units): Adjust to std::vector and
7938 read_comp_units_from_section changes.
7939 (dwarf2_find_containing_comp_unit): Adjust to std::vector
7940 change.
7941 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7942 (psyms_seen_size): Likewise.
7943 (write_gdbindex): Likewise.
7944 (write_debug_names): Likewise.
7945
7946 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7947
7948 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
7949 with dwarf2_per_objfile.
7950 (create_cus_from_index): Likewise.
7951 (create_signatured_type_table_from_index): Likewise.
7952 (dwarf2_read_index): Likewise.
7953 (dwarf2_initialize_objfile): Likewise.
7954 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
7955 per_cu rather than get_dwarf2_per_objfile.
7956
7957 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7958
7959 * dwarf2read.h (struct signatured_type): Forward declare.
7960 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
7961 New methods.
7962 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
7963 (dw2_get_cutu): ...this.
7964 (dwarf2_per_objfile::get_cu): Rename from...
7965 (dw2_get_cu): ...this.
7966 (dwarf2_per_objfile::get_tu): New.
7967 (create_addrmap_from_index): Adjust.
7968 (create_addrmap_from_aranges): Adjust.
7969 (dw2_find_last_source_symtab): Adjust.
7970 (dw2_map_symtabs_matching_filename): Adjust.
7971 (dw2_symtab_iter_next): Adjust.
7972 (dw2_print_stats): Adjust.
7973 (dw2_expand_all_symtabs): Adjust.
7974 (dw2_expand_symtabs_with_fullname): Adjust.
7975 (dw2_expand_marked_cus): Adjust.
7976 (dw_expand_symtabs_matching_file_matcher): Adjust.
7977 (dw2_map_symbol_filenames): Adjust.
7978 (dw2_debug_names_iterator::next): Adjust.
7979 (dwarf2_initialize_objfile): Adjust.
7980 (set_partial_user): Adjust.
7981 (dwarf2_build_psymtabs_hard): Adjust.
7982
7983 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7984
7985 * dwarf2read.c (create_signatured_type_table_from_debug_names):
7986 Remove unused variables.
7987 (dw2_map_symtabs_matching_filename): Likewise.
7988 (dwarf2_record_block_ranges): Likewise.
7989 (dwarf2_read_addr_index): Likewise.
7990 (follow_die_offset): Likewise.
7991
7992 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7993
7994 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
7995 to symbol_file_add_main.
7996
7997 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7998
7999 PR mi/22299
8000 * mi/mi-console.c (do_fputc_async_safe): New.
8001 (mi_console_file::write_async_safe): New.
8002 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
8003 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
8004 New.
8005 * ui-file.c (ui_file::putstrn): Adjust call to
8006 fputstrn_unfiltered.
8007 * utils.c (printchar): Replace do_fputs and do_fprintf
8008 parameters by do_fputc.
8009 (fputstr_filtered): Adjust call to printchar.
8010 (fputstr_unfiltered): Likewise.
8011 (fputstrn_filtered): Likewise.
8012 (fputstrn_unfiltered): Add do_fputc parameter, pass to
8013 printchar.
8014 * utils.h (do_fputc_ftype): New typedef.
8015 (fputstrn_unfiltered): Add do_fputc parameter.
8016
8017 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8018
8019 * regformats/i386/i386-avx.dat: Remove.
8020
8021 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8022
8023 PR gdb/22979
8024 * amd64-tdep.c (amd64_none_init_abi): New function.
8025 (amd64_x32_none_init_abi): New function.
8026 (_initialize_amd64_tdep): Register handlers for x86-64 and
8027 x64_32 with GDB_OSABI_NONE.
8028 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
8029 GDB_OSABI_NONE osabi.
8030
8031 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8032
8033 PR gdb/22980
8034 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
8035 GDB_OSABI_NONE.
8036 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
8037 * osabi.c (gdb_osabi_names): Add "unknown" entry.
8038
8039 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8040
8041 * common/byte-vector.h (char_vector): New type.
8042 * target.h (target_read_alloc): Return
8043 gdb::optional<byte_vector>.
8044 (target_read_stralloc): Return gdb::optional<char_vector>.
8045 (target_get_osdata): Return gdb::optional<char_vector>.
8046 * target.c (target_read_alloc_1): Templatize. Replacement
8047 manual memory management with vector.
8048 (target_read_alloc): Change return type, adjust.
8049 (target_read_stralloc): Change return type, adjust.
8050 (target_get_osdata): Change return type, adjust.
8051 * auxv.c (struct auxv_info) <length>: Remove.
8052 <data>: Change type to gdb::optional<byte_vector>.
8053 (auxv_inferior_data_cleanup): Free auxv_info with delete.
8054 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
8055 (target_auxv_search): Adjust.
8056 (fprint_target_auxv): Adjust.
8057 * avr-tdep.c (avr_io_reg_read_command): Adjust.
8058 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
8059 (linux_make_corefile_notes): Adjust.
8060 * osdata.c (get_osdata): Adjust.
8061 * remote.c (remote_get_threads_with_qxfer): Adjust.
8062 (remote_memory_map): Adjust.
8063 (remote_traceframe_info): Adjust.
8064 (btrace_read_config): Adjust.
8065 (remote_read_btrace): Adjust.
8066 (remote_pid_to_exec_file): Adjust.
8067 * solib-aix.c (solib_aix_get_library_list): Adjust.
8068 * solib-dsbt.c (decode_loadmap): Don't free buf.
8069 (dsbt_get_initial_loadmaps): Adjust.
8070 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
8071 * solib-target.c (solib_target_current_sos): Adjust.
8072 * tracepoint.c (sdata_make_value): Adjust.
8073 * xml-support.c (xinclude_start_include): Adjust.
8074 (xml_fetch_content_from_file): Adjust.
8075 * xml-support.h (xml_fetch_another): Change return type.
8076 (xml_fetch_content_from_file): Change return type.
8077 * xml-syscall.c (xml_init_syscalls_info): Adjust.
8078 * xml-tdesc.c (file_read_description_xml): Adjust.
8079 (fetch_available_features_from_target): Change return type.
8080 (target_fetch_description_xml): Adjust.
8081 (target_read_description_xml): Adjust.
8082
8083 2018-04-06 Tom Tromey <tom@tromey.com>
8084
8085 * value.c (~value): Update.
8086 (struct value) <contents>: Now unique_xmalloc_ptr.
8087 (value_contents_bits_eq, allocate_value_contents)
8088 (value_contents_raw, value_contents_all_raw)
8089 (value_contents_for_printing, value_contents_for_printing_const)
8090 (set_value_enclosing_type): Update.
8091
8092 2018-04-06 Tom Tromey <tom@tromey.com>
8093
8094 * value.c (range_s): Remove typedef, VEC.
8095 (struct range): Add operator<.
8096 (range_lessthan): Remove.
8097 (ranges_contain): Change type.
8098 (~value): Update.
8099 (struct value) <unavailable, optimized_out>: Now std::vector.
8100 (value_entirely_available)
8101 (value_entirely_covered_by_range_vector)
8102 (value_entirely_unavailable, value_entirely_optimized_out):
8103 Update.
8104 (insert_into_bit_range_vector): Change argument type.
8105 (find_first_range_overlap): Likewise.
8106 (struct ranges_and_idx, value_contents_bits_eq)
8107 (require_not_optimized_out, require_available): Update.
8108 (ranges_copy_adjusted): Change argument types.
8109 (value_optimized_out, value_copy, value_fetch_lazy): Update.
8110
8111 2018-04-06 Tom Tromey <tom@tromey.com>
8112
8113 * value.c (~value): Update.
8114 (struct value) <parent>: Now a value_ref_ptr.
8115 (value_parent, set_value_parent, value_address, value_copy):
8116 Update.
8117
8118 2018-04-06 Tom Tromey <tom@tromey.com>
8119
8120 * value.c (struct value): Add constructor, destructor, and member
8121 initializers.
8122 (allocate_value_lazy, value_decref): Update.
8123
8124 2018-04-06 Tom Tromey <tom@tromey.com>
8125
8126 * value.c (struct value) <released, next>: Remove.
8127 (all_values): Now a std::vector.
8128 (allocate_value_lazy): Update.
8129 (value_next): Remove.
8130 (value_mark, value_free_to_mark, release_value)
8131 (value_release_to_mark): Update.
8132
8133 2018-04-06 Tom Tromey <tom@tromey.com>
8134
8135 * value.h (fetch_subexp_value, value_release_to_mark): Update.
8136 (free_value_chain): Remove.
8137 * value.c (free_value_chain): Remove.
8138 (value_release_to_mark): Return a std::vector.
8139 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
8140 std::vector.
8141 (check_condition): Update.
8142 * eval.c (fetch_subexp_value): Change "val_chain" to a
8143 std::vector.
8144 * breakpoint.c (update_watchpoint): Update.
8145 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
8146
8147 2018-04-06 Tom Tromey <tom@tromey.com>
8148
8149 * value.h (free_all_values): Remove.
8150 * value.c (free_all_values): Remove.
8151
8152 2018-04-06 Tom Tromey <tom@tromey.com>
8153
8154 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
8155 (value_history_chain, value_history_count): Remove.
8156 (value_history): New global.
8157 (record_latest_value, access_value_history, show_values)
8158 (preserve_values): Update.
8159
8160 2018-04-06 Tom Tromey <tom@tromey.com>
8161
8162 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
8163 * varobj.c (varobj_set_display_format, varobj_set_value)
8164 (install_default_visualizer, construct_visualizer)
8165 (install_new_value, ~varobj, varobj_get_value_type)
8166 (my_value_of_variable, varobj_editable_p): Update.
8167 * c-varobj.c (c_describe_child, c_value_of_variable)
8168 (cplus_number_of_children, cplus_describe_child): Update.
8169 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
8170 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
8171 (ada_value_of_variable, ada_value_is_changeable_p): Update.
8172
8173 2018-04-06 Tom Tromey <tom@tromey.com>
8174
8175 * printcmd.c (last_examine_address): Change type to
8176 value_ref_ptr.
8177 (do_examine, x_command): Update.
8178
8179 2018-04-06 Tom Tromey <tom@tromey.com>
8180
8181 * value.c (release_value): Update.
8182 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
8183 (struct bpstats) <val>: Now a value_ref_ptr.
8184 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8185 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8186 (~watchpoint, print_it_watchpoint, watch_command_1)
8187 (invalidate_bp_value_on_memory_change): Update.
8188
8189 2018-04-06 Tom Tromey <tom@tromey.com>
8190
8191 * varobj.c (varobj_clear_saved_item)
8192 (update_dynamic_varobj_children, install_new_value, ~varobj):
8193 Update.
8194 * value.h (value_incref): Move declaration earlier.
8195 (value_decref): Rename from value_free.
8196 (struct value_ref_policy): New.
8197 (value_ref_ptr): New typedef.
8198 (struct value_deleter): Remove.
8199 (gdb_value_up): Remove typedef.
8200 (release_value): Change return type.
8201 (release_value_or_incref): Remove.
8202 * value.c (set_value_parent): Update.
8203 (value_incref): Change return type.
8204 (value_decref): Rename from value_free.
8205 (value_free_to_mark, free_all_values, free_value_chain): Update.
8206 (release_value): Return value_ref_ptr.
8207 (release_value_or_incref): Remove.
8208 (record_latest_value, set_internalvar, clear_internalvar):
8209 Update.
8210 * stack.c (info_frame_command): Don't call value_free.
8211 * python/py-value.c (valpy_dealloc, valpy_new)
8212 (value_to_value_object): Update.
8213 * printcmd.c (do_examine): Update.
8214 * opencl-lang.c (lval_func_free_closure): Update.
8215 * mi/mi-main.c (register_changed_p): Don't call value_free.
8216 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
8217 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
8218 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
8219 value_free.
8220 * guile/scm-value.c (vlscm_free_value_smob)
8221 (vlscm_scm_from_value): Update.
8222 * frame.c (frame_register_unwind, frame_unwind_register_signed)
8223 (frame_unwind_register_unsigned, get_frame_register_bytes)
8224 (put_frame_register_bytes): Don't call value_free.
8225 * findvar.c (address_from_register): Don't call value_free.
8226 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
8227 * dwarf2loc.c (entry_data_value_free_closure)
8228 (value_of_dwarf_reg_entry, free_pieced_value_closure)
8229 (dwarf2_evaluate_loc_desc_full): Update.
8230 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8231 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8232 (~watchpoint, watch_command_1)
8233 (invalidate_bp_value_on_memory_change): Update.
8234 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
8235
8236 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
8237
8238 PR gdb/23022
8239 * warning.m4: Add -Wno-error=deprecated-register.
8240 * configure: Re-generate.
8241
8242 2018-04-05 Tom Tromey <tom@tromey.com>
8243
8244 * linespec.h: Remove include of "vec.h".
8245
8246 2018-04-05 Tom Tromey <tom@tromey.com>
8247
8248 * linespec.c (typep): Remove typedef.
8249 (find_methods, find_superclass_methods): Take a std::vector.
8250 (find_method): Use std::vector.
8251
8252 2018-04-05 Tom Tromey <tom@tromey.com>
8253
8254 * utils.c (compare_strings): Remove.
8255 * utils.h (compare_strings): Remove.
8256 * objc-lang.h (find_imps): Update.
8257 * objc-lang.c (find_methods): Take a std::vector.
8258 (uniquify_strings, find_imps): Likewise.
8259 * linespec.c (find_methods): Take a std::vector.
8260 (decode_objc): Use std::vector.
8261 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
8262 a std::vector.
8263 (find_method, find_function_symbols): Use std::vector.
8264
8265 2018-04-05 Tom Tromey <tom@tromey.com>
8266
8267 * completer.c (completion_tracker::completion_tracker): Remove
8268 cast.
8269 (completion_tracker::discard_completions): Likewise.
8270 * breakpoint.c (ambiguous_names_p): Remove cast.
8271 * ada-lang.c (_initialize_ada_language): Remove cast.
8272 * utils.h (streq): Update.
8273 (streq_hash): Add new declaration.
8274 * utils.c (streq): Return bool.
8275 (streq_hash): New function.
8276
8277 2018-04-05 Tom Tromey <tom@tromey.com>
8278
8279 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
8280 Remove a string copy.
8281
8282 2018-04-05 Tom Tromey <tom@tromey.com>
8283
8284 * linespec.c (filter_results): Use std::vector.
8285 (decode_line_2, decode_line_full): Update.
8286
8287 2018-04-05 Tom Tromey <tom@tromey.com>
8288
8289 * linespec.c (canonical_to_fullform): Return std::string.
8290 (filter_results): Update.
8291 (struct decode_line_2_item): Add constructor.
8292 <fullform, displayform>: Now std::string.
8293 (decode_line_2_compare_items): Now a std::sort comparator.
8294 (decode_line_2): Update.
8295
8296 2018-04-05 Tom Tromey <tom@tromey.com>
8297
8298 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
8299 (unexpected_linespec_error): Update.
8300 (linespec_parse_basic, parse_linespec): Update.
8301
8302 2018-04-05 Tom Tromey <tom@tromey.com>
8303
8304 * linespec.c (linespec_parse_basic): Reindent.
8305
8306 2018-04-05 Tom Tromey <tom@tromey.com>
8307
8308 * minsyms.h (iterate_over_minimal_symbols): Update.
8309 * minsyms.c (iterate_over_minimal_symbols): Take a
8310 gdb::function_view.
8311 * linespec.c (struct collect_minsyms): Remove.
8312 (compare_msyms): Now a std::sort comparator.
8313 (add_minsym): Add parameters.
8314 (search_minsyms_for_name): Update. Use std::vector.
8315
8316 2018-04-03 Tom Tromey <tom@tromey.com>
8317
8318 * mipsread.c (read_alphacoff_dynamic_symtab): Use
8319 gdb::byte_vector.
8320
8321 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
8322
8323 * MAINTAINERS (Write After Approval): Add Weimin Pan.
8324
8325 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
8326
8327 PR gdb/16959
8328 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
8329 printing static type.
8330
8331 2018-04-01 Tom Tromey <tom@tromey.com>
8332
8333 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
8334 (rs6000_xfer_shared_libraries): Update.
8335
8336 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
8337
8338 * common/gdb_vecs.h (char_ptr): Remove.
8339 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
8340
8341 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
8342
8343 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
8344 with std::vector.
8345 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
8346
8347 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
8348
8349 * tracepoint.h (struct uploaded_tp): Initialize fields.
8350 <actions, step_actions, cmd_strings>: Change type to
8351 std::vector<char *>.
8352 * tracepoint.c (get_uploaded_tp): Allocate with new.
8353 (free_uploaded_tps): Free with delete.
8354 (parse_tracepoint_definition): Adjust to std::vector change.
8355 * breakpoint.c (read_uploaded_action): Likewise.
8356 (create_tracepoint_from_upload): Likewise.
8357 * ctf.c (ctf_write_uploaded_tp): Likewise.
8358 (SET_ARRAY_FIELD): Likewise.
8359 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
8360
8361 2018-03-30 Tom Tromey <tom@tromey.com>
8362
8363 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
8364 std::unique_ptr.
8365 (svr4_keep_data_in_core): Update.
8366 (svr4_read_so_list): Update.
8367
8368 2018-03-30 Tom Tromey <tom@tromey.com>
8369
8370 * windows-nat.c (handle_output_debug_string, handle_exception):
8371 Update.
8372 * target.h (target_read_string): Update.
8373 * target.c (target_read_string): Change "string" to
8374 unique_xmalloc_ptr.
8375 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
8376 Update.
8377 * solib-frv.c (frv_current_sos): Update.
8378 * solib-dsbt.c (dsbt_current_sos): Update.
8379 * solib-darwin.c (darwin_current_sos): Update.
8380 * linux-thread-db.c (inferior_has_bug): Update.
8381 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
8382 Update. Remove alloca.
8383 * ada-lang.c (ada_main_name): Update.
8384
8385 2018-03-30 Tom Tromey <tom@tromey.com>
8386
8387 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
8388 (struct dwo_file_deleter): New.
8389 (dwo_file_up): New typedef.
8390 (open_and_init_dwo_file): Use dwo_file_up.
8391 (free_dwo_file_cleanup): Remove.
8392
8393 2018-03-30 Tom Tromey <tom@tromey.com>
8394
8395 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
8396 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
8397
8398 2018-03-30 Tom Tromey <tom@tromey.com>
8399
8400 * dwarf2read.c (class free_cached_comp_units): New class.
8401 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
8402 (free_cached_comp_units): Remove function.
8403
8404 2018-03-30 Tom Tromey <tom@tromey.com>
8405
8406 * utils.h (make_cleanup_unpush_target): Remove.
8407 * inf-ptrace.c (struct target_unpusher): New.
8408 (target_unpush_up) New typedef.
8409 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
8410 target_unpush_up.
8411 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
8412
8413 2018-03-27 Tom Tromey <tom@tromey.com>
8414
8415 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
8416
8417 2018-03-27 Pedro Alves <palves@redhat.com>
8418 Tom Tromey <tom@tromey.com>
8419
8420 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
8421 destructor. Now a class.
8422 (gdb_readline_wrapper_cleanup): Remove function.
8423 (gdb_readline_wrapper): Remove cleanups.
8424
8425 2018-03-27 Tom Tromey <tom@tromey.com>
8426
8427 * typeprint.h (struct type_print_options) <local_typedefs,
8428 global_typedefs>: Remove "struct" keyword.
8429 (class typedef_hash_table): New class.
8430 (recursively_update_typedef_hash, add_template_parameters)
8431 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
8432 (find_typedef_in_hash): Don't declare.
8433 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
8434 (typedef_hash_table::recursively_update): Rename from
8435 recursively_update_typedef_hash. Now a member.
8436 (typedef_hash_table::add_template_parameters): Rename from
8437 add_template_parameters. Now a member.
8438 (typedef_hash_table::typedef_hash_table): Now a constructor;
8439 rename from create_typedef_hash.
8440 (typedef_hash_table::~typedef_hash_table): Now a destructor;
8441 rename from free_typedef_hash.
8442 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
8443 (do_free_global_table): Remove.
8444 (typedef_hash_table::typedef_hash_table): New constructor; renamed
8445 from copy_type_recursive.
8446 (create_global_typedef_table): Remove.
8447 (typedef_hash_table::find_global_typedef): Now a member of
8448 typedef_hash_table.
8449 (typedef_hash_table::find_typedef): Rename from
8450 find_typedef_in_hash; now a member.
8451 (whatis_exp): Update.
8452 * extension.h (struct ext_lang_type_printers): Add constructor and
8453 destructor.
8454 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
8455 declare.
8456 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
8457 Now a constructor; rename from start_ext_lang_type_printers.
8458 (ext_lang_type_printers): Now a destructor; rename from
8459 free_ext_lang_type_printers.
8460 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
8461 Update.
8462 (c_type_print_base_struct_union): Update. Remove cleanups.
8463
8464 2018-03-27 Tom Tromey <tom@tromey.com>
8465
8466 * dwarf-index-write.c: Include <cmath>.
8467
8468 2018-03-27 Joel Brobecker <brobecker@adacore.com>
8469
8470 * NEWS: Add entry describing new "set|show varsize-limit" command.
8471 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
8472 command.
8473 * printcmd.c (_initialize_printcmd): Add "set var" alias of
8474 "set variable".
8475
8476 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
8477
8478 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
8479 dwarf-index-write.c
8480 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
8481 * dwarf-index-common.c: New file.
8482 * dwarf-index-common.h: New file.
8483 * dwarf-index-write.c: New file.
8484 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
8485 (struct dwarf2_section_info): Move from here.
8486 (dwarf2_section_info_def): Likewise.
8487 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
8488 (offset_type): Likewise.
8489 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
8490 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
8491 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
8492 (byte_swap): Likewise.
8493 (MAYBE_SWAP): Likewise.
8494 (dwarf2_per_cu_ptr): Likewise.
8495 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
8496 (struct tu_stats): Likewise.
8497 (struct dwarf2_per_objfile): Likewise.
8498 (struct dwarf2_per_cu_data): Likewise.
8499 (struct signatured_type): Likewise.
8500 (sig_type_ptr): Likewise.
8501 (DEF_VEC_P (sig_type_ptr)): Likewise.
8502 (INDEX4_SUFFIX): Likewise.
8503 (INDEX5_SUFFIX): Likewise.
8504 (DEBUG_STR_SUFFIX): Likewise.
8505 (dwarf2_read_section): Make non-static.
8506 (mapped_index_string_hash): Move from here.
8507 (dwarf5_djb_hash): Likewise.
8508 (file_write): Likewise.
8509 (class data_buf): Likewise.
8510 (struct symtab_index_entry): Likewise.
8511 (struct mapped_symtab): Likewise.
8512 (find_slot): Likewise.
8513 (hash_expand): Likewise.
8514 (add_index_entry): Likewise.
8515 (uniquify_cu_indices): Likewise.
8516 (class c_str_view): Likewise.
8517 (class c_str_view_hasher): Likewise.
8518 (class vector_hasher): Likewise.
8519 (write_hash_table): Likewise.
8520 (psym_index_map): Likewise.
8521 (struct addrmap_index_data): Likewise.
8522 (add_address_entry): Likewise.
8523 (add_address_entry_worker): Likewise.
8524 (write_address_map): Likewise.
8525 (symbol_kind): Likewise.
8526 (write_psymbols): Likewise.
8527 (struct signatured_type_index_data): Likewise.
8528 (write_one_signatured_type): Likewise.
8529 (recursively_count_psymbols): Likewise.
8530 (recursively_write_psymbols): Likewise.
8531 (class debug_names): Likewise.
8532 (check_dwarf64_offsets): Likewise.
8533 (psyms_seen_size): Likewise.
8534 (write_gdbindex): Likewise.
8535 (write_debug_names): Likewise.
8536 (assert_file_size): Likewise.
8537 (write_psymtabs_to_index): Likewise.
8538 (save_gdb_index_command): Likewise.
8539 (_initialize_dwarf2_read): Don't register the "save gdb-index"
8540 command.
8541 * dwarf2read.h: New file.
8542
8543 2018-03-27 Joel Brobecker <brobecker@adacore.com>
8544
8545 PR gdb/22670
8546 * dwarf2read.c (dwarf2_physname): Do not return the demangled
8547 symbol name if the CU's language stores symbol names in linkage
8548 format.
8549 * language.h (struct language_defn)
8550 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
8551 all instances of this struct.
8552
8553 2018-03-26 Tom Tromey <tom@tromey.com>
8554
8555 * stack.c (backtrace_command_1): Remove verbose code.
8556
8557 2018-03-26 Tom Tromey <tom@tromey.com>
8558
8559 * python/py-framefilter.c (py_print_type): Don't catch
8560 exceptions. Return void.
8561 (py_print_value): Likewise.
8562 (py_print_single_arg): Likewise.
8563 (enumerate_args): Don't catch exceptions.
8564 (py_print_args): Likewise.
8565 (py_print_frame): Likewise.
8566 (gdbpy_apply_frame_filter): Catch exceptions here.
8567
8568 2018-03-26 Tom Tromey <tom@tromey.com>
8569
8570 * stack.c (_initialize_stack): Remove trailing newlines from help
8571 text. Add "Usage" line to "backtrace" help.
8572
8573 2018-03-26 Tom Tromey <tom@tromey.com>
8574
8575 PR python/16486:
8576 * python/py-framefilter.c (py_print_args): Call wrap_hint.
8577
8578 2018-03-26 Tom Tromey <tom@tromey.com>
8579
8580 * python/py-framefilter.c (py_print_single_arg): Return
8581 EXT_LANG_BT_ERROR from catch.
8582
8583 2018-03-26 Tom Tromey <tom@tromey.com>
8584
8585 PR backtrace/15584:
8586 * stack.c (backtrace_command_1): Move some code into no-filters
8587 "if".
8588
8589 2018-03-26 Tom Tromey <tom@tromey.com>
8590
8591 * python/py-framefilter.c (throw_quit_or_print_exception): New
8592 function.
8593 (gdbpy_apply_frame_filter): Use it.
8594
8595 2018-03-26 Tom Tromey <tom@tromey.com>
8596
8597 PR cli/17716:
8598 * python/py-framefilter.c (py_print_type, py_print_value)
8599 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
8600 RETURN_MASK_ERROR.
8601
8602 2018-03-26 Tom Tromey <tom@tromey.com>
8603
8604 * python/py-framefilter.c (enumerate_args): Use
8605 gdb::unique_xmalloc_ptr.
8606
8607 2018-03-26 Tom Tromey <tom@tromey.com>
8608
8609 * python/py-framefilter.c (py_print_frame): Return
8610 EXT_LANG_BT_OK.
8611 (gdbpy_apply_frame_filter): Update comment.
8612 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
8613 Remove.
8614 <EXT_LANG_BT_NO_FILTERS>: Change value.
8615
8616 2018-03-26 Tom Tromey <tom@tromey.com>
8617
8618 PR backtrace/15582:
8619 * stack.c (backtrace_command): Parse "hide" argument.
8620 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
8621 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
8622 constant.
8623
8624 2018-03-26 Tom Tromey <tom@tromey.com>
8625
8626 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
8627 add "flags".
8628 (backtrace_command): Remove "fulltrace", add "flags".
8629
8630 2018-03-26 Tom Tromey <tom@tromey.com>
8631
8632 * stack.c (backtrace_command): Rewrite command line parsing.
8633
8634 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
8635
8636 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
8637
8638 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
8639
8640 * filename-seen-cache.h: Add include guard.
8641
8642 2018-03-26 Keith Seitz <keiths@redhat.com>
8643
8644 * symfile.c (place_section): Remove "struct" from section_addr_info
8645 in comment.
8646 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
8647 "struct" keyword from section_addr_info.
8648
8649 2018-03-26 Alan Hayward <alan.hayward@arm.com>
8650
8651 * regformats/regdef.h (reg): Add constructors.
8652
8653 2018-03-25 Pedro Alves <palves@redhat.com>
8654
8655 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
8656 if then/else bodies in var_func_name extraction.
8657
8658 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
8659
8660 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
8661 lookup_minimal_symbol() to find symbol entry.
8662 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
8663
8664 2018-03-23 Keith Seitz <keiths@redhat.com>
8665
8666 PR c++/22968
8667 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
8668 nested type definitions for C++, too.
8669
8670 2018-03-23 Tom Tromey <tom@tromey.com>
8671
8672 * machoread.c (struct oso_el): Add a constructor. Don't define as
8673 a typedef.
8674 (macho_register_oso): Remove.
8675 (macho_symtab_read): Take a std::vector.
8676 (oso_el_compare_name): Now a std::sort comparator.
8677 (macho_symfile_read_all_oso): Take a std::vector.
8678 (macho_symfile_read): Use std::vector. Remove cleanups.
8679
8680 2018-03-22 Tom Tromey <tom@tromey.com>
8681
8682 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
8683 (record_full_goto_bookmark): Use std::string.
8684
8685 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8686
8687 PR tdep/18295
8688 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
8689 a single mask.
8690
8691 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8692
8693 * rs6000-tdep.c (store_insn_p): New function.
8694 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
8695 and cr_reg to their unshifted values. Use store_insn_p to
8696 match LR saves using either R1 or fdata->alloca_reg. Use
8697 store_insn_p to match CR saves. Set alloca_reg_offset
8698 when alloca_reg and framep are set. Remove lr_reg shift
8699 when assigning to fdata->lr_register.
8700
8701 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
8702
8703 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
8704 command line args instead of emitting a warning.
8705
8706 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8707
8708 * tracepoint.h (struct static_tracepoint_marker): Initialize
8709 fields, define default constructor, move constructor and move
8710 assignment, disable the rest.
8711 <str_id, extra>: Make std::string.
8712 (release_static_tracepoint_marker): Remove.
8713 (free_current_marker): Remove.
8714 * tracepoint.c (free_current_marker): Remove.
8715 (parse_static_tracepoint_marker_definition): Adjust to
8716 std::string, use new hex2str overload.
8717 (release_static_tracepoint_marker): Remove.
8718 (print_one_static_tracepoint_marker): Get marker by reference
8719 and adjust to std::string.
8720 (info_static_tracepoint_markers_command): Adjust to std::vector
8721 changes
8722 * target.h (static_tracepoint_marker_p): Remove typedef.
8723 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
8724 (struct target_ops) <to_static_tracepoint_marker_at>: Return
8725 bool.
8726 <to_static_tracepoint_markers_by_strid>: Return std::vector.
8727 * target-debug.h
8728 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
8729 (target_debug_print_std_vector_static_tracepoint_marker): New.
8730 (target_debug_print_struct_static_tracepoint_marker_p): Rename
8731 to...
8732 (target_debug_print_static_tracepoint_marker_p): ... this.
8733 * target-delegates.c: Re-generate.
8734 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
8735 Make std::string.
8736 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
8737 (decode_static_tracepoint_spec): Adjust to std::vector.
8738 (tracepoint_print_one_detail): Adjust to std::string.
8739 (strace_marker_decode_location): Adjust to std::string.
8740 (update_static_tracepoint): Adjust to std::string, remove call
8741 to release_static_tracepoint_marker.
8742 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
8743 Adjust to std::vector.
8744 * remote.c (remote_static_tracepoint_marker_at): Return bool.
8745 (remote_static_tracepoint_markers_by_strid): Adjust to
8746 std::vector.
8747 * common/rsp-low.h (hex2str): New overload with explicit count
8748 of bytes.
8749 * common/rsp-low.c (hex2str): New overload with explicit count
8750 of bytes.
8751 * unittests/rsp-low-selftests.c (test_hex2str): New function.
8752 (_initialize_rsp_low_selftests): Add test_hex2str test.
8753 * unittests/tracepoint-selftests.c
8754 (test_parse_static_tracepoint_marker_definition): Adjust to
8755 std::string.
8756
8757 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8758
8759 * tracepoint.c (parse_static_tracepoint_marker_definition):
8760 Consider case where the definition is followed by more
8761 definitions.
8762 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8763 tracepoint-selftests.c.
8764 * unittests/tracepoint-selftests.c: New.
8765
8766 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8767
8768 * MAINTAINERS (Write After Approval): Add Pedro Franco de
8769 Carvalho.
8770
8771 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
8772
8773 * symtab.c (find_pc_sect_line): fixed indentation.
8774
8775 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
8776
8777 * symtab.c (find_pc_sect_line): now uses binary search.
8778
8779 2018-03-19 Tom Tromey <tom@tromey.com>
8780
8781 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
8782 "IDENT" production.
8783
8784 2018-03-19 Pedro Alves <palves@redhat.com>
8785 Tom Tromey <tom@tromey.com>
8786
8787 * unittests/observable-selftests.c: New file.
8788 * common/observable.h: New file.
8789 * observable.h: New file.
8790 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
8791 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
8792 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
8793 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
8794 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
8795 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
8796 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
8797 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
8798 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
8799 python/py-breakpoint.c, python/py-finishbreakpoint.c,
8800 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
8801 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
8802 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
8803 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
8804 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
8805 tui/tui-interp.c, valops.c: Update all users.
8806 * tui/tui-hooks.c (tui_bp_created_observer)
8807 (tui_bp_deleted_observer, tui_bp_modified_observer)
8808 (tui_inferior_exit_observer, tui_before_prompt_observer)
8809 (tui_normal_stop_observer, tui_register_changed_observer):
8810 Remove.
8811 (tui_observers_token): New global.
8812 (attach_or_detach, tui_attach_detach_observers): New functions.
8813 (tui_install_hooks, tui_remove_hooks): Use
8814 tui_attach_detach_observers.
8815 * record-btrace.c (record_btrace_thread_observer): Remove.
8816 (record_btrace_thread_observer_token): New global.
8817 * observer.sh: Remove.
8818 * observer.c: Rename to observable.c.
8819 * observable.c (namespace gdb_observers): Define new objects.
8820 (observer_debug): Move into gdb_observers namespace.
8821 (struct observer, struct observer_list, xalloc_observer_list_node)
8822 (xfree_observer_list_node, generic_observer_attach)
8823 (generic_observer_detach, generic_observer_notify): Remove.
8824 (_initialize_observer): Update.
8825 Don't include observer.inc.
8826 * Makefile.in (generated_files): Remove observer.h, observer.inc.
8827 (clean mostlyclean): Likewise.
8828 (observer.h, observer.inc): Remove targets.
8829 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
8830 (COMMON_SFILES): Use observable.c, not observer.c.
8831 * .gitignore: Remove observer.h.
8832
8833 2018-03-18 Tom Tromey <tom@tromey.com>
8834
8835 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
8836 gdb::def_vector.
8837 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
8838
8839 2018-03-17 Tom Tromey <tom@tromey.com>
8840
8841 * auto-load.c (auto_load_objfile_script_1): Use std::string.
8842
8843 2018-03-17 Tom Tromey <tom@tromey.com>
8844
8845 * target.c (class scoped_target_fd): New.
8846 (target_fileio_close_cleanup): Remove.
8847 (target_fileio_read_alloc_1): Use scoped_target_fd.
8848
8849 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
8850
8851 * silent-rules.mk: New.
8852 * Makefile.in: Include silent-rules.mk
8853 (srcdir, VPATH, top_srcdir): Move up.
8854 (COMPILE): Add ECHO_CXX.
8855 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
8856 (init.c): Add ECHO_INIT_C.
8857 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
8858 (version.c): Add ECHO_GEN.
8859 (printcmd.o): Add ECHO_CXX.
8860 (target-float.o): Add ECHO_CXX.
8861 (ada-exp.o): Add ECHO_CXX.
8862 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
8863 (insight$(EXEEXT)): Add ECHO_CXXLD.
8864 * gnulib/configure.ac: Add AM_SILENT_RULES.
8865 * gnulib/aclocal.m4: Re-generate.
8866 * gnulib/configure: Re-generate.
8867 * gnulib/import/Makefile.in: Re-generate.
8868
8869 2018-03-16 Tom Tromey <tom@tromey.com>
8870
8871 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
8872 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
8873 * utils.c (do_free_section_addr_info)
8874 (make_cleanup_free_section_addr_info): Remove.
8875 * symfile.h (struct other_sections): Add constructor.
8876 (struct section_addr_info): Remove.
8877 (section_addr_info): New typedef.
8878 (struct sym_fns) <sym_offsets>: Change type of parameter.
8879 (build_section_addr_info_from_objfile)
8880 (relative_addr_info_to_section_offsets, addr_info_make_relative)
8881 (default_symfile_offsets, symbol_file_add)
8882 (symbol_file_add_from_bfd)
8883 (build_section_addr_info_from_section_table): Update.
8884 (alloc_section_addr_info, free_section_addr_info): Don't declare.
8885 * symfile.c (alloc_section_addr_info): Remove.
8886 (build_section_addr_info_from_section_table): Change return type.
8887 Update.
8888 (build_section_addr_info_from_bfd)
8889 (build_section_addr_info_from_objfile): Likewise.
8890 (free_section_addr_info): Remove.
8891 (relative_addr_info_to_section_offsets): Change type of "addrs".
8892 (addrs_section_compar): Now a std::sort comparator.
8893 (addrs_section_sort): Change return type.
8894 (addr_info_make_relative): Change type of "addrs". Update.
8895 (default_symfile_offsets, syms_from_objfile_1)
8896 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
8897 (symbol_file_add_separate): Update.
8898 (symbol_file_add): Change type of "addrs". Update.
8899 (add_symbol_file_command): Update. Remove cleanups.
8900 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
8901 cleanups.
8902 * symfile-debug.c (debug_sym_offsets): Change type of "info".
8903 * solib.c (solib_read_symbols): Update.
8904 * objfiles.c (objfile_relocate): Update. Remove cleanups.
8905 * machoread.c (macho_symfile_offsets): Update.
8906 * jit.c (jit_bfd_try_read_symtab): Update.
8907
8908 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
8909
8910 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8911 unittests/utils-selftests.c.
8912 * unittests/utils-selftests.c: New file.
8913
8914 2018-03-14 Tom Tromey <tom@tromey.com>
8915
8916 PR cli/14977:
8917 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
8918 for NULL.
8919
8920 2018-03-14 Tom Tromey <tom@tromey.com>
8921
8922 PR cli/19918:
8923 * printcmd.c (printf_pointer): Allow "-" in format.
8924
8925 2018-03-14 Tom Tromey <tom@tromey.com>
8926
8927 * printcmd.c (_initialize_printcmd): Add usage to printf.
8928
8929 2018-03-14 Yao Qi <qiyao@sourceware.org>
8930
8931 * MAINTAINERS: Update my email address.
8932
8933 2018-03-13 Tom Tromey <tom@tromey.com>
8934
8935 * machoread.c (macho_check_dsym): Change filenamep to a
8936 std::string*.
8937 (macho_symfile_read): Update.
8938 * symfile.c (load_command): Use std::string.
8939
8940 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
8941
8942 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
8943 to error message string.
8944 (riscv_register_name): Use xsnprintf instead of sprintf.
8945 (riscv_insn::fetch_instruction): Use gdb_assert instead of
8946 internal_error.
8947 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
8948 error.
8949 (riscv_push_dummy_call): Likewise.
8950
8951 2018-03-12 Tom Tromey <tom@tromey.com>
8952
8953 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
8954 Use gdb::byte_vector.
8955 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
8956
8957 2018-03-12 Yao Qi <yao.qi@linaro.org>
8958
8959 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
8960 parameter type to readable_regcache.
8961 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
8962 the declaration.
8963
8964 2018-03-11 Tom Tromey <tom@tromey.com>
8965
8966 * dwarf2read.c (struct nextfield): Add initializers.
8967 (struct nextfnfield): Remove.
8968 (struct fnfieldlist): Add initializers. Remove "length" and
8969 "head", use std::vector.
8970 (struct decl_field_list): Remove.
8971 (struct field_info): Add initializers.
8972 <fields, baseclasses>: Now std::vector.
8973 <nbaseclasses, nfnfields, typedef_field_list_count,
8974 nested_types_list_count>: Remove.
8975 (dwarf2_add_field, dwarf2_add_type_defn)
8976 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
8977 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
8978 (process_structure_scope): Update.
8979
8980 2018-03-11 Tom Tromey <tom@tromey.com>
8981
8982 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
8983 for use by std::sort.
8984 (build_type_psymtabs_1): Use std::vector.
8985
8986 2018-03-09 Eli Zaretskii <eliz@gnu.org>
8987
8988 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
8989 and LIBMPFR in the printed configuration.
8990
8991 2018-03-08 Tom Tromey <tom@tromey.com>
8992
8993 * source.c (get_filename_and_charpos): Use scoped_fd.
8994 * nto-procfs.c (procfs_open_1): Use scoped_fd.
8995 (procfs_pidlist): Likewise.
8996 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
8997 (iterate_over_mappings): Likewise.
8998
8999 2018-03-08 Tom Tromey <tom@tromey.com>
9000
9001 * infcall.c (struct call_return_meta_info)
9002 <stack_temporaries_enabled>: Remove.
9003 (get_call_return_value, call_function_by_hand_dummy): Update.
9004 * thread.c (disable_thread_stack_temporaries): Remove.
9005 (enable_thread_stack_temporaries): Remove.
9006 (thread_stack_temporaries_enabled_p): Return bool.
9007 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
9008 (get_last_thread_stack_temporary): Update.
9009 * eval.c (evaluate_subexp): Update.
9010 * gdbthread.h (class enable_thread_stack_temporaries): Now a
9011 class, not a function.
9012 (value_ptr, value_vec): Remove typedefs.
9013 (class thread_info) <stack_temporaries_enabled>: Now bool.
9014 <stack_temporaries>: Now a std::vector.
9015 (thread_stack_temporaries_enabled_p)
9016 (value_in_thread_stack_temporaries): Return bool.
9017
9018 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
9019
9020 * remote.c (putpkt_binary): Fix omitted bytes reporting.
9021 (getpkt_or_notif_sane_1): Likewise.
9022
9023 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9024
9025 * build-id.c (build_id_to_debug_bfd): Use std::string.
9026
9027 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9028
9029 * build-id.c (find_separate_debug_file_by_buildid): Return
9030 std::string.
9031 * build-id.h (find_separate_debug_file_by_buildid): Return
9032 std::string.
9033 * coffread.c (coff_symfile_read): Adjust to std::string.
9034 * elfread.c (elf_symfile_read): Adjust to std::string.
9035 * symfile.c (separate_debug_file_exists): Change parameter to
9036 std::string.
9037 (find_separate_debug_file): Return std::string.
9038 (find_separate_debug_file_by_debuglink): Return std::string.
9039 * symfile.h (find_separate_debug_file_by_debuglink): Return
9040 std::string.
9041
9042 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9043
9044 * common/xml-utils.c (xml_escape_text): Move code to...
9045 (xml_escape_text_append): ... this new function.
9046 * common/xml-utils.h (xml_escape_text_append): New declaration.
9047 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
9048 New function.
9049 (_initialize_xml_utils): register test_xml_escape_text_append as
9050 a selftest.
9051
9052 2018-03-07 Alan Hayward <alan.hayward@arm.com>
9053
9054 * defs.h: Remove MAX_REGISTER_SIZE.
9055 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
9056 asserts.
9057 * python/py-unwind.c (pyuw_sniffer): Likewise.
9058
9059 2018-03-07 Tom Tromey <tom@tromey.com>
9060
9061 * linux-tdep.c (linux_info_proc): Update.
9062 * target.h (struct target_ops) <to_fileio_readlink>: Return
9063 optional<string>.
9064 (target_fileio_readlink): Return optional<string>.
9065 * remote.c (remote_hostio_readlink): Return optional<string>.
9066 * inf-child.c (inf_child_fileio_readlink): Return
9067 optional<string>.
9068 * target.c (target_fileio_readlink): Return optional<string>.
9069
9070 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
9071
9072 * regcache.c (cooked_read_test): Add riscv to the list of
9073 architectures that have a save_reggroup.
9074
9075 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
9076
9077 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
9078 value is not a dynamic class object.
9079
9080 2018-03-06 Tom Tromey <tom@tromey.com>
9081
9082 * rust-exp.y: Formatting fixes.
9083
9084 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9085
9086 * riscv-tdep.c (riscv_register_name): Remove target description
9087 support.
9088 (riscv_gdbarch_init): Remove target description check.
9089
9090 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9091
9092 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
9093 comment.
9094 * riscv-tdep.h: Likewise.
9095
9096 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9097
9098 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
9099 (riscv_pseudo_register_write): Delete.
9100 (riscv_gdbarch_init): Remove all use of pseudo registers.
9101
9102 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9103
9104 * record-btrace.c (btrace_print_lines): Replace cleanup
9105 parameter with RAII equivalents.
9106 (btrace_insn_history): Replace cleanup with RAII equivalents.
9107 * ui-out.h (make_cleanup_ui_out_list_begin_end,
9108 make_cleanup_ui_out_tuple_begin_end): Remove.
9109 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
9110 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
9111 make_cleanup_ui_out_list_begin_end): Remove.
9112
9113 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9114
9115 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
9116 parameter types to std::vector. Use bool.
9117 (record_btrace_wait): Replace VEC(tp_t) with
9118 std::vector<thread_info *>.
9119 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
9120
9121 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9122
9123 * record-btrace.c (record_btrace_disable_callback): Remove.
9124 (struct scoped_btrace_disable): New.
9125 (record_btrace_open): Use scoped_btrace_disable.
9126
9127 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9128
9129 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
9130 reading values from registers.
9131
9132 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9133
9134 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
9135 where appropriate.
9136
9137 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9138
9139 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
9140 change parameter type. Use GDB's print functions, and use
9141 core_addr_to_string where appropriate.
9142 (riscv_push_dummy_call): Use core_addr_to_string where
9143 appropriate, update call to riscv_print_arg_location, and reindent
9144 a few lines.
9145 (riscv_return_value): Update call to riscv_print_arg_location.
9146
9147 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9148 Tim Newsome <tim@sifive.com>
9149 Albert Ou <a0u@eecs.berkeley.edu>
9150 Darius Rad <darius@bluespec.com>
9151
9152 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
9153 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
9154 (ALLDEPFILES): Add riscv-tdep.c
9155 * configure.tgt: Add riscv support.
9156 * riscv-tdep.c: New file.
9157 * riscv-tdep.h: New file.
9158 * NEWS: Mention new target.
9159 * MAINTAINERS: Add entry for riscv.
9160
9161 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9162
9163 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
9164 fields within aggregates.
9165
9166 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
9167
9168 * record-btrace.c (btrace_print_lines): Change type of flags to
9169 gdb_disassembly_flags.
9170
9171 2018-03-04 John Baldwin <jhb@FreeBSD.org>
9172
9173 * fbsd-nat.c: Include "inf-ptrace.h".
9174 (USE_SIGTRAP_SIGINFO): Conditionally define.
9175 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
9176 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
9177 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
9178 function.
9179 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
9180 Likewise.
9181 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
9182 Likewise.
9183 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
9184 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
9185 "supports_stopped_by_hw_breakpoint" target methods.
9186
9187 2018-03-04 John Baldwin <jhb@FreeBSD.org>
9188
9189 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
9190 * fbsd-nat.c (debug_fbsd_nat): New variable.
9191 (show_fbsd_nat_debug): New function.
9192 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
9193 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
9194
9195 2018-03-04 John Baldwin <jhb@FreeBSD.org>
9196
9197 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
9198 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
9199 prototype.
9200 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
9201 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
9202 method.
9203
9204 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9205
9206 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
9207 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
9208
9209 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9210
9211 * charset.c (struct charset_vector): New.
9212 (charsets): Change type to charset_vector.
9213 (find_charset_names): Adjust.
9214 (add_one): Adjust.
9215 (_initialize_charset): Adjust.
9216
9217 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9218
9219 * progspace.h (struct program_space) <deleted_solibs>: Change
9220 type to std::vector<std::string>.
9221 * progspace.c (clear_program_space_solib_cache): Adjust.
9222 * breakpoint.c (print_solib_event): Adjust.
9223 (check_status_catch_solib): Adjust.
9224 * solib.c (update_solib_list): Adjust.
9225 * ui-out.h (class ui_out) <field_string>: New overload.
9226 * ui-out.c (ui_out::field_string): New overload.
9227
9228 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9229
9230 * progspace.h (struct program_space): Add constructor and
9231 destructor, initialize fields.
9232 (add_program_space): Remove.
9233 * progspace.c (add_program_space): Rename to...
9234 (program_space::program_space): ... this.
9235 (release_program_space): Rename to...
9236 (program_space::~program_space): ... this.
9237 (delete_program_space): Use delete to delete program_space.
9238 (initialize_progspace): Use new to allocate program_space.
9239 * inferior.c (add_inferior_with_spaces): Likewise.
9240 (clone_inferior_command): Likewise.
9241 * infrun.c (follow_fork_inferior): Likewise.
9242 (handle_vfork_child_exec_or_exit): Likewise.
9243
9244 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9245
9246 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
9247 (delim_string_to_char_ptr_vec): Return std::vector of
9248 gdb::unique_xmalloc_ptr.
9249 (dirnames_to_char_ptr_vec_append): Take std::vector of
9250 gdb::unique_xmalloc_ptr.
9251 (dirnames_to_char_ptr_vec): Return std::vector of
9252 gdb::unique_xmalloc_ptr.
9253 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
9254 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
9255 (delim_string_to_char_ptr_vec): Return an std::vector of
9256 gdb::unique_xmalloc_ptr, adjust the code.
9257 (dirnames_to_char_ptr_vec_append): Take an std::vector of
9258 gdb::unique_xmalloc_ptr, adjust the code.
9259 (dirnames_to_char_ptr_vec): Return an std::vector of
9260 gdb::unique_xmalloc_ptr, adjust the code.
9261 * auto-load.c (auto_load_safe_path_vec): Change type to
9262 std::vector of gdb::unique_xmalloc_ptr.
9263 (auto_load_expand_dir_vars): Return an std::vector of
9264 gdb::unique_xmalloc_ptr, adjust the code.
9265 (auto_load_safe_path_vec_update): Adjust.
9266 (filename_is_in_auto_load_safe_path_vec): Adjust.
9267 (auto_load_objfile_script_1): Adjust.
9268 * build-id.c (build_id_to_debug_bfd): Adjust.
9269 * linux-thread-db.c (thread_db_load_search): Adjust.
9270 * source.c (add_path): Adjust.
9271 (openp): Adjust.
9272 * symfile.c (find_separate_debug_file): Adjust.
9273 * utils.c (do_free_char_ptr_vec): Remove.
9274 (make_cleanup_free_char_ptr_vec): Remove.
9275
9276 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
9277
9278 PR gdb/22907
9279 * common/pathstuff.c: Conditionally include "<windows.h>".
9280
9281 2018-03-01 Georg Sauthoff <mail@georg.so>
9282
9283 PR gdb/22888
9284 * gcore.in: Quote variables and switch interpreter to bash.
9285
9286 2018-03-01 Tom Tromey <tom@tromey.com>
9287
9288 * dwarf2read.c (alloc_discriminant_info): Fix default_index
9289 assertion. Add assertion for discriminant_index.
9290 (quirk_rust_enum): Use correct base type name in univariant case.
9291
9292 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
9293
9294 * record.c (get_call_history_modifiers): Return a
9295 record_print_flags.
9296 (cmd_record_call_history): Adjust.
9297 * record-btrace.c (record_btrace_call_history): Adjust.
9298 (record_btrace_call_history_range): Adjust.
9299 (record_btrace_call_history_from): Adjust.
9300 * target-debug.h (target_debug_print_record_print_flags): New.
9301 * target-delegates.c: Re-generate.
9302 * target.c (target_call_history): Change flags type.
9303 (target_call_history_from): Likewise.
9304 (target_call_history_range): Likewise.
9305 * target.h (struct target_ops) <target_call_history>: Likewise.
9306 (target_call_history_from): Likewise.
9307 (target_call_history_range): Likewise.
9308
9309 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
9310 Simon Marchi <simon.marchi@polymtl.ca>
9311
9312 * common/common-utils.c: Include "sys/stat.h".
9313 (is_regular_file): Move here from "source.c"; change return
9314 type to "bool".
9315 * common/common-utils.h (is_regular_file): New prototype.
9316 * common/pathstuff.c (contains_dir_separator): New function.
9317 * common/pathstuff.h (contains_dir_separator): New prototype.
9318 * source.c: Don't include "sys/stat.h".
9319 (is_regular_file): Move to "common/common-utils.c".
9320
9321 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
9322
9323 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
9324 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
9325 * auto-load.c: Include "common/pathstuff.h".
9326 * common/common-def.h (current_directory): Move here.
9327 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
9328 function.
9329 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
9330 prototype.
9331 * common/pathstuff.c: New file.
9332 * common/pathstuff.h: New file.
9333 * compile/compile.c: Include "common/pathstuff.h".
9334 * defs.h (current_directory): Move to "common/common-defs.h".
9335 * dwarf2read.c: Include "common/pathstuff.h".
9336 * exec.c: Likewise.
9337 * guile/scm-safe-call.c: Likewise.
9338 * linux-thread-db.c: Likewise.
9339 * main.c: Likewise.
9340 * nto-tdep.c: Likewise.
9341 * objfiles.c: Likewise.
9342 * source.c: Likewise.
9343 * symtab.c: Likewise.
9344 * utils.c: Include "common/pathstuff.h".
9345 (gdb_realpath): Move to "common/pathstuff.c".
9346 (gdb_realpath_keepfile): Likewise.
9347 (gdb_abspath): Likewise.
9348 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
9349 (gdb_realpath_keepfile): Likewise.
9350 (gdb_abspath): Likewise.
9351
9352 2018-02-28 John Baldwin <jhb@FreeBSD.org>
9353
9354 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
9355 wildcard process pid for super_resume for kernels with a
9356 specific bug.
9357
9358 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
9359
9360 * compile/compile.c (get_args): Add additional comments
9361 explaining function.
9362
9363 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
9364 Tom Tromey <tom@tromey.com>
9365
9366 * target.h (memory_write_request_s): Remove typedef. Don't define
9367 VEC.
9368 (target_write_memory_blocks): Change argument to std::vector.
9369 (struct memory_write_request): Add constructor.
9370 * target-memory.c (compare_block_starting_address): Return bool.
9371 Change argument types.
9372 (claim_memory): Change arguments to use std::vector.
9373 (split_regular_and_flash_blocks, blocks_to_erase)
9374 (compute_garbled_blocks): Likewise.
9375 (cleanup_request_data, cleanup_write_requests_vector): Remove.
9376 (target_write_memory_blocks): Change argument to std::vector.
9377 * symfile.c (struct load_section_data): Add constructor and
9378 destructor. Use std::vector for "requests".
9379 (struct load_progress_data): Add initializers.
9380 (load_section_callback): Update. Use "new".
9381 (clear_memory_write_data): Remove.
9382 (generic_load): Update.
9383
9384 2018-02-27 Alan Hayward <alan.hayward@arm.com>
9385
9386 * arch/aarch64.h: Use common/tdesc.h.
9387
9388 2018-02-26 Maciej W. Rozycki <macro@mips.com>
9389
9390 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
9391 architecture with a 64-bit ABI.
9392
9393 2018-02-26 Maciej W. Rozycki <macro@mips.com>
9394
9395 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
9396 ahead of target description loading.
9397
9398 2018-02-26 Tom Tromey <tom@tromey.com>
9399
9400 * stack.c (backtrace_command_1): Update.
9401 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
9402 of "flags".
9403 * python/py-framefilter.c (py_print_frame)
9404 (gdbpy_apply_frame_filter): Change type of "flags".
9405 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
9406 of "flags".
9407 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
9408 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
9409 * extension.h (enum frame_filter_flag): Rename from
9410 frame_filter_flags.
9411 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
9412 (apply_ext_lang_frame_filter): Change type of "flags".
9413 * extension.c (apply_ext_lang_frame_filter): Change type of
9414 "flags".
9415 * extension-priv.h (struct extension_language_ops)
9416 <apply_frame_filter>: Change type of "flags".
9417
9418 2018-02-26 Tom Tromey <tom@tromey.com>
9419
9420 PR python/16497:
9421 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
9422 off-by-one in py_end computation.
9423 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
9424 PRINT_MORE_FRAMES.
9425 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
9426 constant.
9427
9428 2018-02-26 Tom Tromey <tom@tromey.com>
9429
9430 * dwarf2read.c (struct variant_field): New.
9431 (struct nextfield) <variant>: New field.
9432 (dwarf2_add_field): Handle DW_TAG_variant_part.
9433 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
9434 discriminated union.
9435 (read_structure_type): Handle DW_TAG_variant_part.
9436 (handle_struct_member_die): New function, extracted from
9437 process_structure_scope. Handle DW_TAG_variant.
9438 (process_structure_scope): Handle discriminated unions. Call
9439 handle_struct_member_die.
9440
9441 2018-02-26 Tom Tromey <tom@tromey.com>
9442
9443 * rust-lang.h (rust_last_path_segment): Declare.
9444 * rust-lang.c (rust_last_path_segment): Now public. Change
9445 contract.
9446 (struct disr_info): Remove.
9447 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
9448 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
9449 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
9450 (rust_enum_p, rust_enum_variant): New function.
9451 (rust_underscore_fields): Remove "offset" parameter.
9452 (rust_print_enum): New function.
9453 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
9454 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
9455 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
9456 enums.
9457 (rust_internal_print_type): New function, from rust_print_type.
9458 Remove enum code.
9459 (rust_print_type): Call rust_internal_print_type.
9460 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
9461 Update enum handling.
9462 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
9463 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
9464 (rust_union_quirks): New functions.
9465 (process_full_comp_unit, process_full_type_unit): Call
9466 rust_union_quirks.
9467 (process_structure_scope): Update rust_unions if necessary.
9468
9469 2018-02-26 Tom Tromey <tom@tromey.com>
9470
9471 * value.h (value_union_variant): Declare.
9472 * valops.c (value_union_variant): New function.
9473 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
9474 (struct discriminant_info): New.
9475 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
9476 enumerator.
9477 (struct main_type) <flag_discriminated_union>: New field.
9478
9479 2018-02-26 Tom Tromey <tom@tromey.com>
9480
9481 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9482 unittests/unpack-selftests.c.
9483 * unittests/unpack-selftests.c: New file.
9484 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
9485
9486 2018-02-26 Yao Qi <yao.qi@linaro.org>
9487
9488 * dwarf2read.c (struct partial_die_info) <read>: New method.
9489 (read_partial_die): Remove the declaration.
9490 (load_partial_dies): Update.
9491 (partial_die_info::partial_die_info):
9492 (read_partial_die): Change it to partial_die_info::read.
9493
9494 2018-02-26 Yao Qi <yao.qi@linaro.org>
9495
9496 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
9497 (fixup_partial_die): Remove declaration.
9498 (scan_partial_symbols): Update.
9499 (partial_die_parent_scope): Likewise.
9500 (partial_die_full_name): Likewise.
9501 (fixup_partial_die): Change it to partial_die_info::fixup.
9502
9503 2018-02-26 Yao Qi <yao.qi@linaro.org>
9504
9505 * dwarf2read.c (read_partial_die): Update the declaration.
9506 (load_partial_dies): Caller update.
9507 (read_partial_die): Remove one argument abbrev_len.
9508
9509 2018-02-26 Yao Qi <yao.qi@linaro.org>
9510
9511 * dwarf2read.c (struct partial_die_info): Add ctor, delete
9512 assignment operator.
9513 (load_partial_dies): Use ctor and copy ctor.
9514 (read_partial_die): Update.
9515 (dwarf2_cu::find_partial_die): Use ctor.
9516
9517 2018-02-26 Yao Qi <yao.qi@linaro.org>
9518
9519 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
9520 (find_partial_die_in_comp_unit): Change it to
9521 dwarf2_cu::find_partial_die.
9522 (find_partial_die): Update.
9523
9524 2018-02-26 Yao Qi <yao.qi@linaro.org>
9525
9526 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
9527 is NULL.
9528
9529 2018-02-26 Yao Qi <yao.qi@linaro.org>
9530
9531 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
9532
9533 2018-02-26 Alan Hayward <alan.hayward@arm.com>
9534
9535 * arch/amd64.h: Use common/tdesc.h.
9536 * arch/i386.c: Likewise.
9537 * arch/i386.h: Likewise.
9538 * arch/tic6x.c: Likewise.
9539 * arch/tdesc.h: Move file from here...
9540 * common/tdesc.h: ...to here.
9541 * features/aarch64-core.c: Regenerate.
9542 * features/aarch64-fpu.c: Regenerate.
9543 * features/i386/32bit-avx.c: Regenerate.
9544 * features/i386/32bit-avx512.c: Regenerate.
9545 * features/i386/32bit-core.c: Regenerate.
9546 * features/i386/32bit-linux.c: Regenerate.
9547 * features/i386/32bit-mpx.c: Regenerate.
9548 * features/i386/32bit-pkeys.c: Regenerate.
9549 * features/i386/32bit-sse.c: Regenerate.
9550 * features/i386/64bit-avx.c: Regenerate.
9551 * features/i386/64bit-avx512.c: Regenerate.
9552 * features/i386/64bit-core.c: Regenerate.
9553 * features/i386/64bit-linux.c: Regenerate.
9554 * features/i386/64bit-mpx.c: Regenerate.
9555 * features/i386/64bit-pkeys.c: Regenerate.
9556 * features/i386/64bit-segments.c: Regenerate.
9557 * features/i386/64bit-sse.c: Regenerate.
9558 * features/i386/x32-core.c: Regenerate.
9559 * features/tic6x-c6xp.c: Regenerate.
9560 * features/tic6x-core.c: Regenerate.
9561 * features/tic6x-gp.c: Regenerate.
9562 * target-descriptions.c: Use common/tdesc.h.
9563 * target-descriptions.h: Likewise.
9564
9565 2018-02-24 Tom Tromey <tom@tromey.com>
9566
9567 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
9568 (try_thread_db_load_from_dir, thread_db_load_search): Use
9569 std::string.
9570 (info_auto_load_libthread_db_compare): Return bool. Change
9571 argument types.
9572 (info_auto_load_libthread_db): Use std::vector, std::string.
9573 Remove cleanups.
9574
9575 2018-02-24 Tom Tromey <tom@tromey.com>
9576
9577 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
9578 std::string.
9579 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
9580 std::string*.
9581 * gdbarch.c: Rebuild.
9582 * gdbarch.h: Rebuild.
9583 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
9584 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
9585 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
9586 std::string*.
9587
9588 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
9589
9590 * gdbtypes.h (sect_offset): Change type to uint64_t.
9591 (sect_offset_str): New function.
9592 * dwarf2read.c (create_addrmap_from_aranges): Use
9593 sect_offset_str.
9594 (error_check_comp_unit_head): Likewise.
9595 (create_debug_type_hash_table): Likewise.
9596 (read_cutu_die_from_dwo): Likewise.
9597 (init_cutu_and_read_dies): Likewise.
9598 (init_cutu_and_read_dies_no_follow): Likewise.
9599 (process_psymtab_comp_unit_reader): Likewise.
9600 (partial_die_parent_scope): Likewise.
9601 (peek_die_abbrev): Likewise.
9602 (process_queue): Likewise.
9603 (dwarf2_physname): Likewise.
9604 (read_namespace_alias): Likewise.
9605 (read_import_statement): Likewise.
9606 (create_dwo_cu_reader): Likewise.
9607 (create_cus_hash_table): Likewise.
9608 (lookup_dwo_cutu): Likewise.
9609 (inherit_abstract_dies): Likewise.
9610 (read_func_scope): Likewise.
9611 (read_call_site_scope): Likewise.
9612 (dwarf2_add_member_fn): Likewise.
9613 (read_common_block): Likewise.
9614 (read_module_type): Likewise.
9615 (read_typedef): Likewise.
9616 (read_subrange_type): Likewise.
9617 (load_partial_dies): Likewise.
9618 (read_partial_die): Likewise.
9619 (find_partial_die): Likewise.
9620 (read_str_index): Likewise.
9621 (dwarf2_string_attr): Likewise.
9622 (build_error_marker_type): Likewise.
9623 (lookup_die_type): Likewise.
9624 (dump_die_shallow): Likewise.
9625 (follow_die_ref): Likewise.
9626 (dwarf2_fetch_die_loc_sect_off): Likewise.
9627 (dwarf2_fetch_constant_bytes): Likewise.
9628 (follow_die_sig): Likewise.
9629 (get_signatured_type): Likewise.
9630 (get_DW_AT_signature_type): Likewise.
9631 (dwarf2_find_containing_comp_unit): Likewise.
9632 (set_die_type): Likewise.
9633
9634 2018-02-21 John Baldwin <jhb@FreeBSD.org>
9635
9636 * arch/aarch64.c: Include "common-defs.h".
9637 * arch/amd64.c: Likewise.
9638 * arch/i386.c: Likewise.
9639
9640 2018-02-21 Tom Tromey <tom@tromey.com>
9641
9642 * value.h: (extract_field_op): Update.
9643 * eval.c (extract_field_op): Return a const char *.
9644 * expression.h (parse_expression_for_completion): Update.
9645 * completer.c (complete_expression): Update.
9646 (add_struct_fields): Make fieldname const.
9647 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
9648 (mark_completion_tag, parse_exp_in_context_1): Update.
9649 (parse_expression_for_completion): Change "name" to
9650 unique_xmalloc_ptr*.
9651
9652 2018-02-21 Tom Tromey <tom@tromey.com>
9653
9654 * infcall.c (call_function_by_hand_dummy): Use std::vector.
9655
9656 2018-02-21 Yao Qi <yao.qi@linaro.org>
9657
9658 * avr-tdep.c (avr_read_pc): Change parameter type to
9659 readable_regcache.
9660 * gdbarch.sh (read_pc): Likewise.
9661 * gdbarch.c: Re-generated.
9662 * gdbarch.h: Re-generated.
9663 * hppa-tdep.c (hppa_read_pc): Change parameter type to
9664 readable_regcache.
9665 * ia64-tdep.c (ia64_read_pc): Likewise.
9666 * mips-tdep.c (mips_read_pc): Likewise.
9667 * spu-tdep.c (spu_read_pc): Likewise.
9668
9669 2018-02-21 Yao Qi <yao.qi@linaro.org>
9670
9671 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
9672 * regcache-dump.c: New file.
9673 * regcache.c: Move register_dump to regcache-dump.c.
9674 (maintenance_print_registers): Likewise.
9675 (maintenance_print_raw_registers): Likewise.
9676 (maintenance_print_cooked_registers): Likewise.
9677 (maintenance_print_register_groups): Likewise.
9678 (maintenance_print_remote_registers): Likewise.
9679 (_initialize_regcache): Likewise.
9680 * regcache.h (register_dump): Moved from regcache.c.
9681
9682 2018-02-21 Yao Qi <yao.qi@linaro.org>
9683
9684 * regcache.c (regcache::regcache): Update.
9685 (regcache::invalidate): Move it to detached_regcache::invalidate.
9686 (get_thread_arch_aspace_regcache): Update.
9687 (regcache::raw_update): Update.
9688 (regcache::cooked_read): Remove some code.
9689 (regcache::cooked_read_value): Likewise.
9690 (regcache::raw_write): Remove assert on m_readonly_p.
9691 (regcache::raw_supply_integer): Move it to
9692 detached_regcache::raw_supply_integer.
9693 (regcache::raw_supply_zeroed): Likewise.
9694 * regcache.h (detached_regcache) <raw_supply_integer>: New
9695 declaration.
9696 <raw_supply_zeroed, invalidate>: Likewise.
9697 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
9698 <invalidate>: Likewise.
9699 <m_readonly_p>: Removed.
9700
9701 2018-02-21 Yao Qi <yao.qi@linaro.org>
9702
9703 * infcmd.c (get_return_value): Let stop_regs point to
9704 get_current_regcache.
9705 * regcache.c (regcache::regcache): Remove.
9706 (register_dump_reg_buffer): New class.
9707 (regcache_print): Adjust.
9708 * regcache.h (regcache): Remove constructors.
9709
9710 2018-02-21 Yao Qi <yao.qi@linaro.org>
9711
9712 * regcache.c (class register_dump): New class.
9713 (register_dump_regcache, register_dump_none): New class.
9714 (register_dump_remote, register_dump_groups): New class.
9715 (regcache_print): Update.
9716 * regcache.h (regcache_dump_what): Move it to regcache.c.
9717 (regcache) <dump>: Remove.
9718
9719 2018-02-21 Yao Qi <yao.qi@linaro.org>
9720
9721 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
9722 reg_buffer_rw *.
9723 (jit_unwind_reg_set_impl): Call raw_supply.
9724 (jit_frame_sniffer): Use reg_buffer_rw.
9725 * record-full.c (record_full_core_regbuf): Change its type.
9726 (record_full_core_open_1): Use reg_buffer_rw.
9727 (record_full_close): Likewise.
9728 (record_full_core_fetch_registers): Use regcache->raw_supply.
9729 (record_full_core_store_registers): Likewise.
9730 * regcache.c (regcache::get_register_status): Move it to
9731 reg_buffer.
9732 (regcache_raw_set_cached_value): Remove.
9733 (regcache::raw_set_cached_value): Remove.
9734 (regcache::raw_write): Call raw_supply.
9735 (regcache::raw_supply): Move it to reg_buffer_rw.
9736 * regcache.h (regcache_raw_set_cached_value): Remove.
9737 (reg_buffer_rw): New class.
9738
9739 2018-02-21 Yao Qi <yao.qi@linaro.org>
9740
9741 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
9742 readonly_detached_regcache.
9743 (dummy_frame_prev_register): Use regcache->cooked_read.
9744 * frame.c (frame_save_as_regcache): Change return type.
9745 (frame_pop): Update.
9746 * frame.h (frame_save_as_regcache): Update declaration.
9747 * inferior.h (get_infcall_suspend_state_regcache): Update
9748 declaration.
9749 * infrun.c (infcall_suspend_state) <registers>: use
9750 readonly_detached_regcache.
9751 (save_infcall_suspend_state): Don't use regcache_dup.
9752 (get_infcall_suspend_state_regcache): Change return type.
9753 * linux-fork.c (struct fork_info) <savedregs>: Change to
9754 readonly_detached_regcache.
9755 <pc>: New field.
9756 (fork_save_infrun_state): Don't use regcache_dup.
9757 (info_checkpoints_command): Adjust.
9758 * mi/mi-main.c (register_changed_p): Update declaration.
9759 (mi_cmd_data_list_changed_registers): Use
9760 readonly_detached_regcache.
9761 (register_changed_p): Change parameter type to
9762 readonly_detached_regcache.
9763 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
9764 readonly_detached_regcache.
9765 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
9766 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
9767 New.
9768 (regcache::save): Move it to reg_buffer.
9769 (regcache::restore): Change parameter type.
9770 (regcache_dup): Remove.
9771 * regcache.h (reg_buffer) <save>: New method.
9772 (readonly_detached_regcache): New class.
9773 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
9774 readonly_detached_regcache.
9775 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
9776
9777 2018-02-21 Yao Qi <yao.qi@linaro.org>
9778
9779 * frame.c (frame_save_as_regcache): Use regcache method save.
9780 (frame_pop): Use regcache method restore.
9781 * infrun.c (restore_infcall_suspend_state): Likewise.
9782 * linux-fork.c (fork_load_infrun_state): Likewise.
9783 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
9784 save.
9785 * regcache.c (regcache_save): Remove.
9786 (regcache::restore): More asserts.
9787 (regcache_cpy): Remove.
9788 * regcache.h (regcache_save): Remove the declaration.
9789 (regcache::restore): Move from private to public.
9790 Remove the friend declaration of regcache_cpy.
9791 (regcache_cpy): Remove declaration.
9792
9793 2018-02-21 Yao Qi <yao.qi@linaro.org>
9794
9795 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
9796 parameter type to 'readable_regcache *'.
9797 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9798 * arm-tdep.c (arm_neon_quad_read): Likewise.
9799 (arm_pseudo_read): Likewise.
9800 * avr-tdep.c (avr_pseudo_register_read): Likewise.
9801 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9802 * frv-tdep.c (frv_pseudo_register_read): Likewise.
9803 * gdbarch.c: Re-generated.
9804 * gdbarch.h: Re-generated.
9805 * gdbarch.sh (pseudo_register_read): Change parameter type to
9806 'readable_regcache *'.
9807 (pseudo_register_read_value): Likewise.
9808 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
9809 (h8300_pseudo_register_read): Likewise.
9810 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
9811 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9812 (i386_pseudo_register_read_into_value): Likewise.
9813 (i386_pseudo_register_read_value): Likewise.
9814 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
9815 declaration.
9816 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
9817 * m32c-tdep.c (m32c_raw_read): Likewise.
9818 (m32c_read_flg): Likewise.
9819 (m32c_banked_register): Likewise.
9820 (m32c_banked_read): Likewise.
9821 (m32c_sb_read): Likewise.
9822 (m32c_part_read): Likewise.
9823 (m32c_cat_read): Likewise.
9824 (m32c_r3r2r1r0_read): Likewise.
9825 (m32c_pseudo_register_read): Likewise.
9826 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9827 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9828 (mep_pseudo_cr64_read): Likewise.
9829 (mep_pseudo_register_read): Likewise.
9830 * mips-tdep.c (mips_pseudo_register_read): Likewise.
9831 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9832 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9833 * regcache.c (regcache::raw_read): Move it to readable_regcache.
9834 (regcache::cooked_read): Likewise.
9835 (regcache::cooked_read_value): Likewise.
9836 (regcache_cooked_read_signed):
9837 (regcache::cooked_read): Likewise.
9838 * regcache.h (readable_regcache): New class.
9839 (regcache): Inherit readable_regcache. Move some methods to
9840 readable_regcache.
9841 * rl78-tdep.c (rl78_pseudo_register_read): Change
9842 parameter type to 'readable_regcache *'.
9843 * rs6000-tdep.c (do_regcache_raw_read): Remove.
9844 (e500_pseudo_register_read): Change parameter type to
9845 'readable_regcache *'.
9846 (dfp_pseudo_register_read): Likewise.
9847 (vsx_pseudo_register_read): Likewise.
9848 (efpr_pseudo_register_read): Likewise.
9849 * s390-tdep.c (s390_pseudo_register_read): Likewise.
9850 * sh-tdep.c (sh_pseudo_register_read): Likewise.
9851 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
9852 (sh64_pseudo_register_read): Likewise.
9853 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9854 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9855 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9856 (spu_pseudo_register_read): Likewise.
9857 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9858 (xtensa_pseudo_register_read): Likewise.
9859
9860 2018-02-21 Yao Qi <yao.qi@linaro.org>
9861
9862 * regcache.c (regcache::regcache): Call reg_buffer ctor.
9863 (regcache::arch): Move it to reg_buffer::arch.
9864 (regcache::register_buffer): Likewise.
9865 (regcache::assert_regnum): Likewise.
9866 (regcache::num_raw_registers): Likewise.
9867 * regcache.h (reg_buffer): New class.
9868 (regcache): Inherit reg_buffer.
9869
9870 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
9871
9872 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
9873 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
9874
9875 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
9876
9877 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
9878
9879 2018-02-19 Alan Hayward <alan.hayward@arm.com>
9880
9881 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
9882 (SFILES): Remove common/*.c files.
9883 (COMMON_OBS): Remove some *.o files built from common/*.c files.
9884 * common/common.host: Add common reference.
9885 * configure.ac: Likewise.
9886 * configure: Regenerate.
9887
9888 2018-02-16 Yao Qi <yao.qi@linaro.org>
9889
9890 * block.c (block_namespace_info): Inherit allocate_on_obstack.
9891 (block_initialize_namespace): Use new.
9892 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
9893 (dwarf2_free_objfile): Use delete.
9894 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
9895 (copy_type_recursive): Use new.
9896 * gdb_obstack.h (allocate_on_obstack): New.
9897
9898 2018-02-15 Yao Qi <yao.qi@linaro.org>
9899
9900 PR gdb/22849
9901 * inferior.c (exit_inferior_1): Reset inf->control.
9902
9903 2018-02-15 Joel Brobecker <brobecker@adacore.com>
9904
9905 * ada-lang.c (ada_to_fixed_value_create): Delete advance
9906 declaration.
9907
9908 2018-02-14 Pedro Alves <palves@redhat.com>
9909
9910 * frame-unwind.c (frame_unwind_try_unwinder): Always call
9911 frame_cleanup_after_sniffer on exception.
9912
9913 2018-02-14 Tom Tromey <tom@tromey.com>
9914
9915 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
9916 const.
9917 (solib_bfd_open): Make pathname const.
9918 * solib.c (solib_bfd_open): Make pathname const.
9919 * solib-spu.c (spu_bfd_fopen): Make name const.
9920 (spu_bfd_open): Make pathname const.
9921 * solib-darwin.c (darwin_bfd_open): Make pathname const.
9922 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
9923
9924 2018-02-14 Tom Tromey <tom@tromey.com>
9925
9926 * symfile.c (symfile_bfd_open): Update.
9927 * source.h (openp, source_full_path_of, find_and_open_source):
9928 Change argument type to unique_xmalloc_ptr.
9929 * source.c (openp): Take a unique_xmalloc_ptr.
9930 (source_full_path_of, find_and_open_source): Likewise.
9931 (open_source_file, symtab_to_fullname): Update.
9932 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
9933 unique_xmalloc_ptr.
9934 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
9935 (exec_file_find): Update.
9936 * psymtab.c (psymtab_to_fullname): Update.
9937 * nto-tdep.h (nto_find_and_open_solib): Update.
9938 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
9939 unique_xmalloc_ptr.
9940 * exec.c (exec_file_attach): Update.
9941 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
9942 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
9943
9944 2018-02-14 Tom Tromey <tom@tromey.com>
9945
9946 * solib.c: Include source.h.
9947 * nto-tdep.c: Include source.h.
9948 * mi/mi-cmd-env.c: Include source.h.
9949 * infcmd.c: Include source.h.
9950 * exec.c: Include source.h.
9951 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
9952 (add_path, directory_switch, source_path, init_source_path): Move
9953 declarations...
9954 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
9955 (add_path, directory_switch, source_path, init_source_path):
9956 ...here.
9957
9958 2018-02-14 Tom Tromey <tom@tromey.com>
9959
9960 * solist.h (exec_file_find, solib_find): Return
9961 unique_xmalloc_ptr.
9962 (solib_bfd_fopen): Take a const char *.
9963 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
9964 (exec_file_find, solib_find): Likewise.
9965 (solib_bfd_fopen): Do not take ownership of "pathname".
9966 (solib_bfd_open): Use unique_xmalloc_ptr.
9967 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
9968 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
9969 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
9970 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
9971
9972 2018-02-14 Joel Brobecker <brobecker@adacore.com>
9973
9974 * ada-lang.c (name_match_type_from_name): Remove reference to
9975 ada_name_for_lookup in function's documentation.
9976 * ada-lang.h (ada_name_for_lookup): Delete declaration.
9977
9978 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
9979
9980 * defs.h (enum openp_flags): New enum.
9981 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
9982 Move to enum openp_flags.
9983 (openp_flags): New enum flags.
9984 (openp): Change parameter type to openp_flags.
9985 * source.c (openp): Change parameter type to openp_flags.
9986 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
9987 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
9988
9989 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
9990
9991 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
9992 per-command.
9993
9994 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
9995
9996 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
9997 into...
9998 (class dwarf2_queue_guard): ...the destructor of this new class.
9999 (dw2_do_instantiate_symtab): Create instance of the new class
10000 dwarf2_queue_guard, remove cleanup.
10001
10002 2018-02-09 Tom Tromey <tom@tromey.com>
10003
10004 * source.c (find_source_lines): Don't reference past the end of
10005 the vector.
10006
10007 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10008
10009 * remote.c (remote_btrace_maybe_reopen): Change error message.
10010 * btrace.c (btrace_enable): Likewise.
10011 (parse_xml_btrace): Likewise.
10012 (parse_xml_btrace_conf): Likewise.
10013
10014 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10015
10016 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
10017 (linux_enable_pt, linux_enable_bts): Call
10018 diagnose_perf_event_open_fail.
10019
10020 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10021
10022 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
10023 Remove parameter and change return type. Update callers. Move it.
10024 (linux_enable_bts, linux_enable_pt): Improve error message.
10025 (linux_enable_pt): Remove zero buffer size check.
10026 (linux_enable_btrace): Improve error messages. Remove NULL return
10027 check.
10028
10029 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10030
10031 * btrace.c (btrace_enable): Remove target_supports_btrace call.
10032 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
10033 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
10034 (linux_supports_pt, linux_supports_btrace): Remove.
10035 (linux_enable_bts): Call cpu_supports_bts.
10036 * nat/linux-btrace.h (linux_supports_btrace): Remove.
10037 * remote.c (remote_supports_btrace): Remove.
10038 (init_remote_ops): Remove remote_supports_btrace.
10039 * target-delegates.c: Regenerated.
10040 * target.c (target_supports_btrace): Remove.
10041 * target.h (target_ops) <to_supports_btrace>: Remove
10042 (target_supports_btrace): Remove.
10043 * x86-linux-nat.c (x86_linux_create_target): Remove
10044 linux_supports_btrace.
10045
10046 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10047
10048 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
10049 btrace failed.
10050 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
10051 exception and use message in own exception.
10052
10053 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10054
10055 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
10056 (perf_event_pt_event_type): Use gdb_file_up.
10057 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
10058 scoped_fd, and scoped_mmap.
10059
10060 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10061
10062 * common/scoped_mmap.h: New.
10063 * unittests/scoped_mmap-selftest.c: New.
10064 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10065 unittests/scoped_mmap-selftest.c.
10066
10067 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10068
10069 * common/scoped_fd.h: New.
10070 * unittests/scoped_fd-selftest.c: New.
10071 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10072 unittests/scoped_fd-selftest.c.
10073
10074 2018-02-09 Tom Tromey <tom@tromey.com>
10075
10076 * auto-load.c (auto_load_section_scripts): Use
10077 gdb::unique_xmalloc_ptr.
10078
10079 2018-02-09 Tom Tromey <tom@tromey.com>
10080
10081 * auto-load.c (execute_script_contents): Use std::string.
10082
10083 2018-02-09 Joel Brobecker <brobecker@adacore.com>
10084
10085 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
10086 Python function, rather than a new command.
10087
10088 2018-02-08 Tom Tromey <tom@tromey.com>
10089
10090 * solib.c (solib_find_1): Use std::string.
10091 (solib_bfd_fopen): Use unique_xmalloc_ptr.
10092
10093 2018-02-08 Tom Tromey <tom@tromey.com>
10094
10095 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
10096
10097 2018-02-08 Tom Tromey <tom@tromey.com>
10098
10099 * source.c (find_source_lines): Use gdb::def_vector.
10100
10101 2018-02-08 Tom Tromey <tom@tromey.com>
10102
10103 * macrocmd.c (struct temporary_macro_definition): New.
10104 (macro_define_command): Use temporary_macro_definition. Remove
10105 cleanups.
10106 (free_macro_definition_ptr): Remove.
10107
10108 2018-02-08 Tom Tromey <tom@tromey.com>
10109
10110 * macroexp.c (maybe_expand): Use std::string.
10111
10112 2018-02-08 Tom Tromey <tom@tromey.com>
10113
10114 * macroexp.c (struct macro_buffer): Add initializers for some
10115 members.
10116 (init_buffer, init_shared_buffer, free_buffer)
10117 (free_buffer_return_text): Remove.
10118 (macro_buffer): New constructors.
10119 (~macro_buffer): New destructor.
10120 (macro_buffer::set_shared): New method.
10121 (macro_buffer::resize_buffer, macro_buffer::appendc)
10122 (macro_buffer::appendmem): Now methods, not free functions.
10123 (set_token, append_tokens_without_splicing, stringify)
10124 (macro_stringify): Update.
10125 (gather_arguments): Change return type. Remove argc_p argument,
10126 add args_ptr argument. Use std::vector.
10127 (substitute_args): Remove argc argument. Accept std::vector.
10128 (expand): Update. Use std::vector.
10129 (scan, macro_expand, macro_expand_next): Update.
10130
10131 2018-02-08 Tom Tromey <tom@tromey.com>
10132
10133 * symtab.c (default_collect_symbol_completion_matches_break_on):
10134 Use unique_xmalloc_ptr.
10135 * macroscope.h: (sal_macro_scope, user_macro_scope)
10136 (default_macro_scope): Return unique_xmalloc_ptr.
10137 * macroscope.c (sal_macro_scope, user_macro_scope)
10138 (default_macro_scope): Return unique_xmalloc_ptr.
10139 * macroexp.h (macro_expand, macro_expand_once): Return
10140 unique_xmalloc_ptr.
10141 * macroexp.c (macro_expand, macro_expand_once): Return
10142 unique_xmalloc_ptr.
10143 * macrocmd.c (macro_expand_command, macro_expand_once_command)
10144 (info_macro_command, info_macros_command): Use
10145 unique_xmalloc_ptr.
10146 * compile/compile-c-support.c (write_macro_definitions): Use
10147 unique_xmalloc_ptr.
10148 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
10149
10150 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
10151
10152 * value.c (value_static_field): Assign field type instead of
10153 containing type when returning an optimized out value.
10154
10155 2018-02-06 Yao Qi <yao.qi@linaro.org>
10156
10157 * ft32-tdep.c (ft32_read_pc): Remove.
10158 (ft32_write_pc): Remove.
10159 (ft32_gdbarch_init): Update.
10160 * m32r-tdep.c (m32r_read_pc): Remove.
10161 (m32r_gdbarch_init): Update.
10162 * mep-tdep.c (mep_read_pc): Remove.
10163 (mep_gdbarch_init): Update.
10164 * microblaze-tdep.c (microblaze_write_pc): Remove.
10165 (microblaze_gdbarch_init): Update.
10166 * mn10300-tdep.c (mn10300_read_pc): Remove.
10167 (mn10300_write_pc): Remove.
10168 (mn10300_gdbarch_init): Update.
10169 * moxie-tdep.c (moxie_read_pc): Remove.
10170 (moxie_write_pc): Remove.
10171 (moxie_gdbarch_init): Update.
10172
10173 2018-02-06 Yao Qi <yao.qi@linaro.org>
10174
10175 * expprint.c (print_subexp_standard): Handle
10176 OP_F77_UNDETERMINED_ARGLIST.
10177 (dump_subexp_body_standard): Likewise.
10178
10179 2018-02-05 Alan Hayward <alan.hayward@arm.com>
10180
10181 * target-descriptions.c (tdesc_element_visitor) Add empty
10182 implementations.
10183 (tdesc_type): Move make_gdb_type from here.
10184 (tdesc_type_builtin): Likewise.
10185 (tdesc_type_vector): Likewise.
10186 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
10187 (make_gdb_type_struct): Move from tdesc_type_with_fields.
10188 (make_gdb_type_union): Likewise.
10189 (make_gdb_type_flags): Likewise.
10190 (make_gdb_type_enum): Likewise.
10191 (make_gdb_type): New function.
10192 (tdesc_register_type): Use static make_gdb_type.
10193
10194 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
10195
10196 * infcmd.c (default_print_one_register_info): Align natural-format
10197 column values consistently one under another.
10198 (pad_to_column): New function.
10199
10200 2018-02-05 Joel Brobecker <brobecker@adacore.com>
10201
10202 * dwarf2read.c (dwarf2_physname): Move commment.
10203
10204 2018-02-01 Leszek Swirski <leszeks@google.com>
10205
10206 * varobj.c (varobj_formatted_print_options): Allow recursive
10207 pretty printing if pretty printing is enabled.
10208
10209 2018-02-01 Leszek Swirski <leszeks@google.com>
10210
10211 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
10212 names after a structop as a filename.
10213
10214 2018-02-01 Yao Qi <yao.qi@linaro.org>
10215
10216 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
10217 (arm_record_coproc_data_proc): Likewise.
10218
10219 2018-02-01 Yao Qi <yao.qi@linaro.org>
10220
10221 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
10222
10223 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
10224
10225 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
10226 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
10227
10228 2018-01-31 Pedro Alves <palves@redhat.com>
10229
10230 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
10231 * inflow.c (child_terminal_save_inferior): Wrap reference to
10232 tcgetpgrp in HAVE_TERMIOS_H.
10233 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
10234 _WIN32.
10235 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
10236 always iterate over all inferiors.
10237 (gdbsim_cntrl_c): Adjust.
10238 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
10239
10240 2018-01-31 Joel Brobecker <brobecker@adacore.com>
10241
10242 * gdbtypes.c (lookup_array_range_type): Make sure the array's
10243 index type is objfile-owned if the element type is as well.
10244
10245 2018-01-31 Joel Brobecker <brobecker@adacore.com>
10246
10247 GDB 8.1 released.
10248
10249 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
10250
10251 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
10252 "features/s390x-linux64.c".
10253 (_initialize_s390_linux_tdep): Remove initialization of tdescs
10254 s390_linux32 and s390x_linux64.
10255 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
10256 default tdesc.
10257 * s390-tdep.c: Include "features/s390-linux32.c" and
10258 "features/s390x-linux64.c".
10259 (s390_tdesc_valid): Add check for tdesc_has_registers.
10260 (s390_gdbarch_init): Make sure there is always a valid tdesc.
10261 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
10262 tdesc_s390x_linux64.
10263 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
10264 tdesc_s390x_linux64 to...
10265 * s390-tdep.h: ...here.
10266
10267 2018-01-30 Pedro Alves <palves@redhat.com>
10268
10269 PR gdb/13211
10270 * config.in, configure: Regenerate.
10271 * configure.ac: Check for getpgid.
10272 * go32-nat.c (go32_pass_ctrlc): New.
10273 (go32_target): Install it.
10274 * inf-child.c (inf_child_target): Install
10275 child_terminal_save_inferior, child_pass_ctrlc and
10276 child_interrupt.
10277 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
10278 (inf_ptrace_target): No longer install it.
10279 * infcmd.c (interrupt_target_1): Adjust.
10280 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
10281 (child_interrupt): Declare.
10282 (inferior::terminal_state): New.
10283 * inflow.c (struct terminal_info): Update comments.
10284 (inferior_process_group): Delete.
10285 (terminal_is_ours): Delete.
10286 (gdb_tty_state): New.
10287 (child_terminal_init): Adjust.
10288 (is_gdb_terminal, sharing_input_terminal_1)
10289 (sharing_input_terminal): New functions.
10290 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
10291 Set the process's actual process group in the foreground if
10292 possible. Handle is_ours_for_output/is_ours distinction. Don't
10293 mark terminal as the inferior's if not sharing GDB's terminal.
10294 Don't check attach_flag.
10295 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
10296 pass down a target_terminal_state.
10297 (child_terminal_save_inferior): New, factored out from ...
10298 (child_terminal_ours_1): ... this. Handle
10299 target_terminal_state::is_ours_for_output.
10300 (child_interrupt, child_pass_ctrlc): New.
10301 (inflow_inferior_exit): Clear the inferior's terminal_state.
10302 (copy_terminal_info): Copy the inferior's terminal state.
10303 (_initialize_inflow): Remove reference to terminal_is_ours.
10304 * inflow.h (inferior_process_group): Delete.
10305 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
10306 * procfs.c (procfs_target): Don't install procfs_interrupt.
10307 (procfs_interrupt): Delete.
10308 * remote.c (remote_serial_quit_handler): Adjust.
10309 (remote_interrupt): Remove ptid parameter. Adjust.
10310 * target-delegates.c: Regenerate.
10311 * target.c: Include "terminal.h".
10312 (target_terminal::terminal_state): Rename to ...
10313 (target_terminal::m_terminal_state): ... this.
10314 (target_terminal::init): Adjust.
10315 (target_terminal::inferior): Adjust to per-inferior
10316 terminal_state.
10317 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
10318 (target_terminal::ours, target_terminal::ours_for_output): Use
10319 target_terminal_is_ours_kind.
10320 (target_interrupt): Remove ptid parameter. Adjust.
10321 (default_target_pass_ctrlc): Adjust.
10322 * target.h (target_ops::to_terminal_save_inferior): New field.
10323 (target_ops::to_interrupt): Remove ptid_t parameter.
10324 (target_interrupt): Remove ptid_t parameter. Update comment.
10325 (target_pass_ctrlc): Update comment.
10326 * target/target.h (target_terminal_state): New scoped enum,
10327 factored out of ...
10328 (target_terminal::terminal_state): ... here.
10329 (target_terminal::inferior): Update comments.
10330 (target_terminal::restore_inferior): New.
10331 (target_terminal::is_inferior, target_terminal::is_ours)
10332 (target_terminal::is_ours_for_output): Adjust.
10333 (target_terminal::scoped_restore_terminal_state): Adjust to
10334 rename, and call restore_inferior() instead of inferior().
10335 (target_terminal::scoped_restore_terminal_state::m_state): Change
10336 type.
10337 (target_terminal::terminal_state): Rename to ...
10338 (target_terminal::m_terminal_state): ... this and change type.
10339
10340 2018-01-30 Pedro Alves <palves@redhat.com>
10341
10342 * linux-nat.c (wait_for_signal): New function.
10343 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
10344 directly.
10345 (async_terminal_is_ours)
10346 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
10347 (linux_nat_add_target): Don't override
10348 to_terminal_inferior/to_terminal_ours.
10349
10350 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
10351
10352 * remote.c (remote_follow_fork): Don't call "detach_inferior".
10353
10354 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
10355
10356 * dwarf2read.c (free_dwo_files): Add forward-declaration.
10357 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
10358 dwarf2_per_objfile_free here.
10359 (dwarf2_per_objfile_free): Remove.
10360 (_initialize_dwarf2_read): Don't register
10361 dwarf2_per_objfile_free as a registry cleanup.
10362
10363 2018-01-27 Eli Zaretskii <eliz@gnu.org>
10364
10365 Avoid compilation errors in MinGW native builds
10366
10367 The error is triggered by including python-internal.h, and the
10368 error message is:
10369
10370 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
10371 from build-gnulib/import/math.h:27,
10372 from d:/usr/Python26/include/pyport.h:235,
10373 from d:/usr/Python26/include/Python.h:58,
10374 from python/python-internal.h:94,
10375 from python/py-arch.c:24:
10376 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
10377 using ::hypot;
10378 ^~~~~
10379
10380 This happens because Python headers define 'hypot' to expand t
10381 '_hypot' in the Windows builds.
10382 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
10383 'hypoth'. This avoids a compilation error.
10384
10385 2018-01-26 Alan Hayward <alan.hayward@arm.com>
10386
10387 * MAINTAINERS (Write After Approval): Fix ordering.
10388
10389 2018-01-26 Alan Hayward <alan.hayward@arm.com>
10390
10391 * MAINTAINERS (Write After Approval): Add Alan Hayward.
10392
10393 2018-01-26 Alan Modra <amodra@gmail.com>
10394
10395 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
10396 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
10397 Remove nop. Make const. Comment.
10398 (powerpc32_plt_stub_so_2): New.
10399 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
10400 Correct count. Update uses.
10401 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
10402 Move common code reading PLT entry word. Correct
10403 powerpc32_plt_stub PLT address calculation.
10404 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
10405 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
10406 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
10407 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
10408 (ppc64_standard_linkage8): Likewise.
10409 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
10410 Correct insns description.
10411 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
10412
10413 2018-01-24 Pedro Alves <palves@redhat.com>
10414
10415 GCC PR libstdc++/83906
10416 * gdbtypes.c (operator==(const dynamic_prop &,
10417 const dynamic_prop &)): New.
10418 (operator==(const range_bounds &, const range_bounds &)): New.
10419 (check_types_equal): Use them instead of memcmp.
10420 * gdbtypes.h (operator==(const dynamic_prop &,
10421 const dynamic_prop &)): Declare.
10422 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
10423 (operator==(const range_bounds &, const range_bounds &)): Declare.
10424 (operator!=(const range_bounds &, const range_bounds &)): Declare.
10425
10426 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10427
10428 * s390-linux-tdep.c (s390_record_address_mask)
10429 (s390_record_calc_disp_common, s390_record_calc_disp)
10430 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10431 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10432 (s390_process_record): Move to s390-tdep.c.
10433 (s390_linux_init_abi_any): Adjust.
10434 * s390-tdep.c (s390_record_address_mask)
10435 (s390_record_calc_disp_common, s390_record_calc_disp)
10436 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10437 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10438 (s390_process_record): Moved from s390-linux-tdep.c
10439 (s390_gdbarch_init): Adjust.
10440
10441 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10442
10443 * s390-linux-nat.c (s390-tdep.h): New include.
10444 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
10445 (HFILES_NO_SRCDIR): Add s390-tdep.h.
10446 (ALLDEPFILES): Add s390-tdep.c.
10447 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
10448 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
10449 * s390-tdep.h: ...this. New file.
10450 * s390-linux-tdep.c (s390-tdep.h): New include.
10451 (_initialize_s390_tdep): Rename to...
10452 (_initialize_s390_linux_tdep): ...this and adjust.
10453 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
10454 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
10455 s390-tdep.h.
10456 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
10457 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
10458 (s390_is_partial_instruction, s390_software_single_step)
10459 (is_non_branch_ril, s390_displaced_step_copy_insn)
10460 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
10461 (s390_prologue_data, s390_addr, s390_store, s390_load)
10462 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
10463 (s390_register_call_saved, s390_guess_tracepoint_registers)
10464 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
10465 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
10466 (s390_pseudo_register_name, s390_pseudo_register_type)
10467 (s390_pseudo_register_read, s390_pseudo_register_write)
10468 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
10469 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
10470 (s390_addr_bits_remove, s390_address_class_type_flags)
10471 (s390_address_class_type_flags_to_name)
10472 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
10473 (s390_function_arg_float, s390_function_arg_vector)
10474 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
10475 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
10476 (s390_frame_align, s390_register_return_value, s390_return_value)
10477 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
10478 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
10479 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
10480 (s390_trad_frame_prev_register, s390_unwind_cache)
10481 (s390_prologue_frame_unwind_cache)
10482 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
10483 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
10484 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
10485 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
10486 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
10487 (s390_frame_base_address, s390_local_base_address)
10488 (s390_frame_base, s390_gcc_target_options)
10489 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
10490 (s390_validate_reg_range, s390_tdesc_valid)
10491 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
10492 * s390-tdep.c: ...this. New file.
10493
10494 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10495
10496 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
10497 (s390_process_record, s390_gdbarch_tdep_alloc)
10498 (s390_linux_init_abi_any): Use/set new hook.
10499
10500 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10501
10502 * s390-linux-tdep.c (osabi.h): New include.
10503 (s390_linux_init_abi_31, s390_linux_init_abi_64)
10504 (s390_linux_init_abi_any): New functions.
10505 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
10506
10507 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10508
10509 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
10510 tdesc_has_registers check
10511
10512 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10513
10514 * s390-linux-tdep.c (s390_tdesc_valid): New function.
10515 (s390_validate_reg_range): New macro.
10516 (s390_gdbarch_init): Adjust.
10517
10518 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10519
10520 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
10521 (s390_gdbarch_tdep_alloc): Adjust.
10522 (s390_gdbarch_init): Adjust.
10523
10524 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10525
10526 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
10527 <have_tdb>: Change type to bool.
10528 (s390_gdbarch_tdep_alloc): Adjust.
10529 (s390_gdbarch_init): Adjust.
10530
10531 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10532
10533 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
10534 (gdbarch_tdep) <have_upper, have_vx>: New fields.
10535 (s390_gdbarch_tdep_alloc): New function.
10536 (s390_gdbarch_init): Allocate tdep at start and use its fields
10537 instead of separate variables.
10538
10539 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10540
10541 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
10542 when looking for cached gdbarch and add comment for remaining.
10543
10544 2018-01-22 Pedro Alves <palves@redhat.com>
10545 Sergio Durigan Junior <sergiodj@redhat.com>
10546
10547 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
10548 case.
10549
10550 2018-01-22 Maciej W. Rozycki <macro@mips.com>
10551
10552 * MAINTAINERS: Update my company e-mail address.
10553
10554 2018-01-22 Yao Qi <yao.qi@linaro.org>
10555
10556 * regcache.c (cooked_write_test): New function.
10557 (_initialize_regcache): Register the test.
10558
10559 2018-01-22 Yao Qi <yao.qi@linaro.org>
10560
10561 * ia64-tdep.c (ia64_pseudo_register_read): Call
10562 regcache->cooked_read instead of regcache_cooked_read_unsigned.
10563 * m32c-tdep.c (m32c_cat_read): Likewise.
10564 (m32c_r3r2r1r0_read): Likewise.
10565 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10566 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10567
10568 2018-01-22 Yao Qi <yao.qi@linaro.org>
10569
10570 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
10571 method raw_read instead of regcache_raw_read.
10572 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10573 * arm-tdep.c (arm_neon_quad_read): Likewise.
10574 * avr-tdep.c (avr_pseudo_register_read): Likewise.
10575 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10576 * frv-tdep.c (frv_pseudo_register_read): Likewise.
10577 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
10578 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10579 (i386_pseudo_register_read_into_value): Likewise.
10580 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10581 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10582 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10583 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
10584 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
10585 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10586 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10587 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10588 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
10589
10590 2018-01-22 Yao Qi <yao.qi@linaro.org>
10591
10592 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
10593 * configure.tgt: Remove target mt.
10594 * mt-tdep.c: Remove.
10595 * regcache.c (cooked_read_test): Remove the check for mt.
10596
10597 2018-01-22 Yao Qi <yao.qi@linaro.org>
10598
10599 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
10600 instead of gdbarch_pseudo_register_read_value.
10601
10602 2018-01-22 Joel Brobecker <brobecker@adacore.com>
10603
10604 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
10605 language is Ada.
10606
10607 2018-01-22 Joel Brobecker <brobecker@adacore.com>
10608
10609 * linespec.c (create_sals_line_offset): Remove code that preserved
10610 the symtab_and_line's line number.
10611
10612 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10613
10614 * varobj.c (varobj_create): Don't set valid_block when creating a
10615 floating varobj.
10616
10617 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10618
10619 * varobj.c (varobj_create): Remove out of date comment.
10620
10621 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10622
10623 PR mi/20395
10624 * ada-exp.y (write_var_from_sym): Pass extra parameter when
10625 updating innermost block.
10626 * parse.c (innermost_block_tracker::update): Take extra type
10627 parameter, and check types match before updating innermost block.
10628 (write_dollar_variable): Update innermost block for registers.
10629 * parser-defs.h (enum innermost_block_tracker_type): New enum.
10630 (innermost_block_tracker::innermost_block_tracker): Initialise
10631 m_types member.
10632 (innermost_block_tracker::reset): Take type parameter.
10633 (innermost_block_tracker::update): Take type parameter, and pass
10634 type through as needed.
10635 (innermost_block_tracker::m_types): New member.
10636 * varobj.c (varobj_create): Pass type when reseting innermost
10637 block.
10638
10639 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10640
10641 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
10642 * ada-lang.c (resolve_subexp): Likewise.
10643 * breakpoint.c (set_breakpoint_condition) Likewise.
10644 (watch_command_1) Likewise.
10645 * c-exp.y (variable): Likewise.
10646 * d-exp.y (PrimaryExpression): Likewise.
10647 * f-exp.y (variable): Likewise.
10648 * go-exp.y (variable): Likewise.
10649 * m2-exp.y (variable): Likewise.
10650 * objfiles.c (objfile::~objfile): Likewise.
10651 * p-exp.y (variable): Likewise.
10652 * parse.c (innermost_block): Change type.
10653 * parser-defs.h (class innermost_block_tracker): New.
10654 (innermost_block): Change to innermost_block_tracker.
10655 * printcmd.c (display_command): Switch to innermost_block API.
10656 (do_one_display): Likewise.
10657 * rust-exp.y (do_one_display): Likewise.
10658 * symfile.c (clear_symtab_users): Likewise.
10659 * varobj.c (varobj_create): Switch to innermost_block API, replace
10660 use of innermost_block with block stored on varobj object.
10661
10662 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10663
10664 * expression.h (innermost_block): Remove declaration.
10665 * varobj.c: Add 'parser-defs.h' include.
10666
10667 2018-01-19 Tom Tromey <tom@tromey.com>
10668
10669 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
10670 symbols in the static and global blocks.
10671
10672 2018-01-19 James Clarke <jrtc27@jrtc27.com>
10673
10674 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
10675 gdb_ptrace.h, and move including gdb_wait.h ...
10676 * nat/linux-ptrace.h: ... to here.
10677
10678 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10679
10680 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
10681 inf_ptrace_detach_success.
10682 (inf_ptrace_detach_success): Add inferior parameter, use it
10683 instead of inferior_ptid, pass it to detach_inferior.
10684 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
10685 parameter.
10686 * inferior.c (detach_inferior): Add overload that takes an
10687 inferior object.
10688 * inferior.h (detach_inferior): Likewise.
10689 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
10690 use inferior_ptid, adjust call to inf_ptrace_detach_success.
10691 * linux-thread-db.c (thread_db_detach): Use inf parameter.
10692
10693 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10694
10695 * target.h (struct target_ops) <to_detach>: Add inferior
10696 parameter.
10697 (target_detach): Likewise.
10698 * target.c (dispose_inferior): Pass inferior down.
10699 (target_detach): Pass inferior down. Assert that it is equal to
10700 the current inferior.
10701 * aix-thread.c (aix_thread_detach): Pass inferior down.
10702 * corefile.c (core_file_command): Pass current_inferior() down.
10703 * corelow.c (core_detach): Add inferior parameter.
10704 * darwin-nat.c (darwin_detach): Likewise.
10705 * gnu-nat.c (gnu_detach): Likewise.
10706 * inf-ptrace.c (inf_ptrace_detach): Likewise.
10707 * infcmd.c (detach_command): Pass current_inferior() down to
10708 target_detach.
10709 * infrun.c (follow_fork_inferior): Pass parent_inf to
10710 target_detach.
10711 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
10712 target_detach.
10713 * linux-nat.c (linux_nat_detach): Add inferior parameter.
10714 * linux-thread-db.c (thread_db_detach): Likewise.
10715 * nto-procfs.c (procfs_detach): Likewise.
10716 * procfs.c (procfs_detach): Likewise.
10717 * record.c (record_detach): Likewise.
10718 * record.h (struct inferior): Forward-declare.
10719 (record_detach): Add inferior parameter.
10720 * remote-sim.c (gdbsim_detach): Likewise.
10721 * remote.c (remote_detach_1): Likewise.
10722 (remote_detach): Likewise.
10723 (extended_remote_detach): Likewise.
10724 * sol-thread.c (sol_thread_detach): Likewise.
10725 * target-debug.h (target_debug_print_inferior_p): New macro.
10726 * target-delegates.c: Re-generate.
10727 * top.c (kill_or_detach): Pass inferior down to target_detach.
10728 * windows-nat.c (windows_detach): Add inferior parameter.
10729
10730 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10731
10732 * target.h (struct target_ops) <to_detach>: Remove args
10733 parameter.
10734 (target_detach): Likewise.
10735 * target.c (dispose_inferior): Adjust.
10736 (target_detach): Remove args parameter, adjust.
10737 * aix-thread.c (aix_thread_detach): Adjust.
10738 * corefile.c (core_file_command): Adjust.
10739 * corelow.c (core_detach): Adjust.
10740 * darwin-nat.c (darwin_detach): Adjust.
10741 * gnu-nat.c (gnu_detach): Adjust.
10742 * inf-ptrace.c (inf_ptrace_detach): Adjust.
10743 * infcmd.c (detach_command): Adjust
10744 * infrun.c (follow_fork_inferior): Adjust.
10745 (handle_vfork_child_exec_or_exit): Adjust.
10746 * linux-fork.c (linux_fork_detach): Remove args parameter.
10747 * linux-fork.h (linux_fork_detach): Likewise.
10748 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
10749 * linux-thread-db.c (thread_db_detach): Likewise.
10750 * nto-procfs.c (procfs_detach): Likewise.
10751 * procfs.c (procfs_detach): Likewise.
10752 (do_detach): Remove signo parameter.
10753 * record.c (record_detach): Remove args parameter.
10754 * record.h (record_detach): Likewise.
10755 * remote-sim.c (gdbsim_detach): Likewise.
10756 * remote.c (remote_detach_1): Likewise.
10757 (remote_detach): Likewise.
10758 (extended_remote_detach): Likewise.
10759 * sol-thread.c (sol_thread_detach): Likewise.
10760 * target-delegates.c: Re-generate.
10761 * top.c (struct qt_args) <args>: Remove field.
10762 (kill_or_detach): Don't pass args.
10763 (quit_force): Don't set args.
10764 * windows-nat.c (windows_detach): Remove args parameter.
10765
10766 2018-01-19 Yao Qi <yao.qi@linaro.org>
10767
10768 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
10769 (arm_linux_init_abi): Install it.
10770
10771 2018-01-19 Yao Qi <yao.qi@linaro.org>
10772
10773 * osabi.c (gdb_osabi_names): Extend the regexp for
10774 arm-linux-gnueabihf.
10775
10776 2018-01-18 Yao Qi <yao.qi@linaro.org>
10777
10778 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
10779 m_abbrevs.
10780 (abbrev_table::add_abbrev): Update.
10781 (abbrev_table::lookup_abbrev): Update.
10782
10783 2018-01-18 Yao Qi <yao.qi@linaro.org>
10784
10785 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
10786
10787 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
10788
10789 * compile/compile.c (compile_to_object): Convert "triplet_rx"
10790 to "std::string".
10791
10792 2018-01-17 Tom Tromey <tom@tromey.com>
10793
10794 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
10795
10796 2018-01-17 Tom Tromey <tom@tromey.com>
10797
10798 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
10799 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
10800 (create_array_type_with_stride): Update.
10801 * dwarf2read.c (set_die_type): Update.
10802
10803 2018-01-17 Tom Tromey <tom@tromey.com>
10804
10805 * dwarf2read.c (delayed_method_info): Remove typedef.
10806 (dwarf2_cu::method_info): Now a std::vector.
10807 (add_to_method_list): Update.
10808 (free_delayed_list): Remove.
10809 (compute_delayed_physnames): Update.
10810 (process_full_comp_unit, process_full_type_unit): Clear the method
10811 list. Remove cleanups.
10812 (psymtab_include_file_name): Add name_holder parameter. Use
10813 unique_xmalloc_ptr.
10814 (dwarf_decode_lines): Update.
10815
10816 2018-01-17 Tom Tromey <tom@tromey.com>
10817 Simon Marchi <simon.marchi@ericsson.com>
10818
10819 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
10820 (dwarf2_per_objfile::free_cached_comp_units)
10821 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10822 (init_cutu_and_read_dies_no_follow): Update.
10823 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
10824 (dwarf2_cu::~dwarf2_cu): New.
10825 (free_heap_comp_unit, free_stack_comp_unit): Remove.
10826 (age_cached_comp_units, free_one_cached_comp_unit): Update.
10827
10828 2018-01-17 Tom Tromey <tom@tromey.com>
10829 Simon Marchi <simon.marchi@ericsson.com>
10830
10831 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
10832 (struct die_reader_specs) <abbrev_table>: New member.
10833 (struct abbrev_table): Add constructor.
10834 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
10835 <abbrev_obstack>: Now an auto_obstack.
10836 (abbrev_table_up): New typedef.
10837 (init_cu_die_reader): Add abbrev_table parameter.
10838 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
10839 Add result_dwo_abbrev_table.
10840 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10841 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
10842 Update.
10843 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
10844 parameter.
10845 (skip_children): Update.
10846 (abbrev_table::alloc_abbrev): Rename from
10847 abbrev_table_alloc_abbrev.
10848 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
10849 (abbrev_table::lookup_abbrev): Rename from
10850 abbrev_table_lookup_abbrev.
10851 (abbrev_table_read_table): Return abbrev_table_up.
10852 (abbrev_table_free, abbrev_table_free_cleanup)
10853 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
10854 (load_partial_dies): Update.
10855
10856 2018-01-17 Tom Tromey <tom@tromey.com>
10857
10858 * dwarf2read.c (dwarf2_compute_name): Update comment.
10859 (read_func_scope, read_variable): Update.
10860 (new_symbol): Remove.
10861 (new_symbol_full): Rename to new_symbol.
10862
10863 2018-01-17 Mike Gulick <mgulick@mathworks.com>
10864
10865 PR gdb/16577
10866 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
10867 a warning instead of throwing an error, set section size to 0 and return
10868 NULL.
10869 * gdb_bfd.h (gdb_bfd_map_section): Update description.
10870
10871 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
10872
10873 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
10874 std::string.
10875 (linux_ptrace_attach_fail_reason_string): Likewise.
10876 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
10877 Likewise.
10878 (linux_ptrace_attach_fail_reason_string): Likewise.
10879 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
10880
10881 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
10882
10883 * linux-nat.c (linux_nat_attach): Remove xstrdup.
10884
10885 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
10886
10887 PR gdb/21559
10888 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
10889 checking for fs_base/gs_base fields in struct user_regs_struct.
10890 * configure: Regenerate.
10891
10892 2018-01-17 Yao Qi <yao.qi@linaro.org>
10893
10894 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
10895 function.
10896 (aarch64_linux_init_abi): Install it to gdbarch hook
10897 gcc_target_options.
10898
10899 2018-01-15 Pedro Alves <palves@redhat.com>
10900
10901 * common/signals-state-save-restore.c
10902 (save_original_signals_state): Fix typos.
10903
10904 2017-01-12 Tom Tromey <tom@tromey.com>
10905 Sergio Durigan Junior <sergiodj@redhat.com>
10906
10907 * Makefile.in (install-only): Install gdb-add-index.
10908
10909 2018-01-12 John Baldwin <jhb@FreeBSD.org>
10910
10911 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
10912
10913 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
10914
10915 * infrun.c (keep_going_pass_signal): Clear step-over info when
10916 insert_breakpoints fails.
10917
10918 2018-01-11 Pedro Alves <palves@redhat.com>
10919
10920 PR gdb/22583
10921 * infrun.c (resume): Rename to ...
10922 (resume_1): ... this.
10923 (resume): Reimplement as wrapper around resume_1.
10924
10925 2018-01-11 Pedro Alves <palves@redhat.com>
10926
10927 PR remote/22597
10928 * remote.c (remote_parse_stop_reply): Default to the last-set
10929 general thread instead of to 'magic_null_ptid'.
10930
10931 2018-01-10 Pedro Alves <palves@redhat.com>
10932
10933 * language.h (language_get_symbol_name_matcher): Rename ...
10934 (get_symbol_name_matcher): ... this.
10935 * language.c (language_get_symbol_name_matcher): Ditto.
10936 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
10937 callers adjusted.
10938
10939 2018-01-10 Pedro Alves <palves@redhat.com>
10940
10941 PR gdb/22670
10942 * dwarf2read.c
10943 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
10944 Adjust to use language_get_symbol_name_matcher instead of
10945 language_defn::la_get_symbol_name_matcher.
10946 * language.c (language_get_symbol_name_matcher): If in Ada mode
10947 and the lookup name is a verbatim match, return Ada's matcher.
10948 * language.h (language_get_symbol_name_matcher): Adjust comment.
10949 (ada_lookup_name_info::verbatim_p):: New method.
10950
10951 2018-01-10 Pedro Alves <palves@redhat.com>
10952
10953 PR gdb/22670
10954 * ada-lang.c (ada_collect_symbol_completion_matches): If the
10955 minsym's language is language_auto or language_cplus, pass down
10956 language_ada instead.
10957 * symtab.c (compare_symbol_name): Don't frob symbol language here.
10958
10959 2018-01-10 Pedro Alves <palves@redhat.com>
10960
10961 PR gdb/22670
10962 * minsyms.c (linkage_name_str): New function.
10963 (iterate_over_minimal_symbols): Use it.
10964
10965 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10966
10967 * NEWS: Document that 'info proc' now works on FreeBSD.
10968
10969 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10970
10971 * configure.ac: Check for kinfo_getfile in libutil.
10972 * configure: Regenerate.
10973 * config.in: Regenerate.
10974 * fbsd-nat.c: Include "fbsd-tdep.h".
10975 (fbsd_fetch_cmdline): New.
10976 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
10977 rather than calling error.
10978 (fbsd_info_proc): New.
10979 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
10980 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
10981 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
10982
10983 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10984
10985 * fbsd-nat.c (struct free_deleter): Remove.
10986 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
10987
10988 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10989
10990 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
10991 NULL for an empty pathname.
10992
10993 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10994
10995 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
10996 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
10997 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
10998 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
10999 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
11000 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
11001 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
11002 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
11003 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
11004 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
11005 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
11006 (fbsd_core_fetch_timeval, fbsd_print_sigset)
11007 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
11008 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
11009 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
11010
11011 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
11012
11013 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
11014 (gnu_xfer_auxv): New function.
11015 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
11016 TARGET_OBJECT_AUXV.
11017
11018 2018-01-08 Yao Qi <yao.qi@linaro.org>
11019 Simon Marchi <simon.marchi@ericsson.com>
11020
11021 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
11022 common/selftest.c.
11023 (COMMON_OBS): Remove selftest.o.
11024 * configure.ac: Append selftest-arch.c and common/selftest.c to
11025 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
11026 * configure: Re-generated.
11027 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
11028 GDB_SELF_TEST.
11029 (maintenance_info_selftests): Likewise.
11030
11031 2018-01-08 Xavier Roirand <roirand@adacore.com>
11032
11033 * ada-valprint.c (val_print_packed_array_elements): Use
11034 proper number of elements when printing an array indexed
11035 by an enumeration type.
11036
11037 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11038
11039 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
11040 (dw2_get_file_names_reader): Adjust.
11041 (lookup_dwo_signatured_type): Adjust.
11042 (lookup_dwp_signatured_type): Adjust.
11043 (lookup_signatured_type): Adjust.
11044 (create_type_unit_group): Adjust.
11045 (get_type_unit_group): Adjust.
11046 (process_psymtab_comp_unit_reader): Adjust.
11047 (build_type_psymtabs_reader): Adjust.
11048 (scan_partial_symbols): Adjust.
11049 (add_partial_symbol): Adjust.
11050 (add_partial_subprogram): Adjust.
11051 (peek_die_abbrev): Adjust.
11052 (fixup_go_packaging): Adjust.
11053 (process_imported_unit_die): Adjust.
11054 (dwarf2_compute_name): Adjust.
11055 (dwarf2_physname): Adjust.
11056 (read_import_statement): Adjust.
11057 (handle_DW_AT_stmt_list): Adjust.
11058 (read_file_scope): Adjust.
11059 (read_func_scope): Adjust.
11060 (read_lexical_block_scope): Adjust.
11061 (read_call_site_scope): Adjust.
11062 (read_variable): Adjust.
11063 (dwarf2_rnglists_process): Adjust.
11064 (dwarf2_ranges_process): Adjust.
11065 (dwarf2_ranges_read): Adjust.
11066 (dwarf2_get_pc_bounds): Adjust.
11067 (dwarf2_record_block_ranges): Adjust.
11068 (dwarf2_add_field): Adjust.
11069 (dwarf2_add_member_fn): Adjust.
11070 (read_structure_type): Adjust.
11071 (process_structure_scope): Adjust.
11072 (read_enumeration_type): Adjust.
11073 (read_array_type): Adjust.
11074 (mark_common_block_symbol_computed): Adjust.
11075 (read_common_block): Adjust.
11076 (read_namespace_type): Adjust.
11077 (read_namespace): Adjust.
11078 (read_module_type): Adjust.
11079 (read_tag_pointer_type): Adjust.
11080 (read_tag_ptr_to_member_type): Adjust.
11081 (read_tag_string_type): Adjust.
11082 (read_subroutine_type): Adjust.
11083 (read_typedef): Adjust.
11084 (read_base_type): Adjust.
11085 (attr_to_dynamic_prop): Adjust.
11086 (read_subrange_type): Adjust.
11087 (read_unspecified_type): Adjust.
11088 (dwarf2_read_abbrevs): Adjust.
11089 (load_partial_dies): Adjust.
11090 (read_partial_die): Adjust.
11091 (find_partial_die): Adjust.
11092 (guess_partial_die_structure_name): Adjust.
11093 (fixup_partial_die): Adjust.
11094 (read_attribute_value): Adjust.
11095 (read_addr_index): Adjust.
11096 (read_addr_index_from_leb128): Adjust.
11097 (read_str_index): Adjust.
11098 (dwarf2_string_attr): Adjust.
11099 (get_debug_line_section): Adjust.
11100 (dwarf_decode_line_header): Adjust.
11101 (lnp_state_machine::check_line_address): Adjust.
11102 (dwarf_decode_lines_1): Adjust.
11103 (dwarf_decode_lines): Adjust.
11104 (dwarf2_start_symtab): Adjust.
11105 (var_decode_location): Adjust.
11106 (new_symbol_full): Adjust.
11107 (dwarf2_const_value_data): Adjust.
11108 (dwarf2_const_value_attr): Adjust.
11109 (dwarf2_const_value): Adjust.
11110 (die_type): Adjust.
11111 (die_containing_type): Adjust.
11112 (build_error_marker_type): Adjust.
11113 (lookup_die_type): Adjust.
11114 (guess_full_die_structure_name): Adjust.
11115 (anonymous_struct_prefix): Adjust.
11116 (determine_prefix): Adjust.
11117 (dwarf2_name): Adjust.
11118 (follow_die_ref_or_sig): Adjust.
11119 (follow_die_offset): Adjust.
11120 (follow_die_ref): Adjust.
11121 (follow_die_sig_1): Adjust.
11122 (follow_die_sig): Adjust.
11123 (get_signatured_type): Adjust.
11124 (get_DW_AT_signature_type): Adjust.
11125 (decode_locdesc): Adjust.
11126 (dwarf_decode_macros): Adjust.
11127 (cu_debug_loc_section): Adjust.
11128 (fill_in_loclist_baton): Adjust.
11129 (dwarf2_symbol_mark_computed): Adjust.
11130 (init_one_comp_unit): Don't assign
11131 dwarf2_cu::dwarf2_per_objfile.
11132 (set_die_type): Adjust.
11133
11134 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11135
11136 * dwarf2read.c (struct mapped_debug_names): Add constructor.
11137 <dwarf2_per_objfile>: New field.
11138 (dwarf2_per_objfile): Remove global.
11139 (get_dwarf2_per_objfile): New function.
11140 (set_dwarf2_per_objfile): New function.
11141 (dwarf2_build_psymtabs_hard): Change objfile parameter to
11142 dwarf2_per_objfile.
11143 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
11144 (read_abbrev_offset): Likewise.
11145 (read_indirect_string): Likewise.
11146 (read_indirect_line_string): Likewise.
11147 (read_indirect_string_at_offset): Likewise.
11148 (read_indirect_string_from_dwz): Likewise.
11149 (dwarf2_find_containing_comp_unit): Change objfile parameter to
11150 dwarf2_per_objfile.
11151 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11152 (create_all_comp_units): Change objfile parameter to
11153 dwarf2_per_objfile.
11154 (create_all_type_units): Likewise.
11155 (process_queue): Add dwarf2_per_objfile parameter.
11156 (read_and_check_comp_unit_head): Likewise.
11157 (lookup_dwo_unit_in_dwp): Likewise.
11158 (get_dwp_file): Likewise.
11159 (process_cu_includes): Likewise.
11160 (struct free_dwo_file_cleanup_data): New struct.
11161 (dwarf2_has_info): Use get_dwarf2_per_objfile and
11162 set_dwarf2_per_objfile.
11163 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
11164 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
11165 context, adjust calls.
11166 (dw2_instantiate_symtab): Likewise.
11167 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
11168 (dw2_get_cu): Likewise.
11169 (create_cu_from_index_list): Change objfile parameter to
11170 dwarf2_per_objfile.
11171 (create_cus_from_index_list): Get dwarf2_per_objfile from
11172 context, adjust calls.
11173 (create_cus_from_index): Likewise.
11174 (create_signatured_type_table_from_index): Change objfile
11175 parameter to dwarf2_per_objfile.
11176 (create_signatured_type_table_from_debug_names): Change objfile
11177 parameter to dwarf2_per_objfile.
11178 (create_addrmap_from_index): Likewise.
11179 (create_addrmap_from_aranges): Likewise.
11180 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
11181 (dw2_setup): Remove.
11182 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
11183 context.
11184 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
11185 get_dwarf2_per_objfile.
11186 (dw2_forget_cached_source_info): Likewise.
11187 (dw2_map_symtabs_matching_filename): Likewise.
11188 (struct dw2_symtab_iterator) <index>: Remove.
11189 <dwarf2_per_objfile>: New field.
11190 (dw2_symtab_iter_init): Replace index parameter with
11191 dwarf2_per_objfile.
11192 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
11193 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
11194 (dw2_print_stats): Likewise.
11195 (dw2_dump): Likewise.
11196 (dw2_expand_symtabs_for_function): Likewise.
11197 (dw2_expand_all_symtabs): Likewise.
11198 (dw2_expand_symtabs_with_fullname): Likewise.
11199 (dw2_expand_marked_cus): Replace index and objfile parameters
11200 with dwarf2_per_objfile.
11201 (dw_expand_symtabs_matching_file_matcher): Add
11202 dwarf2_per_objfile parameter and adjust calls.
11203 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
11204 adjust calls.
11205 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
11206 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
11207 adjust calls.
11208 (create_cus_from_debug_names_list): Replace objfile parameter
11209 with dwarf2_per_objfile and adjust calls.
11210 (create_cus_from_debug_names): Likewise.
11211 (dwarf2_read_debug_names): Likewise.
11212 (mapped_debug_names::namei_to_name): Adjust call.
11213 (dw2_debug_names_iterator::next): Likewise.
11214 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
11215 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
11216 (dw2_debug_names_dump): Likewise.
11217 (dw2_debug_names_expand_symtabs_for_function): Likewise.
11218 (dw2_debug_names_expand_symtabs_matching): Likewise.
11219 (dwarf2_initialize_objfile): Likewise.
11220 (dwarf2_build_psymtabs): Likewise.
11221 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
11222 this_cu.
11223 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
11224 (read_and_check_comp_unit_head): Likewise.
11225 (read_abbrev_offset): Likewise.
11226 (create_debug_type_hash_table): Likewise.
11227 (create_debug_types_hash_table): Likewise.
11228 (create_all_type_units): Replace objfile parameter with
11229 dwarf2_per_objfile.
11230 (add_type_unit): Add dwarf2_per_objfile parameter.
11231 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
11232 with dwarf2_per_objfile.
11233 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
11234 (lookup_dwp_signatured_type): Likewise.
11235 (lookup_signatured_type): Likewise.
11236 (read_cutu_die_from_dwo): Likewise.
11237 (init_tu_and_read_dwo_dies): Likewise.
11238 (init_cutu_and_read_dies): Likewise.
11239 (init_cutu_and_read_dies_no_follow): Likewise.
11240 (allocate_type_unit_groups_table): Add objfile parameter.
11241 (create_type_unit_group): Use dwarf2_per_objfile from cu.
11242 (get_type_unit_group): Likewise.
11243 (process_psymtab_comp_unit): Update call.
11244 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
11245 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
11246 (print_tu_stats): Likewise.
11247 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
11248 in void* parameter.
11249 (build_type_psymtabs): Change objfile parameter to
11250 dwarf2_per_objfile.
11251 (process_skeletonless_type_unit): Use dwarf2_per_objfile
11252 passed in void* parameter.
11253 (process_skeletonless_type_units): Change objfile parameter to
11254 dwarf2_per_objfile.
11255 (set_partial_user): Likewise.
11256 (dwarf2_build_psymtabs_hard): Likewise.
11257 (read_comp_units_from_section): Likewise.
11258 (create_all_comp_units): Likewise.
11259 (scan_partial_symbols): Update calls.
11260 (add_partial_symbol): Likewise.
11261 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
11262 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
11263 (process_queue): Add dwarf2_per_objfile parameter.
11264 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
11265 (compute_compunit_symtab_includes): Likewise.
11266 (process_cu_includes): Add dwarf2_per_objfile parameter.
11267 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
11268 (process_full_type_unit): Likewise.
11269 (process_imported_unit_die): Update call.
11270 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
11271 (read_file_scope): Likewise.
11272 (allocate_dwo_file_hash_table): Add objfile parameter.
11273 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
11274 (create_cus_hash_table): Likewise.
11275 (create_dwp_hash_table): Likewise.
11276 (create_dwo_unit_in_dwp_v1): Likewise.
11277 (create_dwp_v2_section): Likewise.
11278 (create_dwo_unit_in_dwp_v2): Likewise.
11279 (lookup_dwo_unit_in_dwp): Likewise.
11280 (try_open_dwop_file): Likewise.
11281 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
11282 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
11283 cleanup to include a reference to dwarf2_per_objfile.
11284 (open_dwp_file): Add dwarf2_per_objfile parameter.
11285 (open_and_init_dwp_file): Likewise.
11286 (get_dwp_file): Likewise.
11287 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
11288 (queue_and_load_all_dwo_tus): Update call.
11289 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
11290 data.
11291 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
11292 (dwarf2_ranges_process): Likewise.
11293 (dwarf2_get_pc_bounds): Likewise.
11294 (mark_common_block_symbol_computed): Likewise.
11295 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
11296 (dwarf2_read_abbrevs): Update call.
11297 (read_partial_die): Use dwarf2_per_objfile from cu.
11298 (find_partial_die): Likewise.
11299 (fixup_partial_die): Likewise.
11300 (read_attribute_value): Likewise.
11301 (read_indirect_string_at_offset_from): Add objfile parameter.
11302 (read_indirect_string_at_offset): Add dwarf2_per_objfile
11303 parameter.
11304 (read_indirect_string_from_dwz): Add objfile parameter.
11305 (read_indirect_string): Add objfile parameter.
11306 (read_addr_index_1): Add dwarf2_per_objfile parameter.
11307 (read_addr_index): Use dwarf2_per_objfile from cu.
11308 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
11309 call dw2_setup.
11310 (read_str_index): Use dwarf2_per_objfile from cu.
11311 (get_debug_line_section): Likewise.
11312 (read_formatted_entries): Add dwarf2_per_objfile parameter.
11313 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
11314 (new_symbol_full): Use dwarf2_per_objfile from cu.
11315 (build_error_marker_type): Likewise.
11316 (lookup_die_type): Likewise.
11317 (determine_prefix): Likewise.
11318 (follow_die_offset): Likewise.
11319 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
11320 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
11321 (dwarf2_fetch_die_type_sect_off): Likewise.
11322 (dwarf2_get_die_type): Likewise.
11323 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
11324 (get_signatured_type): Likewise.
11325 (get_DW_AT_signature_type): Likewise.
11326 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
11327 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
11328 (cu_debug_loc_section): Likewise.
11329 (fill_in_loclist_baton): Likewise.
11330 (dwarf2_symbol_mark_computed): Likewise.
11331 (dwarf2_find_containing_comp_unit): Change objfile parameter to
11332 dwarf2_per_objfile.
11333 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
11334 parameter.
11335 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11336 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
11337 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
11338 (set_die_type): Use dwarf2_free_objfile from cu.
11339 (get_die_type_at_offset): Likewise.
11340 (dwarf2_per_objfile_free): Don't assign global variable.
11341 (debug_names) <constructor>: Add dwarf2_per_objfile
11342 parameter, update m_debugstrlookup construction.
11343 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
11344 parameter.
11345 <m_dwarf2_per_objfile>: New field.
11346 <lookup>: Use m_dwarf2_per_objfile.
11347 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
11348 (psyms_seen_size): Likewise.
11349 (write_gdbindex): Replace objfile parameter with
11350 dwarf2_per_objfile.
11351 (write_debug_names): Likewise.
11352 (write_psymtabs_to_index): Likewise.
11353 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
11354 calls.
11355
11356 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11357
11358 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
11359 <dwarf2_per_objfile>: New field.
11360 (struct dwarf2_per_cu_data) <objfile>: Remove.
11361 <dwarf2_per_objfile>: New field.
11362 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
11363 of objfile.
11364 (create_signatured_type_table_from_index): Likewise.
11365 (create_debug_type_hash_table): Likewise.
11366 (fill_in_sig_entry_from_dwo_entry): Likewise.
11367 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
11368 (create_type_unit_group): Assign dwarf2_per_objfile instead of
11369 objfile.
11370 (create_partial_symtab): Access objfile through
11371 dwarf2_per_objfile.
11372 (process_psymtab_comp_unit_reader): Likewise.
11373 (read_comp_units_from_section): Likewise.
11374 (scan_partial_symbols): Likewise.
11375 (add_partial_symbol): Likewise.
11376 (add_partial_subprogram): Likewise.
11377 (peek_die_abbrev): Likewise.
11378 (fixup_go_packaging): Likewise.
11379 (process_full_comp_unit): Likewise.
11380 (process_full_type_unit): Likewise.
11381 (process_imported_unit_die): Likewise.
11382 (dwarf2_compute_name): Likewise.
11383 (dwarf2_physname): Likewise.
11384 (read_import_statement): Likewise.
11385 (create_cus_hash_table): Assign dwarf2_physname instead of
11386 objfile.
11387 (read_func_scope): Access objfile through dwarf2_per_objfile.
11388 (read_lexical_block_scope): Likewise.
11389 (read_call_site_scope): Likewise.
11390 (read_variable): Likewise.
11391 (dwarf2_rnglists_process): Likewise.
11392 (dwarf2_ranges_process): Likewise.
11393 (dwarf2_ranges_read): Likewise.
11394 (dwarf2_record_block_ranges): Likewise.
11395 (dwarf2_add_field): Likewise.
11396 (dwarf2_add_member_fn): Likewise.
11397 (read_structure_type): Likewise.
11398 (process_structure_scope): Likewise.
11399 (read_enumeration_type): Likewise.
11400 (read_array_type): Likewise.
11401 (read_common_block): Likewise.
11402 (read_namespace_type): Likewise.
11403 (read_namespace): Likewise.
11404 (read_module_type): Likewise.
11405 (read_tag_pointer_type): Likewise.
11406 (read_tag_ptr_to_member_type): Likewise.
11407 (read_tag_string_type): Likewise.
11408 (read_subroutine_type): Likewise.
11409 (read_typedef): Likewise.
11410 (read_base_type): Likewise.
11411 (attr_to_dynamic_prop): Likewise.
11412 (read_subrange_type): Likewise.
11413 (read_unspecified_type): Likewise.
11414 (load_partial_dies): Likewise.
11415 (read_partial_die): Likewise.
11416 (find_partial_die): Likewise.
11417 (guess_partial_die_structure_name): Likewise.
11418 (fixup_partial_die): Likewise.
11419 (read_attribute_value): Likewise.
11420 (read_addr_index_from_leb128): Likewise.
11421 (dwarf2_read_addr_index): Likewise.
11422 (dwarf2_string_attr): Likewise.
11423 (lnp_state_machine::check_line_address): Likewise.
11424 (dwarf_decode_lines_1): Likewise.
11425 (dwarf_decode_lines): Likewise.
11426 (dwarf2_start_symtab): Likewise.
11427 (var_decode_location): Likewise.
11428 (new_symbol_full): Likewise.
11429 (dwarf2_const_value_data): Likewise.
11430 (dwarf2_const_value_attr): Likewise.
11431 (dwarf2_const_value): Likewise.
11432 (die_type): Likewise.
11433 (die_containing_type): Likewise.
11434 (lookup_die_type): Likewise.
11435 (guess_full_die_structure_name): Likewise.
11436 (anonymous_struct_prefix): Likewise.
11437 (dwarf2_name): Likewise.
11438 (follow_die_ref_or_sig): Likewise.
11439 (follow_die_offset): Likewise.
11440 (follow_die_ref): Likewise.
11441 (dwarf2_fetch_die_loc_sect_off): Likewise.
11442 (dwarf2_fetch_constant_bytes): Likewise.
11443 (dwarf2_fetch_die_type_sect_off): Likewise.
11444 (dwarf2_get_die_type): Likewise.
11445 (follow_die_sig): Likewise.
11446 (decode_locdesc): Likewise.
11447 (dwarf2_per_cu_objfile): Likewise.
11448 (dwarf2_per_cu_text_offset): Likewise.
11449 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
11450 objfile.
11451 (set_die_type): Access objfile through
11452 dwarf2_per_objfile.
11453
11454 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11455
11456 * valprint.c (converted_character_d): Remove typedef.
11457 (DEF_VEC_O (converted_character_d)): Remove.
11458 (count_next_character): Use std::vector.
11459 (print_converted_chars_to_obstack): Likewise.
11460 (generic_printstr): Likewise.
11461
11462 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11463
11464 * xml-support.h (struct gdb_xml_value): Add constructor.
11465 <value>: Change type to unique_xmalloc_ptr.
11466 (gdb_xml_value_s): Remove typedef.
11467 (DEF_VEC_O (gdb_xml_value_s)): Remove.
11468 (gdb_xml_element_start_handler): Change parameter type to
11469 std::vector.
11470 (xml_find_attribute): Likewise.
11471 * xml-support.c (xml_find_attribute): Change parameter type to
11472 std::vector and adjust.
11473 (gdb_xml_values_cleanup): Remove.
11474 (gdb_xml_parser::start_element): Adjust to std::vector.
11475 (xinclude_start_include): Change paraeter type to std::vector
11476 and adjust.
11477 * btrace.c (check_xml_btrace_version): Likewise.
11478 (parse_xml_btrace_block): Likewise.
11479 (parse_xml_btrace_pt_config_cpu): Likewise.
11480 (parse_xml_btrace_pt): Likewise.
11481 (parse_xml_btrace_conf_bts): Likewise.
11482 (parse_xml_btrace_conf_pt): Likewise.
11483 * memory-map.c (memory_map_start_memory): Likewise.
11484 (memory_map_start_property): Likewise.
11485 * osdata.c (osdata_start_osdata): Likewise.
11486 (osdata_start_item): Likewise.
11487 (osdata_start_column): Likewise.
11488 * remote.c (start_thread): Likewise.
11489 * solib-aix.c (library_list_start_library): Likewise.
11490 (library_list_start_list): Likewise.
11491 * solib-svr4.c (library_list_start_library): Likewise.
11492 (svr4_library_list_start_list): Likewise.
11493 * solib-target.c (library_list_start_segment): Likewise.
11494 (library_list_start_section): Likewise.
11495 (library_list_start_library): Likewise.
11496 (library_list_start_list): Likewise.
11497 * tracepoint.c (traceframe_info_start_memory): Likewise.
11498 (traceframe_info_start_tvar): Likewise.
11499 * xml-syscall.c (syscall_start_syscall): Likewise.
11500 * xml-tdesc.c (tdesc_start_target): Likewise.
11501 (tdesc_start_feature): Likewise.
11502 (tdesc_start_reg): Likewise.
11503 (tdesc_start_union): Likewise.
11504 (tdesc_start_struct): Likewise.
11505 (tdesc_start_flags): Likewise.
11506 (tdesc_start_enum): Likewise.
11507 (tdesc_start_field): Likewise.
11508 (tdesc_start_enum_value): Likewise.
11509 (tdesc_start_vector): Likewise.
11510
11511 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11512
11513 * extension.h (struct xmethod_worker) <clone>: Remove.
11514 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
11515 Remove.
11516 (python_xmethod_worker::clone): Remove.
11517 * valops.c (find_overload_match): Use std::move instead of
11518 clone.
11519
11520 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11521
11522 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
11523 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
11524 <free_xmethod_worker_data>: Remove.
11525 <get_matching_xmethod_workers>: Chance VEC to std::vector.
11526 <get_xmethod_arg_types>: Remove.
11527 <get_xmethod_result_type>: Remove.
11528 <invoke_xmethod>: Remove.
11529 * extension.c (new_xmethod_worker): Remove.
11530 (clone_xmethod_worker): Remove.
11531 (get_matching_xmethod_workers): Return void, pass std::vector by
11532 pointer.
11533 (get_xmethod_arg_types): Rename to...
11534 (xmethod_worker::get_arg_types): ... this, and adjust.
11535 (get_xmethod_result_type): Rename to...
11536 (xmethod_worker::get_result_type): ... this, and adjust.
11537 (invoke_xmethod): Remove.
11538 (free_xmethod_worker): Remove.
11539 (free_xmethod_worker_vec): Remove.
11540 * extension.h (enum ext_lang_rc): Move here from
11541 extension-priv.h.
11542 (struct xmethod_worker): Add constructor and destructor.
11543 <data>: Remove.
11544 <value>: Remove.
11545 <invoke, clone, do_get_result_type, do_get_arg_types>: New
11546 virtual pure methods.
11547 <get_arg_types, get_result_type>: New methods.
11548 (xmethod_worker_ptr): Remove typedef.
11549 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
11550 (xmethod_worker_vec): Remove typedef.
11551 (xmethod_worker_up): New typedef.
11552 (invoke_xmethod): Remove.
11553 (clone_xmethod_worker): Remove.
11554 (free_xmethod_worker): Remove.
11555 (free_xmethod_worker_vec): Remove.
11556 (get_xmethod_arg_types): Remove.
11557 (get_xmethod_result_type): Remove.
11558 * valops.c (find_method_list): Use std::vector, don't use
11559 intermediate vector.
11560 (value_find_oload_method_list): Use std::vector.
11561 (find_overload_match): Use std::vector.
11562 (find_oload_champ): Use std::vector.
11563 * value.c (value_free): Use operator delete.
11564 (value_of_xmethod): Rename to...
11565 (value_from_xmethod): ... this. Don't assign
11566 xmethod_worker::value, take rvalue-reference.
11567 (result_type_of_xmethod): Adjust.
11568 (call_xmethod): Adjust.
11569 * value.h: Include extension.h.
11570 (struct xmethod_worker): Don't forward-declare.
11571 (value_of_xmethod): Rename to...
11572 (value_from_xmethod): ... this, take rvalue-reference.
11573 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
11574 (struct python_xmethod_worker): ... this, add constructor and
11575 destructor.
11576 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
11577 (gdbpy_free_xmethod_worker_data): Rename to...
11578 (python_xmethod_worker::~python_xmethod_worker): ... this and
11579 adjust.
11580 (gdbpy_clone_xmethod_worker_data): Rename to...
11581 (python_xmethod_worker::clone): ... this and adjust.
11582 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
11583 temporary vector.
11584 (gdbpy_get_xmethod_arg_types): Rename to...
11585 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
11586 (gdbpy_get_xmethod_result_type): Rename to...
11587 (python_xmethod_worker::do_get_result_type): ... this and
11588 adjust.
11589 (gdbpy_invoke_xmethod): Rename to...
11590 (python_xmethod_worker::invoke): ... this and adjust.
11591 (new_python_xmethod_worker): Rename to...
11592 (python_xmethod_worker::python_xmethod_worker): ... this and
11593 adjust.
11594 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
11595 Remove.
11596 (gdbpy_free_xmethod_worker_data): Remove.
11597 (gdbpy_get_matching_xmethod_workers): Use std::vector.
11598 (gdbpy_get_xmethod_arg_types): Remove.
11599 (gdbpy_get_xmethod_result_type): Remove.
11600 (gdbpy_invoke_xmethod): Remove.
11601 * python/python.c (python_extension_ops): Remove obsolete
11602 callbacks.
11603
11604 2018-01-05 Pedro Alves <palves@redhat.com>
11605
11606 PR gdb/18653
11607 * common/signals-state-save-restore.c
11608 (save_original_signals_state): New parameter 'quiet'. Warn if we
11609 find a custom handler preinstalled, instead of internal erroring.
11610 But only warn if !quiet.
11611 * common/signals-state-save-restore.h
11612 (save_original_signals_state): New parameter 'quiet'.
11613 * main.c (captured_main_1): Move save_original_signals_state call
11614 after option handling, and pass QUIET.
11615
11616 2018-01-05 Pedro Alves <palves@redhat.com>
11617
11618 * spu-tdep.c (spu_catch_start): Pass
11619 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
11620
11621 2018-01-05 Pedro Alves <palves@redhat.com>
11622
11623 PR gdb/22670
11624 * ada-lang.c (literal_symbol_name_matcher): New function.
11625 (ada_get_symbol_name_matcher): Use it for
11626 symbol_name_match_type::SEARCH_NAME.
11627 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
11628 it down instead of assuming symbol_name_match_type::FULL.
11629 * block.h (block_lookup_symbol): New parameter 'match_type'.
11630 * c-valprint.c (print_unpacked_pointer): Use
11631 lookup_symbol_search_name instead of lookup_symbol.
11632 * compile/compile-object-load.c (get_out_value_type): Pass down
11633 symbol_name_match_type::SEARCH_NAME.
11634 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
11635 symbol_name_match_type::FULL.
11636 * cp-support.c (cp_get_symbol_name_matcher): Handle
11637 symbol_name_match_type::SEARCH_NAME.
11638 * infrun.c (insert_exception_resume_breakpoint): Use
11639 lookup_symbol_search_name.
11640 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
11641 * psymtab.c (maintenance_check_psymtabs): Use
11642 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
11643 * stack.c (print_frame_args): Use lookup_symbol_search_name and
11644 SYMBOL_SEARCH_NAME.
11645 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
11646 if symbol_name_match_type::SEARCH_NAME.
11647 (lookup_symbol_in_language): Pass down
11648 symbol_name_match_type::FULL.
11649 (lookup_symbol_search_name): New.
11650 (lookup_language_this): Pass down
11651 symbol_name_match_type::SEARCH_NAME.
11652 (lookup_symbol_aux, lookup_local_symbol): New parameter
11653 'match_type'. Pass it down.
11654 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
11655 (lookup_symbol_search_name): New declaration.
11656 (lookup_symbol_in_block): New 'match_type' parameter.
11657
11658 2018-01-05 Pedro Alves <palves@redhat.com>
11659
11660 PR gdb/22670
11661 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
11662 ada_lookup_symbol.
11663 (ada_lookup_symbol): Reimplement in terms of
11664 ada_lookup_symbol_list, bits factored out from
11665 ada_lookup_encoded_symbol.
11666
11667 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11668
11669 * ada-exp.y (write_object_renaming): When subscripting an array
11670 using a symbol as the index, pass the block in call to
11671 ada_lookup_encoded_symbol when looking that symbol up.
11672
11673 2018-01-05 Jerome Guitton <guitton@adacore.com>
11674
11675 * ada-lang.c (ada_array_length): Use ada_index_type instead of
11676 TYPE_INDEX_TYPE.
11677
11678 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11679
11680 * ada-lang.c (ada_to_fixed_value_create): Add handling of
11681 the case where VALUE_LVAL (val0) is not lval_memory.
11682
11683 2018-01-05 Xavier Roirand <roirand@adacore.com>
11684
11685 * ada-valprint.c (print_optional_low_bound): Handle
11686 character-indexed array printing like boolean-indexed array
11687 printing.
11688
11689 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11690
11691 * NEWS: Create a new section for the next release branch.
11692 Rename the section of the current branch, now that it has
11693 been cut.
11694
11695 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11696
11697 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
11698 * version.in: Bump version to 8.1.50.DATE-git.
11699
11700 2018-01-03 Xavier Roirand <roirand@adacore.com>
11701
11702 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
11703 Add field.
11704 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
11705 Add field.
11706 (default_exception_support_info) <catch_handlers_sym>: Add field.
11707 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
11708 (ada_exception_name_addr_1): Add "catch handlers" handling.
11709 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
11710 Update all callers.
11711 (create_excep_cond_exprs) <ex>: Add parameter.
11712 (re_set_exception): Update create_excep_cond_exprs call.
11713 (print_it_exception, print_one_exception, print_mention_exception)
11714 (print_recreate_exception): Add "catch handler" handling.
11715 (allocate_location_catch_handlers, re_set_catch_handlers)
11716 (check_status_catch_handlers, print_it_catch_handlers)
11717 (print_one_catch_handlers, print_mention_catch_handlers)
11718 (print_recreate_catch_handlers): New function.
11719 (catch_handlers_breakpoint_ops): New variable.
11720 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
11721 Add parameter. Add "catch handler" handling.
11722 (ada_exception_sym_name, ada_exception_breakpoint_ops):
11723 Add "catch handler" handling.
11724 (ada_exception_catchpoint_cond_string): Add "catch handler"
11725 handling.
11726 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
11727 call.
11728 (catch_ada_handlers_command): New function.
11729 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
11730 operations structure.
11731 (_initialize_ada_language): Add "catch handlers" command entry.
11732 * NEWS: Document "catch handlers" feature.
11733
11734 2018-01-02 Joel Brobecker <brobecker@adacore.com>
11735
11736 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
11737 account when creating the array type of the slice.
11738 (ada_value_slice): Likewise.
11739
11740 2018-01-02 Joel Brobecker <brobecker@adacore.com>
11741
11742 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
11743 New enum value.
11744 (create_array_type_with_stride): Add byte_stride_prop parameter.
11745 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
11746 New parameter. Update all callers in this file.
11747 (array_type_has_dynamic_stride): New function.
11748 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
11749 of arrays with dynamic byte strides.
11750 * dwarf2read.c (read_array_type): Add support for dynamic
11751 DW_AT_byte_stride attributes.
11752
11753 2018-01-02 Joel Brobecker <brobecker@adacore.com>
11754
11755 * dwarf2read.c (read_unspecified_type): Treat
11756 DW_TAG_enumeration_type DIEs from Ada units as stubs.
11757
11758 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11759
11760 Update copyright year range in all GDB files.
11761
11762 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11763
11764 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
11765 and gdb/testsuite/gdb.base/step-line.c.
11766
11767 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11768
11769 * copyright.py (main): Dump the contents of
11770 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
11771 even if BY_HAND is empty.
11772
11773 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11774
11775 * top.c (print_gdb_version): Update Copyright year in version
11776 message.
11777
11778 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11779
11780 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
11781
11782 For older changes see ChangeLog-2017.
11783 \f
11784 Local Variables:
11785 mode: change-log
11786 left-margin: 8
11787 fill-column: 74
11788 version-control: never
11789 coding: utf-8
11790 End: