Don't throw Scheme exceptions with live std::vector objects
[binutils-gdb.git] / gdb / ChangeLog
1 2018-08-21 Pedro Alves <palves@redhat.com>
2
3 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
4 out from gdbscm_parse_function_args.
5 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
6 gdbscm_parse_function_args_1.
7
8 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
9
10 PR gdb/17816
11 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
12 operator.
13
14 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
15
16 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
17
18 2018-08-19 Michael Spang <spang@google.com>
19
20 PR gdb/11786
21 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
22 for PT_TLS segments.
23
24 2018-08-18 Kevin Buettner <kevinb@redhat.com>
25
26 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
27 dwarf_variable_value.
28 * dwarf2-frame.c (class dwarf_expr_executor):
29 Add override for dwarf_variable_value.
30 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
31 (class symbol_needs_eval_context): Likewise.
32 (indirect_synthetic_pointer): Add forward declaration.
33 (sect_variable_value): New function.
34 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
35 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
36 for DW_OP_GNU_variable_value.
37
38 2018-08-16 Tom Tromey <tom@tromey.com>
39
40 * top.c (read_command_file): Update.
41 (command_line_input): Remove "repeat" argument.
42 * ada-lang.c (get_selections): Update.
43 * linespec.c (decode_line_2): Update.
44 * defs.h (command_line_input): Remove argument.
45 * cli/cli-script.c (read_next_line): Update.
46 * python/py-gdb-readline.c: Update.
47
48 2018-08-17 Tom Tromey <tom@tromey.com>
49
50 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
51 command_line_input.
52
53 2018-08-15 Tom Tromey <tom@tromey.com>
54
55 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
56
57 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
58
59 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
60 If used, use find_pc_partial_function to find address range
61 to disassemble.
62 * mi/mi-main.c (mi_cmd_list_features): Report
63 "data-disassemble-a-option" feature.
64 * NEWS: Mention new -data-disassemble option -a.
65
66 2018-08-13 Tom Tromey <tom@tromey.com>
67
68 * common/common-defs.h (_FORTIFY_SOURCE): Define.
69
70 2018-08-13 Alan Hayward <alan.hayward@arm.com>
71
72 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
73 (aarch64_linux_collect_sve_regset): Likewise.
74 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
75 * regcache.h (regcache_map_entry_size): New function.
76
77 2018-08-13 Alan Hayward <alan.hayward@arm.com>
78
79 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
80 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
81 (SVE_HEADER_VL_LENGTH): Likewise.
82 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
83 (SVE_HEADER_FLAGS_LENGTH): Likewise.
84 (SVE_HEADER_RESERVED_LENGTH): Likewise.
85 (SVE_HEADER_SIZE_OFFSET): Likewise.
86 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
87 (SVE_HEADER_VL_OFFSET): Likewise.
88 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
89 (SVE_HEADER_FLAGS_OFFSET): Likewise.
90 (SVE_HEADER_RESERVED_OFFSET): Likewise.
91 (SVE_HEADER_SIZE): Likewise.
92 (aarch64_linux_core_read_vq): Add function.
93 (aarch64_linux_core_read_description): Check for SVE section.
94
95 2018-08-13 Alan Hayward <alan.hayward@arm.com>
96
97 * aarch64-fbsd-tdep.c
98 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
99 collect_size.
100 * aarch64-linux-tdep.c
101 (aarch64_linux_iterate_over_regset_sections): Likewise.
102 * alpha-linux-tdep.c
103 (alpha_linux_iterate_over_regset_sections):
104 * alpha-nbsd-tdep.c
105 (alphanbsd_iterate_over_regset_sections): Likewise.
106 * amd64-fbsd-tdep.c
107 (amd64fbsd_iterate_over_regset_sections): Likewise.
108 * amd64-linux-tdep.c
109 (amd64_linux_iterate_over_regset_sections): Likewise.
110 * arm-bsd-tdep.c
111 (armbsd_iterate_over_regset_sections): Likewise.
112 * arm-fbsd-tdep.c
113 (arm_fbsd_iterate_over_regset_sections): Likewise.
114 * arm-linux-tdep.c
115 (arm_linux_iterate_over_regset_sections): Likewise.
116 * corelow.c (get_core_registers_cb): Likewise.
117 (core_target::fetch_registers): Likewise.
118 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
119 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
120 * gdbarch.h (void): Regenerate.
121 * gdbarch.sh: Add supply_size and collect_size.
122 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
123 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
124 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
125 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
126 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
127 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
128 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
129 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
130 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
131 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
132 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
133 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
134 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
135 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
136 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
137 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
138 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
139 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
140 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
141 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
142 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
143 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
144 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
145 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
146 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
147 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
148 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
149 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
150 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
151 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
152
153 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
154
155 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
156 with string_printf.
157
158 2018-08-10 Keith Seitz <keiths@redhat.com>
159
160 * compile/compile-c-support.c (add_code_header, add_code_footer):
161 Move into policy class.
162 (c_push_user_expression, pop_user_expression_nop)
163 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
164 (compile_program): New host class.
165 (c_compile_program): New typedef.
166 (c_compute_porgram): Use c_compile_program.
167
168 2018-08-10 Keith Seitz <keiths@redhat.com>
169
170 * compile/compile-internal.h (compile_instance::~compile_instance):
171 Remove calls to htab_delete.
172 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
173 * compile.c (compile_instance::compile_instance): Initialize
174 htab unique pointers.
175 (compile_instance::get_cached_type, compile_instance::insert_type)
176 (compile_instance::error_symbol_once): Update for unique_ptr.
177
178 2018-08-10 Keith Seitz <keiths@redhat.com>
179
180 * compile/compile-c-symbols.c (struct symbol_error)
181 (hash_symbol_error, eq_symbol_error, del_symbol_error)
182 (compile_instance::insert_symbol_error)
183 (compile_instance::error_symbol_once): Move to ...
184 * compile/compile.c: ... here.
185
186 2018-08-10 Keith Seitz <keiths@redhat.com>
187
188 * compile/compile-c-support.c (c_get_compile_context): Use `new'
189 instead of `new_compile_instance'.
190 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
191 Update description.
192 If the symbol error map is not initialized, create it.
193 (generate_c_for_for_one_symbol): Do not check/initialize
194 the symbol error map.
195 * compile/compile-c-types.c (compile_c_instance): Make a class.
196 Update all callers.
197 (compile_instance::compile_instance): Initialize the type cache.
198 (get_cached_type): New function.
199 (insert_type): Update description.
200 (compile_c_instance::m_default_cflags): Define.
201 (convert_type): Update description. Use get_cached_type.
202 (delete_instance): Moved to destructor.
203 (new_compile_instance): Moved to constructor.
204 * compile/compile-c.h (compile_c_instance): Make class inheriting
205 from compile_instance.
206 <base>: Remove field.
207 <type_map, symbol_err_map>: Move to base class.
208 <c_plugin>: Rename to `m_plugin' and remove pointer type.
209 * compile/compile-internal.h (compile_instance): Make class.
210 <type_map_t, symbol_err_map_t>: Define.
211 <fe>: Rename to `m_gcc_fe'.
212 <scope, block, gcc_target_options>: Add `m_' prefix.
213 <m_type_map, m_symbol_err_map>: New fields, moved from
214 compile_c_instance.
215 <destroy>: Remove.
216 (convert_type, new_compile_instance): Remove.
217 * compile/compile.c (cleanup_compile_instance): Remove.
218 (compile_to_object): Use unique_ptr to eliminate cleanups.
219 (compile_instance::set_print_callback, compile_instance::version)
220 (compile_instance::set_verbose)
221 (compile_instance::set_driver_filename)
222 (compile_instance::set_triplet_regexp)
223 (compile_instance::set_arguments)
224 (compile_instance::set_source_file)
225 (compile_instance::compile): Define.
226
227 2018-08-10 Keith Seitz <keiths@redhat.com>
228
229 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
230 * compile/compile-c-types.c: Define GCC_METHODN macros and include
231 gcc-c-fe.def to define C plugin.
232 (delete_instance): Delete `c_plugin'.
233 (new_compile_instance): Initialize `c_plugin'.
234 * compile/compile-c.h: Include gcc_c_plugin.h.
235 (struct compile_c_instance) <c_plugin>: New member.
236 * gcc-c-plugin.h: New file.
237 Update all callers with API change.
238
239 2018-08-10 Keith Seitz <keiths@redhat.com>
240
241 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
242 (HFILES_NO_SRCDIR): ... to here.
243 Add compile-internal.h and compile-c.h.
244 * compile/compile-c-support.c: Include compile-c.h.
245 * compile/compile-c-symbols.c: Include compile-c.h.
246 (generate_c_for_variable_locations): Update comment.
247 * compile/compile-c-types.c: Include compile-c.h.
248 * compile/compile-c.h: New file -- moved C language declarations
249 from other files here.
250 * compile/compile-internal.h: Do not include hashtab.h or
251 common/enum-flags.h.
252 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
253 (gcc_convert_symbol, gcc_symbol_address)
254 (generate_c_for_variable_locations, c_get_mode_for_size)
255 (c_get_range_decl_name): Definitions moved to compile-c.h.
256 * compile/compile-loc2c.c: Include compile-c.h.
257
258 2018-08-10 Keith Seitz <keiths@redhat.com>
259
260 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
261 (c_symbol_substitution_name): ... this.
262 Update all callers.
263
264 2018-08-10 Keith Seitz <keiths@redhat.com>
265
266 * compile/compile-c-support.c (c_compute_program): Use
267 unique_xmalloc_ptr to eliminate cleanup.
268 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
269 Return a unique_xmalloc_ptr and eliminate cleanup.
270 * compile/compile-internal.h (generate_c_for_variable_locations):
271 Return unique_xmalloc_ptr and update description.
272
273 2018-08-10 Alan Hayward <alan.hayward@arm.com>
274
275 * corelow.c (core_target::get_core_register_section): Rename
276 min_size to section_min_size.
277
278 2018-08-09 Jim Wilson <jimw@sifive.com>
279
280 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
281 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
282 * NEWS: Mention new GNU/Linux RISC-V target.
283 * configure.host: Add riscv*-*-linux*.
284 * configure.nat: Add riscv*.
285 * configure.tgt: Add riscv*-*-linux*.
286 * riscv-linux-nat.c: New file.
287 * riscv-linux-tdep.c: New file.
288
289 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
290
291 * infrun.c (resume): Make static, add forward declaration.
292 (proceed): Update header comment.
293 * infrun.h (resume): Delete declaration.
294
295 2018-08-09 Tom Tromey <tom@tromey.com>
296
297 * riscv-tdep.h: Minor formatting fixes.
298
299 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
300
301 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
302 * dwarf-index-cache.c (create_dir_and_check): Likewise.
303 (test_mkdir_recursive): Likewise.
304 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
305
306 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
307
308 * valarith.c (value_subscripted_rvalue): If an array is not in
309 memory, and we don't know the upper bound, then we can't know that
310 the requested element exists or not.
311
312 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
313
314 * target.c (str_comma_list_concat_elem): Fix typo in comment.
315 (target_options_to_string): Add comment.
316
317 2018-08-08 Tom Tromey <tom@tromey.com>
318
319 * unittests/scoped_mmap-selftests.c: Check result of "write".
320
321 2018-08-08 Jim Wilson <jimw@sifive.com>
322
323 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
324 (decode_register_index_short): New.
325 (decode_j_type_insn, decode_cj_type_insn): New.
326 (decode_b_type_insn, decode_cb_type_insn): New.
327 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
328 local xlen. Check xlen when decoding ambiguous compressed insns. In
329 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
330 is_c_sw_insn instead of is_sw_insn.
331 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
332 (riscv_software_single_step): New.
333 * riscv-tdep.h (riscv_software_single_step): Declare.
334
335 * riscv-tdep.c (riscv_isa_xlen): Drop static.
336 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
337
338 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
339
340 PR gdb/18050:
341 * target.c (dispose_inferior): Don't dispose of inferiors that are
342 already killed.
343
344 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
345
346 * remote.c (remote_target::download_tracepoint): Change char* to
347 const char*.
348
349 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
350
351 * target.h (target_options_to_string): Return an std::string.
352 * target.c (str_comma_list_concat_elem): Return void, use
353 std::string.
354 (do_option): Likewise.
355 (target_options_to_string): Return an std::string.
356 * linux-nat.c (linux_nat_target::wait): Adjust.
357 * target-debug.h (target_debug_print_options): Adjust.
358
359 2018-08-07 Tom Tromey <tom@tromey.com>
360
361 * Makefile.in (CPPFLAGS): New variable.
362 (INTERNAL_CPPFLAGS): Use it.
363
364 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
365
366 * NEWS: Mention the index cache.
367
368 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
369
370 * common/pathstuff.h (get_standard_cache_dir): New.
371 * common/pathstuff.c (get_standard_cache_dir): New.
372 * build-id.h (build_id_to_string): New.
373 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
374 DEBUG_STR_SUFFIX): Move to here.
375 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
376 DEBUG_STR_SUFFIX): Move from there.
377 (write_psymtabs_to_index): Make non-static, add basename
378 parameter. Write to temporary files, rename when done.
379 (save_gdb_index_command): Adjust call to
380 write_psymtabs_to_index.
381 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
382 field.
383 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
384 (get_gdb_index_contents_from_cache): New.
385 (get_gdb_index_contents_from_cache_dwz): New.
386 (dwarf2_initialize_objfile): Read index from cache.
387 (dwarf2_build_psymtabs): Save to index.
388 * dwarf-index-cache.h: New file.
389 * dwarf-index-cache.c: New file.
390 * dwarf-index-write.h: New file.
391
392 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
393
394 * gnulib/aclocal.m4: Re-generate.
395 * gnulib/config.in: Re-generate.
396 * gnulib/configure: Re-generate.
397 * gnulib/import/Makefile.am: Re-generate.
398 * gnulib/import/Makefile.in: Re-generate.
399 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
400 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
401 * gnulib/import/m4/mkdir.m4: New file.
402 * gnulib/import/mkdir.c: New file.
403 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
404 module.
405
406 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
407
408 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
409 * common/scoped_mmap.c: New file.
410 * common/scoped_mmap.h (destroy): New method.
411 (~scoped_mmap, reset): Use destroy.
412 (scoped_mmap): New move constructor.
413 (mmap_file): New declaration.
414 * unittests/scoped_mmap-selftests.c (test_normal,
415 test_invalid_filename, run_tests): New functions.
416 (_initialize_scoped_mmap_selftests): Register selftest.
417
418 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
419
420 * dwarf2read.c (read_gdb_index_from_section): Rename to...
421 (read_gdb_index_from_buffer): ... this. Remove section
422 parameter, add buffer parameter.
423 (get_gdb_index_contents_ftype,
424 get_gdb_index_contents_dwz_ftype): New typedefs.
425 (dwarf2_read_gdb_index): Add callback parameters to get the
426 index contents.
427 (get_gdb_index_contents_from_section): New.
428 (dwarf2_initialize_objfile): Update call to
429 dwarf2_read_gdb_index.
430
431 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
432
433 * common/filestuff.h (gdb_fopen_cloexec): New overload.
434 (gdb_open_cloexec): Likewise.
435 * nat/linux-osdata.c (command_from_pid): Use string_printf.
436 (commandline_from_pid): Likewise.
437 (linux_xfer_osdata_threads): Likewise.
438 (linux_xfer_osdata_fds): Likewise.
439 * ada-lang.c (is_package_name): Likewise.
440 * auxv.c (procfs_xfer_auxv): Likewise.
441 * breakpoint.c (print_one_breakpoint_location): Use
442 uiout::field_fmt.
443 (print_one_catch_solib): Use string_printf.
444 * coff-pe-read.c (add_pe_exported_sym): Likewise.
445 (add_pe_forwarded_sym): Likewise.
446 * dwarf2read.c (create_type_unit_group): Likewise.
447 (build_error_marker_type): Likewise.
448 * infcall.c (get_function_name): Likewise.
449 * valprint.c (print_converted_chars_to_obstack): Likewise.
450 * xtensa-tdep.c (xtensa_register_type): Likewise.
451
452 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
453
454 * remote.c (remote_target::download_tracepoint): Fix format
455 string errors.
456
457 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
458
459 * tracefile.c: Include common/byte-vector.h.
460 (trace_save): Change type of buf to gdb::byte_vector. Initialize
461 with trace_regblock_size if needed. Update uses of buf.
462
463 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
464
465 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
466 std::vector<unsigned char>.
467 * tracepoint.c (collection_list::collection_list): Remove
468 m_regs_mask initializer from initializer list. Resize
469 m_regs_mask using the largest remote register number.
470 (collection_list::add_remote_register): Remove size check on
471 m_regs_mask. Use at to access element.
472 (collection_list::stringify): Change type of temp_buf to
473 gdb::char_vector. Update uses of temp_buf. Resize if needed to
474 stringify the register mask. Use pack_hex_byte for the register
475 mask.
476
477 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
478
479 * tracepoint.h (class collection_list) <add_register>: Remove.
480 <add_remote_register, add_ax_registers, add_local_register>:
481 Declare.
482 <add_memrange>: Add scope parameter.
483 * tracepoint.c (encode_actions_1): Likewise.
484 (collection_list::add_register): Rename to ...
485 (collection_list::add_remote_register): ... this. Update
486 comment.
487 (collection_list::add_ax_registers, add_local_register): New
488 methods.
489 (collection_list::add_memrange): Add scope parameter. Call
490 add_local_register instead of add_register.
491 (finalize_tracepoint_aexpr): New function.
492 (collection_list::collect_symbol): Update calls to add_memrange.
493 Call add_local_register instead of add_register. Call
494 add_ax_registers. Call finalize_tracepoint_aexpr.
495 (encode_actions_1): Get remote regnos for $reg action. Call
496 add_remote_register, add_ax_registers, and add_local_register.
497 Update call to add_memrange. Call finalize_tracepoint_aexpr.
498 (validate_actionline): Call finalize_tracepoint_aexpr.
499
500 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
501
502 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
503 Replace array buf with gdb::char_vector buf, of size
504 get_remote_packet_size (). Replace references to buf and
505 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
506 and xsnprintf with snprintf. Raise errors if the buffer is too
507 small.
508
509 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
510
511 * remote.c (remote_target::download_tracepoint): Fix the has_more
512 predicate in the QTDP action list iteration.
513
514 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
515
516 * remote.c (remote_target::download_tracepoint): Fix indentation
517 in for block.
518
519 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
520
521 * proc-api.c (_initialize_proc_api): Remove c, unused.
522 * procfs.c (procfs_init_inferior): Remove signals, unused.
523 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
524 unused.
525
526 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
527 Andrew Burgess <andrew.burgess@embecosm.com>
528
529 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
530 'W_STOPCODE (0)' as this could be ambiguous.
531
532 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
533
534 * ser-tcp.c (net_open): Fix thinko when deciding whether to
535 disable TCP's Nagle algorithm (use "ai_protocol" instead of
536 "ai_socktype").
537
538 2018-08-02 Tom Tromey <tom@tromey.com>
539
540 PR symtab/16842.
541 * dwarf2read.c (read_func_scope): Set symtab on template parameter
542 symbols.
543 (process_structure_scope): Likewise.
544
545 2018-08-02 Xavier Roirand <roirand@adacore.com>
546
547 PR gdb/22629:
548 * darwin-nat.c (darwin_kill_inferior): Fix handling of
549 kill inferior.
550
551 2018-08-02 Tom Tromey <tom@tromey.com>
552
553 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
554 (darwin_suspend_inferior, darwin_resume_inferior)
555 (darwin_decode_notify_message, darwin_resume_inferior_threads)
556 (darwin_check_new_threads): Check result of get_darwin_inferior.
557
558 2018-07-31 Joel Brobecker <brobecker@adacore.com>
559
560 GDB 8.1.1 released.
561
562 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
563
564 * varobj.c (varobj_get_path_expr_parent): Report an error if
565 parent is a dynamic varobj.
566
567 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
568
569 * gnulib/aclocal.m4: Re-generate.
570 * gnulib/config.in: Re-generate.
571 * gnulib/configure: Re-generate.
572 * gnulib/import/Makefile.in: Re-generate.
573 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
574 * gnulib/import/m4/onceonly.m4: Re-generate.
575
576 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
577
578 * target-descriptions.c (struct xml_test_tdesc): New.
579 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
580 (record_xml_tdesc): Update.
581 (maintenance_check_xml_descriptions): Update.
582 * target-descriptions.h (record_xml_tdesc): Update comment.
583
584 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
585
586 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
587 checking array bounds are defined.
588
589 2018-07-30 Tom Tromey <tom@tromey.com>
590
591 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
592 irreflexivity violation.
593
594 2018-07-30 Tom Tromey <tom@tromey.com>
595
596 * cli/cli-decode.c (lookup_cmd): Remove lint code.
597 * value.c (unpack_long): Remove lint code.
598 * valops.c (value_ind): Remove lint code.
599 * valarith.c (value_x_binop, value_x_unop, value_equal)
600 (value_pos): Remove lint code.
601
602 2018-07-28 Tom de Vries <tdevries@suse.de>
603
604 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
605 with undefined upper bound as <optimized out>.
606
607 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
608
609 * gcore.in: Rename variable "name" to "prefix". Expand
610 "usage" text.
611
612 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
613
614 * windows-nat.c (windows_nat_target::create_inferior): Update to
615 call close() in global namespace.
616
617 2018-07-26 Tom Tromey <tom@tromey.com>
618
619 * dwarf-index-write.c (add_address_entry): Don't add objfile
620 offsets.
621 * dbxread.c (find_stab_function): Rename from
622 find_stab_function_addr. Return a bound_minimal_symbol.
623 (read_dbx_symtab): Use raw_text_low, raw_text_high.
624 Don't add objfile offsets.
625 (end_psymtab): Use raw_text_low, raw_text_high,
626 MSYMBOL_VALUE_RAW_ADDRESS.
627 (read_ofile_symtab): Update.
628 (process_one_symbol): Update.
629 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
630 offsets.
631 (dw2_relocate): Remove.
632 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
633 searching addrmap.
634 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
635 Update.
636 (process_psymtab_comp_unit_reader, add_partial_symbol)
637 (add_partial_subprogram, dwarf2_ranges_read): Update.
638 (load_partial_dies): Update.
639 (add_address_entry): Don't add objfile offsets.
640 (dwarf2_build_include_psymtabs): Update.
641 (create_addrmap_from_aranges): Don't add objfile offsets.
642 (dw2_find_pc_sect_compunit_symtab): Update.
643 * mdebugread.c (parse_symbol): Don't add objfile offsets.
644 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
645 Update.
646 (parse_partial_symbols): Don't add objfile offsets. Use
647 raw_text_low, raw_text_high. Update.
648 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
649 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
650 or call 'relocate' quick function. Clear psymbol_map.
651 * psympriv.h (struct partial_symbol) <address>: Add section
652 offset.
653 <set_unrelocated_address>: Rename from set_address.
654 <raw_text_low, raw_text_high>: New methods.
655 <text_low, text_high>: Add objfile parameter.
656 (add_psymbol_to_bcache): Add 'section' parameter. Call
657 set_unrelocated_address.
658 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
659 (find_pc_psymbol): Update.
660 (fixup_psymbol_section, relocate_psymtabs): Remove.
661 (dump_psymtab, psym_functions): Update.
662 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
663 parameter.
664 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
665 (start_psymtab_common): Update.
666 * symfile-debug.c (debug_qf_relocate): Remove.
667 (debug_sym_quick_functions): Update.
668 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
669 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
670 Update.
671
672 2018-07-26 Tom Tromey <tromey@redhat.com>
673
674 * dbxread.c (end_psymtab): Use text_high_valid and
675 text_low_valid.
676 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
677 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
678 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
679 Update comment.
680 <text_low_valid, text_high_valid>: New fields.
681 <set_text_low, set_text_high>: Update.
682 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
683
684 2018-07-26 Tom Tromey <tom@tromey.com>
685
686 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
687 Update.
688 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
689 textlow and texthigh fields.
690 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
691 Update.
692 * mdebugread.c (parse_lines, parse_partial_symbols)
693 (psymtab_to_symtab_1): Update.
694 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
695 Rename fields. Update comment. Now private.
696 <text_low, text_high, set_text_low, set_text_high>: New methods.
697 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
698 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
699 (start_psymtab_common, maintenance_info_psymtabs)
700 (maintenance_check_psymtabs): Update.
701 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
702 texthigh fields.
703 (scan_xcoff_symtab): Update.
704
705 2018-07-26 Tom Tromey <tromey@redhat.com>
706
707 * psympriv.h (struct partial_symbol) <unrelocated_address,
708 address, set_address>: New methods.
709 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
710 (fixup_psymbol_section, relocate_psymtabs): Update.
711 (print_partial_symbols): Add 'objfile' parameter. Update.
712 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
713 Update.
714
715 2018-07-26 Tom Tromey <tom@tromey.com>
716
717 * dwarf-index-write.c (write_psymbols, debug_names::insert)
718 (debug_names::write_psymbols): Update.
719 * psympriv.h (struct partial_symbol): Derive from
720 general_symbol_info.
721 <obj_section>: New method.
722 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
723 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
724 (find_pc_sect_psymbol, fixup_psymbol_section)
725 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
726 (print_partial_symbols, recursively_search_psymtabs)
727 (compare_psymbols, psymbol_hash, psymbol_compare)
728 (add_psymbol_to_bcache, maintenance_check_psymtabs)
729 (psymbol_name_matches, psym_fill_psymbol_map): Update.
730
731 2018-07-26 Tom Tromey <tromey@redhat.com>
732
733 * dbxread.c (end_psymtab): Remove dead code.
734
735 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
736
737 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
738 DWARF unwinders are disabled.
739 * dwarf2-frame.c: Add dwarf2read.h include.
740 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
741 disabled.
742 (dwarf2_frame_unwinders_enabled_p): Define.
743 (show_dwarf_unwinders_enabled_p): New function.
744 (_initialize_dwarf2_frame): Register switch to control DWARF
745 unwinder use.
746 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
747 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
748 (show_dwarf_cmdlist): Remove static keyword.
749 * dwarf2read.h (set_dwarf_cmdlist): Declare.
750 (show_dwarf_cmdlist): Declare.
751 * NEWS: Document new feature.
752
753 2018-07-26 Tom de Vries <tdevries@suse.de>
754
755 PR breakpoints/23366
756 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
757
758 2018-07-26 Tom de Vries <tdevries@suse.de>
759
760 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
761 DW_AT_count can't be translated to a dynamic prop.
762
763 2018-07-25 Tom de Vries <tdevries@suse.de>
764
765 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
766 try/catch.
767
768 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
769
770 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
771
772 2018-07-25 Joel Brobecker <brobecker@adacore.com>
773
774 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
775
776 2018-07-24 Keith Seitz <keiths@redhat.comt
777
778 PR symtab/23010
779 * dwarf2read.c (dw2_add_symbol_to_list): New function.
780 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
781 instead of add_symbol_to_list.
782 (read_file_scope): Call prepare_one_comp_unit before reading
783 any other DIEs.
784
785 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
786
787 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
788
789 2018-07-24 Tom Tromey <tom@tromey.com>
790
791 * utils.c (malloc, realloc, free): Don't declare.
792 * configure, config.in: Rebuild.
793 * configure.ac: Don't check for declarations of free, malloc, or
794 realloc.
795
796 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
797
798 * aarch64-linux-nat.c
799 (aarch64_linux_nat_target::stopped_data_address): Remove unused
800 variable.
801 * arm-linux-nat.c (fetch_regs): Likewise.
802 (store_regs): Likewise.
803 (fetch_vfp_regs): Likewise.
804 (store_vfp_regs): Likewise.
805 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
806 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
807 (arm_linux_nat_target::insert_watchpoint): Likewise.
808 (arm_linux_nat_target::remove_watchpoint): Likewise.
809 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
810 Likewise.
811 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
812 Likewise.
813 * ppc-linux-nat.c (fetch_register): Likewise.
814 (fetch_all_gp_regs): Likewise.
815 (fetch_ppc_registers): Likewise.
816 (store_all_gp_regs): Likewise.
817 (store_ppc_registers): Likewise.
818 (hwdebug_insert_point): Likewise.
819 (can_use_watchpoint_cond_accel): Likewise.
820 * remote-sim.c (gdb_os_write_stdout): Likewise.
821
822 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
823 Tom Tromey <tom@tromey.com>
824
825 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
826 test for it.
827 * configure: Rebuild.
828
829 2018-07-22 Tom Tromey <tom@tromey.com>
830
831 * regformats/regdat.sh: Define xmltarget_${name} inside
832 #ifndef IN_PROCESS_AGENT.
833
834 2018-07-22 Tom Tromey <tom@tromey.com>
835
836 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
837
838 2018-07-22 Tom Tromey <tom@tromey.com>
839
840 * symfile.c (reread_symbols): Notify iter, not objfile.
841
842 2018-07-22 Tom Tromey <tom@tromey.com>
843
844 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
845 Use arch_ops.
846 (ravenscar_thread_target::prepare_to_store): Likewise.
847
848 2018-07-22 Tom Tromey <tom@tromey.com>
849
850 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
851 unused variable. Call value_fetch_lazy when needed.
852 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
853 Remove unused variable. Call value_fetch_lazy when needed.
854
855 2018-07-22 Tom Tromey <tom@tromey.com>
856
857 * m32c-tdep.c (mark_dma): Return void.
858 (make_regs): Remove unused declarations.
859
860 2018-07-22 Tom Tromey <tom@tromey.com>
861
862 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
863 cmdscm_get_valid_command_smob_arg_unsafe for effect.
864 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
865 bkscm_get_valid_block_smob_arg_unsafe for effect.
866
867 2018-07-22 Tom Tromey <tom@tromey.com>
868
869 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
870 value_type.
871
872 2018-07-22 Tom Tromey <tom@tromey.com>
873
874 * windows-nat.c (saved_context): Conditionally define.
875 * remote.c (remote_target::remote_btrace_maybe_reopen):
876 Conditionally declare "warned".
877 * inflow.c (sigquit_ours): Conditionally define.
878 (new_tty): Move "tty" declaration inside #if.
879 * guile/guile.c (guile_datadir): Conditionally define.
880 * charset.c (set_be_le_names): Move some declarations inside #if.
881 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
882 #if.
883 (parse_xml_btrace_conf): Likewise.
884
885 2018-07-22 Tom Tromey <tom@tromey.com>
886
887 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
888
889 2018-07-22 Tom Tromey <tom@tromey.com>
890
891 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
892 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
893 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
894 * buildsym-legacy.c (get_macro_table): Remove unused variable.
895 * stack.c (frame_apply_level_command): Remove unused variable.
896 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
897 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
898 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
899 unused variable.
900 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
901 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
902 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
903 variable.
904 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
905 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
906 variable.
907 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
908 Remove unused variable.
909 * cli/cli-script.c (recurse_read_control_structure): Remove unused
910 variable.
911 * common/tdesc.c (print_xml_feature::visit): Remove unused
912 variable.
913 * compile/compile-object-load.c (store_regs): Remove unused
914 variables.
915 * complaints.c (clear_complaints): Remove unused variable.
916 * corelow.c (core_target_open): Remove unused variable.
917 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
918 variable.
919 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
920 variable.
921 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
922 variable.
923 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
924 variable.
925 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
926 variable.
927 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
928 variable.
929 * ia64-tdep.c (examine_prologue): Remove unused variable.
930 * infcall.c (run_inferior_call): Remove unused variable.
931 * inferior.c (exit_inferior): Remove unused variable.
932 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
933 * linespec.c (decode_line_2): Remove unused variable.
934 * linux-nat.c (super_close): Remove.
935 * linux-tdep.c (linux_info_proc): Remove unused variable.
936 * mi/mi-main.c (mi_execute_command): Remove unused variable.
937 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
938 Remove unused variable.
939 * parse.c (find_minsym_type_and_address): Remove unused variable.
940 * printcmd.c (info_symbol_command, printf_floating): Remove unused
941 variable.
942 * python/py-breakpoint.c (bppy_set_commands): Remove unused
943 variable.
944 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
945 variables.
946 * record-btrace.c (record_btrace_target::store_registers): Remove
947 unused variable.
948 (cmd_show_record_btrace_cpu): Remove unused variable.
949 * riscv-tdep.c (riscv_register_reggroup_p)
950 (riscv_push_dummy_call, riscv_return_value): Remove unused
951 variable.
952 * rust-exp.y (literal): Remove unused variable.
953 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
954 unused variable.
955 <STRUCTOP_ANONYMOUS>: Likewise.
956 * s390-linux-tdep.c (s390_linux_init_abi_31)
957 (s390_linux_init_abi_64): Remove unused variable.
958 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
959 (file_select_thread, net_windows_open, _initialize_ser_windows):
960 Remove unused variables.
961 * symtab.c (find_pc_sect_line): Remove unused variable.
962 * target-memory.c (compute_garbled_blocks): Remove unused
963 variable.
964 (target_write_memory_blocks): Remove unused variable.
965 * target.c (target_stack::unpush): Remove unused variables.
966 * tracepoint.c (start_tracing, all_tracepoint_actions)
967 (merge_uploaded_trace_state_variables)
968 (print_one_static_tracepoint_marker): Remove unused variable.
969 * unittests/basic_string_view/element_access/char/1.cc (test01):
970 Remove unused variable.
971 * windows-nat.c (windows_continue, windows_add_all_dlls)
972 (do_initial_windows_stuff, windows_nat_target::create_inferior):
973 Remove unused variables.
974
975 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
976
977 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
978 attr_profile in HAVE_ELF.
979 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
980 HAVE_ELF.
981
982 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
983
984 * frame.c (frame_register_unwind): Change parameter name.
985 (frame_unwind_register): Likewise.
986 (frame_unwind_register_value): Likewise.
987 (frame_unwind_register_signed): Likewise.
988 (frame_unwind_register_unsigned): Likewise.
989 * frame.h (frame_register_unwind): Likewise.
990 (frame_unwind_register): Likewise.
991 (frame_unwind_register_value): Likewise.
992 (frame_unwind_register_signed): Likewise.
993 (frame_unwind_register_unsigned): Likewise.
994 (frame_unwind_arch): Likewise.
995
996 2018-07-20 Maciej W. Rozycki <macro@mips.com>
997
998 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
999 ISA maintenance.
1000
1001 2018-07-20 Maciej W. Rozycki <macro@mips.com>
1002
1003 * mips-linux-nat.c (mips_linux_nat_target::read_description):
1004 Call `get_ptrace_pid' rather than extracting the ptrace PID by
1005 hand.
1006
1007 2018-07-20 Keith Seitz <keiths@redhat.com>
1008
1009 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
1010 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
1011 m_compunit_symtab, m_language>: Add "m_" prefix.
1012 Update all uses.
1013 * buildsym.c: Update all uses.
1014
1015 2018-07-20 Tom Tromey <tom@tromey.com>
1016
1017 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
1018 * buildsym.h (record_line_ftype): Remove typedef.
1019
1020 2018-07-20 Tom Tromey <tom@tromey.com>
1021
1022 * buildsym-legacy.h (augment_type_symtab): Don't declare.
1023 (end_expandable_symtab): Likewise.
1024 (end_symtab_get_static_block): Likewise.
1025 (end_symtab_from_static_block): Likewise.
1026 * buildsym-legacy.c (augment_type_symtab): Remove.
1027 (end_expandable_symtab): Remove.
1028 (end_symtab_get_static_block): Remove.
1029 (end_symtab_from_static_block): Remove.
1030
1031 2018-07-20 Tom Tromey <tom@tromey.com>
1032
1033 * dwarf2read.c: Include buildsym.h.
1034 (struct dwarf2_cu) <builder>: New method.
1035 (fixup_go_packaging): Update.
1036 (process_full_comp_unit, process_full_type_unit): Update. Don't
1037 use scoped_free_pendings.
1038 (using_directives): Add "cu" parameter, remove "language".
1039 (read_import_statement, setup_type_unit_groups, )
1040 (read_func_scope, read_lexical_block_scope)
1041 (dwarf2_record_block_ranges, read_namespace): Update.
1042 (lnp_state_machine::lnp_state_machine): Add cu parameter.
1043 (lnp_state_machine::handle_end_sequence): Update.
1044 (class lnp_state_machine) <m_cu>: New member.
1045 <m_record_line_callback>: Remove.
1046 <m_currently_recording_lines>: New member.
1047 (lnp_state_machine::handle_set_file): Update.
1048 (noop_record_line): Remove.
1049 (dwarf_record_line_p): Add cu parameter.
1050 (dwarf_record_line_1, dwarf_finish_line): Likewise.
1051 (lnp_state_machine::record_line)
1052 (lnp_state_machine::lnp_state_machine)
1053 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
1054 (dwarf_decode_lines): Update.
1055 (dwarf2_start_subfile): Add cu parameter.
1056 (dwarf2_start_symtab, new_symbol): Update.
1057 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
1058 Remove dwarf2_per_objfile parameter.
1059 (dwarf_decode_macros): Update.
1060
1061 2018-07-20 Tom Tromey <tom@tromey.com>
1062
1063 * stabsread.c (define_symbol): Update.
1064 * buildsym-legacy.h (get_buildsym_compunit): Declare.
1065 * dwarf2read.c (new_symbol): Update.
1066 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
1067 * cp-namespace.c: Include buildsym.h.
1068 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
1069 * buildsym-legacy.c (get_buildsym_compunit): New function.
1070
1071 2018-07-20 Tom Tromey <tom@tromey.com>
1072
1073 * xcoffread.c: Include buildsym-legacy.h.
1074 * windows-nat.c: Include buildsym-legacy.h.
1075 * stabsread.c: Include buildsym-legacy.h.
1076 * mdebugread.c: Include buildsym-legacy.h.
1077 * buildsym-legacy.h: New file.
1078 * buildsym-legacy.c: New file, from buildsym.c.
1079 * go32-nat.c: Include buildsym-legacy.h.
1080 * dwarf2read.c: Include buildsym-legacy.h.
1081 * dbxread.c: Include buildsym-legacy.h.
1082 * cp-namespace.c: Include buildsym-legacy.h.
1083 * coffread.c: Include buildsym-legacy.h.
1084 * buildsym.h: Move some contents to buildsym-legacy.h.
1085 * buildsym.c: Include buildsym-legacy.h. Move many functions to
1086 buildsym-legacy.c.
1087 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
1088
1089 2018-07-20 Tom Tromey <tom@tromey.com>
1090
1091 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
1092 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
1093 (buildsym_compunit::buildsym_compunit)
1094 (buildsym_compunit::~buildsym_compunit)
1095 (buildsym_compunit::get_macro_table): Define.
1096
1097 2018-07-20 Tom Tromey <tom@tromey.com>
1098
1099 * buildsym.c (reset_symtab_globals): Remove.
1100 (buildsym_compunit::end_symtab_from_static_block): Update.
1101 (buildsym_compunit::augment_type_symtab): Update.
1102 (end_symtab_from_static_block): Call free_buildsym_compunit.
1103 (augment_type_symtab, end_symtab, end_expandable_symtab):
1104 Likewise.
1105
1106 2018-07-20 Tom Tromey <tom@tromey.com>
1107
1108 * arch-utils.c: Do not include buildsym.h.
1109 * mipsread.c: Do not include buildsym.h.
1110 * machoread.c: Do not include buildsym.h.
1111 * elfread.c: Do not include buildsym.h.
1112
1113 2018-07-20 Tom Tromey <tom@tromey.com>
1114
1115 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
1116 initialization.
1117 (buildsym_compunit): Add new constructor.
1118 (struct buildsym_compunit) <get_last_source_file, finish_block,
1119 record_block_range, start_subfile, patch_subfile_names,
1120 push_subfile, pop_subfile, record_line, get_compunit_symtab,
1121 set_last_source_start_addr, get_last_source_start_addr,
1122 get_local_using_directives, set_local_using_directives,
1123 get_global_using_directives, outermost_context_p,
1124 get_current_context_stack, get_context_stack_depth,
1125 get_current_subfile, get_local_symbols, get_file_symbols,
1126 get_global_symbols, record_debugformat, record_producer,
1127 push_context, pop_context, end_symtab_get_static_block,
1128 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
1129 New public methods.
1130 <record_pending_block, finish_block_internal, make_blockvector,
1131 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
1132 private methods.
1133 Update all users.
1134
1135 2018-05-22 Tom Tromey <tom@tromey.com>
1136
1137 * buildsym.c (record_pending_block): Move earlier. Remove objfile
1138 parameter.
1139 (finish_block_internal): Update.
1140
1141 2018-07-20 Tom Tromey <tom@tromey.com>
1142
1143 * buildsym.c (record_pending_block): Move earlier. Remove objfile
1144 parameter.
1145 (finish_block_internal): Update.
1146
1147 2018-07-20 Tom Tromey <tom@tromey.com>
1148
1149 * buildsym.h (EXTERN): Don't define or undef.
1150 * buildsym.c (EXTERN): Don't define.
1151
1152 2018-07-20 Tom Tromey <tom@tromey.com>
1153
1154 * buildsym.c: Remove TODO comment.
1155
1156 2018-07-20 Tom Tromey <tom@tromey.com>
1157
1158 * coffread.c (coff_symtab_read): Update.
1159 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
1160 (xcoff_new_init): Update.
1161 * mipsread.c (mipscoff_new_init): Update.
1162 * mdebugread.c (mdebug_build_psymtabs): Update.
1163 * elfread.c (elf_new_init): Update.
1164 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1165 Update.
1166 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
1167 (coffstab_build_psymtabs, elfstab_build_psymtabs)
1168 (stabsect_build_psymtabs): Update.
1169 * buildsym.h (buildsym_init): Don't declare.
1170 * buildsym.c: Update comment.
1171 (prepare_for_building): Remove.
1172 (start_symtab, restart_symtab): Update.
1173 (reset_symtab_globals): Update comment.
1174 (buildsym_init): Remove.
1175
1176 2018-07-20 Tom Tromey <tom@tromey.com>
1177
1178 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
1179 * stabsread.c (patch_block_stabs, define_symbol, read_type)
1180 (read_enum_type, common_block_start, common_block_end)
1181 (cleanup_undefined_types_1, finish_global_stabs): Update.
1182 * mdebugread.c (psymtab_to_symtab_1): Update.
1183 * dwarf2read.c (fixup_go_packaging, read_func_scope)
1184 (read_lexical_block_scope, new_symbol): Update.
1185 * dbxread.c (process_one_symbol): Update.
1186 * coffread.c (coff_symtab_read, process_coff_symbol)
1187 (coff_read_enum_type): Update.
1188 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
1189 declare.
1190 (get_local_symbols, get_file_symbols, get_global_symbols): New
1191 functions.
1192 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
1193 m_global_symbols.
1194 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
1195 (~scoped_free_pendings): Update.
1196 (finish_block, prepare_for_building, reset_symtab_globals)
1197 (end_symtab_get_static_block, end_symtab_with_blockvector)
1198 (augment_type_symtab, push_context): Update.
1199 (get_local_symbols, get_file_symbols, get_global_symbols): New
1200 functions.
1201 (buildsym_init): Update.
1202
1203 2018-07-20 Tom Tromey <tom@tromey.com>
1204
1205 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
1206 (process_full_type_unit): Likewise.
1207 (dwarf2_start_symtab): Set list_in_scope.
1208
1209 2018-07-20 Tom Tromey <tom@tromey.com>
1210
1211 * dwarf2read.c (process_psymtab_comp_unit_reader)
1212 (build_type_psymtabs_reader): Do not set list_in_scope.
1213
1214 2018-07-20 Tom Tromey <tom@tromey.com>
1215
1216 * buildsym.c (free_pendings): Remove.
1217 (add_symbol_to_list, scoped_free_pendings)
1218 (finish_block_internal, buildsym_init): Update.
1219
1220 2018-07-20 Tom Tromey <tom@tromey.com>
1221
1222 * xcoffread.c (read_xcoff_symtab): Update.
1223 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
1224 Update.
1225 * dbxread.c (process_one_symbol): Update.
1226 * coffread.c (coff_symtab_read): Update.
1227 * buildsym.h (finish_block): Update.
1228 * buildsym.c (finish_block): Remove "listhead" argument.
1229 (end_symtab_get_static_block): Update.
1230
1231 2018-07-20 Tom Tromey <tom@tromey.com>
1232
1233 * buildsym.h (class scoped_free_pendings): Remove constructor.
1234 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
1235 method.
1236 <m_pending_block_obstack, m_pending_blocks>: New members.
1237 (pending_block_obstack, pending_blocks): Remove.
1238 (scoped_free_pendings::scoped_free_pendings): Default.
1239 (~scoped_free_pendings): Update.
1240 (free_pending_blocks): Remove.
1241 (finish_block_internal, record_pending_block, make_blockvector)
1242 (end_symtab_get_static_block, augment_type_symtab, push_context)
1243 (buildsym_init): Update.
1244
1245 2018-07-20 Tom Tromey <tom@tromey.com>
1246
1247 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
1248 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
1249 members.
1250 (pending_addrmap, pending_addrmap_obstack)
1251 (pending_addrmap_interesting): Remove.
1252 (scoped_free_pendings, record_block_range, make_blockvector)
1253 (prepare_for_building, reset_symtab_globals, buildsym_init):
1254 Update.
1255
1256 2018-07-20 Tom Tromey <tom@tromey.com>
1257
1258 * xcoffread.c (process_linenos): Update.
1259 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
1260 * mdebugread.c (psymtab_to_symtab_1): Update.
1261 * dwarf2read.c (setup_type_unit_groups)
1262 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
1263 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
1264 * dbxread.c (process_one_symbol): Update.
1265 * coffread.c (coff_symtab_read, enter_linenos)
1266 (process_coff_symbol): Update.
1267 * buildsym.h (current_subfile): Don't declare.
1268 (get_current_subfile): Declare.
1269 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
1270 member.
1271 (start_subfile, free_buildsym_compunit, push_subfile)
1272 (prepare_for_building, start_symtab): Update.
1273 (get_current_subfile): New function.
1274
1275 2018-07-20 Tom Tromey <tom@tromey.com>
1276
1277 * coffread.c (coff_symtab_read): Update.
1278 * xcoffread.c (read_xcoff_symtab): Update.
1279 * dwarf2read.c (new_symbol): Update.
1280 (read_func_scope, read_lexical_block_scope): Update.
1281 * dbxread.c (process_one_symbol): Update.
1282 * buildsym.h (context_stack, context_stack_depth): Don't declare.
1283 (outermost_context_p): Remove macro.
1284 (outermost_context_p, get_current_context_stack)
1285 (get_context_stack_depth): Declare.
1286 (pop_context): Return struct context_stack.
1287 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
1288 member.
1289 (context_stack_size): Remove.
1290 (INITIAL_CONTEXT_STACK_SIZE): Remove.
1291 (prepare_for_building, end_symtab_get_static_block)
1292 (augment_type_symtab, push_context): Update.
1293 (pop_context): Return struct context_stack.
1294 (outermost_context_p, get_current_context_stack)
1295 (get_context_stack_depth): New functions.
1296 (buildsym_init): Update.
1297
1298 2018-07-20 Tom Tromey <tom@tromey.com>
1299
1300 * rust-exp.y: Now a pure parser. Update all rules.
1301 (%union): Move earlier.
1302 (current_parser, work_obstack): Remove globals.
1303 (rust_parser, ~rust_parser): Update.
1304 (class rust_parser) <copy_name, concat3, crate_name, super_name,
1305 lex_character, lex_number, lex_string, lex_identifier,
1306 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
1307 convert_name, convert_params_to_expression,
1308 convert_ast_to_expression, ast_basic_type, ast_operation,
1309 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
1310 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
1311 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
1312 ast_array_type, ast_slice_type, ast_reference_type,
1313 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
1314 (rust_parse): Update.
1315 (rustyyerror, rustyylex): Add parser parameter.
1316 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
1317 (rust_lex_stringish_test, rust_lex_test_sequence)
1318 (rust_lex_test_trailing_dot, rust_lex_test_completion)
1319 (rust_lex_test_push_back, rust_lex_tests): Update.
1320
1321 2018-07-19 Pedro Alves <palves@redhat.com>
1322
1323 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
1324 gdb::unique_xmalloc_ptr.
1325 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
1326 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
1327 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
1328 copy-initialization.
1329 * guile/scm-pretty-print.c (ppscm_print_children): Use
1330 gdb::unique_xmalloc_ptr instead of cleanups.
1331 (gdbscm_apply_val_pretty_printer): Remove cleanups.
1332 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
1333 gdb::unique_xmalloc_ptr.
1334 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1335 Adjust to use gdb::unique_xmalloc_ptr.
1336 * guile/scm-utils.c (extract_arg): Adjust.
1337 * guile/scm-value.c (gdbscm_value_field): Adjust to use
1338 gdb::unique_xmalloc_ptr instead of a cleanup.
1339
1340 2018-07-19 Tom Tromey <tom@tromey.com>
1341
1342 * utils.c (do_value_free_to_mark)
1343 (make_cleanup_value_free_to_mark): Remove.
1344 * utils.h (make_cleanup_value_free_to_mark): Remove.
1345
1346 2018-07-19 Pedro Alves <palves@redhat.com>
1347
1348 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
1349 forwarding reference.
1350
1351 2018-07-18 Pedro Alves <palves@redhat.com>
1352
1353 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
1354 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
1355 cleanup.
1356
1357 2018-07-18 Pedro Alves <palves@redhat.com>
1358
1359 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
1360 exceptions.
1361 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
1362 (gdbscm_wrap): New.
1363 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
1364 directly instead of a cleanup.
1365 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
1366 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
1367 (vlscm_binop_gdbthrow): New, factored out from ...
1368 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
1369 (vlscm_rich_compare): Use gdbscm_wrap.
1370 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
1371 instead of a cleanup.
1372 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
1373 cleanup.
1374 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1375 Use xfree directly instead of a cleanup.
1376 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
1377 Adjust to use gdbscm_wrap and scoped_value_mark.
1378 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
1379 (gdbscm_value_address, gdbscm_value_dereference)
1380 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
1381 scoped_value_mark.
1382 (gdbscm_value_dynamic_type): Use scoped_value_mark.
1383 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
1384 scoped_value_mark.
1385 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
1386 gdbscm_wrap and scoped_value_mark.
1387 (gdbscm_value_to_string): Use xfree directly instead of a
1388 cleanup. Move 'buffer' unique_ptr to TRY scope.
1389 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
1390 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
1391 scoped_value_mark.
1392 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
1393 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
1394 scoped_value_mark.
1395 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
1396 gdbscm_wrap.
1397
1398 2018-07-18 Tom de Vries <tdevries@suse.de>
1399
1400 * findvar.c (default_read_var_value): Also resolve dynamic type for
1401 LOC_OPTIMIZED_OUT vars.
1402
1403 2018-07-18 Maciej W. Rozycki <macro@mips.com>
1404
1405 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
1406 decoding.
1407
1408 2018-07-17 Tom Tromey <tom@tromey.com>
1409
1410 * guile/scm-param.c (pascm_set_func, pascm_show_func)
1411 (compute_enum_list, pascm_set_param_value_x)
1412 (gdbscm_parameter_value): Update.
1413 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
1414 (gdbscm_scm_to_host_string): Update.
1415 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
1416 Update.
1417 * guile/scm-cmd.c (cmdscm_add_completion): Update.
1418 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
1419 * guile/scm-string.c (gdbscm_scm_to_string): Return
1420 unique_xmalloc_ptr.
1421 (gdbscm_scm_to_host_string): Likewise.
1422
1423 2018-07-17 Tom Tromey <tom@tromey.com>
1424
1425 * guile/guile.c (gdbscm_eval_from_control_command): Update.
1426 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
1427 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
1428 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
1429 unique_xmalloc_ptr.
1430
1431 2018-07-17 Tom Tromey <tom@tromey.com>
1432
1433 * guile/scm-param.c (pascm_signal_setshow_error): Update.
1434 * guile/guile-internal.h (gdbscm_exception_message_to_string):
1435 Update.
1436 * guile/scm-cmd.c (cmdscm_function): Update.
1437 * guile/scm-pretty-print.c
1438 (ppscm_print_exception_unless_memory_error): Update.
1439 * guile/scm-exception.c (gdbscm_exception_message_to_string):
1440 Return unique_xmalloc_ptr.
1441
1442 2018-07-17 Tom Tromey <tom@tromey.com>
1443
1444 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
1445 Use string_printf.
1446
1447 2018-07-17 Jim Wilson <jimw@sifive.com>
1448
1449 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
1450 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
1451 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
1452 unecessary braces after EF_RISCV_RVC test. Delete call to
1453 set_gdbarch_decr_pc_after_break.
1454
1455 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
1456 RISCV_LAST_FP_REGNUM + 1.
1457 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
1458
1459 2018-07-17 Tom Tromey <tom@tromey.com>
1460
1461 * configure.ac: Remove --disable-gdbcli.
1462 * configure: Rebuild.
1463 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
1464 (SUBDIR_CLI_CFLAGS): Remove.
1465 (SFILES): Use SUBDIR_CLI_SRCS.
1466 (COMMON_OBS): Use SUBDIR_CLI_OBS.
1467
1468 2018-07-17 Tom Tromey <tom@tromey.com>
1469
1470 PR gdb/18624:
1471 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
1472
1473 2018-07-16 Jim Wilson <jimw@sifive.com>
1474
1475 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
1476
1477 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1478
1479 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
1480 variable.
1481 (libunwind_frame_sniffer): Likewise.
1482 (libunwind_frame_prev_register): Likewise.
1483 (libunwind_sigtramp_frame_sniffer): Likewise.
1484 * ia64-tdep.c (ia64_access_reg): Likewise.
1485 (ia64_access_rse_reg): Likewise.
1486 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
1487 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
1488
1489 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1490
1491 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
1492
1493 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1494
1495 * remote-sim.c (gdbsim_target::close,
1496 gdbsim_target::mourn_inferior): Remove unused variables.
1497
1498 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
1499
1500 * ia64-tdep.c (ktab_buf): New global.
1501 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
1502 (get_kernel_table): Adjust.
1503
1504 2018-07-16 Tom Tromey <tom@tromey.com>
1505
1506 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
1507 * dwarf2read.c (using_directives, new_symbol): Use
1508 outermost_context_p.
1509 * dbxread.c (process_one_symbol): Use outermost_context_p.
1510 * coffread.c (coff_symtab_read): Use outermost_context_p.
1511
1512 2018-07-16 Tom Tromey <tom@tromey.com>
1513
1514 * dwarf2read.c (using_directives, read_func_scope)
1515 (read_lexical_block_scope): Update.
1516 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1517 * buildsym.h (local_using_directives, global_using_directives):
1518 Don't declare.
1519 (get_local_using_directives, set_local_using_directives)
1520 (get_global_using_directives): Declare.
1521 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
1522 m_global_using_directives>: New members.
1523 (finish_block_internal, prepare_for_building)
1524 (reset_symtab_globals, end_symtab_get_static_block)
1525 (push_context): Update.
1526 (get_local_using_directives, set_local_using_directives)
1527 (get_global_using_directives): New functions.
1528 (buildsym_init): Update.
1529
1530 2018-07-16 Tom Tromey <tom@tromey.com>
1531
1532 * xcoffread.c (xcoff_initial_scan): Don't call
1533 free_pending_blocks.
1534 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
1535 * buildsym.h (class scoped_free_pendings): Add constructor.
1536 (free_pending_blocks): Don't declare.
1537 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
1538 (free_pending_blocks): Now static.
1539
1540 2018-07-16 Tom Tromey <tom@tromey.com>
1541
1542 * buildsym.h (push_subfile, pop_subfile): Update declarations.
1543 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
1544 member.
1545 (struct subfile_stack): Remove.
1546 (subfile_stack): Remove.
1547 (push_subfile, pop_subfile, buildsym_init): Update.
1548
1549 2018-07-16 Tom Tromey <tom@tromey.com>
1550
1551 * buildsym.c (push_subfile): Use gdb_assert.
1552 (pop_subfile): Use gdb_assert.
1553
1554 2018-07-16 Tom Tromey <tom@tromey.com>
1555
1556 * buildsym.h (merge_symbol_lists): Remove.
1557 * buildsym.c (merge_symbol_lists): Remove.
1558
1559 2018-07-16 Tom Tromey <tom@tromey.com>
1560
1561 * stabsread.c (scan_file_globals): Update comment.
1562 * stabsread.h (scan_file_globals): Move from buildsym.h.
1563 * buildsym.h (scan_file_globals): Move to stabsread.h.
1564
1565 2018-07-16 Tom Tromey <tom@tromey.com>
1566
1567 * xcoffread.c (xcoff_new_init): Update.
1568 * mipsread.c (mipscoff_new_init): Update.
1569 * mdebugread.c (mdebug_build_psymtabs): Update.
1570 * elfread.c (elf_new_init): Update.
1571 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
1572 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
1573 * buildsym.h (buildsym_new_init): Don't declare.
1574 * buildsym.c (buildsym_new_init): Remove.
1575
1576 2018-07-16 Tom Tromey <tom@tromey.com>
1577
1578 * stabsread.h (within_function): Move from buildsym.h.
1579 * stabsread.c (start_stabs): Clear within_function.
1580 * coffread.c (coff_start_symtab): Clear within_function.
1581 * buildsym.h (within_function): Move to stabsread.h.
1582 * buildsym.c (prepare_for_building): Update.
1583
1584 2018-07-16 Tom Tromey <tom@tromey.com>
1585
1586 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
1587 * dwarf2read.c (dwarf2_start_symtab): Don't set
1588 processing_gcc_compilation.
1589 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
1590
1591 2018-07-16 Tom Tromey <tom@tromey.com>
1592
1593 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
1594 (next_symbol_text_func): Move from buildsym.h.
1595 * stabsread.c (hashname): Move from buildsym.c.
1596 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
1597 (next_symbol_text_func, hashname): Move to stabsread.h.
1598 * buildsym.c: Don't include bcache.h
1599 (hashname): Move to stasbread.c.
1600
1601 2018-07-16 Tom Tromey <tom@tromey.com>
1602
1603 * buildsym.h (context_stack_size): Don't declare.
1604 * buildsym.c (context_stack_size): New global.
1605
1606 2018-07-16 Tom Tromey <tom@tromey.com>
1607
1608 * dbxread.c (processing_acc_compilation): New global.
1609 * buildsym.h (processing_acc_compilation): Don't declare.
1610
1611 2018-07-16 Tom Tromey <tom@tromey.com>
1612
1613 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
1614 * dbxread.c (read_ofile_symtab): Update.
1615 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
1616 * buildsym.h (last_source_start_addr): Remove.
1617 (set_last_source_start_addr, get_last_source_start_addr):
1618 Declare.
1619 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
1620 parameter.
1621 (struct buildsym_compunit) <m_last_source_start_addr>: New
1622 member.
1623 (prepare_for_building): Remove start_addr parameter.
1624 (start_symtab, restart_symtab, end_symtab_get_static_block)
1625 (end_symtab_with_blockvector): Update.
1626 (set_last_source_start_addr, get_last_source_start_addr): New
1627 functions.
1628
1629 2018-07-16 Tom Tromey <tom@tromey.com>
1630
1631 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
1632 member.
1633 (have_line_numbers): Remove.
1634 (record_line, prepare_for_building, end_symtab_get_static_block)
1635 (augment_type_symtab): Update.
1636
1637 2018-07-16 Tom Tromey <tom@tromey.com>
1638
1639 * buildsym.c (~buildsym_compunit): Free the macro table.
1640 (struct buildsym_compunit) <get_macro_table, release_macros>: New
1641 methods.
1642 <m_pending_macros>: New member.
1643 (pending_macros): Remove.
1644 (~scoped_free_pendings, get_macro_table, prepare_for_building)
1645 (reset_symtab_globals, end_symtab_get_static_block)
1646 (end_symtab_with_blockvector, augment_type_symtab)
1647 (buildsym_init): Update.
1648
1649 2018-07-16 Tom Tromey <tom@tromey.com>
1650
1651 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
1652 parameter.
1653 (buildsym_compunit::set_last_source_file): New method.
1654 <m_last_source_file>: New member.
1655 (prepare_for_building): Remove "name" parameter.
1656 (start_symtab, restart_symtab, reset_symtab_globals): Update.
1657 (last_source_file): Remove.
1658 (set_last_source_file, get_last_source_file): Update.
1659
1660 2018-07-16 Tom Tromey <tom@tromey.com>
1661
1662 * buildsym.c (prepare_for_building): Add assert.
1663
1664 2018-07-16 Tom Tromey <tom@tromey.com>
1665
1666 * buildsym.c (~buildsym_compunit): Update.
1667 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
1668 (start_subfile, patch_subfile_names)
1669 (end_symtab_with_blockvector): Update.
1670
1671 2018-07-16 Tom Tromey <tom@tromey.com>
1672
1673 * buildsym.c (struct buildsym_compunit): Add constructor,
1674 destructor, initializers.
1675 (start_buildsym_compunit): Remove.
1676 (free_buildsym_compunit): Use "delete".
1677 (start_symtab, restart_symtab): Use "new".
1678
1679 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
1680
1681 * symfile.c (set_objfile_default_section_offset): Remove struct
1682 keyword.
1683
1684 2018-07-14 Stafford Horne <shorne@gmail.com>
1685
1686 * (Responsible Maintainers): Add myself as or1k maintainer.
1687
1688 2018-07-13 Tom Tromey <tom@tromey.com>
1689
1690 * symfile.c (set_objfile_default_section_offset): Use extra braces
1691 around initializer.
1692
1693 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1694
1695 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
1696 non-branching basr.
1697
1698 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1699
1700 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1701 unittests/cli-utils-selftests.c
1702 * unittests/cli-utils-selftests.c: New file.
1703
1704 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1705
1706 * NEWS: Mention new commands. Mention change to 'thread apply'.
1707
1708 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1709
1710 * thread.c (thr_try_catch_cmd): New function.
1711 (thread_apply_all_command): Handle qcs flags.
1712 (thread_apply_command): Handle qcs flags.
1713 (taas_command): New function.
1714 (tfaas_command): New function.
1715 (_initialize_thread): Update to setup the new commands 'taas
1716 and 'tfaas'. Change doc string for 'thread apply'.
1717
1718 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1719
1720 * stack.c: (trailing_outermost_frame): New function, mostly
1721 extracted from backtrace_command_1.
1722 (leading_innermost_frame): New function.
1723 (backtrace_command_1): Update to call trailing_outermost_frame.
1724 (frame_apply_command_count): New function.
1725 (frame_apply_level_command): New function.
1726 (frame_apply_all_command): New function.
1727 (frame_apply_command): New function.
1728 (faas_command): New function.
1729 (frame_cmd_list): New variable.
1730 (_initialize_stack): Update to setup the new commands 'frame apply'
1731 and 'faas'.
1732
1733 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1734
1735 * cli-utils.c (number_or_range_parser::get_number): Only handle
1736 numbers or convenience var as numbers.
1737 (parse_flags): New function.
1738 (parse_flags_qcs): New function.
1739 (number_or_range_parser::finished): Ensure parsing end is detected
1740 before end of string.
1741 * cli-utils.h (parse_flags): New function.
1742 (parse_flags_qcs): New function.
1743 (number_or_range_parser): Remove m_finished bool.
1744 (number_or_range_parser::skip_range): Set m_in_range to false.
1745
1746 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
1747
1748 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
1749 on Windows.
1750
1751 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1752 Jan Kratochvil <jan.kratochvil@redhat.com>
1753 Paul Fertser <fercerpav@gmail.com>
1754 Tsutomu Seki <sekiriki@gmail.com>
1755 Pedro Alves <palves@redhat.com>
1756
1757 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1758 'unittests/parse-connection-spec-selftests.c'.
1759 (COMMON_SFILES): Add 'common/netstuff.c'.
1760 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
1761 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
1762 * common/netstuff.c: New file.
1763 * common/netstuff.h: New file.
1764 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
1765 (wait_for_connect): Update comment. New parameter
1766 'gdb::optional<int> sock' instead of 'struct serial *scb'.
1767 Use 'sock' directly instead of 'scb->fd'.
1768 (try_connect): New function, with code from 'net_open'.
1769 (net_open): Rewrite main loop to deal with multiple
1770 sockets/addresses. Handle IPv6-style hostnames; implement
1771 support for IPv6 connections.
1772 * unittests/parse-connection-spec-selftests.c: New file.
1773
1774 2018-07-11 Pedro Alves <palves@redhat.com>
1775
1776 PR gdb/23377
1777 * remote.c (remote_target::remote_detach_pid): Call
1778 set_current_process.
1779
1780 2018-07-11 Pedro Alves <palves@redhat.com>
1781
1782 * h8300-tdep.c (h8300_gdbarch_init): Remove
1783 set_gdbarch_ecoff_reg_to_regnum calls.
1784
1785 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1786
1787 PR c++/23373
1788 * c-typeprint.c (c_type_print_base_struct_union): Don't print
1789 offsets/sizes for static members of a class/struct.
1790
1791 2018-07-11 Alan Hayward <alan.hayward@arm.com>
1792
1793 * target-descriptions.c (tdesc_register_bitsize): Rename.
1794 * target-descriptions.h (tdesc_register_bitsize): Likewise.
1795 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
1796 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
1797
1798 2018-07-10 Tom Tromey <tom@tromey.com>
1799
1800 * breakpoint.c (moribund_locations): Now static and a
1801 std::vector.
1802 (breakpoint_init_inferior, moribund_breakpoint_here_p)
1803 (build_bpstat_chain, update_global_location_list)
1804 (breakpoint_retire_moribund): Update.
1805 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
1806 VEC.
1807
1808 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
1809
1810 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
1811 (riscv_register_reggroup_p): Use new function, remove unneeded
1812 parenthesis.
1813 (riscv_push_dummy_call): Extend assert to compare against xlen or
1814 flen based on register type.
1815
1816 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
1817
1818 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
1819
1820 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
1821
1822 * remote.c (show_hardware_watchpoint_limit): New function.
1823 (show_hardware_watchpoint_length_limit): New function.
1824 (show_hardware_breakpoint_limit): New function.
1825 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
1826 where appropriate, update help text.
1827
1828 2018-07-09 Tom Tromey <tom@tromey.com>
1829
1830 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
1831 (CLIBS): Don't mention NAT_CLIBS.
1832
1833 2018-07-09 Tom Tromey <tom@tromey.com>
1834
1835 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
1836 (LIBGDB_OBS, clean mostlyclean): Update.
1837 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
1838
1839 2018-07-09 Tom Tromey <tom@tromey.com>
1840
1841 * Makefile.in (%.c: %.y): Use ECHO_YACC.
1842 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
1843 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
1844
1845 2018-07-09 Tom Tromey <tom@tromey.com>
1846
1847 * Makefile.in (ALLDEPFILES): Remove exec.c.
1848 (COMMON_OBS): Remove exec.o.
1849 (COMMON_SFILES): Add exec.c.
1850
1851 2018-07-09 Tom Tromey <tom@tromey.com>
1852
1853 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
1854
1855 2018-07-09 Tom Tromey <tom@tromey.com>
1856
1857 * Makefile.in (clean mostlyclean): Remove stamp-version.
1858 (version.c): Depend on stamp-version.
1859 (stamp-version): New rule, from version.c rule.
1860
1861 2018-07-09 Tom Tromey <tom@tromey.com>
1862
1863 * Makefile.in (init.c): Depend on stamp-init.
1864 (stamp-init): New rule, from init.c rule.
1865 (clean mostlyclean): Remove stamp-init.
1866
1867 2018-07-09 Tom Tromey <tom@tromey.com>
1868
1869 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
1870 SUBDIR_GCC_COMPILE_SRCS.
1871
1872 2018-07-09 Tom Tromey <tom@tromey.com>
1873
1874 * Makefile.in (init.c): Remove some unused sed rules.
1875
1876 2018-07-09 Tom Tromey <tom@tromey.com>
1877
1878 * Makefile.in (TSOBS): Remove.
1879 (INIT_FILES): Update.
1880 (LIBGDB_OBS): Update.
1881 (COMMON_SFILES): Add inflow.c.
1882 (SFILES): Remove inflow.c.
1883
1884 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1885
1886 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
1887
1888 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
1889
1890 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
1891 get_saveloc_name, is_signal_frame_name, step_name,
1892 init_remote_name, create_addr_space_name,
1893 destroy_addr_space_name, search_unwind_table_name,
1894 find_dyn_list_name): Constify.
1895
1896 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
1897
1898 * darwin-nat.c (darwin_pthread_kill): New function.
1899 (darwin_resume_thread): Use darwin_pthread_kill.
1900
1901 2018-07-05 Tom de Vries <tdevries@suse.de>
1902
1903 * macroexp.c (macro_buffer) <operator=>: New member function.
1904
1905 2018-07-04 Tom Tromey <tom@tromey.com>
1906
1907 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
1908
1909 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
1910
1911 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
1912 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
1913 * maint.c: Likewise.
1914 * top.c: Likewise.
1915
1916 2018-07-04 Joel Brobecker <brobecker@adacore.com>
1917
1918 * NEWS: Create a new section for the next release branch.
1919 Rename the section of the current branch, now that it has
1920 been cut.
1921
1922 2018-07-04 Joel Brobecker <brobecker@adacore.com>
1923
1924 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
1925 * version.in: Bump version to 8.2.50.DATE-git.
1926
1927 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1928 Pedro Alves <palves@redhat.com>
1929
1930 * linux-nat.c (linux_init_ptrace): Rename to ...
1931 (linux_init_ptrace_procfs): ... this. Call
1932 linux_proc_init_warnings.
1933 (linux_nat_target::post_attach)
1934 (linux_nat_target::post_startup_inferior): Adjust.
1935 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
1936 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
1937
1938 2018-07-04 Tom de Vries <tdevries@suse.de>
1939
1940 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
1941 check ...
1942 (read_comp_unit_head): ... here.
1943
1944 2018-07-03 Tom Tromey <tom@tromey.com>
1945
1946 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
1947 (stop_tracing, tstatus_command)
1948 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
1949 (print_one_static_tracepoint_marker): Update.
1950 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
1951 std::vector.
1952 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
1953 VEC.
1954 (all_tracepoints, static_tracepoints_here): Return std::vector.
1955
1956 2018-07-03 Tom Tromey <tom@tromey.com>
1957
1958 * common/ptid.c (ptid_equal): Remove.
1959 * common/ptid.h (ptid_equal): Don't declare.
1960 * ada-tasks.c: Update.
1961 * breakpoint.c: Update.
1962 * common/agent.c: Update.
1963 * corelow.c: Update.
1964 * darwin-nat-info.c: Update.
1965 * darwin-nat.c: Update.
1966 * dcache.c: Update.
1967 * dtrace-probe.c: Update.
1968 * dummy-frame.c: Update.
1969 * fbsd-nat.c: Update.
1970 * frame.c: Update.
1971 * gdbthread.h: Update.
1972 * gnu-nat.c: Update.
1973 * go32-nat.c: Update.
1974 * inf-loop.c: Update.
1975 * inf-ptrace.c: Update.
1976 * infcall.c: Update.
1977 * infcmd.c: Update.
1978 * inflow.c: Update.
1979 * infrun.c: Update.
1980 * linux-fork.c: Update.
1981 * linux-nat.c: Update.
1982 * linux-thread-db.c: Update.
1983 * mi/mi-cmd-var.c: Update.
1984 * mi/mi-interp.c: Update.
1985 * mi/mi-main.c: Update.
1986 * nto-procfs.c: Update.
1987 * ppc-linux-tdep.c: Update.
1988 * procfs.c: Update.
1989 * python/py-inferior.c: Update.
1990 * python/py-record-btrace.c: Update.
1991 * python/py-record.c: Update.
1992 * ravenscar-thread.c: Update.
1993 * regcache.c: Update.
1994 * remote-sim.c: Update.
1995 * remote.c: Update.
1996 * sol-thread.c: Update.
1997 * solib.c: Update.
1998 * target.c: Update.
1999 * tui/tui-stack.c: Update.
2000 * varobj.c: Update.
2001 * windows-nat.c: Update.
2002 * windows-tdep.c: Update.
2003
2004 2018-07-03 Tom Tromey <tom@tromey.com>
2005
2006 * common/ptid.c (ptid_match): Remove.
2007 * common/ptid.h (ptid_match): Don't declare.
2008 * fbsd-nat.c: Update.
2009 * infcmd.c: Update.
2010 * infrun.c: Update.
2011 * linux-nat.c: Update.
2012 * record-btrace.c: Update.
2013 * regcache.c: Update.
2014 * remote.c: Update.
2015
2016 2018-07-03 Tom Tromey <tom@tromey.com>
2017
2018 * common/ptid.c (ptid_tid_p): Remove.
2019 * common/ptid.h (ptid_tid_p): Don't declare.
2020 * sol-thread.c: Update.
2021
2022 2018-07-03 Tom Tromey <tom@tromey.com>
2023
2024 * common/ptid.c (ptid_lwp_p): Remove.
2025 * common/ptid.h (ptid_lwp_p): Don't declare.
2026 * fbsd-nat.c: Update.
2027 * linux-nat.c: Update.
2028 * nat/linux-procfs.c: Update.
2029 * nat/x86-linux-dregs.c: Update.
2030 * sol-thread.c: Update.
2031
2032 2018-07-03 Tom Tromey <tom@tromey.com>
2033
2034 * common/ptid.c (ptid_is_pid): Remove.
2035 * common/ptid.h (ptid_is_pid): Don't declare.
2036 * infrun.c: Update.
2037 * linux-nat.c: Update.
2038 * mi/mi-interp.c: Update.
2039 * remote.c: Update.
2040 * thread.c: Update.
2041
2042 2018-07-03 Tom Tromey <tom@tromey.com>
2043
2044 * common/ptid.c (ptid_get_tid): Remove.
2045 * common/ptid.h (ptid_get_tid): Don't declare.
2046 * ada-tasks.c: Update.
2047 * aix-thread.c: Update.
2048 * bsd-uthread.c: Update.
2049 * darwin-nat.c: Update.
2050 * fbsd-nat.c: Update.
2051 * i386-darwin-nat.c: Update.
2052 * infrun.c: Update.
2053 * linux-tdep.c: Update.
2054 * nto-procfs.c: Update.
2055 * ppc-ravenscar-thread.c: Update.
2056 * python/py-infthread.c: Update.
2057 * ravenscar-thread.c: Update.
2058 * sol-thread.c: Update.
2059 * sparc-ravenscar-thread.c: Update.
2060 * windows-nat.c: Update.
2061
2062 2018-07-03 Tom Tromey <tom@tromey.com>
2063
2064 * common/ptid.c (ptid_get_lwp): Remove.
2065 * common/ptid.h (ptid_get_lwp): Don't declare.
2066 * aarch64-linux-nat.c: Update.
2067 * ada-tasks.c: Update.
2068 * aix-thread.c: Update.
2069 * amd64-linux-nat.c: Update.
2070 * arm-linux-nat.c: Update.
2071 * corelow.c: Update.
2072 * fbsd-nat.c: Update.
2073 * fbsd-tdep.c: Update.
2074 * gnu-nat.c: Update.
2075 * i386-cygwin-tdep.c: Update.
2076 * i386-gnu-nat.c: Update.
2077 * i386-linux-nat.c: Update.
2078 * ia64-linux-nat.c: Update.
2079 * inf-ptrace.c: Update.
2080 * infrun.c: Update.
2081 * linux-fork.c: Update.
2082 * linux-nat.c: Update.
2083 * linux-tdep.c: Update.
2084 * linux-thread-db.c: Update.
2085 * mips-linux-nat.c: Update.
2086 * nat/aarch64-linux-hw-point.c: Update.
2087 * nat/aarch64-linux.c: Update.
2088 * nat/linux-btrace.c: Update.
2089 * nat/linux-osdata.c: Update.
2090 * nat/linux-procfs.c: Update.
2091 * nat/x86-linux-dregs.c: Update.
2092 * obsd-nat.c: Update.
2093 * ppc-fbsd-nat.c: Update.
2094 * ppc-linux-nat.c: Update.
2095 * procfs.c: Update.
2096 * python/py-infthread.c: Update.
2097 * ravenscar-thread.c: Update.
2098 * remote.c: Update.
2099 * s390-linux-nat.c: Update.
2100 * sol-thread.c: Update.
2101 * sol2-tdep.c: Update.
2102 * spu-linux-nat.c: Update.
2103 * x86-linux-nat.c: Update.
2104 * xtensa-linux-nat.c: Update.
2105
2106 2018-07-03 Tom Tromey <tom@tromey.com>
2107
2108 * common/ptid.c (ptid_get_pid): Remove.
2109 * common/ptid.h (ptid_get_pid): Don't declare.
2110 * aarch64-linux-nat.c: Update.
2111 * ada-lang.c: Update.
2112 * aix-thread.c: Update.
2113 * alpha-bsd-nat.c: Update.
2114 * amd64-fbsd-nat.c: Update.
2115 * amd64-linux-nat.c: Update.
2116 * arm-linux-nat.c: Update.
2117 * arm-nbsd-nat.c: Update.
2118 * auxv.c: Update.
2119 * break-catch-syscall.c: Update.
2120 * breakpoint.c: Update.
2121 * bsd-uthread.c: Update.
2122 * corelow.c: Update.
2123 * ctf.c: Update.
2124 * darwin-nat.c: Update.
2125 * fbsd-nat.c: Update.
2126 * fbsd-tdep.c: Update.
2127 * gcore.c: Update.
2128 * gnu-nat.c: Update.
2129 * hppa-nbsd-nat.c: Update.
2130 * hppa-obsd-nat.c: Update.
2131 * i386-fbsd-nat.c: Update.
2132 * ia64-linux-nat.c: Update.
2133 * inf-ptrace.c: Update.
2134 * infcmd.c: Update.
2135 * inferior.c: Update.
2136 * inferior.h: Update.
2137 * inflow.c: Update.
2138 * infrun.c: Update.
2139 * linux-fork.c: Update.
2140 * linux-nat.c: Update.
2141 * linux-tdep.c: Update.
2142 * linux-thread-db.c: Update.
2143 * m68k-bsd-nat.c: Update.
2144 * mi/mi-interp.c: Update.
2145 * mi/mi-main.c: Update.
2146 * mips-linux-nat.c: Update.
2147 * mips-nbsd-nat.c: Update.
2148 * mips64-obsd-nat.c: Update.
2149 * nat/aarch64-linux-hw-point.c: Update.
2150 * nat/aarch64-linux.c: Update.
2151 * nat/linux-btrace.c: Update.
2152 * nat/linux-osdata.c: Update.
2153 * nat/linux-procfs.c: Update.
2154 * nat/x86-linux-dregs.c: Update.
2155 * nto-procfs.c: Update.
2156 * obsd-nat.c: Update.
2157 * ppc-linux-nat.c: Update.
2158 * ppc-nbsd-nat.c: Update.
2159 * ppc-obsd-nat.c: Update.
2160 * proc-service.c: Update.
2161 * procfs.c: Update.
2162 * python/py-inferior.c: Update.
2163 * python/py-infthread.c: Update.
2164 * ravenscar-thread.c: Update.
2165 * record.c: Update.
2166 * remote-sim.c: Update.
2167 * remote.c: Update.
2168 * rs6000-nat.c: Update.
2169 * s390-linux-nat.c: Update.
2170 * sh-nbsd-nat.c: Update.
2171 * sol-thread.c: Update.
2172 * sparc-nat.c: Update.
2173 * sparc64-tdep.c: Update.
2174 * spu-linux-nat.c: Update.
2175 * spu-tdep.c: Update.
2176 * target-debug.h: Update.
2177 * target.c: Update.
2178 * thread.c: Update.
2179 * tid-parse.c: Update.
2180 * tracefile-tfile.c: Update.
2181 * vax-bsd-nat.c: Update.
2182 * windows-nat.c: Update.
2183 * x86-linux-nat.c: Update.
2184 * x86-nat.c: Update.
2185
2186 2018-07-03 Tom Tromey <tom@tromey.com>
2187
2188 * common/ptid.c (pid_to_ptid): Remove.
2189 * common/ptid.h (pid_to_ptid): Don't declare.
2190 * aix-thread.c: Update.
2191 * arm-linux-nat.c: Update.
2192 * common/ptid.c: Update.
2193 * common/ptid.h: Update.
2194 * corelow.c: Update.
2195 * ctf.c: Update.
2196 * darwin-nat.c: Update.
2197 * fbsd-nat.c: Update.
2198 * fork-child.c: Update.
2199 * gnu-nat.c: Update.
2200 * go32-nat.c: Update.
2201 * inf-ptrace.c: Update.
2202 * infcmd.c: Update.
2203 * inferior.c: Update.
2204 * infrun.c: Update.
2205 * linux-fork.c: Update.
2206 * linux-nat.c: Update.
2207 * nat/aarch64-linux-hw-point.c: Update.
2208 * nat/fork-inferior.c: Update.
2209 * nat/x86-linux-dregs.c: Update.
2210 * nto-procfs.c: Update.
2211 * obsd-nat.c: Update.
2212 * procfs.c: Update.
2213 * progspace.c: Update.
2214 * remote.c: Update.
2215 * rs6000-nat.c: Update.
2216 * s390-linux-nat.c: Update.
2217 * sol-thread.c: Update.
2218 * spu-linux-nat.c: Update.
2219 * target.c: Update.
2220 * top.c: Update.
2221 * tracefile-tfile.c: Update.
2222 * windows-nat.c: Update.
2223
2224 2018-07-03 Tom Tromey <tom@tromey.com>
2225
2226 * common/ptid.h (ptid_build): Don't declare.
2227 * common/ptid.c (ptid_build): Remove.
2228 * aix-thread.c: Update.
2229 * bsd-kvm.c: Update.
2230 * bsd-uthread.c: Update.
2231 * common/agent.c: Update.
2232 * common/ptid.c: Update.
2233 * common/ptid.h: Update.
2234 * corelow.c: Update.
2235 * darwin-nat.c: Update.
2236 * fbsd-nat.c: Update.
2237 * gnu-nat.c: Update.
2238 * linux-fork.c: Update.
2239 * linux-nat.c: Update.
2240 * linux-thread-db.c: Update.
2241 * nat/linux-osdata.c: Update.
2242 * nat/linux-procfs.c: Update.
2243 * nto-procfs.c: Update.
2244 * obsd-nat.c: Update.
2245 * proc-service.c: Update.
2246 * procfs.c: Update.
2247 * ravenscar-thread.c: Update.
2248 * remote-sim.c: Update.
2249 * remote.c: Update.
2250 * sol-thread.c: Update.
2251 * target.c: Update.
2252 * windows-nat.c: Update.
2253
2254 2018-07-03 Tom Tromey <tom@tromey.com>
2255
2256 * infrun.c (follow_exec): Use exit_inferior_silent.
2257 * inferior.c (exit_inferior_num_silent): Remove.
2258 * inferior.h (exit_inferior_num_silent): Don't declare.
2259
2260 2018-07-03 Tom Tromey <tom@tromey.com>
2261
2262 PR cli/23340:
2263 * darwin-nat.c (darwin_attach_pid): Reset inferior and
2264 inferior_ptid on error.
2265
2266 2018-07-02 Maciej W. Rozycki <macro@mips.com>
2267 Simon Marchi <simon.marchi@polymtl.ca>
2268
2269 PR tdep/8282
2270 * disasm.h (gdb_disassembler): Add
2271 `m_disassembler_options_holder'. member
2272 * disasm.c (get_all_disassembler_options): New function.
2273 (gdb_disassembler::gdb_disassembler): Use it.
2274 (gdb_buffered_insn_length_init_dis): Likewise.
2275 (gdb_buffered_insn_length): Adjust accordingly.
2276 (set_disassembler_options): Handle options with arguments.
2277 (show_disassembler_options_sfunc): Likewise. Add a leading new
2278 line if showing options with descriptions.
2279 (disassembler_options_completer): Adapt to using the
2280 `disasm_options_and_args_t' structure.
2281 * mips-tdep.c (mips_disassembler_options): New variable.
2282 (mips_disassembler_options_o32): Likewise.
2283 (mips_disassembler_options_n32): Likewise.
2284 (mips_disassembler_options_n64): Likewise.
2285 (gdb_print_insn_mips): Don't set `disassembler_options'.
2286 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
2287 functions.
2288 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
2289 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
2290 `gdbarch_disassembler_options_implicit' and
2291 `gdbarch_valid_disassembler_options'.
2292 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
2293 `disasm_options_and_args_t' structure.
2294 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
2295 method.
2296 (valid_disassembler_options): Switch from `disasm_options_t' to
2297 the `disasm_options_and_args_t' structure.
2298 * NEWS: Document `set disassembler-options' support for the MIPS
2299 target.
2300 * gdbarch.h: Regenerate.
2301 * gdbarch.c: Regenerate.
2302
2303 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
2304
2305 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
2306
2307 2018-06-29 Joel Brobecker <brobecker@adacore.com>
2308
2309 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
2310 parameter in call to amd64_target_description.
2311 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
2312 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
2313 (amd64fbsd_init_abi): Likewise.
2314 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
2315 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
2316 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
2317 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
2318
2319 2018-06-29 Pedro Alves <palves@redhat.com>
2320
2321 * gdb/amd64-tdep.h (amd64_create_target_description): Add
2322 "segments" parameter.
2323 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
2324 (_initialize_amd64_tdep): Update call to
2325 amd64_create_target_description.
2326 (amd64_target_description): Add "segments" parameter. Adjust
2327 the implementation to use it.
2328 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
2329 call to amd64_create_target_description.
2330 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
2331 * gdb/arch/amd64.h (amd64_create_target_description): Add
2332 "segments" register.
2333 * gdb/arch/amd64.c (amd64_create_target_description): Add
2334 "segments" parameter. Call create_feature_i386_64bit_segments
2335 only if SEGMENTS is true.
2336 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
2337 call to amd64_create_target_description.
2338
2339 2018-06-29 Pedro Alves <palves@redhat.com>
2340
2341 * thread.c (thread_target_id_str): New, factored out from ...
2342 (print_thread_info_1): ... here. Use it to compute the max
2343 "Target Id" column width.
2344
2345 2018-06-29 Pedro Alves <palves@redhat.com>
2346
2347 * remote.c (remote_target::extra_thread_info): Delete
2348 'display_buf' and 'n' locals. from the cache, regardless of
2349 packet mechanims is in use. Use cache for qThreadExtra and qP
2350 methods too.
2351
2352 2018-06-29 Pedro Alves <palves@redhat.com>
2353
2354 * blockframe.c (find_pc_sect_containing_function): New function.
2355 * breakpoint.c (print_breakpoint_location): Don't call
2356 find_pc_sect_function.
2357 * linespec.c (create_sals_line_offset): Record the location's
2358 symbol in the sal.
2359 * linespec.c (convert_address_location_to_sals): Fill in sal's
2360 symbol with find_pc_sect_containing_function.
2361 * symtab.c (find_function_start_sal): Rename to ...
2362 (find_function_start_sal_1): ... this.
2363 (find_function_start_sal): Reimplement as wrapper around
2364 find_function_start_sal_1, and use
2365 find_pc_sect_containing_function to fill in the sal's symbol.
2366 (find_function_start_sal(symbol*, bool)): Adjust.
2367 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
2368 comments.
2369 (find_pc_sect_containing_function): Declare.
2370
2371 2018-06-29 Pedro Alves <palves@redhat.com>
2372
2373 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
2374 true if the the location has no symbol.
2375
2376 2018-06-28 Tom Tromey <tom@tromey.com>
2377
2378 * NEWS: Mention --enable-codesign.
2379 * silent-rules.mk (ECHO_SIGN): New variable.
2380 * configure.ac: Add --enable-codesign.
2381 * configure: Rebuild.
2382 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
2383 (gdb$(EXEEXT)): Optionally invoke codesign.
2384
2385 2018-06-28 Pedro Alves <palves@redhat.com>
2386
2387 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
2388 comments.
2389 (switch_to_thread_no_regs): Adjust comment.
2390 * infcmd.c (stop_pc): Delete.
2391 (post_create_inferior, info_program_command): Replace references
2392 to stop_pc with references to thread_info->suspend.stop_pc.
2393 * inferior.h (stop_pc): Delete declaration.
2394 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
2395 (handle_inferior_event_1, handle_signal_stop)
2396 (process_event_stop_test, keep_going_stepped_thread)
2397 (handle_step_into_function, handle_step_into_function_backward)
2398 (print_stop_location): Replace references to stop_pc with
2399 references to thread_info->suspend.stop_pc.
2400 (struct infcall_suspend_state) <stop_pc>: Delete field.
2401 (save_infcall_suspend_state, restore_infcall_suspend_state):
2402 Remove references to inf_stat->stop_pc.
2403 * linux-fork.c (fork_load_infrun_state): Likewise.
2404 * record-btrace.c (record_btrace_set_replay): Likewise.
2405 * record-full.c (record_full_goto_entry): Likewise.
2406 * remote.c (print_one_stopped_thread): Likewise.
2407 * target.c (target_resume): Extend comment.
2408 * thread.c (set_executing_thread): New.
2409 (set_executing): Use it.
2410 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
2411 Remove references to stop_pc.
2412
2413 2018-06-28 Pedro Alves <palves@redhat.com>
2414
2415 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
2416 Moving fetching stop_pc until after ecs->event_thread is refreshed.
2417
2418 2018-06-28 Tom Tromey <tom@tromey.com>
2419
2420 * coffread.c (coff_symfile_finish): Update.
2421 * xcoffread.c (xcoff_symfile_finish): Update.
2422 * elfread.c (elf_symfile_finish): Update.
2423 * symfile.h (dwarf2_free_objfile): Don't declare.
2424 * dwarf2read.c (_initialize_dwarf2_read): Use
2425 register_objfile_data_with_cleanup.
2426 (dwarf2_free_objfile): Now static. Change signature.
2427
2428 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2429
2430 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
2431 option "-o" to add-symbol-file-load to add an offset to each
2432 section's load address.
2433 * symfile.c (set_objfile_default_section_offset): New function.
2434
2435 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2436
2437 * symfile.c (add_symbol_file_command): Make sure that sections
2438 with the same name are sorted in the same order.
2439
2440 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2441
2442 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
2443 require the second argument. If omitted, load sections at the
2444 addresses specified in the file.
2445
2446 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2447
2448 * symfile.c (symbol_file_command, symbol_file_add_main_1)
2449 (_initialize_symfile): Add option "-o" to symbol-file to add an
2450 offset to each section of the symbol file.
2451
2452 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2453
2454 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
2455
2456 2018-06-27 Tom Tromey <tom@tromey.com>
2457
2458 * stack.c (_initialize_stack): Update "func" help text.
2459
2460 2018-06-27 Tom Tromey <tom@tromey.com>
2461
2462 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
2463 std::vector.
2464 (unwind_infopy_str, pyuw_create_unwind_info)
2465 (unwind_infopy_add_saved_register, pyuw_sniffer)
2466 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
2467 Update.
2468 (struct saved_reg): Add constructor.
2469 <value>: Now a gdbpy_ref<>.
2470
2471 2018-06-27 Tom Tromey <tom@tromey.com>
2472
2473 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
2474
2475 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2476
2477 * gdb-gdb.py.in: Format using autopep8.
2478
2479 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2480
2481 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
2482 (type_lookup_function): Recognize CORE_ADDR values.
2483
2484 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2485
2486 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
2487 print tag_name.
2488
2489 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2490
2491 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
2492 <__lt__>: Add.
2493
2494 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2495
2496 * gdb-gdb.py: Move to...
2497 * gdb-gdb.py.in: ... here.
2498 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
2499 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
2500 dependencies.
2501 (distclean): Remove gdb-gdb.py when cleaning.
2502 (gdb-gdb.py, gdb-gdb.gdb): New rules.
2503 * configure: Re-generate.
2504
2505 2018-06-27 Pedro Alves <palves@redhat.com>
2506
2507 * proc-service.c (get_ps_regcache): New.
2508 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2509 (ps_lsetfpregs): Use it.
2510
2511 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
2512
2513 PR gdb/21695
2514 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
2515 (dwarf_decode_lines_1): Adjust.
2516
2517 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2518
2519 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
2520 override.
2521 <info_proc>: Likewise.
2522
2523 2018-06-26 Joel Brobecker <brobecker@adacore.com>
2524
2525 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
2526 to windows_fetch_one_register, and only handle the case of
2527 fetching one register. Move the code that reloads the context
2528 and iterates over all registers if R is negative to...
2529 (windows_nat_target::fetch_registers): ... here.
2530 (do_windows_store_inferior_registers): Rename to
2531 windows_store_one_register, and only handle the case of storing
2532 one register. Move the code that handles the case where r is
2533 negative to...
2534 (windows_nat_target::store_registers) ... here.
2535
2536 2018-06-26 Tom Tromey <tom@tromey.com>
2537
2538 PR rust/22574:
2539 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
2540 * rust-lang.c (rust_print_struct_def): Add podata parameter.
2541 Update.
2542 (rust_internal_print_type): Add podata parameter.
2543 (rust_print_type): Update.
2544
2545 2018-06-26 Tom Tromey <tom@tromey.com>
2546
2547 * typeprint.h (struct print_offset_data) <update, finish,
2548 maybe_print_hole>: New methods.
2549 <indentation>: New constant.
2550 * typeprint.c (print_offset_data::indentation): Define.
2551 (print_offset_data::maybe_print_hole, print_offset_data::update)
2552 (print_offset_data::finish): Move from c-typeprint.c and rename.
2553 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
2554 (print_spaces_filtered_with_print_options): Update.
2555 (c_print_type_union_field_offset, maybe_print_hole)
2556 (c_print_type_struct_field_offset): Move to typeprint.c and
2557 rename.
2558 (c_type_print_base_struct_union): Update.
2559
2560 2018-06-25 Pedro Alves <palves@redhat.com>
2561
2562 * gdbthread.h (thread_info_ref, delete_thread)
2563 (delete_thread_silent, first_thread_of_inferior)
2564 (any_thread_of_inferior, switch_to_thread)
2565 (enable_thread_stack_temporaries)
2566 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2567 (get_last_thread_stack_temporary)
2568 (value_in_thread_stack_temporaries, can_access_registers_thread):
2569 Spell out "struct thread_info" instead of just "thread_info".
2570 * inferior.h (notice_new_inferior): Likewise.
2571
2572 2018-06-25 Pedro Alves <palves@redhat.com>
2573
2574 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2575 pass thread_info pointer to delete_thread.
2576 (windows_nat_target::detach): Pass inferior pointer to
2577 detach_inferior.
2578 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
2579 delete_thread.
2580 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
2581 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
2582 and pass a thread_info pointer to delete_thread.
2583 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
2584 pass thread_info pointer to delete_thread.
2585 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
2586 delete_thread_silent call.
2587 * procfs.c (procfs_target::detach): Pass inferior pointer to
2588 detach_inferior.
2589 (procfs_target::wait): Pass thread_info pointer to delete_thread.
2590 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
2591 delete_thread_silent call.
2592 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2593 pass thread_info pointer to delete_thread.
2594 (windows_nat_target::detach): Pass inferior pointer to
2595 delete_inferior.
2596
2597 2018-06-22 Alan Hayward <alan.hayward@arm.com>
2598
2599 * regcache.c (readable_regcache::read_part): Fix asserts.
2600 (reg_buffer::raw_collect_part): New function.
2601 (regcache::write_part): Fix asserts.
2602 (reg_buffer::raw_supply_part): New function.
2603 (regcache::transfer_regset_register): New helper function.
2604 (regcache::transfer_regset): Call new functions.
2605 (regcache_supply_regset): Use gdb_byte*.
2606 (regcache::supply_regset): Likewise.
2607 (regcache_collect_regset): Likewise.
2608 (regcache::collect_regset): Likewise.
2609 * regcache.h (reg_buffer::raw_collect_part): New declaration.
2610 (reg_buffer::raw_supply_part): Likewise.
2611 (regcache::transfer_regset_register): Likewise.
2612 (regcache::transfer_regset): Use gdb_byte*.
2613
2614 2018-06-22 Alan Hayward <alan.hayward@arm.com>
2615
2616 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
2617
2618 2018-06-21 Pedro Alves <palves@redhat.com>
2619
2620 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
2621 instead of a ptid_t. All callers adjusted.
2622 * ada-tasks.c (ada_get_task_number): Likewise. All callers
2623 adjusted.
2624 (print_ada_task_info, display_current_task_id, task_command_1):
2625 Adjust.
2626 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
2627 inferior_thread.
2628 (breakpoint_kind): Adjust.
2629 (remove_breakpoints_pid): Rename to ...
2630 (remove_breakpoints_inf): ... this. Adjust to take an inferior
2631 pointer. All callers adjusted.
2632 (bpstat_clear_actions): Use inferior_thread.
2633 (get_bpstat_thread): New.
2634 (bpstat_do_actions): Use it.
2635 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
2636 to take a thread_info pointer. All callers adjusted.
2637 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
2638 (breakpoint_re_set_thread): Use inferior_thread.
2639 * breakpoint.h (struct inferior): Forward declare.
2640 (bpstat_stop_status): Update.
2641 (remove_breakpoints_pid): Delete.
2642 (remove_breakpoints_inf): New.
2643 * bsd-uthread.c (bsd_uthread_target::wait)
2644 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
2645 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
2646 (maint_btrace_packet_history_cmd)
2647 (maint_btrace_clear_packet_history_cmd): Adjust.
2648 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
2649 inferior_thread.
2650 * cli/cli-interp.c: Include "inferior.h".
2651 * common/refcounted-object.h (struct
2652 refcounted_object_ref_policy): New.
2653 * compile/compile-object-load.c: Include gdbthread.h.
2654 (store_regs): Use inferior_thread.
2655 * corelow.c (core_target::close): Use current_inferior.
2656 (core_target_open): Adjust to use first_thread_of_inferior and use
2657 the current inferior.
2658 * ctf.c (ctf_target::close): Adjust to use current_inferior.
2659 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
2660 <thread>: ... this new field. All references adjusted.
2661 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
2662 Take a thread_info pointer instead of a ptid_t.
2663 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
2664 (dummy_frame_discard, register_dummy_frame_dtor): Take a
2665 thread_info pointer instead of a ptid_t.
2666 * elfread.c: Include "inferior.h".
2667 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
2668 Use inferior_thread.
2669 * eval.c (evaluate_subexp): Likewise.
2670 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
2671 inferior_thread.
2672 * gdb_proc_service.h (struct thread_info): Forward declare.
2673 (struct ps_prochandle) <ptid>: Delete, replaced by ...
2674 <thread>: ... this new field. All references adjusted.
2675 * gdbarch.h, gdbarch.c: Regenerate.
2676 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
2677 'thread' parameter. All implementations and callers adjusted.
2678 * gdbthread.h (thread_info) <set_running>: New method.
2679 (delete_thread, delete_thread_silent): Take a thread_info pointer
2680 instead of a ptid.
2681 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
2682 (first_thread_of_process): Delete, replaced by ...
2683 (first_thread_of_inferior): ... this new function. All callers
2684 adjusted.
2685 (any_live_thread_of_process): Delete, replaced by ...
2686 (any_live_thread_of_inferior): ... this new function. All callers
2687 adjusted.
2688 (switch_to_thread, switch_to_no_thread): Declare.
2689 (is_executing): Delete.
2690 (enable_thread_stack_temporaries): Update comment.
2691 <enable_thread_stack_temporaries>: Take a thread_info pointer
2692 instead of a ptid_t. Incref the thread.
2693 <~enable_thread_stack_temporaries>: Decref the thread.
2694 <m_ptid>: Delete
2695 <m_thr>: New.
2696 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2697 (get_last_thread_stack_temporary)
2698 (value_in_thread_stack_temporaries, can_access_registers_thread):
2699 Take a thread_info pointer instead of a ptid_t. All callers
2700 adjusted.
2701 * infcall.c (get_call_return_value): Use inferior_thread.
2702 (run_inferior_call): Work with thread pointers instead of ptid_t.
2703 (call_function_by_hand_dummy): Work with thread pointers instead
2704 of ptid_t. Use thread_info_ref.
2705 * infcmd.c (proceed_thread_callback): Access thread's state
2706 directly.
2707 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
2708 access thread's state directly.
2709 (continue_command): Use inferior_thread.
2710 (info_program_command): Use find_thread_ptid and access thread
2711 state directly.
2712 (proceed_after_attach_callback): Use thread state directly.
2713 (notice_new_inferior): Take a thread_info pointer instead of a
2714 ptid_t. All callers adjusted.
2715 (exit_inferior): Take an inferior pointer instead of a pid. All
2716 callers adjusted.
2717 (exit_inferior_silent): New.
2718 (detach_inferior): Delete.
2719 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
2720 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
2721 (detach_inferior_command, kill_inferior_command): Use
2722 find_inferior_id instead of valid_gdb_inferior_id and
2723 gdb_inferior_id_to_pid.
2724 (inferior_command): Use inferior and thread pointers.
2725 * inferior.h (struct thread_info): Forward declare.
2726 (notice_new_inferior): Take a thread_info pointer instead of a
2727 ptid_t. All callers adjusted.
2728 (detach_inferior): Delete declaration.
2729 (exit_inferior, exit_inferior_silent): Take an inferior pointer
2730 instead of a pid. All callers adjusted.
2731 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
2732 (valid_gdb_inferior_id): Delete.
2733 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
2734 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
2735 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
2736 ...
2737 <inf>: ... this new field.
2738 <step_ptid>: Delete, replaced by ...
2739 <step_thread>: ... this new field.
2740 (get_displaced_stepping_state): Take an inferior pointer instead
2741 of a pid. All callers adjusted.
2742 (displaced_step_in_progress_any_inferior): Adjust.
2743 (displaced_step_in_progress_thread): Take a thread pointer instead
2744 of a ptid_t. All callers adjusted.
2745 (displaced_step_in_progress, add_displaced_stepping_state): Take
2746 an inferior pointer instead of a pid. All callers adjusted.
2747 (get_displaced_step_closure_by_addr): Adjust.
2748 (remove_displaced_stepping_state): Take an inferior pointer
2749 instead of a pid. All callers adjusted.
2750 (displaced_step_prepare_throw, displaced_step_prepare)
2751 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
2752 All callers adjusted.
2753 (start_step_over): Adjust.
2754 (infrun_thread_ptid_changed): Remove bit updating ptids in the
2755 displaced step queue.
2756 (do_target_resume): Adjust.
2757 (fetch_inferior_event): Use inferior_thread.
2758 (context_switch, get_inferior_stop_soon): Take an
2759 execution_control_state pointer instead of a ptid_t. All callers
2760 adjusted.
2761 (switch_to_thread_cleanup): Delete.
2762 (stop_all_threads): Use scoped_restore_current_thread.
2763 * inline-frame.c: Include "gdbthread.h".
2764 (inline_state) <inline_state>: Take a thread pointer instead of a
2765 ptid_t. All callers adjusted.
2766 <ptid>: Delete, replaced by ...
2767 <thread>: ... this new field.
2768 (find_inline_frame_state): Take a thread pointer instead of a
2769 ptid_t. All callers adjusted.
2770 (skip_inline_frames, step_into_inline_frame)
2771 (inline_skipped_frames, inline_skipped_symbol): Take a thread
2772 pointer instead of a ptid_t. All callers adjusted.
2773 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
2774 (inline_skipped_frames, inline_skipped_symbol): Likewise.
2775 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
2776 pointers directly.
2777 * linux-nat.c (get_detach_signal): Likewise.
2778 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
2779 (thread_db_notice_clone): Adjust.
2780 (thread_db_find_new_threads_silently)
2781 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
2782 a thread pointer instead of a ptid_t. All callers adjusted.
2783 * mi/mi-cmd-var.c: Include "inferior.h".
2784 (mi_cmd_var_update_iter): Update to use thread pointers.
2785 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
2786 inferior directly.
2787 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
2788 out to ...
2789 (mi_output_running): ... this new function.
2790 (mi_on_resume_1): Adjust to use it.
2791 (mi_user_selected_context_changed): Adjust to use inferior_thread.
2792 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
2793 directly.
2794 (interrupt_thread_callback): : Adjust to use thread and inferior
2795 pointers.
2796 * proc-service.c: Include "gdbthread.h".
2797 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
2798 * progspace-and-thread.c: Include "inferior.h".
2799 * progspace.c: Include "inferior.h".
2800 * python/py-exitedevent.c (create_exited_event_object): Adjust to
2801 hold a reference to an inferior_object.
2802 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
2803 inferior_thread.
2804 * python/py-inferior.c (struct inferior_object): Give the type a
2805 tag name instead of a typedef.
2806 (python_on_normal_stop): No need to check if the current thread is
2807 listed.
2808 (inferior_to_inferior_object): Change return type to
2809 inferior_object. All callers adjusted.
2810 (find_thread_object): Delete, bits factored out to ...
2811 (thread_to_thread_object): ... this new function.
2812 * python/py-infthread.c (create_thread_object): Use
2813 inferior_to_inferior_object.
2814 (thpy_is_stopped): Use thread pointer directly.
2815 (gdbpy_selected_thread): Use inferior_thread.
2816 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
2817 field, replaced with ...
2818 <thread>: ... this new field. All users adjusted.
2819 (btpy_insn_or_gap_new): Drop const.
2820 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
2821 callers adjusted.
2822 * python/py-record.c: Include "gdbthread.h".
2823 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2824 a ptid_t. All callers adjusted.
2825 (gdbpy_current_recording): Use inferior_thread.
2826 * python/py-record.h (recpy_record_object) <ptid>: Delete
2827 field, replaced with ...
2828 <thread>: ... this new field. All users adjusted.
2829 (recpy_element_object) <ptid>: Delete
2830 field, replaced with ...
2831 <thread>: ... this new field. All users adjusted.
2832 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2833 a ptid_t. All callers adjusted.
2834 * python/py-threadevent.c: Include "gdbthread.h".
2835 (get_event_thread): Use thread_to_thread_object.
2836 * python/python-internal.h (struct inferior_object): Forward
2837 declare.
2838 (find_thread_object, find_inferior_object): Delete declarations.
2839 (thread_to_thread_object, inferior_to_inferior_object): New
2840 declarations.
2841 * record-btrace.c: Include "inferior.h".
2842 (require_btrace_thread): Use inferior_thread.
2843 (record_btrace_frame_sniffer)
2844 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
2845 (get_thread_current_frame): Use scoped_restore_current_thread and
2846 switch_to_thread.
2847 (get_thread_current_frame): Use thread pointer directly.
2848 (record_btrace_replay_at_breakpoint): Use thread's inferior
2849 pointer directly.
2850 * record-full.c: Include "inferior.h".
2851 * regcache.c: Include "gdbthread.h".
2852 (get_thread_arch_regcache): Use the inferior's address space
2853 directly.
2854 (get_thread_regcache, registers_changed_thread): New.
2855 * regcache.h (get_thread_regcache(thread_info *thread)): New
2856 overload.
2857 (registers_changed_thread): New.
2858 (remote_target) <remote_detach_1>: Swap order of parameters.
2859 (remote_add_thread): <remote_add_thread>: Return the new thread.
2860 (get_remote_thread_info(ptid_t)): New overload.
2861 (remote_target::remote_notice_new_inferior): Use thread pointers
2862 directly.
2863 (remote_target::process_initial_stop_replies): Use
2864 thread_info::set_running.
2865 (remote_target::remote_detach_1, remote_target::detach)
2866 (extended_remote_target::detach): Adjust.
2867 * stack.c (frame_show_address): Use inferior_thread.
2868 * target-debug.h (target_debug_print_thread_info_pp): New.
2869 * target-delegates.c: Regenerate.
2870 * target.c (default_thread_address_space): Delete.
2871 (memory_xfer_partial_1): Use current_inferior.
2872 (target_detach): Use current_inferior.
2873 (target_thread_address_space): Delete.
2874 (generic_mourn_inferior): Use current_inferior.
2875 * target.h (struct target_ops) <thread_address_space>: Delete.
2876 (target_thread_address_space): Delete.
2877 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
2878 pointers directly.
2879 (delete_thread_1, delete_thread, delete_thread_silent): Take a
2880 thread pointer instead of a ptid_t. Adjust all callers.
2881 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
2882 (first_thread_of_process): Delete, replaced by ...
2883 (first_thread_of_inferior): ... this new function. All callers
2884 adjusted.
2885 (any_thread_of_process): Rename to ...
2886 (any_thread_of_inferior): ... this, and take an inferior pointer.
2887 (any_live_thread_of_process): Rename to ...
2888 (any_live_thread_of_inferior): ... this, and take an inferior
2889 pointer.
2890 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2891 (value_in_thread_stack_temporaries)
2892 (get_last_thread_stack_temporary): Take a thread pointer instead
2893 of a ptid_t. Adjust all callers.
2894 (thread_info::set_running): New.
2895 (validate_registers_access): Use inferior_thread.
2896 (can_access_registers_ptid): Rename to ...
2897 (can_access_registers_thread): ... this, and take a thread
2898 pointer.
2899 (print_thread_info_1): Adjust to compare thread pointers instead
2900 of ptids.
2901 (switch_to_no_thread, switch_to_thread): Make extern.
2902 (scoped_restore_current_thread::~scoped_restore_current_thread):
2903 Use m_thread pointer directly.
2904 (scoped_restore_current_thread::scoped_restore_current_thread):
2905 Use inferior_thread.
2906 (thread_command): Use thread pointer directly.
2907 (thread_num_make_value_helper): Use inferior_thread.
2908 * top.c (execute_command): Use inferior_thread.
2909 * tui/tui-interp.c: Include "inferior.h".
2910 * varobj.c (varobj_create): Use inferior_thread.
2911 (value_of_root_1): Use find_thread_global_id instead of
2912 global_thread_id_to_ptid.
2913
2914 2018-06-21 Alan Hayward <alan.hayward@arm.com>
2915
2916 * regcache.c (readable_regcache::read_part): Avoid memcpy when
2917 possible.
2918 (regcache::write_part): Likewise.
2919 (readable_regcache::cooked_read_part): Update comment.
2920 (readable_regcache::cooked_write_part): Likewise.
2921 * regcache.h: (readable_regcache::read_part): Likewise.
2922 (regcache::write_part): Likewise.
2923
2924 2018-06-21 Richard Bunt <richard.bunt@arm.com>
2925 Dirk Schubert <dirk.schubert@arm.com>
2926
2927 * aarch64-linux-nat.c (post_attach): New.
2928 (aarch64_linux_nat_target::post_attach): Override post_attach to
2929 record the number of hardware debug registers.
2930
2931 2018-06-20 Tom Tromey <tom@tromey.com>
2932
2933 * python/py-param.c (add_setshow_generic): Make parameters const.
2934 (parmpy_init): Update.
2935
2936 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
2937
2938 * regcache.h (regcache_cooked_read_ftype): Rename to...
2939 (register_read_ftype): ...this, change type to function_view.
2940 (class reg_buffer) <save>: Remove src parameter.
2941 (readonly_detached_regcache) <readonly_detached_regcache>: Make
2942 parameter non-const in first overload. Remove src parameter in
2943 second overload.
2944 * regcache.c (do_cooked_read): Remove.
2945 (readonly_detached_regcache::readonly_detached_regcache): Make
2946 parameter non-const, adjust call to other constructor.
2947 (reg_buffer::save): Remove src parameter.
2948 * frame.c (do_frame_register_read): Remove.
2949 (frame_save_as_regcache): Use lambda function.
2950 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
2951 parameter to ppu2spu_data *.
2952 (ppu2spu_sniffer): Use lambda function.
2953
2954 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
2955
2956 * record-full.c (record_full_target::insert_breakpoint): Remove
2957 "struct" keyword, add const.
2958
2959 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
2960
2961 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
2962 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
2963 * configure.ac: Remove AC_PREREQ, add missing quoting.
2964 * gnulib/configure.ac: Modernize usage of
2965 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
2966 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
2967 (AUTOMAKE_VERSION): Bump to 1.15.1.
2968 * configure: Re-generate.
2969 * config.in: Re-generate.
2970 * aclocal.m4: Re-generate.
2971 * gnulib/aclocal.m4: Re-generate.
2972 * gnulib/config.in: Re-generate.
2973 * gnulib/configure: Re-generate.
2974 * gnulib/import/Makefile.in: Re-generate.
2975
2976 2018-06-19 Pedro Alves <palves@redhat.com>
2977
2978 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
2979 (lookup_minimal_symbol_by_pc_section): ... here with
2980 gdb_assert_not_reached added.
2981
2982 2018-06-19 Pedro Alves <palves@redhat.com>
2983
2984 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
2985 parameter with a block parameter. Compare location's block symbol
2986 with the frame's block instead of addresses.
2987 (skip_inline_frames): Pass the current block instead of the
2988 frame's address. Break out as soon as we determine the frame
2989 should not be skipped.
2990
2991 2018-06-18 Tom Tromey <tom@tromey.com>
2992
2993 * solib-aix.c (solib_aix_get_section_offsets): Return
2994 unique_xmalloc_ptr.
2995 (solib_aix_solib_create_inferior_hook): Update.
2996
2997 2018-06-18 Tom Tromey <tom@tromey.com>
2998
2999 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
3000
3001 2018-06-18 Tom Tromey <tom@tromey.com>
3002
3003 * solib-frv.c (frv_relocate_main_executable): Use
3004 unique_xmalloc_ptr.
3005 * solib-dsbt.c (dsbt_relocate_main_executable): Use
3006 unique_xmalloc_ptr.
3007
3008 2018-06-18 Tom Tromey <tom@tromey.com>
3009
3010 * objfiles.h (inhibit_section_map_updates): Update.
3011 (resume_section_map_updates, resume_section_map_updates_cleanup):
3012 Remove.
3013 * solib-svr4.c (svr4_handle_solib_event): Update.
3014 * objfiles.c (inhibit_section_map_updates): Return
3015 scoped_restore_tmpl<int>.
3016 (resume_section_map_updates, resume_section_map_updates_cleanup):
3017 Remove.
3018
3019 2018-06-18 Tom Tromey <tom@tromey.com>
3020
3021 * valprint.h (read_string): Update.
3022 * valprint.c (read_string): Change type of "buffer".
3023 (val_print_string): Update.
3024 * python/py-value.c (valpy_string): Update.
3025 * language.h (struct language_defn) <la_get_string>: Change
3026 type of "buffer".
3027 (default_get_string, c_get_string): Update.
3028 * language.c (default_get_string): Change type of "buffer".
3029 * guile/scm-value.c (gdbscm_value_to_string): Update.
3030 * c-lang.c (c_get_string): Change type of "buffer".
3031
3032 2018-06-18 Tom Tromey <tom@tromey.com>
3033
3034 * ser-mingw.c (struct pipe_state_destroyer): New.
3035 (pipe_state_up): New typedef.
3036 (cleanup_pipe_state): Remove.
3037 (pipe_windows_open): Use pipe_state_up. Don't release argv.
3038
3039 2018-06-18 Tom Tromey <tom@tromey.com>
3040
3041 * rust-lang.h (rust_yyerror): Don't declare.
3042 * rust-lang.c (rust_language_defn): Update.
3043 * rust-exp.y (yyerror): Now static.
3044 * parse.c (parse_exp_in_context_1): Update.
3045 * p-lang.h (p_yyerror): Don't declare.
3046 * p-lang.c (p_language_defn): Update.
3047 * p-exp.y (yyerror): Now static.
3048 * opencl-lang.c (opencl_language_defn): Update.
3049 * objc-lang.c (objc_language_defn): Update.
3050 * m2-lang.h (m2_yyerror): Don't declare.
3051 * m2-lang.c (m2_language_defn): Update.
3052 * m2-exp.y (yyerror): Now static.
3053 * language.h (struct language_defn) <la_error>: Remove.
3054 * language.c (unk_lang_error): Remove.
3055 (unknown_language_defn, auto_language_defn): Remove.
3056 * go-lang.h (go_yyerror): Don't declare.
3057 * go-lang.c (go_language_defn): Update.
3058 * go-exp.y (yyerror): Now static.
3059 * f-lang.h (f_yyerror): Don't declare.
3060 * f-lang.c (f_language_defn): Update.
3061 * f-exp.y (yyerror): Now static.
3062 * d-lang.h (d_yyerror): Don't declare.
3063 * d-lang.c (d_language_defn): Update.
3064 * d-exp.y (yyerror): Now static.
3065 * c-lang.h (c_yyerror): Don't declare.
3066 * c-lang.c (c_language_defn, cplus_language_defn)
3067 (asm_language_defn, minimal_language_defn): Update.
3068 * c-exp.y (yyerror): Now static.
3069 * ada-lang.h (ada_yyerror): Don't declare.
3070 * ada-lang.c (ada_language_defn): Update.
3071 * ada-exp.y (yyerror): Now static.
3072
3073 2018-06-18 Alan Hayward <alan.hayward@arm.com>
3074
3075 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
3076 (store_sveregs_to_thread): Likewise.
3077 (aarch64_linux_fetch_inferior_registers): Check for SVE.
3078 (aarch64_linux_store_inferior_registers): Likewise.
3079 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
3080 function.
3081 (aarch64_sve_regs_copy_to_regcache): Likewise.
3082 (aarch64_sve_regs_copy_from_regcache): Likewise.
3083 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
3084 declaration.
3085 (aarch64_sve_regs_copy_to_regcache): Likewise.
3086 (aarch64_sve_regs_copy_from_regcache): Likewise.
3087 (sve_context): Structure from Linux headers.
3088 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
3089 (SVE_SIG_ZREG_SIZE): Likewise.
3090 (SVE_SIG_PREG_SIZE): Likewise.
3091 (SVE_SIG_FFR_SIZE): Likewise.
3092 (SVE_SIG_REGS_OFFSET): Likewise.
3093 (SVE_SIG_ZREGS_OFFSET): Likewise.
3094 (SVE_SIG_ZREG_OFFSET): Likewise.
3095 (SVE_SIG_ZREGS_SIZE): Likewise.
3096 (SVE_SIG_PREGS_OFFSET): Likewise.
3097 (SVE_SIG_PREG_OFFSET): Likewise.
3098 (SVE_SIG_PREGS_SIZE): Likewise.
3099 (SVE_SIG_FFR_OFFSET): Likewise.
3100 (SVE_SIG_REGS_SIZE): Likewise.
3101 (SVE_SIG_CONTEXT_SIZE): Likewise.
3102 (SVE_PT_REGS_MASK): Likewise.
3103 (SVE_PT_REGS_FPSIMD): Likewise.
3104 (SVE_PT_REGS_SVE): Likewise.
3105 (SVE_PT_VL_INHERIT): Likewise.
3106 (SVE_PT_VL_ONEXEC): Likewise.
3107 (SVE_PT_REGS_OFFSET): Likewise.
3108 (SVE_PT_FPSIMD_OFFSET): Likewise.
3109 (SVE_PT_FPSIMD_SIZE): Likewise.
3110 (SVE_PT_SVE_ZREG_SIZE): Likewise.
3111 (SVE_PT_SVE_PREG_SIZE): Likewise.
3112 (SVE_PT_SVE_FFR_SIZE): Likewise.
3113 (SVE_PT_SVE_FPSR_SIZE): Likewise.
3114 (SVE_PT_SVE_FPCR_SIZE): Likewise.
3115 (__SVE_SIG_TO_PT): Likewise.
3116 (SVE_PT_SVE_OFFSET): Likewise.
3117 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
3118 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
3119 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
3120 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
3121 (SVE_PT_SVE_PREG_OFFSET): Likewise.
3122 (SVE_PT_SVE_PREGS_SIZE): Likewise.
3123 (SVE_PT_SVE_FFR_OFFSET): Likewise.
3124 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
3125 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
3126 (SVE_PT_SVE_SIZE): Likewise.
3127 (SVE_PT_SIZE): Likewise.
3128 (HAS_SVE_STATE): New define.
3129
3130 2018-06-18 Alan Hayward <alan.hayward@arm.com>
3131
3132 * nat/aarch64-sve-linux-sigcontext.h: New file.
3133 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
3134 new files.
3135 (SVE_VQ_MIN): Likewise.
3136 (SVE_VQ_MAX): Likewise.
3137 (SVE_VL_MIN): Likewise.
3138 (SVE_VL_MAX): Likewise.
3139 (SVE_NUM_ZREGS): Likewise.
3140 (SVE_NUM_PREGS): Likewise.
3141 (sve_vl_valid): Likewise.
3142 (struct user_sve_header): Likewise.
3143
3144 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
3145 Richard Bunt <Richard.Bunt@arm.com>
3146
3147 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
3148 was requested by GDB.
3149
3150 2018-06-15 Tom de Vries <tdevries@suse.de>
3151
3152 * MAINTAINERS (Write After Approval): Add Tom de Vries.
3153
3154 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
3155
3156 * gnulib/update-gnulib.sh: Print expected versions of
3157 autoconf/aclocal.
3158
3159 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
3160
3161 * arch-utils.c (default_type_align): Use type_length_units.
3162 * gdbtypes.c (type_align): Use type_length_units.
3163
3164 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3165
3166 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
3167 of 'define' command.
3168
3169 2018-06-14 Tom de Vries <tdevries@suse.de>
3170
3171 PR cli/22573
3172 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
3173 get_no_prettyformat_print_options.
3174
3175 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
3176
3177 * sparc-nat.h: Include target.h.
3178 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
3179 <fetch_registers>: Remove this argument in function call.
3180 <store_registers>: Remove this argument in function call, remove
3181 extra semicolon.
3182 <low_forget_process>: Call sparc64_forget_process instead of
3183 sparc_forget_process.
3184
3185 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3186
3187 * procfs.c (_initialize_procfs): Use add_inf_child_target.
3188 (procfs_target::make_corefile_notes): Adjust to new
3189 target_read_alloc return type.
3190
3191 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3192 Stephen Roberts <stephen.roberts@arm.com>
3193
3194 PR gdb/22882
3195 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
3196 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
3197 Move should_notify_stop local into more inner scope.
3198
3199 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3200 Stephen Roberts <stephen.roberts@arm.com>
3201
3202 PR gdb/22882
3203 * infrun.c (resume_1): Add call to mark_async_event_handler.
3204
3205 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3206
3207 * infrun.c (do_target_wait): Change old version of $pc printed.
3208
3209 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
3210
3211 * dwarf2read.c (read_index_from_section): Rename to...
3212 (read_gdb_index_from_section): ... this, update all callers.
3213 (dwarf2_read_index): Rename to...
3214 (dwarf2_read_gdb_index): ... this, update all callers.
3215
3216 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
3217
3218 * gdb/hppa-linux-nat.c
3219 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
3220 hppa_linux_nat_target::fetch_registers.
3221
3222 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3223
3224 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
3225 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
3226 (AARCH64_DWARF_SVE_FFR): Likewise.
3227 (AARCH64_DWARF_SVE_P0): Likewise.
3228 (AARCH64_DWARF_SVE_Z0): Likewise.
3229
3230 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3231
3232 * common/common-regcache.h (raw_compare): New function.
3233 * regcache.c (regcache::raw_compare): Likewise.
3234 * regcache.h (regcache::raw_compare): New declaration.
3235
3236 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3237
3238 * common/common-regcache.h (reg_buffer_common): New structure.
3239 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
3240 (reg_buffer::raw_supply): Likewise.
3241 (reg_buffer::raw_supply_integer): Likewise.
3242 (reg_buffer::raw_supply_zeroed): Likewise.
3243 (reg_buffer::raw_collect): Likewise.
3244 (reg_buffer::raw_collect_integer): Likewise.
3245 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
3246 (reg_buffer::raw_supply): Likewise.
3247 (reg_buffer::raw_supply_integer): Likewise.
3248 (reg_buffer::raw_supply_zeroed): Likewise.
3249 (reg_buffer::raw_collect): Likewise.
3250 (reg_buffer::raw_collect_integer): Likewise.
3251
3252 2018-06-10 Tom Tromey <tom@tromey.com>
3253
3254 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
3255 (class remote_state) <stop_reply_queue>: Now std::vector.
3256 (remote_state::~remote_state)
3257 (remote_target::stop_reply_queue_length): Update.
3258 (struct queue_iter_param, remove_child_of_pending_fork)
3259 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
3260 (check_pending_event_prevents_wildcard_vcont_callback)
3261 (remove_stop_reply_for_inferior)
3262 (remove_stop_reply_of_remote_state)
3263 (remote_notif_remove_once_on_match)
3264 (stop_reply_match_ptid_and_ws)
3265 (remote_kill_child_of_pending_fork): Remove.
3266 (remote_target::remove_new_fork_children)
3267 (remote_target::check_pending_events_prevent_wildcard_vcont)
3268 (remote_target::discard_pending_stop_replies)
3269 (remote_target::discard_pending_stop_replies_in_queue)
3270 (remote_target::remote_notif_remove_queued_reply)
3271 (remote_target::queued_stop_reply)
3272 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
3273 (remote_target::wait, remote_target::kill_new_fork_children)
3274 (remote_target::async): Update.
3275
3276 2018-06-10 Tom Tromey <tom@tromey.com>
3277
3278 * record-full.c (record_full_arch_list_cleanups): Remove.
3279 (record_full_message): Use try/catch.
3280 (record_full_wait_cleanups): Remove.
3281 (record_full_wait_1): Use try/catch.
3282 (record_full_restore): Likewise.
3283
3284 2018-06-10 Tom Tromey <tom@tromey.com>
3285
3286 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
3287 declare VEC. Add constructor.
3288 <in_target_beneath>: Now bool.
3289 (record_full_breakpoints): Now a std::vector, static.
3290 (record_full_sync_record_breakpoints)
3291 (record_full_init_record_breakpoints)
3292 (record_full_target::insert_breakpoint)
3293 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
3294
3295 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
3296
3297 * dwarf2read.c (process_cu_includes): Remove struct keyword.
3298 * serial.c (serial_interface_lookup): Remove struct keyword.
3299
3300 2018-06-10 Tom Tromey <tom@tromey.com>
3301
3302 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
3303 method.
3304 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
3305 a method.
3306 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
3307 method.
3308 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
3309 "beneath" as a method.
3310 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
3311 Use "beneath" as a method.
3312
3313 2018-06-10 Tom Tromey <tom@tromey.com>
3314
3315 * tracefile.c (struct trace_file_writer_deleter): New.
3316 <operator()>: Rename from trace_file_writer_xfree.
3317 (trace_file_writer_up): New typedef.
3318 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
3319
3320 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
3321
3322 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
3323 <m_registers, m_register_status>: Change type to
3324 std::unique_ptr.
3325 * regcache.c (reg_buffer::reg_buffer): Use new instead of
3326 XCNEWVEC.
3327
3328 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
3329
3330 * common/common-regcache.h (enum register_status): Add
3331 underlying type "signed char".
3332 * regcache.h (reg_buffer) <m_register_status>: Change type to
3333 register_status *.
3334 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
3335 register_status instead of signed char.
3336 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
3337 (reg_buffer::get_register_status): Remove cast.
3338 (readable_regcache::raw_read): Remove cast.
3339 (readable_regcache::cooked_read): Remove cast.
3340
3341 2018-06-09 Tom Tromey <tom@tromey.com>
3342
3343 * source.c (reverse_search_command, forward_search_command): Use
3344 scoped_fd.
3345
3346 2018-06-09 Tom Tromey <tom@tromey.com>
3347
3348 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
3349 (serial_ops_list): Now static, std::vector.
3350 (serial_interface_lookup, serial_add_interface): Update.
3351
3352 2018-06-09 Tom Tromey <tom@tromey.com>
3353
3354 * dwarf2read.c (process_cu_includes): Update.
3355 (process_full_comp_unit): Update.
3356 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
3357 std::vector.
3358
3359 2018-06-08 Paul Koning <paul_koning@dell.com>
3360
3361 PR gdb/23252
3362
3363 * python/python.c (do_start_initialization):
3364 Avoid call to internal Python API.
3365 (init__gdb_module): New function.
3366
3367 2018-06-08 Gary Benson <gbenson@redhat.com>
3368
3369 * linux-thread-db.c (valprint.h): New include.
3370 (struct check_thread_db_info): New structure.
3371 (check_thread_db_on_load, tdb_testinfo): New static globals.
3372 (check_thread_db, check_thread_db_callback): New functions.
3373 (try_thread_db_load_1): Run integrity checks if requested.
3374 (maintenance_check_libthread_db): New function.
3375 (_initialize_thread_db): Register "maint check libthread-db"
3376 and "maint set/show check-libthread-db".
3377 * NEWS: Mention the above new commands.
3378
3379 2018-06-08 Tom Tromey <tom@tromey.com>
3380
3381 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
3382 now a method.
3383
3384 2018-06-08 Tom Tromey <tom@tromey.com>
3385
3386 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
3387
3388 2018-06-08 Tom Tromey <tom@tromey.com>
3389
3390 * common/btrace-common.h (struct btrace_data): Add constructor,
3391 destructor, move assignment operator.
3392 <empty, clear, fini>: New methods.
3393 <format>: Initialize.
3394 (btrace_data_init, btrace_data_fini, btrace_data_clear)
3395 (btrace_data_empty): Don't declare.
3396 * common/btrace-common.c (btrace_data_init): Remove.
3397 (btrace_data::fini): Rename from btrace_data_fini.
3398 (btrace_data::empty): Rename from btrace_data_empty.
3399 (btrace_data::clear): Rename from btrace_data_clear. Return
3400 bool.
3401 * btrace.h (make_cleanup_btrace_data): Don't declare.
3402 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
3403 (parse_xml_btrace): Update.
3404 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
3405 (maint_btrace_clear_packet_history_cmd): Update.
3406
3407 2018-06-07 Pedro Alves <palves@redhat.com>
3408
3409 * target.h (target_ops) <beneath>: Now a method. All references
3410 updated.
3411 (class target_stack): New.
3412 * target.c (g_target_stack): New.
3413 (g_current_top_target): Delete.
3414 (current_top_target): Get the top target out of g_target_stack.
3415 (target_stack::push, target_stack::unpush): New.
3416 (push_target, unpush_target): Reimplement.
3417 (target_is_pushed): Reimplement in terms of g_target_stack.
3418 (target_ops::beneath, target_stack::find_beneath): New.
3419
3420 2018-06-07 Pedro Alves <palves@redhat.com>
3421
3422 * target.h (find_target_beneath): Delete declaration.
3423 * target.c (find_target_beneath): Delete definition.
3424 * aix-thread.c: All callers of find_target_beneath adjusted to
3425 call target_ops::beneath instead.
3426 * bsd-uthread.c: Likewise.
3427 * linux-thread-db.c: Likewise.
3428 * ravenscar-thread.c: Likewise.
3429 * sol-thread.c: Likewise.
3430 * spu-multiarch.c: Likewise.
3431
3432 2018-06-07 Pedro Alves <palves@redhat.com>
3433
3434 * target.h (target_ops) <beneath>: Now a method. All references
3435 updated.
3436 (target_ops) <m_beneath>: New.
3437 * target.c (target_ops::beneath): New.
3438 * corelow.c: Adjust all references to target_ops::beneath.
3439 * linux-thread-db.c: Likewise.
3440 * make-target-delegates: Likewise.
3441 * record-btrace.c: Likewise.
3442 * record-full.c: Likewise.
3443 * remote.c: Likewise.
3444 * target.c: Likewise.
3445 * target-delegates.c: Regenerate.
3446
3447 2018-06-07 Pedro Alves <palves@redhat.com>
3448
3449 * target.h (target_stack): Delete.
3450 (current_top_target): Declare function.
3451 * target.c (target_stack): Delete.
3452 (g_current_top_target): New.
3453 (current_top_target): New function.
3454 * auxv.c: Use current_top_target instead of target_stack
3455 throughout.
3456 * avr-tdep.c: Likewise.
3457 * breakpoint.c: Likewise.
3458 * corefile.c: Likewise.
3459 * elfread.c: Likewise.
3460 * eval.c: Likewise.
3461 * exceptions.c: Likewise.
3462 * frame.c: Likewise.
3463 * gdbarch-selftests.c: Likewise.
3464 * gnu-v3-abi.c: Likewise.
3465 * ia64-tdep.c: Likewise.
3466 * ia64-vms-tdep.c: Likewise.
3467 * infcall.c: Likewise.
3468 * infcmd.c: Likewise.
3469 * infrun.c: Likewise.
3470 * linespec.c: Likewise.
3471 * linux-tdep.c: Likewise.
3472 * minsyms.c: Likewise.
3473 * ppc-linux-nat.c: Likewise.
3474 * ppc-linux-tdep.c: Likewise.
3475 * procfs.c: Likewise.
3476 * regcache.c: Likewise.
3477 * remote.c: Likewise.
3478 * rs6000-tdep.c: Likewise.
3479 * s390-linux-nat.c: Likewise.
3480 * s390-tdep.c: Likewise.
3481 * solib-aix.c: Likewise.
3482 * solib-darwin.c: Likewise.
3483 * solib-dsbt.c: Likewise.
3484 * solib-spu.c: Likewise.
3485 * solib-svr4.c: Likewise.
3486 * solib-target.c: Likewise.
3487 * sparc-tdep.c: Likewise.
3488 * sparc64-tdep.c: Likewise.
3489 * spu-tdep.c: Likewise.
3490 * symfile.c: Likewise.
3491 * symtab.c: Likewise.
3492 * target-descriptions.c: Likewise.
3493 * target-memory.c: Likewise.
3494 * target.c: Likewise.
3495 * target.h: Likewise.
3496 * tracefile-tfile.c: Likewise.
3497 * tracepoint.c: Likewise.
3498 * valops.c: Likewise.
3499 * valprint.c: Likewise.
3500 * value.c: Likewise.
3501 * windows-tdep.c: Likewise.
3502 * mi/mi-main.c: Likewise.
3503
3504 2018-06-07 Tom Tromey <tom@tromey.com>
3505
3506 * valprint.h (build_address_symbolic): Declare.
3507 * printcmd.c (print_address_symbolic): Update.
3508 (build_address_symbolic): Change "name" and "filename" to
3509 std::string.
3510 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
3511 Update.
3512 * defs.h (build_address_symbolic): Remove declaration.
3513
3514 2018-06-07 Alan Hayward <alan.hayward@arm.com>
3515
3516 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
3517 (aarch64_vnv_type): Add function.
3518 (aarch64_pseudo_register_name): Add V regs for SVE.
3519 (aarch64_pseudo_register_type): Likewise.
3520 (aarch64_pseudo_register_reggroup_p): Likewise.
3521 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
3522 (aarch64_pseudo_read_value): Add V regs for SVE.
3523 (aarch64_pseudo_write_2): Use V0 offset for SVE
3524 (aarch64_pseudo_write): Add V regs for SVE.
3525 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
3526
3527 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
3528
3529 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
3530 (sve_vl_from_vq): Likewise.
3531
3532 2018-06-05 Tom Tromey <tom@tromey.com>
3533
3534 * cli/cli-cmds.c (show_version): Update.
3535 * top.c (print_gdb_version): Add "interactive" parameter.
3536 Update.
3537 * main.c (captured_main_1): Update.
3538 * top.h (print_gdb_version): Add "interactive" parameter and a
3539 comment.
3540
3541 2018-06-05 David Malcolm <dmalcolm@redhat.com>
3542
3543 * common/enum-flags.h: Add trailing semicolon to example in
3544 comment.
3545
3546 2018-06-05 Tom Tromey <tom@tromey.com>
3547
3548 PR cli/12326:
3549 * NEWS: Add entry about pager.
3550 * utils.c (pagination_disabled_for_command): New global.
3551 (prompt_for_continue): Allow "c" response to prompt.
3552 (reinitialize_more_filter): Clear
3553 pagination_disabled_for_command.
3554 (fputs_maybe_filtered): Check pagination_disabled_for_command.
3555
3556 2018-06-04 Tom Tromey <tom@tromey.com>
3557
3558 * ada-lang.h (ada_lookup_symbol_list): Update.
3559 * ada-lang.c (resolve_subexp): Update.
3560 (symbols_are_identical_enums): Change type of syms. Remove nsyms
3561 parameter.
3562 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
3563 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
3564 results parameter to std::vector.
3565 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
3566 Update.
3567 * ada-exp.y (block_lookup): Update.
3568 (select_possible_type_sym): Change type of syms. Remove nsyms
3569 parameter.
3570 (write_var_or_type, write_name_assoc): Update.
3571
3572 2018-06-04 Joel Brobecker <brobecker@adacore.com>
3573
3574 * windows-nat.c (windows_nat_target::xfer_partial): Return
3575 TARGET_XFER_E_IO if we need to delegate to the target beneath
3576 but BENEATH is NULL.
3577
3578 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
3579
3580 * Makefile.in (config.status): Add configure.nat as a
3581 dependency.
3582
3583 2018-06-04 Tom Tromey <tom@tromey.com>
3584
3585 * cp-name-parser.y (cpname_state): Add method declarations.
3586 (HANDLE_QUAL): Update.
3587 (cpname_state::d_grab, cpname_state::fill_comp)
3588 (cpname_state::make_operator, cpname_state::make_dtor)
3589 (cpname_state::make_builtin_type, cpname_state::make_name)
3590 (cpname_state::d_qualify, cpname_state::d_int_type)
3591 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
3592 (%union): Move earlier.
3593
3594 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3595
3596 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
3597
3598 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3599
3600 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
3601 (aarch64_pseudo_write_1): Likewise.
3602 (aarch64_pseudo_read_value): Use helper.
3603 (aarch64_pseudo_write): Likewise.
3604
3605 2018-06-04 Pedro Alves <palves@redhat.com>
3606
3607 * darwin-nat.c (darwin_ops): Delete.
3608 (darwin_attach_pid): Use get_native_target.
3609
3610 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3611
3612 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
3613 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
3614
3615 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3616
3617 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
3618 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
3619 (aarch64_gdbarch_init): Check for SVE.
3620 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
3621
3622 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3623
3624 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
3625 * aarch64-tdep.h (aarch64_read_description): Likewise.
3626 * arch/aarch64.c (aarch64_create_target_description): Likewise.
3627 * arch/aarch64.h (aarch64_create_target_description): Likewise.
3628 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
3629 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
3630 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
3631
3632 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
3633
3634 * value.c (value_fetch_lazy_bitfield): New.
3635 (value_fetch_lazy_memory): New.
3636 (value_fetch_lazy_register): New.
3637 (value_fetch_lazy): Factor out to smaller functions.
3638
3639 2018-06-01 Tom Tromey <tom@tromey.com>
3640
3641 * cp-name-parser.y (backslashable, represented): Now const.
3642
3643 2018-06-01 Tom Tromey <tom@tromey.com>
3644
3645 * cp-name-parser.y: Include parser-defs.h.
3646 (parser_fprintf): Remove declaration.
3647
3648 2018-06-01 Tom Tromey <tom@tromey.com>
3649
3650 * cp-name-parser.y: Use %pure-parser, %lex-param, and
3651 %parse-param.
3652 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
3653 (global_result): Remove globals.
3654 (struct cpname_state): New.
3655 (yyparse): Don't declare.
3656 (yylex, yyerror): Move declarations after %union.
3657 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
3658 (make_name): Add state parameter.
3659 Update all callers.
3660 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
3661 parameter.
3662 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
3663 Update.
3664 (yylex): Add lvalp, state parameters.
3665 (yyerror): Add state parameter.
3666 (cp_demangled_name_to_comp): Update.
3667
3668 2018-06-01 Tom Tromey <tom@tromey.com>
3669
3670 * cp-name-parser.y (parser_fprintf): Declare.
3671 (GDB_YY_REMAP_PREFIX): Define.
3672 Include yy-remap.h. Don't redefine yy* identifiers.
3673
3674 2018-06-01 Tom Tromey <tom@tromey.com>
3675
3676 * python/py-type.c (typy_legacy_template_argument): Update.
3677 * cp-support.h (cp_demangled_name_to_comp): Update.
3678 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
3679 parameter to be a "std::string *".
3680 (main): Update.
3681
3682 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
3683
3684 * ada-lex.l: Include "diagnostics.h" instead of
3685 "common/diagnostics.h".
3686 * unittests/environ-selftests.c: Likewise.
3687 * common/diagnostics.h: Moved to ../include.
3688
3689 2018-06-01 Joel Brobecker <brobecker@adacore.com>
3690
3691 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
3692 to language_mode_manual while calling breakpoint_re_set_one.
3693
3694 2018-06-01 Tom Tromey <tom@tromey.com>
3695
3696 * valops.c (value_cast_structs, destructor_name_p): Update.
3697 * symtab.c (gdb_mangle_name): Update.
3698 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
3699 Update.
3700 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
3701 (pascal_object_print_value_fields, pascal_object_print_value):
3702 Update.
3703 * p-typeprint.c (pascal_type_print_derivation_info): Update.
3704 * linespec.c (find_methods): Update.
3705 * gdbtypes.h (type_name_no_tag): Remove.
3706 (type_name_or_error): Rename from type_name_no_tag_or_error.
3707 * gdbtypes.c (type_name_no_tag): Remove.
3708 (type_name_or_error): Rename from type_name_no_tag_or_error.
3709 (lookup_struct_elt_type, check_typedef): Update.
3710 * expprint.c (print_subexp_standard): Update.
3711 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
3712 * d-namespace.c (d_lookup_nested_symbol): Update.
3713 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
3714 (cp_print_class_member): Update.
3715 * cp-namespace.c (cp_lookup_nested_symbol): Update.
3716 * completer.c (add_struct_fields): Update.
3717 * c-typeprint.c (cp_type_print_derivation_info)
3718 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
3719 Update.
3720 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
3721 (ada_prefer_type, ada_is_exception_sym): Update.
3722
3723 2018-06-01 Tom Tromey <tom@tromey.com>
3724
3725 * valops.c (enum_constant_from_type, value_namespace_elt)
3726 (value_maybe_namespace_elt): Update.
3727 * valarith.c (find_size_for_pointer_math): Update.
3728 * target-descriptions.c (make_gdb_type): Update.
3729 * symmisc.c (print_symbol): Update.
3730 * stabsread.c (define_symbol, read_type)
3731 (complain_about_struct_wipeout, add_undefined_type)
3732 (cleanup_undefined_types_1): Update.
3733 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
3734 (rust_range_type_p, val_print_struct, rust_print_struct_def)
3735 (rust_internal_print_type, rust_composite_type)
3736 (rust_evaluate_funcall, rust_evaluate_subexp)
3737 (rust_inclusive_range_type_p): Update.
3738 * python/py-type.c (typy_get_tag): Update.
3739 * p-typeprint.c (pascal_type_print_base): Update.
3740 * mdebugread.c (parse_symbol, parse_type): Update.
3741 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
3742 Update.
3743 * guile/scm-type.c (gdbscm_type_tag): Update.
3744 * go-lang.c (sixg_string_p): Update.
3745 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
3746 Update.
3747 * gdbtypes.h (struct main_type) <tag_name>: Remove.
3748 (TYPE_TAG_NAME): Remove.
3749 * gdbtypes.c (type_name_no_tag): Simplify.
3750 (check_typedef, check_types_equal, recursive_dump_type)
3751 (copy_type_recursive, arch_composite_type): Update.
3752 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
3753 in summary mode when needed.
3754 * eval.c (evaluate_funcall): Update.
3755 * dwarf2read.c (fixup_go_packaging, read_structure_type)
3756 (process_structure_scope, read_enumeration_type)
3757 (read_namespace_type, read_module_type, determine_prefix): Update.
3758 * cp-support.c (inspect_type): Update.
3759 * coffread.c (process_coff_symbol, decode_base_type): Update.
3760 * c-varobj.c (c_is_path_expr_parent): Update.
3761 * c-typeprint.c (c_type_print_base_struct_union): Update.
3762 (c_type_print_base_1): Update. Print struct/class/union/enum in
3763 summary when using C language.
3764 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
3765 (gen_maybe_namespace_elt): Update.
3766 * ada-lang.c (ada_type_name): Simplify.
3767 (empty_record, ada_template_to_fixed_record_type_1)
3768 (template_to_static_fixed_type)
3769 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
3770
3771 2018-06-01 Tom Tromey <tom@tromey.com>
3772
3773 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
3774 c_print_type.
3775 * c-typeprint.c (c_print_type_1): Add "language" parameter.
3776 (c_print_type): Update.
3777 (c_print_type): New overload.
3778 (c_type_print_varspec_prefix, c_type_print_args)
3779 (c_type_print_varspec_suffix, c_print_type_no_offsets)
3780 (c_type_print_base_struct_union, c_type_print_base_1)
3781 (cp_type_print_method_args): Add "language" parameter.
3782 (c_type_print_base): Update.
3783 * c-lang.h (c_print_type): Add new overload.
3784
3785 2018-06-01 Tom Tromey <tom@tromey.com>
3786
3787 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
3788 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
3789
3790 2018-06-01 Alan Hayward <alan.hayward@arm.com>
3791
3792 * aarch64-tdep.c (aarch64_sve_register_names): New const
3793 var.
3794 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
3795 (AARCH64_SVE_Z_REGS_NUM): New define.
3796 (AARCH64_SVE_P_REGS_NUM): Likewise.
3797 (AARCH64_SVE_NUM_REGS): Likewise.
3798
3799 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
3800
3801 * nat/linux-ptrace.h [__alpha__]
3802 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
3803 definitions.
3804
3805 2018-05-31 Maciej W. Rozycki <macro@mips.com>
3806
3807 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
3808 the endianness selected.
3809 * NEWS: Document `set endian auto' mode operation update.
3810
3811 2018-05-31 Alan Hayward <alan.hayward@arm.com>
3812
3813 * Makefile.in: Add new header.
3814 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
3815 (sve_vl_from_vg): Likewise.
3816 (sve_vq_from_vl): Likewise.
3817 (sve_vl_from_vq): Likewise.
3818 (sve_vq_from_vg): Likewise.
3819 (sve_vg_from_vq): Likewise.
3820 * configure.nat: Add new c file.
3821 * nat/aarch64-sve-linux-ptrace.c: New file.
3822 * nat/aarch64-sve-linux-ptrace.h: New file.
3823
3824 2018-05-31 Alan Hayward <alan.hayward@arm.com>
3825
3826 * aarch64-linux-nat.c (aarch64_linux_read_description):
3827 Add parmeter zero.
3828 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
3829 Likewise.
3830 * aarch64-tdep.c (tdesc_aarch64_list): Add.
3831 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
3832 (aarch64_gdbarch_init): Add parmeter zero.
3833 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
3834 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
3835 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
3836 parmeter.
3837 * doc/gdb.texinfo: Describe SVE feature
3838 * features/aarch64-sve.c: New file.
3839
3840 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
3841
3842 PR gdb/23210
3843 * gdbarch.sh (significant_addr_bit): Default to zero when
3844 not set by target architecture.
3845 * gdbarch.c: Re-generated.
3846 * utils.c (address_significant): Update.
3847
3848 2018-05-30 Joel Brobecker <brobecker@adacore.com>
3849
3850 * stack.c (func_command): Remove trailing newline in call to error.
3851
3852 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3853
3854 * regcache.h (regcache_raw_collect): Remove, update callers to
3855 use regcache::raw_collect.
3856 * regcache.c (regcache_raw_collect): Remove.
3857
3858 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3859
3860 * regcache.h (regcache_raw_supply): Remove, update callers to
3861 use detached_regcache::raw_supply.
3862 * regcache.c (regcache_raw_supply): Remove.
3863
3864 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3865
3866 * regcache.h (regcache_cooked_write_part): Remove, update
3867 callers to use regcache::cooked_write_part.
3868 * regcache.c (regcache_cooked_write_part): Remove.
3869
3870 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3871
3872 * regcache.h (regcache_cooked_read_part): Remove, update callers
3873 to use readable_regcache::cooked_read_part.
3874 * regcache.c (regcache_cooked_read_part): Remove.
3875
3876 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3877
3878 * regcache.h (regcache_cooked_read_value): Remove, update
3879 callers to use readable_regcache::cooked_read_value.
3880 * regcache.c (regcache_cooked_read_value): Remove.
3881
3882 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3883
3884 * regcache.h (regcache_cooked_write): Remove, update callers to
3885 use regcache::cooked_write.
3886 * regcache.c (regcache_cooked_write): Remove.
3887
3888 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3889
3890 * regcache.h (regcache_invalidate): Remove, update callers to
3891 use detached_regcache::invalidate instead.
3892 * regcache.c (regcache_invalidate): Remove.
3893
3894 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3895
3896 * regcache.h (regcache_raw_write_part): Remove, update callers
3897 to use regcache::raw_write_part instead.
3898 * regcache.c (regcache_raw_write_part): Remove.
3899
3900 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3901
3902 * regcache.h (regcache_raw_read_part): Remove, update callers to
3903 use readable_regcache::raw_read_part instead.
3904 * regcache.c (regcache_raw_read_part): Remove.
3905
3906 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3907
3908 * regcache.h (regcache_cooked_read): Remove, update callers to
3909 use readable_regcache::cooked_read instead.
3910 * regcache.c (regcache_cooked_read): Remove.
3911
3912 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3913
3914 * regcache.h (regcache_raw_write): Remove, update callers to use
3915 regcache::raw_write instead.
3916 * regcache.c (regcache_raw_write): Remove.
3917
3918 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3919
3920 * regcache.h (regcache_raw_read): Remove, update callers to use
3921 readable_regcache::raw_read instead.
3922 * regcache.c (regcache_raw_read): Remove.
3923
3924 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3925
3926 * regcache.h (regcache_raw_update): Remove, update callers to
3927 use readable_regcache::raw_update instead.
3928 * regcache.c (regcache_raw_update): Remove.
3929
3930 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3931
3932 * regcache.h (regcache_register_status): Remove, update callers
3933 to use reg_buffer::get_register_status directly instead.
3934 * regcache.c (regcache_register_status): Remove.
3935
3936 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3937
3938 * regcache.h (regcache_get_ptid): Remove, update all callers to
3939 call regcache::ptid instead.
3940 * regcache.c (regcache_get_ptid): Remove.
3941
3942 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3943
3944 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
3945
3946 2018-05-30 Pedro Alves <palves@redhat.com>
3947
3948 * common/common-exceptions.h (exception_rethrow): Use
3949 ATTRIBUTE_NORETURN.
3950
3951 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
3952
3953 * breakpoint.c (print_solib_event, check_status_catch_solib):
3954 Remove struct keyword in range-based for loops.
3955 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
3956 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
3957 Likewise.
3958 * linespec.c (find_superclass_methods, search_minsyms_for_name):
3959 Likewise.
3960 * symfile.c (addr_info_make_relative): Likewise.
3961 * thread.c (value_in_thread_stack_temporaries): Likewise.
3962
3963 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
3964
3965 PR gdb/16841
3966 * valops.c (value_struct_elt_for_reference): Call check_typedef on
3967 aggregate type to get its real type before accessing it.
3968
3969 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
3970
3971 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
3972 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
3973 * coff-pe-read.c (add_pe_forwarded_sym): Replace
3974 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
3975 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
3976 * jit.c (jit_breakpoint_re_set_internal): Likewise.
3977 * printcmd.c (info_address_command): Likewise.
3978
3979 2018-05-29 Tom Tromey <tom@tromey.com>
3980
3981 * windows-nat.c (handle_exception): Update fall-through comment.
3982
3983 2018-05-29 Tom Tromey <tom@tromey.com>
3984
3985 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
3986 (struct program_space) <added_solibs>: Now a std::vector.
3987 * breakpoint.c (print_solib_event): Update.
3988 (check_status_catch_solib): Update.
3989 * progspace.c (clear_program_space_solib_cache): Update.
3990 * solib.c (update_solib_list): Update.
3991
3992 2018-05-29 Tom Tromey <tom@tromey.com>
3993
3994 * python/py-type.c (typy_richcompare): Update.
3995 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
3996 * gdbtypes.h (types_deeply_equal): Return bool.
3997 (types_equal): Likewise.
3998 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
3999 declare VEC.
4000 (check_types_equal): Change worklist to std::vector. Return
4001 bool.
4002 (struct type_equality_entry): Add constructor.
4003 (compare_maybe_null_strings): Return bool.
4004 (check_types_worklist): Return bool. Change worklist to
4005 std::vector.
4006 (types_deeply_equal): Use std::vector.
4007 (types_equal): Return bool.
4008 (compare_maybe_null_strings): Simplify.
4009
4010 2018-05-29 Tom Tromey <tom@tromey.com>
4011
4012 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
4013
4014 2018-05-29 Tom Tromey <tom@tromey.com>
4015
4016 * objc-lang.h: Don't include cp-support.h.
4017 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
4018 declare VEC.
4019
4020 2018-05-27 Tom Tromey <tom@tromey.com>
4021
4022 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
4023
4024 2018-05-25 Tom Tromey <tom@tromey.com>
4025
4026 * value.c (value::location): Initialize.
4027
4028 2018-05-25 Tom Tromey <tom@tromey.com>
4029
4030 * dbxread.c (init_bincl_list): Remove.
4031 (bincl_list): Now a std::vector.
4032 (bincls_allocated, next_bincl): Remove.
4033 (free_bincl_list, do_free_bincl_list_cleanup)
4034 (make_cleanup_free_bincl_list): Remove.
4035 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
4036 unique_xmalloc_ptr.
4037 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
4038 (struct header_file_location): Add constructor.
4039 (add_bincl_to_list): Remove.
4040
4041 2018-05-25 Tom Tromey <tom@tromey.com>
4042
4043 * tui/tui.c (tui_enable): Update.
4044 * mi/mi-interp.c (mi_interp::init): Update.
4045 * interps.h (class interp) <name>: New method.
4046 <m_name>: Rename from name.
4047 (~scoped_restore_interp): Update.
4048 * interps.c (interp::interp): Update.
4049 (interp_add, interp_set, interp_lookup_existing)
4050 (current_interp_named_p): Update.
4051
4052 2018-05-25 Tom Tromey <tom@tromey.com>
4053
4054 * interps.c (interp_name): Remove.
4055 * mi/mi-interp.c (mi_interp::init): Update.
4056 * interps.h (interp_name): Remove.
4057 (~scoped_restore_interp): Update.
4058 * tui/tui.c (tui_enable): Update.
4059
4060 2018-05-25 Tom Tromey <tom@tromey.com>
4061
4062 * utils.c (fputs_maybe_filtered): Update.
4063 * linespec.c (decode_line_full): Update.
4064 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
4065 (mi_print_breakpoint_for_event, mi_solib_loaded)
4066 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4067 (mi_user_selected_context_changed): Update.
4068 * mi/mi-main.c (mi_execute_command): Update.
4069 * cli/cli-script.c (execute_control_command): Update.
4070 * python/python.c (execute_gdb_command): Update.
4071 * solib.c (info_sharedlibrary_command): Update.
4072 * interps.c (interp_ui_out): Remove.
4073 * interps.h (interp_ui_out): Remove.
4074
4075 2018-05-25 Tom Tromey <tom@tromey.com>
4076
4077 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
4078 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
4079 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
4080
4081 2018-05-25 Tom Tromey <tom@tromey.com>
4082
4083 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
4084 * interps.c (interp_exec): Use scoped_restore.
4085
4086 2018-05-25 Tom Tromey <tom@tromey.com>
4087
4088 * remote.c (remote_target::remote_file_get): Use
4089 gdb::byte_vector.
4090 (remote_target::remote_file_put): Likewise.
4091
4092 2018-05-25 Tom Tromey <tom@tromey.com>
4093
4094 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
4095 a std::string.
4096 (get_pe_section_index, add_pe_exported_sym): Update.
4097 (read_pe_exported_syms): Use gdb::def_vector.
4098
4099 2018-05-25 Tom Tromey <tom@tromey.com>
4100
4101 * frame.c (remove_prev_frame): Remove.
4102 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
4103
4104 2018-05-25 Maciej W. Rozycki <macro@mips.com>
4105
4106 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
4107 Remove prototypes.
4108 * mips-linux-nat.c (supply_fpregset): Always call
4109 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
4110 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
4111 `mips_fill_fpregset'.
4112 * mips-linux-tdep.c (mips_supply_fpregset)
4113 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
4114 (mips_fill_fpregset_wrapper): Remove functions.
4115 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
4116 (mips_linux_fpregset): Remove variable.
4117 (mips_linux_iterate_over_regset_sections): Use
4118 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
4119 (mips_linux_o32_sigframe_init): Remove comment.
4120
4121 2018-05-25 Pedro Alves <palves@redhat.com>
4122
4123 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
4124 (struct readahead_cache, struct packet_reg, struct
4125 remote_arch_state, class remote_state): Move higher up in the
4126 file.
4127 (remote_target::m_remote_state): Now an object instead of a pointer.
4128 (remote_target::get_remote_state): Adjust.
4129
4130 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
4131
4132 * stack.c (select_and_print_frame): Delete.
4133 (struct function_bounds): Move struct within function.
4134 (func_command): Most content moved into new function
4135 find_frame_for_function, use new function, print result, add
4136 function comment.
4137 (find_frame_for_function): New function, now returns a result.
4138
4139 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4140
4141 * stack.c (iterate_over_block_arg_vars): Fix comment.
4142 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
4143
4144 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
4145
4146 PR gdb/23203
4147 * frame.c
4148 (scoped_restore_selected_frame::scoped_restore_selected_frame):
4149 Define.
4150 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
4151 Define.
4152 * frame.h (class scoped_restore_selected_frame): New class.
4153 * stack.c (print_frame_local_vars): Remove catching and rethrowing
4154 of any exception, use scoped_restore_selected_frame to restore the
4155 frame instead.
4156
4157 2018-05-24 Pedro Alves <palves@redhat.com>
4158
4159 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
4160 override.
4161
4162 2018-05-23 Tom Tromey <tom@tromey.com>
4163
4164 * complaints.c (struct complaints): Remove.
4165 (symfile_complaint_book): Remove.
4166 (series): New global.
4167 (complaint_internal): Update.
4168 (clear_complaints): Update.
4169
4170 2018-05-23 Tom Tromey <tom@tromey.com>
4171
4172 * complaints.c (counters): New global.
4173 (struct complain): Remove.
4174 (struct complaints) <root>: Remove.
4175 (complaint_sentinel): Remove.
4176 (symfile_complaint_book): Update.
4177 (find_complaint) Remove.
4178 (complaint_internal, clear_complaints): Update.
4179
4180 2018-05-23 Tom Tromey <tom@tromey.com>
4181
4182 * complaints.c (struct complain) <file, line>: Remove.
4183 (find_complaint): Remove file, line parameters.
4184 (complaint_internal): Update.
4185
4186 2018-05-23 Tom Tromey <tom@tromey.com>
4187
4188 * complaints.c (vcomplaint): Remove.
4189 (complaint_internal) Merge in contents of vcomplaint.
4190
4191 2018-05-23 Tom Tromey <tom@tromey.com>
4192
4193 * complaints.c (struct complaints) <explanation>: Remove.
4194 (symfile_explanations): Remove.
4195 (symfile_complaint_book): Update.
4196 (vcomplaint): Update.
4197 (struct explanation): Remove.
4198
4199 2018-05-23 Tom Tromey <tom@tromey.com>
4200
4201 * complaints.c (symfile_complaints): Remove.
4202 (complaint_internal): Remove "complaints" parameter.
4203 (clear_complaints, vcomplaint): Remove "c" parameter.
4204 (get_complaints): Remove.
4205 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
4206 (dwarf2_debug_line_missing_file_complaint)
4207 (dwarf2_debug_line_missing_end_sequence_complaint)
4208 (dwarf2_complex_location_expr_complaint)
4209 (dwarf2_const_value_length_mismatch_complaint)
4210 (dwarf2_section_buffer_overflow_complaint)
4211 (dwarf2_macro_malformed_definition_complaint)
4212 (dwarf2_invalid_attrib_class_complaint)
4213 (create_addrmap_from_index, dw2_symtab_iter_next)
4214 (dw2_expand_marked_cus)
4215 (dw2_debug_names_iterator::find_vec_in_debug_names)
4216 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
4217 (create_debug_type_hash_table, init_cutu_and_read_dies)
4218 (partial_die_parent_scope, add_partial_enumeration)
4219 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
4220 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
4221 (read_import_statement, read_file_scope, create_dwo_cu_reader)
4222 (create_cus_hash_table, create_dwp_hash_table)
4223 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
4224 (dwarf2_rnglists_process, dwarf2_ranges_process)
4225 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
4226 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
4227 (handle_struct_member_die, process_structure_scope)
4228 (read_array_type, read_common_block, read_module_type)
4229 (read_tag_pointer_type, read_typedef, read_base_type)
4230 (read_subrange_type, load_partial_dies, partial_die_info::read)
4231 (partial_die_info::read, partial_die_info::read)
4232 (partial_die_info::read, read_checked_initial_length_and_offset)
4233 (dwarf2_string_attr, read_formatted_entries)
4234 (dwarf_decode_line_header)
4235 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4236 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
4237 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
4238 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
4239 (get_signatured_type, get_DW_AT_signature_type)
4240 (decode_locdesc, file_file_name, consume_improper_spaces)
4241 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
4242 (dwarf_decode_macro_bytes, dwarf_decode_macros)
4243 (dwarf2_symbol_mark_computed, set_die_type)
4244 (read_attribute_value): Update.
4245 * stap-probe.c (handle_stap_probe, get_stap_base_address):
4246 Update.
4247 * dbxread.c (unknown_symtype_complaint)
4248 (lbrac_mismatch_complaint, repeated_header_complaint)
4249 (set_namestring, function_outside_compilation_unit_complaint)
4250 (read_dbx_symtab, process_one_symbol): Update.
4251 * gdbtypes.c (stub_noname_complaint): Update.
4252 * windows-nat.c (handle_unload_dll): Update.
4253 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
4254 (decode_base_type): Update.
4255 * xcoffread.c (bf_notfound_complaint, ef_complaint)
4256 (eb_complaint, record_include_begin, record_include_end)
4257 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
4258 (process_xcoff_symbol, read_symbol)
4259 (function_outside_compilation_unit_complaint)
4260 (scan_xcoff_symtab): Update.
4261 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
4262 * buildsym.c (finish_block_internal, make_blockvector)
4263 (end_symtab_get_static_block, augment_type_symtab): Update.
4264 * dtrace-probe.c (dtrace_process_dof)
4265 (dtrace_static_probe_ops::get_probes): Update.
4266 * complaints.h (struct complaint): Don't declare.
4267 (symfile_complaints): Remove.
4268 (complaint_internal): Remove "complaints" parameter.
4269 (complaint): Likewise.
4270 (clear_complaints): Likewise.
4271 * symfile.c (syms_from_objfile_1, finish_new_objfile)
4272 (reread_symbols): Update.
4273 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
4274 (dwarf2_frame_cache, decode_frame_entry): Update.
4275 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
4276 * objc-lang.c (lookup_objc_class, lookup_child_selector)
4277 (info_selectors_command): Update.
4278 * macrotab.c (macro_include, check_for_redefinition)
4279 (macro_undef): Update.
4280 * objfiles.c (filter_overlapping_sections): Update.
4281 * stabsread.c (invalid_cpp_abbrev_complaint)
4282 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
4283 (define_symbol, error_type, read_type, rs6000_builtin_type)
4284 (stabs_method_name_from_physname, read_member_functions)
4285 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
4286 (attach_fields_to_type, complain_about_struct_wipeout)
4287 (read_range_type, read_args, common_block_start)
4288 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
4289 Update.
4290 * mdebugread.c (index_complaint, unknown_ext_complaint)
4291 (basic_type_complaint, bad_tag_guess_complaint)
4292 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
4293 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
4294 (parse_procedure, parse_lines)
4295 (function_outside_compilation_unit_complaint)
4296 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
4297 (bad_tag_guess_complaint, reg_value_complaint): Update.
4298 * cp-support.c (demangled_name_complaint): Update.
4299 * macroscope.c (sal_macro_scope): Update.
4300 * dwarf-index-write.c (class debug_names): Update.
4301
4302 2018-05-23 Tom Tromey <tom@tromey.com>
4303
4304 * complaints.c (clear_complaints): Remove "noisy" parameter.
4305 * complaints.h (clear_complaints): Update.
4306 * symfile.c (syms_from_objfile_1, finish_new_objfile)
4307 (reread_symbols): Update.
4308
4309 2018-05-23 Tom Tromey <tom@tromey.com>
4310
4311 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
4312 SUBSEQUENT_MESSAGE.
4313 (vcomplaint, clear_complaints): Update.
4314 (symfile_explanations): Remove some messages.
4315
4316 2018-05-23 Tom Tromey <tom@tromey.com>
4317
4318 * complaints.c (internal_complaint): Remove.
4319 * complaints.h (internal_complaint): Remove.
4320
4321 2018-05-22 Maciej W. Rozycki <macro@mips.com>
4322
4323 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
4324
4325 2018-05-22 Pedro Alves <palves@redhat.com>
4326
4327 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
4328 (remote_fileio_badfd, remote_fileio_return_errno)
4329 (remote_fileio_return_success, remote_fileio_func_open)
4330 (remote_fileio_func_open, remote_fileio_func_close)
4331 (remote_fileio_func_read, remote_fileio_func_write)
4332 (remote_fileio_func_lseek, remote_fileio_func_rename)
4333 (remote_fileio_func_unlink, remote_fileio_func_stat)
4334 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
4335 (remote_fileio_func_isatty, remote_fileio_func_system): Add
4336 remote_target parameter.
4337 (remote_fio_func_map) <func>: Add remote_target parameter.
4338 (do_remote_fileio_request, remote_fileio_request):
4339 * remote-fileio.h (remote_fileio_request):
4340 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
4341 remote_target parameter.
4342 (remote_notif_process, handle_notification): Adjust to pass down
4343 the remote.
4344 (remote_notif_state_allocate): Add remote_target parameter. Save
4345 it.
4346 * remote-notif.h (struct remote_target): Forward declare.
4347 (struct notif_client) <parse, ack, can_get_pending_events>: Add
4348 remote_target parameter.
4349 (struct remote_notif_state) <remote>: New field.
4350 (remote_notif_ack, remote_notif_parse): Add remote_target
4351 parameter.
4352 (remote_notif_state_allocate, remote_notif_state_allocate): Add
4353 remote_target parameter.
4354 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
4355 (threads_listing_context, rmt_thread_action, protocol_feature)
4356 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
4357 (packet_result, struct threads_listing_context, remote_state):
4358 Move definitions and declarations higher up.
4359 (remote_target) <~remote_target>: Declare.
4360 (remote_download_command_source, remote_file_put, remote_file_get)
4361 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
4362 (remote_hostio_pread_vFile, remote_hostio_send_command)
4363 (remote_hostio_set_filesystem, remote_hostio_open)
4364 (remote_hostio_close, remote_hostio_unlink, remote_state)
4365 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
4366 (get_memory_write_packet_size, get_memory_read_packet_size)
4367 (append_pending_thread_resumptions, remote_detach_1)
4368 (append_resumption, remote_resume_with_vcont)
4369 (add_current_inferior_and_thread, wait_ns, wait_as)
4370 (process_stop_reply, remote_notice_new_inferior)
4371 (process_initial_stop_replies, remote_add_thread)
4372 (btrace_sync_conf, remote_btrace_maybe_reopen)
4373 (remove_new_fork_children, kill_new_fork_children)
4374 (discard_pending_stop_replies, stop_reply_queue_length)
4375 (check_pending_events_prevent_wildcard_vcont)
4376 (discard_pending_stop_replies_in_queue, stop_reply)
4377 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
4378 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
4379 (remote_interrupt_as, remote_interrupt_ns)
4380 (remote_get_noisy_reply, remote_query_attached)
4381 (remote_add_inferior, remote_current_thread, get_current_thread)
4382 (set_thread, set_general_thread, set_continue_thread)
4383 (set_general_process, write_ptid)
4384 (remote_unpack_thread_info_response, remote_get_threadinfo)
4385 (parse_threadlist_response, remote_get_threadlist)
4386 (remote_threadlist_iterator, remote_get_threads_with_ql)
4387 (remote_get_threads_with_qxfer)
4388 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
4389 (get_offsets, remote_check_symbols, remote_supported_packet)
4390 (remote_query_supported, remote_packet_size)
4391 (remote_serial_quit_handler, remote_detach_pid)
4392 (remote_vcont_probe, remote_resume_with_hc)
4393 (send_interrupt_sequence, interrupt_query)
4394 (remote_notif_get_pending_events, fetch_register_using_p)
4395 (send_g_packet, process_g_packet, fetch_registers_using_g)
4396 (store_register_using_P, store_registers_using_G)
4397 (set_remote_traceframe, check_binary_download)
4398 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
4399 (remote_xfer_live_readonly_partial, remote_read_bytes)
4400 (remote_send_printf, remote_flash_write, readchar)
4401 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
4402 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
4403 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
4404 (extended_remote_disable_randomization, extended_remote_run)
4405 (send_environment_packet, extended_remote_environment_support)
4406 (extended_remote_set_inferior_cwd, remote_write_qxfer)
4407 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
4408 (packet_command): Now methods of ...
4409 (remote_target): ... this class.
4410 (m_remote_state) <remote_target>: New field.
4411 (struct remote_state) <stop_reply_queue,
4412 remote_async_inferior_event_token, wait_forever_enabled_p>: New
4413 fields.
4414 (remote_state::remote_state): Allocate stop_reply_queue.
4415 (remote_state): Delete global.
4416 (get_remote_state_raw): Delete.
4417 (remote_target::get_remote_state): Allocate m_remote_state on
4418 demand.
4419 (get_current_remote_target): New.
4420 (remote_ops, extended_remote_ops): Delete.
4421 (wait_forever_enabled_p, remote_async_inferior_event_token):
4422 Delete, moved to struct remote_state.
4423 (remote_target::close): Delete self. Destruction bits split to
4424 ...
4425 (remote_target::~remote_target): ... this.
4426 (show_memory_packet_size): Adjust to use
4427 get_current_remote_target.
4428 (struct protocol_feature) <func>: Add remote_target parameter.
4429 All callers adjusted.
4430 (curr_quit_handler_target): New.
4431 (remote_serial_quit_handler): Reimplement.
4432 (remote_target::open_1): Adjust to use get_current_remote_target.
4433 Heap-allocate remote_target/extended_remote_target instances.
4434 (vcont_builder::vcont_builder): Add remote_target parameter, and
4435 save it in m_remote. All callers adjusted.
4436 (vcont_builder::m_remote): New field.
4437 (vcont_builder::restart, vcont_builder::flush)
4438 (vcont_builder::push_action): Use it.
4439 (remote_target::commit_resume): Use it.
4440 (struct queue_iter_param) <remote>: New field.
4441 (remote_target::remove_new_fork_children): Fill in 'remote' field.
4442 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
4443 (check_pending_event_prevents_wildcard_vcont_callback)
4444 (remote_target::check_pending_events_prevent_wildcard_vcont)
4445 (remote_target::discard_pending_stop_replies)
4446 (remote_target::discard_pending_stop_replies_in_queue)
4447 (remote_target::remote_notif_remove_queued_reply): Fill in
4448 'remote' field.
4449 (remote_notif_get_pending_events): New.
4450 (remote_target::readchar, remote_target::remote_serial_write):
4451 Save/restore curr_quit_handler_target.
4452 (putpkt): New.
4453 (kill_new_fork_children): Fill in 'remote' field.
4454 (packet_command): Use get_current_remote_target, defer to
4455 remote_target method of same name.
4456 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
4457 parameter, and save it in m_remote. All callers adjusted.
4458 (scoped_remote_fd::release): Use m_remote.
4459 (scoped_remote_fd::m_remote): New field.
4460 (remote_file_put, remote_file_get, remote_file_delete): Use
4461 get_current_remote_target, defer to remote_target method of same
4462 name.
4463 (remote_btrace_reset): Add remote_state paremeter. Update all
4464 callers.
4465 (remote_async_inferior_event_handler). Pass down 'data'.
4466 (remote_new_objfile): Use get_current_remote_target.
4467 (remote_target::vcont_r_supported): New.
4468 (set_range_stepping): Use get_current_remote_target and
4469 remote_target::vcont_r_supported.
4470 (_initialize_remote): Don't allocate 'remote_state' and
4471 'stop_reply_queue' globals.
4472 * remote.h (struct remote_target): Forward declare.
4473 (getpkt, putpkt, remote_notif_get_pending_events): Add
4474 'remote_target' parameter.
4475
4476 2018-05-22 Pedro Alves <palves@redhat.com>
4477
4478 * remote.c (vcont_builder): Now a class. Make all data members
4479 private.
4480 (vcont_builder) <vcont_builder, restart, flush, push_action>:
4481 Declare methods.
4482 (vcont_builder_restart): Rename to ...
4483 (vcont_builder::restart): ... this.
4484 (vcont_builder_flush): Rename to ...
4485 (vcont_builder::flush): ... this.
4486 (vcont_builder_push_action): Rename to ...
4487 (vcont_builder::push_action): ... this.
4488 (remote_target::commit_resume): Adjust.
4489
4490 2018-05-22 Pedro Alves <palves@redhat.com>
4491
4492 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
4493 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
4494 (get_fixed_memory_packet_size): New.
4495 (get_memory_packet_size): Use it.
4496 (set_memory_packet_size): Don't override the config size with
4497 DEFAULT_MAX_MEMORY_PACKET_SIZE.
4498 (show_memory_packet_size): Use get_fixed_memory_packet_size.
4499 Don't refer to get_memory_packet_size if not connected to a remote
4500 target. Show "(default)" if configured size is 0.
4501
4502 2018-05-22 Pedro Alves <palves@redhat.com>
4503
4504 * remote.c (remote_target::mourn_inferior): Move
4505 discard_pending_stop_replies call here from ...
4506 (_initialize_remote): ... here.
4507
4508 2018-05-22 Pedro Alves <palves@redhat.com>
4509
4510 * remote.c (compare_section_command): Remove set_general_process
4511 call.
4512
4513 2018-05-22 Pedro Alves <palves@redhat.com>
4514
4515 * remote.c (struct packet_reg, struct remote_arch_state):
4516 Move higher up in the file.
4517 (remote_state) <m_arch_states>: Store remote_arch_state values
4518 instead of remote_arch_state pointers.
4519 (remote_state::get_remote_arch_state): Adjust.
4520
4521 2018-05-22 Pedro Alves <palves@redhat.com>
4522
4523 * remote.c: Include <unordered_map>.
4524 (remote_state): Now a class.
4525 (remote_state) <get_remote_arch_state>: Declare method.
4526 <get_remote_arch_state>: New field.
4527 (remote_arch_state) <remote_arch_state>: Declare ctor.
4528 <regs>: Now a unique_ptr.
4529 (remote_gdbarch_data_handle): Delete.
4530 (get_remote_arch_state): Delete.
4531 (remote_state::get_remote_arch_state): New.
4532 (get_remote_state): Adjust to call remote_state's
4533 get_remote_arch_state method.
4534 (init_remote_state): Delete, bits factored out to ...
4535 (remote_arch_state::remote_arch_state): ... this new method.
4536 (get_remote_packet_size, get_memory_packet_size)
4537 (process_g_packet, remote_target::fetch_registers)
4538 (remote_target::prepare_to_store, store_registers_using_G)
4539 (remote_target::store_registers, remote_target::get_trace_status):
4540 Adjust to call remote_state's method.
4541 (_initialize_remote): Remove reference to
4542 remote_gdbarch_data_handle.
4543
4544 2018-05-22 Pedro Alves <palves@redhat.com>
4545
4546 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
4547 pread>: New method declarations.
4548 (remote_target::open_1): Adjust.
4549 (readahead_cache_invalidate): Rename to ...
4550 (readahead_cache::invalidate): ... this, and adjust to be a class
4551 method.
4552 (readahead_cache_invalidate_fd): Rename to ...
4553 (readahead_cache::invalidate_fd): ... this, and adjust to be a
4554 class method.
4555 (remote_hostio_pwrite): Adjust.
4556 (remote_hostio_pread_from_cache): Rename to ...
4557 (readahead_cache::pread): ... this, and adjust to be a class
4558 method.
4559 (remote_hostio_close): Adjust.
4560
4561 2018-05-22 Pedro Alves <palves@redhat.com>
4562
4563 * remote.c (remote_hostio_close_cleanup): Delete.
4564 (class scoped_remote_fd): New.
4565 (remote_file_put, remote_file_get): Use it.
4566
4567 2018-05-22 Pedro Alves <palves@redhat.com>
4568
4569 (struct vCont_action_support): Use bool and initialize all fields.
4570 (struct readahead_cache): Initialize all fields.
4571 (remote_state): Use bool and initialize all fields.
4572 (remote_state::remote_state, remote_state::~remote_state): New.
4573 (new_remote_state): Delete.
4574 (_initialize_remote): Use new to allocate remote_state.
4575
4576 2018-05-22 Pedro Alves <palves@redhat.com>
4577 張俊芝 <zjz@zjz.name>
4578
4579 PR gdb/22973
4580 * c-exp.y: Include "c-support.h".
4581 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
4582 of tolower. Use c_ident_is_alpha to scan names.
4583 * c-lang.c: Include "c-support.h".
4584 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
4585 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
4586 * c-support.h: New file, with bits factored out from ...
4587 * cp-name-parser.y: ... this file.
4588 Include "c-support.h".
4589 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
4590 c-support.h and renamed.
4591 (symbol_end, yylex): Adjust.
4592
4593 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4594
4595 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
4596 parameter type to CORE_ADDR.
4597 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
4598 parameter type in declaration to CORE_ADDR.
4599 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
4600 target_auxv_search to get AT_HWCAP and use the result to get the
4601 target description.
4602 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
4603 to CORE_ADDR. Remove the cast of the return value to unsigned
4604 long. Fix error predicate of target_auxv_search.
4605 (ppc_linux_nat_target::read_description): Change the type of the
4606 hwcap variable to CORE_ADDR.
4607
4608 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4609
4610 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
4611 if the size of fpscr is larger than 32 bits.
4612
4613 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4614
4615 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
4616 (ppc32_linux_vsxregmap): New global.
4617 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
4618 regcache_supply_regset, and regcache_collect_regset.
4619 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
4620 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
4621 (fetch_vsx_register, store_vsx_register): Remove.
4622 (fetch_vsx_registers): Add regno parameter. Get regset using
4623 ppc_linux_vsxregset. Use regset to supply registers.
4624 (store_vsx_registers): Add regno parameter. Get regset using
4625 ppc_linux_vsxregset. Use regset to collect registers.
4626 (fetch_register): Call fetch_vsx_registers instead of
4627 fetch_vsx_register.
4628 (store_register): Call store_vsx_registers instead of
4629 store_vsx_register.
4630 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
4631 new regno parameter.
4632 (store_ppc_registers): Call store_vsx_registers with -1 for the
4633 new regno parameter.
4634 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
4635 (ppc_collect_vsxregset): Remove.
4636
4637 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4638
4639 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
4640 offset fields.
4641 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
4642 for vector register offset fields.
4643 (ppc64_fbsd_reg_offsets): Likewise.
4644 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4645 to vector register offset fields.
4646 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4647 to vector register offset fields.
4648 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
4649 vector register offset fields.
4650 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
4651 initializers for vector register offset fields.
4652 (rs6000_aix64_reg_offsets): Likewise.
4653 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
4654 (ppc_supply_vrregset): Remove.
4655 (ppc_collect_vrregset): Remove.
4656 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
4657 (ppc_linux_vrregset) : New function.
4658 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
4659 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
4660 (ppc32_linux_vrregset): Remove.
4661 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
4662 and use result instead of ppc32_linux_vrregset.
4663 (ppc32_linux_reg_offsets): Remove initializers for vector register
4664 offset fields.
4665 (ppc64_linux_reg_offsets): Likewise.
4666 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
4667 * ppc-linux-nat.c: Include regset.h.
4668 (gdb_vrregset_t): Adjust comment to account for little-endian
4669 mode.
4670 (supply_vrregset, fill_vrregset): Remove.
4671 (fetch_altivec_register, store_altivec_register): Remove.
4672 (fetch_altivec_registers): Add regno parameter. Get regset using
4673 ppc_linux_vrregset. Use regset to supply registers.
4674 (store_altivec_registers): Add regno parameter. Get regset using
4675 ppc_linux_vrregset. Use regset to collect registers.
4676 (fetch_register): Call fetch_altivec_registers instead of
4677 fetch_altivec_register.
4678 (store_register): Call store_altivec_registers instead of
4679 store_altivec_register.
4680 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
4681 the new regno parameter.
4682 (store_ppc_registers): Call store_altivec_registers with -1 for
4683 the new regno parameter.
4684
4685 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4686
4687 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
4688 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
4689 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
4690 (gdb_vrregset_t): Change array type size to
4691 PPC_LINUX_SIZEOF_VRREGSET.
4692 (gdb_vsxregset_t): Change array type size to
4693 PPC_LINUX_SIZEOF_VSXREGSET.
4694 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
4695 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
4696 PPC_LINUX_SIZEOF_VSXREGSET.
4697
4698 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4699
4700 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
4701 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
4702 nat/ppc-linux.c.
4703 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
4704 ppc_linux_target_wordsize with tid.
4705 (ppc_linux_nat_target::read_description): Call ppc_linux_target
4706 wordsize with tid.
4707 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
4708 (ppc64_64bit_inferior_p): Add static and inline specifiers.
4709 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
4710 tid parameter. Remove static specifier.
4711 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
4712 (ppc_linux_target_wordsize): New declaration.
4713
4714 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4715
4716 * arch/ppc-linux-common.c: New file.
4717 * arch/ppc-linux-common.h: New file.
4718 * arch/ppc-linux-tdesc.h: New file.
4719 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
4720 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
4721 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
4722 arch/ppc-linux-tdesc.h.
4723 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
4724 arch/ppc-linux-tdesc.h.
4725 (ppc_linux_nat_target::read_description): Remove target
4726 description matching code. Fill a ppc_linux_features struct and
4727 call ppc_linux_match_description with it. Move comment about ISA
4728 2.05 to ppc-linux-common.c.
4729 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
4730 arch/ppc-linux-tdesc.h.
4731 (ppc_linux_core_read_description): Remove target description
4732 matching code. Fill a ppc_linux_features struct and call
4733 ppc_linux_match_description with it.
4734 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
4735 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
4736 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
4737 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
4738 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
4739 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
4740 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
4741 (tdesc_powerpc_e500l): Remove.
4742
4743 2018-05-22 Joel Brobecker <brobecker@adacore.com>
4744
4745 * ada-lang.c (catch_assert_command): Pass empty string instead
4746 of NULL for excep_string argument.
4747
4748 2018-05-22 Maciej W. Rozycki <macro@mips.com>
4749
4750 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
4751 the width of the requested register exceeds the width of the
4752 `ptrace' data type.
4753
4754 2018-05-21 Tom Tromey <tom@tromey.com>
4755
4756 * printcmd.c (output_command): Remove.
4757 (output_command_const): Rename to output_command.
4758 * valprint.h (output_command): Rename from output_command_const.
4759 * tracepoint.c (trace_dump_actions): Call output_command.
4760
4761 2018-05-21 Tom Tromey <tom@tromey.com>
4762
4763 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4764 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
4765 * ada-lang.h (create_ada_exception_catchpoint): Update.
4766 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
4767 std::string.
4768 (create_excep_cond_exprs, ~ada_catchpoint)
4769 (should_stop_exception, print_one_exception)
4770 (print_mention_exception, print_recreate_exception): Update.
4771 (ada_get_next_arg): Remove.
4772 (catch_ada_exception_command_split): Use std::string. Change type
4773 of "excep_string", "cond_string".
4774 (catch_ada_exception_command): Update.
4775 (create_ada_exception_catchpoint): Change type of excep_string.
4776 (ada_exception_sal): Remove excep_string parameter.
4777 (~ada_catchpoint): Remove.
4778
4779 2018-05-21 Tom Tromey <tom@tromey.com>
4780
4781 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
4782 cleanup.
4783
4784 2018-05-21 Tom Tromey <tom@tromey.com>
4785
4786 * ada-lang.c (ada_exception_message_1, ada_exception_message):
4787 Return unique_xmalloc_ptr.
4788 (print_it_exception): Update.
4789
4790 2018-05-21 Tom Tromey <tom@tromey.com>
4791
4792 * tracepoint.c (trace_dump_actions): Use std::string.
4793
4794 2018-05-21 Tom Tromey <tom@tromey.com>
4795
4796 * symfile.c (reread_symbols): Use std::string for original_name.
4797
4798 2018-05-21 Tom Tromey <tom@tromey.com>
4799
4800 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
4801 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
4802 constructor.
4803
4804 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
4805
4806 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
4807 instance to...
4808 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
4809 * objfiles.c (get_objfile_bfd_data): Allocate
4810 objfile_per_bfd_storage with obstack_new when allocating on
4811 obstack.
4812
4813 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
4814
4815 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
4816 OBSTACK_ZALLOC.
4817 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
4818 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
4819 * mdebugread.c (mdebug_build_psymtabs): Likewise.
4820 (add_pending): Likewise.
4821 (parse_symbol): Likewise.
4822 (parse_partial_symbols): Likewise.
4823 (psymtab_to_symtab_1): Likewise.
4824 (new_psymtab): Likewise.
4825 (elfmdebug_build_psymtabs): Likewise.
4826 * minsyms.c (terminate_minimal_symbol_table): Likewise.
4827 * objfiles.c (get_objfile_bfd_data): Likewise.
4828 (objfile_register_static_link): Likewise.
4829 * psymtab.c (allocate_psymtab): Likewise.
4830 * stabsread.c (read_member_functions): Likewise.
4831 * xcoffread.c (xcoff_end_psymtab): Likewise.
4832
4833 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
4834
4835 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
4836 compiler supports std::is_trivially_constructible.
4837 * common/poison.h: Include obstack.h.
4838 (IsMallocable): Define to is_trivially_constructible if the
4839 compiler supports it, define to true_type otherwise.
4840 (xobnew): New.
4841 (XOBNEW): Redefine.
4842 (xobnewvec): New.
4843 (XOBNEWVEC): Redefine.
4844 * gdb_obstack.h (obstack_zalloc): New.
4845 (OBSTACK_ZALLOC): Redefine.
4846 (obstack_calloc): New.
4847 (OBSTACK_CALLOC): Redefine.
4848 (obstack_new): New.
4849 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
4850 (gdbarch_obstack): New declaration in gdbarch.h, definition in
4851 gdbarch.c.
4852 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
4853 obstack_calloc/obstack_zalloc.
4854 (gdbarch_obstack_zalloc): Remove.
4855 * target-descriptions.c (tdesc_data_init): Use obstack_new.
4856
4857 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4858
4859 * stack.c (backtrace_command_1): Remove useless variable int i.
4860
4861 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4862
4863 * stack.c (print_frame_info): Fix comment.
4864
4865 2018-05-18 Tom Tromey <tom@tromey.com>
4866
4867 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
4868 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
4869 (~dwarf2_per_objfile): Update
4870 (dwarf2_get_dwz_file): Use new.
4871 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
4872 unique_ptr.
4873
4874 2018-05-18 Tom Tromey <tom@tromey.com>
4875
4876 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
4877 unique_ptr.
4878 * dwarf2read.c (struct dwp_file): Add constructor and
4879 initializers.
4880 (open_and_init_dwp_file): Return a unique_ptr.
4881 (dwarf2_per_objfile, create_dwp_hash_table)
4882 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
4883 (lookup_dwo_unit_in_dwp): Update.
4884 (open_and_init_dwp_file, get_dwp_file): Update.
4885
4886 2018-05-18 Tom Tromey <tom@tromey.com>
4887
4888 * dwarf2read.c (dwarf2_per_objfile): Update.
4889 (struct mapped_index): Add initializers.
4890 (dwarf2_read_index): Use new.
4891 (dw2_symtab_iter_init): Update.
4892 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
4893 unique_ptr.
4894
4895 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
4896
4897 * dwarf2read.c (mapped_index) <total_size>: Remove.
4898
4899 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
4900
4901 * unittests/format_pieces-selftests.c (test_format_specifier):
4902 Add ARI comments.
4903
4904 2018-05-18 Tom Tromey <tom@tromey.com>
4905
4906 * c-typeprint.c (maybe_print_hole): New function.
4907 (c_print_type_struct_field_offset): Update.
4908 (c_type_print_base_struct_union): Call maybe_print_hole.
4909
4910 2018-05-17 Keith Seitz <keiths@redhat.com>
4911
4912 * breakpoint.c (build_bpstat_chain): New function, moved from
4913 bpstat_stop_status.
4914 (bpstat_stop_status): Add optional parameter, `stop_chain'.
4915 If no stop chain is passed, call build_bpstat_chain to build it.
4916 * breakpoint.h (build_bpstat_chain): Declare.
4917 (bpstat_stop_status): Move documentation here from breakpoint.c.
4918 * infrun.c (handle_signal_stop): Before eliding inlined frames,
4919 build the stop chain and pass it to skip_inline_frames.
4920 Pass this stop chain to bpstat_stop_status.
4921 * inline-frame.c: Include breakpoint.h.
4922 (stopped_by_user_bp_inline_frame): New function.
4923 (skip_inline_frames): Add parameter `stop_chain'.
4924 Move documention to inline-frame.h.
4925 If non-NULL, use stopped_by_user_bp_inline_frame to determine
4926 whether the frame should be elided.
4927 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
4928 Add moved documentation and update for new parameter.
4929
4930 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
4931
4932 PR cli/14975
4933 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4934 unittests/format_pieces-selftests.c.
4935 * common/format.h (format_piece) <operator==>: New.
4936 (format_pieces) <operator[]>: Remove.
4937 * common/format.c (format_pieces::format_pieces): Handle \e.
4938 * unittests/format_pieces-selftests.c: New.
4939
4940 2018-05-17 Tom Tromey <tom@tromey.com>
4941
4942 PR symtab/23010:
4943 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
4944 (dw2_instantiate_symtab): Add skip_partial parameter.
4945 (dw2_find_last_source_symtab, dw2_map_expand_apply)
4946 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
4947 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
4948 (dw2_expand_symtabs_matching_one)
4949 (dw2_find_pc_sect_compunit_symtab)
4950 (dw2_debug_names_lookup_symbol)
4951 (dw2_debug_names_expand_symtabs_for_function): Update.
4952 (init_cutu_and_read_dies): Add skip_partial parameter.
4953 (process_psymtab_comp_unit, build_type_psymtabs_1)
4954 (process_skeletonless_type_unit, load_partial_comp_unit)
4955 (psymtab_to_symtab_1): Update.
4956 (load_full_comp_unit): Add skip_partial parameter.
4957 (process_imported_unit_die, dwarf2_read_addr_index)
4958 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
4959 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
4960 (read_signatured_type): Update.
4961
4962 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
4963
4964 * value.c (release_value): Remove unused variable.
4965 (record_latest_value): Likewise.
4966 (access_value_history): Likewise.
4967 (preserve_values): Likewise.
4968
4969 2018-05-17 Tom Tromey <tom@tromey.com>
4970
4971 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
4972 Initialize.
4973
4974 2018-05-16 Maciej W. Rozycki <macro@mips.com>
4975
4976 PR gdb/22286
4977 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
4978 Also handle registers whose width is not a multiple of
4979 PTRACE_TYPE_RET.
4980 (linux_nat_trad_target::store_register): Likewise.
4981
4982 2018-05-16 Tom Tromey <tom@tromey.com>
4983
4984 * gdbcore.h (core_bfd): Redefine.
4985 * corelow.c (core_target::close): Update.
4986 (core_target_open): Update.
4987 * progspace.h (struct program_space) <cbfd>: Now a
4988 gdb_bfd_ref_ptr.
4989
4990 2018-05-16 Tom Tromey <tom@tromey.com>
4991
4992 PR cli/19551:
4993 * symfile-add-flags.h (enum symfile_add_flags)
4994 <SYMFILE_NOT_FILENAME>: New constant.
4995 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
4996 objfile name from BFD.
4997 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
4998 * minidebug.c (find_separate_debug_file_in_section): Put
4999 ".gnu_debugdata" into BFD's file name.
5000
5001 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
5002
5003 * regcache.c (regcache_read_ftype, regcache_write_ftype):
5004 Remove.
5005
5006 2018-05-15 Tamar Christina <tamar.christina@arm.com>
5007
5008 PR binutils/21446
5009 * aarch64-tdep.c (aarch64_analyze_prologue,
5010 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
5011 Indicate not interested in errors.
5012
5013 2018-05-15 Maciej W. Rozycki <macro@mips.com>
5014
5015 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
5016 Supply the MIPS_ZERO_REGNUM register.
5017
5018 2018-05-15 Maciej W. Rozycki <macro@mips.com>
5019
5020 * mips-tdep.c (mask_address_var): Make variable static.
5021
5022 2018-05-14 Tom Tromey <tom@tromey.com>
5023
5024 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
5025
5026 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
5027
5028 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
5029 FXSAVE_ADDR for the mxcsr register.
5030
5031 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
5032
5033 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
5034
5035 2018-05-11 Pedro Alves <palves@redhat.com>
5036
5037 * corelow.c (core_target) <core_target>: No longer inline.
5038 Initialize m_core_gdbarch, m_core_vec and build the section table
5039 here.
5040 <~core_target>: New.
5041 <core_gdbarch, get_core_register_section>: New methods.
5042 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
5043 factored out from ...
5044 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
5045 (core_ops): Delete.
5046 (sniff_core_bfd): Add gdbarch parameter.
5047 (core_close): Delete, merged into ...
5048 (core_target::close): ... here. Delete self.
5049 (core_close_cleanup): Delete.
5050 (core_target_open): Allocate a core_target on the heap. Use a
5051 unique_ptr instead of a cleanup. Bits moved into the core_target
5052 ctor. Adjust to use core_target methods instead of globals.
5053 (get_core_register_section): Rename to ...
5054 (core_target::get_core_register_section): ... this and adjust.
5055 (struct get_core_registers_cb_data): New.
5056 (get_core_registers_cb): Use it. Use bool.
5057 (core_target::fetch_registers, core_target::files_info)
5058 (core_target::xfer_partial, core_target::read_description)
5059 (core_target::pid_to, core_target::thread_name): Adjust to
5060 reference class fields instead of globals.
5061 * target.h (struct target_ops_deleter, target_ops_up): New.
5062
5063 2018-05-11 Pedro Alves <palves@redhat.com>
5064
5065 * corefile.c (core_file_command): Move to corelow.c.
5066 * corelow.c (the_core_target): Delete.
5067 (core_file_command): Moved from corefile.c. Check exec_bfd
5068 instead of the_core_target. Use target_detach instead of calling
5069 into the_core_target directly.
5070 (maybe_say_no_core_file_now): New.
5071 (core_target::detach): Use it.
5072 (_initialize_corelow): Remove references to the_core_target.
5073 * gdbcore.h (the_core_target): Delete.
5074
5075 2018-05-11 Tom Tromey <tromey@redhat.com>
5076 Pedro Alves <palves@redhat.com>
5077
5078 * corefile.c (core_bfd): Remove.
5079 * gdbcore.h (core_bfd): Now a macro.
5080 * progspace.h (struct program_space) <cbfd>: New field.
5081
5082 2018-05-11 Tom Tromey <tom@tromey.com>
5083
5084 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
5085 gdb::def_vector.
5086
5087 2018-05-10 Tom Tromey <tom@tromey.com>
5088
5089 * configure: Rebuild.
5090 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
5091
5092 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5093
5094 PR server/23158:
5095 * regformats/regdat.sh: Adjust script, following the addition
5096 of the new expedite_regs parameter to init_target_desc.
5097
5098 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
5099
5100 PR gdb/23127
5101 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
5102 set_gdbarch_significant_addr_bit.
5103 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
5104 set_gdbarch_significant_addr_bit.
5105 * utils.c (address_significant): Update to sign extend addr.
5106
5107 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
5108
5109 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
5110 (xtensa_linux_init_abi): Limit tdep->num_regs by
5111 tdep->num_nopriv_regs.
5112 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
5113 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
5114 not initialized.
5115
5116 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
5117
5118 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
5119
5120 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
5121
5122 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
5123 (I387_MXCSR_INIT_VAL): New constant.
5124 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
5125 buffer if it was supplied by the inferior.
5126 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
5127 (i387_xsave_get_clear_bv): New function.
5128 (i387_supply_xsave): Only read x87 control registers from the
5129 xsave buffer if the feature is enabled, and the state will have
5130 been written, otherwise, provide a suitable default.
5131 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
5132 including x87 control registers. Update control registers if they
5133 have changed from the default value, and mark features as enabled
5134 as required.
5135 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
5136
5137 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
5138
5139 * spu-tdep.c (info_spu_event_command): Fix output formatting.
5140
5141 2018-05-07 Tom Tromey <tom@tromey.com>
5142
5143 * configure: Rebuild.
5144 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
5145
5146 2018-05-07 Tom Tromey <tom@tromey.com>
5147
5148 PR tdep/20362:
5149 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
5150 bit. Use correct value for VDIV.
5151
5152 2018-05-04 Tom Tromey <tom@tromey.com>
5153
5154 * configure: Rebuild.
5155 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
5156
5157 2018-05-04 Tom Tromey <tom@tromey.com>
5158
5159 * linux-record.c (record_linux_system_call) <case
5160 RECORD_SYS_RECVFROM>: Add "break".
5161
5162 2018-05-04 Tom Tromey <tom@tromey.com>
5163
5164 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
5165 Add missing "break".
5166 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
5167 Add missing "break".
5168
5169 2018-05-04 Tom Tromey <tom@tromey.com>
5170
5171 * rs6000-tdep.c (ppc_process_record_op4)
5172 (ppc_process_record_op63): Add fall-through comment.
5173
5174 2018-05-04 Tom Tromey <tom@tromey.com>
5175
5176 * i386-tdep.c (i386_process_record): Add fall-through comment.
5177
5178 2018-05-04 Tom Tromey <tom@tromey.com>
5179
5180 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
5181 comment.
5182
5183 2018-05-04 Tom Tromey <tom@tromey.com>
5184
5185 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
5186 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
5187 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
5188 comment.
5189 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
5190 comment.
5191 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
5192 comment.
5193
5194 2018-05-04 Tom Tromey <tom@tromey.com>
5195
5196 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
5197
5198 2018-05-04 Tom Tromey <tom@tromey.com>
5199
5200 * s390-tdep.c (s390_process_record): Fix fall-through comments.
5201 * xcoffread.c (scan_xcoff_symtab): Move comment later.
5202 * symfile.c (section_is_mapped): Fix fall-through comment.
5203 * stabsread.c (define_symbol, read_member_functions): Fix
5204 fall-through comment.
5205 * s390-linux-tdep.c (s390_process_record): Fix fall-through
5206 comment.
5207 * remote.c (remote_wait_as): Fix fall-through comment.
5208 * p-exp.y (yylex): Fix fall-through comment.
5209 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
5210 comment.
5211 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
5212 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
5213 * jv-exp.y (yylex): Fix fall-through comment.
5214 * go-exp.y (lex_one_token): Fix fall-through comment.
5215 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
5216 fall-through comment.
5217 * f-exp.y (yylex): Fix fall-through comment.
5218 * dwarf2read.c (process_die): Fix fall-through comments.
5219 * dbxread.c (process_one_symbol): Fix fall-through comment.
5220 * d-exp.y (lex_one_token): Fix fall-through comment.
5221 * cp-name-parser.y (yylex): Fix fall-through comment.
5222 * coffread.c (coff_symtab_read): Fix fall-through comment.
5223 * c-exp.y (lex_one_token): Fix fall-through comment.
5224 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
5225 comment.
5226 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
5227 comment.
5228
5229 2018-05-04 Tom Tromey <tom@tromey.com>
5230
5231 PR python/22730:
5232 * NEWS: Mention gdb.execute change.
5233 * gdbcmd.h (execute_control_command): Don't declare.
5234 * python/python.c (execute_gdb_command): Use read_command_lines_1,
5235 execute_control_commands, execute_control_commands_to_string.
5236 * cli/cli-script.h (execute_control_commands)
5237 (execute_control_commands_to_string): Declare.
5238 (execute_control_command): Add from_tty parameter.
5239 * cli/cli-script.c (execute_control_commands)
5240 (execute_control_commands_to_string): New functions.
5241 (execute_user_command): Use execute_control_commands.
5242 (execute_control_command_1): Add "from_tty" parameter. Update.
5243 (execute_control_command): Likewise.
5244
5245 2018-05-04 Tom Tromey <tom@tromey.com>
5246
5247 PR python/22731:
5248 * NEWS: Mention that breakpoint commands are writable.
5249 * python/py-breakpoint.c (bppy_set_commands): New function.
5250 (breakpoint_object_getset) <"commands">: Use it.
5251
5252 2018-05-04 Tom Tromey <tom@tromey.com>
5253
5254 * tracepoint.c (actions_command): Update.
5255 * mi/mi-cmd-break.c (mi_command_line_array)
5256 (mi_command_line_array_cnt, mi_command_line_array_ptr)
5257 (mi_read_next_line): Remove.
5258 (mi_cmd_break_commands): Update.
5259 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
5260 function_view.
5261 * cli/cli-script.c (get_command_line): Update.
5262 (process_next_line): Use function_view. Constify.
5263 (recurse_read_control_structure, read_command_lines)
5264 (read_command_lines_1): Change argument types to function_view.
5265 (do_define_command, document_command): Update.
5266 * breakpoint.h (check_tracepoint_command): Don't declare.
5267 * breakpoint.c (check_tracepoint_command): Remove.
5268 (commands_command_1, create_tracepoint_from_upload): Update.
5269
5270 2018-05-04 Tom Tromey <tom@tromey.com>
5271
5272 PR gdb/11750:
5273 * cli/cli-script.h (enum command_control_type) <define_control>:
5274 New constant.
5275 * cli/cli-script.c (multi_line_command_p): Handle define_control.
5276 (build_command_line, execute_control_command_1)
5277 (process_next_line): Likewise.
5278 (do_define_command): New function, extracted from define_command.
5279 (define_command): Use it.
5280
5281 2018-05-04 Tom Tromey <tom@tromey.com>
5282
5283 * tracepoint.c (actions_command): Update.
5284 * cli/cli-script.h (read_command_lines): Update.
5285 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
5286 (MAX_TMPBUF): Remove define.
5287 (define_command): Use string_printf.
5288 (document_command): Likewise.
5289 * breakpoint.c (commands_command_1): Update.
5290
5291 2018-05-04 Tom Tromey <tom@tromey.com>
5292
5293 * top.c (execute_command): Update.
5294 * cli/cli-script.h (print_command_lines): Now varargs.
5295 * cli/cli-script.c (print_command_lines): Now varargs.
5296 (execute_control_command_1) <case while_control, case if_control>:
5297 Update.
5298
5299 2018-05-04 Tom Tromey <tom@tromey.com>
5300
5301 * tracepoint.c (all_tracepoint_actions): Rename from
5302 all_tracepoint_actions_and_cleanup. Change return type.
5303 (actions_command, encode_actions_1, encode_actions)
5304 (trace_dump_actions, tdump_command): Update.
5305 * remote.c (remote_download_command_source): Update.
5306 * python/python.c (gdbpy_eval_from_control_command)
5307 (python_command, python_interactive_command): Update.
5308 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
5309 * guile/guile.c (guile_command)
5310 (gdbscm_eval_from_control_command, guile_command): Update.
5311 * compile/compile.c (compile_code_command)
5312 (compile_print_command, compile_to_object): Update.
5313 * cli/cli-script.h (struct command_lines_deleter): New.
5314 (counted_command_line): New typedef.
5315 (struct command_line): Add constructor, destructor.
5316 <body_list>: Remove.
5317 <body_list_0, body_list_1>: New members.
5318 (command_line_up): Remove typedef.
5319 (read_command_lines, read_command_lines_1, get_command_line):
5320 Update.
5321 (copy_command_lines): Don't declare.
5322 * cli/cli-script.c (build_command_line): Use "new".
5323 (get_command_line): Return counted_command_line.
5324 (print_command_lines, execute_user_command)
5325 (execute_control_command_1, while_command, if_command): Update.
5326 (realloc_body_list): Remove.
5327 (process_next_line, recurse_read_control_structure): Update.
5328 (read_command_lines, read_command_lines_1): Return counted_command_line.
5329 (free_command_lines): Use "delete".
5330 (copy_command_lines): Remove.
5331 (define_command, document_command, show_user_1): Update.
5332 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
5333 a counted_command_line.
5334 * breakpoint.h (counted_command_line): Remove typedef.
5335 (breakpoint_set_commands): Update.
5336 * breakpoint.c (check_no_tracepoint_commands)
5337 (validate_commands_for_breakpoint): Update.
5338 (breakpoint_set_commands): Change commands to be a
5339 counted_command_line.
5340 (commands_command_1, update_dprintf_command_list)
5341 (create_tracepoint_from_upload): Update.
5342
5343 2018-05-04 Tom Tromey <tom@tromey.com>
5344
5345 * cli/cli-decode.h (cmd_list_element): New constructor.
5346 (~cmd_list_element): New destructor.
5347 (struct cmd_list_element): Add initializers.
5348 * cli/cli-decode.c (do_add_cmd): Use "new".
5349 (delete_cmd): Use "delete".
5350
5351 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
5352 Pedro Alves <palves@redhat.com>
5353
5354 PR breakpoints/19806 and support for PR external/20207.
5355 * NEWS: Mention Aarch64 watchpoint improvements.
5356 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
5357 watchpoints and PR external/20207 watchpoints.
5358 * nat/aarch64-linux-hw-point.c
5359 (kernel_supports_any_contiguous_range): New.
5360 (aarch64_watchpoint_offset): New.
5361 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
5362 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
5363 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
5364 (aarch64_align_watchpoint): New parameters aligned_offset_p and
5365 next_addr_orig_p. Support PR external/20207 watchpoints.
5366 (aarch64_downgrade_regs): New.
5367 (aarch64_dr_state_insert_one_point): New parameters offset and
5368 addr_orig.
5369 (aarch64_dr_state_remove_one_point): Likewise.
5370 (aarch64_handle_breakpoint): Update caller.
5371 (aarch64_handle_aligned_watchpoint): Likewise.
5372 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
5373 aligned_offset.
5374 (aarch64_linux_set_debug_regs): Remove const from state. Call
5375 aarch64_downgrade_regs.
5376 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
5377 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
5378 (DR_CONTROL_MASK): ... this.
5379 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
5380 (unsigned int aarch64_watchpoint_offset): New prototype.
5381 (aarch64_linux_set_debug_regs): Remove const from state.
5382 * utils.c (align_up, align_down): Move to ...
5383 * common/common-utils.c (align_up, align_down): ... here.
5384 * utils.h (align_up, align_down): Move to ...
5385 * common/common-utils.h (align_up, align_down): ... here.
5386
5387 2018-05-04 Joel Brobecker <brobecker@adacore.com>
5388
5389 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
5390 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
5391 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
5392 Re-implement to match the ABI as summarized in GCC's
5393 gcc/config/sparc/sparc.c. All callers updated.
5394 (sparc32_store_arguments): Remove assertion.
5395
5396 2018-05-04 Tom Tromey <tom@tromey.com>
5397
5398 * printcmd.c: Don't include tui.h.
5399 (decode_format): Use skip_spaces.
5400
5401 2018-05-04 Tom Tromey <tom@tromey.com>
5402
5403 PR gdb/22619:
5404 * printcmd.c (last_count): New global.
5405 (x_command): Use saved count when repeating.
5406
5407 2018-05-04 Tom Tromey <tom@tromey.com>
5408
5409 * nto-procfs.c (do_closedir_cleanup): Remove.
5410 (procfs_pidlist): Use gdb_dir_up.
5411 * procfs.c (do_closedir_cleanup): Remove.
5412 (proc_update_threads): Use gdb_dir_up.
5413 * common/filestuff.h (struct gdb_dir_deleter): New.
5414 (gdb_dir_up): New typedef.
5415
5416 2018-05-04 Tom Tromey <tom@tromey.com>
5417
5418 * ada-lang.c (print_mention_exception): Use std::string.
5419
5420 2018-05-04 Tom Tromey <tom@tromey.com>
5421
5422 * ada-lang.c (create_excep_cond_exprs): Update.
5423 (ada_exception_catchpoint_cond_string): Use std::string.
5424
5425 2018-05-04 Tom Tromey <tom@tromey.com>
5426
5427 * ada-lang.c (xget_renaming_scope): Return std::string.
5428 (old_renaming_is_invisible): Update.
5429
5430 2018-05-04 Tom Tromey <tom@tromey.com>
5431
5432 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
5433 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
5434
5435 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
5436
5437 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
5438
5439 2018-05-04 Tom Tromey <tom@tromey.com>
5440
5441 * remote.c (remote_query_supported_append): Change type.
5442 (remote_check_symbols): Update.
5443
5444 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
5445
5446 PR gdb/11420
5447 * configure.ac: Prepend libpython.
5448 * python/python-config.py: Likewise.
5449 * configure: Regenerate.
5450
5451 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
5452
5453 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
5454
5455 2018-05-03 Pedro Alves <palves@redhat.com>
5456
5457 * s390-linux-nat.c
5458 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
5459 override. Write 'true' instead of '1'.
5460 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
5461 declaration.
5462
5463 2018-05-02 Pedro Alves <palves@redhat.com>
5464
5465 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
5466 add_inf_child_target.
5467 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
5468 add_inf_child_target.
5469 * aix-thread.c (aix_thread_target_info): New.
5470 (aix_thread_target) <shortname, longname, doc>: Delete.
5471 <info>: New.
5472 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
5473 add_inf_child_target.
5474 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
5475 add_inf_child_target.
5476 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
5477 add_inf_child_target.
5478 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
5479 add_inf_child_target.
5480 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
5481 add_inf_child_target.
5482 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
5483 add_inf_child_target.
5484 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
5485 add_inf_child_target.
5486 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
5487 add_inf_child_target.
5488 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
5489 add_inf_child_target.
5490 * bfd-target.c (target_bfd_target_info): New.
5491 (target_bfd) <shortname, longname, doc>: Delete.
5492 <info>: New.
5493 * bsd-kvm.c (bsd_kvm_target_info): New.
5494 (bsd_kvm_target) <shortname, longname, doc>: Delete.
5495 <info>: New.
5496 (bsd_kvm_target::open): Rename to ...
5497 (bsd_kvm_target_open): ... this. Adjust.
5498 * bsd-uthread.c (bsd_uthread_target_info): New.
5499 (bsd_uthread_target) <shortname, longname, doc>: Delete.
5500 <info>: New.
5501 * corefile.c (core_file_command): Adjust.
5502 * corelow.c (core_target_info): New.
5503 (core_target) <shortname, longname, doc>: Delete.
5504 <info>: New.
5505 (core_target::open): Rename to ...
5506 (core_target_open): ... this. Adjust.
5507 * ctf.c (ctf_target_info): New.
5508 (ctf_target) <shortname, longname, doc>: Delete.
5509 <info>: New.
5510 (ctf_target::open): Rename to ...
5511 (ctf_target_open): ... this.
5512 (_initialize_ctf): Adjust.
5513 * exec.c (exec_target_info): New.
5514 (exec_target) <shortname, longname, doc>: Delete.
5515 <info>: New.
5516 (exec_target::open): Rename to ...
5517 (exec_target_open): ... this.
5518 * gdbcore.h (core_target_open): Declare.
5519 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
5520 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
5521 add_inf_child_target.
5522 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
5523 add_inf_child_target.
5524 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
5525 add_inf_child_target.
5526 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
5527 add_inf_child_target.
5528 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
5529 add_inf_child_target.
5530 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
5531 add_inf_child_target.
5532 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
5533 add_inf_child_target.
5534 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
5535 add_inf_child_target.
5536 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
5537 add_inf_child_target.
5538 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
5539 add_inf_child_target.
5540 * inf-child.c (inf_child_target_info): New.
5541 (inf_child_target::info): New.
5542 (inf_child_open_target): Remove 'target' parameter. Use
5543 get_native_target instead.
5544 (inf_child_target::open): Delete.
5545 (add_inf_child_target): New.
5546 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
5547 Delete.
5548 <info>: New.
5549 (add_inf_child_target): Declare.
5550 (inf_child_open_target): Declare.
5551 * linux-thread-db.c (thread_db_target_info): New.
5552 (thread_db_target) <shortname, longname, doc>: Delete.
5553 <info>: New.
5554 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
5555 add_inf_child_target.
5556 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
5557 add_inf_child_target.
5558 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
5559 add_inf_child_target.
5560 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
5561 add_inf_child_target.
5562 * make-target-delegates (print_class): Adjust.
5563 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
5564 add_inf_child_target.
5565 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
5566 add_inf_child_target.
5567 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
5568 add_inf_child_target.
5569 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
5570 add_inf_child_target.
5571 * nto-procfs.c (nto_native_target_info): New.
5572 (nto_procfs_target_native) <shortname, longname, doc>:
5573 Delete.
5574 <info>: New.
5575 (nto_procfs_target_info): New.
5576 (nto_procfs_target_procfs) <shortname, longname, doc>:
5577 Delete.
5578 <info>: New.
5579 (init_procfs_targets): Adjust.
5580 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
5581 add_inf_child_target.
5582 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
5583 add_inf_child_target.
5584 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
5585 add_inf_child_target.
5586 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
5587 add_inf_child_target.
5588 * ravenscar-thread.c (ravenscar_target_info): New.
5589 (ravenscar_thread_target) <shortname, longname, doc>:
5590 Delete.
5591 <info>: New.
5592 * record-btrace.c (record_btrace_target_info):
5593 (record_btrace_target) <shortname, longname, doc>: Delete.
5594 <info>: New.
5595 (record_btrace_target::open): Rename to ...
5596 (record_btrace_target_open): ... this. Adjust.
5597 * record-full.c (record_longname, record_doc): New.
5598 (record_full_base_target) <shortname, longname, doc>: Delete.
5599 <info>: New.
5600 (record_full_target_info): New.
5601 (record_full_target): <shortname>: Delete.
5602 <info>: New.
5603 (record_full_core_open_1, record_full_open_1): Update comments.
5604 (record_full_base_target::open): Rename to ...
5605 (record_full_open): ... this.
5606 (cmd_record_full_restore): Update.
5607 (_initialize_record_full): Update.
5608 * remote-sim.c (remote_sim_target_info): New.
5609 (gdbsim_target) <shortname, longname, doc>: Delete.
5610 <info>: New.
5611 (gdbsim_target::open): Rename to ...
5612 (gdbsim_target_open): ... this.
5613 (_initialize_remote_sim): Adjust.
5614 * remote.c (remote_doc): New.
5615 (remote_target_info): New.
5616 (remote_target) <shortname, longname, doc>: Delete.
5617 <info>: New.
5618 (extended_remote_target_info): New.
5619 (extended_remote_target) <shortname, longname, doc>: Delete.
5620 <info>: New.
5621 (remote_target::open_1): Make static. Adjust.
5622 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
5623 * s390-linux-nat.c (_initialize_s390_nat): Use
5624 add_inf_child_target.
5625 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
5626 add_inf_child_target.
5627 * sol-thread.c (thread_db_target_info): New.
5628 (sol_thread_target) <shortname, longname, doc>: Delete.
5629 <info>: New.
5630 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
5631 add_inf_child_target.
5632 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
5633 add_inf_child_target.
5634 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
5635 add_inf_child_target.
5636 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
5637 add_inf_child_target.
5638 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
5639 add_inf_child_target.
5640 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
5641 add_inf_child_target.
5642 * spu-linux-nat.c (_initialize_spu_nat): Use
5643 add_inf_child_target.
5644 * spu-multiarch.c (spu_multiarch_target_info): New.
5645 (spu_multiarch_target) <shortname, longname, doc>: Delete.
5646 <info>: New.
5647 * target-delegates.c: Regenerate.
5648 * target.c: Include <unordered_map>.
5649 (target_ops_p): Delete.
5650 (DEF_VEC_P(target_ops_p)): Delete.
5651 (target_factories): New.
5652 (test_target_info): New.
5653 (test_target_ops::info): New.
5654 (open_target): Adjust to use target_factories.
5655 (add_target_with_completer): Rename to ...
5656 (add_target): ... this. Change prototype. Register target_info
5657 and open callback in target_factories. Register target_info in
5658 command context instead of target_ops.
5659 (add_target): Delete old implementation.
5660 (add_deprecated_target_alias): Change prototype. Adjust.
5661 (the_native_target): New.
5662 (set_native_target, get_native_target): New.
5663 (find_default_run_target): Use the_native_target.
5664 (find_attach_target, find_run_target): Simplify.
5665 (target_ops::open): Delete.
5666 (dummy_target_info): New.
5667 (dummy_target::shortname, dummy_target::longname)
5668 (dummy_target::doc): Delete.
5669 (dummy_target::info): New.
5670 (debug_target::shortname, debug_target::longname)
5671 (debug_target::doc): Delete.
5672 (debug_target::info): New.
5673 * target.h (struct target_info): New.
5674 (target_ops::~target_ops): Add comment.
5675 (target_ops::info): New.
5676 (target_ops::shortname, target_ops::longname, target_ops::doc): No
5677 longer virtual. Implement in terms of target_info.
5678 (set_native_target, get_native_target): Declare.
5679 (target_open_ftype): New.
5680 (add_target, add_target_with_completer)
5681 (add_deprecated_target_alias): Change prototype.
5682 (test_target) <shortname, longname, doc>: Delete.
5683 <info>: New.
5684 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
5685 add_inf_child_target.
5686 * tracefile-tfile.c (tfile_target_info): New.
5687 (tfile_target) <shortname, longname, doc>: Delete.
5688 <info>: New.
5689 (tfile_target::open): Rename to ...
5690 (tfile_target_open): ... this.
5691 (_initialize_tracefile_tfile): Adjust.
5692 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
5693 add_inf_child_target.
5694 * windows-nat.c (_initialize_windows_nat): Use
5695 add_inf_child_target.
5696 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
5697 add_inf_child_target.
5698
5699 2018-05-02 Pedro Alves <palves@redhat.com>
5700
5701 * linux-nat.h (linux_nat_target) <low_new_thread,
5702 low_delete_thread, low_new_fork, low_forget_process,
5703 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
5704 New virtual methods.
5705 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5706 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
5707 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
5708 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5709 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
5710 Delete.
5711 * linux-fork.c (delete_fork): Adjust to call low method.
5712 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
5713 (linux_nat_new_fork, linux_nat_forget_process_hook)
5714 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
5715 (linux_nat_status_is_event):
5716 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
5717 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
5718 to call low method.
5719 (sigtrap_is_event): Rename to ...
5720 (linux_nat_target::low_status_is_event): ... this.
5721 (linux_nat_set_status_is_event): Delete.
5722 (save_stop_reason, linux_nat_wait_1)
5723 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
5724 low methods.
5725 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5726 (linux_nat_set_new_fork, linux_nat_set_forget_process)
5727 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5728 (linux_nat_set_prepare_to_resume): Delete.
5729 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
5730 low virtual methods.
5731 * amd64-linux-nat.c: Likewise.
5732 * arm-linux-nat.c: Likewise.
5733 * i386-linux-nat.c: Likewise.
5734 * ia64-linux-nat.c: Likewise.
5735 * mips-linux-nat.c: Likewise.
5736 * ppc-linux-nat.c: Likewise.
5737 * s390-linux-nat.c: Likewise.
5738 * sparc64-linux-nat.c: Likewise.
5739 * x86-linux-nat.c: Likewise.
5740 * x86-linux-nat.h: Include "nat/x86-linux.h".
5741 (x86_linux_nat_target) <low_new_fork, low_forget_process,
5742 low_prepare_to_resume, low_new_thread, low_delete_thread>:
5743 Override methods.
5744
5745 2018-05-02 Pedro Alves <palves@redhat.com>
5746
5747 * target.h (target_ops)
5748 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5749 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
5750 stopped_by_watchpoint, have_continuable_watchpoint,
5751 stopped_data_address, watchpoint_addr_within_range,
5752 can_accel_watchpoint_condition, can_run, thread_alive,
5753 has_all_memory, has_memory, has_stack, has_registers,
5754 has_execution, can_async_p, is_async_p, supports_non_stop,
5755 always_non_stop_p, can_execute_reverse, supports_multi_process,
5756 supports_enable_disable_tracepoint,
5757 supports_disable_randomization, supports_string_tracing,
5758 supports_evaluation_of_breakpoint_conditions,
5759 can_run_breakpoint_commands, filesystem_is_local,
5760 can_download_tracepoint, get_trace_state_variable_value,
5761 set_trace_notes, get_tib_address, use_agent, can_use_agent,
5762 record_is_replaying, record_will_replay,
5763 augmented_libraries_svr4_read>: Adjust to return bool.
5764 * aarch64-linux-nat.c: All implementations adjusted.
5765 * aix-thread.c: All implementations adjusted.
5766 * arm-linux-nat.c: All implementations adjusted.
5767 * breakpoint.c: All implementations adjusted.
5768 * bsd-kvm.c: All implementations adjusted.
5769 * bsd-uthread.c: All implementations adjusted.
5770 * corelow.c: All implementations adjusted.
5771 * ctf.c: All implementations adjusted.
5772 * darwin-nat.c: All implementations adjusted.
5773 * darwin-nat.h: All implementations adjusted.
5774 * exec.c: All implementations adjusted.
5775 * fbsd-nat.c: All implementations adjusted.
5776 * fbsd-nat.h: All implementations adjusted.
5777 * gnu-nat.c: All implementations adjusted.
5778 * gnu-nat.h: All implementations adjusted.
5779 * go32-nat.c: All implementations adjusted.
5780 * ia64-linux-nat.c: All implementations adjusted.
5781 * inf-child.c: All implementations adjusted.
5782 * inf-child.h: All implementations adjusted.
5783 * inf-ptrace.c: All implementations adjusted.
5784 * inf-ptrace.h: All implementations adjusted.
5785 * linux-nat.c: All implementations adjusted.
5786 * linux-nat.h: All implementations adjusted.
5787 * mips-linux-nat.c: All implementations adjusted.
5788 * nto-procfs.c: All implementations adjusted.
5789 * ppc-linux-nat.c: All implementations adjusted.
5790 * procfs.c: All implementations adjusted.
5791 * ravenscar-thread.c: All implementations adjusted.
5792 * record-btrace.c: All implementations adjusted.
5793 * record-full.c: All implementations adjusted.
5794 * remote-sim.c: All implementations adjusted.
5795 * remote.c: All implementations adjusted.
5796 * s390-linux-nat.c: All implementations adjusted.
5797 * sol-thread.c: All implementations adjusted.
5798 * spu-multiarch.c: All implementations adjusted.
5799 * target-delegates.c: All implementations adjusted.
5800 * target.c: All implementations adjusted.
5801 * target.h: All implementations adjusted.
5802 * tracefile-tfile.c: All implementations adjusted.
5803 * tracefile.c: All implementations adjusted.
5804 * tracefile.h: All implementations adjusted.
5805 * windows-nat.c: All implementations adjusted.
5806 * x86-linux-nat.h: All implementations adjusted.
5807 * x86-nat.h: All implementations adjusted.
5808
5809 2018-05-02 Pedro Alves <palves@redhat.com>
5810
5811 * make-target-delegates (scan_target_h): Don't trim lines here.
5812 Replace sequences of tabs and/or whitespace with a single
5813 whitespace.
5814 (top level, parsing methods): Trim each line before processing it
5815 here.
5816
5817 2018-05-02 Pedro Alves <palves@redhat.com>
5818 John Baldwin <jhb@freebsd.org>
5819
5820 * target.h (enum strata) <debug_stratum>: New.
5821 (struct target_ops) <all delegation methods>: Replace by C++
5822 virtual methods, and drop "to_" prefix. All references updated
5823 throughout.
5824 <to_shortname, to_longname, to_doc, to_data,
5825 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
5826 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
5827 virtual methods. All references updated throughout.
5828 <can_attach, supports_terminal_ours, can_create_inferior,
5829 get_thread_control_capabilities, attach_no_wait>: New
5830 virtual methods.
5831 <insert_breakpoint, remove_breakpoint>: Now
5832 TARGET_DEFAULT_NORETURN methods.
5833 <info_proc>: Now returns bool.
5834 <to_magic>: Delete.
5835 (OPS_MAGIC): Delete.
5836 (current_target): Delete. All references replaced by references
5837 to ...
5838 (target_stack): ... this. New.
5839 (target_shortname, target_longname): Adjust.
5840 (target_can_run): Now a function declaration.
5841 (default_child_has_all_memory, default_child_has_memory)
5842 (default_child_has_stack, default_child_has_registers)
5843 (default_child_has_execution): Remove target_ops parameter.
5844 (complete_target_initialization): Delete.
5845 (memory_breakpoint_target): New template class.
5846 (test_target_ops): Refactor as a C++ class with virtual methods.
5847 * make-target-delegates (NAME_PART): Tighten.
5848 (POINTER_PART, CP_SYMBOL): New.
5849 (SIMPLE_RETURN_PART): Reimplement.
5850 (VEC_RETURN_PART): Expect less.
5851 (RETURN_PART, VIRTUAL_PART): New.
5852 (METHOD): Adjust to C++ virtual methods.
5853 (scan_target_h): Remove reference to C99.
5854 (dname): Output "target_ops::" prefix.
5855 (write_function_header): Adjust to output a C++ class method.
5856 (write_declaration): New.
5857 (write_delegator): Adjust to output a C++ class method.
5858 (tdname): Output "dummy_target::" prefix.
5859 (write_tdefault, write_debugmethod): Adjust to output a C++ class
5860 method.
5861 (tdefault_names, debug_names): Delete.
5862 (return_types, tdefaults, styles, argtypes_array): New.
5863 (top level): All methods are delegators.
5864 (print_class): New.
5865 (top level): Print dummy_target and debug_target classes.
5866 * target-delegates.c: Regenerate.
5867 * target-debug.h (target_debug_print_enum_info_proc_what)
5868 (target_debug_print_thread_control_capabilities)
5869 (target_debug_print_thread_info_p): New.
5870 * target.c (dummy_target): Delete.
5871 (the_dummy_target, the_debug_target): New.
5872 (target_stack): Now extern.
5873 (set_targetdebug): Push/unpush debug target.
5874 (default_child_has_all_memory, default_child_has_memory)
5875 (default_child_has_stack, default_child_has_registers)
5876 (default_child_has_execution): Remove target_ops parameter.
5877 (complete_target_initialization): Delete.
5878 (add_target_with_completer): No longer call
5879 complete_target_initialization.
5880 (target_supports_terminal_ours): Use regular delegation.
5881 (update_current_target): Delete.
5882 (push_target): No longer check magic number. Don't call
5883 update_current_target.
5884 (unpush_target): Don't call update_current_target.
5885 (target_is_pushed): No longer check magic number.
5886 (target_require_runnable): Skip for all stratums over
5887 process_stratum.
5888 (target_ops::info_proc): New.
5889 (target_info_proc): Use find_target_at and
5890 find_default_run_target.
5891 (target_supports_disable_randomization): Use regular delegation.
5892 (target_get_osdata): Use find_target_at.
5893 (target_ops::open, target_ops::close, target_ops::can_attach)
5894 (target_ops::attach, target_ops::can_create_inferior)
5895 (target_ops::create_inferior, target_ops::can_run)
5896 (target_can_run): New.
5897 (default_fileio_target): Use regular delegation.
5898 (target_ops::fileio_open, target_ops::fileio_pwrite)
5899 (target_ops::fileio_pread, target_ops::fileio_fstat)
5900 (target_ops::fileio_close, target_ops::fileio_unlink)
5901 (target_ops::fileio_readlink): New.
5902 (target_fileio_open_1, target_fileio_unlink)
5903 (target_fileio_readlink): Always call the target method. Handle
5904 FILEIO_ENOSYS.
5905 (return_zero, return_zero_has_execution): Delete.
5906 (init_dummy_target): Delete.
5907 (dummy_target::dummy_target, dummy_target::shortname)
5908 (dummy_target::longname, dummy_target::doc)
5909 (debug_target::debug_target, debug_target::shortname)
5910 (debug_target::longname, debug_target::doc): New.
5911 (target_supports_delete_record): Use regular delegation.
5912 (setup_target_debug): Delete.
5913 (maintenance_print_target_stack): Skip debug_stratum.
5914 (initialize_targets): Instantiate the_dummy_target and
5915 the_debug_target.
5916 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
5917 use target_stack.
5918 (target_auxv_search, fprint_target_auxv): Adjust.
5919 (info_auxv_command): Adjust to use target_stack.
5920 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
5921 * exceptions.c (print_flush): Handle a NULL target_stack.
5922 * regcache.c (target_ops_no_register): Refactor as class with
5923 virtual methods.
5924
5925 * exec.c (exec_target): New class.
5926 (exec_ops): Now an exec_target.
5927 (exec_open, exec_close_1, exec_get_section_table)
5928 (exec_xfer_partial, exec_files_info, exec_has_memory)
5929 (exec_make_note_section): Refactor as exec_target methods.
5930 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
5931 Delete.
5932 (exec_target::find_memory_regions): New.
5933 (_initialize_exec): Don't call init_exec_ops.
5934 * gdbcore.h (exec_file_clear): Delete.
5935
5936 * corefile.c (core_target): Delete.
5937 (core_file_command): Adjust.
5938 * corelow.c (core_target): New class.
5939 (the_core_target): New.
5940 (core_close): Remove target_ops parameter.
5941 (core_close_cleanup): Adjust.
5942 (core_target::close): New.
5943 (core_open, core_detach, get_core_registers, core_files_info)
5944 (core_xfer_partial, core_thread_alive, core_read_description)
5945 (core_pid_to_str, core_thread_name, core_has_memory)
5946 (core_has_stack, core_has_registers, core_info_proc): Rework as
5947 core_target methods.
5948 (ignore, core_remove_breakpoint, init_core_ops): Delete.
5949 (_initialize_corelow): Initialize the_core_target.
5950 * gdbcore.h (core_target): Delete.
5951 (the_core_target): New.
5952
5953 * ctf.c: (ctf_target): New class.
5954 (ctf_ops): Now a ctf_target.
5955 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
5956 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
5957 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
5958 methods.
5959 (init_ctf_ops): Delete.
5960 (_initialize_ctf): Don't call it.
5961 * tracefile-tfile.c (tfile_target): New class.
5962 (tfile_ops): Now a tfile_target.
5963 (tfile_open, tfile_close, tfile_files_info)
5964 (tfile_get_tracepoint_status, tfile_trace_find)
5965 (tfile_fetch_registers, tfile_xfer_partial)
5966 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
5967 Refactor as tfile_target methods.
5968 (tfile_xfer_partial_features): Remove target_ops parameter.
5969 (init_tfile_ops): Delete.
5970 (_initialize_tracefile_tfile): Don't call it.
5971 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
5972 (tracefile_has_stack, tracefile_has_registers)
5973 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
5974 tracefile_target methods.
5975 (init_tracefile_ops): Delete.
5976 (tracefile_target::tracefile_target): New.
5977 * tracefile.h: Include "target.h".
5978 (tracefile_target): New class.
5979 (init_tracefile_ops): Delete.
5980
5981 * spu-multiarch.c (spu_multiarch_target): New class.
5982 (spu_ops): Now a spu_multiarch_target.
5983 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
5984 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
5985 (spu_search_memory, spu_mourn_inferior): Refactor as
5986 spu_multiarch_target methods.
5987 (init_spu_ops): Delete.
5988 (_initialize_spu_multiarch): Remove references to init_spu_ops,
5989 complete_target_initialization.
5990
5991 * ravenscar-thread.c (ravenscar_thread_target): New class.
5992 (ravenscar_ops): Now a ravenscar_thread_target.
5993 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
5994 (ravenscar_thread_alive, ravenscar_pid_to_str)
5995 (ravenscar_fetch_registers, ravenscar_store_registers)
5996 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
5997 (ravenscar_stopped_by_hw_breakpoint)
5998 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
5999 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
6000 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
6001 methods.
6002 (init_ravenscar_thread_ops): Delete.
6003 (_initialize_ravenscar): Remove references to
6004 init_ravenscar_thread_ops and complete_target_initialization.
6005
6006 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
6007 (bsd_uthread_target): New class.
6008 (bsd_uthread_ops): Now a bsd_uthread_target.
6009 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
6010 (bsd_uthread_close, bsd_uthread_mourn_inferior)
6011 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
6012 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
6013 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
6014 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
6015 (bsd_uthread_target): Delete function.
6016 (_initialize_bsd_uthread): Remove reference to
6017 complete_target_initialization.
6018
6019 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
6020 (target_bfd): ... this new class.
6021 (target_bfd_xfer_partial, target_bfd_get_section_table)
6022 (target_bfd_close): Refactor as target_bfd methods.
6023 (target_bfd::~target_bfd): New.
6024 (target_bfd_reopen): Adjust.
6025 (target_bfd::close): New.
6026
6027 * record-btrace.c (record_btrace_target): New class.
6028 (record_btrace_ops): Now a record_btrace_target.
6029 (record_btrace_open, record_btrace_stop_recording)
6030 (record_btrace_disconnect, record_btrace_close)
6031 (record_btrace_async, record_btrace_info)
6032 (record_btrace_insn_history, record_btrace_insn_history_range)
6033 (record_btrace_insn_history_from, record_btrace_call_history)
6034 (record_btrace_call_history_range)
6035 (record_btrace_call_history_from, record_btrace_record_method)
6036 (record_btrace_is_replaying, record_btrace_will_replay)
6037 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
6038 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
6039 (record_btrace_store_registers, record_btrace_prepare_to_store)
6040 (record_btrace_to_get_unwinder)
6041 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
6042 (record_btrace_commit_resume, record_btrace_wait)
6043 (record_btrace_stop, record_btrace_can_execute_reverse)
6044 (record_btrace_stopped_by_sw_breakpoint)
6045 (record_btrace_supports_stopped_by_sw_breakpoint)
6046 (record_btrace_stopped_by_hw_breakpoint)
6047 (record_btrace_supports_stopped_by_hw_breakpoint)
6048 (record_btrace_update_thread_list, record_btrace_thread_alive)
6049 (record_btrace_goto_begin, record_btrace_goto_end)
6050 (record_btrace_goto, record_btrace_stop_replaying_all)
6051 (record_btrace_execution_direction)
6052 (record_btrace_prepare_to_generate_core)
6053 (record_btrace_done_generating_core): Refactor as
6054 record_btrace_target methods.
6055 (init_record_btrace_ops): Delete.
6056 (_initialize_record_btrace): Remove reference to
6057 init_record_btrace_ops.
6058 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
6059 the execution_direction global.
6060 (record_full_base_target, record_full_target)
6061 (record_full_core_target): New classes.
6062 (record_full_ops): Now a record_full_target.
6063 (record_full_core_ops): Now a record_full_core_target.
6064 (record_full_target::detach, record_full_target::disconnect)
6065 (record_full_core_target::disconnect)
6066 (record_full_target::mourn_inferior, record_full_target::kill):
6067 New.
6068 (record_full_open, record_full_close, record_full_async): Refactor
6069 as methods of the record_full_base_target class.
6070 (record_full_resume, record_full_commit_resume): Refactor
6071 as methods of the record_full_target class.
6072 (record_full_wait, record_full_stopped_by_watchpoint)
6073 (record_full_stopped_data_address)
6074 (record_full_stopped_by_sw_breakpoint)
6075 (record_full_supports_stopped_by_sw_breakpoint)
6076 (record_full_stopped_by_hw_breakpoint)
6077 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
6078 methods of the record_full_base_target class.
6079 (record_full_store_registers, record_full_xfer_partial)
6080 (record_full_insert_breakpoint, record_full_remove_breakpoint):
6081 Refactor as methods of the record_full_target class.
6082 (record_full_can_execute_reverse, record_full_get_bookmark)
6083 (record_full_goto_bookmark, record_full_execution_direction)
6084 (record_full_record_method, record_full_info, record_full_delete)
6085 (record_full_is_replaying, record_full_will_replay)
6086 (record_full_goto_begin, record_full_goto_end, record_full_goto)
6087 (record_full_stop_replaying): Refactor as methods of the
6088 record_full_base_target class.
6089 (record_full_core_resume, record_full_core_kill)
6090 (record_full_core_fetch_registers)
6091 (record_full_core_prepare_to_store)
6092 (record_full_core_store_registers, record_full_core_xfer_partial)
6093 (record_full_core_insert_breakpoint)
6094 (record_full_core_remove_breakpoint)
6095 (record_full_core_has_execution): Refactor
6096 as methods of the record_full_core_target class.
6097 (record_full_base_target::supports_delete_record): New.
6098 (init_record_full_ops): Delete.
6099 (init_record_full_core_ops): Delete.
6100 (record_full_save): Refactor as method of the
6101 record_full_base_target class.
6102 (_initialize_record_full): Remove references to
6103 init_record_full_ops and init_record_full_core_ops.
6104
6105 * remote.c (remote_target, extended_remote_target): New classes.
6106 (remote_ops): Now a remote_target.
6107 (extended_remote_ops): Now an extended_remote_target.
6108 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
6109 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
6110 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
6111 (remote_pass_signals, remote_set_syscall_catchpoint)
6112 (remote_program_signals, )
6113 (remote_thread_always_alive): Remove target_ops parameter.
6114 (remote_thread_alive, remote_thread_name)
6115 (remote_update_thread_list, remote_threads_extra_info)
6116 (remote_static_tracepoint_marker_at)
6117 (remote_static_tracepoint_markers_by_strid)
6118 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
6119 (remote_open): Refactor as methods of remote_target.
6120 (extended_remote_open, extended_remote_detach)
6121 (extended_remote_attach, extended_remote_post_attach):
6122 (extended_remote_supports_disable_randomization)
6123 (extended_remote_create_inferior): : Refactor as method of
6124 extended_remote_target.
6125 (remote_set_permissions, remote_open_1, remote_detach)
6126 (remote_follow_fork, remote_follow_exec, remote_disconnect)
6127 (remote_resume, remote_commit_resume, remote_stop)
6128 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
6129 (remote_terminal_ours, remote_wait, remote_fetch_registers)
6130 (remote_prepare_to_store, remote_store_registers)
6131 (remote_flash_erase, remote_flash_done, remote_files_info)
6132 (remote_kill, remote_mourn, remote_insert_breakpoint)
6133 (remote_remove_breakpoint, remote_insert_watchpoint)
6134 (remote_watchpoint_addr_within_range)
6135 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
6136 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
6137 (remote_supports_stopped_by_sw_breakpoint)
6138 (remote_stopped_by_hw_breakpoint)
6139 (remote_supports_stopped_by_hw_breakpoint)
6140 (remote_stopped_by_watchpoint, remote_stopped_data_address)
6141 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
6142 (remote_verify_memory): Refactor as methods of remote_target.
6143 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
6144 parameter.
6145 (remote_xfer_partial, remote_get_memory_xfer_limit)
6146 (remote_search_memory, remote_rcmd, remote_memory_map)
6147 (remote_pid_to_str, remote_get_thread_local_address)
6148 (remote_get_tib_address, remote_read_description): Refactor as
6149 methods of remote_target.
6150 (remote_target::fileio_open, remote_target::fileio_pwrite)
6151 (remote_target::fileio_pread, remote_target::fileio_close): New.
6152 (remote_hostio_readlink, remote_hostio_fstat)
6153 (remote_filesystem_is_local, remote_can_execute_reverse)
6154 (remote_supports_non_stop, remote_supports_disable_randomization)
6155 (remote_supports_multi_process, remote_supports_cond_breakpoints)
6156 (remote_supports_enable_disable_tracepoint)
6157 (remote_supports_string_tracing)
6158 (remote_can_run_breakpoint_commands, remote_trace_init)
6159 (remote_download_tracepoint, remote_can_download_tracepoint)
6160 (remote_download_trace_state_variable, remote_enable_tracepoint)
6161 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
6162 (remote_trace_start, remote_get_trace_status)
6163 (remote_get_tracepoint_status, remote_trace_stop)
6164 (remote_trace_find, remote_get_trace_state_variable_value)
6165 (remote_save_trace_data, remote_get_raw_trace_data)
6166 (remote_set_disconnected_tracing, remote_core_of_thread)
6167 (remote_set_circular_trace_buffer, remote_traceframe_info)
6168 (remote_get_min_fast_tracepoint_insn_len)
6169 (remote_set_trace_buffer_size, remote_set_trace_notes)
6170 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
6171 (remote_disable_btrace, remote_teardown_btrace)
6172 (remote_read_btrace, remote_btrace_conf)
6173 (remote_augmented_libraries_svr4_read, remote_load)
6174 (remote_pid_to_exec_file, remote_can_do_single_step)
6175 (remote_execution_direction, remote_thread_handle_to_thread_info):
6176 Refactor as methods of remote_target.
6177 (init_remote_ops, init_extended_remote_ops): Delete.
6178 (remote_can_async_p, remote_is_async_p, remote_async)
6179 (remote_thread_events, remote_upload_tracepoints)
6180 (remote_upload_trace_state_variables): Refactor as methods of
6181 remote_target.
6182 (_initialize_remote): Remove references to init_remote_ops and
6183 init_extended_remote_ops.
6184
6185 * remote-sim.c (gdbsim_target): New class.
6186 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
6187 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
6188 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
6189 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
6190 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
6191 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
6192 Refactor as methods of gdbsim_target.
6193 (gdbsim_ops): Now a gdbsim_target.
6194 (init_gdbsim_ops): Delete.
6195 (gdbsim_cntrl_c): Adjust.
6196 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
6197
6198 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
6199 (the_amd64_linux_nat_target): New.
6200 (amd64_linux_fetch_inferior_registers)
6201 (amd64_linux_store_inferior_registers): Refactor as methods of
6202 amd64_linux_nat_target.
6203 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
6204 * i386-linux-nat.c: Don't include "linux-nat.h".
6205 (i386_linux_nat_target): New class.
6206 (the_i386_linux_nat_target): New.
6207 (i386_linux_fetch_inferior_registers)
6208 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
6209 as methods of i386_linux_nat_target.
6210 (_initialize_i386_linux_nat): Adjust. Set linux_target.
6211 * inf-child.c (inf_child_ops): Delete.
6212 (inf_child_fetch_inferior_registers)
6213 (inf_child_store_inferior_registers): Delete.
6214 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
6215 methods of inf_child_target.
6216 (inf_child_target::supports_terminal_ours)
6217 (inf_child_target::terminal_init)
6218 (inf_child_target::terminal_inferior)
6219 (inf_child_target::terminal_ours_for_output)
6220 (inf_child_target::terminal_ours, inf_child_target::interrupt)
6221 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
6222 New.
6223 (inf_child_open, inf_child_disconnect, inf_child_close)
6224 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
6225 (inf_child_post_startup_inferior, inf_child_can_run)
6226 (inf_child_pid_to_exec_file): Refactor as methods of
6227 inf_child_target.
6228 (inf_child_follow_fork): Delete.
6229 (inf_child_target::can_create_inferior)
6230 (inf_child_target::can_attach): New.
6231 (inf_child_target::has_all_memory, inf_child_target::has_memory)
6232 (inf_child_target::has_stack, inf_child_target::has_registers)
6233 (inf_child_target::has_execution): New.
6234 (inf_child_fileio_open, inf_child_fileio_pwrite)
6235 (inf_child_fileio_pread, inf_child_fileio_fstat)
6236 (inf_child_fileio_close, inf_child_fileio_unlink)
6237 (inf_child_fileio_readlink, inf_child_use_agent)
6238 (inf_child_can_use_agent): Refactor as methods of
6239 inf_child_target.
6240 (return_zero, inf_child_target): Delete.
6241 (inf_child_target::inf_child_target): New.
6242 * inf-child.h: Include "target.h".
6243 (inf_child_target): Delete function prototype.
6244 (inf_child_target): New class.
6245 (inf_child_open_target, inf_child_mourn_inferior)
6246 (inf_child_maybe_unpush_target): Delete.
6247 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
6248 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
6249 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
6250 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
6251 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
6252 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
6253 (inf_ptrace_wait, inf_ptrace_xfer_partial)
6254 (inf_ptrace_thread_alive, inf_ptrace_files_info)
6255 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
6256 methods of inf_ptrace_target.
6257 (inf_ptrace_target): Delete function.
6258 * inf-ptrace.h: Include "inf-child.h".
6259 (inf_ptrace_target): Delete function declaration.
6260 (inf_ptrace_target): New class.
6261 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
6262 * linux-nat.c (linux_target): New.
6263 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
6264 (linux_nat_target::~linux_nat_target): New.
6265 (linux_child_post_attach, linux_child_post_startup_inferior)
6266 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
6267 (linux_child_remove_fork_catchpoint)
6268 (linux_child_insert_vfork_catchpoint)
6269 (linux_child_remove_vfork_catchpoint)
6270 (linux_child_insert_exec_catchpoint)
6271 (linux_child_remove_exec_catchpoint)
6272 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
6273 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
6274 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
6275 (linux_nat_stopped_data_address)
6276 (linux_nat_stopped_by_sw_breakpoint)
6277 (linux_nat_supports_stopped_by_sw_breakpoint)
6278 (linux_nat_stopped_by_hw_breakpoint)
6279 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
6280 (linux_nat_kill, linux_nat_mourn_inferior)
6281 (linux_nat_xfer_partial, linux_nat_thread_alive)
6282 (linux_nat_update_thread_list, linux_nat_pid_to_str)
6283 (linux_nat_thread_name, linux_child_pid_to_exec_file)
6284 (linux_child_static_tracepoint_markers_by_strid)
6285 (linux_nat_is_async_p, linux_nat_can_async_p)
6286 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
6287 (linux_nat_supports_multi_process)
6288 (linux_nat_supports_disable_randomization, linux_nat_async)
6289 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
6290 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
6291 (linux_nat_fileio_open, linux_nat_fileio_readlink)
6292 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
6293 methods of linux_nat_target.
6294 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
6295 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
6296 parameter.
6297 (check_stopped_by_watchpoint): Adjust.
6298 (linux_xfer_partial): Delete.
6299 (linux_target_install_ops, linux_target, linux_nat_add_target):
6300 Delete.
6301 (linux_nat_target::linux_nat_target): New.
6302 * linux-nat.h: Include "inf-ptrace.h".
6303 (linux_nat_target): New.
6304 (linux_target, linux_target_install_ops, linux_nat_add_target):
6305 Delete function declarations.
6306 (linux_target): Declare global.
6307 * linux-thread-db.c (thread_db_target): New.
6308 (thread_db_target::thread_db_target): New.
6309 (thread_db_ops): Delete.
6310 (the_thread_db_target): New.
6311 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
6312 (thread_db_update_thread_list, thread_db_pid_to_str)
6313 (thread_db_extra_thread_info)
6314 (thread_db_thread_handle_to_thread_info)
6315 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
6316 (thread_db_resume): Refactor as methods of thread_db_target.
6317 (init_thread_db_ops): Delete.
6318 (_initialize_thread_db): Remove reference to init_thread_db_ops.
6319 * x86-linux-nat.c: Don't include "linux-nat.h".
6320 (super_post_startup_inferior): Delete.
6321 (x86_linux_nat_target::~x86_linux_nat_target): New.
6322 (x86_linux_child_post_startup_inferior)
6323 (x86_linux_read_description, x86_linux_enable_btrace)
6324 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
6325 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
6326 methods of x86_linux_nat_target.
6327 (x86_linux_create_target): Delete. Bits folded ...
6328 (x86_linux_add_target): ... here. Now takes a linux_nat_target
6329 pointer.
6330 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
6331 (x86_linux_nat_target): New class.
6332 (x86_linux_create_target): Delete.
6333 (x86_linux_add_target): Now takes a linux_nat_target pointer.
6334 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
6335 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
6336 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
6337 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
6338 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
6339 make extern.
6340 (x86_use_watchpoints): Delete.
6341 * x86-nat.h: Include "breakpoint.h" and "target.h".
6342 (x86_use_watchpoints): Delete.
6343 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
6344 (x86_stopped_by_watchpoint, x86_stopped_data_address)
6345 (x86_insert_watchpoint, x86_remove_watchpoint)
6346 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
6347 (x86_stopped_by_hw_breakpoint): New declarations.
6348 (x86_nat_target): New template class.
6349
6350 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
6351 (the_ppc_linux_nat_target): New.
6352 (ppc_linux_fetch_inferior_registers)
6353 (ppc_linux_can_use_hw_breakpoint)
6354 (ppc_linux_region_ok_for_hw_watchpoint)
6355 (ppc_linux_ranged_break_num_registers)
6356 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
6357 (ppc_linux_insert_mask_watchpoint)
6358 (ppc_linux_remove_mask_watchpoint)
6359 (ppc_linux_can_accel_watchpoint_condition)
6360 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
6361 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
6362 (ppc_linux_watchpoint_addr_within_range)
6363 (ppc_linux_masked_watch_num_registers)
6364 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
6365 (ppc_linux_read_description): Refactor as methods of
6366 ppc_linux_nat_target.
6367 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
6368
6369 * procfs.c (procfs_xfer_partial): Delete forward declaration.
6370 (procfs_target): New class.
6371 (the_procfs_target): New.
6372 (procfs_target): Delete function.
6373 (procfs_auxv_parse, procfs_attach, procfs_detach)
6374 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
6375 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
6376 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
6377 (procfs_create_inferior, procfs_update_thread_list)
6378 (procfs_thread_alive, procfs_pid_to_str)
6379 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
6380 (procfs_stopped_data_address, procfs_insert_watchpoint)
6381 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
6382 (proc_find_memory_regions, procfs_info_proc)
6383 (procfs_make_note_section): Refactor as methods of procfs_target.
6384 (_initialize_procfs): Adjust.
6385 * sol-thread.c (sol_thread_target): New class.
6386 (sol_thread_ops): Now a sol_thread_target.
6387 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
6388 (sol_thread_fetch_registers, sol_thread_store_registers)
6389 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
6390 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
6391 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
6392 (init_sol_thread_ops): Delete.
6393 (_initialize_sol_thread): Adjust. Remove references to
6394 init_sol_thread_ops and complete_target_initialization.
6395
6396 * windows-nat.c (windows_nat_target): New class.
6397 (windows_fetch_inferior_registers)
6398 (windows_store_inferior_registers, windows_resume, windows_wait)
6399 (windows_attach, windows_detach, windows_pid_to_exec_file)
6400 (windows_files_info, windows_create_inferior)
6401 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
6402 (windows_close, windows_pid_to_str, windows_xfer_partial)
6403 (windows_get_tib_address, windows_get_ada_task_ptid)
6404 (windows_thread_name, windows_thread_alive): Refactor as
6405 windows_nat_target methods.
6406 (do_initial_windows_stuff): Adjust.
6407 (windows_target): Delete function.
6408 (_initialize_windows_nat): Adjust.
6409
6410 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
6411 (darwin_mourn_inferior, darwin_kill_inferior)
6412 (darwin_create_inferior, darwin_attach, darwin_detach)
6413 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
6414 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
6415 (darwin_supports_multi_process): Refactor as darwin_nat_target
6416 methods.
6417 (darwin_resume_to, darwin_files_info): Delete.
6418 (_initialize_darwin_inferior): Rename to ...
6419 (_initialize_darwin_nat): ... this. Adjust to C++ification.
6420 * darwin-nat.h: Include "inf-child.h".
6421 (darwin_nat_target): New class.
6422 (darwin_complete_target): Delete.
6423 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
6424 (darwin_target): New.
6425 (i386_darwin_fetch_inferior_registers)
6426 (i386_darwin_store_inferior_registers): Refactor as methods of
6427 darwin_nat_target.
6428 (darwin_complete_target): Delete, with ...
6429 (_initialize_i386_darwin_nat): ... bits factored out here.
6430
6431 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
6432 (the_alpha_linux_nat_target): New.
6433 (alpha_linux_register_u_offset): Refactor as
6434 alpha_linux_nat_target method.
6435 (_initialize_alpha_linux_nat): Adjust.
6436 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
6437 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6438 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
6439 methods of linux_nat_trad_target.
6440 (linux_trad_target): Delete.
6441 * linux-nat-trad.h (linux_trad_target): Delete function.
6442 (linux_nat_trad_target): New class.
6443 * mips-linux-nat.c (mips_linux_nat_target): New class.
6444 (super_fetch_registers, super_store_registers, super_close):
6445 Delete.
6446 (the_mips_linux_nat_target): New.
6447 (mips64_linux_regsets_fetch_registers)
6448 (mips64_linux_regsets_store_registers)
6449 (mips64_linux_fetch_registers, mips64_linux_store_registers)
6450 (mips_linux_register_u_offset, mips_linux_read_description)
6451 (mips_linux_can_use_hw_breakpoint)
6452 (mips_linux_stopped_by_watchpoint)
6453 (mips_linux_stopped_data_address)
6454 (mips_linux_region_ok_for_hw_watchpoint)
6455 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
6456 (mips_linux_close): Refactor as methods of mips_linux_nat.
6457 (_initialize_mips_linux_nat): Adjust to C++ification.
6458
6459 * aix-thread.c (aix_thread_target): New class.
6460 (aix_thread_ops): Now an aix_thread_target.
6461 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
6462 (aix_thread_fetch_registers, aix_thread_store_registers)
6463 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
6464 (aix_thread_thread_alive, aix_thread_pid_to_str)
6465 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
6466 Refactor as methods of aix_thread_target.
6467 (init_aix_thread_ops): Delete.
6468 (_initialize_aix_thread): Remove references to init_aix_thread_ops
6469 and complete_target_initialization.
6470 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
6471 (rs6000_nat_target): New class.
6472 (the_rs6000_nat_target): New.
6473 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
6474 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
6475 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
6476 (super_create_inferior): Delete.
6477 (_initialize_rs6000_nat): Adjust to C++ification.
6478
6479 * arm-linux-nat.c (arm_linux_nat_target): New class.
6480 (the_arm_linux_nat_target): New.
6481 (arm_linux_fetch_inferior_registers)
6482 (arm_linux_store_inferior_registers, arm_linux_read_description)
6483 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
6484 (arm_linux_remove_hw_breakpoint)
6485 (arm_linux_region_ok_for_hw_watchpoint)
6486 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
6487 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
6488 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
6489 arm_linux_nat_target.
6490 (_initialize_arm_linux_nat): Adjust to C++ification.
6491
6492 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
6493 (the_aarch64_linux_nat_target): New.
6494 (aarch64_linux_fetch_inferior_registers)
6495 (aarch64_linux_store_inferior_registers)
6496 (aarch64_linux_child_post_startup_inferior)
6497 (aarch64_linux_read_description)
6498 (aarch64_linux_can_use_hw_breakpoint)
6499 (aarch64_linux_insert_hw_breakpoint)
6500 (aarch64_linux_remove_hw_breakpoint)
6501 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
6502 (aarch64_linux_region_ok_for_hw_watchpoint)
6503 (aarch64_linux_stopped_data_address)
6504 (aarch64_linux_stopped_by_watchpoint)
6505 (aarch64_linux_watchpoint_addr_within_range)
6506 (aarch64_linux_can_do_single_step): Refactor as methods of
6507 aarch64_linux_nat_target.
6508 (super_post_startup_inferior): Delete.
6509 (_initialize_aarch64_linux_nat): Adjust to C++ification.
6510
6511 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
6512 (the_hppa_linux_nat_target): New.
6513 (hppa_linux_fetch_inferior_registers)
6514 (hppa_linux_store_inferior_registers): Refactor as methods of
6515 hppa_linux_nat_target.
6516 (_initialize_hppa_linux_nat): Adjust to C++ification.
6517
6518 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
6519 (the_ia64_linux_nat_target): New.
6520 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
6521 (ia64_linux_stopped_data_address)
6522 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
6523 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
6524 ia64_linux_nat_target methods.
6525 (super_xfer_partial): Delete.
6526 (_initialize_ia64_linux_nat): Adjust to C++ification.
6527
6528 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
6529 (the_m32r_linux_nat_target): New.
6530 (m32r_linux_fetch_inferior_registers)
6531 (m32r_linux_store_inferior_registers): Refactor as
6532 m32r_linux_nat_target methods.
6533 (_initialize_m32r_linux_nat): Adjust to C++ification.
6534
6535 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
6536 (the_m68k_linux_nat_target): New.
6537 (m68k_linux_fetch_inferior_registers)
6538 (m68k_linux_store_inferior_registers): Refactor as
6539 m68k_linux_nat_target methods.
6540 (_initialize_m68k_linux_nat): Adjust to C++ification.
6541
6542 * s390-linux-nat.c (s390_linux_nat_target): New class.
6543 (the_s390_linux_nat_target): New.
6544 (s390_linux_fetch_inferior_registers)
6545 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
6546 (s390_insert_watchpoint, s390_remove_watchpoint)
6547 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
6548 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
6549 (s390_auxv_parse, s390_read_description): Refactor as methods of
6550 s390_linux_nat_target.
6551 (_initialize_s390_nat): Adjust to C++ification.
6552
6553 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
6554 (the_sparc_linux_nat_target): New.
6555 (_initialize_sparc_linux_nat): Adjust to C++ification.
6556 * sparc-nat.c (sparc_fetch_inferior_registers)
6557 (sparc_store_inferior_registers): Remove target_ops parameter.
6558 * sparc-nat.h (sparc_fetch_inferior_registers)
6559 (sparc_store_inferior_registers): Remove target_ops parameter.
6560 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
6561 (the_sparc64_linux_nat_target): New.
6562 (_initialize_sparc64_linux_nat): Adjust to C++ification.
6563
6564 * spu-linux-nat.c (spu_linux_nat_target): New class.
6565 (the_spu_linux_nat_target): New.
6566 (spu_child_post_startup_inferior, spu_child_post_attach)
6567 (spu_child_wait, spu_fetch_inferior_registers)
6568 (spu_store_inferior_registers, spu_xfer_partial)
6569 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
6570 methods.
6571 (_initialize_spu_nat): Adjust to C++ification.
6572
6573 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
6574 (the_tilegx_linux_nat_target): New.
6575 (fetch_inferior_registers, store_inferior_registers):
6576 Refactor as methods.
6577 (_initialize_tile_linux_nat): Adjust to C++ification.
6578
6579 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
6580 (the_xtensa_linux_nat_target): New.
6581 (xtensa_linux_fetch_inferior_registers)
6582 (xtensa_linux_store_inferior_registers): Refactor as
6583 xtensa_linux_nat_target methods.
6584 (_initialize_xtensa_linux_nat): Adjust to C++ification.
6585
6586 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
6587 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
6588 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
6589 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
6590 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
6591 (fbsd_stopped_by_sw_breakpoint)
6592 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
6593 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
6594 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
6595 (fbsd_post_startup_inferior, fbsd_post_attach)
6596 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
6597 (fbsd_set_syscall_catchpoint)
6598 (super_xfer_partial, super_resume, super_wait)
6599 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
6600 (fbsd_handle_debug_trap): Remove target_ops parameter.
6601 (fbsd_nat_add_target): Delete.
6602 * fbsd-nat.h: Include "inf-ptrace.h".
6603 (fbsd_nat_add_target): Delete.
6604 (USE_SIGTRAP_SIGINFO): Define.
6605 (fbsd_nat_target): New class.
6606
6607 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
6608 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
6609 (amd64bsd_target): Delete.
6610 * amd64-bsd-nat.h: New file.
6611 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
6612 "x86-bsd-nat.h".
6613 (amd64_fbsd_nat_target): New class.
6614 (the_amd64_fbsd_nat_target): New.
6615 (amd64fbsd_read_description): Refactor as method of
6616 amd64_fbsd_nat_target.
6617 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6618 (_initialize_amd64fbsd_nat): Adjust to C++ification.
6619 * amd64-nat.h (amd64bsd_target): Delete function declaration.
6620 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
6621 (i386bsd_store_inferior_registers): Remove target_ops parameter.
6622 (i386bsd_target): Delete.
6623 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
6624 (i386bsd_fetch_inferior_registers)
6625 (i386bsd_store_inferior_registers): Declare.
6626 (i386_bsd_nat_target): New class.
6627 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
6628 (the_i386_fbsd_nat_target): New.
6629 (i386fbsd_resume, i386fbsd_read_description): Refactor as
6630 i386_fbsd_nat_target methods.
6631 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6632 (_initialize_i386fbsd_nat): Adjust to C++ification.
6633 * x86-bsd-nat.c (super_mourn_inferior): Delete.
6634 (x86bsd_mourn_inferior, x86bsd_target): Delete.
6635 (_initialize_x86_bsd_nat): Adjust to C++ification.
6636 * x86-bsd-nat.h: Include "x86-nat.h".
6637 (x86bsd_target): Delete declaration.
6638 (x86bsd_nat_target): New class.
6639
6640 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
6641 (the_aarch64_fbsd_nat_target): New.
6642 (aarch64_fbsd_fetch_inferior_registers)
6643 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
6644 aarch64_fbsd_nat_target.
6645 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
6646 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
6647 (the_alpha_bsd_nat_target): New.
6648 (alphabsd_fetch_inferior_registers)
6649 (alphabsd_store_inferior_registers): Refactor as
6650 alpha_bsd_nat_target methods.
6651 (_initialize_alphabsd_nat): Refactor as methods of
6652 alpha_bsd_nat_target.
6653 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
6654 (the_amd64_nbsd_nat_target): New.
6655 (_initialize_amd64nbsd_nat): Adjust to C++ification.
6656 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
6657 (the_amd64_obsd_nat_target): New.
6658 (_initialize_amd64obsd_nat): Adjust to C++ification.
6659 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
6660 (the_arm_fbsd_nat_target): New.
6661 (arm_fbsd_fetch_inferior_registers)
6662 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
6663 (_initialize_arm_fbsd_nat): Refactor as methods of
6664 arm_fbsd_nat_target.
6665 (_initialize_arm_fbsd_nat): Adjust to C++ification.
6666 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
6667 (the_arm_netbsd_nat_target): New.
6668 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
6669 arm_netbsd_nat_target.
6670 (_initialize_arm_netbsd_nat): Adjust to C++ification.
6671 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
6672 (the_hppa_nbsd_nat_target): New.
6673 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
6674 hppa_nbsd_nat_target methods.
6675 (_initialize_hppanbsd_nat): Adjust to C++ification.
6676 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
6677 (the_hppa_obsd_nat_target): New.
6678 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
6679 methods of hppa_obsd_nat_target.
6680 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
6681 add_target.
6682 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
6683 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
6684 add_target.
6685 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
6686 (_initialize_i386obsd_nat): Use add_target.
6687 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
6688 (the_m68k_bsd_nat_target): New.
6689 (m68kbsd_fetch_inferior_registers)
6690 (m68kbsd_store_inferior_registers): Refactor as methods of
6691 m68k_bsd_nat_target.
6692 (_initialize_m68kbsd_nat): Adjust to C++ification.
6693 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
6694 (the_mips_fbsd_nat_target): New.
6695 (mips_fbsd_fetch_inferior_registers)
6696 (mips_fbsd_store_inferior_registers): Refactor as methods of
6697 mips_fbsd_nat_target.
6698 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
6699 add_target.
6700 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
6701 (the_mips_nbsd_nat_target): New.
6702 (mipsnbsd_fetch_inferior_registers)
6703 (mipsnbsd_store_inferior_registers): Refactor as methods of
6704 mips_nbsd_nat_target.
6705 (_initialize_mipsnbsd_nat): Adjust to C++ification.
6706 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
6707 (the_mips64_obsd_nat_target): New.
6708 (mips64obsd_fetch_inferior_registers)
6709 (mips64obsd_store_inferior_registers): Refactor as methods of
6710 mips64_obsd_nat_target.
6711 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
6712 add_target.
6713 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
6714 nbsd_nat_target.
6715 * nbsd-nat.h: Include "inf-ptrace.h".
6716 (nbsd_nat_target): New class.
6717 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
6718 (obsd_wait): Refactor as methods of obsd_nat_target.
6719 (obsd_add_target): Delete.
6720 * obsd-nat.h: Include "inf-ptrace.h".
6721 (obsd_nat_target): New class.
6722 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
6723 (the_ppc_fbsd_nat_target): New.
6724 (ppcfbsd_fetch_inferior_registers)
6725 (ppcfbsd_store_inferior_registers): Refactor as methods of
6726 ppc_fbsd_nat_target.
6727 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
6728 add_target.
6729 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
6730 (the_ppc_nbsd_nat_target): New.
6731 (ppcnbsd_fetch_inferior_registers)
6732 (ppcnbsd_store_inferior_registers): Refactor as methods of
6733 ppc_nbsd_nat_target.
6734 (_initialize_ppcnbsd_nat): Adjust to C++ification.
6735 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
6736 (the_ppc_obsd_nat_target): New.
6737 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
6738 methods of ppc_obsd_nat_target.
6739 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
6740 add_target.
6741 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
6742 (the_sh_nbsd_nat_target): New.
6743 (shnbsd_fetch_inferior_registers)
6744 (shnbsd_store_inferior_registers): Refactor as methods of
6745 sh_nbsd_nat_target.
6746 (_initialize_shnbsd_nat): Adjust to C++ification.
6747 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
6748 (inf_ptrace_xfer_partial): Delete.
6749 (sparc_xfer_partial, sparc_target): Delete.
6750 * sparc-nat.h (sparc_fetch_inferior_registers)
6751 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
6752 (sparc_target): Delete function declaration.
6753 (sparc_target): New template class.
6754 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
6755 (_initialize_sparcnbsd_nat): Adjust to C++ification.
6756 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
6757 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
6758 add_target.
6759 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
6760 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
6761 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
6762 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
6763 add_target.
6764 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
6765 (the_vax_bsd_nat_target): New.
6766 (vaxbsd_fetch_inferior_registers)
6767 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
6768 methods.
6769 (_initialize_vaxbsd_nat): Adjust to C++ification.
6770
6771 * bsd-kvm.c (bsd_kvm_target): New class.
6772 (bsd_kvm_ops): Now a bsd_kvm_target.
6773 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
6774 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
6775 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
6776 bsd_kvm_target.
6777 (bsd_kvm_return_one): Delete.
6778 (bsd_kvm_add_target): Adjust to C++ification.
6779
6780 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
6781 (nto_procfs_target_procfs): New classes.
6782 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
6783 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
6784 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
6785 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
6786 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
6787 (procfs_remove_hw_breakpoint, procfs_resume)
6788 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
6789 (procfs_kill_inferior, procfs_store_registers)
6790 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
6791 as methods of nto_procfs_target.
6792 (nto_procfs_ops): Now an nto_procfs_target_procfs.
6793 (nto_native_ops): Delete.
6794 (procfs_open, procfs_native_open): Delete.
6795 (nto_native_ops): Now an nto_procfs_target_native.
6796 (init_procfs_targets): Adjust to C++ification.
6797 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
6798 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
6799 Refactor as methods of nto_procfs_target.
6800
6801 * go32-nat.c (go32_nat_target): New class.
6802 (the_go32_nat_target): New.
6803 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
6804 (go32_store_registers, go32_xfer_partial, go32_files_info)
6805 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
6806 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
6807 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
6808 (go32_pid_to_str): Refactor as methods of go32_nat_target.
6809 (go32_target): Delete.
6810 (_initialize_go32_nat): Adjust to C++ification.
6811
6812 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
6813 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
6814 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
6815 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
6816 gnu_nat_target.
6817 (gnu_target): Delete.
6818 * gnu-nat.h (gnu_target): Delete.
6819 (gnu_nat_target): New class.
6820 * i386-gnu-nat.c (gnu_base_target): New.
6821 (i386_gnu_nat_target): New class.
6822 (the_i386_gnu_nat_target): New.
6823 (_initialize_i386gnu_nat): Adjust to C++ification.
6824
6825 2018-05-02 Pedro Alves <palves@redhat.com>
6826
6827 * bfd-target.c (target_bfd_xclose): Rename to ...
6828 (target_bfd_close): ... this.
6829 (target_bfd_reopen): Adjust.
6830 * target.c (target_close): Remove references to to_xclose.
6831 * target.h (target_ops::to_xclose): Delete.
6832 (target_ops::to_close): Update comments.
6833
6834 2018-05-02 Pedro Alves <palves@redhat.com>
6835
6836 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
6837 "linux-nat.h".
6838 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
6839 * inf-ptrace.c (inf_ptrace_register_u_offset)
6840 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6841 (inf_ptrace_store_register, inf_ptrace_store_registers)
6842 (inf_ptrace_trad_target): Move to ...
6843 * linux-nat-trad.c: ... this new file.
6844 * linux-nat-trad.h: New file.
6845 * linux-nat.c (linux_target_install_ops): Make extern.
6846 (linux_trad_target): Delete.
6847 * linux-nat.h (linux_trad_target): Delete declaration.
6848 (linux_target_install_ops): Declare.
6849 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
6850 "linux-nat.h".
6851
6852 2018-05-02 Pedro Alves <palves@redhat.com>
6853
6854 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6855 procfs_target/add_target here.
6856 * procfs.c (procfs_target): Make static.
6857 (_initialize_procfs): Call add_target here.
6858 * procfs.h (struct target_ops): Remove forward declaration.
6859 (procfs_target): Remove declaration.
6860 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
6861
6862 2018-05-02 Pedro Alves <palves@redhat.com>
6863
6864 * procfs.c (procfs_stopped_by_watchpoint)
6865 (procfs_insert_watchpoint, procfs_remove_watchpoint)
6866 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
6867 Forward declare.
6868 (procfs_use_watchpoints): Delete, move contents...
6869 (procfs_target): ... here.
6870 * procfs.h (procfs_use_watchpoints): Delete declaration.
6871 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6872 procfs_use_watchpoints.
6873 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
6874 procfs_use_watchpoints.
6875
6876 2018-05-02 Tom Tromey <tom@tromey.com>
6877
6878 PR python/20084:
6879 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
6880 and var_zuinteger_unlimited.
6881 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
6882 and PARAM_ZUINTEGER_UNLIMITED.
6883 (set_parameter_value): Handle var_zuinteger and
6884 var_zuinteger_unlimited.
6885 (add_setshow_generic): Likewise.
6886 (parmpy_init): Likewise.
6887
6888 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
6889
6890 PR rust/23124
6891 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
6892 pointer is not null before dereferencing it.
6893
6894 2018-04-30 Tom Tromey <tom@tromey.com>
6895
6896 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
6897 is_mi_like_p.
6898
6899 2018-04-30 Tom Tromey <tom@tromey.com>
6900
6901 * breakpoint.c (mention): Remove use of is_mi_like_p.
6902 (print_mention_ranged_breakpoint): Likewise.
6903 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
6904 of is_mi_like_p.
6905
6906 2018-04-30 Tom Tromey <tom@tromey.com>
6907
6908 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
6909
6910 2018-04-30 Tom Tromey <tom@tromey.com>
6911
6912 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
6913 (info_spu_event_command): Remove some uses of is_mi_like_p.
6914
6915 2018-04-30 Tom Tromey <tom@tromey.com>
6916
6917 * python/py-framefilter.c (py_print_single_arg)
6918 (enumerate_locals, py_print_args, py_print_frame): Remove some
6919 uses of is_mi_like_p.
6920
6921 2018-04-30 Tom Tromey <tom@tromey.com>
6922
6923 * ui-out.c: Update.
6924 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
6925 * ui-out.h (ui_out::is_mi_like_p): Now const.
6926 (ui_out::do_is_mi_like_p): Now const.
6927 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
6928
6929 2018-04-30 Tom Tromey <tom@tromey.com>
6930
6931 * varobj.c (varobj_set_visualizer): Use new_reference.
6932 * python/python.c (gdbpy_decode_line): Use new_reference.
6933 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
6934 new_reference.
6935
6936 2018-04-30 Tom Tromey <tom@tromey.com>
6937
6938 * varobj.c (install_new_value): Use new_reference.
6939 * value.h (value_incref): Return void. Swap intro comment with
6940 value_decref.
6941 * value.c (set_value_parent): Use new_reference.
6942 (value_incref): Return void. Update intro comment.
6943 (release_value): Use new_reference.
6944 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
6945
6946 2018-04-30 Tom Tromey <tom@tromey.com>
6947
6948 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
6949 * gdb_bfd.h (new_bfd_ref): Remove.
6950 (gdb_bfd_open): Update comment.
6951 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
6952 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
6953 (gdb_bfd_fdopenr): Use new_reference.
6954 * exec.c (exec_file_attach): Use new_reference.
6955
6956 2018-04-30 Tom Tromey <tom@tromey.com>
6957
6958 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
6959 method.
6960
6961 2018-04-30 Tom Tromey <tom@tromey.com>
6962
6963 * jit.c (jit_read_code_entry): Use type_align.
6964 * i386-tdep.c (i386_gdbarch_init): Don't call
6965 set_gdbarch_long_long_align_bit.
6966 * gdbarch.sh: Remove long_long_align_bit.
6967 * gdbarch.c, gdbarch.h: Rebuild.
6968 * arc-tdep.c (arc_type_align): New function.
6969 (arc_gdbarch_init): Use arc_type_align. Don't call
6970 set_gdbarch_long_long_align_bit.
6971
6972 2018-04-30 Tom Tromey <tom@tromey.com>
6973
6974 * rust-lang.c (rust_type_alignment): Remove.
6975 (rust_composite_type): Use type_align.
6976
6977 2018-04-30 Tom Tromey <tom@tromey.com>
6978
6979 * NEWS: Mention Type.align.
6980 * python/py-type.c (typy_get_alignof): New function.
6981 (type_object_getset): Add "alignof".
6982
6983 2018-04-30 Tom Tromey <tom@tromey.com>
6984
6985 PR exp/17095:
6986 * NEWS: Update.
6987 * std-operator.def (UNOP_ALIGNOF): New operator.
6988 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
6989 New.
6990 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
6991 * c-lang.c (c_op_print_tab): Add alignof.
6992 * c-exp.y (ALIGNOF): New token.
6993 (exp): Add "ALIGNOF" production.
6994 (ident_tokens): Add _Alignof and alignof.
6995
6996 2018-04-30 Tom Tromey <tom@tromey.com>
6997
6998 * i386-tdep.c (i386_type_align): New function.
6999 (i386_gdbarch_init): Update.
7000 * gdbarch.sh (type_align): New method.
7001 * gdbarch.c, gdbarch.h: Rebuild.
7002 * arch-utils.h (default_type_align): Declare.
7003 * arch-utils.c (default_type_align): New function.
7004 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
7005 (struct type) <align_log2>: New field.
7006 <instance_flags>: Now a bitfield.
7007 (TYPE_RAW_ALIGN): New macro.
7008 (type_align, type_raw_align, set_type_align): Declare.
7009 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
7010 functions.
7011 * dwarf2read.c (quirk_rust_enum): Set type alignment.
7012 (get_alignment, maybe_set_alignment): New functions.
7013 (read_structure_type, read_enumeration_type, read_array_type)
7014 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
7015 (read_subrange_type, read_base_type): Set type alignment.
7016
7017 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
7018
7019 * dwarf2read.c (read_index_from_section): Use bool.
7020
7021 2018-04-29 Fabian Groffen <grobian@gentoo.org>
7022
7023 PR gdb/22950
7024 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
7025 with #ifdef.
7026
7027 2018-04-29 John Reiser <jreiser@BitWagon.com>
7028
7029 PR build/22873
7030 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
7031 last step, and do it atomically.
7032
7033 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
7034
7035 * compile/compile-c-types.c (convert_int, convert_float):
7036 Update for C FE v1.
7037
7038 2018-04-27 Tom Tromey <tom@tromey.com>
7039
7040 PR rust/22545:
7041 * rust-lang.c (rust_inclusive_range_type_p): New function.
7042 (rust_range): Handle inclusive ranges.
7043 (rust_compute_range): Likewise.
7044 * rust-exp.y (struct rust_op) <inclusive>: New field.
7045 (DOTDOTEQ): New constant.
7046 (range_expr): Add "..=" productions.
7047 (operator_tokens): Add "..=" token.
7048 (ast_range): Add "inclusive" parameter.
7049 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
7050 ranges.
7051 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
7052 bounds values.
7053 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
7054 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
7055 Update comments.
7056 * expprint.c (print_subexp_standard): Handle new bounds values.
7057 (dump_subexp_body_standard): Likewise.
7058
7059 2018-04-27 Tom Tromey <tom@tromey.com>
7060
7061 * configure: Rebuild.
7062 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
7063 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
7064 "OVERRIDE".
7065 (class symbol_needs_eval_context): Likewise.
7066 * dwarf2read.c (mock_mapped_index::symbol_name_count)
7067 (mock_mapped_index::symbol_name_at): Use "override". Remove
7068 "virtual".
7069 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
7070 "override".
7071 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
7072 * aarch64-tdep.c (instruction_reader::read): Use "override".
7073 (instruction_reader_test::read): Likewise.
7074 * arm-tdep.c (instruction_reader::read): Use "override".
7075 (instruction_reader_thumb::read): Likewise.
7076
7077 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
7078
7079 PR remote/9665
7080 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
7081 instead of remote_send.
7082 (remote_send): Remove.
7083
7084 2018-04-26 Pedro Alves <palves@redhat.com>
7085
7086 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
7087 find_function_start_sal instead of find_pc_line.
7088
7089 2018-04-26 Pedro Alves <palves@redhat.com>
7090
7091 * breakpoint.c (set_breakpoint_location_function): Handle
7092 mst_data_gnu_ifunc.
7093 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
7094 * elfread.c (elf_symtab_read): Give data symbols with
7095 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
7096 (elf_rel_plt_read): Update comment.
7097 * linespec.c (convert_linespec_to_sals): Handle
7098 mst_data_gnu_ifunc.
7099 (minsym_found): Handle mst_data_gnu_ifunc.
7100 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
7101 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
7102 * parse.c (find_minsym_type_and_address): Handle
7103 mst_data_gnu_ifunc.
7104 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
7105 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
7106 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
7107 comment.
7108 <mst_data_gnu_ifunc>: New enumerator.
7109
7110 2018-04-26 Pedro Alves <palves@redhat.com>
7111
7112 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
7113 (lookup_minimal_symbol_by_pc_section): ... this. Replace
7114 'want_trampoline' parameter by a lookup_msym_prefer parameter.
7115 Handle it.
7116 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
7117 (lookup_minimal_symbol_by_pc): Adjust.
7118 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
7119 (lookup_solib_trampoline_symbol_by_pc): Adjust.
7120 * minsyms.h (lookup_msym_prefer): New enum.
7121 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7122 parameter by a lookup_msym_prefer parameter.
7123
7124 2018-04-26 Pedro Alves <palves@redhat.com>
7125
7126 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
7127 ends in "@plt" instead of looking at the symbol's section.
7128
7129 2018-04-26 Pedro Alves <palves@redhat.com>
7130
7131 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
7132 all references.
7133 (find_pc_partial_function_gnu_ifunc): Rename to ...
7134 (find_pc_partial_function): ... this, and remove references to
7135 'is_gnu_ifunc_p'.
7136 (find_pc_partial_function): Delete old implementation.
7137 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
7138
7139 2018-04-26 Pedro Alves <palves@redhat.com>
7140
7141 * linespec.c (struct bound_minimal_symbol_search_key): New.
7142 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
7143 skip first line if we found a GNU ifunc minimal symbol by name.
7144 (compare_msymbols): Change parameters to work with a destructured
7145 lhs minsym.
7146 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
7147 functions.
7148
7149 2018-04-26 Pedro Alves <palves@redhat.com>
7150
7151 * breakpoint.c (set_breakpoint_location_function): Don't resolve
7152 ifunc targets here. Instead, if we have an ifunc minsym, use its
7153 address/name.
7154 (add_location_to_breakpoint): Store the minsym and the objfile in
7155 the breakpoint location.
7156 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
7157 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
7158 Record the minsym in the sal.
7159 * symtab.h (symtab_and_line) <msymbol>: New field.
7160
7161 2018-04-26 Pedro Alves <palves@redhat.com>
7162
7163 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
7164 unless we actually resolved the ifunc.
7165
7166 2018-04-26 Pedro Alves <palves@redhat.com>
7167
7168 * c-exp.y (variable production): Prefer ifunc minsyms over
7169 regular function symbols.
7170 * symtab.c (find_gnu_ifunc): New function.
7171 * minsyms.h (lookup_msym_prefer): New enum.
7172 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7173 parameter by a lookup_msym_prefer parameter.
7174 * symtab.h (find_gnu_ifunc): New declaration.
7175
7176 2018-04-26 Pedro Alves <palves@redhat.com>
7177
7178 * blockframe.c (find_gnu_ifunc_target_type): New function.
7179 (find_function_type): New.
7180 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
7181 return a value with a memory address.
7182 (eval_call): For calls to GNU ifunc functions, try to find the
7183 type of the target function from the type that the resolver
7184 returns.
7185 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
7186 symbols.
7187 * infcall.c (find_function_return_type): Delete.
7188 (find_function_addr): Add 'function_type' parameter. For calls to
7189 GNU ifunc functions, try to find the type of the target function
7190 from the type that the resolver returns, and return it via
7191 FUNCTION_TYPE.
7192 (call_function_by_hand_dummy): Adjust to use the function type
7193 returned by find_function_addr.
7194 (find_function_addr): Add 'function_type' parameter and move
7195 description here.
7196 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
7197 declarations.
7198
7199 2018-04-26 Pedro Alves <palves@redhat.com>
7200
7201 * c-exp.y (variable production): Skip finding an alias for ifunc
7202 symbols.
7203
7204 2018-04-26 Pedro Alves <palves@redhat.com>
7205
7206 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
7207
7208 2018-04-25 Pedro Alves <palves@redhat.com>
7209
7210 * infcmd.c (kill_command): Print the pid as string, not the whole
7211 thread's ptid. Add comment. s/has been killed/killed/ in output
7212 message.
7213 * remote.c (remote_detach_1): Print the pid as string, not the
7214 whole thread's ptid.
7215
7216 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7217 Sergio Durigan Junior <sergiodj@redhat.com>
7218 Pedro Alves <palves@redhat.com>
7219
7220 * infcmd.c (kill_command): Print message when inferior has
7221 been killed.
7222 * inferior.c (print_inferior_events): Remove 'static'. Set as
7223 '1'.
7224 (add_inferior): Improve message printed when
7225 'print_inferior_events' is on.
7226 (exit_inferior): Remove message printed when
7227 'print_inferior_events' is on.
7228 (detach_inferior): Improve message printed when
7229 'print_inferior_events' is on.
7230 (initialize_inferiors): Use 'add_inferior_silent' to set
7231 'current_inferior_'.
7232 * inferior.h (print_inferior_events): Declare here as
7233 'extern'.
7234 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
7235 '[Detaching...]' messages when 'print_inferior_events' is on.
7236 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
7237 as prefix/suffix for messages. Remove periods. Fix erroneous
7238 'Detaching after fork from child...', replace it by '... from
7239 parent...'.
7240 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
7241 prefix/suffix when printing 'Detaching...' messages. Print
7242 them when 'print_inferior_events' is on.
7243 * remote.c (remote_detach_1): Print message when detaching
7244 from inferior and '!is_fork_parent'.
7245
7246 2018-04-24 Tom Tromey <tom@tromey.com>
7247
7248 * cli-out.h: Reindent.
7249
7250 2018-04-24 Tom Tromey <tom@tromey.com>
7251
7252 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
7253 (cli_ui_out::do_field_string): Use fputs_filtered.
7254 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
7255
7256 2018-04-23 Tom Tromey <tom@tromey.com>
7257
7258 * guile/scm-frame.c (gdbscm_frame_read_var): Use
7259 gdb::unique_xmalloc_ptr.
7260
7261 2018-04-23 Tom Tromey <tom@tromey.com>
7262
7263 * configure: Rebuild.
7264
7265 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
7266
7267 PR gdb/23095
7268 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
7269 prepare_for_testing. Set normal_bp to r_debug_state if target
7270 is bsd.
7271
7272 2018-04-21 Pedro Alves <palves@redhat.com>
7273 Rajendra SY <rajendra.sy@gmail.com>
7274
7275 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
7276 * remote.c (extended_remote_attach): In all-stop mode, mark the
7277 thread as executing.
7278
7279 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7280
7281 * thread.c (thread_apply_all_command): Fix comment.
7282 (thread_command): Fix comment.
7283
7284 2018-04-10 Alan Hayward <alan.hayward@arm.com>
7285
7286 * common/tdesc.h (tdesc_create_feature): Remove xml filename
7287 parameter.
7288 * features/aarch64-core.c (create_feature_aarch64_core):
7289 Regenerate.
7290 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
7291 Likewise.
7292 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
7293 Likewise.
7294 * features/i386/32bit-avx512.c
7295 (create_feature_i386_32bit_avx512): Likewise.
7296 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
7297 Likewise.
7298 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
7299 Likewise.
7300 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
7301 Likewise.
7302 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
7303 Likewise.
7304 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
7305 Likewise.
7306 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
7307 Likewise.
7308 * features/i386/64bit-avx512.c
7309 (create_feature_i386_64bit_avx512): Likewise.
7310 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
7311 Likewise.
7312 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
7313 Likewise.
7314 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
7315 Likewise.
7316 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
7317 Likewise.
7318 * features/i386/64bit-segments.c
7319 (create_feature_i386_64bit_segments): Likewise.
7320 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
7321 Likewise.
7322 * features/i386/x32-core.c
7323 (create_feature_i386_x32_core): Likewise.
7324 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
7325 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
7326 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
7327 * target-descriptions.c: In generated code, don't pass xml
7328 filename.
7329
7330 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7331
7332 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
7333 (print_xml_feature::visit_post): Likewise.
7334 (print_xml_feature::visit): Likewise.
7335 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
7336 (print_xml_feature): Add new class.
7337 * regformats/regdat.sh: Null xmltarget on feature targets.
7338 * target-descriptions.c (struct target_desc): Add xmltarget.
7339 (maintenance_check_tdesc_xml_convert): Add unittest function.
7340 (tdesc_get_features_xml): Add function to get xml.
7341 (maintenance_check_xml_descriptions): Test xml generation.
7342 * xml-tdesc.c (string_read_description_xml): Add function.
7343 * xml-tdesc.h (string_read_description_xml): Add declaration.
7344
7345 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7346
7347 * features/Makefile: Add feature marker to targets with new style
7348 target descriptions.
7349 * regformats/aarch64.dat: Regenerate.
7350 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
7351 * regformats/i386/amd64-avx-linux.dat: Likewise.
7352 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
7353 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
7354 * regformats/i386/amd64-linux.dat: Likewise.
7355 * regformats/i386/amd64-mpx-linux.dat: Likewise.
7356 * regformats/i386/amd64.dat: Likewise.
7357 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
7358 * regformats/i386/i386-avx-linux.dat: Likewise.
7359 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
7360 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
7361 * regformats/i386/i386-linux.dat: Likewise.
7362 * regformats/i386/i386-mmx-linux.dat: Likewise.
7363 * regformats/i386/i386-mpx-linux.dat: Likewise.
7364 * regformats/i386/i386.dat: Likewise.
7365 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
7366 * regformats/i386/x32-avx-linux.dat: Likewise.
7367 * regformats/i386/x32-linux.dat: Likewise.
7368 * regformats/tic6x-c62x-linux.dat: Likewise.
7369 * regformats/tic6x-c64x-linux.dat: Likewise.
7370 * regformats/tic6x-c64xp-linux.dat: Likewise.
7371 * regformats/regdat.sh: Parse feature marker.
7372
7373 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7374
7375 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
7376 (tdesc_osabi_name): Likewise.
7377 * target-descriptions.c (tdesc_architecture_name): Add new
7378 function.
7379 (tdesc_osabi_name): Likewise.
7380
7381 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7382
7383 * common/tdesc.c (tdesc_predefined_type): Move to here.
7384 (tdesc_named_type): Likewise.
7385 (tdesc_create_vector): Likewise.
7386 (tdesc_create_struct): Likewise.
7387 (tdesc_set_struct_size): Likewise.
7388 (tdesc_create_union): Likewise.
7389 (tdesc_create_flags): Likewise.
7390 (tdesc_create_enum): Likewise.
7391 (tdesc_add_field): Likewise.
7392 (tdesc_add_typed_bitfield): Likewise.
7393 (tdesc_add_bitfield): Likewise.
7394 (tdesc_add_flag): Likewise.
7395 (tdesc_add_enum_value): Likewise.
7396 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
7397 (struct tdesc_type_vector): Likewise.
7398 (struct tdesc_type_field): Likewise.
7399 (struct tdesc_type_with_fields): Likewise.
7400 (tdesc_create_enum): Add declaration.
7401 (tdesc_add_typed_bitfield): Likewise.
7402 (tdesc_add_enum_value): Likewise.
7403 * target-descriptions.c (tdesc_type_field): Move from here.
7404 (tdesc_type_builtin): Likewise.
7405 (tdesc_type_vector): Likewise.
7406 (tdesc_type_with_fields): Likewise.
7407 (tdesc_predefined_types): Likewise.
7408 (tdesc_named_type): Likewise.
7409 (tdesc_create_vector): Likewise.
7410 (tdesc_create_struct): Likewise.
7411 (tdesc_set_struct_size): Likewise.
7412 (tdesc_create_union): Likewise.
7413 (tdesc_create_flags): Likewise.
7414 (tdesc_create_enum): Likewise.
7415 (tdesc_add_field): Likewise.
7416 (tdesc_add_typed_bitfield): Likewise.
7417 (tdesc_add_bitfield): Likewise.
7418 (tdesc_add_flag): Likewise.
7419 (tdesc_add_enum_value): Likewise.
7420 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
7421 (tdesc_add_typed_bitfield): Likewise.
7422 (tdesc_add_enum_value): Likewise.
7423
7424 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7425
7426 * common/tdesc.c (tdesc_feature::accept): Move to here.
7427 (tdesc_feature::operator==): Likewise.
7428 (tdesc_create_reg): Likewise.
7429 * common/tdesc.h (tdesc_type_kind): Likewise.
7430 (struct tdesc_type): Likewise.
7431 (struct tdesc_feature): Likewise.
7432 * regformats/regdat.sh: Create a feature.
7433 * target-descriptions.c (tdesc_type_kind): Move from here.
7434 (tdesc_type): Likewise.
7435 (tdesc_type_up): Likewise.
7436 (tdesc_feature): Likewise.
7437 (tdesc_create_reg): Likewise.
7438
7439 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7440
7441 * Makefile.in: Add arch/tdesc.c
7442 * common/tdesc.c: New file.
7443 * common/tdesc.h (tdesc_element_visitor): Move to here.
7444 (tdesc_element): Likewise.
7445 (tdesc_reg): Likewise.
7446 (tdesc_reg_up): Likewise.
7447 * regformats/regdef.h (reg): Add offset to constructors.
7448 * target-descriptions.c (tdesc_element_visitor): Move from here.
7449 (tdesc_element): Likewise.
7450 (tdesc_reg): Likewise.
7451 (tdesc_reg_up): Likewise.
7452
7453 2018-04-17 Tom Tromey <tom@tromey.com>
7454
7455 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
7456 discriminant field.
7457
7458 2018-04-17 Tom Tromey <tom@tromey.com>
7459
7460 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
7461
7462 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
7463
7464 * symtab.c (print_symbol_info): Skip printing filename and line
7465 number when `last' is NULL.
7466 (symtab_symbol_info): Use empty string instead of NULL for first
7467 invocation of print_symbol_info.
7468 (rbreak_command): Pass NULL to `last' parameter of
7469 print_symbol_info.
7470
7471 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
7472
7473 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
7474 instead of nullptr.
7475
7476 2018-04-16 Pedro Alves <palves@redhat.com>
7477
7478 * MAINTAINERS (sh): Remove.
7479 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
7480 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
7481 (ALLDEPFILES): Remove sh64-tdep.c.
7482 * NEWS: Mentions that support for SH-5/SH64 is removed.
7483 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
7484 (sh*-*-openbsd*): Ditto.
7485 (sh64-*-elf*): Remove.
7486 (sh*): Remove.
7487 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
7488 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
7489 * sh-tdep.c: No longer include "sh64-tdep.h".
7490 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
7491 * sh64-tdep.c, sh64-tdep.h: Remove files.
7492
7493 2018-04-16 Pedro Alves <palves@redhat.com>
7494
7495 * MAINTAINERS: Remove m88k.
7496 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
7497 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
7498 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
7499 * NEWS: Mention that support for m88k was removed.
7500 * configure.host (m88*-*-*): Remove support.
7501 * configure.nat (m88k-*-*): Remove support.
7502 * configure.tgt (m88*-*-openbsd*): Remove.
7503 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
7504
7505 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
7506
7507 * configure.tgt (x86_tobjs): New variable.
7508 (amd64_tobjs, i386_tobjs): Use it.
7509
7510 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7511
7512 * symtab.c (print_symbol_info): Precede the symbol definition by
7513 the line number when available.
7514 * NEWS: Advertise this enhancement.
7515
7516 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7517
7518 * NEWS (New options): announce set/show record btrace cpu.
7519 * btrace.c: Include record-btrace.h.
7520 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
7521 the vendor is unknown.
7522 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
7523 Maybe overwrite the btrace configuration's cpu.
7524 (btrace_compute_ftrace): Add cpu parameter. Update callers.
7525 (btrace_fetch): Add cpu parameter. Update callers.
7526 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
7527 Maybe overwrite the btrace configuration's cpu. Skip enabling
7528 errata workarounds if the vendor is unknown.
7529 * python/py-record-btrace.c: Include record-btrace.h.
7530 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
7531 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
7532 * record-btrace.c (record_btrace_cpu_state_kind): New.
7533 (record_btrace_cpu): New.
7534 (set_record_btrace_cpu_cmdlist): New.
7535 (record_btrace_get_cpu): New.
7536 (require_btrace_thread, record_btrace_info)
7537 (record_btrace_resume_thread): Call record_btrace_get_cpu.
7538 (cmd_set_record_btrace_cpu_none): New.
7539 (cmd_set_record_btrace_cpu_auto): New.
7540 (cmd_set_record_btrace_cpu): New.
7541 (cmd_show_record_btrace_cpu): New.
7542 (_initialize_record_btrace): Initialize set/show record btrace cpu
7543 commands.
7544 * record-btrace.h (record_btrace_get_cpu): New.
7545
7546 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7547
7548 * record.c (set_record_command): Fix typo in message.
7549
7550 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7551
7552 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
7553
7554 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7555
7556 * infrun.c (process_event_stop_test): Call
7557 gdbarch_in_indirect_branch_thunk.
7558 * gdbarch.sh (in_indirect_branch_thunk): New.
7559 * gdbarch.c: Regenerated.
7560 * gdbarch.h: Regenerated.
7561 * x86-tdep.h: New.
7562 * x86-tdep.c: New.
7563 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
7564 (HFILES_NO_SRCDIR): Add x86-tdep.h.
7565 (ALLDEPFILES): Add x86-tdep.c.
7566 * arch-utils.h (default_in_indirect_branch_thunk): New.
7567 * arch-utils.c (default_in_indirect_branch_thunk): New.
7568 * i386-tdep: Include x86-tdep.h.
7569 (i386_in_indirect_branch_thunk): New.
7570 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
7571 function.
7572 * amd64-tdep: Include x86-tdep.h.
7573 (amd64_in_indirect_branch_thunk): New.
7574 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
7575
7576 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
7577
7578 PR gdb/23053
7579 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
7580 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
7581 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
7582 regression.
7583
7584 2018-04-12 Tom Tromey <tom@tromey.com>
7585
7586 * rust-lang.c (rust_print_struct_def): Remove univariant code.
7587 (rust_evaluate_subexp): Likewise.
7588
7589 2018-04-12 Pedro Alves <palves@redhat.com>
7590
7591 * procfs.c (procfs_detach): Make forward declaration's prototype
7592 match definition's protototype.
7593 (proc_get_LDT_entry): Remove stale do_cleanups call.
7594
7595 2018-04-12 Pedro Alves <palves@redhat.com>
7596
7597 * target.h (target_ops::to_has_exited): Delete.
7598 (target_has_exited): Delete.
7599 * target-delegates.c: Regenerate.
7600
7601 2018-04-11 Pedro Alves <palves@redhat.com>
7602
7603 * target.c (fileio_fh_t::t): Add comment.
7604 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7605 (target_fileio_close): Handle a NULL target.
7606 (invalidate_fileio_fh): New.
7607 (target_close): Call it.
7608 * remote.c (remote_hostio_send_command): No longer check whether
7609 remote_desc is open.
7610
7611 2018-04-11 Pedro Alves <palves@redhat.com>
7612
7613 * target.c (fileio_fh_t): Make it a named struct instead of a
7614 typedef.
7615 (fileio_fh_t::is_closed): New method.
7616 (DEF_VEC_O (fileio_fh_t)): Remove.
7617 (fileio_fhandles): Now a std::vector.
7618 (is_closed_fileio_fh): Delete.
7619 (acquire_fileio_fd): Adjust. Rename parameters.
7620 (release_fileio_fd): Adjust.
7621 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
7622 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7623 (target_fileio_close): Adjust.
7624
7625 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
7626
7627 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
7628 index.
7629
7630 2018-04-10 Pedro Alves <palves@redhat.com>
7631
7632 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
7633 (scoped_finish_thread_state): New class.
7634 * infcmd.c (run_command_1): Use it instead of finish_thread_state
7635 cleanup.
7636 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
7637 (fetch_inferior_event, normal_stop): Likewise.
7638 * thread.c (finish_thread_state_cleanup): Delete.
7639
7640 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7641 Pedro Alves <palves@redhat.com>
7642
7643 * value.c: Include "selftest.h" and "common/array-view.h".
7644 (struct range) <operator ==>: New.
7645 (test_ranges_contain): New.
7646 (check_ranges_vector): New.
7647 (test_insert_into_bit_range_vector): New.
7648 (_initialize_values): Register selftests.
7649 * common/array-view.h (operator==, operator!=): New.
7650
7651 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7652
7653 * common/gdb_vecs.h (unordered_remove): Add overload that takes
7654 an iterator.
7655 * inline-frame.c: Include <algorithm>.
7656 (struct inline_state): Add constructor.
7657 (inline_state_s): Remove.
7658 (DEF_VEC_O(inline_state_s)): Remove.
7659 (inline_states): Change type to std::vector.
7660 (find_inline_frame_state): Adjust to std::vector.
7661 (allocate_inline_frame_state): Remove.
7662 (clear_inline_frame_state): Adjust to std::vector.
7663 (skip_inline_frames): Adjust to std::vector.
7664
7665 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7666
7667 * tracepoint.h (struct trace_state_variable): Add constructor.
7668 <name>: Change type to std::string.
7669 * tracepoint.c (tsv_s): Remove.
7670 (DEF_VEC_O(tsv_s)): Remove.
7671 (tvariables): Change to std::vector.
7672 (create_trace_state_variable): Adjust to std::vector.
7673 (find_trace_state_variable): Likewise.
7674 (find_trace_state_variable_by_number): Likewise.
7675 (delete_trace_state_variable): Likewise.
7676 (trace_variable_command): Adjust to std::string.
7677 (delete_trace_variable_command): Likewise.
7678 (tvariables_info_1): Adjust to std::vector.
7679 (save_trace_state_variables): Likewise.
7680 (start_tracing): Likewise.
7681 (merge_uploaded_trace_state_variables): Adjust to std::vector
7682 and std::string.
7683 * target.h (struct target_ops)
7684 <to_download_trace_state_variable>: Pass reference to
7685 trace_state_variable.
7686 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
7687 * target-delegates.c: Re-generate.
7688 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
7689 (mi_tsv_deleted): Likewise.
7690 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
7691 * remote.c (remote_download_trace_state_variable): Change
7692 pointer to reference and adjust.
7693 * make-target-delegates (parse_argtypes): Handle references.
7694 (write_function_header): Likewise.
7695 (munge_type): Likewise.
7696
7697 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7698
7699 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7700 string_view-selftests.c.
7701 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
7702 testsuite.
7703 * unittests/basic_string_view/cons/char/1.cc: Likewise.
7704 * unittests/basic_string_view/cons/char/2.cc: Likewise.
7705 * unittests/basic_string_view/cons/char/3.cc: Likewise.
7706 * unittests/basic_string_view/element_access/char/1.cc:
7707 Likewise.
7708 * unittests/basic_string_view/element_access/char/empty.cc:
7709 Likewise.
7710 * unittests/basic_string_view/element_access/char/front_back.cc:
7711 Likewise.
7712 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
7713 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
7714 Likewise.
7715 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
7716 Likewise.
7717 * unittests/basic_string_view/modifiers/swap/char/1.cc:
7718 Likewise.
7719 * unittests/basic_string_view/operations/compare/char/1.cc:
7720 Likewise.
7721 * unittests/basic_string_view/operations/compare/char/13650.cc:
7722 Likewise.
7723 * unittests/basic_string_view/operations/copy/char/1.cc:
7724 Likewise.
7725 * unittests/basic_string_view/operations/data/char/1.cc:
7726 Likewise.
7727 * unittests/basic_string_view/operations/find/char/1.cc:
7728 Likewise.
7729 * unittests/basic_string_view/operations/find/char/2.cc:
7730 Likewise.
7731 * unittests/basic_string_view/operations/find/char/3.cc:
7732 Likewise.
7733 * unittests/basic_string_view/operations/find/char/4.cc:
7734 Likewise.
7735 * unittests/basic_string_view/operations/rfind/char/1.cc:
7736 Likewise.
7737 * unittests/basic_string_view/operations/rfind/char/2.cc:
7738 Likewise.
7739 * unittests/basic_string_view/operations/rfind/char/3.cc:
7740 Likewise.
7741 * unittests/basic_string_view/operations/substr/char/1.cc:
7742 Likewise.
7743 * unittests/basic_string_view/operators/char/2.cc: Likewise.
7744 * unittests/string_view-selftests.c: New file.
7745
7746 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7747
7748 * unittests/basic_string_view/capacity/1.cc: New file.
7749 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
7750 * unittests/basic_string_view/cons/char/1.cc: New file.
7751 * unittests/basic_string_view/cons/char/2.cc: New file.
7752 * unittests/basic_string_view/cons/char/3.cc: New file.
7753 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
7754 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
7755 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
7756 * unittests/basic_string_view/element_access/char/1.cc: New file.
7757 * unittests/basic_string_view/element_access/char/2.cc: New file.
7758 * unittests/basic_string_view/element_access/char/empty.cc: New file.
7759 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
7760 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
7761 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
7762 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
7763 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
7764 * unittests/basic_string_view/include.cc: New file.
7765 * unittests/basic_string_view/inserters/char/1.cc: New file.
7766 * unittests/basic_string_view/inserters/char/2.cc: New file.
7767 * unittests/basic_string_view/inserters/char/3.cc: New file.
7768 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
7769 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
7770 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
7771 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
7772 * unittests/basic_string_view/literals/types.cc: New file.
7773 * unittests/basic_string_view/literals/values.cc: New file.
7774 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
7775 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
7776 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
7777 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
7778 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
7779 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
7780 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
7781 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
7782 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
7783 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
7784 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
7785 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
7786 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
7787 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
7788 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
7789 * unittests/basic_string_view/operations/data/char/1.cc: New file.
7790 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
7791 * unittests/basic_string_view/operations/find/char/1.cc: New file.
7792 * unittests/basic_string_view/operations/find/char/2.cc: New file.
7793 * unittests/basic_string_view/operations/find/char/3.cc: New file.
7794 * unittests/basic_string_view/operations/find/char/4.cc: New file.
7795 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
7796 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
7797 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
7798 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
7799 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
7800 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
7801 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
7802 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
7803 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
7804 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
7805 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
7806 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
7807 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
7808 * unittests/basic_string_view/operators/char/2.cc: New file.
7809 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
7810 * unittests/basic_string_view/range_access/char/1.cc: New file.
7811 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
7812 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
7813 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
7814 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
7815 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
7816 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
7817 * unittests/basic_string_view/requirements/typedefs.cc: New file.
7818 * unittests/basic_string_view/typedefs.cc: New file.
7819 * unittests/basic_string_view/types/1.cc: New file.
7820
7821 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7822
7823 * common/gdb_string_view.h: Remove libstdc++ implementation
7824 details, adjust to gdb reality.
7825 * common/gdb_string_view.tcc: Likewise.
7826 * cli/cli-script.c (struct string_view): Remove.
7827 (user_args) <m_args>: Change element type to gdb::string_view.
7828 (user_args::insert_args): Adjust.
7829
7830 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7831
7832 * common/gdb_string_view.h: New file.
7833 * common/gdb_string_view.tcc: New file.
7834
7835 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7836
7837 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
7838 * configure: Re-generate.
7839
7840 2018-04-09 Pedro Alves <palves@redhat.com>
7841
7842 * gdbarch.sh: Include "observable.h" instead of "observer.h".
7843 (set_target_gdbarch): Call
7844 gdb::observers::architecture_changed.notify instead of
7845 observer_notify_architecture_changed.
7846
7847 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7848
7849 * tracepoint.c (struct current_traceframe_cleanup): Remove.
7850 (do_restore_current_traceframe_cleanup): Remove.
7851 (restore_current_traceframe_cleanup_dtor): Remove.
7852 (make_cleanup_restore_current_traceframe): Remove.
7853 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
7854 New.
7855 * tracepoint.h (struct scoped_restore_current_traceframe): New.
7856 * infrun.c (fetch_inferior_event): Use
7857 scoped_restore_current_traceframe.
7858
7859 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7860
7861 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
7862 Remove.
7863 <n_allocated_type_units>: Remove.
7864 <all_type_units>: Change to std::vector.
7865 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7866 to std::vector change.
7867 (dwarf2_per_objfile::get_cutu): Likewise.
7868 (dwarf2_per_objfile::get_tu): Likewise.
7869 (create_signatured_type_table_from_index): Likewise.
7870 (create_signatured_type_table_from_debug_names): Likewise.
7871 (dw2_symtab_iter_next): Likewise.
7872 (dw2_print_stats): Likewise.
7873 (dw2_expand_all_symtabs): Likewise.
7874 (dw2_expand_marked_cus): Likewise.
7875 (dw2_debug_names_iterator::next): Likewise.
7876 (dwarf2_initialize_objfile): Likewise.
7877 (add_signatured_type_cu_to_table): Likewise.
7878 (create_all_type_units): Likewise.
7879 (add_type_unit): Likewise.
7880 (struct tu_abbrev_offset): Add constructor.
7881 (build_type_psymtabs_1): Adjust to std::vector change.
7882 (print_tu_stats): Likewise.
7883 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7884 (write_debug_names): Likewise.
7885
7886 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7887
7888 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
7889 Make an std::vector.
7890 <n_comp_units>: Remove.
7891 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7892 to std::vector change.
7893 (dwarf2_per_objfile::get_cutu): Likewise.
7894 (dwarf2_per_objfile::get_cu): Likewise.
7895 (create_cus_from_index): Likewise.
7896 (create_addrmap_from_index): Likewise.
7897 (create_addrmap_from_aranges): Likewise.
7898 (dwarf2_read_index): Likewise.
7899 (dw2_find_last_source_symtab): Likewise.
7900 (dw2_map_symtabs_matching_filename): Likewise.
7901 (dw2_symtab_iter_next): Likewise.
7902 (dw2_print_stats): Likewise.
7903 (dw2_expand_all_symtabs): Likewise.
7904 (dw2_expand_symtabs_with_fullname): Likewise.
7905 (dw2_expand_marked_cus): Likewise.
7906 (dw2_map_symbol_filenames): Likewise.
7907 (create_cus_from_debug_names): Likewise.
7908 (dwarf2_read_debug_names): Likewise.
7909 (dw2_debug_names_iterator::next): Likewise.
7910 (dwarf2_initialize_objfile): Likewise.
7911 (set_partial_user): Likewise.
7912 (dwarf2_build_psymtabs_hard): Likewise.
7913 (read_comp_units_from_section): Remove arguments, adjust to
7914 std::vector change.
7915 (create_all_comp_units): Adjust to std::vector and
7916 read_comp_units_from_section changes.
7917 (dwarf2_find_containing_comp_unit): Adjust to std::vector
7918 change.
7919 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7920 (psyms_seen_size): Likewise.
7921 (write_gdbindex): Likewise.
7922 (write_debug_names): Likewise.
7923
7924 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7925
7926 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
7927 with dwarf2_per_objfile.
7928 (create_cus_from_index): Likewise.
7929 (create_signatured_type_table_from_index): Likewise.
7930 (dwarf2_read_index): Likewise.
7931 (dwarf2_initialize_objfile): Likewise.
7932 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
7933 per_cu rather than get_dwarf2_per_objfile.
7934
7935 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7936
7937 * dwarf2read.h (struct signatured_type): Forward declare.
7938 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
7939 New methods.
7940 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
7941 (dw2_get_cutu): ...this.
7942 (dwarf2_per_objfile::get_cu): Rename from...
7943 (dw2_get_cu): ...this.
7944 (dwarf2_per_objfile::get_tu): New.
7945 (create_addrmap_from_index): Adjust.
7946 (create_addrmap_from_aranges): Adjust.
7947 (dw2_find_last_source_symtab): Adjust.
7948 (dw2_map_symtabs_matching_filename): Adjust.
7949 (dw2_symtab_iter_next): Adjust.
7950 (dw2_print_stats): Adjust.
7951 (dw2_expand_all_symtabs): Adjust.
7952 (dw2_expand_symtabs_with_fullname): Adjust.
7953 (dw2_expand_marked_cus): Adjust.
7954 (dw_expand_symtabs_matching_file_matcher): Adjust.
7955 (dw2_map_symbol_filenames): Adjust.
7956 (dw2_debug_names_iterator::next): Adjust.
7957 (dwarf2_initialize_objfile): Adjust.
7958 (set_partial_user): Adjust.
7959 (dwarf2_build_psymtabs_hard): Adjust.
7960
7961 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7962
7963 * dwarf2read.c (create_signatured_type_table_from_debug_names):
7964 Remove unused variables.
7965 (dw2_map_symtabs_matching_filename): Likewise.
7966 (dwarf2_record_block_ranges): Likewise.
7967 (dwarf2_read_addr_index): Likewise.
7968 (follow_die_offset): Likewise.
7969
7970 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7971
7972 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
7973 to symbol_file_add_main.
7974
7975 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7976
7977 PR mi/22299
7978 * mi/mi-console.c (do_fputc_async_safe): New.
7979 (mi_console_file::write_async_safe): New.
7980 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
7981 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
7982 New.
7983 * ui-file.c (ui_file::putstrn): Adjust call to
7984 fputstrn_unfiltered.
7985 * utils.c (printchar): Replace do_fputs and do_fprintf
7986 parameters by do_fputc.
7987 (fputstr_filtered): Adjust call to printchar.
7988 (fputstr_unfiltered): Likewise.
7989 (fputstrn_filtered): Likewise.
7990 (fputstrn_unfiltered): Add do_fputc parameter, pass to
7991 printchar.
7992 * utils.h (do_fputc_ftype): New typedef.
7993 (fputstrn_unfiltered): Add do_fputc parameter.
7994
7995 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7996
7997 * regformats/i386/i386-avx.dat: Remove.
7998
7999 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8000
8001 PR gdb/22979
8002 * amd64-tdep.c (amd64_none_init_abi): New function.
8003 (amd64_x32_none_init_abi): New function.
8004 (_initialize_amd64_tdep): Register handlers for x86-64 and
8005 x64_32 with GDB_OSABI_NONE.
8006 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
8007 GDB_OSABI_NONE osabi.
8008
8009 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8010
8011 PR gdb/22980
8012 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
8013 GDB_OSABI_NONE.
8014 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
8015 * osabi.c (gdb_osabi_names): Add "unknown" entry.
8016
8017 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8018
8019 * common/byte-vector.h (char_vector): New type.
8020 * target.h (target_read_alloc): Return
8021 gdb::optional<byte_vector>.
8022 (target_read_stralloc): Return gdb::optional<char_vector>.
8023 (target_get_osdata): Return gdb::optional<char_vector>.
8024 * target.c (target_read_alloc_1): Templatize. Replacement
8025 manual memory management with vector.
8026 (target_read_alloc): Change return type, adjust.
8027 (target_read_stralloc): Change return type, adjust.
8028 (target_get_osdata): Change return type, adjust.
8029 * auxv.c (struct auxv_info) <length>: Remove.
8030 <data>: Change type to gdb::optional<byte_vector>.
8031 (auxv_inferior_data_cleanup): Free auxv_info with delete.
8032 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
8033 (target_auxv_search): Adjust.
8034 (fprint_target_auxv): Adjust.
8035 * avr-tdep.c (avr_io_reg_read_command): Adjust.
8036 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
8037 (linux_make_corefile_notes): Adjust.
8038 * osdata.c (get_osdata): Adjust.
8039 * remote.c (remote_get_threads_with_qxfer): Adjust.
8040 (remote_memory_map): Adjust.
8041 (remote_traceframe_info): Adjust.
8042 (btrace_read_config): Adjust.
8043 (remote_read_btrace): Adjust.
8044 (remote_pid_to_exec_file): Adjust.
8045 * solib-aix.c (solib_aix_get_library_list): Adjust.
8046 * solib-dsbt.c (decode_loadmap): Don't free buf.
8047 (dsbt_get_initial_loadmaps): Adjust.
8048 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
8049 * solib-target.c (solib_target_current_sos): Adjust.
8050 * tracepoint.c (sdata_make_value): Adjust.
8051 * xml-support.c (xinclude_start_include): Adjust.
8052 (xml_fetch_content_from_file): Adjust.
8053 * xml-support.h (xml_fetch_another): Change return type.
8054 (xml_fetch_content_from_file): Change return type.
8055 * xml-syscall.c (xml_init_syscalls_info): Adjust.
8056 * xml-tdesc.c (file_read_description_xml): Adjust.
8057 (fetch_available_features_from_target): Change return type.
8058 (target_fetch_description_xml): Adjust.
8059 (target_read_description_xml): Adjust.
8060
8061 2018-04-06 Tom Tromey <tom@tromey.com>
8062
8063 * value.c (~value): Update.
8064 (struct value) <contents>: Now unique_xmalloc_ptr.
8065 (value_contents_bits_eq, allocate_value_contents)
8066 (value_contents_raw, value_contents_all_raw)
8067 (value_contents_for_printing, value_contents_for_printing_const)
8068 (set_value_enclosing_type): Update.
8069
8070 2018-04-06 Tom Tromey <tom@tromey.com>
8071
8072 * value.c (range_s): Remove typedef, VEC.
8073 (struct range): Add operator<.
8074 (range_lessthan): Remove.
8075 (ranges_contain): Change type.
8076 (~value): Update.
8077 (struct value) <unavailable, optimized_out>: Now std::vector.
8078 (value_entirely_available)
8079 (value_entirely_covered_by_range_vector)
8080 (value_entirely_unavailable, value_entirely_optimized_out):
8081 Update.
8082 (insert_into_bit_range_vector): Change argument type.
8083 (find_first_range_overlap): Likewise.
8084 (struct ranges_and_idx, value_contents_bits_eq)
8085 (require_not_optimized_out, require_available): Update.
8086 (ranges_copy_adjusted): Change argument types.
8087 (value_optimized_out, value_copy, value_fetch_lazy): Update.
8088
8089 2018-04-06 Tom Tromey <tom@tromey.com>
8090
8091 * value.c (~value): Update.
8092 (struct value) <parent>: Now a value_ref_ptr.
8093 (value_parent, set_value_parent, value_address, value_copy):
8094 Update.
8095
8096 2018-04-06 Tom Tromey <tom@tromey.com>
8097
8098 * value.c (struct value): Add constructor, destructor, and member
8099 initializers.
8100 (allocate_value_lazy, value_decref): Update.
8101
8102 2018-04-06 Tom Tromey <tom@tromey.com>
8103
8104 * value.c (struct value) <released, next>: Remove.
8105 (all_values): Now a std::vector.
8106 (allocate_value_lazy): Update.
8107 (value_next): Remove.
8108 (value_mark, value_free_to_mark, release_value)
8109 (value_release_to_mark): Update.
8110
8111 2018-04-06 Tom Tromey <tom@tromey.com>
8112
8113 * value.h (fetch_subexp_value, value_release_to_mark): Update.
8114 (free_value_chain): Remove.
8115 * value.c (free_value_chain): Remove.
8116 (value_release_to_mark): Return a std::vector.
8117 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
8118 std::vector.
8119 (check_condition): Update.
8120 * eval.c (fetch_subexp_value): Change "val_chain" to a
8121 std::vector.
8122 * breakpoint.c (update_watchpoint): Update.
8123 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
8124
8125 2018-04-06 Tom Tromey <tom@tromey.com>
8126
8127 * value.h (free_all_values): Remove.
8128 * value.c (free_all_values): Remove.
8129
8130 2018-04-06 Tom Tromey <tom@tromey.com>
8131
8132 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
8133 (value_history_chain, value_history_count): Remove.
8134 (value_history): New global.
8135 (record_latest_value, access_value_history, show_values)
8136 (preserve_values): Update.
8137
8138 2018-04-06 Tom Tromey <tom@tromey.com>
8139
8140 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
8141 * varobj.c (varobj_set_display_format, varobj_set_value)
8142 (install_default_visualizer, construct_visualizer)
8143 (install_new_value, ~varobj, varobj_get_value_type)
8144 (my_value_of_variable, varobj_editable_p): Update.
8145 * c-varobj.c (c_describe_child, c_value_of_variable)
8146 (cplus_number_of_children, cplus_describe_child): Update.
8147 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
8148 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
8149 (ada_value_of_variable, ada_value_is_changeable_p): Update.
8150
8151 2018-04-06 Tom Tromey <tom@tromey.com>
8152
8153 * printcmd.c (last_examine_address): Change type to
8154 value_ref_ptr.
8155 (do_examine, x_command): Update.
8156
8157 2018-04-06 Tom Tromey <tom@tromey.com>
8158
8159 * value.c (release_value): Update.
8160 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
8161 (struct bpstats) <val>: Now a value_ref_ptr.
8162 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8163 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8164 (~watchpoint, print_it_watchpoint, watch_command_1)
8165 (invalidate_bp_value_on_memory_change): Update.
8166
8167 2018-04-06 Tom Tromey <tom@tromey.com>
8168
8169 * varobj.c (varobj_clear_saved_item)
8170 (update_dynamic_varobj_children, install_new_value, ~varobj):
8171 Update.
8172 * value.h (value_incref): Move declaration earlier.
8173 (value_decref): Rename from value_free.
8174 (struct value_ref_policy): New.
8175 (value_ref_ptr): New typedef.
8176 (struct value_deleter): Remove.
8177 (gdb_value_up): Remove typedef.
8178 (release_value): Change return type.
8179 (release_value_or_incref): Remove.
8180 * value.c (set_value_parent): Update.
8181 (value_incref): Change return type.
8182 (value_decref): Rename from value_free.
8183 (value_free_to_mark, free_all_values, free_value_chain): Update.
8184 (release_value): Return value_ref_ptr.
8185 (release_value_or_incref): Remove.
8186 (record_latest_value, set_internalvar, clear_internalvar):
8187 Update.
8188 * stack.c (info_frame_command): Don't call value_free.
8189 * python/py-value.c (valpy_dealloc, valpy_new)
8190 (value_to_value_object): Update.
8191 * printcmd.c (do_examine): Update.
8192 * opencl-lang.c (lval_func_free_closure): Update.
8193 * mi/mi-main.c (register_changed_p): Don't call value_free.
8194 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
8195 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
8196 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
8197 value_free.
8198 * guile/scm-value.c (vlscm_free_value_smob)
8199 (vlscm_scm_from_value): Update.
8200 * frame.c (frame_register_unwind, frame_unwind_register_signed)
8201 (frame_unwind_register_unsigned, get_frame_register_bytes)
8202 (put_frame_register_bytes): Don't call value_free.
8203 * findvar.c (address_from_register): Don't call value_free.
8204 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
8205 * dwarf2loc.c (entry_data_value_free_closure)
8206 (value_of_dwarf_reg_entry, free_pieced_value_closure)
8207 (dwarf2_evaluate_loc_desc_full): Update.
8208 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8209 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8210 (~watchpoint, watch_command_1)
8211 (invalidate_bp_value_on_memory_change): Update.
8212 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
8213
8214 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
8215
8216 PR gdb/23022
8217 * warning.m4: Add -Wno-error=deprecated-register.
8218 * configure: Re-generate.
8219
8220 2018-04-05 Tom Tromey <tom@tromey.com>
8221
8222 * linespec.h: Remove include of "vec.h".
8223
8224 2018-04-05 Tom Tromey <tom@tromey.com>
8225
8226 * linespec.c (typep): Remove typedef.
8227 (find_methods, find_superclass_methods): Take a std::vector.
8228 (find_method): Use std::vector.
8229
8230 2018-04-05 Tom Tromey <tom@tromey.com>
8231
8232 * utils.c (compare_strings): Remove.
8233 * utils.h (compare_strings): Remove.
8234 * objc-lang.h (find_imps): Update.
8235 * objc-lang.c (find_methods): Take a std::vector.
8236 (uniquify_strings, find_imps): Likewise.
8237 * linespec.c (find_methods): Take a std::vector.
8238 (decode_objc): Use std::vector.
8239 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
8240 a std::vector.
8241 (find_method, find_function_symbols): Use std::vector.
8242
8243 2018-04-05 Tom Tromey <tom@tromey.com>
8244
8245 * completer.c (completion_tracker::completion_tracker): Remove
8246 cast.
8247 (completion_tracker::discard_completions): Likewise.
8248 * breakpoint.c (ambiguous_names_p): Remove cast.
8249 * ada-lang.c (_initialize_ada_language): Remove cast.
8250 * utils.h (streq): Update.
8251 (streq_hash): Add new declaration.
8252 * utils.c (streq): Return bool.
8253 (streq_hash): New function.
8254
8255 2018-04-05 Tom Tromey <tom@tromey.com>
8256
8257 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
8258 Remove a string copy.
8259
8260 2018-04-05 Tom Tromey <tom@tromey.com>
8261
8262 * linespec.c (filter_results): Use std::vector.
8263 (decode_line_2, decode_line_full): Update.
8264
8265 2018-04-05 Tom Tromey <tom@tromey.com>
8266
8267 * linespec.c (canonical_to_fullform): Return std::string.
8268 (filter_results): Update.
8269 (struct decode_line_2_item): Add constructor.
8270 <fullform, displayform>: Now std::string.
8271 (decode_line_2_compare_items): Now a std::sort comparator.
8272 (decode_line_2): Update.
8273
8274 2018-04-05 Tom Tromey <tom@tromey.com>
8275
8276 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
8277 (unexpected_linespec_error): Update.
8278 (linespec_parse_basic, parse_linespec): Update.
8279
8280 2018-04-05 Tom Tromey <tom@tromey.com>
8281
8282 * linespec.c (linespec_parse_basic): Reindent.
8283
8284 2018-04-05 Tom Tromey <tom@tromey.com>
8285
8286 * minsyms.h (iterate_over_minimal_symbols): Update.
8287 * minsyms.c (iterate_over_minimal_symbols): Take a
8288 gdb::function_view.
8289 * linespec.c (struct collect_minsyms): Remove.
8290 (compare_msyms): Now a std::sort comparator.
8291 (add_minsym): Add parameters.
8292 (search_minsyms_for_name): Update. Use std::vector.
8293
8294 2018-04-03 Tom Tromey <tom@tromey.com>
8295
8296 * mipsread.c (read_alphacoff_dynamic_symtab): Use
8297 gdb::byte_vector.
8298
8299 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
8300
8301 * MAINTAINERS (Write After Approval): Add Weimin Pan.
8302
8303 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
8304
8305 PR gdb/16959
8306 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
8307 printing static type.
8308
8309 2018-04-01 Tom Tromey <tom@tromey.com>
8310
8311 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
8312 (rs6000_xfer_shared_libraries): Update.
8313
8314 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
8315
8316 * common/gdb_vecs.h (char_ptr): Remove.
8317 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
8318
8319 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
8320
8321 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
8322 with std::vector.
8323 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
8324
8325 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
8326
8327 * tracepoint.h (struct uploaded_tp): Initialize fields.
8328 <actions, step_actions, cmd_strings>: Change type to
8329 std::vector<char *>.
8330 * tracepoint.c (get_uploaded_tp): Allocate with new.
8331 (free_uploaded_tps): Free with delete.
8332 (parse_tracepoint_definition): Adjust to std::vector change.
8333 * breakpoint.c (read_uploaded_action): Likewise.
8334 (create_tracepoint_from_upload): Likewise.
8335 * ctf.c (ctf_write_uploaded_tp): Likewise.
8336 (SET_ARRAY_FIELD): Likewise.
8337 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
8338
8339 2018-03-30 Tom Tromey <tom@tromey.com>
8340
8341 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
8342 std::unique_ptr.
8343 (svr4_keep_data_in_core): Update.
8344 (svr4_read_so_list): Update.
8345
8346 2018-03-30 Tom Tromey <tom@tromey.com>
8347
8348 * windows-nat.c (handle_output_debug_string, handle_exception):
8349 Update.
8350 * target.h (target_read_string): Update.
8351 * target.c (target_read_string): Change "string" to
8352 unique_xmalloc_ptr.
8353 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
8354 Update.
8355 * solib-frv.c (frv_current_sos): Update.
8356 * solib-dsbt.c (dsbt_current_sos): Update.
8357 * solib-darwin.c (darwin_current_sos): Update.
8358 * linux-thread-db.c (inferior_has_bug): Update.
8359 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
8360 Update. Remove alloca.
8361 * ada-lang.c (ada_main_name): Update.
8362
8363 2018-03-30 Tom Tromey <tom@tromey.com>
8364
8365 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
8366 (struct dwo_file_deleter): New.
8367 (dwo_file_up): New typedef.
8368 (open_and_init_dwo_file): Use dwo_file_up.
8369 (free_dwo_file_cleanup): Remove.
8370
8371 2018-03-30 Tom Tromey <tom@tromey.com>
8372
8373 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
8374 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
8375
8376 2018-03-30 Tom Tromey <tom@tromey.com>
8377
8378 * dwarf2read.c (class free_cached_comp_units): New class.
8379 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
8380 (free_cached_comp_units): Remove function.
8381
8382 2018-03-30 Tom Tromey <tom@tromey.com>
8383
8384 * utils.h (make_cleanup_unpush_target): Remove.
8385 * inf-ptrace.c (struct target_unpusher): New.
8386 (target_unpush_up) New typedef.
8387 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
8388 target_unpush_up.
8389 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
8390
8391 2018-03-27 Tom Tromey <tom@tromey.com>
8392
8393 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
8394
8395 2018-03-27 Pedro Alves <palves@redhat.com>
8396 Tom Tromey <tom@tromey.com>
8397
8398 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
8399 destructor. Now a class.
8400 (gdb_readline_wrapper_cleanup): Remove function.
8401 (gdb_readline_wrapper): Remove cleanups.
8402
8403 2018-03-27 Tom Tromey <tom@tromey.com>
8404
8405 * typeprint.h (struct type_print_options) <local_typedefs,
8406 global_typedefs>: Remove "struct" keyword.
8407 (class typedef_hash_table): New class.
8408 (recursively_update_typedef_hash, add_template_parameters)
8409 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
8410 (find_typedef_in_hash): Don't declare.
8411 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
8412 (typedef_hash_table::recursively_update): Rename from
8413 recursively_update_typedef_hash. Now a member.
8414 (typedef_hash_table::add_template_parameters): Rename from
8415 add_template_parameters. Now a member.
8416 (typedef_hash_table::typedef_hash_table): Now a constructor;
8417 rename from create_typedef_hash.
8418 (typedef_hash_table::~typedef_hash_table): Now a destructor;
8419 rename from free_typedef_hash.
8420 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
8421 (do_free_global_table): Remove.
8422 (typedef_hash_table::typedef_hash_table): New constructor; renamed
8423 from copy_type_recursive.
8424 (create_global_typedef_table): Remove.
8425 (typedef_hash_table::find_global_typedef): Now a member of
8426 typedef_hash_table.
8427 (typedef_hash_table::find_typedef): Rename from
8428 find_typedef_in_hash; now a member.
8429 (whatis_exp): Update.
8430 * extension.h (struct ext_lang_type_printers): Add constructor and
8431 destructor.
8432 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
8433 declare.
8434 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
8435 Now a constructor; rename from start_ext_lang_type_printers.
8436 (ext_lang_type_printers): Now a destructor; rename from
8437 free_ext_lang_type_printers.
8438 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
8439 Update.
8440 (c_type_print_base_struct_union): Update. Remove cleanups.
8441
8442 2018-03-27 Tom Tromey <tom@tromey.com>
8443
8444 * dwarf-index-write.c: Include <cmath>.
8445
8446 2018-03-27 Joel Brobecker <brobecker@adacore.com>
8447
8448 * NEWS: Add entry describing new "set|show varsize-limit" command.
8449 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
8450 command.
8451 * printcmd.c (_initialize_printcmd): Add "set var" alias of
8452 "set variable".
8453
8454 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
8455
8456 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
8457 dwarf-index-write.c
8458 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
8459 * dwarf-index-common.c: New file.
8460 * dwarf-index-common.h: New file.
8461 * dwarf-index-write.c: New file.
8462 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
8463 (struct dwarf2_section_info): Move from here.
8464 (dwarf2_section_info_def): Likewise.
8465 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
8466 (offset_type): Likewise.
8467 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
8468 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
8469 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
8470 (byte_swap): Likewise.
8471 (MAYBE_SWAP): Likewise.
8472 (dwarf2_per_cu_ptr): Likewise.
8473 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
8474 (struct tu_stats): Likewise.
8475 (struct dwarf2_per_objfile): Likewise.
8476 (struct dwarf2_per_cu_data): Likewise.
8477 (struct signatured_type): Likewise.
8478 (sig_type_ptr): Likewise.
8479 (DEF_VEC_P (sig_type_ptr)): Likewise.
8480 (INDEX4_SUFFIX): Likewise.
8481 (INDEX5_SUFFIX): Likewise.
8482 (DEBUG_STR_SUFFIX): Likewise.
8483 (dwarf2_read_section): Make non-static.
8484 (mapped_index_string_hash): Move from here.
8485 (dwarf5_djb_hash): Likewise.
8486 (file_write): Likewise.
8487 (class data_buf): Likewise.
8488 (struct symtab_index_entry): Likewise.
8489 (struct mapped_symtab): Likewise.
8490 (find_slot): Likewise.
8491 (hash_expand): Likewise.
8492 (add_index_entry): Likewise.
8493 (uniquify_cu_indices): Likewise.
8494 (class c_str_view): Likewise.
8495 (class c_str_view_hasher): Likewise.
8496 (class vector_hasher): Likewise.
8497 (write_hash_table): Likewise.
8498 (psym_index_map): Likewise.
8499 (struct addrmap_index_data): Likewise.
8500 (add_address_entry): Likewise.
8501 (add_address_entry_worker): Likewise.
8502 (write_address_map): Likewise.
8503 (symbol_kind): Likewise.
8504 (write_psymbols): Likewise.
8505 (struct signatured_type_index_data): Likewise.
8506 (write_one_signatured_type): Likewise.
8507 (recursively_count_psymbols): Likewise.
8508 (recursively_write_psymbols): Likewise.
8509 (class debug_names): Likewise.
8510 (check_dwarf64_offsets): Likewise.
8511 (psyms_seen_size): Likewise.
8512 (write_gdbindex): Likewise.
8513 (write_debug_names): Likewise.
8514 (assert_file_size): Likewise.
8515 (write_psymtabs_to_index): Likewise.
8516 (save_gdb_index_command): Likewise.
8517 (_initialize_dwarf2_read): Don't register the "save gdb-index"
8518 command.
8519 * dwarf2read.h: New file.
8520
8521 2018-03-27 Joel Brobecker <brobecker@adacore.com>
8522
8523 PR gdb/22670
8524 * dwarf2read.c (dwarf2_physname): Do not return the demangled
8525 symbol name if the CU's language stores symbol names in linkage
8526 format.
8527 * language.h (struct language_defn)
8528 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
8529 all instances of this struct.
8530
8531 2018-03-26 Tom Tromey <tom@tromey.com>
8532
8533 * stack.c (backtrace_command_1): Remove verbose code.
8534
8535 2018-03-26 Tom Tromey <tom@tromey.com>
8536
8537 * python/py-framefilter.c (py_print_type): Don't catch
8538 exceptions. Return void.
8539 (py_print_value): Likewise.
8540 (py_print_single_arg): Likewise.
8541 (enumerate_args): Don't catch exceptions.
8542 (py_print_args): Likewise.
8543 (py_print_frame): Likewise.
8544 (gdbpy_apply_frame_filter): Catch exceptions here.
8545
8546 2018-03-26 Tom Tromey <tom@tromey.com>
8547
8548 * stack.c (_initialize_stack): Remove trailing newlines from help
8549 text. Add "Usage" line to "backtrace" help.
8550
8551 2018-03-26 Tom Tromey <tom@tromey.com>
8552
8553 PR python/16486:
8554 * python/py-framefilter.c (py_print_args): Call wrap_hint.
8555
8556 2018-03-26 Tom Tromey <tom@tromey.com>
8557
8558 * python/py-framefilter.c (py_print_single_arg): Return
8559 EXT_LANG_BT_ERROR from catch.
8560
8561 2018-03-26 Tom Tromey <tom@tromey.com>
8562
8563 PR backtrace/15584:
8564 * stack.c (backtrace_command_1): Move some code into no-filters
8565 "if".
8566
8567 2018-03-26 Tom Tromey <tom@tromey.com>
8568
8569 * python/py-framefilter.c (throw_quit_or_print_exception): New
8570 function.
8571 (gdbpy_apply_frame_filter): Use it.
8572
8573 2018-03-26 Tom Tromey <tom@tromey.com>
8574
8575 PR cli/17716:
8576 * python/py-framefilter.c (py_print_type, py_print_value)
8577 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
8578 RETURN_MASK_ERROR.
8579
8580 2018-03-26 Tom Tromey <tom@tromey.com>
8581
8582 * python/py-framefilter.c (enumerate_args): Use
8583 gdb::unique_xmalloc_ptr.
8584
8585 2018-03-26 Tom Tromey <tom@tromey.com>
8586
8587 * python/py-framefilter.c (py_print_frame): Return
8588 EXT_LANG_BT_OK.
8589 (gdbpy_apply_frame_filter): Update comment.
8590 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
8591 Remove.
8592 <EXT_LANG_BT_NO_FILTERS>: Change value.
8593
8594 2018-03-26 Tom Tromey <tom@tromey.com>
8595
8596 PR backtrace/15582:
8597 * stack.c (backtrace_command): Parse "hide" argument.
8598 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
8599 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
8600 constant.
8601
8602 2018-03-26 Tom Tromey <tom@tromey.com>
8603
8604 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
8605 add "flags".
8606 (backtrace_command): Remove "fulltrace", add "flags".
8607
8608 2018-03-26 Tom Tromey <tom@tromey.com>
8609
8610 * stack.c (backtrace_command): Rewrite command line parsing.
8611
8612 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
8613
8614 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
8615
8616 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
8617
8618 * filename-seen-cache.h: Add include guard.
8619
8620 2018-03-26 Keith Seitz <keiths@redhat.com>
8621
8622 * symfile.c (place_section): Remove "struct" from section_addr_info
8623 in comment.
8624 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
8625 "struct" keyword from section_addr_info.
8626
8627 2018-03-26 Alan Hayward <alan.hayward@arm.com>
8628
8629 * regformats/regdef.h (reg): Add constructors.
8630
8631 2018-03-25 Pedro Alves <palves@redhat.com>
8632
8633 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
8634 if then/else bodies in var_func_name extraction.
8635
8636 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
8637
8638 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
8639 lookup_minimal_symbol() to find symbol entry.
8640 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
8641
8642 2018-03-23 Keith Seitz <keiths@redhat.com>
8643
8644 PR c++/22968
8645 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
8646 nested type definitions for C++, too.
8647
8648 2018-03-23 Tom Tromey <tom@tromey.com>
8649
8650 * machoread.c (struct oso_el): Add a constructor. Don't define as
8651 a typedef.
8652 (macho_register_oso): Remove.
8653 (macho_symtab_read): Take a std::vector.
8654 (oso_el_compare_name): Now a std::sort comparator.
8655 (macho_symfile_read_all_oso): Take a std::vector.
8656 (macho_symfile_read): Use std::vector. Remove cleanups.
8657
8658 2018-03-22 Tom Tromey <tom@tromey.com>
8659
8660 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
8661 (record_full_goto_bookmark): Use std::string.
8662
8663 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8664
8665 PR tdep/18295
8666 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
8667 a single mask.
8668
8669 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8670
8671 * rs6000-tdep.c (store_insn_p): New function.
8672 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
8673 and cr_reg to their unshifted values. Use store_insn_p to
8674 match LR saves using either R1 or fdata->alloca_reg. Use
8675 store_insn_p to match CR saves. Set alloca_reg_offset
8676 when alloca_reg and framep are set. Remove lr_reg shift
8677 when assigning to fdata->lr_register.
8678
8679 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
8680
8681 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
8682 command line args instead of emitting a warning.
8683
8684 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8685
8686 * tracepoint.h (struct static_tracepoint_marker): Initialize
8687 fields, define default constructor, move constructor and move
8688 assignment, disable the rest.
8689 <str_id, extra>: Make std::string.
8690 (release_static_tracepoint_marker): Remove.
8691 (free_current_marker): Remove.
8692 * tracepoint.c (free_current_marker): Remove.
8693 (parse_static_tracepoint_marker_definition): Adjust to
8694 std::string, use new hex2str overload.
8695 (release_static_tracepoint_marker): Remove.
8696 (print_one_static_tracepoint_marker): Get marker by reference
8697 and adjust to std::string.
8698 (info_static_tracepoint_markers_command): Adjust to std::vector
8699 changes
8700 * target.h (static_tracepoint_marker_p): Remove typedef.
8701 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
8702 (struct target_ops) <to_static_tracepoint_marker_at>: Return
8703 bool.
8704 <to_static_tracepoint_markers_by_strid>: Return std::vector.
8705 * target-debug.h
8706 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
8707 (target_debug_print_std_vector_static_tracepoint_marker): New.
8708 (target_debug_print_struct_static_tracepoint_marker_p): Rename
8709 to...
8710 (target_debug_print_static_tracepoint_marker_p): ... this.
8711 * target-delegates.c: Re-generate.
8712 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
8713 Make std::string.
8714 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
8715 (decode_static_tracepoint_spec): Adjust to std::vector.
8716 (tracepoint_print_one_detail): Adjust to std::string.
8717 (strace_marker_decode_location): Adjust to std::string.
8718 (update_static_tracepoint): Adjust to std::string, remove call
8719 to release_static_tracepoint_marker.
8720 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
8721 Adjust to std::vector.
8722 * remote.c (remote_static_tracepoint_marker_at): Return bool.
8723 (remote_static_tracepoint_markers_by_strid): Adjust to
8724 std::vector.
8725 * common/rsp-low.h (hex2str): New overload with explicit count
8726 of bytes.
8727 * common/rsp-low.c (hex2str): New overload with explicit count
8728 of bytes.
8729 * unittests/rsp-low-selftests.c (test_hex2str): New function.
8730 (_initialize_rsp_low_selftests): Add test_hex2str test.
8731 * unittests/tracepoint-selftests.c
8732 (test_parse_static_tracepoint_marker_definition): Adjust to
8733 std::string.
8734
8735 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8736
8737 * tracepoint.c (parse_static_tracepoint_marker_definition):
8738 Consider case where the definition is followed by more
8739 definitions.
8740 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8741 tracepoint-selftests.c.
8742 * unittests/tracepoint-selftests.c: New.
8743
8744 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8745
8746 * MAINTAINERS (Write After Approval): Add Pedro Franco de
8747 Carvalho.
8748
8749 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
8750
8751 * symtab.c (find_pc_sect_line): fixed indentation.
8752
8753 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
8754
8755 * symtab.c (find_pc_sect_line): now uses binary search.
8756
8757 2018-03-19 Tom Tromey <tom@tromey.com>
8758
8759 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
8760 "IDENT" production.
8761
8762 2018-03-19 Pedro Alves <palves@redhat.com>
8763 Tom Tromey <tom@tromey.com>
8764
8765 * unittests/observable-selftests.c: New file.
8766 * common/observable.h: New file.
8767 * observable.h: New file.
8768 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
8769 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
8770 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
8771 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
8772 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
8773 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
8774 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
8775 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
8776 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
8777 python/py-breakpoint.c, python/py-finishbreakpoint.c,
8778 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
8779 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
8780 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
8781 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
8782 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
8783 tui/tui-interp.c, valops.c: Update all users.
8784 * tui/tui-hooks.c (tui_bp_created_observer)
8785 (tui_bp_deleted_observer, tui_bp_modified_observer)
8786 (tui_inferior_exit_observer, tui_before_prompt_observer)
8787 (tui_normal_stop_observer, tui_register_changed_observer):
8788 Remove.
8789 (tui_observers_token): New global.
8790 (attach_or_detach, tui_attach_detach_observers): New functions.
8791 (tui_install_hooks, tui_remove_hooks): Use
8792 tui_attach_detach_observers.
8793 * record-btrace.c (record_btrace_thread_observer): Remove.
8794 (record_btrace_thread_observer_token): New global.
8795 * observer.sh: Remove.
8796 * observer.c: Rename to observable.c.
8797 * observable.c (namespace gdb_observers): Define new objects.
8798 (observer_debug): Move into gdb_observers namespace.
8799 (struct observer, struct observer_list, xalloc_observer_list_node)
8800 (xfree_observer_list_node, generic_observer_attach)
8801 (generic_observer_detach, generic_observer_notify): Remove.
8802 (_initialize_observer): Update.
8803 Don't include observer.inc.
8804 * Makefile.in (generated_files): Remove observer.h, observer.inc.
8805 (clean mostlyclean): Likewise.
8806 (observer.h, observer.inc): Remove targets.
8807 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
8808 (COMMON_SFILES): Use observable.c, not observer.c.
8809 * .gitignore: Remove observer.h.
8810
8811 2018-03-18 Tom Tromey <tom@tromey.com>
8812
8813 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
8814 gdb::def_vector.
8815 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
8816
8817 2018-03-17 Tom Tromey <tom@tromey.com>
8818
8819 * auto-load.c (auto_load_objfile_script_1): Use std::string.
8820
8821 2018-03-17 Tom Tromey <tom@tromey.com>
8822
8823 * target.c (class scoped_target_fd): New.
8824 (target_fileio_close_cleanup): Remove.
8825 (target_fileio_read_alloc_1): Use scoped_target_fd.
8826
8827 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
8828
8829 * silent-rules.mk: New.
8830 * Makefile.in: Include silent-rules.mk
8831 (srcdir, VPATH, top_srcdir): Move up.
8832 (COMPILE): Add ECHO_CXX.
8833 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
8834 (init.c): Add ECHO_INIT_C.
8835 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
8836 (version.c): Add ECHO_GEN.
8837 (printcmd.o): Add ECHO_CXX.
8838 (target-float.o): Add ECHO_CXX.
8839 (ada-exp.o): Add ECHO_CXX.
8840 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
8841 (insight$(EXEEXT)): Add ECHO_CXXLD.
8842 * gnulib/configure.ac: Add AM_SILENT_RULES.
8843 * gnulib/aclocal.m4: Re-generate.
8844 * gnulib/configure: Re-generate.
8845 * gnulib/import/Makefile.in: Re-generate.
8846
8847 2018-03-16 Tom Tromey <tom@tromey.com>
8848
8849 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
8850 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
8851 * utils.c (do_free_section_addr_info)
8852 (make_cleanup_free_section_addr_info): Remove.
8853 * symfile.h (struct other_sections): Add constructor.
8854 (struct section_addr_info): Remove.
8855 (section_addr_info): New typedef.
8856 (struct sym_fns) <sym_offsets>: Change type of parameter.
8857 (build_section_addr_info_from_objfile)
8858 (relative_addr_info_to_section_offsets, addr_info_make_relative)
8859 (default_symfile_offsets, symbol_file_add)
8860 (symbol_file_add_from_bfd)
8861 (build_section_addr_info_from_section_table): Update.
8862 (alloc_section_addr_info, free_section_addr_info): Don't declare.
8863 * symfile.c (alloc_section_addr_info): Remove.
8864 (build_section_addr_info_from_section_table): Change return type.
8865 Update.
8866 (build_section_addr_info_from_bfd)
8867 (build_section_addr_info_from_objfile): Likewise.
8868 (free_section_addr_info): Remove.
8869 (relative_addr_info_to_section_offsets): Change type of "addrs".
8870 (addrs_section_compar): Now a std::sort comparator.
8871 (addrs_section_sort): Change return type.
8872 (addr_info_make_relative): Change type of "addrs". Update.
8873 (default_symfile_offsets, syms_from_objfile_1)
8874 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
8875 (symbol_file_add_separate): Update.
8876 (symbol_file_add): Change type of "addrs". Update.
8877 (add_symbol_file_command): Update. Remove cleanups.
8878 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
8879 cleanups.
8880 * symfile-debug.c (debug_sym_offsets): Change type of "info".
8881 * solib.c (solib_read_symbols): Update.
8882 * objfiles.c (objfile_relocate): Update. Remove cleanups.
8883 * machoread.c (macho_symfile_offsets): Update.
8884 * jit.c (jit_bfd_try_read_symtab): Update.
8885
8886 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
8887
8888 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8889 unittests/utils-selftests.c.
8890 * unittests/utils-selftests.c: New file.
8891
8892 2018-03-14 Tom Tromey <tom@tromey.com>
8893
8894 PR cli/14977:
8895 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
8896 for NULL.
8897
8898 2018-03-14 Tom Tromey <tom@tromey.com>
8899
8900 PR cli/19918:
8901 * printcmd.c (printf_pointer): Allow "-" in format.
8902
8903 2018-03-14 Tom Tromey <tom@tromey.com>
8904
8905 * printcmd.c (_initialize_printcmd): Add usage to printf.
8906
8907 2018-03-14 Yao Qi <qiyao@sourceware.org>
8908
8909 * MAINTAINERS: Update my email address.
8910
8911 2018-03-13 Tom Tromey <tom@tromey.com>
8912
8913 * machoread.c (macho_check_dsym): Change filenamep to a
8914 std::string*.
8915 (macho_symfile_read): Update.
8916 * symfile.c (load_command): Use std::string.
8917
8918 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
8919
8920 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
8921 to error message string.
8922 (riscv_register_name): Use xsnprintf instead of sprintf.
8923 (riscv_insn::fetch_instruction): Use gdb_assert instead of
8924 internal_error.
8925 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
8926 error.
8927 (riscv_push_dummy_call): Likewise.
8928
8929 2018-03-12 Tom Tromey <tom@tromey.com>
8930
8931 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
8932 Use gdb::byte_vector.
8933 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
8934
8935 2018-03-12 Yao Qi <yao.qi@linaro.org>
8936
8937 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
8938 parameter type to readable_regcache.
8939 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
8940 the declaration.
8941
8942 2018-03-11 Tom Tromey <tom@tromey.com>
8943
8944 * dwarf2read.c (struct nextfield): Add initializers.
8945 (struct nextfnfield): Remove.
8946 (struct fnfieldlist): Add initializers. Remove "length" and
8947 "head", use std::vector.
8948 (struct decl_field_list): Remove.
8949 (struct field_info): Add initializers.
8950 <fields, baseclasses>: Now std::vector.
8951 <nbaseclasses, nfnfields, typedef_field_list_count,
8952 nested_types_list_count>: Remove.
8953 (dwarf2_add_field, dwarf2_add_type_defn)
8954 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
8955 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
8956 (process_structure_scope): Update.
8957
8958 2018-03-11 Tom Tromey <tom@tromey.com>
8959
8960 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
8961 for use by std::sort.
8962 (build_type_psymtabs_1): Use std::vector.
8963
8964 2018-03-09 Eli Zaretskii <eliz@gnu.org>
8965
8966 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
8967 and LIBMPFR in the printed configuration.
8968
8969 2018-03-08 Tom Tromey <tom@tromey.com>
8970
8971 * source.c (get_filename_and_charpos): Use scoped_fd.
8972 * nto-procfs.c (procfs_open_1): Use scoped_fd.
8973 (procfs_pidlist): Likewise.
8974 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
8975 (iterate_over_mappings): Likewise.
8976
8977 2018-03-08 Tom Tromey <tom@tromey.com>
8978
8979 * infcall.c (struct call_return_meta_info)
8980 <stack_temporaries_enabled>: Remove.
8981 (get_call_return_value, call_function_by_hand_dummy): Update.
8982 * thread.c (disable_thread_stack_temporaries): Remove.
8983 (enable_thread_stack_temporaries): Remove.
8984 (thread_stack_temporaries_enabled_p): Return bool.
8985 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
8986 (get_last_thread_stack_temporary): Update.
8987 * eval.c (evaluate_subexp): Update.
8988 * gdbthread.h (class enable_thread_stack_temporaries): Now a
8989 class, not a function.
8990 (value_ptr, value_vec): Remove typedefs.
8991 (class thread_info) <stack_temporaries_enabled>: Now bool.
8992 <stack_temporaries>: Now a std::vector.
8993 (thread_stack_temporaries_enabled_p)
8994 (value_in_thread_stack_temporaries): Return bool.
8995
8996 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
8997
8998 * remote.c (putpkt_binary): Fix omitted bytes reporting.
8999 (getpkt_or_notif_sane_1): Likewise.
9000
9001 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9002
9003 * build-id.c (build_id_to_debug_bfd): Use std::string.
9004
9005 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9006
9007 * build-id.c (find_separate_debug_file_by_buildid): Return
9008 std::string.
9009 * build-id.h (find_separate_debug_file_by_buildid): Return
9010 std::string.
9011 * coffread.c (coff_symfile_read): Adjust to std::string.
9012 * elfread.c (elf_symfile_read): Adjust to std::string.
9013 * symfile.c (separate_debug_file_exists): Change parameter to
9014 std::string.
9015 (find_separate_debug_file): Return std::string.
9016 (find_separate_debug_file_by_debuglink): Return std::string.
9017 * symfile.h (find_separate_debug_file_by_debuglink): Return
9018 std::string.
9019
9020 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9021
9022 * common/xml-utils.c (xml_escape_text): Move code to...
9023 (xml_escape_text_append): ... this new function.
9024 * common/xml-utils.h (xml_escape_text_append): New declaration.
9025 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
9026 New function.
9027 (_initialize_xml_utils): register test_xml_escape_text_append as
9028 a selftest.
9029
9030 2018-03-07 Alan Hayward <alan.hayward@arm.com>
9031
9032 * defs.h: Remove MAX_REGISTER_SIZE.
9033 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
9034 asserts.
9035 * python/py-unwind.c (pyuw_sniffer): Likewise.
9036
9037 2018-03-07 Tom Tromey <tom@tromey.com>
9038
9039 * linux-tdep.c (linux_info_proc): Update.
9040 * target.h (struct target_ops) <to_fileio_readlink>: Return
9041 optional<string>.
9042 (target_fileio_readlink): Return optional<string>.
9043 * remote.c (remote_hostio_readlink): Return optional<string>.
9044 * inf-child.c (inf_child_fileio_readlink): Return
9045 optional<string>.
9046 * target.c (target_fileio_readlink): Return optional<string>.
9047
9048 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
9049
9050 * regcache.c (cooked_read_test): Add riscv to the list of
9051 architectures that have a save_reggroup.
9052
9053 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
9054
9055 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
9056 value is not a dynamic class object.
9057
9058 2018-03-06 Tom Tromey <tom@tromey.com>
9059
9060 * rust-exp.y: Formatting fixes.
9061
9062 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9063
9064 * riscv-tdep.c (riscv_register_name): Remove target description
9065 support.
9066 (riscv_gdbarch_init): Remove target description check.
9067
9068 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9069
9070 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
9071 comment.
9072 * riscv-tdep.h: Likewise.
9073
9074 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9075
9076 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
9077 (riscv_pseudo_register_write): Delete.
9078 (riscv_gdbarch_init): Remove all use of pseudo registers.
9079
9080 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9081
9082 * record-btrace.c (btrace_print_lines): Replace cleanup
9083 parameter with RAII equivalents.
9084 (btrace_insn_history): Replace cleanup with RAII equivalents.
9085 * ui-out.h (make_cleanup_ui_out_list_begin_end,
9086 make_cleanup_ui_out_tuple_begin_end): Remove.
9087 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
9088 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
9089 make_cleanup_ui_out_list_begin_end): Remove.
9090
9091 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9092
9093 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
9094 parameter types to std::vector. Use bool.
9095 (record_btrace_wait): Replace VEC(tp_t) with
9096 std::vector<thread_info *>.
9097 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
9098
9099 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9100
9101 * record-btrace.c (record_btrace_disable_callback): Remove.
9102 (struct scoped_btrace_disable): New.
9103 (record_btrace_open): Use scoped_btrace_disable.
9104
9105 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9106
9107 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
9108 reading values from registers.
9109
9110 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9111
9112 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
9113 where appropriate.
9114
9115 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9116
9117 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
9118 change parameter type. Use GDB's print functions, and use
9119 core_addr_to_string where appropriate.
9120 (riscv_push_dummy_call): Use core_addr_to_string where
9121 appropriate, update call to riscv_print_arg_location, and reindent
9122 a few lines.
9123 (riscv_return_value): Update call to riscv_print_arg_location.
9124
9125 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9126 Tim Newsome <tim@sifive.com>
9127 Albert Ou <a0u@eecs.berkeley.edu>
9128 Darius Rad <darius@bluespec.com>
9129
9130 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
9131 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
9132 (ALLDEPFILES): Add riscv-tdep.c
9133 * configure.tgt: Add riscv support.
9134 * riscv-tdep.c: New file.
9135 * riscv-tdep.h: New file.
9136 * NEWS: Mention new target.
9137 * MAINTAINERS: Add entry for riscv.
9138
9139 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9140
9141 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
9142 fields within aggregates.
9143
9144 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
9145
9146 * record-btrace.c (btrace_print_lines): Change type of flags to
9147 gdb_disassembly_flags.
9148
9149 2018-03-04 John Baldwin <jhb@FreeBSD.org>
9150
9151 * fbsd-nat.c: Include "inf-ptrace.h".
9152 (USE_SIGTRAP_SIGINFO): Conditionally define.
9153 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
9154 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
9155 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
9156 function.
9157 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
9158 Likewise.
9159 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
9160 Likewise.
9161 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
9162 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
9163 "supports_stopped_by_hw_breakpoint" target methods.
9164
9165 2018-03-04 John Baldwin <jhb@FreeBSD.org>
9166
9167 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
9168 * fbsd-nat.c (debug_fbsd_nat): New variable.
9169 (show_fbsd_nat_debug): New function.
9170 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
9171 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
9172
9173 2018-03-04 John Baldwin <jhb@FreeBSD.org>
9174
9175 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
9176 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
9177 prototype.
9178 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
9179 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
9180 method.
9181
9182 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9183
9184 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
9185 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
9186
9187 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9188
9189 * charset.c (struct charset_vector): New.
9190 (charsets): Change type to charset_vector.
9191 (find_charset_names): Adjust.
9192 (add_one): Adjust.
9193 (_initialize_charset): Adjust.
9194
9195 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9196
9197 * progspace.h (struct program_space) <deleted_solibs>: Change
9198 type to std::vector<std::string>.
9199 * progspace.c (clear_program_space_solib_cache): Adjust.
9200 * breakpoint.c (print_solib_event): Adjust.
9201 (check_status_catch_solib): Adjust.
9202 * solib.c (update_solib_list): Adjust.
9203 * ui-out.h (class ui_out) <field_string>: New overload.
9204 * ui-out.c (ui_out::field_string): New overload.
9205
9206 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9207
9208 * progspace.h (struct program_space): Add constructor and
9209 destructor, initialize fields.
9210 (add_program_space): Remove.
9211 * progspace.c (add_program_space): Rename to...
9212 (program_space::program_space): ... this.
9213 (release_program_space): Rename to...
9214 (program_space::~program_space): ... this.
9215 (delete_program_space): Use delete to delete program_space.
9216 (initialize_progspace): Use new to allocate program_space.
9217 * inferior.c (add_inferior_with_spaces): Likewise.
9218 (clone_inferior_command): Likewise.
9219 * infrun.c (follow_fork_inferior): Likewise.
9220 (handle_vfork_child_exec_or_exit): Likewise.
9221
9222 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9223
9224 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
9225 (delim_string_to_char_ptr_vec): Return std::vector of
9226 gdb::unique_xmalloc_ptr.
9227 (dirnames_to_char_ptr_vec_append): Take std::vector of
9228 gdb::unique_xmalloc_ptr.
9229 (dirnames_to_char_ptr_vec): Return std::vector of
9230 gdb::unique_xmalloc_ptr.
9231 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
9232 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
9233 (delim_string_to_char_ptr_vec): Return an std::vector of
9234 gdb::unique_xmalloc_ptr, adjust the code.
9235 (dirnames_to_char_ptr_vec_append): Take an std::vector of
9236 gdb::unique_xmalloc_ptr, adjust the code.
9237 (dirnames_to_char_ptr_vec): Return an std::vector of
9238 gdb::unique_xmalloc_ptr, adjust the code.
9239 * auto-load.c (auto_load_safe_path_vec): Change type to
9240 std::vector of gdb::unique_xmalloc_ptr.
9241 (auto_load_expand_dir_vars): Return an std::vector of
9242 gdb::unique_xmalloc_ptr, adjust the code.
9243 (auto_load_safe_path_vec_update): Adjust.
9244 (filename_is_in_auto_load_safe_path_vec): Adjust.
9245 (auto_load_objfile_script_1): Adjust.
9246 * build-id.c (build_id_to_debug_bfd): Adjust.
9247 * linux-thread-db.c (thread_db_load_search): Adjust.
9248 * source.c (add_path): Adjust.
9249 (openp): Adjust.
9250 * symfile.c (find_separate_debug_file): Adjust.
9251 * utils.c (do_free_char_ptr_vec): Remove.
9252 (make_cleanup_free_char_ptr_vec): Remove.
9253
9254 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
9255
9256 PR gdb/22907
9257 * common/pathstuff.c: Conditionally include "<windows.h>".
9258
9259 2018-03-01 Georg Sauthoff <mail@georg.so>
9260
9261 PR gdb/22888
9262 * gcore.in: Quote variables and switch interpreter to bash.
9263
9264 2018-03-01 Tom Tromey <tom@tromey.com>
9265
9266 * dwarf2read.c (alloc_discriminant_info): Fix default_index
9267 assertion. Add assertion for discriminant_index.
9268 (quirk_rust_enum): Use correct base type name in univariant case.
9269
9270 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
9271
9272 * record.c (get_call_history_modifiers): Return a
9273 record_print_flags.
9274 (cmd_record_call_history): Adjust.
9275 * record-btrace.c (record_btrace_call_history): Adjust.
9276 (record_btrace_call_history_range): Adjust.
9277 (record_btrace_call_history_from): Adjust.
9278 * target-debug.h (target_debug_print_record_print_flags): New.
9279 * target-delegates.c: Re-generate.
9280 * target.c (target_call_history): Change flags type.
9281 (target_call_history_from): Likewise.
9282 (target_call_history_range): Likewise.
9283 * target.h (struct target_ops) <target_call_history>: Likewise.
9284 (target_call_history_from): Likewise.
9285 (target_call_history_range): Likewise.
9286
9287 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
9288 Simon Marchi <simon.marchi@polymtl.ca>
9289
9290 * common/common-utils.c: Include "sys/stat.h".
9291 (is_regular_file): Move here from "source.c"; change return
9292 type to "bool".
9293 * common/common-utils.h (is_regular_file): New prototype.
9294 * common/pathstuff.c (contains_dir_separator): New function.
9295 * common/pathstuff.h (contains_dir_separator): New prototype.
9296 * source.c: Don't include "sys/stat.h".
9297 (is_regular_file): Move to "common/common-utils.c".
9298
9299 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
9300
9301 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
9302 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
9303 * auto-load.c: Include "common/pathstuff.h".
9304 * common/common-def.h (current_directory): Move here.
9305 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
9306 function.
9307 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
9308 prototype.
9309 * common/pathstuff.c: New file.
9310 * common/pathstuff.h: New file.
9311 * compile/compile.c: Include "common/pathstuff.h".
9312 * defs.h (current_directory): Move to "common/common-defs.h".
9313 * dwarf2read.c: Include "common/pathstuff.h".
9314 * exec.c: Likewise.
9315 * guile/scm-safe-call.c: Likewise.
9316 * linux-thread-db.c: Likewise.
9317 * main.c: Likewise.
9318 * nto-tdep.c: Likewise.
9319 * objfiles.c: Likewise.
9320 * source.c: Likewise.
9321 * symtab.c: Likewise.
9322 * utils.c: Include "common/pathstuff.h".
9323 (gdb_realpath): Move to "common/pathstuff.c".
9324 (gdb_realpath_keepfile): Likewise.
9325 (gdb_abspath): Likewise.
9326 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
9327 (gdb_realpath_keepfile): Likewise.
9328 (gdb_abspath): Likewise.
9329
9330 2018-02-28 John Baldwin <jhb@FreeBSD.org>
9331
9332 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
9333 wildcard process pid for super_resume for kernels with a
9334 specific bug.
9335
9336 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
9337
9338 * compile/compile.c (get_args): Add additional comments
9339 explaining function.
9340
9341 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
9342 Tom Tromey <tom@tromey.com>
9343
9344 * target.h (memory_write_request_s): Remove typedef. Don't define
9345 VEC.
9346 (target_write_memory_blocks): Change argument to std::vector.
9347 (struct memory_write_request): Add constructor.
9348 * target-memory.c (compare_block_starting_address): Return bool.
9349 Change argument types.
9350 (claim_memory): Change arguments to use std::vector.
9351 (split_regular_and_flash_blocks, blocks_to_erase)
9352 (compute_garbled_blocks): Likewise.
9353 (cleanup_request_data, cleanup_write_requests_vector): Remove.
9354 (target_write_memory_blocks): Change argument to std::vector.
9355 * symfile.c (struct load_section_data): Add constructor and
9356 destructor. Use std::vector for "requests".
9357 (struct load_progress_data): Add initializers.
9358 (load_section_callback): Update. Use "new".
9359 (clear_memory_write_data): Remove.
9360 (generic_load): Update.
9361
9362 2018-02-27 Alan Hayward <alan.hayward@arm.com>
9363
9364 * arch/aarch64.h: Use common/tdesc.h.
9365
9366 2018-02-26 Maciej W. Rozycki <macro@mips.com>
9367
9368 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
9369 architecture with a 64-bit ABI.
9370
9371 2018-02-26 Maciej W. Rozycki <macro@mips.com>
9372
9373 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
9374 ahead of target description loading.
9375
9376 2018-02-26 Tom Tromey <tom@tromey.com>
9377
9378 * stack.c (backtrace_command_1): Update.
9379 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
9380 of "flags".
9381 * python/py-framefilter.c (py_print_frame)
9382 (gdbpy_apply_frame_filter): Change type of "flags".
9383 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
9384 of "flags".
9385 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
9386 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
9387 * extension.h (enum frame_filter_flag): Rename from
9388 frame_filter_flags.
9389 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
9390 (apply_ext_lang_frame_filter): Change type of "flags".
9391 * extension.c (apply_ext_lang_frame_filter): Change type of
9392 "flags".
9393 * extension-priv.h (struct extension_language_ops)
9394 <apply_frame_filter>: Change type of "flags".
9395
9396 2018-02-26 Tom Tromey <tom@tromey.com>
9397
9398 PR python/16497:
9399 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
9400 off-by-one in py_end computation.
9401 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
9402 PRINT_MORE_FRAMES.
9403 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
9404 constant.
9405
9406 2018-02-26 Tom Tromey <tom@tromey.com>
9407
9408 * dwarf2read.c (struct variant_field): New.
9409 (struct nextfield) <variant>: New field.
9410 (dwarf2_add_field): Handle DW_TAG_variant_part.
9411 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
9412 discriminated union.
9413 (read_structure_type): Handle DW_TAG_variant_part.
9414 (handle_struct_member_die): New function, extracted from
9415 process_structure_scope. Handle DW_TAG_variant.
9416 (process_structure_scope): Handle discriminated unions. Call
9417 handle_struct_member_die.
9418
9419 2018-02-26 Tom Tromey <tom@tromey.com>
9420
9421 * rust-lang.h (rust_last_path_segment): Declare.
9422 * rust-lang.c (rust_last_path_segment): Now public. Change
9423 contract.
9424 (struct disr_info): Remove.
9425 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
9426 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
9427 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
9428 (rust_enum_p, rust_enum_variant): New function.
9429 (rust_underscore_fields): Remove "offset" parameter.
9430 (rust_print_enum): New function.
9431 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
9432 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
9433 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
9434 enums.
9435 (rust_internal_print_type): New function, from rust_print_type.
9436 Remove enum code.
9437 (rust_print_type): Call rust_internal_print_type.
9438 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
9439 Update enum handling.
9440 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
9441 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
9442 (rust_union_quirks): New functions.
9443 (process_full_comp_unit, process_full_type_unit): Call
9444 rust_union_quirks.
9445 (process_structure_scope): Update rust_unions if necessary.
9446
9447 2018-02-26 Tom Tromey <tom@tromey.com>
9448
9449 * value.h (value_union_variant): Declare.
9450 * valops.c (value_union_variant): New function.
9451 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
9452 (struct discriminant_info): New.
9453 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
9454 enumerator.
9455 (struct main_type) <flag_discriminated_union>: New field.
9456
9457 2018-02-26 Tom Tromey <tom@tromey.com>
9458
9459 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9460 unittests/unpack-selftests.c.
9461 * unittests/unpack-selftests.c: New file.
9462 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
9463
9464 2018-02-26 Yao Qi <yao.qi@linaro.org>
9465
9466 * dwarf2read.c (struct partial_die_info) <read>: New method.
9467 (read_partial_die): Remove the declaration.
9468 (load_partial_dies): Update.
9469 (partial_die_info::partial_die_info):
9470 (read_partial_die): Change it to partial_die_info::read.
9471
9472 2018-02-26 Yao Qi <yao.qi@linaro.org>
9473
9474 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
9475 (fixup_partial_die): Remove declaration.
9476 (scan_partial_symbols): Update.
9477 (partial_die_parent_scope): Likewise.
9478 (partial_die_full_name): Likewise.
9479 (fixup_partial_die): Change it to partial_die_info::fixup.
9480
9481 2018-02-26 Yao Qi <yao.qi@linaro.org>
9482
9483 * dwarf2read.c (read_partial_die): Update the declaration.
9484 (load_partial_dies): Caller update.
9485 (read_partial_die): Remove one argument abbrev_len.
9486
9487 2018-02-26 Yao Qi <yao.qi@linaro.org>
9488
9489 * dwarf2read.c (struct partial_die_info): Add ctor, delete
9490 assignment operator.
9491 (load_partial_dies): Use ctor and copy ctor.
9492 (read_partial_die): Update.
9493 (dwarf2_cu::find_partial_die): Use ctor.
9494
9495 2018-02-26 Yao Qi <yao.qi@linaro.org>
9496
9497 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
9498 (find_partial_die_in_comp_unit): Change it to
9499 dwarf2_cu::find_partial_die.
9500 (find_partial_die): Update.
9501
9502 2018-02-26 Yao Qi <yao.qi@linaro.org>
9503
9504 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
9505 is NULL.
9506
9507 2018-02-26 Yao Qi <yao.qi@linaro.org>
9508
9509 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
9510
9511 2018-02-26 Alan Hayward <alan.hayward@arm.com>
9512
9513 * arch/amd64.h: Use common/tdesc.h.
9514 * arch/i386.c: Likewise.
9515 * arch/i386.h: Likewise.
9516 * arch/tic6x.c: Likewise.
9517 * arch/tdesc.h: Move file from here...
9518 * common/tdesc.h: ...to here.
9519 * features/aarch64-core.c: Regenerate.
9520 * features/aarch64-fpu.c: Regenerate.
9521 * features/i386/32bit-avx.c: Regenerate.
9522 * features/i386/32bit-avx512.c: Regenerate.
9523 * features/i386/32bit-core.c: Regenerate.
9524 * features/i386/32bit-linux.c: Regenerate.
9525 * features/i386/32bit-mpx.c: Regenerate.
9526 * features/i386/32bit-pkeys.c: Regenerate.
9527 * features/i386/32bit-sse.c: Regenerate.
9528 * features/i386/64bit-avx.c: Regenerate.
9529 * features/i386/64bit-avx512.c: Regenerate.
9530 * features/i386/64bit-core.c: Regenerate.
9531 * features/i386/64bit-linux.c: Regenerate.
9532 * features/i386/64bit-mpx.c: Regenerate.
9533 * features/i386/64bit-pkeys.c: Regenerate.
9534 * features/i386/64bit-segments.c: Regenerate.
9535 * features/i386/64bit-sse.c: Regenerate.
9536 * features/i386/x32-core.c: Regenerate.
9537 * features/tic6x-c6xp.c: Regenerate.
9538 * features/tic6x-core.c: Regenerate.
9539 * features/tic6x-gp.c: Regenerate.
9540 * target-descriptions.c: Use common/tdesc.h.
9541 * target-descriptions.h: Likewise.
9542
9543 2018-02-24 Tom Tromey <tom@tromey.com>
9544
9545 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
9546 (try_thread_db_load_from_dir, thread_db_load_search): Use
9547 std::string.
9548 (info_auto_load_libthread_db_compare): Return bool. Change
9549 argument types.
9550 (info_auto_load_libthread_db): Use std::vector, std::string.
9551 Remove cleanups.
9552
9553 2018-02-24 Tom Tromey <tom@tromey.com>
9554
9555 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
9556 std::string.
9557 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
9558 std::string*.
9559 * gdbarch.c: Rebuild.
9560 * gdbarch.h: Rebuild.
9561 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
9562 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
9563 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
9564 std::string*.
9565
9566 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
9567
9568 * gdbtypes.h (sect_offset): Change type to uint64_t.
9569 (sect_offset_str): New function.
9570 * dwarf2read.c (create_addrmap_from_aranges): Use
9571 sect_offset_str.
9572 (error_check_comp_unit_head): Likewise.
9573 (create_debug_type_hash_table): Likewise.
9574 (read_cutu_die_from_dwo): Likewise.
9575 (init_cutu_and_read_dies): Likewise.
9576 (init_cutu_and_read_dies_no_follow): Likewise.
9577 (process_psymtab_comp_unit_reader): Likewise.
9578 (partial_die_parent_scope): Likewise.
9579 (peek_die_abbrev): Likewise.
9580 (process_queue): Likewise.
9581 (dwarf2_physname): Likewise.
9582 (read_namespace_alias): Likewise.
9583 (read_import_statement): Likewise.
9584 (create_dwo_cu_reader): Likewise.
9585 (create_cus_hash_table): Likewise.
9586 (lookup_dwo_cutu): Likewise.
9587 (inherit_abstract_dies): Likewise.
9588 (read_func_scope): Likewise.
9589 (read_call_site_scope): Likewise.
9590 (dwarf2_add_member_fn): Likewise.
9591 (read_common_block): Likewise.
9592 (read_module_type): Likewise.
9593 (read_typedef): Likewise.
9594 (read_subrange_type): Likewise.
9595 (load_partial_dies): Likewise.
9596 (read_partial_die): Likewise.
9597 (find_partial_die): Likewise.
9598 (read_str_index): Likewise.
9599 (dwarf2_string_attr): Likewise.
9600 (build_error_marker_type): Likewise.
9601 (lookup_die_type): Likewise.
9602 (dump_die_shallow): Likewise.
9603 (follow_die_ref): Likewise.
9604 (dwarf2_fetch_die_loc_sect_off): Likewise.
9605 (dwarf2_fetch_constant_bytes): Likewise.
9606 (follow_die_sig): Likewise.
9607 (get_signatured_type): Likewise.
9608 (get_DW_AT_signature_type): Likewise.
9609 (dwarf2_find_containing_comp_unit): Likewise.
9610 (set_die_type): Likewise.
9611
9612 2018-02-21 John Baldwin <jhb@FreeBSD.org>
9613
9614 * arch/aarch64.c: Include "common-defs.h".
9615 * arch/amd64.c: Likewise.
9616 * arch/i386.c: Likewise.
9617
9618 2018-02-21 Tom Tromey <tom@tromey.com>
9619
9620 * value.h: (extract_field_op): Update.
9621 * eval.c (extract_field_op): Return a const char *.
9622 * expression.h (parse_expression_for_completion): Update.
9623 * completer.c (complete_expression): Update.
9624 (add_struct_fields): Make fieldname const.
9625 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
9626 (mark_completion_tag, parse_exp_in_context_1): Update.
9627 (parse_expression_for_completion): Change "name" to
9628 unique_xmalloc_ptr*.
9629
9630 2018-02-21 Tom Tromey <tom@tromey.com>
9631
9632 * infcall.c (call_function_by_hand_dummy): Use std::vector.
9633
9634 2018-02-21 Yao Qi <yao.qi@linaro.org>
9635
9636 * avr-tdep.c (avr_read_pc): Change parameter type to
9637 readable_regcache.
9638 * gdbarch.sh (read_pc): Likewise.
9639 * gdbarch.c: Re-generated.
9640 * gdbarch.h: Re-generated.
9641 * hppa-tdep.c (hppa_read_pc): Change parameter type to
9642 readable_regcache.
9643 * ia64-tdep.c (ia64_read_pc): Likewise.
9644 * mips-tdep.c (mips_read_pc): Likewise.
9645 * spu-tdep.c (spu_read_pc): Likewise.
9646
9647 2018-02-21 Yao Qi <yao.qi@linaro.org>
9648
9649 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
9650 * regcache-dump.c: New file.
9651 * regcache.c: Move register_dump to regcache-dump.c.
9652 (maintenance_print_registers): Likewise.
9653 (maintenance_print_raw_registers): Likewise.
9654 (maintenance_print_cooked_registers): Likewise.
9655 (maintenance_print_register_groups): Likewise.
9656 (maintenance_print_remote_registers): Likewise.
9657 (_initialize_regcache): Likewise.
9658 * regcache.h (register_dump): Moved from regcache.c.
9659
9660 2018-02-21 Yao Qi <yao.qi@linaro.org>
9661
9662 * regcache.c (regcache::regcache): Update.
9663 (regcache::invalidate): Move it to detached_regcache::invalidate.
9664 (get_thread_arch_aspace_regcache): Update.
9665 (regcache::raw_update): Update.
9666 (regcache::cooked_read): Remove some code.
9667 (regcache::cooked_read_value): Likewise.
9668 (regcache::raw_write): Remove assert on m_readonly_p.
9669 (regcache::raw_supply_integer): Move it to
9670 detached_regcache::raw_supply_integer.
9671 (regcache::raw_supply_zeroed): Likewise.
9672 * regcache.h (detached_regcache) <raw_supply_integer>: New
9673 declaration.
9674 <raw_supply_zeroed, invalidate>: Likewise.
9675 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
9676 <invalidate>: Likewise.
9677 <m_readonly_p>: Removed.
9678
9679 2018-02-21 Yao Qi <yao.qi@linaro.org>
9680
9681 * infcmd.c (get_return_value): Let stop_regs point to
9682 get_current_regcache.
9683 * regcache.c (regcache::regcache): Remove.
9684 (register_dump_reg_buffer): New class.
9685 (regcache_print): Adjust.
9686 * regcache.h (regcache): Remove constructors.
9687
9688 2018-02-21 Yao Qi <yao.qi@linaro.org>
9689
9690 * regcache.c (class register_dump): New class.
9691 (register_dump_regcache, register_dump_none): New class.
9692 (register_dump_remote, register_dump_groups): New class.
9693 (regcache_print): Update.
9694 * regcache.h (regcache_dump_what): Move it to regcache.c.
9695 (regcache) <dump>: Remove.
9696
9697 2018-02-21 Yao Qi <yao.qi@linaro.org>
9698
9699 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
9700 reg_buffer_rw *.
9701 (jit_unwind_reg_set_impl): Call raw_supply.
9702 (jit_frame_sniffer): Use reg_buffer_rw.
9703 * record-full.c (record_full_core_regbuf): Change its type.
9704 (record_full_core_open_1): Use reg_buffer_rw.
9705 (record_full_close): Likewise.
9706 (record_full_core_fetch_registers): Use regcache->raw_supply.
9707 (record_full_core_store_registers): Likewise.
9708 * regcache.c (regcache::get_register_status): Move it to
9709 reg_buffer.
9710 (regcache_raw_set_cached_value): Remove.
9711 (regcache::raw_set_cached_value): Remove.
9712 (regcache::raw_write): Call raw_supply.
9713 (regcache::raw_supply): Move it to reg_buffer_rw.
9714 * regcache.h (regcache_raw_set_cached_value): Remove.
9715 (reg_buffer_rw): New class.
9716
9717 2018-02-21 Yao Qi <yao.qi@linaro.org>
9718
9719 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
9720 readonly_detached_regcache.
9721 (dummy_frame_prev_register): Use regcache->cooked_read.
9722 * frame.c (frame_save_as_regcache): Change return type.
9723 (frame_pop): Update.
9724 * frame.h (frame_save_as_regcache): Update declaration.
9725 * inferior.h (get_infcall_suspend_state_regcache): Update
9726 declaration.
9727 * infrun.c (infcall_suspend_state) <registers>: use
9728 readonly_detached_regcache.
9729 (save_infcall_suspend_state): Don't use regcache_dup.
9730 (get_infcall_suspend_state_regcache): Change return type.
9731 * linux-fork.c (struct fork_info) <savedregs>: Change to
9732 readonly_detached_regcache.
9733 <pc>: New field.
9734 (fork_save_infrun_state): Don't use regcache_dup.
9735 (info_checkpoints_command): Adjust.
9736 * mi/mi-main.c (register_changed_p): Update declaration.
9737 (mi_cmd_data_list_changed_registers): Use
9738 readonly_detached_regcache.
9739 (register_changed_p): Change parameter type to
9740 readonly_detached_regcache.
9741 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
9742 readonly_detached_regcache.
9743 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
9744 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
9745 New.
9746 (regcache::save): Move it to reg_buffer.
9747 (regcache::restore): Change parameter type.
9748 (regcache_dup): Remove.
9749 * regcache.h (reg_buffer) <save>: New method.
9750 (readonly_detached_regcache): New class.
9751 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
9752 readonly_detached_regcache.
9753 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
9754
9755 2018-02-21 Yao Qi <yao.qi@linaro.org>
9756
9757 * frame.c (frame_save_as_regcache): Use regcache method save.
9758 (frame_pop): Use regcache method restore.
9759 * infrun.c (restore_infcall_suspend_state): Likewise.
9760 * linux-fork.c (fork_load_infrun_state): Likewise.
9761 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
9762 save.
9763 * regcache.c (regcache_save): Remove.
9764 (regcache::restore): More asserts.
9765 (regcache_cpy): Remove.
9766 * regcache.h (regcache_save): Remove the declaration.
9767 (regcache::restore): Move from private to public.
9768 Remove the friend declaration of regcache_cpy.
9769 (regcache_cpy): Remove declaration.
9770
9771 2018-02-21 Yao Qi <yao.qi@linaro.org>
9772
9773 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
9774 parameter type to 'readable_regcache *'.
9775 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9776 * arm-tdep.c (arm_neon_quad_read): Likewise.
9777 (arm_pseudo_read): Likewise.
9778 * avr-tdep.c (avr_pseudo_register_read): Likewise.
9779 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9780 * frv-tdep.c (frv_pseudo_register_read): Likewise.
9781 * gdbarch.c: Re-generated.
9782 * gdbarch.h: Re-generated.
9783 * gdbarch.sh (pseudo_register_read): Change parameter type to
9784 'readable_regcache *'.
9785 (pseudo_register_read_value): Likewise.
9786 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
9787 (h8300_pseudo_register_read): Likewise.
9788 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
9789 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9790 (i386_pseudo_register_read_into_value): Likewise.
9791 (i386_pseudo_register_read_value): Likewise.
9792 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
9793 declaration.
9794 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
9795 * m32c-tdep.c (m32c_raw_read): Likewise.
9796 (m32c_read_flg): Likewise.
9797 (m32c_banked_register): Likewise.
9798 (m32c_banked_read): Likewise.
9799 (m32c_sb_read): Likewise.
9800 (m32c_part_read): Likewise.
9801 (m32c_cat_read): Likewise.
9802 (m32c_r3r2r1r0_read): Likewise.
9803 (m32c_pseudo_register_read): Likewise.
9804 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9805 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9806 (mep_pseudo_cr64_read): Likewise.
9807 (mep_pseudo_register_read): Likewise.
9808 * mips-tdep.c (mips_pseudo_register_read): Likewise.
9809 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9810 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9811 * regcache.c (regcache::raw_read): Move it to readable_regcache.
9812 (regcache::cooked_read): Likewise.
9813 (regcache::cooked_read_value): Likewise.
9814 (regcache_cooked_read_signed):
9815 (regcache::cooked_read): Likewise.
9816 * regcache.h (readable_regcache): New class.
9817 (regcache): Inherit readable_regcache. Move some methods to
9818 readable_regcache.
9819 * rl78-tdep.c (rl78_pseudo_register_read): Change
9820 parameter type to 'readable_regcache *'.
9821 * rs6000-tdep.c (do_regcache_raw_read): Remove.
9822 (e500_pseudo_register_read): Change parameter type to
9823 'readable_regcache *'.
9824 (dfp_pseudo_register_read): Likewise.
9825 (vsx_pseudo_register_read): Likewise.
9826 (efpr_pseudo_register_read): Likewise.
9827 * s390-tdep.c (s390_pseudo_register_read): Likewise.
9828 * sh-tdep.c (sh_pseudo_register_read): Likewise.
9829 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
9830 (sh64_pseudo_register_read): Likewise.
9831 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9832 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9833 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9834 (spu_pseudo_register_read): Likewise.
9835 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9836 (xtensa_pseudo_register_read): Likewise.
9837
9838 2018-02-21 Yao Qi <yao.qi@linaro.org>
9839
9840 * regcache.c (regcache::regcache): Call reg_buffer ctor.
9841 (regcache::arch): Move it to reg_buffer::arch.
9842 (regcache::register_buffer): Likewise.
9843 (regcache::assert_regnum): Likewise.
9844 (regcache::num_raw_registers): Likewise.
9845 * regcache.h (reg_buffer): New class.
9846 (regcache): Inherit reg_buffer.
9847
9848 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
9849
9850 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
9851 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
9852
9853 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
9854
9855 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
9856
9857 2018-02-19 Alan Hayward <alan.hayward@arm.com>
9858
9859 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
9860 (SFILES): Remove common/*.c files.
9861 (COMMON_OBS): Remove some *.o files built from common/*.c files.
9862 * common/common.host: Add common reference.
9863 * configure.ac: Likewise.
9864 * configure: Regenerate.
9865
9866 2018-02-16 Yao Qi <yao.qi@linaro.org>
9867
9868 * block.c (block_namespace_info): Inherit allocate_on_obstack.
9869 (block_initialize_namespace): Use new.
9870 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
9871 (dwarf2_free_objfile): Use delete.
9872 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
9873 (copy_type_recursive): Use new.
9874 * gdb_obstack.h (allocate_on_obstack): New.
9875
9876 2018-02-15 Yao Qi <yao.qi@linaro.org>
9877
9878 PR gdb/22849
9879 * inferior.c (exit_inferior_1): Reset inf->control.
9880
9881 2018-02-15 Joel Brobecker <brobecker@adacore.com>
9882
9883 * ada-lang.c (ada_to_fixed_value_create): Delete advance
9884 declaration.
9885
9886 2018-02-14 Pedro Alves <palves@redhat.com>
9887
9888 * frame-unwind.c (frame_unwind_try_unwinder): Always call
9889 frame_cleanup_after_sniffer on exception.
9890
9891 2018-02-14 Tom Tromey <tom@tromey.com>
9892
9893 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
9894 const.
9895 (solib_bfd_open): Make pathname const.
9896 * solib.c (solib_bfd_open): Make pathname const.
9897 * solib-spu.c (spu_bfd_fopen): Make name const.
9898 (spu_bfd_open): Make pathname const.
9899 * solib-darwin.c (darwin_bfd_open): Make pathname const.
9900 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
9901
9902 2018-02-14 Tom Tromey <tom@tromey.com>
9903
9904 * symfile.c (symfile_bfd_open): Update.
9905 * source.h (openp, source_full_path_of, find_and_open_source):
9906 Change argument type to unique_xmalloc_ptr.
9907 * source.c (openp): Take a unique_xmalloc_ptr.
9908 (source_full_path_of, find_and_open_source): Likewise.
9909 (open_source_file, symtab_to_fullname): Update.
9910 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
9911 unique_xmalloc_ptr.
9912 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
9913 (exec_file_find): Update.
9914 * psymtab.c (psymtab_to_fullname): Update.
9915 * nto-tdep.h (nto_find_and_open_solib): Update.
9916 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
9917 unique_xmalloc_ptr.
9918 * exec.c (exec_file_attach): Update.
9919 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
9920 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
9921
9922 2018-02-14 Tom Tromey <tom@tromey.com>
9923
9924 * solib.c: Include source.h.
9925 * nto-tdep.c: Include source.h.
9926 * mi/mi-cmd-env.c: Include source.h.
9927 * infcmd.c: Include source.h.
9928 * exec.c: Include source.h.
9929 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
9930 (add_path, directory_switch, source_path, init_source_path): Move
9931 declarations...
9932 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
9933 (add_path, directory_switch, source_path, init_source_path):
9934 ...here.
9935
9936 2018-02-14 Tom Tromey <tom@tromey.com>
9937
9938 * solist.h (exec_file_find, solib_find): Return
9939 unique_xmalloc_ptr.
9940 (solib_bfd_fopen): Take a const char *.
9941 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
9942 (exec_file_find, solib_find): Likewise.
9943 (solib_bfd_fopen): Do not take ownership of "pathname".
9944 (solib_bfd_open): Use unique_xmalloc_ptr.
9945 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
9946 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
9947 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
9948 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
9949
9950 2018-02-14 Joel Brobecker <brobecker@adacore.com>
9951
9952 * ada-lang.c (name_match_type_from_name): Remove reference to
9953 ada_name_for_lookup in function's documentation.
9954 * ada-lang.h (ada_name_for_lookup): Delete declaration.
9955
9956 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
9957
9958 * defs.h (enum openp_flags): New enum.
9959 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
9960 Move to enum openp_flags.
9961 (openp_flags): New enum flags.
9962 (openp): Change parameter type to openp_flags.
9963 * source.c (openp): Change parameter type to openp_flags.
9964 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
9965 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
9966
9967 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
9968
9969 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
9970 per-command.
9971
9972 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
9973
9974 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
9975 into...
9976 (class dwarf2_queue_guard): ...the destructor of this new class.
9977 (dw2_do_instantiate_symtab): Create instance of the new class
9978 dwarf2_queue_guard, remove cleanup.
9979
9980 2018-02-09 Tom Tromey <tom@tromey.com>
9981
9982 * source.c (find_source_lines): Don't reference past the end of
9983 the vector.
9984
9985 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9986
9987 * remote.c (remote_btrace_maybe_reopen): Change error message.
9988 * btrace.c (btrace_enable): Likewise.
9989 (parse_xml_btrace): Likewise.
9990 (parse_xml_btrace_conf): Likewise.
9991
9992 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9993
9994 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
9995 (linux_enable_pt, linux_enable_bts): Call
9996 diagnose_perf_event_open_fail.
9997
9998 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9999
10000 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
10001 Remove parameter and change return type. Update callers. Move it.
10002 (linux_enable_bts, linux_enable_pt): Improve error message.
10003 (linux_enable_pt): Remove zero buffer size check.
10004 (linux_enable_btrace): Improve error messages. Remove NULL return
10005 check.
10006
10007 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10008
10009 * btrace.c (btrace_enable): Remove target_supports_btrace call.
10010 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
10011 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
10012 (linux_supports_pt, linux_supports_btrace): Remove.
10013 (linux_enable_bts): Call cpu_supports_bts.
10014 * nat/linux-btrace.h (linux_supports_btrace): Remove.
10015 * remote.c (remote_supports_btrace): Remove.
10016 (init_remote_ops): Remove remote_supports_btrace.
10017 * target-delegates.c: Regenerated.
10018 * target.c (target_supports_btrace): Remove.
10019 * target.h (target_ops) <to_supports_btrace>: Remove
10020 (target_supports_btrace): Remove.
10021 * x86-linux-nat.c (x86_linux_create_target): Remove
10022 linux_supports_btrace.
10023
10024 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10025
10026 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
10027 btrace failed.
10028 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
10029 exception and use message in own exception.
10030
10031 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10032
10033 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
10034 (perf_event_pt_event_type): Use gdb_file_up.
10035 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
10036 scoped_fd, and scoped_mmap.
10037
10038 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10039
10040 * common/scoped_mmap.h: New.
10041 * unittests/scoped_mmap-selftest.c: New.
10042 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10043 unittests/scoped_mmap-selftest.c.
10044
10045 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10046
10047 * common/scoped_fd.h: New.
10048 * unittests/scoped_fd-selftest.c: New.
10049 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10050 unittests/scoped_fd-selftest.c.
10051
10052 2018-02-09 Tom Tromey <tom@tromey.com>
10053
10054 * auto-load.c (auto_load_section_scripts): Use
10055 gdb::unique_xmalloc_ptr.
10056
10057 2018-02-09 Tom Tromey <tom@tromey.com>
10058
10059 * auto-load.c (execute_script_contents): Use std::string.
10060
10061 2018-02-09 Joel Brobecker <brobecker@adacore.com>
10062
10063 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
10064 Python function, rather than a new command.
10065
10066 2018-02-08 Tom Tromey <tom@tromey.com>
10067
10068 * solib.c (solib_find_1): Use std::string.
10069 (solib_bfd_fopen): Use unique_xmalloc_ptr.
10070
10071 2018-02-08 Tom Tromey <tom@tromey.com>
10072
10073 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
10074
10075 2018-02-08 Tom Tromey <tom@tromey.com>
10076
10077 * source.c (find_source_lines): Use gdb::def_vector.
10078
10079 2018-02-08 Tom Tromey <tom@tromey.com>
10080
10081 * macrocmd.c (struct temporary_macro_definition): New.
10082 (macro_define_command): Use temporary_macro_definition. Remove
10083 cleanups.
10084 (free_macro_definition_ptr): Remove.
10085
10086 2018-02-08 Tom Tromey <tom@tromey.com>
10087
10088 * macroexp.c (maybe_expand): Use std::string.
10089
10090 2018-02-08 Tom Tromey <tom@tromey.com>
10091
10092 * macroexp.c (struct macro_buffer): Add initializers for some
10093 members.
10094 (init_buffer, init_shared_buffer, free_buffer)
10095 (free_buffer_return_text): Remove.
10096 (macro_buffer): New constructors.
10097 (~macro_buffer): New destructor.
10098 (macro_buffer::set_shared): New method.
10099 (macro_buffer::resize_buffer, macro_buffer::appendc)
10100 (macro_buffer::appendmem): Now methods, not free functions.
10101 (set_token, append_tokens_without_splicing, stringify)
10102 (macro_stringify): Update.
10103 (gather_arguments): Change return type. Remove argc_p argument,
10104 add args_ptr argument. Use std::vector.
10105 (substitute_args): Remove argc argument. Accept std::vector.
10106 (expand): Update. Use std::vector.
10107 (scan, macro_expand, macro_expand_next): Update.
10108
10109 2018-02-08 Tom Tromey <tom@tromey.com>
10110
10111 * symtab.c (default_collect_symbol_completion_matches_break_on):
10112 Use unique_xmalloc_ptr.
10113 * macroscope.h: (sal_macro_scope, user_macro_scope)
10114 (default_macro_scope): Return unique_xmalloc_ptr.
10115 * macroscope.c (sal_macro_scope, user_macro_scope)
10116 (default_macro_scope): Return unique_xmalloc_ptr.
10117 * macroexp.h (macro_expand, macro_expand_once): Return
10118 unique_xmalloc_ptr.
10119 * macroexp.c (macro_expand, macro_expand_once): Return
10120 unique_xmalloc_ptr.
10121 * macrocmd.c (macro_expand_command, macro_expand_once_command)
10122 (info_macro_command, info_macros_command): Use
10123 unique_xmalloc_ptr.
10124 * compile/compile-c-support.c (write_macro_definitions): Use
10125 unique_xmalloc_ptr.
10126 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
10127
10128 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
10129
10130 * value.c (value_static_field): Assign field type instead of
10131 containing type when returning an optimized out value.
10132
10133 2018-02-06 Yao Qi <yao.qi@linaro.org>
10134
10135 * ft32-tdep.c (ft32_read_pc): Remove.
10136 (ft32_write_pc): Remove.
10137 (ft32_gdbarch_init): Update.
10138 * m32r-tdep.c (m32r_read_pc): Remove.
10139 (m32r_gdbarch_init): Update.
10140 * mep-tdep.c (mep_read_pc): Remove.
10141 (mep_gdbarch_init): Update.
10142 * microblaze-tdep.c (microblaze_write_pc): Remove.
10143 (microblaze_gdbarch_init): Update.
10144 * mn10300-tdep.c (mn10300_read_pc): Remove.
10145 (mn10300_write_pc): Remove.
10146 (mn10300_gdbarch_init): Update.
10147 * moxie-tdep.c (moxie_read_pc): Remove.
10148 (moxie_write_pc): Remove.
10149 (moxie_gdbarch_init): Update.
10150
10151 2018-02-06 Yao Qi <yao.qi@linaro.org>
10152
10153 * expprint.c (print_subexp_standard): Handle
10154 OP_F77_UNDETERMINED_ARGLIST.
10155 (dump_subexp_body_standard): Likewise.
10156
10157 2018-02-05 Alan Hayward <alan.hayward@arm.com>
10158
10159 * target-descriptions.c (tdesc_element_visitor) Add empty
10160 implementations.
10161 (tdesc_type): Move make_gdb_type from here.
10162 (tdesc_type_builtin): Likewise.
10163 (tdesc_type_vector): Likewise.
10164 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
10165 (make_gdb_type_struct): Move from tdesc_type_with_fields.
10166 (make_gdb_type_union): Likewise.
10167 (make_gdb_type_flags): Likewise.
10168 (make_gdb_type_enum): Likewise.
10169 (make_gdb_type): New function.
10170 (tdesc_register_type): Use static make_gdb_type.
10171
10172 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
10173
10174 * infcmd.c (default_print_one_register_info): Align natural-format
10175 column values consistently one under another.
10176 (pad_to_column): New function.
10177
10178 2018-02-05 Joel Brobecker <brobecker@adacore.com>
10179
10180 * dwarf2read.c (dwarf2_physname): Move commment.
10181
10182 2018-02-01 Leszek Swirski <leszeks@google.com>
10183
10184 * varobj.c (varobj_formatted_print_options): Allow recursive
10185 pretty printing if pretty printing is enabled.
10186
10187 2018-02-01 Leszek Swirski <leszeks@google.com>
10188
10189 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
10190 names after a structop as a filename.
10191
10192 2018-02-01 Yao Qi <yao.qi@linaro.org>
10193
10194 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
10195 (arm_record_coproc_data_proc): Likewise.
10196
10197 2018-02-01 Yao Qi <yao.qi@linaro.org>
10198
10199 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
10200
10201 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
10202
10203 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
10204 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
10205
10206 2018-01-31 Pedro Alves <palves@redhat.com>
10207
10208 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
10209 * inflow.c (child_terminal_save_inferior): Wrap reference to
10210 tcgetpgrp in HAVE_TERMIOS_H.
10211 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
10212 _WIN32.
10213 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
10214 always iterate over all inferiors.
10215 (gdbsim_cntrl_c): Adjust.
10216 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
10217
10218 2018-01-31 Joel Brobecker <brobecker@adacore.com>
10219
10220 * gdbtypes.c (lookup_array_range_type): Make sure the array's
10221 index type is objfile-owned if the element type is as well.
10222
10223 2018-01-31 Joel Brobecker <brobecker@adacore.com>
10224
10225 GDB 8.1 released.
10226
10227 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
10228
10229 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
10230 "features/s390x-linux64.c".
10231 (_initialize_s390_linux_tdep): Remove initialization of tdescs
10232 s390_linux32 and s390x_linux64.
10233 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
10234 default tdesc.
10235 * s390-tdep.c: Include "features/s390-linux32.c" and
10236 "features/s390x-linux64.c".
10237 (s390_tdesc_valid): Add check for tdesc_has_registers.
10238 (s390_gdbarch_init): Make sure there is always a valid tdesc.
10239 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
10240 tdesc_s390x_linux64.
10241 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
10242 tdesc_s390x_linux64 to...
10243 * s390-tdep.h: ...here.
10244
10245 2018-01-30 Pedro Alves <palves@redhat.com>
10246
10247 PR gdb/13211
10248 * config.in, configure: Regenerate.
10249 * configure.ac: Check for getpgid.
10250 * go32-nat.c (go32_pass_ctrlc): New.
10251 (go32_target): Install it.
10252 * inf-child.c (inf_child_target): Install
10253 child_terminal_save_inferior, child_pass_ctrlc and
10254 child_interrupt.
10255 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
10256 (inf_ptrace_target): No longer install it.
10257 * infcmd.c (interrupt_target_1): Adjust.
10258 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
10259 (child_interrupt): Declare.
10260 (inferior::terminal_state): New.
10261 * inflow.c (struct terminal_info): Update comments.
10262 (inferior_process_group): Delete.
10263 (terminal_is_ours): Delete.
10264 (gdb_tty_state): New.
10265 (child_terminal_init): Adjust.
10266 (is_gdb_terminal, sharing_input_terminal_1)
10267 (sharing_input_terminal): New functions.
10268 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
10269 Set the process's actual process group in the foreground if
10270 possible. Handle is_ours_for_output/is_ours distinction. Don't
10271 mark terminal as the inferior's if not sharing GDB's terminal.
10272 Don't check attach_flag.
10273 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
10274 pass down a target_terminal_state.
10275 (child_terminal_save_inferior): New, factored out from ...
10276 (child_terminal_ours_1): ... this. Handle
10277 target_terminal_state::is_ours_for_output.
10278 (child_interrupt, child_pass_ctrlc): New.
10279 (inflow_inferior_exit): Clear the inferior's terminal_state.
10280 (copy_terminal_info): Copy the inferior's terminal state.
10281 (_initialize_inflow): Remove reference to terminal_is_ours.
10282 * inflow.h (inferior_process_group): Delete.
10283 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
10284 * procfs.c (procfs_target): Don't install procfs_interrupt.
10285 (procfs_interrupt): Delete.
10286 * remote.c (remote_serial_quit_handler): Adjust.
10287 (remote_interrupt): Remove ptid parameter. Adjust.
10288 * target-delegates.c: Regenerate.
10289 * target.c: Include "terminal.h".
10290 (target_terminal::terminal_state): Rename to ...
10291 (target_terminal::m_terminal_state): ... this.
10292 (target_terminal::init): Adjust.
10293 (target_terminal::inferior): Adjust to per-inferior
10294 terminal_state.
10295 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
10296 (target_terminal::ours, target_terminal::ours_for_output): Use
10297 target_terminal_is_ours_kind.
10298 (target_interrupt): Remove ptid parameter. Adjust.
10299 (default_target_pass_ctrlc): Adjust.
10300 * target.h (target_ops::to_terminal_save_inferior): New field.
10301 (target_ops::to_interrupt): Remove ptid_t parameter.
10302 (target_interrupt): Remove ptid_t parameter. Update comment.
10303 (target_pass_ctrlc): Update comment.
10304 * target/target.h (target_terminal_state): New scoped enum,
10305 factored out of ...
10306 (target_terminal::terminal_state): ... here.
10307 (target_terminal::inferior): Update comments.
10308 (target_terminal::restore_inferior): New.
10309 (target_terminal::is_inferior, target_terminal::is_ours)
10310 (target_terminal::is_ours_for_output): Adjust.
10311 (target_terminal::scoped_restore_terminal_state): Adjust to
10312 rename, and call restore_inferior() instead of inferior().
10313 (target_terminal::scoped_restore_terminal_state::m_state): Change
10314 type.
10315 (target_terminal::terminal_state): Rename to ...
10316 (target_terminal::m_terminal_state): ... this and change type.
10317
10318 2018-01-30 Pedro Alves <palves@redhat.com>
10319
10320 * linux-nat.c (wait_for_signal): New function.
10321 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
10322 directly.
10323 (async_terminal_is_ours)
10324 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
10325 (linux_nat_add_target): Don't override
10326 to_terminal_inferior/to_terminal_ours.
10327
10328 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
10329
10330 * remote.c (remote_follow_fork): Don't call "detach_inferior".
10331
10332 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
10333
10334 * dwarf2read.c (free_dwo_files): Add forward-declaration.
10335 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
10336 dwarf2_per_objfile_free here.
10337 (dwarf2_per_objfile_free): Remove.
10338 (_initialize_dwarf2_read): Don't register
10339 dwarf2_per_objfile_free as a registry cleanup.
10340
10341 2018-01-27 Eli Zaretskii <eliz@gnu.org>
10342
10343 Avoid compilation errors in MinGW native builds
10344
10345 The error is triggered by including python-internal.h, and the
10346 error message is:
10347
10348 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
10349 from build-gnulib/import/math.h:27,
10350 from d:/usr/Python26/include/pyport.h:235,
10351 from d:/usr/Python26/include/Python.h:58,
10352 from python/python-internal.h:94,
10353 from python/py-arch.c:24:
10354 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
10355 using ::hypot;
10356 ^~~~~
10357
10358 This happens because Python headers define 'hypot' to expand t
10359 '_hypot' in the Windows builds.
10360 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
10361 'hypoth'. This avoids a compilation error.
10362
10363 2018-01-26 Alan Hayward <alan.hayward@arm.com>
10364
10365 * MAINTAINERS (Write After Approval): Fix ordering.
10366
10367 2018-01-26 Alan Hayward <alan.hayward@arm.com>
10368
10369 * MAINTAINERS (Write After Approval): Add Alan Hayward.
10370
10371 2018-01-26 Alan Modra <amodra@gmail.com>
10372
10373 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
10374 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
10375 Remove nop. Make const. Comment.
10376 (powerpc32_plt_stub_so_2): New.
10377 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
10378 Correct count. Update uses.
10379 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
10380 Move common code reading PLT entry word. Correct
10381 powerpc32_plt_stub PLT address calculation.
10382 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
10383 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
10384 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
10385 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
10386 (ppc64_standard_linkage8): Likewise.
10387 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
10388 Correct insns description.
10389 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
10390
10391 2018-01-24 Pedro Alves <palves@redhat.com>
10392
10393 GCC PR libstdc++/83906
10394 * gdbtypes.c (operator==(const dynamic_prop &,
10395 const dynamic_prop &)): New.
10396 (operator==(const range_bounds &, const range_bounds &)): New.
10397 (check_types_equal): Use them instead of memcmp.
10398 * gdbtypes.h (operator==(const dynamic_prop &,
10399 const dynamic_prop &)): Declare.
10400 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
10401 (operator==(const range_bounds &, const range_bounds &)): Declare.
10402 (operator!=(const range_bounds &, const range_bounds &)): Declare.
10403
10404 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10405
10406 * s390-linux-tdep.c (s390_record_address_mask)
10407 (s390_record_calc_disp_common, s390_record_calc_disp)
10408 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10409 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10410 (s390_process_record): Move to s390-tdep.c.
10411 (s390_linux_init_abi_any): Adjust.
10412 * s390-tdep.c (s390_record_address_mask)
10413 (s390_record_calc_disp_common, s390_record_calc_disp)
10414 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10415 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10416 (s390_process_record): Moved from s390-linux-tdep.c
10417 (s390_gdbarch_init): Adjust.
10418
10419 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10420
10421 * s390-linux-nat.c (s390-tdep.h): New include.
10422 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
10423 (HFILES_NO_SRCDIR): Add s390-tdep.h.
10424 (ALLDEPFILES): Add s390-tdep.c.
10425 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
10426 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
10427 * s390-tdep.h: ...this. New file.
10428 * s390-linux-tdep.c (s390-tdep.h): New include.
10429 (_initialize_s390_tdep): Rename to...
10430 (_initialize_s390_linux_tdep): ...this and adjust.
10431 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
10432 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
10433 s390-tdep.h.
10434 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
10435 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
10436 (s390_is_partial_instruction, s390_software_single_step)
10437 (is_non_branch_ril, s390_displaced_step_copy_insn)
10438 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
10439 (s390_prologue_data, s390_addr, s390_store, s390_load)
10440 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
10441 (s390_register_call_saved, s390_guess_tracepoint_registers)
10442 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
10443 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
10444 (s390_pseudo_register_name, s390_pseudo_register_type)
10445 (s390_pseudo_register_read, s390_pseudo_register_write)
10446 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
10447 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
10448 (s390_addr_bits_remove, s390_address_class_type_flags)
10449 (s390_address_class_type_flags_to_name)
10450 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
10451 (s390_function_arg_float, s390_function_arg_vector)
10452 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
10453 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
10454 (s390_frame_align, s390_register_return_value, s390_return_value)
10455 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
10456 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
10457 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
10458 (s390_trad_frame_prev_register, s390_unwind_cache)
10459 (s390_prologue_frame_unwind_cache)
10460 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
10461 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
10462 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
10463 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
10464 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
10465 (s390_frame_base_address, s390_local_base_address)
10466 (s390_frame_base, s390_gcc_target_options)
10467 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
10468 (s390_validate_reg_range, s390_tdesc_valid)
10469 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
10470 * s390-tdep.c: ...this. New file.
10471
10472 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10473
10474 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
10475 (s390_process_record, s390_gdbarch_tdep_alloc)
10476 (s390_linux_init_abi_any): Use/set new hook.
10477
10478 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10479
10480 * s390-linux-tdep.c (osabi.h): New include.
10481 (s390_linux_init_abi_31, s390_linux_init_abi_64)
10482 (s390_linux_init_abi_any): New functions.
10483 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
10484
10485 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10486
10487 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
10488 tdesc_has_registers check
10489
10490 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10491
10492 * s390-linux-tdep.c (s390_tdesc_valid): New function.
10493 (s390_validate_reg_range): New macro.
10494 (s390_gdbarch_init): Adjust.
10495
10496 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10497
10498 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
10499 (s390_gdbarch_tdep_alloc): Adjust.
10500 (s390_gdbarch_init): Adjust.
10501
10502 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10503
10504 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
10505 <have_tdb>: Change type to bool.
10506 (s390_gdbarch_tdep_alloc): Adjust.
10507 (s390_gdbarch_init): Adjust.
10508
10509 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10510
10511 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
10512 (gdbarch_tdep) <have_upper, have_vx>: New fields.
10513 (s390_gdbarch_tdep_alloc): New function.
10514 (s390_gdbarch_init): Allocate tdep at start and use its fields
10515 instead of separate variables.
10516
10517 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10518
10519 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
10520 when looking for cached gdbarch and add comment for remaining.
10521
10522 2018-01-22 Pedro Alves <palves@redhat.com>
10523 Sergio Durigan Junior <sergiodj@redhat.com>
10524
10525 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
10526 case.
10527
10528 2018-01-22 Maciej W. Rozycki <macro@mips.com>
10529
10530 * MAINTAINERS: Update my company e-mail address.
10531
10532 2018-01-22 Yao Qi <yao.qi@linaro.org>
10533
10534 * regcache.c (cooked_write_test): New function.
10535 (_initialize_regcache): Register the test.
10536
10537 2018-01-22 Yao Qi <yao.qi@linaro.org>
10538
10539 * ia64-tdep.c (ia64_pseudo_register_read): Call
10540 regcache->cooked_read instead of regcache_cooked_read_unsigned.
10541 * m32c-tdep.c (m32c_cat_read): Likewise.
10542 (m32c_r3r2r1r0_read): Likewise.
10543 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10544 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10545
10546 2018-01-22 Yao Qi <yao.qi@linaro.org>
10547
10548 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
10549 method raw_read instead of regcache_raw_read.
10550 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10551 * arm-tdep.c (arm_neon_quad_read): Likewise.
10552 * avr-tdep.c (avr_pseudo_register_read): Likewise.
10553 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10554 * frv-tdep.c (frv_pseudo_register_read): Likewise.
10555 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
10556 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10557 (i386_pseudo_register_read_into_value): Likewise.
10558 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10559 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10560 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10561 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
10562 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
10563 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10564 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10565 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10566 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
10567
10568 2018-01-22 Yao Qi <yao.qi@linaro.org>
10569
10570 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
10571 * configure.tgt: Remove target mt.
10572 * mt-tdep.c: Remove.
10573 * regcache.c (cooked_read_test): Remove the check for mt.
10574
10575 2018-01-22 Yao Qi <yao.qi@linaro.org>
10576
10577 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
10578 instead of gdbarch_pseudo_register_read_value.
10579
10580 2018-01-22 Joel Brobecker <brobecker@adacore.com>
10581
10582 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
10583 language is Ada.
10584
10585 2018-01-22 Joel Brobecker <brobecker@adacore.com>
10586
10587 * linespec.c (create_sals_line_offset): Remove code that preserved
10588 the symtab_and_line's line number.
10589
10590 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10591
10592 * varobj.c (varobj_create): Don't set valid_block when creating a
10593 floating varobj.
10594
10595 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10596
10597 * varobj.c (varobj_create): Remove out of date comment.
10598
10599 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10600
10601 PR mi/20395
10602 * ada-exp.y (write_var_from_sym): Pass extra parameter when
10603 updating innermost block.
10604 * parse.c (innermost_block_tracker::update): Take extra type
10605 parameter, and check types match before updating innermost block.
10606 (write_dollar_variable): Update innermost block for registers.
10607 * parser-defs.h (enum innermost_block_tracker_type): New enum.
10608 (innermost_block_tracker::innermost_block_tracker): Initialise
10609 m_types member.
10610 (innermost_block_tracker::reset): Take type parameter.
10611 (innermost_block_tracker::update): Take type parameter, and pass
10612 type through as needed.
10613 (innermost_block_tracker::m_types): New member.
10614 * varobj.c (varobj_create): Pass type when reseting innermost
10615 block.
10616
10617 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10618
10619 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
10620 * ada-lang.c (resolve_subexp): Likewise.
10621 * breakpoint.c (set_breakpoint_condition) Likewise.
10622 (watch_command_1) Likewise.
10623 * c-exp.y (variable): Likewise.
10624 * d-exp.y (PrimaryExpression): Likewise.
10625 * f-exp.y (variable): Likewise.
10626 * go-exp.y (variable): Likewise.
10627 * m2-exp.y (variable): Likewise.
10628 * objfiles.c (objfile::~objfile): Likewise.
10629 * p-exp.y (variable): Likewise.
10630 * parse.c (innermost_block): Change type.
10631 * parser-defs.h (class innermost_block_tracker): New.
10632 (innermost_block): Change to innermost_block_tracker.
10633 * printcmd.c (display_command): Switch to innermost_block API.
10634 (do_one_display): Likewise.
10635 * rust-exp.y (do_one_display): Likewise.
10636 * symfile.c (clear_symtab_users): Likewise.
10637 * varobj.c (varobj_create): Switch to innermost_block API, replace
10638 use of innermost_block with block stored on varobj object.
10639
10640 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10641
10642 * expression.h (innermost_block): Remove declaration.
10643 * varobj.c: Add 'parser-defs.h' include.
10644
10645 2018-01-19 Tom Tromey <tom@tromey.com>
10646
10647 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
10648 symbols in the static and global blocks.
10649
10650 2018-01-19 James Clarke <jrtc27@jrtc27.com>
10651
10652 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
10653 gdb_ptrace.h, and move including gdb_wait.h ...
10654 * nat/linux-ptrace.h: ... to here.
10655
10656 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10657
10658 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
10659 inf_ptrace_detach_success.
10660 (inf_ptrace_detach_success): Add inferior parameter, use it
10661 instead of inferior_ptid, pass it to detach_inferior.
10662 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
10663 parameter.
10664 * inferior.c (detach_inferior): Add overload that takes an
10665 inferior object.
10666 * inferior.h (detach_inferior): Likewise.
10667 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
10668 use inferior_ptid, adjust call to inf_ptrace_detach_success.
10669 * linux-thread-db.c (thread_db_detach): Use inf parameter.
10670
10671 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10672
10673 * target.h (struct target_ops) <to_detach>: Add inferior
10674 parameter.
10675 (target_detach): Likewise.
10676 * target.c (dispose_inferior): Pass inferior down.
10677 (target_detach): Pass inferior down. Assert that it is equal to
10678 the current inferior.
10679 * aix-thread.c (aix_thread_detach): Pass inferior down.
10680 * corefile.c (core_file_command): Pass current_inferior() down.
10681 * corelow.c (core_detach): Add inferior parameter.
10682 * darwin-nat.c (darwin_detach): Likewise.
10683 * gnu-nat.c (gnu_detach): Likewise.
10684 * inf-ptrace.c (inf_ptrace_detach): Likewise.
10685 * infcmd.c (detach_command): Pass current_inferior() down to
10686 target_detach.
10687 * infrun.c (follow_fork_inferior): Pass parent_inf to
10688 target_detach.
10689 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
10690 target_detach.
10691 * linux-nat.c (linux_nat_detach): Add inferior parameter.
10692 * linux-thread-db.c (thread_db_detach): Likewise.
10693 * nto-procfs.c (procfs_detach): Likewise.
10694 * procfs.c (procfs_detach): Likewise.
10695 * record.c (record_detach): Likewise.
10696 * record.h (struct inferior): Forward-declare.
10697 (record_detach): Add inferior parameter.
10698 * remote-sim.c (gdbsim_detach): Likewise.
10699 * remote.c (remote_detach_1): Likewise.
10700 (remote_detach): Likewise.
10701 (extended_remote_detach): Likewise.
10702 * sol-thread.c (sol_thread_detach): Likewise.
10703 * target-debug.h (target_debug_print_inferior_p): New macro.
10704 * target-delegates.c: Re-generate.
10705 * top.c (kill_or_detach): Pass inferior down to target_detach.
10706 * windows-nat.c (windows_detach): Add inferior parameter.
10707
10708 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10709
10710 * target.h (struct target_ops) <to_detach>: Remove args
10711 parameter.
10712 (target_detach): Likewise.
10713 * target.c (dispose_inferior): Adjust.
10714 (target_detach): Remove args parameter, adjust.
10715 * aix-thread.c (aix_thread_detach): Adjust.
10716 * corefile.c (core_file_command): Adjust.
10717 * corelow.c (core_detach): Adjust.
10718 * darwin-nat.c (darwin_detach): Adjust.
10719 * gnu-nat.c (gnu_detach): Adjust.
10720 * inf-ptrace.c (inf_ptrace_detach): Adjust.
10721 * infcmd.c (detach_command): Adjust
10722 * infrun.c (follow_fork_inferior): Adjust.
10723 (handle_vfork_child_exec_or_exit): Adjust.
10724 * linux-fork.c (linux_fork_detach): Remove args parameter.
10725 * linux-fork.h (linux_fork_detach): Likewise.
10726 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
10727 * linux-thread-db.c (thread_db_detach): Likewise.
10728 * nto-procfs.c (procfs_detach): Likewise.
10729 * procfs.c (procfs_detach): Likewise.
10730 (do_detach): Remove signo parameter.
10731 * record.c (record_detach): Remove args parameter.
10732 * record.h (record_detach): Likewise.
10733 * remote-sim.c (gdbsim_detach): Likewise.
10734 * remote.c (remote_detach_1): Likewise.
10735 (remote_detach): Likewise.
10736 (extended_remote_detach): Likewise.
10737 * sol-thread.c (sol_thread_detach): Likewise.
10738 * target-delegates.c: Re-generate.
10739 * top.c (struct qt_args) <args>: Remove field.
10740 (kill_or_detach): Don't pass args.
10741 (quit_force): Don't set args.
10742 * windows-nat.c (windows_detach): Remove args parameter.
10743
10744 2018-01-19 Yao Qi <yao.qi@linaro.org>
10745
10746 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
10747 (arm_linux_init_abi): Install it.
10748
10749 2018-01-19 Yao Qi <yao.qi@linaro.org>
10750
10751 * osabi.c (gdb_osabi_names): Extend the regexp for
10752 arm-linux-gnueabihf.
10753
10754 2018-01-18 Yao Qi <yao.qi@linaro.org>
10755
10756 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
10757 m_abbrevs.
10758 (abbrev_table::add_abbrev): Update.
10759 (abbrev_table::lookup_abbrev): Update.
10760
10761 2018-01-18 Yao Qi <yao.qi@linaro.org>
10762
10763 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
10764
10765 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
10766
10767 * compile/compile.c (compile_to_object): Convert "triplet_rx"
10768 to "std::string".
10769
10770 2018-01-17 Tom Tromey <tom@tromey.com>
10771
10772 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
10773
10774 2018-01-17 Tom Tromey <tom@tromey.com>
10775
10776 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
10777 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
10778 (create_array_type_with_stride): Update.
10779 * dwarf2read.c (set_die_type): Update.
10780
10781 2018-01-17 Tom Tromey <tom@tromey.com>
10782
10783 * dwarf2read.c (delayed_method_info): Remove typedef.
10784 (dwarf2_cu::method_info): Now a std::vector.
10785 (add_to_method_list): Update.
10786 (free_delayed_list): Remove.
10787 (compute_delayed_physnames): Update.
10788 (process_full_comp_unit, process_full_type_unit): Clear the method
10789 list. Remove cleanups.
10790 (psymtab_include_file_name): Add name_holder parameter. Use
10791 unique_xmalloc_ptr.
10792 (dwarf_decode_lines): Update.
10793
10794 2018-01-17 Tom Tromey <tom@tromey.com>
10795 Simon Marchi <simon.marchi@ericsson.com>
10796
10797 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
10798 (dwarf2_per_objfile::free_cached_comp_units)
10799 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10800 (init_cutu_and_read_dies_no_follow): Update.
10801 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
10802 (dwarf2_cu::~dwarf2_cu): New.
10803 (free_heap_comp_unit, free_stack_comp_unit): Remove.
10804 (age_cached_comp_units, free_one_cached_comp_unit): Update.
10805
10806 2018-01-17 Tom Tromey <tom@tromey.com>
10807 Simon Marchi <simon.marchi@ericsson.com>
10808
10809 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
10810 (struct die_reader_specs) <abbrev_table>: New member.
10811 (struct abbrev_table): Add constructor.
10812 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
10813 <abbrev_obstack>: Now an auto_obstack.
10814 (abbrev_table_up): New typedef.
10815 (init_cu_die_reader): Add abbrev_table parameter.
10816 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
10817 Add result_dwo_abbrev_table.
10818 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10819 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
10820 Update.
10821 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
10822 parameter.
10823 (skip_children): Update.
10824 (abbrev_table::alloc_abbrev): Rename from
10825 abbrev_table_alloc_abbrev.
10826 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
10827 (abbrev_table::lookup_abbrev): Rename from
10828 abbrev_table_lookup_abbrev.
10829 (abbrev_table_read_table): Return abbrev_table_up.
10830 (abbrev_table_free, abbrev_table_free_cleanup)
10831 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
10832 (load_partial_dies): Update.
10833
10834 2018-01-17 Tom Tromey <tom@tromey.com>
10835
10836 * dwarf2read.c (dwarf2_compute_name): Update comment.
10837 (read_func_scope, read_variable): Update.
10838 (new_symbol): Remove.
10839 (new_symbol_full): Rename to new_symbol.
10840
10841 2018-01-17 Mike Gulick <mgulick@mathworks.com>
10842
10843 PR gdb/16577
10844 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
10845 a warning instead of throwing an error, set section size to 0 and return
10846 NULL.
10847 * gdb_bfd.h (gdb_bfd_map_section): Update description.
10848
10849 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
10850
10851 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
10852 std::string.
10853 (linux_ptrace_attach_fail_reason_string): Likewise.
10854 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
10855 Likewise.
10856 (linux_ptrace_attach_fail_reason_string): Likewise.
10857 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
10858
10859 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
10860
10861 * linux-nat.c (linux_nat_attach): Remove xstrdup.
10862
10863 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
10864
10865 PR gdb/21559
10866 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
10867 checking for fs_base/gs_base fields in struct user_regs_struct.
10868 * configure: Regenerate.
10869
10870 2018-01-17 Yao Qi <yao.qi@linaro.org>
10871
10872 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
10873 function.
10874 (aarch64_linux_init_abi): Install it to gdbarch hook
10875 gcc_target_options.
10876
10877 2018-01-15 Pedro Alves <palves@redhat.com>
10878
10879 * common/signals-state-save-restore.c
10880 (save_original_signals_state): Fix typos.
10881
10882 2017-01-12 Tom Tromey <tom@tromey.com>
10883 Sergio Durigan Junior <sergiodj@redhat.com>
10884
10885 * Makefile.in (install-only): Install gdb-add-index.
10886
10887 2018-01-12 John Baldwin <jhb@FreeBSD.org>
10888
10889 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
10890
10891 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
10892
10893 * infrun.c (keep_going_pass_signal): Clear step-over info when
10894 insert_breakpoints fails.
10895
10896 2018-01-11 Pedro Alves <palves@redhat.com>
10897
10898 PR gdb/22583
10899 * infrun.c (resume): Rename to ...
10900 (resume_1): ... this.
10901 (resume): Reimplement as wrapper around resume_1.
10902
10903 2018-01-11 Pedro Alves <palves@redhat.com>
10904
10905 PR remote/22597
10906 * remote.c (remote_parse_stop_reply): Default to the last-set
10907 general thread instead of to 'magic_null_ptid'.
10908
10909 2018-01-10 Pedro Alves <palves@redhat.com>
10910
10911 * language.h (language_get_symbol_name_matcher): Rename ...
10912 (get_symbol_name_matcher): ... this.
10913 * language.c (language_get_symbol_name_matcher): Ditto.
10914 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
10915 callers adjusted.
10916
10917 2018-01-10 Pedro Alves <palves@redhat.com>
10918
10919 PR gdb/22670
10920 * dwarf2read.c
10921 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
10922 Adjust to use language_get_symbol_name_matcher instead of
10923 language_defn::la_get_symbol_name_matcher.
10924 * language.c (language_get_symbol_name_matcher): If in Ada mode
10925 and the lookup name is a verbatim match, return Ada's matcher.
10926 * language.h (language_get_symbol_name_matcher): Adjust comment.
10927 (ada_lookup_name_info::verbatim_p):: New method.
10928
10929 2018-01-10 Pedro Alves <palves@redhat.com>
10930
10931 PR gdb/22670
10932 * ada-lang.c (ada_collect_symbol_completion_matches): If the
10933 minsym's language is language_auto or language_cplus, pass down
10934 language_ada instead.
10935 * symtab.c (compare_symbol_name): Don't frob symbol language here.
10936
10937 2018-01-10 Pedro Alves <palves@redhat.com>
10938
10939 PR gdb/22670
10940 * minsyms.c (linkage_name_str): New function.
10941 (iterate_over_minimal_symbols): Use it.
10942
10943 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10944
10945 * NEWS: Document that 'info proc' now works on FreeBSD.
10946
10947 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10948
10949 * configure.ac: Check for kinfo_getfile in libutil.
10950 * configure: Regenerate.
10951 * config.in: Regenerate.
10952 * fbsd-nat.c: Include "fbsd-tdep.h".
10953 (fbsd_fetch_cmdline): New.
10954 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
10955 rather than calling error.
10956 (fbsd_info_proc): New.
10957 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
10958 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
10959 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
10960
10961 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10962
10963 * fbsd-nat.c (struct free_deleter): Remove.
10964 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
10965
10966 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10967
10968 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
10969 NULL for an empty pathname.
10970
10971 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10972
10973 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
10974 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
10975 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
10976 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
10977 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
10978 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
10979 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
10980 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
10981 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
10982 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
10983 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
10984 (fbsd_core_fetch_timeval, fbsd_print_sigset)
10985 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
10986 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
10987 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
10988
10989 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
10990
10991 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
10992 (gnu_xfer_auxv): New function.
10993 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
10994 TARGET_OBJECT_AUXV.
10995
10996 2018-01-08 Yao Qi <yao.qi@linaro.org>
10997 Simon Marchi <simon.marchi@ericsson.com>
10998
10999 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
11000 common/selftest.c.
11001 (COMMON_OBS): Remove selftest.o.
11002 * configure.ac: Append selftest-arch.c and common/selftest.c to
11003 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
11004 * configure: Re-generated.
11005 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
11006 GDB_SELF_TEST.
11007 (maintenance_info_selftests): Likewise.
11008
11009 2018-01-08 Xavier Roirand <roirand@adacore.com>
11010
11011 * ada-valprint.c (val_print_packed_array_elements): Use
11012 proper number of elements when printing an array indexed
11013 by an enumeration type.
11014
11015 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11016
11017 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
11018 (dw2_get_file_names_reader): Adjust.
11019 (lookup_dwo_signatured_type): Adjust.
11020 (lookup_dwp_signatured_type): Adjust.
11021 (lookup_signatured_type): Adjust.
11022 (create_type_unit_group): Adjust.
11023 (get_type_unit_group): Adjust.
11024 (process_psymtab_comp_unit_reader): Adjust.
11025 (build_type_psymtabs_reader): Adjust.
11026 (scan_partial_symbols): Adjust.
11027 (add_partial_symbol): Adjust.
11028 (add_partial_subprogram): Adjust.
11029 (peek_die_abbrev): Adjust.
11030 (fixup_go_packaging): Adjust.
11031 (process_imported_unit_die): Adjust.
11032 (dwarf2_compute_name): Adjust.
11033 (dwarf2_physname): Adjust.
11034 (read_import_statement): Adjust.
11035 (handle_DW_AT_stmt_list): Adjust.
11036 (read_file_scope): Adjust.
11037 (read_func_scope): Adjust.
11038 (read_lexical_block_scope): Adjust.
11039 (read_call_site_scope): Adjust.
11040 (read_variable): Adjust.
11041 (dwarf2_rnglists_process): Adjust.
11042 (dwarf2_ranges_process): Adjust.
11043 (dwarf2_ranges_read): Adjust.
11044 (dwarf2_get_pc_bounds): Adjust.
11045 (dwarf2_record_block_ranges): Adjust.
11046 (dwarf2_add_field): Adjust.
11047 (dwarf2_add_member_fn): Adjust.
11048 (read_structure_type): Adjust.
11049 (process_structure_scope): Adjust.
11050 (read_enumeration_type): Adjust.
11051 (read_array_type): Adjust.
11052 (mark_common_block_symbol_computed): Adjust.
11053 (read_common_block): Adjust.
11054 (read_namespace_type): Adjust.
11055 (read_namespace): Adjust.
11056 (read_module_type): Adjust.
11057 (read_tag_pointer_type): Adjust.
11058 (read_tag_ptr_to_member_type): Adjust.
11059 (read_tag_string_type): Adjust.
11060 (read_subroutine_type): Adjust.
11061 (read_typedef): Adjust.
11062 (read_base_type): Adjust.
11063 (attr_to_dynamic_prop): Adjust.
11064 (read_subrange_type): Adjust.
11065 (read_unspecified_type): Adjust.
11066 (dwarf2_read_abbrevs): Adjust.
11067 (load_partial_dies): Adjust.
11068 (read_partial_die): Adjust.
11069 (find_partial_die): Adjust.
11070 (guess_partial_die_structure_name): Adjust.
11071 (fixup_partial_die): Adjust.
11072 (read_attribute_value): Adjust.
11073 (read_addr_index): Adjust.
11074 (read_addr_index_from_leb128): Adjust.
11075 (read_str_index): Adjust.
11076 (dwarf2_string_attr): Adjust.
11077 (get_debug_line_section): Adjust.
11078 (dwarf_decode_line_header): Adjust.
11079 (lnp_state_machine::check_line_address): Adjust.
11080 (dwarf_decode_lines_1): Adjust.
11081 (dwarf_decode_lines): Adjust.
11082 (dwarf2_start_symtab): Adjust.
11083 (var_decode_location): Adjust.
11084 (new_symbol_full): Adjust.
11085 (dwarf2_const_value_data): Adjust.
11086 (dwarf2_const_value_attr): Adjust.
11087 (dwarf2_const_value): Adjust.
11088 (die_type): Adjust.
11089 (die_containing_type): Adjust.
11090 (build_error_marker_type): Adjust.
11091 (lookup_die_type): Adjust.
11092 (guess_full_die_structure_name): Adjust.
11093 (anonymous_struct_prefix): Adjust.
11094 (determine_prefix): Adjust.
11095 (dwarf2_name): Adjust.
11096 (follow_die_ref_or_sig): Adjust.
11097 (follow_die_offset): Adjust.
11098 (follow_die_ref): Adjust.
11099 (follow_die_sig_1): Adjust.
11100 (follow_die_sig): Adjust.
11101 (get_signatured_type): Adjust.
11102 (get_DW_AT_signature_type): Adjust.
11103 (decode_locdesc): Adjust.
11104 (dwarf_decode_macros): Adjust.
11105 (cu_debug_loc_section): Adjust.
11106 (fill_in_loclist_baton): Adjust.
11107 (dwarf2_symbol_mark_computed): Adjust.
11108 (init_one_comp_unit): Don't assign
11109 dwarf2_cu::dwarf2_per_objfile.
11110 (set_die_type): Adjust.
11111
11112 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11113
11114 * dwarf2read.c (struct mapped_debug_names): Add constructor.
11115 <dwarf2_per_objfile>: New field.
11116 (dwarf2_per_objfile): Remove global.
11117 (get_dwarf2_per_objfile): New function.
11118 (set_dwarf2_per_objfile): New function.
11119 (dwarf2_build_psymtabs_hard): Change objfile parameter to
11120 dwarf2_per_objfile.
11121 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
11122 (read_abbrev_offset): Likewise.
11123 (read_indirect_string): Likewise.
11124 (read_indirect_line_string): Likewise.
11125 (read_indirect_string_at_offset): Likewise.
11126 (read_indirect_string_from_dwz): Likewise.
11127 (dwarf2_find_containing_comp_unit): Change objfile parameter to
11128 dwarf2_per_objfile.
11129 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11130 (create_all_comp_units): Change objfile parameter to
11131 dwarf2_per_objfile.
11132 (create_all_type_units): Likewise.
11133 (process_queue): Add dwarf2_per_objfile parameter.
11134 (read_and_check_comp_unit_head): Likewise.
11135 (lookup_dwo_unit_in_dwp): Likewise.
11136 (get_dwp_file): Likewise.
11137 (process_cu_includes): Likewise.
11138 (struct free_dwo_file_cleanup_data): New struct.
11139 (dwarf2_has_info): Use get_dwarf2_per_objfile and
11140 set_dwarf2_per_objfile.
11141 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
11142 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
11143 context, adjust calls.
11144 (dw2_instantiate_symtab): Likewise.
11145 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
11146 (dw2_get_cu): Likewise.
11147 (create_cu_from_index_list): Change objfile parameter to
11148 dwarf2_per_objfile.
11149 (create_cus_from_index_list): Get dwarf2_per_objfile from
11150 context, adjust calls.
11151 (create_cus_from_index): Likewise.
11152 (create_signatured_type_table_from_index): Change objfile
11153 parameter to dwarf2_per_objfile.
11154 (create_signatured_type_table_from_debug_names): Change objfile
11155 parameter to dwarf2_per_objfile.
11156 (create_addrmap_from_index): Likewise.
11157 (create_addrmap_from_aranges): Likewise.
11158 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
11159 (dw2_setup): Remove.
11160 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
11161 context.
11162 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
11163 get_dwarf2_per_objfile.
11164 (dw2_forget_cached_source_info): Likewise.
11165 (dw2_map_symtabs_matching_filename): Likewise.
11166 (struct dw2_symtab_iterator) <index>: Remove.
11167 <dwarf2_per_objfile>: New field.
11168 (dw2_symtab_iter_init): Replace index parameter with
11169 dwarf2_per_objfile.
11170 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
11171 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
11172 (dw2_print_stats): Likewise.
11173 (dw2_dump): Likewise.
11174 (dw2_expand_symtabs_for_function): Likewise.
11175 (dw2_expand_all_symtabs): Likewise.
11176 (dw2_expand_symtabs_with_fullname): Likewise.
11177 (dw2_expand_marked_cus): Replace index and objfile parameters
11178 with dwarf2_per_objfile.
11179 (dw_expand_symtabs_matching_file_matcher): Add
11180 dwarf2_per_objfile parameter and adjust calls.
11181 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
11182 adjust calls.
11183 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
11184 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
11185 adjust calls.
11186 (create_cus_from_debug_names_list): Replace objfile parameter
11187 with dwarf2_per_objfile and adjust calls.
11188 (create_cus_from_debug_names): Likewise.
11189 (dwarf2_read_debug_names): Likewise.
11190 (mapped_debug_names::namei_to_name): Adjust call.
11191 (dw2_debug_names_iterator::next): Likewise.
11192 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
11193 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
11194 (dw2_debug_names_dump): Likewise.
11195 (dw2_debug_names_expand_symtabs_for_function): Likewise.
11196 (dw2_debug_names_expand_symtabs_matching): Likewise.
11197 (dwarf2_initialize_objfile): Likewise.
11198 (dwarf2_build_psymtabs): Likewise.
11199 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
11200 this_cu.
11201 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
11202 (read_and_check_comp_unit_head): Likewise.
11203 (read_abbrev_offset): Likewise.
11204 (create_debug_type_hash_table): Likewise.
11205 (create_debug_types_hash_table): Likewise.
11206 (create_all_type_units): Replace objfile parameter with
11207 dwarf2_per_objfile.
11208 (add_type_unit): Add dwarf2_per_objfile parameter.
11209 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
11210 with dwarf2_per_objfile.
11211 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
11212 (lookup_dwp_signatured_type): Likewise.
11213 (lookup_signatured_type): Likewise.
11214 (read_cutu_die_from_dwo): Likewise.
11215 (init_tu_and_read_dwo_dies): Likewise.
11216 (init_cutu_and_read_dies): Likewise.
11217 (init_cutu_and_read_dies_no_follow): Likewise.
11218 (allocate_type_unit_groups_table): Add objfile parameter.
11219 (create_type_unit_group): Use dwarf2_per_objfile from cu.
11220 (get_type_unit_group): Likewise.
11221 (process_psymtab_comp_unit): Update call.
11222 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
11223 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
11224 (print_tu_stats): Likewise.
11225 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
11226 in void* parameter.
11227 (build_type_psymtabs): Change objfile parameter to
11228 dwarf2_per_objfile.
11229 (process_skeletonless_type_unit): Use dwarf2_per_objfile
11230 passed in void* parameter.
11231 (process_skeletonless_type_units): Change objfile parameter to
11232 dwarf2_per_objfile.
11233 (set_partial_user): Likewise.
11234 (dwarf2_build_psymtabs_hard): Likewise.
11235 (read_comp_units_from_section): Likewise.
11236 (create_all_comp_units): Likewise.
11237 (scan_partial_symbols): Update calls.
11238 (add_partial_symbol): Likewise.
11239 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
11240 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
11241 (process_queue): Add dwarf2_per_objfile parameter.
11242 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
11243 (compute_compunit_symtab_includes): Likewise.
11244 (process_cu_includes): Add dwarf2_per_objfile parameter.
11245 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
11246 (process_full_type_unit): Likewise.
11247 (process_imported_unit_die): Update call.
11248 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
11249 (read_file_scope): Likewise.
11250 (allocate_dwo_file_hash_table): Add objfile parameter.
11251 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
11252 (create_cus_hash_table): Likewise.
11253 (create_dwp_hash_table): Likewise.
11254 (create_dwo_unit_in_dwp_v1): Likewise.
11255 (create_dwp_v2_section): Likewise.
11256 (create_dwo_unit_in_dwp_v2): Likewise.
11257 (lookup_dwo_unit_in_dwp): Likewise.
11258 (try_open_dwop_file): Likewise.
11259 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
11260 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
11261 cleanup to include a reference to dwarf2_per_objfile.
11262 (open_dwp_file): Add dwarf2_per_objfile parameter.
11263 (open_and_init_dwp_file): Likewise.
11264 (get_dwp_file): Likewise.
11265 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
11266 (queue_and_load_all_dwo_tus): Update call.
11267 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
11268 data.
11269 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
11270 (dwarf2_ranges_process): Likewise.
11271 (dwarf2_get_pc_bounds): Likewise.
11272 (mark_common_block_symbol_computed): Likewise.
11273 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
11274 (dwarf2_read_abbrevs): Update call.
11275 (read_partial_die): Use dwarf2_per_objfile from cu.
11276 (find_partial_die): Likewise.
11277 (fixup_partial_die): Likewise.
11278 (read_attribute_value): Likewise.
11279 (read_indirect_string_at_offset_from): Add objfile parameter.
11280 (read_indirect_string_at_offset): Add dwarf2_per_objfile
11281 parameter.
11282 (read_indirect_string_from_dwz): Add objfile parameter.
11283 (read_indirect_string): Add objfile parameter.
11284 (read_addr_index_1): Add dwarf2_per_objfile parameter.
11285 (read_addr_index): Use dwarf2_per_objfile from cu.
11286 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
11287 call dw2_setup.
11288 (read_str_index): Use dwarf2_per_objfile from cu.
11289 (get_debug_line_section): Likewise.
11290 (read_formatted_entries): Add dwarf2_per_objfile parameter.
11291 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
11292 (new_symbol_full): Use dwarf2_per_objfile from cu.
11293 (build_error_marker_type): Likewise.
11294 (lookup_die_type): Likewise.
11295 (determine_prefix): Likewise.
11296 (follow_die_offset): Likewise.
11297 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
11298 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
11299 (dwarf2_fetch_die_type_sect_off): Likewise.
11300 (dwarf2_get_die_type): Likewise.
11301 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
11302 (get_signatured_type): Likewise.
11303 (get_DW_AT_signature_type): Likewise.
11304 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
11305 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
11306 (cu_debug_loc_section): Likewise.
11307 (fill_in_loclist_baton): Likewise.
11308 (dwarf2_symbol_mark_computed): Likewise.
11309 (dwarf2_find_containing_comp_unit): Change objfile parameter to
11310 dwarf2_per_objfile.
11311 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
11312 parameter.
11313 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11314 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
11315 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
11316 (set_die_type): Use dwarf2_free_objfile from cu.
11317 (get_die_type_at_offset): Likewise.
11318 (dwarf2_per_objfile_free): Don't assign global variable.
11319 (debug_names) <constructor>: Add dwarf2_per_objfile
11320 parameter, update m_debugstrlookup construction.
11321 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
11322 parameter.
11323 <m_dwarf2_per_objfile>: New field.
11324 <lookup>: Use m_dwarf2_per_objfile.
11325 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
11326 (psyms_seen_size): Likewise.
11327 (write_gdbindex): Replace objfile parameter with
11328 dwarf2_per_objfile.
11329 (write_debug_names): Likewise.
11330 (write_psymtabs_to_index): Likewise.
11331 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
11332 calls.
11333
11334 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11335
11336 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
11337 <dwarf2_per_objfile>: New field.
11338 (struct dwarf2_per_cu_data) <objfile>: Remove.
11339 <dwarf2_per_objfile>: New field.
11340 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
11341 of objfile.
11342 (create_signatured_type_table_from_index): Likewise.
11343 (create_debug_type_hash_table): Likewise.
11344 (fill_in_sig_entry_from_dwo_entry): Likewise.
11345 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
11346 (create_type_unit_group): Assign dwarf2_per_objfile instead of
11347 objfile.
11348 (create_partial_symtab): Access objfile through
11349 dwarf2_per_objfile.
11350 (process_psymtab_comp_unit_reader): Likewise.
11351 (read_comp_units_from_section): Likewise.
11352 (scan_partial_symbols): Likewise.
11353 (add_partial_symbol): Likewise.
11354 (add_partial_subprogram): Likewise.
11355 (peek_die_abbrev): Likewise.
11356 (fixup_go_packaging): Likewise.
11357 (process_full_comp_unit): Likewise.
11358 (process_full_type_unit): Likewise.
11359 (process_imported_unit_die): Likewise.
11360 (dwarf2_compute_name): Likewise.
11361 (dwarf2_physname): Likewise.
11362 (read_import_statement): Likewise.
11363 (create_cus_hash_table): Assign dwarf2_physname instead of
11364 objfile.
11365 (read_func_scope): Access objfile through dwarf2_per_objfile.
11366 (read_lexical_block_scope): Likewise.
11367 (read_call_site_scope): Likewise.
11368 (read_variable): Likewise.
11369 (dwarf2_rnglists_process): Likewise.
11370 (dwarf2_ranges_process): Likewise.
11371 (dwarf2_ranges_read): Likewise.
11372 (dwarf2_record_block_ranges): Likewise.
11373 (dwarf2_add_field): Likewise.
11374 (dwarf2_add_member_fn): Likewise.
11375 (read_structure_type): Likewise.
11376 (process_structure_scope): Likewise.
11377 (read_enumeration_type): Likewise.
11378 (read_array_type): Likewise.
11379 (read_common_block): Likewise.
11380 (read_namespace_type): Likewise.
11381 (read_namespace): Likewise.
11382 (read_module_type): Likewise.
11383 (read_tag_pointer_type): Likewise.
11384 (read_tag_ptr_to_member_type): Likewise.
11385 (read_tag_string_type): Likewise.
11386 (read_subroutine_type): Likewise.
11387 (read_typedef): Likewise.
11388 (read_base_type): Likewise.
11389 (attr_to_dynamic_prop): Likewise.
11390 (read_subrange_type): Likewise.
11391 (read_unspecified_type): Likewise.
11392 (load_partial_dies): Likewise.
11393 (read_partial_die): Likewise.
11394 (find_partial_die): Likewise.
11395 (guess_partial_die_structure_name): Likewise.
11396 (fixup_partial_die): Likewise.
11397 (read_attribute_value): Likewise.
11398 (read_addr_index_from_leb128): Likewise.
11399 (dwarf2_read_addr_index): Likewise.
11400 (dwarf2_string_attr): Likewise.
11401 (lnp_state_machine::check_line_address): Likewise.
11402 (dwarf_decode_lines_1): Likewise.
11403 (dwarf_decode_lines): Likewise.
11404 (dwarf2_start_symtab): Likewise.
11405 (var_decode_location): Likewise.
11406 (new_symbol_full): Likewise.
11407 (dwarf2_const_value_data): Likewise.
11408 (dwarf2_const_value_attr): Likewise.
11409 (dwarf2_const_value): Likewise.
11410 (die_type): Likewise.
11411 (die_containing_type): Likewise.
11412 (lookup_die_type): Likewise.
11413 (guess_full_die_structure_name): Likewise.
11414 (anonymous_struct_prefix): Likewise.
11415 (dwarf2_name): Likewise.
11416 (follow_die_ref_or_sig): Likewise.
11417 (follow_die_offset): Likewise.
11418 (follow_die_ref): Likewise.
11419 (dwarf2_fetch_die_loc_sect_off): Likewise.
11420 (dwarf2_fetch_constant_bytes): Likewise.
11421 (dwarf2_fetch_die_type_sect_off): Likewise.
11422 (dwarf2_get_die_type): Likewise.
11423 (follow_die_sig): Likewise.
11424 (decode_locdesc): Likewise.
11425 (dwarf2_per_cu_objfile): Likewise.
11426 (dwarf2_per_cu_text_offset): Likewise.
11427 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
11428 objfile.
11429 (set_die_type): Access objfile through
11430 dwarf2_per_objfile.
11431
11432 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11433
11434 * valprint.c (converted_character_d): Remove typedef.
11435 (DEF_VEC_O (converted_character_d)): Remove.
11436 (count_next_character): Use std::vector.
11437 (print_converted_chars_to_obstack): Likewise.
11438 (generic_printstr): Likewise.
11439
11440 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11441
11442 * xml-support.h (struct gdb_xml_value): Add constructor.
11443 <value>: Change type to unique_xmalloc_ptr.
11444 (gdb_xml_value_s): Remove typedef.
11445 (DEF_VEC_O (gdb_xml_value_s)): Remove.
11446 (gdb_xml_element_start_handler): Change parameter type to
11447 std::vector.
11448 (xml_find_attribute): Likewise.
11449 * xml-support.c (xml_find_attribute): Change parameter type to
11450 std::vector and adjust.
11451 (gdb_xml_values_cleanup): Remove.
11452 (gdb_xml_parser::start_element): Adjust to std::vector.
11453 (xinclude_start_include): Change paraeter type to std::vector
11454 and adjust.
11455 * btrace.c (check_xml_btrace_version): Likewise.
11456 (parse_xml_btrace_block): Likewise.
11457 (parse_xml_btrace_pt_config_cpu): Likewise.
11458 (parse_xml_btrace_pt): Likewise.
11459 (parse_xml_btrace_conf_bts): Likewise.
11460 (parse_xml_btrace_conf_pt): Likewise.
11461 * memory-map.c (memory_map_start_memory): Likewise.
11462 (memory_map_start_property): Likewise.
11463 * osdata.c (osdata_start_osdata): Likewise.
11464 (osdata_start_item): Likewise.
11465 (osdata_start_column): Likewise.
11466 * remote.c (start_thread): Likewise.
11467 * solib-aix.c (library_list_start_library): Likewise.
11468 (library_list_start_list): Likewise.
11469 * solib-svr4.c (library_list_start_library): Likewise.
11470 (svr4_library_list_start_list): Likewise.
11471 * solib-target.c (library_list_start_segment): Likewise.
11472 (library_list_start_section): Likewise.
11473 (library_list_start_library): Likewise.
11474 (library_list_start_list): Likewise.
11475 * tracepoint.c (traceframe_info_start_memory): Likewise.
11476 (traceframe_info_start_tvar): Likewise.
11477 * xml-syscall.c (syscall_start_syscall): Likewise.
11478 * xml-tdesc.c (tdesc_start_target): Likewise.
11479 (tdesc_start_feature): Likewise.
11480 (tdesc_start_reg): Likewise.
11481 (tdesc_start_union): Likewise.
11482 (tdesc_start_struct): Likewise.
11483 (tdesc_start_flags): Likewise.
11484 (tdesc_start_enum): Likewise.
11485 (tdesc_start_field): Likewise.
11486 (tdesc_start_enum_value): Likewise.
11487 (tdesc_start_vector): Likewise.
11488
11489 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11490
11491 * extension.h (struct xmethod_worker) <clone>: Remove.
11492 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
11493 Remove.
11494 (python_xmethod_worker::clone): Remove.
11495 * valops.c (find_overload_match): Use std::move instead of
11496 clone.
11497
11498 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11499
11500 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
11501 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
11502 <free_xmethod_worker_data>: Remove.
11503 <get_matching_xmethod_workers>: Chance VEC to std::vector.
11504 <get_xmethod_arg_types>: Remove.
11505 <get_xmethod_result_type>: Remove.
11506 <invoke_xmethod>: Remove.
11507 * extension.c (new_xmethod_worker): Remove.
11508 (clone_xmethod_worker): Remove.
11509 (get_matching_xmethod_workers): Return void, pass std::vector by
11510 pointer.
11511 (get_xmethod_arg_types): Rename to...
11512 (xmethod_worker::get_arg_types): ... this, and adjust.
11513 (get_xmethod_result_type): Rename to...
11514 (xmethod_worker::get_result_type): ... this, and adjust.
11515 (invoke_xmethod): Remove.
11516 (free_xmethod_worker): Remove.
11517 (free_xmethod_worker_vec): Remove.
11518 * extension.h (enum ext_lang_rc): Move here from
11519 extension-priv.h.
11520 (struct xmethod_worker): Add constructor and destructor.
11521 <data>: Remove.
11522 <value>: Remove.
11523 <invoke, clone, do_get_result_type, do_get_arg_types>: New
11524 virtual pure methods.
11525 <get_arg_types, get_result_type>: New methods.
11526 (xmethod_worker_ptr): Remove typedef.
11527 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
11528 (xmethod_worker_vec): Remove typedef.
11529 (xmethod_worker_up): New typedef.
11530 (invoke_xmethod): Remove.
11531 (clone_xmethod_worker): Remove.
11532 (free_xmethod_worker): Remove.
11533 (free_xmethod_worker_vec): Remove.
11534 (get_xmethod_arg_types): Remove.
11535 (get_xmethod_result_type): Remove.
11536 * valops.c (find_method_list): Use std::vector, don't use
11537 intermediate vector.
11538 (value_find_oload_method_list): Use std::vector.
11539 (find_overload_match): Use std::vector.
11540 (find_oload_champ): Use std::vector.
11541 * value.c (value_free): Use operator delete.
11542 (value_of_xmethod): Rename to...
11543 (value_from_xmethod): ... this. Don't assign
11544 xmethod_worker::value, take rvalue-reference.
11545 (result_type_of_xmethod): Adjust.
11546 (call_xmethod): Adjust.
11547 * value.h: Include extension.h.
11548 (struct xmethod_worker): Don't forward-declare.
11549 (value_of_xmethod): Rename to...
11550 (value_from_xmethod): ... this, take rvalue-reference.
11551 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
11552 (struct python_xmethod_worker): ... this, add constructor and
11553 destructor.
11554 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
11555 (gdbpy_free_xmethod_worker_data): Rename to...
11556 (python_xmethod_worker::~python_xmethod_worker): ... this and
11557 adjust.
11558 (gdbpy_clone_xmethod_worker_data): Rename to...
11559 (python_xmethod_worker::clone): ... this and adjust.
11560 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
11561 temporary vector.
11562 (gdbpy_get_xmethod_arg_types): Rename to...
11563 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
11564 (gdbpy_get_xmethod_result_type): Rename to...
11565 (python_xmethod_worker::do_get_result_type): ... this and
11566 adjust.
11567 (gdbpy_invoke_xmethod): Rename to...
11568 (python_xmethod_worker::invoke): ... this and adjust.
11569 (new_python_xmethod_worker): Rename to...
11570 (python_xmethod_worker::python_xmethod_worker): ... this and
11571 adjust.
11572 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
11573 Remove.
11574 (gdbpy_free_xmethod_worker_data): Remove.
11575 (gdbpy_get_matching_xmethod_workers): Use std::vector.
11576 (gdbpy_get_xmethod_arg_types): Remove.
11577 (gdbpy_get_xmethod_result_type): Remove.
11578 (gdbpy_invoke_xmethod): Remove.
11579 * python/python.c (python_extension_ops): Remove obsolete
11580 callbacks.
11581
11582 2018-01-05 Pedro Alves <palves@redhat.com>
11583
11584 PR gdb/18653
11585 * common/signals-state-save-restore.c
11586 (save_original_signals_state): New parameter 'quiet'. Warn if we
11587 find a custom handler preinstalled, instead of internal erroring.
11588 But only warn if !quiet.
11589 * common/signals-state-save-restore.h
11590 (save_original_signals_state): New parameter 'quiet'.
11591 * main.c (captured_main_1): Move save_original_signals_state call
11592 after option handling, and pass QUIET.
11593
11594 2018-01-05 Pedro Alves <palves@redhat.com>
11595
11596 * spu-tdep.c (spu_catch_start): Pass
11597 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
11598
11599 2018-01-05 Pedro Alves <palves@redhat.com>
11600
11601 PR gdb/22670
11602 * ada-lang.c (literal_symbol_name_matcher): New function.
11603 (ada_get_symbol_name_matcher): Use it for
11604 symbol_name_match_type::SEARCH_NAME.
11605 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
11606 it down instead of assuming symbol_name_match_type::FULL.
11607 * block.h (block_lookup_symbol): New parameter 'match_type'.
11608 * c-valprint.c (print_unpacked_pointer): Use
11609 lookup_symbol_search_name instead of lookup_symbol.
11610 * compile/compile-object-load.c (get_out_value_type): Pass down
11611 symbol_name_match_type::SEARCH_NAME.
11612 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
11613 symbol_name_match_type::FULL.
11614 * cp-support.c (cp_get_symbol_name_matcher): Handle
11615 symbol_name_match_type::SEARCH_NAME.
11616 * infrun.c (insert_exception_resume_breakpoint): Use
11617 lookup_symbol_search_name.
11618 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
11619 * psymtab.c (maintenance_check_psymtabs): Use
11620 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
11621 * stack.c (print_frame_args): Use lookup_symbol_search_name and
11622 SYMBOL_SEARCH_NAME.
11623 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
11624 if symbol_name_match_type::SEARCH_NAME.
11625 (lookup_symbol_in_language): Pass down
11626 symbol_name_match_type::FULL.
11627 (lookup_symbol_search_name): New.
11628 (lookup_language_this): Pass down
11629 symbol_name_match_type::SEARCH_NAME.
11630 (lookup_symbol_aux, lookup_local_symbol): New parameter
11631 'match_type'. Pass it down.
11632 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
11633 (lookup_symbol_search_name): New declaration.
11634 (lookup_symbol_in_block): New 'match_type' parameter.
11635
11636 2018-01-05 Pedro Alves <palves@redhat.com>
11637
11638 PR gdb/22670
11639 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
11640 ada_lookup_symbol.
11641 (ada_lookup_symbol): Reimplement in terms of
11642 ada_lookup_symbol_list, bits factored out from
11643 ada_lookup_encoded_symbol.
11644
11645 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11646
11647 * ada-exp.y (write_object_renaming): When subscripting an array
11648 using a symbol as the index, pass the block in call to
11649 ada_lookup_encoded_symbol when looking that symbol up.
11650
11651 2018-01-05 Jerome Guitton <guitton@adacore.com>
11652
11653 * ada-lang.c (ada_array_length): Use ada_index_type instead of
11654 TYPE_INDEX_TYPE.
11655
11656 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11657
11658 * ada-lang.c (ada_to_fixed_value_create): Add handling of
11659 the case where VALUE_LVAL (val0) is not lval_memory.
11660
11661 2018-01-05 Xavier Roirand <roirand@adacore.com>
11662
11663 * ada-valprint.c (print_optional_low_bound): Handle
11664 character-indexed array printing like boolean-indexed array
11665 printing.
11666
11667 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11668
11669 * NEWS: Create a new section for the next release branch.
11670 Rename the section of the current branch, now that it has
11671 been cut.
11672
11673 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11674
11675 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
11676 * version.in: Bump version to 8.1.50.DATE-git.
11677
11678 2018-01-03 Xavier Roirand <roirand@adacore.com>
11679
11680 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
11681 Add field.
11682 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
11683 Add field.
11684 (default_exception_support_info) <catch_handlers_sym>: Add field.
11685 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
11686 (ada_exception_name_addr_1): Add "catch handlers" handling.
11687 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
11688 Update all callers.
11689 (create_excep_cond_exprs) <ex>: Add parameter.
11690 (re_set_exception): Update create_excep_cond_exprs call.
11691 (print_it_exception, print_one_exception, print_mention_exception)
11692 (print_recreate_exception): Add "catch handler" handling.
11693 (allocate_location_catch_handlers, re_set_catch_handlers)
11694 (check_status_catch_handlers, print_it_catch_handlers)
11695 (print_one_catch_handlers, print_mention_catch_handlers)
11696 (print_recreate_catch_handlers): New function.
11697 (catch_handlers_breakpoint_ops): New variable.
11698 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
11699 Add parameter. Add "catch handler" handling.
11700 (ada_exception_sym_name, ada_exception_breakpoint_ops):
11701 Add "catch handler" handling.
11702 (ada_exception_catchpoint_cond_string): Add "catch handler"
11703 handling.
11704 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
11705 call.
11706 (catch_ada_handlers_command): New function.
11707 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
11708 operations structure.
11709 (_initialize_ada_language): Add "catch handlers" command entry.
11710 * NEWS: Document "catch handlers" feature.
11711
11712 2018-01-02 Joel Brobecker <brobecker@adacore.com>
11713
11714 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
11715 account when creating the array type of the slice.
11716 (ada_value_slice): Likewise.
11717
11718 2018-01-02 Joel Brobecker <brobecker@adacore.com>
11719
11720 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
11721 New enum value.
11722 (create_array_type_with_stride): Add byte_stride_prop parameter.
11723 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
11724 New parameter. Update all callers in this file.
11725 (array_type_has_dynamic_stride): New function.
11726 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
11727 of arrays with dynamic byte strides.
11728 * dwarf2read.c (read_array_type): Add support for dynamic
11729 DW_AT_byte_stride attributes.
11730
11731 2018-01-02 Joel Brobecker <brobecker@adacore.com>
11732
11733 * dwarf2read.c (read_unspecified_type): Treat
11734 DW_TAG_enumeration_type DIEs from Ada units as stubs.
11735
11736 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11737
11738 Update copyright year range in all GDB files.
11739
11740 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11741
11742 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
11743 and gdb/testsuite/gdb.base/step-line.c.
11744
11745 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11746
11747 * copyright.py (main): Dump the contents of
11748 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
11749 even if BY_HAND is empty.
11750
11751 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11752
11753 * top.c (print_gdb_version): Update Copyright year in version
11754 message.
11755
11756 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11757
11758 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
11759
11760 For older changes see ChangeLog-2017.
11761 \f
11762 Local Variables:
11763 mode: change-log
11764 left-margin: 8
11765 fill-column: 74
11766 version-control: never
11767 coding: utf-8
11768 End: