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