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