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