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