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