RISC-V: Don't decrement pc after break.
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2018-07-17 Jim Wilson <jimw@sifive.com>
2
3 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
4 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
5 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
6 unecessary braces after EF_RISCV_RVC test. Delete call to
7 set_gdbarch_decr_pc_after_break.
8
9 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
10 RISCV_LAST_FP_REGNUM + 1.
11 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
12
13 2018-07-17 Tom Tromey <tom@tromey.com>
14
15 * configure.ac: Remove --disable-gdbcli.
16 * configure: Rebuild.
17 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
18 (SUBDIR_CLI_CFLAGS): Remove.
19 (SFILES): Use SUBDIR_CLI_SRCS.
20 (COMMON_OBS): Use SUBDIR_CLI_OBS.
21
22 2018-07-17 Tom Tromey <tom@tromey.com>
23
24 PR gdb/18624:
25 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
26
27 2018-07-16 Jim Wilson <jimw@sifive.com>
28
29 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
30
31 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
32
33 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
34 variable.
35 (libunwind_frame_sniffer): Likewise.
36 (libunwind_frame_prev_register): Likewise.
37 (libunwind_sigtramp_frame_sniffer): Likewise.
38 * ia64-tdep.c (ia64_access_reg): Likewise.
39 (ia64_access_rse_reg): Likewise.
40 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
41 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
42
43 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
44
45 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
46
47 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
48
49 * remote-sim.c (gdbsim_target::close,
50 gdbsim_target::mourn_inferior): Remove unused variables.
51
52 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
53
54 * ia64-tdep.c (ktab_buf): New global.
55 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
56 (get_kernel_table): Adjust.
57
58 2018-07-16 Tom Tromey <tom@tromey.com>
59
60 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
61 * dwarf2read.c (using_directives, new_symbol): Use
62 outermost_context_p.
63 * dbxread.c (process_one_symbol): Use outermost_context_p.
64 * coffread.c (coff_symtab_read): Use outermost_context_p.
65
66 2018-07-16 Tom Tromey <tom@tromey.com>
67
68 * dwarf2read.c (using_directives, read_func_scope)
69 (read_lexical_block_scope): Update.
70 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
71 * buildsym.h (local_using_directives, global_using_directives):
72 Don't declare.
73 (get_local_using_directives, set_local_using_directives)
74 (get_global_using_directives): Declare.
75 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
76 m_global_using_directives>: New members.
77 (finish_block_internal, prepare_for_building)
78 (reset_symtab_globals, end_symtab_get_static_block)
79 (push_context): Update.
80 (get_local_using_directives, set_local_using_directives)
81 (get_global_using_directives): New functions.
82 (buildsym_init): Update.
83
84 2018-07-16 Tom Tromey <tom@tromey.com>
85
86 * xcoffread.c (xcoff_initial_scan): Don't call
87 free_pending_blocks.
88 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
89 * buildsym.h (class scoped_free_pendings): Add constructor.
90 (free_pending_blocks): Don't declare.
91 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
92 (free_pending_blocks): Now static.
93
94 2018-07-16 Tom Tromey <tom@tromey.com>
95
96 * buildsym.h (push_subfile, pop_subfile): Update declarations.
97 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
98 member.
99 (struct subfile_stack): Remove.
100 (subfile_stack): Remove.
101 (push_subfile, pop_subfile, buildsym_init): Update.
102
103 2018-07-16 Tom Tromey <tom@tromey.com>
104
105 * buildsym.c (push_subfile): Use gdb_assert.
106 (pop_subfile): Use gdb_assert.
107
108 2018-07-16 Tom Tromey <tom@tromey.com>
109
110 * buildsym.h (merge_symbol_lists): Remove.
111 * buildsym.c (merge_symbol_lists): Remove.
112
113 2018-07-16 Tom Tromey <tom@tromey.com>
114
115 * stabsread.c (scan_file_globals): Update comment.
116 * stabsread.h (scan_file_globals): Move from buildsym.h.
117 * buildsym.h (scan_file_globals): Move to stabsread.h.
118
119 2018-07-16 Tom Tromey <tom@tromey.com>
120
121 * xcoffread.c (xcoff_new_init): Update.
122 * mipsread.c (mipscoff_new_init): Update.
123 * mdebugread.c (mdebug_build_psymtabs): Update.
124 * elfread.c (elf_new_init): Update.
125 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
126 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
127 * buildsym.h (buildsym_new_init): Don't declare.
128 * buildsym.c (buildsym_new_init): Remove.
129
130 2018-07-16 Tom Tromey <tom@tromey.com>
131
132 * stabsread.h (within_function): Move from buildsym.h.
133 * stabsread.c (start_stabs): Clear within_function.
134 * coffread.c (coff_start_symtab): Clear within_function.
135 * buildsym.h (within_function): Move to stabsread.h.
136 * buildsym.c (prepare_for_building): Update.
137
138 2018-07-16 Tom Tromey <tom@tromey.com>
139
140 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
141 * dwarf2read.c (dwarf2_start_symtab): Don't set
142 processing_gcc_compilation.
143 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
144
145 2018-07-16 Tom Tromey <tom@tromey.com>
146
147 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
148 (next_symbol_text_func): Move from buildsym.h.
149 * stabsread.c (hashname): Move from buildsym.c.
150 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
151 (next_symbol_text_func, hashname): Move to stabsread.h.
152 * buildsym.c: Don't include bcache.h
153 (hashname): Move to stasbread.c.
154
155 2018-07-16 Tom Tromey <tom@tromey.com>
156
157 * buildsym.h (context_stack_size): Don't declare.
158 * buildsym.c (context_stack_size): New global.
159
160 2018-07-16 Tom Tromey <tom@tromey.com>
161
162 * dbxread.c (processing_acc_compilation): New global.
163 * buildsym.h (processing_acc_compilation): Don't declare.
164
165 2018-07-16 Tom Tromey <tom@tromey.com>
166
167 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
168 * dbxread.c (read_ofile_symtab): Update.
169 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
170 * buildsym.h (last_source_start_addr): Remove.
171 (set_last_source_start_addr, get_last_source_start_addr):
172 Declare.
173 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
174 parameter.
175 (struct buildsym_compunit) <m_last_source_start_addr>: New
176 member.
177 (prepare_for_building): Remove start_addr parameter.
178 (start_symtab, restart_symtab, end_symtab_get_static_block)
179 (end_symtab_with_blockvector): Update.
180 (set_last_source_start_addr, get_last_source_start_addr): New
181 functions.
182
183 2018-07-16 Tom Tromey <tom@tromey.com>
184
185 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
186 member.
187 (have_line_numbers): Remove.
188 (record_line, prepare_for_building, end_symtab_get_static_block)
189 (augment_type_symtab): Update.
190
191 2018-07-16 Tom Tromey <tom@tromey.com>
192
193 * buildsym.c (~buildsym_compunit): Free the macro table.
194 (struct buildsym_compunit) <get_macro_table, release_macros>: New
195 methods.
196 <m_pending_macros>: New member.
197 (pending_macros): Remove.
198 (~scoped_free_pendings, get_macro_table, prepare_for_building)
199 (reset_symtab_globals, end_symtab_get_static_block)
200 (end_symtab_with_blockvector, augment_type_symtab)
201 (buildsym_init): Update.
202
203 2018-07-16 Tom Tromey <tom@tromey.com>
204
205 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
206 parameter.
207 (buildsym_compunit::set_last_source_file): New method.
208 <m_last_source_file>: New member.
209 (prepare_for_building): Remove "name" parameter.
210 (start_symtab, restart_symtab, reset_symtab_globals): Update.
211 (last_source_file): Remove.
212 (set_last_source_file, get_last_source_file): Update.
213
214 2018-07-16 Tom Tromey <tom@tromey.com>
215
216 * buildsym.c (prepare_for_building): Add assert.
217
218 2018-07-16 Tom Tromey <tom@tromey.com>
219
220 * buildsym.c (~buildsym_compunit): Update.
221 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
222 (start_subfile, patch_subfile_names)
223 (end_symtab_with_blockvector): Update.
224
225 2018-07-16 Tom Tromey <tom@tromey.com>
226
227 * buildsym.c (struct buildsym_compunit): Add constructor,
228 destructor, initializers.
229 (start_buildsym_compunit): Remove.
230 (free_buildsym_compunit): Use "delete".
231 (start_symtab, restart_symtab): Use "new".
232
233 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
234
235 * symfile.c (set_objfile_default_section_offset): Remove struct
236 keyword.
237
238 2018-07-14 Stafford Horne <shorne@gmail.com>
239
240 * (Responsible Maintainers): Add myself as or1k maintainer.
241
242 2018-07-13 Tom Tromey <tom@tromey.com>
243
244 * symfile.c (set_objfile_default_section_offset): Use extra braces
245 around initializer.
246
247 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
248
249 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
250 non-branching basr.
251
252 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
253
254 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
255 unittests/cli-utils-selftests.c
256 * unittests/cli-utils-selftests.c: New file.
257
258 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
259
260 * NEWS: Mention new commands. Mention change to 'thread apply'.
261
262 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
263
264 * thread.c (thr_try_catch_cmd): New function.
265 (thread_apply_all_command): Handle qcs flags.
266 (thread_apply_command): Handle qcs flags.
267 (taas_command): New function.
268 (tfaas_command): New function.
269 (_initialize_thread): Update to setup the new commands 'taas
270 and 'tfaas'. Change doc string for 'thread apply'.
271
272 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
273
274 * stack.c: (trailing_outermost_frame): New function, mostly
275 extracted from backtrace_command_1.
276 (leading_innermost_frame): New function.
277 (backtrace_command_1): Update to call trailing_outermost_frame.
278 (frame_apply_command_count): New function.
279 (frame_apply_level_command): New function.
280 (frame_apply_all_command): New function.
281 (frame_apply_command): New function.
282 (faas_command): New function.
283 (frame_cmd_list): New variable.
284 (_initialize_stack): Update to setup the new commands 'frame apply'
285 and 'faas'.
286
287 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
288
289 * cli-utils.c (number_or_range_parser::get_number): Only handle
290 numbers or convenience var as numbers.
291 (parse_flags): New function.
292 (parse_flags_qcs): New function.
293 (number_or_range_parser::finished): Ensure parsing end is detected
294 before end of string.
295 * cli-utils.h (parse_flags): New function.
296 (parse_flags_qcs): New function.
297 (number_or_range_parser): Remove m_finished bool.
298 (number_or_range_parser::skip_range): Set m_in_range to false.
299
300 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
301
302 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
303 on Windows.
304
305 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
306 Jan Kratochvil <jan.kratochvil@redhat.com>
307 Paul Fertser <fercerpav@gmail.com>
308 Tsutomu Seki <sekiriki@gmail.com>
309 Pedro Alves <palves@redhat.com>
310
311 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
312 'unittests/parse-connection-spec-selftests.c'.
313 (COMMON_SFILES): Add 'common/netstuff.c'.
314 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
315 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
316 * common/netstuff.c: New file.
317 * common/netstuff.h: New file.
318 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
319 (wait_for_connect): Update comment. New parameter
320 'gdb::optional<int> sock' instead of 'struct serial *scb'.
321 Use 'sock' directly instead of 'scb->fd'.
322 (try_connect): New function, with code from 'net_open'.
323 (net_open): Rewrite main loop to deal with multiple
324 sockets/addresses. Handle IPv6-style hostnames; implement
325 support for IPv6 connections.
326 * unittests/parse-connection-spec-selftests.c: New file.
327
328 2018-07-11 Pedro Alves <palves@redhat.com>
329
330 PR gdb/23377
331 * remote.c (remote_target::remote_detach_pid): Call
332 set_current_process.
333
334 2018-07-11 Pedro Alves <palves@redhat.com>
335
336 * h8300-tdep.c (h8300_gdbarch_init): Remove
337 set_gdbarch_ecoff_reg_to_regnum calls.
338
339 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
340
341 PR c++/23373
342 * c-typeprint.c (c_type_print_base_struct_union): Don't print
343 offsets/sizes for static members of a class/struct.
344
345 2018-07-11 Alan Hayward <alan.hayward@arm.com>
346
347 * target-descriptions.c (tdesc_register_bitsize): Rename.
348 * target-descriptions.h (tdesc_register_bitsize): Likewise.
349 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
350 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
351
352 2018-07-10 Tom Tromey <tom@tromey.com>
353
354 * breakpoint.c (moribund_locations): Now static and a
355 std::vector.
356 (breakpoint_init_inferior, moribund_breakpoint_here_p)
357 (build_bpstat_chain, update_global_location_list)
358 (breakpoint_retire_moribund): Update.
359 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
360 VEC.
361
362 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
363
364 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
365 (riscv_register_reggroup_p): Use new function, remove unneeded
366 parenthesis.
367 (riscv_push_dummy_call): Extend assert to compare against xlen or
368 flen based on register type.
369
370 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
371
372 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
373
374 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
375
376 * remote.c (show_hardware_watchpoint_limit): New function.
377 (show_hardware_watchpoint_length_limit): New function.
378 (show_hardware_breakpoint_limit): New function.
379 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
380 where appropriate, update help text.
381
382 2018-07-09 Tom Tromey <tom@tromey.com>
383
384 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
385 (CLIBS): Don't mention NAT_CLIBS.
386
387 2018-07-09 Tom Tromey <tom@tromey.com>
388
389 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
390 (LIBGDB_OBS, clean mostlyclean): Update.
391 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
392
393 2018-07-09 Tom Tromey <tom@tromey.com>
394
395 * Makefile.in (%.c: %.y): Use ECHO_YACC.
396 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
397 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
398
399 2018-07-09 Tom Tromey <tom@tromey.com>
400
401 * Makefile.in (ALLDEPFILES): Remove exec.c.
402 (COMMON_OBS): Remove exec.o.
403 (COMMON_SFILES): Add exec.c.
404
405 2018-07-09 Tom Tromey <tom@tromey.com>
406
407 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
408
409 2018-07-09 Tom Tromey <tom@tromey.com>
410
411 * Makefile.in (clean mostlyclean): Remove stamp-version.
412 (version.c): Depend on stamp-version.
413 (stamp-version): New rule, from version.c rule.
414
415 2018-07-09 Tom Tromey <tom@tromey.com>
416
417 * Makefile.in (init.c): Depend on stamp-init.
418 (stamp-init): New rule, from init.c rule.
419 (clean mostlyclean): Remove stamp-init.
420
421 2018-07-09 Tom Tromey <tom@tromey.com>
422
423 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
424 SUBDIR_GCC_COMPILE_SRCS.
425
426 2018-07-09 Tom Tromey <tom@tromey.com>
427
428 * Makefile.in (init.c): Remove some unused sed rules.
429
430 2018-07-09 Tom Tromey <tom@tromey.com>
431
432 * Makefile.in (TSOBS): Remove.
433 (INIT_FILES): Update.
434 (LIBGDB_OBS): Update.
435 (COMMON_SFILES): Add inflow.c.
436 (SFILES): Remove inflow.c.
437
438 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
439
440 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
441
442 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
443
444 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
445 get_saveloc_name, is_signal_frame_name, step_name,
446 init_remote_name, create_addr_space_name,
447 destroy_addr_space_name, search_unwind_table_name,
448 find_dyn_list_name): Constify.
449
450 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
451
452 * darwin-nat.c (darwin_pthread_kill): New function.
453 (darwin_resume_thread): Use darwin_pthread_kill.
454
455 2018-07-05 Tom de Vries <tdevries@suse.de>
456
457 * macroexp.c (macro_buffer) <operator=>: New member function.
458
459 2018-07-04 Tom Tromey <tom@tromey.com>
460
461 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
462
463 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
464
465 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
466 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
467 * maint.c: Likewise.
468 * top.c: Likewise.
469
470 2018-07-04 Joel Brobecker <brobecker@adacore.com>
471
472 * NEWS: Create a new section for the next release branch.
473 Rename the section of the current branch, now that it has
474 been cut.
475
476 2018-07-04 Joel Brobecker <brobecker@adacore.com>
477
478 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
479 * version.in: Bump version to 8.2.50.DATE-git.
480
481 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
482 Pedro Alves <palves@redhat.com>
483
484 * linux-nat.c (linux_init_ptrace): Rename to ...
485 (linux_init_ptrace_procfs): ... this. Call
486 linux_proc_init_warnings.
487 (linux_nat_target::post_attach)
488 (linux_nat_target::post_startup_inferior): Adjust.
489 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
490 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
491
492 2018-07-04 Tom de Vries <tdevries@suse.de>
493
494 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
495 check ...
496 (read_comp_unit_head): ... here.
497
498 2018-07-03 Tom Tromey <tom@tromey.com>
499
500 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
501 (stop_tracing, tstatus_command)
502 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
503 (print_one_static_tracepoint_marker): Update.
504 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
505 std::vector.
506 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
507 VEC.
508 (all_tracepoints, static_tracepoints_here): Return std::vector.
509
510 2018-07-03 Tom Tromey <tom@tromey.com>
511
512 * common/ptid.c (ptid_equal): Remove.
513 * common/ptid.h (ptid_equal): Don't declare.
514 * ada-tasks.c: Update.
515 * breakpoint.c: Update.
516 * common/agent.c: Update.
517 * corelow.c: Update.
518 * darwin-nat-info.c: Update.
519 * darwin-nat.c: Update.
520 * dcache.c: Update.
521 * dtrace-probe.c: Update.
522 * dummy-frame.c: Update.
523 * fbsd-nat.c: Update.
524 * frame.c: Update.
525 * gdbthread.h: Update.
526 * gnu-nat.c: Update.
527 * go32-nat.c: Update.
528 * inf-loop.c: Update.
529 * inf-ptrace.c: Update.
530 * infcall.c: Update.
531 * infcmd.c: Update.
532 * inflow.c: Update.
533 * infrun.c: Update.
534 * linux-fork.c: Update.
535 * linux-nat.c: Update.
536 * linux-thread-db.c: Update.
537 * mi/mi-cmd-var.c: Update.
538 * mi/mi-interp.c: Update.
539 * mi/mi-main.c: Update.
540 * nto-procfs.c: Update.
541 * ppc-linux-tdep.c: Update.
542 * procfs.c: Update.
543 * python/py-inferior.c: Update.
544 * python/py-record-btrace.c: Update.
545 * python/py-record.c: Update.
546 * ravenscar-thread.c: Update.
547 * regcache.c: Update.
548 * remote-sim.c: Update.
549 * remote.c: Update.
550 * sol-thread.c: Update.
551 * solib.c: Update.
552 * target.c: Update.
553 * tui/tui-stack.c: Update.
554 * varobj.c: Update.
555 * windows-nat.c: Update.
556 * windows-tdep.c: Update.
557
558 2018-07-03 Tom Tromey <tom@tromey.com>
559
560 * common/ptid.c (ptid_match): Remove.
561 * common/ptid.h (ptid_match): Don't declare.
562 * fbsd-nat.c: Update.
563 * infcmd.c: Update.
564 * infrun.c: Update.
565 * linux-nat.c: Update.
566 * record-btrace.c: Update.
567 * regcache.c: Update.
568 * remote.c: Update.
569
570 2018-07-03 Tom Tromey <tom@tromey.com>
571
572 * common/ptid.c (ptid_tid_p): Remove.
573 * common/ptid.h (ptid_tid_p): Don't declare.
574 * sol-thread.c: Update.
575
576 2018-07-03 Tom Tromey <tom@tromey.com>
577
578 * common/ptid.c (ptid_lwp_p): Remove.
579 * common/ptid.h (ptid_lwp_p): Don't declare.
580 * fbsd-nat.c: Update.
581 * linux-nat.c: Update.
582 * nat/linux-procfs.c: Update.
583 * nat/x86-linux-dregs.c: Update.
584 * sol-thread.c: Update.
585
586 2018-07-03 Tom Tromey <tom@tromey.com>
587
588 * common/ptid.c (ptid_is_pid): Remove.
589 * common/ptid.h (ptid_is_pid): Don't declare.
590 * infrun.c: Update.
591 * linux-nat.c: Update.
592 * mi/mi-interp.c: Update.
593 * remote.c: Update.
594 * thread.c: Update.
595
596 2018-07-03 Tom Tromey <tom@tromey.com>
597
598 * common/ptid.c (ptid_get_tid): Remove.
599 * common/ptid.h (ptid_get_tid): Don't declare.
600 * ada-tasks.c: Update.
601 * aix-thread.c: Update.
602 * bsd-uthread.c: Update.
603 * darwin-nat.c: Update.
604 * fbsd-nat.c: Update.
605 * i386-darwin-nat.c: Update.
606 * infrun.c: Update.
607 * linux-tdep.c: Update.
608 * nto-procfs.c: Update.
609 * ppc-ravenscar-thread.c: Update.
610 * python/py-infthread.c: Update.
611 * ravenscar-thread.c: Update.
612 * sol-thread.c: Update.
613 * sparc-ravenscar-thread.c: Update.
614 * windows-nat.c: Update.
615
616 2018-07-03 Tom Tromey <tom@tromey.com>
617
618 * common/ptid.c (ptid_get_lwp): Remove.
619 * common/ptid.h (ptid_get_lwp): Don't declare.
620 * aarch64-linux-nat.c: Update.
621 * ada-tasks.c: Update.
622 * aix-thread.c: Update.
623 * amd64-linux-nat.c: Update.
624 * arm-linux-nat.c: Update.
625 * corelow.c: Update.
626 * fbsd-nat.c: Update.
627 * fbsd-tdep.c: Update.
628 * gnu-nat.c: Update.
629 * i386-cygwin-tdep.c: Update.
630 * i386-gnu-nat.c: Update.
631 * i386-linux-nat.c: Update.
632 * ia64-linux-nat.c: Update.
633 * inf-ptrace.c: Update.
634 * infrun.c: Update.
635 * linux-fork.c: Update.
636 * linux-nat.c: Update.
637 * linux-tdep.c: Update.
638 * linux-thread-db.c: Update.
639 * mips-linux-nat.c: Update.
640 * nat/aarch64-linux-hw-point.c: Update.
641 * nat/aarch64-linux.c: Update.
642 * nat/linux-btrace.c: Update.
643 * nat/linux-osdata.c: Update.
644 * nat/linux-procfs.c: Update.
645 * nat/x86-linux-dregs.c: Update.
646 * obsd-nat.c: Update.
647 * ppc-fbsd-nat.c: Update.
648 * ppc-linux-nat.c: Update.
649 * procfs.c: Update.
650 * python/py-infthread.c: Update.
651 * ravenscar-thread.c: Update.
652 * remote.c: Update.
653 * s390-linux-nat.c: Update.
654 * sol-thread.c: Update.
655 * sol2-tdep.c: Update.
656 * spu-linux-nat.c: Update.
657 * x86-linux-nat.c: Update.
658 * xtensa-linux-nat.c: Update.
659
660 2018-07-03 Tom Tromey <tom@tromey.com>
661
662 * common/ptid.c (ptid_get_pid): Remove.
663 * common/ptid.h (ptid_get_pid): Don't declare.
664 * aarch64-linux-nat.c: Update.
665 * ada-lang.c: Update.
666 * aix-thread.c: Update.
667 * alpha-bsd-nat.c: Update.
668 * amd64-fbsd-nat.c: Update.
669 * amd64-linux-nat.c: Update.
670 * arm-linux-nat.c: Update.
671 * arm-nbsd-nat.c: Update.
672 * auxv.c: Update.
673 * break-catch-syscall.c: Update.
674 * breakpoint.c: Update.
675 * bsd-uthread.c: Update.
676 * corelow.c: Update.
677 * ctf.c: Update.
678 * darwin-nat.c: Update.
679 * fbsd-nat.c: Update.
680 * fbsd-tdep.c: Update.
681 * gcore.c: Update.
682 * gnu-nat.c: Update.
683 * hppa-nbsd-nat.c: Update.
684 * hppa-obsd-nat.c: Update.
685 * i386-fbsd-nat.c: Update.
686 * ia64-linux-nat.c: Update.
687 * inf-ptrace.c: Update.
688 * infcmd.c: Update.
689 * inferior.c: Update.
690 * inferior.h: Update.
691 * inflow.c: Update.
692 * infrun.c: Update.
693 * linux-fork.c: Update.
694 * linux-nat.c: Update.
695 * linux-tdep.c: Update.
696 * linux-thread-db.c: Update.
697 * m68k-bsd-nat.c: Update.
698 * mi/mi-interp.c: Update.
699 * mi/mi-main.c: Update.
700 * mips-linux-nat.c: Update.
701 * mips-nbsd-nat.c: Update.
702 * mips64-obsd-nat.c: Update.
703 * nat/aarch64-linux-hw-point.c: Update.
704 * nat/aarch64-linux.c: Update.
705 * nat/linux-btrace.c: Update.
706 * nat/linux-osdata.c: Update.
707 * nat/linux-procfs.c: Update.
708 * nat/x86-linux-dregs.c: Update.
709 * nto-procfs.c: Update.
710 * obsd-nat.c: Update.
711 * ppc-linux-nat.c: Update.
712 * ppc-nbsd-nat.c: Update.
713 * ppc-obsd-nat.c: Update.
714 * proc-service.c: Update.
715 * procfs.c: Update.
716 * python/py-inferior.c: Update.
717 * python/py-infthread.c: Update.
718 * ravenscar-thread.c: Update.
719 * record.c: Update.
720 * remote-sim.c: Update.
721 * remote.c: Update.
722 * rs6000-nat.c: Update.
723 * s390-linux-nat.c: Update.
724 * sh-nbsd-nat.c: Update.
725 * sol-thread.c: Update.
726 * sparc-nat.c: Update.
727 * sparc64-tdep.c: Update.
728 * spu-linux-nat.c: Update.
729 * spu-tdep.c: Update.
730 * target-debug.h: Update.
731 * target.c: Update.
732 * thread.c: Update.
733 * tid-parse.c: Update.
734 * tracefile-tfile.c: Update.
735 * vax-bsd-nat.c: Update.
736 * windows-nat.c: Update.
737 * x86-linux-nat.c: Update.
738 * x86-nat.c: Update.
739
740 2018-07-03 Tom Tromey <tom@tromey.com>
741
742 * common/ptid.c (pid_to_ptid): Remove.
743 * common/ptid.h (pid_to_ptid): Don't declare.
744 * aix-thread.c: Update.
745 * arm-linux-nat.c: Update.
746 * common/ptid.c: Update.
747 * common/ptid.h: Update.
748 * corelow.c: Update.
749 * ctf.c: Update.
750 * darwin-nat.c: Update.
751 * fbsd-nat.c: Update.
752 * fork-child.c: Update.
753 * gnu-nat.c: Update.
754 * go32-nat.c: Update.
755 * inf-ptrace.c: Update.
756 * infcmd.c: Update.
757 * inferior.c: Update.
758 * infrun.c: Update.
759 * linux-fork.c: Update.
760 * linux-nat.c: Update.
761 * nat/aarch64-linux-hw-point.c: Update.
762 * nat/fork-inferior.c: Update.
763 * nat/x86-linux-dregs.c: Update.
764 * nto-procfs.c: Update.
765 * obsd-nat.c: Update.
766 * procfs.c: Update.
767 * progspace.c: Update.
768 * remote.c: Update.
769 * rs6000-nat.c: Update.
770 * s390-linux-nat.c: Update.
771 * sol-thread.c: Update.
772 * spu-linux-nat.c: Update.
773 * target.c: Update.
774 * top.c: Update.
775 * tracefile-tfile.c: Update.
776 * windows-nat.c: Update.
777
778 2018-07-03 Tom Tromey <tom@tromey.com>
779
780 * common/ptid.h (ptid_build): Don't declare.
781 * common/ptid.c (ptid_build): Remove.
782 * aix-thread.c: Update.
783 * bsd-kvm.c: Update.
784 * bsd-uthread.c: Update.
785 * common/agent.c: Update.
786 * common/ptid.c: Update.
787 * common/ptid.h: Update.
788 * corelow.c: Update.
789 * darwin-nat.c: Update.
790 * fbsd-nat.c: Update.
791 * gnu-nat.c: Update.
792 * linux-fork.c: Update.
793 * linux-nat.c: Update.
794 * linux-thread-db.c: Update.
795 * nat/linux-osdata.c: Update.
796 * nat/linux-procfs.c: Update.
797 * nto-procfs.c: Update.
798 * obsd-nat.c: Update.
799 * proc-service.c: Update.
800 * procfs.c: Update.
801 * ravenscar-thread.c: Update.
802 * remote-sim.c: Update.
803 * remote.c: Update.
804 * sol-thread.c: Update.
805 * target.c: Update.
806 * windows-nat.c: Update.
807
808 2018-07-03 Tom Tromey <tom@tromey.com>
809
810 * infrun.c (follow_exec): Use exit_inferior_silent.
811 * inferior.c (exit_inferior_num_silent): Remove.
812 * inferior.h (exit_inferior_num_silent): Don't declare.
813
814 2018-07-03 Tom Tromey <tom@tromey.com>
815
816 PR cli/23340:
817 * darwin-nat.c (darwin_attach_pid): Reset inferior and
818 inferior_ptid on error.
819
820 2018-07-02 Maciej W. Rozycki <macro@mips.com>
821 Simon Marchi <simon.marchi@polymtl.ca>
822
823 PR tdep/8282
824 * disasm.h (gdb_disassembler): Add
825 `m_disassembler_options_holder'. member
826 * disasm.c (get_all_disassembler_options): New function.
827 (gdb_disassembler::gdb_disassembler): Use it.
828 (gdb_buffered_insn_length_init_dis): Likewise.
829 (gdb_buffered_insn_length): Adjust accordingly.
830 (set_disassembler_options): Handle options with arguments.
831 (show_disassembler_options_sfunc): Likewise. Add a leading new
832 line if showing options with descriptions.
833 (disassembler_options_completer): Adapt to using the
834 `disasm_options_and_args_t' structure.
835 * mips-tdep.c (mips_disassembler_options): New variable.
836 (mips_disassembler_options_o32): Likewise.
837 (mips_disassembler_options_n32): Likewise.
838 (mips_disassembler_options_n64): Likewise.
839 (gdb_print_insn_mips): Don't set `disassembler_options'.
840 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
841 functions.
842 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
843 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
844 `gdbarch_disassembler_options_implicit' and
845 `gdbarch_valid_disassembler_options'.
846 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
847 `disasm_options_and_args_t' structure.
848 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
849 method.
850 (valid_disassembler_options): Switch from `disasm_options_t' to
851 the `disasm_options_and_args_t' structure.
852 * NEWS: Document `set disassembler-options' support for the MIPS
853 target.
854 * gdbarch.h: Regenerate.
855 * gdbarch.c: Regenerate.
856
857 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
858
859 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
860
861 2018-06-29 Joel Brobecker <brobecker@adacore.com>
862
863 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
864 parameter in call to amd64_target_description.
865 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
866 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
867 (amd64fbsd_init_abi): Likewise.
868 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
869 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
870 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
871 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
872
873 2018-06-29 Pedro Alves <palves@redhat.com>
874
875 * gdb/amd64-tdep.h (amd64_create_target_description): Add
876 "segments" parameter.
877 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
878 (_initialize_amd64_tdep): Update call to
879 amd64_create_target_description.
880 (amd64_target_description): Add "segments" parameter. Adjust
881 the implementation to use it.
882 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
883 call to amd64_create_target_description.
884 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
885 * gdb/arch/amd64.h (amd64_create_target_description): Add
886 "segments" register.
887 * gdb/arch/amd64.c (amd64_create_target_description): Add
888 "segments" parameter. Call create_feature_i386_64bit_segments
889 only if SEGMENTS is true.
890 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
891 call to amd64_create_target_description.
892
893 2018-06-29 Pedro Alves <palves@redhat.com>
894
895 * thread.c (thread_target_id_str): New, factored out from ...
896 (print_thread_info_1): ... here. Use it to compute the max
897 "Target Id" column width.
898
899 2018-06-29 Pedro Alves <palves@redhat.com>
900
901 * remote.c (remote_target::extra_thread_info): Delete
902 'display_buf' and 'n' locals. from the cache, regardless of
903 packet mechanims is in use. Use cache for qThreadExtra and qP
904 methods too.
905
906 2018-06-29 Pedro Alves <palves@redhat.com>
907
908 * blockframe.c (find_pc_sect_containing_function): New function.
909 * breakpoint.c (print_breakpoint_location): Don't call
910 find_pc_sect_function.
911 * linespec.c (create_sals_line_offset): Record the location's
912 symbol in the sal.
913 * linespec.c (convert_address_location_to_sals): Fill in sal's
914 symbol with find_pc_sect_containing_function.
915 * symtab.c (find_function_start_sal): Rename to ...
916 (find_function_start_sal_1): ... this.
917 (find_function_start_sal): Reimplement as wrapper around
918 find_function_start_sal_1, and use
919 find_pc_sect_containing_function to fill in the sal's symbol.
920 (find_function_start_sal(symbol*, bool)): Adjust.
921 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
922 comments.
923 (find_pc_sect_containing_function): Declare.
924
925 2018-06-29 Pedro Alves <palves@redhat.com>
926
927 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
928 true if the the location has no symbol.
929
930 2018-06-28 Tom Tromey <tom@tromey.com>
931
932 * NEWS: Mention --enable-codesign.
933 * silent-rules.mk (ECHO_SIGN): New variable.
934 * configure.ac: Add --enable-codesign.
935 * configure: Rebuild.
936 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
937 (gdb$(EXEEXT)): Optionally invoke codesign.
938
939 2018-06-28 Pedro Alves <palves@redhat.com>
940
941 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
942 comments.
943 (switch_to_thread_no_regs): Adjust comment.
944 * infcmd.c (stop_pc): Delete.
945 (post_create_inferior, info_program_command): Replace references
946 to stop_pc with references to thread_info->suspend.stop_pc.
947 * inferior.h (stop_pc): Delete declaration.
948 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
949 (handle_inferior_event_1, handle_signal_stop)
950 (process_event_stop_test, keep_going_stepped_thread)
951 (handle_step_into_function, handle_step_into_function_backward)
952 (print_stop_location): Replace references to stop_pc with
953 references to thread_info->suspend.stop_pc.
954 (struct infcall_suspend_state) <stop_pc>: Delete field.
955 (save_infcall_suspend_state, restore_infcall_suspend_state):
956 Remove references to inf_stat->stop_pc.
957 * linux-fork.c (fork_load_infrun_state): Likewise.
958 * record-btrace.c (record_btrace_set_replay): Likewise.
959 * record-full.c (record_full_goto_entry): Likewise.
960 * remote.c (print_one_stopped_thread): Likewise.
961 * target.c (target_resume): Extend comment.
962 * thread.c (set_executing_thread): New.
963 (set_executing): Use it.
964 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
965 Remove references to stop_pc.
966
967 2018-06-28 Pedro Alves <palves@redhat.com>
968
969 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
970 Moving fetching stop_pc until after ecs->event_thread is refreshed.
971
972 2018-06-28 Tom Tromey <tom@tromey.com>
973
974 * coffread.c (coff_symfile_finish): Update.
975 * xcoffread.c (xcoff_symfile_finish): Update.
976 * elfread.c (elf_symfile_finish): Update.
977 * symfile.h (dwarf2_free_objfile): Don't declare.
978 * dwarf2read.c (_initialize_dwarf2_read): Use
979 register_objfile_data_with_cleanup.
980 (dwarf2_free_objfile): Now static. Change signature.
981
982 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
983
984 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
985 option "-o" to add-symbol-file-load to add an offset to each
986 section's load address.
987 * symfile.c (set_objfile_default_section_offset): New function.
988
989 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
990
991 * symfile.c (add_symbol_file_command): Make sure that sections
992 with the same name are sorted in the same order.
993
994 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
995
996 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
997 require the second argument. If omitted, load sections at the
998 addresses specified in the file.
999
1000 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1001
1002 * symfile.c (symbol_file_command, symbol_file_add_main_1)
1003 (_initialize_symfile): Add option "-o" to symbol-file to add an
1004 offset to each section of the symbol file.
1005
1006 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1007
1008 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
1009
1010 2018-06-27 Tom Tromey <tom@tromey.com>
1011
1012 * stack.c (_initialize_stack): Update "func" help text.
1013
1014 2018-06-27 Tom Tromey <tom@tromey.com>
1015
1016 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
1017 std::vector.
1018 (unwind_infopy_str, pyuw_create_unwind_info)
1019 (unwind_infopy_add_saved_register, pyuw_sniffer)
1020 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
1021 Update.
1022 (struct saved_reg): Add constructor.
1023 <value>: Now a gdbpy_ref<>.
1024
1025 2018-06-27 Tom Tromey <tom@tromey.com>
1026
1027 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
1028
1029 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1030
1031 * gdb-gdb.py.in: Format using autopep8.
1032
1033 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1034
1035 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
1036 (type_lookup_function): Recognize CORE_ADDR values.
1037
1038 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1039
1040 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
1041 print tag_name.
1042
1043 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1044
1045 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
1046 <__lt__>: Add.
1047
1048 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1049
1050 * gdb-gdb.py: Move to...
1051 * gdb-gdb.py.in: ... here.
1052 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
1053 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
1054 dependencies.
1055 (distclean): Remove gdb-gdb.py when cleaning.
1056 (gdb-gdb.py, gdb-gdb.gdb): New rules.
1057 * configure: Re-generate.
1058
1059 2018-06-27 Pedro Alves <palves@redhat.com>
1060
1061 * proc-service.c (get_ps_regcache): New.
1062 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1063 (ps_lsetfpregs): Use it.
1064
1065 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
1066
1067 PR gdb/21695
1068 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
1069 (dwarf_decode_lines_1): Adjust.
1070
1071 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1072
1073 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
1074 override.
1075 <info_proc>: Likewise.
1076
1077 2018-06-26 Joel Brobecker <brobecker@adacore.com>
1078
1079 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
1080 to windows_fetch_one_register, and only handle the case of
1081 fetching one register. Move the code that reloads the context
1082 and iterates over all registers if R is negative to...
1083 (windows_nat_target::fetch_registers): ... here.
1084 (do_windows_store_inferior_registers): Rename to
1085 windows_store_one_register, and only handle the case of storing
1086 one register. Move the code that handles the case where r is
1087 negative to...
1088 (windows_nat_target::store_registers) ... here.
1089
1090 2018-06-26 Tom Tromey <tom@tromey.com>
1091
1092 PR rust/22574:
1093 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
1094 * rust-lang.c (rust_print_struct_def): Add podata parameter.
1095 Update.
1096 (rust_internal_print_type): Add podata parameter.
1097 (rust_print_type): Update.
1098
1099 2018-06-26 Tom Tromey <tom@tromey.com>
1100
1101 * typeprint.h (struct print_offset_data) <update, finish,
1102 maybe_print_hole>: New methods.
1103 <indentation>: New constant.
1104 * typeprint.c (print_offset_data::indentation): Define.
1105 (print_offset_data::maybe_print_hole, print_offset_data::update)
1106 (print_offset_data::finish): Move from c-typeprint.c and rename.
1107 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
1108 (print_spaces_filtered_with_print_options): Update.
1109 (c_print_type_union_field_offset, maybe_print_hole)
1110 (c_print_type_struct_field_offset): Move to typeprint.c and
1111 rename.
1112 (c_type_print_base_struct_union): Update.
1113
1114 2018-06-25 Pedro Alves <palves@redhat.com>
1115
1116 * gdbthread.h (thread_info_ref, delete_thread)
1117 (delete_thread_silent, first_thread_of_inferior)
1118 (any_thread_of_inferior, switch_to_thread)
1119 (enable_thread_stack_temporaries)
1120 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1121 (get_last_thread_stack_temporary)
1122 (value_in_thread_stack_temporaries, can_access_registers_thread):
1123 Spell out "struct thread_info" instead of just "thread_info".
1124 * inferior.h (notice_new_inferior): Likewise.
1125
1126 2018-06-25 Pedro Alves <palves@redhat.com>
1127
1128 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
1129 pass thread_info pointer to delete_thread.
1130 (windows_nat_target::detach): Pass inferior pointer to
1131 detach_inferior.
1132 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
1133 delete_thread.
1134 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
1135 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
1136 and pass a thread_info pointer to delete_thread.
1137 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
1138 pass thread_info pointer to delete_thread.
1139 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
1140 delete_thread_silent call.
1141 * procfs.c (procfs_target::detach): Pass inferior pointer to
1142 detach_inferior.
1143 (procfs_target::wait): Pass thread_info pointer to delete_thread.
1144 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
1145 delete_thread_silent call.
1146 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
1147 pass thread_info pointer to delete_thread.
1148 (windows_nat_target::detach): Pass inferior pointer to
1149 delete_inferior.
1150
1151 2018-06-22 Alan Hayward <alan.hayward@arm.com>
1152
1153 * regcache.c (readable_regcache::read_part): Fix asserts.
1154 (reg_buffer::raw_collect_part): New function.
1155 (regcache::write_part): Fix asserts.
1156 (reg_buffer::raw_supply_part): New function.
1157 (regcache::transfer_regset_register): New helper function.
1158 (regcache::transfer_regset): Call new functions.
1159 (regcache_supply_regset): Use gdb_byte*.
1160 (regcache::supply_regset): Likewise.
1161 (regcache_collect_regset): Likewise.
1162 (regcache::collect_regset): Likewise.
1163 * regcache.h (reg_buffer::raw_collect_part): New declaration.
1164 (reg_buffer::raw_supply_part): Likewise.
1165 (regcache::transfer_regset_register): Likewise.
1166 (regcache::transfer_regset): Use gdb_byte*.
1167
1168 2018-06-22 Alan Hayward <alan.hayward@arm.com>
1169
1170 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
1171
1172 2018-06-21 Pedro Alves <palves@redhat.com>
1173
1174 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
1175 instead of a ptid_t. All callers adjusted.
1176 * ada-tasks.c (ada_get_task_number): Likewise. All callers
1177 adjusted.
1178 (print_ada_task_info, display_current_task_id, task_command_1):
1179 Adjust.
1180 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
1181 inferior_thread.
1182 (breakpoint_kind): Adjust.
1183 (remove_breakpoints_pid): Rename to ...
1184 (remove_breakpoints_inf): ... this. Adjust to take an inferior
1185 pointer. All callers adjusted.
1186 (bpstat_clear_actions): Use inferior_thread.
1187 (get_bpstat_thread): New.
1188 (bpstat_do_actions): Use it.
1189 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
1190 to take a thread_info pointer. All callers adjusted.
1191 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
1192 (breakpoint_re_set_thread): Use inferior_thread.
1193 * breakpoint.h (struct inferior): Forward declare.
1194 (bpstat_stop_status): Update.
1195 (remove_breakpoints_pid): Delete.
1196 (remove_breakpoints_inf): New.
1197 * bsd-uthread.c (bsd_uthread_target::wait)
1198 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
1199 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
1200 (maint_btrace_packet_history_cmd)
1201 (maint_btrace_clear_packet_history_cmd): Adjust.
1202 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
1203 inferior_thread.
1204 * cli/cli-interp.c: Include "inferior.h".
1205 * common/refcounted-object.h (struct
1206 refcounted_object_ref_policy): New.
1207 * compile/compile-object-load.c: Include gdbthread.h.
1208 (store_regs): Use inferior_thread.
1209 * corelow.c (core_target::close): Use current_inferior.
1210 (core_target_open): Adjust to use first_thread_of_inferior and use
1211 the current inferior.
1212 * ctf.c (ctf_target::close): Adjust to use current_inferior.
1213 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
1214 <thread>: ... this new field. All references adjusted.
1215 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
1216 Take a thread_info pointer instead of a ptid_t.
1217 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
1218 (dummy_frame_discard, register_dummy_frame_dtor): Take a
1219 thread_info pointer instead of a ptid_t.
1220 * elfread.c: Include "inferior.h".
1221 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
1222 Use inferior_thread.
1223 * eval.c (evaluate_subexp): Likewise.
1224 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
1225 inferior_thread.
1226 * gdb_proc_service.h (struct thread_info): Forward declare.
1227 (struct ps_prochandle) <ptid>: Delete, replaced by ...
1228 <thread>: ... this new field. All references adjusted.
1229 * gdbarch.h, gdbarch.c: Regenerate.
1230 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
1231 'thread' parameter. All implementations and callers adjusted.
1232 * gdbthread.h (thread_info) <set_running>: New method.
1233 (delete_thread, delete_thread_silent): Take a thread_info pointer
1234 instead of a ptid.
1235 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
1236 (first_thread_of_process): Delete, replaced by ...
1237 (first_thread_of_inferior): ... this new function. All callers
1238 adjusted.
1239 (any_live_thread_of_process): Delete, replaced by ...
1240 (any_live_thread_of_inferior): ... this new function. All callers
1241 adjusted.
1242 (switch_to_thread, switch_to_no_thread): Declare.
1243 (is_executing): Delete.
1244 (enable_thread_stack_temporaries): Update comment.
1245 <enable_thread_stack_temporaries>: Take a thread_info pointer
1246 instead of a ptid_t. Incref the thread.
1247 <~enable_thread_stack_temporaries>: Decref the thread.
1248 <m_ptid>: Delete
1249 <m_thr>: New.
1250 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1251 (get_last_thread_stack_temporary)
1252 (value_in_thread_stack_temporaries, can_access_registers_thread):
1253 Take a thread_info pointer instead of a ptid_t. All callers
1254 adjusted.
1255 * infcall.c (get_call_return_value): Use inferior_thread.
1256 (run_inferior_call): Work with thread pointers instead of ptid_t.
1257 (call_function_by_hand_dummy): Work with thread pointers instead
1258 of ptid_t. Use thread_info_ref.
1259 * infcmd.c (proceed_thread_callback): Access thread's state
1260 directly.
1261 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
1262 access thread's state directly.
1263 (continue_command): Use inferior_thread.
1264 (info_program_command): Use find_thread_ptid and access thread
1265 state directly.
1266 (proceed_after_attach_callback): Use thread state directly.
1267 (notice_new_inferior): Take a thread_info pointer instead of a
1268 ptid_t. All callers adjusted.
1269 (exit_inferior): Take an inferior pointer instead of a pid. All
1270 callers adjusted.
1271 (exit_inferior_silent): New.
1272 (detach_inferior): Delete.
1273 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
1274 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
1275 (detach_inferior_command, kill_inferior_command): Use
1276 find_inferior_id instead of valid_gdb_inferior_id and
1277 gdb_inferior_id_to_pid.
1278 (inferior_command): Use inferior and thread pointers.
1279 * inferior.h (struct thread_info): Forward declare.
1280 (notice_new_inferior): Take a thread_info pointer instead of a
1281 ptid_t. All callers adjusted.
1282 (detach_inferior): Delete declaration.
1283 (exit_inferior, exit_inferior_silent): Take an inferior pointer
1284 instead of a pid. All callers adjusted.
1285 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
1286 (valid_gdb_inferior_id): Delete.
1287 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
1288 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
1289 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
1290 ...
1291 <inf>: ... this new field.
1292 <step_ptid>: Delete, replaced by ...
1293 <step_thread>: ... this new field.
1294 (get_displaced_stepping_state): Take an inferior pointer instead
1295 of a pid. All callers adjusted.
1296 (displaced_step_in_progress_any_inferior): Adjust.
1297 (displaced_step_in_progress_thread): Take a thread pointer instead
1298 of a ptid_t. All callers adjusted.
1299 (displaced_step_in_progress, add_displaced_stepping_state): Take
1300 an inferior pointer instead of a pid. All callers adjusted.
1301 (get_displaced_step_closure_by_addr): Adjust.
1302 (remove_displaced_stepping_state): Take an inferior pointer
1303 instead of a pid. All callers adjusted.
1304 (displaced_step_prepare_throw, displaced_step_prepare)
1305 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
1306 All callers adjusted.
1307 (start_step_over): Adjust.
1308 (infrun_thread_ptid_changed): Remove bit updating ptids in the
1309 displaced step queue.
1310 (do_target_resume): Adjust.
1311 (fetch_inferior_event): Use inferior_thread.
1312 (context_switch, get_inferior_stop_soon): Take an
1313 execution_control_state pointer instead of a ptid_t. All callers
1314 adjusted.
1315 (switch_to_thread_cleanup): Delete.
1316 (stop_all_threads): Use scoped_restore_current_thread.
1317 * inline-frame.c: Include "gdbthread.h".
1318 (inline_state) <inline_state>: Take a thread pointer instead of a
1319 ptid_t. All callers adjusted.
1320 <ptid>: Delete, replaced by ...
1321 <thread>: ... this new field.
1322 (find_inline_frame_state): Take a thread pointer instead of a
1323 ptid_t. All callers adjusted.
1324 (skip_inline_frames, step_into_inline_frame)
1325 (inline_skipped_frames, inline_skipped_symbol): Take a thread
1326 pointer instead of a ptid_t. All callers adjusted.
1327 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
1328 (inline_skipped_frames, inline_skipped_symbol): Likewise.
1329 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
1330 pointers directly.
1331 * linux-nat.c (get_detach_signal): Likewise.
1332 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
1333 (thread_db_notice_clone): Adjust.
1334 (thread_db_find_new_threads_silently)
1335 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
1336 a thread pointer instead of a ptid_t. All callers adjusted.
1337 * mi/mi-cmd-var.c: Include "inferior.h".
1338 (mi_cmd_var_update_iter): Update to use thread pointers.
1339 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
1340 inferior directly.
1341 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
1342 out to ...
1343 (mi_output_running): ... this new function.
1344 (mi_on_resume_1): Adjust to use it.
1345 (mi_user_selected_context_changed): Adjust to use inferior_thread.
1346 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
1347 directly.
1348 (interrupt_thread_callback): : Adjust to use thread and inferior
1349 pointers.
1350 * proc-service.c: Include "gdbthread.h".
1351 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
1352 * progspace-and-thread.c: Include "inferior.h".
1353 * progspace.c: Include "inferior.h".
1354 * python/py-exitedevent.c (create_exited_event_object): Adjust to
1355 hold a reference to an inferior_object.
1356 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
1357 inferior_thread.
1358 * python/py-inferior.c (struct inferior_object): Give the type a
1359 tag name instead of a typedef.
1360 (python_on_normal_stop): No need to check if the current thread is
1361 listed.
1362 (inferior_to_inferior_object): Change return type to
1363 inferior_object. All callers adjusted.
1364 (find_thread_object): Delete, bits factored out to ...
1365 (thread_to_thread_object): ... this new function.
1366 * python/py-infthread.c (create_thread_object): Use
1367 inferior_to_inferior_object.
1368 (thpy_is_stopped): Use thread pointer directly.
1369 (gdbpy_selected_thread): Use inferior_thread.
1370 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
1371 field, replaced with ...
1372 <thread>: ... this new field. All users adjusted.
1373 (btpy_insn_or_gap_new): Drop const.
1374 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
1375 callers adjusted.
1376 * python/py-record.c: Include "gdbthread.h".
1377 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
1378 a ptid_t. All callers adjusted.
1379 (gdbpy_current_recording): Use inferior_thread.
1380 * python/py-record.h (recpy_record_object) <ptid>: Delete
1381 field, replaced with ...
1382 <thread>: ... this new field. All users adjusted.
1383 (recpy_element_object) <ptid>: Delete
1384 field, replaced with ...
1385 <thread>: ... this new field. All users adjusted.
1386 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
1387 a ptid_t. All callers adjusted.
1388 * python/py-threadevent.c: Include "gdbthread.h".
1389 (get_event_thread): Use thread_to_thread_object.
1390 * python/python-internal.h (struct inferior_object): Forward
1391 declare.
1392 (find_thread_object, find_inferior_object): Delete declarations.
1393 (thread_to_thread_object, inferior_to_inferior_object): New
1394 declarations.
1395 * record-btrace.c: Include "inferior.h".
1396 (require_btrace_thread): Use inferior_thread.
1397 (record_btrace_frame_sniffer)
1398 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
1399 (get_thread_current_frame): Use scoped_restore_current_thread and
1400 switch_to_thread.
1401 (get_thread_current_frame): Use thread pointer directly.
1402 (record_btrace_replay_at_breakpoint): Use thread's inferior
1403 pointer directly.
1404 * record-full.c: Include "inferior.h".
1405 * regcache.c: Include "gdbthread.h".
1406 (get_thread_arch_regcache): Use the inferior's address space
1407 directly.
1408 (get_thread_regcache, registers_changed_thread): New.
1409 * regcache.h (get_thread_regcache(thread_info *thread)): New
1410 overload.
1411 (registers_changed_thread): New.
1412 (remote_target) <remote_detach_1>: Swap order of parameters.
1413 (remote_add_thread): <remote_add_thread>: Return the new thread.
1414 (get_remote_thread_info(ptid_t)): New overload.
1415 (remote_target::remote_notice_new_inferior): Use thread pointers
1416 directly.
1417 (remote_target::process_initial_stop_replies): Use
1418 thread_info::set_running.
1419 (remote_target::remote_detach_1, remote_target::detach)
1420 (extended_remote_target::detach): Adjust.
1421 * stack.c (frame_show_address): Use inferior_thread.
1422 * target-debug.h (target_debug_print_thread_info_pp): New.
1423 * target-delegates.c: Regenerate.
1424 * target.c (default_thread_address_space): Delete.
1425 (memory_xfer_partial_1): Use current_inferior.
1426 (target_detach): Use current_inferior.
1427 (target_thread_address_space): Delete.
1428 (generic_mourn_inferior): Use current_inferior.
1429 * target.h (struct target_ops) <thread_address_space>: Delete.
1430 (target_thread_address_space): Delete.
1431 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
1432 pointers directly.
1433 (delete_thread_1, delete_thread, delete_thread_silent): Take a
1434 thread pointer instead of a ptid_t. Adjust all callers.
1435 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
1436 (first_thread_of_process): Delete, replaced by ...
1437 (first_thread_of_inferior): ... this new function. All callers
1438 adjusted.
1439 (any_thread_of_process): Rename to ...
1440 (any_thread_of_inferior): ... this, and take an inferior pointer.
1441 (any_live_thread_of_process): Rename to ...
1442 (any_live_thread_of_inferior): ... this, and take an inferior
1443 pointer.
1444 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1445 (value_in_thread_stack_temporaries)
1446 (get_last_thread_stack_temporary): Take a thread pointer instead
1447 of a ptid_t. Adjust all callers.
1448 (thread_info::set_running): New.
1449 (validate_registers_access): Use inferior_thread.
1450 (can_access_registers_ptid): Rename to ...
1451 (can_access_registers_thread): ... this, and take a thread
1452 pointer.
1453 (print_thread_info_1): Adjust to compare thread pointers instead
1454 of ptids.
1455 (switch_to_no_thread, switch_to_thread): Make extern.
1456 (scoped_restore_current_thread::~scoped_restore_current_thread):
1457 Use m_thread pointer directly.
1458 (scoped_restore_current_thread::scoped_restore_current_thread):
1459 Use inferior_thread.
1460 (thread_command): Use thread pointer directly.
1461 (thread_num_make_value_helper): Use inferior_thread.
1462 * top.c (execute_command): Use inferior_thread.
1463 * tui/tui-interp.c: Include "inferior.h".
1464 * varobj.c (varobj_create): Use inferior_thread.
1465 (value_of_root_1): Use find_thread_global_id instead of
1466 global_thread_id_to_ptid.
1467
1468 2018-06-21 Alan Hayward <alan.hayward@arm.com>
1469
1470 * regcache.c (readable_regcache::read_part): Avoid memcpy when
1471 possible.
1472 (regcache::write_part): Likewise.
1473 (readable_regcache::cooked_read_part): Update comment.
1474 (readable_regcache::cooked_write_part): Likewise.
1475 * regcache.h: (readable_regcache::read_part): Likewise.
1476 (regcache::write_part): Likewise.
1477
1478 2018-06-21 Richard Bunt <richard.bunt@arm.com>
1479 Dirk Schubert <dirk.schubert@arm.com>
1480
1481 * aarch64-linux-nat.c (post_attach): New.
1482 (aarch64_linux_nat_target::post_attach): Override post_attach to
1483 record the number of hardware debug registers.
1484
1485 2018-06-20 Tom Tromey <tom@tromey.com>
1486
1487 * python/py-param.c (add_setshow_generic): Make parameters const.
1488 (parmpy_init): Update.
1489
1490 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
1491
1492 * regcache.h (regcache_cooked_read_ftype): Rename to...
1493 (register_read_ftype): ...this, change type to function_view.
1494 (class reg_buffer) <save>: Remove src parameter.
1495 (readonly_detached_regcache) <readonly_detached_regcache>: Make
1496 parameter non-const in first overload. Remove src parameter in
1497 second overload.
1498 * regcache.c (do_cooked_read): Remove.
1499 (readonly_detached_regcache::readonly_detached_regcache): Make
1500 parameter non-const, adjust call to other constructor.
1501 (reg_buffer::save): Remove src parameter.
1502 * frame.c (do_frame_register_read): Remove.
1503 (frame_save_as_regcache): Use lambda function.
1504 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
1505 parameter to ppu2spu_data *.
1506 (ppu2spu_sniffer): Use lambda function.
1507
1508 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
1509
1510 * record-full.c (record_full_target::insert_breakpoint): Remove
1511 "struct" keyword, add const.
1512
1513 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1514
1515 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
1516 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
1517 * configure.ac: Remove AC_PREREQ, add missing quoting.
1518 * gnulib/configure.ac: Modernize usage of
1519 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
1520 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
1521 (AUTOMAKE_VERSION): Bump to 1.15.1.
1522 * configure: Re-generate.
1523 * config.in: Re-generate.
1524 * aclocal.m4: Re-generate.
1525 * gnulib/aclocal.m4: Re-generate.
1526 * gnulib/config.in: Re-generate.
1527 * gnulib/configure: Re-generate.
1528 * gnulib/import/Makefile.in: Re-generate.
1529
1530 2018-06-19 Pedro Alves <palves@redhat.com>
1531
1532 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
1533 (lookup_minimal_symbol_by_pc_section): ... here with
1534 gdb_assert_not_reached added.
1535
1536 2018-06-19 Pedro Alves <palves@redhat.com>
1537
1538 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
1539 parameter with a block parameter. Compare location's block symbol
1540 with the frame's block instead of addresses.
1541 (skip_inline_frames): Pass the current block instead of the
1542 frame's address. Break out as soon as we determine the frame
1543 should not be skipped.
1544
1545 2018-06-18 Tom Tromey <tom@tromey.com>
1546
1547 * solib-aix.c (solib_aix_get_section_offsets): Return
1548 unique_xmalloc_ptr.
1549 (solib_aix_solib_create_inferior_hook): Update.
1550
1551 2018-06-18 Tom Tromey <tom@tromey.com>
1552
1553 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
1554
1555 2018-06-18 Tom Tromey <tom@tromey.com>
1556
1557 * solib-frv.c (frv_relocate_main_executable): Use
1558 unique_xmalloc_ptr.
1559 * solib-dsbt.c (dsbt_relocate_main_executable): Use
1560 unique_xmalloc_ptr.
1561
1562 2018-06-18 Tom Tromey <tom@tromey.com>
1563
1564 * objfiles.h (inhibit_section_map_updates): Update.
1565 (resume_section_map_updates, resume_section_map_updates_cleanup):
1566 Remove.
1567 * solib-svr4.c (svr4_handle_solib_event): Update.
1568 * objfiles.c (inhibit_section_map_updates): Return
1569 scoped_restore_tmpl<int>.
1570 (resume_section_map_updates, resume_section_map_updates_cleanup):
1571 Remove.
1572
1573 2018-06-18 Tom Tromey <tom@tromey.com>
1574
1575 * valprint.h (read_string): Update.
1576 * valprint.c (read_string): Change type of "buffer".
1577 (val_print_string): Update.
1578 * python/py-value.c (valpy_string): Update.
1579 * language.h (struct language_defn) <la_get_string>: Change
1580 type of "buffer".
1581 (default_get_string, c_get_string): Update.
1582 * language.c (default_get_string): Change type of "buffer".
1583 * guile/scm-value.c (gdbscm_value_to_string): Update.
1584 * c-lang.c (c_get_string): Change type of "buffer".
1585
1586 2018-06-18 Tom Tromey <tom@tromey.com>
1587
1588 * ser-mingw.c (struct pipe_state_destroyer): New.
1589 (pipe_state_up): New typedef.
1590 (cleanup_pipe_state): Remove.
1591 (pipe_windows_open): Use pipe_state_up. Don't release argv.
1592
1593 2018-06-18 Tom Tromey <tom@tromey.com>
1594
1595 * rust-lang.h (rust_yyerror): Don't declare.
1596 * rust-lang.c (rust_language_defn): Update.
1597 * rust-exp.y (yyerror): Now static.
1598 * parse.c (parse_exp_in_context_1): Update.
1599 * p-lang.h (p_yyerror): Don't declare.
1600 * p-lang.c (p_language_defn): Update.
1601 * p-exp.y (yyerror): Now static.
1602 * opencl-lang.c (opencl_language_defn): Update.
1603 * objc-lang.c (objc_language_defn): Update.
1604 * m2-lang.h (m2_yyerror): Don't declare.
1605 * m2-lang.c (m2_language_defn): Update.
1606 * m2-exp.y (yyerror): Now static.
1607 * language.h (struct language_defn) <la_error>: Remove.
1608 * language.c (unk_lang_error): Remove.
1609 (unknown_language_defn, auto_language_defn): Remove.
1610 * go-lang.h (go_yyerror): Don't declare.
1611 * go-lang.c (go_language_defn): Update.
1612 * go-exp.y (yyerror): Now static.
1613 * f-lang.h (f_yyerror): Don't declare.
1614 * f-lang.c (f_language_defn): Update.
1615 * f-exp.y (yyerror): Now static.
1616 * d-lang.h (d_yyerror): Don't declare.
1617 * d-lang.c (d_language_defn): Update.
1618 * d-exp.y (yyerror): Now static.
1619 * c-lang.h (c_yyerror): Don't declare.
1620 * c-lang.c (c_language_defn, cplus_language_defn)
1621 (asm_language_defn, minimal_language_defn): Update.
1622 * c-exp.y (yyerror): Now static.
1623 * ada-lang.h (ada_yyerror): Don't declare.
1624 * ada-lang.c (ada_language_defn): Update.
1625 * ada-exp.y (yyerror): Now static.
1626
1627 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1628
1629 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
1630 (store_sveregs_to_thread): Likewise.
1631 (aarch64_linux_fetch_inferior_registers): Check for SVE.
1632 (aarch64_linux_store_inferior_registers): Likewise.
1633 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
1634 function.
1635 (aarch64_sve_regs_copy_to_regcache): Likewise.
1636 (aarch64_sve_regs_copy_from_regcache): Likewise.
1637 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
1638 declaration.
1639 (aarch64_sve_regs_copy_to_regcache): Likewise.
1640 (aarch64_sve_regs_copy_from_regcache): Likewise.
1641 (sve_context): Structure from Linux headers.
1642 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
1643 (SVE_SIG_ZREG_SIZE): Likewise.
1644 (SVE_SIG_PREG_SIZE): Likewise.
1645 (SVE_SIG_FFR_SIZE): Likewise.
1646 (SVE_SIG_REGS_OFFSET): Likewise.
1647 (SVE_SIG_ZREGS_OFFSET): Likewise.
1648 (SVE_SIG_ZREG_OFFSET): Likewise.
1649 (SVE_SIG_ZREGS_SIZE): Likewise.
1650 (SVE_SIG_PREGS_OFFSET): Likewise.
1651 (SVE_SIG_PREG_OFFSET): Likewise.
1652 (SVE_SIG_PREGS_SIZE): Likewise.
1653 (SVE_SIG_FFR_OFFSET): Likewise.
1654 (SVE_SIG_REGS_SIZE): Likewise.
1655 (SVE_SIG_CONTEXT_SIZE): Likewise.
1656 (SVE_PT_REGS_MASK): Likewise.
1657 (SVE_PT_REGS_FPSIMD): Likewise.
1658 (SVE_PT_REGS_SVE): Likewise.
1659 (SVE_PT_VL_INHERIT): Likewise.
1660 (SVE_PT_VL_ONEXEC): Likewise.
1661 (SVE_PT_REGS_OFFSET): Likewise.
1662 (SVE_PT_FPSIMD_OFFSET): Likewise.
1663 (SVE_PT_FPSIMD_SIZE): Likewise.
1664 (SVE_PT_SVE_ZREG_SIZE): Likewise.
1665 (SVE_PT_SVE_PREG_SIZE): Likewise.
1666 (SVE_PT_SVE_FFR_SIZE): Likewise.
1667 (SVE_PT_SVE_FPSR_SIZE): Likewise.
1668 (SVE_PT_SVE_FPCR_SIZE): Likewise.
1669 (__SVE_SIG_TO_PT): Likewise.
1670 (SVE_PT_SVE_OFFSET): Likewise.
1671 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
1672 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
1673 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
1674 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
1675 (SVE_PT_SVE_PREG_OFFSET): Likewise.
1676 (SVE_PT_SVE_PREGS_SIZE): Likewise.
1677 (SVE_PT_SVE_FFR_OFFSET): Likewise.
1678 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
1679 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
1680 (SVE_PT_SVE_SIZE): Likewise.
1681 (SVE_PT_SIZE): Likewise.
1682 (HAS_SVE_STATE): New define.
1683
1684 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1685
1686 * nat/aarch64-sve-linux-sigcontext.h: New file.
1687 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
1688 new files.
1689 (SVE_VQ_MIN): Likewise.
1690 (SVE_VQ_MAX): Likewise.
1691 (SVE_VL_MIN): Likewise.
1692 (SVE_VL_MAX): Likewise.
1693 (SVE_NUM_ZREGS): Likewise.
1694 (SVE_NUM_PREGS): Likewise.
1695 (sve_vl_valid): Likewise.
1696 (struct user_sve_header): Likewise.
1697
1698 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
1699 Richard Bunt <Richard.Bunt@arm.com>
1700
1701 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
1702 was requested by GDB.
1703
1704 2018-06-15 Tom de Vries <tdevries@suse.de>
1705
1706 * MAINTAINERS (Write After Approval): Add Tom de Vries.
1707
1708 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
1709
1710 * gnulib/update-gnulib.sh: Print expected versions of
1711 autoconf/aclocal.
1712
1713 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
1714
1715 * arch-utils.c (default_type_align): Use type_length_units.
1716 * gdbtypes.c (type_align): Use type_length_units.
1717
1718 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1719
1720 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
1721 of 'define' command.
1722
1723 2018-06-14 Tom de Vries <tdevries@suse.de>
1724
1725 PR cli/22573
1726 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
1727 get_no_prettyformat_print_options.
1728
1729 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
1730
1731 * sparc-nat.h: Include target.h.
1732 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
1733 <fetch_registers>: Remove this argument in function call.
1734 <store_registers>: Remove this argument in function call, remove
1735 extra semicolon.
1736 <low_forget_process>: Call sparc64_forget_process instead of
1737 sparc_forget_process.
1738
1739 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1740
1741 * procfs.c (_initialize_procfs): Use add_inf_child_target.
1742 (procfs_target::make_corefile_notes): Adjust to new
1743 target_read_alloc return type.
1744
1745 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1746 Stephen Roberts <stephen.roberts@arm.com>
1747
1748 PR gdb/22882
1749 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
1750 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
1751 Move should_notify_stop local into more inner scope.
1752
1753 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1754 Stephen Roberts <stephen.roberts@arm.com>
1755
1756 PR gdb/22882
1757 * infrun.c (resume_1): Add call to mark_async_event_handler.
1758
1759 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1760
1761 * infrun.c (do_target_wait): Change old version of $pc printed.
1762
1763 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
1764
1765 * dwarf2read.c (read_index_from_section): Rename to...
1766 (read_gdb_index_from_section): ... this, update all callers.
1767 (dwarf2_read_index): Rename to...
1768 (dwarf2_read_gdb_index): ... this, update all callers.
1769
1770 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
1771
1772 * gdb/hppa-linux-nat.c
1773 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
1774 hppa_linux_nat_target::fetch_registers.
1775
1776 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1777
1778 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
1779 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
1780 (AARCH64_DWARF_SVE_FFR): Likewise.
1781 (AARCH64_DWARF_SVE_P0): Likewise.
1782 (AARCH64_DWARF_SVE_Z0): Likewise.
1783
1784 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1785
1786 * common/common-regcache.h (raw_compare): New function.
1787 * regcache.c (regcache::raw_compare): Likewise.
1788 * regcache.h (regcache::raw_compare): New declaration.
1789
1790 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1791
1792 * common/common-regcache.h (reg_buffer_common): New structure.
1793 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
1794 (reg_buffer::raw_supply): Likewise.
1795 (reg_buffer::raw_supply_integer): Likewise.
1796 (reg_buffer::raw_supply_zeroed): Likewise.
1797 (reg_buffer::raw_collect): Likewise.
1798 (reg_buffer::raw_collect_integer): Likewise.
1799 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
1800 (reg_buffer::raw_supply): Likewise.
1801 (reg_buffer::raw_supply_integer): Likewise.
1802 (reg_buffer::raw_supply_zeroed): Likewise.
1803 (reg_buffer::raw_collect): Likewise.
1804 (reg_buffer::raw_collect_integer): Likewise.
1805
1806 2018-06-10 Tom Tromey <tom@tromey.com>
1807
1808 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
1809 (class remote_state) <stop_reply_queue>: Now std::vector.
1810 (remote_state::~remote_state)
1811 (remote_target::stop_reply_queue_length): Update.
1812 (struct queue_iter_param, remove_child_of_pending_fork)
1813 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
1814 (check_pending_event_prevents_wildcard_vcont_callback)
1815 (remove_stop_reply_for_inferior)
1816 (remove_stop_reply_of_remote_state)
1817 (remote_notif_remove_once_on_match)
1818 (stop_reply_match_ptid_and_ws)
1819 (remote_kill_child_of_pending_fork): Remove.
1820 (remote_target::remove_new_fork_children)
1821 (remote_target::check_pending_events_prevent_wildcard_vcont)
1822 (remote_target::discard_pending_stop_replies)
1823 (remote_target::discard_pending_stop_replies_in_queue)
1824 (remote_target::remote_notif_remove_queued_reply)
1825 (remote_target::queued_stop_reply)
1826 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
1827 (remote_target::wait, remote_target::kill_new_fork_children)
1828 (remote_target::async): Update.
1829
1830 2018-06-10 Tom Tromey <tom@tromey.com>
1831
1832 * record-full.c (record_full_arch_list_cleanups): Remove.
1833 (record_full_message): Use try/catch.
1834 (record_full_wait_cleanups): Remove.
1835 (record_full_wait_1): Use try/catch.
1836 (record_full_restore): Likewise.
1837
1838 2018-06-10 Tom Tromey <tom@tromey.com>
1839
1840 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
1841 declare VEC. Add constructor.
1842 <in_target_beneath>: Now bool.
1843 (record_full_breakpoints): Now a std::vector, static.
1844 (record_full_sync_record_breakpoints)
1845 (record_full_init_record_breakpoints)
1846 (record_full_target::insert_breakpoint)
1847 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
1848
1849 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
1850
1851 * dwarf2read.c (process_cu_includes): Remove struct keyword.
1852 * serial.c (serial_interface_lookup): Remove struct keyword.
1853
1854 2018-06-10 Tom Tromey <tom@tromey.com>
1855
1856 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
1857 method.
1858 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
1859 a method.
1860 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
1861 method.
1862 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
1863 "beneath" as a method.
1864 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
1865 Use "beneath" as a method.
1866
1867 2018-06-10 Tom Tromey <tom@tromey.com>
1868
1869 * tracefile.c (struct trace_file_writer_deleter): New.
1870 <operator()>: Rename from trace_file_writer_xfree.
1871 (trace_file_writer_up): New typedef.
1872 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
1873
1874 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
1875
1876 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
1877 <m_registers, m_register_status>: Change type to
1878 std::unique_ptr.
1879 * regcache.c (reg_buffer::reg_buffer): Use new instead of
1880 XCNEWVEC.
1881
1882 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
1883
1884 * common/common-regcache.h (enum register_status): Add
1885 underlying type "signed char".
1886 * regcache.h (reg_buffer) <m_register_status>: Change type to
1887 register_status *.
1888 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
1889 register_status instead of signed char.
1890 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
1891 (reg_buffer::get_register_status): Remove cast.
1892 (readable_regcache::raw_read): Remove cast.
1893 (readable_regcache::cooked_read): Remove cast.
1894
1895 2018-06-09 Tom Tromey <tom@tromey.com>
1896
1897 * source.c (reverse_search_command, forward_search_command): Use
1898 scoped_fd.
1899
1900 2018-06-09 Tom Tromey <tom@tromey.com>
1901
1902 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
1903 (serial_ops_list): Now static, std::vector.
1904 (serial_interface_lookup, serial_add_interface): Update.
1905
1906 2018-06-09 Tom Tromey <tom@tromey.com>
1907
1908 * dwarf2read.c (process_cu_includes): Update.
1909 (process_full_comp_unit): Update.
1910 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
1911 std::vector.
1912
1913 2018-06-08 Paul Koning <paul_koning@dell.com>
1914
1915 PR gdb/23252
1916
1917 * python/python.c (do_start_initialization):
1918 Avoid call to internal Python API.
1919 (init__gdb_module): New function.
1920
1921 2018-06-08 Gary Benson <gbenson@redhat.com>
1922
1923 * linux-thread-db.c (valprint.h): New include.
1924 (struct check_thread_db_info): New structure.
1925 (check_thread_db_on_load, tdb_testinfo): New static globals.
1926 (check_thread_db, check_thread_db_callback): New functions.
1927 (try_thread_db_load_1): Run integrity checks if requested.
1928 (maintenance_check_libthread_db): New function.
1929 (_initialize_thread_db): Register "maint check libthread-db"
1930 and "maint set/show check-libthread-db".
1931 * NEWS: Mention the above new commands.
1932
1933 2018-06-08 Tom Tromey <tom@tromey.com>
1934
1935 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
1936 now a method.
1937
1938 2018-06-08 Tom Tromey <tom@tromey.com>
1939
1940 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
1941
1942 2018-06-08 Tom Tromey <tom@tromey.com>
1943
1944 * common/btrace-common.h (struct btrace_data): Add constructor,
1945 destructor, move assignment operator.
1946 <empty, clear, fini>: New methods.
1947 <format>: Initialize.
1948 (btrace_data_init, btrace_data_fini, btrace_data_clear)
1949 (btrace_data_empty): Don't declare.
1950 * common/btrace-common.c (btrace_data_init): Remove.
1951 (btrace_data::fini): Rename from btrace_data_fini.
1952 (btrace_data::empty): Rename from btrace_data_empty.
1953 (btrace_data::clear): Rename from btrace_data_clear. Return
1954 bool.
1955 * btrace.h (make_cleanup_btrace_data): Don't declare.
1956 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
1957 (parse_xml_btrace): Update.
1958 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
1959 (maint_btrace_clear_packet_history_cmd): Update.
1960
1961 2018-06-07 Pedro Alves <palves@redhat.com>
1962
1963 * target.h (target_ops) <beneath>: Now a method. All references
1964 updated.
1965 (class target_stack): New.
1966 * target.c (g_target_stack): New.
1967 (g_current_top_target): Delete.
1968 (current_top_target): Get the top target out of g_target_stack.
1969 (target_stack::push, target_stack::unpush): New.
1970 (push_target, unpush_target): Reimplement.
1971 (target_is_pushed): Reimplement in terms of g_target_stack.
1972 (target_ops::beneath, target_stack::find_beneath): New.
1973
1974 2018-06-07 Pedro Alves <palves@redhat.com>
1975
1976 * target.h (find_target_beneath): Delete declaration.
1977 * target.c (find_target_beneath): Delete definition.
1978 * aix-thread.c: All callers of find_target_beneath adjusted to
1979 call target_ops::beneath instead.
1980 * bsd-uthread.c: Likewise.
1981 * linux-thread-db.c: Likewise.
1982 * ravenscar-thread.c: Likewise.
1983 * sol-thread.c: Likewise.
1984 * spu-multiarch.c: Likewise.
1985
1986 2018-06-07 Pedro Alves <palves@redhat.com>
1987
1988 * target.h (target_ops) <beneath>: Now a method. All references
1989 updated.
1990 (target_ops) <m_beneath>: New.
1991 * target.c (target_ops::beneath): New.
1992 * corelow.c: Adjust all references to target_ops::beneath.
1993 * linux-thread-db.c: Likewise.
1994 * make-target-delegates: Likewise.
1995 * record-btrace.c: Likewise.
1996 * record-full.c: Likewise.
1997 * remote.c: Likewise.
1998 * target.c: Likewise.
1999 * target-delegates.c: Regenerate.
2000
2001 2018-06-07 Pedro Alves <palves@redhat.com>
2002
2003 * target.h (target_stack): Delete.
2004 (current_top_target): Declare function.
2005 * target.c (target_stack): Delete.
2006 (g_current_top_target): New.
2007 (current_top_target): New function.
2008 * auxv.c: Use current_top_target instead of target_stack
2009 throughout.
2010 * avr-tdep.c: Likewise.
2011 * breakpoint.c: Likewise.
2012 * corefile.c: Likewise.
2013 * elfread.c: Likewise.
2014 * eval.c: Likewise.
2015 * exceptions.c: Likewise.
2016 * frame.c: Likewise.
2017 * gdbarch-selftests.c: Likewise.
2018 * gnu-v3-abi.c: Likewise.
2019 * ia64-tdep.c: Likewise.
2020 * ia64-vms-tdep.c: Likewise.
2021 * infcall.c: Likewise.
2022 * infcmd.c: Likewise.
2023 * infrun.c: Likewise.
2024 * linespec.c: Likewise.
2025 * linux-tdep.c: Likewise.
2026 * minsyms.c: Likewise.
2027 * ppc-linux-nat.c: Likewise.
2028 * ppc-linux-tdep.c: Likewise.
2029 * procfs.c: Likewise.
2030 * regcache.c: Likewise.
2031 * remote.c: Likewise.
2032 * rs6000-tdep.c: Likewise.
2033 * s390-linux-nat.c: Likewise.
2034 * s390-tdep.c: Likewise.
2035 * solib-aix.c: Likewise.
2036 * solib-darwin.c: Likewise.
2037 * solib-dsbt.c: Likewise.
2038 * solib-spu.c: Likewise.
2039 * solib-svr4.c: Likewise.
2040 * solib-target.c: Likewise.
2041 * sparc-tdep.c: Likewise.
2042 * sparc64-tdep.c: Likewise.
2043 * spu-tdep.c: Likewise.
2044 * symfile.c: Likewise.
2045 * symtab.c: Likewise.
2046 * target-descriptions.c: Likewise.
2047 * target-memory.c: Likewise.
2048 * target.c: Likewise.
2049 * target.h: Likewise.
2050 * tracefile-tfile.c: Likewise.
2051 * tracepoint.c: Likewise.
2052 * valops.c: Likewise.
2053 * valprint.c: Likewise.
2054 * value.c: Likewise.
2055 * windows-tdep.c: Likewise.
2056 * mi/mi-main.c: Likewise.
2057
2058 2018-06-07 Tom Tromey <tom@tromey.com>
2059
2060 * valprint.h (build_address_symbolic): Declare.
2061 * printcmd.c (print_address_symbolic): Update.
2062 (build_address_symbolic): Change "name" and "filename" to
2063 std::string.
2064 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
2065 Update.
2066 * defs.h (build_address_symbolic): Remove declaration.
2067
2068 2018-06-07 Alan Hayward <alan.hayward@arm.com>
2069
2070 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
2071 (aarch64_vnv_type): Add function.
2072 (aarch64_pseudo_register_name): Add V regs for SVE.
2073 (aarch64_pseudo_register_type): Likewise.
2074 (aarch64_pseudo_register_reggroup_p): Likewise.
2075 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
2076 (aarch64_pseudo_read_value): Add V regs for SVE.
2077 (aarch64_pseudo_write_2): Use V0 offset for SVE
2078 (aarch64_pseudo_write): Add V regs for SVE.
2079 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
2080
2081 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
2082
2083 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
2084 (sve_vl_from_vq): Likewise.
2085
2086 2018-06-05 Tom Tromey <tom@tromey.com>
2087
2088 * cli/cli-cmds.c (show_version): Update.
2089 * top.c (print_gdb_version): Add "interactive" parameter.
2090 Update.
2091 * main.c (captured_main_1): Update.
2092 * top.h (print_gdb_version): Add "interactive" parameter and a
2093 comment.
2094
2095 2018-06-05 David Malcolm <dmalcolm@redhat.com>
2096
2097 * common/enum-flags.h: Add trailing semicolon to example in
2098 comment.
2099
2100 2018-06-05 Tom Tromey <tom@tromey.com>
2101
2102 PR cli/12326:
2103 * NEWS: Add entry about pager.
2104 * utils.c (pagination_disabled_for_command): New global.
2105 (prompt_for_continue): Allow "c" response to prompt.
2106 (reinitialize_more_filter): Clear
2107 pagination_disabled_for_command.
2108 (fputs_maybe_filtered): Check pagination_disabled_for_command.
2109
2110 2018-06-04 Tom Tromey <tom@tromey.com>
2111
2112 * ada-lang.h (ada_lookup_symbol_list): Update.
2113 * ada-lang.c (resolve_subexp): Update.
2114 (symbols_are_identical_enums): Change type of syms. Remove nsyms
2115 parameter.
2116 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
2117 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
2118 results parameter to std::vector.
2119 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
2120 Update.
2121 * ada-exp.y (block_lookup): Update.
2122 (select_possible_type_sym): Change type of syms. Remove nsyms
2123 parameter.
2124 (write_var_or_type, write_name_assoc): Update.
2125
2126 2018-06-04 Joel Brobecker <brobecker@adacore.com>
2127
2128 * windows-nat.c (windows_nat_target::xfer_partial): Return
2129 TARGET_XFER_E_IO if we need to delegate to the target beneath
2130 but BENEATH is NULL.
2131
2132 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
2133
2134 * Makefile.in (config.status): Add configure.nat as a
2135 dependency.
2136
2137 2018-06-04 Tom Tromey <tom@tromey.com>
2138
2139 * cp-name-parser.y (cpname_state): Add method declarations.
2140 (HANDLE_QUAL): Update.
2141 (cpname_state::d_grab, cpname_state::fill_comp)
2142 (cpname_state::make_operator, cpname_state::make_dtor)
2143 (cpname_state::make_builtin_type, cpname_state::make_name)
2144 (cpname_state::d_qualify, cpname_state::d_int_type)
2145 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
2146 (%union): Move earlier.
2147
2148 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2149
2150 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
2151
2152 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2153
2154 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
2155 (aarch64_pseudo_write_1): Likewise.
2156 (aarch64_pseudo_read_value): Use helper.
2157 (aarch64_pseudo_write): Likewise.
2158
2159 2018-06-04 Pedro Alves <palves@redhat.com>
2160
2161 * darwin-nat.c (darwin_ops): Delete.
2162 (darwin_attach_pid): Use get_native_target.
2163
2164 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2165
2166 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
2167 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
2168
2169 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2170
2171 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
2172 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
2173 (aarch64_gdbarch_init): Check for SVE.
2174 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
2175
2176 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2177
2178 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
2179 * aarch64-tdep.h (aarch64_read_description): Likewise.
2180 * arch/aarch64.c (aarch64_create_target_description): Likewise.
2181 * arch/aarch64.h (aarch64_create_target_description): Likewise.
2182 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
2183 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
2184 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
2185
2186 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
2187
2188 * value.c (value_fetch_lazy_bitfield): New.
2189 (value_fetch_lazy_memory): New.
2190 (value_fetch_lazy_register): New.
2191 (value_fetch_lazy): Factor out to smaller functions.
2192
2193 2018-06-01 Tom Tromey <tom@tromey.com>
2194
2195 * cp-name-parser.y (backslashable, represented): Now const.
2196
2197 2018-06-01 Tom Tromey <tom@tromey.com>
2198
2199 * cp-name-parser.y: Include parser-defs.h.
2200 (parser_fprintf): Remove declaration.
2201
2202 2018-06-01 Tom Tromey <tom@tromey.com>
2203
2204 * cp-name-parser.y: Use %pure-parser, %lex-param, and
2205 %parse-param.
2206 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
2207 (global_result): Remove globals.
2208 (struct cpname_state): New.
2209 (yyparse): Don't declare.
2210 (yylex, yyerror): Move declarations after %union.
2211 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
2212 (make_name): Add state parameter.
2213 Update all callers.
2214 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
2215 parameter.
2216 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
2217 Update.
2218 (yylex): Add lvalp, state parameters.
2219 (yyerror): Add state parameter.
2220 (cp_demangled_name_to_comp): Update.
2221
2222 2018-06-01 Tom Tromey <tom@tromey.com>
2223
2224 * cp-name-parser.y (parser_fprintf): Declare.
2225 (GDB_YY_REMAP_PREFIX): Define.
2226 Include yy-remap.h. Don't redefine yy* identifiers.
2227
2228 2018-06-01 Tom Tromey <tom@tromey.com>
2229
2230 * python/py-type.c (typy_legacy_template_argument): Update.
2231 * cp-support.h (cp_demangled_name_to_comp): Update.
2232 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
2233 parameter to be a "std::string *".
2234 (main): Update.
2235
2236 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
2237
2238 * ada-lex.l: Include "diagnostics.h" instead of
2239 "common/diagnostics.h".
2240 * unittests/environ-selftests.c: Likewise.
2241 * common/diagnostics.h: Moved to ../include.
2242
2243 2018-06-01 Joel Brobecker <brobecker@adacore.com>
2244
2245 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
2246 to language_mode_manual while calling breakpoint_re_set_one.
2247
2248 2018-06-01 Tom Tromey <tom@tromey.com>
2249
2250 * valops.c (value_cast_structs, destructor_name_p): Update.
2251 * symtab.c (gdb_mangle_name): Update.
2252 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
2253 Update.
2254 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
2255 (pascal_object_print_value_fields, pascal_object_print_value):
2256 Update.
2257 * p-typeprint.c (pascal_type_print_derivation_info): Update.
2258 * linespec.c (find_methods): Update.
2259 * gdbtypes.h (type_name_no_tag): Remove.
2260 (type_name_or_error): Rename from type_name_no_tag_or_error.
2261 * gdbtypes.c (type_name_no_tag): Remove.
2262 (type_name_or_error): Rename from type_name_no_tag_or_error.
2263 (lookup_struct_elt_type, check_typedef): Update.
2264 * expprint.c (print_subexp_standard): Update.
2265 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
2266 * d-namespace.c (d_lookup_nested_symbol): Update.
2267 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
2268 (cp_print_class_member): Update.
2269 * cp-namespace.c (cp_lookup_nested_symbol): Update.
2270 * completer.c (add_struct_fields): Update.
2271 * c-typeprint.c (cp_type_print_derivation_info)
2272 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
2273 Update.
2274 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
2275 (ada_prefer_type, ada_is_exception_sym): Update.
2276
2277 2018-06-01 Tom Tromey <tom@tromey.com>
2278
2279 * valops.c (enum_constant_from_type, value_namespace_elt)
2280 (value_maybe_namespace_elt): Update.
2281 * valarith.c (find_size_for_pointer_math): Update.
2282 * target-descriptions.c (make_gdb_type): Update.
2283 * symmisc.c (print_symbol): Update.
2284 * stabsread.c (define_symbol, read_type)
2285 (complain_about_struct_wipeout, add_undefined_type)
2286 (cleanup_undefined_types_1): Update.
2287 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
2288 (rust_range_type_p, val_print_struct, rust_print_struct_def)
2289 (rust_internal_print_type, rust_composite_type)
2290 (rust_evaluate_funcall, rust_evaluate_subexp)
2291 (rust_inclusive_range_type_p): Update.
2292 * python/py-type.c (typy_get_tag): Update.
2293 * p-typeprint.c (pascal_type_print_base): Update.
2294 * mdebugread.c (parse_symbol, parse_type): Update.
2295 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
2296 Update.
2297 * guile/scm-type.c (gdbscm_type_tag): Update.
2298 * go-lang.c (sixg_string_p): Update.
2299 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
2300 Update.
2301 * gdbtypes.h (struct main_type) <tag_name>: Remove.
2302 (TYPE_TAG_NAME): Remove.
2303 * gdbtypes.c (type_name_no_tag): Simplify.
2304 (check_typedef, check_types_equal, recursive_dump_type)
2305 (copy_type_recursive, arch_composite_type): Update.
2306 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
2307 in summary mode when needed.
2308 * eval.c (evaluate_funcall): Update.
2309 * dwarf2read.c (fixup_go_packaging, read_structure_type)
2310 (process_structure_scope, read_enumeration_type)
2311 (read_namespace_type, read_module_type, determine_prefix): Update.
2312 * cp-support.c (inspect_type): Update.
2313 * coffread.c (process_coff_symbol, decode_base_type): Update.
2314 * c-varobj.c (c_is_path_expr_parent): Update.
2315 * c-typeprint.c (c_type_print_base_struct_union): Update.
2316 (c_type_print_base_1): Update. Print struct/class/union/enum in
2317 summary when using C language.
2318 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
2319 (gen_maybe_namespace_elt): Update.
2320 * ada-lang.c (ada_type_name): Simplify.
2321 (empty_record, ada_template_to_fixed_record_type_1)
2322 (template_to_static_fixed_type)
2323 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
2324
2325 2018-06-01 Tom Tromey <tom@tromey.com>
2326
2327 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
2328 c_print_type.
2329 * c-typeprint.c (c_print_type_1): Add "language" parameter.
2330 (c_print_type): Update.
2331 (c_print_type): New overload.
2332 (c_type_print_varspec_prefix, c_type_print_args)
2333 (c_type_print_varspec_suffix, c_print_type_no_offsets)
2334 (c_type_print_base_struct_union, c_type_print_base_1)
2335 (cp_type_print_method_args): Add "language" parameter.
2336 (c_type_print_base): Update.
2337 * c-lang.h (c_print_type): Add new overload.
2338
2339 2018-06-01 Tom Tromey <tom@tromey.com>
2340
2341 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
2342 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
2343
2344 2018-06-01 Alan Hayward <alan.hayward@arm.com>
2345
2346 * aarch64-tdep.c (aarch64_sve_register_names): New const
2347 var.
2348 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
2349 (AARCH64_SVE_Z_REGS_NUM): New define.
2350 (AARCH64_SVE_P_REGS_NUM): Likewise.
2351 (AARCH64_SVE_NUM_REGS): Likewise.
2352
2353 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
2354
2355 * nat/linux-ptrace.h [__alpha__]
2356 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
2357 definitions.
2358
2359 2018-05-31 Maciej W. Rozycki <macro@mips.com>
2360
2361 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
2362 the endianness selected.
2363 * NEWS: Document `set endian auto' mode operation update.
2364
2365 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2366
2367 * Makefile.in: Add new header.
2368 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
2369 (sve_vl_from_vg): Likewise.
2370 (sve_vq_from_vl): Likewise.
2371 (sve_vl_from_vq): Likewise.
2372 (sve_vq_from_vg): Likewise.
2373 (sve_vg_from_vq): Likewise.
2374 * configure.nat: Add new c file.
2375 * nat/aarch64-sve-linux-ptrace.c: New file.
2376 * nat/aarch64-sve-linux-ptrace.h: New file.
2377
2378 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2379
2380 * aarch64-linux-nat.c (aarch64_linux_read_description):
2381 Add parmeter zero.
2382 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
2383 Likewise.
2384 * aarch64-tdep.c (tdesc_aarch64_list): Add.
2385 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
2386 (aarch64_gdbarch_init): Add parmeter zero.
2387 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
2388 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
2389 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
2390 parmeter.
2391 * doc/gdb.texinfo: Describe SVE feature
2392 * features/aarch64-sve.c: New file.
2393
2394 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
2395
2396 PR gdb/23210
2397 * gdbarch.sh (significant_addr_bit): Default to zero when
2398 not set by target architecture.
2399 * gdbarch.c: Re-generated.
2400 * utils.c (address_significant): Update.
2401
2402 2018-05-30 Joel Brobecker <brobecker@adacore.com>
2403
2404 * stack.c (func_command): Remove trailing newline in call to error.
2405
2406 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2407
2408 * regcache.h (regcache_raw_collect): Remove, update callers to
2409 use regcache::raw_collect.
2410 * regcache.c (regcache_raw_collect): Remove.
2411
2412 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2413
2414 * regcache.h (regcache_raw_supply): Remove, update callers to
2415 use detached_regcache::raw_supply.
2416 * regcache.c (regcache_raw_supply): Remove.
2417
2418 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2419
2420 * regcache.h (regcache_cooked_write_part): Remove, update
2421 callers to use regcache::cooked_write_part.
2422 * regcache.c (regcache_cooked_write_part): Remove.
2423
2424 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2425
2426 * regcache.h (regcache_cooked_read_part): Remove, update callers
2427 to use readable_regcache::cooked_read_part.
2428 * regcache.c (regcache_cooked_read_part): Remove.
2429
2430 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2431
2432 * regcache.h (regcache_cooked_read_value): Remove, update
2433 callers to use readable_regcache::cooked_read_value.
2434 * regcache.c (regcache_cooked_read_value): Remove.
2435
2436 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2437
2438 * regcache.h (regcache_cooked_write): Remove, update callers to
2439 use regcache::cooked_write.
2440 * regcache.c (regcache_cooked_write): Remove.
2441
2442 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2443
2444 * regcache.h (regcache_invalidate): Remove, update callers to
2445 use detached_regcache::invalidate instead.
2446 * regcache.c (regcache_invalidate): Remove.
2447
2448 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2449
2450 * regcache.h (regcache_raw_write_part): Remove, update callers
2451 to use regcache::raw_write_part instead.
2452 * regcache.c (regcache_raw_write_part): Remove.
2453
2454 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2455
2456 * regcache.h (regcache_raw_read_part): Remove, update callers to
2457 use readable_regcache::raw_read_part instead.
2458 * regcache.c (regcache_raw_read_part): Remove.
2459
2460 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2461
2462 * regcache.h (regcache_cooked_read): Remove, update callers to
2463 use readable_regcache::cooked_read instead.
2464 * regcache.c (regcache_cooked_read): Remove.
2465
2466 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2467
2468 * regcache.h (regcache_raw_write): Remove, update callers to use
2469 regcache::raw_write instead.
2470 * regcache.c (regcache_raw_write): Remove.
2471
2472 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2473
2474 * regcache.h (regcache_raw_read): Remove, update callers to use
2475 readable_regcache::raw_read instead.
2476 * regcache.c (regcache_raw_read): Remove.
2477
2478 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2479
2480 * regcache.h (regcache_raw_update): Remove, update callers to
2481 use readable_regcache::raw_update instead.
2482 * regcache.c (regcache_raw_update): Remove.
2483
2484 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2485
2486 * regcache.h (regcache_register_status): Remove, update callers
2487 to use reg_buffer::get_register_status directly instead.
2488 * regcache.c (regcache_register_status): Remove.
2489
2490 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2491
2492 * regcache.h (regcache_get_ptid): Remove, update all callers to
2493 call regcache::ptid instead.
2494 * regcache.c (regcache_get_ptid): Remove.
2495
2496 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2497
2498 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
2499
2500 2018-05-30 Pedro Alves <palves@redhat.com>
2501
2502 * common/common-exceptions.h (exception_rethrow): Use
2503 ATTRIBUTE_NORETURN.
2504
2505 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
2506
2507 * breakpoint.c (print_solib_event, check_status_catch_solib):
2508 Remove struct keyword in range-based for loops.
2509 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
2510 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
2511 Likewise.
2512 * linespec.c (find_superclass_methods, search_minsyms_for_name):
2513 Likewise.
2514 * symfile.c (addr_info_make_relative): Likewise.
2515 * thread.c (value_in_thread_stack_temporaries): Likewise.
2516
2517 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
2518
2519 PR gdb/16841
2520 * valops.c (value_struct_elt_for_reference): Call check_typedef on
2521 aggregate type to get its real type before accessing it.
2522
2523 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
2524
2525 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
2526 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
2527 * coff-pe-read.c (add_pe_forwarded_sym): Replace
2528 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
2529 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
2530 * jit.c (jit_breakpoint_re_set_internal): Likewise.
2531 * printcmd.c (info_address_command): Likewise.
2532
2533 2018-05-29 Tom Tromey <tom@tromey.com>
2534
2535 * windows-nat.c (handle_exception): Update fall-through comment.
2536
2537 2018-05-29 Tom Tromey <tom@tromey.com>
2538
2539 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
2540 (struct program_space) <added_solibs>: Now a std::vector.
2541 * breakpoint.c (print_solib_event): Update.
2542 (check_status_catch_solib): Update.
2543 * progspace.c (clear_program_space_solib_cache): Update.
2544 * solib.c (update_solib_list): Update.
2545
2546 2018-05-29 Tom Tromey <tom@tromey.com>
2547
2548 * python/py-type.c (typy_richcompare): Update.
2549 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
2550 * gdbtypes.h (types_deeply_equal): Return bool.
2551 (types_equal): Likewise.
2552 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
2553 declare VEC.
2554 (check_types_equal): Change worklist to std::vector. Return
2555 bool.
2556 (struct type_equality_entry): Add constructor.
2557 (compare_maybe_null_strings): Return bool.
2558 (check_types_worklist): Return bool. Change worklist to
2559 std::vector.
2560 (types_deeply_equal): Use std::vector.
2561 (types_equal): Return bool.
2562 (compare_maybe_null_strings): Simplify.
2563
2564 2018-05-29 Tom Tromey <tom@tromey.com>
2565
2566 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
2567
2568 2018-05-29 Tom Tromey <tom@tromey.com>
2569
2570 * objc-lang.h: Don't include cp-support.h.
2571 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
2572 declare VEC.
2573
2574 2018-05-27 Tom Tromey <tom@tromey.com>
2575
2576 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
2577
2578 2018-05-25 Tom Tromey <tom@tromey.com>
2579
2580 * value.c (value::location): Initialize.
2581
2582 2018-05-25 Tom Tromey <tom@tromey.com>
2583
2584 * dbxread.c (init_bincl_list): Remove.
2585 (bincl_list): Now a std::vector.
2586 (bincls_allocated, next_bincl): Remove.
2587 (free_bincl_list, do_free_bincl_list_cleanup)
2588 (make_cleanup_free_bincl_list): Remove.
2589 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
2590 unique_xmalloc_ptr.
2591 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
2592 (struct header_file_location): Add constructor.
2593 (add_bincl_to_list): Remove.
2594
2595 2018-05-25 Tom Tromey <tom@tromey.com>
2596
2597 * tui/tui.c (tui_enable): Update.
2598 * mi/mi-interp.c (mi_interp::init): Update.
2599 * interps.h (class interp) <name>: New method.
2600 <m_name>: Rename from name.
2601 (~scoped_restore_interp): Update.
2602 * interps.c (interp::interp): Update.
2603 (interp_add, interp_set, interp_lookup_existing)
2604 (current_interp_named_p): Update.
2605
2606 2018-05-25 Tom Tromey <tom@tromey.com>
2607
2608 * interps.c (interp_name): Remove.
2609 * mi/mi-interp.c (mi_interp::init): Update.
2610 * interps.h (interp_name): Remove.
2611 (~scoped_restore_interp): Update.
2612 * tui/tui.c (tui_enable): Update.
2613
2614 2018-05-25 Tom Tromey <tom@tromey.com>
2615
2616 * utils.c (fputs_maybe_filtered): Update.
2617 * linespec.c (decode_line_full): Update.
2618 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
2619 (mi_print_breakpoint_for_event, mi_solib_loaded)
2620 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
2621 (mi_user_selected_context_changed): Update.
2622 * mi/mi-main.c (mi_execute_command): Update.
2623 * cli/cli-script.c (execute_control_command): Update.
2624 * python/python.c (execute_gdb_command): Update.
2625 * solib.c (info_sharedlibrary_command): Update.
2626 * interps.c (interp_ui_out): Remove.
2627 * interps.h (interp_ui_out): Remove.
2628
2629 2018-05-25 Tom Tromey <tom@tromey.com>
2630
2631 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
2632 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
2633 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
2634
2635 2018-05-25 Tom Tromey <tom@tromey.com>
2636
2637 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
2638 * interps.c (interp_exec): Use scoped_restore.
2639
2640 2018-05-25 Tom Tromey <tom@tromey.com>
2641
2642 * remote.c (remote_target::remote_file_get): Use
2643 gdb::byte_vector.
2644 (remote_target::remote_file_put): Likewise.
2645
2646 2018-05-25 Tom Tromey <tom@tromey.com>
2647
2648 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
2649 a std::string.
2650 (get_pe_section_index, add_pe_exported_sym): Update.
2651 (read_pe_exported_syms): Use gdb::def_vector.
2652
2653 2018-05-25 Tom Tromey <tom@tromey.com>
2654
2655 * frame.c (remove_prev_frame): Remove.
2656 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
2657
2658 2018-05-25 Maciej W. Rozycki <macro@mips.com>
2659
2660 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
2661 Remove prototypes.
2662 * mips-linux-nat.c (supply_fpregset): Always call
2663 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
2664 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
2665 `mips_fill_fpregset'.
2666 * mips-linux-tdep.c (mips_supply_fpregset)
2667 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
2668 (mips_fill_fpregset_wrapper): Remove functions.
2669 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
2670 (mips_linux_fpregset): Remove variable.
2671 (mips_linux_iterate_over_regset_sections): Use
2672 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
2673 (mips_linux_o32_sigframe_init): Remove comment.
2674
2675 2018-05-25 Pedro Alves <palves@redhat.com>
2676
2677 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
2678 (struct readahead_cache, struct packet_reg, struct
2679 remote_arch_state, class remote_state): Move higher up in the
2680 file.
2681 (remote_target::m_remote_state): Now an object instead of a pointer.
2682 (remote_target::get_remote_state): Adjust.
2683
2684 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
2685
2686 * stack.c (select_and_print_frame): Delete.
2687 (struct function_bounds): Move struct within function.
2688 (func_command): Most content moved into new function
2689 find_frame_for_function, use new function, print result, add
2690 function comment.
2691 (find_frame_for_function): New function, now returns a result.
2692
2693 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2694
2695 * stack.c (iterate_over_block_arg_vars): Fix comment.
2696 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
2697
2698 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
2699
2700 PR gdb/23203
2701 * frame.c
2702 (scoped_restore_selected_frame::scoped_restore_selected_frame):
2703 Define.
2704 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
2705 Define.
2706 * frame.h (class scoped_restore_selected_frame): New class.
2707 * stack.c (print_frame_local_vars): Remove catching and rethrowing
2708 of any exception, use scoped_restore_selected_frame to restore the
2709 frame instead.
2710
2711 2018-05-24 Pedro Alves <palves@redhat.com>
2712
2713 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
2714 override.
2715
2716 2018-05-23 Tom Tromey <tom@tromey.com>
2717
2718 * complaints.c (struct complaints): Remove.
2719 (symfile_complaint_book): Remove.
2720 (series): New global.
2721 (complaint_internal): Update.
2722 (clear_complaints): Update.
2723
2724 2018-05-23 Tom Tromey <tom@tromey.com>
2725
2726 * complaints.c (counters): New global.
2727 (struct complain): Remove.
2728 (struct complaints) <root>: Remove.
2729 (complaint_sentinel): Remove.
2730 (symfile_complaint_book): Update.
2731 (find_complaint) Remove.
2732 (complaint_internal, clear_complaints): Update.
2733
2734 2018-05-23 Tom Tromey <tom@tromey.com>
2735
2736 * complaints.c (struct complain) <file, line>: Remove.
2737 (find_complaint): Remove file, line parameters.
2738 (complaint_internal): Update.
2739
2740 2018-05-23 Tom Tromey <tom@tromey.com>
2741
2742 * complaints.c (vcomplaint): Remove.
2743 (complaint_internal) Merge in contents of vcomplaint.
2744
2745 2018-05-23 Tom Tromey <tom@tromey.com>
2746
2747 * complaints.c (struct complaints) <explanation>: Remove.
2748 (symfile_explanations): Remove.
2749 (symfile_complaint_book): Update.
2750 (vcomplaint): Update.
2751 (struct explanation): Remove.
2752
2753 2018-05-23 Tom Tromey <tom@tromey.com>
2754
2755 * complaints.c (symfile_complaints): Remove.
2756 (complaint_internal): Remove "complaints" parameter.
2757 (clear_complaints, vcomplaint): Remove "c" parameter.
2758 (get_complaints): Remove.
2759 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
2760 (dwarf2_debug_line_missing_file_complaint)
2761 (dwarf2_debug_line_missing_end_sequence_complaint)
2762 (dwarf2_complex_location_expr_complaint)
2763 (dwarf2_const_value_length_mismatch_complaint)
2764 (dwarf2_section_buffer_overflow_complaint)
2765 (dwarf2_macro_malformed_definition_complaint)
2766 (dwarf2_invalid_attrib_class_complaint)
2767 (create_addrmap_from_index, dw2_symtab_iter_next)
2768 (dw2_expand_marked_cus)
2769 (dw2_debug_names_iterator::find_vec_in_debug_names)
2770 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
2771 (create_debug_type_hash_table, init_cutu_and_read_dies)
2772 (partial_die_parent_scope, add_partial_enumeration)
2773 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
2774 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
2775 (read_import_statement, read_file_scope, create_dwo_cu_reader)
2776 (create_cus_hash_table, create_dwp_hash_table)
2777 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
2778 (dwarf2_rnglists_process, dwarf2_ranges_process)
2779 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
2780 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
2781 (handle_struct_member_die, process_structure_scope)
2782 (read_array_type, read_common_block, read_module_type)
2783 (read_tag_pointer_type, read_typedef, read_base_type)
2784 (read_subrange_type, load_partial_dies, partial_die_info::read)
2785 (partial_die_info::read, partial_die_info::read)
2786 (partial_die_info::read, read_checked_initial_length_and_offset)
2787 (dwarf2_string_attr, read_formatted_entries)
2788 (dwarf_decode_line_header)
2789 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2790 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
2791 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
2792 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
2793 (get_signatured_type, get_DW_AT_signature_type)
2794 (decode_locdesc, file_file_name, consume_improper_spaces)
2795 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
2796 (dwarf_decode_macro_bytes, dwarf_decode_macros)
2797 (dwarf2_symbol_mark_computed, set_die_type)
2798 (read_attribute_value): Update.
2799 * stap-probe.c (handle_stap_probe, get_stap_base_address):
2800 Update.
2801 * dbxread.c (unknown_symtype_complaint)
2802 (lbrac_mismatch_complaint, repeated_header_complaint)
2803 (set_namestring, function_outside_compilation_unit_complaint)
2804 (read_dbx_symtab, process_one_symbol): Update.
2805 * gdbtypes.c (stub_noname_complaint): Update.
2806 * windows-nat.c (handle_unload_dll): Update.
2807 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
2808 (decode_base_type): Update.
2809 * xcoffread.c (bf_notfound_complaint, ef_complaint)
2810 (eb_complaint, record_include_begin, record_include_end)
2811 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
2812 (process_xcoff_symbol, read_symbol)
2813 (function_outside_compilation_unit_complaint)
2814 (scan_xcoff_symtab): Update.
2815 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
2816 * buildsym.c (finish_block_internal, make_blockvector)
2817 (end_symtab_get_static_block, augment_type_symtab): Update.
2818 * dtrace-probe.c (dtrace_process_dof)
2819 (dtrace_static_probe_ops::get_probes): Update.
2820 * complaints.h (struct complaint): Don't declare.
2821 (symfile_complaints): Remove.
2822 (complaint_internal): Remove "complaints" parameter.
2823 (complaint): Likewise.
2824 (clear_complaints): Likewise.
2825 * symfile.c (syms_from_objfile_1, finish_new_objfile)
2826 (reread_symbols): Update.
2827 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
2828 (dwarf2_frame_cache, decode_frame_entry): Update.
2829 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
2830 * objc-lang.c (lookup_objc_class, lookup_child_selector)
2831 (info_selectors_command): Update.
2832 * macrotab.c (macro_include, check_for_redefinition)
2833 (macro_undef): Update.
2834 * objfiles.c (filter_overlapping_sections): Update.
2835 * stabsread.c (invalid_cpp_abbrev_complaint)
2836 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
2837 (define_symbol, error_type, read_type, rs6000_builtin_type)
2838 (stabs_method_name_from_physname, read_member_functions)
2839 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
2840 (attach_fields_to_type, complain_about_struct_wipeout)
2841 (read_range_type, read_args, common_block_start)
2842 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
2843 Update.
2844 * mdebugread.c (index_complaint, unknown_ext_complaint)
2845 (basic_type_complaint, bad_tag_guess_complaint)
2846 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
2847 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
2848 (parse_procedure, parse_lines)
2849 (function_outside_compilation_unit_complaint)
2850 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
2851 (bad_tag_guess_complaint, reg_value_complaint): Update.
2852 * cp-support.c (demangled_name_complaint): Update.
2853 * macroscope.c (sal_macro_scope): Update.
2854 * dwarf-index-write.c (class debug_names): Update.
2855
2856 2018-05-23 Tom Tromey <tom@tromey.com>
2857
2858 * complaints.c (clear_complaints): Remove "noisy" parameter.
2859 * complaints.h (clear_complaints): Update.
2860 * symfile.c (syms_from_objfile_1, finish_new_objfile)
2861 (reread_symbols): Update.
2862
2863 2018-05-23 Tom Tromey <tom@tromey.com>
2864
2865 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
2866 SUBSEQUENT_MESSAGE.
2867 (vcomplaint, clear_complaints): Update.
2868 (symfile_explanations): Remove some messages.
2869
2870 2018-05-23 Tom Tromey <tom@tromey.com>
2871
2872 * complaints.c (internal_complaint): Remove.
2873 * complaints.h (internal_complaint): Remove.
2874
2875 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2876
2877 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
2878
2879 2018-05-22 Pedro Alves <palves@redhat.com>
2880
2881 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
2882 (remote_fileio_badfd, remote_fileio_return_errno)
2883 (remote_fileio_return_success, remote_fileio_func_open)
2884 (remote_fileio_func_open, remote_fileio_func_close)
2885 (remote_fileio_func_read, remote_fileio_func_write)
2886 (remote_fileio_func_lseek, remote_fileio_func_rename)
2887 (remote_fileio_func_unlink, remote_fileio_func_stat)
2888 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
2889 (remote_fileio_func_isatty, remote_fileio_func_system): Add
2890 remote_target parameter.
2891 (remote_fio_func_map) <func>: Add remote_target parameter.
2892 (do_remote_fileio_request, remote_fileio_request):
2893 * remote-fileio.h (remote_fileio_request):
2894 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
2895 remote_target parameter.
2896 (remote_notif_process, handle_notification): Adjust to pass down
2897 the remote.
2898 (remote_notif_state_allocate): Add remote_target parameter. Save
2899 it.
2900 * remote-notif.h (struct remote_target): Forward declare.
2901 (struct notif_client) <parse, ack, can_get_pending_events>: Add
2902 remote_target parameter.
2903 (struct remote_notif_state) <remote>: New field.
2904 (remote_notif_ack, remote_notif_parse): Add remote_target
2905 parameter.
2906 (remote_notif_state_allocate, remote_notif_state_allocate): Add
2907 remote_target parameter.
2908 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
2909 (threads_listing_context, rmt_thread_action, protocol_feature)
2910 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
2911 (packet_result, struct threads_listing_context, remote_state):
2912 Move definitions and declarations higher up.
2913 (remote_target) <~remote_target>: Declare.
2914 (remote_download_command_source, remote_file_put, remote_file_get)
2915 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
2916 (remote_hostio_pread_vFile, remote_hostio_send_command)
2917 (remote_hostio_set_filesystem, remote_hostio_open)
2918 (remote_hostio_close, remote_hostio_unlink, remote_state)
2919 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
2920 (get_memory_write_packet_size, get_memory_read_packet_size)
2921 (append_pending_thread_resumptions, remote_detach_1)
2922 (append_resumption, remote_resume_with_vcont)
2923 (add_current_inferior_and_thread, wait_ns, wait_as)
2924 (process_stop_reply, remote_notice_new_inferior)
2925 (process_initial_stop_replies, remote_add_thread)
2926 (btrace_sync_conf, remote_btrace_maybe_reopen)
2927 (remove_new_fork_children, kill_new_fork_children)
2928 (discard_pending_stop_replies, stop_reply_queue_length)
2929 (check_pending_events_prevent_wildcard_vcont)
2930 (discard_pending_stop_replies_in_queue, stop_reply)
2931 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
2932 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
2933 (remote_interrupt_as, remote_interrupt_ns)
2934 (remote_get_noisy_reply, remote_query_attached)
2935 (remote_add_inferior, remote_current_thread, get_current_thread)
2936 (set_thread, set_general_thread, set_continue_thread)
2937 (set_general_process, write_ptid)
2938 (remote_unpack_thread_info_response, remote_get_threadinfo)
2939 (parse_threadlist_response, remote_get_threadlist)
2940 (remote_threadlist_iterator, remote_get_threads_with_ql)
2941 (remote_get_threads_with_qxfer)
2942 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
2943 (get_offsets, remote_check_symbols, remote_supported_packet)
2944 (remote_query_supported, remote_packet_size)
2945 (remote_serial_quit_handler, remote_detach_pid)
2946 (remote_vcont_probe, remote_resume_with_hc)
2947 (send_interrupt_sequence, interrupt_query)
2948 (remote_notif_get_pending_events, fetch_register_using_p)
2949 (send_g_packet, process_g_packet, fetch_registers_using_g)
2950 (store_register_using_P, store_registers_using_G)
2951 (set_remote_traceframe, check_binary_download)
2952 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
2953 (remote_xfer_live_readonly_partial, remote_read_bytes)
2954 (remote_send_printf, remote_flash_write, readchar)
2955 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
2956 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
2957 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
2958 (extended_remote_disable_randomization, extended_remote_run)
2959 (send_environment_packet, extended_remote_environment_support)
2960 (extended_remote_set_inferior_cwd, remote_write_qxfer)
2961 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
2962 (packet_command): Now methods of ...
2963 (remote_target): ... this class.
2964 (m_remote_state) <remote_target>: New field.
2965 (struct remote_state) <stop_reply_queue,
2966 remote_async_inferior_event_token, wait_forever_enabled_p>: New
2967 fields.
2968 (remote_state::remote_state): Allocate stop_reply_queue.
2969 (remote_state): Delete global.
2970 (get_remote_state_raw): Delete.
2971 (remote_target::get_remote_state): Allocate m_remote_state on
2972 demand.
2973 (get_current_remote_target): New.
2974 (remote_ops, extended_remote_ops): Delete.
2975 (wait_forever_enabled_p, remote_async_inferior_event_token):
2976 Delete, moved to struct remote_state.
2977 (remote_target::close): Delete self. Destruction bits split to
2978 ...
2979 (remote_target::~remote_target): ... this.
2980 (show_memory_packet_size): Adjust to use
2981 get_current_remote_target.
2982 (struct protocol_feature) <func>: Add remote_target parameter.
2983 All callers adjusted.
2984 (curr_quit_handler_target): New.
2985 (remote_serial_quit_handler): Reimplement.
2986 (remote_target::open_1): Adjust to use get_current_remote_target.
2987 Heap-allocate remote_target/extended_remote_target instances.
2988 (vcont_builder::vcont_builder): Add remote_target parameter, and
2989 save it in m_remote. All callers adjusted.
2990 (vcont_builder::m_remote): New field.
2991 (vcont_builder::restart, vcont_builder::flush)
2992 (vcont_builder::push_action): Use it.
2993 (remote_target::commit_resume): Use it.
2994 (struct queue_iter_param) <remote>: New field.
2995 (remote_target::remove_new_fork_children): Fill in 'remote' field.
2996 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
2997 (check_pending_event_prevents_wildcard_vcont_callback)
2998 (remote_target::check_pending_events_prevent_wildcard_vcont)
2999 (remote_target::discard_pending_stop_replies)
3000 (remote_target::discard_pending_stop_replies_in_queue)
3001 (remote_target::remote_notif_remove_queued_reply): Fill in
3002 'remote' field.
3003 (remote_notif_get_pending_events): New.
3004 (remote_target::readchar, remote_target::remote_serial_write):
3005 Save/restore curr_quit_handler_target.
3006 (putpkt): New.
3007 (kill_new_fork_children): Fill in 'remote' field.
3008 (packet_command): Use get_current_remote_target, defer to
3009 remote_target method of same name.
3010 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
3011 parameter, and save it in m_remote. All callers adjusted.
3012 (scoped_remote_fd::release): Use m_remote.
3013 (scoped_remote_fd::m_remote): New field.
3014 (remote_file_put, remote_file_get, remote_file_delete): Use
3015 get_current_remote_target, defer to remote_target method of same
3016 name.
3017 (remote_btrace_reset): Add remote_state paremeter. Update all
3018 callers.
3019 (remote_async_inferior_event_handler). Pass down 'data'.
3020 (remote_new_objfile): Use get_current_remote_target.
3021 (remote_target::vcont_r_supported): New.
3022 (set_range_stepping): Use get_current_remote_target and
3023 remote_target::vcont_r_supported.
3024 (_initialize_remote): Don't allocate 'remote_state' and
3025 'stop_reply_queue' globals.
3026 * remote.h (struct remote_target): Forward declare.
3027 (getpkt, putpkt, remote_notif_get_pending_events): Add
3028 'remote_target' parameter.
3029
3030 2018-05-22 Pedro Alves <palves@redhat.com>
3031
3032 * remote.c (vcont_builder): Now a class. Make all data members
3033 private.
3034 (vcont_builder) <vcont_builder, restart, flush, push_action>:
3035 Declare methods.
3036 (vcont_builder_restart): Rename to ...
3037 (vcont_builder::restart): ... this.
3038 (vcont_builder_flush): Rename to ...
3039 (vcont_builder::flush): ... this.
3040 (vcont_builder_push_action): Rename to ...
3041 (vcont_builder::push_action): ... this.
3042 (remote_target::commit_resume): Adjust.
3043
3044 2018-05-22 Pedro Alves <palves@redhat.com>
3045
3046 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
3047 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
3048 (get_fixed_memory_packet_size): New.
3049 (get_memory_packet_size): Use it.
3050 (set_memory_packet_size): Don't override the config size with
3051 DEFAULT_MAX_MEMORY_PACKET_SIZE.
3052 (show_memory_packet_size): Use get_fixed_memory_packet_size.
3053 Don't refer to get_memory_packet_size if not connected to a remote
3054 target. Show "(default)" if configured size is 0.
3055
3056 2018-05-22 Pedro Alves <palves@redhat.com>
3057
3058 * remote.c (remote_target::mourn_inferior): Move
3059 discard_pending_stop_replies call here from ...
3060 (_initialize_remote): ... here.
3061
3062 2018-05-22 Pedro Alves <palves@redhat.com>
3063
3064 * remote.c (compare_section_command): Remove set_general_process
3065 call.
3066
3067 2018-05-22 Pedro Alves <palves@redhat.com>
3068
3069 * remote.c (struct packet_reg, struct remote_arch_state):
3070 Move higher up in the file.
3071 (remote_state) <m_arch_states>: Store remote_arch_state values
3072 instead of remote_arch_state pointers.
3073 (remote_state::get_remote_arch_state): Adjust.
3074
3075 2018-05-22 Pedro Alves <palves@redhat.com>
3076
3077 * remote.c: Include <unordered_map>.
3078 (remote_state): Now a class.
3079 (remote_state) <get_remote_arch_state>: Declare method.
3080 <get_remote_arch_state>: New field.
3081 (remote_arch_state) <remote_arch_state>: Declare ctor.
3082 <regs>: Now a unique_ptr.
3083 (remote_gdbarch_data_handle): Delete.
3084 (get_remote_arch_state): Delete.
3085 (remote_state::get_remote_arch_state): New.
3086 (get_remote_state): Adjust to call remote_state's
3087 get_remote_arch_state method.
3088 (init_remote_state): Delete, bits factored out to ...
3089 (remote_arch_state::remote_arch_state): ... this new method.
3090 (get_remote_packet_size, get_memory_packet_size)
3091 (process_g_packet, remote_target::fetch_registers)
3092 (remote_target::prepare_to_store, store_registers_using_G)
3093 (remote_target::store_registers, remote_target::get_trace_status):
3094 Adjust to call remote_state's method.
3095 (_initialize_remote): Remove reference to
3096 remote_gdbarch_data_handle.
3097
3098 2018-05-22 Pedro Alves <palves@redhat.com>
3099
3100 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
3101 pread>: New method declarations.
3102 (remote_target::open_1): Adjust.
3103 (readahead_cache_invalidate): Rename to ...
3104 (readahead_cache::invalidate): ... this, and adjust to be a class
3105 method.
3106 (readahead_cache_invalidate_fd): Rename to ...
3107 (readahead_cache::invalidate_fd): ... this, and adjust to be a
3108 class method.
3109 (remote_hostio_pwrite): Adjust.
3110 (remote_hostio_pread_from_cache): Rename to ...
3111 (readahead_cache::pread): ... this, and adjust to be a class
3112 method.
3113 (remote_hostio_close): Adjust.
3114
3115 2018-05-22 Pedro Alves <palves@redhat.com>
3116
3117 * remote.c (remote_hostio_close_cleanup): Delete.
3118 (class scoped_remote_fd): New.
3119 (remote_file_put, remote_file_get): Use it.
3120
3121 2018-05-22 Pedro Alves <palves@redhat.com>
3122
3123 (struct vCont_action_support): Use bool and initialize all fields.
3124 (struct readahead_cache): Initialize all fields.
3125 (remote_state): Use bool and initialize all fields.
3126 (remote_state::remote_state, remote_state::~remote_state): New.
3127 (new_remote_state): Delete.
3128 (_initialize_remote): Use new to allocate remote_state.
3129
3130 2018-05-22 Pedro Alves <palves@redhat.com>
3131 張俊芝 <zjz@zjz.name>
3132
3133 PR gdb/22973
3134 * c-exp.y: Include "c-support.h".
3135 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
3136 of tolower. Use c_ident_is_alpha to scan names.
3137 * c-lang.c: Include "c-support.h".
3138 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
3139 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
3140 * c-support.h: New file, with bits factored out from ...
3141 * cp-name-parser.y: ... this file.
3142 Include "c-support.h".
3143 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
3144 c-support.h and renamed.
3145 (symbol_end, yylex): Adjust.
3146
3147 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3148
3149 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
3150 parameter type to CORE_ADDR.
3151 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
3152 parameter type in declaration to CORE_ADDR.
3153 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
3154 target_auxv_search to get AT_HWCAP and use the result to get the
3155 target description.
3156 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
3157 to CORE_ADDR. Remove the cast of the return value to unsigned
3158 long. Fix error predicate of target_auxv_search.
3159 (ppc_linux_nat_target::read_description): Change the type of the
3160 hwcap variable to CORE_ADDR.
3161
3162 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3163
3164 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
3165 if the size of fpscr is larger than 32 bits.
3166
3167 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3168
3169 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
3170 (ppc32_linux_vsxregmap): New global.
3171 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
3172 regcache_supply_regset, and regcache_collect_regset.
3173 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
3174 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
3175 (fetch_vsx_register, store_vsx_register): Remove.
3176 (fetch_vsx_registers): Add regno parameter. Get regset using
3177 ppc_linux_vsxregset. Use regset to supply registers.
3178 (store_vsx_registers): Add regno parameter. Get regset using
3179 ppc_linux_vsxregset. Use regset to collect registers.
3180 (fetch_register): Call fetch_vsx_registers instead of
3181 fetch_vsx_register.
3182 (store_register): Call store_vsx_registers instead of
3183 store_vsx_register.
3184 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
3185 new regno parameter.
3186 (store_ppc_registers): Call store_vsx_registers with -1 for the
3187 new regno parameter.
3188 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
3189 (ppc_collect_vsxregset): Remove.
3190
3191 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3192
3193 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
3194 offset fields.
3195 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
3196 for vector register offset fields.
3197 (ppc64_fbsd_reg_offsets): Likewise.
3198 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
3199 to vector register offset fields.
3200 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
3201 to vector register offset fields.
3202 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
3203 vector register offset fields.
3204 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
3205 initializers for vector register offset fields.
3206 (rs6000_aix64_reg_offsets): Likewise.
3207 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
3208 (ppc_supply_vrregset): Remove.
3209 (ppc_collect_vrregset): Remove.
3210 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
3211 (ppc_linux_vrregset) : New function.
3212 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
3213 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
3214 (ppc32_linux_vrregset): Remove.
3215 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
3216 and use result instead of ppc32_linux_vrregset.
3217 (ppc32_linux_reg_offsets): Remove initializers for vector register
3218 offset fields.
3219 (ppc64_linux_reg_offsets): Likewise.
3220 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
3221 * ppc-linux-nat.c: Include regset.h.
3222 (gdb_vrregset_t): Adjust comment to account for little-endian
3223 mode.
3224 (supply_vrregset, fill_vrregset): Remove.
3225 (fetch_altivec_register, store_altivec_register): Remove.
3226 (fetch_altivec_registers): Add regno parameter. Get regset using
3227 ppc_linux_vrregset. Use regset to supply registers.
3228 (store_altivec_registers): Add regno parameter. Get regset using
3229 ppc_linux_vrregset. Use regset to collect registers.
3230 (fetch_register): Call fetch_altivec_registers instead of
3231 fetch_altivec_register.
3232 (store_register): Call store_altivec_registers instead of
3233 store_altivec_register.
3234 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
3235 the new regno parameter.
3236 (store_ppc_registers): Call store_altivec_registers with -1 for
3237 the new regno parameter.
3238
3239 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3240
3241 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
3242 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
3243 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
3244 (gdb_vrregset_t): Change array type size to
3245 PPC_LINUX_SIZEOF_VRREGSET.
3246 (gdb_vsxregset_t): Change array type size to
3247 PPC_LINUX_SIZEOF_VSXREGSET.
3248 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
3249 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
3250 PPC_LINUX_SIZEOF_VSXREGSET.
3251
3252 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3253
3254 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
3255 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
3256 nat/ppc-linux.c.
3257 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
3258 ppc_linux_target_wordsize with tid.
3259 (ppc_linux_nat_target::read_description): Call ppc_linux_target
3260 wordsize with tid.
3261 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
3262 (ppc64_64bit_inferior_p): Add static and inline specifiers.
3263 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
3264 tid parameter. Remove static specifier.
3265 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
3266 (ppc_linux_target_wordsize): New declaration.
3267
3268 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3269
3270 * arch/ppc-linux-common.c: New file.
3271 * arch/ppc-linux-common.h: New file.
3272 * arch/ppc-linux-tdesc.h: New file.
3273 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
3274 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
3275 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
3276 arch/ppc-linux-tdesc.h.
3277 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
3278 arch/ppc-linux-tdesc.h.
3279 (ppc_linux_nat_target::read_description): Remove target
3280 description matching code. Fill a ppc_linux_features struct and
3281 call ppc_linux_match_description with it. Move comment about ISA
3282 2.05 to ppc-linux-common.c.
3283 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
3284 arch/ppc-linux-tdesc.h.
3285 (ppc_linux_core_read_description): Remove target description
3286 matching code. Fill a ppc_linux_features struct and call
3287 ppc_linux_match_description with it.
3288 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
3289 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
3290 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
3291 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
3292 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
3293 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
3294 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
3295 (tdesc_powerpc_e500l): Remove.
3296
3297 2018-05-22 Joel Brobecker <brobecker@adacore.com>
3298
3299 * ada-lang.c (catch_assert_command): Pass empty string instead
3300 of NULL for excep_string argument.
3301
3302 2018-05-22 Maciej W. Rozycki <macro@mips.com>
3303
3304 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
3305 the width of the requested register exceeds the width of the
3306 `ptrace' data type.
3307
3308 2018-05-21 Tom Tromey <tom@tromey.com>
3309
3310 * printcmd.c (output_command): Remove.
3311 (output_command_const): Rename to output_command.
3312 * valprint.h (output_command): Rename from output_command_const.
3313 * tracepoint.c (trace_dump_actions): Call output_command.
3314
3315 2018-05-21 Tom Tromey <tom@tromey.com>
3316
3317 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
3318 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
3319 * ada-lang.h (create_ada_exception_catchpoint): Update.
3320 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
3321 std::string.
3322 (create_excep_cond_exprs, ~ada_catchpoint)
3323 (should_stop_exception, print_one_exception)
3324 (print_mention_exception, print_recreate_exception): Update.
3325 (ada_get_next_arg): Remove.
3326 (catch_ada_exception_command_split): Use std::string. Change type
3327 of "excep_string", "cond_string".
3328 (catch_ada_exception_command): Update.
3329 (create_ada_exception_catchpoint): Change type of excep_string.
3330 (ada_exception_sal): Remove excep_string parameter.
3331 (~ada_catchpoint): Remove.
3332
3333 2018-05-21 Tom Tromey <tom@tromey.com>
3334
3335 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
3336 cleanup.
3337
3338 2018-05-21 Tom Tromey <tom@tromey.com>
3339
3340 * ada-lang.c (ada_exception_message_1, ada_exception_message):
3341 Return unique_xmalloc_ptr.
3342 (print_it_exception): Update.
3343
3344 2018-05-21 Tom Tromey <tom@tromey.com>
3345
3346 * tracepoint.c (trace_dump_actions): Use std::string.
3347
3348 2018-05-21 Tom Tromey <tom@tromey.com>
3349
3350 * symfile.c (reread_symbols): Use std::string for original_name.
3351
3352 2018-05-21 Tom Tromey <tom@tromey.com>
3353
3354 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
3355 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
3356 constructor.
3357
3358 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
3359
3360 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
3361 instance to...
3362 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
3363 * objfiles.c (get_objfile_bfd_data): Allocate
3364 objfile_per_bfd_storage with obstack_new when allocating on
3365 obstack.
3366
3367 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
3368
3369 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
3370 OBSTACK_ZALLOC.
3371 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
3372 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
3373 * mdebugread.c (mdebug_build_psymtabs): Likewise.
3374 (add_pending): Likewise.
3375 (parse_symbol): Likewise.
3376 (parse_partial_symbols): Likewise.
3377 (psymtab_to_symtab_1): Likewise.
3378 (new_psymtab): Likewise.
3379 (elfmdebug_build_psymtabs): Likewise.
3380 * minsyms.c (terminate_minimal_symbol_table): Likewise.
3381 * objfiles.c (get_objfile_bfd_data): Likewise.
3382 (objfile_register_static_link): Likewise.
3383 * psymtab.c (allocate_psymtab): Likewise.
3384 * stabsread.c (read_member_functions): Likewise.
3385 * xcoffread.c (xcoff_end_psymtab): Likewise.
3386
3387 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
3388
3389 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
3390 compiler supports std::is_trivially_constructible.
3391 * common/poison.h: Include obstack.h.
3392 (IsMallocable): Define to is_trivially_constructible if the
3393 compiler supports it, define to true_type otherwise.
3394 (xobnew): New.
3395 (XOBNEW): Redefine.
3396 (xobnewvec): New.
3397 (XOBNEWVEC): Redefine.
3398 * gdb_obstack.h (obstack_zalloc): New.
3399 (OBSTACK_ZALLOC): Redefine.
3400 (obstack_calloc): New.
3401 (OBSTACK_CALLOC): Redefine.
3402 (obstack_new): New.
3403 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
3404 (gdbarch_obstack): New declaration in gdbarch.h, definition in
3405 gdbarch.c.
3406 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
3407 obstack_calloc/obstack_zalloc.
3408 (gdbarch_obstack_zalloc): Remove.
3409 * target-descriptions.c (tdesc_data_init): Use obstack_new.
3410
3411 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3412
3413 * stack.c (backtrace_command_1): Remove useless variable int i.
3414
3415 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3416
3417 * stack.c (print_frame_info): Fix comment.
3418
3419 2018-05-18 Tom Tromey <tom@tromey.com>
3420
3421 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
3422 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
3423 (~dwarf2_per_objfile): Update
3424 (dwarf2_get_dwz_file): Use new.
3425 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
3426 unique_ptr.
3427
3428 2018-05-18 Tom Tromey <tom@tromey.com>
3429
3430 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
3431 unique_ptr.
3432 * dwarf2read.c (struct dwp_file): Add constructor and
3433 initializers.
3434 (open_and_init_dwp_file): Return a unique_ptr.
3435 (dwarf2_per_objfile, create_dwp_hash_table)
3436 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
3437 (lookup_dwo_unit_in_dwp): Update.
3438 (open_and_init_dwp_file, get_dwp_file): Update.
3439
3440 2018-05-18 Tom Tromey <tom@tromey.com>
3441
3442 * dwarf2read.c (dwarf2_per_objfile): Update.
3443 (struct mapped_index): Add initializers.
3444 (dwarf2_read_index): Use new.
3445 (dw2_symtab_iter_init): Update.
3446 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
3447 unique_ptr.
3448
3449 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
3450
3451 * dwarf2read.c (mapped_index) <total_size>: Remove.
3452
3453 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
3454
3455 * unittests/format_pieces-selftests.c (test_format_specifier):
3456 Add ARI comments.
3457
3458 2018-05-18 Tom Tromey <tom@tromey.com>
3459
3460 * c-typeprint.c (maybe_print_hole): New function.
3461 (c_print_type_struct_field_offset): Update.
3462 (c_type_print_base_struct_union): Call maybe_print_hole.
3463
3464 2018-05-17 Keith Seitz <keiths@redhat.com>
3465
3466 * breakpoint.c (build_bpstat_chain): New function, moved from
3467 bpstat_stop_status.
3468 (bpstat_stop_status): Add optional parameter, `stop_chain'.
3469 If no stop chain is passed, call build_bpstat_chain to build it.
3470 * breakpoint.h (build_bpstat_chain): Declare.
3471 (bpstat_stop_status): Move documentation here from breakpoint.c.
3472 * infrun.c (handle_signal_stop): Before eliding inlined frames,
3473 build the stop chain and pass it to skip_inline_frames.
3474 Pass this stop chain to bpstat_stop_status.
3475 * inline-frame.c: Include breakpoint.h.
3476 (stopped_by_user_bp_inline_frame): New function.
3477 (skip_inline_frames): Add parameter `stop_chain'.
3478 Move documention to inline-frame.h.
3479 If non-NULL, use stopped_by_user_bp_inline_frame to determine
3480 whether the frame should be elided.
3481 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
3482 Add moved documentation and update for new parameter.
3483
3484 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
3485
3486 PR cli/14975
3487 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3488 unittests/format_pieces-selftests.c.
3489 * common/format.h (format_piece) <operator==>: New.
3490 (format_pieces) <operator[]>: Remove.
3491 * common/format.c (format_pieces::format_pieces): Handle \e.
3492 * unittests/format_pieces-selftests.c: New.
3493
3494 2018-05-17 Tom Tromey <tom@tromey.com>
3495
3496 PR symtab/23010:
3497 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
3498 (dw2_instantiate_symtab): Add skip_partial parameter.
3499 (dw2_find_last_source_symtab, dw2_map_expand_apply)
3500 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
3501 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
3502 (dw2_expand_symtabs_matching_one)
3503 (dw2_find_pc_sect_compunit_symtab)
3504 (dw2_debug_names_lookup_symbol)
3505 (dw2_debug_names_expand_symtabs_for_function): Update.
3506 (init_cutu_and_read_dies): Add skip_partial parameter.
3507 (process_psymtab_comp_unit, build_type_psymtabs_1)
3508 (process_skeletonless_type_unit, load_partial_comp_unit)
3509 (psymtab_to_symtab_1): Update.
3510 (load_full_comp_unit): Add skip_partial parameter.
3511 (process_imported_unit_die, dwarf2_read_addr_index)
3512 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
3513 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
3514 (read_signatured_type): Update.
3515
3516 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
3517
3518 * value.c (release_value): Remove unused variable.
3519 (record_latest_value): Likewise.
3520 (access_value_history): Likewise.
3521 (preserve_values): Likewise.
3522
3523 2018-05-17 Tom Tromey <tom@tromey.com>
3524
3525 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
3526 Initialize.
3527
3528 2018-05-16 Maciej W. Rozycki <macro@mips.com>
3529
3530 PR gdb/22286
3531 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
3532 Also handle registers whose width is not a multiple of
3533 PTRACE_TYPE_RET.
3534 (linux_nat_trad_target::store_register): Likewise.
3535
3536 2018-05-16 Tom Tromey <tom@tromey.com>
3537
3538 * gdbcore.h (core_bfd): Redefine.
3539 * corelow.c (core_target::close): Update.
3540 (core_target_open): Update.
3541 * progspace.h (struct program_space) <cbfd>: Now a
3542 gdb_bfd_ref_ptr.
3543
3544 2018-05-16 Tom Tromey <tom@tromey.com>
3545
3546 PR cli/19551:
3547 * symfile-add-flags.h (enum symfile_add_flags)
3548 <SYMFILE_NOT_FILENAME>: New constant.
3549 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
3550 objfile name from BFD.
3551 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
3552 * minidebug.c (find_separate_debug_file_in_section): Put
3553 ".gnu_debugdata" into BFD's file name.
3554
3555 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
3556
3557 * regcache.c (regcache_read_ftype, regcache_write_ftype):
3558 Remove.
3559
3560 2018-05-15 Tamar Christina <tamar.christina@arm.com>
3561
3562 PR binutils/21446
3563 * aarch64-tdep.c (aarch64_analyze_prologue,
3564 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
3565 Indicate not interested in errors.
3566
3567 2018-05-15 Maciej W. Rozycki <macro@mips.com>
3568
3569 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
3570 Supply the MIPS_ZERO_REGNUM register.
3571
3572 2018-05-15 Maciej W. Rozycki <macro@mips.com>
3573
3574 * mips-tdep.c (mask_address_var): Make variable static.
3575
3576 2018-05-14 Tom Tromey <tom@tromey.com>
3577
3578 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
3579
3580 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
3581
3582 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
3583 FXSAVE_ADDR for the mxcsr register.
3584
3585 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
3586
3587 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
3588
3589 2018-05-11 Pedro Alves <palves@redhat.com>
3590
3591 * corelow.c (core_target) <core_target>: No longer inline.
3592 Initialize m_core_gdbarch, m_core_vec and build the section table
3593 here.
3594 <~core_target>: New.
3595 <core_gdbarch, get_core_register_section>: New methods.
3596 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
3597 factored out from ...
3598 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
3599 (core_ops): Delete.
3600 (sniff_core_bfd): Add gdbarch parameter.
3601 (core_close): Delete, merged into ...
3602 (core_target::close): ... here. Delete self.
3603 (core_close_cleanup): Delete.
3604 (core_target_open): Allocate a core_target on the heap. Use a
3605 unique_ptr instead of a cleanup. Bits moved into the core_target
3606 ctor. Adjust to use core_target methods instead of globals.
3607 (get_core_register_section): Rename to ...
3608 (core_target::get_core_register_section): ... this and adjust.
3609 (struct get_core_registers_cb_data): New.
3610 (get_core_registers_cb): Use it. Use bool.
3611 (core_target::fetch_registers, core_target::files_info)
3612 (core_target::xfer_partial, core_target::read_description)
3613 (core_target::pid_to, core_target::thread_name): Adjust to
3614 reference class fields instead of globals.
3615 * target.h (struct target_ops_deleter, target_ops_up): New.
3616
3617 2018-05-11 Pedro Alves <palves@redhat.com>
3618
3619 * corefile.c (core_file_command): Move to corelow.c.
3620 * corelow.c (the_core_target): Delete.
3621 (core_file_command): Moved from corefile.c. Check exec_bfd
3622 instead of the_core_target. Use target_detach instead of calling
3623 into the_core_target directly.
3624 (maybe_say_no_core_file_now): New.
3625 (core_target::detach): Use it.
3626 (_initialize_corelow): Remove references to the_core_target.
3627 * gdbcore.h (the_core_target): Delete.
3628
3629 2018-05-11 Tom Tromey <tromey@redhat.com>
3630 Pedro Alves <palves@redhat.com>
3631
3632 * corefile.c (core_bfd): Remove.
3633 * gdbcore.h (core_bfd): Now a macro.
3634 * progspace.h (struct program_space) <cbfd>: New field.
3635
3636 2018-05-11 Tom Tromey <tom@tromey.com>
3637
3638 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
3639 gdb::def_vector.
3640
3641 2018-05-10 Tom Tromey <tom@tromey.com>
3642
3643 * configure: Rebuild.
3644 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
3645
3646 2018-05-10 Joel Brobecker <brobecker@adacore.com>
3647
3648 PR server/23158:
3649 * regformats/regdat.sh: Adjust script, following the addition
3650 of the new expedite_regs parameter to init_target_desc.
3651
3652 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
3653
3654 PR gdb/23127
3655 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
3656 set_gdbarch_significant_addr_bit.
3657 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
3658 set_gdbarch_significant_addr_bit.
3659 * utils.c (address_significant): Update to sign extend addr.
3660
3661 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
3662
3663 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
3664 (xtensa_linux_init_abi): Limit tdep->num_regs by
3665 tdep->num_nopriv_regs.
3666 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
3667 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
3668 not initialized.
3669
3670 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
3671
3672 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
3673
3674 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
3675
3676 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
3677 (I387_MXCSR_INIT_VAL): New constant.
3678 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
3679 buffer if it was supplied by the inferior.
3680 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
3681 (i387_xsave_get_clear_bv): New function.
3682 (i387_supply_xsave): Only read x87 control registers from the
3683 xsave buffer if the feature is enabled, and the state will have
3684 been written, otherwise, provide a suitable default.
3685 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
3686 including x87 control registers. Update control registers if they
3687 have changed from the default value, and mark features as enabled
3688 as required.
3689 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
3690
3691 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
3692
3693 * spu-tdep.c (info_spu_event_command): Fix output formatting.
3694
3695 2018-05-07 Tom Tromey <tom@tromey.com>
3696
3697 * configure: Rebuild.
3698 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
3699
3700 2018-05-07 Tom Tromey <tom@tromey.com>
3701
3702 PR tdep/20362:
3703 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
3704 bit. Use correct value for VDIV.
3705
3706 2018-05-04 Tom Tromey <tom@tromey.com>
3707
3708 * configure: Rebuild.
3709 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
3710
3711 2018-05-04 Tom Tromey <tom@tromey.com>
3712
3713 * linux-record.c (record_linux_system_call) <case
3714 RECORD_SYS_RECVFROM>: Add "break".
3715
3716 2018-05-04 Tom Tromey <tom@tromey.com>
3717
3718 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
3719 Add missing "break".
3720 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
3721 Add missing "break".
3722
3723 2018-05-04 Tom Tromey <tom@tromey.com>
3724
3725 * rs6000-tdep.c (ppc_process_record_op4)
3726 (ppc_process_record_op63): Add fall-through comment.
3727
3728 2018-05-04 Tom Tromey <tom@tromey.com>
3729
3730 * i386-tdep.c (i386_process_record): Add fall-through comment.
3731
3732 2018-05-04 Tom Tromey <tom@tromey.com>
3733
3734 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
3735 comment.
3736
3737 2018-05-04 Tom Tromey <tom@tromey.com>
3738
3739 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
3740 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
3741 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
3742 comment.
3743 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
3744 comment.
3745 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
3746 comment.
3747
3748 2018-05-04 Tom Tromey <tom@tromey.com>
3749
3750 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
3751
3752 2018-05-04 Tom Tromey <tom@tromey.com>
3753
3754 * s390-tdep.c (s390_process_record): Fix fall-through comments.
3755 * xcoffread.c (scan_xcoff_symtab): Move comment later.
3756 * symfile.c (section_is_mapped): Fix fall-through comment.
3757 * stabsread.c (define_symbol, read_member_functions): Fix
3758 fall-through comment.
3759 * s390-linux-tdep.c (s390_process_record): Fix fall-through
3760 comment.
3761 * remote.c (remote_wait_as): Fix fall-through comment.
3762 * p-exp.y (yylex): Fix fall-through comment.
3763 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
3764 comment.
3765 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
3766 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
3767 * jv-exp.y (yylex): Fix fall-through comment.
3768 * go-exp.y (lex_one_token): Fix fall-through comment.
3769 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
3770 fall-through comment.
3771 * f-exp.y (yylex): Fix fall-through comment.
3772 * dwarf2read.c (process_die): Fix fall-through comments.
3773 * dbxread.c (process_one_symbol): Fix fall-through comment.
3774 * d-exp.y (lex_one_token): Fix fall-through comment.
3775 * cp-name-parser.y (yylex): Fix fall-through comment.
3776 * coffread.c (coff_symtab_read): Fix fall-through comment.
3777 * c-exp.y (lex_one_token): Fix fall-through comment.
3778 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
3779 comment.
3780 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
3781 comment.
3782
3783 2018-05-04 Tom Tromey <tom@tromey.com>
3784
3785 PR python/22730:
3786 * NEWS: Mention gdb.execute change.
3787 * gdbcmd.h (execute_control_command): Don't declare.
3788 * python/python.c (execute_gdb_command): Use read_command_lines_1,
3789 execute_control_commands, execute_control_commands_to_string.
3790 * cli/cli-script.h (execute_control_commands)
3791 (execute_control_commands_to_string): Declare.
3792 (execute_control_command): Add from_tty parameter.
3793 * cli/cli-script.c (execute_control_commands)
3794 (execute_control_commands_to_string): New functions.
3795 (execute_user_command): Use execute_control_commands.
3796 (execute_control_command_1): Add "from_tty" parameter. Update.
3797 (execute_control_command): Likewise.
3798
3799 2018-05-04 Tom Tromey <tom@tromey.com>
3800
3801 PR python/22731:
3802 * NEWS: Mention that breakpoint commands are writable.
3803 * python/py-breakpoint.c (bppy_set_commands): New function.
3804 (breakpoint_object_getset) <"commands">: Use it.
3805
3806 2018-05-04 Tom Tromey <tom@tromey.com>
3807
3808 * tracepoint.c (actions_command): Update.
3809 * mi/mi-cmd-break.c (mi_command_line_array)
3810 (mi_command_line_array_cnt, mi_command_line_array_ptr)
3811 (mi_read_next_line): Remove.
3812 (mi_cmd_break_commands): Update.
3813 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
3814 function_view.
3815 * cli/cli-script.c (get_command_line): Update.
3816 (process_next_line): Use function_view. Constify.
3817 (recurse_read_control_structure, read_command_lines)
3818 (read_command_lines_1): Change argument types to function_view.
3819 (do_define_command, document_command): Update.
3820 * breakpoint.h (check_tracepoint_command): Don't declare.
3821 * breakpoint.c (check_tracepoint_command): Remove.
3822 (commands_command_1, create_tracepoint_from_upload): Update.
3823
3824 2018-05-04 Tom Tromey <tom@tromey.com>
3825
3826 PR gdb/11750:
3827 * cli/cli-script.h (enum command_control_type) <define_control>:
3828 New constant.
3829 * cli/cli-script.c (multi_line_command_p): Handle define_control.
3830 (build_command_line, execute_control_command_1)
3831 (process_next_line): Likewise.
3832 (do_define_command): New function, extracted from define_command.
3833 (define_command): Use it.
3834
3835 2018-05-04 Tom Tromey <tom@tromey.com>
3836
3837 * tracepoint.c (actions_command): Update.
3838 * cli/cli-script.h (read_command_lines): Update.
3839 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
3840 (MAX_TMPBUF): Remove define.
3841 (define_command): Use string_printf.
3842 (document_command): Likewise.
3843 * breakpoint.c (commands_command_1): Update.
3844
3845 2018-05-04 Tom Tromey <tom@tromey.com>
3846
3847 * top.c (execute_command): Update.
3848 * cli/cli-script.h (print_command_lines): Now varargs.
3849 * cli/cli-script.c (print_command_lines): Now varargs.
3850 (execute_control_command_1) <case while_control, case if_control>:
3851 Update.
3852
3853 2018-05-04 Tom Tromey <tom@tromey.com>
3854
3855 * tracepoint.c (all_tracepoint_actions): Rename from
3856 all_tracepoint_actions_and_cleanup. Change return type.
3857 (actions_command, encode_actions_1, encode_actions)
3858 (trace_dump_actions, tdump_command): Update.
3859 * remote.c (remote_download_command_source): Update.
3860 * python/python.c (gdbpy_eval_from_control_command)
3861 (python_command, python_interactive_command): Update.
3862 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
3863 * guile/guile.c (guile_command)
3864 (gdbscm_eval_from_control_command, guile_command): Update.
3865 * compile/compile.c (compile_code_command)
3866 (compile_print_command, compile_to_object): Update.
3867 * cli/cli-script.h (struct command_lines_deleter): New.
3868 (counted_command_line): New typedef.
3869 (struct command_line): Add constructor, destructor.
3870 <body_list>: Remove.
3871 <body_list_0, body_list_1>: New members.
3872 (command_line_up): Remove typedef.
3873 (read_command_lines, read_command_lines_1, get_command_line):
3874 Update.
3875 (copy_command_lines): Don't declare.
3876 * cli/cli-script.c (build_command_line): Use "new".
3877 (get_command_line): Return counted_command_line.
3878 (print_command_lines, execute_user_command)
3879 (execute_control_command_1, while_command, if_command): Update.
3880 (realloc_body_list): Remove.
3881 (process_next_line, recurse_read_control_structure): Update.
3882 (read_command_lines, read_command_lines_1): Return counted_command_line.
3883 (free_command_lines): Use "delete".
3884 (copy_command_lines): Remove.
3885 (define_command, document_command, show_user_1): Update.
3886 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
3887 a counted_command_line.
3888 * breakpoint.h (counted_command_line): Remove typedef.
3889 (breakpoint_set_commands): Update.
3890 * breakpoint.c (check_no_tracepoint_commands)
3891 (validate_commands_for_breakpoint): Update.
3892 (breakpoint_set_commands): Change commands to be a
3893 counted_command_line.
3894 (commands_command_1, update_dprintf_command_list)
3895 (create_tracepoint_from_upload): Update.
3896
3897 2018-05-04 Tom Tromey <tom@tromey.com>
3898
3899 * cli/cli-decode.h (cmd_list_element): New constructor.
3900 (~cmd_list_element): New destructor.
3901 (struct cmd_list_element): Add initializers.
3902 * cli/cli-decode.c (do_add_cmd): Use "new".
3903 (delete_cmd): Use "delete".
3904
3905 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
3906 Pedro Alves <palves@redhat.com>
3907
3908 PR breakpoints/19806 and support for PR external/20207.
3909 * NEWS: Mention Aarch64 watchpoint improvements.
3910 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
3911 watchpoints and PR external/20207 watchpoints.
3912 * nat/aarch64-linux-hw-point.c
3913 (kernel_supports_any_contiguous_range): New.
3914 (aarch64_watchpoint_offset): New.
3915 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
3916 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
3917 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
3918 (aarch64_align_watchpoint): New parameters aligned_offset_p and
3919 next_addr_orig_p. Support PR external/20207 watchpoints.
3920 (aarch64_downgrade_regs): New.
3921 (aarch64_dr_state_insert_one_point): New parameters offset and
3922 addr_orig.
3923 (aarch64_dr_state_remove_one_point): Likewise.
3924 (aarch64_handle_breakpoint): Update caller.
3925 (aarch64_handle_aligned_watchpoint): Likewise.
3926 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
3927 aligned_offset.
3928 (aarch64_linux_set_debug_regs): Remove const from state. Call
3929 aarch64_downgrade_regs.
3930 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
3931 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
3932 (DR_CONTROL_MASK): ... this.
3933 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
3934 (unsigned int aarch64_watchpoint_offset): New prototype.
3935 (aarch64_linux_set_debug_regs): Remove const from state.
3936 * utils.c (align_up, align_down): Move to ...
3937 * common/common-utils.c (align_up, align_down): ... here.
3938 * utils.h (align_up, align_down): Move to ...
3939 * common/common-utils.h (align_up, align_down): ... here.
3940
3941 2018-05-04 Joel Brobecker <brobecker@adacore.com>
3942
3943 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
3944 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
3945 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
3946 Re-implement to match the ABI as summarized in GCC's
3947 gcc/config/sparc/sparc.c. All callers updated.
3948 (sparc32_store_arguments): Remove assertion.
3949
3950 2018-05-04 Tom Tromey <tom@tromey.com>
3951
3952 * printcmd.c: Don't include tui.h.
3953 (decode_format): Use skip_spaces.
3954
3955 2018-05-04 Tom Tromey <tom@tromey.com>
3956
3957 PR gdb/22619:
3958 * printcmd.c (last_count): New global.
3959 (x_command): Use saved count when repeating.
3960
3961 2018-05-04 Tom Tromey <tom@tromey.com>
3962
3963 * nto-procfs.c (do_closedir_cleanup): Remove.
3964 (procfs_pidlist): Use gdb_dir_up.
3965 * procfs.c (do_closedir_cleanup): Remove.
3966 (proc_update_threads): Use gdb_dir_up.
3967 * common/filestuff.h (struct gdb_dir_deleter): New.
3968 (gdb_dir_up): New typedef.
3969
3970 2018-05-04 Tom Tromey <tom@tromey.com>
3971
3972 * ada-lang.c (print_mention_exception): Use std::string.
3973
3974 2018-05-04 Tom Tromey <tom@tromey.com>
3975
3976 * ada-lang.c (create_excep_cond_exprs): Update.
3977 (ada_exception_catchpoint_cond_string): Use std::string.
3978
3979 2018-05-04 Tom Tromey <tom@tromey.com>
3980
3981 * ada-lang.c (xget_renaming_scope): Return std::string.
3982 (old_renaming_is_invisible): Update.
3983
3984 2018-05-04 Tom Tromey <tom@tromey.com>
3985
3986 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
3987 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
3988
3989 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
3990
3991 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
3992
3993 2018-05-04 Tom Tromey <tom@tromey.com>
3994
3995 * remote.c (remote_query_supported_append): Change type.
3996 (remote_check_symbols): Update.
3997
3998 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
3999
4000 PR gdb/11420
4001 * configure.ac: Prepend libpython.
4002 * python/python-config.py: Likewise.
4003 * configure: Regenerate.
4004
4005 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
4006
4007 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
4008
4009 2018-05-03 Pedro Alves <palves@redhat.com>
4010
4011 * s390-linux-nat.c
4012 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
4013 override. Write 'true' instead of '1'.
4014 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
4015 declaration.
4016
4017 2018-05-02 Pedro Alves <palves@redhat.com>
4018
4019 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
4020 add_inf_child_target.
4021 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
4022 add_inf_child_target.
4023 * aix-thread.c (aix_thread_target_info): New.
4024 (aix_thread_target) <shortname, longname, doc>: Delete.
4025 <info>: New.
4026 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
4027 add_inf_child_target.
4028 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
4029 add_inf_child_target.
4030 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
4031 add_inf_child_target.
4032 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
4033 add_inf_child_target.
4034 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
4035 add_inf_child_target.
4036 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
4037 add_inf_child_target.
4038 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
4039 add_inf_child_target.
4040 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
4041 add_inf_child_target.
4042 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
4043 add_inf_child_target.
4044 * bfd-target.c (target_bfd_target_info): New.
4045 (target_bfd) <shortname, longname, doc>: Delete.
4046 <info>: New.
4047 * bsd-kvm.c (bsd_kvm_target_info): New.
4048 (bsd_kvm_target) <shortname, longname, doc>: Delete.
4049 <info>: New.
4050 (bsd_kvm_target::open): Rename to ...
4051 (bsd_kvm_target_open): ... this. Adjust.
4052 * bsd-uthread.c (bsd_uthread_target_info): New.
4053 (bsd_uthread_target) <shortname, longname, doc>: Delete.
4054 <info>: New.
4055 * corefile.c (core_file_command): Adjust.
4056 * corelow.c (core_target_info): New.
4057 (core_target) <shortname, longname, doc>: Delete.
4058 <info>: New.
4059 (core_target::open): Rename to ...
4060 (core_target_open): ... this. Adjust.
4061 * ctf.c (ctf_target_info): New.
4062 (ctf_target) <shortname, longname, doc>: Delete.
4063 <info>: New.
4064 (ctf_target::open): Rename to ...
4065 (ctf_target_open): ... this.
4066 (_initialize_ctf): Adjust.
4067 * exec.c (exec_target_info): New.
4068 (exec_target) <shortname, longname, doc>: Delete.
4069 <info>: New.
4070 (exec_target::open): Rename to ...
4071 (exec_target_open): ... this.
4072 * gdbcore.h (core_target_open): Declare.
4073 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
4074 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
4075 add_inf_child_target.
4076 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
4077 add_inf_child_target.
4078 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
4079 add_inf_child_target.
4080 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
4081 add_inf_child_target.
4082 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
4083 add_inf_child_target.
4084 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
4085 add_inf_child_target.
4086 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
4087 add_inf_child_target.
4088 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
4089 add_inf_child_target.
4090 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
4091 add_inf_child_target.
4092 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
4093 add_inf_child_target.
4094 * inf-child.c (inf_child_target_info): New.
4095 (inf_child_target::info): New.
4096 (inf_child_open_target): Remove 'target' parameter. Use
4097 get_native_target instead.
4098 (inf_child_target::open): Delete.
4099 (add_inf_child_target): New.
4100 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
4101 Delete.
4102 <info>: New.
4103 (add_inf_child_target): Declare.
4104 (inf_child_open_target): Declare.
4105 * linux-thread-db.c (thread_db_target_info): New.
4106 (thread_db_target) <shortname, longname, doc>: Delete.
4107 <info>: New.
4108 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
4109 add_inf_child_target.
4110 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
4111 add_inf_child_target.
4112 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
4113 add_inf_child_target.
4114 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
4115 add_inf_child_target.
4116 * make-target-delegates (print_class): Adjust.
4117 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
4118 add_inf_child_target.
4119 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
4120 add_inf_child_target.
4121 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
4122 add_inf_child_target.
4123 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
4124 add_inf_child_target.
4125 * nto-procfs.c (nto_native_target_info): New.
4126 (nto_procfs_target_native) <shortname, longname, doc>:
4127 Delete.
4128 <info>: New.
4129 (nto_procfs_target_info): New.
4130 (nto_procfs_target_procfs) <shortname, longname, doc>:
4131 Delete.
4132 <info>: New.
4133 (init_procfs_targets): Adjust.
4134 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
4135 add_inf_child_target.
4136 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
4137 add_inf_child_target.
4138 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
4139 add_inf_child_target.
4140 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
4141 add_inf_child_target.
4142 * ravenscar-thread.c (ravenscar_target_info): New.
4143 (ravenscar_thread_target) <shortname, longname, doc>:
4144 Delete.
4145 <info>: New.
4146 * record-btrace.c (record_btrace_target_info):
4147 (record_btrace_target) <shortname, longname, doc>: Delete.
4148 <info>: New.
4149 (record_btrace_target::open): Rename to ...
4150 (record_btrace_target_open): ... this. Adjust.
4151 * record-full.c (record_longname, record_doc): New.
4152 (record_full_base_target) <shortname, longname, doc>: Delete.
4153 <info>: New.
4154 (record_full_target_info): New.
4155 (record_full_target): <shortname>: Delete.
4156 <info>: New.
4157 (record_full_core_open_1, record_full_open_1): Update comments.
4158 (record_full_base_target::open): Rename to ...
4159 (record_full_open): ... this.
4160 (cmd_record_full_restore): Update.
4161 (_initialize_record_full): Update.
4162 * remote-sim.c (remote_sim_target_info): New.
4163 (gdbsim_target) <shortname, longname, doc>: Delete.
4164 <info>: New.
4165 (gdbsim_target::open): Rename to ...
4166 (gdbsim_target_open): ... this.
4167 (_initialize_remote_sim): Adjust.
4168 * remote.c (remote_doc): New.
4169 (remote_target_info): New.
4170 (remote_target) <shortname, longname, doc>: Delete.
4171 <info>: New.
4172 (extended_remote_target_info): New.
4173 (extended_remote_target) <shortname, longname, doc>: Delete.
4174 <info>: New.
4175 (remote_target::open_1): Make static. Adjust.
4176 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
4177 * s390-linux-nat.c (_initialize_s390_nat): Use
4178 add_inf_child_target.
4179 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
4180 add_inf_child_target.
4181 * sol-thread.c (thread_db_target_info): New.
4182 (sol_thread_target) <shortname, longname, doc>: Delete.
4183 <info>: New.
4184 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
4185 add_inf_child_target.
4186 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
4187 add_inf_child_target.
4188 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
4189 add_inf_child_target.
4190 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
4191 add_inf_child_target.
4192 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
4193 add_inf_child_target.
4194 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
4195 add_inf_child_target.
4196 * spu-linux-nat.c (_initialize_spu_nat): Use
4197 add_inf_child_target.
4198 * spu-multiarch.c (spu_multiarch_target_info): New.
4199 (spu_multiarch_target) <shortname, longname, doc>: Delete.
4200 <info>: New.
4201 * target-delegates.c: Regenerate.
4202 * target.c: Include <unordered_map>.
4203 (target_ops_p): Delete.
4204 (DEF_VEC_P(target_ops_p)): Delete.
4205 (target_factories): New.
4206 (test_target_info): New.
4207 (test_target_ops::info): New.
4208 (open_target): Adjust to use target_factories.
4209 (add_target_with_completer): Rename to ...
4210 (add_target): ... this. Change prototype. Register target_info
4211 and open callback in target_factories. Register target_info in
4212 command context instead of target_ops.
4213 (add_target): Delete old implementation.
4214 (add_deprecated_target_alias): Change prototype. Adjust.
4215 (the_native_target): New.
4216 (set_native_target, get_native_target): New.
4217 (find_default_run_target): Use the_native_target.
4218 (find_attach_target, find_run_target): Simplify.
4219 (target_ops::open): Delete.
4220 (dummy_target_info): New.
4221 (dummy_target::shortname, dummy_target::longname)
4222 (dummy_target::doc): Delete.
4223 (dummy_target::info): New.
4224 (debug_target::shortname, debug_target::longname)
4225 (debug_target::doc): Delete.
4226 (debug_target::info): New.
4227 * target.h (struct target_info): New.
4228 (target_ops::~target_ops): Add comment.
4229 (target_ops::info): New.
4230 (target_ops::shortname, target_ops::longname, target_ops::doc): No
4231 longer virtual. Implement in terms of target_info.
4232 (set_native_target, get_native_target): Declare.
4233 (target_open_ftype): New.
4234 (add_target, add_target_with_completer)
4235 (add_deprecated_target_alias): Change prototype.
4236 (test_target) <shortname, longname, doc>: Delete.
4237 <info>: New.
4238 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
4239 add_inf_child_target.
4240 * tracefile-tfile.c (tfile_target_info): New.
4241 (tfile_target) <shortname, longname, doc>: Delete.
4242 <info>: New.
4243 (tfile_target::open): Rename to ...
4244 (tfile_target_open): ... this.
4245 (_initialize_tracefile_tfile): Adjust.
4246 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
4247 add_inf_child_target.
4248 * windows-nat.c (_initialize_windows_nat): Use
4249 add_inf_child_target.
4250 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
4251 add_inf_child_target.
4252
4253 2018-05-02 Pedro Alves <palves@redhat.com>
4254
4255 * linux-nat.h (linux_nat_target) <low_new_thread,
4256 low_delete_thread, low_new_fork, low_forget_process,
4257 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
4258 New virtual methods.
4259 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
4260 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
4261 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
4262 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
4263 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
4264 Delete.
4265 * linux-fork.c (delete_fork): Adjust to call low method.
4266 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
4267 (linux_nat_new_fork, linux_nat_forget_process_hook)
4268 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
4269 (linux_nat_status_is_event):
4270 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
4271 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
4272 to call low method.
4273 (sigtrap_is_event): Rename to ...
4274 (linux_nat_target::low_status_is_event): ... this.
4275 (linux_nat_set_status_is_event): Delete.
4276 (save_stop_reason, linux_nat_wait_1)
4277 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
4278 low methods.
4279 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
4280 (linux_nat_set_new_fork, linux_nat_set_forget_process)
4281 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
4282 (linux_nat_set_prepare_to_resume): Delete.
4283 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
4284 low virtual methods.
4285 * amd64-linux-nat.c: Likewise.
4286 * arm-linux-nat.c: Likewise.
4287 * i386-linux-nat.c: Likewise.
4288 * ia64-linux-nat.c: Likewise.
4289 * mips-linux-nat.c: Likewise.
4290 * ppc-linux-nat.c: Likewise.
4291 * s390-linux-nat.c: Likewise.
4292 * sparc64-linux-nat.c: Likewise.
4293 * x86-linux-nat.c: Likewise.
4294 * x86-linux-nat.h: Include "nat/x86-linux.h".
4295 (x86_linux_nat_target) <low_new_fork, low_forget_process,
4296 low_prepare_to_resume, low_new_thread, low_delete_thread>:
4297 Override methods.
4298
4299 2018-05-02 Pedro Alves <palves@redhat.com>
4300
4301 * target.h (target_ops)
4302 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4303 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
4304 stopped_by_watchpoint, have_continuable_watchpoint,
4305 stopped_data_address, watchpoint_addr_within_range,
4306 can_accel_watchpoint_condition, can_run, thread_alive,
4307 has_all_memory, has_memory, has_stack, has_registers,
4308 has_execution, can_async_p, is_async_p, supports_non_stop,
4309 always_non_stop_p, can_execute_reverse, supports_multi_process,
4310 supports_enable_disable_tracepoint,
4311 supports_disable_randomization, supports_string_tracing,
4312 supports_evaluation_of_breakpoint_conditions,
4313 can_run_breakpoint_commands, filesystem_is_local,
4314 can_download_tracepoint, get_trace_state_variable_value,
4315 set_trace_notes, get_tib_address, use_agent, can_use_agent,
4316 record_is_replaying, record_will_replay,
4317 augmented_libraries_svr4_read>: Adjust to return bool.
4318 * aarch64-linux-nat.c: All implementations adjusted.
4319 * aix-thread.c: All implementations adjusted.
4320 * arm-linux-nat.c: All implementations adjusted.
4321 * breakpoint.c: All implementations adjusted.
4322 * bsd-kvm.c: All implementations adjusted.
4323 * bsd-uthread.c: All implementations adjusted.
4324 * corelow.c: All implementations adjusted.
4325 * ctf.c: All implementations adjusted.
4326 * darwin-nat.c: All implementations adjusted.
4327 * darwin-nat.h: All implementations adjusted.
4328 * exec.c: All implementations adjusted.
4329 * fbsd-nat.c: All implementations adjusted.
4330 * fbsd-nat.h: All implementations adjusted.
4331 * gnu-nat.c: All implementations adjusted.
4332 * gnu-nat.h: All implementations adjusted.
4333 * go32-nat.c: All implementations adjusted.
4334 * ia64-linux-nat.c: All implementations adjusted.
4335 * inf-child.c: All implementations adjusted.
4336 * inf-child.h: All implementations adjusted.
4337 * inf-ptrace.c: All implementations adjusted.
4338 * inf-ptrace.h: All implementations adjusted.
4339 * linux-nat.c: All implementations adjusted.
4340 * linux-nat.h: All implementations adjusted.
4341 * mips-linux-nat.c: All implementations adjusted.
4342 * nto-procfs.c: All implementations adjusted.
4343 * ppc-linux-nat.c: All implementations adjusted.
4344 * procfs.c: All implementations adjusted.
4345 * ravenscar-thread.c: All implementations adjusted.
4346 * record-btrace.c: All implementations adjusted.
4347 * record-full.c: All implementations adjusted.
4348 * remote-sim.c: All implementations adjusted.
4349 * remote.c: All implementations adjusted.
4350 * s390-linux-nat.c: All implementations adjusted.
4351 * sol-thread.c: All implementations adjusted.
4352 * spu-multiarch.c: All implementations adjusted.
4353 * target-delegates.c: All implementations adjusted.
4354 * target.c: All implementations adjusted.
4355 * target.h: All implementations adjusted.
4356 * tracefile-tfile.c: All implementations adjusted.
4357 * tracefile.c: All implementations adjusted.
4358 * tracefile.h: All implementations adjusted.
4359 * windows-nat.c: All implementations adjusted.
4360 * x86-linux-nat.h: All implementations adjusted.
4361 * x86-nat.h: All implementations adjusted.
4362
4363 2018-05-02 Pedro Alves <palves@redhat.com>
4364
4365 * make-target-delegates (scan_target_h): Don't trim lines here.
4366 Replace sequences of tabs and/or whitespace with a single
4367 whitespace.
4368 (top level, parsing methods): Trim each line before processing it
4369 here.
4370
4371 2018-05-02 Pedro Alves <palves@redhat.com>
4372 John Baldwin <jhb@freebsd.org>
4373
4374 * target.h (enum strata) <debug_stratum>: New.
4375 (struct target_ops) <all delegation methods>: Replace by C++
4376 virtual methods, and drop "to_" prefix. All references updated
4377 throughout.
4378 <to_shortname, to_longname, to_doc, to_data,
4379 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
4380 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
4381 virtual methods. All references updated throughout.
4382 <can_attach, supports_terminal_ours, can_create_inferior,
4383 get_thread_control_capabilities, attach_no_wait>: New
4384 virtual methods.
4385 <insert_breakpoint, remove_breakpoint>: Now
4386 TARGET_DEFAULT_NORETURN methods.
4387 <info_proc>: Now returns bool.
4388 <to_magic>: Delete.
4389 (OPS_MAGIC): Delete.
4390 (current_target): Delete. All references replaced by references
4391 to ...
4392 (target_stack): ... this. New.
4393 (target_shortname, target_longname): Adjust.
4394 (target_can_run): Now a function declaration.
4395 (default_child_has_all_memory, default_child_has_memory)
4396 (default_child_has_stack, default_child_has_registers)
4397 (default_child_has_execution): Remove target_ops parameter.
4398 (complete_target_initialization): Delete.
4399 (memory_breakpoint_target): New template class.
4400 (test_target_ops): Refactor as a C++ class with virtual methods.
4401 * make-target-delegates (NAME_PART): Tighten.
4402 (POINTER_PART, CP_SYMBOL): New.
4403 (SIMPLE_RETURN_PART): Reimplement.
4404 (VEC_RETURN_PART): Expect less.
4405 (RETURN_PART, VIRTUAL_PART): New.
4406 (METHOD): Adjust to C++ virtual methods.
4407 (scan_target_h): Remove reference to C99.
4408 (dname): Output "target_ops::" prefix.
4409 (write_function_header): Adjust to output a C++ class method.
4410 (write_declaration): New.
4411 (write_delegator): Adjust to output a C++ class method.
4412 (tdname): Output "dummy_target::" prefix.
4413 (write_tdefault, write_debugmethod): Adjust to output a C++ class
4414 method.
4415 (tdefault_names, debug_names): Delete.
4416 (return_types, tdefaults, styles, argtypes_array): New.
4417 (top level): All methods are delegators.
4418 (print_class): New.
4419 (top level): Print dummy_target and debug_target classes.
4420 * target-delegates.c: Regenerate.
4421 * target-debug.h (target_debug_print_enum_info_proc_what)
4422 (target_debug_print_thread_control_capabilities)
4423 (target_debug_print_thread_info_p): New.
4424 * target.c (dummy_target): Delete.
4425 (the_dummy_target, the_debug_target): New.
4426 (target_stack): Now extern.
4427 (set_targetdebug): Push/unpush debug target.
4428 (default_child_has_all_memory, default_child_has_memory)
4429 (default_child_has_stack, default_child_has_registers)
4430 (default_child_has_execution): Remove target_ops parameter.
4431 (complete_target_initialization): Delete.
4432 (add_target_with_completer): No longer call
4433 complete_target_initialization.
4434 (target_supports_terminal_ours): Use regular delegation.
4435 (update_current_target): Delete.
4436 (push_target): No longer check magic number. Don't call
4437 update_current_target.
4438 (unpush_target): Don't call update_current_target.
4439 (target_is_pushed): No longer check magic number.
4440 (target_require_runnable): Skip for all stratums over
4441 process_stratum.
4442 (target_ops::info_proc): New.
4443 (target_info_proc): Use find_target_at and
4444 find_default_run_target.
4445 (target_supports_disable_randomization): Use regular delegation.
4446 (target_get_osdata): Use find_target_at.
4447 (target_ops::open, target_ops::close, target_ops::can_attach)
4448 (target_ops::attach, target_ops::can_create_inferior)
4449 (target_ops::create_inferior, target_ops::can_run)
4450 (target_can_run): New.
4451 (default_fileio_target): Use regular delegation.
4452 (target_ops::fileio_open, target_ops::fileio_pwrite)
4453 (target_ops::fileio_pread, target_ops::fileio_fstat)
4454 (target_ops::fileio_close, target_ops::fileio_unlink)
4455 (target_ops::fileio_readlink): New.
4456 (target_fileio_open_1, target_fileio_unlink)
4457 (target_fileio_readlink): Always call the target method. Handle
4458 FILEIO_ENOSYS.
4459 (return_zero, return_zero_has_execution): Delete.
4460 (init_dummy_target): Delete.
4461 (dummy_target::dummy_target, dummy_target::shortname)
4462 (dummy_target::longname, dummy_target::doc)
4463 (debug_target::debug_target, debug_target::shortname)
4464 (debug_target::longname, debug_target::doc): New.
4465 (target_supports_delete_record): Use regular delegation.
4466 (setup_target_debug): Delete.
4467 (maintenance_print_target_stack): Skip debug_stratum.
4468 (initialize_targets): Instantiate the_dummy_target and
4469 the_debug_target.
4470 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
4471 use target_stack.
4472 (target_auxv_search, fprint_target_auxv): Adjust.
4473 (info_auxv_command): Adjust to use target_stack.
4474 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
4475 * exceptions.c (print_flush): Handle a NULL target_stack.
4476 * regcache.c (target_ops_no_register): Refactor as class with
4477 virtual methods.
4478
4479 * exec.c (exec_target): New class.
4480 (exec_ops): Now an exec_target.
4481 (exec_open, exec_close_1, exec_get_section_table)
4482 (exec_xfer_partial, exec_files_info, exec_has_memory)
4483 (exec_make_note_section): Refactor as exec_target methods.
4484 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
4485 Delete.
4486 (exec_target::find_memory_regions): New.
4487 (_initialize_exec): Don't call init_exec_ops.
4488 * gdbcore.h (exec_file_clear): Delete.
4489
4490 * corefile.c (core_target): Delete.
4491 (core_file_command): Adjust.
4492 * corelow.c (core_target): New class.
4493 (the_core_target): New.
4494 (core_close): Remove target_ops parameter.
4495 (core_close_cleanup): Adjust.
4496 (core_target::close): New.
4497 (core_open, core_detach, get_core_registers, core_files_info)
4498 (core_xfer_partial, core_thread_alive, core_read_description)
4499 (core_pid_to_str, core_thread_name, core_has_memory)
4500 (core_has_stack, core_has_registers, core_info_proc): Rework as
4501 core_target methods.
4502 (ignore, core_remove_breakpoint, init_core_ops): Delete.
4503 (_initialize_corelow): Initialize the_core_target.
4504 * gdbcore.h (core_target): Delete.
4505 (the_core_target): New.
4506
4507 * ctf.c: (ctf_target): New class.
4508 (ctf_ops): Now a ctf_target.
4509 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
4510 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
4511 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
4512 methods.
4513 (init_ctf_ops): Delete.
4514 (_initialize_ctf): Don't call it.
4515 * tracefile-tfile.c (tfile_target): New class.
4516 (tfile_ops): Now a tfile_target.
4517 (tfile_open, tfile_close, tfile_files_info)
4518 (tfile_get_tracepoint_status, tfile_trace_find)
4519 (tfile_fetch_registers, tfile_xfer_partial)
4520 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
4521 Refactor as tfile_target methods.
4522 (tfile_xfer_partial_features): Remove target_ops parameter.
4523 (init_tfile_ops): Delete.
4524 (_initialize_tracefile_tfile): Don't call it.
4525 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
4526 (tracefile_has_stack, tracefile_has_registers)
4527 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
4528 tracefile_target methods.
4529 (init_tracefile_ops): Delete.
4530 (tracefile_target::tracefile_target): New.
4531 * tracefile.h: Include "target.h".
4532 (tracefile_target): New class.
4533 (init_tracefile_ops): Delete.
4534
4535 * spu-multiarch.c (spu_multiarch_target): New class.
4536 (spu_ops): Now a spu_multiarch_target.
4537 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
4538 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
4539 (spu_search_memory, spu_mourn_inferior): Refactor as
4540 spu_multiarch_target methods.
4541 (init_spu_ops): Delete.
4542 (_initialize_spu_multiarch): Remove references to init_spu_ops,
4543 complete_target_initialization.
4544
4545 * ravenscar-thread.c (ravenscar_thread_target): New class.
4546 (ravenscar_ops): Now a ravenscar_thread_target.
4547 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
4548 (ravenscar_thread_alive, ravenscar_pid_to_str)
4549 (ravenscar_fetch_registers, ravenscar_store_registers)
4550 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
4551 (ravenscar_stopped_by_hw_breakpoint)
4552 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
4553 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
4554 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
4555 methods.
4556 (init_ravenscar_thread_ops): Delete.
4557 (_initialize_ravenscar): Remove references to
4558 init_ravenscar_thread_ops and complete_target_initialization.
4559
4560 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
4561 (bsd_uthread_target): New class.
4562 (bsd_uthread_ops): Now a bsd_uthread_target.
4563 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
4564 (bsd_uthread_close, bsd_uthread_mourn_inferior)
4565 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
4566 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
4567 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
4568 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
4569 (bsd_uthread_target): Delete function.
4570 (_initialize_bsd_uthread): Remove reference to
4571 complete_target_initialization.
4572
4573 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
4574 (target_bfd): ... this new class.
4575 (target_bfd_xfer_partial, target_bfd_get_section_table)
4576 (target_bfd_close): Refactor as target_bfd methods.
4577 (target_bfd::~target_bfd): New.
4578 (target_bfd_reopen): Adjust.
4579 (target_bfd::close): New.
4580
4581 * record-btrace.c (record_btrace_target): New class.
4582 (record_btrace_ops): Now a record_btrace_target.
4583 (record_btrace_open, record_btrace_stop_recording)
4584 (record_btrace_disconnect, record_btrace_close)
4585 (record_btrace_async, record_btrace_info)
4586 (record_btrace_insn_history, record_btrace_insn_history_range)
4587 (record_btrace_insn_history_from, record_btrace_call_history)
4588 (record_btrace_call_history_range)
4589 (record_btrace_call_history_from, record_btrace_record_method)
4590 (record_btrace_is_replaying, record_btrace_will_replay)
4591 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
4592 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
4593 (record_btrace_store_registers, record_btrace_prepare_to_store)
4594 (record_btrace_to_get_unwinder)
4595 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
4596 (record_btrace_commit_resume, record_btrace_wait)
4597 (record_btrace_stop, record_btrace_can_execute_reverse)
4598 (record_btrace_stopped_by_sw_breakpoint)
4599 (record_btrace_supports_stopped_by_sw_breakpoint)
4600 (record_btrace_stopped_by_hw_breakpoint)
4601 (record_btrace_supports_stopped_by_hw_breakpoint)
4602 (record_btrace_update_thread_list, record_btrace_thread_alive)
4603 (record_btrace_goto_begin, record_btrace_goto_end)
4604 (record_btrace_goto, record_btrace_stop_replaying_all)
4605 (record_btrace_execution_direction)
4606 (record_btrace_prepare_to_generate_core)
4607 (record_btrace_done_generating_core): Refactor as
4608 record_btrace_target methods.
4609 (init_record_btrace_ops): Delete.
4610 (_initialize_record_btrace): Remove reference to
4611 init_record_btrace_ops.
4612 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
4613 the execution_direction global.
4614 (record_full_base_target, record_full_target)
4615 (record_full_core_target): New classes.
4616 (record_full_ops): Now a record_full_target.
4617 (record_full_core_ops): Now a record_full_core_target.
4618 (record_full_target::detach, record_full_target::disconnect)
4619 (record_full_core_target::disconnect)
4620 (record_full_target::mourn_inferior, record_full_target::kill):
4621 New.
4622 (record_full_open, record_full_close, record_full_async): Refactor
4623 as methods of the record_full_base_target class.
4624 (record_full_resume, record_full_commit_resume): Refactor
4625 as methods of the record_full_target class.
4626 (record_full_wait, record_full_stopped_by_watchpoint)
4627 (record_full_stopped_data_address)
4628 (record_full_stopped_by_sw_breakpoint)
4629 (record_full_supports_stopped_by_sw_breakpoint)
4630 (record_full_stopped_by_hw_breakpoint)
4631 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
4632 methods of the record_full_base_target class.
4633 (record_full_store_registers, record_full_xfer_partial)
4634 (record_full_insert_breakpoint, record_full_remove_breakpoint):
4635 Refactor as methods of the record_full_target class.
4636 (record_full_can_execute_reverse, record_full_get_bookmark)
4637 (record_full_goto_bookmark, record_full_execution_direction)
4638 (record_full_record_method, record_full_info, record_full_delete)
4639 (record_full_is_replaying, record_full_will_replay)
4640 (record_full_goto_begin, record_full_goto_end, record_full_goto)
4641 (record_full_stop_replaying): Refactor as methods of the
4642 record_full_base_target class.
4643 (record_full_core_resume, record_full_core_kill)
4644 (record_full_core_fetch_registers)
4645 (record_full_core_prepare_to_store)
4646 (record_full_core_store_registers, record_full_core_xfer_partial)
4647 (record_full_core_insert_breakpoint)
4648 (record_full_core_remove_breakpoint)
4649 (record_full_core_has_execution): Refactor
4650 as methods of the record_full_core_target class.
4651 (record_full_base_target::supports_delete_record): New.
4652 (init_record_full_ops): Delete.
4653 (init_record_full_core_ops): Delete.
4654 (record_full_save): Refactor as method of the
4655 record_full_base_target class.
4656 (_initialize_record_full): Remove references to
4657 init_record_full_ops and init_record_full_core_ops.
4658
4659 * remote.c (remote_target, extended_remote_target): New classes.
4660 (remote_ops): Now a remote_target.
4661 (extended_remote_ops): Now an extended_remote_target.
4662 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
4663 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
4664 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
4665 (remote_pass_signals, remote_set_syscall_catchpoint)
4666 (remote_program_signals, )
4667 (remote_thread_always_alive): Remove target_ops parameter.
4668 (remote_thread_alive, remote_thread_name)
4669 (remote_update_thread_list, remote_threads_extra_info)
4670 (remote_static_tracepoint_marker_at)
4671 (remote_static_tracepoint_markers_by_strid)
4672 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
4673 (remote_open): Refactor as methods of remote_target.
4674 (extended_remote_open, extended_remote_detach)
4675 (extended_remote_attach, extended_remote_post_attach):
4676 (extended_remote_supports_disable_randomization)
4677 (extended_remote_create_inferior): : Refactor as method of
4678 extended_remote_target.
4679 (remote_set_permissions, remote_open_1, remote_detach)
4680 (remote_follow_fork, remote_follow_exec, remote_disconnect)
4681 (remote_resume, remote_commit_resume, remote_stop)
4682 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
4683 (remote_terminal_ours, remote_wait, remote_fetch_registers)
4684 (remote_prepare_to_store, remote_store_registers)
4685 (remote_flash_erase, remote_flash_done, remote_files_info)
4686 (remote_kill, remote_mourn, remote_insert_breakpoint)
4687 (remote_remove_breakpoint, remote_insert_watchpoint)
4688 (remote_watchpoint_addr_within_range)
4689 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
4690 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
4691 (remote_supports_stopped_by_sw_breakpoint)
4692 (remote_stopped_by_hw_breakpoint)
4693 (remote_supports_stopped_by_hw_breakpoint)
4694 (remote_stopped_by_watchpoint, remote_stopped_data_address)
4695 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
4696 (remote_verify_memory): Refactor as methods of remote_target.
4697 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
4698 parameter.
4699 (remote_xfer_partial, remote_get_memory_xfer_limit)
4700 (remote_search_memory, remote_rcmd, remote_memory_map)
4701 (remote_pid_to_str, remote_get_thread_local_address)
4702 (remote_get_tib_address, remote_read_description): Refactor as
4703 methods of remote_target.
4704 (remote_target::fileio_open, remote_target::fileio_pwrite)
4705 (remote_target::fileio_pread, remote_target::fileio_close): New.
4706 (remote_hostio_readlink, remote_hostio_fstat)
4707 (remote_filesystem_is_local, remote_can_execute_reverse)
4708 (remote_supports_non_stop, remote_supports_disable_randomization)
4709 (remote_supports_multi_process, remote_supports_cond_breakpoints)
4710 (remote_supports_enable_disable_tracepoint)
4711 (remote_supports_string_tracing)
4712 (remote_can_run_breakpoint_commands, remote_trace_init)
4713 (remote_download_tracepoint, remote_can_download_tracepoint)
4714 (remote_download_trace_state_variable, remote_enable_tracepoint)
4715 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
4716 (remote_trace_start, remote_get_trace_status)
4717 (remote_get_tracepoint_status, remote_trace_stop)
4718 (remote_trace_find, remote_get_trace_state_variable_value)
4719 (remote_save_trace_data, remote_get_raw_trace_data)
4720 (remote_set_disconnected_tracing, remote_core_of_thread)
4721 (remote_set_circular_trace_buffer, remote_traceframe_info)
4722 (remote_get_min_fast_tracepoint_insn_len)
4723 (remote_set_trace_buffer_size, remote_set_trace_notes)
4724 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
4725 (remote_disable_btrace, remote_teardown_btrace)
4726 (remote_read_btrace, remote_btrace_conf)
4727 (remote_augmented_libraries_svr4_read, remote_load)
4728 (remote_pid_to_exec_file, remote_can_do_single_step)
4729 (remote_execution_direction, remote_thread_handle_to_thread_info):
4730 Refactor as methods of remote_target.
4731 (init_remote_ops, init_extended_remote_ops): Delete.
4732 (remote_can_async_p, remote_is_async_p, remote_async)
4733 (remote_thread_events, remote_upload_tracepoints)
4734 (remote_upload_trace_state_variables): Refactor as methods of
4735 remote_target.
4736 (_initialize_remote): Remove references to init_remote_ops and
4737 init_extended_remote_ops.
4738
4739 * remote-sim.c (gdbsim_target): New class.
4740 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
4741 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
4742 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
4743 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
4744 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
4745 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
4746 Refactor as methods of gdbsim_target.
4747 (gdbsim_ops): Now a gdbsim_target.
4748 (init_gdbsim_ops): Delete.
4749 (gdbsim_cntrl_c): Adjust.
4750 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
4751
4752 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
4753 (the_amd64_linux_nat_target): New.
4754 (amd64_linux_fetch_inferior_registers)
4755 (amd64_linux_store_inferior_registers): Refactor as methods of
4756 amd64_linux_nat_target.
4757 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
4758 * i386-linux-nat.c: Don't include "linux-nat.h".
4759 (i386_linux_nat_target): New class.
4760 (the_i386_linux_nat_target): New.
4761 (i386_linux_fetch_inferior_registers)
4762 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
4763 as methods of i386_linux_nat_target.
4764 (_initialize_i386_linux_nat): Adjust. Set linux_target.
4765 * inf-child.c (inf_child_ops): Delete.
4766 (inf_child_fetch_inferior_registers)
4767 (inf_child_store_inferior_registers): Delete.
4768 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
4769 methods of inf_child_target.
4770 (inf_child_target::supports_terminal_ours)
4771 (inf_child_target::terminal_init)
4772 (inf_child_target::terminal_inferior)
4773 (inf_child_target::terminal_ours_for_output)
4774 (inf_child_target::terminal_ours, inf_child_target::interrupt)
4775 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
4776 New.
4777 (inf_child_open, inf_child_disconnect, inf_child_close)
4778 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
4779 (inf_child_post_startup_inferior, inf_child_can_run)
4780 (inf_child_pid_to_exec_file): Refactor as methods of
4781 inf_child_target.
4782 (inf_child_follow_fork): Delete.
4783 (inf_child_target::can_create_inferior)
4784 (inf_child_target::can_attach): New.
4785 (inf_child_target::has_all_memory, inf_child_target::has_memory)
4786 (inf_child_target::has_stack, inf_child_target::has_registers)
4787 (inf_child_target::has_execution): New.
4788 (inf_child_fileio_open, inf_child_fileio_pwrite)
4789 (inf_child_fileio_pread, inf_child_fileio_fstat)
4790 (inf_child_fileio_close, inf_child_fileio_unlink)
4791 (inf_child_fileio_readlink, inf_child_use_agent)
4792 (inf_child_can_use_agent): Refactor as methods of
4793 inf_child_target.
4794 (return_zero, inf_child_target): Delete.
4795 (inf_child_target::inf_child_target): New.
4796 * inf-child.h: Include "target.h".
4797 (inf_child_target): Delete function prototype.
4798 (inf_child_target): New class.
4799 (inf_child_open_target, inf_child_mourn_inferior)
4800 (inf_child_maybe_unpush_target): Delete.
4801 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
4802 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
4803 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
4804 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
4805 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
4806 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
4807 (inf_ptrace_wait, inf_ptrace_xfer_partial)
4808 (inf_ptrace_thread_alive, inf_ptrace_files_info)
4809 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
4810 methods of inf_ptrace_target.
4811 (inf_ptrace_target): Delete function.
4812 * inf-ptrace.h: Include "inf-child.h".
4813 (inf_ptrace_target): Delete function declaration.
4814 (inf_ptrace_target): New class.
4815 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
4816 * linux-nat.c (linux_target): New.
4817 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
4818 (linux_nat_target::~linux_nat_target): New.
4819 (linux_child_post_attach, linux_child_post_startup_inferior)
4820 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
4821 (linux_child_remove_fork_catchpoint)
4822 (linux_child_insert_vfork_catchpoint)
4823 (linux_child_remove_vfork_catchpoint)
4824 (linux_child_insert_exec_catchpoint)
4825 (linux_child_remove_exec_catchpoint)
4826 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
4827 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
4828 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
4829 (linux_nat_stopped_data_address)
4830 (linux_nat_stopped_by_sw_breakpoint)
4831 (linux_nat_supports_stopped_by_sw_breakpoint)
4832 (linux_nat_stopped_by_hw_breakpoint)
4833 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
4834 (linux_nat_kill, linux_nat_mourn_inferior)
4835 (linux_nat_xfer_partial, linux_nat_thread_alive)
4836 (linux_nat_update_thread_list, linux_nat_pid_to_str)
4837 (linux_nat_thread_name, linux_child_pid_to_exec_file)
4838 (linux_child_static_tracepoint_markers_by_strid)
4839 (linux_nat_is_async_p, linux_nat_can_async_p)
4840 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
4841 (linux_nat_supports_multi_process)
4842 (linux_nat_supports_disable_randomization, linux_nat_async)
4843 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
4844 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
4845 (linux_nat_fileio_open, linux_nat_fileio_readlink)
4846 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
4847 methods of linux_nat_target.
4848 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
4849 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
4850 parameter.
4851 (check_stopped_by_watchpoint): Adjust.
4852 (linux_xfer_partial): Delete.
4853 (linux_target_install_ops, linux_target, linux_nat_add_target):
4854 Delete.
4855 (linux_nat_target::linux_nat_target): New.
4856 * linux-nat.h: Include "inf-ptrace.h".
4857 (linux_nat_target): New.
4858 (linux_target, linux_target_install_ops, linux_nat_add_target):
4859 Delete function declarations.
4860 (linux_target): Declare global.
4861 * linux-thread-db.c (thread_db_target): New.
4862 (thread_db_target::thread_db_target): New.
4863 (thread_db_ops): Delete.
4864 (the_thread_db_target): New.
4865 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
4866 (thread_db_update_thread_list, thread_db_pid_to_str)
4867 (thread_db_extra_thread_info)
4868 (thread_db_thread_handle_to_thread_info)
4869 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
4870 (thread_db_resume): Refactor as methods of thread_db_target.
4871 (init_thread_db_ops): Delete.
4872 (_initialize_thread_db): Remove reference to init_thread_db_ops.
4873 * x86-linux-nat.c: Don't include "linux-nat.h".
4874 (super_post_startup_inferior): Delete.
4875 (x86_linux_nat_target::~x86_linux_nat_target): New.
4876 (x86_linux_child_post_startup_inferior)
4877 (x86_linux_read_description, x86_linux_enable_btrace)
4878 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
4879 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
4880 methods of x86_linux_nat_target.
4881 (x86_linux_create_target): Delete. Bits folded ...
4882 (x86_linux_add_target): ... here. Now takes a linux_nat_target
4883 pointer.
4884 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
4885 (x86_linux_nat_target): New class.
4886 (x86_linux_create_target): Delete.
4887 (x86_linux_add_target): Now takes a linux_nat_target pointer.
4888 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
4889 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
4890 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
4891 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
4892 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
4893 make extern.
4894 (x86_use_watchpoints): Delete.
4895 * x86-nat.h: Include "breakpoint.h" and "target.h".
4896 (x86_use_watchpoints): Delete.
4897 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
4898 (x86_stopped_by_watchpoint, x86_stopped_data_address)
4899 (x86_insert_watchpoint, x86_remove_watchpoint)
4900 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
4901 (x86_stopped_by_hw_breakpoint): New declarations.
4902 (x86_nat_target): New template class.
4903
4904 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
4905 (the_ppc_linux_nat_target): New.
4906 (ppc_linux_fetch_inferior_registers)
4907 (ppc_linux_can_use_hw_breakpoint)
4908 (ppc_linux_region_ok_for_hw_watchpoint)
4909 (ppc_linux_ranged_break_num_registers)
4910 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
4911 (ppc_linux_insert_mask_watchpoint)
4912 (ppc_linux_remove_mask_watchpoint)
4913 (ppc_linux_can_accel_watchpoint_condition)
4914 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
4915 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
4916 (ppc_linux_watchpoint_addr_within_range)
4917 (ppc_linux_masked_watch_num_registers)
4918 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
4919 (ppc_linux_read_description): Refactor as methods of
4920 ppc_linux_nat_target.
4921 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
4922
4923 * procfs.c (procfs_xfer_partial): Delete forward declaration.
4924 (procfs_target): New class.
4925 (the_procfs_target): New.
4926 (procfs_target): Delete function.
4927 (procfs_auxv_parse, procfs_attach, procfs_detach)
4928 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
4929 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
4930 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
4931 (procfs_create_inferior, procfs_update_thread_list)
4932 (procfs_thread_alive, procfs_pid_to_str)
4933 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
4934 (procfs_stopped_data_address, procfs_insert_watchpoint)
4935 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
4936 (proc_find_memory_regions, procfs_info_proc)
4937 (procfs_make_note_section): Refactor as methods of procfs_target.
4938 (_initialize_procfs): Adjust.
4939 * sol-thread.c (sol_thread_target): New class.
4940 (sol_thread_ops): Now a sol_thread_target.
4941 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
4942 (sol_thread_fetch_registers, sol_thread_store_registers)
4943 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
4944 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
4945 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
4946 (init_sol_thread_ops): Delete.
4947 (_initialize_sol_thread): Adjust. Remove references to
4948 init_sol_thread_ops and complete_target_initialization.
4949
4950 * windows-nat.c (windows_nat_target): New class.
4951 (windows_fetch_inferior_registers)
4952 (windows_store_inferior_registers, windows_resume, windows_wait)
4953 (windows_attach, windows_detach, windows_pid_to_exec_file)
4954 (windows_files_info, windows_create_inferior)
4955 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
4956 (windows_close, windows_pid_to_str, windows_xfer_partial)
4957 (windows_get_tib_address, windows_get_ada_task_ptid)
4958 (windows_thread_name, windows_thread_alive): Refactor as
4959 windows_nat_target methods.
4960 (do_initial_windows_stuff): Adjust.
4961 (windows_target): Delete function.
4962 (_initialize_windows_nat): Adjust.
4963
4964 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
4965 (darwin_mourn_inferior, darwin_kill_inferior)
4966 (darwin_create_inferior, darwin_attach, darwin_detach)
4967 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
4968 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
4969 (darwin_supports_multi_process): Refactor as darwin_nat_target
4970 methods.
4971 (darwin_resume_to, darwin_files_info): Delete.
4972 (_initialize_darwin_inferior): Rename to ...
4973 (_initialize_darwin_nat): ... this. Adjust to C++ification.
4974 * darwin-nat.h: Include "inf-child.h".
4975 (darwin_nat_target): New class.
4976 (darwin_complete_target): Delete.
4977 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
4978 (darwin_target): New.
4979 (i386_darwin_fetch_inferior_registers)
4980 (i386_darwin_store_inferior_registers): Refactor as methods of
4981 darwin_nat_target.
4982 (darwin_complete_target): Delete, with ...
4983 (_initialize_i386_darwin_nat): ... bits factored out here.
4984
4985 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
4986 (the_alpha_linux_nat_target): New.
4987 (alpha_linux_register_u_offset): Refactor as
4988 alpha_linux_nat_target method.
4989 (_initialize_alpha_linux_nat): Adjust.
4990 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
4991 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
4992 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
4993 methods of linux_nat_trad_target.
4994 (linux_trad_target): Delete.
4995 * linux-nat-trad.h (linux_trad_target): Delete function.
4996 (linux_nat_trad_target): New class.
4997 * mips-linux-nat.c (mips_linux_nat_target): New class.
4998 (super_fetch_registers, super_store_registers, super_close):
4999 Delete.
5000 (the_mips_linux_nat_target): New.
5001 (mips64_linux_regsets_fetch_registers)
5002 (mips64_linux_regsets_store_registers)
5003 (mips64_linux_fetch_registers, mips64_linux_store_registers)
5004 (mips_linux_register_u_offset, mips_linux_read_description)
5005 (mips_linux_can_use_hw_breakpoint)
5006 (mips_linux_stopped_by_watchpoint)
5007 (mips_linux_stopped_data_address)
5008 (mips_linux_region_ok_for_hw_watchpoint)
5009 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
5010 (mips_linux_close): Refactor as methods of mips_linux_nat.
5011 (_initialize_mips_linux_nat): Adjust to C++ification.
5012
5013 * aix-thread.c (aix_thread_target): New class.
5014 (aix_thread_ops): Now an aix_thread_target.
5015 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
5016 (aix_thread_fetch_registers, aix_thread_store_registers)
5017 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
5018 (aix_thread_thread_alive, aix_thread_pid_to_str)
5019 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
5020 Refactor as methods of aix_thread_target.
5021 (init_aix_thread_ops): Delete.
5022 (_initialize_aix_thread): Remove references to init_aix_thread_ops
5023 and complete_target_initialization.
5024 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
5025 (rs6000_nat_target): New class.
5026 (the_rs6000_nat_target): New.
5027 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
5028 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
5029 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
5030 (super_create_inferior): Delete.
5031 (_initialize_rs6000_nat): Adjust to C++ification.
5032
5033 * arm-linux-nat.c (arm_linux_nat_target): New class.
5034 (the_arm_linux_nat_target): New.
5035 (arm_linux_fetch_inferior_registers)
5036 (arm_linux_store_inferior_registers, arm_linux_read_description)
5037 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
5038 (arm_linux_remove_hw_breakpoint)
5039 (arm_linux_region_ok_for_hw_watchpoint)
5040 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
5041 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
5042 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
5043 arm_linux_nat_target.
5044 (_initialize_arm_linux_nat): Adjust to C++ification.
5045
5046 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
5047 (the_aarch64_linux_nat_target): New.
5048 (aarch64_linux_fetch_inferior_registers)
5049 (aarch64_linux_store_inferior_registers)
5050 (aarch64_linux_child_post_startup_inferior)
5051 (aarch64_linux_read_description)
5052 (aarch64_linux_can_use_hw_breakpoint)
5053 (aarch64_linux_insert_hw_breakpoint)
5054 (aarch64_linux_remove_hw_breakpoint)
5055 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
5056 (aarch64_linux_region_ok_for_hw_watchpoint)
5057 (aarch64_linux_stopped_data_address)
5058 (aarch64_linux_stopped_by_watchpoint)
5059 (aarch64_linux_watchpoint_addr_within_range)
5060 (aarch64_linux_can_do_single_step): Refactor as methods of
5061 aarch64_linux_nat_target.
5062 (super_post_startup_inferior): Delete.
5063 (_initialize_aarch64_linux_nat): Adjust to C++ification.
5064
5065 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
5066 (the_hppa_linux_nat_target): New.
5067 (hppa_linux_fetch_inferior_registers)
5068 (hppa_linux_store_inferior_registers): Refactor as methods of
5069 hppa_linux_nat_target.
5070 (_initialize_hppa_linux_nat): Adjust to C++ification.
5071
5072 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
5073 (the_ia64_linux_nat_target): New.
5074 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
5075 (ia64_linux_stopped_data_address)
5076 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
5077 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
5078 ia64_linux_nat_target methods.
5079 (super_xfer_partial): Delete.
5080 (_initialize_ia64_linux_nat): Adjust to C++ification.
5081
5082 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
5083 (the_m32r_linux_nat_target): New.
5084 (m32r_linux_fetch_inferior_registers)
5085 (m32r_linux_store_inferior_registers): Refactor as
5086 m32r_linux_nat_target methods.
5087 (_initialize_m32r_linux_nat): Adjust to C++ification.
5088
5089 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
5090 (the_m68k_linux_nat_target): New.
5091 (m68k_linux_fetch_inferior_registers)
5092 (m68k_linux_store_inferior_registers): Refactor as
5093 m68k_linux_nat_target methods.
5094 (_initialize_m68k_linux_nat): Adjust to C++ification.
5095
5096 * s390-linux-nat.c (s390_linux_nat_target): New class.
5097 (the_s390_linux_nat_target): New.
5098 (s390_linux_fetch_inferior_registers)
5099 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
5100 (s390_insert_watchpoint, s390_remove_watchpoint)
5101 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
5102 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
5103 (s390_auxv_parse, s390_read_description): Refactor as methods of
5104 s390_linux_nat_target.
5105 (_initialize_s390_nat): Adjust to C++ification.
5106
5107 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
5108 (the_sparc_linux_nat_target): New.
5109 (_initialize_sparc_linux_nat): Adjust to C++ification.
5110 * sparc-nat.c (sparc_fetch_inferior_registers)
5111 (sparc_store_inferior_registers): Remove target_ops parameter.
5112 * sparc-nat.h (sparc_fetch_inferior_registers)
5113 (sparc_store_inferior_registers): Remove target_ops parameter.
5114 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
5115 (the_sparc64_linux_nat_target): New.
5116 (_initialize_sparc64_linux_nat): Adjust to C++ification.
5117
5118 * spu-linux-nat.c (spu_linux_nat_target): New class.
5119 (the_spu_linux_nat_target): New.
5120 (spu_child_post_startup_inferior, spu_child_post_attach)
5121 (spu_child_wait, spu_fetch_inferior_registers)
5122 (spu_store_inferior_registers, spu_xfer_partial)
5123 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
5124 methods.
5125 (_initialize_spu_nat): Adjust to C++ification.
5126
5127 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
5128 (the_tilegx_linux_nat_target): New.
5129 (fetch_inferior_registers, store_inferior_registers):
5130 Refactor as methods.
5131 (_initialize_tile_linux_nat): Adjust to C++ification.
5132
5133 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
5134 (the_xtensa_linux_nat_target): New.
5135 (xtensa_linux_fetch_inferior_registers)
5136 (xtensa_linux_store_inferior_registers): Refactor as
5137 xtensa_linux_nat_target methods.
5138 (_initialize_xtensa_linux_nat): Adjust to C++ification.
5139
5140 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
5141 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
5142 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
5143 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
5144 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
5145 (fbsd_stopped_by_sw_breakpoint)
5146 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
5147 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
5148 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
5149 (fbsd_post_startup_inferior, fbsd_post_attach)
5150 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
5151 (fbsd_set_syscall_catchpoint)
5152 (super_xfer_partial, super_resume, super_wait)
5153 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
5154 (fbsd_handle_debug_trap): Remove target_ops parameter.
5155 (fbsd_nat_add_target): Delete.
5156 * fbsd-nat.h: Include "inf-ptrace.h".
5157 (fbsd_nat_add_target): Delete.
5158 (USE_SIGTRAP_SIGINFO): Define.
5159 (fbsd_nat_target): New class.
5160
5161 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
5162 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
5163 (amd64bsd_target): Delete.
5164 * amd64-bsd-nat.h: New file.
5165 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
5166 "x86-bsd-nat.h".
5167 (amd64_fbsd_nat_target): New class.
5168 (the_amd64_fbsd_nat_target): New.
5169 (amd64fbsd_read_description): Refactor as method of
5170 amd64_fbsd_nat_target.
5171 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
5172 (_initialize_amd64fbsd_nat): Adjust to C++ification.
5173 * amd64-nat.h (amd64bsd_target): Delete function declaration.
5174 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
5175 (i386bsd_store_inferior_registers): Remove target_ops parameter.
5176 (i386bsd_target): Delete.
5177 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
5178 (i386bsd_fetch_inferior_registers)
5179 (i386bsd_store_inferior_registers): Declare.
5180 (i386_bsd_nat_target): New class.
5181 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
5182 (the_i386_fbsd_nat_target): New.
5183 (i386fbsd_resume, i386fbsd_read_description): Refactor as
5184 i386_fbsd_nat_target methods.
5185 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
5186 (_initialize_i386fbsd_nat): Adjust to C++ification.
5187 * x86-bsd-nat.c (super_mourn_inferior): Delete.
5188 (x86bsd_mourn_inferior, x86bsd_target): Delete.
5189 (_initialize_x86_bsd_nat): Adjust to C++ification.
5190 * x86-bsd-nat.h: Include "x86-nat.h".
5191 (x86bsd_target): Delete declaration.
5192 (x86bsd_nat_target): New class.
5193
5194 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
5195 (the_aarch64_fbsd_nat_target): New.
5196 (aarch64_fbsd_fetch_inferior_registers)
5197 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
5198 aarch64_fbsd_nat_target.
5199 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
5200 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
5201 (the_alpha_bsd_nat_target): New.
5202 (alphabsd_fetch_inferior_registers)
5203 (alphabsd_store_inferior_registers): Refactor as
5204 alpha_bsd_nat_target methods.
5205 (_initialize_alphabsd_nat): Refactor as methods of
5206 alpha_bsd_nat_target.
5207 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
5208 (the_amd64_nbsd_nat_target): New.
5209 (_initialize_amd64nbsd_nat): Adjust to C++ification.
5210 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
5211 (the_amd64_obsd_nat_target): New.
5212 (_initialize_amd64obsd_nat): Adjust to C++ification.
5213 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
5214 (the_arm_fbsd_nat_target): New.
5215 (arm_fbsd_fetch_inferior_registers)
5216 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
5217 (_initialize_arm_fbsd_nat): Refactor as methods of
5218 arm_fbsd_nat_target.
5219 (_initialize_arm_fbsd_nat): Adjust to C++ification.
5220 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
5221 (the_arm_netbsd_nat_target): New.
5222 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
5223 arm_netbsd_nat_target.
5224 (_initialize_arm_netbsd_nat): Adjust to C++ification.
5225 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
5226 (the_hppa_nbsd_nat_target): New.
5227 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
5228 hppa_nbsd_nat_target methods.
5229 (_initialize_hppanbsd_nat): Adjust to C++ification.
5230 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
5231 (the_hppa_obsd_nat_target): New.
5232 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
5233 methods of hppa_obsd_nat_target.
5234 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
5235 add_target.
5236 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
5237 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
5238 add_target.
5239 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
5240 (_initialize_i386obsd_nat): Use add_target.
5241 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
5242 (the_m68k_bsd_nat_target): New.
5243 (m68kbsd_fetch_inferior_registers)
5244 (m68kbsd_store_inferior_registers): Refactor as methods of
5245 m68k_bsd_nat_target.
5246 (_initialize_m68kbsd_nat): Adjust to C++ification.
5247 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
5248 (the_mips_fbsd_nat_target): New.
5249 (mips_fbsd_fetch_inferior_registers)
5250 (mips_fbsd_store_inferior_registers): Refactor as methods of
5251 mips_fbsd_nat_target.
5252 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
5253 add_target.
5254 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
5255 (the_mips_nbsd_nat_target): New.
5256 (mipsnbsd_fetch_inferior_registers)
5257 (mipsnbsd_store_inferior_registers): Refactor as methods of
5258 mips_nbsd_nat_target.
5259 (_initialize_mipsnbsd_nat): Adjust to C++ification.
5260 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
5261 (the_mips64_obsd_nat_target): New.
5262 (mips64obsd_fetch_inferior_registers)
5263 (mips64obsd_store_inferior_registers): Refactor as methods of
5264 mips64_obsd_nat_target.
5265 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
5266 add_target.
5267 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
5268 nbsd_nat_target.
5269 * nbsd-nat.h: Include "inf-ptrace.h".
5270 (nbsd_nat_target): New class.
5271 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
5272 (obsd_wait): Refactor as methods of obsd_nat_target.
5273 (obsd_add_target): Delete.
5274 * obsd-nat.h: Include "inf-ptrace.h".
5275 (obsd_nat_target): New class.
5276 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
5277 (the_ppc_fbsd_nat_target): New.
5278 (ppcfbsd_fetch_inferior_registers)
5279 (ppcfbsd_store_inferior_registers): Refactor as methods of
5280 ppc_fbsd_nat_target.
5281 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
5282 add_target.
5283 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
5284 (the_ppc_nbsd_nat_target): New.
5285 (ppcnbsd_fetch_inferior_registers)
5286 (ppcnbsd_store_inferior_registers): Refactor as methods of
5287 ppc_nbsd_nat_target.
5288 (_initialize_ppcnbsd_nat): Adjust to C++ification.
5289 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
5290 (the_ppc_obsd_nat_target): New.
5291 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
5292 methods of ppc_obsd_nat_target.
5293 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
5294 add_target.
5295 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
5296 (the_sh_nbsd_nat_target): New.
5297 (shnbsd_fetch_inferior_registers)
5298 (shnbsd_store_inferior_registers): Refactor as methods of
5299 sh_nbsd_nat_target.
5300 (_initialize_shnbsd_nat): Adjust to C++ification.
5301 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
5302 (inf_ptrace_xfer_partial): Delete.
5303 (sparc_xfer_partial, sparc_target): Delete.
5304 * sparc-nat.h (sparc_fetch_inferior_registers)
5305 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
5306 (sparc_target): Delete function declaration.
5307 (sparc_target): New template class.
5308 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
5309 (_initialize_sparcnbsd_nat): Adjust to C++ification.
5310 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
5311 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
5312 add_target.
5313 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
5314 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
5315 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
5316 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
5317 add_target.
5318 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
5319 (the_vax_bsd_nat_target): New.
5320 (vaxbsd_fetch_inferior_registers)
5321 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
5322 methods.
5323 (_initialize_vaxbsd_nat): Adjust to C++ification.
5324
5325 * bsd-kvm.c (bsd_kvm_target): New class.
5326 (bsd_kvm_ops): Now a bsd_kvm_target.
5327 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
5328 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
5329 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
5330 bsd_kvm_target.
5331 (bsd_kvm_return_one): Delete.
5332 (bsd_kvm_add_target): Adjust to C++ification.
5333
5334 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
5335 (nto_procfs_target_procfs): New classes.
5336 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
5337 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
5338 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
5339 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
5340 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
5341 (procfs_remove_hw_breakpoint, procfs_resume)
5342 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
5343 (procfs_kill_inferior, procfs_store_registers)
5344 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
5345 as methods of nto_procfs_target.
5346 (nto_procfs_ops): Now an nto_procfs_target_procfs.
5347 (nto_native_ops): Delete.
5348 (procfs_open, procfs_native_open): Delete.
5349 (nto_native_ops): Now an nto_procfs_target_native.
5350 (init_procfs_targets): Adjust to C++ification.
5351 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
5352 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
5353 Refactor as methods of nto_procfs_target.
5354
5355 * go32-nat.c (go32_nat_target): New class.
5356 (the_go32_nat_target): New.
5357 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
5358 (go32_store_registers, go32_xfer_partial, go32_files_info)
5359 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
5360 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
5361 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
5362 (go32_pid_to_str): Refactor as methods of go32_nat_target.
5363 (go32_target): Delete.
5364 (_initialize_go32_nat): Adjust to C++ification.
5365
5366 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
5367 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
5368 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
5369 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
5370 gnu_nat_target.
5371 (gnu_target): Delete.
5372 * gnu-nat.h (gnu_target): Delete.
5373 (gnu_nat_target): New class.
5374 * i386-gnu-nat.c (gnu_base_target): New.
5375 (i386_gnu_nat_target): New class.
5376 (the_i386_gnu_nat_target): New.
5377 (_initialize_i386gnu_nat): Adjust to C++ification.
5378
5379 2018-05-02 Pedro Alves <palves@redhat.com>
5380
5381 * bfd-target.c (target_bfd_xclose): Rename to ...
5382 (target_bfd_close): ... this.
5383 (target_bfd_reopen): Adjust.
5384 * target.c (target_close): Remove references to to_xclose.
5385 * target.h (target_ops::to_xclose): Delete.
5386 (target_ops::to_close): Update comments.
5387
5388 2018-05-02 Pedro Alves <palves@redhat.com>
5389
5390 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
5391 "linux-nat.h".
5392 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
5393 * inf-ptrace.c (inf_ptrace_register_u_offset)
5394 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
5395 (inf_ptrace_store_register, inf_ptrace_store_registers)
5396 (inf_ptrace_trad_target): Move to ...
5397 * linux-nat-trad.c: ... this new file.
5398 * linux-nat-trad.h: New file.
5399 * linux-nat.c (linux_target_install_ops): Make extern.
5400 (linux_trad_target): Delete.
5401 * linux-nat.h (linux_trad_target): Delete declaration.
5402 (linux_target_install_ops): Declare.
5403 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
5404 "linux-nat.h".
5405
5406 2018-05-02 Pedro Alves <palves@redhat.com>
5407
5408 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
5409 procfs_target/add_target here.
5410 * procfs.c (procfs_target): Make static.
5411 (_initialize_procfs): Call add_target here.
5412 * procfs.h (struct target_ops): Remove forward declaration.
5413 (procfs_target): Remove declaration.
5414 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
5415
5416 2018-05-02 Pedro Alves <palves@redhat.com>
5417
5418 * procfs.c (procfs_stopped_by_watchpoint)
5419 (procfs_insert_watchpoint, procfs_remove_watchpoint)
5420 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
5421 Forward declare.
5422 (procfs_use_watchpoints): Delete, move contents...
5423 (procfs_target): ... here.
5424 * procfs.h (procfs_use_watchpoints): Delete declaration.
5425 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
5426 procfs_use_watchpoints.
5427 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
5428 procfs_use_watchpoints.
5429
5430 2018-05-02 Tom Tromey <tom@tromey.com>
5431
5432 PR python/20084:
5433 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
5434 and var_zuinteger_unlimited.
5435 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
5436 and PARAM_ZUINTEGER_UNLIMITED.
5437 (set_parameter_value): Handle var_zuinteger and
5438 var_zuinteger_unlimited.
5439 (add_setshow_generic): Likewise.
5440 (parmpy_init): Likewise.
5441
5442 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
5443
5444 PR rust/23124
5445 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
5446 pointer is not null before dereferencing it.
5447
5448 2018-04-30 Tom Tromey <tom@tromey.com>
5449
5450 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
5451 is_mi_like_p.
5452
5453 2018-04-30 Tom Tromey <tom@tromey.com>
5454
5455 * breakpoint.c (mention): Remove use of is_mi_like_p.
5456 (print_mention_ranged_breakpoint): Likewise.
5457 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
5458 of is_mi_like_p.
5459
5460 2018-04-30 Tom Tromey <tom@tromey.com>
5461
5462 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
5463
5464 2018-04-30 Tom Tromey <tom@tromey.com>
5465
5466 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
5467 (info_spu_event_command): Remove some uses of is_mi_like_p.
5468
5469 2018-04-30 Tom Tromey <tom@tromey.com>
5470
5471 * python/py-framefilter.c (py_print_single_arg)
5472 (enumerate_locals, py_print_args, py_print_frame): Remove some
5473 uses of is_mi_like_p.
5474
5475 2018-04-30 Tom Tromey <tom@tromey.com>
5476
5477 * ui-out.c: Update.
5478 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
5479 * ui-out.h (ui_out::is_mi_like_p): Now const.
5480 (ui_out::do_is_mi_like_p): Now const.
5481 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
5482
5483 2018-04-30 Tom Tromey <tom@tromey.com>
5484
5485 * varobj.c (varobj_set_visualizer): Use new_reference.
5486 * python/python.c (gdbpy_decode_line): Use new_reference.
5487 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
5488 new_reference.
5489
5490 2018-04-30 Tom Tromey <tom@tromey.com>
5491
5492 * varobj.c (install_new_value): Use new_reference.
5493 * value.h (value_incref): Return void. Swap intro comment with
5494 value_decref.
5495 * value.c (set_value_parent): Use new_reference.
5496 (value_incref): Return void. Update intro comment.
5497 (release_value): Use new_reference.
5498 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
5499
5500 2018-04-30 Tom Tromey <tom@tromey.com>
5501
5502 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
5503 * gdb_bfd.h (new_bfd_ref): Remove.
5504 (gdb_bfd_open): Update comment.
5505 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
5506 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
5507 (gdb_bfd_fdopenr): Use new_reference.
5508 * exec.c (exec_file_attach): Use new_reference.
5509
5510 2018-04-30 Tom Tromey <tom@tromey.com>
5511
5512 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
5513 method.
5514
5515 2018-04-30 Tom Tromey <tom@tromey.com>
5516
5517 * jit.c (jit_read_code_entry): Use type_align.
5518 * i386-tdep.c (i386_gdbarch_init): Don't call
5519 set_gdbarch_long_long_align_bit.
5520 * gdbarch.sh: Remove long_long_align_bit.
5521 * gdbarch.c, gdbarch.h: Rebuild.
5522 * arc-tdep.c (arc_type_align): New function.
5523 (arc_gdbarch_init): Use arc_type_align. Don't call
5524 set_gdbarch_long_long_align_bit.
5525
5526 2018-04-30 Tom Tromey <tom@tromey.com>
5527
5528 * rust-lang.c (rust_type_alignment): Remove.
5529 (rust_composite_type): Use type_align.
5530
5531 2018-04-30 Tom Tromey <tom@tromey.com>
5532
5533 * NEWS: Mention Type.align.
5534 * python/py-type.c (typy_get_alignof): New function.
5535 (type_object_getset): Add "alignof".
5536
5537 2018-04-30 Tom Tromey <tom@tromey.com>
5538
5539 PR exp/17095:
5540 * NEWS: Update.
5541 * std-operator.def (UNOP_ALIGNOF): New operator.
5542 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
5543 New.
5544 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
5545 * c-lang.c (c_op_print_tab): Add alignof.
5546 * c-exp.y (ALIGNOF): New token.
5547 (exp): Add "ALIGNOF" production.
5548 (ident_tokens): Add _Alignof and alignof.
5549
5550 2018-04-30 Tom Tromey <tom@tromey.com>
5551
5552 * i386-tdep.c (i386_type_align): New function.
5553 (i386_gdbarch_init): Update.
5554 * gdbarch.sh (type_align): New method.
5555 * gdbarch.c, gdbarch.h: Rebuild.
5556 * arch-utils.h (default_type_align): Declare.
5557 * arch-utils.c (default_type_align): New function.
5558 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
5559 (struct type) <align_log2>: New field.
5560 <instance_flags>: Now a bitfield.
5561 (TYPE_RAW_ALIGN): New macro.
5562 (type_align, type_raw_align, set_type_align): Declare.
5563 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
5564 functions.
5565 * dwarf2read.c (quirk_rust_enum): Set type alignment.
5566 (get_alignment, maybe_set_alignment): New functions.
5567 (read_structure_type, read_enumeration_type, read_array_type)
5568 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
5569 (read_subrange_type, read_base_type): Set type alignment.
5570
5571 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
5572
5573 * dwarf2read.c (read_index_from_section): Use bool.
5574
5575 2018-04-29 Fabian Groffen <grobian@gentoo.org>
5576
5577 PR gdb/22950
5578 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
5579 with #ifdef.
5580
5581 2018-04-29 John Reiser <jreiser@BitWagon.com>
5582
5583 PR build/22873
5584 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
5585 last step, and do it atomically.
5586
5587 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
5588
5589 * compile/compile-c-types.c (convert_int, convert_float):
5590 Update for C FE v1.
5591
5592 2018-04-27 Tom Tromey <tom@tromey.com>
5593
5594 PR rust/22545:
5595 * rust-lang.c (rust_inclusive_range_type_p): New function.
5596 (rust_range): Handle inclusive ranges.
5597 (rust_compute_range): Likewise.
5598 * rust-exp.y (struct rust_op) <inclusive>: New field.
5599 (DOTDOTEQ): New constant.
5600 (range_expr): Add "..=" productions.
5601 (operator_tokens): Add "..=" token.
5602 (ast_range): Add "inclusive" parameter.
5603 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
5604 ranges.
5605 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
5606 bounds values.
5607 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
5608 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
5609 Update comments.
5610 * expprint.c (print_subexp_standard): Handle new bounds values.
5611 (dump_subexp_body_standard): Likewise.
5612
5613 2018-04-27 Tom Tromey <tom@tromey.com>
5614
5615 * configure: Rebuild.
5616 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
5617 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
5618 "OVERRIDE".
5619 (class symbol_needs_eval_context): Likewise.
5620 * dwarf2read.c (mock_mapped_index::symbol_name_count)
5621 (mock_mapped_index::symbol_name_at): Use "override". Remove
5622 "virtual".
5623 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
5624 "override".
5625 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
5626 * aarch64-tdep.c (instruction_reader::read): Use "override".
5627 (instruction_reader_test::read): Likewise.
5628 * arm-tdep.c (instruction_reader::read): Use "override".
5629 (instruction_reader_thumb::read): Likewise.
5630
5631 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
5632
5633 PR remote/9665
5634 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
5635 instead of remote_send.
5636 (remote_send): Remove.
5637
5638 2018-04-26 Pedro Alves <palves@redhat.com>
5639
5640 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
5641 find_function_start_sal instead of find_pc_line.
5642
5643 2018-04-26 Pedro Alves <palves@redhat.com>
5644
5645 * breakpoint.c (set_breakpoint_location_function): Handle
5646 mst_data_gnu_ifunc.
5647 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
5648 * elfread.c (elf_symtab_read): Give data symbols with
5649 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
5650 (elf_rel_plt_read): Update comment.
5651 * linespec.c (convert_linespec_to_sals): Handle
5652 mst_data_gnu_ifunc.
5653 (minsym_found): Handle mst_data_gnu_ifunc.
5654 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
5655 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
5656 * parse.c (find_minsym_type_and_address): Handle
5657 mst_data_gnu_ifunc.
5658 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
5659 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
5660 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
5661 comment.
5662 <mst_data_gnu_ifunc>: New enumerator.
5663
5664 2018-04-26 Pedro Alves <palves@redhat.com>
5665
5666 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
5667 (lookup_minimal_symbol_by_pc_section): ... this. Replace
5668 'want_trampoline' parameter by a lookup_msym_prefer parameter.
5669 Handle it.
5670 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
5671 (lookup_minimal_symbol_by_pc): Adjust.
5672 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
5673 (lookup_solib_trampoline_symbol_by_pc): Adjust.
5674 * minsyms.h (lookup_msym_prefer): New enum.
5675 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
5676 parameter by a lookup_msym_prefer parameter.
5677
5678 2018-04-26 Pedro Alves <palves@redhat.com>
5679
5680 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
5681 ends in "@plt" instead of looking at the symbol's section.
5682
5683 2018-04-26 Pedro Alves <palves@redhat.com>
5684
5685 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
5686 all references.
5687 (find_pc_partial_function_gnu_ifunc): Rename to ...
5688 (find_pc_partial_function): ... this, and remove references to
5689 'is_gnu_ifunc_p'.
5690 (find_pc_partial_function): Delete old implementation.
5691 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
5692
5693 2018-04-26 Pedro Alves <palves@redhat.com>
5694
5695 * linespec.c (struct bound_minimal_symbol_search_key): New.
5696 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
5697 skip first line if we found a GNU ifunc minimal symbol by name.
5698 (compare_msymbols): Change parameters to work with a destructured
5699 lhs minsym.
5700 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
5701 functions.
5702
5703 2018-04-26 Pedro Alves <palves@redhat.com>
5704
5705 * breakpoint.c (set_breakpoint_location_function): Don't resolve
5706 ifunc targets here. Instead, if we have an ifunc minsym, use its
5707 address/name.
5708 (add_location_to_breakpoint): Store the minsym and the objfile in
5709 the breakpoint location.
5710 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
5711 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
5712 Record the minsym in the sal.
5713 * symtab.h (symtab_and_line) <msymbol>: New field.
5714
5715 2018-04-26 Pedro Alves <palves@redhat.com>
5716
5717 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
5718 unless we actually resolved the ifunc.
5719
5720 2018-04-26 Pedro Alves <palves@redhat.com>
5721
5722 * c-exp.y (variable production): Prefer ifunc minsyms over
5723 regular function symbols.
5724 * symtab.c (find_gnu_ifunc): New function.
5725 * minsyms.h (lookup_msym_prefer): New enum.
5726 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
5727 parameter by a lookup_msym_prefer parameter.
5728 * symtab.h (find_gnu_ifunc): New declaration.
5729
5730 2018-04-26 Pedro Alves <palves@redhat.com>
5731
5732 * blockframe.c (find_gnu_ifunc_target_type): New function.
5733 (find_function_type): New.
5734 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
5735 return a value with a memory address.
5736 (eval_call): For calls to GNU ifunc functions, try to find the
5737 type of the target function from the type that the resolver
5738 returns.
5739 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
5740 symbols.
5741 * infcall.c (find_function_return_type): Delete.
5742 (find_function_addr): Add 'function_type' parameter. For calls to
5743 GNU ifunc functions, try to find the type of the target function
5744 from the type that the resolver returns, and return it via
5745 FUNCTION_TYPE.
5746 (call_function_by_hand_dummy): Adjust to use the function type
5747 returned by find_function_addr.
5748 (find_function_addr): Add 'function_type' parameter and move
5749 description here.
5750 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
5751 declarations.
5752
5753 2018-04-26 Pedro Alves <palves@redhat.com>
5754
5755 * c-exp.y (variable production): Skip finding an alias for ifunc
5756 symbols.
5757
5758 2018-04-26 Pedro Alves <palves@redhat.com>
5759
5760 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
5761
5762 2018-04-25 Pedro Alves <palves@redhat.com>
5763
5764 * infcmd.c (kill_command): Print the pid as string, not the whole
5765 thread's ptid. Add comment. s/has been killed/killed/ in output
5766 message.
5767 * remote.c (remote_detach_1): Print the pid as string, not the
5768 whole thread's ptid.
5769
5770 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5771 Sergio Durigan Junior <sergiodj@redhat.com>
5772 Pedro Alves <palves@redhat.com>
5773
5774 * infcmd.c (kill_command): Print message when inferior has
5775 been killed.
5776 * inferior.c (print_inferior_events): Remove 'static'. Set as
5777 '1'.
5778 (add_inferior): Improve message printed when
5779 'print_inferior_events' is on.
5780 (exit_inferior): Remove message printed when
5781 'print_inferior_events' is on.
5782 (detach_inferior): Improve message printed when
5783 'print_inferior_events' is on.
5784 (initialize_inferiors): Use 'add_inferior_silent' to set
5785 'current_inferior_'.
5786 * inferior.h (print_inferior_events): Declare here as
5787 'extern'.
5788 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
5789 '[Detaching...]' messages when 'print_inferior_events' is on.
5790 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
5791 as prefix/suffix for messages. Remove periods. Fix erroneous
5792 'Detaching after fork from child...', replace it by '... from
5793 parent...'.
5794 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
5795 prefix/suffix when printing 'Detaching...' messages. Print
5796 them when 'print_inferior_events' is on.
5797 * remote.c (remote_detach_1): Print message when detaching
5798 from inferior and '!is_fork_parent'.
5799
5800 2018-04-24 Tom Tromey <tom@tromey.com>
5801
5802 * cli-out.h: Reindent.
5803
5804 2018-04-24 Tom Tromey <tom@tromey.com>
5805
5806 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
5807 (cli_ui_out::do_field_string): Use fputs_filtered.
5808 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
5809
5810 2018-04-23 Tom Tromey <tom@tromey.com>
5811
5812 * guile/scm-frame.c (gdbscm_frame_read_var): Use
5813 gdb::unique_xmalloc_ptr.
5814
5815 2018-04-23 Tom Tromey <tom@tromey.com>
5816
5817 * configure: Rebuild.
5818
5819 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
5820
5821 PR gdb/23095
5822 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
5823 prepare_for_testing. Set normal_bp to r_debug_state if target
5824 is bsd.
5825
5826 2018-04-21 Pedro Alves <palves@redhat.com>
5827 Rajendra SY <rajendra.sy@gmail.com>
5828
5829 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
5830 * remote.c (extended_remote_attach): In all-stop mode, mark the
5831 thread as executing.
5832
5833 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5834
5835 * thread.c (thread_apply_all_command): Fix comment.
5836 (thread_command): Fix comment.
5837
5838 2018-04-10 Alan Hayward <alan.hayward@arm.com>
5839
5840 * common/tdesc.h (tdesc_create_feature): Remove xml filename
5841 parameter.
5842 * features/aarch64-core.c (create_feature_aarch64_core):
5843 Regenerate.
5844 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
5845 Likewise.
5846 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
5847 Likewise.
5848 * features/i386/32bit-avx512.c
5849 (create_feature_i386_32bit_avx512): Likewise.
5850 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
5851 Likewise.
5852 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
5853 Likewise.
5854 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
5855 Likewise.
5856 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
5857 Likewise.
5858 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
5859 Likewise.
5860 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
5861 Likewise.
5862 * features/i386/64bit-avx512.c
5863 (create_feature_i386_64bit_avx512): Likewise.
5864 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
5865 Likewise.
5866 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
5867 Likewise.
5868 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
5869 Likewise.
5870 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
5871 Likewise.
5872 * features/i386/64bit-segments.c
5873 (create_feature_i386_64bit_segments): Likewise.
5874 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
5875 Likewise.
5876 * features/i386/x32-core.c
5877 (create_feature_i386_x32_core): Likewise.
5878 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
5879 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
5880 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
5881 * target-descriptions.c: In generated code, don't pass xml
5882 filename.
5883
5884 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5885
5886 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
5887 (print_xml_feature::visit_post): Likewise.
5888 (print_xml_feature::visit): Likewise.
5889 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
5890 (print_xml_feature): Add new class.
5891 * regformats/regdat.sh: Null xmltarget on feature targets.
5892 * target-descriptions.c (struct target_desc): Add xmltarget.
5893 (maintenance_check_tdesc_xml_convert): Add unittest function.
5894 (tdesc_get_features_xml): Add function to get xml.
5895 (maintenance_check_xml_descriptions): Test xml generation.
5896 * xml-tdesc.c (string_read_description_xml): Add function.
5897 * xml-tdesc.h (string_read_description_xml): Add declaration.
5898
5899 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5900
5901 * features/Makefile: Add feature marker to targets with new style
5902 target descriptions.
5903 * regformats/aarch64.dat: Regenerate.
5904 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
5905 * regformats/i386/amd64-avx-linux.dat: Likewise.
5906 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
5907 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
5908 * regformats/i386/amd64-linux.dat: Likewise.
5909 * regformats/i386/amd64-mpx-linux.dat: Likewise.
5910 * regformats/i386/amd64.dat: Likewise.
5911 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
5912 * regformats/i386/i386-avx-linux.dat: Likewise.
5913 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
5914 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
5915 * regformats/i386/i386-linux.dat: Likewise.
5916 * regformats/i386/i386-mmx-linux.dat: Likewise.
5917 * regformats/i386/i386-mpx-linux.dat: Likewise.
5918 * regformats/i386/i386.dat: Likewise.
5919 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
5920 * regformats/i386/x32-avx-linux.dat: Likewise.
5921 * regformats/i386/x32-linux.dat: Likewise.
5922 * regformats/tic6x-c62x-linux.dat: Likewise.
5923 * regformats/tic6x-c64x-linux.dat: Likewise.
5924 * regformats/tic6x-c64xp-linux.dat: Likewise.
5925 * regformats/regdat.sh: Parse feature marker.
5926
5927 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5928
5929 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
5930 (tdesc_osabi_name): Likewise.
5931 * target-descriptions.c (tdesc_architecture_name): Add new
5932 function.
5933 (tdesc_osabi_name): Likewise.
5934
5935 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5936
5937 * common/tdesc.c (tdesc_predefined_type): Move to here.
5938 (tdesc_named_type): Likewise.
5939 (tdesc_create_vector): Likewise.
5940 (tdesc_create_struct): Likewise.
5941 (tdesc_set_struct_size): Likewise.
5942 (tdesc_create_union): Likewise.
5943 (tdesc_create_flags): Likewise.
5944 (tdesc_create_enum): Likewise.
5945 (tdesc_add_field): Likewise.
5946 (tdesc_add_typed_bitfield): Likewise.
5947 (tdesc_add_bitfield): Likewise.
5948 (tdesc_add_flag): Likewise.
5949 (tdesc_add_enum_value): Likewise.
5950 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
5951 (struct tdesc_type_vector): Likewise.
5952 (struct tdesc_type_field): Likewise.
5953 (struct tdesc_type_with_fields): Likewise.
5954 (tdesc_create_enum): Add declaration.
5955 (tdesc_add_typed_bitfield): Likewise.
5956 (tdesc_add_enum_value): Likewise.
5957 * target-descriptions.c (tdesc_type_field): Move from here.
5958 (tdesc_type_builtin): Likewise.
5959 (tdesc_type_vector): Likewise.
5960 (tdesc_type_with_fields): Likewise.
5961 (tdesc_predefined_types): Likewise.
5962 (tdesc_named_type): Likewise.
5963 (tdesc_create_vector): Likewise.
5964 (tdesc_create_struct): Likewise.
5965 (tdesc_set_struct_size): Likewise.
5966 (tdesc_create_union): Likewise.
5967 (tdesc_create_flags): Likewise.
5968 (tdesc_create_enum): Likewise.
5969 (tdesc_add_field): Likewise.
5970 (tdesc_add_typed_bitfield): Likewise.
5971 (tdesc_add_bitfield): Likewise.
5972 (tdesc_add_flag): Likewise.
5973 (tdesc_add_enum_value): Likewise.
5974 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
5975 (tdesc_add_typed_bitfield): Likewise.
5976 (tdesc_add_enum_value): Likewise.
5977
5978 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5979
5980 * common/tdesc.c (tdesc_feature::accept): Move to here.
5981 (tdesc_feature::operator==): Likewise.
5982 (tdesc_create_reg): Likewise.
5983 * common/tdesc.h (tdesc_type_kind): Likewise.
5984 (struct tdesc_type): Likewise.
5985 (struct tdesc_feature): Likewise.
5986 * regformats/regdat.sh: Create a feature.
5987 * target-descriptions.c (tdesc_type_kind): Move from here.
5988 (tdesc_type): Likewise.
5989 (tdesc_type_up): Likewise.
5990 (tdesc_feature): Likewise.
5991 (tdesc_create_reg): Likewise.
5992
5993 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5994
5995 * Makefile.in: Add arch/tdesc.c
5996 * common/tdesc.c: New file.
5997 * common/tdesc.h (tdesc_element_visitor): Move to here.
5998 (tdesc_element): Likewise.
5999 (tdesc_reg): Likewise.
6000 (tdesc_reg_up): Likewise.
6001 * regformats/regdef.h (reg): Add offset to constructors.
6002 * target-descriptions.c (tdesc_element_visitor): Move from here.
6003 (tdesc_element): Likewise.
6004 (tdesc_reg): Likewise.
6005 (tdesc_reg_up): Likewise.
6006
6007 2018-04-17 Tom Tromey <tom@tromey.com>
6008
6009 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
6010 discriminant field.
6011
6012 2018-04-17 Tom Tromey <tom@tromey.com>
6013
6014 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
6015
6016 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
6017
6018 * symtab.c (print_symbol_info): Skip printing filename and line
6019 number when `last' is NULL.
6020 (symtab_symbol_info): Use empty string instead of NULL for first
6021 invocation of print_symbol_info.
6022 (rbreak_command): Pass NULL to `last' parameter of
6023 print_symbol_info.
6024
6025 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
6026
6027 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
6028 instead of nullptr.
6029
6030 2018-04-16 Pedro Alves <palves@redhat.com>
6031
6032 * MAINTAINERS (sh): Remove.
6033 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
6034 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
6035 (ALLDEPFILES): Remove sh64-tdep.c.
6036 * NEWS: Mentions that support for SH-5/SH64 is removed.
6037 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
6038 (sh*-*-openbsd*): Ditto.
6039 (sh64-*-elf*): Remove.
6040 (sh*): Remove.
6041 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
6042 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
6043 * sh-tdep.c: No longer include "sh64-tdep.h".
6044 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
6045 * sh64-tdep.c, sh64-tdep.h: Remove files.
6046
6047 2018-04-16 Pedro Alves <palves@redhat.com>
6048
6049 * MAINTAINERS: Remove m88k.
6050 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
6051 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
6052 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
6053 * NEWS: Mention that support for m88k was removed.
6054 * configure.host (m88*-*-*): Remove support.
6055 * configure.nat (m88k-*-*): Remove support.
6056 * configure.tgt (m88*-*-openbsd*): Remove.
6057 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
6058
6059 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
6060
6061 * configure.tgt (x86_tobjs): New variable.
6062 (amd64_tobjs, i386_tobjs): Use it.
6063
6064 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6065
6066 * symtab.c (print_symbol_info): Precede the symbol definition by
6067 the line number when available.
6068 * NEWS: Advertise this enhancement.
6069
6070 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6071
6072 * NEWS (New options): announce set/show record btrace cpu.
6073 * btrace.c: Include record-btrace.h.
6074 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
6075 the vendor is unknown.
6076 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
6077 Maybe overwrite the btrace configuration's cpu.
6078 (btrace_compute_ftrace): Add cpu parameter. Update callers.
6079 (btrace_fetch): Add cpu parameter. Update callers.
6080 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
6081 Maybe overwrite the btrace configuration's cpu. Skip enabling
6082 errata workarounds if the vendor is unknown.
6083 * python/py-record-btrace.c: Include record-btrace.h.
6084 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
6085 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
6086 * record-btrace.c (record_btrace_cpu_state_kind): New.
6087 (record_btrace_cpu): New.
6088 (set_record_btrace_cpu_cmdlist): New.
6089 (record_btrace_get_cpu): New.
6090 (require_btrace_thread, record_btrace_info)
6091 (record_btrace_resume_thread): Call record_btrace_get_cpu.
6092 (cmd_set_record_btrace_cpu_none): New.
6093 (cmd_set_record_btrace_cpu_auto): New.
6094 (cmd_set_record_btrace_cpu): New.
6095 (cmd_show_record_btrace_cpu): New.
6096 (_initialize_record_btrace): Initialize set/show record btrace cpu
6097 commands.
6098 * record-btrace.h (record_btrace_get_cpu): New.
6099
6100 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6101
6102 * record.c (set_record_command): Fix typo in message.
6103
6104 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6105
6106 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
6107
6108 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6109
6110 * infrun.c (process_event_stop_test): Call
6111 gdbarch_in_indirect_branch_thunk.
6112 * gdbarch.sh (in_indirect_branch_thunk): New.
6113 * gdbarch.c: Regenerated.
6114 * gdbarch.h: Regenerated.
6115 * x86-tdep.h: New.
6116 * x86-tdep.c: New.
6117 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
6118 (HFILES_NO_SRCDIR): Add x86-tdep.h.
6119 (ALLDEPFILES): Add x86-tdep.c.
6120 * arch-utils.h (default_in_indirect_branch_thunk): New.
6121 * arch-utils.c (default_in_indirect_branch_thunk): New.
6122 * i386-tdep: Include x86-tdep.h.
6123 (i386_in_indirect_branch_thunk): New.
6124 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
6125 function.
6126 * amd64-tdep: Include x86-tdep.h.
6127 (amd64_in_indirect_branch_thunk): New.
6128 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
6129
6130 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
6131
6132 PR gdb/23053
6133 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
6134 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
6135 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
6136 regression.
6137
6138 2018-04-12 Tom Tromey <tom@tromey.com>
6139
6140 * rust-lang.c (rust_print_struct_def): Remove univariant code.
6141 (rust_evaluate_subexp): Likewise.
6142
6143 2018-04-12 Pedro Alves <palves@redhat.com>
6144
6145 * procfs.c (procfs_detach): Make forward declaration's prototype
6146 match definition's protototype.
6147 (proc_get_LDT_entry): Remove stale do_cleanups call.
6148
6149 2018-04-12 Pedro Alves <palves@redhat.com>
6150
6151 * target.h (target_ops::to_has_exited): Delete.
6152 (target_has_exited): Delete.
6153 * target-delegates.c: Regenerate.
6154
6155 2018-04-11 Pedro Alves <palves@redhat.com>
6156
6157 * target.c (fileio_fh_t::t): Add comment.
6158 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
6159 (target_fileio_close): Handle a NULL target.
6160 (invalidate_fileio_fh): New.
6161 (target_close): Call it.
6162 * remote.c (remote_hostio_send_command): No longer check whether
6163 remote_desc is open.
6164
6165 2018-04-11 Pedro Alves <palves@redhat.com>
6166
6167 * target.c (fileio_fh_t): Make it a named struct instead of a
6168 typedef.
6169 (fileio_fh_t::is_closed): New method.
6170 (DEF_VEC_O (fileio_fh_t)): Remove.
6171 (fileio_fhandles): Now a std::vector.
6172 (is_closed_fileio_fh): Delete.
6173 (acquire_fileio_fd): Adjust. Rename parameters.
6174 (release_fileio_fd): Adjust.
6175 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
6176 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
6177 (target_fileio_close): Adjust.
6178
6179 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
6180
6181 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
6182 index.
6183
6184 2018-04-10 Pedro Alves <palves@redhat.com>
6185
6186 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
6187 (scoped_finish_thread_state): New class.
6188 * infcmd.c (run_command_1): Use it instead of finish_thread_state
6189 cleanup.
6190 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
6191 (fetch_inferior_event, normal_stop): Likewise.
6192 * thread.c (finish_thread_state_cleanup): Delete.
6193
6194 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6195 Pedro Alves <palves@redhat.com>
6196
6197 * value.c: Include "selftest.h" and "common/array-view.h".
6198 (struct range) <operator ==>: New.
6199 (test_ranges_contain): New.
6200 (check_ranges_vector): New.
6201 (test_insert_into_bit_range_vector): New.
6202 (_initialize_values): Register selftests.
6203 * common/array-view.h (operator==, operator!=): New.
6204
6205 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6206
6207 * common/gdb_vecs.h (unordered_remove): Add overload that takes
6208 an iterator.
6209 * inline-frame.c: Include <algorithm>.
6210 (struct inline_state): Add constructor.
6211 (inline_state_s): Remove.
6212 (DEF_VEC_O(inline_state_s)): Remove.
6213 (inline_states): Change type to std::vector.
6214 (find_inline_frame_state): Adjust to std::vector.
6215 (allocate_inline_frame_state): Remove.
6216 (clear_inline_frame_state): Adjust to std::vector.
6217 (skip_inline_frames): Adjust to std::vector.
6218
6219 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6220
6221 * tracepoint.h (struct trace_state_variable): Add constructor.
6222 <name>: Change type to std::string.
6223 * tracepoint.c (tsv_s): Remove.
6224 (DEF_VEC_O(tsv_s)): Remove.
6225 (tvariables): Change to std::vector.
6226 (create_trace_state_variable): Adjust to std::vector.
6227 (find_trace_state_variable): Likewise.
6228 (find_trace_state_variable_by_number): Likewise.
6229 (delete_trace_state_variable): Likewise.
6230 (trace_variable_command): Adjust to std::string.
6231 (delete_trace_variable_command): Likewise.
6232 (tvariables_info_1): Adjust to std::vector.
6233 (save_trace_state_variables): Likewise.
6234 (start_tracing): Likewise.
6235 (merge_uploaded_trace_state_variables): Adjust to std::vector
6236 and std::string.
6237 * target.h (struct target_ops)
6238 <to_download_trace_state_variable>: Pass reference to
6239 trace_state_variable.
6240 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
6241 * target-delegates.c: Re-generate.
6242 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
6243 (mi_tsv_deleted): Likewise.
6244 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
6245 * remote.c (remote_download_trace_state_variable): Change
6246 pointer to reference and adjust.
6247 * make-target-delegates (parse_argtypes): Handle references.
6248 (write_function_header): Likewise.
6249 (munge_type): Likewise.
6250
6251 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6252
6253 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6254 string_view-selftests.c.
6255 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
6256 testsuite.
6257 * unittests/basic_string_view/cons/char/1.cc: Likewise.
6258 * unittests/basic_string_view/cons/char/2.cc: Likewise.
6259 * unittests/basic_string_view/cons/char/3.cc: Likewise.
6260 * unittests/basic_string_view/element_access/char/1.cc:
6261 Likewise.
6262 * unittests/basic_string_view/element_access/char/empty.cc:
6263 Likewise.
6264 * unittests/basic_string_view/element_access/char/front_back.cc:
6265 Likewise.
6266 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
6267 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
6268 Likewise.
6269 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
6270 Likewise.
6271 * unittests/basic_string_view/modifiers/swap/char/1.cc:
6272 Likewise.
6273 * unittests/basic_string_view/operations/compare/char/1.cc:
6274 Likewise.
6275 * unittests/basic_string_view/operations/compare/char/13650.cc:
6276 Likewise.
6277 * unittests/basic_string_view/operations/copy/char/1.cc:
6278 Likewise.
6279 * unittests/basic_string_view/operations/data/char/1.cc:
6280 Likewise.
6281 * unittests/basic_string_view/operations/find/char/1.cc:
6282 Likewise.
6283 * unittests/basic_string_view/operations/find/char/2.cc:
6284 Likewise.
6285 * unittests/basic_string_view/operations/find/char/3.cc:
6286 Likewise.
6287 * unittests/basic_string_view/operations/find/char/4.cc:
6288 Likewise.
6289 * unittests/basic_string_view/operations/rfind/char/1.cc:
6290 Likewise.
6291 * unittests/basic_string_view/operations/rfind/char/2.cc:
6292 Likewise.
6293 * unittests/basic_string_view/operations/rfind/char/3.cc:
6294 Likewise.
6295 * unittests/basic_string_view/operations/substr/char/1.cc:
6296 Likewise.
6297 * unittests/basic_string_view/operators/char/2.cc: Likewise.
6298 * unittests/string_view-selftests.c: New file.
6299
6300 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6301
6302 * unittests/basic_string_view/capacity/1.cc: New file.
6303 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
6304 * unittests/basic_string_view/cons/char/1.cc: New file.
6305 * unittests/basic_string_view/cons/char/2.cc: New file.
6306 * unittests/basic_string_view/cons/char/3.cc: New file.
6307 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
6308 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
6309 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
6310 * unittests/basic_string_view/element_access/char/1.cc: New file.
6311 * unittests/basic_string_view/element_access/char/2.cc: New file.
6312 * unittests/basic_string_view/element_access/char/empty.cc: New file.
6313 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
6314 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
6315 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
6316 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
6317 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
6318 * unittests/basic_string_view/include.cc: New file.
6319 * unittests/basic_string_view/inserters/char/1.cc: New file.
6320 * unittests/basic_string_view/inserters/char/2.cc: New file.
6321 * unittests/basic_string_view/inserters/char/3.cc: New file.
6322 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
6323 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
6324 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
6325 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
6326 * unittests/basic_string_view/literals/types.cc: New file.
6327 * unittests/basic_string_view/literals/values.cc: New file.
6328 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
6329 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
6330 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
6331 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
6332 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
6333 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
6334 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
6335 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
6336 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
6337 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
6338 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
6339 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
6340 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
6341 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
6342 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
6343 * unittests/basic_string_view/operations/data/char/1.cc: New file.
6344 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
6345 * unittests/basic_string_view/operations/find/char/1.cc: New file.
6346 * unittests/basic_string_view/operations/find/char/2.cc: New file.
6347 * unittests/basic_string_view/operations/find/char/3.cc: New file.
6348 * unittests/basic_string_view/operations/find/char/4.cc: New file.
6349 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
6350 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
6351 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
6352 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
6353 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
6354 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
6355 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
6356 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
6357 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
6358 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
6359 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
6360 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
6361 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
6362 * unittests/basic_string_view/operators/char/2.cc: New file.
6363 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
6364 * unittests/basic_string_view/range_access/char/1.cc: New file.
6365 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
6366 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
6367 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
6368 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
6369 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
6370 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
6371 * unittests/basic_string_view/requirements/typedefs.cc: New file.
6372 * unittests/basic_string_view/typedefs.cc: New file.
6373 * unittests/basic_string_view/types/1.cc: New file.
6374
6375 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6376
6377 * common/gdb_string_view.h: Remove libstdc++ implementation
6378 details, adjust to gdb reality.
6379 * common/gdb_string_view.tcc: Likewise.
6380 * cli/cli-script.c (struct string_view): Remove.
6381 (user_args) <m_args>: Change element type to gdb::string_view.
6382 (user_args::insert_args): Adjust.
6383
6384 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6385
6386 * common/gdb_string_view.h: New file.
6387 * common/gdb_string_view.tcc: New file.
6388
6389 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6390
6391 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
6392 * configure: Re-generate.
6393
6394 2018-04-09 Pedro Alves <palves@redhat.com>
6395
6396 * gdbarch.sh: Include "observable.h" instead of "observer.h".
6397 (set_target_gdbarch): Call
6398 gdb::observers::architecture_changed.notify instead of
6399 observer_notify_architecture_changed.
6400
6401 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6402
6403 * tracepoint.c (struct current_traceframe_cleanup): Remove.
6404 (do_restore_current_traceframe_cleanup): Remove.
6405 (restore_current_traceframe_cleanup_dtor): Remove.
6406 (make_cleanup_restore_current_traceframe): Remove.
6407 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
6408 New.
6409 * tracepoint.h (struct scoped_restore_current_traceframe): New.
6410 * infrun.c (fetch_inferior_event): Use
6411 scoped_restore_current_traceframe.
6412
6413 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6414
6415 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
6416 Remove.
6417 <n_allocated_type_units>: Remove.
6418 <all_type_units>: Change to std::vector.
6419 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
6420 to std::vector change.
6421 (dwarf2_per_objfile::get_cutu): Likewise.
6422 (dwarf2_per_objfile::get_tu): Likewise.
6423 (create_signatured_type_table_from_index): Likewise.
6424 (create_signatured_type_table_from_debug_names): Likewise.
6425 (dw2_symtab_iter_next): Likewise.
6426 (dw2_print_stats): Likewise.
6427 (dw2_expand_all_symtabs): Likewise.
6428 (dw2_expand_marked_cus): Likewise.
6429 (dw2_debug_names_iterator::next): Likewise.
6430 (dwarf2_initialize_objfile): Likewise.
6431 (add_signatured_type_cu_to_table): Likewise.
6432 (create_all_type_units): Likewise.
6433 (add_type_unit): Likewise.
6434 (struct tu_abbrev_offset): Add constructor.
6435 (build_type_psymtabs_1): Adjust to std::vector change.
6436 (print_tu_stats): Likewise.
6437 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
6438 (write_debug_names): Likewise.
6439
6440 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6441
6442 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
6443 Make an std::vector.
6444 <n_comp_units>: Remove.
6445 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
6446 to std::vector change.
6447 (dwarf2_per_objfile::get_cutu): Likewise.
6448 (dwarf2_per_objfile::get_cu): Likewise.
6449 (create_cus_from_index): Likewise.
6450 (create_addrmap_from_index): Likewise.
6451 (create_addrmap_from_aranges): Likewise.
6452 (dwarf2_read_index): Likewise.
6453 (dw2_find_last_source_symtab): Likewise.
6454 (dw2_map_symtabs_matching_filename): Likewise.
6455 (dw2_symtab_iter_next): Likewise.
6456 (dw2_print_stats): Likewise.
6457 (dw2_expand_all_symtabs): Likewise.
6458 (dw2_expand_symtabs_with_fullname): Likewise.
6459 (dw2_expand_marked_cus): Likewise.
6460 (dw2_map_symbol_filenames): Likewise.
6461 (create_cus_from_debug_names): Likewise.
6462 (dwarf2_read_debug_names): Likewise.
6463 (dw2_debug_names_iterator::next): Likewise.
6464 (dwarf2_initialize_objfile): Likewise.
6465 (set_partial_user): Likewise.
6466 (dwarf2_build_psymtabs_hard): Likewise.
6467 (read_comp_units_from_section): Remove arguments, adjust to
6468 std::vector change.
6469 (create_all_comp_units): Adjust to std::vector and
6470 read_comp_units_from_section changes.
6471 (dwarf2_find_containing_comp_unit): Adjust to std::vector
6472 change.
6473 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
6474 (psyms_seen_size): Likewise.
6475 (write_gdbindex): Likewise.
6476 (write_debug_names): Likewise.
6477
6478 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6479
6480 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
6481 with dwarf2_per_objfile.
6482 (create_cus_from_index): Likewise.
6483 (create_signatured_type_table_from_index): Likewise.
6484 (dwarf2_read_index): Likewise.
6485 (dwarf2_initialize_objfile): Likewise.
6486 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
6487 per_cu rather than get_dwarf2_per_objfile.
6488
6489 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6490
6491 * dwarf2read.h (struct signatured_type): Forward declare.
6492 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
6493 New methods.
6494 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
6495 (dw2_get_cutu): ...this.
6496 (dwarf2_per_objfile::get_cu): Rename from...
6497 (dw2_get_cu): ...this.
6498 (dwarf2_per_objfile::get_tu): New.
6499 (create_addrmap_from_index): Adjust.
6500 (create_addrmap_from_aranges): Adjust.
6501 (dw2_find_last_source_symtab): Adjust.
6502 (dw2_map_symtabs_matching_filename): Adjust.
6503 (dw2_symtab_iter_next): Adjust.
6504 (dw2_print_stats): Adjust.
6505 (dw2_expand_all_symtabs): Adjust.
6506 (dw2_expand_symtabs_with_fullname): Adjust.
6507 (dw2_expand_marked_cus): Adjust.
6508 (dw_expand_symtabs_matching_file_matcher): Adjust.
6509 (dw2_map_symbol_filenames): Adjust.
6510 (dw2_debug_names_iterator::next): Adjust.
6511 (dwarf2_initialize_objfile): Adjust.
6512 (set_partial_user): Adjust.
6513 (dwarf2_build_psymtabs_hard): Adjust.
6514
6515 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6516
6517 * dwarf2read.c (create_signatured_type_table_from_debug_names):
6518 Remove unused variables.
6519 (dw2_map_symtabs_matching_filename): Likewise.
6520 (dwarf2_record_block_ranges): Likewise.
6521 (dwarf2_read_addr_index): Likewise.
6522 (follow_die_offset): Likewise.
6523
6524 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6525
6526 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
6527 to symbol_file_add_main.
6528
6529 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6530
6531 PR mi/22299
6532 * mi/mi-console.c (do_fputc_async_safe): New.
6533 (mi_console_file::write_async_safe): New.
6534 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
6535 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
6536 New.
6537 * ui-file.c (ui_file::putstrn): Adjust call to
6538 fputstrn_unfiltered.
6539 * utils.c (printchar): Replace do_fputs and do_fprintf
6540 parameters by do_fputc.
6541 (fputstr_filtered): Adjust call to printchar.
6542 (fputstr_unfiltered): Likewise.
6543 (fputstrn_filtered): Likewise.
6544 (fputstrn_unfiltered): Add do_fputc parameter, pass to
6545 printchar.
6546 * utils.h (do_fputc_ftype): New typedef.
6547 (fputstrn_unfiltered): Add do_fputc parameter.
6548
6549 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6550
6551 * regformats/i386/i386-avx.dat: Remove.
6552
6553 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6554
6555 PR gdb/22979
6556 * amd64-tdep.c (amd64_none_init_abi): New function.
6557 (amd64_x32_none_init_abi): New function.
6558 (_initialize_amd64_tdep): Register handlers for x86-64 and
6559 x64_32 with GDB_OSABI_NONE.
6560 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
6561 GDB_OSABI_NONE osabi.
6562
6563 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6564
6565 PR gdb/22980
6566 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
6567 GDB_OSABI_NONE.
6568 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
6569 * osabi.c (gdb_osabi_names): Add "unknown" entry.
6570
6571 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6572
6573 * common/byte-vector.h (char_vector): New type.
6574 * target.h (target_read_alloc): Return
6575 gdb::optional<byte_vector>.
6576 (target_read_stralloc): Return gdb::optional<char_vector>.
6577 (target_get_osdata): Return gdb::optional<char_vector>.
6578 * target.c (target_read_alloc_1): Templatize. Replacement
6579 manual memory management with vector.
6580 (target_read_alloc): Change return type, adjust.
6581 (target_read_stralloc): Change return type, adjust.
6582 (target_get_osdata): Change return type, adjust.
6583 * auxv.c (struct auxv_info) <length>: Remove.
6584 <data>: Change type to gdb::optional<byte_vector>.
6585 (auxv_inferior_data_cleanup): Free auxv_info with delete.
6586 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
6587 (target_auxv_search): Adjust.
6588 (fprint_target_auxv): Adjust.
6589 * avr-tdep.c (avr_io_reg_read_command): Adjust.
6590 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
6591 (linux_make_corefile_notes): Adjust.
6592 * osdata.c (get_osdata): Adjust.
6593 * remote.c (remote_get_threads_with_qxfer): Adjust.
6594 (remote_memory_map): Adjust.
6595 (remote_traceframe_info): Adjust.
6596 (btrace_read_config): Adjust.
6597 (remote_read_btrace): Adjust.
6598 (remote_pid_to_exec_file): Adjust.
6599 * solib-aix.c (solib_aix_get_library_list): Adjust.
6600 * solib-dsbt.c (decode_loadmap): Don't free buf.
6601 (dsbt_get_initial_loadmaps): Adjust.
6602 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
6603 * solib-target.c (solib_target_current_sos): Adjust.
6604 * tracepoint.c (sdata_make_value): Adjust.
6605 * xml-support.c (xinclude_start_include): Adjust.
6606 (xml_fetch_content_from_file): Adjust.
6607 * xml-support.h (xml_fetch_another): Change return type.
6608 (xml_fetch_content_from_file): Change return type.
6609 * xml-syscall.c (xml_init_syscalls_info): Adjust.
6610 * xml-tdesc.c (file_read_description_xml): Adjust.
6611 (fetch_available_features_from_target): Change return type.
6612 (target_fetch_description_xml): Adjust.
6613 (target_read_description_xml): Adjust.
6614
6615 2018-04-06 Tom Tromey <tom@tromey.com>
6616
6617 * value.c (~value): Update.
6618 (struct value) <contents>: Now unique_xmalloc_ptr.
6619 (value_contents_bits_eq, allocate_value_contents)
6620 (value_contents_raw, value_contents_all_raw)
6621 (value_contents_for_printing, value_contents_for_printing_const)
6622 (set_value_enclosing_type): Update.
6623
6624 2018-04-06 Tom Tromey <tom@tromey.com>
6625
6626 * value.c (range_s): Remove typedef, VEC.
6627 (struct range): Add operator<.
6628 (range_lessthan): Remove.
6629 (ranges_contain): Change type.
6630 (~value): Update.
6631 (struct value) <unavailable, optimized_out>: Now std::vector.
6632 (value_entirely_available)
6633 (value_entirely_covered_by_range_vector)
6634 (value_entirely_unavailable, value_entirely_optimized_out):
6635 Update.
6636 (insert_into_bit_range_vector): Change argument type.
6637 (find_first_range_overlap): Likewise.
6638 (struct ranges_and_idx, value_contents_bits_eq)
6639 (require_not_optimized_out, require_available): Update.
6640 (ranges_copy_adjusted): Change argument types.
6641 (value_optimized_out, value_copy, value_fetch_lazy): Update.
6642
6643 2018-04-06 Tom Tromey <tom@tromey.com>
6644
6645 * value.c (~value): Update.
6646 (struct value) <parent>: Now a value_ref_ptr.
6647 (value_parent, set_value_parent, value_address, value_copy):
6648 Update.
6649
6650 2018-04-06 Tom Tromey <tom@tromey.com>
6651
6652 * value.c (struct value): Add constructor, destructor, and member
6653 initializers.
6654 (allocate_value_lazy, value_decref): Update.
6655
6656 2018-04-06 Tom Tromey <tom@tromey.com>
6657
6658 * value.c (struct value) <released, next>: Remove.
6659 (all_values): Now a std::vector.
6660 (allocate_value_lazy): Update.
6661 (value_next): Remove.
6662 (value_mark, value_free_to_mark, release_value)
6663 (value_release_to_mark): Update.
6664
6665 2018-04-06 Tom Tromey <tom@tromey.com>
6666
6667 * value.h (fetch_subexp_value, value_release_to_mark): Update.
6668 (free_value_chain): Remove.
6669 * value.c (free_value_chain): Remove.
6670 (value_release_to_mark): Return a std::vector.
6671 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
6672 std::vector.
6673 (check_condition): Update.
6674 * eval.c (fetch_subexp_value): Change "val_chain" to a
6675 std::vector.
6676 * breakpoint.c (update_watchpoint): Update.
6677 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
6678
6679 2018-04-06 Tom Tromey <tom@tromey.com>
6680
6681 * value.h (free_all_values): Remove.
6682 * value.c (free_all_values): Remove.
6683
6684 2018-04-06 Tom Tromey <tom@tromey.com>
6685
6686 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
6687 (value_history_chain, value_history_count): Remove.
6688 (value_history): New global.
6689 (record_latest_value, access_value_history, show_values)
6690 (preserve_values): Update.
6691
6692 2018-04-06 Tom Tromey <tom@tromey.com>
6693
6694 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
6695 * varobj.c (varobj_set_display_format, varobj_set_value)
6696 (install_default_visualizer, construct_visualizer)
6697 (install_new_value, ~varobj, varobj_get_value_type)
6698 (my_value_of_variable, varobj_editable_p): Update.
6699 * c-varobj.c (c_describe_child, c_value_of_variable)
6700 (cplus_number_of_children, cplus_describe_child): Update.
6701 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
6702 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
6703 (ada_value_of_variable, ada_value_is_changeable_p): Update.
6704
6705 2018-04-06 Tom Tromey <tom@tromey.com>
6706
6707 * printcmd.c (last_examine_address): Change type to
6708 value_ref_ptr.
6709 (do_examine, x_command): Update.
6710
6711 2018-04-06 Tom Tromey <tom@tromey.com>
6712
6713 * value.c (release_value): Update.
6714 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
6715 (struct bpstats) <val>: Now a value_ref_ptr.
6716 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
6717 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
6718 (~watchpoint, print_it_watchpoint, watch_command_1)
6719 (invalidate_bp_value_on_memory_change): Update.
6720
6721 2018-04-06 Tom Tromey <tom@tromey.com>
6722
6723 * varobj.c (varobj_clear_saved_item)
6724 (update_dynamic_varobj_children, install_new_value, ~varobj):
6725 Update.
6726 * value.h (value_incref): Move declaration earlier.
6727 (value_decref): Rename from value_free.
6728 (struct value_ref_policy): New.
6729 (value_ref_ptr): New typedef.
6730 (struct value_deleter): Remove.
6731 (gdb_value_up): Remove typedef.
6732 (release_value): Change return type.
6733 (release_value_or_incref): Remove.
6734 * value.c (set_value_parent): Update.
6735 (value_incref): Change return type.
6736 (value_decref): Rename from value_free.
6737 (value_free_to_mark, free_all_values, free_value_chain): Update.
6738 (release_value): Return value_ref_ptr.
6739 (release_value_or_incref): Remove.
6740 (record_latest_value, set_internalvar, clear_internalvar):
6741 Update.
6742 * stack.c (info_frame_command): Don't call value_free.
6743 * python/py-value.c (valpy_dealloc, valpy_new)
6744 (value_to_value_object): Update.
6745 * printcmd.c (do_examine): Update.
6746 * opencl-lang.c (lval_func_free_closure): Update.
6747 * mi/mi-main.c (register_changed_p): Don't call value_free.
6748 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
6749 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
6750 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
6751 value_free.
6752 * guile/scm-value.c (vlscm_free_value_smob)
6753 (vlscm_scm_from_value): Update.
6754 * frame.c (frame_register_unwind, frame_unwind_register_signed)
6755 (frame_unwind_register_unsigned, get_frame_register_bytes)
6756 (put_frame_register_bytes): Don't call value_free.
6757 * findvar.c (address_from_register): Don't call value_free.
6758 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
6759 * dwarf2loc.c (entry_data_value_free_closure)
6760 (value_of_dwarf_reg_entry, free_pieced_value_closure)
6761 (dwarf2_evaluate_loc_desc_full): Update.
6762 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
6763 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
6764 (~watchpoint, watch_command_1)
6765 (invalidate_bp_value_on_memory_change): Update.
6766 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
6767
6768 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
6769
6770 PR gdb/23022
6771 * warning.m4: Add -Wno-error=deprecated-register.
6772 * configure: Re-generate.
6773
6774 2018-04-05 Tom Tromey <tom@tromey.com>
6775
6776 * linespec.h: Remove include of "vec.h".
6777
6778 2018-04-05 Tom Tromey <tom@tromey.com>
6779
6780 * linespec.c (typep): Remove typedef.
6781 (find_methods, find_superclass_methods): Take a std::vector.
6782 (find_method): Use std::vector.
6783
6784 2018-04-05 Tom Tromey <tom@tromey.com>
6785
6786 * utils.c (compare_strings): Remove.
6787 * utils.h (compare_strings): Remove.
6788 * objc-lang.h (find_imps): Update.
6789 * objc-lang.c (find_methods): Take a std::vector.
6790 (uniquify_strings, find_imps): Likewise.
6791 * linespec.c (find_methods): Take a std::vector.
6792 (decode_objc): Use std::vector.
6793 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
6794 a std::vector.
6795 (find_method, find_function_symbols): Use std::vector.
6796
6797 2018-04-05 Tom Tromey <tom@tromey.com>
6798
6799 * completer.c (completion_tracker::completion_tracker): Remove
6800 cast.
6801 (completion_tracker::discard_completions): Likewise.
6802 * breakpoint.c (ambiguous_names_p): Remove cast.
6803 * ada-lang.c (_initialize_ada_language): Remove cast.
6804 * utils.h (streq): Update.
6805 (streq_hash): Add new declaration.
6806 * utils.c (streq): Return bool.
6807 (streq_hash): New function.
6808
6809 2018-04-05 Tom Tromey <tom@tromey.com>
6810
6811 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
6812 Remove a string copy.
6813
6814 2018-04-05 Tom Tromey <tom@tromey.com>
6815
6816 * linespec.c (filter_results): Use std::vector.
6817 (decode_line_2, decode_line_full): Update.
6818
6819 2018-04-05 Tom Tromey <tom@tromey.com>
6820
6821 * linespec.c (canonical_to_fullform): Return std::string.
6822 (filter_results): Update.
6823 (struct decode_line_2_item): Add constructor.
6824 <fullform, displayform>: Now std::string.
6825 (decode_line_2_compare_items): Now a std::sort comparator.
6826 (decode_line_2): Update.
6827
6828 2018-04-05 Tom Tromey <tom@tromey.com>
6829
6830 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
6831 (unexpected_linespec_error): Update.
6832 (linespec_parse_basic, parse_linespec): Update.
6833
6834 2018-04-05 Tom Tromey <tom@tromey.com>
6835
6836 * linespec.c (linespec_parse_basic): Reindent.
6837
6838 2018-04-05 Tom Tromey <tom@tromey.com>
6839
6840 * minsyms.h (iterate_over_minimal_symbols): Update.
6841 * minsyms.c (iterate_over_minimal_symbols): Take a
6842 gdb::function_view.
6843 * linespec.c (struct collect_minsyms): Remove.
6844 (compare_msyms): Now a std::sort comparator.
6845 (add_minsym): Add parameters.
6846 (search_minsyms_for_name): Update. Use std::vector.
6847
6848 2018-04-03 Tom Tromey <tom@tromey.com>
6849
6850 * mipsread.c (read_alphacoff_dynamic_symtab): Use
6851 gdb::byte_vector.
6852
6853 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
6854
6855 * MAINTAINERS (Write After Approval): Add Weimin Pan.
6856
6857 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
6858
6859 PR gdb/16959
6860 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
6861 printing static type.
6862
6863 2018-04-01 Tom Tromey <tom@tromey.com>
6864
6865 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
6866 (rs6000_xfer_shared_libraries): Update.
6867
6868 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
6869
6870 * common/gdb_vecs.h (char_ptr): Remove.
6871 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
6872
6873 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
6874
6875 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
6876 with std::vector.
6877 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
6878
6879 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
6880
6881 * tracepoint.h (struct uploaded_tp): Initialize fields.
6882 <actions, step_actions, cmd_strings>: Change type to
6883 std::vector<char *>.
6884 * tracepoint.c (get_uploaded_tp): Allocate with new.
6885 (free_uploaded_tps): Free with delete.
6886 (parse_tracepoint_definition): Adjust to std::vector change.
6887 * breakpoint.c (read_uploaded_action): Likewise.
6888 (create_tracepoint_from_upload): Likewise.
6889 * ctf.c (ctf_write_uploaded_tp): Likewise.
6890 (SET_ARRAY_FIELD): Likewise.
6891 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
6892
6893 2018-03-30 Tom Tromey <tom@tromey.com>
6894
6895 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
6896 std::unique_ptr.
6897 (svr4_keep_data_in_core): Update.
6898 (svr4_read_so_list): Update.
6899
6900 2018-03-30 Tom Tromey <tom@tromey.com>
6901
6902 * windows-nat.c (handle_output_debug_string, handle_exception):
6903 Update.
6904 * target.h (target_read_string): Update.
6905 * target.c (target_read_string): Change "string" to
6906 unique_xmalloc_ptr.
6907 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
6908 Update.
6909 * solib-frv.c (frv_current_sos): Update.
6910 * solib-dsbt.c (dsbt_current_sos): Update.
6911 * solib-darwin.c (darwin_current_sos): Update.
6912 * linux-thread-db.c (inferior_has_bug): Update.
6913 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
6914 Update. Remove alloca.
6915 * ada-lang.c (ada_main_name): Update.
6916
6917 2018-03-30 Tom Tromey <tom@tromey.com>
6918
6919 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
6920 (struct dwo_file_deleter): New.
6921 (dwo_file_up): New typedef.
6922 (open_and_init_dwo_file): Use dwo_file_up.
6923 (free_dwo_file_cleanup): Remove.
6924
6925 2018-03-30 Tom Tromey <tom@tromey.com>
6926
6927 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
6928 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
6929
6930 2018-03-30 Tom Tromey <tom@tromey.com>
6931
6932 * dwarf2read.c (class free_cached_comp_units): New class.
6933 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
6934 (free_cached_comp_units): Remove function.
6935
6936 2018-03-30 Tom Tromey <tom@tromey.com>
6937
6938 * utils.h (make_cleanup_unpush_target): Remove.
6939 * inf-ptrace.c (struct target_unpusher): New.
6940 (target_unpush_up) New typedef.
6941 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
6942 target_unpush_up.
6943 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
6944
6945 2018-03-27 Tom Tromey <tom@tromey.com>
6946
6947 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
6948
6949 2018-03-27 Pedro Alves <palves@redhat.com>
6950 Tom Tromey <tom@tromey.com>
6951
6952 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
6953 destructor. Now a class.
6954 (gdb_readline_wrapper_cleanup): Remove function.
6955 (gdb_readline_wrapper): Remove cleanups.
6956
6957 2018-03-27 Tom Tromey <tom@tromey.com>
6958
6959 * typeprint.h (struct type_print_options) <local_typedefs,
6960 global_typedefs>: Remove "struct" keyword.
6961 (class typedef_hash_table): New class.
6962 (recursively_update_typedef_hash, add_template_parameters)
6963 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
6964 (find_typedef_in_hash): Don't declare.
6965 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
6966 (typedef_hash_table::recursively_update): Rename from
6967 recursively_update_typedef_hash. Now a member.
6968 (typedef_hash_table::add_template_parameters): Rename from
6969 add_template_parameters. Now a member.
6970 (typedef_hash_table::typedef_hash_table): Now a constructor;
6971 rename from create_typedef_hash.
6972 (typedef_hash_table::~typedef_hash_table): Now a destructor;
6973 rename from free_typedef_hash.
6974 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
6975 (do_free_global_table): Remove.
6976 (typedef_hash_table::typedef_hash_table): New constructor; renamed
6977 from copy_type_recursive.
6978 (create_global_typedef_table): Remove.
6979 (typedef_hash_table::find_global_typedef): Now a member of
6980 typedef_hash_table.
6981 (typedef_hash_table::find_typedef): Rename from
6982 find_typedef_in_hash; now a member.
6983 (whatis_exp): Update.
6984 * extension.h (struct ext_lang_type_printers): Add constructor and
6985 destructor.
6986 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
6987 declare.
6988 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
6989 Now a constructor; rename from start_ext_lang_type_printers.
6990 (ext_lang_type_printers): Now a destructor; rename from
6991 free_ext_lang_type_printers.
6992 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
6993 Update.
6994 (c_type_print_base_struct_union): Update. Remove cleanups.
6995
6996 2018-03-27 Tom Tromey <tom@tromey.com>
6997
6998 * dwarf-index-write.c: Include <cmath>.
6999
7000 2018-03-27 Joel Brobecker <brobecker@adacore.com>
7001
7002 * NEWS: Add entry describing new "set|show varsize-limit" command.
7003 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
7004 command.
7005 * printcmd.c (_initialize_printcmd): Add "set var" alias of
7006 "set variable".
7007
7008 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
7009
7010 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
7011 dwarf-index-write.c
7012 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
7013 * dwarf-index-common.c: New file.
7014 * dwarf-index-common.h: New file.
7015 * dwarf-index-write.c: New file.
7016 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
7017 (struct dwarf2_section_info): Move from here.
7018 (dwarf2_section_info_def): Likewise.
7019 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
7020 (offset_type): Likewise.
7021 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
7022 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
7023 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
7024 (byte_swap): Likewise.
7025 (MAYBE_SWAP): Likewise.
7026 (dwarf2_per_cu_ptr): Likewise.
7027 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
7028 (struct tu_stats): Likewise.
7029 (struct dwarf2_per_objfile): Likewise.
7030 (struct dwarf2_per_cu_data): Likewise.
7031 (struct signatured_type): Likewise.
7032 (sig_type_ptr): Likewise.
7033 (DEF_VEC_P (sig_type_ptr)): Likewise.
7034 (INDEX4_SUFFIX): Likewise.
7035 (INDEX5_SUFFIX): Likewise.
7036 (DEBUG_STR_SUFFIX): Likewise.
7037 (dwarf2_read_section): Make non-static.
7038 (mapped_index_string_hash): Move from here.
7039 (dwarf5_djb_hash): Likewise.
7040 (file_write): Likewise.
7041 (class data_buf): Likewise.
7042 (struct symtab_index_entry): Likewise.
7043 (struct mapped_symtab): Likewise.
7044 (find_slot): Likewise.
7045 (hash_expand): Likewise.
7046 (add_index_entry): Likewise.
7047 (uniquify_cu_indices): Likewise.
7048 (class c_str_view): Likewise.
7049 (class c_str_view_hasher): Likewise.
7050 (class vector_hasher): Likewise.
7051 (write_hash_table): Likewise.
7052 (psym_index_map): Likewise.
7053 (struct addrmap_index_data): Likewise.
7054 (add_address_entry): Likewise.
7055 (add_address_entry_worker): Likewise.
7056 (write_address_map): Likewise.
7057 (symbol_kind): Likewise.
7058 (write_psymbols): Likewise.
7059 (struct signatured_type_index_data): Likewise.
7060 (write_one_signatured_type): Likewise.
7061 (recursively_count_psymbols): Likewise.
7062 (recursively_write_psymbols): Likewise.
7063 (class debug_names): Likewise.
7064 (check_dwarf64_offsets): Likewise.
7065 (psyms_seen_size): Likewise.
7066 (write_gdbindex): Likewise.
7067 (write_debug_names): Likewise.
7068 (assert_file_size): Likewise.
7069 (write_psymtabs_to_index): Likewise.
7070 (save_gdb_index_command): Likewise.
7071 (_initialize_dwarf2_read): Don't register the "save gdb-index"
7072 command.
7073 * dwarf2read.h: New file.
7074
7075 2018-03-27 Joel Brobecker <brobecker@adacore.com>
7076
7077 PR gdb/22670
7078 * dwarf2read.c (dwarf2_physname): Do not return the demangled
7079 symbol name if the CU's language stores symbol names in linkage
7080 format.
7081 * language.h (struct language_defn)
7082 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
7083 all instances of this struct.
7084
7085 2018-03-26 Tom Tromey <tom@tromey.com>
7086
7087 * stack.c (backtrace_command_1): Remove verbose code.
7088
7089 2018-03-26 Tom Tromey <tom@tromey.com>
7090
7091 * python/py-framefilter.c (py_print_type): Don't catch
7092 exceptions. Return void.
7093 (py_print_value): Likewise.
7094 (py_print_single_arg): Likewise.
7095 (enumerate_args): Don't catch exceptions.
7096 (py_print_args): Likewise.
7097 (py_print_frame): Likewise.
7098 (gdbpy_apply_frame_filter): Catch exceptions here.
7099
7100 2018-03-26 Tom Tromey <tom@tromey.com>
7101
7102 * stack.c (_initialize_stack): Remove trailing newlines from help
7103 text. Add "Usage" line to "backtrace" help.
7104
7105 2018-03-26 Tom Tromey <tom@tromey.com>
7106
7107 PR python/16486:
7108 * python/py-framefilter.c (py_print_args): Call wrap_hint.
7109
7110 2018-03-26 Tom Tromey <tom@tromey.com>
7111
7112 * python/py-framefilter.c (py_print_single_arg): Return
7113 EXT_LANG_BT_ERROR from catch.
7114
7115 2018-03-26 Tom Tromey <tom@tromey.com>
7116
7117 PR backtrace/15584:
7118 * stack.c (backtrace_command_1): Move some code into no-filters
7119 "if".
7120
7121 2018-03-26 Tom Tromey <tom@tromey.com>
7122
7123 * python/py-framefilter.c (throw_quit_or_print_exception): New
7124 function.
7125 (gdbpy_apply_frame_filter): Use it.
7126
7127 2018-03-26 Tom Tromey <tom@tromey.com>
7128
7129 PR cli/17716:
7130 * python/py-framefilter.c (py_print_type, py_print_value)
7131 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
7132 RETURN_MASK_ERROR.
7133
7134 2018-03-26 Tom Tromey <tom@tromey.com>
7135
7136 * python/py-framefilter.c (enumerate_args): Use
7137 gdb::unique_xmalloc_ptr.
7138
7139 2018-03-26 Tom Tromey <tom@tromey.com>
7140
7141 * python/py-framefilter.c (py_print_frame): Return
7142 EXT_LANG_BT_OK.
7143 (gdbpy_apply_frame_filter): Update comment.
7144 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
7145 Remove.
7146 <EXT_LANG_BT_NO_FILTERS>: Change value.
7147
7148 2018-03-26 Tom Tromey <tom@tromey.com>
7149
7150 PR backtrace/15582:
7151 * stack.c (backtrace_command): Parse "hide" argument.
7152 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
7153 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
7154 constant.
7155
7156 2018-03-26 Tom Tromey <tom@tromey.com>
7157
7158 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
7159 add "flags".
7160 (backtrace_command): Remove "fulltrace", add "flags".
7161
7162 2018-03-26 Tom Tromey <tom@tromey.com>
7163
7164 * stack.c (backtrace_command): Rewrite command line parsing.
7165
7166 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
7167
7168 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
7169
7170 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
7171
7172 * filename-seen-cache.h: Add include guard.
7173
7174 2018-03-26 Keith Seitz <keiths@redhat.com>
7175
7176 * symfile.c (place_section): Remove "struct" from section_addr_info
7177 in comment.
7178 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
7179 "struct" keyword from section_addr_info.
7180
7181 2018-03-26 Alan Hayward <alan.hayward@arm.com>
7182
7183 * regformats/regdef.h (reg): Add constructors.
7184
7185 2018-03-25 Pedro Alves <palves@redhat.com>
7186
7187 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
7188 if then/else bodies in var_func_name extraction.
7189
7190 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
7191
7192 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
7193 lookup_minimal_symbol() to find symbol entry.
7194 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
7195
7196 2018-03-23 Keith Seitz <keiths@redhat.com>
7197
7198 PR c++/22968
7199 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
7200 nested type definitions for C++, too.
7201
7202 2018-03-23 Tom Tromey <tom@tromey.com>
7203
7204 * machoread.c (struct oso_el): Add a constructor. Don't define as
7205 a typedef.
7206 (macho_register_oso): Remove.
7207 (macho_symtab_read): Take a std::vector.
7208 (oso_el_compare_name): Now a std::sort comparator.
7209 (macho_symfile_read_all_oso): Take a std::vector.
7210 (macho_symfile_read): Use std::vector. Remove cleanups.
7211
7212 2018-03-22 Tom Tromey <tom@tromey.com>
7213
7214 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
7215 (record_full_goto_bookmark): Use std::string.
7216
7217 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7218
7219 PR tdep/18295
7220 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
7221 a single mask.
7222
7223 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7224
7225 * rs6000-tdep.c (store_insn_p): New function.
7226 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
7227 and cr_reg to their unshifted values. Use store_insn_p to
7228 match LR saves using either R1 or fdata->alloca_reg. Use
7229 store_insn_p to match CR saves. Set alloca_reg_offset
7230 when alloca_reg and framep are set. Remove lr_reg shift
7231 when assigning to fdata->lr_register.
7232
7233 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
7234
7235 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
7236 command line args instead of emitting a warning.
7237
7238 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
7239
7240 * tracepoint.h (struct static_tracepoint_marker): Initialize
7241 fields, define default constructor, move constructor and move
7242 assignment, disable the rest.
7243 <str_id, extra>: Make std::string.
7244 (release_static_tracepoint_marker): Remove.
7245 (free_current_marker): Remove.
7246 * tracepoint.c (free_current_marker): Remove.
7247 (parse_static_tracepoint_marker_definition): Adjust to
7248 std::string, use new hex2str overload.
7249 (release_static_tracepoint_marker): Remove.
7250 (print_one_static_tracepoint_marker): Get marker by reference
7251 and adjust to std::string.
7252 (info_static_tracepoint_markers_command): Adjust to std::vector
7253 changes
7254 * target.h (static_tracepoint_marker_p): Remove typedef.
7255 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
7256 (struct target_ops) <to_static_tracepoint_marker_at>: Return
7257 bool.
7258 <to_static_tracepoint_markers_by_strid>: Return std::vector.
7259 * target-debug.h
7260 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
7261 (target_debug_print_std_vector_static_tracepoint_marker): New.
7262 (target_debug_print_struct_static_tracepoint_marker_p): Rename
7263 to...
7264 (target_debug_print_static_tracepoint_marker_p): ... this.
7265 * target-delegates.c: Re-generate.
7266 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
7267 Make std::string.
7268 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
7269 (decode_static_tracepoint_spec): Adjust to std::vector.
7270 (tracepoint_print_one_detail): Adjust to std::string.
7271 (strace_marker_decode_location): Adjust to std::string.
7272 (update_static_tracepoint): Adjust to std::string, remove call
7273 to release_static_tracepoint_marker.
7274 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
7275 Adjust to std::vector.
7276 * remote.c (remote_static_tracepoint_marker_at): Return bool.
7277 (remote_static_tracepoint_markers_by_strid): Adjust to
7278 std::vector.
7279 * common/rsp-low.h (hex2str): New overload with explicit count
7280 of bytes.
7281 * common/rsp-low.c (hex2str): New overload with explicit count
7282 of bytes.
7283 * unittests/rsp-low-selftests.c (test_hex2str): New function.
7284 (_initialize_rsp_low_selftests): Add test_hex2str test.
7285 * unittests/tracepoint-selftests.c
7286 (test_parse_static_tracepoint_marker_definition): Adjust to
7287 std::string.
7288
7289 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
7290
7291 * tracepoint.c (parse_static_tracepoint_marker_definition):
7292 Consider case where the definition is followed by more
7293 definitions.
7294 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7295 tracepoint-selftests.c.
7296 * unittests/tracepoint-selftests.c: New.
7297
7298 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7299
7300 * MAINTAINERS (Write After Approval): Add Pedro Franco de
7301 Carvalho.
7302
7303 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
7304
7305 * symtab.c (find_pc_sect_line): fixed indentation.
7306
7307 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
7308
7309 * symtab.c (find_pc_sect_line): now uses binary search.
7310
7311 2018-03-19 Tom Tromey <tom@tromey.com>
7312
7313 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
7314 "IDENT" production.
7315
7316 2018-03-19 Pedro Alves <palves@redhat.com>
7317 Tom Tromey <tom@tromey.com>
7318
7319 * unittests/observable-selftests.c: New file.
7320 * common/observable.h: New file.
7321 * observable.h: New file.
7322 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
7323 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
7324 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
7325 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
7326 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
7327 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
7328 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
7329 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
7330 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
7331 python/py-breakpoint.c, python/py-finishbreakpoint.c,
7332 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
7333 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
7334 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
7335 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
7336 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
7337 tui/tui-interp.c, valops.c: Update all users.
7338 * tui/tui-hooks.c (tui_bp_created_observer)
7339 (tui_bp_deleted_observer, tui_bp_modified_observer)
7340 (tui_inferior_exit_observer, tui_before_prompt_observer)
7341 (tui_normal_stop_observer, tui_register_changed_observer):
7342 Remove.
7343 (tui_observers_token): New global.
7344 (attach_or_detach, tui_attach_detach_observers): New functions.
7345 (tui_install_hooks, tui_remove_hooks): Use
7346 tui_attach_detach_observers.
7347 * record-btrace.c (record_btrace_thread_observer): Remove.
7348 (record_btrace_thread_observer_token): New global.
7349 * observer.sh: Remove.
7350 * observer.c: Rename to observable.c.
7351 * observable.c (namespace gdb_observers): Define new objects.
7352 (observer_debug): Move into gdb_observers namespace.
7353 (struct observer, struct observer_list, xalloc_observer_list_node)
7354 (xfree_observer_list_node, generic_observer_attach)
7355 (generic_observer_detach, generic_observer_notify): Remove.
7356 (_initialize_observer): Update.
7357 Don't include observer.inc.
7358 * Makefile.in (generated_files): Remove observer.h, observer.inc.
7359 (clean mostlyclean): Likewise.
7360 (observer.h, observer.inc): Remove targets.
7361 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
7362 (COMMON_SFILES): Use observable.c, not observer.c.
7363 * .gitignore: Remove observer.h.
7364
7365 2018-03-18 Tom Tromey <tom@tromey.com>
7366
7367 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
7368 gdb::def_vector.
7369 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
7370
7371 2018-03-17 Tom Tromey <tom@tromey.com>
7372
7373 * auto-load.c (auto_load_objfile_script_1): Use std::string.
7374
7375 2018-03-17 Tom Tromey <tom@tromey.com>
7376
7377 * target.c (class scoped_target_fd): New.
7378 (target_fileio_close_cleanup): Remove.
7379 (target_fileio_read_alloc_1): Use scoped_target_fd.
7380
7381 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
7382
7383 * silent-rules.mk: New.
7384 * Makefile.in: Include silent-rules.mk
7385 (srcdir, VPATH, top_srcdir): Move up.
7386 (COMPILE): Add ECHO_CXX.
7387 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
7388 (init.c): Add ECHO_INIT_C.
7389 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
7390 (version.c): Add ECHO_GEN.
7391 (printcmd.o): Add ECHO_CXX.
7392 (target-float.o): Add ECHO_CXX.
7393 (ada-exp.o): Add ECHO_CXX.
7394 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
7395 (insight$(EXEEXT)): Add ECHO_CXXLD.
7396 * gnulib/configure.ac: Add AM_SILENT_RULES.
7397 * gnulib/aclocal.m4: Re-generate.
7398 * gnulib/configure: Re-generate.
7399 * gnulib/import/Makefile.in: Re-generate.
7400
7401 2018-03-16 Tom Tromey <tom@tromey.com>
7402
7403 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
7404 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
7405 * utils.c (do_free_section_addr_info)
7406 (make_cleanup_free_section_addr_info): Remove.
7407 * symfile.h (struct other_sections): Add constructor.
7408 (struct section_addr_info): Remove.
7409 (section_addr_info): New typedef.
7410 (struct sym_fns) <sym_offsets>: Change type of parameter.
7411 (build_section_addr_info_from_objfile)
7412 (relative_addr_info_to_section_offsets, addr_info_make_relative)
7413 (default_symfile_offsets, symbol_file_add)
7414 (symbol_file_add_from_bfd)
7415 (build_section_addr_info_from_section_table): Update.
7416 (alloc_section_addr_info, free_section_addr_info): Don't declare.
7417 * symfile.c (alloc_section_addr_info): Remove.
7418 (build_section_addr_info_from_section_table): Change return type.
7419 Update.
7420 (build_section_addr_info_from_bfd)
7421 (build_section_addr_info_from_objfile): Likewise.
7422 (free_section_addr_info): Remove.
7423 (relative_addr_info_to_section_offsets): Change type of "addrs".
7424 (addrs_section_compar): Now a std::sort comparator.
7425 (addrs_section_sort): Change return type.
7426 (addr_info_make_relative): Change type of "addrs". Update.
7427 (default_symfile_offsets, syms_from_objfile_1)
7428 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
7429 (symbol_file_add_separate): Update.
7430 (symbol_file_add): Change type of "addrs". Update.
7431 (add_symbol_file_command): Update. Remove cleanups.
7432 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
7433 cleanups.
7434 * symfile-debug.c (debug_sym_offsets): Change type of "info".
7435 * solib.c (solib_read_symbols): Update.
7436 * objfiles.c (objfile_relocate): Update. Remove cleanups.
7437 * machoread.c (macho_symfile_offsets): Update.
7438 * jit.c (jit_bfd_try_read_symtab): Update.
7439
7440 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
7441
7442 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7443 unittests/utils-selftests.c.
7444 * unittests/utils-selftests.c: New file.
7445
7446 2018-03-14 Tom Tromey <tom@tromey.com>
7447
7448 PR cli/14977:
7449 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
7450 for NULL.
7451
7452 2018-03-14 Tom Tromey <tom@tromey.com>
7453
7454 PR cli/19918:
7455 * printcmd.c (printf_pointer): Allow "-" in format.
7456
7457 2018-03-14 Tom Tromey <tom@tromey.com>
7458
7459 * printcmd.c (_initialize_printcmd): Add usage to printf.
7460
7461 2018-03-14 Yao Qi <qiyao@sourceware.org>
7462
7463 * MAINTAINERS: Update my email address.
7464
7465 2018-03-13 Tom Tromey <tom@tromey.com>
7466
7467 * machoread.c (macho_check_dsym): Change filenamep to a
7468 std::string*.
7469 (macho_symfile_read): Update.
7470 * symfile.c (load_command): Use std::string.
7471
7472 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
7473
7474 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
7475 to error message string.
7476 (riscv_register_name): Use xsnprintf instead of sprintf.
7477 (riscv_insn::fetch_instruction): Use gdb_assert instead of
7478 internal_error.
7479 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
7480 error.
7481 (riscv_push_dummy_call): Likewise.
7482
7483 2018-03-12 Tom Tromey <tom@tromey.com>
7484
7485 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
7486 Use gdb::byte_vector.
7487 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
7488
7489 2018-03-12 Yao Qi <yao.qi@linaro.org>
7490
7491 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
7492 parameter type to readable_regcache.
7493 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
7494 the declaration.
7495
7496 2018-03-11 Tom Tromey <tom@tromey.com>
7497
7498 * dwarf2read.c (struct nextfield): Add initializers.
7499 (struct nextfnfield): Remove.
7500 (struct fnfieldlist): Add initializers. Remove "length" and
7501 "head", use std::vector.
7502 (struct decl_field_list): Remove.
7503 (struct field_info): Add initializers.
7504 <fields, baseclasses>: Now std::vector.
7505 <nbaseclasses, nfnfields, typedef_field_list_count,
7506 nested_types_list_count>: Remove.
7507 (dwarf2_add_field, dwarf2_add_type_defn)
7508 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
7509 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
7510 (process_structure_scope): Update.
7511
7512 2018-03-11 Tom Tromey <tom@tromey.com>
7513
7514 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
7515 for use by std::sort.
7516 (build_type_psymtabs_1): Use std::vector.
7517
7518 2018-03-09 Eli Zaretskii <eliz@gnu.org>
7519
7520 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
7521 and LIBMPFR in the printed configuration.
7522
7523 2018-03-08 Tom Tromey <tom@tromey.com>
7524
7525 * source.c (get_filename_and_charpos): Use scoped_fd.
7526 * nto-procfs.c (procfs_open_1): Use scoped_fd.
7527 (procfs_pidlist): Likewise.
7528 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
7529 (iterate_over_mappings): Likewise.
7530
7531 2018-03-08 Tom Tromey <tom@tromey.com>
7532
7533 * infcall.c (struct call_return_meta_info)
7534 <stack_temporaries_enabled>: Remove.
7535 (get_call_return_value, call_function_by_hand_dummy): Update.
7536 * thread.c (disable_thread_stack_temporaries): Remove.
7537 (enable_thread_stack_temporaries): Remove.
7538 (thread_stack_temporaries_enabled_p): Return bool.
7539 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
7540 (get_last_thread_stack_temporary): Update.
7541 * eval.c (evaluate_subexp): Update.
7542 * gdbthread.h (class enable_thread_stack_temporaries): Now a
7543 class, not a function.
7544 (value_ptr, value_vec): Remove typedefs.
7545 (class thread_info) <stack_temporaries_enabled>: Now bool.
7546 <stack_temporaries>: Now a std::vector.
7547 (thread_stack_temporaries_enabled_p)
7548 (value_in_thread_stack_temporaries): Return bool.
7549
7550 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
7551
7552 * remote.c (putpkt_binary): Fix omitted bytes reporting.
7553 (getpkt_or_notif_sane_1): Likewise.
7554
7555 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7556
7557 * build-id.c (build_id_to_debug_bfd): Use std::string.
7558
7559 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7560
7561 * build-id.c (find_separate_debug_file_by_buildid): Return
7562 std::string.
7563 * build-id.h (find_separate_debug_file_by_buildid): Return
7564 std::string.
7565 * coffread.c (coff_symfile_read): Adjust to std::string.
7566 * elfread.c (elf_symfile_read): Adjust to std::string.
7567 * symfile.c (separate_debug_file_exists): Change parameter to
7568 std::string.
7569 (find_separate_debug_file): Return std::string.
7570 (find_separate_debug_file_by_debuglink): Return std::string.
7571 * symfile.h (find_separate_debug_file_by_debuglink): Return
7572 std::string.
7573
7574 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7575
7576 * common/xml-utils.c (xml_escape_text): Move code to...
7577 (xml_escape_text_append): ... this new function.
7578 * common/xml-utils.h (xml_escape_text_append): New declaration.
7579 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
7580 New function.
7581 (_initialize_xml_utils): register test_xml_escape_text_append as
7582 a selftest.
7583
7584 2018-03-07 Alan Hayward <alan.hayward@arm.com>
7585
7586 * defs.h: Remove MAX_REGISTER_SIZE.
7587 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
7588 asserts.
7589 * python/py-unwind.c (pyuw_sniffer): Likewise.
7590
7591 2018-03-07 Tom Tromey <tom@tromey.com>
7592
7593 * linux-tdep.c (linux_info_proc): Update.
7594 * target.h (struct target_ops) <to_fileio_readlink>: Return
7595 optional<string>.
7596 (target_fileio_readlink): Return optional<string>.
7597 * remote.c (remote_hostio_readlink): Return optional<string>.
7598 * inf-child.c (inf_child_fileio_readlink): Return
7599 optional<string>.
7600 * target.c (target_fileio_readlink): Return optional<string>.
7601
7602 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
7603
7604 * regcache.c (cooked_read_test): Add riscv to the list of
7605 architectures that have a save_reggroup.
7606
7607 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
7608
7609 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
7610 value is not a dynamic class object.
7611
7612 2018-03-06 Tom Tromey <tom@tromey.com>
7613
7614 * rust-exp.y: Formatting fixes.
7615
7616 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7617
7618 * riscv-tdep.c (riscv_register_name): Remove target description
7619 support.
7620 (riscv_gdbarch_init): Remove target description check.
7621
7622 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7623
7624 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
7625 comment.
7626 * riscv-tdep.h: Likewise.
7627
7628 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7629
7630 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
7631 (riscv_pseudo_register_write): Delete.
7632 (riscv_gdbarch_init): Remove all use of pseudo registers.
7633
7634 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7635
7636 * record-btrace.c (btrace_print_lines): Replace cleanup
7637 parameter with RAII equivalents.
7638 (btrace_insn_history): Replace cleanup with RAII equivalents.
7639 * ui-out.h (make_cleanup_ui_out_list_begin_end,
7640 make_cleanup_ui_out_tuple_begin_end): Remove.
7641 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
7642 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
7643 make_cleanup_ui_out_list_begin_end): Remove.
7644
7645 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7646
7647 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
7648 parameter types to std::vector. Use bool.
7649 (record_btrace_wait): Replace VEC(tp_t) with
7650 std::vector<thread_info *>.
7651 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
7652
7653 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7654
7655 * record-btrace.c (record_btrace_disable_callback): Remove.
7656 (struct scoped_btrace_disable): New.
7657 (record_btrace_open): Use scoped_btrace_disable.
7658
7659 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7660
7661 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
7662 reading values from registers.
7663
7664 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7665
7666 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
7667 where appropriate.
7668
7669 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7670
7671 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
7672 change parameter type. Use GDB's print functions, and use
7673 core_addr_to_string where appropriate.
7674 (riscv_push_dummy_call): Use core_addr_to_string where
7675 appropriate, update call to riscv_print_arg_location, and reindent
7676 a few lines.
7677 (riscv_return_value): Update call to riscv_print_arg_location.
7678
7679 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7680 Tim Newsome <tim@sifive.com>
7681 Albert Ou <a0u@eecs.berkeley.edu>
7682 Darius Rad <darius@bluespec.com>
7683
7684 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
7685 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
7686 (ALLDEPFILES): Add riscv-tdep.c
7687 * configure.tgt: Add riscv support.
7688 * riscv-tdep.c: New file.
7689 * riscv-tdep.h: New file.
7690 * NEWS: Mention new target.
7691 * MAINTAINERS: Add entry for riscv.
7692
7693 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7694
7695 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
7696 fields within aggregates.
7697
7698 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
7699
7700 * record-btrace.c (btrace_print_lines): Change type of flags to
7701 gdb_disassembly_flags.
7702
7703 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7704
7705 * fbsd-nat.c: Include "inf-ptrace.h".
7706 (USE_SIGTRAP_SIGINFO): Conditionally define.
7707 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
7708 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
7709 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
7710 function.
7711 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
7712 Likewise.
7713 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
7714 Likewise.
7715 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
7716 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
7717 "supports_stopped_by_hw_breakpoint" target methods.
7718
7719 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7720
7721 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
7722 * fbsd-nat.c (debug_fbsd_nat): New variable.
7723 (show_fbsd_nat_debug): New function.
7724 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
7725 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
7726
7727 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7728
7729 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
7730 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
7731 prototype.
7732 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
7733 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
7734 method.
7735
7736 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7737
7738 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
7739 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
7740
7741 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7742
7743 * charset.c (struct charset_vector): New.
7744 (charsets): Change type to charset_vector.
7745 (find_charset_names): Adjust.
7746 (add_one): Adjust.
7747 (_initialize_charset): Adjust.
7748
7749 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7750
7751 * progspace.h (struct program_space) <deleted_solibs>: Change
7752 type to std::vector<std::string>.
7753 * progspace.c (clear_program_space_solib_cache): Adjust.
7754 * breakpoint.c (print_solib_event): Adjust.
7755 (check_status_catch_solib): Adjust.
7756 * solib.c (update_solib_list): Adjust.
7757 * ui-out.h (class ui_out) <field_string>: New overload.
7758 * ui-out.c (ui_out::field_string): New overload.
7759
7760 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7761
7762 * progspace.h (struct program_space): Add constructor and
7763 destructor, initialize fields.
7764 (add_program_space): Remove.
7765 * progspace.c (add_program_space): Rename to...
7766 (program_space::program_space): ... this.
7767 (release_program_space): Rename to...
7768 (program_space::~program_space): ... this.
7769 (delete_program_space): Use delete to delete program_space.
7770 (initialize_progspace): Use new to allocate program_space.
7771 * inferior.c (add_inferior_with_spaces): Likewise.
7772 (clone_inferior_command): Likewise.
7773 * infrun.c (follow_fork_inferior): Likewise.
7774 (handle_vfork_child_exec_or_exit): Likewise.
7775
7776 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7777
7778 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
7779 (delim_string_to_char_ptr_vec): Return std::vector of
7780 gdb::unique_xmalloc_ptr.
7781 (dirnames_to_char_ptr_vec_append): Take std::vector of
7782 gdb::unique_xmalloc_ptr.
7783 (dirnames_to_char_ptr_vec): Return std::vector of
7784 gdb::unique_xmalloc_ptr.
7785 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
7786 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
7787 (delim_string_to_char_ptr_vec): Return an std::vector of
7788 gdb::unique_xmalloc_ptr, adjust the code.
7789 (dirnames_to_char_ptr_vec_append): Take an std::vector of
7790 gdb::unique_xmalloc_ptr, adjust the code.
7791 (dirnames_to_char_ptr_vec): Return an std::vector of
7792 gdb::unique_xmalloc_ptr, adjust the code.
7793 * auto-load.c (auto_load_safe_path_vec): Change type to
7794 std::vector of gdb::unique_xmalloc_ptr.
7795 (auto_load_expand_dir_vars): Return an std::vector of
7796 gdb::unique_xmalloc_ptr, adjust the code.
7797 (auto_load_safe_path_vec_update): Adjust.
7798 (filename_is_in_auto_load_safe_path_vec): Adjust.
7799 (auto_load_objfile_script_1): Adjust.
7800 * build-id.c (build_id_to_debug_bfd): Adjust.
7801 * linux-thread-db.c (thread_db_load_search): Adjust.
7802 * source.c (add_path): Adjust.
7803 (openp): Adjust.
7804 * symfile.c (find_separate_debug_file): Adjust.
7805 * utils.c (do_free_char_ptr_vec): Remove.
7806 (make_cleanup_free_char_ptr_vec): Remove.
7807
7808 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
7809
7810 PR gdb/22907
7811 * common/pathstuff.c: Conditionally include "<windows.h>".
7812
7813 2018-03-01 Georg Sauthoff <mail@georg.so>
7814
7815 PR gdb/22888
7816 * gcore.in: Quote variables and switch interpreter to bash.
7817
7818 2018-03-01 Tom Tromey <tom@tromey.com>
7819
7820 * dwarf2read.c (alloc_discriminant_info): Fix default_index
7821 assertion. Add assertion for discriminant_index.
7822 (quirk_rust_enum): Use correct base type name in univariant case.
7823
7824 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
7825
7826 * record.c (get_call_history_modifiers): Return a
7827 record_print_flags.
7828 (cmd_record_call_history): Adjust.
7829 * record-btrace.c (record_btrace_call_history): Adjust.
7830 (record_btrace_call_history_range): Adjust.
7831 (record_btrace_call_history_from): Adjust.
7832 * target-debug.h (target_debug_print_record_print_flags): New.
7833 * target-delegates.c: Re-generate.
7834 * target.c (target_call_history): Change flags type.
7835 (target_call_history_from): Likewise.
7836 (target_call_history_range): Likewise.
7837 * target.h (struct target_ops) <target_call_history>: Likewise.
7838 (target_call_history_from): Likewise.
7839 (target_call_history_range): Likewise.
7840
7841 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
7842 Simon Marchi <simon.marchi@polymtl.ca>
7843
7844 * common/common-utils.c: Include "sys/stat.h".
7845 (is_regular_file): Move here from "source.c"; change return
7846 type to "bool".
7847 * common/common-utils.h (is_regular_file): New prototype.
7848 * common/pathstuff.c (contains_dir_separator): New function.
7849 * common/pathstuff.h (contains_dir_separator): New prototype.
7850 * source.c: Don't include "sys/stat.h".
7851 (is_regular_file): Move to "common/common-utils.c".
7852
7853 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
7854
7855 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
7856 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
7857 * auto-load.c: Include "common/pathstuff.h".
7858 * common/common-def.h (current_directory): Move here.
7859 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
7860 function.
7861 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
7862 prototype.
7863 * common/pathstuff.c: New file.
7864 * common/pathstuff.h: New file.
7865 * compile/compile.c: Include "common/pathstuff.h".
7866 * defs.h (current_directory): Move to "common/common-defs.h".
7867 * dwarf2read.c: Include "common/pathstuff.h".
7868 * exec.c: Likewise.
7869 * guile/scm-safe-call.c: Likewise.
7870 * linux-thread-db.c: Likewise.
7871 * main.c: Likewise.
7872 * nto-tdep.c: Likewise.
7873 * objfiles.c: Likewise.
7874 * source.c: Likewise.
7875 * symtab.c: Likewise.
7876 * utils.c: Include "common/pathstuff.h".
7877 (gdb_realpath): Move to "common/pathstuff.c".
7878 (gdb_realpath_keepfile): Likewise.
7879 (gdb_abspath): Likewise.
7880 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
7881 (gdb_realpath_keepfile): Likewise.
7882 (gdb_abspath): Likewise.
7883
7884 2018-02-28 John Baldwin <jhb@FreeBSD.org>
7885
7886 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
7887 wildcard process pid for super_resume for kernels with a
7888 specific bug.
7889
7890 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
7891
7892 * compile/compile.c (get_args): Add additional comments
7893 explaining function.
7894
7895 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
7896 Tom Tromey <tom@tromey.com>
7897
7898 * target.h (memory_write_request_s): Remove typedef. Don't define
7899 VEC.
7900 (target_write_memory_blocks): Change argument to std::vector.
7901 (struct memory_write_request): Add constructor.
7902 * target-memory.c (compare_block_starting_address): Return bool.
7903 Change argument types.
7904 (claim_memory): Change arguments to use std::vector.
7905 (split_regular_and_flash_blocks, blocks_to_erase)
7906 (compute_garbled_blocks): Likewise.
7907 (cleanup_request_data, cleanup_write_requests_vector): Remove.
7908 (target_write_memory_blocks): Change argument to std::vector.
7909 * symfile.c (struct load_section_data): Add constructor and
7910 destructor. Use std::vector for "requests".
7911 (struct load_progress_data): Add initializers.
7912 (load_section_callback): Update. Use "new".
7913 (clear_memory_write_data): Remove.
7914 (generic_load): Update.
7915
7916 2018-02-27 Alan Hayward <alan.hayward@arm.com>
7917
7918 * arch/aarch64.h: Use common/tdesc.h.
7919
7920 2018-02-26 Maciej W. Rozycki <macro@mips.com>
7921
7922 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
7923 architecture with a 64-bit ABI.
7924
7925 2018-02-26 Maciej W. Rozycki <macro@mips.com>
7926
7927 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
7928 ahead of target description loading.
7929
7930 2018-02-26 Tom Tromey <tom@tromey.com>
7931
7932 * stack.c (backtrace_command_1): Update.
7933 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
7934 of "flags".
7935 * python/py-framefilter.c (py_print_frame)
7936 (gdbpy_apply_frame_filter): Change type of "flags".
7937 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
7938 of "flags".
7939 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
7940 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
7941 * extension.h (enum frame_filter_flag): Rename from
7942 frame_filter_flags.
7943 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
7944 (apply_ext_lang_frame_filter): Change type of "flags".
7945 * extension.c (apply_ext_lang_frame_filter): Change type of
7946 "flags".
7947 * extension-priv.h (struct extension_language_ops)
7948 <apply_frame_filter>: Change type of "flags".
7949
7950 2018-02-26 Tom Tromey <tom@tromey.com>
7951
7952 PR python/16497:
7953 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
7954 off-by-one in py_end computation.
7955 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
7956 PRINT_MORE_FRAMES.
7957 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
7958 constant.
7959
7960 2018-02-26 Tom Tromey <tom@tromey.com>
7961
7962 * dwarf2read.c (struct variant_field): New.
7963 (struct nextfield) <variant>: New field.
7964 (dwarf2_add_field): Handle DW_TAG_variant_part.
7965 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
7966 discriminated union.
7967 (read_structure_type): Handle DW_TAG_variant_part.
7968 (handle_struct_member_die): New function, extracted from
7969 process_structure_scope. Handle DW_TAG_variant.
7970 (process_structure_scope): Handle discriminated unions. Call
7971 handle_struct_member_die.
7972
7973 2018-02-26 Tom Tromey <tom@tromey.com>
7974
7975 * rust-lang.h (rust_last_path_segment): Declare.
7976 * rust-lang.c (rust_last_path_segment): Now public. Change
7977 contract.
7978 (struct disr_info): Remove.
7979 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
7980 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
7981 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
7982 (rust_enum_p, rust_enum_variant): New function.
7983 (rust_underscore_fields): Remove "offset" parameter.
7984 (rust_print_enum): New function.
7985 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
7986 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
7987 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
7988 enums.
7989 (rust_internal_print_type): New function, from rust_print_type.
7990 Remove enum code.
7991 (rust_print_type): Call rust_internal_print_type.
7992 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
7993 Update enum handling.
7994 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
7995 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
7996 (rust_union_quirks): New functions.
7997 (process_full_comp_unit, process_full_type_unit): Call
7998 rust_union_quirks.
7999 (process_structure_scope): Update rust_unions if necessary.
8000
8001 2018-02-26 Tom Tromey <tom@tromey.com>
8002
8003 * value.h (value_union_variant): Declare.
8004 * valops.c (value_union_variant): New function.
8005 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
8006 (struct discriminant_info): New.
8007 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
8008 enumerator.
8009 (struct main_type) <flag_discriminated_union>: New field.
8010
8011 2018-02-26 Tom Tromey <tom@tromey.com>
8012
8013 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8014 unittests/unpack-selftests.c.
8015 * unittests/unpack-selftests.c: New file.
8016 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
8017
8018 2018-02-26 Yao Qi <yao.qi@linaro.org>
8019
8020 * dwarf2read.c (struct partial_die_info) <read>: New method.
8021 (read_partial_die): Remove the declaration.
8022 (load_partial_dies): Update.
8023 (partial_die_info::partial_die_info):
8024 (read_partial_die): Change it to partial_die_info::read.
8025
8026 2018-02-26 Yao Qi <yao.qi@linaro.org>
8027
8028 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
8029 (fixup_partial_die): Remove declaration.
8030 (scan_partial_symbols): Update.
8031 (partial_die_parent_scope): Likewise.
8032 (partial_die_full_name): Likewise.
8033 (fixup_partial_die): Change it to partial_die_info::fixup.
8034
8035 2018-02-26 Yao Qi <yao.qi@linaro.org>
8036
8037 * dwarf2read.c (read_partial_die): Update the declaration.
8038 (load_partial_dies): Caller update.
8039 (read_partial_die): Remove one argument abbrev_len.
8040
8041 2018-02-26 Yao Qi <yao.qi@linaro.org>
8042
8043 * dwarf2read.c (struct partial_die_info): Add ctor, delete
8044 assignment operator.
8045 (load_partial_dies): Use ctor and copy ctor.
8046 (read_partial_die): Update.
8047 (dwarf2_cu::find_partial_die): Use ctor.
8048
8049 2018-02-26 Yao Qi <yao.qi@linaro.org>
8050
8051 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
8052 (find_partial_die_in_comp_unit): Change it to
8053 dwarf2_cu::find_partial_die.
8054 (find_partial_die): Update.
8055
8056 2018-02-26 Yao Qi <yao.qi@linaro.org>
8057
8058 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
8059 is NULL.
8060
8061 2018-02-26 Yao Qi <yao.qi@linaro.org>
8062
8063 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
8064
8065 2018-02-26 Alan Hayward <alan.hayward@arm.com>
8066
8067 * arch/amd64.h: Use common/tdesc.h.
8068 * arch/i386.c: Likewise.
8069 * arch/i386.h: Likewise.
8070 * arch/tic6x.c: Likewise.
8071 * arch/tdesc.h: Move file from here...
8072 * common/tdesc.h: ...to here.
8073 * features/aarch64-core.c: Regenerate.
8074 * features/aarch64-fpu.c: Regenerate.
8075 * features/i386/32bit-avx.c: Regenerate.
8076 * features/i386/32bit-avx512.c: Regenerate.
8077 * features/i386/32bit-core.c: Regenerate.
8078 * features/i386/32bit-linux.c: Regenerate.
8079 * features/i386/32bit-mpx.c: Regenerate.
8080 * features/i386/32bit-pkeys.c: Regenerate.
8081 * features/i386/32bit-sse.c: Regenerate.
8082 * features/i386/64bit-avx.c: Regenerate.
8083 * features/i386/64bit-avx512.c: Regenerate.
8084 * features/i386/64bit-core.c: Regenerate.
8085 * features/i386/64bit-linux.c: Regenerate.
8086 * features/i386/64bit-mpx.c: Regenerate.
8087 * features/i386/64bit-pkeys.c: Regenerate.
8088 * features/i386/64bit-segments.c: Regenerate.
8089 * features/i386/64bit-sse.c: Regenerate.
8090 * features/i386/x32-core.c: Regenerate.
8091 * features/tic6x-c6xp.c: Regenerate.
8092 * features/tic6x-core.c: Regenerate.
8093 * features/tic6x-gp.c: Regenerate.
8094 * target-descriptions.c: Use common/tdesc.h.
8095 * target-descriptions.h: Likewise.
8096
8097 2018-02-24 Tom Tromey <tom@tromey.com>
8098
8099 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
8100 (try_thread_db_load_from_dir, thread_db_load_search): Use
8101 std::string.
8102 (info_auto_load_libthread_db_compare): Return bool. Change
8103 argument types.
8104 (info_auto_load_libthread_db): Use std::vector, std::string.
8105 Remove cleanups.
8106
8107 2018-02-24 Tom Tromey <tom@tromey.com>
8108
8109 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
8110 std::string.
8111 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
8112 std::string*.
8113 * gdbarch.c: Rebuild.
8114 * gdbarch.h: Rebuild.
8115 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
8116 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
8117 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
8118 std::string*.
8119
8120 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
8121
8122 * gdbtypes.h (sect_offset): Change type to uint64_t.
8123 (sect_offset_str): New function.
8124 * dwarf2read.c (create_addrmap_from_aranges): Use
8125 sect_offset_str.
8126 (error_check_comp_unit_head): Likewise.
8127 (create_debug_type_hash_table): Likewise.
8128 (read_cutu_die_from_dwo): Likewise.
8129 (init_cutu_and_read_dies): Likewise.
8130 (init_cutu_and_read_dies_no_follow): Likewise.
8131 (process_psymtab_comp_unit_reader): Likewise.
8132 (partial_die_parent_scope): Likewise.
8133 (peek_die_abbrev): Likewise.
8134 (process_queue): Likewise.
8135 (dwarf2_physname): Likewise.
8136 (read_namespace_alias): Likewise.
8137 (read_import_statement): Likewise.
8138 (create_dwo_cu_reader): Likewise.
8139 (create_cus_hash_table): Likewise.
8140 (lookup_dwo_cutu): Likewise.
8141 (inherit_abstract_dies): Likewise.
8142 (read_func_scope): Likewise.
8143 (read_call_site_scope): Likewise.
8144 (dwarf2_add_member_fn): Likewise.
8145 (read_common_block): Likewise.
8146 (read_module_type): Likewise.
8147 (read_typedef): Likewise.
8148 (read_subrange_type): Likewise.
8149 (load_partial_dies): Likewise.
8150 (read_partial_die): Likewise.
8151 (find_partial_die): Likewise.
8152 (read_str_index): Likewise.
8153 (dwarf2_string_attr): Likewise.
8154 (build_error_marker_type): Likewise.
8155 (lookup_die_type): Likewise.
8156 (dump_die_shallow): Likewise.
8157 (follow_die_ref): Likewise.
8158 (dwarf2_fetch_die_loc_sect_off): Likewise.
8159 (dwarf2_fetch_constant_bytes): Likewise.
8160 (follow_die_sig): Likewise.
8161 (get_signatured_type): Likewise.
8162 (get_DW_AT_signature_type): Likewise.
8163 (dwarf2_find_containing_comp_unit): Likewise.
8164 (set_die_type): Likewise.
8165
8166 2018-02-21 John Baldwin <jhb@FreeBSD.org>
8167
8168 * arch/aarch64.c: Include "common-defs.h".
8169 * arch/amd64.c: Likewise.
8170 * arch/i386.c: Likewise.
8171
8172 2018-02-21 Tom Tromey <tom@tromey.com>
8173
8174 * value.h: (extract_field_op): Update.
8175 * eval.c (extract_field_op): Return a const char *.
8176 * expression.h (parse_expression_for_completion): Update.
8177 * completer.c (complete_expression): Update.
8178 (add_struct_fields): Make fieldname const.
8179 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
8180 (mark_completion_tag, parse_exp_in_context_1): Update.
8181 (parse_expression_for_completion): Change "name" to
8182 unique_xmalloc_ptr*.
8183
8184 2018-02-21 Tom Tromey <tom@tromey.com>
8185
8186 * infcall.c (call_function_by_hand_dummy): Use std::vector.
8187
8188 2018-02-21 Yao Qi <yao.qi@linaro.org>
8189
8190 * avr-tdep.c (avr_read_pc): Change parameter type to
8191 readable_regcache.
8192 * gdbarch.sh (read_pc): Likewise.
8193 * gdbarch.c: Re-generated.
8194 * gdbarch.h: Re-generated.
8195 * hppa-tdep.c (hppa_read_pc): Change parameter type to
8196 readable_regcache.
8197 * ia64-tdep.c (ia64_read_pc): Likewise.
8198 * mips-tdep.c (mips_read_pc): Likewise.
8199 * spu-tdep.c (spu_read_pc): Likewise.
8200
8201 2018-02-21 Yao Qi <yao.qi@linaro.org>
8202
8203 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
8204 * regcache-dump.c: New file.
8205 * regcache.c: Move register_dump to regcache-dump.c.
8206 (maintenance_print_registers): Likewise.
8207 (maintenance_print_raw_registers): Likewise.
8208 (maintenance_print_cooked_registers): Likewise.
8209 (maintenance_print_register_groups): Likewise.
8210 (maintenance_print_remote_registers): Likewise.
8211 (_initialize_regcache): Likewise.
8212 * regcache.h (register_dump): Moved from regcache.c.
8213
8214 2018-02-21 Yao Qi <yao.qi@linaro.org>
8215
8216 * regcache.c (regcache::regcache): Update.
8217 (regcache::invalidate): Move it to detached_regcache::invalidate.
8218 (get_thread_arch_aspace_regcache): Update.
8219 (regcache::raw_update): Update.
8220 (regcache::cooked_read): Remove some code.
8221 (regcache::cooked_read_value): Likewise.
8222 (regcache::raw_write): Remove assert on m_readonly_p.
8223 (regcache::raw_supply_integer): Move it to
8224 detached_regcache::raw_supply_integer.
8225 (regcache::raw_supply_zeroed): Likewise.
8226 * regcache.h (detached_regcache) <raw_supply_integer>: New
8227 declaration.
8228 <raw_supply_zeroed, invalidate>: Likewise.
8229 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
8230 <invalidate>: Likewise.
8231 <m_readonly_p>: Removed.
8232
8233 2018-02-21 Yao Qi <yao.qi@linaro.org>
8234
8235 * infcmd.c (get_return_value): Let stop_regs point to
8236 get_current_regcache.
8237 * regcache.c (regcache::regcache): Remove.
8238 (register_dump_reg_buffer): New class.
8239 (regcache_print): Adjust.
8240 * regcache.h (regcache): Remove constructors.
8241
8242 2018-02-21 Yao Qi <yao.qi@linaro.org>
8243
8244 * regcache.c (class register_dump): New class.
8245 (register_dump_regcache, register_dump_none): New class.
8246 (register_dump_remote, register_dump_groups): New class.
8247 (regcache_print): Update.
8248 * regcache.h (regcache_dump_what): Move it to regcache.c.
8249 (regcache) <dump>: Remove.
8250
8251 2018-02-21 Yao Qi <yao.qi@linaro.org>
8252
8253 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
8254 reg_buffer_rw *.
8255 (jit_unwind_reg_set_impl): Call raw_supply.
8256 (jit_frame_sniffer): Use reg_buffer_rw.
8257 * record-full.c (record_full_core_regbuf): Change its type.
8258 (record_full_core_open_1): Use reg_buffer_rw.
8259 (record_full_close): Likewise.
8260 (record_full_core_fetch_registers): Use regcache->raw_supply.
8261 (record_full_core_store_registers): Likewise.
8262 * regcache.c (regcache::get_register_status): Move it to
8263 reg_buffer.
8264 (regcache_raw_set_cached_value): Remove.
8265 (regcache::raw_set_cached_value): Remove.
8266 (regcache::raw_write): Call raw_supply.
8267 (regcache::raw_supply): Move it to reg_buffer_rw.
8268 * regcache.h (regcache_raw_set_cached_value): Remove.
8269 (reg_buffer_rw): New class.
8270
8271 2018-02-21 Yao Qi <yao.qi@linaro.org>
8272
8273 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
8274 readonly_detached_regcache.
8275 (dummy_frame_prev_register): Use regcache->cooked_read.
8276 * frame.c (frame_save_as_regcache): Change return type.
8277 (frame_pop): Update.
8278 * frame.h (frame_save_as_regcache): Update declaration.
8279 * inferior.h (get_infcall_suspend_state_regcache): Update
8280 declaration.
8281 * infrun.c (infcall_suspend_state) <registers>: use
8282 readonly_detached_regcache.
8283 (save_infcall_suspend_state): Don't use regcache_dup.
8284 (get_infcall_suspend_state_regcache): Change return type.
8285 * linux-fork.c (struct fork_info) <savedregs>: Change to
8286 readonly_detached_regcache.
8287 <pc>: New field.
8288 (fork_save_infrun_state): Don't use regcache_dup.
8289 (info_checkpoints_command): Adjust.
8290 * mi/mi-main.c (register_changed_p): Update declaration.
8291 (mi_cmd_data_list_changed_registers): Use
8292 readonly_detached_regcache.
8293 (register_changed_p): Change parameter type to
8294 readonly_detached_regcache.
8295 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
8296 readonly_detached_regcache.
8297 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
8298 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
8299 New.
8300 (regcache::save): Move it to reg_buffer.
8301 (regcache::restore): Change parameter type.
8302 (regcache_dup): Remove.
8303 * regcache.h (reg_buffer) <save>: New method.
8304 (readonly_detached_regcache): New class.
8305 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
8306 readonly_detached_regcache.
8307 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
8308
8309 2018-02-21 Yao Qi <yao.qi@linaro.org>
8310
8311 * frame.c (frame_save_as_regcache): Use regcache method save.
8312 (frame_pop): Use regcache method restore.
8313 * infrun.c (restore_infcall_suspend_state): Likewise.
8314 * linux-fork.c (fork_load_infrun_state): Likewise.
8315 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
8316 save.
8317 * regcache.c (regcache_save): Remove.
8318 (regcache::restore): More asserts.
8319 (regcache_cpy): Remove.
8320 * regcache.h (regcache_save): Remove the declaration.
8321 (regcache::restore): Move from private to public.
8322 Remove the friend declaration of regcache_cpy.
8323 (regcache_cpy): Remove declaration.
8324
8325 2018-02-21 Yao Qi <yao.qi@linaro.org>
8326
8327 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
8328 parameter type to 'readable_regcache *'.
8329 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
8330 * arm-tdep.c (arm_neon_quad_read): Likewise.
8331 (arm_pseudo_read): Likewise.
8332 * avr-tdep.c (avr_pseudo_register_read): Likewise.
8333 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
8334 * frv-tdep.c (frv_pseudo_register_read): Likewise.
8335 * gdbarch.c: Re-generated.
8336 * gdbarch.h: Re-generated.
8337 * gdbarch.sh (pseudo_register_read): Change parameter type to
8338 'readable_regcache *'.
8339 (pseudo_register_read_value): Likewise.
8340 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
8341 (h8300_pseudo_register_read): Likewise.
8342 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
8343 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
8344 (i386_pseudo_register_read_into_value): Likewise.
8345 (i386_pseudo_register_read_value): Likewise.
8346 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
8347 declaration.
8348 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
8349 * m32c-tdep.c (m32c_raw_read): Likewise.
8350 (m32c_read_flg): Likewise.
8351 (m32c_banked_register): Likewise.
8352 (m32c_banked_read): Likewise.
8353 (m32c_sb_read): Likewise.
8354 (m32c_part_read): Likewise.
8355 (m32c_cat_read): Likewise.
8356 (m32c_r3r2r1r0_read): Likewise.
8357 (m32c_pseudo_register_read): Likewise.
8358 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
8359 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
8360 (mep_pseudo_cr64_read): Likewise.
8361 (mep_pseudo_register_read): Likewise.
8362 * mips-tdep.c (mips_pseudo_register_read): Likewise.
8363 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
8364 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
8365 * regcache.c (regcache::raw_read): Move it to readable_regcache.
8366 (regcache::cooked_read): Likewise.
8367 (regcache::cooked_read_value): Likewise.
8368 (regcache_cooked_read_signed):
8369 (regcache::cooked_read): Likewise.
8370 * regcache.h (readable_regcache): New class.
8371 (regcache): Inherit readable_regcache. Move some methods to
8372 readable_regcache.
8373 * rl78-tdep.c (rl78_pseudo_register_read): Change
8374 parameter type to 'readable_regcache *'.
8375 * rs6000-tdep.c (do_regcache_raw_read): Remove.
8376 (e500_pseudo_register_read): Change parameter type to
8377 'readable_regcache *'.
8378 (dfp_pseudo_register_read): Likewise.
8379 (vsx_pseudo_register_read): Likewise.
8380 (efpr_pseudo_register_read): Likewise.
8381 * s390-tdep.c (s390_pseudo_register_read): Likewise.
8382 * sh-tdep.c (sh_pseudo_register_read): Likewise.
8383 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
8384 (sh64_pseudo_register_read): Likewise.
8385 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
8386 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
8387 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
8388 (spu_pseudo_register_read): Likewise.
8389 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
8390 (xtensa_pseudo_register_read): Likewise.
8391
8392 2018-02-21 Yao Qi <yao.qi@linaro.org>
8393
8394 * regcache.c (regcache::regcache): Call reg_buffer ctor.
8395 (regcache::arch): Move it to reg_buffer::arch.
8396 (regcache::register_buffer): Likewise.
8397 (regcache::assert_regnum): Likewise.
8398 (regcache::num_raw_registers): Likewise.
8399 * regcache.h (reg_buffer): New class.
8400 (regcache): Inherit reg_buffer.
8401
8402 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
8403
8404 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
8405 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
8406
8407 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
8408
8409 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
8410
8411 2018-02-19 Alan Hayward <alan.hayward@arm.com>
8412
8413 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
8414 (SFILES): Remove common/*.c files.
8415 (COMMON_OBS): Remove some *.o files built from common/*.c files.
8416 * common/common.host: Add common reference.
8417 * configure.ac: Likewise.
8418 * configure: Regenerate.
8419
8420 2018-02-16 Yao Qi <yao.qi@linaro.org>
8421
8422 * block.c (block_namespace_info): Inherit allocate_on_obstack.
8423 (block_initialize_namespace): Use new.
8424 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
8425 (dwarf2_free_objfile): Use delete.
8426 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
8427 (copy_type_recursive): Use new.
8428 * gdb_obstack.h (allocate_on_obstack): New.
8429
8430 2018-02-15 Yao Qi <yao.qi@linaro.org>
8431
8432 PR gdb/22849
8433 * inferior.c (exit_inferior_1): Reset inf->control.
8434
8435 2018-02-15 Joel Brobecker <brobecker@adacore.com>
8436
8437 * ada-lang.c (ada_to_fixed_value_create): Delete advance
8438 declaration.
8439
8440 2018-02-14 Pedro Alves <palves@redhat.com>
8441
8442 * frame-unwind.c (frame_unwind_try_unwinder): Always call
8443 frame_cleanup_after_sniffer on exception.
8444
8445 2018-02-14 Tom Tromey <tom@tromey.com>
8446
8447 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
8448 const.
8449 (solib_bfd_open): Make pathname const.
8450 * solib.c (solib_bfd_open): Make pathname const.
8451 * solib-spu.c (spu_bfd_fopen): Make name const.
8452 (spu_bfd_open): Make pathname const.
8453 * solib-darwin.c (darwin_bfd_open): Make pathname const.
8454 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
8455
8456 2018-02-14 Tom Tromey <tom@tromey.com>
8457
8458 * symfile.c (symfile_bfd_open): Update.
8459 * source.h (openp, source_full_path_of, find_and_open_source):
8460 Change argument type to unique_xmalloc_ptr.
8461 * source.c (openp): Take a unique_xmalloc_ptr.
8462 (source_full_path_of, find_and_open_source): Likewise.
8463 (open_source_file, symtab_to_fullname): Update.
8464 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
8465 unique_xmalloc_ptr.
8466 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
8467 (exec_file_find): Update.
8468 * psymtab.c (psymtab_to_fullname): Update.
8469 * nto-tdep.h (nto_find_and_open_solib): Update.
8470 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
8471 unique_xmalloc_ptr.
8472 * exec.c (exec_file_attach): Update.
8473 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
8474 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
8475
8476 2018-02-14 Tom Tromey <tom@tromey.com>
8477
8478 * solib.c: Include source.h.
8479 * nto-tdep.c: Include source.h.
8480 * mi/mi-cmd-env.c: Include source.h.
8481 * infcmd.c: Include source.h.
8482 * exec.c: Include source.h.
8483 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
8484 (add_path, directory_switch, source_path, init_source_path): Move
8485 declarations...
8486 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
8487 (add_path, directory_switch, source_path, init_source_path):
8488 ...here.
8489
8490 2018-02-14 Tom Tromey <tom@tromey.com>
8491
8492 * solist.h (exec_file_find, solib_find): Return
8493 unique_xmalloc_ptr.
8494 (solib_bfd_fopen): Take a const char *.
8495 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
8496 (exec_file_find, solib_find): Likewise.
8497 (solib_bfd_fopen): Do not take ownership of "pathname".
8498 (solib_bfd_open): Use unique_xmalloc_ptr.
8499 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
8500 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
8501 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
8502 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
8503
8504 2018-02-14 Joel Brobecker <brobecker@adacore.com>
8505
8506 * ada-lang.c (name_match_type_from_name): Remove reference to
8507 ada_name_for_lookup in function's documentation.
8508 * ada-lang.h (ada_name_for_lookup): Delete declaration.
8509
8510 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
8511
8512 * defs.h (enum openp_flags): New enum.
8513 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
8514 Move to enum openp_flags.
8515 (openp_flags): New enum flags.
8516 (openp): Change parameter type to openp_flags.
8517 * source.c (openp): Change parameter type to openp_flags.
8518 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
8519 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
8520
8521 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
8522
8523 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
8524 per-command.
8525
8526 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
8527
8528 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
8529 into...
8530 (class dwarf2_queue_guard): ...the destructor of this new class.
8531 (dw2_do_instantiate_symtab): Create instance of the new class
8532 dwarf2_queue_guard, remove cleanup.
8533
8534 2018-02-09 Tom Tromey <tom@tromey.com>
8535
8536 * source.c (find_source_lines): Don't reference past the end of
8537 the vector.
8538
8539 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8540
8541 * remote.c (remote_btrace_maybe_reopen): Change error message.
8542 * btrace.c (btrace_enable): Likewise.
8543 (parse_xml_btrace): Likewise.
8544 (parse_xml_btrace_conf): Likewise.
8545
8546 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8547
8548 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
8549 (linux_enable_pt, linux_enable_bts): Call
8550 diagnose_perf_event_open_fail.
8551
8552 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8553
8554 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
8555 Remove parameter and change return type. Update callers. Move it.
8556 (linux_enable_bts, linux_enable_pt): Improve error message.
8557 (linux_enable_pt): Remove zero buffer size check.
8558 (linux_enable_btrace): Improve error messages. Remove NULL return
8559 check.
8560
8561 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8562
8563 * btrace.c (btrace_enable): Remove target_supports_btrace call.
8564 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
8565 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
8566 (linux_supports_pt, linux_supports_btrace): Remove.
8567 (linux_enable_bts): Call cpu_supports_bts.
8568 * nat/linux-btrace.h (linux_supports_btrace): Remove.
8569 * remote.c (remote_supports_btrace): Remove.
8570 (init_remote_ops): Remove remote_supports_btrace.
8571 * target-delegates.c: Regenerated.
8572 * target.c (target_supports_btrace): Remove.
8573 * target.h (target_ops) <to_supports_btrace>: Remove
8574 (target_supports_btrace): Remove.
8575 * x86-linux-nat.c (x86_linux_create_target): Remove
8576 linux_supports_btrace.
8577
8578 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8579
8580 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
8581 btrace failed.
8582 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
8583 exception and use message in own exception.
8584
8585 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8586
8587 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
8588 (perf_event_pt_event_type): Use gdb_file_up.
8589 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
8590 scoped_fd, and scoped_mmap.
8591
8592 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8593
8594 * common/scoped_mmap.h: New.
8595 * unittests/scoped_mmap-selftest.c: New.
8596 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8597 unittests/scoped_mmap-selftest.c.
8598
8599 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8600
8601 * common/scoped_fd.h: New.
8602 * unittests/scoped_fd-selftest.c: New.
8603 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8604 unittests/scoped_fd-selftest.c.
8605
8606 2018-02-09 Tom Tromey <tom@tromey.com>
8607
8608 * auto-load.c (auto_load_section_scripts): Use
8609 gdb::unique_xmalloc_ptr.
8610
8611 2018-02-09 Tom Tromey <tom@tromey.com>
8612
8613 * auto-load.c (execute_script_contents): Use std::string.
8614
8615 2018-02-09 Joel Brobecker <brobecker@adacore.com>
8616
8617 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
8618 Python function, rather than a new command.
8619
8620 2018-02-08 Tom Tromey <tom@tromey.com>
8621
8622 * solib.c (solib_find_1): Use std::string.
8623 (solib_bfd_fopen): Use unique_xmalloc_ptr.
8624
8625 2018-02-08 Tom Tromey <tom@tromey.com>
8626
8627 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
8628
8629 2018-02-08 Tom Tromey <tom@tromey.com>
8630
8631 * source.c (find_source_lines): Use gdb::def_vector.
8632
8633 2018-02-08 Tom Tromey <tom@tromey.com>
8634
8635 * macrocmd.c (struct temporary_macro_definition): New.
8636 (macro_define_command): Use temporary_macro_definition. Remove
8637 cleanups.
8638 (free_macro_definition_ptr): Remove.
8639
8640 2018-02-08 Tom Tromey <tom@tromey.com>
8641
8642 * macroexp.c (maybe_expand): Use std::string.
8643
8644 2018-02-08 Tom Tromey <tom@tromey.com>
8645
8646 * macroexp.c (struct macro_buffer): Add initializers for some
8647 members.
8648 (init_buffer, init_shared_buffer, free_buffer)
8649 (free_buffer_return_text): Remove.
8650 (macro_buffer): New constructors.
8651 (~macro_buffer): New destructor.
8652 (macro_buffer::set_shared): New method.
8653 (macro_buffer::resize_buffer, macro_buffer::appendc)
8654 (macro_buffer::appendmem): Now methods, not free functions.
8655 (set_token, append_tokens_without_splicing, stringify)
8656 (macro_stringify): Update.
8657 (gather_arguments): Change return type. Remove argc_p argument,
8658 add args_ptr argument. Use std::vector.
8659 (substitute_args): Remove argc argument. Accept std::vector.
8660 (expand): Update. Use std::vector.
8661 (scan, macro_expand, macro_expand_next): Update.
8662
8663 2018-02-08 Tom Tromey <tom@tromey.com>
8664
8665 * symtab.c (default_collect_symbol_completion_matches_break_on):
8666 Use unique_xmalloc_ptr.
8667 * macroscope.h: (sal_macro_scope, user_macro_scope)
8668 (default_macro_scope): Return unique_xmalloc_ptr.
8669 * macroscope.c (sal_macro_scope, user_macro_scope)
8670 (default_macro_scope): Return unique_xmalloc_ptr.
8671 * macroexp.h (macro_expand, macro_expand_once): Return
8672 unique_xmalloc_ptr.
8673 * macroexp.c (macro_expand, macro_expand_once): Return
8674 unique_xmalloc_ptr.
8675 * macrocmd.c (macro_expand_command, macro_expand_once_command)
8676 (info_macro_command, info_macros_command): Use
8677 unique_xmalloc_ptr.
8678 * compile/compile-c-support.c (write_macro_definitions): Use
8679 unique_xmalloc_ptr.
8680 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
8681
8682 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
8683
8684 * value.c (value_static_field): Assign field type instead of
8685 containing type when returning an optimized out value.
8686
8687 2018-02-06 Yao Qi <yao.qi@linaro.org>
8688
8689 * ft32-tdep.c (ft32_read_pc): Remove.
8690 (ft32_write_pc): Remove.
8691 (ft32_gdbarch_init): Update.
8692 * m32r-tdep.c (m32r_read_pc): Remove.
8693 (m32r_gdbarch_init): Update.
8694 * mep-tdep.c (mep_read_pc): Remove.
8695 (mep_gdbarch_init): Update.
8696 * microblaze-tdep.c (microblaze_write_pc): Remove.
8697 (microblaze_gdbarch_init): Update.
8698 * mn10300-tdep.c (mn10300_read_pc): Remove.
8699 (mn10300_write_pc): Remove.
8700 (mn10300_gdbarch_init): Update.
8701 * moxie-tdep.c (moxie_read_pc): Remove.
8702 (moxie_write_pc): Remove.
8703 (moxie_gdbarch_init): Update.
8704
8705 2018-02-06 Yao Qi <yao.qi@linaro.org>
8706
8707 * expprint.c (print_subexp_standard): Handle
8708 OP_F77_UNDETERMINED_ARGLIST.
8709 (dump_subexp_body_standard): Likewise.
8710
8711 2018-02-05 Alan Hayward <alan.hayward@arm.com>
8712
8713 * target-descriptions.c (tdesc_element_visitor) Add empty
8714 implementations.
8715 (tdesc_type): Move make_gdb_type from here.
8716 (tdesc_type_builtin): Likewise.
8717 (tdesc_type_vector): Likewise.
8718 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
8719 (make_gdb_type_struct): Move from tdesc_type_with_fields.
8720 (make_gdb_type_union): Likewise.
8721 (make_gdb_type_flags): Likewise.
8722 (make_gdb_type_enum): Likewise.
8723 (make_gdb_type): New function.
8724 (tdesc_register_type): Use static make_gdb_type.
8725
8726 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
8727
8728 * infcmd.c (default_print_one_register_info): Align natural-format
8729 column values consistently one under another.
8730 (pad_to_column): New function.
8731
8732 2018-02-05 Joel Brobecker <brobecker@adacore.com>
8733
8734 * dwarf2read.c (dwarf2_physname): Move commment.
8735
8736 2018-02-01 Leszek Swirski <leszeks@google.com>
8737
8738 * varobj.c (varobj_formatted_print_options): Allow recursive
8739 pretty printing if pretty printing is enabled.
8740
8741 2018-02-01 Leszek Swirski <leszeks@google.com>
8742
8743 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
8744 names after a structop as a filename.
8745
8746 2018-02-01 Yao Qi <yao.qi@linaro.org>
8747
8748 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
8749 (arm_record_coproc_data_proc): Likewise.
8750
8751 2018-02-01 Yao Qi <yao.qi@linaro.org>
8752
8753 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
8754
8755 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
8756
8757 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
8758 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
8759
8760 2018-01-31 Pedro Alves <palves@redhat.com>
8761
8762 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
8763 * inflow.c (child_terminal_save_inferior): Wrap reference to
8764 tcgetpgrp in HAVE_TERMIOS_H.
8765 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
8766 _WIN32.
8767 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
8768 always iterate over all inferiors.
8769 (gdbsim_cntrl_c): Adjust.
8770 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
8771
8772 2018-01-31 Joel Brobecker <brobecker@adacore.com>
8773
8774 * gdbtypes.c (lookup_array_range_type): Make sure the array's
8775 index type is objfile-owned if the element type is as well.
8776
8777 2018-01-31 Joel Brobecker <brobecker@adacore.com>
8778
8779 GDB 8.1 released.
8780
8781 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
8782
8783 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
8784 "features/s390x-linux64.c".
8785 (_initialize_s390_linux_tdep): Remove initialization of tdescs
8786 s390_linux32 and s390x_linux64.
8787 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
8788 default tdesc.
8789 * s390-tdep.c: Include "features/s390-linux32.c" and
8790 "features/s390x-linux64.c".
8791 (s390_tdesc_valid): Add check for tdesc_has_registers.
8792 (s390_gdbarch_init): Make sure there is always a valid tdesc.
8793 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
8794 tdesc_s390x_linux64.
8795 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
8796 tdesc_s390x_linux64 to...
8797 * s390-tdep.h: ...here.
8798
8799 2018-01-30 Pedro Alves <palves@redhat.com>
8800
8801 PR gdb/13211
8802 * config.in, configure: Regenerate.
8803 * configure.ac: Check for getpgid.
8804 * go32-nat.c (go32_pass_ctrlc): New.
8805 (go32_target): Install it.
8806 * inf-child.c (inf_child_target): Install
8807 child_terminal_save_inferior, child_pass_ctrlc and
8808 child_interrupt.
8809 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
8810 (inf_ptrace_target): No longer install it.
8811 * infcmd.c (interrupt_target_1): Adjust.
8812 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
8813 (child_interrupt): Declare.
8814 (inferior::terminal_state): New.
8815 * inflow.c (struct terminal_info): Update comments.
8816 (inferior_process_group): Delete.
8817 (terminal_is_ours): Delete.
8818 (gdb_tty_state): New.
8819 (child_terminal_init): Adjust.
8820 (is_gdb_terminal, sharing_input_terminal_1)
8821 (sharing_input_terminal): New functions.
8822 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
8823 Set the process's actual process group in the foreground if
8824 possible. Handle is_ours_for_output/is_ours distinction. Don't
8825 mark terminal as the inferior's if not sharing GDB's terminal.
8826 Don't check attach_flag.
8827 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
8828 pass down a target_terminal_state.
8829 (child_terminal_save_inferior): New, factored out from ...
8830 (child_terminal_ours_1): ... this. Handle
8831 target_terminal_state::is_ours_for_output.
8832 (child_interrupt, child_pass_ctrlc): New.
8833 (inflow_inferior_exit): Clear the inferior's terminal_state.
8834 (copy_terminal_info): Copy the inferior's terminal state.
8835 (_initialize_inflow): Remove reference to terminal_is_ours.
8836 * inflow.h (inferior_process_group): Delete.
8837 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
8838 * procfs.c (procfs_target): Don't install procfs_interrupt.
8839 (procfs_interrupt): Delete.
8840 * remote.c (remote_serial_quit_handler): Adjust.
8841 (remote_interrupt): Remove ptid parameter. Adjust.
8842 * target-delegates.c: Regenerate.
8843 * target.c: Include "terminal.h".
8844 (target_terminal::terminal_state): Rename to ...
8845 (target_terminal::m_terminal_state): ... this.
8846 (target_terminal::init): Adjust.
8847 (target_terminal::inferior): Adjust to per-inferior
8848 terminal_state.
8849 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
8850 (target_terminal::ours, target_terminal::ours_for_output): Use
8851 target_terminal_is_ours_kind.
8852 (target_interrupt): Remove ptid parameter. Adjust.
8853 (default_target_pass_ctrlc): Adjust.
8854 * target.h (target_ops::to_terminal_save_inferior): New field.
8855 (target_ops::to_interrupt): Remove ptid_t parameter.
8856 (target_interrupt): Remove ptid_t parameter. Update comment.
8857 (target_pass_ctrlc): Update comment.
8858 * target/target.h (target_terminal_state): New scoped enum,
8859 factored out of ...
8860 (target_terminal::terminal_state): ... here.
8861 (target_terminal::inferior): Update comments.
8862 (target_terminal::restore_inferior): New.
8863 (target_terminal::is_inferior, target_terminal::is_ours)
8864 (target_terminal::is_ours_for_output): Adjust.
8865 (target_terminal::scoped_restore_terminal_state): Adjust to
8866 rename, and call restore_inferior() instead of inferior().
8867 (target_terminal::scoped_restore_terminal_state::m_state): Change
8868 type.
8869 (target_terminal::terminal_state): Rename to ...
8870 (target_terminal::m_terminal_state): ... this and change type.
8871
8872 2018-01-30 Pedro Alves <palves@redhat.com>
8873
8874 * linux-nat.c (wait_for_signal): New function.
8875 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
8876 directly.
8877 (async_terminal_is_ours)
8878 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
8879 (linux_nat_add_target): Don't override
8880 to_terminal_inferior/to_terminal_ours.
8881
8882 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
8883
8884 * remote.c (remote_follow_fork): Don't call "detach_inferior".
8885
8886 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
8887
8888 * dwarf2read.c (free_dwo_files): Add forward-declaration.
8889 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
8890 dwarf2_per_objfile_free here.
8891 (dwarf2_per_objfile_free): Remove.
8892 (_initialize_dwarf2_read): Don't register
8893 dwarf2_per_objfile_free as a registry cleanup.
8894
8895 2018-01-27 Eli Zaretskii <eliz@gnu.org>
8896
8897 Avoid compilation errors in MinGW native builds
8898
8899 The error is triggered by including python-internal.h, and the
8900 error message is:
8901
8902 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
8903 from build-gnulib/import/math.h:27,
8904 from d:/usr/Python26/include/pyport.h:235,
8905 from d:/usr/Python26/include/Python.h:58,
8906 from python/python-internal.h:94,
8907 from python/py-arch.c:24:
8908 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
8909 using ::hypot;
8910 ^~~~~
8911
8912 This happens because Python headers define 'hypot' to expand t
8913 '_hypot' in the Windows builds.
8914 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
8915 'hypoth'. This avoids a compilation error.
8916
8917 2018-01-26 Alan Hayward <alan.hayward@arm.com>
8918
8919 * MAINTAINERS (Write After Approval): Fix ordering.
8920
8921 2018-01-26 Alan Hayward <alan.hayward@arm.com>
8922
8923 * MAINTAINERS (Write After Approval): Add Alan Hayward.
8924
8925 2018-01-26 Alan Modra <amodra@gmail.com>
8926
8927 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
8928 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
8929 Remove nop. Make const. Comment.
8930 (powerpc32_plt_stub_so_2): New.
8931 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
8932 Correct count. Update uses.
8933 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
8934 Move common code reading PLT entry word. Correct
8935 powerpc32_plt_stub PLT address calculation.
8936 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
8937 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
8938 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
8939 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
8940 (ppc64_standard_linkage8): Likewise.
8941 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
8942 Correct insns description.
8943 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
8944
8945 2018-01-24 Pedro Alves <palves@redhat.com>
8946
8947 GCC PR libstdc++/83906
8948 * gdbtypes.c (operator==(const dynamic_prop &,
8949 const dynamic_prop &)): New.
8950 (operator==(const range_bounds &, const range_bounds &)): New.
8951 (check_types_equal): Use them instead of memcmp.
8952 * gdbtypes.h (operator==(const dynamic_prop &,
8953 const dynamic_prop &)): Declare.
8954 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
8955 (operator==(const range_bounds &, const range_bounds &)): Declare.
8956 (operator!=(const range_bounds &, const range_bounds &)): Declare.
8957
8958 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8959
8960 * s390-linux-tdep.c (s390_record_address_mask)
8961 (s390_record_calc_disp_common, s390_record_calc_disp)
8962 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
8963 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
8964 (s390_process_record): Move to s390-tdep.c.
8965 (s390_linux_init_abi_any): Adjust.
8966 * s390-tdep.c (s390_record_address_mask)
8967 (s390_record_calc_disp_common, s390_record_calc_disp)
8968 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
8969 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
8970 (s390_process_record): Moved from s390-linux-tdep.c
8971 (s390_gdbarch_init): Adjust.
8972
8973 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8974
8975 * s390-linux-nat.c (s390-tdep.h): New include.
8976 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
8977 (HFILES_NO_SRCDIR): Add s390-tdep.h.
8978 (ALLDEPFILES): Add s390-tdep.c.
8979 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
8980 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
8981 * s390-tdep.h: ...this. New file.
8982 * s390-linux-tdep.c (s390-tdep.h): New include.
8983 (_initialize_s390_tdep): Rename to...
8984 (_initialize_s390_linux_tdep): ...this and adjust.
8985 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
8986 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
8987 s390-tdep.h.
8988 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
8989 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
8990 (s390_is_partial_instruction, s390_software_single_step)
8991 (is_non_branch_ril, s390_displaced_step_copy_insn)
8992 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
8993 (s390_prologue_data, s390_addr, s390_store, s390_load)
8994 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
8995 (s390_register_call_saved, s390_guess_tracepoint_registers)
8996 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
8997 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
8998 (s390_pseudo_register_name, s390_pseudo_register_type)
8999 (s390_pseudo_register_read, s390_pseudo_register_write)
9000 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
9001 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
9002 (s390_addr_bits_remove, s390_address_class_type_flags)
9003 (s390_address_class_type_flags_to_name)
9004 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
9005 (s390_function_arg_float, s390_function_arg_vector)
9006 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
9007 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
9008 (s390_frame_align, s390_register_return_value, s390_return_value)
9009 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
9010 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
9011 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
9012 (s390_trad_frame_prev_register, s390_unwind_cache)
9013 (s390_prologue_frame_unwind_cache)
9014 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
9015 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
9016 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
9017 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
9018 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
9019 (s390_frame_base_address, s390_local_base_address)
9020 (s390_frame_base, s390_gcc_target_options)
9021 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
9022 (s390_validate_reg_range, s390_tdesc_valid)
9023 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
9024 * s390-tdep.c: ...this. New file.
9025
9026 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9027
9028 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
9029 (s390_process_record, s390_gdbarch_tdep_alloc)
9030 (s390_linux_init_abi_any): Use/set new hook.
9031
9032 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9033
9034 * s390-linux-tdep.c (osabi.h): New include.
9035 (s390_linux_init_abi_31, s390_linux_init_abi_64)
9036 (s390_linux_init_abi_any): New functions.
9037 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
9038
9039 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9040
9041 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
9042 tdesc_has_registers check
9043
9044 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9045
9046 * s390-linux-tdep.c (s390_tdesc_valid): New function.
9047 (s390_validate_reg_range): New macro.
9048 (s390_gdbarch_init): Adjust.
9049
9050 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9051
9052 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
9053 (s390_gdbarch_tdep_alloc): Adjust.
9054 (s390_gdbarch_init): Adjust.
9055
9056 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9057
9058 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
9059 <have_tdb>: Change type to bool.
9060 (s390_gdbarch_tdep_alloc): Adjust.
9061 (s390_gdbarch_init): Adjust.
9062
9063 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9064
9065 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
9066 (gdbarch_tdep) <have_upper, have_vx>: New fields.
9067 (s390_gdbarch_tdep_alloc): New function.
9068 (s390_gdbarch_init): Allocate tdep at start and use its fields
9069 instead of separate variables.
9070
9071 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9072
9073 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
9074 when looking for cached gdbarch and add comment for remaining.
9075
9076 2018-01-22 Pedro Alves <palves@redhat.com>
9077 Sergio Durigan Junior <sergiodj@redhat.com>
9078
9079 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
9080 case.
9081
9082 2018-01-22 Maciej W. Rozycki <macro@mips.com>
9083
9084 * MAINTAINERS: Update my company e-mail address.
9085
9086 2018-01-22 Yao Qi <yao.qi@linaro.org>
9087
9088 * regcache.c (cooked_write_test): New function.
9089 (_initialize_regcache): Register the test.
9090
9091 2018-01-22 Yao Qi <yao.qi@linaro.org>
9092
9093 * ia64-tdep.c (ia64_pseudo_register_read): Call
9094 regcache->cooked_read instead of regcache_cooked_read_unsigned.
9095 * m32c-tdep.c (m32c_cat_read): Likewise.
9096 (m32c_r3r2r1r0_read): Likewise.
9097 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9098 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9099
9100 2018-01-22 Yao Qi <yao.qi@linaro.org>
9101
9102 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
9103 method raw_read instead of regcache_raw_read.
9104 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9105 * arm-tdep.c (arm_neon_quad_read): Likewise.
9106 * avr-tdep.c (avr_pseudo_register_read): Likewise.
9107 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9108 * frv-tdep.c (frv_pseudo_register_read): Likewise.
9109 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
9110 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9111 (i386_pseudo_register_read_into_value): Likewise.
9112 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9113 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9114 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9115 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
9116 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
9117 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9118 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9119 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9120 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
9121
9122 2018-01-22 Yao Qi <yao.qi@linaro.org>
9123
9124 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
9125 * configure.tgt: Remove target mt.
9126 * mt-tdep.c: Remove.
9127 * regcache.c (cooked_read_test): Remove the check for mt.
9128
9129 2018-01-22 Yao Qi <yao.qi@linaro.org>
9130
9131 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
9132 instead of gdbarch_pseudo_register_read_value.
9133
9134 2018-01-22 Joel Brobecker <brobecker@adacore.com>
9135
9136 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
9137 language is Ada.
9138
9139 2018-01-22 Joel Brobecker <brobecker@adacore.com>
9140
9141 * linespec.c (create_sals_line_offset): Remove code that preserved
9142 the symtab_and_line's line number.
9143
9144 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9145
9146 * varobj.c (varobj_create): Don't set valid_block when creating a
9147 floating varobj.
9148
9149 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9150
9151 * varobj.c (varobj_create): Remove out of date comment.
9152
9153 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9154
9155 PR mi/20395
9156 * ada-exp.y (write_var_from_sym): Pass extra parameter when
9157 updating innermost block.
9158 * parse.c (innermost_block_tracker::update): Take extra type
9159 parameter, and check types match before updating innermost block.
9160 (write_dollar_variable): Update innermost block for registers.
9161 * parser-defs.h (enum innermost_block_tracker_type): New enum.
9162 (innermost_block_tracker::innermost_block_tracker): Initialise
9163 m_types member.
9164 (innermost_block_tracker::reset): Take type parameter.
9165 (innermost_block_tracker::update): Take type parameter, and pass
9166 type through as needed.
9167 (innermost_block_tracker::m_types): New member.
9168 * varobj.c (varobj_create): Pass type when reseting innermost
9169 block.
9170
9171 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9172
9173 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
9174 * ada-lang.c (resolve_subexp): Likewise.
9175 * breakpoint.c (set_breakpoint_condition) Likewise.
9176 (watch_command_1) Likewise.
9177 * c-exp.y (variable): Likewise.
9178 * d-exp.y (PrimaryExpression): Likewise.
9179 * f-exp.y (variable): Likewise.
9180 * go-exp.y (variable): Likewise.
9181 * m2-exp.y (variable): Likewise.
9182 * objfiles.c (objfile::~objfile): Likewise.
9183 * p-exp.y (variable): Likewise.
9184 * parse.c (innermost_block): Change type.
9185 * parser-defs.h (class innermost_block_tracker): New.
9186 (innermost_block): Change to innermost_block_tracker.
9187 * printcmd.c (display_command): Switch to innermost_block API.
9188 (do_one_display): Likewise.
9189 * rust-exp.y (do_one_display): Likewise.
9190 * symfile.c (clear_symtab_users): Likewise.
9191 * varobj.c (varobj_create): Switch to innermost_block API, replace
9192 use of innermost_block with block stored on varobj object.
9193
9194 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9195
9196 * expression.h (innermost_block): Remove declaration.
9197 * varobj.c: Add 'parser-defs.h' include.
9198
9199 2018-01-19 Tom Tromey <tom@tromey.com>
9200
9201 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
9202 symbols in the static and global blocks.
9203
9204 2018-01-19 James Clarke <jrtc27@jrtc27.com>
9205
9206 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
9207 gdb_ptrace.h, and move including gdb_wait.h ...
9208 * nat/linux-ptrace.h: ... to here.
9209
9210 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
9211
9212 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
9213 inf_ptrace_detach_success.
9214 (inf_ptrace_detach_success): Add inferior parameter, use it
9215 instead of inferior_ptid, pass it to detach_inferior.
9216 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
9217 parameter.
9218 * inferior.c (detach_inferior): Add overload that takes an
9219 inferior object.
9220 * inferior.h (detach_inferior): Likewise.
9221 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
9222 use inferior_ptid, adjust call to inf_ptrace_detach_success.
9223 * linux-thread-db.c (thread_db_detach): Use inf parameter.
9224
9225 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
9226
9227 * target.h (struct target_ops) <to_detach>: Add inferior
9228 parameter.
9229 (target_detach): Likewise.
9230 * target.c (dispose_inferior): Pass inferior down.
9231 (target_detach): Pass inferior down. Assert that it is equal to
9232 the current inferior.
9233 * aix-thread.c (aix_thread_detach): Pass inferior down.
9234 * corefile.c (core_file_command): Pass current_inferior() down.
9235 * corelow.c (core_detach): Add inferior parameter.
9236 * darwin-nat.c (darwin_detach): Likewise.
9237 * gnu-nat.c (gnu_detach): Likewise.
9238 * inf-ptrace.c (inf_ptrace_detach): Likewise.
9239 * infcmd.c (detach_command): Pass current_inferior() down to
9240 target_detach.
9241 * infrun.c (follow_fork_inferior): Pass parent_inf to
9242 target_detach.
9243 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
9244 target_detach.
9245 * linux-nat.c (linux_nat_detach): Add inferior parameter.
9246 * linux-thread-db.c (thread_db_detach): Likewise.
9247 * nto-procfs.c (procfs_detach): Likewise.
9248 * procfs.c (procfs_detach): Likewise.
9249 * record.c (record_detach): Likewise.
9250 * record.h (struct inferior): Forward-declare.
9251 (record_detach): Add inferior parameter.
9252 * remote-sim.c (gdbsim_detach): Likewise.
9253 * remote.c (remote_detach_1): Likewise.
9254 (remote_detach): Likewise.
9255 (extended_remote_detach): Likewise.
9256 * sol-thread.c (sol_thread_detach): Likewise.
9257 * target-debug.h (target_debug_print_inferior_p): New macro.
9258 * target-delegates.c: Re-generate.
9259 * top.c (kill_or_detach): Pass inferior down to target_detach.
9260 * windows-nat.c (windows_detach): Add inferior parameter.
9261
9262 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
9263
9264 * target.h (struct target_ops) <to_detach>: Remove args
9265 parameter.
9266 (target_detach): Likewise.
9267 * target.c (dispose_inferior): Adjust.
9268 (target_detach): Remove args parameter, adjust.
9269 * aix-thread.c (aix_thread_detach): Adjust.
9270 * corefile.c (core_file_command): Adjust.
9271 * corelow.c (core_detach): Adjust.
9272 * darwin-nat.c (darwin_detach): Adjust.
9273 * gnu-nat.c (gnu_detach): Adjust.
9274 * inf-ptrace.c (inf_ptrace_detach): Adjust.
9275 * infcmd.c (detach_command): Adjust
9276 * infrun.c (follow_fork_inferior): Adjust.
9277 (handle_vfork_child_exec_or_exit): Adjust.
9278 * linux-fork.c (linux_fork_detach): Remove args parameter.
9279 * linux-fork.h (linux_fork_detach): Likewise.
9280 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
9281 * linux-thread-db.c (thread_db_detach): Likewise.
9282 * nto-procfs.c (procfs_detach): Likewise.
9283 * procfs.c (procfs_detach): Likewise.
9284 (do_detach): Remove signo parameter.
9285 * record.c (record_detach): Remove args parameter.
9286 * record.h (record_detach): Likewise.
9287 * remote-sim.c (gdbsim_detach): Likewise.
9288 * remote.c (remote_detach_1): Likewise.
9289 (remote_detach): Likewise.
9290 (extended_remote_detach): Likewise.
9291 * sol-thread.c (sol_thread_detach): Likewise.
9292 * target-delegates.c: Re-generate.
9293 * top.c (struct qt_args) <args>: Remove field.
9294 (kill_or_detach): Don't pass args.
9295 (quit_force): Don't set args.
9296 * windows-nat.c (windows_detach): Remove args parameter.
9297
9298 2018-01-19 Yao Qi <yao.qi@linaro.org>
9299
9300 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
9301 (arm_linux_init_abi): Install it.
9302
9303 2018-01-19 Yao Qi <yao.qi@linaro.org>
9304
9305 * osabi.c (gdb_osabi_names): Extend the regexp for
9306 arm-linux-gnueabihf.
9307
9308 2018-01-18 Yao Qi <yao.qi@linaro.org>
9309
9310 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
9311 m_abbrevs.
9312 (abbrev_table::add_abbrev): Update.
9313 (abbrev_table::lookup_abbrev): Update.
9314
9315 2018-01-18 Yao Qi <yao.qi@linaro.org>
9316
9317 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
9318
9319 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
9320
9321 * compile/compile.c (compile_to_object): Convert "triplet_rx"
9322 to "std::string".
9323
9324 2018-01-17 Tom Tromey <tom@tromey.com>
9325
9326 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
9327
9328 2018-01-17 Tom Tromey <tom@tromey.com>
9329
9330 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
9331 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
9332 (create_array_type_with_stride): Update.
9333 * dwarf2read.c (set_die_type): Update.
9334
9335 2018-01-17 Tom Tromey <tom@tromey.com>
9336
9337 * dwarf2read.c (delayed_method_info): Remove typedef.
9338 (dwarf2_cu::method_info): Now a std::vector.
9339 (add_to_method_list): Update.
9340 (free_delayed_list): Remove.
9341 (compute_delayed_physnames): Update.
9342 (process_full_comp_unit, process_full_type_unit): Clear the method
9343 list. Remove cleanups.
9344 (psymtab_include_file_name): Add name_holder parameter. Use
9345 unique_xmalloc_ptr.
9346 (dwarf_decode_lines): Update.
9347
9348 2018-01-17 Tom Tromey <tom@tromey.com>
9349 Simon Marchi <simon.marchi@ericsson.com>
9350
9351 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
9352 (dwarf2_per_objfile::free_cached_comp_units)
9353 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
9354 (init_cutu_and_read_dies_no_follow): Update.
9355 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
9356 (dwarf2_cu::~dwarf2_cu): New.
9357 (free_heap_comp_unit, free_stack_comp_unit): Remove.
9358 (age_cached_comp_units, free_one_cached_comp_unit): Update.
9359
9360 2018-01-17 Tom Tromey <tom@tromey.com>
9361 Simon Marchi <simon.marchi@ericsson.com>
9362
9363 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
9364 (struct die_reader_specs) <abbrev_table>: New member.
9365 (struct abbrev_table): Add constructor.
9366 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
9367 <abbrev_obstack>: Now an auto_obstack.
9368 (abbrev_table_up): New typedef.
9369 (init_cu_die_reader): Add abbrev_table parameter.
9370 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
9371 Add result_dwo_abbrev_table.
9372 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
9373 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
9374 Update.
9375 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
9376 parameter.
9377 (skip_children): Update.
9378 (abbrev_table::alloc_abbrev): Rename from
9379 abbrev_table_alloc_abbrev.
9380 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
9381 (abbrev_table::lookup_abbrev): Rename from
9382 abbrev_table_lookup_abbrev.
9383 (abbrev_table_read_table): Return abbrev_table_up.
9384 (abbrev_table_free, abbrev_table_free_cleanup)
9385 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
9386 (load_partial_dies): Update.
9387
9388 2018-01-17 Tom Tromey <tom@tromey.com>
9389
9390 * dwarf2read.c (dwarf2_compute_name): Update comment.
9391 (read_func_scope, read_variable): Update.
9392 (new_symbol): Remove.
9393 (new_symbol_full): Rename to new_symbol.
9394
9395 2018-01-17 Mike Gulick <mgulick@mathworks.com>
9396
9397 PR gdb/16577
9398 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
9399 a warning instead of throwing an error, set section size to 0 and return
9400 NULL.
9401 * gdb_bfd.h (gdb_bfd_map_section): Update description.
9402
9403 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
9404
9405 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
9406 std::string.
9407 (linux_ptrace_attach_fail_reason_string): Likewise.
9408 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
9409 Likewise.
9410 (linux_ptrace_attach_fail_reason_string): Likewise.
9411 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
9412
9413 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
9414
9415 * linux-nat.c (linux_nat_attach): Remove xstrdup.
9416
9417 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
9418
9419 PR gdb/21559
9420 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
9421 checking for fs_base/gs_base fields in struct user_regs_struct.
9422 * configure: Regenerate.
9423
9424 2018-01-17 Yao Qi <yao.qi@linaro.org>
9425
9426 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
9427 function.
9428 (aarch64_linux_init_abi): Install it to gdbarch hook
9429 gcc_target_options.
9430
9431 2018-01-15 Pedro Alves <palves@redhat.com>
9432
9433 * common/signals-state-save-restore.c
9434 (save_original_signals_state): Fix typos.
9435
9436 2017-01-12 Tom Tromey <tom@tromey.com>
9437 Sergio Durigan Junior <sergiodj@redhat.com>
9438
9439 * Makefile.in (install-only): Install gdb-add-index.
9440
9441 2018-01-12 John Baldwin <jhb@FreeBSD.org>
9442
9443 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
9444
9445 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9446
9447 * infrun.c (keep_going_pass_signal): Clear step-over info when
9448 insert_breakpoints fails.
9449
9450 2018-01-11 Pedro Alves <palves@redhat.com>
9451
9452 PR gdb/22583
9453 * infrun.c (resume): Rename to ...
9454 (resume_1): ... this.
9455 (resume): Reimplement as wrapper around resume_1.
9456
9457 2018-01-11 Pedro Alves <palves@redhat.com>
9458
9459 PR remote/22597
9460 * remote.c (remote_parse_stop_reply): Default to the last-set
9461 general thread instead of to 'magic_null_ptid'.
9462
9463 2018-01-10 Pedro Alves <palves@redhat.com>
9464
9465 * language.h (language_get_symbol_name_matcher): Rename ...
9466 (get_symbol_name_matcher): ... this.
9467 * language.c (language_get_symbol_name_matcher): Ditto.
9468 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
9469 callers adjusted.
9470
9471 2018-01-10 Pedro Alves <palves@redhat.com>
9472
9473 PR gdb/22670
9474 * dwarf2read.c
9475 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
9476 Adjust to use language_get_symbol_name_matcher instead of
9477 language_defn::la_get_symbol_name_matcher.
9478 * language.c (language_get_symbol_name_matcher): If in Ada mode
9479 and the lookup name is a verbatim match, return Ada's matcher.
9480 * language.h (language_get_symbol_name_matcher): Adjust comment.
9481 (ada_lookup_name_info::verbatim_p):: New method.
9482
9483 2018-01-10 Pedro Alves <palves@redhat.com>
9484
9485 PR gdb/22670
9486 * ada-lang.c (ada_collect_symbol_completion_matches): If the
9487 minsym's language is language_auto or language_cplus, pass down
9488 language_ada instead.
9489 * symtab.c (compare_symbol_name): Don't frob symbol language here.
9490
9491 2018-01-10 Pedro Alves <palves@redhat.com>
9492
9493 PR gdb/22670
9494 * minsyms.c (linkage_name_str): New function.
9495 (iterate_over_minimal_symbols): Use it.
9496
9497 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9498
9499 * NEWS: Document that 'info proc' now works on FreeBSD.
9500
9501 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9502
9503 * configure.ac: Check for kinfo_getfile in libutil.
9504 * configure: Regenerate.
9505 * config.in: Regenerate.
9506 * fbsd-nat.c: Include "fbsd-tdep.h".
9507 (fbsd_fetch_cmdline): New.
9508 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
9509 rather than calling error.
9510 (fbsd_info_proc): New.
9511 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
9512 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
9513 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
9514
9515 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9516
9517 * fbsd-nat.c (struct free_deleter): Remove.
9518 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
9519
9520 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9521
9522 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
9523 NULL for an empty pathname.
9524
9525 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9526
9527 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
9528 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
9529 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
9530 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
9531 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
9532 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
9533 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
9534 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
9535 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
9536 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
9537 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
9538 (fbsd_core_fetch_timeval, fbsd_print_sigset)
9539 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
9540 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
9541 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
9542
9543 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
9544
9545 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
9546 (gnu_xfer_auxv): New function.
9547 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
9548 TARGET_OBJECT_AUXV.
9549
9550 2018-01-08 Yao Qi <yao.qi@linaro.org>
9551 Simon Marchi <simon.marchi@ericsson.com>
9552
9553 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
9554 common/selftest.c.
9555 (COMMON_OBS): Remove selftest.o.
9556 * configure.ac: Append selftest-arch.c and common/selftest.c to
9557 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
9558 * configure: Re-generated.
9559 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
9560 GDB_SELF_TEST.
9561 (maintenance_info_selftests): Likewise.
9562
9563 2018-01-08 Xavier Roirand <roirand@adacore.com>
9564
9565 * ada-valprint.c (val_print_packed_array_elements): Use
9566 proper number of elements when printing an array indexed
9567 by an enumeration type.
9568
9569 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9570
9571 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
9572 (dw2_get_file_names_reader): Adjust.
9573 (lookup_dwo_signatured_type): Adjust.
9574 (lookup_dwp_signatured_type): Adjust.
9575 (lookup_signatured_type): Adjust.
9576 (create_type_unit_group): Adjust.
9577 (get_type_unit_group): Adjust.
9578 (process_psymtab_comp_unit_reader): Adjust.
9579 (build_type_psymtabs_reader): Adjust.
9580 (scan_partial_symbols): Adjust.
9581 (add_partial_symbol): Adjust.
9582 (add_partial_subprogram): Adjust.
9583 (peek_die_abbrev): Adjust.
9584 (fixup_go_packaging): Adjust.
9585 (process_imported_unit_die): Adjust.
9586 (dwarf2_compute_name): Adjust.
9587 (dwarf2_physname): Adjust.
9588 (read_import_statement): Adjust.
9589 (handle_DW_AT_stmt_list): Adjust.
9590 (read_file_scope): Adjust.
9591 (read_func_scope): Adjust.
9592 (read_lexical_block_scope): Adjust.
9593 (read_call_site_scope): Adjust.
9594 (read_variable): Adjust.
9595 (dwarf2_rnglists_process): Adjust.
9596 (dwarf2_ranges_process): Adjust.
9597 (dwarf2_ranges_read): Adjust.
9598 (dwarf2_get_pc_bounds): Adjust.
9599 (dwarf2_record_block_ranges): Adjust.
9600 (dwarf2_add_field): Adjust.
9601 (dwarf2_add_member_fn): Adjust.
9602 (read_structure_type): Adjust.
9603 (process_structure_scope): Adjust.
9604 (read_enumeration_type): Adjust.
9605 (read_array_type): Adjust.
9606 (mark_common_block_symbol_computed): Adjust.
9607 (read_common_block): Adjust.
9608 (read_namespace_type): Adjust.
9609 (read_namespace): Adjust.
9610 (read_module_type): Adjust.
9611 (read_tag_pointer_type): Adjust.
9612 (read_tag_ptr_to_member_type): Adjust.
9613 (read_tag_string_type): Adjust.
9614 (read_subroutine_type): Adjust.
9615 (read_typedef): Adjust.
9616 (read_base_type): Adjust.
9617 (attr_to_dynamic_prop): Adjust.
9618 (read_subrange_type): Adjust.
9619 (read_unspecified_type): Adjust.
9620 (dwarf2_read_abbrevs): Adjust.
9621 (load_partial_dies): Adjust.
9622 (read_partial_die): Adjust.
9623 (find_partial_die): Adjust.
9624 (guess_partial_die_structure_name): Adjust.
9625 (fixup_partial_die): Adjust.
9626 (read_attribute_value): Adjust.
9627 (read_addr_index): Adjust.
9628 (read_addr_index_from_leb128): Adjust.
9629 (read_str_index): Adjust.
9630 (dwarf2_string_attr): Adjust.
9631 (get_debug_line_section): Adjust.
9632 (dwarf_decode_line_header): Adjust.
9633 (lnp_state_machine::check_line_address): Adjust.
9634 (dwarf_decode_lines_1): Adjust.
9635 (dwarf_decode_lines): Adjust.
9636 (dwarf2_start_symtab): Adjust.
9637 (var_decode_location): Adjust.
9638 (new_symbol_full): Adjust.
9639 (dwarf2_const_value_data): Adjust.
9640 (dwarf2_const_value_attr): Adjust.
9641 (dwarf2_const_value): Adjust.
9642 (die_type): Adjust.
9643 (die_containing_type): Adjust.
9644 (build_error_marker_type): Adjust.
9645 (lookup_die_type): Adjust.
9646 (guess_full_die_structure_name): Adjust.
9647 (anonymous_struct_prefix): Adjust.
9648 (determine_prefix): Adjust.
9649 (dwarf2_name): Adjust.
9650 (follow_die_ref_or_sig): Adjust.
9651 (follow_die_offset): Adjust.
9652 (follow_die_ref): Adjust.
9653 (follow_die_sig_1): Adjust.
9654 (follow_die_sig): Adjust.
9655 (get_signatured_type): Adjust.
9656 (get_DW_AT_signature_type): Adjust.
9657 (decode_locdesc): Adjust.
9658 (dwarf_decode_macros): Adjust.
9659 (cu_debug_loc_section): Adjust.
9660 (fill_in_loclist_baton): Adjust.
9661 (dwarf2_symbol_mark_computed): Adjust.
9662 (init_one_comp_unit): Don't assign
9663 dwarf2_cu::dwarf2_per_objfile.
9664 (set_die_type): Adjust.
9665
9666 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9667
9668 * dwarf2read.c (struct mapped_debug_names): Add constructor.
9669 <dwarf2_per_objfile>: New field.
9670 (dwarf2_per_objfile): Remove global.
9671 (get_dwarf2_per_objfile): New function.
9672 (set_dwarf2_per_objfile): New function.
9673 (dwarf2_build_psymtabs_hard): Change objfile parameter to
9674 dwarf2_per_objfile.
9675 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
9676 (read_abbrev_offset): Likewise.
9677 (read_indirect_string): Likewise.
9678 (read_indirect_line_string): Likewise.
9679 (read_indirect_string_at_offset): Likewise.
9680 (read_indirect_string_from_dwz): Likewise.
9681 (dwarf2_find_containing_comp_unit): Change objfile parameter to
9682 dwarf2_per_objfile.
9683 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
9684 (create_all_comp_units): Change objfile parameter to
9685 dwarf2_per_objfile.
9686 (create_all_type_units): Likewise.
9687 (process_queue): Add dwarf2_per_objfile parameter.
9688 (read_and_check_comp_unit_head): Likewise.
9689 (lookup_dwo_unit_in_dwp): Likewise.
9690 (get_dwp_file): Likewise.
9691 (process_cu_includes): Likewise.
9692 (struct free_dwo_file_cleanup_data): New struct.
9693 (dwarf2_has_info): Use get_dwarf2_per_objfile and
9694 set_dwarf2_per_objfile.
9695 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
9696 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
9697 context, adjust calls.
9698 (dw2_instantiate_symtab): Likewise.
9699 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
9700 (dw2_get_cu): Likewise.
9701 (create_cu_from_index_list): Change objfile parameter to
9702 dwarf2_per_objfile.
9703 (create_cus_from_index_list): Get dwarf2_per_objfile from
9704 context, adjust calls.
9705 (create_cus_from_index): Likewise.
9706 (create_signatured_type_table_from_index): Change objfile
9707 parameter to dwarf2_per_objfile.
9708 (create_signatured_type_table_from_debug_names): Change objfile
9709 parameter to dwarf2_per_objfile.
9710 (create_addrmap_from_index): Likewise.
9711 (create_addrmap_from_aranges): Likewise.
9712 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
9713 (dw2_setup): Remove.
9714 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
9715 context.
9716 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
9717 get_dwarf2_per_objfile.
9718 (dw2_forget_cached_source_info): Likewise.
9719 (dw2_map_symtabs_matching_filename): Likewise.
9720 (struct dw2_symtab_iterator) <index>: Remove.
9721 <dwarf2_per_objfile>: New field.
9722 (dw2_symtab_iter_init): Replace index parameter with
9723 dwarf2_per_objfile.
9724 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
9725 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
9726 (dw2_print_stats): Likewise.
9727 (dw2_dump): Likewise.
9728 (dw2_expand_symtabs_for_function): Likewise.
9729 (dw2_expand_all_symtabs): Likewise.
9730 (dw2_expand_symtabs_with_fullname): Likewise.
9731 (dw2_expand_marked_cus): Replace index and objfile parameters
9732 with dwarf2_per_objfile.
9733 (dw_expand_symtabs_matching_file_matcher): Add
9734 dwarf2_per_objfile parameter and adjust calls.
9735 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
9736 adjust calls.
9737 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
9738 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
9739 adjust calls.
9740 (create_cus_from_debug_names_list): Replace objfile parameter
9741 with dwarf2_per_objfile and adjust calls.
9742 (create_cus_from_debug_names): Likewise.
9743 (dwarf2_read_debug_names): Likewise.
9744 (mapped_debug_names::namei_to_name): Adjust call.
9745 (dw2_debug_names_iterator::next): Likewise.
9746 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
9747 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
9748 (dw2_debug_names_dump): Likewise.
9749 (dw2_debug_names_expand_symtabs_for_function): Likewise.
9750 (dw2_debug_names_expand_symtabs_matching): Likewise.
9751 (dwarf2_initialize_objfile): Likewise.
9752 (dwarf2_build_psymtabs): Likewise.
9753 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
9754 this_cu.
9755 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
9756 (read_and_check_comp_unit_head): Likewise.
9757 (read_abbrev_offset): Likewise.
9758 (create_debug_type_hash_table): Likewise.
9759 (create_debug_types_hash_table): Likewise.
9760 (create_all_type_units): Replace objfile parameter with
9761 dwarf2_per_objfile.
9762 (add_type_unit): Add dwarf2_per_objfile parameter.
9763 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
9764 with dwarf2_per_objfile.
9765 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
9766 (lookup_dwp_signatured_type): Likewise.
9767 (lookup_signatured_type): Likewise.
9768 (read_cutu_die_from_dwo): Likewise.
9769 (init_tu_and_read_dwo_dies): Likewise.
9770 (init_cutu_and_read_dies): Likewise.
9771 (init_cutu_and_read_dies_no_follow): Likewise.
9772 (allocate_type_unit_groups_table): Add objfile parameter.
9773 (create_type_unit_group): Use dwarf2_per_objfile from cu.
9774 (get_type_unit_group): Likewise.
9775 (process_psymtab_comp_unit): Update call.
9776 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
9777 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
9778 (print_tu_stats): Likewise.
9779 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
9780 in void* parameter.
9781 (build_type_psymtabs): Change objfile parameter to
9782 dwarf2_per_objfile.
9783 (process_skeletonless_type_unit): Use dwarf2_per_objfile
9784 passed in void* parameter.
9785 (process_skeletonless_type_units): Change objfile parameter to
9786 dwarf2_per_objfile.
9787 (set_partial_user): Likewise.
9788 (dwarf2_build_psymtabs_hard): Likewise.
9789 (read_comp_units_from_section): Likewise.
9790 (create_all_comp_units): Likewise.
9791 (scan_partial_symbols): Update calls.
9792 (add_partial_symbol): Likewise.
9793 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
9794 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
9795 (process_queue): Add dwarf2_per_objfile parameter.
9796 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
9797 (compute_compunit_symtab_includes): Likewise.
9798 (process_cu_includes): Add dwarf2_per_objfile parameter.
9799 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
9800 (process_full_type_unit): Likewise.
9801 (process_imported_unit_die): Update call.
9802 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
9803 (read_file_scope): Likewise.
9804 (allocate_dwo_file_hash_table): Add objfile parameter.
9805 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
9806 (create_cus_hash_table): Likewise.
9807 (create_dwp_hash_table): Likewise.
9808 (create_dwo_unit_in_dwp_v1): Likewise.
9809 (create_dwp_v2_section): Likewise.
9810 (create_dwo_unit_in_dwp_v2): Likewise.
9811 (lookup_dwo_unit_in_dwp): Likewise.
9812 (try_open_dwop_file): Likewise.
9813 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
9814 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
9815 cleanup to include a reference to dwarf2_per_objfile.
9816 (open_dwp_file): Add dwarf2_per_objfile parameter.
9817 (open_and_init_dwp_file): Likewise.
9818 (get_dwp_file): Likewise.
9819 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
9820 (queue_and_load_all_dwo_tus): Update call.
9821 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
9822 data.
9823 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
9824 (dwarf2_ranges_process): Likewise.
9825 (dwarf2_get_pc_bounds): Likewise.
9826 (mark_common_block_symbol_computed): Likewise.
9827 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
9828 (dwarf2_read_abbrevs): Update call.
9829 (read_partial_die): Use dwarf2_per_objfile from cu.
9830 (find_partial_die): Likewise.
9831 (fixup_partial_die): Likewise.
9832 (read_attribute_value): Likewise.
9833 (read_indirect_string_at_offset_from): Add objfile parameter.
9834 (read_indirect_string_at_offset): Add dwarf2_per_objfile
9835 parameter.
9836 (read_indirect_string_from_dwz): Add objfile parameter.
9837 (read_indirect_string): Add objfile parameter.
9838 (read_addr_index_1): Add dwarf2_per_objfile parameter.
9839 (read_addr_index): Use dwarf2_per_objfile from cu.
9840 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
9841 call dw2_setup.
9842 (read_str_index): Use dwarf2_per_objfile from cu.
9843 (get_debug_line_section): Likewise.
9844 (read_formatted_entries): Add dwarf2_per_objfile parameter.
9845 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
9846 (new_symbol_full): Use dwarf2_per_objfile from cu.
9847 (build_error_marker_type): Likewise.
9848 (lookup_die_type): Likewise.
9849 (determine_prefix): Likewise.
9850 (follow_die_offset): Likewise.
9851 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
9852 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
9853 (dwarf2_fetch_die_type_sect_off): Likewise.
9854 (dwarf2_get_die_type): Likewise.
9855 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
9856 (get_signatured_type): Likewise.
9857 (get_DW_AT_signature_type): Likewise.
9858 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
9859 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
9860 (cu_debug_loc_section): Likewise.
9861 (fill_in_loclist_baton): Likewise.
9862 (dwarf2_symbol_mark_computed): Likewise.
9863 (dwarf2_find_containing_comp_unit): Change objfile parameter to
9864 dwarf2_per_objfile.
9865 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
9866 parameter.
9867 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
9868 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
9869 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
9870 (set_die_type): Use dwarf2_free_objfile from cu.
9871 (get_die_type_at_offset): Likewise.
9872 (dwarf2_per_objfile_free): Don't assign global variable.
9873 (debug_names) <constructor>: Add dwarf2_per_objfile
9874 parameter, update m_debugstrlookup construction.
9875 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
9876 parameter.
9877 <m_dwarf2_per_objfile>: New field.
9878 <lookup>: Use m_dwarf2_per_objfile.
9879 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
9880 (psyms_seen_size): Likewise.
9881 (write_gdbindex): Replace objfile parameter with
9882 dwarf2_per_objfile.
9883 (write_debug_names): Likewise.
9884 (write_psymtabs_to_index): Likewise.
9885 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
9886 calls.
9887
9888 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9889
9890 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
9891 <dwarf2_per_objfile>: New field.
9892 (struct dwarf2_per_cu_data) <objfile>: Remove.
9893 <dwarf2_per_objfile>: New field.
9894 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
9895 of objfile.
9896 (create_signatured_type_table_from_index): Likewise.
9897 (create_debug_type_hash_table): Likewise.
9898 (fill_in_sig_entry_from_dwo_entry): Likewise.
9899 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
9900 (create_type_unit_group): Assign dwarf2_per_objfile instead of
9901 objfile.
9902 (create_partial_symtab): Access objfile through
9903 dwarf2_per_objfile.
9904 (process_psymtab_comp_unit_reader): Likewise.
9905 (read_comp_units_from_section): Likewise.
9906 (scan_partial_symbols): Likewise.
9907 (add_partial_symbol): Likewise.
9908 (add_partial_subprogram): Likewise.
9909 (peek_die_abbrev): Likewise.
9910 (fixup_go_packaging): Likewise.
9911 (process_full_comp_unit): Likewise.
9912 (process_full_type_unit): Likewise.
9913 (process_imported_unit_die): Likewise.
9914 (dwarf2_compute_name): Likewise.
9915 (dwarf2_physname): Likewise.
9916 (read_import_statement): Likewise.
9917 (create_cus_hash_table): Assign dwarf2_physname instead of
9918 objfile.
9919 (read_func_scope): Access objfile through dwarf2_per_objfile.
9920 (read_lexical_block_scope): Likewise.
9921 (read_call_site_scope): Likewise.
9922 (read_variable): Likewise.
9923 (dwarf2_rnglists_process): Likewise.
9924 (dwarf2_ranges_process): Likewise.
9925 (dwarf2_ranges_read): Likewise.
9926 (dwarf2_record_block_ranges): Likewise.
9927 (dwarf2_add_field): Likewise.
9928 (dwarf2_add_member_fn): Likewise.
9929 (read_structure_type): Likewise.
9930 (process_structure_scope): Likewise.
9931 (read_enumeration_type): Likewise.
9932 (read_array_type): Likewise.
9933 (read_common_block): Likewise.
9934 (read_namespace_type): Likewise.
9935 (read_namespace): Likewise.
9936 (read_module_type): Likewise.
9937 (read_tag_pointer_type): Likewise.
9938 (read_tag_ptr_to_member_type): Likewise.
9939 (read_tag_string_type): Likewise.
9940 (read_subroutine_type): Likewise.
9941 (read_typedef): Likewise.
9942 (read_base_type): Likewise.
9943 (attr_to_dynamic_prop): Likewise.
9944 (read_subrange_type): Likewise.
9945 (read_unspecified_type): Likewise.
9946 (load_partial_dies): Likewise.
9947 (read_partial_die): Likewise.
9948 (find_partial_die): Likewise.
9949 (guess_partial_die_structure_name): Likewise.
9950 (fixup_partial_die): Likewise.
9951 (read_attribute_value): Likewise.
9952 (read_addr_index_from_leb128): Likewise.
9953 (dwarf2_read_addr_index): Likewise.
9954 (dwarf2_string_attr): Likewise.
9955 (lnp_state_machine::check_line_address): Likewise.
9956 (dwarf_decode_lines_1): Likewise.
9957 (dwarf_decode_lines): Likewise.
9958 (dwarf2_start_symtab): Likewise.
9959 (var_decode_location): Likewise.
9960 (new_symbol_full): Likewise.
9961 (dwarf2_const_value_data): Likewise.
9962 (dwarf2_const_value_attr): Likewise.
9963 (dwarf2_const_value): Likewise.
9964 (die_type): Likewise.
9965 (die_containing_type): Likewise.
9966 (lookup_die_type): Likewise.
9967 (guess_full_die_structure_name): Likewise.
9968 (anonymous_struct_prefix): Likewise.
9969 (dwarf2_name): Likewise.
9970 (follow_die_ref_or_sig): Likewise.
9971 (follow_die_offset): Likewise.
9972 (follow_die_ref): Likewise.
9973 (dwarf2_fetch_die_loc_sect_off): Likewise.
9974 (dwarf2_fetch_constant_bytes): Likewise.
9975 (dwarf2_fetch_die_type_sect_off): Likewise.
9976 (dwarf2_get_die_type): Likewise.
9977 (follow_die_sig): Likewise.
9978 (decode_locdesc): Likewise.
9979 (dwarf2_per_cu_objfile): Likewise.
9980 (dwarf2_per_cu_text_offset): Likewise.
9981 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
9982 objfile.
9983 (set_die_type): Access objfile through
9984 dwarf2_per_objfile.
9985
9986 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9987
9988 * valprint.c (converted_character_d): Remove typedef.
9989 (DEF_VEC_O (converted_character_d)): Remove.
9990 (count_next_character): Use std::vector.
9991 (print_converted_chars_to_obstack): Likewise.
9992 (generic_printstr): Likewise.
9993
9994 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9995
9996 * xml-support.h (struct gdb_xml_value): Add constructor.
9997 <value>: Change type to unique_xmalloc_ptr.
9998 (gdb_xml_value_s): Remove typedef.
9999 (DEF_VEC_O (gdb_xml_value_s)): Remove.
10000 (gdb_xml_element_start_handler): Change parameter type to
10001 std::vector.
10002 (xml_find_attribute): Likewise.
10003 * xml-support.c (xml_find_attribute): Change parameter type to
10004 std::vector and adjust.
10005 (gdb_xml_values_cleanup): Remove.
10006 (gdb_xml_parser::start_element): Adjust to std::vector.
10007 (xinclude_start_include): Change paraeter type to std::vector
10008 and adjust.
10009 * btrace.c (check_xml_btrace_version): Likewise.
10010 (parse_xml_btrace_block): Likewise.
10011 (parse_xml_btrace_pt_config_cpu): Likewise.
10012 (parse_xml_btrace_pt): Likewise.
10013 (parse_xml_btrace_conf_bts): Likewise.
10014 (parse_xml_btrace_conf_pt): Likewise.
10015 * memory-map.c (memory_map_start_memory): Likewise.
10016 (memory_map_start_property): Likewise.
10017 * osdata.c (osdata_start_osdata): Likewise.
10018 (osdata_start_item): Likewise.
10019 (osdata_start_column): Likewise.
10020 * remote.c (start_thread): Likewise.
10021 * solib-aix.c (library_list_start_library): Likewise.
10022 (library_list_start_list): Likewise.
10023 * solib-svr4.c (library_list_start_library): Likewise.
10024 (svr4_library_list_start_list): Likewise.
10025 * solib-target.c (library_list_start_segment): Likewise.
10026 (library_list_start_section): Likewise.
10027 (library_list_start_library): Likewise.
10028 (library_list_start_list): Likewise.
10029 * tracepoint.c (traceframe_info_start_memory): Likewise.
10030 (traceframe_info_start_tvar): Likewise.
10031 * xml-syscall.c (syscall_start_syscall): Likewise.
10032 * xml-tdesc.c (tdesc_start_target): Likewise.
10033 (tdesc_start_feature): Likewise.
10034 (tdesc_start_reg): Likewise.
10035 (tdesc_start_union): Likewise.
10036 (tdesc_start_struct): Likewise.
10037 (tdesc_start_flags): Likewise.
10038 (tdesc_start_enum): Likewise.
10039 (tdesc_start_field): Likewise.
10040 (tdesc_start_enum_value): Likewise.
10041 (tdesc_start_vector): Likewise.
10042
10043 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10044
10045 * extension.h (struct xmethod_worker) <clone>: Remove.
10046 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
10047 Remove.
10048 (python_xmethod_worker::clone): Remove.
10049 * valops.c (find_overload_match): Use std::move instead of
10050 clone.
10051
10052 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10053
10054 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
10055 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
10056 <free_xmethod_worker_data>: Remove.
10057 <get_matching_xmethod_workers>: Chance VEC to std::vector.
10058 <get_xmethod_arg_types>: Remove.
10059 <get_xmethod_result_type>: Remove.
10060 <invoke_xmethod>: Remove.
10061 * extension.c (new_xmethod_worker): Remove.
10062 (clone_xmethod_worker): Remove.
10063 (get_matching_xmethod_workers): Return void, pass std::vector by
10064 pointer.
10065 (get_xmethod_arg_types): Rename to...
10066 (xmethod_worker::get_arg_types): ... this, and adjust.
10067 (get_xmethod_result_type): Rename to...
10068 (xmethod_worker::get_result_type): ... this, and adjust.
10069 (invoke_xmethod): Remove.
10070 (free_xmethod_worker): Remove.
10071 (free_xmethod_worker_vec): Remove.
10072 * extension.h (enum ext_lang_rc): Move here from
10073 extension-priv.h.
10074 (struct xmethod_worker): Add constructor and destructor.
10075 <data>: Remove.
10076 <value>: Remove.
10077 <invoke, clone, do_get_result_type, do_get_arg_types>: New
10078 virtual pure methods.
10079 <get_arg_types, get_result_type>: New methods.
10080 (xmethod_worker_ptr): Remove typedef.
10081 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
10082 (xmethod_worker_vec): Remove typedef.
10083 (xmethod_worker_up): New typedef.
10084 (invoke_xmethod): Remove.
10085 (clone_xmethod_worker): Remove.
10086 (free_xmethod_worker): Remove.
10087 (free_xmethod_worker_vec): Remove.
10088 (get_xmethod_arg_types): Remove.
10089 (get_xmethod_result_type): Remove.
10090 * valops.c (find_method_list): Use std::vector, don't use
10091 intermediate vector.
10092 (value_find_oload_method_list): Use std::vector.
10093 (find_overload_match): Use std::vector.
10094 (find_oload_champ): Use std::vector.
10095 * value.c (value_free): Use operator delete.
10096 (value_of_xmethod): Rename to...
10097 (value_from_xmethod): ... this. Don't assign
10098 xmethod_worker::value, take rvalue-reference.
10099 (result_type_of_xmethod): Adjust.
10100 (call_xmethod): Adjust.
10101 * value.h: Include extension.h.
10102 (struct xmethod_worker): Don't forward-declare.
10103 (value_of_xmethod): Rename to...
10104 (value_from_xmethod): ... this, take rvalue-reference.
10105 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
10106 (struct python_xmethod_worker): ... this, add constructor and
10107 destructor.
10108 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
10109 (gdbpy_free_xmethod_worker_data): Rename to...
10110 (python_xmethod_worker::~python_xmethod_worker): ... this and
10111 adjust.
10112 (gdbpy_clone_xmethod_worker_data): Rename to...
10113 (python_xmethod_worker::clone): ... this and adjust.
10114 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
10115 temporary vector.
10116 (gdbpy_get_xmethod_arg_types): Rename to...
10117 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
10118 (gdbpy_get_xmethod_result_type): Rename to...
10119 (python_xmethod_worker::do_get_result_type): ... this and
10120 adjust.
10121 (gdbpy_invoke_xmethod): Rename to...
10122 (python_xmethod_worker::invoke): ... this and adjust.
10123 (new_python_xmethod_worker): Rename to...
10124 (python_xmethod_worker::python_xmethod_worker): ... this and
10125 adjust.
10126 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
10127 Remove.
10128 (gdbpy_free_xmethod_worker_data): Remove.
10129 (gdbpy_get_matching_xmethod_workers): Use std::vector.
10130 (gdbpy_get_xmethod_arg_types): Remove.
10131 (gdbpy_get_xmethod_result_type): Remove.
10132 (gdbpy_invoke_xmethod): Remove.
10133 * python/python.c (python_extension_ops): Remove obsolete
10134 callbacks.
10135
10136 2018-01-05 Pedro Alves <palves@redhat.com>
10137
10138 PR gdb/18653
10139 * common/signals-state-save-restore.c
10140 (save_original_signals_state): New parameter 'quiet'. Warn if we
10141 find a custom handler preinstalled, instead of internal erroring.
10142 But only warn if !quiet.
10143 * common/signals-state-save-restore.h
10144 (save_original_signals_state): New parameter 'quiet'.
10145 * main.c (captured_main_1): Move save_original_signals_state call
10146 after option handling, and pass QUIET.
10147
10148 2018-01-05 Pedro Alves <palves@redhat.com>
10149
10150 * spu-tdep.c (spu_catch_start): Pass
10151 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
10152
10153 2018-01-05 Pedro Alves <palves@redhat.com>
10154
10155 PR gdb/22670
10156 * ada-lang.c (literal_symbol_name_matcher): New function.
10157 (ada_get_symbol_name_matcher): Use it for
10158 symbol_name_match_type::SEARCH_NAME.
10159 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
10160 it down instead of assuming symbol_name_match_type::FULL.
10161 * block.h (block_lookup_symbol): New parameter 'match_type'.
10162 * c-valprint.c (print_unpacked_pointer): Use
10163 lookup_symbol_search_name instead of lookup_symbol.
10164 * compile/compile-object-load.c (get_out_value_type): Pass down
10165 symbol_name_match_type::SEARCH_NAME.
10166 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
10167 symbol_name_match_type::FULL.
10168 * cp-support.c (cp_get_symbol_name_matcher): Handle
10169 symbol_name_match_type::SEARCH_NAME.
10170 * infrun.c (insert_exception_resume_breakpoint): Use
10171 lookup_symbol_search_name.
10172 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
10173 * psymtab.c (maintenance_check_psymtabs): Use
10174 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
10175 * stack.c (print_frame_args): Use lookup_symbol_search_name and
10176 SYMBOL_SEARCH_NAME.
10177 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
10178 if symbol_name_match_type::SEARCH_NAME.
10179 (lookup_symbol_in_language): Pass down
10180 symbol_name_match_type::FULL.
10181 (lookup_symbol_search_name): New.
10182 (lookup_language_this): Pass down
10183 symbol_name_match_type::SEARCH_NAME.
10184 (lookup_symbol_aux, lookup_local_symbol): New parameter
10185 'match_type'. Pass it down.
10186 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
10187 (lookup_symbol_search_name): New declaration.
10188 (lookup_symbol_in_block): New 'match_type' parameter.
10189
10190 2018-01-05 Pedro Alves <palves@redhat.com>
10191
10192 PR gdb/22670
10193 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
10194 ada_lookup_symbol.
10195 (ada_lookup_symbol): Reimplement in terms of
10196 ada_lookup_symbol_list, bits factored out from
10197 ada_lookup_encoded_symbol.
10198
10199 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10200
10201 * ada-exp.y (write_object_renaming): When subscripting an array
10202 using a symbol as the index, pass the block in call to
10203 ada_lookup_encoded_symbol when looking that symbol up.
10204
10205 2018-01-05 Jerome Guitton <guitton@adacore.com>
10206
10207 * ada-lang.c (ada_array_length): Use ada_index_type instead of
10208 TYPE_INDEX_TYPE.
10209
10210 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10211
10212 * ada-lang.c (ada_to_fixed_value_create): Add handling of
10213 the case where VALUE_LVAL (val0) is not lval_memory.
10214
10215 2018-01-05 Xavier Roirand <roirand@adacore.com>
10216
10217 * ada-valprint.c (print_optional_low_bound): Handle
10218 character-indexed array printing like boolean-indexed array
10219 printing.
10220
10221 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10222
10223 * NEWS: Create a new section for the next release branch.
10224 Rename the section of the current branch, now that it has
10225 been cut.
10226
10227 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10228
10229 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
10230 * version.in: Bump version to 8.1.50.DATE-git.
10231
10232 2018-01-03 Xavier Roirand <roirand@adacore.com>
10233
10234 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
10235 Add field.
10236 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
10237 Add field.
10238 (default_exception_support_info) <catch_handlers_sym>: Add field.
10239 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
10240 (ada_exception_name_addr_1): Add "catch handlers" handling.
10241 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
10242 Update all callers.
10243 (create_excep_cond_exprs) <ex>: Add parameter.
10244 (re_set_exception): Update create_excep_cond_exprs call.
10245 (print_it_exception, print_one_exception, print_mention_exception)
10246 (print_recreate_exception): Add "catch handler" handling.
10247 (allocate_location_catch_handlers, re_set_catch_handlers)
10248 (check_status_catch_handlers, print_it_catch_handlers)
10249 (print_one_catch_handlers, print_mention_catch_handlers)
10250 (print_recreate_catch_handlers): New function.
10251 (catch_handlers_breakpoint_ops): New variable.
10252 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
10253 Add parameter. Add "catch handler" handling.
10254 (ada_exception_sym_name, ada_exception_breakpoint_ops):
10255 Add "catch handler" handling.
10256 (ada_exception_catchpoint_cond_string): Add "catch handler"
10257 handling.
10258 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
10259 call.
10260 (catch_ada_handlers_command): New function.
10261 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
10262 operations structure.
10263 (_initialize_ada_language): Add "catch handlers" command entry.
10264 * NEWS: Document "catch handlers" feature.
10265
10266 2018-01-02 Joel Brobecker <brobecker@adacore.com>
10267
10268 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
10269 account when creating the array type of the slice.
10270 (ada_value_slice): Likewise.
10271
10272 2018-01-02 Joel Brobecker <brobecker@adacore.com>
10273
10274 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
10275 New enum value.
10276 (create_array_type_with_stride): Add byte_stride_prop parameter.
10277 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
10278 New parameter. Update all callers in this file.
10279 (array_type_has_dynamic_stride): New function.
10280 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
10281 of arrays with dynamic byte strides.
10282 * dwarf2read.c (read_array_type): Add support for dynamic
10283 DW_AT_byte_stride attributes.
10284
10285 2018-01-02 Joel Brobecker <brobecker@adacore.com>
10286
10287 * dwarf2read.c (read_unspecified_type): Treat
10288 DW_TAG_enumeration_type DIEs from Ada units as stubs.
10289
10290 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10291
10292 Update copyright year range in all GDB files.
10293
10294 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10295
10296 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
10297 and gdb/testsuite/gdb.base/step-line.c.
10298
10299 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10300
10301 * copyright.py (main): Dump the contents of
10302 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
10303 even if BY_HAND is empty.
10304
10305 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10306
10307 * top.c (print_gdb_version): Update Copyright year in version
10308 message.
10309
10310 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10311
10312 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
10313
10314 For older changes see ChangeLog-2017.
10315 \f
10316 Local Variables:
10317 mode: change-log
10318 left-margin: 8
10319 fill-column: 74
10320 version-control: never
10321 coding: utf-8
10322 End:
This page took 0.395652 seconds and 5 git commands to generate.