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