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