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