a40f39f7bffe0a4cc5383a228dfefb2a896ac5f1
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2018-08-17 Tom Tromey <tom@tromey.com>
2
3 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
4 command_line_input.
5
6 2018-08-15 Tom Tromey <tom@tromey.com>
7
8 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
9
10 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
11
12 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
13 If used, use find_pc_partial_function to find address range
14 to disassemble.
15 * mi/mi-main.c (mi_cmd_list_features): Report
16 "data-disassemble-a-option" feature.
17 * NEWS: Mention new -data-disassemble option -a.
18
19 2018-08-13 Tom Tromey <tom@tromey.com>
20
21 * common/common-defs.h (_FORTIFY_SOURCE): Define.
22
23 2018-08-13 Alan Hayward <alan.hayward@arm.com>
24
25 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
26 (aarch64_linux_collect_sve_regset): Likewise.
27 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
28 * regcache.h (regcache_map_entry_size): New function.
29
30 2018-08-13 Alan Hayward <alan.hayward@arm.com>
31
32 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
33 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
34 (SVE_HEADER_VL_LENGTH): Likewise.
35 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
36 (SVE_HEADER_FLAGS_LENGTH): Likewise.
37 (SVE_HEADER_RESERVED_LENGTH): Likewise.
38 (SVE_HEADER_SIZE_OFFSET): Likewise.
39 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
40 (SVE_HEADER_VL_OFFSET): Likewise.
41 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
42 (SVE_HEADER_FLAGS_OFFSET): Likewise.
43 (SVE_HEADER_RESERVED_OFFSET): Likewise.
44 (SVE_HEADER_SIZE): Likewise.
45 (aarch64_linux_core_read_vq): Add function.
46 (aarch64_linux_core_read_description): Check for SVE section.
47
48 2018-08-13 Alan Hayward <alan.hayward@arm.com>
49
50 * aarch64-fbsd-tdep.c
51 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
52 collect_size.
53 * aarch64-linux-tdep.c
54 (aarch64_linux_iterate_over_regset_sections): Likewise.
55 * alpha-linux-tdep.c
56 (alpha_linux_iterate_over_regset_sections):
57 * alpha-nbsd-tdep.c
58 (alphanbsd_iterate_over_regset_sections): Likewise.
59 * amd64-fbsd-tdep.c
60 (amd64fbsd_iterate_over_regset_sections): Likewise.
61 * amd64-linux-tdep.c
62 (amd64_linux_iterate_over_regset_sections): Likewise.
63 * arm-bsd-tdep.c
64 (armbsd_iterate_over_regset_sections): Likewise.
65 * arm-fbsd-tdep.c
66 (arm_fbsd_iterate_over_regset_sections): Likewise.
67 * arm-linux-tdep.c
68 (arm_linux_iterate_over_regset_sections): Likewise.
69 * corelow.c (get_core_registers_cb): Likewise.
70 (core_target::fetch_registers): Likewise.
71 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
72 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
73 * gdbarch.h (void): Regenerate.
74 * gdbarch.sh: Add supply_size and collect_size.
75 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
76 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
77 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
78 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
79 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
80 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
81 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
82 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
83 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
84 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
85 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
86 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
87 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
88 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
89 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
90 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
91 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
92 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
93 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
94 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
95 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
96 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
97 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
98 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
99 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
100 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
101 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
102 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
103 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
104 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
105
106 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
107
108 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
109 with string_printf.
110
111 2018-08-10 Keith Seitz <keiths@redhat.com>
112
113 * compile/compile-c-support.c (add_code_header, add_code_footer):
114 Move into policy class.
115 (c_push_user_expression, pop_user_expression_nop)
116 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
117 (compile_program): New host class.
118 (c_compile_program): New typedef.
119 (c_compute_porgram): Use c_compile_program.
120
121 2018-08-10 Keith Seitz <keiths@redhat.com>
122
123 * compile/compile-internal.h (compile_instance::~compile_instance):
124 Remove calls to htab_delete.
125 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
126 * compile.c (compile_instance::compile_instance): Initialize
127 htab unique pointers.
128 (compile_instance::get_cached_type, compile_instance::insert_type)
129 (compile_instance::error_symbol_once): Update for unique_ptr.
130
131 2018-08-10 Keith Seitz <keiths@redhat.com>
132
133 * compile/compile-c-symbols.c (struct symbol_error)
134 (hash_symbol_error, eq_symbol_error, del_symbol_error)
135 (compile_instance::insert_symbol_error)
136 (compile_instance::error_symbol_once): Move to ...
137 * compile/compile.c: ... here.
138
139 2018-08-10 Keith Seitz <keiths@redhat.com>
140
141 * compile/compile-c-support.c (c_get_compile_context): Use `new'
142 instead of `new_compile_instance'.
143 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
144 Update description.
145 If the symbol error map is not initialized, create it.
146 (generate_c_for_for_one_symbol): Do not check/initialize
147 the symbol error map.
148 * compile/compile-c-types.c (compile_c_instance): Make a class.
149 Update all callers.
150 (compile_instance::compile_instance): Initialize the type cache.
151 (get_cached_type): New function.
152 (insert_type): Update description.
153 (compile_c_instance::m_default_cflags): Define.
154 (convert_type): Update description. Use get_cached_type.
155 (delete_instance): Moved to destructor.
156 (new_compile_instance): Moved to constructor.
157 * compile/compile-c.h (compile_c_instance): Make class inheriting
158 from compile_instance.
159 <base>: Remove field.
160 <type_map, symbol_err_map>: Move to base class.
161 <c_plugin>: Rename to `m_plugin' and remove pointer type.
162 * compile/compile-internal.h (compile_instance): Make class.
163 <type_map_t, symbol_err_map_t>: Define.
164 <fe>: Rename to `m_gcc_fe'.
165 <scope, block, gcc_target_options>: Add `m_' prefix.
166 <m_type_map, m_symbol_err_map>: New fields, moved from
167 compile_c_instance.
168 <destroy>: Remove.
169 (convert_type, new_compile_instance): Remove.
170 * compile/compile.c (cleanup_compile_instance): Remove.
171 (compile_to_object): Use unique_ptr to eliminate cleanups.
172 (compile_instance::set_print_callback, compile_instance::version)
173 (compile_instance::set_verbose)
174 (compile_instance::set_driver_filename)
175 (compile_instance::set_triplet_regexp)
176 (compile_instance::set_arguments)
177 (compile_instance::set_source_file)
178 (compile_instance::compile): Define.
179
180 2018-08-10 Keith Seitz <keiths@redhat.com>
181
182 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
183 * compile/compile-c-types.c: Define GCC_METHODN macros and include
184 gcc-c-fe.def to define C plugin.
185 (delete_instance): Delete `c_plugin'.
186 (new_compile_instance): Initialize `c_plugin'.
187 * compile/compile-c.h: Include gcc_c_plugin.h.
188 (struct compile_c_instance) <c_plugin>: New member.
189 * gcc-c-plugin.h: New file.
190 Update all callers with API change.
191
192 2018-08-10 Keith Seitz <keiths@redhat.com>
193
194 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
195 (HFILES_NO_SRCDIR): ... to here.
196 Add compile-internal.h and compile-c.h.
197 * compile/compile-c-support.c: Include compile-c.h.
198 * compile/compile-c-symbols.c: Include compile-c.h.
199 (generate_c_for_variable_locations): Update comment.
200 * compile/compile-c-types.c: Include compile-c.h.
201 * compile/compile-c.h: New file -- moved C language declarations
202 from other files here.
203 * compile/compile-internal.h: Do not include hashtab.h or
204 common/enum-flags.h.
205 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
206 (gcc_convert_symbol, gcc_symbol_address)
207 (generate_c_for_variable_locations, c_get_mode_for_size)
208 (c_get_range_decl_name): Definitions moved to compile-c.h.
209 * compile/compile-loc2c.c: Include compile-c.h.
210
211 2018-08-10 Keith Seitz <keiths@redhat.com>
212
213 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
214 (c_symbol_substitution_name): ... this.
215 Update all callers.
216
217 2018-08-10 Keith Seitz <keiths@redhat.com>
218
219 * compile/compile-c-support.c (c_compute_program): Use
220 unique_xmalloc_ptr to eliminate cleanup.
221 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
222 Return a unique_xmalloc_ptr and eliminate cleanup.
223 * compile/compile-internal.h (generate_c_for_variable_locations):
224 Return unique_xmalloc_ptr and update description.
225
226 2018-08-10 Alan Hayward <alan.hayward@arm.com>
227
228 * corelow.c (core_target::get_core_register_section): Rename
229 min_size to section_min_size.
230
231 2018-08-09 Jim Wilson <jimw@sifive.com>
232
233 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
234 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
235 * NEWS: Mention new GNU/Linux RISC-V target.
236 * configure.host: Add riscv*-*-linux*.
237 * configure.nat: Add riscv*.
238 * configure.tgt: Add riscv*-*-linux*.
239 * riscv-linux-nat.c: New file.
240 * riscv-linux-tdep.c: New file.
241
242 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
243
244 * infrun.c (resume): Make static, add forward declaration.
245 (proceed): Update header comment.
246 * infrun.h (resume): Delete declaration.
247
248 2018-08-09 Tom Tromey <tom@tromey.com>
249
250 * riscv-tdep.h: Minor formatting fixes.
251
252 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
253
254 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
255 * dwarf-index-cache.c (create_dir_and_check): Likewise.
256 (test_mkdir_recursive): Likewise.
257 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
258
259 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
260
261 * valarith.c (value_subscripted_rvalue): If an array is not in
262 memory, and we don't know the upper bound, then we can't know that
263 the requested element exists or not.
264
265 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
266
267 * target.c (str_comma_list_concat_elem): Fix typo in comment.
268 (target_options_to_string): Add comment.
269
270 2018-08-08 Tom Tromey <tom@tromey.com>
271
272 * unittests/scoped_mmap-selftests.c: Check result of "write".
273
274 2018-08-08 Jim Wilson <jimw@sifive.com>
275
276 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
277 (decode_register_index_short): New.
278 (decode_j_type_insn, decode_cj_type_insn): New.
279 (decode_b_type_insn, decode_cb_type_insn): New.
280 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
281 local xlen. Check xlen when decoding ambiguous compressed insns. In
282 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
283 is_c_sw_insn instead of is_sw_insn.
284 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
285 (riscv_software_single_step): New.
286 * riscv-tdep.h (riscv_software_single_step): Declare.
287
288 * riscv-tdep.c (riscv_isa_xlen): Drop static.
289 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
290
291 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
292
293 PR gdb/18050:
294 * target.c (dispose_inferior): Don't dispose of inferiors that are
295 already killed.
296
297 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
298
299 * remote.c (remote_target::download_tracepoint): Change char* to
300 const char*.
301
302 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
303
304 * target.h (target_options_to_string): Return an std::string.
305 * target.c (str_comma_list_concat_elem): Return void, use
306 std::string.
307 (do_option): Likewise.
308 (target_options_to_string): Return an std::string.
309 * linux-nat.c (linux_nat_target::wait): Adjust.
310 * target-debug.h (target_debug_print_options): Adjust.
311
312 2018-08-07 Tom Tromey <tom@tromey.com>
313
314 * Makefile.in (CPPFLAGS): New variable.
315 (INTERNAL_CPPFLAGS): Use it.
316
317 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
318
319 * NEWS: Mention the index cache.
320
321 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
322
323 * common/pathstuff.h (get_standard_cache_dir): New.
324 * common/pathstuff.c (get_standard_cache_dir): New.
325 * build-id.h (build_id_to_string): New.
326 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
327 DEBUG_STR_SUFFIX): Move to here.
328 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
329 DEBUG_STR_SUFFIX): Move from there.
330 (write_psymtabs_to_index): Make non-static, add basename
331 parameter. Write to temporary files, rename when done.
332 (save_gdb_index_command): Adjust call to
333 write_psymtabs_to_index.
334 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
335 field.
336 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
337 (get_gdb_index_contents_from_cache): New.
338 (get_gdb_index_contents_from_cache_dwz): New.
339 (dwarf2_initialize_objfile): Read index from cache.
340 (dwarf2_build_psymtabs): Save to index.
341 * dwarf-index-cache.h: New file.
342 * dwarf-index-cache.c: New file.
343 * dwarf-index-write.h: New file.
344
345 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
346
347 * gnulib/aclocal.m4: Re-generate.
348 * gnulib/config.in: Re-generate.
349 * gnulib/configure: Re-generate.
350 * gnulib/import/Makefile.am: Re-generate.
351 * gnulib/import/Makefile.in: Re-generate.
352 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
353 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
354 * gnulib/import/m4/mkdir.m4: New file.
355 * gnulib/import/mkdir.c: New file.
356 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
357 module.
358
359 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
360
361 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
362 * common/scoped_mmap.c: New file.
363 * common/scoped_mmap.h (destroy): New method.
364 (~scoped_mmap, reset): Use destroy.
365 (scoped_mmap): New move constructor.
366 (mmap_file): New declaration.
367 * unittests/scoped_mmap-selftests.c (test_normal,
368 test_invalid_filename, run_tests): New functions.
369 (_initialize_scoped_mmap_selftests): Register selftest.
370
371 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
372
373 * dwarf2read.c (read_gdb_index_from_section): Rename to...
374 (read_gdb_index_from_buffer): ... this. Remove section
375 parameter, add buffer parameter.
376 (get_gdb_index_contents_ftype,
377 get_gdb_index_contents_dwz_ftype): New typedefs.
378 (dwarf2_read_gdb_index): Add callback parameters to get the
379 index contents.
380 (get_gdb_index_contents_from_section): New.
381 (dwarf2_initialize_objfile): Update call to
382 dwarf2_read_gdb_index.
383
384 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
385
386 * common/filestuff.h (gdb_fopen_cloexec): New overload.
387 (gdb_open_cloexec): Likewise.
388 * nat/linux-osdata.c (command_from_pid): Use string_printf.
389 (commandline_from_pid): Likewise.
390 (linux_xfer_osdata_threads): Likewise.
391 (linux_xfer_osdata_fds): Likewise.
392 * ada-lang.c (is_package_name): Likewise.
393 * auxv.c (procfs_xfer_auxv): Likewise.
394 * breakpoint.c (print_one_breakpoint_location): Use
395 uiout::field_fmt.
396 (print_one_catch_solib): Use string_printf.
397 * coff-pe-read.c (add_pe_exported_sym): Likewise.
398 (add_pe_forwarded_sym): Likewise.
399 * dwarf2read.c (create_type_unit_group): Likewise.
400 (build_error_marker_type): Likewise.
401 * infcall.c (get_function_name): Likewise.
402 * valprint.c (print_converted_chars_to_obstack): Likewise.
403 * xtensa-tdep.c (xtensa_register_type): Likewise.
404
405 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
406
407 * remote.c (remote_target::download_tracepoint): Fix format
408 string errors.
409
410 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
411
412 * tracefile.c: Include common/byte-vector.h.
413 (trace_save): Change type of buf to gdb::byte_vector. Initialize
414 with trace_regblock_size if needed. Update uses of buf.
415
416 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
417
418 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
419 std::vector<unsigned char>.
420 * tracepoint.c (collection_list::collection_list): Remove
421 m_regs_mask initializer from initializer list. Resize
422 m_regs_mask using the largest remote register number.
423 (collection_list::add_remote_register): Remove size check on
424 m_regs_mask. Use at to access element.
425 (collection_list::stringify): Change type of temp_buf to
426 gdb::char_vector. Update uses of temp_buf. Resize if needed to
427 stringify the register mask. Use pack_hex_byte for the register
428 mask.
429
430 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
431
432 * tracepoint.h (class collection_list) <add_register>: Remove.
433 <add_remote_register, add_ax_registers, add_local_register>:
434 Declare.
435 <add_memrange>: Add scope parameter.
436 * tracepoint.c (encode_actions_1): Likewise.
437 (collection_list::add_register): Rename to ...
438 (collection_list::add_remote_register): ... this. Update
439 comment.
440 (collection_list::add_ax_registers, add_local_register): New
441 methods.
442 (collection_list::add_memrange): Add scope parameter. Call
443 add_local_register instead of add_register.
444 (finalize_tracepoint_aexpr): New function.
445 (collection_list::collect_symbol): Update calls to add_memrange.
446 Call add_local_register instead of add_register. Call
447 add_ax_registers. Call finalize_tracepoint_aexpr.
448 (encode_actions_1): Get remote regnos for $reg action. Call
449 add_remote_register, add_ax_registers, and add_local_register.
450 Update call to add_memrange. Call finalize_tracepoint_aexpr.
451 (validate_actionline): Call finalize_tracepoint_aexpr.
452
453 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
454
455 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
456 Replace array buf with gdb::char_vector buf, of size
457 get_remote_packet_size (). Replace references to buf and
458 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
459 and xsnprintf with snprintf. Raise errors if the buffer is too
460 small.
461
462 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
463
464 * remote.c (remote_target::download_tracepoint): Fix the has_more
465 predicate in the QTDP action list iteration.
466
467 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
468
469 * remote.c (remote_target::download_tracepoint): Fix indentation
470 in for block.
471
472 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
473
474 * proc-api.c (_initialize_proc_api): Remove c, unused.
475 * procfs.c (procfs_init_inferior): Remove signals, unused.
476 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
477 unused.
478
479 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
480 Andrew Burgess <andrew.burgess@embecosm.com>
481
482 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
483 'W_STOPCODE (0)' as this could be ambiguous.
484
485 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
486
487 * ser-tcp.c (net_open): Fix thinko when deciding whether to
488 disable TCP's Nagle algorithm (use "ai_protocol" instead of
489 "ai_socktype").
490
491 2018-08-02 Tom Tromey <tom@tromey.com>
492
493 PR symtab/16842.
494 * dwarf2read.c (read_func_scope): Set symtab on template parameter
495 symbols.
496 (process_structure_scope): Likewise.
497
498 2018-08-02 Xavier Roirand <roirand@adacore.com>
499
500 PR gdb/22629:
501 * darwin-nat.c (darwin_kill_inferior): Fix handling of
502 kill inferior.
503
504 2018-08-02 Tom Tromey <tom@tromey.com>
505
506 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
507 (darwin_suspend_inferior, darwin_resume_inferior)
508 (darwin_decode_notify_message, darwin_resume_inferior_threads)
509 (darwin_check_new_threads): Check result of get_darwin_inferior.
510
511 2018-07-31 Joel Brobecker <brobecker@adacore.com>
512
513 GDB 8.1.1 released.
514
515 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
516
517 * varobj.c (varobj_get_path_expr_parent): Report an error if
518 parent is a dynamic varobj.
519
520 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
521
522 * gnulib/aclocal.m4: Re-generate.
523 * gnulib/config.in: Re-generate.
524 * gnulib/configure: Re-generate.
525 * gnulib/import/Makefile.in: Re-generate.
526 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
527 * gnulib/import/m4/onceonly.m4: Re-generate.
528
529 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
530
531 * target-descriptions.c (struct xml_test_tdesc): New.
532 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
533 (record_xml_tdesc): Update.
534 (maintenance_check_xml_descriptions): Update.
535 * target-descriptions.h (record_xml_tdesc): Update comment.
536
537 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
538
539 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
540 checking array bounds are defined.
541
542 2018-07-30 Tom Tromey <tom@tromey.com>
543
544 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
545 irreflexivity violation.
546
547 2018-07-30 Tom Tromey <tom@tromey.com>
548
549 * cli/cli-decode.c (lookup_cmd): Remove lint code.
550 * value.c (unpack_long): Remove lint code.
551 * valops.c (value_ind): Remove lint code.
552 * valarith.c (value_x_binop, value_x_unop, value_equal)
553 (value_pos): Remove lint code.
554
555 2018-07-28 Tom de Vries <tdevries@suse.de>
556
557 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
558 with undefined upper bound as <optimized out>.
559
560 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
561
562 * gcore.in: Rename variable "name" to "prefix". Expand
563 "usage" text.
564
565 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
566
567 * windows-nat.c (windows_nat_target::create_inferior): Update to
568 call close() in global namespace.
569
570 2018-07-26 Tom Tromey <tom@tromey.com>
571
572 * dwarf-index-write.c (add_address_entry): Don't add objfile
573 offsets.
574 * dbxread.c (find_stab_function): Rename from
575 find_stab_function_addr. Return a bound_minimal_symbol.
576 (read_dbx_symtab): Use raw_text_low, raw_text_high.
577 Don't add objfile offsets.
578 (end_psymtab): Use raw_text_low, raw_text_high,
579 MSYMBOL_VALUE_RAW_ADDRESS.
580 (read_ofile_symtab): Update.
581 (process_one_symbol): Update.
582 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
583 offsets.
584 (dw2_relocate): Remove.
585 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
586 searching addrmap.
587 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
588 Update.
589 (process_psymtab_comp_unit_reader, add_partial_symbol)
590 (add_partial_subprogram, dwarf2_ranges_read): Update.
591 (load_partial_dies): Update.
592 (add_address_entry): Don't add objfile offsets.
593 (dwarf2_build_include_psymtabs): Update.
594 (create_addrmap_from_aranges): Don't add objfile offsets.
595 (dw2_find_pc_sect_compunit_symtab): Update.
596 * mdebugread.c (parse_symbol): Don't add objfile offsets.
597 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
598 Update.
599 (parse_partial_symbols): Don't add objfile offsets. Use
600 raw_text_low, raw_text_high. Update.
601 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
602 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
603 or call 'relocate' quick function. Clear psymbol_map.
604 * psympriv.h (struct partial_symbol) <address>: Add section
605 offset.
606 <set_unrelocated_address>: Rename from set_address.
607 <raw_text_low, raw_text_high>: New methods.
608 <text_low, text_high>: Add objfile parameter.
609 (add_psymbol_to_bcache): Add 'section' parameter. Call
610 set_unrelocated_address.
611 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
612 (find_pc_psymbol): Update.
613 (fixup_psymbol_section, relocate_psymtabs): Remove.
614 (dump_psymtab, psym_functions): Update.
615 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
616 parameter.
617 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
618 (start_psymtab_common): Update.
619 * symfile-debug.c (debug_qf_relocate): Remove.
620 (debug_sym_quick_functions): Update.
621 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
622 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
623 Update.
624
625 2018-07-26 Tom Tromey <tromey@redhat.com>
626
627 * dbxread.c (end_psymtab): Use text_high_valid and
628 text_low_valid.
629 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
630 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
631 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
632 Update comment.
633 <text_low_valid, text_high_valid>: New fields.
634 <set_text_low, set_text_high>: Update.
635 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
636
637 2018-07-26 Tom Tromey <tom@tromey.com>
638
639 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
640 Update.
641 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
642 textlow and texthigh fields.
643 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
644 Update.
645 * mdebugread.c (parse_lines, parse_partial_symbols)
646 (psymtab_to_symtab_1): Update.
647 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
648 Rename fields. Update comment. Now private.
649 <text_low, text_high, set_text_low, set_text_high>: New methods.
650 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
651 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
652 (start_psymtab_common, maintenance_info_psymtabs)
653 (maintenance_check_psymtabs): Update.
654 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
655 texthigh fields.
656 (scan_xcoff_symtab): Update.
657
658 2018-07-26 Tom Tromey <tromey@redhat.com>
659
660 * psympriv.h (struct partial_symbol) <unrelocated_address,
661 address, set_address>: New methods.
662 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
663 (fixup_psymbol_section, relocate_psymtabs): Update.
664 (print_partial_symbols): Add 'objfile' parameter. Update.
665 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
666 Update.
667
668 2018-07-26 Tom Tromey <tom@tromey.com>
669
670 * dwarf-index-write.c (write_psymbols, debug_names::insert)
671 (debug_names::write_psymbols): Update.
672 * psympriv.h (struct partial_symbol): Derive from
673 general_symbol_info.
674 <obj_section>: New method.
675 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
676 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
677 (find_pc_sect_psymbol, fixup_psymbol_section)
678 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
679 (print_partial_symbols, recursively_search_psymtabs)
680 (compare_psymbols, psymbol_hash, psymbol_compare)
681 (add_psymbol_to_bcache, maintenance_check_psymtabs)
682 (psymbol_name_matches, psym_fill_psymbol_map): Update.
683
684 2018-07-26 Tom Tromey <tromey@redhat.com>
685
686 * dbxread.c (end_psymtab): Remove dead code.
687
688 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
689
690 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
691 DWARF unwinders are disabled.
692 * dwarf2-frame.c: Add dwarf2read.h include.
693 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
694 disabled.
695 (dwarf2_frame_unwinders_enabled_p): Define.
696 (show_dwarf_unwinders_enabled_p): New function.
697 (_initialize_dwarf2_frame): Register switch to control DWARF
698 unwinder use.
699 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
700 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
701 (show_dwarf_cmdlist): Remove static keyword.
702 * dwarf2read.h (set_dwarf_cmdlist): Declare.
703 (show_dwarf_cmdlist): Declare.
704 * NEWS: Document new feature.
705
706 2018-07-26 Tom de Vries <tdevries@suse.de>
707
708 PR breakpoints/23366
709 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
710
711 2018-07-26 Tom de Vries <tdevries@suse.de>
712
713 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
714 DW_AT_count can't be translated to a dynamic prop.
715
716 2018-07-25 Tom de Vries <tdevries@suse.de>
717
718 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
719 try/catch.
720
721 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
722
723 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
724
725 2018-07-25 Joel Brobecker <brobecker@adacore.com>
726
727 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
728
729 2018-07-24 Keith Seitz <keiths@redhat.comt
730
731 PR symtab/23010
732 * dwarf2read.c (dw2_add_symbol_to_list): New function.
733 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
734 instead of add_symbol_to_list.
735 (read_file_scope): Call prepare_one_comp_unit before reading
736 any other DIEs.
737
738 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
739
740 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
741
742 2018-07-24 Tom Tromey <tom@tromey.com>
743
744 * utils.c (malloc, realloc, free): Don't declare.
745 * configure, config.in: Rebuild.
746 * configure.ac: Don't check for declarations of free, malloc, or
747 realloc.
748
749 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
750
751 * aarch64-linux-nat.c
752 (aarch64_linux_nat_target::stopped_data_address): Remove unused
753 variable.
754 * arm-linux-nat.c (fetch_regs): Likewise.
755 (store_regs): Likewise.
756 (fetch_vfp_regs): Likewise.
757 (store_vfp_regs): Likewise.
758 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
759 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
760 (arm_linux_nat_target::insert_watchpoint): Likewise.
761 (arm_linux_nat_target::remove_watchpoint): Likewise.
762 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
763 Likewise.
764 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
765 Likewise.
766 * ppc-linux-nat.c (fetch_register): Likewise.
767 (fetch_all_gp_regs): Likewise.
768 (fetch_ppc_registers): Likewise.
769 (store_all_gp_regs): Likewise.
770 (store_ppc_registers): Likewise.
771 (hwdebug_insert_point): Likewise.
772 (can_use_watchpoint_cond_accel): Likewise.
773 * remote-sim.c (gdb_os_write_stdout): Likewise.
774
775 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
776 Tom Tromey <tom@tromey.com>
777
778 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
779 test for it.
780 * configure: Rebuild.
781
782 2018-07-22 Tom Tromey <tom@tromey.com>
783
784 * regformats/regdat.sh: Define xmltarget_${name} inside
785 #ifndef IN_PROCESS_AGENT.
786
787 2018-07-22 Tom Tromey <tom@tromey.com>
788
789 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
790
791 2018-07-22 Tom Tromey <tom@tromey.com>
792
793 * symfile.c (reread_symbols): Notify iter, not objfile.
794
795 2018-07-22 Tom Tromey <tom@tromey.com>
796
797 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
798 Use arch_ops.
799 (ravenscar_thread_target::prepare_to_store): Likewise.
800
801 2018-07-22 Tom Tromey <tom@tromey.com>
802
803 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
804 unused variable. Call value_fetch_lazy when needed.
805 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
806 Remove unused variable. Call value_fetch_lazy when needed.
807
808 2018-07-22 Tom Tromey <tom@tromey.com>
809
810 * m32c-tdep.c (mark_dma): Return void.
811 (make_regs): Remove unused declarations.
812
813 2018-07-22 Tom Tromey <tom@tromey.com>
814
815 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
816 cmdscm_get_valid_command_smob_arg_unsafe for effect.
817 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
818 bkscm_get_valid_block_smob_arg_unsafe for effect.
819
820 2018-07-22 Tom Tromey <tom@tromey.com>
821
822 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
823 value_type.
824
825 2018-07-22 Tom Tromey <tom@tromey.com>
826
827 * windows-nat.c (saved_context): Conditionally define.
828 * remote.c (remote_target::remote_btrace_maybe_reopen):
829 Conditionally declare "warned".
830 * inflow.c (sigquit_ours): Conditionally define.
831 (new_tty): Move "tty" declaration inside #if.
832 * guile/guile.c (guile_datadir): Conditionally define.
833 * charset.c (set_be_le_names): Move some declarations inside #if.
834 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
835 #if.
836 (parse_xml_btrace_conf): Likewise.
837
838 2018-07-22 Tom Tromey <tom@tromey.com>
839
840 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
841
842 2018-07-22 Tom Tromey <tom@tromey.com>
843
844 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
845 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
846 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
847 * buildsym-legacy.c (get_macro_table): Remove unused variable.
848 * stack.c (frame_apply_level_command): Remove unused variable.
849 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
850 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
851 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
852 unused variable.
853 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
854 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
855 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
856 variable.
857 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
858 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
859 variable.
860 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
861 Remove unused variable.
862 * cli/cli-script.c (recurse_read_control_structure): Remove unused
863 variable.
864 * common/tdesc.c (print_xml_feature::visit): Remove unused
865 variable.
866 * compile/compile-object-load.c (store_regs): Remove unused
867 variables.
868 * complaints.c (clear_complaints): Remove unused variable.
869 * corelow.c (core_target_open): Remove unused variable.
870 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
871 variable.
872 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
873 variable.
874 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
875 variable.
876 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
877 variable.
878 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
879 variable.
880 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
881 variable.
882 * ia64-tdep.c (examine_prologue): Remove unused variable.
883 * infcall.c (run_inferior_call): Remove unused variable.
884 * inferior.c (exit_inferior): Remove unused variable.
885 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
886 * linespec.c (decode_line_2): Remove unused variable.
887 * linux-nat.c (super_close): Remove.
888 * linux-tdep.c (linux_info_proc): Remove unused variable.
889 * mi/mi-main.c (mi_execute_command): Remove unused variable.
890 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
891 Remove unused variable.
892 * parse.c (find_minsym_type_and_address): Remove unused variable.
893 * printcmd.c (info_symbol_command, printf_floating): Remove unused
894 variable.
895 * python/py-breakpoint.c (bppy_set_commands): Remove unused
896 variable.
897 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
898 variables.
899 * record-btrace.c (record_btrace_target::store_registers): Remove
900 unused variable.
901 (cmd_show_record_btrace_cpu): Remove unused variable.
902 * riscv-tdep.c (riscv_register_reggroup_p)
903 (riscv_push_dummy_call, riscv_return_value): Remove unused
904 variable.
905 * rust-exp.y (literal): Remove unused variable.
906 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
907 unused variable.
908 <STRUCTOP_ANONYMOUS>: Likewise.
909 * s390-linux-tdep.c (s390_linux_init_abi_31)
910 (s390_linux_init_abi_64): Remove unused variable.
911 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
912 (file_select_thread, net_windows_open, _initialize_ser_windows):
913 Remove unused variables.
914 * symtab.c (find_pc_sect_line): Remove unused variable.
915 * target-memory.c (compute_garbled_blocks): Remove unused
916 variable.
917 (target_write_memory_blocks): Remove unused variable.
918 * target.c (target_stack::unpush): Remove unused variables.
919 * tracepoint.c (start_tracing, all_tracepoint_actions)
920 (merge_uploaded_trace_state_variables)
921 (print_one_static_tracepoint_marker): Remove unused variable.
922 * unittests/basic_string_view/element_access/char/1.cc (test01):
923 Remove unused variable.
924 * windows-nat.c (windows_continue, windows_add_all_dlls)
925 (do_initial_windows_stuff, windows_nat_target::create_inferior):
926 Remove unused variables.
927
928 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
929
930 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
931 attr_profile in HAVE_ELF.
932 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
933 HAVE_ELF.
934
935 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
936
937 * frame.c (frame_register_unwind): Change parameter name.
938 (frame_unwind_register): Likewise.
939 (frame_unwind_register_value): Likewise.
940 (frame_unwind_register_signed): Likewise.
941 (frame_unwind_register_unsigned): Likewise.
942 * frame.h (frame_register_unwind): Likewise.
943 (frame_unwind_register): Likewise.
944 (frame_unwind_register_value): Likewise.
945 (frame_unwind_register_signed): Likewise.
946 (frame_unwind_register_unsigned): Likewise.
947 (frame_unwind_arch): Likewise.
948
949 2018-07-20 Maciej W. Rozycki <macro@mips.com>
950
951 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
952 ISA maintenance.
953
954 2018-07-20 Maciej W. Rozycki <macro@mips.com>
955
956 * mips-linux-nat.c (mips_linux_nat_target::read_description):
957 Call `get_ptrace_pid' rather than extracting the ptrace PID by
958 hand.
959
960 2018-07-20 Keith Seitz <keiths@redhat.com>
961
962 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
963 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
964 m_compunit_symtab, m_language>: Add "m_" prefix.
965 Update all uses.
966 * buildsym.c: Update all uses.
967
968 2018-07-20 Tom Tromey <tom@tromey.com>
969
970 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
971 * buildsym.h (record_line_ftype): Remove typedef.
972
973 2018-07-20 Tom Tromey <tom@tromey.com>
974
975 * buildsym-legacy.h (augment_type_symtab): Don't declare.
976 (end_expandable_symtab): Likewise.
977 (end_symtab_get_static_block): Likewise.
978 (end_symtab_from_static_block): Likewise.
979 * buildsym-legacy.c (augment_type_symtab): Remove.
980 (end_expandable_symtab): Remove.
981 (end_symtab_get_static_block): Remove.
982 (end_symtab_from_static_block): Remove.
983
984 2018-07-20 Tom Tromey <tom@tromey.com>
985
986 * dwarf2read.c: Include buildsym.h.
987 (struct dwarf2_cu) <builder>: New method.
988 (fixup_go_packaging): Update.
989 (process_full_comp_unit, process_full_type_unit): Update. Don't
990 use scoped_free_pendings.
991 (using_directives): Add "cu" parameter, remove "language".
992 (read_import_statement, setup_type_unit_groups, )
993 (read_func_scope, read_lexical_block_scope)
994 (dwarf2_record_block_ranges, read_namespace): Update.
995 (lnp_state_machine::lnp_state_machine): Add cu parameter.
996 (lnp_state_machine::handle_end_sequence): Update.
997 (class lnp_state_machine) <m_cu>: New member.
998 <m_record_line_callback>: Remove.
999 <m_currently_recording_lines>: New member.
1000 (lnp_state_machine::handle_set_file): Update.
1001 (noop_record_line): Remove.
1002 (dwarf_record_line_p): Add cu parameter.
1003 (dwarf_record_line_1, dwarf_finish_line): Likewise.
1004 (lnp_state_machine::record_line)
1005 (lnp_state_machine::lnp_state_machine)
1006 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
1007 (dwarf_decode_lines): Update.
1008 (dwarf2_start_subfile): Add cu parameter.
1009 (dwarf2_start_symtab, new_symbol): Update.
1010 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
1011 Remove dwarf2_per_objfile parameter.
1012 (dwarf_decode_macros): Update.
1013
1014 2018-07-20 Tom Tromey <tom@tromey.com>
1015
1016 * stabsread.c (define_symbol): Update.
1017 * buildsym-legacy.h (get_buildsym_compunit): Declare.
1018 * dwarf2read.c (new_symbol): Update.
1019 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
1020 * cp-namespace.c: Include buildsym.h.
1021 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
1022 * buildsym-legacy.c (get_buildsym_compunit): New function.
1023
1024 2018-07-20 Tom Tromey <tom@tromey.com>
1025
1026 * xcoffread.c: Include buildsym-legacy.h.
1027 * windows-nat.c: Include buildsym-legacy.h.
1028 * stabsread.c: Include buildsym-legacy.h.
1029 * mdebugread.c: Include buildsym-legacy.h.
1030 * buildsym-legacy.h: New file.
1031 * buildsym-legacy.c: New file, from buildsym.c.
1032 * go32-nat.c: Include buildsym-legacy.h.
1033 * dwarf2read.c: Include buildsym-legacy.h.
1034 * dbxread.c: Include buildsym-legacy.h.
1035 * cp-namespace.c: Include buildsym-legacy.h.
1036 * coffread.c: Include buildsym-legacy.h.
1037 * buildsym.h: Move some contents to buildsym-legacy.h.
1038 * buildsym.c: Include buildsym-legacy.h. Move many functions to
1039 buildsym-legacy.c.
1040 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
1041
1042 2018-07-20 Tom Tromey <tom@tromey.com>
1043
1044 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
1045 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
1046 (buildsym_compunit::buildsym_compunit)
1047 (buildsym_compunit::~buildsym_compunit)
1048 (buildsym_compunit::get_macro_table): Define.
1049
1050 2018-07-20 Tom Tromey <tom@tromey.com>
1051
1052 * buildsym.c (reset_symtab_globals): Remove.
1053 (buildsym_compunit::end_symtab_from_static_block): Update.
1054 (buildsym_compunit::augment_type_symtab): Update.
1055 (end_symtab_from_static_block): Call free_buildsym_compunit.
1056 (augment_type_symtab, end_symtab, end_expandable_symtab):
1057 Likewise.
1058
1059 2018-07-20 Tom Tromey <tom@tromey.com>
1060
1061 * arch-utils.c: Do not include buildsym.h.
1062 * mipsread.c: Do not include buildsym.h.
1063 * machoread.c: Do not include buildsym.h.
1064 * elfread.c: Do not include buildsym.h.
1065
1066 2018-07-20 Tom Tromey <tom@tromey.com>
1067
1068 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
1069 initialization.
1070 (buildsym_compunit): Add new constructor.
1071 (struct buildsym_compunit) <get_last_source_file, finish_block,
1072 record_block_range, start_subfile, patch_subfile_names,
1073 push_subfile, pop_subfile, record_line, get_compunit_symtab,
1074 set_last_source_start_addr, get_last_source_start_addr,
1075 get_local_using_directives, set_local_using_directives,
1076 get_global_using_directives, outermost_context_p,
1077 get_current_context_stack, get_context_stack_depth,
1078 get_current_subfile, get_local_symbols, get_file_symbols,
1079 get_global_symbols, record_debugformat, record_producer,
1080 push_context, pop_context, end_symtab_get_static_block,
1081 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
1082 New public methods.
1083 <record_pending_block, finish_block_internal, make_blockvector,
1084 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
1085 private methods.
1086 Update all users.
1087
1088 2018-05-22 Tom Tromey <tom@tromey.com>
1089
1090 * buildsym.c (record_pending_block): Move earlier. Remove objfile
1091 parameter.
1092 (finish_block_internal): Update.
1093
1094 2018-07-20 Tom Tromey <tom@tromey.com>
1095
1096 * buildsym.c (record_pending_block): Move earlier. Remove objfile
1097 parameter.
1098 (finish_block_internal): Update.
1099
1100 2018-07-20 Tom Tromey <tom@tromey.com>
1101
1102 * buildsym.h (EXTERN): Don't define or undef.
1103 * buildsym.c (EXTERN): Don't define.
1104
1105 2018-07-20 Tom Tromey <tom@tromey.com>
1106
1107 * buildsym.c: Remove TODO comment.
1108
1109 2018-07-20 Tom Tromey <tom@tromey.com>
1110
1111 * coffread.c (coff_symtab_read): Update.
1112 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
1113 (xcoff_new_init): Update.
1114 * mipsread.c (mipscoff_new_init): Update.
1115 * mdebugread.c (mdebug_build_psymtabs): Update.
1116 * elfread.c (elf_new_init): Update.
1117 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1118 Update.
1119 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
1120 (coffstab_build_psymtabs, elfstab_build_psymtabs)
1121 (stabsect_build_psymtabs): Update.
1122 * buildsym.h (buildsym_init): Don't declare.
1123 * buildsym.c: Update comment.
1124 (prepare_for_building): Remove.
1125 (start_symtab, restart_symtab): Update.
1126 (reset_symtab_globals): Update comment.
1127 (buildsym_init): Remove.
1128
1129 2018-07-20 Tom Tromey <tom@tromey.com>
1130
1131 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
1132 * stabsread.c (patch_block_stabs, define_symbol, read_type)
1133 (read_enum_type, common_block_start, common_block_end)
1134 (cleanup_undefined_types_1, finish_global_stabs): Update.
1135 * mdebugread.c (psymtab_to_symtab_1): Update.
1136 * dwarf2read.c (fixup_go_packaging, read_func_scope)
1137 (read_lexical_block_scope, new_symbol): Update.
1138 * dbxread.c (process_one_symbol): Update.
1139 * coffread.c (coff_symtab_read, process_coff_symbol)
1140 (coff_read_enum_type): Update.
1141 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
1142 declare.
1143 (get_local_symbols, get_file_symbols, get_global_symbols): New
1144 functions.
1145 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
1146 m_global_symbols.
1147 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
1148 (~scoped_free_pendings): Update.
1149 (finish_block, prepare_for_building, reset_symtab_globals)
1150 (end_symtab_get_static_block, end_symtab_with_blockvector)
1151 (augment_type_symtab, push_context): Update.
1152 (get_local_symbols, get_file_symbols, get_global_symbols): New
1153 functions.
1154 (buildsym_init): Update.
1155
1156 2018-07-20 Tom Tromey <tom@tromey.com>
1157
1158 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
1159 (process_full_type_unit): Likewise.
1160 (dwarf2_start_symtab): Set list_in_scope.
1161
1162 2018-07-20 Tom Tromey <tom@tromey.com>
1163
1164 * dwarf2read.c (process_psymtab_comp_unit_reader)
1165 (build_type_psymtabs_reader): Do not set list_in_scope.
1166
1167 2018-07-20 Tom Tromey <tom@tromey.com>
1168
1169 * buildsym.c (free_pendings): Remove.
1170 (add_symbol_to_list, scoped_free_pendings)
1171 (finish_block_internal, buildsym_init): Update.
1172
1173 2018-07-20 Tom Tromey <tom@tromey.com>
1174
1175 * xcoffread.c (read_xcoff_symtab): Update.
1176 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
1177 Update.
1178 * dbxread.c (process_one_symbol): Update.
1179 * coffread.c (coff_symtab_read): Update.
1180 * buildsym.h (finish_block): Update.
1181 * buildsym.c (finish_block): Remove "listhead" argument.
1182 (end_symtab_get_static_block): Update.
1183
1184 2018-07-20 Tom Tromey <tom@tromey.com>
1185
1186 * buildsym.h (class scoped_free_pendings): Remove constructor.
1187 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
1188 method.
1189 <m_pending_block_obstack, m_pending_blocks>: New members.
1190 (pending_block_obstack, pending_blocks): Remove.
1191 (scoped_free_pendings::scoped_free_pendings): Default.
1192 (~scoped_free_pendings): Update.
1193 (free_pending_blocks): Remove.
1194 (finish_block_internal, record_pending_block, make_blockvector)
1195 (end_symtab_get_static_block, augment_type_symtab, push_context)
1196 (buildsym_init): Update.
1197
1198 2018-07-20 Tom Tromey <tom@tromey.com>
1199
1200 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
1201 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
1202 members.
1203 (pending_addrmap, pending_addrmap_obstack)
1204 (pending_addrmap_interesting): Remove.
1205 (scoped_free_pendings, record_block_range, make_blockvector)
1206 (prepare_for_building, reset_symtab_globals, buildsym_init):
1207 Update.
1208
1209 2018-07-20 Tom Tromey <tom@tromey.com>
1210
1211 * xcoffread.c (process_linenos): Update.
1212 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
1213 * mdebugread.c (psymtab_to_symtab_1): Update.
1214 * dwarf2read.c (setup_type_unit_groups)
1215 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
1216 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
1217 * dbxread.c (process_one_symbol): Update.
1218 * coffread.c (coff_symtab_read, enter_linenos)
1219 (process_coff_symbol): Update.
1220 * buildsym.h (current_subfile): Don't declare.
1221 (get_current_subfile): Declare.
1222 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
1223 member.
1224 (start_subfile, free_buildsym_compunit, push_subfile)
1225 (prepare_for_building, start_symtab): Update.
1226 (get_current_subfile): New function.
1227
1228 2018-07-20 Tom Tromey <tom@tromey.com>
1229
1230 * coffread.c (coff_symtab_read): Update.
1231 * xcoffread.c (read_xcoff_symtab): Update.
1232 * dwarf2read.c (new_symbol): Update.
1233 (read_func_scope, read_lexical_block_scope): Update.
1234 * dbxread.c (process_one_symbol): Update.
1235 * buildsym.h (context_stack, context_stack_depth): Don't declare.
1236 (outermost_context_p): Remove macro.
1237 (outermost_context_p, get_current_context_stack)
1238 (get_context_stack_depth): Declare.
1239 (pop_context): Return struct context_stack.
1240 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
1241 member.
1242 (context_stack_size): Remove.
1243 (INITIAL_CONTEXT_STACK_SIZE): Remove.
1244 (prepare_for_building, end_symtab_get_static_block)
1245 (augment_type_symtab, push_context): Update.
1246 (pop_context): Return struct context_stack.
1247 (outermost_context_p, get_current_context_stack)
1248 (get_context_stack_depth): New functions.
1249 (buildsym_init): Update.
1250
1251 2018-07-20 Tom Tromey <tom@tromey.com>
1252
1253 * rust-exp.y: Now a pure parser. Update all rules.
1254 (%union): Move earlier.
1255 (current_parser, work_obstack): Remove globals.
1256 (rust_parser, ~rust_parser): Update.
1257 (class rust_parser) <copy_name, concat3, crate_name, super_name,
1258 lex_character, lex_number, lex_string, lex_identifier,
1259 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
1260 convert_name, convert_params_to_expression,
1261 convert_ast_to_expression, ast_basic_type, ast_operation,
1262 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
1263 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
1264 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
1265 ast_array_type, ast_slice_type, ast_reference_type,
1266 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
1267 (rust_parse): Update.
1268 (rustyyerror, rustyylex): Add parser parameter.
1269 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
1270 (rust_lex_stringish_test, rust_lex_test_sequence)
1271 (rust_lex_test_trailing_dot, rust_lex_test_completion)
1272 (rust_lex_test_push_back, rust_lex_tests): Update.
1273
1274 2018-07-19 Pedro Alves <palves@redhat.com>
1275
1276 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
1277 gdb::unique_xmalloc_ptr.
1278 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
1279 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
1280 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
1281 copy-initialization.
1282 * guile/scm-pretty-print.c (ppscm_print_children): Use
1283 gdb::unique_xmalloc_ptr instead of cleanups.
1284 (gdbscm_apply_val_pretty_printer): Remove cleanups.
1285 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
1286 gdb::unique_xmalloc_ptr.
1287 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1288 Adjust to use gdb::unique_xmalloc_ptr.
1289 * guile/scm-utils.c (extract_arg): Adjust.
1290 * guile/scm-value.c (gdbscm_value_field): Adjust to use
1291 gdb::unique_xmalloc_ptr instead of a cleanup.
1292
1293 2018-07-19 Tom Tromey <tom@tromey.com>
1294
1295 * utils.c (do_value_free_to_mark)
1296 (make_cleanup_value_free_to_mark): Remove.
1297 * utils.h (make_cleanup_value_free_to_mark): Remove.
1298
1299 2018-07-19 Pedro Alves <palves@redhat.com>
1300
1301 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
1302 forwarding reference.
1303
1304 2018-07-18 Pedro Alves <palves@redhat.com>
1305
1306 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
1307 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
1308 cleanup.
1309
1310 2018-07-18 Pedro Alves <palves@redhat.com>
1311
1312 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
1313 exceptions.
1314 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
1315 (gdbscm_wrap): New.
1316 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
1317 directly instead of a cleanup.
1318 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
1319 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
1320 (vlscm_binop_gdbthrow): New, factored out from ...
1321 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
1322 (vlscm_rich_compare): Use gdbscm_wrap.
1323 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
1324 instead of a cleanup.
1325 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
1326 cleanup.
1327 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1328 Use xfree directly instead of a cleanup.
1329 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
1330 Adjust to use gdbscm_wrap and scoped_value_mark.
1331 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
1332 (gdbscm_value_address, gdbscm_value_dereference)
1333 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
1334 scoped_value_mark.
1335 (gdbscm_value_dynamic_type): Use scoped_value_mark.
1336 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
1337 scoped_value_mark.
1338 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
1339 gdbscm_wrap and scoped_value_mark.
1340 (gdbscm_value_to_string): Use xfree directly instead of a
1341 cleanup. Move 'buffer' unique_ptr to TRY scope.
1342 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
1343 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
1344 scoped_value_mark.
1345 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
1346 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
1347 scoped_value_mark.
1348 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
1349 gdbscm_wrap.
1350
1351 2018-07-18 Tom de Vries <tdevries@suse.de>
1352
1353 * findvar.c (default_read_var_value): Also resolve dynamic type for
1354 LOC_OPTIMIZED_OUT vars.
1355
1356 2018-07-18 Maciej W. Rozycki <macro@mips.com>
1357
1358 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
1359 decoding.
1360
1361 2018-07-17 Tom Tromey <tom@tromey.com>
1362
1363 * guile/scm-param.c (pascm_set_func, pascm_show_func)
1364 (compute_enum_list, pascm_set_param_value_x)
1365 (gdbscm_parameter_value): Update.
1366 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
1367 (gdbscm_scm_to_host_string): Update.
1368 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
1369 Update.
1370 * guile/scm-cmd.c (cmdscm_add_completion): Update.
1371 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
1372 * guile/scm-string.c (gdbscm_scm_to_string): Return
1373 unique_xmalloc_ptr.
1374 (gdbscm_scm_to_host_string): Likewise.
1375
1376 2018-07-17 Tom Tromey <tom@tromey.com>
1377
1378 * guile/guile.c (gdbscm_eval_from_control_command): Update.
1379 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
1380 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
1381 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
1382 unique_xmalloc_ptr.
1383
1384 2018-07-17 Tom Tromey <tom@tromey.com>
1385
1386 * guile/scm-param.c (pascm_signal_setshow_error): Update.
1387 * guile/guile-internal.h (gdbscm_exception_message_to_string):
1388 Update.
1389 * guile/scm-cmd.c (cmdscm_function): Update.
1390 * guile/scm-pretty-print.c
1391 (ppscm_print_exception_unless_memory_error): Update.
1392 * guile/scm-exception.c (gdbscm_exception_message_to_string):
1393 Return unique_xmalloc_ptr.
1394
1395 2018-07-17 Tom Tromey <tom@tromey.com>
1396
1397 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
1398 Use string_printf.
1399
1400 2018-07-17 Jim Wilson <jimw@sifive.com>
1401
1402 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
1403 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
1404 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
1405 unecessary braces after EF_RISCV_RVC test. Delete call to
1406 set_gdbarch_decr_pc_after_break.
1407
1408 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
1409 RISCV_LAST_FP_REGNUM + 1.
1410 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
1411
1412 2018-07-17 Tom Tromey <tom@tromey.com>
1413
1414 * configure.ac: Remove --disable-gdbcli.
1415 * configure: Rebuild.
1416 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
1417 (SUBDIR_CLI_CFLAGS): Remove.
1418 (SFILES): Use SUBDIR_CLI_SRCS.
1419 (COMMON_OBS): Use SUBDIR_CLI_OBS.
1420
1421 2018-07-17 Tom Tromey <tom@tromey.com>
1422
1423 PR gdb/18624:
1424 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
1425
1426 2018-07-16 Jim Wilson <jimw@sifive.com>
1427
1428 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
1429
1430 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1431
1432 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
1433 variable.
1434 (libunwind_frame_sniffer): Likewise.
1435 (libunwind_frame_prev_register): Likewise.
1436 (libunwind_sigtramp_frame_sniffer): Likewise.
1437 * ia64-tdep.c (ia64_access_reg): Likewise.
1438 (ia64_access_rse_reg): Likewise.
1439 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
1440 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
1441
1442 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1443
1444 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
1445
1446 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1447
1448 * remote-sim.c (gdbsim_target::close,
1449 gdbsim_target::mourn_inferior): Remove unused variables.
1450
1451 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
1452
1453 * ia64-tdep.c (ktab_buf): New global.
1454 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
1455 (get_kernel_table): Adjust.
1456
1457 2018-07-16 Tom Tromey <tom@tromey.com>
1458
1459 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
1460 * dwarf2read.c (using_directives, new_symbol): Use
1461 outermost_context_p.
1462 * dbxread.c (process_one_symbol): Use outermost_context_p.
1463 * coffread.c (coff_symtab_read): Use outermost_context_p.
1464
1465 2018-07-16 Tom Tromey <tom@tromey.com>
1466
1467 * dwarf2read.c (using_directives, read_func_scope)
1468 (read_lexical_block_scope): Update.
1469 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1470 * buildsym.h (local_using_directives, global_using_directives):
1471 Don't declare.
1472 (get_local_using_directives, set_local_using_directives)
1473 (get_global_using_directives): Declare.
1474 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
1475 m_global_using_directives>: New members.
1476 (finish_block_internal, prepare_for_building)
1477 (reset_symtab_globals, end_symtab_get_static_block)
1478 (push_context): Update.
1479 (get_local_using_directives, set_local_using_directives)
1480 (get_global_using_directives): New functions.
1481 (buildsym_init): Update.
1482
1483 2018-07-16 Tom Tromey <tom@tromey.com>
1484
1485 * xcoffread.c (xcoff_initial_scan): Don't call
1486 free_pending_blocks.
1487 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
1488 * buildsym.h (class scoped_free_pendings): Add constructor.
1489 (free_pending_blocks): Don't declare.
1490 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
1491 (free_pending_blocks): Now static.
1492
1493 2018-07-16 Tom Tromey <tom@tromey.com>
1494
1495 * buildsym.h (push_subfile, pop_subfile): Update declarations.
1496 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
1497 member.
1498 (struct subfile_stack): Remove.
1499 (subfile_stack): Remove.
1500 (push_subfile, pop_subfile, buildsym_init): Update.
1501
1502 2018-07-16 Tom Tromey <tom@tromey.com>
1503
1504 * buildsym.c (push_subfile): Use gdb_assert.
1505 (pop_subfile): Use gdb_assert.
1506
1507 2018-07-16 Tom Tromey <tom@tromey.com>
1508
1509 * buildsym.h (merge_symbol_lists): Remove.
1510 * buildsym.c (merge_symbol_lists): Remove.
1511
1512 2018-07-16 Tom Tromey <tom@tromey.com>
1513
1514 * stabsread.c (scan_file_globals): Update comment.
1515 * stabsread.h (scan_file_globals): Move from buildsym.h.
1516 * buildsym.h (scan_file_globals): Move to stabsread.h.
1517
1518 2018-07-16 Tom Tromey <tom@tromey.com>
1519
1520 * xcoffread.c (xcoff_new_init): Update.
1521 * mipsread.c (mipscoff_new_init): Update.
1522 * mdebugread.c (mdebug_build_psymtabs): Update.
1523 * elfread.c (elf_new_init): Update.
1524 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
1525 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
1526 * buildsym.h (buildsym_new_init): Don't declare.
1527 * buildsym.c (buildsym_new_init): Remove.
1528
1529 2018-07-16 Tom Tromey <tom@tromey.com>
1530
1531 * stabsread.h (within_function): Move from buildsym.h.
1532 * stabsread.c (start_stabs): Clear within_function.
1533 * coffread.c (coff_start_symtab): Clear within_function.
1534 * buildsym.h (within_function): Move to stabsread.h.
1535 * buildsym.c (prepare_for_building): Update.
1536
1537 2018-07-16 Tom Tromey <tom@tromey.com>
1538
1539 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
1540 * dwarf2read.c (dwarf2_start_symtab): Don't set
1541 processing_gcc_compilation.
1542 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
1543
1544 2018-07-16 Tom Tromey <tom@tromey.com>
1545
1546 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
1547 (next_symbol_text_func): Move from buildsym.h.
1548 * stabsread.c (hashname): Move from buildsym.c.
1549 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
1550 (next_symbol_text_func, hashname): Move to stabsread.h.
1551 * buildsym.c: Don't include bcache.h
1552 (hashname): Move to stasbread.c.
1553
1554 2018-07-16 Tom Tromey <tom@tromey.com>
1555
1556 * buildsym.h (context_stack_size): Don't declare.
1557 * buildsym.c (context_stack_size): New global.
1558
1559 2018-07-16 Tom Tromey <tom@tromey.com>
1560
1561 * dbxread.c (processing_acc_compilation): New global.
1562 * buildsym.h (processing_acc_compilation): Don't declare.
1563
1564 2018-07-16 Tom Tromey <tom@tromey.com>
1565
1566 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
1567 * dbxread.c (read_ofile_symtab): Update.
1568 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
1569 * buildsym.h (last_source_start_addr): Remove.
1570 (set_last_source_start_addr, get_last_source_start_addr):
1571 Declare.
1572 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
1573 parameter.
1574 (struct buildsym_compunit) <m_last_source_start_addr>: New
1575 member.
1576 (prepare_for_building): Remove start_addr parameter.
1577 (start_symtab, restart_symtab, end_symtab_get_static_block)
1578 (end_symtab_with_blockvector): Update.
1579 (set_last_source_start_addr, get_last_source_start_addr): New
1580 functions.
1581
1582 2018-07-16 Tom Tromey <tom@tromey.com>
1583
1584 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
1585 member.
1586 (have_line_numbers): Remove.
1587 (record_line, prepare_for_building, end_symtab_get_static_block)
1588 (augment_type_symtab): Update.
1589
1590 2018-07-16 Tom Tromey <tom@tromey.com>
1591
1592 * buildsym.c (~buildsym_compunit): Free the macro table.
1593 (struct buildsym_compunit) <get_macro_table, release_macros>: New
1594 methods.
1595 <m_pending_macros>: New member.
1596 (pending_macros): Remove.
1597 (~scoped_free_pendings, get_macro_table, prepare_for_building)
1598 (reset_symtab_globals, end_symtab_get_static_block)
1599 (end_symtab_with_blockvector, augment_type_symtab)
1600 (buildsym_init): Update.
1601
1602 2018-07-16 Tom Tromey <tom@tromey.com>
1603
1604 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
1605 parameter.
1606 (buildsym_compunit::set_last_source_file): New method.
1607 <m_last_source_file>: New member.
1608 (prepare_for_building): Remove "name" parameter.
1609 (start_symtab, restart_symtab, reset_symtab_globals): Update.
1610 (last_source_file): Remove.
1611 (set_last_source_file, get_last_source_file): Update.
1612
1613 2018-07-16 Tom Tromey <tom@tromey.com>
1614
1615 * buildsym.c (prepare_for_building): Add assert.
1616
1617 2018-07-16 Tom Tromey <tom@tromey.com>
1618
1619 * buildsym.c (~buildsym_compunit): Update.
1620 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
1621 (start_subfile, patch_subfile_names)
1622 (end_symtab_with_blockvector): Update.
1623
1624 2018-07-16 Tom Tromey <tom@tromey.com>
1625
1626 * buildsym.c (struct buildsym_compunit): Add constructor,
1627 destructor, initializers.
1628 (start_buildsym_compunit): Remove.
1629 (free_buildsym_compunit): Use "delete".
1630 (start_symtab, restart_symtab): Use "new".
1631
1632 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
1633
1634 * symfile.c (set_objfile_default_section_offset): Remove struct
1635 keyword.
1636
1637 2018-07-14 Stafford Horne <shorne@gmail.com>
1638
1639 * (Responsible Maintainers): Add myself as or1k maintainer.
1640
1641 2018-07-13 Tom Tromey <tom@tromey.com>
1642
1643 * symfile.c (set_objfile_default_section_offset): Use extra braces
1644 around initializer.
1645
1646 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1647
1648 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
1649 non-branching basr.
1650
1651 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1652
1653 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1654 unittests/cli-utils-selftests.c
1655 * unittests/cli-utils-selftests.c: New file.
1656
1657 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1658
1659 * NEWS: Mention new commands. Mention change to 'thread apply'.
1660
1661 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1662
1663 * thread.c (thr_try_catch_cmd): New function.
1664 (thread_apply_all_command): Handle qcs flags.
1665 (thread_apply_command): Handle qcs flags.
1666 (taas_command): New function.
1667 (tfaas_command): New function.
1668 (_initialize_thread): Update to setup the new commands 'taas
1669 and 'tfaas'. Change doc string for 'thread apply'.
1670
1671 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1672
1673 * stack.c: (trailing_outermost_frame): New function, mostly
1674 extracted from backtrace_command_1.
1675 (leading_innermost_frame): New function.
1676 (backtrace_command_1): Update to call trailing_outermost_frame.
1677 (frame_apply_command_count): New function.
1678 (frame_apply_level_command): New function.
1679 (frame_apply_all_command): New function.
1680 (frame_apply_command): New function.
1681 (faas_command): New function.
1682 (frame_cmd_list): New variable.
1683 (_initialize_stack): Update to setup the new commands 'frame apply'
1684 and 'faas'.
1685
1686 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1687
1688 * cli-utils.c (number_or_range_parser::get_number): Only handle
1689 numbers or convenience var as numbers.
1690 (parse_flags): New function.
1691 (parse_flags_qcs): New function.
1692 (number_or_range_parser::finished): Ensure parsing end is detected
1693 before end of string.
1694 * cli-utils.h (parse_flags): New function.
1695 (parse_flags_qcs): New function.
1696 (number_or_range_parser): Remove m_finished bool.
1697 (number_or_range_parser::skip_range): Set m_in_range to false.
1698
1699 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
1700
1701 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
1702 on Windows.
1703
1704 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1705 Jan Kratochvil <jan.kratochvil@redhat.com>
1706 Paul Fertser <fercerpav@gmail.com>
1707 Tsutomu Seki <sekiriki@gmail.com>
1708 Pedro Alves <palves@redhat.com>
1709
1710 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1711 'unittests/parse-connection-spec-selftests.c'.
1712 (COMMON_SFILES): Add 'common/netstuff.c'.
1713 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
1714 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
1715 * common/netstuff.c: New file.
1716 * common/netstuff.h: New file.
1717 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
1718 (wait_for_connect): Update comment. New parameter
1719 'gdb::optional<int> sock' instead of 'struct serial *scb'.
1720 Use 'sock' directly instead of 'scb->fd'.
1721 (try_connect): New function, with code from 'net_open'.
1722 (net_open): Rewrite main loop to deal with multiple
1723 sockets/addresses. Handle IPv6-style hostnames; implement
1724 support for IPv6 connections.
1725 * unittests/parse-connection-spec-selftests.c: New file.
1726
1727 2018-07-11 Pedro Alves <palves@redhat.com>
1728
1729 PR gdb/23377
1730 * remote.c (remote_target::remote_detach_pid): Call
1731 set_current_process.
1732
1733 2018-07-11 Pedro Alves <palves@redhat.com>
1734
1735 * h8300-tdep.c (h8300_gdbarch_init): Remove
1736 set_gdbarch_ecoff_reg_to_regnum calls.
1737
1738 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1739
1740 PR c++/23373
1741 * c-typeprint.c (c_type_print_base_struct_union): Don't print
1742 offsets/sizes for static members of a class/struct.
1743
1744 2018-07-11 Alan Hayward <alan.hayward@arm.com>
1745
1746 * target-descriptions.c (tdesc_register_bitsize): Rename.
1747 * target-descriptions.h (tdesc_register_bitsize): Likewise.
1748 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
1749 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
1750
1751 2018-07-10 Tom Tromey <tom@tromey.com>
1752
1753 * breakpoint.c (moribund_locations): Now static and a
1754 std::vector.
1755 (breakpoint_init_inferior, moribund_breakpoint_here_p)
1756 (build_bpstat_chain, update_global_location_list)
1757 (breakpoint_retire_moribund): Update.
1758 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
1759 VEC.
1760
1761 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
1762
1763 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
1764 (riscv_register_reggroup_p): Use new function, remove unneeded
1765 parenthesis.
1766 (riscv_push_dummy_call): Extend assert to compare against xlen or
1767 flen based on register type.
1768
1769 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
1770
1771 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
1772
1773 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
1774
1775 * remote.c (show_hardware_watchpoint_limit): New function.
1776 (show_hardware_watchpoint_length_limit): New function.
1777 (show_hardware_breakpoint_limit): New function.
1778 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
1779 where appropriate, update help text.
1780
1781 2018-07-09 Tom Tromey <tom@tromey.com>
1782
1783 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
1784 (CLIBS): Don't mention NAT_CLIBS.
1785
1786 2018-07-09 Tom Tromey <tom@tromey.com>
1787
1788 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
1789 (LIBGDB_OBS, clean mostlyclean): Update.
1790 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
1791
1792 2018-07-09 Tom Tromey <tom@tromey.com>
1793
1794 * Makefile.in (%.c: %.y): Use ECHO_YACC.
1795 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
1796 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
1797
1798 2018-07-09 Tom Tromey <tom@tromey.com>
1799
1800 * Makefile.in (ALLDEPFILES): Remove exec.c.
1801 (COMMON_OBS): Remove exec.o.
1802 (COMMON_SFILES): Add exec.c.
1803
1804 2018-07-09 Tom Tromey <tom@tromey.com>
1805
1806 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
1807
1808 2018-07-09 Tom Tromey <tom@tromey.com>
1809
1810 * Makefile.in (clean mostlyclean): Remove stamp-version.
1811 (version.c): Depend on stamp-version.
1812 (stamp-version): New rule, from version.c rule.
1813
1814 2018-07-09 Tom Tromey <tom@tromey.com>
1815
1816 * Makefile.in (init.c): Depend on stamp-init.
1817 (stamp-init): New rule, from init.c rule.
1818 (clean mostlyclean): Remove stamp-init.
1819
1820 2018-07-09 Tom Tromey <tom@tromey.com>
1821
1822 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
1823 SUBDIR_GCC_COMPILE_SRCS.
1824
1825 2018-07-09 Tom Tromey <tom@tromey.com>
1826
1827 * Makefile.in (init.c): Remove some unused sed rules.
1828
1829 2018-07-09 Tom Tromey <tom@tromey.com>
1830
1831 * Makefile.in (TSOBS): Remove.
1832 (INIT_FILES): Update.
1833 (LIBGDB_OBS): Update.
1834 (COMMON_SFILES): Add inflow.c.
1835 (SFILES): Remove inflow.c.
1836
1837 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1838
1839 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
1840
1841 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
1842
1843 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
1844 get_saveloc_name, is_signal_frame_name, step_name,
1845 init_remote_name, create_addr_space_name,
1846 destroy_addr_space_name, search_unwind_table_name,
1847 find_dyn_list_name): Constify.
1848
1849 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
1850
1851 * darwin-nat.c (darwin_pthread_kill): New function.
1852 (darwin_resume_thread): Use darwin_pthread_kill.
1853
1854 2018-07-05 Tom de Vries <tdevries@suse.de>
1855
1856 * macroexp.c (macro_buffer) <operator=>: New member function.
1857
1858 2018-07-04 Tom Tromey <tom@tromey.com>
1859
1860 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
1861
1862 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
1863
1864 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
1865 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
1866 * maint.c: Likewise.
1867 * top.c: Likewise.
1868
1869 2018-07-04 Joel Brobecker <brobecker@adacore.com>
1870
1871 * NEWS: Create a new section for the next release branch.
1872 Rename the section of the current branch, now that it has
1873 been cut.
1874
1875 2018-07-04 Joel Brobecker <brobecker@adacore.com>
1876
1877 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
1878 * version.in: Bump version to 8.2.50.DATE-git.
1879
1880 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1881 Pedro Alves <palves@redhat.com>
1882
1883 * linux-nat.c (linux_init_ptrace): Rename to ...
1884 (linux_init_ptrace_procfs): ... this. Call
1885 linux_proc_init_warnings.
1886 (linux_nat_target::post_attach)
1887 (linux_nat_target::post_startup_inferior): Adjust.
1888 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
1889 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
1890
1891 2018-07-04 Tom de Vries <tdevries@suse.de>
1892
1893 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
1894 check ...
1895 (read_comp_unit_head): ... here.
1896
1897 2018-07-03 Tom Tromey <tom@tromey.com>
1898
1899 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
1900 (stop_tracing, tstatus_command)
1901 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
1902 (print_one_static_tracepoint_marker): Update.
1903 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
1904 std::vector.
1905 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
1906 VEC.
1907 (all_tracepoints, static_tracepoints_here): Return std::vector.
1908
1909 2018-07-03 Tom Tromey <tom@tromey.com>
1910
1911 * common/ptid.c (ptid_equal): Remove.
1912 * common/ptid.h (ptid_equal): Don't declare.
1913 * ada-tasks.c: Update.
1914 * breakpoint.c: Update.
1915 * common/agent.c: Update.
1916 * corelow.c: Update.
1917 * darwin-nat-info.c: Update.
1918 * darwin-nat.c: Update.
1919 * dcache.c: Update.
1920 * dtrace-probe.c: Update.
1921 * dummy-frame.c: Update.
1922 * fbsd-nat.c: Update.
1923 * frame.c: Update.
1924 * gdbthread.h: Update.
1925 * gnu-nat.c: Update.
1926 * go32-nat.c: Update.
1927 * inf-loop.c: Update.
1928 * inf-ptrace.c: Update.
1929 * infcall.c: Update.
1930 * infcmd.c: Update.
1931 * inflow.c: Update.
1932 * infrun.c: Update.
1933 * linux-fork.c: Update.
1934 * linux-nat.c: Update.
1935 * linux-thread-db.c: Update.
1936 * mi/mi-cmd-var.c: Update.
1937 * mi/mi-interp.c: Update.
1938 * mi/mi-main.c: Update.
1939 * nto-procfs.c: Update.
1940 * ppc-linux-tdep.c: Update.
1941 * procfs.c: Update.
1942 * python/py-inferior.c: Update.
1943 * python/py-record-btrace.c: Update.
1944 * python/py-record.c: Update.
1945 * ravenscar-thread.c: Update.
1946 * regcache.c: Update.
1947 * remote-sim.c: Update.
1948 * remote.c: Update.
1949 * sol-thread.c: Update.
1950 * solib.c: Update.
1951 * target.c: Update.
1952 * tui/tui-stack.c: Update.
1953 * varobj.c: Update.
1954 * windows-nat.c: Update.
1955 * windows-tdep.c: Update.
1956
1957 2018-07-03 Tom Tromey <tom@tromey.com>
1958
1959 * common/ptid.c (ptid_match): Remove.
1960 * common/ptid.h (ptid_match): Don't declare.
1961 * fbsd-nat.c: Update.
1962 * infcmd.c: Update.
1963 * infrun.c: Update.
1964 * linux-nat.c: Update.
1965 * record-btrace.c: Update.
1966 * regcache.c: Update.
1967 * remote.c: Update.
1968
1969 2018-07-03 Tom Tromey <tom@tromey.com>
1970
1971 * common/ptid.c (ptid_tid_p): Remove.
1972 * common/ptid.h (ptid_tid_p): Don't declare.
1973 * sol-thread.c: Update.
1974
1975 2018-07-03 Tom Tromey <tom@tromey.com>
1976
1977 * common/ptid.c (ptid_lwp_p): Remove.
1978 * common/ptid.h (ptid_lwp_p): Don't declare.
1979 * fbsd-nat.c: Update.
1980 * linux-nat.c: Update.
1981 * nat/linux-procfs.c: Update.
1982 * nat/x86-linux-dregs.c: Update.
1983 * sol-thread.c: Update.
1984
1985 2018-07-03 Tom Tromey <tom@tromey.com>
1986
1987 * common/ptid.c (ptid_is_pid): Remove.
1988 * common/ptid.h (ptid_is_pid): Don't declare.
1989 * infrun.c: Update.
1990 * linux-nat.c: Update.
1991 * mi/mi-interp.c: Update.
1992 * remote.c: Update.
1993 * thread.c: Update.
1994
1995 2018-07-03 Tom Tromey <tom@tromey.com>
1996
1997 * common/ptid.c (ptid_get_tid): Remove.
1998 * common/ptid.h (ptid_get_tid): Don't declare.
1999 * ada-tasks.c: Update.
2000 * aix-thread.c: Update.
2001 * bsd-uthread.c: Update.
2002 * darwin-nat.c: Update.
2003 * fbsd-nat.c: Update.
2004 * i386-darwin-nat.c: Update.
2005 * infrun.c: Update.
2006 * linux-tdep.c: Update.
2007 * nto-procfs.c: Update.
2008 * ppc-ravenscar-thread.c: Update.
2009 * python/py-infthread.c: Update.
2010 * ravenscar-thread.c: Update.
2011 * sol-thread.c: Update.
2012 * sparc-ravenscar-thread.c: Update.
2013 * windows-nat.c: Update.
2014
2015 2018-07-03 Tom Tromey <tom@tromey.com>
2016
2017 * common/ptid.c (ptid_get_lwp): Remove.
2018 * common/ptid.h (ptid_get_lwp): Don't declare.
2019 * aarch64-linux-nat.c: Update.
2020 * ada-tasks.c: Update.
2021 * aix-thread.c: Update.
2022 * amd64-linux-nat.c: Update.
2023 * arm-linux-nat.c: Update.
2024 * corelow.c: Update.
2025 * fbsd-nat.c: Update.
2026 * fbsd-tdep.c: Update.
2027 * gnu-nat.c: Update.
2028 * i386-cygwin-tdep.c: Update.
2029 * i386-gnu-nat.c: Update.
2030 * i386-linux-nat.c: Update.
2031 * ia64-linux-nat.c: Update.
2032 * inf-ptrace.c: Update.
2033 * infrun.c: Update.
2034 * linux-fork.c: Update.
2035 * linux-nat.c: Update.
2036 * linux-tdep.c: Update.
2037 * linux-thread-db.c: Update.
2038 * mips-linux-nat.c: Update.
2039 * nat/aarch64-linux-hw-point.c: Update.
2040 * nat/aarch64-linux.c: Update.
2041 * nat/linux-btrace.c: Update.
2042 * nat/linux-osdata.c: Update.
2043 * nat/linux-procfs.c: Update.
2044 * nat/x86-linux-dregs.c: Update.
2045 * obsd-nat.c: Update.
2046 * ppc-fbsd-nat.c: Update.
2047 * ppc-linux-nat.c: Update.
2048 * procfs.c: Update.
2049 * python/py-infthread.c: Update.
2050 * ravenscar-thread.c: Update.
2051 * remote.c: Update.
2052 * s390-linux-nat.c: Update.
2053 * sol-thread.c: Update.
2054 * sol2-tdep.c: Update.
2055 * spu-linux-nat.c: Update.
2056 * x86-linux-nat.c: Update.
2057 * xtensa-linux-nat.c: Update.
2058
2059 2018-07-03 Tom Tromey <tom@tromey.com>
2060
2061 * common/ptid.c (ptid_get_pid): Remove.
2062 * common/ptid.h (ptid_get_pid): Don't declare.
2063 * aarch64-linux-nat.c: Update.
2064 * ada-lang.c: Update.
2065 * aix-thread.c: Update.
2066 * alpha-bsd-nat.c: Update.
2067 * amd64-fbsd-nat.c: Update.
2068 * amd64-linux-nat.c: Update.
2069 * arm-linux-nat.c: Update.
2070 * arm-nbsd-nat.c: Update.
2071 * auxv.c: Update.
2072 * break-catch-syscall.c: Update.
2073 * breakpoint.c: Update.
2074 * bsd-uthread.c: Update.
2075 * corelow.c: Update.
2076 * ctf.c: Update.
2077 * darwin-nat.c: Update.
2078 * fbsd-nat.c: Update.
2079 * fbsd-tdep.c: Update.
2080 * gcore.c: Update.
2081 * gnu-nat.c: Update.
2082 * hppa-nbsd-nat.c: Update.
2083 * hppa-obsd-nat.c: Update.
2084 * i386-fbsd-nat.c: Update.
2085 * ia64-linux-nat.c: Update.
2086 * inf-ptrace.c: Update.
2087 * infcmd.c: Update.
2088 * inferior.c: Update.
2089 * inferior.h: Update.
2090 * inflow.c: Update.
2091 * infrun.c: Update.
2092 * linux-fork.c: Update.
2093 * linux-nat.c: Update.
2094 * linux-tdep.c: Update.
2095 * linux-thread-db.c: Update.
2096 * m68k-bsd-nat.c: Update.
2097 * mi/mi-interp.c: Update.
2098 * mi/mi-main.c: Update.
2099 * mips-linux-nat.c: Update.
2100 * mips-nbsd-nat.c: Update.
2101 * mips64-obsd-nat.c: Update.
2102 * nat/aarch64-linux-hw-point.c: Update.
2103 * nat/aarch64-linux.c: Update.
2104 * nat/linux-btrace.c: Update.
2105 * nat/linux-osdata.c: Update.
2106 * nat/linux-procfs.c: Update.
2107 * nat/x86-linux-dregs.c: Update.
2108 * nto-procfs.c: Update.
2109 * obsd-nat.c: Update.
2110 * ppc-linux-nat.c: Update.
2111 * ppc-nbsd-nat.c: Update.
2112 * ppc-obsd-nat.c: Update.
2113 * proc-service.c: Update.
2114 * procfs.c: Update.
2115 * python/py-inferior.c: Update.
2116 * python/py-infthread.c: Update.
2117 * ravenscar-thread.c: Update.
2118 * record.c: Update.
2119 * remote-sim.c: Update.
2120 * remote.c: Update.
2121 * rs6000-nat.c: Update.
2122 * s390-linux-nat.c: Update.
2123 * sh-nbsd-nat.c: Update.
2124 * sol-thread.c: Update.
2125 * sparc-nat.c: Update.
2126 * sparc64-tdep.c: Update.
2127 * spu-linux-nat.c: Update.
2128 * spu-tdep.c: Update.
2129 * target-debug.h: Update.
2130 * target.c: Update.
2131 * thread.c: Update.
2132 * tid-parse.c: Update.
2133 * tracefile-tfile.c: Update.
2134 * vax-bsd-nat.c: Update.
2135 * windows-nat.c: Update.
2136 * x86-linux-nat.c: Update.
2137 * x86-nat.c: Update.
2138
2139 2018-07-03 Tom Tromey <tom@tromey.com>
2140
2141 * common/ptid.c (pid_to_ptid): Remove.
2142 * common/ptid.h (pid_to_ptid): Don't declare.
2143 * aix-thread.c: Update.
2144 * arm-linux-nat.c: Update.
2145 * common/ptid.c: Update.
2146 * common/ptid.h: Update.
2147 * corelow.c: Update.
2148 * ctf.c: Update.
2149 * darwin-nat.c: Update.
2150 * fbsd-nat.c: Update.
2151 * fork-child.c: Update.
2152 * gnu-nat.c: Update.
2153 * go32-nat.c: Update.
2154 * inf-ptrace.c: Update.
2155 * infcmd.c: Update.
2156 * inferior.c: Update.
2157 * infrun.c: Update.
2158 * linux-fork.c: Update.
2159 * linux-nat.c: Update.
2160 * nat/aarch64-linux-hw-point.c: Update.
2161 * nat/fork-inferior.c: Update.
2162 * nat/x86-linux-dregs.c: Update.
2163 * nto-procfs.c: Update.
2164 * obsd-nat.c: Update.
2165 * procfs.c: Update.
2166 * progspace.c: Update.
2167 * remote.c: Update.
2168 * rs6000-nat.c: Update.
2169 * s390-linux-nat.c: Update.
2170 * sol-thread.c: Update.
2171 * spu-linux-nat.c: Update.
2172 * target.c: Update.
2173 * top.c: Update.
2174 * tracefile-tfile.c: Update.
2175 * windows-nat.c: Update.
2176
2177 2018-07-03 Tom Tromey <tom@tromey.com>
2178
2179 * common/ptid.h (ptid_build): Don't declare.
2180 * common/ptid.c (ptid_build): Remove.
2181 * aix-thread.c: Update.
2182 * bsd-kvm.c: Update.
2183 * bsd-uthread.c: Update.
2184 * common/agent.c: Update.
2185 * common/ptid.c: Update.
2186 * common/ptid.h: Update.
2187 * corelow.c: Update.
2188 * darwin-nat.c: Update.
2189 * fbsd-nat.c: Update.
2190 * gnu-nat.c: Update.
2191 * linux-fork.c: Update.
2192 * linux-nat.c: Update.
2193 * linux-thread-db.c: Update.
2194 * nat/linux-osdata.c: Update.
2195 * nat/linux-procfs.c: Update.
2196 * nto-procfs.c: Update.
2197 * obsd-nat.c: Update.
2198 * proc-service.c: Update.
2199 * procfs.c: Update.
2200 * ravenscar-thread.c: Update.
2201 * remote-sim.c: Update.
2202 * remote.c: Update.
2203 * sol-thread.c: Update.
2204 * target.c: Update.
2205 * windows-nat.c: Update.
2206
2207 2018-07-03 Tom Tromey <tom@tromey.com>
2208
2209 * infrun.c (follow_exec): Use exit_inferior_silent.
2210 * inferior.c (exit_inferior_num_silent): Remove.
2211 * inferior.h (exit_inferior_num_silent): Don't declare.
2212
2213 2018-07-03 Tom Tromey <tom@tromey.com>
2214
2215 PR cli/23340:
2216 * darwin-nat.c (darwin_attach_pid): Reset inferior and
2217 inferior_ptid on error.
2218
2219 2018-07-02 Maciej W. Rozycki <macro@mips.com>
2220 Simon Marchi <simon.marchi@polymtl.ca>
2221
2222 PR tdep/8282
2223 * disasm.h (gdb_disassembler): Add
2224 `m_disassembler_options_holder'. member
2225 * disasm.c (get_all_disassembler_options): New function.
2226 (gdb_disassembler::gdb_disassembler): Use it.
2227 (gdb_buffered_insn_length_init_dis): Likewise.
2228 (gdb_buffered_insn_length): Adjust accordingly.
2229 (set_disassembler_options): Handle options with arguments.
2230 (show_disassembler_options_sfunc): Likewise. Add a leading new
2231 line if showing options with descriptions.
2232 (disassembler_options_completer): Adapt to using the
2233 `disasm_options_and_args_t' structure.
2234 * mips-tdep.c (mips_disassembler_options): New variable.
2235 (mips_disassembler_options_o32): Likewise.
2236 (mips_disassembler_options_n32): Likewise.
2237 (mips_disassembler_options_n64): Likewise.
2238 (gdb_print_insn_mips): Don't set `disassembler_options'.
2239 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
2240 functions.
2241 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
2242 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
2243 `gdbarch_disassembler_options_implicit' and
2244 `gdbarch_valid_disassembler_options'.
2245 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
2246 `disasm_options_and_args_t' structure.
2247 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
2248 method.
2249 (valid_disassembler_options): Switch from `disasm_options_t' to
2250 the `disasm_options_and_args_t' structure.
2251 * NEWS: Document `set disassembler-options' support for the MIPS
2252 target.
2253 * gdbarch.h: Regenerate.
2254 * gdbarch.c: Regenerate.
2255
2256 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
2257
2258 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
2259
2260 2018-06-29 Joel Brobecker <brobecker@adacore.com>
2261
2262 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
2263 parameter in call to amd64_target_description.
2264 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
2265 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
2266 (amd64fbsd_init_abi): Likewise.
2267 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
2268 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
2269 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
2270 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
2271
2272 2018-06-29 Pedro Alves <palves@redhat.com>
2273
2274 * gdb/amd64-tdep.h (amd64_create_target_description): Add
2275 "segments" parameter.
2276 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
2277 (_initialize_amd64_tdep): Update call to
2278 amd64_create_target_description.
2279 (amd64_target_description): Add "segments" parameter. Adjust
2280 the implementation to use it.
2281 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
2282 call to amd64_create_target_description.
2283 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
2284 * gdb/arch/amd64.h (amd64_create_target_description): Add
2285 "segments" register.
2286 * gdb/arch/amd64.c (amd64_create_target_description): Add
2287 "segments" parameter. Call create_feature_i386_64bit_segments
2288 only if SEGMENTS is true.
2289 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
2290 call to amd64_create_target_description.
2291
2292 2018-06-29 Pedro Alves <palves@redhat.com>
2293
2294 * thread.c (thread_target_id_str): New, factored out from ...
2295 (print_thread_info_1): ... here. Use it to compute the max
2296 "Target Id" column width.
2297
2298 2018-06-29 Pedro Alves <palves@redhat.com>
2299
2300 * remote.c (remote_target::extra_thread_info): Delete
2301 'display_buf' and 'n' locals. from the cache, regardless of
2302 packet mechanims is in use. Use cache for qThreadExtra and qP
2303 methods too.
2304
2305 2018-06-29 Pedro Alves <palves@redhat.com>
2306
2307 * blockframe.c (find_pc_sect_containing_function): New function.
2308 * breakpoint.c (print_breakpoint_location): Don't call
2309 find_pc_sect_function.
2310 * linespec.c (create_sals_line_offset): Record the location's
2311 symbol in the sal.
2312 * linespec.c (convert_address_location_to_sals): Fill in sal's
2313 symbol with find_pc_sect_containing_function.
2314 * symtab.c (find_function_start_sal): Rename to ...
2315 (find_function_start_sal_1): ... this.
2316 (find_function_start_sal): Reimplement as wrapper around
2317 find_function_start_sal_1, and use
2318 find_pc_sect_containing_function to fill in the sal's symbol.
2319 (find_function_start_sal(symbol*, bool)): Adjust.
2320 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
2321 comments.
2322 (find_pc_sect_containing_function): Declare.
2323
2324 2018-06-29 Pedro Alves <palves@redhat.com>
2325
2326 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
2327 true if the the location has no symbol.
2328
2329 2018-06-28 Tom Tromey <tom@tromey.com>
2330
2331 * NEWS: Mention --enable-codesign.
2332 * silent-rules.mk (ECHO_SIGN): New variable.
2333 * configure.ac: Add --enable-codesign.
2334 * configure: Rebuild.
2335 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
2336 (gdb$(EXEEXT)): Optionally invoke codesign.
2337
2338 2018-06-28 Pedro Alves <palves@redhat.com>
2339
2340 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
2341 comments.
2342 (switch_to_thread_no_regs): Adjust comment.
2343 * infcmd.c (stop_pc): Delete.
2344 (post_create_inferior, info_program_command): Replace references
2345 to stop_pc with references to thread_info->suspend.stop_pc.
2346 * inferior.h (stop_pc): Delete declaration.
2347 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
2348 (handle_inferior_event_1, handle_signal_stop)
2349 (process_event_stop_test, keep_going_stepped_thread)
2350 (handle_step_into_function, handle_step_into_function_backward)
2351 (print_stop_location): Replace references to stop_pc with
2352 references to thread_info->suspend.stop_pc.
2353 (struct infcall_suspend_state) <stop_pc>: Delete field.
2354 (save_infcall_suspend_state, restore_infcall_suspend_state):
2355 Remove references to inf_stat->stop_pc.
2356 * linux-fork.c (fork_load_infrun_state): Likewise.
2357 * record-btrace.c (record_btrace_set_replay): Likewise.
2358 * record-full.c (record_full_goto_entry): Likewise.
2359 * remote.c (print_one_stopped_thread): Likewise.
2360 * target.c (target_resume): Extend comment.
2361 * thread.c (set_executing_thread): New.
2362 (set_executing): Use it.
2363 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
2364 Remove references to stop_pc.
2365
2366 2018-06-28 Pedro Alves <palves@redhat.com>
2367
2368 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
2369 Moving fetching stop_pc until after ecs->event_thread is refreshed.
2370
2371 2018-06-28 Tom Tromey <tom@tromey.com>
2372
2373 * coffread.c (coff_symfile_finish): Update.
2374 * xcoffread.c (xcoff_symfile_finish): Update.
2375 * elfread.c (elf_symfile_finish): Update.
2376 * symfile.h (dwarf2_free_objfile): Don't declare.
2377 * dwarf2read.c (_initialize_dwarf2_read): Use
2378 register_objfile_data_with_cleanup.
2379 (dwarf2_free_objfile): Now static. Change signature.
2380
2381 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2382
2383 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
2384 option "-o" to add-symbol-file-load to add an offset to each
2385 section's load address.
2386 * symfile.c (set_objfile_default_section_offset): New function.
2387
2388 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2389
2390 * symfile.c (add_symbol_file_command): Make sure that sections
2391 with the same name are sorted in the same order.
2392
2393 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2394
2395 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
2396 require the second argument. If omitted, load sections at the
2397 addresses specified in the file.
2398
2399 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2400
2401 * symfile.c (symbol_file_command, symbol_file_add_main_1)
2402 (_initialize_symfile): Add option "-o" to symbol-file to add an
2403 offset to each section of the symbol file.
2404
2405 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2406
2407 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
2408
2409 2018-06-27 Tom Tromey <tom@tromey.com>
2410
2411 * stack.c (_initialize_stack): Update "func" help text.
2412
2413 2018-06-27 Tom Tromey <tom@tromey.com>
2414
2415 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
2416 std::vector.
2417 (unwind_infopy_str, pyuw_create_unwind_info)
2418 (unwind_infopy_add_saved_register, pyuw_sniffer)
2419 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
2420 Update.
2421 (struct saved_reg): Add constructor.
2422 <value>: Now a gdbpy_ref<>.
2423
2424 2018-06-27 Tom Tromey <tom@tromey.com>
2425
2426 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
2427
2428 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2429
2430 * gdb-gdb.py.in: Format using autopep8.
2431
2432 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2433
2434 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
2435 (type_lookup_function): Recognize CORE_ADDR values.
2436
2437 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2438
2439 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
2440 print tag_name.
2441
2442 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2443
2444 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
2445 <__lt__>: Add.
2446
2447 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2448
2449 * gdb-gdb.py: Move to...
2450 * gdb-gdb.py.in: ... here.
2451 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
2452 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
2453 dependencies.
2454 (distclean): Remove gdb-gdb.py when cleaning.
2455 (gdb-gdb.py, gdb-gdb.gdb): New rules.
2456 * configure: Re-generate.
2457
2458 2018-06-27 Pedro Alves <palves@redhat.com>
2459
2460 * proc-service.c (get_ps_regcache): New.
2461 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2462 (ps_lsetfpregs): Use it.
2463
2464 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
2465
2466 PR gdb/21695
2467 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
2468 (dwarf_decode_lines_1): Adjust.
2469
2470 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2471
2472 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
2473 override.
2474 <info_proc>: Likewise.
2475
2476 2018-06-26 Joel Brobecker <brobecker@adacore.com>
2477
2478 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
2479 to windows_fetch_one_register, and only handle the case of
2480 fetching one register. Move the code that reloads the context
2481 and iterates over all registers if R is negative to...
2482 (windows_nat_target::fetch_registers): ... here.
2483 (do_windows_store_inferior_registers): Rename to
2484 windows_store_one_register, and only handle the case of storing
2485 one register. Move the code that handles the case where r is
2486 negative to...
2487 (windows_nat_target::store_registers) ... here.
2488
2489 2018-06-26 Tom Tromey <tom@tromey.com>
2490
2491 PR rust/22574:
2492 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
2493 * rust-lang.c (rust_print_struct_def): Add podata parameter.
2494 Update.
2495 (rust_internal_print_type): Add podata parameter.
2496 (rust_print_type): Update.
2497
2498 2018-06-26 Tom Tromey <tom@tromey.com>
2499
2500 * typeprint.h (struct print_offset_data) <update, finish,
2501 maybe_print_hole>: New methods.
2502 <indentation>: New constant.
2503 * typeprint.c (print_offset_data::indentation): Define.
2504 (print_offset_data::maybe_print_hole, print_offset_data::update)
2505 (print_offset_data::finish): Move from c-typeprint.c and rename.
2506 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
2507 (print_spaces_filtered_with_print_options): Update.
2508 (c_print_type_union_field_offset, maybe_print_hole)
2509 (c_print_type_struct_field_offset): Move to typeprint.c and
2510 rename.
2511 (c_type_print_base_struct_union): Update.
2512
2513 2018-06-25 Pedro Alves <palves@redhat.com>
2514
2515 * gdbthread.h (thread_info_ref, delete_thread)
2516 (delete_thread_silent, first_thread_of_inferior)
2517 (any_thread_of_inferior, switch_to_thread)
2518 (enable_thread_stack_temporaries)
2519 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2520 (get_last_thread_stack_temporary)
2521 (value_in_thread_stack_temporaries, can_access_registers_thread):
2522 Spell out "struct thread_info" instead of just "thread_info".
2523 * inferior.h (notice_new_inferior): Likewise.
2524
2525 2018-06-25 Pedro Alves <palves@redhat.com>
2526
2527 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2528 pass thread_info pointer to delete_thread.
2529 (windows_nat_target::detach): Pass inferior pointer to
2530 detach_inferior.
2531 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
2532 delete_thread.
2533 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
2534 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
2535 and pass a thread_info pointer to delete_thread.
2536 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
2537 pass thread_info pointer to delete_thread.
2538 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
2539 delete_thread_silent call.
2540 * procfs.c (procfs_target::detach): Pass inferior pointer to
2541 detach_inferior.
2542 (procfs_target::wait): Pass thread_info pointer to delete_thread.
2543 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
2544 delete_thread_silent call.
2545 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2546 pass thread_info pointer to delete_thread.
2547 (windows_nat_target::detach): Pass inferior pointer to
2548 delete_inferior.
2549
2550 2018-06-22 Alan Hayward <alan.hayward@arm.com>
2551
2552 * regcache.c (readable_regcache::read_part): Fix asserts.
2553 (reg_buffer::raw_collect_part): New function.
2554 (regcache::write_part): Fix asserts.
2555 (reg_buffer::raw_supply_part): New function.
2556 (regcache::transfer_regset_register): New helper function.
2557 (regcache::transfer_regset): Call new functions.
2558 (regcache_supply_regset): Use gdb_byte*.
2559 (regcache::supply_regset): Likewise.
2560 (regcache_collect_regset): Likewise.
2561 (regcache::collect_regset): Likewise.
2562 * regcache.h (reg_buffer::raw_collect_part): New declaration.
2563 (reg_buffer::raw_supply_part): Likewise.
2564 (regcache::transfer_regset_register): Likewise.
2565 (regcache::transfer_regset): Use gdb_byte*.
2566
2567 2018-06-22 Alan Hayward <alan.hayward@arm.com>
2568
2569 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
2570
2571 2018-06-21 Pedro Alves <palves@redhat.com>
2572
2573 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
2574 instead of a ptid_t. All callers adjusted.
2575 * ada-tasks.c (ada_get_task_number): Likewise. All callers
2576 adjusted.
2577 (print_ada_task_info, display_current_task_id, task_command_1):
2578 Adjust.
2579 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
2580 inferior_thread.
2581 (breakpoint_kind): Adjust.
2582 (remove_breakpoints_pid): Rename to ...
2583 (remove_breakpoints_inf): ... this. Adjust to take an inferior
2584 pointer. All callers adjusted.
2585 (bpstat_clear_actions): Use inferior_thread.
2586 (get_bpstat_thread): New.
2587 (bpstat_do_actions): Use it.
2588 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
2589 to take a thread_info pointer. All callers adjusted.
2590 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
2591 (breakpoint_re_set_thread): Use inferior_thread.
2592 * breakpoint.h (struct inferior): Forward declare.
2593 (bpstat_stop_status): Update.
2594 (remove_breakpoints_pid): Delete.
2595 (remove_breakpoints_inf): New.
2596 * bsd-uthread.c (bsd_uthread_target::wait)
2597 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
2598 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
2599 (maint_btrace_packet_history_cmd)
2600 (maint_btrace_clear_packet_history_cmd): Adjust.
2601 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
2602 inferior_thread.
2603 * cli/cli-interp.c: Include "inferior.h".
2604 * common/refcounted-object.h (struct
2605 refcounted_object_ref_policy): New.
2606 * compile/compile-object-load.c: Include gdbthread.h.
2607 (store_regs): Use inferior_thread.
2608 * corelow.c (core_target::close): Use current_inferior.
2609 (core_target_open): Adjust to use first_thread_of_inferior and use
2610 the current inferior.
2611 * ctf.c (ctf_target::close): Adjust to use current_inferior.
2612 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
2613 <thread>: ... this new field. All references adjusted.
2614 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
2615 Take a thread_info pointer instead of a ptid_t.
2616 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
2617 (dummy_frame_discard, register_dummy_frame_dtor): Take a
2618 thread_info pointer instead of a ptid_t.
2619 * elfread.c: Include "inferior.h".
2620 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
2621 Use inferior_thread.
2622 * eval.c (evaluate_subexp): Likewise.
2623 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
2624 inferior_thread.
2625 * gdb_proc_service.h (struct thread_info): Forward declare.
2626 (struct ps_prochandle) <ptid>: Delete, replaced by ...
2627 <thread>: ... this new field. All references adjusted.
2628 * gdbarch.h, gdbarch.c: Regenerate.
2629 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
2630 'thread' parameter. All implementations and callers adjusted.
2631 * gdbthread.h (thread_info) <set_running>: New method.
2632 (delete_thread, delete_thread_silent): Take a thread_info pointer
2633 instead of a ptid.
2634 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
2635 (first_thread_of_process): Delete, replaced by ...
2636 (first_thread_of_inferior): ... this new function. All callers
2637 adjusted.
2638 (any_live_thread_of_process): Delete, replaced by ...
2639 (any_live_thread_of_inferior): ... this new function. All callers
2640 adjusted.
2641 (switch_to_thread, switch_to_no_thread): Declare.
2642 (is_executing): Delete.
2643 (enable_thread_stack_temporaries): Update comment.
2644 <enable_thread_stack_temporaries>: Take a thread_info pointer
2645 instead of a ptid_t. Incref the thread.
2646 <~enable_thread_stack_temporaries>: Decref the thread.
2647 <m_ptid>: Delete
2648 <m_thr>: New.
2649 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2650 (get_last_thread_stack_temporary)
2651 (value_in_thread_stack_temporaries, can_access_registers_thread):
2652 Take a thread_info pointer instead of a ptid_t. All callers
2653 adjusted.
2654 * infcall.c (get_call_return_value): Use inferior_thread.
2655 (run_inferior_call): Work with thread pointers instead of ptid_t.
2656 (call_function_by_hand_dummy): Work with thread pointers instead
2657 of ptid_t. Use thread_info_ref.
2658 * infcmd.c (proceed_thread_callback): Access thread's state
2659 directly.
2660 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
2661 access thread's state directly.
2662 (continue_command): Use inferior_thread.
2663 (info_program_command): Use find_thread_ptid and access thread
2664 state directly.
2665 (proceed_after_attach_callback): Use thread state directly.
2666 (notice_new_inferior): Take a thread_info pointer instead of a
2667 ptid_t. All callers adjusted.
2668 (exit_inferior): Take an inferior pointer instead of a pid. All
2669 callers adjusted.
2670 (exit_inferior_silent): New.
2671 (detach_inferior): Delete.
2672 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
2673 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
2674 (detach_inferior_command, kill_inferior_command): Use
2675 find_inferior_id instead of valid_gdb_inferior_id and
2676 gdb_inferior_id_to_pid.
2677 (inferior_command): Use inferior and thread pointers.
2678 * inferior.h (struct thread_info): Forward declare.
2679 (notice_new_inferior): Take a thread_info pointer instead of a
2680 ptid_t. All callers adjusted.
2681 (detach_inferior): Delete declaration.
2682 (exit_inferior, exit_inferior_silent): Take an inferior pointer
2683 instead of a pid. All callers adjusted.
2684 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
2685 (valid_gdb_inferior_id): Delete.
2686 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
2687 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
2688 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
2689 ...
2690 <inf>: ... this new field.
2691 <step_ptid>: Delete, replaced by ...
2692 <step_thread>: ... this new field.
2693 (get_displaced_stepping_state): Take an inferior pointer instead
2694 of a pid. All callers adjusted.
2695 (displaced_step_in_progress_any_inferior): Adjust.
2696 (displaced_step_in_progress_thread): Take a thread pointer instead
2697 of a ptid_t. All callers adjusted.
2698 (displaced_step_in_progress, add_displaced_stepping_state): Take
2699 an inferior pointer instead of a pid. All callers adjusted.
2700 (get_displaced_step_closure_by_addr): Adjust.
2701 (remove_displaced_stepping_state): Take an inferior pointer
2702 instead of a pid. All callers adjusted.
2703 (displaced_step_prepare_throw, displaced_step_prepare)
2704 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
2705 All callers adjusted.
2706 (start_step_over): Adjust.
2707 (infrun_thread_ptid_changed): Remove bit updating ptids in the
2708 displaced step queue.
2709 (do_target_resume): Adjust.
2710 (fetch_inferior_event): Use inferior_thread.
2711 (context_switch, get_inferior_stop_soon): Take an
2712 execution_control_state pointer instead of a ptid_t. All callers
2713 adjusted.
2714 (switch_to_thread_cleanup): Delete.
2715 (stop_all_threads): Use scoped_restore_current_thread.
2716 * inline-frame.c: Include "gdbthread.h".
2717 (inline_state) <inline_state>: Take a thread pointer instead of a
2718 ptid_t. All callers adjusted.
2719 <ptid>: Delete, replaced by ...
2720 <thread>: ... this new field.
2721 (find_inline_frame_state): Take a thread pointer instead of a
2722 ptid_t. All callers adjusted.
2723 (skip_inline_frames, step_into_inline_frame)
2724 (inline_skipped_frames, inline_skipped_symbol): Take a thread
2725 pointer instead of a ptid_t. All callers adjusted.
2726 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
2727 (inline_skipped_frames, inline_skipped_symbol): Likewise.
2728 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
2729 pointers directly.
2730 * linux-nat.c (get_detach_signal): Likewise.
2731 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
2732 (thread_db_notice_clone): Adjust.
2733 (thread_db_find_new_threads_silently)
2734 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
2735 a thread pointer instead of a ptid_t. All callers adjusted.
2736 * mi/mi-cmd-var.c: Include "inferior.h".
2737 (mi_cmd_var_update_iter): Update to use thread pointers.
2738 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
2739 inferior directly.
2740 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
2741 out to ...
2742 (mi_output_running): ... this new function.
2743 (mi_on_resume_1): Adjust to use it.
2744 (mi_user_selected_context_changed): Adjust to use inferior_thread.
2745 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
2746 directly.
2747 (interrupt_thread_callback): : Adjust to use thread and inferior
2748 pointers.
2749 * proc-service.c: Include "gdbthread.h".
2750 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
2751 * progspace-and-thread.c: Include "inferior.h".
2752 * progspace.c: Include "inferior.h".
2753 * python/py-exitedevent.c (create_exited_event_object): Adjust to
2754 hold a reference to an inferior_object.
2755 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
2756 inferior_thread.
2757 * python/py-inferior.c (struct inferior_object): Give the type a
2758 tag name instead of a typedef.
2759 (python_on_normal_stop): No need to check if the current thread is
2760 listed.
2761 (inferior_to_inferior_object): Change return type to
2762 inferior_object. All callers adjusted.
2763 (find_thread_object): Delete, bits factored out to ...
2764 (thread_to_thread_object): ... this new function.
2765 * python/py-infthread.c (create_thread_object): Use
2766 inferior_to_inferior_object.
2767 (thpy_is_stopped): Use thread pointer directly.
2768 (gdbpy_selected_thread): Use inferior_thread.
2769 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
2770 field, replaced with ...
2771 <thread>: ... this new field. All users adjusted.
2772 (btpy_insn_or_gap_new): Drop const.
2773 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
2774 callers adjusted.
2775 * python/py-record.c: Include "gdbthread.h".
2776 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2777 a ptid_t. All callers adjusted.
2778 (gdbpy_current_recording): Use inferior_thread.
2779 * python/py-record.h (recpy_record_object) <ptid>: Delete
2780 field, replaced with ...
2781 <thread>: ... this new field. All users adjusted.
2782 (recpy_element_object) <ptid>: Delete
2783 field, replaced with ...
2784 <thread>: ... this new field. All users adjusted.
2785 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2786 a ptid_t. All callers adjusted.
2787 * python/py-threadevent.c: Include "gdbthread.h".
2788 (get_event_thread): Use thread_to_thread_object.
2789 * python/python-internal.h (struct inferior_object): Forward
2790 declare.
2791 (find_thread_object, find_inferior_object): Delete declarations.
2792 (thread_to_thread_object, inferior_to_inferior_object): New
2793 declarations.
2794 * record-btrace.c: Include "inferior.h".
2795 (require_btrace_thread): Use inferior_thread.
2796 (record_btrace_frame_sniffer)
2797 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
2798 (get_thread_current_frame): Use scoped_restore_current_thread and
2799 switch_to_thread.
2800 (get_thread_current_frame): Use thread pointer directly.
2801 (record_btrace_replay_at_breakpoint): Use thread's inferior
2802 pointer directly.
2803 * record-full.c: Include "inferior.h".
2804 * regcache.c: Include "gdbthread.h".
2805 (get_thread_arch_regcache): Use the inferior's address space
2806 directly.
2807 (get_thread_regcache, registers_changed_thread): New.
2808 * regcache.h (get_thread_regcache(thread_info *thread)): New
2809 overload.
2810 (registers_changed_thread): New.
2811 (remote_target) <remote_detach_1>: Swap order of parameters.
2812 (remote_add_thread): <remote_add_thread>: Return the new thread.
2813 (get_remote_thread_info(ptid_t)): New overload.
2814 (remote_target::remote_notice_new_inferior): Use thread pointers
2815 directly.
2816 (remote_target::process_initial_stop_replies): Use
2817 thread_info::set_running.
2818 (remote_target::remote_detach_1, remote_target::detach)
2819 (extended_remote_target::detach): Adjust.
2820 * stack.c (frame_show_address): Use inferior_thread.
2821 * target-debug.h (target_debug_print_thread_info_pp): New.
2822 * target-delegates.c: Regenerate.
2823 * target.c (default_thread_address_space): Delete.
2824 (memory_xfer_partial_1): Use current_inferior.
2825 (target_detach): Use current_inferior.
2826 (target_thread_address_space): Delete.
2827 (generic_mourn_inferior): Use current_inferior.
2828 * target.h (struct target_ops) <thread_address_space>: Delete.
2829 (target_thread_address_space): Delete.
2830 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
2831 pointers directly.
2832 (delete_thread_1, delete_thread, delete_thread_silent): Take a
2833 thread pointer instead of a ptid_t. Adjust all callers.
2834 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
2835 (first_thread_of_process): Delete, replaced by ...
2836 (first_thread_of_inferior): ... this new function. All callers
2837 adjusted.
2838 (any_thread_of_process): Rename to ...
2839 (any_thread_of_inferior): ... this, and take an inferior pointer.
2840 (any_live_thread_of_process): Rename to ...
2841 (any_live_thread_of_inferior): ... this, and take an inferior
2842 pointer.
2843 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2844 (value_in_thread_stack_temporaries)
2845 (get_last_thread_stack_temporary): Take a thread pointer instead
2846 of a ptid_t. Adjust all callers.
2847 (thread_info::set_running): New.
2848 (validate_registers_access): Use inferior_thread.
2849 (can_access_registers_ptid): Rename to ...
2850 (can_access_registers_thread): ... this, and take a thread
2851 pointer.
2852 (print_thread_info_1): Adjust to compare thread pointers instead
2853 of ptids.
2854 (switch_to_no_thread, switch_to_thread): Make extern.
2855 (scoped_restore_current_thread::~scoped_restore_current_thread):
2856 Use m_thread pointer directly.
2857 (scoped_restore_current_thread::scoped_restore_current_thread):
2858 Use inferior_thread.
2859 (thread_command): Use thread pointer directly.
2860 (thread_num_make_value_helper): Use inferior_thread.
2861 * top.c (execute_command): Use inferior_thread.
2862 * tui/tui-interp.c: Include "inferior.h".
2863 * varobj.c (varobj_create): Use inferior_thread.
2864 (value_of_root_1): Use find_thread_global_id instead of
2865 global_thread_id_to_ptid.
2866
2867 2018-06-21 Alan Hayward <alan.hayward@arm.com>
2868
2869 * regcache.c (readable_regcache::read_part): Avoid memcpy when
2870 possible.
2871 (regcache::write_part): Likewise.
2872 (readable_regcache::cooked_read_part): Update comment.
2873 (readable_regcache::cooked_write_part): Likewise.
2874 * regcache.h: (readable_regcache::read_part): Likewise.
2875 (regcache::write_part): Likewise.
2876
2877 2018-06-21 Richard Bunt <richard.bunt@arm.com>
2878 Dirk Schubert <dirk.schubert@arm.com>
2879
2880 * aarch64-linux-nat.c (post_attach): New.
2881 (aarch64_linux_nat_target::post_attach): Override post_attach to
2882 record the number of hardware debug registers.
2883
2884 2018-06-20 Tom Tromey <tom@tromey.com>
2885
2886 * python/py-param.c (add_setshow_generic): Make parameters const.
2887 (parmpy_init): Update.
2888
2889 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
2890
2891 * regcache.h (regcache_cooked_read_ftype): Rename to...
2892 (register_read_ftype): ...this, change type to function_view.
2893 (class reg_buffer) <save>: Remove src parameter.
2894 (readonly_detached_regcache) <readonly_detached_regcache>: Make
2895 parameter non-const in first overload. Remove src parameter in
2896 second overload.
2897 * regcache.c (do_cooked_read): Remove.
2898 (readonly_detached_regcache::readonly_detached_regcache): Make
2899 parameter non-const, adjust call to other constructor.
2900 (reg_buffer::save): Remove src parameter.
2901 * frame.c (do_frame_register_read): Remove.
2902 (frame_save_as_regcache): Use lambda function.
2903 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
2904 parameter to ppu2spu_data *.
2905 (ppu2spu_sniffer): Use lambda function.
2906
2907 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
2908
2909 * record-full.c (record_full_target::insert_breakpoint): Remove
2910 "struct" keyword, add const.
2911
2912 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
2913
2914 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
2915 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
2916 * configure.ac: Remove AC_PREREQ, add missing quoting.
2917 * gnulib/configure.ac: Modernize usage of
2918 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
2919 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
2920 (AUTOMAKE_VERSION): Bump to 1.15.1.
2921 * configure: Re-generate.
2922 * config.in: Re-generate.
2923 * aclocal.m4: Re-generate.
2924 * gnulib/aclocal.m4: Re-generate.
2925 * gnulib/config.in: Re-generate.
2926 * gnulib/configure: Re-generate.
2927 * gnulib/import/Makefile.in: Re-generate.
2928
2929 2018-06-19 Pedro Alves <palves@redhat.com>
2930
2931 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
2932 (lookup_minimal_symbol_by_pc_section): ... here with
2933 gdb_assert_not_reached added.
2934
2935 2018-06-19 Pedro Alves <palves@redhat.com>
2936
2937 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
2938 parameter with a block parameter. Compare location's block symbol
2939 with the frame's block instead of addresses.
2940 (skip_inline_frames): Pass the current block instead of the
2941 frame's address. Break out as soon as we determine the frame
2942 should not be skipped.
2943
2944 2018-06-18 Tom Tromey <tom@tromey.com>
2945
2946 * solib-aix.c (solib_aix_get_section_offsets): Return
2947 unique_xmalloc_ptr.
2948 (solib_aix_solib_create_inferior_hook): Update.
2949
2950 2018-06-18 Tom Tromey <tom@tromey.com>
2951
2952 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
2953
2954 2018-06-18 Tom Tromey <tom@tromey.com>
2955
2956 * solib-frv.c (frv_relocate_main_executable): Use
2957 unique_xmalloc_ptr.
2958 * solib-dsbt.c (dsbt_relocate_main_executable): Use
2959 unique_xmalloc_ptr.
2960
2961 2018-06-18 Tom Tromey <tom@tromey.com>
2962
2963 * objfiles.h (inhibit_section_map_updates): Update.
2964 (resume_section_map_updates, resume_section_map_updates_cleanup):
2965 Remove.
2966 * solib-svr4.c (svr4_handle_solib_event): Update.
2967 * objfiles.c (inhibit_section_map_updates): Return
2968 scoped_restore_tmpl<int>.
2969 (resume_section_map_updates, resume_section_map_updates_cleanup):
2970 Remove.
2971
2972 2018-06-18 Tom Tromey <tom@tromey.com>
2973
2974 * valprint.h (read_string): Update.
2975 * valprint.c (read_string): Change type of "buffer".
2976 (val_print_string): Update.
2977 * python/py-value.c (valpy_string): Update.
2978 * language.h (struct language_defn) <la_get_string>: Change
2979 type of "buffer".
2980 (default_get_string, c_get_string): Update.
2981 * language.c (default_get_string): Change type of "buffer".
2982 * guile/scm-value.c (gdbscm_value_to_string): Update.
2983 * c-lang.c (c_get_string): Change type of "buffer".
2984
2985 2018-06-18 Tom Tromey <tom@tromey.com>
2986
2987 * ser-mingw.c (struct pipe_state_destroyer): New.
2988 (pipe_state_up): New typedef.
2989 (cleanup_pipe_state): Remove.
2990 (pipe_windows_open): Use pipe_state_up. Don't release argv.
2991
2992 2018-06-18 Tom Tromey <tom@tromey.com>
2993
2994 * rust-lang.h (rust_yyerror): Don't declare.
2995 * rust-lang.c (rust_language_defn): Update.
2996 * rust-exp.y (yyerror): Now static.
2997 * parse.c (parse_exp_in_context_1): Update.
2998 * p-lang.h (p_yyerror): Don't declare.
2999 * p-lang.c (p_language_defn): Update.
3000 * p-exp.y (yyerror): Now static.
3001 * opencl-lang.c (opencl_language_defn): Update.
3002 * objc-lang.c (objc_language_defn): Update.
3003 * m2-lang.h (m2_yyerror): Don't declare.
3004 * m2-lang.c (m2_language_defn): Update.
3005 * m2-exp.y (yyerror): Now static.
3006 * language.h (struct language_defn) <la_error>: Remove.
3007 * language.c (unk_lang_error): Remove.
3008 (unknown_language_defn, auto_language_defn): Remove.
3009 * go-lang.h (go_yyerror): Don't declare.
3010 * go-lang.c (go_language_defn): Update.
3011 * go-exp.y (yyerror): Now static.
3012 * f-lang.h (f_yyerror): Don't declare.
3013 * f-lang.c (f_language_defn): Update.
3014 * f-exp.y (yyerror): Now static.
3015 * d-lang.h (d_yyerror): Don't declare.
3016 * d-lang.c (d_language_defn): Update.
3017 * d-exp.y (yyerror): Now static.
3018 * c-lang.h (c_yyerror): Don't declare.
3019 * c-lang.c (c_language_defn, cplus_language_defn)
3020 (asm_language_defn, minimal_language_defn): Update.
3021 * c-exp.y (yyerror): Now static.
3022 * ada-lang.h (ada_yyerror): Don't declare.
3023 * ada-lang.c (ada_language_defn): Update.
3024 * ada-exp.y (yyerror): Now static.
3025
3026 2018-06-18 Alan Hayward <alan.hayward@arm.com>
3027
3028 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
3029 (store_sveregs_to_thread): Likewise.
3030 (aarch64_linux_fetch_inferior_registers): Check for SVE.
3031 (aarch64_linux_store_inferior_registers): Likewise.
3032 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
3033 function.
3034 (aarch64_sve_regs_copy_to_regcache): Likewise.
3035 (aarch64_sve_regs_copy_from_regcache): Likewise.
3036 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
3037 declaration.
3038 (aarch64_sve_regs_copy_to_regcache): Likewise.
3039 (aarch64_sve_regs_copy_from_regcache): Likewise.
3040 (sve_context): Structure from Linux headers.
3041 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
3042 (SVE_SIG_ZREG_SIZE): Likewise.
3043 (SVE_SIG_PREG_SIZE): Likewise.
3044 (SVE_SIG_FFR_SIZE): Likewise.
3045 (SVE_SIG_REGS_OFFSET): Likewise.
3046 (SVE_SIG_ZREGS_OFFSET): Likewise.
3047 (SVE_SIG_ZREG_OFFSET): Likewise.
3048 (SVE_SIG_ZREGS_SIZE): Likewise.
3049 (SVE_SIG_PREGS_OFFSET): Likewise.
3050 (SVE_SIG_PREG_OFFSET): Likewise.
3051 (SVE_SIG_PREGS_SIZE): Likewise.
3052 (SVE_SIG_FFR_OFFSET): Likewise.
3053 (SVE_SIG_REGS_SIZE): Likewise.
3054 (SVE_SIG_CONTEXT_SIZE): Likewise.
3055 (SVE_PT_REGS_MASK): Likewise.
3056 (SVE_PT_REGS_FPSIMD): Likewise.
3057 (SVE_PT_REGS_SVE): Likewise.
3058 (SVE_PT_VL_INHERIT): Likewise.
3059 (SVE_PT_VL_ONEXEC): Likewise.
3060 (SVE_PT_REGS_OFFSET): Likewise.
3061 (SVE_PT_FPSIMD_OFFSET): Likewise.
3062 (SVE_PT_FPSIMD_SIZE): Likewise.
3063 (SVE_PT_SVE_ZREG_SIZE): Likewise.
3064 (SVE_PT_SVE_PREG_SIZE): Likewise.
3065 (SVE_PT_SVE_FFR_SIZE): Likewise.
3066 (SVE_PT_SVE_FPSR_SIZE): Likewise.
3067 (SVE_PT_SVE_FPCR_SIZE): Likewise.
3068 (__SVE_SIG_TO_PT): Likewise.
3069 (SVE_PT_SVE_OFFSET): Likewise.
3070 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
3071 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
3072 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
3073 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
3074 (SVE_PT_SVE_PREG_OFFSET): Likewise.
3075 (SVE_PT_SVE_PREGS_SIZE): Likewise.
3076 (SVE_PT_SVE_FFR_OFFSET): Likewise.
3077 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
3078 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
3079 (SVE_PT_SVE_SIZE): Likewise.
3080 (SVE_PT_SIZE): Likewise.
3081 (HAS_SVE_STATE): New define.
3082
3083 2018-06-18 Alan Hayward <alan.hayward@arm.com>
3084
3085 * nat/aarch64-sve-linux-sigcontext.h: New file.
3086 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
3087 new files.
3088 (SVE_VQ_MIN): Likewise.
3089 (SVE_VQ_MAX): Likewise.
3090 (SVE_VL_MIN): Likewise.
3091 (SVE_VL_MAX): Likewise.
3092 (SVE_NUM_ZREGS): Likewise.
3093 (SVE_NUM_PREGS): Likewise.
3094 (sve_vl_valid): Likewise.
3095 (struct user_sve_header): Likewise.
3096
3097 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
3098 Richard Bunt <Richard.Bunt@arm.com>
3099
3100 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
3101 was requested by GDB.
3102
3103 2018-06-15 Tom de Vries <tdevries@suse.de>
3104
3105 * MAINTAINERS (Write After Approval): Add Tom de Vries.
3106
3107 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
3108
3109 * gnulib/update-gnulib.sh: Print expected versions of
3110 autoconf/aclocal.
3111
3112 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
3113
3114 * arch-utils.c (default_type_align): Use type_length_units.
3115 * gdbtypes.c (type_align): Use type_length_units.
3116
3117 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3118
3119 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
3120 of 'define' command.
3121
3122 2018-06-14 Tom de Vries <tdevries@suse.de>
3123
3124 PR cli/22573
3125 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
3126 get_no_prettyformat_print_options.
3127
3128 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
3129
3130 * sparc-nat.h: Include target.h.
3131 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
3132 <fetch_registers>: Remove this argument in function call.
3133 <store_registers>: Remove this argument in function call, remove
3134 extra semicolon.
3135 <low_forget_process>: Call sparc64_forget_process instead of
3136 sparc_forget_process.
3137
3138 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3139
3140 * procfs.c (_initialize_procfs): Use add_inf_child_target.
3141 (procfs_target::make_corefile_notes): Adjust to new
3142 target_read_alloc return type.
3143
3144 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3145 Stephen Roberts <stephen.roberts@arm.com>
3146
3147 PR gdb/22882
3148 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
3149 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
3150 Move should_notify_stop local into more inner scope.
3151
3152 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3153 Stephen Roberts <stephen.roberts@arm.com>
3154
3155 PR gdb/22882
3156 * infrun.c (resume_1): Add call to mark_async_event_handler.
3157
3158 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3159
3160 * infrun.c (do_target_wait): Change old version of $pc printed.
3161
3162 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
3163
3164 * dwarf2read.c (read_index_from_section): Rename to...
3165 (read_gdb_index_from_section): ... this, update all callers.
3166 (dwarf2_read_index): Rename to...
3167 (dwarf2_read_gdb_index): ... this, update all callers.
3168
3169 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
3170
3171 * gdb/hppa-linux-nat.c
3172 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
3173 hppa_linux_nat_target::fetch_registers.
3174
3175 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3176
3177 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
3178 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
3179 (AARCH64_DWARF_SVE_FFR): Likewise.
3180 (AARCH64_DWARF_SVE_P0): Likewise.
3181 (AARCH64_DWARF_SVE_Z0): Likewise.
3182
3183 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3184
3185 * common/common-regcache.h (raw_compare): New function.
3186 * regcache.c (regcache::raw_compare): Likewise.
3187 * regcache.h (regcache::raw_compare): New declaration.
3188
3189 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3190
3191 * common/common-regcache.h (reg_buffer_common): New structure.
3192 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
3193 (reg_buffer::raw_supply): Likewise.
3194 (reg_buffer::raw_supply_integer): Likewise.
3195 (reg_buffer::raw_supply_zeroed): Likewise.
3196 (reg_buffer::raw_collect): Likewise.
3197 (reg_buffer::raw_collect_integer): Likewise.
3198 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
3199 (reg_buffer::raw_supply): Likewise.
3200 (reg_buffer::raw_supply_integer): Likewise.
3201 (reg_buffer::raw_supply_zeroed): Likewise.
3202 (reg_buffer::raw_collect): Likewise.
3203 (reg_buffer::raw_collect_integer): Likewise.
3204
3205 2018-06-10 Tom Tromey <tom@tromey.com>
3206
3207 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
3208 (class remote_state) <stop_reply_queue>: Now std::vector.
3209 (remote_state::~remote_state)
3210 (remote_target::stop_reply_queue_length): Update.
3211 (struct queue_iter_param, remove_child_of_pending_fork)
3212 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
3213 (check_pending_event_prevents_wildcard_vcont_callback)
3214 (remove_stop_reply_for_inferior)
3215 (remove_stop_reply_of_remote_state)
3216 (remote_notif_remove_once_on_match)
3217 (stop_reply_match_ptid_and_ws)
3218 (remote_kill_child_of_pending_fork): Remove.
3219 (remote_target::remove_new_fork_children)
3220 (remote_target::check_pending_events_prevent_wildcard_vcont)
3221 (remote_target::discard_pending_stop_replies)
3222 (remote_target::discard_pending_stop_replies_in_queue)
3223 (remote_target::remote_notif_remove_queued_reply)
3224 (remote_target::queued_stop_reply)
3225 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
3226 (remote_target::wait, remote_target::kill_new_fork_children)
3227 (remote_target::async): Update.
3228
3229 2018-06-10 Tom Tromey <tom@tromey.com>
3230
3231 * record-full.c (record_full_arch_list_cleanups): Remove.
3232 (record_full_message): Use try/catch.
3233 (record_full_wait_cleanups): Remove.
3234 (record_full_wait_1): Use try/catch.
3235 (record_full_restore): Likewise.
3236
3237 2018-06-10 Tom Tromey <tom@tromey.com>
3238
3239 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
3240 declare VEC. Add constructor.
3241 <in_target_beneath>: Now bool.
3242 (record_full_breakpoints): Now a std::vector, static.
3243 (record_full_sync_record_breakpoints)
3244 (record_full_init_record_breakpoints)
3245 (record_full_target::insert_breakpoint)
3246 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
3247
3248 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
3249
3250 * dwarf2read.c (process_cu_includes): Remove struct keyword.
3251 * serial.c (serial_interface_lookup): Remove struct keyword.
3252
3253 2018-06-10 Tom Tromey <tom@tromey.com>
3254
3255 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
3256 method.
3257 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
3258 a method.
3259 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
3260 method.
3261 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
3262 "beneath" as a method.
3263 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
3264 Use "beneath" as a method.
3265
3266 2018-06-10 Tom Tromey <tom@tromey.com>
3267
3268 * tracefile.c (struct trace_file_writer_deleter): New.
3269 <operator()>: Rename from trace_file_writer_xfree.
3270 (trace_file_writer_up): New typedef.
3271 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
3272
3273 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
3274
3275 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
3276 <m_registers, m_register_status>: Change type to
3277 std::unique_ptr.
3278 * regcache.c (reg_buffer::reg_buffer): Use new instead of
3279 XCNEWVEC.
3280
3281 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
3282
3283 * common/common-regcache.h (enum register_status): Add
3284 underlying type "signed char".
3285 * regcache.h (reg_buffer) <m_register_status>: Change type to
3286 register_status *.
3287 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
3288 register_status instead of signed char.
3289 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
3290 (reg_buffer::get_register_status): Remove cast.
3291 (readable_regcache::raw_read): Remove cast.
3292 (readable_regcache::cooked_read): Remove cast.
3293
3294 2018-06-09 Tom Tromey <tom@tromey.com>
3295
3296 * source.c (reverse_search_command, forward_search_command): Use
3297 scoped_fd.
3298
3299 2018-06-09 Tom Tromey <tom@tromey.com>
3300
3301 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
3302 (serial_ops_list): Now static, std::vector.
3303 (serial_interface_lookup, serial_add_interface): Update.
3304
3305 2018-06-09 Tom Tromey <tom@tromey.com>
3306
3307 * dwarf2read.c (process_cu_includes): Update.
3308 (process_full_comp_unit): Update.
3309 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
3310 std::vector.
3311
3312 2018-06-08 Paul Koning <paul_koning@dell.com>
3313
3314 PR gdb/23252
3315
3316 * python/python.c (do_start_initialization):
3317 Avoid call to internal Python API.
3318 (init__gdb_module): New function.
3319
3320 2018-06-08 Gary Benson <gbenson@redhat.com>
3321
3322 * linux-thread-db.c (valprint.h): New include.
3323 (struct check_thread_db_info): New structure.
3324 (check_thread_db_on_load, tdb_testinfo): New static globals.
3325 (check_thread_db, check_thread_db_callback): New functions.
3326 (try_thread_db_load_1): Run integrity checks if requested.
3327 (maintenance_check_libthread_db): New function.
3328 (_initialize_thread_db): Register "maint check libthread-db"
3329 and "maint set/show check-libthread-db".
3330 * NEWS: Mention the above new commands.
3331
3332 2018-06-08 Tom Tromey <tom@tromey.com>
3333
3334 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
3335 now a method.
3336
3337 2018-06-08 Tom Tromey <tom@tromey.com>
3338
3339 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
3340
3341 2018-06-08 Tom Tromey <tom@tromey.com>
3342
3343 * common/btrace-common.h (struct btrace_data): Add constructor,
3344 destructor, move assignment operator.
3345 <empty, clear, fini>: New methods.
3346 <format>: Initialize.
3347 (btrace_data_init, btrace_data_fini, btrace_data_clear)
3348 (btrace_data_empty): Don't declare.
3349 * common/btrace-common.c (btrace_data_init): Remove.
3350 (btrace_data::fini): Rename from btrace_data_fini.
3351 (btrace_data::empty): Rename from btrace_data_empty.
3352 (btrace_data::clear): Rename from btrace_data_clear. Return
3353 bool.
3354 * btrace.h (make_cleanup_btrace_data): Don't declare.
3355 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
3356 (parse_xml_btrace): Update.
3357 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
3358 (maint_btrace_clear_packet_history_cmd): Update.
3359
3360 2018-06-07 Pedro Alves <palves@redhat.com>
3361
3362 * target.h (target_ops) <beneath>: Now a method. All references
3363 updated.
3364 (class target_stack): New.
3365 * target.c (g_target_stack): New.
3366 (g_current_top_target): Delete.
3367 (current_top_target): Get the top target out of g_target_stack.
3368 (target_stack::push, target_stack::unpush): New.
3369 (push_target, unpush_target): Reimplement.
3370 (target_is_pushed): Reimplement in terms of g_target_stack.
3371 (target_ops::beneath, target_stack::find_beneath): New.
3372
3373 2018-06-07 Pedro Alves <palves@redhat.com>
3374
3375 * target.h (find_target_beneath): Delete declaration.
3376 * target.c (find_target_beneath): Delete definition.
3377 * aix-thread.c: All callers of find_target_beneath adjusted to
3378 call target_ops::beneath instead.
3379 * bsd-uthread.c: Likewise.
3380 * linux-thread-db.c: Likewise.
3381 * ravenscar-thread.c: Likewise.
3382 * sol-thread.c: Likewise.
3383 * spu-multiarch.c: Likewise.
3384
3385 2018-06-07 Pedro Alves <palves@redhat.com>
3386
3387 * target.h (target_ops) <beneath>: Now a method. All references
3388 updated.
3389 (target_ops) <m_beneath>: New.
3390 * target.c (target_ops::beneath): New.
3391 * corelow.c: Adjust all references to target_ops::beneath.
3392 * linux-thread-db.c: Likewise.
3393 * make-target-delegates: Likewise.
3394 * record-btrace.c: Likewise.
3395 * record-full.c: Likewise.
3396 * remote.c: Likewise.
3397 * target.c: Likewise.
3398 * target-delegates.c: Regenerate.
3399
3400 2018-06-07 Pedro Alves <palves@redhat.com>
3401
3402 * target.h (target_stack): Delete.
3403 (current_top_target): Declare function.
3404 * target.c (target_stack): Delete.
3405 (g_current_top_target): New.
3406 (current_top_target): New function.
3407 * auxv.c: Use current_top_target instead of target_stack
3408 throughout.
3409 * avr-tdep.c: Likewise.
3410 * breakpoint.c: Likewise.
3411 * corefile.c: Likewise.
3412 * elfread.c: Likewise.
3413 * eval.c: Likewise.
3414 * exceptions.c: Likewise.
3415 * frame.c: Likewise.
3416 * gdbarch-selftests.c: Likewise.
3417 * gnu-v3-abi.c: Likewise.
3418 * ia64-tdep.c: Likewise.
3419 * ia64-vms-tdep.c: Likewise.
3420 * infcall.c: Likewise.
3421 * infcmd.c: Likewise.
3422 * infrun.c: Likewise.
3423 * linespec.c: Likewise.
3424 * linux-tdep.c: Likewise.
3425 * minsyms.c: Likewise.
3426 * ppc-linux-nat.c: Likewise.
3427 * ppc-linux-tdep.c: Likewise.
3428 * procfs.c: Likewise.
3429 * regcache.c: Likewise.
3430 * remote.c: Likewise.
3431 * rs6000-tdep.c: Likewise.
3432 * s390-linux-nat.c: Likewise.
3433 * s390-tdep.c: Likewise.
3434 * solib-aix.c: Likewise.
3435 * solib-darwin.c: Likewise.
3436 * solib-dsbt.c: Likewise.
3437 * solib-spu.c: Likewise.
3438 * solib-svr4.c: Likewise.
3439 * solib-target.c: Likewise.
3440 * sparc-tdep.c: Likewise.
3441 * sparc64-tdep.c: Likewise.
3442 * spu-tdep.c: Likewise.
3443 * symfile.c: Likewise.
3444 * symtab.c: Likewise.
3445 * target-descriptions.c: Likewise.
3446 * target-memory.c: Likewise.
3447 * target.c: Likewise.
3448 * target.h: Likewise.
3449 * tracefile-tfile.c: Likewise.
3450 * tracepoint.c: Likewise.
3451 * valops.c: Likewise.
3452 * valprint.c: Likewise.
3453 * value.c: Likewise.
3454 * windows-tdep.c: Likewise.
3455 * mi/mi-main.c: Likewise.
3456
3457 2018-06-07 Tom Tromey <tom@tromey.com>
3458
3459 * valprint.h (build_address_symbolic): Declare.
3460 * printcmd.c (print_address_symbolic): Update.
3461 (build_address_symbolic): Change "name" and "filename" to
3462 std::string.
3463 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
3464 Update.
3465 * defs.h (build_address_symbolic): Remove declaration.
3466
3467 2018-06-07 Alan Hayward <alan.hayward@arm.com>
3468
3469 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
3470 (aarch64_vnv_type): Add function.
3471 (aarch64_pseudo_register_name): Add V regs for SVE.
3472 (aarch64_pseudo_register_type): Likewise.
3473 (aarch64_pseudo_register_reggroup_p): Likewise.
3474 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
3475 (aarch64_pseudo_read_value): Add V regs for SVE.
3476 (aarch64_pseudo_write_2): Use V0 offset for SVE
3477 (aarch64_pseudo_write): Add V regs for SVE.
3478 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
3479
3480 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
3481
3482 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
3483 (sve_vl_from_vq): Likewise.
3484
3485 2018-06-05 Tom Tromey <tom@tromey.com>
3486
3487 * cli/cli-cmds.c (show_version): Update.
3488 * top.c (print_gdb_version): Add "interactive" parameter.
3489 Update.
3490 * main.c (captured_main_1): Update.
3491 * top.h (print_gdb_version): Add "interactive" parameter and a
3492 comment.
3493
3494 2018-06-05 David Malcolm <dmalcolm@redhat.com>
3495
3496 * common/enum-flags.h: Add trailing semicolon to example in
3497 comment.
3498
3499 2018-06-05 Tom Tromey <tom@tromey.com>
3500
3501 PR cli/12326:
3502 * NEWS: Add entry about pager.
3503 * utils.c (pagination_disabled_for_command): New global.
3504 (prompt_for_continue): Allow "c" response to prompt.
3505 (reinitialize_more_filter): Clear
3506 pagination_disabled_for_command.
3507 (fputs_maybe_filtered): Check pagination_disabled_for_command.
3508
3509 2018-06-04 Tom Tromey <tom@tromey.com>
3510
3511 * ada-lang.h (ada_lookup_symbol_list): Update.
3512 * ada-lang.c (resolve_subexp): Update.
3513 (symbols_are_identical_enums): Change type of syms. Remove nsyms
3514 parameter.
3515 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
3516 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
3517 results parameter to std::vector.
3518 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
3519 Update.
3520 * ada-exp.y (block_lookup): Update.
3521 (select_possible_type_sym): Change type of syms. Remove nsyms
3522 parameter.
3523 (write_var_or_type, write_name_assoc): Update.
3524
3525 2018-06-04 Joel Brobecker <brobecker@adacore.com>
3526
3527 * windows-nat.c (windows_nat_target::xfer_partial): Return
3528 TARGET_XFER_E_IO if we need to delegate to the target beneath
3529 but BENEATH is NULL.
3530
3531 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
3532
3533 * Makefile.in (config.status): Add configure.nat as a
3534 dependency.
3535
3536 2018-06-04 Tom Tromey <tom@tromey.com>
3537
3538 * cp-name-parser.y (cpname_state): Add method declarations.
3539 (HANDLE_QUAL): Update.
3540 (cpname_state::d_grab, cpname_state::fill_comp)
3541 (cpname_state::make_operator, cpname_state::make_dtor)
3542 (cpname_state::make_builtin_type, cpname_state::make_name)
3543 (cpname_state::d_qualify, cpname_state::d_int_type)
3544 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
3545 (%union): Move earlier.
3546
3547 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3548
3549 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
3550
3551 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3552
3553 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
3554 (aarch64_pseudo_write_1): Likewise.
3555 (aarch64_pseudo_read_value): Use helper.
3556 (aarch64_pseudo_write): Likewise.
3557
3558 2018-06-04 Pedro Alves <palves@redhat.com>
3559
3560 * darwin-nat.c (darwin_ops): Delete.
3561 (darwin_attach_pid): Use get_native_target.
3562
3563 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3564
3565 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
3566 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
3567
3568 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3569
3570 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
3571 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
3572 (aarch64_gdbarch_init): Check for SVE.
3573 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
3574
3575 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3576
3577 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
3578 * aarch64-tdep.h (aarch64_read_description): Likewise.
3579 * arch/aarch64.c (aarch64_create_target_description): Likewise.
3580 * arch/aarch64.h (aarch64_create_target_description): Likewise.
3581 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
3582 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
3583 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
3584
3585 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
3586
3587 * value.c (value_fetch_lazy_bitfield): New.
3588 (value_fetch_lazy_memory): New.
3589 (value_fetch_lazy_register): New.
3590 (value_fetch_lazy): Factor out to smaller functions.
3591
3592 2018-06-01 Tom Tromey <tom@tromey.com>
3593
3594 * cp-name-parser.y (backslashable, represented): Now const.
3595
3596 2018-06-01 Tom Tromey <tom@tromey.com>
3597
3598 * cp-name-parser.y: Include parser-defs.h.
3599 (parser_fprintf): Remove declaration.
3600
3601 2018-06-01 Tom Tromey <tom@tromey.com>
3602
3603 * cp-name-parser.y: Use %pure-parser, %lex-param, and
3604 %parse-param.
3605 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
3606 (global_result): Remove globals.
3607 (struct cpname_state): New.
3608 (yyparse): Don't declare.
3609 (yylex, yyerror): Move declarations after %union.
3610 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
3611 (make_name): Add state parameter.
3612 Update all callers.
3613 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
3614 parameter.
3615 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
3616 Update.
3617 (yylex): Add lvalp, state parameters.
3618 (yyerror): Add state parameter.
3619 (cp_demangled_name_to_comp): Update.
3620
3621 2018-06-01 Tom Tromey <tom@tromey.com>
3622
3623 * cp-name-parser.y (parser_fprintf): Declare.
3624 (GDB_YY_REMAP_PREFIX): Define.
3625 Include yy-remap.h. Don't redefine yy* identifiers.
3626
3627 2018-06-01 Tom Tromey <tom@tromey.com>
3628
3629 * python/py-type.c (typy_legacy_template_argument): Update.
3630 * cp-support.h (cp_demangled_name_to_comp): Update.
3631 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
3632 parameter to be a "std::string *".
3633 (main): Update.
3634
3635 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
3636
3637 * ada-lex.l: Include "diagnostics.h" instead of
3638 "common/diagnostics.h".
3639 * unittests/environ-selftests.c: Likewise.
3640 * common/diagnostics.h: Moved to ../include.
3641
3642 2018-06-01 Joel Brobecker <brobecker@adacore.com>
3643
3644 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
3645 to language_mode_manual while calling breakpoint_re_set_one.
3646
3647 2018-06-01 Tom Tromey <tom@tromey.com>
3648
3649 * valops.c (value_cast_structs, destructor_name_p): Update.
3650 * symtab.c (gdb_mangle_name): Update.
3651 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
3652 Update.
3653 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
3654 (pascal_object_print_value_fields, pascal_object_print_value):
3655 Update.
3656 * p-typeprint.c (pascal_type_print_derivation_info): Update.
3657 * linespec.c (find_methods): Update.
3658 * gdbtypes.h (type_name_no_tag): Remove.
3659 (type_name_or_error): Rename from type_name_no_tag_or_error.
3660 * gdbtypes.c (type_name_no_tag): Remove.
3661 (type_name_or_error): Rename from type_name_no_tag_or_error.
3662 (lookup_struct_elt_type, check_typedef): Update.
3663 * expprint.c (print_subexp_standard): Update.
3664 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
3665 * d-namespace.c (d_lookup_nested_symbol): Update.
3666 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
3667 (cp_print_class_member): Update.
3668 * cp-namespace.c (cp_lookup_nested_symbol): Update.
3669 * completer.c (add_struct_fields): Update.
3670 * c-typeprint.c (cp_type_print_derivation_info)
3671 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
3672 Update.
3673 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
3674 (ada_prefer_type, ada_is_exception_sym): Update.
3675
3676 2018-06-01 Tom Tromey <tom@tromey.com>
3677
3678 * valops.c (enum_constant_from_type, value_namespace_elt)
3679 (value_maybe_namespace_elt): Update.
3680 * valarith.c (find_size_for_pointer_math): Update.
3681 * target-descriptions.c (make_gdb_type): Update.
3682 * symmisc.c (print_symbol): Update.
3683 * stabsread.c (define_symbol, read_type)
3684 (complain_about_struct_wipeout, add_undefined_type)
3685 (cleanup_undefined_types_1): Update.
3686 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
3687 (rust_range_type_p, val_print_struct, rust_print_struct_def)
3688 (rust_internal_print_type, rust_composite_type)
3689 (rust_evaluate_funcall, rust_evaluate_subexp)
3690 (rust_inclusive_range_type_p): Update.
3691 * python/py-type.c (typy_get_tag): Update.
3692 * p-typeprint.c (pascal_type_print_base): Update.
3693 * mdebugread.c (parse_symbol, parse_type): Update.
3694 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
3695 Update.
3696 * guile/scm-type.c (gdbscm_type_tag): Update.
3697 * go-lang.c (sixg_string_p): Update.
3698 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
3699 Update.
3700 * gdbtypes.h (struct main_type) <tag_name>: Remove.
3701 (TYPE_TAG_NAME): Remove.
3702 * gdbtypes.c (type_name_no_tag): Simplify.
3703 (check_typedef, check_types_equal, recursive_dump_type)
3704 (copy_type_recursive, arch_composite_type): Update.
3705 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
3706 in summary mode when needed.
3707 * eval.c (evaluate_funcall): Update.
3708 * dwarf2read.c (fixup_go_packaging, read_structure_type)
3709 (process_structure_scope, read_enumeration_type)
3710 (read_namespace_type, read_module_type, determine_prefix): Update.
3711 * cp-support.c (inspect_type): Update.
3712 * coffread.c (process_coff_symbol, decode_base_type): Update.
3713 * c-varobj.c (c_is_path_expr_parent): Update.
3714 * c-typeprint.c (c_type_print_base_struct_union): Update.
3715 (c_type_print_base_1): Update. Print struct/class/union/enum in
3716 summary when using C language.
3717 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
3718 (gen_maybe_namespace_elt): Update.
3719 * ada-lang.c (ada_type_name): Simplify.
3720 (empty_record, ada_template_to_fixed_record_type_1)
3721 (template_to_static_fixed_type)
3722 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
3723
3724 2018-06-01 Tom Tromey <tom@tromey.com>
3725
3726 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
3727 c_print_type.
3728 * c-typeprint.c (c_print_type_1): Add "language" parameter.
3729 (c_print_type): Update.
3730 (c_print_type): New overload.
3731 (c_type_print_varspec_prefix, c_type_print_args)
3732 (c_type_print_varspec_suffix, c_print_type_no_offsets)
3733 (c_type_print_base_struct_union, c_type_print_base_1)
3734 (cp_type_print_method_args): Add "language" parameter.
3735 (c_type_print_base): Update.
3736 * c-lang.h (c_print_type): Add new overload.
3737
3738 2018-06-01 Tom Tromey <tom@tromey.com>
3739
3740 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
3741 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
3742
3743 2018-06-01 Alan Hayward <alan.hayward@arm.com>
3744
3745 * aarch64-tdep.c (aarch64_sve_register_names): New const
3746 var.
3747 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
3748 (AARCH64_SVE_Z_REGS_NUM): New define.
3749 (AARCH64_SVE_P_REGS_NUM): Likewise.
3750 (AARCH64_SVE_NUM_REGS): Likewise.
3751
3752 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
3753
3754 * nat/linux-ptrace.h [__alpha__]
3755 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
3756 definitions.
3757
3758 2018-05-31 Maciej W. Rozycki <macro@mips.com>
3759
3760 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
3761 the endianness selected.
3762 * NEWS: Document `set endian auto' mode operation update.
3763
3764 2018-05-31 Alan Hayward <alan.hayward@arm.com>
3765
3766 * Makefile.in: Add new header.
3767 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
3768 (sve_vl_from_vg): Likewise.
3769 (sve_vq_from_vl): Likewise.
3770 (sve_vl_from_vq): Likewise.
3771 (sve_vq_from_vg): Likewise.
3772 (sve_vg_from_vq): Likewise.
3773 * configure.nat: Add new c file.
3774 * nat/aarch64-sve-linux-ptrace.c: New file.
3775 * nat/aarch64-sve-linux-ptrace.h: New file.
3776
3777 2018-05-31 Alan Hayward <alan.hayward@arm.com>
3778
3779 * aarch64-linux-nat.c (aarch64_linux_read_description):
3780 Add parmeter zero.
3781 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
3782 Likewise.
3783 * aarch64-tdep.c (tdesc_aarch64_list): Add.
3784 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
3785 (aarch64_gdbarch_init): Add parmeter zero.
3786 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
3787 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
3788 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
3789 parmeter.
3790 * doc/gdb.texinfo: Describe SVE feature
3791 * features/aarch64-sve.c: New file.
3792
3793 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
3794
3795 PR gdb/23210
3796 * gdbarch.sh (significant_addr_bit): Default to zero when
3797 not set by target architecture.
3798 * gdbarch.c: Re-generated.
3799 * utils.c (address_significant): Update.
3800
3801 2018-05-30 Joel Brobecker <brobecker@adacore.com>
3802
3803 * stack.c (func_command): Remove trailing newline in call to error.
3804
3805 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3806
3807 * regcache.h (regcache_raw_collect): Remove, update callers to
3808 use regcache::raw_collect.
3809 * regcache.c (regcache_raw_collect): Remove.
3810
3811 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3812
3813 * regcache.h (regcache_raw_supply): Remove, update callers to
3814 use detached_regcache::raw_supply.
3815 * regcache.c (regcache_raw_supply): Remove.
3816
3817 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3818
3819 * regcache.h (regcache_cooked_write_part): Remove, update
3820 callers to use regcache::cooked_write_part.
3821 * regcache.c (regcache_cooked_write_part): Remove.
3822
3823 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3824
3825 * regcache.h (regcache_cooked_read_part): Remove, update callers
3826 to use readable_regcache::cooked_read_part.
3827 * regcache.c (regcache_cooked_read_part): Remove.
3828
3829 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3830
3831 * regcache.h (regcache_cooked_read_value): Remove, update
3832 callers to use readable_regcache::cooked_read_value.
3833 * regcache.c (regcache_cooked_read_value): Remove.
3834
3835 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3836
3837 * regcache.h (regcache_cooked_write): Remove, update callers to
3838 use regcache::cooked_write.
3839 * regcache.c (regcache_cooked_write): Remove.
3840
3841 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3842
3843 * regcache.h (regcache_invalidate): Remove, update callers to
3844 use detached_regcache::invalidate instead.
3845 * regcache.c (regcache_invalidate): Remove.
3846
3847 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3848
3849 * regcache.h (regcache_raw_write_part): Remove, update callers
3850 to use regcache::raw_write_part instead.
3851 * regcache.c (regcache_raw_write_part): Remove.
3852
3853 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3854
3855 * regcache.h (regcache_raw_read_part): Remove, update callers to
3856 use readable_regcache::raw_read_part instead.
3857 * regcache.c (regcache_raw_read_part): Remove.
3858
3859 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3860
3861 * regcache.h (regcache_cooked_read): Remove, update callers to
3862 use readable_regcache::cooked_read instead.
3863 * regcache.c (regcache_cooked_read): Remove.
3864
3865 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3866
3867 * regcache.h (regcache_raw_write): Remove, update callers to use
3868 regcache::raw_write instead.
3869 * regcache.c (regcache_raw_write): Remove.
3870
3871 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3872
3873 * regcache.h (regcache_raw_read): Remove, update callers to use
3874 readable_regcache::raw_read instead.
3875 * regcache.c (regcache_raw_read): Remove.
3876
3877 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3878
3879 * regcache.h (regcache_raw_update): Remove, update callers to
3880 use readable_regcache::raw_update instead.
3881 * regcache.c (regcache_raw_update): Remove.
3882
3883 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3884
3885 * regcache.h (regcache_register_status): Remove, update callers
3886 to use reg_buffer::get_register_status directly instead.
3887 * regcache.c (regcache_register_status): Remove.
3888
3889 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3890
3891 * regcache.h (regcache_get_ptid): Remove, update all callers to
3892 call regcache::ptid instead.
3893 * regcache.c (regcache_get_ptid): Remove.
3894
3895 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3896
3897 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
3898
3899 2018-05-30 Pedro Alves <palves@redhat.com>
3900
3901 * common/common-exceptions.h (exception_rethrow): Use
3902 ATTRIBUTE_NORETURN.
3903
3904 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
3905
3906 * breakpoint.c (print_solib_event, check_status_catch_solib):
3907 Remove struct keyword in range-based for loops.
3908 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
3909 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
3910 Likewise.
3911 * linespec.c (find_superclass_methods, search_minsyms_for_name):
3912 Likewise.
3913 * symfile.c (addr_info_make_relative): Likewise.
3914 * thread.c (value_in_thread_stack_temporaries): Likewise.
3915
3916 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
3917
3918 PR gdb/16841
3919 * valops.c (value_struct_elt_for_reference): Call check_typedef on
3920 aggregate type to get its real type before accessing it.
3921
3922 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
3923
3924 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
3925 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
3926 * coff-pe-read.c (add_pe_forwarded_sym): Replace
3927 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
3928 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
3929 * jit.c (jit_breakpoint_re_set_internal): Likewise.
3930 * printcmd.c (info_address_command): Likewise.
3931
3932 2018-05-29 Tom Tromey <tom@tromey.com>
3933
3934 * windows-nat.c (handle_exception): Update fall-through comment.
3935
3936 2018-05-29 Tom Tromey <tom@tromey.com>
3937
3938 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
3939 (struct program_space) <added_solibs>: Now a std::vector.
3940 * breakpoint.c (print_solib_event): Update.
3941 (check_status_catch_solib): Update.
3942 * progspace.c (clear_program_space_solib_cache): Update.
3943 * solib.c (update_solib_list): Update.
3944
3945 2018-05-29 Tom Tromey <tom@tromey.com>
3946
3947 * python/py-type.c (typy_richcompare): Update.
3948 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
3949 * gdbtypes.h (types_deeply_equal): Return bool.
3950 (types_equal): Likewise.
3951 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
3952 declare VEC.
3953 (check_types_equal): Change worklist to std::vector. Return
3954 bool.
3955 (struct type_equality_entry): Add constructor.
3956 (compare_maybe_null_strings): Return bool.
3957 (check_types_worklist): Return bool. Change worklist to
3958 std::vector.
3959 (types_deeply_equal): Use std::vector.
3960 (types_equal): Return bool.
3961 (compare_maybe_null_strings): Simplify.
3962
3963 2018-05-29 Tom Tromey <tom@tromey.com>
3964
3965 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
3966
3967 2018-05-29 Tom Tromey <tom@tromey.com>
3968
3969 * objc-lang.h: Don't include cp-support.h.
3970 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
3971 declare VEC.
3972
3973 2018-05-27 Tom Tromey <tom@tromey.com>
3974
3975 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
3976
3977 2018-05-25 Tom Tromey <tom@tromey.com>
3978
3979 * value.c (value::location): Initialize.
3980
3981 2018-05-25 Tom Tromey <tom@tromey.com>
3982
3983 * dbxread.c (init_bincl_list): Remove.
3984 (bincl_list): Now a std::vector.
3985 (bincls_allocated, next_bincl): Remove.
3986 (free_bincl_list, do_free_bincl_list_cleanup)
3987 (make_cleanup_free_bincl_list): Remove.
3988 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
3989 unique_xmalloc_ptr.
3990 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
3991 (struct header_file_location): Add constructor.
3992 (add_bincl_to_list): Remove.
3993
3994 2018-05-25 Tom Tromey <tom@tromey.com>
3995
3996 * tui/tui.c (tui_enable): Update.
3997 * mi/mi-interp.c (mi_interp::init): Update.
3998 * interps.h (class interp) <name>: New method.
3999 <m_name>: Rename from name.
4000 (~scoped_restore_interp): Update.
4001 * interps.c (interp::interp): Update.
4002 (interp_add, interp_set, interp_lookup_existing)
4003 (current_interp_named_p): Update.
4004
4005 2018-05-25 Tom Tromey <tom@tromey.com>
4006
4007 * interps.c (interp_name): Remove.
4008 * mi/mi-interp.c (mi_interp::init): Update.
4009 * interps.h (interp_name): Remove.
4010 (~scoped_restore_interp): Update.
4011 * tui/tui.c (tui_enable): Update.
4012
4013 2018-05-25 Tom Tromey <tom@tromey.com>
4014
4015 * utils.c (fputs_maybe_filtered): Update.
4016 * linespec.c (decode_line_full): Update.
4017 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
4018 (mi_print_breakpoint_for_event, mi_solib_loaded)
4019 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4020 (mi_user_selected_context_changed): Update.
4021 * mi/mi-main.c (mi_execute_command): Update.
4022 * cli/cli-script.c (execute_control_command): Update.
4023 * python/python.c (execute_gdb_command): Update.
4024 * solib.c (info_sharedlibrary_command): Update.
4025 * interps.c (interp_ui_out): Remove.
4026 * interps.h (interp_ui_out): Remove.
4027
4028 2018-05-25 Tom Tromey <tom@tromey.com>
4029
4030 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
4031 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
4032 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
4033
4034 2018-05-25 Tom Tromey <tom@tromey.com>
4035
4036 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
4037 * interps.c (interp_exec): Use scoped_restore.
4038
4039 2018-05-25 Tom Tromey <tom@tromey.com>
4040
4041 * remote.c (remote_target::remote_file_get): Use
4042 gdb::byte_vector.
4043 (remote_target::remote_file_put): Likewise.
4044
4045 2018-05-25 Tom Tromey <tom@tromey.com>
4046
4047 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
4048 a std::string.
4049 (get_pe_section_index, add_pe_exported_sym): Update.
4050 (read_pe_exported_syms): Use gdb::def_vector.
4051
4052 2018-05-25 Tom Tromey <tom@tromey.com>
4053
4054 * frame.c (remove_prev_frame): Remove.
4055 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
4056
4057 2018-05-25 Maciej W. Rozycki <macro@mips.com>
4058
4059 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
4060 Remove prototypes.
4061 * mips-linux-nat.c (supply_fpregset): Always call
4062 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
4063 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
4064 `mips_fill_fpregset'.
4065 * mips-linux-tdep.c (mips_supply_fpregset)
4066 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
4067 (mips_fill_fpregset_wrapper): Remove functions.
4068 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
4069 (mips_linux_fpregset): Remove variable.
4070 (mips_linux_iterate_over_regset_sections): Use
4071 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
4072 (mips_linux_o32_sigframe_init): Remove comment.
4073
4074 2018-05-25 Pedro Alves <palves@redhat.com>
4075
4076 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
4077 (struct readahead_cache, struct packet_reg, struct
4078 remote_arch_state, class remote_state): Move higher up in the
4079 file.
4080 (remote_target::m_remote_state): Now an object instead of a pointer.
4081 (remote_target::get_remote_state): Adjust.
4082
4083 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
4084
4085 * stack.c (select_and_print_frame): Delete.
4086 (struct function_bounds): Move struct within function.
4087 (func_command): Most content moved into new function
4088 find_frame_for_function, use new function, print result, add
4089 function comment.
4090 (find_frame_for_function): New function, now returns a result.
4091
4092 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4093
4094 * stack.c (iterate_over_block_arg_vars): Fix comment.
4095 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
4096
4097 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
4098
4099 PR gdb/23203
4100 * frame.c
4101 (scoped_restore_selected_frame::scoped_restore_selected_frame):
4102 Define.
4103 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
4104 Define.
4105 * frame.h (class scoped_restore_selected_frame): New class.
4106 * stack.c (print_frame_local_vars): Remove catching and rethrowing
4107 of any exception, use scoped_restore_selected_frame to restore the
4108 frame instead.
4109
4110 2018-05-24 Pedro Alves <palves@redhat.com>
4111
4112 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
4113 override.
4114
4115 2018-05-23 Tom Tromey <tom@tromey.com>
4116
4117 * complaints.c (struct complaints): Remove.
4118 (symfile_complaint_book): Remove.
4119 (series): New global.
4120 (complaint_internal): Update.
4121 (clear_complaints): Update.
4122
4123 2018-05-23 Tom Tromey <tom@tromey.com>
4124
4125 * complaints.c (counters): New global.
4126 (struct complain): Remove.
4127 (struct complaints) <root>: Remove.
4128 (complaint_sentinel): Remove.
4129 (symfile_complaint_book): Update.
4130 (find_complaint) Remove.
4131 (complaint_internal, clear_complaints): Update.
4132
4133 2018-05-23 Tom Tromey <tom@tromey.com>
4134
4135 * complaints.c (struct complain) <file, line>: Remove.
4136 (find_complaint): Remove file, line parameters.
4137 (complaint_internal): Update.
4138
4139 2018-05-23 Tom Tromey <tom@tromey.com>
4140
4141 * complaints.c (vcomplaint): Remove.
4142 (complaint_internal) Merge in contents of vcomplaint.
4143
4144 2018-05-23 Tom Tromey <tom@tromey.com>
4145
4146 * complaints.c (struct complaints) <explanation>: Remove.
4147 (symfile_explanations): Remove.
4148 (symfile_complaint_book): Update.
4149 (vcomplaint): Update.
4150 (struct explanation): Remove.
4151
4152 2018-05-23 Tom Tromey <tom@tromey.com>
4153
4154 * complaints.c (symfile_complaints): Remove.
4155 (complaint_internal): Remove "complaints" parameter.
4156 (clear_complaints, vcomplaint): Remove "c" parameter.
4157 (get_complaints): Remove.
4158 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
4159 (dwarf2_debug_line_missing_file_complaint)
4160 (dwarf2_debug_line_missing_end_sequence_complaint)
4161 (dwarf2_complex_location_expr_complaint)
4162 (dwarf2_const_value_length_mismatch_complaint)
4163 (dwarf2_section_buffer_overflow_complaint)
4164 (dwarf2_macro_malformed_definition_complaint)
4165 (dwarf2_invalid_attrib_class_complaint)
4166 (create_addrmap_from_index, dw2_symtab_iter_next)
4167 (dw2_expand_marked_cus)
4168 (dw2_debug_names_iterator::find_vec_in_debug_names)
4169 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
4170 (create_debug_type_hash_table, init_cutu_and_read_dies)
4171 (partial_die_parent_scope, add_partial_enumeration)
4172 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
4173 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
4174 (read_import_statement, read_file_scope, create_dwo_cu_reader)
4175 (create_cus_hash_table, create_dwp_hash_table)
4176 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
4177 (dwarf2_rnglists_process, dwarf2_ranges_process)
4178 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
4179 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
4180 (handle_struct_member_die, process_structure_scope)
4181 (read_array_type, read_common_block, read_module_type)
4182 (read_tag_pointer_type, read_typedef, read_base_type)
4183 (read_subrange_type, load_partial_dies, partial_die_info::read)
4184 (partial_die_info::read, partial_die_info::read)
4185 (partial_die_info::read, read_checked_initial_length_and_offset)
4186 (dwarf2_string_attr, read_formatted_entries)
4187 (dwarf_decode_line_header)
4188 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4189 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
4190 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
4191 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
4192 (get_signatured_type, get_DW_AT_signature_type)
4193 (decode_locdesc, file_file_name, consume_improper_spaces)
4194 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
4195 (dwarf_decode_macro_bytes, dwarf_decode_macros)
4196 (dwarf2_symbol_mark_computed, set_die_type)
4197 (read_attribute_value): Update.
4198 * stap-probe.c (handle_stap_probe, get_stap_base_address):
4199 Update.
4200 * dbxread.c (unknown_symtype_complaint)
4201 (lbrac_mismatch_complaint, repeated_header_complaint)
4202 (set_namestring, function_outside_compilation_unit_complaint)
4203 (read_dbx_symtab, process_one_symbol): Update.
4204 * gdbtypes.c (stub_noname_complaint): Update.
4205 * windows-nat.c (handle_unload_dll): Update.
4206 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
4207 (decode_base_type): Update.
4208 * xcoffread.c (bf_notfound_complaint, ef_complaint)
4209 (eb_complaint, record_include_begin, record_include_end)
4210 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
4211 (process_xcoff_symbol, read_symbol)
4212 (function_outside_compilation_unit_complaint)
4213 (scan_xcoff_symtab): Update.
4214 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
4215 * buildsym.c (finish_block_internal, make_blockvector)
4216 (end_symtab_get_static_block, augment_type_symtab): Update.
4217 * dtrace-probe.c (dtrace_process_dof)
4218 (dtrace_static_probe_ops::get_probes): Update.
4219 * complaints.h (struct complaint): Don't declare.
4220 (symfile_complaints): Remove.
4221 (complaint_internal): Remove "complaints" parameter.
4222 (complaint): Likewise.
4223 (clear_complaints): Likewise.
4224 * symfile.c (syms_from_objfile_1, finish_new_objfile)
4225 (reread_symbols): Update.
4226 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
4227 (dwarf2_frame_cache, decode_frame_entry): Update.
4228 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
4229 * objc-lang.c (lookup_objc_class, lookup_child_selector)
4230 (info_selectors_command): Update.
4231 * macrotab.c (macro_include, check_for_redefinition)
4232 (macro_undef): Update.
4233 * objfiles.c (filter_overlapping_sections): Update.
4234 * stabsread.c (invalid_cpp_abbrev_complaint)
4235 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
4236 (define_symbol, error_type, read_type, rs6000_builtin_type)
4237 (stabs_method_name_from_physname, read_member_functions)
4238 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
4239 (attach_fields_to_type, complain_about_struct_wipeout)
4240 (read_range_type, read_args, common_block_start)
4241 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
4242 Update.
4243 * mdebugread.c (index_complaint, unknown_ext_complaint)
4244 (basic_type_complaint, bad_tag_guess_complaint)
4245 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
4246 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
4247 (parse_procedure, parse_lines)
4248 (function_outside_compilation_unit_complaint)
4249 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
4250 (bad_tag_guess_complaint, reg_value_complaint): Update.
4251 * cp-support.c (demangled_name_complaint): Update.
4252 * macroscope.c (sal_macro_scope): Update.
4253 * dwarf-index-write.c (class debug_names): Update.
4254
4255 2018-05-23 Tom Tromey <tom@tromey.com>
4256
4257 * complaints.c (clear_complaints): Remove "noisy" parameter.
4258 * complaints.h (clear_complaints): Update.
4259 * symfile.c (syms_from_objfile_1, finish_new_objfile)
4260 (reread_symbols): Update.
4261
4262 2018-05-23 Tom Tromey <tom@tromey.com>
4263
4264 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
4265 SUBSEQUENT_MESSAGE.
4266 (vcomplaint, clear_complaints): Update.
4267 (symfile_explanations): Remove some messages.
4268
4269 2018-05-23 Tom Tromey <tom@tromey.com>
4270
4271 * complaints.c (internal_complaint): Remove.
4272 * complaints.h (internal_complaint): Remove.
4273
4274 2018-05-22 Maciej W. Rozycki <macro@mips.com>
4275
4276 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
4277
4278 2018-05-22 Pedro Alves <palves@redhat.com>
4279
4280 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
4281 (remote_fileio_badfd, remote_fileio_return_errno)
4282 (remote_fileio_return_success, remote_fileio_func_open)
4283 (remote_fileio_func_open, remote_fileio_func_close)
4284 (remote_fileio_func_read, remote_fileio_func_write)
4285 (remote_fileio_func_lseek, remote_fileio_func_rename)
4286 (remote_fileio_func_unlink, remote_fileio_func_stat)
4287 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
4288 (remote_fileio_func_isatty, remote_fileio_func_system): Add
4289 remote_target parameter.
4290 (remote_fio_func_map) <func>: Add remote_target parameter.
4291 (do_remote_fileio_request, remote_fileio_request):
4292 * remote-fileio.h (remote_fileio_request):
4293 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
4294 remote_target parameter.
4295 (remote_notif_process, handle_notification): Adjust to pass down
4296 the remote.
4297 (remote_notif_state_allocate): Add remote_target parameter. Save
4298 it.
4299 * remote-notif.h (struct remote_target): Forward declare.
4300 (struct notif_client) <parse, ack, can_get_pending_events>: Add
4301 remote_target parameter.
4302 (struct remote_notif_state) <remote>: New field.
4303 (remote_notif_ack, remote_notif_parse): Add remote_target
4304 parameter.
4305 (remote_notif_state_allocate, remote_notif_state_allocate): Add
4306 remote_target parameter.
4307 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
4308 (threads_listing_context, rmt_thread_action, protocol_feature)
4309 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
4310 (packet_result, struct threads_listing_context, remote_state):
4311 Move definitions and declarations higher up.
4312 (remote_target) <~remote_target>: Declare.
4313 (remote_download_command_source, remote_file_put, remote_file_get)
4314 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
4315 (remote_hostio_pread_vFile, remote_hostio_send_command)
4316 (remote_hostio_set_filesystem, remote_hostio_open)
4317 (remote_hostio_close, remote_hostio_unlink, remote_state)
4318 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
4319 (get_memory_write_packet_size, get_memory_read_packet_size)
4320 (append_pending_thread_resumptions, remote_detach_1)
4321 (append_resumption, remote_resume_with_vcont)
4322 (add_current_inferior_and_thread, wait_ns, wait_as)
4323 (process_stop_reply, remote_notice_new_inferior)
4324 (process_initial_stop_replies, remote_add_thread)
4325 (btrace_sync_conf, remote_btrace_maybe_reopen)
4326 (remove_new_fork_children, kill_new_fork_children)
4327 (discard_pending_stop_replies, stop_reply_queue_length)
4328 (check_pending_events_prevent_wildcard_vcont)
4329 (discard_pending_stop_replies_in_queue, stop_reply)
4330 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
4331 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
4332 (remote_interrupt_as, remote_interrupt_ns)
4333 (remote_get_noisy_reply, remote_query_attached)
4334 (remote_add_inferior, remote_current_thread, get_current_thread)
4335 (set_thread, set_general_thread, set_continue_thread)
4336 (set_general_process, write_ptid)
4337 (remote_unpack_thread_info_response, remote_get_threadinfo)
4338 (parse_threadlist_response, remote_get_threadlist)
4339 (remote_threadlist_iterator, remote_get_threads_with_ql)
4340 (remote_get_threads_with_qxfer)
4341 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
4342 (get_offsets, remote_check_symbols, remote_supported_packet)
4343 (remote_query_supported, remote_packet_size)
4344 (remote_serial_quit_handler, remote_detach_pid)
4345 (remote_vcont_probe, remote_resume_with_hc)
4346 (send_interrupt_sequence, interrupt_query)
4347 (remote_notif_get_pending_events, fetch_register_using_p)
4348 (send_g_packet, process_g_packet, fetch_registers_using_g)
4349 (store_register_using_P, store_registers_using_G)
4350 (set_remote_traceframe, check_binary_download)
4351 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
4352 (remote_xfer_live_readonly_partial, remote_read_bytes)
4353 (remote_send_printf, remote_flash_write, readchar)
4354 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
4355 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
4356 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
4357 (extended_remote_disable_randomization, extended_remote_run)
4358 (send_environment_packet, extended_remote_environment_support)
4359 (extended_remote_set_inferior_cwd, remote_write_qxfer)
4360 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
4361 (packet_command): Now methods of ...
4362 (remote_target): ... this class.
4363 (m_remote_state) <remote_target>: New field.
4364 (struct remote_state) <stop_reply_queue,
4365 remote_async_inferior_event_token, wait_forever_enabled_p>: New
4366 fields.
4367 (remote_state::remote_state): Allocate stop_reply_queue.
4368 (remote_state): Delete global.
4369 (get_remote_state_raw): Delete.
4370 (remote_target::get_remote_state): Allocate m_remote_state on
4371 demand.
4372 (get_current_remote_target): New.
4373 (remote_ops, extended_remote_ops): Delete.
4374 (wait_forever_enabled_p, remote_async_inferior_event_token):
4375 Delete, moved to struct remote_state.
4376 (remote_target::close): Delete self. Destruction bits split to
4377 ...
4378 (remote_target::~remote_target): ... this.
4379 (show_memory_packet_size): Adjust to use
4380 get_current_remote_target.
4381 (struct protocol_feature) <func>: Add remote_target parameter.
4382 All callers adjusted.
4383 (curr_quit_handler_target): New.
4384 (remote_serial_quit_handler): Reimplement.
4385 (remote_target::open_1): Adjust to use get_current_remote_target.
4386 Heap-allocate remote_target/extended_remote_target instances.
4387 (vcont_builder::vcont_builder): Add remote_target parameter, and
4388 save it in m_remote. All callers adjusted.
4389 (vcont_builder::m_remote): New field.
4390 (vcont_builder::restart, vcont_builder::flush)
4391 (vcont_builder::push_action): Use it.
4392 (remote_target::commit_resume): Use it.
4393 (struct queue_iter_param) <remote>: New field.
4394 (remote_target::remove_new_fork_children): Fill in 'remote' field.
4395 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
4396 (check_pending_event_prevents_wildcard_vcont_callback)
4397 (remote_target::check_pending_events_prevent_wildcard_vcont)
4398 (remote_target::discard_pending_stop_replies)
4399 (remote_target::discard_pending_stop_replies_in_queue)
4400 (remote_target::remote_notif_remove_queued_reply): Fill in
4401 'remote' field.
4402 (remote_notif_get_pending_events): New.
4403 (remote_target::readchar, remote_target::remote_serial_write):
4404 Save/restore curr_quit_handler_target.
4405 (putpkt): New.
4406 (kill_new_fork_children): Fill in 'remote' field.
4407 (packet_command): Use get_current_remote_target, defer to
4408 remote_target method of same name.
4409 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
4410 parameter, and save it in m_remote. All callers adjusted.
4411 (scoped_remote_fd::release): Use m_remote.
4412 (scoped_remote_fd::m_remote): New field.
4413 (remote_file_put, remote_file_get, remote_file_delete): Use
4414 get_current_remote_target, defer to remote_target method of same
4415 name.
4416 (remote_btrace_reset): Add remote_state paremeter. Update all
4417 callers.
4418 (remote_async_inferior_event_handler). Pass down 'data'.
4419 (remote_new_objfile): Use get_current_remote_target.
4420 (remote_target::vcont_r_supported): New.
4421 (set_range_stepping): Use get_current_remote_target and
4422 remote_target::vcont_r_supported.
4423 (_initialize_remote): Don't allocate 'remote_state' and
4424 'stop_reply_queue' globals.
4425 * remote.h (struct remote_target): Forward declare.
4426 (getpkt, putpkt, remote_notif_get_pending_events): Add
4427 'remote_target' parameter.
4428
4429 2018-05-22 Pedro Alves <palves@redhat.com>
4430
4431 * remote.c (vcont_builder): Now a class. Make all data members
4432 private.
4433 (vcont_builder) <vcont_builder, restart, flush, push_action>:
4434 Declare methods.
4435 (vcont_builder_restart): Rename to ...
4436 (vcont_builder::restart): ... this.
4437 (vcont_builder_flush): Rename to ...
4438 (vcont_builder::flush): ... this.
4439 (vcont_builder_push_action): Rename to ...
4440 (vcont_builder::push_action): ... this.
4441 (remote_target::commit_resume): Adjust.
4442
4443 2018-05-22 Pedro Alves <palves@redhat.com>
4444
4445 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
4446 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
4447 (get_fixed_memory_packet_size): New.
4448 (get_memory_packet_size): Use it.
4449 (set_memory_packet_size): Don't override the config size with
4450 DEFAULT_MAX_MEMORY_PACKET_SIZE.
4451 (show_memory_packet_size): Use get_fixed_memory_packet_size.
4452 Don't refer to get_memory_packet_size if not connected to a remote
4453 target. Show "(default)" if configured size is 0.
4454
4455 2018-05-22 Pedro Alves <palves@redhat.com>
4456
4457 * remote.c (remote_target::mourn_inferior): Move
4458 discard_pending_stop_replies call here from ...
4459 (_initialize_remote): ... here.
4460
4461 2018-05-22 Pedro Alves <palves@redhat.com>
4462
4463 * remote.c (compare_section_command): Remove set_general_process
4464 call.
4465
4466 2018-05-22 Pedro Alves <palves@redhat.com>
4467
4468 * remote.c (struct packet_reg, struct remote_arch_state):
4469 Move higher up in the file.
4470 (remote_state) <m_arch_states>: Store remote_arch_state values
4471 instead of remote_arch_state pointers.
4472 (remote_state::get_remote_arch_state): Adjust.
4473
4474 2018-05-22 Pedro Alves <palves@redhat.com>
4475
4476 * remote.c: Include <unordered_map>.
4477 (remote_state): Now a class.
4478 (remote_state) <get_remote_arch_state>: Declare method.
4479 <get_remote_arch_state>: New field.
4480 (remote_arch_state) <remote_arch_state>: Declare ctor.
4481 <regs>: Now a unique_ptr.
4482 (remote_gdbarch_data_handle): Delete.
4483 (get_remote_arch_state): Delete.
4484 (remote_state::get_remote_arch_state): New.
4485 (get_remote_state): Adjust to call remote_state's
4486 get_remote_arch_state method.
4487 (init_remote_state): Delete, bits factored out to ...
4488 (remote_arch_state::remote_arch_state): ... this new method.
4489 (get_remote_packet_size, get_memory_packet_size)
4490 (process_g_packet, remote_target::fetch_registers)
4491 (remote_target::prepare_to_store, store_registers_using_G)
4492 (remote_target::store_registers, remote_target::get_trace_status):
4493 Adjust to call remote_state's method.
4494 (_initialize_remote): Remove reference to
4495 remote_gdbarch_data_handle.
4496
4497 2018-05-22 Pedro Alves <palves@redhat.com>
4498
4499 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
4500 pread>: New method declarations.
4501 (remote_target::open_1): Adjust.
4502 (readahead_cache_invalidate): Rename to ...
4503 (readahead_cache::invalidate): ... this, and adjust to be a class
4504 method.
4505 (readahead_cache_invalidate_fd): Rename to ...
4506 (readahead_cache::invalidate_fd): ... this, and adjust to be a
4507 class method.
4508 (remote_hostio_pwrite): Adjust.
4509 (remote_hostio_pread_from_cache): Rename to ...
4510 (readahead_cache::pread): ... this, and adjust to be a class
4511 method.
4512 (remote_hostio_close): Adjust.
4513
4514 2018-05-22 Pedro Alves <palves@redhat.com>
4515
4516 * remote.c (remote_hostio_close_cleanup): Delete.
4517 (class scoped_remote_fd): New.
4518 (remote_file_put, remote_file_get): Use it.
4519
4520 2018-05-22 Pedro Alves <palves@redhat.com>
4521
4522 (struct vCont_action_support): Use bool and initialize all fields.
4523 (struct readahead_cache): Initialize all fields.
4524 (remote_state): Use bool and initialize all fields.
4525 (remote_state::remote_state, remote_state::~remote_state): New.
4526 (new_remote_state): Delete.
4527 (_initialize_remote): Use new to allocate remote_state.
4528
4529 2018-05-22 Pedro Alves <palves@redhat.com>
4530 張俊芝 <zjz@zjz.name>
4531
4532 PR gdb/22973
4533 * c-exp.y: Include "c-support.h".
4534 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
4535 of tolower. Use c_ident_is_alpha to scan names.
4536 * c-lang.c: Include "c-support.h".
4537 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
4538 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
4539 * c-support.h: New file, with bits factored out from ...
4540 * cp-name-parser.y: ... this file.
4541 Include "c-support.h".
4542 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
4543 c-support.h and renamed.
4544 (symbol_end, yylex): Adjust.
4545
4546 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4547
4548 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
4549 parameter type to CORE_ADDR.
4550 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
4551 parameter type in declaration to CORE_ADDR.
4552 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
4553 target_auxv_search to get AT_HWCAP and use the result to get the
4554 target description.
4555 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
4556 to CORE_ADDR. Remove the cast of the return value to unsigned
4557 long. Fix error predicate of target_auxv_search.
4558 (ppc_linux_nat_target::read_description): Change the type of the
4559 hwcap variable to CORE_ADDR.
4560
4561 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4562
4563 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
4564 if the size of fpscr is larger than 32 bits.
4565
4566 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4567
4568 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
4569 (ppc32_linux_vsxregmap): New global.
4570 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
4571 regcache_supply_regset, and regcache_collect_regset.
4572 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
4573 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
4574 (fetch_vsx_register, store_vsx_register): Remove.
4575 (fetch_vsx_registers): Add regno parameter. Get regset using
4576 ppc_linux_vsxregset. Use regset to supply registers.
4577 (store_vsx_registers): Add regno parameter. Get regset using
4578 ppc_linux_vsxregset. Use regset to collect registers.
4579 (fetch_register): Call fetch_vsx_registers instead of
4580 fetch_vsx_register.
4581 (store_register): Call store_vsx_registers instead of
4582 store_vsx_register.
4583 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
4584 new regno parameter.
4585 (store_ppc_registers): Call store_vsx_registers with -1 for the
4586 new regno parameter.
4587 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
4588 (ppc_collect_vsxregset): Remove.
4589
4590 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4591
4592 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
4593 offset fields.
4594 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
4595 for vector register offset fields.
4596 (ppc64_fbsd_reg_offsets): Likewise.
4597 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4598 to vector register offset fields.
4599 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4600 to vector register offset fields.
4601 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
4602 vector register offset fields.
4603 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
4604 initializers for vector register offset fields.
4605 (rs6000_aix64_reg_offsets): Likewise.
4606 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
4607 (ppc_supply_vrregset): Remove.
4608 (ppc_collect_vrregset): Remove.
4609 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
4610 (ppc_linux_vrregset) : New function.
4611 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
4612 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
4613 (ppc32_linux_vrregset): Remove.
4614 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
4615 and use result instead of ppc32_linux_vrregset.
4616 (ppc32_linux_reg_offsets): Remove initializers for vector register
4617 offset fields.
4618 (ppc64_linux_reg_offsets): Likewise.
4619 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
4620 * ppc-linux-nat.c: Include regset.h.
4621 (gdb_vrregset_t): Adjust comment to account for little-endian
4622 mode.
4623 (supply_vrregset, fill_vrregset): Remove.
4624 (fetch_altivec_register, store_altivec_register): Remove.
4625 (fetch_altivec_registers): Add regno parameter. Get regset using
4626 ppc_linux_vrregset. Use regset to supply registers.
4627 (store_altivec_registers): Add regno parameter. Get regset using
4628 ppc_linux_vrregset. Use regset to collect registers.
4629 (fetch_register): Call fetch_altivec_registers instead of
4630 fetch_altivec_register.
4631 (store_register): Call store_altivec_registers instead of
4632 store_altivec_register.
4633 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
4634 the new regno parameter.
4635 (store_ppc_registers): Call store_altivec_registers with -1 for
4636 the new regno parameter.
4637
4638 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4639
4640 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
4641 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
4642 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
4643 (gdb_vrregset_t): Change array type size to
4644 PPC_LINUX_SIZEOF_VRREGSET.
4645 (gdb_vsxregset_t): Change array type size to
4646 PPC_LINUX_SIZEOF_VSXREGSET.
4647 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
4648 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
4649 PPC_LINUX_SIZEOF_VSXREGSET.
4650
4651 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4652
4653 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
4654 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
4655 nat/ppc-linux.c.
4656 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
4657 ppc_linux_target_wordsize with tid.
4658 (ppc_linux_nat_target::read_description): Call ppc_linux_target
4659 wordsize with tid.
4660 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
4661 (ppc64_64bit_inferior_p): Add static and inline specifiers.
4662 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
4663 tid parameter. Remove static specifier.
4664 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
4665 (ppc_linux_target_wordsize): New declaration.
4666
4667 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4668
4669 * arch/ppc-linux-common.c: New file.
4670 * arch/ppc-linux-common.h: New file.
4671 * arch/ppc-linux-tdesc.h: New file.
4672 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
4673 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
4674 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
4675 arch/ppc-linux-tdesc.h.
4676 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
4677 arch/ppc-linux-tdesc.h.
4678 (ppc_linux_nat_target::read_description): Remove target
4679 description matching code. Fill a ppc_linux_features struct and
4680 call ppc_linux_match_description with it. Move comment about ISA
4681 2.05 to ppc-linux-common.c.
4682 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
4683 arch/ppc-linux-tdesc.h.
4684 (ppc_linux_core_read_description): Remove target description
4685 matching code. Fill a ppc_linux_features struct and call
4686 ppc_linux_match_description with it.
4687 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
4688 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
4689 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
4690 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
4691 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
4692 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
4693 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
4694 (tdesc_powerpc_e500l): Remove.
4695
4696 2018-05-22 Joel Brobecker <brobecker@adacore.com>
4697
4698 * ada-lang.c (catch_assert_command): Pass empty string instead
4699 of NULL for excep_string argument.
4700
4701 2018-05-22 Maciej W. Rozycki <macro@mips.com>
4702
4703 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
4704 the width of the requested register exceeds the width of the
4705 `ptrace' data type.
4706
4707 2018-05-21 Tom Tromey <tom@tromey.com>
4708
4709 * printcmd.c (output_command): Remove.
4710 (output_command_const): Rename to output_command.
4711 * valprint.h (output_command): Rename from output_command_const.
4712 * tracepoint.c (trace_dump_actions): Call output_command.
4713
4714 2018-05-21 Tom Tromey <tom@tromey.com>
4715
4716 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4717 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
4718 * ada-lang.h (create_ada_exception_catchpoint): Update.
4719 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
4720 std::string.
4721 (create_excep_cond_exprs, ~ada_catchpoint)
4722 (should_stop_exception, print_one_exception)
4723 (print_mention_exception, print_recreate_exception): Update.
4724 (ada_get_next_arg): Remove.
4725 (catch_ada_exception_command_split): Use std::string. Change type
4726 of "excep_string", "cond_string".
4727 (catch_ada_exception_command): Update.
4728 (create_ada_exception_catchpoint): Change type of excep_string.
4729 (ada_exception_sal): Remove excep_string parameter.
4730 (~ada_catchpoint): Remove.
4731
4732 2018-05-21 Tom Tromey <tom@tromey.com>
4733
4734 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
4735 cleanup.
4736
4737 2018-05-21 Tom Tromey <tom@tromey.com>
4738
4739 * ada-lang.c (ada_exception_message_1, ada_exception_message):
4740 Return unique_xmalloc_ptr.
4741 (print_it_exception): Update.
4742
4743 2018-05-21 Tom Tromey <tom@tromey.com>
4744
4745 * tracepoint.c (trace_dump_actions): Use std::string.
4746
4747 2018-05-21 Tom Tromey <tom@tromey.com>
4748
4749 * symfile.c (reread_symbols): Use std::string for original_name.
4750
4751 2018-05-21 Tom Tromey <tom@tromey.com>
4752
4753 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
4754 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
4755 constructor.
4756
4757 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
4758
4759 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
4760 instance to...
4761 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
4762 * objfiles.c (get_objfile_bfd_data): Allocate
4763 objfile_per_bfd_storage with obstack_new when allocating on
4764 obstack.
4765
4766 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
4767
4768 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
4769 OBSTACK_ZALLOC.
4770 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
4771 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
4772 * mdebugread.c (mdebug_build_psymtabs): Likewise.
4773 (add_pending): Likewise.
4774 (parse_symbol): Likewise.
4775 (parse_partial_symbols): Likewise.
4776 (psymtab_to_symtab_1): Likewise.
4777 (new_psymtab): Likewise.
4778 (elfmdebug_build_psymtabs): Likewise.
4779 * minsyms.c (terminate_minimal_symbol_table): Likewise.
4780 * objfiles.c (get_objfile_bfd_data): Likewise.
4781 (objfile_register_static_link): Likewise.
4782 * psymtab.c (allocate_psymtab): Likewise.
4783 * stabsread.c (read_member_functions): Likewise.
4784 * xcoffread.c (xcoff_end_psymtab): Likewise.
4785
4786 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
4787
4788 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
4789 compiler supports std::is_trivially_constructible.
4790 * common/poison.h: Include obstack.h.
4791 (IsMallocable): Define to is_trivially_constructible if the
4792 compiler supports it, define to true_type otherwise.
4793 (xobnew): New.
4794 (XOBNEW): Redefine.
4795 (xobnewvec): New.
4796 (XOBNEWVEC): Redefine.
4797 * gdb_obstack.h (obstack_zalloc): New.
4798 (OBSTACK_ZALLOC): Redefine.
4799 (obstack_calloc): New.
4800 (OBSTACK_CALLOC): Redefine.
4801 (obstack_new): New.
4802 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
4803 (gdbarch_obstack): New declaration in gdbarch.h, definition in
4804 gdbarch.c.
4805 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
4806 obstack_calloc/obstack_zalloc.
4807 (gdbarch_obstack_zalloc): Remove.
4808 * target-descriptions.c (tdesc_data_init): Use obstack_new.
4809
4810 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4811
4812 * stack.c (backtrace_command_1): Remove useless variable int i.
4813
4814 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4815
4816 * stack.c (print_frame_info): Fix comment.
4817
4818 2018-05-18 Tom Tromey <tom@tromey.com>
4819
4820 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
4821 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
4822 (~dwarf2_per_objfile): Update
4823 (dwarf2_get_dwz_file): Use new.
4824 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
4825 unique_ptr.
4826
4827 2018-05-18 Tom Tromey <tom@tromey.com>
4828
4829 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
4830 unique_ptr.
4831 * dwarf2read.c (struct dwp_file): Add constructor and
4832 initializers.
4833 (open_and_init_dwp_file): Return a unique_ptr.
4834 (dwarf2_per_objfile, create_dwp_hash_table)
4835 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
4836 (lookup_dwo_unit_in_dwp): Update.
4837 (open_and_init_dwp_file, get_dwp_file): Update.
4838
4839 2018-05-18 Tom Tromey <tom@tromey.com>
4840
4841 * dwarf2read.c (dwarf2_per_objfile): Update.
4842 (struct mapped_index): Add initializers.
4843 (dwarf2_read_index): Use new.
4844 (dw2_symtab_iter_init): Update.
4845 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
4846 unique_ptr.
4847
4848 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
4849
4850 * dwarf2read.c (mapped_index) <total_size>: Remove.
4851
4852 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
4853
4854 * unittests/format_pieces-selftests.c (test_format_specifier):
4855 Add ARI comments.
4856
4857 2018-05-18 Tom Tromey <tom@tromey.com>
4858
4859 * c-typeprint.c (maybe_print_hole): New function.
4860 (c_print_type_struct_field_offset): Update.
4861 (c_type_print_base_struct_union): Call maybe_print_hole.
4862
4863 2018-05-17 Keith Seitz <keiths@redhat.com>
4864
4865 * breakpoint.c (build_bpstat_chain): New function, moved from
4866 bpstat_stop_status.
4867 (bpstat_stop_status): Add optional parameter, `stop_chain'.
4868 If no stop chain is passed, call build_bpstat_chain to build it.
4869 * breakpoint.h (build_bpstat_chain): Declare.
4870 (bpstat_stop_status): Move documentation here from breakpoint.c.
4871 * infrun.c (handle_signal_stop): Before eliding inlined frames,
4872 build the stop chain and pass it to skip_inline_frames.
4873 Pass this stop chain to bpstat_stop_status.
4874 * inline-frame.c: Include breakpoint.h.
4875 (stopped_by_user_bp_inline_frame): New function.
4876 (skip_inline_frames): Add parameter `stop_chain'.
4877 Move documention to inline-frame.h.
4878 If non-NULL, use stopped_by_user_bp_inline_frame to determine
4879 whether the frame should be elided.
4880 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
4881 Add moved documentation and update for new parameter.
4882
4883 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
4884
4885 PR cli/14975
4886 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4887 unittests/format_pieces-selftests.c.
4888 * common/format.h (format_piece) <operator==>: New.
4889 (format_pieces) <operator[]>: Remove.
4890 * common/format.c (format_pieces::format_pieces): Handle \e.
4891 * unittests/format_pieces-selftests.c: New.
4892
4893 2018-05-17 Tom Tromey <tom@tromey.com>
4894
4895 PR symtab/23010:
4896 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
4897 (dw2_instantiate_symtab): Add skip_partial parameter.
4898 (dw2_find_last_source_symtab, dw2_map_expand_apply)
4899 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
4900 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
4901 (dw2_expand_symtabs_matching_one)
4902 (dw2_find_pc_sect_compunit_symtab)
4903 (dw2_debug_names_lookup_symbol)
4904 (dw2_debug_names_expand_symtabs_for_function): Update.
4905 (init_cutu_and_read_dies): Add skip_partial parameter.
4906 (process_psymtab_comp_unit, build_type_psymtabs_1)
4907 (process_skeletonless_type_unit, load_partial_comp_unit)
4908 (psymtab_to_symtab_1): Update.
4909 (load_full_comp_unit): Add skip_partial parameter.
4910 (process_imported_unit_die, dwarf2_read_addr_index)
4911 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
4912 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
4913 (read_signatured_type): Update.
4914
4915 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
4916
4917 * value.c (release_value): Remove unused variable.
4918 (record_latest_value): Likewise.
4919 (access_value_history): Likewise.
4920 (preserve_values): Likewise.
4921
4922 2018-05-17 Tom Tromey <tom@tromey.com>
4923
4924 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
4925 Initialize.
4926
4927 2018-05-16 Maciej W. Rozycki <macro@mips.com>
4928
4929 PR gdb/22286
4930 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
4931 Also handle registers whose width is not a multiple of
4932 PTRACE_TYPE_RET.
4933 (linux_nat_trad_target::store_register): Likewise.
4934
4935 2018-05-16 Tom Tromey <tom@tromey.com>
4936
4937 * gdbcore.h (core_bfd): Redefine.
4938 * corelow.c (core_target::close): Update.
4939 (core_target_open): Update.
4940 * progspace.h (struct program_space) <cbfd>: Now a
4941 gdb_bfd_ref_ptr.
4942
4943 2018-05-16 Tom Tromey <tom@tromey.com>
4944
4945 PR cli/19551:
4946 * symfile-add-flags.h (enum symfile_add_flags)
4947 <SYMFILE_NOT_FILENAME>: New constant.
4948 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
4949 objfile name from BFD.
4950 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
4951 * minidebug.c (find_separate_debug_file_in_section): Put
4952 ".gnu_debugdata" into BFD's file name.
4953
4954 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
4955
4956 * regcache.c (regcache_read_ftype, regcache_write_ftype):
4957 Remove.
4958
4959 2018-05-15 Tamar Christina <tamar.christina@arm.com>
4960
4961 PR binutils/21446
4962 * aarch64-tdep.c (aarch64_analyze_prologue,
4963 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
4964 Indicate not interested in errors.
4965
4966 2018-05-15 Maciej W. Rozycki <macro@mips.com>
4967
4968 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
4969 Supply the MIPS_ZERO_REGNUM register.
4970
4971 2018-05-15 Maciej W. Rozycki <macro@mips.com>
4972
4973 * mips-tdep.c (mask_address_var): Make variable static.
4974
4975 2018-05-14 Tom Tromey <tom@tromey.com>
4976
4977 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
4978
4979 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
4980
4981 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
4982 FXSAVE_ADDR for the mxcsr register.
4983
4984 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
4985
4986 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
4987
4988 2018-05-11 Pedro Alves <palves@redhat.com>
4989
4990 * corelow.c (core_target) <core_target>: No longer inline.
4991 Initialize m_core_gdbarch, m_core_vec and build the section table
4992 here.
4993 <~core_target>: New.
4994 <core_gdbarch, get_core_register_section>: New methods.
4995 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
4996 factored out from ...
4997 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
4998 (core_ops): Delete.
4999 (sniff_core_bfd): Add gdbarch parameter.
5000 (core_close): Delete, merged into ...
5001 (core_target::close): ... here. Delete self.
5002 (core_close_cleanup): Delete.
5003 (core_target_open): Allocate a core_target on the heap. Use a
5004 unique_ptr instead of a cleanup. Bits moved into the core_target
5005 ctor. Adjust to use core_target methods instead of globals.
5006 (get_core_register_section): Rename to ...
5007 (core_target::get_core_register_section): ... this and adjust.
5008 (struct get_core_registers_cb_data): New.
5009 (get_core_registers_cb): Use it. Use bool.
5010 (core_target::fetch_registers, core_target::files_info)
5011 (core_target::xfer_partial, core_target::read_description)
5012 (core_target::pid_to, core_target::thread_name): Adjust to
5013 reference class fields instead of globals.
5014 * target.h (struct target_ops_deleter, target_ops_up): New.
5015
5016 2018-05-11 Pedro Alves <palves@redhat.com>
5017
5018 * corefile.c (core_file_command): Move to corelow.c.
5019 * corelow.c (the_core_target): Delete.
5020 (core_file_command): Moved from corefile.c. Check exec_bfd
5021 instead of the_core_target. Use target_detach instead of calling
5022 into the_core_target directly.
5023 (maybe_say_no_core_file_now): New.
5024 (core_target::detach): Use it.
5025 (_initialize_corelow): Remove references to the_core_target.
5026 * gdbcore.h (the_core_target): Delete.
5027
5028 2018-05-11 Tom Tromey <tromey@redhat.com>
5029 Pedro Alves <palves@redhat.com>
5030
5031 * corefile.c (core_bfd): Remove.
5032 * gdbcore.h (core_bfd): Now a macro.
5033 * progspace.h (struct program_space) <cbfd>: New field.
5034
5035 2018-05-11 Tom Tromey <tom@tromey.com>
5036
5037 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
5038 gdb::def_vector.
5039
5040 2018-05-10 Tom Tromey <tom@tromey.com>
5041
5042 * configure: Rebuild.
5043 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
5044
5045 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5046
5047 PR server/23158:
5048 * regformats/regdat.sh: Adjust script, following the addition
5049 of the new expedite_regs parameter to init_target_desc.
5050
5051 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
5052
5053 PR gdb/23127
5054 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
5055 set_gdbarch_significant_addr_bit.
5056 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
5057 set_gdbarch_significant_addr_bit.
5058 * utils.c (address_significant): Update to sign extend addr.
5059
5060 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
5061
5062 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
5063 (xtensa_linux_init_abi): Limit tdep->num_regs by
5064 tdep->num_nopriv_regs.
5065 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
5066 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
5067 not initialized.
5068
5069 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
5070
5071 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
5072
5073 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
5074
5075 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
5076 (I387_MXCSR_INIT_VAL): New constant.
5077 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
5078 buffer if it was supplied by the inferior.
5079 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
5080 (i387_xsave_get_clear_bv): New function.
5081 (i387_supply_xsave): Only read x87 control registers from the
5082 xsave buffer if the feature is enabled, and the state will have
5083 been written, otherwise, provide a suitable default.
5084 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
5085 including x87 control registers. Update control registers if they
5086 have changed from the default value, and mark features as enabled
5087 as required.
5088 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
5089
5090 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
5091
5092 * spu-tdep.c (info_spu_event_command): Fix output formatting.
5093
5094 2018-05-07 Tom Tromey <tom@tromey.com>
5095
5096 * configure: Rebuild.
5097 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
5098
5099 2018-05-07 Tom Tromey <tom@tromey.com>
5100
5101 PR tdep/20362:
5102 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
5103 bit. Use correct value for VDIV.
5104
5105 2018-05-04 Tom Tromey <tom@tromey.com>
5106
5107 * configure: Rebuild.
5108 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
5109
5110 2018-05-04 Tom Tromey <tom@tromey.com>
5111
5112 * linux-record.c (record_linux_system_call) <case
5113 RECORD_SYS_RECVFROM>: Add "break".
5114
5115 2018-05-04 Tom Tromey <tom@tromey.com>
5116
5117 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
5118 Add missing "break".
5119 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
5120 Add missing "break".
5121
5122 2018-05-04 Tom Tromey <tom@tromey.com>
5123
5124 * rs6000-tdep.c (ppc_process_record_op4)
5125 (ppc_process_record_op63): Add fall-through comment.
5126
5127 2018-05-04 Tom Tromey <tom@tromey.com>
5128
5129 * i386-tdep.c (i386_process_record): Add fall-through comment.
5130
5131 2018-05-04 Tom Tromey <tom@tromey.com>
5132
5133 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
5134 comment.
5135
5136 2018-05-04 Tom Tromey <tom@tromey.com>
5137
5138 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
5139 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
5140 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
5141 comment.
5142 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
5143 comment.
5144 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
5145 comment.
5146
5147 2018-05-04 Tom Tromey <tom@tromey.com>
5148
5149 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
5150
5151 2018-05-04 Tom Tromey <tom@tromey.com>
5152
5153 * s390-tdep.c (s390_process_record): Fix fall-through comments.
5154 * xcoffread.c (scan_xcoff_symtab): Move comment later.
5155 * symfile.c (section_is_mapped): Fix fall-through comment.
5156 * stabsread.c (define_symbol, read_member_functions): Fix
5157 fall-through comment.
5158 * s390-linux-tdep.c (s390_process_record): Fix fall-through
5159 comment.
5160 * remote.c (remote_wait_as): Fix fall-through comment.
5161 * p-exp.y (yylex): Fix fall-through comment.
5162 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
5163 comment.
5164 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
5165 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
5166 * jv-exp.y (yylex): Fix fall-through comment.
5167 * go-exp.y (lex_one_token): Fix fall-through comment.
5168 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
5169 fall-through comment.
5170 * f-exp.y (yylex): Fix fall-through comment.
5171 * dwarf2read.c (process_die): Fix fall-through comments.
5172 * dbxread.c (process_one_symbol): Fix fall-through comment.
5173 * d-exp.y (lex_one_token): Fix fall-through comment.
5174 * cp-name-parser.y (yylex): Fix fall-through comment.
5175 * coffread.c (coff_symtab_read): Fix fall-through comment.
5176 * c-exp.y (lex_one_token): Fix fall-through comment.
5177 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
5178 comment.
5179 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
5180 comment.
5181
5182 2018-05-04 Tom Tromey <tom@tromey.com>
5183
5184 PR python/22730:
5185 * NEWS: Mention gdb.execute change.
5186 * gdbcmd.h (execute_control_command): Don't declare.
5187 * python/python.c (execute_gdb_command): Use read_command_lines_1,
5188 execute_control_commands, execute_control_commands_to_string.
5189 * cli/cli-script.h (execute_control_commands)
5190 (execute_control_commands_to_string): Declare.
5191 (execute_control_command): Add from_tty parameter.
5192 * cli/cli-script.c (execute_control_commands)
5193 (execute_control_commands_to_string): New functions.
5194 (execute_user_command): Use execute_control_commands.
5195 (execute_control_command_1): Add "from_tty" parameter. Update.
5196 (execute_control_command): Likewise.
5197
5198 2018-05-04 Tom Tromey <tom@tromey.com>
5199
5200 PR python/22731:
5201 * NEWS: Mention that breakpoint commands are writable.
5202 * python/py-breakpoint.c (bppy_set_commands): New function.
5203 (breakpoint_object_getset) <"commands">: Use it.
5204
5205 2018-05-04 Tom Tromey <tom@tromey.com>
5206
5207 * tracepoint.c (actions_command): Update.
5208 * mi/mi-cmd-break.c (mi_command_line_array)
5209 (mi_command_line_array_cnt, mi_command_line_array_ptr)
5210 (mi_read_next_line): Remove.
5211 (mi_cmd_break_commands): Update.
5212 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
5213 function_view.
5214 * cli/cli-script.c (get_command_line): Update.
5215 (process_next_line): Use function_view. Constify.
5216 (recurse_read_control_structure, read_command_lines)
5217 (read_command_lines_1): Change argument types to function_view.
5218 (do_define_command, document_command): Update.
5219 * breakpoint.h (check_tracepoint_command): Don't declare.
5220 * breakpoint.c (check_tracepoint_command): Remove.
5221 (commands_command_1, create_tracepoint_from_upload): Update.
5222
5223 2018-05-04 Tom Tromey <tom@tromey.com>
5224
5225 PR gdb/11750:
5226 * cli/cli-script.h (enum command_control_type) <define_control>:
5227 New constant.
5228 * cli/cli-script.c (multi_line_command_p): Handle define_control.
5229 (build_command_line, execute_control_command_1)
5230 (process_next_line): Likewise.
5231 (do_define_command): New function, extracted from define_command.
5232 (define_command): Use it.
5233
5234 2018-05-04 Tom Tromey <tom@tromey.com>
5235
5236 * tracepoint.c (actions_command): Update.
5237 * cli/cli-script.h (read_command_lines): Update.
5238 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
5239 (MAX_TMPBUF): Remove define.
5240 (define_command): Use string_printf.
5241 (document_command): Likewise.
5242 * breakpoint.c (commands_command_1): Update.
5243
5244 2018-05-04 Tom Tromey <tom@tromey.com>
5245
5246 * top.c (execute_command): Update.
5247 * cli/cli-script.h (print_command_lines): Now varargs.
5248 * cli/cli-script.c (print_command_lines): Now varargs.
5249 (execute_control_command_1) <case while_control, case if_control>:
5250 Update.
5251
5252 2018-05-04 Tom Tromey <tom@tromey.com>
5253
5254 * tracepoint.c (all_tracepoint_actions): Rename from
5255 all_tracepoint_actions_and_cleanup. Change return type.
5256 (actions_command, encode_actions_1, encode_actions)
5257 (trace_dump_actions, tdump_command): Update.
5258 * remote.c (remote_download_command_source): Update.
5259 * python/python.c (gdbpy_eval_from_control_command)
5260 (python_command, python_interactive_command): Update.
5261 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
5262 * guile/guile.c (guile_command)
5263 (gdbscm_eval_from_control_command, guile_command): Update.
5264 * compile/compile.c (compile_code_command)
5265 (compile_print_command, compile_to_object): Update.
5266 * cli/cli-script.h (struct command_lines_deleter): New.
5267 (counted_command_line): New typedef.
5268 (struct command_line): Add constructor, destructor.
5269 <body_list>: Remove.
5270 <body_list_0, body_list_1>: New members.
5271 (command_line_up): Remove typedef.
5272 (read_command_lines, read_command_lines_1, get_command_line):
5273 Update.
5274 (copy_command_lines): Don't declare.
5275 * cli/cli-script.c (build_command_line): Use "new".
5276 (get_command_line): Return counted_command_line.
5277 (print_command_lines, execute_user_command)
5278 (execute_control_command_1, while_command, if_command): Update.
5279 (realloc_body_list): Remove.
5280 (process_next_line, recurse_read_control_structure): Update.
5281 (read_command_lines, read_command_lines_1): Return counted_command_line.
5282 (free_command_lines): Use "delete".
5283 (copy_command_lines): Remove.
5284 (define_command, document_command, show_user_1): Update.
5285 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
5286 a counted_command_line.
5287 * breakpoint.h (counted_command_line): Remove typedef.
5288 (breakpoint_set_commands): Update.
5289 * breakpoint.c (check_no_tracepoint_commands)
5290 (validate_commands_for_breakpoint): Update.
5291 (breakpoint_set_commands): Change commands to be a
5292 counted_command_line.
5293 (commands_command_1, update_dprintf_command_list)
5294 (create_tracepoint_from_upload): Update.
5295
5296 2018-05-04 Tom Tromey <tom@tromey.com>
5297
5298 * cli/cli-decode.h (cmd_list_element): New constructor.
5299 (~cmd_list_element): New destructor.
5300 (struct cmd_list_element): Add initializers.
5301 * cli/cli-decode.c (do_add_cmd): Use "new".
5302 (delete_cmd): Use "delete".
5303
5304 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
5305 Pedro Alves <palves@redhat.com>
5306
5307 PR breakpoints/19806 and support for PR external/20207.
5308 * NEWS: Mention Aarch64 watchpoint improvements.
5309 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
5310 watchpoints and PR external/20207 watchpoints.
5311 * nat/aarch64-linux-hw-point.c
5312 (kernel_supports_any_contiguous_range): New.
5313 (aarch64_watchpoint_offset): New.
5314 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
5315 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
5316 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
5317 (aarch64_align_watchpoint): New parameters aligned_offset_p and
5318 next_addr_orig_p. Support PR external/20207 watchpoints.
5319 (aarch64_downgrade_regs): New.
5320 (aarch64_dr_state_insert_one_point): New parameters offset and
5321 addr_orig.
5322 (aarch64_dr_state_remove_one_point): Likewise.
5323 (aarch64_handle_breakpoint): Update caller.
5324 (aarch64_handle_aligned_watchpoint): Likewise.
5325 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
5326 aligned_offset.
5327 (aarch64_linux_set_debug_regs): Remove const from state. Call
5328 aarch64_downgrade_regs.
5329 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
5330 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
5331 (DR_CONTROL_MASK): ... this.
5332 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
5333 (unsigned int aarch64_watchpoint_offset): New prototype.
5334 (aarch64_linux_set_debug_regs): Remove const from state.
5335 * utils.c (align_up, align_down): Move to ...
5336 * common/common-utils.c (align_up, align_down): ... here.
5337 * utils.h (align_up, align_down): Move to ...
5338 * common/common-utils.h (align_up, align_down): ... here.
5339
5340 2018-05-04 Joel Brobecker <brobecker@adacore.com>
5341
5342 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
5343 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
5344 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
5345 Re-implement to match the ABI as summarized in GCC's
5346 gcc/config/sparc/sparc.c. All callers updated.
5347 (sparc32_store_arguments): Remove assertion.
5348
5349 2018-05-04 Tom Tromey <tom@tromey.com>
5350
5351 * printcmd.c: Don't include tui.h.
5352 (decode_format): Use skip_spaces.
5353
5354 2018-05-04 Tom Tromey <tom@tromey.com>
5355
5356 PR gdb/22619:
5357 * printcmd.c (last_count): New global.
5358 (x_command): Use saved count when repeating.
5359
5360 2018-05-04 Tom Tromey <tom@tromey.com>
5361
5362 * nto-procfs.c (do_closedir_cleanup): Remove.
5363 (procfs_pidlist): Use gdb_dir_up.
5364 * procfs.c (do_closedir_cleanup): Remove.
5365 (proc_update_threads): Use gdb_dir_up.
5366 * common/filestuff.h (struct gdb_dir_deleter): New.
5367 (gdb_dir_up): New typedef.
5368
5369 2018-05-04 Tom Tromey <tom@tromey.com>
5370
5371 * ada-lang.c (print_mention_exception): Use std::string.
5372
5373 2018-05-04 Tom Tromey <tom@tromey.com>
5374
5375 * ada-lang.c (create_excep_cond_exprs): Update.
5376 (ada_exception_catchpoint_cond_string): Use std::string.
5377
5378 2018-05-04 Tom Tromey <tom@tromey.com>
5379
5380 * ada-lang.c (xget_renaming_scope): Return std::string.
5381 (old_renaming_is_invisible): Update.
5382
5383 2018-05-04 Tom Tromey <tom@tromey.com>
5384
5385 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
5386 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
5387
5388 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
5389
5390 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
5391
5392 2018-05-04 Tom Tromey <tom@tromey.com>
5393
5394 * remote.c (remote_query_supported_append): Change type.
5395 (remote_check_symbols): Update.
5396
5397 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
5398
5399 PR gdb/11420
5400 * configure.ac: Prepend libpython.
5401 * python/python-config.py: Likewise.
5402 * configure: Regenerate.
5403
5404 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
5405
5406 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
5407
5408 2018-05-03 Pedro Alves <palves@redhat.com>
5409
5410 * s390-linux-nat.c
5411 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
5412 override. Write 'true' instead of '1'.
5413 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
5414 declaration.
5415
5416 2018-05-02 Pedro Alves <palves@redhat.com>
5417
5418 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
5419 add_inf_child_target.
5420 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
5421 add_inf_child_target.
5422 * aix-thread.c (aix_thread_target_info): New.
5423 (aix_thread_target) <shortname, longname, doc>: Delete.
5424 <info>: New.
5425 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
5426 add_inf_child_target.
5427 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
5428 add_inf_child_target.
5429 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
5430 add_inf_child_target.
5431 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
5432 add_inf_child_target.
5433 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
5434 add_inf_child_target.
5435 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
5436 add_inf_child_target.
5437 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
5438 add_inf_child_target.
5439 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
5440 add_inf_child_target.
5441 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
5442 add_inf_child_target.
5443 * bfd-target.c (target_bfd_target_info): New.
5444 (target_bfd) <shortname, longname, doc>: Delete.
5445 <info>: New.
5446 * bsd-kvm.c (bsd_kvm_target_info): New.
5447 (bsd_kvm_target) <shortname, longname, doc>: Delete.
5448 <info>: New.
5449 (bsd_kvm_target::open): Rename to ...
5450 (bsd_kvm_target_open): ... this. Adjust.
5451 * bsd-uthread.c (bsd_uthread_target_info): New.
5452 (bsd_uthread_target) <shortname, longname, doc>: Delete.
5453 <info>: New.
5454 * corefile.c (core_file_command): Adjust.
5455 * corelow.c (core_target_info): New.
5456 (core_target) <shortname, longname, doc>: Delete.
5457 <info>: New.
5458 (core_target::open): Rename to ...
5459 (core_target_open): ... this. Adjust.
5460 * ctf.c (ctf_target_info): New.
5461 (ctf_target) <shortname, longname, doc>: Delete.
5462 <info>: New.
5463 (ctf_target::open): Rename to ...
5464 (ctf_target_open): ... this.
5465 (_initialize_ctf): Adjust.
5466 * exec.c (exec_target_info): New.
5467 (exec_target) <shortname, longname, doc>: Delete.
5468 <info>: New.
5469 (exec_target::open): Rename to ...
5470 (exec_target_open): ... this.
5471 * gdbcore.h (core_target_open): Declare.
5472 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
5473 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
5474 add_inf_child_target.
5475 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
5476 add_inf_child_target.
5477 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
5478 add_inf_child_target.
5479 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
5480 add_inf_child_target.
5481 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
5482 add_inf_child_target.
5483 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
5484 add_inf_child_target.
5485 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
5486 add_inf_child_target.
5487 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
5488 add_inf_child_target.
5489 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
5490 add_inf_child_target.
5491 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
5492 add_inf_child_target.
5493 * inf-child.c (inf_child_target_info): New.
5494 (inf_child_target::info): New.
5495 (inf_child_open_target): Remove 'target' parameter. Use
5496 get_native_target instead.
5497 (inf_child_target::open): Delete.
5498 (add_inf_child_target): New.
5499 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
5500 Delete.
5501 <info>: New.
5502 (add_inf_child_target): Declare.
5503 (inf_child_open_target): Declare.
5504 * linux-thread-db.c (thread_db_target_info): New.
5505 (thread_db_target) <shortname, longname, doc>: Delete.
5506 <info>: New.
5507 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
5508 add_inf_child_target.
5509 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
5510 add_inf_child_target.
5511 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
5512 add_inf_child_target.
5513 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
5514 add_inf_child_target.
5515 * make-target-delegates (print_class): Adjust.
5516 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
5517 add_inf_child_target.
5518 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
5519 add_inf_child_target.
5520 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
5521 add_inf_child_target.
5522 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
5523 add_inf_child_target.
5524 * nto-procfs.c (nto_native_target_info): New.
5525 (nto_procfs_target_native) <shortname, longname, doc>:
5526 Delete.
5527 <info>: New.
5528 (nto_procfs_target_info): New.
5529 (nto_procfs_target_procfs) <shortname, longname, doc>:
5530 Delete.
5531 <info>: New.
5532 (init_procfs_targets): Adjust.
5533 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
5534 add_inf_child_target.
5535 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
5536 add_inf_child_target.
5537 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
5538 add_inf_child_target.
5539 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
5540 add_inf_child_target.
5541 * ravenscar-thread.c (ravenscar_target_info): New.
5542 (ravenscar_thread_target) <shortname, longname, doc>:
5543 Delete.
5544 <info>: New.
5545 * record-btrace.c (record_btrace_target_info):
5546 (record_btrace_target) <shortname, longname, doc>: Delete.
5547 <info>: New.
5548 (record_btrace_target::open): Rename to ...
5549 (record_btrace_target_open): ... this. Adjust.
5550 * record-full.c (record_longname, record_doc): New.
5551 (record_full_base_target) <shortname, longname, doc>: Delete.
5552 <info>: New.
5553 (record_full_target_info): New.
5554 (record_full_target): <shortname>: Delete.
5555 <info>: New.
5556 (record_full_core_open_1, record_full_open_1): Update comments.
5557 (record_full_base_target::open): Rename to ...
5558 (record_full_open): ... this.
5559 (cmd_record_full_restore): Update.
5560 (_initialize_record_full): Update.
5561 * remote-sim.c (remote_sim_target_info): New.
5562 (gdbsim_target) <shortname, longname, doc>: Delete.
5563 <info>: New.
5564 (gdbsim_target::open): Rename to ...
5565 (gdbsim_target_open): ... this.
5566 (_initialize_remote_sim): Adjust.
5567 * remote.c (remote_doc): New.
5568 (remote_target_info): New.
5569 (remote_target) <shortname, longname, doc>: Delete.
5570 <info>: New.
5571 (extended_remote_target_info): New.
5572 (extended_remote_target) <shortname, longname, doc>: Delete.
5573 <info>: New.
5574 (remote_target::open_1): Make static. Adjust.
5575 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
5576 * s390-linux-nat.c (_initialize_s390_nat): Use
5577 add_inf_child_target.
5578 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
5579 add_inf_child_target.
5580 * sol-thread.c (thread_db_target_info): New.
5581 (sol_thread_target) <shortname, longname, doc>: Delete.
5582 <info>: New.
5583 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
5584 add_inf_child_target.
5585 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
5586 add_inf_child_target.
5587 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
5588 add_inf_child_target.
5589 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
5590 add_inf_child_target.
5591 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
5592 add_inf_child_target.
5593 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
5594 add_inf_child_target.
5595 * spu-linux-nat.c (_initialize_spu_nat): Use
5596 add_inf_child_target.
5597 * spu-multiarch.c (spu_multiarch_target_info): New.
5598 (spu_multiarch_target) <shortname, longname, doc>: Delete.
5599 <info>: New.
5600 * target-delegates.c: Regenerate.
5601 * target.c: Include <unordered_map>.
5602 (target_ops_p): Delete.
5603 (DEF_VEC_P(target_ops_p)): Delete.
5604 (target_factories): New.
5605 (test_target_info): New.
5606 (test_target_ops::info): New.
5607 (open_target): Adjust to use target_factories.
5608 (add_target_with_completer): Rename to ...
5609 (add_target): ... this. Change prototype. Register target_info
5610 and open callback in target_factories. Register target_info in
5611 command context instead of target_ops.
5612 (add_target): Delete old implementation.
5613 (add_deprecated_target_alias): Change prototype. Adjust.
5614 (the_native_target): New.
5615 (set_native_target, get_native_target): New.
5616 (find_default_run_target): Use the_native_target.
5617 (find_attach_target, find_run_target): Simplify.
5618 (target_ops::open): Delete.
5619 (dummy_target_info): New.
5620 (dummy_target::shortname, dummy_target::longname)
5621 (dummy_target::doc): Delete.
5622 (dummy_target::info): New.
5623 (debug_target::shortname, debug_target::longname)
5624 (debug_target::doc): Delete.
5625 (debug_target::info): New.
5626 * target.h (struct target_info): New.
5627 (target_ops::~target_ops): Add comment.
5628 (target_ops::info): New.
5629 (target_ops::shortname, target_ops::longname, target_ops::doc): No
5630 longer virtual. Implement in terms of target_info.
5631 (set_native_target, get_native_target): Declare.
5632 (target_open_ftype): New.
5633 (add_target, add_target_with_completer)
5634 (add_deprecated_target_alias): Change prototype.
5635 (test_target) <shortname, longname, doc>: Delete.
5636 <info>: New.
5637 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
5638 add_inf_child_target.
5639 * tracefile-tfile.c (tfile_target_info): New.
5640 (tfile_target) <shortname, longname, doc>: Delete.
5641 <info>: New.
5642 (tfile_target::open): Rename to ...
5643 (tfile_target_open): ... this.
5644 (_initialize_tracefile_tfile): Adjust.
5645 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
5646 add_inf_child_target.
5647 * windows-nat.c (_initialize_windows_nat): Use
5648 add_inf_child_target.
5649 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
5650 add_inf_child_target.
5651
5652 2018-05-02 Pedro Alves <palves@redhat.com>
5653
5654 * linux-nat.h (linux_nat_target) <low_new_thread,
5655 low_delete_thread, low_new_fork, low_forget_process,
5656 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
5657 New virtual methods.
5658 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5659 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
5660 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
5661 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5662 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
5663 Delete.
5664 * linux-fork.c (delete_fork): Adjust to call low method.
5665 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
5666 (linux_nat_new_fork, linux_nat_forget_process_hook)
5667 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
5668 (linux_nat_status_is_event):
5669 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
5670 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
5671 to call low method.
5672 (sigtrap_is_event): Rename to ...
5673 (linux_nat_target::low_status_is_event): ... this.
5674 (linux_nat_set_status_is_event): Delete.
5675 (save_stop_reason, linux_nat_wait_1)
5676 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
5677 low methods.
5678 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5679 (linux_nat_set_new_fork, linux_nat_set_forget_process)
5680 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5681 (linux_nat_set_prepare_to_resume): Delete.
5682 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
5683 low virtual methods.
5684 * amd64-linux-nat.c: Likewise.
5685 * arm-linux-nat.c: Likewise.
5686 * i386-linux-nat.c: Likewise.
5687 * ia64-linux-nat.c: Likewise.
5688 * mips-linux-nat.c: Likewise.
5689 * ppc-linux-nat.c: Likewise.
5690 * s390-linux-nat.c: Likewise.
5691 * sparc64-linux-nat.c: Likewise.
5692 * x86-linux-nat.c: Likewise.
5693 * x86-linux-nat.h: Include "nat/x86-linux.h".
5694 (x86_linux_nat_target) <low_new_fork, low_forget_process,
5695 low_prepare_to_resume, low_new_thread, low_delete_thread>:
5696 Override methods.
5697
5698 2018-05-02 Pedro Alves <palves@redhat.com>
5699
5700 * target.h (target_ops)
5701 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5702 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
5703 stopped_by_watchpoint, have_continuable_watchpoint,
5704 stopped_data_address, watchpoint_addr_within_range,
5705 can_accel_watchpoint_condition, can_run, thread_alive,
5706 has_all_memory, has_memory, has_stack, has_registers,
5707 has_execution, can_async_p, is_async_p, supports_non_stop,
5708 always_non_stop_p, can_execute_reverse, supports_multi_process,
5709 supports_enable_disable_tracepoint,
5710 supports_disable_randomization, supports_string_tracing,
5711 supports_evaluation_of_breakpoint_conditions,
5712 can_run_breakpoint_commands, filesystem_is_local,
5713 can_download_tracepoint, get_trace_state_variable_value,
5714 set_trace_notes, get_tib_address, use_agent, can_use_agent,
5715 record_is_replaying, record_will_replay,
5716 augmented_libraries_svr4_read>: Adjust to return bool.
5717 * aarch64-linux-nat.c: All implementations adjusted.
5718 * aix-thread.c: All implementations adjusted.
5719 * arm-linux-nat.c: All implementations adjusted.
5720 * breakpoint.c: All implementations adjusted.
5721 * bsd-kvm.c: All implementations adjusted.
5722 * bsd-uthread.c: All implementations adjusted.
5723 * corelow.c: All implementations adjusted.
5724 * ctf.c: All implementations adjusted.
5725 * darwin-nat.c: All implementations adjusted.
5726 * darwin-nat.h: All implementations adjusted.
5727 * exec.c: All implementations adjusted.
5728 * fbsd-nat.c: All implementations adjusted.
5729 * fbsd-nat.h: All implementations adjusted.
5730 * gnu-nat.c: All implementations adjusted.
5731 * gnu-nat.h: All implementations adjusted.
5732 * go32-nat.c: All implementations adjusted.
5733 * ia64-linux-nat.c: All implementations adjusted.
5734 * inf-child.c: All implementations adjusted.
5735 * inf-child.h: All implementations adjusted.
5736 * inf-ptrace.c: All implementations adjusted.
5737 * inf-ptrace.h: All implementations adjusted.
5738 * linux-nat.c: All implementations adjusted.
5739 * linux-nat.h: All implementations adjusted.
5740 * mips-linux-nat.c: All implementations adjusted.
5741 * nto-procfs.c: All implementations adjusted.
5742 * ppc-linux-nat.c: All implementations adjusted.
5743 * procfs.c: All implementations adjusted.
5744 * ravenscar-thread.c: All implementations adjusted.
5745 * record-btrace.c: All implementations adjusted.
5746 * record-full.c: All implementations adjusted.
5747 * remote-sim.c: All implementations adjusted.
5748 * remote.c: All implementations adjusted.
5749 * s390-linux-nat.c: All implementations adjusted.
5750 * sol-thread.c: All implementations adjusted.
5751 * spu-multiarch.c: All implementations adjusted.
5752 * target-delegates.c: All implementations adjusted.
5753 * target.c: All implementations adjusted.
5754 * target.h: All implementations adjusted.
5755 * tracefile-tfile.c: All implementations adjusted.
5756 * tracefile.c: All implementations adjusted.
5757 * tracefile.h: All implementations adjusted.
5758 * windows-nat.c: All implementations adjusted.
5759 * x86-linux-nat.h: All implementations adjusted.
5760 * x86-nat.h: All implementations adjusted.
5761
5762 2018-05-02 Pedro Alves <palves@redhat.com>
5763
5764 * make-target-delegates (scan_target_h): Don't trim lines here.
5765 Replace sequences of tabs and/or whitespace with a single
5766 whitespace.
5767 (top level, parsing methods): Trim each line before processing it
5768 here.
5769
5770 2018-05-02 Pedro Alves <palves@redhat.com>
5771 John Baldwin <jhb@freebsd.org>
5772
5773 * target.h (enum strata) <debug_stratum>: New.
5774 (struct target_ops) <all delegation methods>: Replace by C++
5775 virtual methods, and drop "to_" prefix. All references updated
5776 throughout.
5777 <to_shortname, to_longname, to_doc, to_data,
5778 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
5779 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
5780 virtual methods. All references updated throughout.
5781 <can_attach, supports_terminal_ours, can_create_inferior,
5782 get_thread_control_capabilities, attach_no_wait>: New
5783 virtual methods.
5784 <insert_breakpoint, remove_breakpoint>: Now
5785 TARGET_DEFAULT_NORETURN methods.
5786 <info_proc>: Now returns bool.
5787 <to_magic>: Delete.
5788 (OPS_MAGIC): Delete.
5789 (current_target): Delete. All references replaced by references
5790 to ...
5791 (target_stack): ... this. New.
5792 (target_shortname, target_longname): Adjust.
5793 (target_can_run): Now a function declaration.
5794 (default_child_has_all_memory, default_child_has_memory)
5795 (default_child_has_stack, default_child_has_registers)
5796 (default_child_has_execution): Remove target_ops parameter.
5797 (complete_target_initialization): Delete.
5798 (memory_breakpoint_target): New template class.
5799 (test_target_ops): Refactor as a C++ class with virtual methods.
5800 * make-target-delegates (NAME_PART): Tighten.
5801 (POINTER_PART, CP_SYMBOL): New.
5802 (SIMPLE_RETURN_PART): Reimplement.
5803 (VEC_RETURN_PART): Expect less.
5804 (RETURN_PART, VIRTUAL_PART): New.
5805 (METHOD): Adjust to C++ virtual methods.
5806 (scan_target_h): Remove reference to C99.
5807 (dname): Output "target_ops::" prefix.
5808 (write_function_header): Adjust to output a C++ class method.
5809 (write_declaration): New.
5810 (write_delegator): Adjust to output a C++ class method.
5811 (tdname): Output "dummy_target::" prefix.
5812 (write_tdefault, write_debugmethod): Adjust to output a C++ class
5813 method.
5814 (tdefault_names, debug_names): Delete.
5815 (return_types, tdefaults, styles, argtypes_array): New.
5816 (top level): All methods are delegators.
5817 (print_class): New.
5818 (top level): Print dummy_target and debug_target classes.
5819 * target-delegates.c: Regenerate.
5820 * target-debug.h (target_debug_print_enum_info_proc_what)
5821 (target_debug_print_thread_control_capabilities)
5822 (target_debug_print_thread_info_p): New.
5823 * target.c (dummy_target): Delete.
5824 (the_dummy_target, the_debug_target): New.
5825 (target_stack): Now extern.
5826 (set_targetdebug): Push/unpush debug target.
5827 (default_child_has_all_memory, default_child_has_memory)
5828 (default_child_has_stack, default_child_has_registers)
5829 (default_child_has_execution): Remove target_ops parameter.
5830 (complete_target_initialization): Delete.
5831 (add_target_with_completer): No longer call
5832 complete_target_initialization.
5833 (target_supports_terminal_ours): Use regular delegation.
5834 (update_current_target): Delete.
5835 (push_target): No longer check magic number. Don't call
5836 update_current_target.
5837 (unpush_target): Don't call update_current_target.
5838 (target_is_pushed): No longer check magic number.
5839 (target_require_runnable): Skip for all stratums over
5840 process_stratum.
5841 (target_ops::info_proc): New.
5842 (target_info_proc): Use find_target_at and
5843 find_default_run_target.
5844 (target_supports_disable_randomization): Use regular delegation.
5845 (target_get_osdata): Use find_target_at.
5846 (target_ops::open, target_ops::close, target_ops::can_attach)
5847 (target_ops::attach, target_ops::can_create_inferior)
5848 (target_ops::create_inferior, target_ops::can_run)
5849 (target_can_run): New.
5850 (default_fileio_target): Use regular delegation.
5851 (target_ops::fileio_open, target_ops::fileio_pwrite)
5852 (target_ops::fileio_pread, target_ops::fileio_fstat)
5853 (target_ops::fileio_close, target_ops::fileio_unlink)
5854 (target_ops::fileio_readlink): New.
5855 (target_fileio_open_1, target_fileio_unlink)
5856 (target_fileio_readlink): Always call the target method. Handle
5857 FILEIO_ENOSYS.
5858 (return_zero, return_zero_has_execution): Delete.
5859 (init_dummy_target): Delete.
5860 (dummy_target::dummy_target, dummy_target::shortname)
5861 (dummy_target::longname, dummy_target::doc)
5862 (debug_target::debug_target, debug_target::shortname)
5863 (debug_target::longname, debug_target::doc): New.
5864 (target_supports_delete_record): Use regular delegation.
5865 (setup_target_debug): Delete.
5866 (maintenance_print_target_stack): Skip debug_stratum.
5867 (initialize_targets): Instantiate the_dummy_target and
5868 the_debug_target.
5869 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
5870 use target_stack.
5871 (target_auxv_search, fprint_target_auxv): Adjust.
5872 (info_auxv_command): Adjust to use target_stack.
5873 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
5874 * exceptions.c (print_flush): Handle a NULL target_stack.
5875 * regcache.c (target_ops_no_register): Refactor as class with
5876 virtual methods.
5877
5878 * exec.c (exec_target): New class.
5879 (exec_ops): Now an exec_target.
5880 (exec_open, exec_close_1, exec_get_section_table)
5881 (exec_xfer_partial, exec_files_info, exec_has_memory)
5882 (exec_make_note_section): Refactor as exec_target methods.
5883 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
5884 Delete.
5885 (exec_target::find_memory_regions): New.
5886 (_initialize_exec): Don't call init_exec_ops.
5887 * gdbcore.h (exec_file_clear): Delete.
5888
5889 * corefile.c (core_target): Delete.
5890 (core_file_command): Adjust.
5891 * corelow.c (core_target): New class.
5892 (the_core_target): New.
5893 (core_close): Remove target_ops parameter.
5894 (core_close_cleanup): Adjust.
5895 (core_target::close): New.
5896 (core_open, core_detach, get_core_registers, core_files_info)
5897 (core_xfer_partial, core_thread_alive, core_read_description)
5898 (core_pid_to_str, core_thread_name, core_has_memory)
5899 (core_has_stack, core_has_registers, core_info_proc): Rework as
5900 core_target methods.
5901 (ignore, core_remove_breakpoint, init_core_ops): Delete.
5902 (_initialize_corelow): Initialize the_core_target.
5903 * gdbcore.h (core_target): Delete.
5904 (the_core_target): New.
5905
5906 * ctf.c: (ctf_target): New class.
5907 (ctf_ops): Now a ctf_target.
5908 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
5909 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
5910 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
5911 methods.
5912 (init_ctf_ops): Delete.
5913 (_initialize_ctf): Don't call it.
5914 * tracefile-tfile.c (tfile_target): New class.
5915 (tfile_ops): Now a tfile_target.
5916 (tfile_open, tfile_close, tfile_files_info)
5917 (tfile_get_tracepoint_status, tfile_trace_find)
5918 (tfile_fetch_registers, tfile_xfer_partial)
5919 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
5920 Refactor as tfile_target methods.
5921 (tfile_xfer_partial_features): Remove target_ops parameter.
5922 (init_tfile_ops): Delete.
5923 (_initialize_tracefile_tfile): Don't call it.
5924 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
5925 (tracefile_has_stack, tracefile_has_registers)
5926 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
5927 tracefile_target methods.
5928 (init_tracefile_ops): Delete.
5929 (tracefile_target::tracefile_target): New.
5930 * tracefile.h: Include "target.h".
5931 (tracefile_target): New class.
5932 (init_tracefile_ops): Delete.
5933
5934 * spu-multiarch.c (spu_multiarch_target): New class.
5935 (spu_ops): Now a spu_multiarch_target.
5936 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
5937 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
5938 (spu_search_memory, spu_mourn_inferior): Refactor as
5939 spu_multiarch_target methods.
5940 (init_spu_ops): Delete.
5941 (_initialize_spu_multiarch): Remove references to init_spu_ops,
5942 complete_target_initialization.
5943
5944 * ravenscar-thread.c (ravenscar_thread_target): New class.
5945 (ravenscar_ops): Now a ravenscar_thread_target.
5946 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
5947 (ravenscar_thread_alive, ravenscar_pid_to_str)
5948 (ravenscar_fetch_registers, ravenscar_store_registers)
5949 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
5950 (ravenscar_stopped_by_hw_breakpoint)
5951 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
5952 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
5953 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
5954 methods.
5955 (init_ravenscar_thread_ops): Delete.
5956 (_initialize_ravenscar): Remove references to
5957 init_ravenscar_thread_ops and complete_target_initialization.
5958
5959 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
5960 (bsd_uthread_target): New class.
5961 (bsd_uthread_ops): Now a bsd_uthread_target.
5962 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
5963 (bsd_uthread_close, bsd_uthread_mourn_inferior)
5964 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
5965 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
5966 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
5967 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
5968 (bsd_uthread_target): Delete function.
5969 (_initialize_bsd_uthread): Remove reference to
5970 complete_target_initialization.
5971
5972 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
5973 (target_bfd): ... this new class.
5974 (target_bfd_xfer_partial, target_bfd_get_section_table)
5975 (target_bfd_close): Refactor as target_bfd methods.
5976 (target_bfd::~target_bfd): New.
5977 (target_bfd_reopen): Adjust.
5978 (target_bfd::close): New.
5979
5980 * record-btrace.c (record_btrace_target): New class.
5981 (record_btrace_ops): Now a record_btrace_target.
5982 (record_btrace_open, record_btrace_stop_recording)
5983 (record_btrace_disconnect, record_btrace_close)
5984 (record_btrace_async, record_btrace_info)
5985 (record_btrace_insn_history, record_btrace_insn_history_range)
5986 (record_btrace_insn_history_from, record_btrace_call_history)
5987 (record_btrace_call_history_range)
5988 (record_btrace_call_history_from, record_btrace_record_method)
5989 (record_btrace_is_replaying, record_btrace_will_replay)
5990 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
5991 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
5992 (record_btrace_store_registers, record_btrace_prepare_to_store)
5993 (record_btrace_to_get_unwinder)
5994 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
5995 (record_btrace_commit_resume, record_btrace_wait)
5996 (record_btrace_stop, record_btrace_can_execute_reverse)
5997 (record_btrace_stopped_by_sw_breakpoint)
5998 (record_btrace_supports_stopped_by_sw_breakpoint)
5999 (record_btrace_stopped_by_hw_breakpoint)
6000 (record_btrace_supports_stopped_by_hw_breakpoint)
6001 (record_btrace_update_thread_list, record_btrace_thread_alive)
6002 (record_btrace_goto_begin, record_btrace_goto_end)
6003 (record_btrace_goto, record_btrace_stop_replaying_all)
6004 (record_btrace_execution_direction)
6005 (record_btrace_prepare_to_generate_core)
6006 (record_btrace_done_generating_core): Refactor as
6007 record_btrace_target methods.
6008 (init_record_btrace_ops): Delete.
6009 (_initialize_record_btrace): Remove reference to
6010 init_record_btrace_ops.
6011 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
6012 the execution_direction global.
6013 (record_full_base_target, record_full_target)
6014 (record_full_core_target): New classes.
6015 (record_full_ops): Now a record_full_target.
6016 (record_full_core_ops): Now a record_full_core_target.
6017 (record_full_target::detach, record_full_target::disconnect)
6018 (record_full_core_target::disconnect)
6019 (record_full_target::mourn_inferior, record_full_target::kill):
6020 New.
6021 (record_full_open, record_full_close, record_full_async): Refactor
6022 as methods of the record_full_base_target class.
6023 (record_full_resume, record_full_commit_resume): Refactor
6024 as methods of the record_full_target class.
6025 (record_full_wait, record_full_stopped_by_watchpoint)
6026 (record_full_stopped_data_address)
6027 (record_full_stopped_by_sw_breakpoint)
6028 (record_full_supports_stopped_by_sw_breakpoint)
6029 (record_full_stopped_by_hw_breakpoint)
6030 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
6031 methods of the record_full_base_target class.
6032 (record_full_store_registers, record_full_xfer_partial)
6033 (record_full_insert_breakpoint, record_full_remove_breakpoint):
6034 Refactor as methods of the record_full_target class.
6035 (record_full_can_execute_reverse, record_full_get_bookmark)
6036 (record_full_goto_bookmark, record_full_execution_direction)
6037 (record_full_record_method, record_full_info, record_full_delete)
6038 (record_full_is_replaying, record_full_will_replay)
6039 (record_full_goto_begin, record_full_goto_end, record_full_goto)
6040 (record_full_stop_replaying): Refactor as methods of the
6041 record_full_base_target class.
6042 (record_full_core_resume, record_full_core_kill)
6043 (record_full_core_fetch_registers)
6044 (record_full_core_prepare_to_store)
6045 (record_full_core_store_registers, record_full_core_xfer_partial)
6046 (record_full_core_insert_breakpoint)
6047 (record_full_core_remove_breakpoint)
6048 (record_full_core_has_execution): Refactor
6049 as methods of the record_full_core_target class.
6050 (record_full_base_target::supports_delete_record): New.
6051 (init_record_full_ops): Delete.
6052 (init_record_full_core_ops): Delete.
6053 (record_full_save): Refactor as method of the
6054 record_full_base_target class.
6055 (_initialize_record_full): Remove references to
6056 init_record_full_ops and init_record_full_core_ops.
6057
6058 * remote.c (remote_target, extended_remote_target): New classes.
6059 (remote_ops): Now a remote_target.
6060 (extended_remote_ops): Now an extended_remote_target.
6061 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
6062 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
6063 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
6064 (remote_pass_signals, remote_set_syscall_catchpoint)
6065 (remote_program_signals, )
6066 (remote_thread_always_alive): Remove target_ops parameter.
6067 (remote_thread_alive, remote_thread_name)
6068 (remote_update_thread_list, remote_threads_extra_info)
6069 (remote_static_tracepoint_marker_at)
6070 (remote_static_tracepoint_markers_by_strid)
6071 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
6072 (remote_open): Refactor as methods of remote_target.
6073 (extended_remote_open, extended_remote_detach)
6074 (extended_remote_attach, extended_remote_post_attach):
6075 (extended_remote_supports_disable_randomization)
6076 (extended_remote_create_inferior): : Refactor as method of
6077 extended_remote_target.
6078 (remote_set_permissions, remote_open_1, remote_detach)
6079 (remote_follow_fork, remote_follow_exec, remote_disconnect)
6080 (remote_resume, remote_commit_resume, remote_stop)
6081 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
6082 (remote_terminal_ours, remote_wait, remote_fetch_registers)
6083 (remote_prepare_to_store, remote_store_registers)
6084 (remote_flash_erase, remote_flash_done, remote_files_info)
6085 (remote_kill, remote_mourn, remote_insert_breakpoint)
6086 (remote_remove_breakpoint, remote_insert_watchpoint)
6087 (remote_watchpoint_addr_within_range)
6088 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
6089 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
6090 (remote_supports_stopped_by_sw_breakpoint)
6091 (remote_stopped_by_hw_breakpoint)
6092 (remote_supports_stopped_by_hw_breakpoint)
6093 (remote_stopped_by_watchpoint, remote_stopped_data_address)
6094 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
6095 (remote_verify_memory): Refactor as methods of remote_target.
6096 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
6097 parameter.
6098 (remote_xfer_partial, remote_get_memory_xfer_limit)
6099 (remote_search_memory, remote_rcmd, remote_memory_map)
6100 (remote_pid_to_str, remote_get_thread_local_address)
6101 (remote_get_tib_address, remote_read_description): Refactor as
6102 methods of remote_target.
6103 (remote_target::fileio_open, remote_target::fileio_pwrite)
6104 (remote_target::fileio_pread, remote_target::fileio_close): New.
6105 (remote_hostio_readlink, remote_hostio_fstat)
6106 (remote_filesystem_is_local, remote_can_execute_reverse)
6107 (remote_supports_non_stop, remote_supports_disable_randomization)
6108 (remote_supports_multi_process, remote_supports_cond_breakpoints)
6109 (remote_supports_enable_disable_tracepoint)
6110 (remote_supports_string_tracing)
6111 (remote_can_run_breakpoint_commands, remote_trace_init)
6112 (remote_download_tracepoint, remote_can_download_tracepoint)
6113 (remote_download_trace_state_variable, remote_enable_tracepoint)
6114 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
6115 (remote_trace_start, remote_get_trace_status)
6116 (remote_get_tracepoint_status, remote_trace_stop)
6117 (remote_trace_find, remote_get_trace_state_variable_value)
6118 (remote_save_trace_data, remote_get_raw_trace_data)
6119 (remote_set_disconnected_tracing, remote_core_of_thread)
6120 (remote_set_circular_trace_buffer, remote_traceframe_info)
6121 (remote_get_min_fast_tracepoint_insn_len)
6122 (remote_set_trace_buffer_size, remote_set_trace_notes)
6123 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
6124 (remote_disable_btrace, remote_teardown_btrace)
6125 (remote_read_btrace, remote_btrace_conf)
6126 (remote_augmented_libraries_svr4_read, remote_load)
6127 (remote_pid_to_exec_file, remote_can_do_single_step)
6128 (remote_execution_direction, remote_thread_handle_to_thread_info):
6129 Refactor as methods of remote_target.
6130 (init_remote_ops, init_extended_remote_ops): Delete.
6131 (remote_can_async_p, remote_is_async_p, remote_async)
6132 (remote_thread_events, remote_upload_tracepoints)
6133 (remote_upload_trace_state_variables): Refactor as methods of
6134 remote_target.
6135 (_initialize_remote): Remove references to init_remote_ops and
6136 init_extended_remote_ops.
6137
6138 * remote-sim.c (gdbsim_target): New class.
6139 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
6140 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
6141 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
6142 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
6143 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
6144 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
6145 Refactor as methods of gdbsim_target.
6146 (gdbsim_ops): Now a gdbsim_target.
6147 (init_gdbsim_ops): Delete.
6148 (gdbsim_cntrl_c): Adjust.
6149 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
6150
6151 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
6152 (the_amd64_linux_nat_target): New.
6153 (amd64_linux_fetch_inferior_registers)
6154 (amd64_linux_store_inferior_registers): Refactor as methods of
6155 amd64_linux_nat_target.
6156 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
6157 * i386-linux-nat.c: Don't include "linux-nat.h".
6158 (i386_linux_nat_target): New class.
6159 (the_i386_linux_nat_target): New.
6160 (i386_linux_fetch_inferior_registers)
6161 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
6162 as methods of i386_linux_nat_target.
6163 (_initialize_i386_linux_nat): Adjust. Set linux_target.
6164 * inf-child.c (inf_child_ops): Delete.
6165 (inf_child_fetch_inferior_registers)
6166 (inf_child_store_inferior_registers): Delete.
6167 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
6168 methods of inf_child_target.
6169 (inf_child_target::supports_terminal_ours)
6170 (inf_child_target::terminal_init)
6171 (inf_child_target::terminal_inferior)
6172 (inf_child_target::terminal_ours_for_output)
6173 (inf_child_target::terminal_ours, inf_child_target::interrupt)
6174 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
6175 New.
6176 (inf_child_open, inf_child_disconnect, inf_child_close)
6177 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
6178 (inf_child_post_startup_inferior, inf_child_can_run)
6179 (inf_child_pid_to_exec_file): Refactor as methods of
6180 inf_child_target.
6181 (inf_child_follow_fork): Delete.
6182 (inf_child_target::can_create_inferior)
6183 (inf_child_target::can_attach): New.
6184 (inf_child_target::has_all_memory, inf_child_target::has_memory)
6185 (inf_child_target::has_stack, inf_child_target::has_registers)
6186 (inf_child_target::has_execution): New.
6187 (inf_child_fileio_open, inf_child_fileio_pwrite)
6188 (inf_child_fileio_pread, inf_child_fileio_fstat)
6189 (inf_child_fileio_close, inf_child_fileio_unlink)
6190 (inf_child_fileio_readlink, inf_child_use_agent)
6191 (inf_child_can_use_agent): Refactor as methods of
6192 inf_child_target.
6193 (return_zero, inf_child_target): Delete.
6194 (inf_child_target::inf_child_target): New.
6195 * inf-child.h: Include "target.h".
6196 (inf_child_target): Delete function prototype.
6197 (inf_child_target): New class.
6198 (inf_child_open_target, inf_child_mourn_inferior)
6199 (inf_child_maybe_unpush_target): Delete.
6200 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
6201 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
6202 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
6203 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
6204 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
6205 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
6206 (inf_ptrace_wait, inf_ptrace_xfer_partial)
6207 (inf_ptrace_thread_alive, inf_ptrace_files_info)
6208 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
6209 methods of inf_ptrace_target.
6210 (inf_ptrace_target): Delete function.
6211 * inf-ptrace.h: Include "inf-child.h".
6212 (inf_ptrace_target): Delete function declaration.
6213 (inf_ptrace_target): New class.
6214 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
6215 * linux-nat.c (linux_target): New.
6216 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
6217 (linux_nat_target::~linux_nat_target): New.
6218 (linux_child_post_attach, linux_child_post_startup_inferior)
6219 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
6220 (linux_child_remove_fork_catchpoint)
6221 (linux_child_insert_vfork_catchpoint)
6222 (linux_child_remove_vfork_catchpoint)
6223 (linux_child_insert_exec_catchpoint)
6224 (linux_child_remove_exec_catchpoint)
6225 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
6226 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
6227 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
6228 (linux_nat_stopped_data_address)
6229 (linux_nat_stopped_by_sw_breakpoint)
6230 (linux_nat_supports_stopped_by_sw_breakpoint)
6231 (linux_nat_stopped_by_hw_breakpoint)
6232 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
6233 (linux_nat_kill, linux_nat_mourn_inferior)
6234 (linux_nat_xfer_partial, linux_nat_thread_alive)
6235 (linux_nat_update_thread_list, linux_nat_pid_to_str)
6236 (linux_nat_thread_name, linux_child_pid_to_exec_file)
6237 (linux_child_static_tracepoint_markers_by_strid)
6238 (linux_nat_is_async_p, linux_nat_can_async_p)
6239 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
6240 (linux_nat_supports_multi_process)
6241 (linux_nat_supports_disable_randomization, linux_nat_async)
6242 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
6243 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
6244 (linux_nat_fileio_open, linux_nat_fileio_readlink)
6245 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
6246 methods of linux_nat_target.
6247 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
6248 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
6249 parameter.
6250 (check_stopped_by_watchpoint): Adjust.
6251 (linux_xfer_partial): Delete.
6252 (linux_target_install_ops, linux_target, linux_nat_add_target):
6253 Delete.
6254 (linux_nat_target::linux_nat_target): New.
6255 * linux-nat.h: Include "inf-ptrace.h".
6256 (linux_nat_target): New.
6257 (linux_target, linux_target_install_ops, linux_nat_add_target):
6258 Delete function declarations.
6259 (linux_target): Declare global.
6260 * linux-thread-db.c (thread_db_target): New.
6261 (thread_db_target::thread_db_target): New.
6262 (thread_db_ops): Delete.
6263 (the_thread_db_target): New.
6264 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
6265 (thread_db_update_thread_list, thread_db_pid_to_str)
6266 (thread_db_extra_thread_info)
6267 (thread_db_thread_handle_to_thread_info)
6268 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
6269 (thread_db_resume): Refactor as methods of thread_db_target.
6270 (init_thread_db_ops): Delete.
6271 (_initialize_thread_db): Remove reference to init_thread_db_ops.
6272 * x86-linux-nat.c: Don't include "linux-nat.h".
6273 (super_post_startup_inferior): Delete.
6274 (x86_linux_nat_target::~x86_linux_nat_target): New.
6275 (x86_linux_child_post_startup_inferior)
6276 (x86_linux_read_description, x86_linux_enable_btrace)
6277 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
6278 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
6279 methods of x86_linux_nat_target.
6280 (x86_linux_create_target): Delete. Bits folded ...
6281 (x86_linux_add_target): ... here. Now takes a linux_nat_target
6282 pointer.
6283 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
6284 (x86_linux_nat_target): New class.
6285 (x86_linux_create_target): Delete.
6286 (x86_linux_add_target): Now takes a linux_nat_target pointer.
6287 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
6288 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
6289 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
6290 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
6291 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
6292 make extern.
6293 (x86_use_watchpoints): Delete.
6294 * x86-nat.h: Include "breakpoint.h" and "target.h".
6295 (x86_use_watchpoints): Delete.
6296 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
6297 (x86_stopped_by_watchpoint, x86_stopped_data_address)
6298 (x86_insert_watchpoint, x86_remove_watchpoint)
6299 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
6300 (x86_stopped_by_hw_breakpoint): New declarations.
6301 (x86_nat_target): New template class.
6302
6303 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
6304 (the_ppc_linux_nat_target): New.
6305 (ppc_linux_fetch_inferior_registers)
6306 (ppc_linux_can_use_hw_breakpoint)
6307 (ppc_linux_region_ok_for_hw_watchpoint)
6308 (ppc_linux_ranged_break_num_registers)
6309 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
6310 (ppc_linux_insert_mask_watchpoint)
6311 (ppc_linux_remove_mask_watchpoint)
6312 (ppc_linux_can_accel_watchpoint_condition)
6313 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
6314 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
6315 (ppc_linux_watchpoint_addr_within_range)
6316 (ppc_linux_masked_watch_num_registers)
6317 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
6318 (ppc_linux_read_description): Refactor as methods of
6319 ppc_linux_nat_target.
6320 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
6321
6322 * procfs.c (procfs_xfer_partial): Delete forward declaration.
6323 (procfs_target): New class.
6324 (the_procfs_target): New.
6325 (procfs_target): Delete function.
6326 (procfs_auxv_parse, procfs_attach, procfs_detach)
6327 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
6328 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
6329 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
6330 (procfs_create_inferior, procfs_update_thread_list)
6331 (procfs_thread_alive, procfs_pid_to_str)
6332 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
6333 (procfs_stopped_data_address, procfs_insert_watchpoint)
6334 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
6335 (proc_find_memory_regions, procfs_info_proc)
6336 (procfs_make_note_section): Refactor as methods of procfs_target.
6337 (_initialize_procfs): Adjust.
6338 * sol-thread.c (sol_thread_target): New class.
6339 (sol_thread_ops): Now a sol_thread_target.
6340 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
6341 (sol_thread_fetch_registers, sol_thread_store_registers)
6342 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
6343 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
6344 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
6345 (init_sol_thread_ops): Delete.
6346 (_initialize_sol_thread): Adjust. Remove references to
6347 init_sol_thread_ops and complete_target_initialization.
6348
6349 * windows-nat.c (windows_nat_target): New class.
6350 (windows_fetch_inferior_registers)
6351 (windows_store_inferior_registers, windows_resume, windows_wait)
6352 (windows_attach, windows_detach, windows_pid_to_exec_file)
6353 (windows_files_info, windows_create_inferior)
6354 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
6355 (windows_close, windows_pid_to_str, windows_xfer_partial)
6356 (windows_get_tib_address, windows_get_ada_task_ptid)
6357 (windows_thread_name, windows_thread_alive): Refactor as
6358 windows_nat_target methods.
6359 (do_initial_windows_stuff): Adjust.
6360 (windows_target): Delete function.
6361 (_initialize_windows_nat): Adjust.
6362
6363 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
6364 (darwin_mourn_inferior, darwin_kill_inferior)
6365 (darwin_create_inferior, darwin_attach, darwin_detach)
6366 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
6367 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
6368 (darwin_supports_multi_process): Refactor as darwin_nat_target
6369 methods.
6370 (darwin_resume_to, darwin_files_info): Delete.
6371 (_initialize_darwin_inferior): Rename to ...
6372 (_initialize_darwin_nat): ... this. Adjust to C++ification.
6373 * darwin-nat.h: Include "inf-child.h".
6374 (darwin_nat_target): New class.
6375 (darwin_complete_target): Delete.
6376 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
6377 (darwin_target): New.
6378 (i386_darwin_fetch_inferior_registers)
6379 (i386_darwin_store_inferior_registers): Refactor as methods of
6380 darwin_nat_target.
6381 (darwin_complete_target): Delete, with ...
6382 (_initialize_i386_darwin_nat): ... bits factored out here.
6383
6384 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
6385 (the_alpha_linux_nat_target): New.
6386 (alpha_linux_register_u_offset): Refactor as
6387 alpha_linux_nat_target method.
6388 (_initialize_alpha_linux_nat): Adjust.
6389 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
6390 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6391 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
6392 methods of linux_nat_trad_target.
6393 (linux_trad_target): Delete.
6394 * linux-nat-trad.h (linux_trad_target): Delete function.
6395 (linux_nat_trad_target): New class.
6396 * mips-linux-nat.c (mips_linux_nat_target): New class.
6397 (super_fetch_registers, super_store_registers, super_close):
6398 Delete.
6399 (the_mips_linux_nat_target): New.
6400 (mips64_linux_regsets_fetch_registers)
6401 (mips64_linux_regsets_store_registers)
6402 (mips64_linux_fetch_registers, mips64_linux_store_registers)
6403 (mips_linux_register_u_offset, mips_linux_read_description)
6404 (mips_linux_can_use_hw_breakpoint)
6405 (mips_linux_stopped_by_watchpoint)
6406 (mips_linux_stopped_data_address)
6407 (mips_linux_region_ok_for_hw_watchpoint)
6408 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
6409 (mips_linux_close): Refactor as methods of mips_linux_nat.
6410 (_initialize_mips_linux_nat): Adjust to C++ification.
6411
6412 * aix-thread.c (aix_thread_target): New class.
6413 (aix_thread_ops): Now an aix_thread_target.
6414 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
6415 (aix_thread_fetch_registers, aix_thread_store_registers)
6416 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
6417 (aix_thread_thread_alive, aix_thread_pid_to_str)
6418 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
6419 Refactor as methods of aix_thread_target.
6420 (init_aix_thread_ops): Delete.
6421 (_initialize_aix_thread): Remove references to init_aix_thread_ops
6422 and complete_target_initialization.
6423 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
6424 (rs6000_nat_target): New class.
6425 (the_rs6000_nat_target): New.
6426 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
6427 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
6428 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
6429 (super_create_inferior): Delete.
6430 (_initialize_rs6000_nat): Adjust to C++ification.
6431
6432 * arm-linux-nat.c (arm_linux_nat_target): New class.
6433 (the_arm_linux_nat_target): New.
6434 (arm_linux_fetch_inferior_registers)
6435 (arm_linux_store_inferior_registers, arm_linux_read_description)
6436 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
6437 (arm_linux_remove_hw_breakpoint)
6438 (arm_linux_region_ok_for_hw_watchpoint)
6439 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
6440 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
6441 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
6442 arm_linux_nat_target.
6443 (_initialize_arm_linux_nat): Adjust to C++ification.
6444
6445 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
6446 (the_aarch64_linux_nat_target): New.
6447 (aarch64_linux_fetch_inferior_registers)
6448 (aarch64_linux_store_inferior_registers)
6449 (aarch64_linux_child_post_startup_inferior)
6450 (aarch64_linux_read_description)
6451 (aarch64_linux_can_use_hw_breakpoint)
6452 (aarch64_linux_insert_hw_breakpoint)
6453 (aarch64_linux_remove_hw_breakpoint)
6454 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
6455 (aarch64_linux_region_ok_for_hw_watchpoint)
6456 (aarch64_linux_stopped_data_address)
6457 (aarch64_linux_stopped_by_watchpoint)
6458 (aarch64_linux_watchpoint_addr_within_range)
6459 (aarch64_linux_can_do_single_step): Refactor as methods of
6460 aarch64_linux_nat_target.
6461 (super_post_startup_inferior): Delete.
6462 (_initialize_aarch64_linux_nat): Adjust to C++ification.
6463
6464 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
6465 (the_hppa_linux_nat_target): New.
6466 (hppa_linux_fetch_inferior_registers)
6467 (hppa_linux_store_inferior_registers): Refactor as methods of
6468 hppa_linux_nat_target.
6469 (_initialize_hppa_linux_nat): Adjust to C++ification.
6470
6471 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
6472 (the_ia64_linux_nat_target): New.
6473 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
6474 (ia64_linux_stopped_data_address)
6475 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
6476 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
6477 ia64_linux_nat_target methods.
6478 (super_xfer_partial): Delete.
6479 (_initialize_ia64_linux_nat): Adjust to C++ification.
6480
6481 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
6482 (the_m32r_linux_nat_target): New.
6483 (m32r_linux_fetch_inferior_registers)
6484 (m32r_linux_store_inferior_registers): Refactor as
6485 m32r_linux_nat_target methods.
6486 (_initialize_m32r_linux_nat): Adjust to C++ification.
6487
6488 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
6489 (the_m68k_linux_nat_target): New.
6490 (m68k_linux_fetch_inferior_registers)
6491 (m68k_linux_store_inferior_registers): Refactor as
6492 m68k_linux_nat_target methods.
6493 (_initialize_m68k_linux_nat): Adjust to C++ification.
6494
6495 * s390-linux-nat.c (s390_linux_nat_target): New class.
6496 (the_s390_linux_nat_target): New.
6497 (s390_linux_fetch_inferior_registers)
6498 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
6499 (s390_insert_watchpoint, s390_remove_watchpoint)
6500 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
6501 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
6502 (s390_auxv_parse, s390_read_description): Refactor as methods of
6503 s390_linux_nat_target.
6504 (_initialize_s390_nat): Adjust to C++ification.
6505
6506 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
6507 (the_sparc_linux_nat_target): New.
6508 (_initialize_sparc_linux_nat): Adjust to C++ification.
6509 * sparc-nat.c (sparc_fetch_inferior_registers)
6510 (sparc_store_inferior_registers): Remove target_ops parameter.
6511 * sparc-nat.h (sparc_fetch_inferior_registers)
6512 (sparc_store_inferior_registers): Remove target_ops parameter.
6513 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
6514 (the_sparc64_linux_nat_target): New.
6515 (_initialize_sparc64_linux_nat): Adjust to C++ification.
6516
6517 * spu-linux-nat.c (spu_linux_nat_target): New class.
6518 (the_spu_linux_nat_target): New.
6519 (spu_child_post_startup_inferior, spu_child_post_attach)
6520 (spu_child_wait, spu_fetch_inferior_registers)
6521 (spu_store_inferior_registers, spu_xfer_partial)
6522 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
6523 methods.
6524 (_initialize_spu_nat): Adjust to C++ification.
6525
6526 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
6527 (the_tilegx_linux_nat_target): New.
6528 (fetch_inferior_registers, store_inferior_registers):
6529 Refactor as methods.
6530 (_initialize_tile_linux_nat): Adjust to C++ification.
6531
6532 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
6533 (the_xtensa_linux_nat_target): New.
6534 (xtensa_linux_fetch_inferior_registers)
6535 (xtensa_linux_store_inferior_registers): Refactor as
6536 xtensa_linux_nat_target methods.
6537 (_initialize_xtensa_linux_nat): Adjust to C++ification.
6538
6539 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
6540 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
6541 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
6542 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
6543 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
6544 (fbsd_stopped_by_sw_breakpoint)
6545 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
6546 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
6547 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
6548 (fbsd_post_startup_inferior, fbsd_post_attach)
6549 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
6550 (fbsd_set_syscall_catchpoint)
6551 (super_xfer_partial, super_resume, super_wait)
6552 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
6553 (fbsd_handle_debug_trap): Remove target_ops parameter.
6554 (fbsd_nat_add_target): Delete.
6555 * fbsd-nat.h: Include "inf-ptrace.h".
6556 (fbsd_nat_add_target): Delete.
6557 (USE_SIGTRAP_SIGINFO): Define.
6558 (fbsd_nat_target): New class.
6559
6560 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
6561 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
6562 (amd64bsd_target): Delete.
6563 * amd64-bsd-nat.h: New file.
6564 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
6565 "x86-bsd-nat.h".
6566 (amd64_fbsd_nat_target): New class.
6567 (the_amd64_fbsd_nat_target): New.
6568 (amd64fbsd_read_description): Refactor as method of
6569 amd64_fbsd_nat_target.
6570 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6571 (_initialize_amd64fbsd_nat): Adjust to C++ification.
6572 * amd64-nat.h (amd64bsd_target): Delete function declaration.
6573 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
6574 (i386bsd_store_inferior_registers): Remove target_ops parameter.
6575 (i386bsd_target): Delete.
6576 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
6577 (i386bsd_fetch_inferior_registers)
6578 (i386bsd_store_inferior_registers): Declare.
6579 (i386_bsd_nat_target): New class.
6580 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
6581 (the_i386_fbsd_nat_target): New.
6582 (i386fbsd_resume, i386fbsd_read_description): Refactor as
6583 i386_fbsd_nat_target methods.
6584 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6585 (_initialize_i386fbsd_nat): Adjust to C++ification.
6586 * x86-bsd-nat.c (super_mourn_inferior): Delete.
6587 (x86bsd_mourn_inferior, x86bsd_target): Delete.
6588 (_initialize_x86_bsd_nat): Adjust to C++ification.
6589 * x86-bsd-nat.h: Include "x86-nat.h".
6590 (x86bsd_target): Delete declaration.
6591 (x86bsd_nat_target): New class.
6592
6593 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
6594 (the_aarch64_fbsd_nat_target): New.
6595 (aarch64_fbsd_fetch_inferior_registers)
6596 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
6597 aarch64_fbsd_nat_target.
6598 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
6599 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
6600 (the_alpha_bsd_nat_target): New.
6601 (alphabsd_fetch_inferior_registers)
6602 (alphabsd_store_inferior_registers): Refactor as
6603 alpha_bsd_nat_target methods.
6604 (_initialize_alphabsd_nat): Refactor as methods of
6605 alpha_bsd_nat_target.
6606 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
6607 (the_amd64_nbsd_nat_target): New.
6608 (_initialize_amd64nbsd_nat): Adjust to C++ification.
6609 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
6610 (the_amd64_obsd_nat_target): New.
6611 (_initialize_amd64obsd_nat): Adjust to C++ification.
6612 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
6613 (the_arm_fbsd_nat_target): New.
6614 (arm_fbsd_fetch_inferior_registers)
6615 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
6616 (_initialize_arm_fbsd_nat): Refactor as methods of
6617 arm_fbsd_nat_target.
6618 (_initialize_arm_fbsd_nat): Adjust to C++ification.
6619 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
6620 (the_arm_netbsd_nat_target): New.
6621 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
6622 arm_netbsd_nat_target.
6623 (_initialize_arm_netbsd_nat): Adjust to C++ification.
6624 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
6625 (the_hppa_nbsd_nat_target): New.
6626 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
6627 hppa_nbsd_nat_target methods.
6628 (_initialize_hppanbsd_nat): Adjust to C++ification.
6629 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
6630 (the_hppa_obsd_nat_target): New.
6631 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
6632 methods of hppa_obsd_nat_target.
6633 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
6634 add_target.
6635 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
6636 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
6637 add_target.
6638 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
6639 (_initialize_i386obsd_nat): Use add_target.
6640 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
6641 (the_m68k_bsd_nat_target): New.
6642 (m68kbsd_fetch_inferior_registers)
6643 (m68kbsd_store_inferior_registers): Refactor as methods of
6644 m68k_bsd_nat_target.
6645 (_initialize_m68kbsd_nat): Adjust to C++ification.
6646 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
6647 (the_mips_fbsd_nat_target): New.
6648 (mips_fbsd_fetch_inferior_registers)
6649 (mips_fbsd_store_inferior_registers): Refactor as methods of
6650 mips_fbsd_nat_target.
6651 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
6652 add_target.
6653 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
6654 (the_mips_nbsd_nat_target): New.
6655 (mipsnbsd_fetch_inferior_registers)
6656 (mipsnbsd_store_inferior_registers): Refactor as methods of
6657 mips_nbsd_nat_target.
6658 (_initialize_mipsnbsd_nat): Adjust to C++ification.
6659 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
6660 (the_mips64_obsd_nat_target): New.
6661 (mips64obsd_fetch_inferior_registers)
6662 (mips64obsd_store_inferior_registers): Refactor as methods of
6663 mips64_obsd_nat_target.
6664 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
6665 add_target.
6666 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
6667 nbsd_nat_target.
6668 * nbsd-nat.h: Include "inf-ptrace.h".
6669 (nbsd_nat_target): New class.
6670 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
6671 (obsd_wait): Refactor as methods of obsd_nat_target.
6672 (obsd_add_target): Delete.
6673 * obsd-nat.h: Include "inf-ptrace.h".
6674 (obsd_nat_target): New class.
6675 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
6676 (the_ppc_fbsd_nat_target): New.
6677 (ppcfbsd_fetch_inferior_registers)
6678 (ppcfbsd_store_inferior_registers): Refactor as methods of
6679 ppc_fbsd_nat_target.
6680 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
6681 add_target.
6682 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
6683 (the_ppc_nbsd_nat_target): New.
6684 (ppcnbsd_fetch_inferior_registers)
6685 (ppcnbsd_store_inferior_registers): Refactor as methods of
6686 ppc_nbsd_nat_target.
6687 (_initialize_ppcnbsd_nat): Adjust to C++ification.
6688 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
6689 (the_ppc_obsd_nat_target): New.
6690 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
6691 methods of ppc_obsd_nat_target.
6692 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
6693 add_target.
6694 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
6695 (the_sh_nbsd_nat_target): New.
6696 (shnbsd_fetch_inferior_registers)
6697 (shnbsd_store_inferior_registers): Refactor as methods of
6698 sh_nbsd_nat_target.
6699 (_initialize_shnbsd_nat): Adjust to C++ification.
6700 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
6701 (inf_ptrace_xfer_partial): Delete.
6702 (sparc_xfer_partial, sparc_target): Delete.
6703 * sparc-nat.h (sparc_fetch_inferior_registers)
6704 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
6705 (sparc_target): Delete function declaration.
6706 (sparc_target): New template class.
6707 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
6708 (_initialize_sparcnbsd_nat): Adjust to C++ification.
6709 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
6710 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
6711 add_target.
6712 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
6713 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
6714 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
6715 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
6716 add_target.
6717 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
6718 (the_vax_bsd_nat_target): New.
6719 (vaxbsd_fetch_inferior_registers)
6720 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
6721 methods.
6722 (_initialize_vaxbsd_nat): Adjust to C++ification.
6723
6724 * bsd-kvm.c (bsd_kvm_target): New class.
6725 (bsd_kvm_ops): Now a bsd_kvm_target.
6726 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
6727 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
6728 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
6729 bsd_kvm_target.
6730 (bsd_kvm_return_one): Delete.
6731 (bsd_kvm_add_target): Adjust to C++ification.
6732
6733 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
6734 (nto_procfs_target_procfs): New classes.
6735 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
6736 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
6737 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
6738 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
6739 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
6740 (procfs_remove_hw_breakpoint, procfs_resume)
6741 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
6742 (procfs_kill_inferior, procfs_store_registers)
6743 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
6744 as methods of nto_procfs_target.
6745 (nto_procfs_ops): Now an nto_procfs_target_procfs.
6746 (nto_native_ops): Delete.
6747 (procfs_open, procfs_native_open): Delete.
6748 (nto_native_ops): Now an nto_procfs_target_native.
6749 (init_procfs_targets): Adjust to C++ification.
6750 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
6751 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
6752 Refactor as methods of nto_procfs_target.
6753
6754 * go32-nat.c (go32_nat_target): New class.
6755 (the_go32_nat_target): New.
6756 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
6757 (go32_store_registers, go32_xfer_partial, go32_files_info)
6758 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
6759 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
6760 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
6761 (go32_pid_to_str): Refactor as methods of go32_nat_target.
6762 (go32_target): Delete.
6763 (_initialize_go32_nat): Adjust to C++ification.
6764
6765 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
6766 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
6767 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
6768 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
6769 gnu_nat_target.
6770 (gnu_target): Delete.
6771 * gnu-nat.h (gnu_target): Delete.
6772 (gnu_nat_target): New class.
6773 * i386-gnu-nat.c (gnu_base_target): New.
6774 (i386_gnu_nat_target): New class.
6775 (the_i386_gnu_nat_target): New.
6776 (_initialize_i386gnu_nat): Adjust to C++ification.
6777
6778 2018-05-02 Pedro Alves <palves@redhat.com>
6779
6780 * bfd-target.c (target_bfd_xclose): Rename to ...
6781 (target_bfd_close): ... this.
6782 (target_bfd_reopen): Adjust.
6783 * target.c (target_close): Remove references to to_xclose.
6784 * target.h (target_ops::to_xclose): Delete.
6785 (target_ops::to_close): Update comments.
6786
6787 2018-05-02 Pedro Alves <palves@redhat.com>
6788
6789 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
6790 "linux-nat.h".
6791 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
6792 * inf-ptrace.c (inf_ptrace_register_u_offset)
6793 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6794 (inf_ptrace_store_register, inf_ptrace_store_registers)
6795 (inf_ptrace_trad_target): Move to ...
6796 * linux-nat-trad.c: ... this new file.
6797 * linux-nat-trad.h: New file.
6798 * linux-nat.c (linux_target_install_ops): Make extern.
6799 (linux_trad_target): Delete.
6800 * linux-nat.h (linux_trad_target): Delete declaration.
6801 (linux_target_install_ops): Declare.
6802 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
6803 "linux-nat.h".
6804
6805 2018-05-02 Pedro Alves <palves@redhat.com>
6806
6807 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6808 procfs_target/add_target here.
6809 * procfs.c (procfs_target): Make static.
6810 (_initialize_procfs): Call add_target here.
6811 * procfs.h (struct target_ops): Remove forward declaration.
6812 (procfs_target): Remove declaration.
6813 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
6814
6815 2018-05-02 Pedro Alves <palves@redhat.com>
6816
6817 * procfs.c (procfs_stopped_by_watchpoint)
6818 (procfs_insert_watchpoint, procfs_remove_watchpoint)
6819 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
6820 Forward declare.
6821 (procfs_use_watchpoints): Delete, move contents...
6822 (procfs_target): ... here.
6823 * procfs.h (procfs_use_watchpoints): Delete declaration.
6824 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6825 procfs_use_watchpoints.
6826 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
6827 procfs_use_watchpoints.
6828
6829 2018-05-02 Tom Tromey <tom@tromey.com>
6830
6831 PR python/20084:
6832 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
6833 and var_zuinteger_unlimited.
6834 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
6835 and PARAM_ZUINTEGER_UNLIMITED.
6836 (set_parameter_value): Handle var_zuinteger and
6837 var_zuinteger_unlimited.
6838 (add_setshow_generic): Likewise.
6839 (parmpy_init): Likewise.
6840
6841 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
6842
6843 PR rust/23124
6844 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
6845 pointer is not null before dereferencing it.
6846
6847 2018-04-30 Tom Tromey <tom@tromey.com>
6848
6849 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
6850 is_mi_like_p.
6851
6852 2018-04-30 Tom Tromey <tom@tromey.com>
6853
6854 * breakpoint.c (mention): Remove use of is_mi_like_p.
6855 (print_mention_ranged_breakpoint): Likewise.
6856 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
6857 of is_mi_like_p.
6858
6859 2018-04-30 Tom Tromey <tom@tromey.com>
6860
6861 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
6862
6863 2018-04-30 Tom Tromey <tom@tromey.com>
6864
6865 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
6866 (info_spu_event_command): Remove some uses of is_mi_like_p.
6867
6868 2018-04-30 Tom Tromey <tom@tromey.com>
6869
6870 * python/py-framefilter.c (py_print_single_arg)
6871 (enumerate_locals, py_print_args, py_print_frame): Remove some
6872 uses of is_mi_like_p.
6873
6874 2018-04-30 Tom Tromey <tom@tromey.com>
6875
6876 * ui-out.c: Update.
6877 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
6878 * ui-out.h (ui_out::is_mi_like_p): Now const.
6879 (ui_out::do_is_mi_like_p): Now const.
6880 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
6881
6882 2018-04-30 Tom Tromey <tom@tromey.com>
6883
6884 * varobj.c (varobj_set_visualizer): Use new_reference.
6885 * python/python.c (gdbpy_decode_line): Use new_reference.
6886 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
6887 new_reference.
6888
6889 2018-04-30 Tom Tromey <tom@tromey.com>
6890
6891 * varobj.c (install_new_value): Use new_reference.
6892 * value.h (value_incref): Return void. Swap intro comment with
6893 value_decref.
6894 * value.c (set_value_parent): Use new_reference.
6895 (value_incref): Return void. Update intro comment.
6896 (release_value): Use new_reference.
6897 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
6898
6899 2018-04-30 Tom Tromey <tom@tromey.com>
6900
6901 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
6902 * gdb_bfd.h (new_bfd_ref): Remove.
6903 (gdb_bfd_open): Update comment.
6904 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
6905 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
6906 (gdb_bfd_fdopenr): Use new_reference.
6907 * exec.c (exec_file_attach): Use new_reference.
6908
6909 2018-04-30 Tom Tromey <tom@tromey.com>
6910
6911 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
6912 method.
6913
6914 2018-04-30 Tom Tromey <tom@tromey.com>
6915
6916 * jit.c (jit_read_code_entry): Use type_align.
6917 * i386-tdep.c (i386_gdbarch_init): Don't call
6918 set_gdbarch_long_long_align_bit.
6919 * gdbarch.sh: Remove long_long_align_bit.
6920 * gdbarch.c, gdbarch.h: Rebuild.
6921 * arc-tdep.c (arc_type_align): New function.
6922 (arc_gdbarch_init): Use arc_type_align. Don't call
6923 set_gdbarch_long_long_align_bit.
6924
6925 2018-04-30 Tom Tromey <tom@tromey.com>
6926
6927 * rust-lang.c (rust_type_alignment): Remove.
6928 (rust_composite_type): Use type_align.
6929
6930 2018-04-30 Tom Tromey <tom@tromey.com>
6931
6932 * NEWS: Mention Type.align.
6933 * python/py-type.c (typy_get_alignof): New function.
6934 (type_object_getset): Add "alignof".
6935
6936 2018-04-30 Tom Tromey <tom@tromey.com>
6937
6938 PR exp/17095:
6939 * NEWS: Update.
6940 * std-operator.def (UNOP_ALIGNOF): New operator.
6941 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
6942 New.
6943 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
6944 * c-lang.c (c_op_print_tab): Add alignof.
6945 * c-exp.y (ALIGNOF): New token.
6946 (exp): Add "ALIGNOF" production.
6947 (ident_tokens): Add _Alignof and alignof.
6948
6949 2018-04-30 Tom Tromey <tom@tromey.com>
6950
6951 * i386-tdep.c (i386_type_align): New function.
6952 (i386_gdbarch_init): Update.
6953 * gdbarch.sh (type_align): New method.
6954 * gdbarch.c, gdbarch.h: Rebuild.
6955 * arch-utils.h (default_type_align): Declare.
6956 * arch-utils.c (default_type_align): New function.
6957 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
6958 (struct type) <align_log2>: New field.
6959 <instance_flags>: Now a bitfield.
6960 (TYPE_RAW_ALIGN): New macro.
6961 (type_align, type_raw_align, set_type_align): Declare.
6962 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
6963 functions.
6964 * dwarf2read.c (quirk_rust_enum): Set type alignment.
6965 (get_alignment, maybe_set_alignment): New functions.
6966 (read_structure_type, read_enumeration_type, read_array_type)
6967 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
6968 (read_subrange_type, read_base_type): Set type alignment.
6969
6970 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
6971
6972 * dwarf2read.c (read_index_from_section): Use bool.
6973
6974 2018-04-29 Fabian Groffen <grobian@gentoo.org>
6975
6976 PR gdb/22950
6977 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
6978 with #ifdef.
6979
6980 2018-04-29 John Reiser <jreiser@BitWagon.com>
6981
6982 PR build/22873
6983 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
6984 last step, and do it atomically.
6985
6986 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
6987
6988 * compile/compile-c-types.c (convert_int, convert_float):
6989 Update for C FE v1.
6990
6991 2018-04-27 Tom Tromey <tom@tromey.com>
6992
6993 PR rust/22545:
6994 * rust-lang.c (rust_inclusive_range_type_p): New function.
6995 (rust_range): Handle inclusive ranges.
6996 (rust_compute_range): Likewise.
6997 * rust-exp.y (struct rust_op) <inclusive>: New field.
6998 (DOTDOTEQ): New constant.
6999 (range_expr): Add "..=" productions.
7000 (operator_tokens): Add "..=" token.
7001 (ast_range): Add "inclusive" parameter.
7002 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
7003 ranges.
7004 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
7005 bounds values.
7006 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
7007 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
7008 Update comments.
7009 * expprint.c (print_subexp_standard): Handle new bounds values.
7010 (dump_subexp_body_standard): Likewise.
7011
7012 2018-04-27 Tom Tromey <tom@tromey.com>
7013
7014 * configure: Rebuild.
7015 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
7016 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
7017 "OVERRIDE".
7018 (class symbol_needs_eval_context): Likewise.
7019 * dwarf2read.c (mock_mapped_index::symbol_name_count)
7020 (mock_mapped_index::symbol_name_at): Use "override". Remove
7021 "virtual".
7022 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
7023 "override".
7024 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
7025 * aarch64-tdep.c (instruction_reader::read): Use "override".
7026 (instruction_reader_test::read): Likewise.
7027 * arm-tdep.c (instruction_reader::read): Use "override".
7028 (instruction_reader_thumb::read): Likewise.
7029
7030 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
7031
7032 PR remote/9665
7033 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
7034 instead of remote_send.
7035 (remote_send): Remove.
7036
7037 2018-04-26 Pedro Alves <palves@redhat.com>
7038
7039 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
7040 find_function_start_sal instead of find_pc_line.
7041
7042 2018-04-26 Pedro Alves <palves@redhat.com>
7043
7044 * breakpoint.c (set_breakpoint_location_function): Handle
7045 mst_data_gnu_ifunc.
7046 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
7047 * elfread.c (elf_symtab_read): Give data symbols with
7048 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
7049 (elf_rel_plt_read): Update comment.
7050 * linespec.c (convert_linespec_to_sals): Handle
7051 mst_data_gnu_ifunc.
7052 (minsym_found): Handle mst_data_gnu_ifunc.
7053 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
7054 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
7055 * parse.c (find_minsym_type_and_address): Handle
7056 mst_data_gnu_ifunc.
7057 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
7058 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
7059 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
7060 comment.
7061 <mst_data_gnu_ifunc>: New enumerator.
7062
7063 2018-04-26 Pedro Alves <palves@redhat.com>
7064
7065 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
7066 (lookup_minimal_symbol_by_pc_section): ... this. Replace
7067 'want_trampoline' parameter by a lookup_msym_prefer parameter.
7068 Handle it.
7069 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
7070 (lookup_minimal_symbol_by_pc): Adjust.
7071 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
7072 (lookup_solib_trampoline_symbol_by_pc): Adjust.
7073 * minsyms.h (lookup_msym_prefer): New enum.
7074 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7075 parameter by a lookup_msym_prefer parameter.
7076
7077 2018-04-26 Pedro Alves <palves@redhat.com>
7078
7079 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
7080 ends in "@plt" instead of looking at the symbol's section.
7081
7082 2018-04-26 Pedro Alves <palves@redhat.com>
7083
7084 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
7085 all references.
7086 (find_pc_partial_function_gnu_ifunc): Rename to ...
7087 (find_pc_partial_function): ... this, and remove references to
7088 'is_gnu_ifunc_p'.
7089 (find_pc_partial_function): Delete old implementation.
7090 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
7091
7092 2018-04-26 Pedro Alves <palves@redhat.com>
7093
7094 * linespec.c (struct bound_minimal_symbol_search_key): New.
7095 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
7096 skip first line if we found a GNU ifunc minimal symbol by name.
7097 (compare_msymbols): Change parameters to work with a destructured
7098 lhs minsym.
7099 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
7100 functions.
7101
7102 2018-04-26 Pedro Alves <palves@redhat.com>
7103
7104 * breakpoint.c (set_breakpoint_location_function): Don't resolve
7105 ifunc targets here. Instead, if we have an ifunc minsym, use its
7106 address/name.
7107 (add_location_to_breakpoint): Store the minsym and the objfile in
7108 the breakpoint location.
7109 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
7110 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
7111 Record the minsym in the sal.
7112 * symtab.h (symtab_and_line) <msymbol>: New field.
7113
7114 2018-04-26 Pedro Alves <palves@redhat.com>
7115
7116 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
7117 unless we actually resolved the ifunc.
7118
7119 2018-04-26 Pedro Alves <palves@redhat.com>
7120
7121 * c-exp.y (variable production): Prefer ifunc minsyms over
7122 regular function symbols.
7123 * symtab.c (find_gnu_ifunc): New function.
7124 * minsyms.h (lookup_msym_prefer): New enum.
7125 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7126 parameter by a lookup_msym_prefer parameter.
7127 * symtab.h (find_gnu_ifunc): New declaration.
7128
7129 2018-04-26 Pedro Alves <palves@redhat.com>
7130
7131 * blockframe.c (find_gnu_ifunc_target_type): New function.
7132 (find_function_type): New.
7133 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
7134 return a value with a memory address.
7135 (eval_call): For calls to GNU ifunc functions, try to find the
7136 type of the target function from the type that the resolver
7137 returns.
7138 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
7139 symbols.
7140 * infcall.c (find_function_return_type): Delete.
7141 (find_function_addr): Add 'function_type' parameter. For calls to
7142 GNU ifunc functions, try to find the type of the target function
7143 from the type that the resolver returns, and return it via
7144 FUNCTION_TYPE.
7145 (call_function_by_hand_dummy): Adjust to use the function type
7146 returned by find_function_addr.
7147 (find_function_addr): Add 'function_type' parameter and move
7148 description here.
7149 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
7150 declarations.
7151
7152 2018-04-26 Pedro Alves <palves@redhat.com>
7153
7154 * c-exp.y (variable production): Skip finding an alias for ifunc
7155 symbols.
7156
7157 2018-04-26 Pedro Alves <palves@redhat.com>
7158
7159 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
7160
7161 2018-04-25 Pedro Alves <palves@redhat.com>
7162
7163 * infcmd.c (kill_command): Print the pid as string, not the whole
7164 thread's ptid. Add comment. s/has been killed/killed/ in output
7165 message.
7166 * remote.c (remote_detach_1): Print the pid as string, not the
7167 whole thread's ptid.
7168
7169 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7170 Sergio Durigan Junior <sergiodj@redhat.com>
7171 Pedro Alves <palves@redhat.com>
7172
7173 * infcmd.c (kill_command): Print message when inferior has
7174 been killed.
7175 * inferior.c (print_inferior_events): Remove 'static'. Set as
7176 '1'.
7177 (add_inferior): Improve message printed when
7178 'print_inferior_events' is on.
7179 (exit_inferior): Remove message printed when
7180 'print_inferior_events' is on.
7181 (detach_inferior): Improve message printed when
7182 'print_inferior_events' is on.
7183 (initialize_inferiors): Use 'add_inferior_silent' to set
7184 'current_inferior_'.
7185 * inferior.h (print_inferior_events): Declare here as
7186 'extern'.
7187 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
7188 '[Detaching...]' messages when 'print_inferior_events' is on.
7189 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
7190 as prefix/suffix for messages. Remove periods. Fix erroneous
7191 'Detaching after fork from child...', replace it by '... from
7192 parent...'.
7193 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
7194 prefix/suffix when printing 'Detaching...' messages. Print
7195 them when 'print_inferior_events' is on.
7196 * remote.c (remote_detach_1): Print message when detaching
7197 from inferior and '!is_fork_parent'.
7198
7199 2018-04-24 Tom Tromey <tom@tromey.com>
7200
7201 * cli-out.h: Reindent.
7202
7203 2018-04-24 Tom Tromey <tom@tromey.com>
7204
7205 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
7206 (cli_ui_out::do_field_string): Use fputs_filtered.
7207 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
7208
7209 2018-04-23 Tom Tromey <tom@tromey.com>
7210
7211 * guile/scm-frame.c (gdbscm_frame_read_var): Use
7212 gdb::unique_xmalloc_ptr.
7213
7214 2018-04-23 Tom Tromey <tom@tromey.com>
7215
7216 * configure: Rebuild.
7217
7218 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
7219
7220 PR gdb/23095
7221 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
7222 prepare_for_testing. Set normal_bp to r_debug_state if target
7223 is bsd.
7224
7225 2018-04-21 Pedro Alves <palves@redhat.com>
7226 Rajendra SY <rajendra.sy@gmail.com>
7227
7228 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
7229 * remote.c (extended_remote_attach): In all-stop mode, mark the
7230 thread as executing.
7231
7232 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7233
7234 * thread.c (thread_apply_all_command): Fix comment.
7235 (thread_command): Fix comment.
7236
7237 2018-04-10 Alan Hayward <alan.hayward@arm.com>
7238
7239 * common/tdesc.h (tdesc_create_feature): Remove xml filename
7240 parameter.
7241 * features/aarch64-core.c (create_feature_aarch64_core):
7242 Regenerate.
7243 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
7244 Likewise.
7245 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
7246 Likewise.
7247 * features/i386/32bit-avx512.c
7248 (create_feature_i386_32bit_avx512): Likewise.
7249 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
7250 Likewise.
7251 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
7252 Likewise.
7253 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
7254 Likewise.
7255 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
7256 Likewise.
7257 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
7258 Likewise.
7259 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
7260 Likewise.
7261 * features/i386/64bit-avx512.c
7262 (create_feature_i386_64bit_avx512): Likewise.
7263 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
7264 Likewise.
7265 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
7266 Likewise.
7267 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
7268 Likewise.
7269 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
7270 Likewise.
7271 * features/i386/64bit-segments.c
7272 (create_feature_i386_64bit_segments): Likewise.
7273 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
7274 Likewise.
7275 * features/i386/x32-core.c
7276 (create_feature_i386_x32_core): Likewise.
7277 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
7278 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
7279 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
7280 * target-descriptions.c: In generated code, don't pass xml
7281 filename.
7282
7283 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7284
7285 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
7286 (print_xml_feature::visit_post): Likewise.
7287 (print_xml_feature::visit): Likewise.
7288 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
7289 (print_xml_feature): Add new class.
7290 * regformats/regdat.sh: Null xmltarget on feature targets.
7291 * target-descriptions.c (struct target_desc): Add xmltarget.
7292 (maintenance_check_tdesc_xml_convert): Add unittest function.
7293 (tdesc_get_features_xml): Add function to get xml.
7294 (maintenance_check_xml_descriptions): Test xml generation.
7295 * xml-tdesc.c (string_read_description_xml): Add function.
7296 * xml-tdesc.h (string_read_description_xml): Add declaration.
7297
7298 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7299
7300 * features/Makefile: Add feature marker to targets with new style
7301 target descriptions.
7302 * regformats/aarch64.dat: Regenerate.
7303 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
7304 * regformats/i386/amd64-avx-linux.dat: Likewise.
7305 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
7306 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
7307 * regformats/i386/amd64-linux.dat: Likewise.
7308 * regformats/i386/amd64-mpx-linux.dat: Likewise.
7309 * regformats/i386/amd64.dat: Likewise.
7310 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
7311 * regformats/i386/i386-avx-linux.dat: Likewise.
7312 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
7313 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
7314 * regformats/i386/i386-linux.dat: Likewise.
7315 * regformats/i386/i386-mmx-linux.dat: Likewise.
7316 * regformats/i386/i386-mpx-linux.dat: Likewise.
7317 * regformats/i386/i386.dat: Likewise.
7318 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
7319 * regformats/i386/x32-avx-linux.dat: Likewise.
7320 * regformats/i386/x32-linux.dat: Likewise.
7321 * regformats/tic6x-c62x-linux.dat: Likewise.
7322 * regformats/tic6x-c64x-linux.dat: Likewise.
7323 * regformats/tic6x-c64xp-linux.dat: Likewise.
7324 * regformats/regdat.sh: Parse feature marker.
7325
7326 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7327
7328 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
7329 (tdesc_osabi_name): Likewise.
7330 * target-descriptions.c (tdesc_architecture_name): Add new
7331 function.
7332 (tdesc_osabi_name): Likewise.
7333
7334 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7335
7336 * common/tdesc.c (tdesc_predefined_type): Move to here.
7337 (tdesc_named_type): Likewise.
7338 (tdesc_create_vector): Likewise.
7339 (tdesc_create_struct): Likewise.
7340 (tdesc_set_struct_size): Likewise.
7341 (tdesc_create_union): Likewise.
7342 (tdesc_create_flags): Likewise.
7343 (tdesc_create_enum): Likewise.
7344 (tdesc_add_field): Likewise.
7345 (tdesc_add_typed_bitfield): Likewise.
7346 (tdesc_add_bitfield): Likewise.
7347 (tdesc_add_flag): Likewise.
7348 (tdesc_add_enum_value): Likewise.
7349 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
7350 (struct tdesc_type_vector): Likewise.
7351 (struct tdesc_type_field): Likewise.
7352 (struct tdesc_type_with_fields): Likewise.
7353 (tdesc_create_enum): Add declaration.
7354 (tdesc_add_typed_bitfield): Likewise.
7355 (tdesc_add_enum_value): Likewise.
7356 * target-descriptions.c (tdesc_type_field): Move from here.
7357 (tdesc_type_builtin): Likewise.
7358 (tdesc_type_vector): Likewise.
7359 (tdesc_type_with_fields): Likewise.
7360 (tdesc_predefined_types): Likewise.
7361 (tdesc_named_type): Likewise.
7362 (tdesc_create_vector): Likewise.
7363 (tdesc_create_struct): Likewise.
7364 (tdesc_set_struct_size): Likewise.
7365 (tdesc_create_union): Likewise.
7366 (tdesc_create_flags): Likewise.
7367 (tdesc_create_enum): Likewise.
7368 (tdesc_add_field): Likewise.
7369 (tdesc_add_typed_bitfield): Likewise.
7370 (tdesc_add_bitfield): Likewise.
7371 (tdesc_add_flag): Likewise.
7372 (tdesc_add_enum_value): Likewise.
7373 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
7374 (tdesc_add_typed_bitfield): Likewise.
7375 (tdesc_add_enum_value): Likewise.
7376
7377 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7378
7379 * common/tdesc.c (tdesc_feature::accept): Move to here.
7380 (tdesc_feature::operator==): Likewise.
7381 (tdesc_create_reg): Likewise.
7382 * common/tdesc.h (tdesc_type_kind): Likewise.
7383 (struct tdesc_type): Likewise.
7384 (struct tdesc_feature): Likewise.
7385 * regformats/regdat.sh: Create a feature.
7386 * target-descriptions.c (tdesc_type_kind): Move from here.
7387 (tdesc_type): Likewise.
7388 (tdesc_type_up): Likewise.
7389 (tdesc_feature): Likewise.
7390 (tdesc_create_reg): Likewise.
7391
7392 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7393
7394 * Makefile.in: Add arch/tdesc.c
7395 * common/tdesc.c: New file.
7396 * common/tdesc.h (tdesc_element_visitor): Move to here.
7397 (tdesc_element): Likewise.
7398 (tdesc_reg): Likewise.
7399 (tdesc_reg_up): Likewise.
7400 * regformats/regdef.h (reg): Add offset to constructors.
7401 * target-descriptions.c (tdesc_element_visitor): Move from here.
7402 (tdesc_element): Likewise.
7403 (tdesc_reg): Likewise.
7404 (tdesc_reg_up): Likewise.
7405
7406 2018-04-17 Tom Tromey <tom@tromey.com>
7407
7408 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
7409 discriminant field.
7410
7411 2018-04-17 Tom Tromey <tom@tromey.com>
7412
7413 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
7414
7415 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
7416
7417 * symtab.c (print_symbol_info): Skip printing filename and line
7418 number when `last' is NULL.
7419 (symtab_symbol_info): Use empty string instead of NULL for first
7420 invocation of print_symbol_info.
7421 (rbreak_command): Pass NULL to `last' parameter of
7422 print_symbol_info.
7423
7424 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
7425
7426 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
7427 instead of nullptr.
7428
7429 2018-04-16 Pedro Alves <palves@redhat.com>
7430
7431 * MAINTAINERS (sh): Remove.
7432 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
7433 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
7434 (ALLDEPFILES): Remove sh64-tdep.c.
7435 * NEWS: Mentions that support for SH-5/SH64 is removed.
7436 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
7437 (sh*-*-openbsd*): Ditto.
7438 (sh64-*-elf*): Remove.
7439 (sh*): Remove.
7440 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
7441 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
7442 * sh-tdep.c: No longer include "sh64-tdep.h".
7443 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
7444 * sh64-tdep.c, sh64-tdep.h: Remove files.
7445
7446 2018-04-16 Pedro Alves <palves@redhat.com>
7447
7448 * MAINTAINERS: Remove m88k.
7449 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
7450 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
7451 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
7452 * NEWS: Mention that support for m88k was removed.
7453 * configure.host (m88*-*-*): Remove support.
7454 * configure.nat (m88k-*-*): Remove support.
7455 * configure.tgt (m88*-*-openbsd*): Remove.
7456 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
7457
7458 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
7459
7460 * configure.tgt (x86_tobjs): New variable.
7461 (amd64_tobjs, i386_tobjs): Use it.
7462
7463 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7464
7465 * symtab.c (print_symbol_info): Precede the symbol definition by
7466 the line number when available.
7467 * NEWS: Advertise this enhancement.
7468
7469 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7470
7471 * NEWS (New options): announce set/show record btrace cpu.
7472 * btrace.c: Include record-btrace.h.
7473 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
7474 the vendor is unknown.
7475 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
7476 Maybe overwrite the btrace configuration's cpu.
7477 (btrace_compute_ftrace): Add cpu parameter. Update callers.
7478 (btrace_fetch): Add cpu parameter. Update callers.
7479 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
7480 Maybe overwrite the btrace configuration's cpu. Skip enabling
7481 errata workarounds if the vendor is unknown.
7482 * python/py-record-btrace.c: Include record-btrace.h.
7483 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
7484 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
7485 * record-btrace.c (record_btrace_cpu_state_kind): New.
7486 (record_btrace_cpu): New.
7487 (set_record_btrace_cpu_cmdlist): New.
7488 (record_btrace_get_cpu): New.
7489 (require_btrace_thread, record_btrace_info)
7490 (record_btrace_resume_thread): Call record_btrace_get_cpu.
7491 (cmd_set_record_btrace_cpu_none): New.
7492 (cmd_set_record_btrace_cpu_auto): New.
7493 (cmd_set_record_btrace_cpu): New.
7494 (cmd_show_record_btrace_cpu): New.
7495 (_initialize_record_btrace): Initialize set/show record btrace cpu
7496 commands.
7497 * record-btrace.h (record_btrace_get_cpu): New.
7498
7499 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7500
7501 * record.c (set_record_command): Fix typo in message.
7502
7503 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7504
7505 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
7506
7507 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7508
7509 * infrun.c (process_event_stop_test): Call
7510 gdbarch_in_indirect_branch_thunk.
7511 * gdbarch.sh (in_indirect_branch_thunk): New.
7512 * gdbarch.c: Regenerated.
7513 * gdbarch.h: Regenerated.
7514 * x86-tdep.h: New.
7515 * x86-tdep.c: New.
7516 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
7517 (HFILES_NO_SRCDIR): Add x86-tdep.h.
7518 (ALLDEPFILES): Add x86-tdep.c.
7519 * arch-utils.h (default_in_indirect_branch_thunk): New.
7520 * arch-utils.c (default_in_indirect_branch_thunk): New.
7521 * i386-tdep: Include x86-tdep.h.
7522 (i386_in_indirect_branch_thunk): New.
7523 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
7524 function.
7525 * amd64-tdep: Include x86-tdep.h.
7526 (amd64_in_indirect_branch_thunk): New.
7527 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
7528
7529 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
7530
7531 PR gdb/23053
7532 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
7533 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
7534 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
7535 regression.
7536
7537 2018-04-12 Tom Tromey <tom@tromey.com>
7538
7539 * rust-lang.c (rust_print_struct_def): Remove univariant code.
7540 (rust_evaluate_subexp): Likewise.
7541
7542 2018-04-12 Pedro Alves <palves@redhat.com>
7543
7544 * procfs.c (procfs_detach): Make forward declaration's prototype
7545 match definition's protototype.
7546 (proc_get_LDT_entry): Remove stale do_cleanups call.
7547
7548 2018-04-12 Pedro Alves <palves@redhat.com>
7549
7550 * target.h (target_ops::to_has_exited): Delete.
7551 (target_has_exited): Delete.
7552 * target-delegates.c: Regenerate.
7553
7554 2018-04-11 Pedro Alves <palves@redhat.com>
7555
7556 * target.c (fileio_fh_t::t): Add comment.
7557 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7558 (target_fileio_close): Handle a NULL target.
7559 (invalidate_fileio_fh): New.
7560 (target_close): Call it.
7561 * remote.c (remote_hostio_send_command): No longer check whether
7562 remote_desc is open.
7563
7564 2018-04-11 Pedro Alves <palves@redhat.com>
7565
7566 * target.c (fileio_fh_t): Make it a named struct instead of a
7567 typedef.
7568 (fileio_fh_t::is_closed): New method.
7569 (DEF_VEC_O (fileio_fh_t)): Remove.
7570 (fileio_fhandles): Now a std::vector.
7571 (is_closed_fileio_fh): Delete.
7572 (acquire_fileio_fd): Adjust. Rename parameters.
7573 (release_fileio_fd): Adjust.
7574 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
7575 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7576 (target_fileio_close): Adjust.
7577
7578 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
7579
7580 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
7581 index.
7582
7583 2018-04-10 Pedro Alves <palves@redhat.com>
7584
7585 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
7586 (scoped_finish_thread_state): New class.
7587 * infcmd.c (run_command_1): Use it instead of finish_thread_state
7588 cleanup.
7589 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
7590 (fetch_inferior_event, normal_stop): Likewise.
7591 * thread.c (finish_thread_state_cleanup): Delete.
7592
7593 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7594 Pedro Alves <palves@redhat.com>
7595
7596 * value.c: Include "selftest.h" and "common/array-view.h".
7597 (struct range) <operator ==>: New.
7598 (test_ranges_contain): New.
7599 (check_ranges_vector): New.
7600 (test_insert_into_bit_range_vector): New.
7601 (_initialize_values): Register selftests.
7602 * common/array-view.h (operator==, operator!=): New.
7603
7604 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7605
7606 * common/gdb_vecs.h (unordered_remove): Add overload that takes
7607 an iterator.
7608 * inline-frame.c: Include <algorithm>.
7609 (struct inline_state): Add constructor.
7610 (inline_state_s): Remove.
7611 (DEF_VEC_O(inline_state_s)): Remove.
7612 (inline_states): Change type to std::vector.
7613 (find_inline_frame_state): Adjust to std::vector.
7614 (allocate_inline_frame_state): Remove.
7615 (clear_inline_frame_state): Adjust to std::vector.
7616 (skip_inline_frames): Adjust to std::vector.
7617
7618 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7619
7620 * tracepoint.h (struct trace_state_variable): Add constructor.
7621 <name>: Change type to std::string.
7622 * tracepoint.c (tsv_s): Remove.
7623 (DEF_VEC_O(tsv_s)): Remove.
7624 (tvariables): Change to std::vector.
7625 (create_trace_state_variable): Adjust to std::vector.
7626 (find_trace_state_variable): Likewise.
7627 (find_trace_state_variable_by_number): Likewise.
7628 (delete_trace_state_variable): Likewise.
7629 (trace_variable_command): Adjust to std::string.
7630 (delete_trace_variable_command): Likewise.
7631 (tvariables_info_1): Adjust to std::vector.
7632 (save_trace_state_variables): Likewise.
7633 (start_tracing): Likewise.
7634 (merge_uploaded_trace_state_variables): Adjust to std::vector
7635 and std::string.
7636 * target.h (struct target_ops)
7637 <to_download_trace_state_variable>: Pass reference to
7638 trace_state_variable.
7639 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
7640 * target-delegates.c: Re-generate.
7641 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
7642 (mi_tsv_deleted): Likewise.
7643 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
7644 * remote.c (remote_download_trace_state_variable): Change
7645 pointer to reference and adjust.
7646 * make-target-delegates (parse_argtypes): Handle references.
7647 (write_function_header): Likewise.
7648 (munge_type): Likewise.
7649
7650 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7651
7652 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7653 string_view-selftests.c.
7654 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
7655 testsuite.
7656 * unittests/basic_string_view/cons/char/1.cc: Likewise.
7657 * unittests/basic_string_view/cons/char/2.cc: Likewise.
7658 * unittests/basic_string_view/cons/char/3.cc: Likewise.
7659 * unittests/basic_string_view/element_access/char/1.cc:
7660 Likewise.
7661 * unittests/basic_string_view/element_access/char/empty.cc:
7662 Likewise.
7663 * unittests/basic_string_view/element_access/char/front_back.cc:
7664 Likewise.
7665 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
7666 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
7667 Likewise.
7668 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
7669 Likewise.
7670 * unittests/basic_string_view/modifiers/swap/char/1.cc:
7671 Likewise.
7672 * unittests/basic_string_view/operations/compare/char/1.cc:
7673 Likewise.
7674 * unittests/basic_string_view/operations/compare/char/13650.cc:
7675 Likewise.
7676 * unittests/basic_string_view/operations/copy/char/1.cc:
7677 Likewise.
7678 * unittests/basic_string_view/operations/data/char/1.cc:
7679 Likewise.
7680 * unittests/basic_string_view/operations/find/char/1.cc:
7681 Likewise.
7682 * unittests/basic_string_view/operations/find/char/2.cc:
7683 Likewise.
7684 * unittests/basic_string_view/operations/find/char/3.cc:
7685 Likewise.
7686 * unittests/basic_string_view/operations/find/char/4.cc:
7687 Likewise.
7688 * unittests/basic_string_view/operations/rfind/char/1.cc:
7689 Likewise.
7690 * unittests/basic_string_view/operations/rfind/char/2.cc:
7691 Likewise.
7692 * unittests/basic_string_view/operations/rfind/char/3.cc:
7693 Likewise.
7694 * unittests/basic_string_view/operations/substr/char/1.cc:
7695 Likewise.
7696 * unittests/basic_string_view/operators/char/2.cc: Likewise.
7697 * unittests/string_view-selftests.c: New file.
7698
7699 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7700
7701 * unittests/basic_string_view/capacity/1.cc: New file.
7702 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
7703 * unittests/basic_string_view/cons/char/1.cc: New file.
7704 * unittests/basic_string_view/cons/char/2.cc: New file.
7705 * unittests/basic_string_view/cons/char/3.cc: New file.
7706 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
7707 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
7708 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
7709 * unittests/basic_string_view/element_access/char/1.cc: New file.
7710 * unittests/basic_string_view/element_access/char/2.cc: New file.
7711 * unittests/basic_string_view/element_access/char/empty.cc: New file.
7712 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
7713 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
7714 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
7715 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
7716 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
7717 * unittests/basic_string_view/include.cc: New file.
7718 * unittests/basic_string_view/inserters/char/1.cc: New file.
7719 * unittests/basic_string_view/inserters/char/2.cc: New file.
7720 * unittests/basic_string_view/inserters/char/3.cc: New file.
7721 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
7722 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
7723 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
7724 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
7725 * unittests/basic_string_view/literals/types.cc: New file.
7726 * unittests/basic_string_view/literals/values.cc: New file.
7727 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
7728 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
7729 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
7730 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
7731 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
7732 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
7733 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
7734 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
7735 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
7736 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
7737 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
7738 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
7739 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
7740 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
7741 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
7742 * unittests/basic_string_view/operations/data/char/1.cc: New file.
7743 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
7744 * unittests/basic_string_view/operations/find/char/1.cc: New file.
7745 * unittests/basic_string_view/operations/find/char/2.cc: New file.
7746 * unittests/basic_string_view/operations/find/char/3.cc: New file.
7747 * unittests/basic_string_view/operations/find/char/4.cc: New file.
7748 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
7749 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
7750 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
7751 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
7752 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
7753 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
7754 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
7755 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
7756 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
7757 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
7758 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
7759 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
7760 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
7761 * unittests/basic_string_view/operators/char/2.cc: New file.
7762 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
7763 * unittests/basic_string_view/range_access/char/1.cc: New file.
7764 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
7765 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
7766 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
7767 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
7768 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
7769 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
7770 * unittests/basic_string_view/requirements/typedefs.cc: New file.
7771 * unittests/basic_string_view/typedefs.cc: New file.
7772 * unittests/basic_string_view/types/1.cc: New file.
7773
7774 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7775
7776 * common/gdb_string_view.h: Remove libstdc++ implementation
7777 details, adjust to gdb reality.
7778 * common/gdb_string_view.tcc: Likewise.
7779 * cli/cli-script.c (struct string_view): Remove.
7780 (user_args) <m_args>: Change element type to gdb::string_view.
7781 (user_args::insert_args): Adjust.
7782
7783 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7784
7785 * common/gdb_string_view.h: New file.
7786 * common/gdb_string_view.tcc: New file.
7787
7788 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7789
7790 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
7791 * configure: Re-generate.
7792
7793 2018-04-09 Pedro Alves <palves@redhat.com>
7794
7795 * gdbarch.sh: Include "observable.h" instead of "observer.h".
7796 (set_target_gdbarch): Call
7797 gdb::observers::architecture_changed.notify instead of
7798 observer_notify_architecture_changed.
7799
7800 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7801
7802 * tracepoint.c (struct current_traceframe_cleanup): Remove.
7803 (do_restore_current_traceframe_cleanup): Remove.
7804 (restore_current_traceframe_cleanup_dtor): Remove.
7805 (make_cleanup_restore_current_traceframe): Remove.
7806 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
7807 New.
7808 * tracepoint.h (struct scoped_restore_current_traceframe): New.
7809 * infrun.c (fetch_inferior_event): Use
7810 scoped_restore_current_traceframe.
7811
7812 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7813
7814 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
7815 Remove.
7816 <n_allocated_type_units>: Remove.
7817 <all_type_units>: Change to std::vector.
7818 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7819 to std::vector change.
7820 (dwarf2_per_objfile::get_cutu): Likewise.
7821 (dwarf2_per_objfile::get_tu): Likewise.
7822 (create_signatured_type_table_from_index): Likewise.
7823 (create_signatured_type_table_from_debug_names): Likewise.
7824 (dw2_symtab_iter_next): Likewise.
7825 (dw2_print_stats): Likewise.
7826 (dw2_expand_all_symtabs): Likewise.
7827 (dw2_expand_marked_cus): Likewise.
7828 (dw2_debug_names_iterator::next): Likewise.
7829 (dwarf2_initialize_objfile): Likewise.
7830 (add_signatured_type_cu_to_table): Likewise.
7831 (create_all_type_units): Likewise.
7832 (add_type_unit): Likewise.
7833 (struct tu_abbrev_offset): Add constructor.
7834 (build_type_psymtabs_1): Adjust to std::vector change.
7835 (print_tu_stats): Likewise.
7836 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7837 (write_debug_names): Likewise.
7838
7839 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7840
7841 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
7842 Make an std::vector.
7843 <n_comp_units>: Remove.
7844 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7845 to std::vector change.
7846 (dwarf2_per_objfile::get_cutu): Likewise.
7847 (dwarf2_per_objfile::get_cu): Likewise.
7848 (create_cus_from_index): Likewise.
7849 (create_addrmap_from_index): Likewise.
7850 (create_addrmap_from_aranges): Likewise.
7851 (dwarf2_read_index): Likewise.
7852 (dw2_find_last_source_symtab): Likewise.
7853 (dw2_map_symtabs_matching_filename): Likewise.
7854 (dw2_symtab_iter_next): Likewise.
7855 (dw2_print_stats): Likewise.
7856 (dw2_expand_all_symtabs): Likewise.
7857 (dw2_expand_symtabs_with_fullname): Likewise.
7858 (dw2_expand_marked_cus): Likewise.
7859 (dw2_map_symbol_filenames): Likewise.
7860 (create_cus_from_debug_names): Likewise.
7861 (dwarf2_read_debug_names): Likewise.
7862 (dw2_debug_names_iterator::next): Likewise.
7863 (dwarf2_initialize_objfile): Likewise.
7864 (set_partial_user): Likewise.
7865 (dwarf2_build_psymtabs_hard): Likewise.
7866 (read_comp_units_from_section): Remove arguments, adjust to
7867 std::vector change.
7868 (create_all_comp_units): Adjust to std::vector and
7869 read_comp_units_from_section changes.
7870 (dwarf2_find_containing_comp_unit): Adjust to std::vector
7871 change.
7872 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7873 (psyms_seen_size): Likewise.
7874 (write_gdbindex): Likewise.
7875 (write_debug_names): Likewise.
7876
7877 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7878
7879 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
7880 with dwarf2_per_objfile.
7881 (create_cus_from_index): Likewise.
7882 (create_signatured_type_table_from_index): Likewise.
7883 (dwarf2_read_index): Likewise.
7884 (dwarf2_initialize_objfile): Likewise.
7885 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
7886 per_cu rather than get_dwarf2_per_objfile.
7887
7888 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7889
7890 * dwarf2read.h (struct signatured_type): Forward declare.
7891 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
7892 New methods.
7893 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
7894 (dw2_get_cutu): ...this.
7895 (dwarf2_per_objfile::get_cu): Rename from...
7896 (dw2_get_cu): ...this.
7897 (dwarf2_per_objfile::get_tu): New.
7898 (create_addrmap_from_index): Adjust.
7899 (create_addrmap_from_aranges): Adjust.
7900 (dw2_find_last_source_symtab): Adjust.
7901 (dw2_map_symtabs_matching_filename): Adjust.
7902 (dw2_symtab_iter_next): Adjust.
7903 (dw2_print_stats): Adjust.
7904 (dw2_expand_all_symtabs): Adjust.
7905 (dw2_expand_symtabs_with_fullname): Adjust.
7906 (dw2_expand_marked_cus): Adjust.
7907 (dw_expand_symtabs_matching_file_matcher): Adjust.
7908 (dw2_map_symbol_filenames): Adjust.
7909 (dw2_debug_names_iterator::next): Adjust.
7910 (dwarf2_initialize_objfile): Adjust.
7911 (set_partial_user): Adjust.
7912 (dwarf2_build_psymtabs_hard): Adjust.
7913
7914 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7915
7916 * dwarf2read.c (create_signatured_type_table_from_debug_names):
7917 Remove unused variables.
7918 (dw2_map_symtabs_matching_filename): Likewise.
7919 (dwarf2_record_block_ranges): Likewise.
7920 (dwarf2_read_addr_index): Likewise.
7921 (follow_die_offset): Likewise.
7922
7923 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7924
7925 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
7926 to symbol_file_add_main.
7927
7928 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7929
7930 PR mi/22299
7931 * mi/mi-console.c (do_fputc_async_safe): New.
7932 (mi_console_file::write_async_safe): New.
7933 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
7934 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
7935 New.
7936 * ui-file.c (ui_file::putstrn): Adjust call to
7937 fputstrn_unfiltered.
7938 * utils.c (printchar): Replace do_fputs and do_fprintf
7939 parameters by do_fputc.
7940 (fputstr_filtered): Adjust call to printchar.
7941 (fputstr_unfiltered): Likewise.
7942 (fputstrn_filtered): Likewise.
7943 (fputstrn_unfiltered): Add do_fputc parameter, pass to
7944 printchar.
7945 * utils.h (do_fputc_ftype): New typedef.
7946 (fputstrn_unfiltered): Add do_fputc parameter.
7947
7948 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7949
7950 * regformats/i386/i386-avx.dat: Remove.
7951
7952 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7953
7954 PR gdb/22979
7955 * amd64-tdep.c (amd64_none_init_abi): New function.
7956 (amd64_x32_none_init_abi): New function.
7957 (_initialize_amd64_tdep): Register handlers for x86-64 and
7958 x64_32 with GDB_OSABI_NONE.
7959 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
7960 GDB_OSABI_NONE osabi.
7961
7962 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7963
7964 PR gdb/22980
7965 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
7966 GDB_OSABI_NONE.
7967 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
7968 * osabi.c (gdb_osabi_names): Add "unknown" entry.
7969
7970 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7971
7972 * common/byte-vector.h (char_vector): New type.
7973 * target.h (target_read_alloc): Return
7974 gdb::optional<byte_vector>.
7975 (target_read_stralloc): Return gdb::optional<char_vector>.
7976 (target_get_osdata): Return gdb::optional<char_vector>.
7977 * target.c (target_read_alloc_1): Templatize. Replacement
7978 manual memory management with vector.
7979 (target_read_alloc): Change return type, adjust.
7980 (target_read_stralloc): Change return type, adjust.
7981 (target_get_osdata): Change return type, adjust.
7982 * auxv.c (struct auxv_info) <length>: Remove.
7983 <data>: Change type to gdb::optional<byte_vector>.
7984 (auxv_inferior_data_cleanup): Free auxv_info with delete.
7985 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
7986 (target_auxv_search): Adjust.
7987 (fprint_target_auxv): Adjust.
7988 * avr-tdep.c (avr_io_reg_read_command): Adjust.
7989 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
7990 (linux_make_corefile_notes): Adjust.
7991 * osdata.c (get_osdata): Adjust.
7992 * remote.c (remote_get_threads_with_qxfer): Adjust.
7993 (remote_memory_map): Adjust.
7994 (remote_traceframe_info): Adjust.
7995 (btrace_read_config): Adjust.
7996 (remote_read_btrace): Adjust.
7997 (remote_pid_to_exec_file): Adjust.
7998 * solib-aix.c (solib_aix_get_library_list): Adjust.
7999 * solib-dsbt.c (decode_loadmap): Don't free buf.
8000 (dsbt_get_initial_loadmaps): Adjust.
8001 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
8002 * solib-target.c (solib_target_current_sos): Adjust.
8003 * tracepoint.c (sdata_make_value): Adjust.
8004 * xml-support.c (xinclude_start_include): Adjust.
8005 (xml_fetch_content_from_file): Adjust.
8006 * xml-support.h (xml_fetch_another): Change return type.
8007 (xml_fetch_content_from_file): Change return type.
8008 * xml-syscall.c (xml_init_syscalls_info): Adjust.
8009 * xml-tdesc.c (file_read_description_xml): Adjust.
8010 (fetch_available_features_from_target): Change return type.
8011 (target_fetch_description_xml): Adjust.
8012 (target_read_description_xml): Adjust.
8013
8014 2018-04-06 Tom Tromey <tom@tromey.com>
8015
8016 * value.c (~value): Update.
8017 (struct value) <contents>: Now unique_xmalloc_ptr.
8018 (value_contents_bits_eq, allocate_value_contents)
8019 (value_contents_raw, value_contents_all_raw)
8020 (value_contents_for_printing, value_contents_for_printing_const)
8021 (set_value_enclosing_type): Update.
8022
8023 2018-04-06 Tom Tromey <tom@tromey.com>
8024
8025 * value.c (range_s): Remove typedef, VEC.
8026 (struct range): Add operator<.
8027 (range_lessthan): Remove.
8028 (ranges_contain): Change type.
8029 (~value): Update.
8030 (struct value) <unavailable, optimized_out>: Now std::vector.
8031 (value_entirely_available)
8032 (value_entirely_covered_by_range_vector)
8033 (value_entirely_unavailable, value_entirely_optimized_out):
8034 Update.
8035 (insert_into_bit_range_vector): Change argument type.
8036 (find_first_range_overlap): Likewise.
8037 (struct ranges_and_idx, value_contents_bits_eq)
8038 (require_not_optimized_out, require_available): Update.
8039 (ranges_copy_adjusted): Change argument types.
8040 (value_optimized_out, value_copy, value_fetch_lazy): Update.
8041
8042 2018-04-06 Tom Tromey <tom@tromey.com>
8043
8044 * value.c (~value): Update.
8045 (struct value) <parent>: Now a value_ref_ptr.
8046 (value_parent, set_value_parent, value_address, value_copy):
8047 Update.
8048
8049 2018-04-06 Tom Tromey <tom@tromey.com>
8050
8051 * value.c (struct value): Add constructor, destructor, and member
8052 initializers.
8053 (allocate_value_lazy, value_decref): Update.
8054
8055 2018-04-06 Tom Tromey <tom@tromey.com>
8056
8057 * value.c (struct value) <released, next>: Remove.
8058 (all_values): Now a std::vector.
8059 (allocate_value_lazy): Update.
8060 (value_next): Remove.
8061 (value_mark, value_free_to_mark, release_value)
8062 (value_release_to_mark): Update.
8063
8064 2018-04-06 Tom Tromey <tom@tromey.com>
8065
8066 * value.h (fetch_subexp_value, value_release_to_mark): Update.
8067 (free_value_chain): Remove.
8068 * value.c (free_value_chain): Remove.
8069 (value_release_to_mark): Return a std::vector.
8070 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
8071 std::vector.
8072 (check_condition): Update.
8073 * eval.c (fetch_subexp_value): Change "val_chain" to a
8074 std::vector.
8075 * breakpoint.c (update_watchpoint): Update.
8076 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
8077
8078 2018-04-06 Tom Tromey <tom@tromey.com>
8079
8080 * value.h (free_all_values): Remove.
8081 * value.c (free_all_values): Remove.
8082
8083 2018-04-06 Tom Tromey <tom@tromey.com>
8084
8085 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
8086 (value_history_chain, value_history_count): Remove.
8087 (value_history): New global.
8088 (record_latest_value, access_value_history, show_values)
8089 (preserve_values): Update.
8090
8091 2018-04-06 Tom Tromey <tom@tromey.com>
8092
8093 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
8094 * varobj.c (varobj_set_display_format, varobj_set_value)
8095 (install_default_visualizer, construct_visualizer)
8096 (install_new_value, ~varobj, varobj_get_value_type)
8097 (my_value_of_variable, varobj_editable_p): Update.
8098 * c-varobj.c (c_describe_child, c_value_of_variable)
8099 (cplus_number_of_children, cplus_describe_child): Update.
8100 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
8101 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
8102 (ada_value_of_variable, ada_value_is_changeable_p): Update.
8103
8104 2018-04-06 Tom Tromey <tom@tromey.com>
8105
8106 * printcmd.c (last_examine_address): Change type to
8107 value_ref_ptr.
8108 (do_examine, x_command): Update.
8109
8110 2018-04-06 Tom Tromey <tom@tromey.com>
8111
8112 * value.c (release_value): Update.
8113 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
8114 (struct bpstats) <val>: Now a value_ref_ptr.
8115 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8116 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8117 (~watchpoint, print_it_watchpoint, watch_command_1)
8118 (invalidate_bp_value_on_memory_change): Update.
8119
8120 2018-04-06 Tom Tromey <tom@tromey.com>
8121
8122 * varobj.c (varobj_clear_saved_item)
8123 (update_dynamic_varobj_children, install_new_value, ~varobj):
8124 Update.
8125 * value.h (value_incref): Move declaration earlier.
8126 (value_decref): Rename from value_free.
8127 (struct value_ref_policy): New.
8128 (value_ref_ptr): New typedef.
8129 (struct value_deleter): Remove.
8130 (gdb_value_up): Remove typedef.
8131 (release_value): Change return type.
8132 (release_value_or_incref): Remove.
8133 * value.c (set_value_parent): Update.
8134 (value_incref): Change return type.
8135 (value_decref): Rename from value_free.
8136 (value_free_to_mark, free_all_values, free_value_chain): Update.
8137 (release_value): Return value_ref_ptr.
8138 (release_value_or_incref): Remove.
8139 (record_latest_value, set_internalvar, clear_internalvar):
8140 Update.
8141 * stack.c (info_frame_command): Don't call value_free.
8142 * python/py-value.c (valpy_dealloc, valpy_new)
8143 (value_to_value_object): Update.
8144 * printcmd.c (do_examine): Update.
8145 * opencl-lang.c (lval_func_free_closure): Update.
8146 * mi/mi-main.c (register_changed_p): Don't call value_free.
8147 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
8148 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
8149 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
8150 value_free.
8151 * guile/scm-value.c (vlscm_free_value_smob)
8152 (vlscm_scm_from_value): Update.
8153 * frame.c (frame_register_unwind, frame_unwind_register_signed)
8154 (frame_unwind_register_unsigned, get_frame_register_bytes)
8155 (put_frame_register_bytes): Don't call value_free.
8156 * findvar.c (address_from_register): Don't call value_free.
8157 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
8158 * dwarf2loc.c (entry_data_value_free_closure)
8159 (value_of_dwarf_reg_entry, free_pieced_value_closure)
8160 (dwarf2_evaluate_loc_desc_full): Update.
8161 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8162 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8163 (~watchpoint, watch_command_1)
8164 (invalidate_bp_value_on_memory_change): Update.
8165 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
8166
8167 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
8168
8169 PR gdb/23022
8170 * warning.m4: Add -Wno-error=deprecated-register.
8171 * configure: Re-generate.
8172
8173 2018-04-05 Tom Tromey <tom@tromey.com>
8174
8175 * linespec.h: Remove include of "vec.h".
8176
8177 2018-04-05 Tom Tromey <tom@tromey.com>
8178
8179 * linespec.c (typep): Remove typedef.
8180 (find_methods, find_superclass_methods): Take a std::vector.
8181 (find_method): Use std::vector.
8182
8183 2018-04-05 Tom Tromey <tom@tromey.com>
8184
8185 * utils.c (compare_strings): Remove.
8186 * utils.h (compare_strings): Remove.
8187 * objc-lang.h (find_imps): Update.
8188 * objc-lang.c (find_methods): Take a std::vector.
8189 (uniquify_strings, find_imps): Likewise.
8190 * linespec.c (find_methods): Take a std::vector.
8191 (decode_objc): Use std::vector.
8192 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
8193 a std::vector.
8194 (find_method, find_function_symbols): Use std::vector.
8195
8196 2018-04-05 Tom Tromey <tom@tromey.com>
8197
8198 * completer.c (completion_tracker::completion_tracker): Remove
8199 cast.
8200 (completion_tracker::discard_completions): Likewise.
8201 * breakpoint.c (ambiguous_names_p): Remove cast.
8202 * ada-lang.c (_initialize_ada_language): Remove cast.
8203 * utils.h (streq): Update.
8204 (streq_hash): Add new declaration.
8205 * utils.c (streq): Return bool.
8206 (streq_hash): New function.
8207
8208 2018-04-05 Tom Tromey <tom@tromey.com>
8209
8210 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
8211 Remove a string copy.
8212
8213 2018-04-05 Tom Tromey <tom@tromey.com>
8214
8215 * linespec.c (filter_results): Use std::vector.
8216 (decode_line_2, decode_line_full): Update.
8217
8218 2018-04-05 Tom Tromey <tom@tromey.com>
8219
8220 * linespec.c (canonical_to_fullform): Return std::string.
8221 (filter_results): Update.
8222 (struct decode_line_2_item): Add constructor.
8223 <fullform, displayform>: Now std::string.
8224 (decode_line_2_compare_items): Now a std::sort comparator.
8225 (decode_line_2): Update.
8226
8227 2018-04-05 Tom Tromey <tom@tromey.com>
8228
8229 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
8230 (unexpected_linespec_error): Update.
8231 (linespec_parse_basic, parse_linespec): Update.
8232
8233 2018-04-05 Tom Tromey <tom@tromey.com>
8234
8235 * linespec.c (linespec_parse_basic): Reindent.
8236
8237 2018-04-05 Tom Tromey <tom@tromey.com>
8238
8239 * minsyms.h (iterate_over_minimal_symbols): Update.
8240 * minsyms.c (iterate_over_minimal_symbols): Take a
8241 gdb::function_view.
8242 * linespec.c (struct collect_minsyms): Remove.
8243 (compare_msyms): Now a std::sort comparator.
8244 (add_minsym): Add parameters.
8245 (search_minsyms_for_name): Update. Use std::vector.
8246
8247 2018-04-03 Tom Tromey <tom@tromey.com>
8248
8249 * mipsread.c (read_alphacoff_dynamic_symtab): Use
8250 gdb::byte_vector.
8251
8252 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
8253
8254 * MAINTAINERS (Write After Approval): Add Weimin Pan.
8255
8256 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
8257
8258 PR gdb/16959
8259 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
8260 printing static type.
8261
8262 2018-04-01 Tom Tromey <tom@tromey.com>
8263
8264 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
8265 (rs6000_xfer_shared_libraries): Update.
8266
8267 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
8268
8269 * common/gdb_vecs.h (char_ptr): Remove.
8270 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
8271
8272 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
8273
8274 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
8275 with std::vector.
8276 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
8277
8278 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
8279
8280 * tracepoint.h (struct uploaded_tp): Initialize fields.
8281 <actions, step_actions, cmd_strings>: Change type to
8282 std::vector<char *>.
8283 * tracepoint.c (get_uploaded_tp): Allocate with new.
8284 (free_uploaded_tps): Free with delete.
8285 (parse_tracepoint_definition): Adjust to std::vector change.
8286 * breakpoint.c (read_uploaded_action): Likewise.
8287 (create_tracepoint_from_upload): Likewise.
8288 * ctf.c (ctf_write_uploaded_tp): Likewise.
8289 (SET_ARRAY_FIELD): Likewise.
8290 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
8291
8292 2018-03-30 Tom Tromey <tom@tromey.com>
8293
8294 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
8295 std::unique_ptr.
8296 (svr4_keep_data_in_core): Update.
8297 (svr4_read_so_list): Update.
8298
8299 2018-03-30 Tom Tromey <tom@tromey.com>
8300
8301 * windows-nat.c (handle_output_debug_string, handle_exception):
8302 Update.
8303 * target.h (target_read_string): Update.
8304 * target.c (target_read_string): Change "string" to
8305 unique_xmalloc_ptr.
8306 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
8307 Update.
8308 * solib-frv.c (frv_current_sos): Update.
8309 * solib-dsbt.c (dsbt_current_sos): Update.
8310 * solib-darwin.c (darwin_current_sos): Update.
8311 * linux-thread-db.c (inferior_has_bug): Update.
8312 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
8313 Update. Remove alloca.
8314 * ada-lang.c (ada_main_name): Update.
8315
8316 2018-03-30 Tom Tromey <tom@tromey.com>
8317
8318 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
8319 (struct dwo_file_deleter): New.
8320 (dwo_file_up): New typedef.
8321 (open_and_init_dwo_file): Use dwo_file_up.
8322 (free_dwo_file_cleanup): Remove.
8323
8324 2018-03-30 Tom Tromey <tom@tromey.com>
8325
8326 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
8327 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
8328
8329 2018-03-30 Tom Tromey <tom@tromey.com>
8330
8331 * dwarf2read.c (class free_cached_comp_units): New class.
8332 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
8333 (free_cached_comp_units): Remove function.
8334
8335 2018-03-30 Tom Tromey <tom@tromey.com>
8336
8337 * utils.h (make_cleanup_unpush_target): Remove.
8338 * inf-ptrace.c (struct target_unpusher): New.
8339 (target_unpush_up) New typedef.
8340 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
8341 target_unpush_up.
8342 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
8343
8344 2018-03-27 Tom Tromey <tom@tromey.com>
8345
8346 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
8347
8348 2018-03-27 Pedro Alves <palves@redhat.com>
8349 Tom Tromey <tom@tromey.com>
8350
8351 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
8352 destructor. Now a class.
8353 (gdb_readline_wrapper_cleanup): Remove function.
8354 (gdb_readline_wrapper): Remove cleanups.
8355
8356 2018-03-27 Tom Tromey <tom@tromey.com>
8357
8358 * typeprint.h (struct type_print_options) <local_typedefs,
8359 global_typedefs>: Remove "struct" keyword.
8360 (class typedef_hash_table): New class.
8361 (recursively_update_typedef_hash, add_template_parameters)
8362 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
8363 (find_typedef_in_hash): Don't declare.
8364 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
8365 (typedef_hash_table::recursively_update): Rename from
8366 recursively_update_typedef_hash. Now a member.
8367 (typedef_hash_table::add_template_parameters): Rename from
8368 add_template_parameters. Now a member.
8369 (typedef_hash_table::typedef_hash_table): Now a constructor;
8370 rename from create_typedef_hash.
8371 (typedef_hash_table::~typedef_hash_table): Now a destructor;
8372 rename from free_typedef_hash.
8373 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
8374 (do_free_global_table): Remove.
8375 (typedef_hash_table::typedef_hash_table): New constructor; renamed
8376 from copy_type_recursive.
8377 (create_global_typedef_table): Remove.
8378 (typedef_hash_table::find_global_typedef): Now a member of
8379 typedef_hash_table.
8380 (typedef_hash_table::find_typedef): Rename from
8381 find_typedef_in_hash; now a member.
8382 (whatis_exp): Update.
8383 * extension.h (struct ext_lang_type_printers): Add constructor and
8384 destructor.
8385 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
8386 declare.
8387 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
8388 Now a constructor; rename from start_ext_lang_type_printers.
8389 (ext_lang_type_printers): Now a destructor; rename from
8390 free_ext_lang_type_printers.
8391 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
8392 Update.
8393 (c_type_print_base_struct_union): Update. Remove cleanups.
8394
8395 2018-03-27 Tom Tromey <tom@tromey.com>
8396
8397 * dwarf-index-write.c: Include <cmath>.
8398
8399 2018-03-27 Joel Brobecker <brobecker@adacore.com>
8400
8401 * NEWS: Add entry describing new "set|show varsize-limit" command.
8402 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
8403 command.
8404 * printcmd.c (_initialize_printcmd): Add "set var" alias of
8405 "set variable".
8406
8407 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
8408
8409 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
8410 dwarf-index-write.c
8411 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
8412 * dwarf-index-common.c: New file.
8413 * dwarf-index-common.h: New file.
8414 * dwarf-index-write.c: New file.
8415 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
8416 (struct dwarf2_section_info): Move from here.
8417 (dwarf2_section_info_def): Likewise.
8418 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
8419 (offset_type): Likewise.
8420 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
8421 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
8422 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
8423 (byte_swap): Likewise.
8424 (MAYBE_SWAP): Likewise.
8425 (dwarf2_per_cu_ptr): Likewise.
8426 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
8427 (struct tu_stats): Likewise.
8428 (struct dwarf2_per_objfile): Likewise.
8429 (struct dwarf2_per_cu_data): Likewise.
8430 (struct signatured_type): Likewise.
8431 (sig_type_ptr): Likewise.
8432 (DEF_VEC_P (sig_type_ptr)): Likewise.
8433 (INDEX4_SUFFIX): Likewise.
8434 (INDEX5_SUFFIX): Likewise.
8435 (DEBUG_STR_SUFFIX): Likewise.
8436 (dwarf2_read_section): Make non-static.
8437 (mapped_index_string_hash): Move from here.
8438 (dwarf5_djb_hash): Likewise.
8439 (file_write): Likewise.
8440 (class data_buf): Likewise.
8441 (struct symtab_index_entry): Likewise.
8442 (struct mapped_symtab): Likewise.
8443 (find_slot): Likewise.
8444 (hash_expand): Likewise.
8445 (add_index_entry): Likewise.
8446 (uniquify_cu_indices): Likewise.
8447 (class c_str_view): Likewise.
8448 (class c_str_view_hasher): Likewise.
8449 (class vector_hasher): Likewise.
8450 (write_hash_table): Likewise.
8451 (psym_index_map): Likewise.
8452 (struct addrmap_index_data): Likewise.
8453 (add_address_entry): Likewise.
8454 (add_address_entry_worker): Likewise.
8455 (write_address_map): Likewise.
8456 (symbol_kind): Likewise.
8457 (write_psymbols): Likewise.
8458 (struct signatured_type_index_data): Likewise.
8459 (write_one_signatured_type): Likewise.
8460 (recursively_count_psymbols): Likewise.
8461 (recursively_write_psymbols): Likewise.
8462 (class debug_names): Likewise.
8463 (check_dwarf64_offsets): Likewise.
8464 (psyms_seen_size): Likewise.
8465 (write_gdbindex): Likewise.
8466 (write_debug_names): Likewise.
8467 (assert_file_size): Likewise.
8468 (write_psymtabs_to_index): Likewise.
8469 (save_gdb_index_command): Likewise.
8470 (_initialize_dwarf2_read): Don't register the "save gdb-index"
8471 command.
8472 * dwarf2read.h: New file.
8473
8474 2018-03-27 Joel Brobecker <brobecker@adacore.com>
8475
8476 PR gdb/22670
8477 * dwarf2read.c (dwarf2_physname): Do not return the demangled
8478 symbol name if the CU's language stores symbol names in linkage
8479 format.
8480 * language.h (struct language_defn)
8481 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
8482 all instances of this struct.
8483
8484 2018-03-26 Tom Tromey <tom@tromey.com>
8485
8486 * stack.c (backtrace_command_1): Remove verbose code.
8487
8488 2018-03-26 Tom Tromey <tom@tromey.com>
8489
8490 * python/py-framefilter.c (py_print_type): Don't catch
8491 exceptions. Return void.
8492 (py_print_value): Likewise.
8493 (py_print_single_arg): Likewise.
8494 (enumerate_args): Don't catch exceptions.
8495 (py_print_args): Likewise.
8496 (py_print_frame): Likewise.
8497 (gdbpy_apply_frame_filter): Catch exceptions here.
8498
8499 2018-03-26 Tom Tromey <tom@tromey.com>
8500
8501 * stack.c (_initialize_stack): Remove trailing newlines from help
8502 text. Add "Usage" line to "backtrace" help.
8503
8504 2018-03-26 Tom Tromey <tom@tromey.com>
8505
8506 PR python/16486:
8507 * python/py-framefilter.c (py_print_args): Call wrap_hint.
8508
8509 2018-03-26 Tom Tromey <tom@tromey.com>
8510
8511 * python/py-framefilter.c (py_print_single_arg): Return
8512 EXT_LANG_BT_ERROR from catch.
8513
8514 2018-03-26 Tom Tromey <tom@tromey.com>
8515
8516 PR backtrace/15584:
8517 * stack.c (backtrace_command_1): Move some code into no-filters
8518 "if".
8519
8520 2018-03-26 Tom Tromey <tom@tromey.com>
8521
8522 * python/py-framefilter.c (throw_quit_or_print_exception): New
8523 function.
8524 (gdbpy_apply_frame_filter): Use it.
8525
8526 2018-03-26 Tom Tromey <tom@tromey.com>
8527
8528 PR cli/17716:
8529 * python/py-framefilter.c (py_print_type, py_print_value)
8530 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
8531 RETURN_MASK_ERROR.
8532
8533 2018-03-26 Tom Tromey <tom@tromey.com>
8534
8535 * python/py-framefilter.c (enumerate_args): Use
8536 gdb::unique_xmalloc_ptr.
8537
8538 2018-03-26 Tom Tromey <tom@tromey.com>
8539
8540 * python/py-framefilter.c (py_print_frame): Return
8541 EXT_LANG_BT_OK.
8542 (gdbpy_apply_frame_filter): Update comment.
8543 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
8544 Remove.
8545 <EXT_LANG_BT_NO_FILTERS>: Change value.
8546
8547 2018-03-26 Tom Tromey <tom@tromey.com>
8548
8549 PR backtrace/15582:
8550 * stack.c (backtrace_command): Parse "hide" argument.
8551 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
8552 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
8553 constant.
8554
8555 2018-03-26 Tom Tromey <tom@tromey.com>
8556
8557 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
8558 add "flags".
8559 (backtrace_command): Remove "fulltrace", add "flags".
8560
8561 2018-03-26 Tom Tromey <tom@tromey.com>
8562
8563 * stack.c (backtrace_command): Rewrite command line parsing.
8564
8565 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
8566
8567 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
8568
8569 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
8570
8571 * filename-seen-cache.h: Add include guard.
8572
8573 2018-03-26 Keith Seitz <keiths@redhat.com>
8574
8575 * symfile.c (place_section): Remove "struct" from section_addr_info
8576 in comment.
8577 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
8578 "struct" keyword from section_addr_info.
8579
8580 2018-03-26 Alan Hayward <alan.hayward@arm.com>
8581
8582 * regformats/regdef.h (reg): Add constructors.
8583
8584 2018-03-25 Pedro Alves <palves@redhat.com>
8585
8586 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
8587 if then/else bodies in var_func_name extraction.
8588
8589 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
8590
8591 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
8592 lookup_minimal_symbol() to find symbol entry.
8593 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
8594
8595 2018-03-23 Keith Seitz <keiths@redhat.com>
8596
8597 PR c++/22968
8598 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
8599 nested type definitions for C++, too.
8600
8601 2018-03-23 Tom Tromey <tom@tromey.com>
8602
8603 * machoread.c (struct oso_el): Add a constructor. Don't define as
8604 a typedef.
8605 (macho_register_oso): Remove.
8606 (macho_symtab_read): Take a std::vector.
8607 (oso_el_compare_name): Now a std::sort comparator.
8608 (macho_symfile_read_all_oso): Take a std::vector.
8609 (macho_symfile_read): Use std::vector. Remove cleanups.
8610
8611 2018-03-22 Tom Tromey <tom@tromey.com>
8612
8613 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
8614 (record_full_goto_bookmark): Use std::string.
8615
8616 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8617
8618 PR tdep/18295
8619 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
8620 a single mask.
8621
8622 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8623
8624 * rs6000-tdep.c (store_insn_p): New function.
8625 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
8626 and cr_reg to their unshifted values. Use store_insn_p to
8627 match LR saves using either R1 or fdata->alloca_reg. Use
8628 store_insn_p to match CR saves. Set alloca_reg_offset
8629 when alloca_reg and framep are set. Remove lr_reg shift
8630 when assigning to fdata->lr_register.
8631
8632 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
8633
8634 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
8635 command line args instead of emitting a warning.
8636
8637 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8638
8639 * tracepoint.h (struct static_tracepoint_marker): Initialize
8640 fields, define default constructor, move constructor and move
8641 assignment, disable the rest.
8642 <str_id, extra>: Make std::string.
8643 (release_static_tracepoint_marker): Remove.
8644 (free_current_marker): Remove.
8645 * tracepoint.c (free_current_marker): Remove.
8646 (parse_static_tracepoint_marker_definition): Adjust to
8647 std::string, use new hex2str overload.
8648 (release_static_tracepoint_marker): Remove.
8649 (print_one_static_tracepoint_marker): Get marker by reference
8650 and adjust to std::string.
8651 (info_static_tracepoint_markers_command): Adjust to std::vector
8652 changes
8653 * target.h (static_tracepoint_marker_p): Remove typedef.
8654 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
8655 (struct target_ops) <to_static_tracepoint_marker_at>: Return
8656 bool.
8657 <to_static_tracepoint_markers_by_strid>: Return std::vector.
8658 * target-debug.h
8659 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
8660 (target_debug_print_std_vector_static_tracepoint_marker): New.
8661 (target_debug_print_struct_static_tracepoint_marker_p): Rename
8662 to...
8663 (target_debug_print_static_tracepoint_marker_p): ... this.
8664 * target-delegates.c: Re-generate.
8665 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
8666 Make std::string.
8667 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
8668 (decode_static_tracepoint_spec): Adjust to std::vector.
8669 (tracepoint_print_one_detail): Adjust to std::string.
8670 (strace_marker_decode_location): Adjust to std::string.
8671 (update_static_tracepoint): Adjust to std::string, remove call
8672 to release_static_tracepoint_marker.
8673 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
8674 Adjust to std::vector.
8675 * remote.c (remote_static_tracepoint_marker_at): Return bool.
8676 (remote_static_tracepoint_markers_by_strid): Adjust to
8677 std::vector.
8678 * common/rsp-low.h (hex2str): New overload with explicit count
8679 of bytes.
8680 * common/rsp-low.c (hex2str): New overload with explicit count
8681 of bytes.
8682 * unittests/rsp-low-selftests.c (test_hex2str): New function.
8683 (_initialize_rsp_low_selftests): Add test_hex2str test.
8684 * unittests/tracepoint-selftests.c
8685 (test_parse_static_tracepoint_marker_definition): Adjust to
8686 std::string.
8687
8688 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8689
8690 * tracepoint.c (parse_static_tracepoint_marker_definition):
8691 Consider case where the definition is followed by more
8692 definitions.
8693 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8694 tracepoint-selftests.c.
8695 * unittests/tracepoint-selftests.c: New.
8696
8697 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8698
8699 * MAINTAINERS (Write After Approval): Add Pedro Franco de
8700 Carvalho.
8701
8702 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
8703
8704 * symtab.c (find_pc_sect_line): fixed indentation.
8705
8706 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
8707
8708 * symtab.c (find_pc_sect_line): now uses binary search.
8709
8710 2018-03-19 Tom Tromey <tom@tromey.com>
8711
8712 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
8713 "IDENT" production.
8714
8715 2018-03-19 Pedro Alves <palves@redhat.com>
8716 Tom Tromey <tom@tromey.com>
8717
8718 * unittests/observable-selftests.c: New file.
8719 * common/observable.h: New file.
8720 * observable.h: New file.
8721 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
8722 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
8723 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
8724 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
8725 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
8726 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
8727 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
8728 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
8729 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
8730 python/py-breakpoint.c, python/py-finishbreakpoint.c,
8731 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
8732 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
8733 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
8734 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
8735 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
8736 tui/tui-interp.c, valops.c: Update all users.
8737 * tui/tui-hooks.c (tui_bp_created_observer)
8738 (tui_bp_deleted_observer, tui_bp_modified_observer)
8739 (tui_inferior_exit_observer, tui_before_prompt_observer)
8740 (tui_normal_stop_observer, tui_register_changed_observer):
8741 Remove.
8742 (tui_observers_token): New global.
8743 (attach_or_detach, tui_attach_detach_observers): New functions.
8744 (tui_install_hooks, tui_remove_hooks): Use
8745 tui_attach_detach_observers.
8746 * record-btrace.c (record_btrace_thread_observer): Remove.
8747 (record_btrace_thread_observer_token): New global.
8748 * observer.sh: Remove.
8749 * observer.c: Rename to observable.c.
8750 * observable.c (namespace gdb_observers): Define new objects.
8751 (observer_debug): Move into gdb_observers namespace.
8752 (struct observer, struct observer_list, xalloc_observer_list_node)
8753 (xfree_observer_list_node, generic_observer_attach)
8754 (generic_observer_detach, generic_observer_notify): Remove.
8755 (_initialize_observer): Update.
8756 Don't include observer.inc.
8757 * Makefile.in (generated_files): Remove observer.h, observer.inc.
8758 (clean mostlyclean): Likewise.
8759 (observer.h, observer.inc): Remove targets.
8760 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
8761 (COMMON_SFILES): Use observable.c, not observer.c.
8762 * .gitignore: Remove observer.h.
8763
8764 2018-03-18 Tom Tromey <tom@tromey.com>
8765
8766 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
8767 gdb::def_vector.
8768 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
8769
8770 2018-03-17 Tom Tromey <tom@tromey.com>
8771
8772 * auto-load.c (auto_load_objfile_script_1): Use std::string.
8773
8774 2018-03-17 Tom Tromey <tom@tromey.com>
8775
8776 * target.c (class scoped_target_fd): New.
8777 (target_fileio_close_cleanup): Remove.
8778 (target_fileio_read_alloc_1): Use scoped_target_fd.
8779
8780 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
8781
8782 * silent-rules.mk: New.
8783 * Makefile.in: Include silent-rules.mk
8784 (srcdir, VPATH, top_srcdir): Move up.
8785 (COMPILE): Add ECHO_CXX.
8786 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
8787 (init.c): Add ECHO_INIT_C.
8788 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
8789 (version.c): Add ECHO_GEN.
8790 (printcmd.o): Add ECHO_CXX.
8791 (target-float.o): Add ECHO_CXX.
8792 (ada-exp.o): Add ECHO_CXX.
8793 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
8794 (insight$(EXEEXT)): Add ECHO_CXXLD.
8795 * gnulib/configure.ac: Add AM_SILENT_RULES.
8796 * gnulib/aclocal.m4: Re-generate.
8797 * gnulib/configure: Re-generate.
8798 * gnulib/import/Makefile.in: Re-generate.
8799
8800 2018-03-16 Tom Tromey <tom@tromey.com>
8801
8802 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
8803 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
8804 * utils.c (do_free_section_addr_info)
8805 (make_cleanup_free_section_addr_info): Remove.
8806 * symfile.h (struct other_sections): Add constructor.
8807 (struct section_addr_info): Remove.
8808 (section_addr_info): New typedef.
8809 (struct sym_fns) <sym_offsets>: Change type of parameter.
8810 (build_section_addr_info_from_objfile)
8811 (relative_addr_info_to_section_offsets, addr_info_make_relative)
8812 (default_symfile_offsets, symbol_file_add)
8813 (symbol_file_add_from_bfd)
8814 (build_section_addr_info_from_section_table): Update.
8815 (alloc_section_addr_info, free_section_addr_info): Don't declare.
8816 * symfile.c (alloc_section_addr_info): Remove.
8817 (build_section_addr_info_from_section_table): Change return type.
8818 Update.
8819 (build_section_addr_info_from_bfd)
8820 (build_section_addr_info_from_objfile): Likewise.
8821 (free_section_addr_info): Remove.
8822 (relative_addr_info_to_section_offsets): Change type of "addrs".
8823 (addrs_section_compar): Now a std::sort comparator.
8824 (addrs_section_sort): Change return type.
8825 (addr_info_make_relative): Change type of "addrs". Update.
8826 (default_symfile_offsets, syms_from_objfile_1)
8827 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
8828 (symbol_file_add_separate): Update.
8829 (symbol_file_add): Change type of "addrs". Update.
8830 (add_symbol_file_command): Update. Remove cleanups.
8831 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
8832 cleanups.
8833 * symfile-debug.c (debug_sym_offsets): Change type of "info".
8834 * solib.c (solib_read_symbols): Update.
8835 * objfiles.c (objfile_relocate): Update. Remove cleanups.
8836 * machoread.c (macho_symfile_offsets): Update.
8837 * jit.c (jit_bfd_try_read_symtab): Update.
8838
8839 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
8840
8841 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8842 unittests/utils-selftests.c.
8843 * unittests/utils-selftests.c: New file.
8844
8845 2018-03-14 Tom Tromey <tom@tromey.com>
8846
8847 PR cli/14977:
8848 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
8849 for NULL.
8850
8851 2018-03-14 Tom Tromey <tom@tromey.com>
8852
8853 PR cli/19918:
8854 * printcmd.c (printf_pointer): Allow "-" in format.
8855
8856 2018-03-14 Tom Tromey <tom@tromey.com>
8857
8858 * printcmd.c (_initialize_printcmd): Add usage to printf.
8859
8860 2018-03-14 Yao Qi <qiyao@sourceware.org>
8861
8862 * MAINTAINERS: Update my email address.
8863
8864 2018-03-13 Tom Tromey <tom@tromey.com>
8865
8866 * machoread.c (macho_check_dsym): Change filenamep to a
8867 std::string*.
8868 (macho_symfile_read): Update.
8869 * symfile.c (load_command): Use std::string.
8870
8871 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
8872
8873 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
8874 to error message string.
8875 (riscv_register_name): Use xsnprintf instead of sprintf.
8876 (riscv_insn::fetch_instruction): Use gdb_assert instead of
8877 internal_error.
8878 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
8879 error.
8880 (riscv_push_dummy_call): Likewise.
8881
8882 2018-03-12 Tom Tromey <tom@tromey.com>
8883
8884 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
8885 Use gdb::byte_vector.
8886 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
8887
8888 2018-03-12 Yao Qi <yao.qi@linaro.org>
8889
8890 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
8891 parameter type to readable_regcache.
8892 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
8893 the declaration.
8894
8895 2018-03-11 Tom Tromey <tom@tromey.com>
8896
8897 * dwarf2read.c (struct nextfield): Add initializers.
8898 (struct nextfnfield): Remove.
8899 (struct fnfieldlist): Add initializers. Remove "length" and
8900 "head", use std::vector.
8901 (struct decl_field_list): Remove.
8902 (struct field_info): Add initializers.
8903 <fields, baseclasses>: Now std::vector.
8904 <nbaseclasses, nfnfields, typedef_field_list_count,
8905 nested_types_list_count>: Remove.
8906 (dwarf2_add_field, dwarf2_add_type_defn)
8907 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
8908 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
8909 (process_structure_scope): Update.
8910
8911 2018-03-11 Tom Tromey <tom@tromey.com>
8912
8913 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
8914 for use by std::sort.
8915 (build_type_psymtabs_1): Use std::vector.
8916
8917 2018-03-09 Eli Zaretskii <eliz@gnu.org>
8918
8919 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
8920 and LIBMPFR in the printed configuration.
8921
8922 2018-03-08 Tom Tromey <tom@tromey.com>
8923
8924 * source.c (get_filename_and_charpos): Use scoped_fd.
8925 * nto-procfs.c (procfs_open_1): Use scoped_fd.
8926 (procfs_pidlist): Likewise.
8927 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
8928 (iterate_over_mappings): Likewise.
8929
8930 2018-03-08 Tom Tromey <tom@tromey.com>
8931
8932 * infcall.c (struct call_return_meta_info)
8933 <stack_temporaries_enabled>: Remove.
8934 (get_call_return_value, call_function_by_hand_dummy): Update.
8935 * thread.c (disable_thread_stack_temporaries): Remove.
8936 (enable_thread_stack_temporaries): Remove.
8937 (thread_stack_temporaries_enabled_p): Return bool.
8938 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
8939 (get_last_thread_stack_temporary): Update.
8940 * eval.c (evaluate_subexp): Update.
8941 * gdbthread.h (class enable_thread_stack_temporaries): Now a
8942 class, not a function.
8943 (value_ptr, value_vec): Remove typedefs.
8944 (class thread_info) <stack_temporaries_enabled>: Now bool.
8945 <stack_temporaries>: Now a std::vector.
8946 (thread_stack_temporaries_enabled_p)
8947 (value_in_thread_stack_temporaries): Return bool.
8948
8949 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
8950
8951 * remote.c (putpkt_binary): Fix omitted bytes reporting.
8952 (getpkt_or_notif_sane_1): Likewise.
8953
8954 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8955
8956 * build-id.c (build_id_to_debug_bfd): Use std::string.
8957
8958 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8959
8960 * build-id.c (find_separate_debug_file_by_buildid): Return
8961 std::string.
8962 * build-id.h (find_separate_debug_file_by_buildid): Return
8963 std::string.
8964 * coffread.c (coff_symfile_read): Adjust to std::string.
8965 * elfread.c (elf_symfile_read): Adjust to std::string.
8966 * symfile.c (separate_debug_file_exists): Change parameter to
8967 std::string.
8968 (find_separate_debug_file): Return std::string.
8969 (find_separate_debug_file_by_debuglink): Return std::string.
8970 * symfile.h (find_separate_debug_file_by_debuglink): Return
8971 std::string.
8972
8973 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8974
8975 * common/xml-utils.c (xml_escape_text): Move code to...
8976 (xml_escape_text_append): ... this new function.
8977 * common/xml-utils.h (xml_escape_text_append): New declaration.
8978 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
8979 New function.
8980 (_initialize_xml_utils): register test_xml_escape_text_append as
8981 a selftest.
8982
8983 2018-03-07 Alan Hayward <alan.hayward@arm.com>
8984
8985 * defs.h: Remove MAX_REGISTER_SIZE.
8986 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
8987 asserts.
8988 * python/py-unwind.c (pyuw_sniffer): Likewise.
8989
8990 2018-03-07 Tom Tromey <tom@tromey.com>
8991
8992 * linux-tdep.c (linux_info_proc): Update.
8993 * target.h (struct target_ops) <to_fileio_readlink>: Return
8994 optional<string>.
8995 (target_fileio_readlink): Return optional<string>.
8996 * remote.c (remote_hostio_readlink): Return optional<string>.
8997 * inf-child.c (inf_child_fileio_readlink): Return
8998 optional<string>.
8999 * target.c (target_fileio_readlink): Return optional<string>.
9000
9001 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
9002
9003 * regcache.c (cooked_read_test): Add riscv to the list of
9004 architectures that have a save_reggroup.
9005
9006 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
9007
9008 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
9009 value is not a dynamic class object.
9010
9011 2018-03-06 Tom Tromey <tom@tromey.com>
9012
9013 * rust-exp.y: Formatting fixes.
9014
9015 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9016
9017 * riscv-tdep.c (riscv_register_name): Remove target description
9018 support.
9019 (riscv_gdbarch_init): Remove target description check.
9020
9021 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9022
9023 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
9024 comment.
9025 * riscv-tdep.h: Likewise.
9026
9027 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9028
9029 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
9030 (riscv_pseudo_register_write): Delete.
9031 (riscv_gdbarch_init): Remove all use of pseudo registers.
9032
9033 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9034
9035 * record-btrace.c (btrace_print_lines): Replace cleanup
9036 parameter with RAII equivalents.
9037 (btrace_insn_history): Replace cleanup with RAII equivalents.
9038 * ui-out.h (make_cleanup_ui_out_list_begin_end,
9039 make_cleanup_ui_out_tuple_begin_end): Remove.
9040 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
9041 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
9042 make_cleanup_ui_out_list_begin_end): Remove.
9043
9044 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9045
9046 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
9047 parameter types to std::vector. Use bool.
9048 (record_btrace_wait): Replace VEC(tp_t) with
9049 std::vector<thread_info *>.
9050 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
9051
9052 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9053
9054 * record-btrace.c (record_btrace_disable_callback): Remove.
9055 (struct scoped_btrace_disable): New.
9056 (record_btrace_open): Use scoped_btrace_disable.
9057
9058 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9059
9060 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
9061 reading values from registers.
9062
9063 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9064
9065 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
9066 where appropriate.
9067
9068 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9069
9070 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
9071 change parameter type. Use GDB's print functions, and use
9072 core_addr_to_string where appropriate.
9073 (riscv_push_dummy_call): Use core_addr_to_string where
9074 appropriate, update call to riscv_print_arg_location, and reindent
9075 a few lines.
9076 (riscv_return_value): Update call to riscv_print_arg_location.
9077
9078 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9079 Tim Newsome <tim@sifive.com>
9080 Albert Ou <a0u@eecs.berkeley.edu>
9081 Darius Rad <darius@bluespec.com>
9082
9083 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
9084 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
9085 (ALLDEPFILES): Add riscv-tdep.c
9086 * configure.tgt: Add riscv support.
9087 * riscv-tdep.c: New file.
9088 * riscv-tdep.h: New file.
9089 * NEWS: Mention new target.
9090 * MAINTAINERS: Add entry for riscv.
9091
9092 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9093
9094 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
9095 fields within aggregates.
9096
9097 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
9098
9099 * record-btrace.c (btrace_print_lines): Change type of flags to
9100 gdb_disassembly_flags.
9101
9102 2018-03-04 John Baldwin <jhb@FreeBSD.org>
9103
9104 * fbsd-nat.c: Include "inf-ptrace.h".
9105 (USE_SIGTRAP_SIGINFO): Conditionally define.
9106 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
9107 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
9108 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
9109 function.
9110 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
9111 Likewise.
9112 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
9113 Likewise.
9114 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
9115 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
9116 "supports_stopped_by_hw_breakpoint" target methods.
9117
9118 2018-03-04 John Baldwin <jhb@FreeBSD.org>
9119
9120 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
9121 * fbsd-nat.c (debug_fbsd_nat): New variable.
9122 (show_fbsd_nat_debug): New function.
9123 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
9124 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
9125
9126 2018-03-04 John Baldwin <jhb@FreeBSD.org>
9127
9128 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
9129 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
9130 prototype.
9131 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
9132 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
9133 method.
9134
9135 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9136
9137 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
9138 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
9139
9140 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9141
9142 * charset.c (struct charset_vector): New.
9143 (charsets): Change type to charset_vector.
9144 (find_charset_names): Adjust.
9145 (add_one): Adjust.
9146 (_initialize_charset): Adjust.
9147
9148 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9149
9150 * progspace.h (struct program_space) <deleted_solibs>: Change
9151 type to std::vector<std::string>.
9152 * progspace.c (clear_program_space_solib_cache): Adjust.
9153 * breakpoint.c (print_solib_event): Adjust.
9154 (check_status_catch_solib): Adjust.
9155 * solib.c (update_solib_list): Adjust.
9156 * ui-out.h (class ui_out) <field_string>: New overload.
9157 * ui-out.c (ui_out::field_string): New overload.
9158
9159 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9160
9161 * progspace.h (struct program_space): Add constructor and
9162 destructor, initialize fields.
9163 (add_program_space): Remove.
9164 * progspace.c (add_program_space): Rename to...
9165 (program_space::program_space): ... this.
9166 (release_program_space): Rename to...
9167 (program_space::~program_space): ... this.
9168 (delete_program_space): Use delete to delete program_space.
9169 (initialize_progspace): Use new to allocate program_space.
9170 * inferior.c (add_inferior_with_spaces): Likewise.
9171 (clone_inferior_command): Likewise.
9172 * infrun.c (follow_fork_inferior): Likewise.
9173 (handle_vfork_child_exec_or_exit): Likewise.
9174
9175 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9176
9177 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
9178 (delim_string_to_char_ptr_vec): Return std::vector of
9179 gdb::unique_xmalloc_ptr.
9180 (dirnames_to_char_ptr_vec_append): Take std::vector of
9181 gdb::unique_xmalloc_ptr.
9182 (dirnames_to_char_ptr_vec): Return std::vector of
9183 gdb::unique_xmalloc_ptr.
9184 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
9185 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
9186 (delim_string_to_char_ptr_vec): Return an std::vector of
9187 gdb::unique_xmalloc_ptr, adjust the code.
9188 (dirnames_to_char_ptr_vec_append): Take an std::vector of
9189 gdb::unique_xmalloc_ptr, adjust the code.
9190 (dirnames_to_char_ptr_vec): Return an std::vector of
9191 gdb::unique_xmalloc_ptr, adjust the code.
9192 * auto-load.c (auto_load_safe_path_vec): Change type to
9193 std::vector of gdb::unique_xmalloc_ptr.
9194 (auto_load_expand_dir_vars): Return an std::vector of
9195 gdb::unique_xmalloc_ptr, adjust the code.
9196 (auto_load_safe_path_vec_update): Adjust.
9197 (filename_is_in_auto_load_safe_path_vec): Adjust.
9198 (auto_load_objfile_script_1): Adjust.
9199 * build-id.c (build_id_to_debug_bfd): Adjust.
9200 * linux-thread-db.c (thread_db_load_search): Adjust.
9201 * source.c (add_path): Adjust.
9202 (openp): Adjust.
9203 * symfile.c (find_separate_debug_file): Adjust.
9204 * utils.c (do_free_char_ptr_vec): Remove.
9205 (make_cleanup_free_char_ptr_vec): Remove.
9206
9207 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
9208
9209 PR gdb/22907
9210 * common/pathstuff.c: Conditionally include "<windows.h>".
9211
9212 2018-03-01 Georg Sauthoff <mail@georg.so>
9213
9214 PR gdb/22888
9215 * gcore.in: Quote variables and switch interpreter to bash.
9216
9217 2018-03-01 Tom Tromey <tom@tromey.com>
9218
9219 * dwarf2read.c (alloc_discriminant_info): Fix default_index
9220 assertion. Add assertion for discriminant_index.
9221 (quirk_rust_enum): Use correct base type name in univariant case.
9222
9223 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
9224
9225 * record.c (get_call_history_modifiers): Return a
9226 record_print_flags.
9227 (cmd_record_call_history): Adjust.
9228 * record-btrace.c (record_btrace_call_history): Adjust.
9229 (record_btrace_call_history_range): Adjust.
9230 (record_btrace_call_history_from): Adjust.
9231 * target-debug.h (target_debug_print_record_print_flags): New.
9232 * target-delegates.c: Re-generate.
9233 * target.c (target_call_history): Change flags type.
9234 (target_call_history_from): Likewise.
9235 (target_call_history_range): Likewise.
9236 * target.h (struct target_ops) <target_call_history>: Likewise.
9237 (target_call_history_from): Likewise.
9238 (target_call_history_range): Likewise.
9239
9240 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
9241 Simon Marchi <simon.marchi@polymtl.ca>
9242
9243 * common/common-utils.c: Include "sys/stat.h".
9244 (is_regular_file): Move here from "source.c"; change return
9245 type to "bool".
9246 * common/common-utils.h (is_regular_file): New prototype.
9247 * common/pathstuff.c (contains_dir_separator): New function.
9248 * common/pathstuff.h (contains_dir_separator): New prototype.
9249 * source.c: Don't include "sys/stat.h".
9250 (is_regular_file): Move to "common/common-utils.c".
9251
9252 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
9253
9254 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
9255 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
9256 * auto-load.c: Include "common/pathstuff.h".
9257 * common/common-def.h (current_directory): Move here.
9258 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
9259 function.
9260 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
9261 prototype.
9262 * common/pathstuff.c: New file.
9263 * common/pathstuff.h: New file.
9264 * compile/compile.c: Include "common/pathstuff.h".
9265 * defs.h (current_directory): Move to "common/common-defs.h".
9266 * dwarf2read.c: Include "common/pathstuff.h".
9267 * exec.c: Likewise.
9268 * guile/scm-safe-call.c: Likewise.
9269 * linux-thread-db.c: Likewise.
9270 * main.c: Likewise.
9271 * nto-tdep.c: Likewise.
9272 * objfiles.c: Likewise.
9273 * source.c: Likewise.
9274 * symtab.c: Likewise.
9275 * utils.c: Include "common/pathstuff.h".
9276 (gdb_realpath): Move to "common/pathstuff.c".
9277 (gdb_realpath_keepfile): Likewise.
9278 (gdb_abspath): Likewise.
9279 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
9280 (gdb_realpath_keepfile): Likewise.
9281 (gdb_abspath): Likewise.
9282
9283 2018-02-28 John Baldwin <jhb@FreeBSD.org>
9284
9285 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
9286 wildcard process pid for super_resume for kernels with a
9287 specific bug.
9288
9289 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
9290
9291 * compile/compile.c (get_args): Add additional comments
9292 explaining function.
9293
9294 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
9295 Tom Tromey <tom@tromey.com>
9296
9297 * target.h (memory_write_request_s): Remove typedef. Don't define
9298 VEC.
9299 (target_write_memory_blocks): Change argument to std::vector.
9300 (struct memory_write_request): Add constructor.
9301 * target-memory.c (compare_block_starting_address): Return bool.
9302 Change argument types.
9303 (claim_memory): Change arguments to use std::vector.
9304 (split_regular_and_flash_blocks, blocks_to_erase)
9305 (compute_garbled_blocks): Likewise.
9306 (cleanup_request_data, cleanup_write_requests_vector): Remove.
9307 (target_write_memory_blocks): Change argument to std::vector.
9308 * symfile.c (struct load_section_data): Add constructor and
9309 destructor. Use std::vector for "requests".
9310 (struct load_progress_data): Add initializers.
9311 (load_section_callback): Update. Use "new".
9312 (clear_memory_write_data): Remove.
9313 (generic_load): Update.
9314
9315 2018-02-27 Alan Hayward <alan.hayward@arm.com>
9316
9317 * arch/aarch64.h: Use common/tdesc.h.
9318
9319 2018-02-26 Maciej W. Rozycki <macro@mips.com>
9320
9321 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
9322 architecture with a 64-bit ABI.
9323
9324 2018-02-26 Maciej W. Rozycki <macro@mips.com>
9325
9326 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
9327 ahead of target description loading.
9328
9329 2018-02-26 Tom Tromey <tom@tromey.com>
9330
9331 * stack.c (backtrace_command_1): Update.
9332 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
9333 of "flags".
9334 * python/py-framefilter.c (py_print_frame)
9335 (gdbpy_apply_frame_filter): Change type of "flags".
9336 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
9337 of "flags".
9338 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
9339 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
9340 * extension.h (enum frame_filter_flag): Rename from
9341 frame_filter_flags.
9342 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
9343 (apply_ext_lang_frame_filter): Change type of "flags".
9344 * extension.c (apply_ext_lang_frame_filter): Change type of
9345 "flags".
9346 * extension-priv.h (struct extension_language_ops)
9347 <apply_frame_filter>: Change type of "flags".
9348
9349 2018-02-26 Tom Tromey <tom@tromey.com>
9350
9351 PR python/16497:
9352 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
9353 off-by-one in py_end computation.
9354 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
9355 PRINT_MORE_FRAMES.
9356 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
9357 constant.
9358
9359 2018-02-26 Tom Tromey <tom@tromey.com>
9360
9361 * dwarf2read.c (struct variant_field): New.
9362 (struct nextfield) <variant>: New field.
9363 (dwarf2_add_field): Handle DW_TAG_variant_part.
9364 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
9365 discriminated union.
9366 (read_structure_type): Handle DW_TAG_variant_part.
9367 (handle_struct_member_die): New function, extracted from
9368 process_structure_scope. Handle DW_TAG_variant.
9369 (process_structure_scope): Handle discriminated unions. Call
9370 handle_struct_member_die.
9371
9372 2018-02-26 Tom Tromey <tom@tromey.com>
9373
9374 * rust-lang.h (rust_last_path_segment): Declare.
9375 * rust-lang.c (rust_last_path_segment): Now public. Change
9376 contract.
9377 (struct disr_info): Remove.
9378 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
9379 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
9380 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
9381 (rust_enum_p, rust_enum_variant): New function.
9382 (rust_underscore_fields): Remove "offset" parameter.
9383 (rust_print_enum): New function.
9384 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
9385 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
9386 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
9387 enums.
9388 (rust_internal_print_type): New function, from rust_print_type.
9389 Remove enum code.
9390 (rust_print_type): Call rust_internal_print_type.
9391 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
9392 Update enum handling.
9393 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
9394 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
9395 (rust_union_quirks): New functions.
9396 (process_full_comp_unit, process_full_type_unit): Call
9397 rust_union_quirks.
9398 (process_structure_scope): Update rust_unions if necessary.
9399
9400 2018-02-26 Tom Tromey <tom@tromey.com>
9401
9402 * value.h (value_union_variant): Declare.
9403 * valops.c (value_union_variant): New function.
9404 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
9405 (struct discriminant_info): New.
9406 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
9407 enumerator.
9408 (struct main_type) <flag_discriminated_union>: New field.
9409
9410 2018-02-26 Tom Tromey <tom@tromey.com>
9411
9412 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9413 unittests/unpack-selftests.c.
9414 * unittests/unpack-selftests.c: New file.
9415 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
9416
9417 2018-02-26 Yao Qi <yao.qi@linaro.org>
9418
9419 * dwarf2read.c (struct partial_die_info) <read>: New method.
9420 (read_partial_die): Remove the declaration.
9421 (load_partial_dies): Update.
9422 (partial_die_info::partial_die_info):
9423 (read_partial_die): Change it to partial_die_info::read.
9424
9425 2018-02-26 Yao Qi <yao.qi@linaro.org>
9426
9427 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
9428 (fixup_partial_die): Remove declaration.
9429 (scan_partial_symbols): Update.
9430 (partial_die_parent_scope): Likewise.
9431 (partial_die_full_name): Likewise.
9432 (fixup_partial_die): Change it to partial_die_info::fixup.
9433
9434 2018-02-26 Yao Qi <yao.qi@linaro.org>
9435
9436 * dwarf2read.c (read_partial_die): Update the declaration.
9437 (load_partial_dies): Caller update.
9438 (read_partial_die): Remove one argument abbrev_len.
9439
9440 2018-02-26 Yao Qi <yao.qi@linaro.org>
9441
9442 * dwarf2read.c (struct partial_die_info): Add ctor, delete
9443 assignment operator.
9444 (load_partial_dies): Use ctor and copy ctor.
9445 (read_partial_die): Update.
9446 (dwarf2_cu::find_partial_die): Use ctor.
9447
9448 2018-02-26 Yao Qi <yao.qi@linaro.org>
9449
9450 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
9451 (find_partial_die_in_comp_unit): Change it to
9452 dwarf2_cu::find_partial_die.
9453 (find_partial_die): Update.
9454
9455 2018-02-26 Yao Qi <yao.qi@linaro.org>
9456
9457 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
9458 is NULL.
9459
9460 2018-02-26 Yao Qi <yao.qi@linaro.org>
9461
9462 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
9463
9464 2018-02-26 Alan Hayward <alan.hayward@arm.com>
9465
9466 * arch/amd64.h: Use common/tdesc.h.
9467 * arch/i386.c: Likewise.
9468 * arch/i386.h: Likewise.
9469 * arch/tic6x.c: Likewise.
9470 * arch/tdesc.h: Move file from here...
9471 * common/tdesc.h: ...to here.
9472 * features/aarch64-core.c: Regenerate.
9473 * features/aarch64-fpu.c: Regenerate.
9474 * features/i386/32bit-avx.c: Regenerate.
9475 * features/i386/32bit-avx512.c: Regenerate.
9476 * features/i386/32bit-core.c: Regenerate.
9477 * features/i386/32bit-linux.c: Regenerate.
9478 * features/i386/32bit-mpx.c: Regenerate.
9479 * features/i386/32bit-pkeys.c: Regenerate.
9480 * features/i386/32bit-sse.c: Regenerate.
9481 * features/i386/64bit-avx.c: Regenerate.
9482 * features/i386/64bit-avx512.c: Regenerate.
9483 * features/i386/64bit-core.c: Regenerate.
9484 * features/i386/64bit-linux.c: Regenerate.
9485 * features/i386/64bit-mpx.c: Regenerate.
9486 * features/i386/64bit-pkeys.c: Regenerate.
9487 * features/i386/64bit-segments.c: Regenerate.
9488 * features/i386/64bit-sse.c: Regenerate.
9489 * features/i386/x32-core.c: Regenerate.
9490 * features/tic6x-c6xp.c: Regenerate.
9491 * features/tic6x-core.c: Regenerate.
9492 * features/tic6x-gp.c: Regenerate.
9493 * target-descriptions.c: Use common/tdesc.h.
9494 * target-descriptions.h: Likewise.
9495
9496 2018-02-24 Tom Tromey <tom@tromey.com>
9497
9498 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
9499 (try_thread_db_load_from_dir, thread_db_load_search): Use
9500 std::string.
9501 (info_auto_load_libthread_db_compare): Return bool. Change
9502 argument types.
9503 (info_auto_load_libthread_db): Use std::vector, std::string.
9504 Remove cleanups.
9505
9506 2018-02-24 Tom Tromey <tom@tromey.com>
9507
9508 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
9509 std::string.
9510 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
9511 std::string*.
9512 * gdbarch.c: Rebuild.
9513 * gdbarch.h: Rebuild.
9514 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
9515 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
9516 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
9517 std::string*.
9518
9519 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
9520
9521 * gdbtypes.h (sect_offset): Change type to uint64_t.
9522 (sect_offset_str): New function.
9523 * dwarf2read.c (create_addrmap_from_aranges): Use
9524 sect_offset_str.
9525 (error_check_comp_unit_head): Likewise.
9526 (create_debug_type_hash_table): Likewise.
9527 (read_cutu_die_from_dwo): Likewise.
9528 (init_cutu_and_read_dies): Likewise.
9529 (init_cutu_and_read_dies_no_follow): Likewise.
9530 (process_psymtab_comp_unit_reader): Likewise.
9531 (partial_die_parent_scope): Likewise.
9532 (peek_die_abbrev): Likewise.
9533 (process_queue): Likewise.
9534 (dwarf2_physname): Likewise.
9535 (read_namespace_alias): Likewise.
9536 (read_import_statement): Likewise.
9537 (create_dwo_cu_reader): Likewise.
9538 (create_cus_hash_table): Likewise.
9539 (lookup_dwo_cutu): Likewise.
9540 (inherit_abstract_dies): Likewise.
9541 (read_func_scope): Likewise.
9542 (read_call_site_scope): Likewise.
9543 (dwarf2_add_member_fn): Likewise.
9544 (read_common_block): Likewise.
9545 (read_module_type): Likewise.
9546 (read_typedef): Likewise.
9547 (read_subrange_type): Likewise.
9548 (load_partial_dies): Likewise.
9549 (read_partial_die): Likewise.
9550 (find_partial_die): Likewise.
9551 (read_str_index): Likewise.
9552 (dwarf2_string_attr): Likewise.
9553 (build_error_marker_type): Likewise.
9554 (lookup_die_type): Likewise.
9555 (dump_die_shallow): Likewise.
9556 (follow_die_ref): Likewise.
9557 (dwarf2_fetch_die_loc_sect_off): Likewise.
9558 (dwarf2_fetch_constant_bytes): Likewise.
9559 (follow_die_sig): Likewise.
9560 (get_signatured_type): Likewise.
9561 (get_DW_AT_signature_type): Likewise.
9562 (dwarf2_find_containing_comp_unit): Likewise.
9563 (set_die_type): Likewise.
9564
9565 2018-02-21 John Baldwin <jhb@FreeBSD.org>
9566
9567 * arch/aarch64.c: Include "common-defs.h".
9568 * arch/amd64.c: Likewise.
9569 * arch/i386.c: Likewise.
9570
9571 2018-02-21 Tom Tromey <tom@tromey.com>
9572
9573 * value.h: (extract_field_op): Update.
9574 * eval.c (extract_field_op): Return a const char *.
9575 * expression.h (parse_expression_for_completion): Update.
9576 * completer.c (complete_expression): Update.
9577 (add_struct_fields): Make fieldname const.
9578 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
9579 (mark_completion_tag, parse_exp_in_context_1): Update.
9580 (parse_expression_for_completion): Change "name" to
9581 unique_xmalloc_ptr*.
9582
9583 2018-02-21 Tom Tromey <tom@tromey.com>
9584
9585 * infcall.c (call_function_by_hand_dummy): Use std::vector.
9586
9587 2018-02-21 Yao Qi <yao.qi@linaro.org>
9588
9589 * avr-tdep.c (avr_read_pc): Change parameter type to
9590 readable_regcache.
9591 * gdbarch.sh (read_pc): Likewise.
9592 * gdbarch.c: Re-generated.
9593 * gdbarch.h: Re-generated.
9594 * hppa-tdep.c (hppa_read_pc): Change parameter type to
9595 readable_regcache.
9596 * ia64-tdep.c (ia64_read_pc): Likewise.
9597 * mips-tdep.c (mips_read_pc): Likewise.
9598 * spu-tdep.c (spu_read_pc): Likewise.
9599
9600 2018-02-21 Yao Qi <yao.qi@linaro.org>
9601
9602 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
9603 * regcache-dump.c: New file.
9604 * regcache.c: Move register_dump to regcache-dump.c.
9605 (maintenance_print_registers): Likewise.
9606 (maintenance_print_raw_registers): Likewise.
9607 (maintenance_print_cooked_registers): Likewise.
9608 (maintenance_print_register_groups): Likewise.
9609 (maintenance_print_remote_registers): Likewise.
9610 (_initialize_regcache): Likewise.
9611 * regcache.h (register_dump): Moved from regcache.c.
9612
9613 2018-02-21 Yao Qi <yao.qi@linaro.org>
9614
9615 * regcache.c (regcache::regcache): Update.
9616 (regcache::invalidate): Move it to detached_regcache::invalidate.
9617 (get_thread_arch_aspace_regcache): Update.
9618 (regcache::raw_update): Update.
9619 (regcache::cooked_read): Remove some code.
9620 (regcache::cooked_read_value): Likewise.
9621 (regcache::raw_write): Remove assert on m_readonly_p.
9622 (regcache::raw_supply_integer): Move it to
9623 detached_regcache::raw_supply_integer.
9624 (regcache::raw_supply_zeroed): Likewise.
9625 * regcache.h (detached_regcache) <raw_supply_integer>: New
9626 declaration.
9627 <raw_supply_zeroed, invalidate>: Likewise.
9628 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
9629 <invalidate>: Likewise.
9630 <m_readonly_p>: Removed.
9631
9632 2018-02-21 Yao Qi <yao.qi@linaro.org>
9633
9634 * infcmd.c (get_return_value): Let stop_regs point to
9635 get_current_regcache.
9636 * regcache.c (regcache::regcache): Remove.
9637 (register_dump_reg_buffer): New class.
9638 (regcache_print): Adjust.
9639 * regcache.h (regcache): Remove constructors.
9640
9641 2018-02-21 Yao Qi <yao.qi@linaro.org>
9642
9643 * regcache.c (class register_dump): New class.
9644 (register_dump_regcache, register_dump_none): New class.
9645 (register_dump_remote, register_dump_groups): New class.
9646 (regcache_print): Update.
9647 * regcache.h (regcache_dump_what): Move it to regcache.c.
9648 (regcache) <dump>: Remove.
9649
9650 2018-02-21 Yao Qi <yao.qi@linaro.org>
9651
9652 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
9653 reg_buffer_rw *.
9654 (jit_unwind_reg_set_impl): Call raw_supply.
9655 (jit_frame_sniffer): Use reg_buffer_rw.
9656 * record-full.c (record_full_core_regbuf): Change its type.
9657 (record_full_core_open_1): Use reg_buffer_rw.
9658 (record_full_close): Likewise.
9659 (record_full_core_fetch_registers): Use regcache->raw_supply.
9660 (record_full_core_store_registers): Likewise.
9661 * regcache.c (regcache::get_register_status): Move it to
9662 reg_buffer.
9663 (regcache_raw_set_cached_value): Remove.
9664 (regcache::raw_set_cached_value): Remove.
9665 (regcache::raw_write): Call raw_supply.
9666 (regcache::raw_supply): Move it to reg_buffer_rw.
9667 * regcache.h (regcache_raw_set_cached_value): Remove.
9668 (reg_buffer_rw): New class.
9669
9670 2018-02-21 Yao Qi <yao.qi@linaro.org>
9671
9672 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
9673 readonly_detached_regcache.
9674 (dummy_frame_prev_register): Use regcache->cooked_read.
9675 * frame.c (frame_save_as_regcache): Change return type.
9676 (frame_pop): Update.
9677 * frame.h (frame_save_as_regcache): Update declaration.
9678 * inferior.h (get_infcall_suspend_state_regcache): Update
9679 declaration.
9680 * infrun.c (infcall_suspend_state) <registers>: use
9681 readonly_detached_regcache.
9682 (save_infcall_suspend_state): Don't use regcache_dup.
9683 (get_infcall_suspend_state_regcache): Change return type.
9684 * linux-fork.c (struct fork_info) <savedregs>: Change to
9685 readonly_detached_regcache.
9686 <pc>: New field.
9687 (fork_save_infrun_state): Don't use regcache_dup.
9688 (info_checkpoints_command): Adjust.
9689 * mi/mi-main.c (register_changed_p): Update declaration.
9690 (mi_cmd_data_list_changed_registers): Use
9691 readonly_detached_regcache.
9692 (register_changed_p): Change parameter type to
9693 readonly_detached_regcache.
9694 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
9695 readonly_detached_regcache.
9696 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
9697 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
9698 New.
9699 (regcache::save): Move it to reg_buffer.
9700 (regcache::restore): Change parameter type.
9701 (regcache_dup): Remove.
9702 * regcache.h (reg_buffer) <save>: New method.
9703 (readonly_detached_regcache): New class.
9704 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
9705 readonly_detached_regcache.
9706 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
9707
9708 2018-02-21 Yao Qi <yao.qi@linaro.org>
9709
9710 * frame.c (frame_save_as_regcache): Use regcache method save.
9711 (frame_pop): Use regcache method restore.
9712 * infrun.c (restore_infcall_suspend_state): Likewise.
9713 * linux-fork.c (fork_load_infrun_state): Likewise.
9714 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
9715 save.
9716 * regcache.c (regcache_save): Remove.
9717 (regcache::restore): More asserts.
9718 (regcache_cpy): Remove.
9719 * regcache.h (regcache_save): Remove the declaration.
9720 (regcache::restore): Move from private to public.
9721 Remove the friend declaration of regcache_cpy.
9722 (regcache_cpy): Remove declaration.
9723
9724 2018-02-21 Yao Qi <yao.qi@linaro.org>
9725
9726 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
9727 parameter type to 'readable_regcache *'.
9728 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9729 * arm-tdep.c (arm_neon_quad_read): Likewise.
9730 (arm_pseudo_read): Likewise.
9731 * avr-tdep.c (avr_pseudo_register_read): Likewise.
9732 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9733 * frv-tdep.c (frv_pseudo_register_read): Likewise.
9734 * gdbarch.c: Re-generated.
9735 * gdbarch.h: Re-generated.
9736 * gdbarch.sh (pseudo_register_read): Change parameter type to
9737 'readable_regcache *'.
9738 (pseudo_register_read_value): Likewise.
9739 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
9740 (h8300_pseudo_register_read): Likewise.
9741 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
9742 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9743 (i386_pseudo_register_read_into_value): Likewise.
9744 (i386_pseudo_register_read_value): Likewise.
9745 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
9746 declaration.
9747 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
9748 * m32c-tdep.c (m32c_raw_read): Likewise.
9749 (m32c_read_flg): Likewise.
9750 (m32c_banked_register): Likewise.
9751 (m32c_banked_read): Likewise.
9752 (m32c_sb_read): Likewise.
9753 (m32c_part_read): Likewise.
9754 (m32c_cat_read): Likewise.
9755 (m32c_r3r2r1r0_read): Likewise.
9756 (m32c_pseudo_register_read): Likewise.
9757 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9758 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9759 (mep_pseudo_cr64_read): Likewise.
9760 (mep_pseudo_register_read): Likewise.
9761 * mips-tdep.c (mips_pseudo_register_read): Likewise.
9762 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9763 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9764 * regcache.c (regcache::raw_read): Move it to readable_regcache.
9765 (regcache::cooked_read): Likewise.
9766 (regcache::cooked_read_value): Likewise.
9767 (regcache_cooked_read_signed):
9768 (regcache::cooked_read): Likewise.
9769 * regcache.h (readable_regcache): New class.
9770 (regcache): Inherit readable_regcache. Move some methods to
9771 readable_regcache.
9772 * rl78-tdep.c (rl78_pseudo_register_read): Change
9773 parameter type to 'readable_regcache *'.
9774 * rs6000-tdep.c (do_regcache_raw_read): Remove.
9775 (e500_pseudo_register_read): Change parameter type to
9776 'readable_regcache *'.
9777 (dfp_pseudo_register_read): Likewise.
9778 (vsx_pseudo_register_read): Likewise.
9779 (efpr_pseudo_register_read): Likewise.
9780 * s390-tdep.c (s390_pseudo_register_read): Likewise.
9781 * sh-tdep.c (sh_pseudo_register_read): Likewise.
9782 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
9783 (sh64_pseudo_register_read): Likewise.
9784 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9785 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9786 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9787 (spu_pseudo_register_read): Likewise.
9788 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9789 (xtensa_pseudo_register_read): Likewise.
9790
9791 2018-02-21 Yao Qi <yao.qi@linaro.org>
9792
9793 * regcache.c (regcache::regcache): Call reg_buffer ctor.
9794 (regcache::arch): Move it to reg_buffer::arch.
9795 (regcache::register_buffer): Likewise.
9796 (regcache::assert_regnum): Likewise.
9797 (regcache::num_raw_registers): Likewise.
9798 * regcache.h (reg_buffer): New class.
9799 (regcache): Inherit reg_buffer.
9800
9801 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
9802
9803 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
9804 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
9805
9806 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
9807
9808 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
9809
9810 2018-02-19 Alan Hayward <alan.hayward@arm.com>
9811
9812 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
9813 (SFILES): Remove common/*.c files.
9814 (COMMON_OBS): Remove some *.o files built from common/*.c files.
9815 * common/common.host: Add common reference.
9816 * configure.ac: Likewise.
9817 * configure: Regenerate.
9818
9819 2018-02-16 Yao Qi <yao.qi@linaro.org>
9820
9821 * block.c (block_namespace_info): Inherit allocate_on_obstack.
9822 (block_initialize_namespace): Use new.
9823 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
9824 (dwarf2_free_objfile): Use delete.
9825 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
9826 (copy_type_recursive): Use new.
9827 * gdb_obstack.h (allocate_on_obstack): New.
9828
9829 2018-02-15 Yao Qi <yao.qi@linaro.org>
9830
9831 PR gdb/22849
9832 * inferior.c (exit_inferior_1): Reset inf->control.
9833
9834 2018-02-15 Joel Brobecker <brobecker@adacore.com>
9835
9836 * ada-lang.c (ada_to_fixed_value_create): Delete advance
9837 declaration.
9838
9839 2018-02-14 Pedro Alves <palves@redhat.com>
9840
9841 * frame-unwind.c (frame_unwind_try_unwinder): Always call
9842 frame_cleanup_after_sniffer on exception.
9843
9844 2018-02-14 Tom Tromey <tom@tromey.com>
9845
9846 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
9847 const.
9848 (solib_bfd_open): Make pathname const.
9849 * solib.c (solib_bfd_open): Make pathname const.
9850 * solib-spu.c (spu_bfd_fopen): Make name const.
9851 (spu_bfd_open): Make pathname const.
9852 * solib-darwin.c (darwin_bfd_open): Make pathname const.
9853 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
9854
9855 2018-02-14 Tom Tromey <tom@tromey.com>
9856
9857 * symfile.c (symfile_bfd_open): Update.
9858 * source.h (openp, source_full_path_of, find_and_open_source):
9859 Change argument type to unique_xmalloc_ptr.
9860 * source.c (openp): Take a unique_xmalloc_ptr.
9861 (source_full_path_of, find_and_open_source): Likewise.
9862 (open_source_file, symtab_to_fullname): Update.
9863 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
9864 unique_xmalloc_ptr.
9865 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
9866 (exec_file_find): Update.
9867 * psymtab.c (psymtab_to_fullname): Update.
9868 * nto-tdep.h (nto_find_and_open_solib): Update.
9869 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
9870 unique_xmalloc_ptr.
9871 * exec.c (exec_file_attach): Update.
9872 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
9873 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
9874
9875 2018-02-14 Tom Tromey <tom@tromey.com>
9876
9877 * solib.c: Include source.h.
9878 * nto-tdep.c: Include source.h.
9879 * mi/mi-cmd-env.c: Include source.h.
9880 * infcmd.c: Include source.h.
9881 * exec.c: Include source.h.
9882 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
9883 (add_path, directory_switch, source_path, init_source_path): Move
9884 declarations...
9885 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
9886 (add_path, directory_switch, source_path, init_source_path):
9887 ...here.
9888
9889 2018-02-14 Tom Tromey <tom@tromey.com>
9890
9891 * solist.h (exec_file_find, solib_find): Return
9892 unique_xmalloc_ptr.
9893 (solib_bfd_fopen): Take a const char *.
9894 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
9895 (exec_file_find, solib_find): Likewise.
9896 (solib_bfd_fopen): Do not take ownership of "pathname".
9897 (solib_bfd_open): Use unique_xmalloc_ptr.
9898 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
9899 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
9900 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
9901 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
9902
9903 2018-02-14 Joel Brobecker <brobecker@adacore.com>
9904
9905 * ada-lang.c (name_match_type_from_name): Remove reference to
9906 ada_name_for_lookup in function's documentation.
9907 * ada-lang.h (ada_name_for_lookup): Delete declaration.
9908
9909 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
9910
9911 * defs.h (enum openp_flags): New enum.
9912 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
9913 Move to enum openp_flags.
9914 (openp_flags): New enum flags.
9915 (openp): Change parameter type to openp_flags.
9916 * source.c (openp): Change parameter type to openp_flags.
9917 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
9918 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
9919
9920 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
9921
9922 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
9923 per-command.
9924
9925 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
9926
9927 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
9928 into...
9929 (class dwarf2_queue_guard): ...the destructor of this new class.
9930 (dw2_do_instantiate_symtab): Create instance of the new class
9931 dwarf2_queue_guard, remove cleanup.
9932
9933 2018-02-09 Tom Tromey <tom@tromey.com>
9934
9935 * source.c (find_source_lines): Don't reference past the end of
9936 the vector.
9937
9938 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9939
9940 * remote.c (remote_btrace_maybe_reopen): Change error message.
9941 * btrace.c (btrace_enable): Likewise.
9942 (parse_xml_btrace): Likewise.
9943 (parse_xml_btrace_conf): Likewise.
9944
9945 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9946
9947 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
9948 (linux_enable_pt, linux_enable_bts): Call
9949 diagnose_perf_event_open_fail.
9950
9951 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9952
9953 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
9954 Remove parameter and change return type. Update callers. Move it.
9955 (linux_enable_bts, linux_enable_pt): Improve error message.
9956 (linux_enable_pt): Remove zero buffer size check.
9957 (linux_enable_btrace): Improve error messages. Remove NULL return
9958 check.
9959
9960 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9961
9962 * btrace.c (btrace_enable): Remove target_supports_btrace call.
9963 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
9964 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
9965 (linux_supports_pt, linux_supports_btrace): Remove.
9966 (linux_enable_bts): Call cpu_supports_bts.
9967 * nat/linux-btrace.h (linux_supports_btrace): Remove.
9968 * remote.c (remote_supports_btrace): Remove.
9969 (init_remote_ops): Remove remote_supports_btrace.
9970 * target-delegates.c: Regenerated.
9971 * target.c (target_supports_btrace): Remove.
9972 * target.h (target_ops) <to_supports_btrace>: Remove
9973 (target_supports_btrace): Remove.
9974 * x86-linux-nat.c (x86_linux_create_target): Remove
9975 linux_supports_btrace.
9976
9977 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9978
9979 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
9980 btrace failed.
9981 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
9982 exception and use message in own exception.
9983
9984 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9985
9986 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
9987 (perf_event_pt_event_type): Use gdb_file_up.
9988 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
9989 scoped_fd, and scoped_mmap.
9990
9991 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9992
9993 * common/scoped_mmap.h: New.
9994 * unittests/scoped_mmap-selftest.c: New.
9995 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9996 unittests/scoped_mmap-selftest.c.
9997
9998 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9999
10000 * common/scoped_fd.h: New.
10001 * unittests/scoped_fd-selftest.c: New.
10002 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10003 unittests/scoped_fd-selftest.c.
10004
10005 2018-02-09 Tom Tromey <tom@tromey.com>
10006
10007 * auto-load.c (auto_load_section_scripts): Use
10008 gdb::unique_xmalloc_ptr.
10009
10010 2018-02-09 Tom Tromey <tom@tromey.com>
10011
10012 * auto-load.c (execute_script_contents): Use std::string.
10013
10014 2018-02-09 Joel Brobecker <brobecker@adacore.com>
10015
10016 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
10017 Python function, rather than a new command.
10018
10019 2018-02-08 Tom Tromey <tom@tromey.com>
10020
10021 * solib.c (solib_find_1): Use std::string.
10022 (solib_bfd_fopen): Use unique_xmalloc_ptr.
10023
10024 2018-02-08 Tom Tromey <tom@tromey.com>
10025
10026 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
10027
10028 2018-02-08 Tom Tromey <tom@tromey.com>
10029
10030 * source.c (find_source_lines): Use gdb::def_vector.
10031
10032 2018-02-08 Tom Tromey <tom@tromey.com>
10033
10034 * macrocmd.c (struct temporary_macro_definition): New.
10035 (macro_define_command): Use temporary_macro_definition. Remove
10036 cleanups.
10037 (free_macro_definition_ptr): Remove.
10038
10039 2018-02-08 Tom Tromey <tom@tromey.com>
10040
10041 * macroexp.c (maybe_expand): Use std::string.
10042
10043 2018-02-08 Tom Tromey <tom@tromey.com>
10044
10045 * macroexp.c (struct macro_buffer): Add initializers for some
10046 members.
10047 (init_buffer, init_shared_buffer, free_buffer)
10048 (free_buffer_return_text): Remove.
10049 (macro_buffer): New constructors.
10050 (~macro_buffer): New destructor.
10051 (macro_buffer::set_shared): New method.
10052 (macro_buffer::resize_buffer, macro_buffer::appendc)
10053 (macro_buffer::appendmem): Now methods, not free functions.
10054 (set_token, append_tokens_without_splicing, stringify)
10055 (macro_stringify): Update.
10056 (gather_arguments): Change return type. Remove argc_p argument,
10057 add args_ptr argument. Use std::vector.
10058 (substitute_args): Remove argc argument. Accept std::vector.
10059 (expand): Update. Use std::vector.
10060 (scan, macro_expand, macro_expand_next): Update.
10061
10062 2018-02-08 Tom Tromey <tom@tromey.com>
10063
10064 * symtab.c (default_collect_symbol_completion_matches_break_on):
10065 Use unique_xmalloc_ptr.
10066 * macroscope.h: (sal_macro_scope, user_macro_scope)
10067 (default_macro_scope): Return unique_xmalloc_ptr.
10068 * macroscope.c (sal_macro_scope, user_macro_scope)
10069 (default_macro_scope): Return unique_xmalloc_ptr.
10070 * macroexp.h (macro_expand, macro_expand_once): Return
10071 unique_xmalloc_ptr.
10072 * macroexp.c (macro_expand, macro_expand_once): Return
10073 unique_xmalloc_ptr.
10074 * macrocmd.c (macro_expand_command, macro_expand_once_command)
10075 (info_macro_command, info_macros_command): Use
10076 unique_xmalloc_ptr.
10077 * compile/compile-c-support.c (write_macro_definitions): Use
10078 unique_xmalloc_ptr.
10079 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
10080
10081 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
10082
10083 * value.c (value_static_field): Assign field type instead of
10084 containing type when returning an optimized out value.
10085
10086 2018-02-06 Yao Qi <yao.qi@linaro.org>
10087
10088 * ft32-tdep.c (ft32_read_pc): Remove.
10089 (ft32_write_pc): Remove.
10090 (ft32_gdbarch_init): Update.
10091 * m32r-tdep.c (m32r_read_pc): Remove.
10092 (m32r_gdbarch_init): Update.
10093 * mep-tdep.c (mep_read_pc): Remove.
10094 (mep_gdbarch_init): Update.
10095 * microblaze-tdep.c (microblaze_write_pc): Remove.
10096 (microblaze_gdbarch_init): Update.
10097 * mn10300-tdep.c (mn10300_read_pc): Remove.
10098 (mn10300_write_pc): Remove.
10099 (mn10300_gdbarch_init): Update.
10100 * moxie-tdep.c (moxie_read_pc): Remove.
10101 (moxie_write_pc): Remove.
10102 (moxie_gdbarch_init): Update.
10103
10104 2018-02-06 Yao Qi <yao.qi@linaro.org>
10105
10106 * expprint.c (print_subexp_standard): Handle
10107 OP_F77_UNDETERMINED_ARGLIST.
10108 (dump_subexp_body_standard): Likewise.
10109
10110 2018-02-05 Alan Hayward <alan.hayward@arm.com>
10111
10112 * target-descriptions.c (tdesc_element_visitor) Add empty
10113 implementations.
10114 (tdesc_type): Move make_gdb_type from here.
10115 (tdesc_type_builtin): Likewise.
10116 (tdesc_type_vector): Likewise.
10117 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
10118 (make_gdb_type_struct): Move from tdesc_type_with_fields.
10119 (make_gdb_type_union): Likewise.
10120 (make_gdb_type_flags): Likewise.
10121 (make_gdb_type_enum): Likewise.
10122 (make_gdb_type): New function.
10123 (tdesc_register_type): Use static make_gdb_type.
10124
10125 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
10126
10127 * infcmd.c (default_print_one_register_info): Align natural-format
10128 column values consistently one under another.
10129 (pad_to_column): New function.
10130
10131 2018-02-05 Joel Brobecker <brobecker@adacore.com>
10132
10133 * dwarf2read.c (dwarf2_physname): Move commment.
10134
10135 2018-02-01 Leszek Swirski <leszeks@google.com>
10136
10137 * varobj.c (varobj_formatted_print_options): Allow recursive
10138 pretty printing if pretty printing is enabled.
10139
10140 2018-02-01 Leszek Swirski <leszeks@google.com>
10141
10142 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
10143 names after a structop as a filename.
10144
10145 2018-02-01 Yao Qi <yao.qi@linaro.org>
10146
10147 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
10148 (arm_record_coproc_data_proc): Likewise.
10149
10150 2018-02-01 Yao Qi <yao.qi@linaro.org>
10151
10152 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
10153
10154 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
10155
10156 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
10157 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
10158
10159 2018-01-31 Pedro Alves <palves@redhat.com>
10160
10161 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
10162 * inflow.c (child_terminal_save_inferior): Wrap reference to
10163 tcgetpgrp in HAVE_TERMIOS_H.
10164 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
10165 _WIN32.
10166 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
10167 always iterate over all inferiors.
10168 (gdbsim_cntrl_c): Adjust.
10169 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
10170
10171 2018-01-31 Joel Brobecker <brobecker@adacore.com>
10172
10173 * gdbtypes.c (lookup_array_range_type): Make sure the array's
10174 index type is objfile-owned if the element type is as well.
10175
10176 2018-01-31 Joel Brobecker <brobecker@adacore.com>
10177
10178 GDB 8.1 released.
10179
10180 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
10181
10182 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
10183 "features/s390x-linux64.c".
10184 (_initialize_s390_linux_tdep): Remove initialization of tdescs
10185 s390_linux32 and s390x_linux64.
10186 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
10187 default tdesc.
10188 * s390-tdep.c: Include "features/s390-linux32.c" and
10189 "features/s390x-linux64.c".
10190 (s390_tdesc_valid): Add check for tdesc_has_registers.
10191 (s390_gdbarch_init): Make sure there is always a valid tdesc.
10192 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
10193 tdesc_s390x_linux64.
10194 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
10195 tdesc_s390x_linux64 to...
10196 * s390-tdep.h: ...here.
10197
10198 2018-01-30 Pedro Alves <palves@redhat.com>
10199
10200 PR gdb/13211
10201 * config.in, configure: Regenerate.
10202 * configure.ac: Check for getpgid.
10203 * go32-nat.c (go32_pass_ctrlc): New.
10204 (go32_target): Install it.
10205 * inf-child.c (inf_child_target): Install
10206 child_terminal_save_inferior, child_pass_ctrlc and
10207 child_interrupt.
10208 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
10209 (inf_ptrace_target): No longer install it.
10210 * infcmd.c (interrupt_target_1): Adjust.
10211 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
10212 (child_interrupt): Declare.
10213 (inferior::terminal_state): New.
10214 * inflow.c (struct terminal_info): Update comments.
10215 (inferior_process_group): Delete.
10216 (terminal_is_ours): Delete.
10217 (gdb_tty_state): New.
10218 (child_terminal_init): Adjust.
10219 (is_gdb_terminal, sharing_input_terminal_1)
10220 (sharing_input_terminal): New functions.
10221 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
10222 Set the process's actual process group in the foreground if
10223 possible. Handle is_ours_for_output/is_ours distinction. Don't
10224 mark terminal as the inferior's if not sharing GDB's terminal.
10225 Don't check attach_flag.
10226 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
10227 pass down a target_terminal_state.
10228 (child_terminal_save_inferior): New, factored out from ...
10229 (child_terminal_ours_1): ... this. Handle
10230 target_terminal_state::is_ours_for_output.
10231 (child_interrupt, child_pass_ctrlc): New.
10232 (inflow_inferior_exit): Clear the inferior's terminal_state.
10233 (copy_terminal_info): Copy the inferior's terminal state.
10234 (_initialize_inflow): Remove reference to terminal_is_ours.
10235 * inflow.h (inferior_process_group): Delete.
10236 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
10237 * procfs.c (procfs_target): Don't install procfs_interrupt.
10238 (procfs_interrupt): Delete.
10239 * remote.c (remote_serial_quit_handler): Adjust.
10240 (remote_interrupt): Remove ptid parameter. Adjust.
10241 * target-delegates.c: Regenerate.
10242 * target.c: Include "terminal.h".
10243 (target_terminal::terminal_state): Rename to ...
10244 (target_terminal::m_terminal_state): ... this.
10245 (target_terminal::init): Adjust.
10246 (target_terminal::inferior): Adjust to per-inferior
10247 terminal_state.
10248 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
10249 (target_terminal::ours, target_terminal::ours_for_output): Use
10250 target_terminal_is_ours_kind.
10251 (target_interrupt): Remove ptid parameter. Adjust.
10252 (default_target_pass_ctrlc): Adjust.
10253 * target.h (target_ops::to_terminal_save_inferior): New field.
10254 (target_ops::to_interrupt): Remove ptid_t parameter.
10255 (target_interrupt): Remove ptid_t parameter. Update comment.
10256 (target_pass_ctrlc): Update comment.
10257 * target/target.h (target_terminal_state): New scoped enum,
10258 factored out of ...
10259 (target_terminal::terminal_state): ... here.
10260 (target_terminal::inferior): Update comments.
10261 (target_terminal::restore_inferior): New.
10262 (target_terminal::is_inferior, target_terminal::is_ours)
10263 (target_terminal::is_ours_for_output): Adjust.
10264 (target_terminal::scoped_restore_terminal_state): Adjust to
10265 rename, and call restore_inferior() instead of inferior().
10266 (target_terminal::scoped_restore_terminal_state::m_state): Change
10267 type.
10268 (target_terminal::terminal_state): Rename to ...
10269 (target_terminal::m_terminal_state): ... this and change type.
10270
10271 2018-01-30 Pedro Alves <palves@redhat.com>
10272
10273 * linux-nat.c (wait_for_signal): New function.
10274 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
10275 directly.
10276 (async_terminal_is_ours)
10277 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
10278 (linux_nat_add_target): Don't override
10279 to_terminal_inferior/to_terminal_ours.
10280
10281 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
10282
10283 * remote.c (remote_follow_fork): Don't call "detach_inferior".
10284
10285 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
10286
10287 * dwarf2read.c (free_dwo_files): Add forward-declaration.
10288 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
10289 dwarf2_per_objfile_free here.
10290 (dwarf2_per_objfile_free): Remove.
10291 (_initialize_dwarf2_read): Don't register
10292 dwarf2_per_objfile_free as a registry cleanup.
10293
10294 2018-01-27 Eli Zaretskii <eliz@gnu.org>
10295
10296 Avoid compilation errors in MinGW native builds
10297
10298 The error is triggered by including python-internal.h, and the
10299 error message is:
10300
10301 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
10302 from build-gnulib/import/math.h:27,
10303 from d:/usr/Python26/include/pyport.h:235,
10304 from d:/usr/Python26/include/Python.h:58,
10305 from python/python-internal.h:94,
10306 from python/py-arch.c:24:
10307 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
10308 using ::hypot;
10309 ^~~~~
10310
10311 This happens because Python headers define 'hypot' to expand t
10312 '_hypot' in the Windows builds.
10313 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
10314 'hypoth'. This avoids a compilation error.
10315
10316 2018-01-26 Alan Hayward <alan.hayward@arm.com>
10317
10318 * MAINTAINERS (Write After Approval): Fix ordering.
10319
10320 2018-01-26 Alan Hayward <alan.hayward@arm.com>
10321
10322 * MAINTAINERS (Write After Approval): Add Alan Hayward.
10323
10324 2018-01-26 Alan Modra <amodra@gmail.com>
10325
10326 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
10327 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
10328 Remove nop. Make const. Comment.
10329 (powerpc32_plt_stub_so_2): New.
10330 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
10331 Correct count. Update uses.
10332 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
10333 Move common code reading PLT entry word. Correct
10334 powerpc32_plt_stub PLT address calculation.
10335 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
10336 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
10337 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
10338 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
10339 (ppc64_standard_linkage8): Likewise.
10340 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
10341 Correct insns description.
10342 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
10343
10344 2018-01-24 Pedro Alves <palves@redhat.com>
10345
10346 GCC PR libstdc++/83906
10347 * gdbtypes.c (operator==(const dynamic_prop &,
10348 const dynamic_prop &)): New.
10349 (operator==(const range_bounds &, const range_bounds &)): New.
10350 (check_types_equal): Use them instead of memcmp.
10351 * gdbtypes.h (operator==(const dynamic_prop &,
10352 const dynamic_prop &)): Declare.
10353 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
10354 (operator==(const range_bounds &, const range_bounds &)): Declare.
10355 (operator!=(const range_bounds &, const range_bounds &)): Declare.
10356
10357 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10358
10359 * s390-linux-tdep.c (s390_record_address_mask)
10360 (s390_record_calc_disp_common, s390_record_calc_disp)
10361 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10362 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10363 (s390_process_record): Move to s390-tdep.c.
10364 (s390_linux_init_abi_any): Adjust.
10365 * s390-tdep.c (s390_record_address_mask)
10366 (s390_record_calc_disp_common, s390_record_calc_disp)
10367 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10368 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10369 (s390_process_record): Moved from s390-linux-tdep.c
10370 (s390_gdbarch_init): Adjust.
10371
10372 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10373
10374 * s390-linux-nat.c (s390-tdep.h): New include.
10375 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
10376 (HFILES_NO_SRCDIR): Add s390-tdep.h.
10377 (ALLDEPFILES): Add s390-tdep.c.
10378 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
10379 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
10380 * s390-tdep.h: ...this. New file.
10381 * s390-linux-tdep.c (s390-tdep.h): New include.
10382 (_initialize_s390_tdep): Rename to...
10383 (_initialize_s390_linux_tdep): ...this and adjust.
10384 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
10385 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
10386 s390-tdep.h.
10387 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
10388 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
10389 (s390_is_partial_instruction, s390_software_single_step)
10390 (is_non_branch_ril, s390_displaced_step_copy_insn)
10391 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
10392 (s390_prologue_data, s390_addr, s390_store, s390_load)
10393 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
10394 (s390_register_call_saved, s390_guess_tracepoint_registers)
10395 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
10396 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
10397 (s390_pseudo_register_name, s390_pseudo_register_type)
10398 (s390_pseudo_register_read, s390_pseudo_register_write)
10399 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
10400 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
10401 (s390_addr_bits_remove, s390_address_class_type_flags)
10402 (s390_address_class_type_flags_to_name)
10403 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
10404 (s390_function_arg_float, s390_function_arg_vector)
10405 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
10406 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
10407 (s390_frame_align, s390_register_return_value, s390_return_value)
10408 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
10409 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
10410 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
10411 (s390_trad_frame_prev_register, s390_unwind_cache)
10412 (s390_prologue_frame_unwind_cache)
10413 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
10414 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
10415 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
10416 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
10417 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
10418 (s390_frame_base_address, s390_local_base_address)
10419 (s390_frame_base, s390_gcc_target_options)
10420 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
10421 (s390_validate_reg_range, s390_tdesc_valid)
10422 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
10423 * s390-tdep.c: ...this. New file.
10424
10425 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10426
10427 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
10428 (s390_process_record, s390_gdbarch_tdep_alloc)
10429 (s390_linux_init_abi_any): Use/set new hook.
10430
10431 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10432
10433 * s390-linux-tdep.c (osabi.h): New include.
10434 (s390_linux_init_abi_31, s390_linux_init_abi_64)
10435 (s390_linux_init_abi_any): New functions.
10436 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
10437
10438 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10439
10440 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
10441 tdesc_has_registers check
10442
10443 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10444
10445 * s390-linux-tdep.c (s390_tdesc_valid): New function.
10446 (s390_validate_reg_range): New macro.
10447 (s390_gdbarch_init): Adjust.
10448
10449 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10450
10451 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
10452 (s390_gdbarch_tdep_alloc): Adjust.
10453 (s390_gdbarch_init): Adjust.
10454
10455 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10456
10457 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
10458 <have_tdb>: Change type to bool.
10459 (s390_gdbarch_tdep_alloc): Adjust.
10460 (s390_gdbarch_init): Adjust.
10461
10462 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10463
10464 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
10465 (gdbarch_tdep) <have_upper, have_vx>: New fields.
10466 (s390_gdbarch_tdep_alloc): New function.
10467 (s390_gdbarch_init): Allocate tdep at start and use its fields
10468 instead of separate variables.
10469
10470 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10471
10472 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
10473 when looking for cached gdbarch and add comment for remaining.
10474
10475 2018-01-22 Pedro Alves <palves@redhat.com>
10476 Sergio Durigan Junior <sergiodj@redhat.com>
10477
10478 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
10479 case.
10480
10481 2018-01-22 Maciej W. Rozycki <macro@mips.com>
10482
10483 * MAINTAINERS: Update my company e-mail address.
10484
10485 2018-01-22 Yao Qi <yao.qi@linaro.org>
10486
10487 * regcache.c (cooked_write_test): New function.
10488 (_initialize_regcache): Register the test.
10489
10490 2018-01-22 Yao Qi <yao.qi@linaro.org>
10491
10492 * ia64-tdep.c (ia64_pseudo_register_read): Call
10493 regcache->cooked_read instead of regcache_cooked_read_unsigned.
10494 * m32c-tdep.c (m32c_cat_read): Likewise.
10495 (m32c_r3r2r1r0_read): Likewise.
10496 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10497 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10498
10499 2018-01-22 Yao Qi <yao.qi@linaro.org>
10500
10501 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
10502 method raw_read instead of regcache_raw_read.
10503 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10504 * arm-tdep.c (arm_neon_quad_read): Likewise.
10505 * avr-tdep.c (avr_pseudo_register_read): Likewise.
10506 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10507 * frv-tdep.c (frv_pseudo_register_read): Likewise.
10508 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
10509 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10510 (i386_pseudo_register_read_into_value): Likewise.
10511 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10512 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10513 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10514 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
10515 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
10516 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10517 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10518 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10519 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
10520
10521 2018-01-22 Yao Qi <yao.qi@linaro.org>
10522
10523 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
10524 * configure.tgt: Remove target mt.
10525 * mt-tdep.c: Remove.
10526 * regcache.c (cooked_read_test): Remove the check for mt.
10527
10528 2018-01-22 Yao Qi <yao.qi@linaro.org>
10529
10530 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
10531 instead of gdbarch_pseudo_register_read_value.
10532
10533 2018-01-22 Joel Brobecker <brobecker@adacore.com>
10534
10535 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
10536 language is Ada.
10537
10538 2018-01-22 Joel Brobecker <brobecker@adacore.com>
10539
10540 * linespec.c (create_sals_line_offset): Remove code that preserved
10541 the symtab_and_line's line number.
10542
10543 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10544
10545 * varobj.c (varobj_create): Don't set valid_block when creating a
10546 floating varobj.
10547
10548 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10549
10550 * varobj.c (varobj_create): Remove out of date comment.
10551
10552 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10553
10554 PR mi/20395
10555 * ada-exp.y (write_var_from_sym): Pass extra parameter when
10556 updating innermost block.
10557 * parse.c (innermost_block_tracker::update): Take extra type
10558 parameter, and check types match before updating innermost block.
10559 (write_dollar_variable): Update innermost block for registers.
10560 * parser-defs.h (enum innermost_block_tracker_type): New enum.
10561 (innermost_block_tracker::innermost_block_tracker): Initialise
10562 m_types member.
10563 (innermost_block_tracker::reset): Take type parameter.
10564 (innermost_block_tracker::update): Take type parameter, and pass
10565 type through as needed.
10566 (innermost_block_tracker::m_types): New member.
10567 * varobj.c (varobj_create): Pass type when reseting innermost
10568 block.
10569
10570 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10571
10572 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
10573 * ada-lang.c (resolve_subexp): Likewise.
10574 * breakpoint.c (set_breakpoint_condition) Likewise.
10575 (watch_command_1) Likewise.
10576 * c-exp.y (variable): Likewise.
10577 * d-exp.y (PrimaryExpression): Likewise.
10578 * f-exp.y (variable): Likewise.
10579 * go-exp.y (variable): Likewise.
10580 * m2-exp.y (variable): Likewise.
10581 * objfiles.c (objfile::~objfile): Likewise.
10582 * p-exp.y (variable): Likewise.
10583 * parse.c (innermost_block): Change type.
10584 * parser-defs.h (class innermost_block_tracker): New.
10585 (innermost_block): Change to innermost_block_tracker.
10586 * printcmd.c (display_command): Switch to innermost_block API.
10587 (do_one_display): Likewise.
10588 * rust-exp.y (do_one_display): Likewise.
10589 * symfile.c (clear_symtab_users): Likewise.
10590 * varobj.c (varobj_create): Switch to innermost_block API, replace
10591 use of innermost_block with block stored on varobj object.
10592
10593 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10594
10595 * expression.h (innermost_block): Remove declaration.
10596 * varobj.c: Add 'parser-defs.h' include.
10597
10598 2018-01-19 Tom Tromey <tom@tromey.com>
10599
10600 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
10601 symbols in the static and global blocks.
10602
10603 2018-01-19 James Clarke <jrtc27@jrtc27.com>
10604
10605 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
10606 gdb_ptrace.h, and move including gdb_wait.h ...
10607 * nat/linux-ptrace.h: ... to here.
10608
10609 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10610
10611 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
10612 inf_ptrace_detach_success.
10613 (inf_ptrace_detach_success): Add inferior parameter, use it
10614 instead of inferior_ptid, pass it to detach_inferior.
10615 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
10616 parameter.
10617 * inferior.c (detach_inferior): Add overload that takes an
10618 inferior object.
10619 * inferior.h (detach_inferior): Likewise.
10620 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
10621 use inferior_ptid, adjust call to inf_ptrace_detach_success.
10622 * linux-thread-db.c (thread_db_detach): Use inf parameter.
10623
10624 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10625
10626 * target.h (struct target_ops) <to_detach>: Add inferior
10627 parameter.
10628 (target_detach): Likewise.
10629 * target.c (dispose_inferior): Pass inferior down.
10630 (target_detach): Pass inferior down. Assert that it is equal to
10631 the current inferior.
10632 * aix-thread.c (aix_thread_detach): Pass inferior down.
10633 * corefile.c (core_file_command): Pass current_inferior() down.
10634 * corelow.c (core_detach): Add inferior parameter.
10635 * darwin-nat.c (darwin_detach): Likewise.
10636 * gnu-nat.c (gnu_detach): Likewise.
10637 * inf-ptrace.c (inf_ptrace_detach): Likewise.
10638 * infcmd.c (detach_command): Pass current_inferior() down to
10639 target_detach.
10640 * infrun.c (follow_fork_inferior): Pass parent_inf to
10641 target_detach.
10642 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
10643 target_detach.
10644 * linux-nat.c (linux_nat_detach): Add inferior parameter.
10645 * linux-thread-db.c (thread_db_detach): Likewise.
10646 * nto-procfs.c (procfs_detach): Likewise.
10647 * procfs.c (procfs_detach): Likewise.
10648 * record.c (record_detach): Likewise.
10649 * record.h (struct inferior): Forward-declare.
10650 (record_detach): Add inferior parameter.
10651 * remote-sim.c (gdbsim_detach): Likewise.
10652 * remote.c (remote_detach_1): Likewise.
10653 (remote_detach): Likewise.
10654 (extended_remote_detach): Likewise.
10655 * sol-thread.c (sol_thread_detach): Likewise.
10656 * target-debug.h (target_debug_print_inferior_p): New macro.
10657 * target-delegates.c: Re-generate.
10658 * top.c (kill_or_detach): Pass inferior down to target_detach.
10659 * windows-nat.c (windows_detach): Add inferior parameter.
10660
10661 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10662
10663 * target.h (struct target_ops) <to_detach>: Remove args
10664 parameter.
10665 (target_detach): Likewise.
10666 * target.c (dispose_inferior): Adjust.
10667 (target_detach): Remove args parameter, adjust.
10668 * aix-thread.c (aix_thread_detach): Adjust.
10669 * corefile.c (core_file_command): Adjust.
10670 * corelow.c (core_detach): Adjust.
10671 * darwin-nat.c (darwin_detach): Adjust.
10672 * gnu-nat.c (gnu_detach): Adjust.
10673 * inf-ptrace.c (inf_ptrace_detach): Adjust.
10674 * infcmd.c (detach_command): Adjust
10675 * infrun.c (follow_fork_inferior): Adjust.
10676 (handle_vfork_child_exec_or_exit): Adjust.
10677 * linux-fork.c (linux_fork_detach): Remove args parameter.
10678 * linux-fork.h (linux_fork_detach): Likewise.
10679 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
10680 * linux-thread-db.c (thread_db_detach): Likewise.
10681 * nto-procfs.c (procfs_detach): Likewise.
10682 * procfs.c (procfs_detach): Likewise.
10683 (do_detach): Remove signo parameter.
10684 * record.c (record_detach): Remove args parameter.
10685 * record.h (record_detach): Likewise.
10686 * remote-sim.c (gdbsim_detach): Likewise.
10687 * remote.c (remote_detach_1): Likewise.
10688 (remote_detach): Likewise.
10689 (extended_remote_detach): Likewise.
10690 * sol-thread.c (sol_thread_detach): Likewise.
10691 * target-delegates.c: Re-generate.
10692 * top.c (struct qt_args) <args>: Remove field.
10693 (kill_or_detach): Don't pass args.
10694 (quit_force): Don't set args.
10695 * windows-nat.c (windows_detach): Remove args parameter.
10696
10697 2018-01-19 Yao Qi <yao.qi@linaro.org>
10698
10699 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
10700 (arm_linux_init_abi): Install it.
10701
10702 2018-01-19 Yao Qi <yao.qi@linaro.org>
10703
10704 * osabi.c (gdb_osabi_names): Extend the regexp for
10705 arm-linux-gnueabihf.
10706
10707 2018-01-18 Yao Qi <yao.qi@linaro.org>
10708
10709 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
10710 m_abbrevs.
10711 (abbrev_table::add_abbrev): Update.
10712 (abbrev_table::lookup_abbrev): Update.
10713
10714 2018-01-18 Yao Qi <yao.qi@linaro.org>
10715
10716 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
10717
10718 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
10719
10720 * compile/compile.c (compile_to_object): Convert "triplet_rx"
10721 to "std::string".
10722
10723 2018-01-17 Tom Tromey <tom@tromey.com>
10724
10725 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
10726
10727 2018-01-17 Tom Tromey <tom@tromey.com>
10728
10729 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
10730 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
10731 (create_array_type_with_stride): Update.
10732 * dwarf2read.c (set_die_type): Update.
10733
10734 2018-01-17 Tom Tromey <tom@tromey.com>
10735
10736 * dwarf2read.c (delayed_method_info): Remove typedef.
10737 (dwarf2_cu::method_info): Now a std::vector.
10738 (add_to_method_list): Update.
10739 (free_delayed_list): Remove.
10740 (compute_delayed_physnames): Update.
10741 (process_full_comp_unit, process_full_type_unit): Clear the method
10742 list. Remove cleanups.
10743 (psymtab_include_file_name): Add name_holder parameter. Use
10744 unique_xmalloc_ptr.
10745 (dwarf_decode_lines): Update.
10746
10747 2018-01-17 Tom Tromey <tom@tromey.com>
10748 Simon Marchi <simon.marchi@ericsson.com>
10749
10750 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
10751 (dwarf2_per_objfile::free_cached_comp_units)
10752 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10753 (init_cutu_and_read_dies_no_follow): Update.
10754 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
10755 (dwarf2_cu::~dwarf2_cu): New.
10756 (free_heap_comp_unit, free_stack_comp_unit): Remove.
10757 (age_cached_comp_units, free_one_cached_comp_unit): Update.
10758
10759 2018-01-17 Tom Tromey <tom@tromey.com>
10760 Simon Marchi <simon.marchi@ericsson.com>
10761
10762 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
10763 (struct die_reader_specs) <abbrev_table>: New member.
10764 (struct abbrev_table): Add constructor.
10765 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
10766 <abbrev_obstack>: Now an auto_obstack.
10767 (abbrev_table_up): New typedef.
10768 (init_cu_die_reader): Add abbrev_table parameter.
10769 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
10770 Add result_dwo_abbrev_table.
10771 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10772 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
10773 Update.
10774 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
10775 parameter.
10776 (skip_children): Update.
10777 (abbrev_table::alloc_abbrev): Rename from
10778 abbrev_table_alloc_abbrev.
10779 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
10780 (abbrev_table::lookup_abbrev): Rename from
10781 abbrev_table_lookup_abbrev.
10782 (abbrev_table_read_table): Return abbrev_table_up.
10783 (abbrev_table_free, abbrev_table_free_cleanup)
10784 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
10785 (load_partial_dies): Update.
10786
10787 2018-01-17 Tom Tromey <tom@tromey.com>
10788
10789 * dwarf2read.c (dwarf2_compute_name): Update comment.
10790 (read_func_scope, read_variable): Update.
10791 (new_symbol): Remove.
10792 (new_symbol_full): Rename to new_symbol.
10793
10794 2018-01-17 Mike Gulick <mgulick@mathworks.com>
10795
10796 PR gdb/16577
10797 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
10798 a warning instead of throwing an error, set section size to 0 and return
10799 NULL.
10800 * gdb_bfd.h (gdb_bfd_map_section): Update description.
10801
10802 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
10803
10804 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
10805 std::string.
10806 (linux_ptrace_attach_fail_reason_string): Likewise.
10807 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
10808 Likewise.
10809 (linux_ptrace_attach_fail_reason_string): Likewise.
10810 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
10811
10812 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
10813
10814 * linux-nat.c (linux_nat_attach): Remove xstrdup.
10815
10816 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
10817
10818 PR gdb/21559
10819 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
10820 checking for fs_base/gs_base fields in struct user_regs_struct.
10821 * configure: Regenerate.
10822
10823 2018-01-17 Yao Qi <yao.qi@linaro.org>
10824
10825 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
10826 function.
10827 (aarch64_linux_init_abi): Install it to gdbarch hook
10828 gcc_target_options.
10829
10830 2018-01-15 Pedro Alves <palves@redhat.com>
10831
10832 * common/signals-state-save-restore.c
10833 (save_original_signals_state): Fix typos.
10834
10835 2017-01-12 Tom Tromey <tom@tromey.com>
10836 Sergio Durigan Junior <sergiodj@redhat.com>
10837
10838 * Makefile.in (install-only): Install gdb-add-index.
10839
10840 2018-01-12 John Baldwin <jhb@FreeBSD.org>
10841
10842 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
10843
10844 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
10845
10846 * infrun.c (keep_going_pass_signal): Clear step-over info when
10847 insert_breakpoints fails.
10848
10849 2018-01-11 Pedro Alves <palves@redhat.com>
10850
10851 PR gdb/22583
10852 * infrun.c (resume): Rename to ...
10853 (resume_1): ... this.
10854 (resume): Reimplement as wrapper around resume_1.
10855
10856 2018-01-11 Pedro Alves <palves@redhat.com>
10857
10858 PR remote/22597
10859 * remote.c (remote_parse_stop_reply): Default to the last-set
10860 general thread instead of to 'magic_null_ptid'.
10861
10862 2018-01-10 Pedro Alves <palves@redhat.com>
10863
10864 * language.h (language_get_symbol_name_matcher): Rename ...
10865 (get_symbol_name_matcher): ... this.
10866 * language.c (language_get_symbol_name_matcher): Ditto.
10867 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
10868 callers adjusted.
10869
10870 2018-01-10 Pedro Alves <palves@redhat.com>
10871
10872 PR gdb/22670
10873 * dwarf2read.c
10874 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
10875 Adjust to use language_get_symbol_name_matcher instead of
10876 language_defn::la_get_symbol_name_matcher.
10877 * language.c (language_get_symbol_name_matcher): If in Ada mode
10878 and the lookup name is a verbatim match, return Ada's matcher.
10879 * language.h (language_get_symbol_name_matcher): Adjust comment.
10880 (ada_lookup_name_info::verbatim_p):: New method.
10881
10882 2018-01-10 Pedro Alves <palves@redhat.com>
10883
10884 PR gdb/22670
10885 * ada-lang.c (ada_collect_symbol_completion_matches): If the
10886 minsym's language is language_auto or language_cplus, pass down
10887 language_ada instead.
10888 * symtab.c (compare_symbol_name): Don't frob symbol language here.
10889
10890 2018-01-10 Pedro Alves <palves@redhat.com>
10891
10892 PR gdb/22670
10893 * minsyms.c (linkage_name_str): New function.
10894 (iterate_over_minimal_symbols): Use it.
10895
10896 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10897
10898 * NEWS: Document that 'info proc' now works on FreeBSD.
10899
10900 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10901
10902 * configure.ac: Check for kinfo_getfile in libutil.
10903 * configure: Regenerate.
10904 * config.in: Regenerate.
10905 * fbsd-nat.c: Include "fbsd-tdep.h".
10906 (fbsd_fetch_cmdline): New.
10907 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
10908 rather than calling error.
10909 (fbsd_info_proc): New.
10910 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
10911 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
10912 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
10913
10914 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10915
10916 * fbsd-nat.c (struct free_deleter): Remove.
10917 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
10918
10919 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10920
10921 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
10922 NULL for an empty pathname.
10923
10924 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10925
10926 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
10927 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
10928 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
10929 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
10930 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
10931 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
10932 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
10933 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
10934 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
10935 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
10936 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
10937 (fbsd_core_fetch_timeval, fbsd_print_sigset)
10938 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
10939 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
10940 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
10941
10942 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
10943
10944 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
10945 (gnu_xfer_auxv): New function.
10946 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
10947 TARGET_OBJECT_AUXV.
10948
10949 2018-01-08 Yao Qi <yao.qi@linaro.org>
10950 Simon Marchi <simon.marchi@ericsson.com>
10951
10952 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
10953 common/selftest.c.
10954 (COMMON_OBS): Remove selftest.o.
10955 * configure.ac: Append selftest-arch.c and common/selftest.c to
10956 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
10957 * configure: Re-generated.
10958 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
10959 GDB_SELF_TEST.
10960 (maintenance_info_selftests): Likewise.
10961
10962 2018-01-08 Xavier Roirand <roirand@adacore.com>
10963
10964 * ada-valprint.c (val_print_packed_array_elements): Use
10965 proper number of elements when printing an array indexed
10966 by an enumeration type.
10967
10968 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10969
10970 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
10971 (dw2_get_file_names_reader): Adjust.
10972 (lookup_dwo_signatured_type): Adjust.
10973 (lookup_dwp_signatured_type): Adjust.
10974 (lookup_signatured_type): Adjust.
10975 (create_type_unit_group): Adjust.
10976 (get_type_unit_group): Adjust.
10977 (process_psymtab_comp_unit_reader): Adjust.
10978 (build_type_psymtabs_reader): Adjust.
10979 (scan_partial_symbols): Adjust.
10980 (add_partial_symbol): Adjust.
10981 (add_partial_subprogram): Adjust.
10982 (peek_die_abbrev): Adjust.
10983 (fixup_go_packaging): Adjust.
10984 (process_imported_unit_die): Adjust.
10985 (dwarf2_compute_name): Adjust.
10986 (dwarf2_physname): Adjust.
10987 (read_import_statement): Adjust.
10988 (handle_DW_AT_stmt_list): Adjust.
10989 (read_file_scope): Adjust.
10990 (read_func_scope): Adjust.
10991 (read_lexical_block_scope): Adjust.
10992 (read_call_site_scope): Adjust.
10993 (read_variable): Adjust.
10994 (dwarf2_rnglists_process): Adjust.
10995 (dwarf2_ranges_process): Adjust.
10996 (dwarf2_ranges_read): Adjust.
10997 (dwarf2_get_pc_bounds): Adjust.
10998 (dwarf2_record_block_ranges): Adjust.
10999 (dwarf2_add_field): Adjust.
11000 (dwarf2_add_member_fn): Adjust.
11001 (read_structure_type): Adjust.
11002 (process_structure_scope): Adjust.
11003 (read_enumeration_type): Adjust.
11004 (read_array_type): Adjust.
11005 (mark_common_block_symbol_computed): Adjust.
11006 (read_common_block): Adjust.
11007 (read_namespace_type): Adjust.
11008 (read_namespace): Adjust.
11009 (read_module_type): Adjust.
11010 (read_tag_pointer_type): Adjust.
11011 (read_tag_ptr_to_member_type): Adjust.
11012 (read_tag_string_type): Adjust.
11013 (read_subroutine_type): Adjust.
11014 (read_typedef): Adjust.
11015 (read_base_type): Adjust.
11016 (attr_to_dynamic_prop): Adjust.
11017 (read_subrange_type): Adjust.
11018 (read_unspecified_type): Adjust.
11019 (dwarf2_read_abbrevs): Adjust.
11020 (load_partial_dies): Adjust.
11021 (read_partial_die): Adjust.
11022 (find_partial_die): Adjust.
11023 (guess_partial_die_structure_name): Adjust.
11024 (fixup_partial_die): Adjust.
11025 (read_attribute_value): Adjust.
11026 (read_addr_index): Adjust.
11027 (read_addr_index_from_leb128): Adjust.
11028 (read_str_index): Adjust.
11029 (dwarf2_string_attr): Adjust.
11030 (get_debug_line_section): Adjust.
11031 (dwarf_decode_line_header): Adjust.
11032 (lnp_state_machine::check_line_address): Adjust.
11033 (dwarf_decode_lines_1): Adjust.
11034 (dwarf_decode_lines): Adjust.
11035 (dwarf2_start_symtab): Adjust.
11036 (var_decode_location): Adjust.
11037 (new_symbol_full): Adjust.
11038 (dwarf2_const_value_data): Adjust.
11039 (dwarf2_const_value_attr): Adjust.
11040 (dwarf2_const_value): Adjust.
11041 (die_type): Adjust.
11042 (die_containing_type): Adjust.
11043 (build_error_marker_type): Adjust.
11044 (lookup_die_type): Adjust.
11045 (guess_full_die_structure_name): Adjust.
11046 (anonymous_struct_prefix): Adjust.
11047 (determine_prefix): Adjust.
11048 (dwarf2_name): Adjust.
11049 (follow_die_ref_or_sig): Adjust.
11050 (follow_die_offset): Adjust.
11051 (follow_die_ref): Adjust.
11052 (follow_die_sig_1): Adjust.
11053 (follow_die_sig): Adjust.
11054 (get_signatured_type): Adjust.
11055 (get_DW_AT_signature_type): Adjust.
11056 (decode_locdesc): Adjust.
11057 (dwarf_decode_macros): Adjust.
11058 (cu_debug_loc_section): Adjust.
11059 (fill_in_loclist_baton): Adjust.
11060 (dwarf2_symbol_mark_computed): Adjust.
11061 (init_one_comp_unit): Don't assign
11062 dwarf2_cu::dwarf2_per_objfile.
11063 (set_die_type): Adjust.
11064
11065 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11066
11067 * dwarf2read.c (struct mapped_debug_names): Add constructor.
11068 <dwarf2_per_objfile>: New field.
11069 (dwarf2_per_objfile): Remove global.
11070 (get_dwarf2_per_objfile): New function.
11071 (set_dwarf2_per_objfile): New function.
11072 (dwarf2_build_psymtabs_hard): Change objfile parameter to
11073 dwarf2_per_objfile.
11074 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
11075 (read_abbrev_offset): Likewise.
11076 (read_indirect_string): Likewise.
11077 (read_indirect_line_string): Likewise.
11078 (read_indirect_string_at_offset): Likewise.
11079 (read_indirect_string_from_dwz): Likewise.
11080 (dwarf2_find_containing_comp_unit): Change objfile parameter to
11081 dwarf2_per_objfile.
11082 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11083 (create_all_comp_units): Change objfile parameter to
11084 dwarf2_per_objfile.
11085 (create_all_type_units): Likewise.
11086 (process_queue): Add dwarf2_per_objfile parameter.
11087 (read_and_check_comp_unit_head): Likewise.
11088 (lookup_dwo_unit_in_dwp): Likewise.
11089 (get_dwp_file): Likewise.
11090 (process_cu_includes): Likewise.
11091 (struct free_dwo_file_cleanup_data): New struct.
11092 (dwarf2_has_info): Use get_dwarf2_per_objfile and
11093 set_dwarf2_per_objfile.
11094 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
11095 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
11096 context, adjust calls.
11097 (dw2_instantiate_symtab): Likewise.
11098 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
11099 (dw2_get_cu): Likewise.
11100 (create_cu_from_index_list): Change objfile parameter to
11101 dwarf2_per_objfile.
11102 (create_cus_from_index_list): Get dwarf2_per_objfile from
11103 context, adjust calls.
11104 (create_cus_from_index): Likewise.
11105 (create_signatured_type_table_from_index): Change objfile
11106 parameter to dwarf2_per_objfile.
11107 (create_signatured_type_table_from_debug_names): Change objfile
11108 parameter to dwarf2_per_objfile.
11109 (create_addrmap_from_index): Likewise.
11110 (create_addrmap_from_aranges): Likewise.
11111 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
11112 (dw2_setup): Remove.
11113 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
11114 context.
11115 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
11116 get_dwarf2_per_objfile.
11117 (dw2_forget_cached_source_info): Likewise.
11118 (dw2_map_symtabs_matching_filename): Likewise.
11119 (struct dw2_symtab_iterator) <index>: Remove.
11120 <dwarf2_per_objfile>: New field.
11121 (dw2_symtab_iter_init): Replace index parameter with
11122 dwarf2_per_objfile.
11123 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
11124 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
11125 (dw2_print_stats): Likewise.
11126 (dw2_dump): Likewise.
11127 (dw2_expand_symtabs_for_function): Likewise.
11128 (dw2_expand_all_symtabs): Likewise.
11129 (dw2_expand_symtabs_with_fullname): Likewise.
11130 (dw2_expand_marked_cus): Replace index and objfile parameters
11131 with dwarf2_per_objfile.
11132 (dw_expand_symtabs_matching_file_matcher): Add
11133 dwarf2_per_objfile parameter and adjust calls.
11134 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
11135 adjust calls.
11136 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
11137 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
11138 adjust calls.
11139 (create_cus_from_debug_names_list): Replace objfile parameter
11140 with dwarf2_per_objfile and adjust calls.
11141 (create_cus_from_debug_names): Likewise.
11142 (dwarf2_read_debug_names): Likewise.
11143 (mapped_debug_names::namei_to_name): Adjust call.
11144 (dw2_debug_names_iterator::next): Likewise.
11145 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
11146 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
11147 (dw2_debug_names_dump): Likewise.
11148 (dw2_debug_names_expand_symtabs_for_function): Likewise.
11149 (dw2_debug_names_expand_symtabs_matching): Likewise.
11150 (dwarf2_initialize_objfile): Likewise.
11151 (dwarf2_build_psymtabs): Likewise.
11152 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
11153 this_cu.
11154 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
11155 (read_and_check_comp_unit_head): Likewise.
11156 (read_abbrev_offset): Likewise.
11157 (create_debug_type_hash_table): Likewise.
11158 (create_debug_types_hash_table): Likewise.
11159 (create_all_type_units): Replace objfile parameter with
11160 dwarf2_per_objfile.
11161 (add_type_unit): Add dwarf2_per_objfile parameter.
11162 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
11163 with dwarf2_per_objfile.
11164 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
11165 (lookup_dwp_signatured_type): Likewise.
11166 (lookup_signatured_type): Likewise.
11167 (read_cutu_die_from_dwo): Likewise.
11168 (init_tu_and_read_dwo_dies): Likewise.
11169 (init_cutu_and_read_dies): Likewise.
11170 (init_cutu_and_read_dies_no_follow): Likewise.
11171 (allocate_type_unit_groups_table): Add objfile parameter.
11172 (create_type_unit_group): Use dwarf2_per_objfile from cu.
11173 (get_type_unit_group): Likewise.
11174 (process_psymtab_comp_unit): Update call.
11175 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
11176 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
11177 (print_tu_stats): Likewise.
11178 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
11179 in void* parameter.
11180 (build_type_psymtabs): Change objfile parameter to
11181 dwarf2_per_objfile.
11182 (process_skeletonless_type_unit): Use dwarf2_per_objfile
11183 passed in void* parameter.
11184 (process_skeletonless_type_units): Change objfile parameter to
11185 dwarf2_per_objfile.
11186 (set_partial_user): Likewise.
11187 (dwarf2_build_psymtabs_hard): Likewise.
11188 (read_comp_units_from_section): Likewise.
11189 (create_all_comp_units): Likewise.
11190 (scan_partial_symbols): Update calls.
11191 (add_partial_symbol): Likewise.
11192 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
11193 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
11194 (process_queue): Add dwarf2_per_objfile parameter.
11195 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
11196 (compute_compunit_symtab_includes): Likewise.
11197 (process_cu_includes): Add dwarf2_per_objfile parameter.
11198 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
11199 (process_full_type_unit): Likewise.
11200 (process_imported_unit_die): Update call.
11201 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
11202 (read_file_scope): Likewise.
11203 (allocate_dwo_file_hash_table): Add objfile parameter.
11204 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
11205 (create_cus_hash_table): Likewise.
11206 (create_dwp_hash_table): Likewise.
11207 (create_dwo_unit_in_dwp_v1): Likewise.
11208 (create_dwp_v2_section): Likewise.
11209 (create_dwo_unit_in_dwp_v2): Likewise.
11210 (lookup_dwo_unit_in_dwp): Likewise.
11211 (try_open_dwop_file): Likewise.
11212 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
11213 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
11214 cleanup to include a reference to dwarf2_per_objfile.
11215 (open_dwp_file): Add dwarf2_per_objfile parameter.
11216 (open_and_init_dwp_file): Likewise.
11217 (get_dwp_file): Likewise.
11218 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
11219 (queue_and_load_all_dwo_tus): Update call.
11220 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
11221 data.
11222 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
11223 (dwarf2_ranges_process): Likewise.
11224 (dwarf2_get_pc_bounds): Likewise.
11225 (mark_common_block_symbol_computed): Likewise.
11226 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
11227 (dwarf2_read_abbrevs): Update call.
11228 (read_partial_die): Use dwarf2_per_objfile from cu.
11229 (find_partial_die): Likewise.
11230 (fixup_partial_die): Likewise.
11231 (read_attribute_value): Likewise.
11232 (read_indirect_string_at_offset_from): Add objfile parameter.
11233 (read_indirect_string_at_offset): Add dwarf2_per_objfile
11234 parameter.
11235 (read_indirect_string_from_dwz): Add objfile parameter.
11236 (read_indirect_string): Add objfile parameter.
11237 (read_addr_index_1): Add dwarf2_per_objfile parameter.
11238 (read_addr_index): Use dwarf2_per_objfile from cu.
11239 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
11240 call dw2_setup.
11241 (read_str_index): Use dwarf2_per_objfile from cu.
11242 (get_debug_line_section): Likewise.
11243 (read_formatted_entries): Add dwarf2_per_objfile parameter.
11244 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
11245 (new_symbol_full): Use dwarf2_per_objfile from cu.
11246 (build_error_marker_type): Likewise.
11247 (lookup_die_type): Likewise.
11248 (determine_prefix): Likewise.
11249 (follow_die_offset): Likewise.
11250 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
11251 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
11252 (dwarf2_fetch_die_type_sect_off): Likewise.
11253 (dwarf2_get_die_type): Likewise.
11254 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
11255 (get_signatured_type): Likewise.
11256 (get_DW_AT_signature_type): Likewise.
11257 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
11258 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
11259 (cu_debug_loc_section): Likewise.
11260 (fill_in_loclist_baton): Likewise.
11261 (dwarf2_symbol_mark_computed): Likewise.
11262 (dwarf2_find_containing_comp_unit): Change objfile parameter to
11263 dwarf2_per_objfile.
11264 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
11265 parameter.
11266 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11267 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
11268 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
11269 (set_die_type): Use dwarf2_free_objfile from cu.
11270 (get_die_type_at_offset): Likewise.
11271 (dwarf2_per_objfile_free): Don't assign global variable.
11272 (debug_names) <constructor>: Add dwarf2_per_objfile
11273 parameter, update m_debugstrlookup construction.
11274 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
11275 parameter.
11276 <m_dwarf2_per_objfile>: New field.
11277 <lookup>: Use m_dwarf2_per_objfile.
11278 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
11279 (psyms_seen_size): Likewise.
11280 (write_gdbindex): Replace objfile parameter with
11281 dwarf2_per_objfile.
11282 (write_debug_names): Likewise.
11283 (write_psymtabs_to_index): Likewise.
11284 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
11285 calls.
11286
11287 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11288
11289 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
11290 <dwarf2_per_objfile>: New field.
11291 (struct dwarf2_per_cu_data) <objfile>: Remove.
11292 <dwarf2_per_objfile>: New field.
11293 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
11294 of objfile.
11295 (create_signatured_type_table_from_index): Likewise.
11296 (create_debug_type_hash_table): Likewise.
11297 (fill_in_sig_entry_from_dwo_entry): Likewise.
11298 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
11299 (create_type_unit_group): Assign dwarf2_per_objfile instead of
11300 objfile.
11301 (create_partial_symtab): Access objfile through
11302 dwarf2_per_objfile.
11303 (process_psymtab_comp_unit_reader): Likewise.
11304 (read_comp_units_from_section): Likewise.
11305 (scan_partial_symbols): Likewise.
11306 (add_partial_symbol): Likewise.
11307 (add_partial_subprogram): Likewise.
11308 (peek_die_abbrev): Likewise.
11309 (fixup_go_packaging): Likewise.
11310 (process_full_comp_unit): Likewise.
11311 (process_full_type_unit): Likewise.
11312 (process_imported_unit_die): Likewise.
11313 (dwarf2_compute_name): Likewise.
11314 (dwarf2_physname): Likewise.
11315 (read_import_statement): Likewise.
11316 (create_cus_hash_table): Assign dwarf2_physname instead of
11317 objfile.
11318 (read_func_scope): Access objfile through dwarf2_per_objfile.
11319 (read_lexical_block_scope): Likewise.
11320 (read_call_site_scope): Likewise.
11321 (read_variable): Likewise.
11322 (dwarf2_rnglists_process): Likewise.
11323 (dwarf2_ranges_process): Likewise.
11324 (dwarf2_ranges_read): Likewise.
11325 (dwarf2_record_block_ranges): Likewise.
11326 (dwarf2_add_field): Likewise.
11327 (dwarf2_add_member_fn): Likewise.
11328 (read_structure_type): Likewise.
11329 (process_structure_scope): Likewise.
11330 (read_enumeration_type): Likewise.
11331 (read_array_type): Likewise.
11332 (read_common_block): Likewise.
11333 (read_namespace_type): Likewise.
11334 (read_namespace): Likewise.
11335 (read_module_type): Likewise.
11336 (read_tag_pointer_type): Likewise.
11337 (read_tag_ptr_to_member_type): Likewise.
11338 (read_tag_string_type): Likewise.
11339 (read_subroutine_type): Likewise.
11340 (read_typedef): Likewise.
11341 (read_base_type): Likewise.
11342 (attr_to_dynamic_prop): Likewise.
11343 (read_subrange_type): Likewise.
11344 (read_unspecified_type): Likewise.
11345 (load_partial_dies): Likewise.
11346 (read_partial_die): Likewise.
11347 (find_partial_die): Likewise.
11348 (guess_partial_die_structure_name): Likewise.
11349 (fixup_partial_die): Likewise.
11350 (read_attribute_value): Likewise.
11351 (read_addr_index_from_leb128): Likewise.
11352 (dwarf2_read_addr_index): Likewise.
11353 (dwarf2_string_attr): Likewise.
11354 (lnp_state_machine::check_line_address): Likewise.
11355 (dwarf_decode_lines_1): Likewise.
11356 (dwarf_decode_lines): Likewise.
11357 (dwarf2_start_symtab): Likewise.
11358 (var_decode_location): Likewise.
11359 (new_symbol_full): Likewise.
11360 (dwarf2_const_value_data): Likewise.
11361 (dwarf2_const_value_attr): Likewise.
11362 (dwarf2_const_value): Likewise.
11363 (die_type): Likewise.
11364 (die_containing_type): Likewise.
11365 (lookup_die_type): Likewise.
11366 (guess_full_die_structure_name): Likewise.
11367 (anonymous_struct_prefix): Likewise.
11368 (dwarf2_name): Likewise.
11369 (follow_die_ref_or_sig): Likewise.
11370 (follow_die_offset): Likewise.
11371 (follow_die_ref): Likewise.
11372 (dwarf2_fetch_die_loc_sect_off): Likewise.
11373 (dwarf2_fetch_constant_bytes): Likewise.
11374 (dwarf2_fetch_die_type_sect_off): Likewise.
11375 (dwarf2_get_die_type): Likewise.
11376 (follow_die_sig): Likewise.
11377 (decode_locdesc): Likewise.
11378 (dwarf2_per_cu_objfile): Likewise.
11379 (dwarf2_per_cu_text_offset): Likewise.
11380 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
11381 objfile.
11382 (set_die_type): Access objfile through
11383 dwarf2_per_objfile.
11384
11385 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11386
11387 * valprint.c (converted_character_d): Remove typedef.
11388 (DEF_VEC_O (converted_character_d)): Remove.
11389 (count_next_character): Use std::vector.
11390 (print_converted_chars_to_obstack): Likewise.
11391 (generic_printstr): Likewise.
11392
11393 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11394
11395 * xml-support.h (struct gdb_xml_value): Add constructor.
11396 <value>: Change type to unique_xmalloc_ptr.
11397 (gdb_xml_value_s): Remove typedef.
11398 (DEF_VEC_O (gdb_xml_value_s)): Remove.
11399 (gdb_xml_element_start_handler): Change parameter type to
11400 std::vector.
11401 (xml_find_attribute): Likewise.
11402 * xml-support.c (xml_find_attribute): Change parameter type to
11403 std::vector and adjust.
11404 (gdb_xml_values_cleanup): Remove.
11405 (gdb_xml_parser::start_element): Adjust to std::vector.
11406 (xinclude_start_include): Change paraeter type to std::vector
11407 and adjust.
11408 * btrace.c (check_xml_btrace_version): Likewise.
11409 (parse_xml_btrace_block): Likewise.
11410 (parse_xml_btrace_pt_config_cpu): Likewise.
11411 (parse_xml_btrace_pt): Likewise.
11412 (parse_xml_btrace_conf_bts): Likewise.
11413 (parse_xml_btrace_conf_pt): Likewise.
11414 * memory-map.c (memory_map_start_memory): Likewise.
11415 (memory_map_start_property): Likewise.
11416 * osdata.c (osdata_start_osdata): Likewise.
11417 (osdata_start_item): Likewise.
11418 (osdata_start_column): Likewise.
11419 * remote.c (start_thread): Likewise.
11420 * solib-aix.c (library_list_start_library): Likewise.
11421 (library_list_start_list): Likewise.
11422 * solib-svr4.c (library_list_start_library): Likewise.
11423 (svr4_library_list_start_list): Likewise.
11424 * solib-target.c (library_list_start_segment): Likewise.
11425 (library_list_start_section): Likewise.
11426 (library_list_start_library): Likewise.
11427 (library_list_start_list): Likewise.
11428 * tracepoint.c (traceframe_info_start_memory): Likewise.
11429 (traceframe_info_start_tvar): Likewise.
11430 * xml-syscall.c (syscall_start_syscall): Likewise.
11431 * xml-tdesc.c (tdesc_start_target): Likewise.
11432 (tdesc_start_feature): Likewise.
11433 (tdesc_start_reg): Likewise.
11434 (tdesc_start_union): Likewise.
11435 (tdesc_start_struct): Likewise.
11436 (tdesc_start_flags): Likewise.
11437 (tdesc_start_enum): Likewise.
11438 (tdesc_start_field): Likewise.
11439 (tdesc_start_enum_value): Likewise.
11440 (tdesc_start_vector): Likewise.
11441
11442 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11443
11444 * extension.h (struct xmethod_worker) <clone>: Remove.
11445 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
11446 Remove.
11447 (python_xmethod_worker::clone): Remove.
11448 * valops.c (find_overload_match): Use std::move instead of
11449 clone.
11450
11451 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11452
11453 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
11454 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
11455 <free_xmethod_worker_data>: Remove.
11456 <get_matching_xmethod_workers>: Chance VEC to std::vector.
11457 <get_xmethod_arg_types>: Remove.
11458 <get_xmethod_result_type>: Remove.
11459 <invoke_xmethod>: Remove.
11460 * extension.c (new_xmethod_worker): Remove.
11461 (clone_xmethod_worker): Remove.
11462 (get_matching_xmethod_workers): Return void, pass std::vector by
11463 pointer.
11464 (get_xmethod_arg_types): Rename to...
11465 (xmethod_worker::get_arg_types): ... this, and adjust.
11466 (get_xmethod_result_type): Rename to...
11467 (xmethod_worker::get_result_type): ... this, and adjust.
11468 (invoke_xmethod): Remove.
11469 (free_xmethod_worker): Remove.
11470 (free_xmethod_worker_vec): Remove.
11471 * extension.h (enum ext_lang_rc): Move here from
11472 extension-priv.h.
11473 (struct xmethod_worker): Add constructor and destructor.
11474 <data>: Remove.
11475 <value>: Remove.
11476 <invoke, clone, do_get_result_type, do_get_arg_types>: New
11477 virtual pure methods.
11478 <get_arg_types, get_result_type>: New methods.
11479 (xmethod_worker_ptr): Remove typedef.
11480 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
11481 (xmethod_worker_vec): Remove typedef.
11482 (xmethod_worker_up): New typedef.
11483 (invoke_xmethod): Remove.
11484 (clone_xmethod_worker): Remove.
11485 (free_xmethod_worker): Remove.
11486 (free_xmethod_worker_vec): Remove.
11487 (get_xmethod_arg_types): Remove.
11488 (get_xmethod_result_type): Remove.
11489 * valops.c (find_method_list): Use std::vector, don't use
11490 intermediate vector.
11491 (value_find_oload_method_list): Use std::vector.
11492 (find_overload_match): Use std::vector.
11493 (find_oload_champ): Use std::vector.
11494 * value.c (value_free): Use operator delete.
11495 (value_of_xmethod): Rename to...
11496 (value_from_xmethod): ... this. Don't assign
11497 xmethod_worker::value, take rvalue-reference.
11498 (result_type_of_xmethod): Adjust.
11499 (call_xmethod): Adjust.
11500 * value.h: Include extension.h.
11501 (struct xmethod_worker): Don't forward-declare.
11502 (value_of_xmethod): Rename to...
11503 (value_from_xmethod): ... this, take rvalue-reference.
11504 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
11505 (struct python_xmethod_worker): ... this, add constructor and
11506 destructor.
11507 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
11508 (gdbpy_free_xmethod_worker_data): Rename to...
11509 (python_xmethod_worker::~python_xmethod_worker): ... this and
11510 adjust.
11511 (gdbpy_clone_xmethod_worker_data): Rename to...
11512 (python_xmethod_worker::clone): ... this and adjust.
11513 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
11514 temporary vector.
11515 (gdbpy_get_xmethod_arg_types): Rename to...
11516 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
11517 (gdbpy_get_xmethod_result_type): Rename to...
11518 (python_xmethod_worker::do_get_result_type): ... this and
11519 adjust.
11520 (gdbpy_invoke_xmethod): Rename to...
11521 (python_xmethod_worker::invoke): ... this and adjust.
11522 (new_python_xmethod_worker): Rename to...
11523 (python_xmethod_worker::python_xmethod_worker): ... this and
11524 adjust.
11525 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
11526 Remove.
11527 (gdbpy_free_xmethod_worker_data): Remove.
11528 (gdbpy_get_matching_xmethod_workers): Use std::vector.
11529 (gdbpy_get_xmethod_arg_types): Remove.
11530 (gdbpy_get_xmethod_result_type): Remove.
11531 (gdbpy_invoke_xmethod): Remove.
11532 * python/python.c (python_extension_ops): Remove obsolete
11533 callbacks.
11534
11535 2018-01-05 Pedro Alves <palves@redhat.com>
11536
11537 PR gdb/18653
11538 * common/signals-state-save-restore.c
11539 (save_original_signals_state): New parameter 'quiet'. Warn if we
11540 find a custom handler preinstalled, instead of internal erroring.
11541 But only warn if !quiet.
11542 * common/signals-state-save-restore.h
11543 (save_original_signals_state): New parameter 'quiet'.
11544 * main.c (captured_main_1): Move save_original_signals_state call
11545 after option handling, and pass QUIET.
11546
11547 2018-01-05 Pedro Alves <palves@redhat.com>
11548
11549 * spu-tdep.c (spu_catch_start): Pass
11550 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
11551
11552 2018-01-05 Pedro Alves <palves@redhat.com>
11553
11554 PR gdb/22670
11555 * ada-lang.c (literal_symbol_name_matcher): New function.
11556 (ada_get_symbol_name_matcher): Use it for
11557 symbol_name_match_type::SEARCH_NAME.
11558 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
11559 it down instead of assuming symbol_name_match_type::FULL.
11560 * block.h (block_lookup_symbol): New parameter 'match_type'.
11561 * c-valprint.c (print_unpacked_pointer): Use
11562 lookup_symbol_search_name instead of lookup_symbol.
11563 * compile/compile-object-load.c (get_out_value_type): Pass down
11564 symbol_name_match_type::SEARCH_NAME.
11565 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
11566 symbol_name_match_type::FULL.
11567 * cp-support.c (cp_get_symbol_name_matcher): Handle
11568 symbol_name_match_type::SEARCH_NAME.
11569 * infrun.c (insert_exception_resume_breakpoint): Use
11570 lookup_symbol_search_name.
11571 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
11572 * psymtab.c (maintenance_check_psymtabs): Use
11573 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
11574 * stack.c (print_frame_args): Use lookup_symbol_search_name and
11575 SYMBOL_SEARCH_NAME.
11576 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
11577 if symbol_name_match_type::SEARCH_NAME.
11578 (lookup_symbol_in_language): Pass down
11579 symbol_name_match_type::FULL.
11580 (lookup_symbol_search_name): New.
11581 (lookup_language_this): Pass down
11582 symbol_name_match_type::SEARCH_NAME.
11583 (lookup_symbol_aux, lookup_local_symbol): New parameter
11584 'match_type'. Pass it down.
11585 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
11586 (lookup_symbol_search_name): New declaration.
11587 (lookup_symbol_in_block): New 'match_type' parameter.
11588
11589 2018-01-05 Pedro Alves <palves@redhat.com>
11590
11591 PR gdb/22670
11592 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
11593 ada_lookup_symbol.
11594 (ada_lookup_symbol): Reimplement in terms of
11595 ada_lookup_symbol_list, bits factored out from
11596 ada_lookup_encoded_symbol.
11597
11598 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11599
11600 * ada-exp.y (write_object_renaming): When subscripting an array
11601 using a symbol as the index, pass the block in call to
11602 ada_lookup_encoded_symbol when looking that symbol up.
11603
11604 2018-01-05 Jerome Guitton <guitton@adacore.com>
11605
11606 * ada-lang.c (ada_array_length): Use ada_index_type instead of
11607 TYPE_INDEX_TYPE.
11608
11609 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11610
11611 * ada-lang.c (ada_to_fixed_value_create): Add handling of
11612 the case where VALUE_LVAL (val0) is not lval_memory.
11613
11614 2018-01-05 Xavier Roirand <roirand@adacore.com>
11615
11616 * ada-valprint.c (print_optional_low_bound): Handle
11617 character-indexed array printing like boolean-indexed array
11618 printing.
11619
11620 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11621
11622 * NEWS: Create a new section for the next release branch.
11623 Rename the section of the current branch, now that it has
11624 been cut.
11625
11626 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11627
11628 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
11629 * version.in: Bump version to 8.1.50.DATE-git.
11630
11631 2018-01-03 Xavier Roirand <roirand@adacore.com>
11632
11633 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
11634 Add field.
11635 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
11636 Add field.
11637 (default_exception_support_info) <catch_handlers_sym>: Add field.
11638 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
11639 (ada_exception_name_addr_1): Add "catch handlers" handling.
11640 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
11641 Update all callers.
11642 (create_excep_cond_exprs) <ex>: Add parameter.
11643 (re_set_exception): Update create_excep_cond_exprs call.
11644 (print_it_exception, print_one_exception, print_mention_exception)
11645 (print_recreate_exception): Add "catch handler" handling.
11646 (allocate_location_catch_handlers, re_set_catch_handlers)
11647 (check_status_catch_handlers, print_it_catch_handlers)
11648 (print_one_catch_handlers, print_mention_catch_handlers)
11649 (print_recreate_catch_handlers): New function.
11650 (catch_handlers_breakpoint_ops): New variable.
11651 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
11652 Add parameter. Add "catch handler" handling.
11653 (ada_exception_sym_name, ada_exception_breakpoint_ops):
11654 Add "catch handler" handling.
11655 (ada_exception_catchpoint_cond_string): Add "catch handler"
11656 handling.
11657 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
11658 call.
11659 (catch_ada_handlers_command): New function.
11660 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
11661 operations structure.
11662 (_initialize_ada_language): Add "catch handlers" command entry.
11663 * NEWS: Document "catch handlers" feature.
11664
11665 2018-01-02 Joel Brobecker <brobecker@adacore.com>
11666
11667 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
11668 account when creating the array type of the slice.
11669 (ada_value_slice): Likewise.
11670
11671 2018-01-02 Joel Brobecker <brobecker@adacore.com>
11672
11673 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
11674 New enum value.
11675 (create_array_type_with_stride): Add byte_stride_prop parameter.
11676 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
11677 New parameter. Update all callers in this file.
11678 (array_type_has_dynamic_stride): New function.
11679 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
11680 of arrays with dynamic byte strides.
11681 * dwarf2read.c (read_array_type): Add support for dynamic
11682 DW_AT_byte_stride attributes.
11683
11684 2018-01-02 Joel Brobecker <brobecker@adacore.com>
11685
11686 * dwarf2read.c (read_unspecified_type): Treat
11687 DW_TAG_enumeration_type DIEs from Ada units as stubs.
11688
11689 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11690
11691 Update copyright year range in all GDB files.
11692
11693 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11694
11695 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
11696 and gdb/testsuite/gdb.base/step-line.c.
11697
11698 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11699
11700 * copyright.py (main): Dump the contents of
11701 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
11702 even if BY_HAND is empty.
11703
11704 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11705
11706 * top.c (print_gdb_version): Update Copyright year in version
11707 message.
11708
11709 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11710
11711 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
11712
11713 For older changes see ChangeLog-2017.
11714 \f
11715 Local Variables:
11716 mode: change-log
11717 left-margin: 8
11718 fill-column: 74
11719 version-control: never
11720 coding: utf-8
11721 End:
This page took 0.440451 seconds and 4 git commands to generate.