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