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