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