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