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