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