]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/ChangeLog
Fix "obvious" fall-through warnings
[thirdparty/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
565e0eda
TT
12018-05-04 Tom Tromey <tom@tromey.com>
2
3 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
4 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
5 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
6 comment.
7 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
8 comment.
9 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
10 comment.
11
621846f4
TT
122018-05-04 Tom Tromey <tom@tromey.com>
13
14 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
15
86a73007
TT
162018-05-04 Tom Tromey <tom@tromey.com>
17
18 * s390-tdep.c (s390_process_record): Fix fall-through comments.
19 * xcoffread.c (scan_xcoff_symtab): Move comment later.
20 * symfile.c (section_is_mapped): Fix fall-through comment.
21 * stabsread.c (define_symbol, read_member_functions): Fix
22 fall-through comment.
23 * s390-linux-tdep.c (s390_process_record): Fix fall-through
24 comment.
25 * remote.c (remote_wait_as): Fix fall-through comment.
26 * p-exp.y (yylex): Fix fall-through comment.
27 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
28 comment.
29 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
30 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
31 * jv-exp.y (yylex): Fix fall-through comment.
32 * go-exp.y (lex_one_token): Fix fall-through comment.
33 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
34 fall-through comment.
35 * f-exp.y (yylex): Fix fall-through comment.
36 * dwarf2read.c (process_die): Fix fall-through comments.
37 * dbxread.c (process_one_symbol): Fix fall-through comment.
38 * d-exp.y (lex_one_token): Fix fall-through comment.
39 * cp-name-parser.y (yylex): Fix fall-through comment.
40 * coffread.c (coff_symtab_read): Fix fall-through comment.
41 * c-exp.y (lex_one_token): Fix fall-through comment.
42 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
43 comment.
44 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
45 comment.
46
56bcdbea
TT
472018-05-04 Tom Tromey <tom@tromey.com>
48
49 PR python/22730:
50 * NEWS: Mention gdb.execute change.
51 * gdbcmd.h (execute_control_command): Don't declare.
52 * python/python.c (execute_gdb_command): Use read_command_lines_1,
53 execute_control_commands, execute_control_commands_to_string.
54 * cli/cli-script.h (execute_control_commands)
55 (execute_control_commands_to_string): Declare.
56 (execute_control_command): Add from_tty parameter.
57 * cli/cli-script.c (execute_control_commands)
58 (execute_control_commands_to_string): New functions.
59 (execute_user_command): Use execute_control_commands.
60 (execute_control_command_1): Add "from_tty" parameter. Update.
61 (execute_control_command): Likewise.
62
a913fffb
TT
632018-05-04 Tom Tromey <tom@tromey.com>
64
65 PR python/22731:
66 * NEWS: Mention that breakpoint commands are writable.
67 * python/py-breakpoint.c (bppy_set_commands): New function.
68 (breakpoint_object_getset) <"commands">: Use it.
69
60b3cef2
TT
702018-05-04 Tom Tromey <tom@tromey.com>
71
72 * tracepoint.c (actions_command): Update.
73 * mi/mi-cmd-break.c (mi_command_line_array)
74 (mi_command_line_array_cnt, mi_command_line_array_ptr)
75 (mi_read_next_line): Remove.
76 (mi_cmd_break_commands): Update.
77 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
78 function_view.
79 * cli/cli-script.c (get_command_line): Update.
80 (process_next_line): Use function_view. Constify.
81 (recurse_read_control_structure, read_command_lines)
82 (read_command_lines_1): Change argument types to function_view.
83 (do_define_command, document_command): Update.
84 * breakpoint.h (check_tracepoint_command): Don't declare.
85 * breakpoint.c (check_tracepoint_command): Remove.
86 (commands_command_1, create_tracepoint_from_upload): Update.
87
7a2c85f2
TT
882018-05-04 Tom Tromey <tom@tromey.com>
89
90 PR gdb/11750:
91 * cli/cli-script.h (enum command_control_type) <define_control>:
92 New constant.
93 * cli/cli-script.c (multi_line_command_p): Handle define_control.
94 (build_command_line, execute_control_command_1)
95 (process_next_line): Likewise.
96 (do_define_command): New function, extracted from define_command.
97 (define_command): Use it.
98
295dc222
TT
992018-05-04 Tom Tromey <tom@tromey.com>
100
101 * tracepoint.c (actions_command): Update.
102 * cli/cli-script.h (read_command_lines): Update.
103 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
104 (MAX_TMPBUF): Remove define.
105 (define_command): Use string_printf.
106 (document_command): Likewise.
107 * breakpoint.c (commands_command_1): Update.
108
1263a9d5
TT
1092018-05-04 Tom Tromey <tom@tromey.com>
110
111 * top.c (execute_command): Update.
112 * cli/cli-script.h (print_command_lines): Now varargs.
113 * cli/cli-script.c (print_command_lines): Now varargs.
114 (execute_control_command_1) <case while_control, case if_control>:
115 Update.
116
12973681
TT
1172018-05-04 Tom Tromey <tom@tromey.com>
118
119 * tracepoint.c (all_tracepoint_actions): Rename from
120 all_tracepoint_actions_and_cleanup. Change return type.
121 (actions_command, encode_actions_1, encode_actions)
122 (trace_dump_actions, tdump_command): Update.
123 * remote.c (remote_download_command_source): Update.
124 * python/python.c (gdbpy_eval_from_control_command)
125 (python_command, python_interactive_command): Update.
126 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
127 * guile/guile.c (guile_command)
128 (gdbscm_eval_from_control_command, guile_command): Update.
129 * compile/compile.c (compile_code_command)
130 (compile_print_command, compile_to_object): Update.
131 * cli/cli-script.h (struct command_lines_deleter): New.
132 (counted_command_line): New typedef.
133 (struct command_line): Add constructor, destructor.
134 <body_list>: Remove.
135 <body_list_0, body_list_1>: New members.
136 (command_line_up): Remove typedef.
137 (read_command_lines, read_command_lines_1, get_command_line):
138 Update.
139 (copy_command_lines): Don't declare.
140 * cli/cli-script.c (build_command_line): Use "new".
141 (get_command_line): Return counted_command_line.
142 (print_command_lines, execute_user_command)
143 (execute_control_command_1, while_command, if_command): Update.
144 (realloc_body_list): Remove.
145 (process_next_line, recurse_read_control_structure): Update.
146 (read_command_lines, read_command_lines_1): Return counted_command_line.
147 (free_command_lines): Use "delete".
148 (copy_command_lines): Remove.
149 (define_command, document_command, show_user_1): Update.
150 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
151 a counted_command_line.
152 * breakpoint.h (counted_command_line): Remove typedef.
153 (breakpoint_set_commands): Update.
154 * breakpoint.c (check_no_tracepoint_commands)
155 (validate_commands_for_breakpoint): Update.
156 (breakpoint_set_commands): Change commands to be a
157 counted_command_line.
158 (commands_command_1, update_dprintf_command_list)
159 (create_tracepoint_from_upload): Update.
160
e2fc72e2
TT
1612018-05-04 Tom Tromey <tom@tromey.com>
162
163 * cli/cli-decode.h (cmd_list_element): New constructor.
164 (~cmd_list_element): New destructor.
165 (struct cmd_list_element): Add initializers.
166 * cli/cli-decode.c (do_add_cmd): Use "new".
167 (delete_cmd): Use "delete".
168
a3b60e45
JK
1692018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
170 Pedro Alves <palves@redhat.com>
171
172 PR breakpoints/19806 and support for PR external/20207.
173 * NEWS: Mention Aarch64 watchpoint improvements.
174 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
175 watchpoints and PR external/20207 watchpoints.
176 * nat/aarch64-linux-hw-point.c
177 (kernel_supports_any_contiguous_range): New.
178 (aarch64_watchpoint_offset): New.
179 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
180 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
181 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
182 (aarch64_align_watchpoint): New parameters aligned_offset_p and
183 next_addr_orig_p. Support PR external/20207 watchpoints.
184 (aarch64_downgrade_regs): New.
185 (aarch64_dr_state_insert_one_point): New parameters offset and
186 addr_orig.
187 (aarch64_dr_state_remove_one_point): Likewise.
188 (aarch64_handle_breakpoint): Update caller.
189 (aarch64_handle_aligned_watchpoint): Likewise.
190 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
191 aligned_offset.
192 (aarch64_linux_set_debug_regs): Remove const from state. Call
193 aarch64_downgrade_regs.
194 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
195 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
196 (DR_CONTROL_MASK): ... this.
197 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
198 (unsigned int aarch64_watchpoint_offset): New prototype.
199 (aarch64_linux_set_debug_regs): Remove const from state.
200 * utils.c (align_up, align_down): Move to ...
201 * common/common-utils.c (align_up, align_down): ... here.
202 * utils.h (align_up, align_down): Move to ...
203 * common/common-utils.h (align_up, align_down): ... here.
204
05bc7456
JB
2052018-05-04 Joel Brobecker <brobecker@adacore.com>
206
207 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
208 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
209 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
210 Re-implement to match the ABI as summarized in GCC's
211 gcc/config/sparc/sparc.c. All callers updated.
212 (sparc32_store_arguments): Remove assertion.
213
2f433492
TT
2142018-05-04 Tom Tromey <tom@tromey.com>
215
216 * printcmd.c: Don't include tui.h.
217 (decode_format): Use skip_spaces.
218
9be2ae8f
TT
2192018-05-04 Tom Tromey <tom@tromey.com>
220
221 PR gdb/22619:
222 * printcmd.c (last_count): New global.
223 (x_command): Use saved count when repeating.
224
f0b3976b
TT
2252018-05-04 Tom Tromey <tom@tromey.com>
226
227 * nto-procfs.c (do_closedir_cleanup): Remove.
228 (procfs_pidlist): Use gdb_dir_up.
229 * procfs.c (do_closedir_cleanup): Remove.
230 (proc_update_threads): Use gdb_dir_up.
231 * common/filestuff.h (struct gdb_dir_deleter): New.
232 (gdb_dir_up): New typedef.
233
862d101a
TT
2342018-05-04 Tom Tromey <tom@tromey.com>
235
236 * ada-lang.c (print_mention_exception): Use std::string.
237
cb7de75e
TT
2382018-05-04 Tom Tromey <tom@tromey.com>
239
240 * ada-lang.c (create_excep_cond_exprs): Update.
241 (ada_exception_catchpoint_cond_string): Use std::string.
242
49d83361
TT
2432018-05-04 Tom Tromey <tom@tromey.com>
244
245 * ada-lang.c (xget_renaming_scope): Return std::string.
246 (old_renaming_is_invisible): Update.
247
ade72a34
TT
2482018-05-04 Tom Tromey <tom@tromey.com>
249
250 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
251 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
252
2be4d7f0
UW
2532018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
254
255 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
256
69b6ecb0
TT
2572018-05-04 Tom Tromey <tom@tromey.com>
258
259 * remote.c (remote_query_supported_append): Change type.
260 (remote_check_symbols): Update.
261
bf27f0e2
PP
2622018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
263
264 PR gdb/11420
265 * configure.ac: Prepend libpython.
266 * python/python-config.py: Likewise.
267 * configure: Regenerate.
268
4ea17de8
SM
2692018-05-03 Simon Marchi <simon.marchi@ericsson.com>
270
271 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
272
bd732259
PA
2732018-05-03 Pedro Alves <palves@redhat.com>
274
275 * s390-linux-nat.c
276 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
277 override. Write 'true' instead of '1'.
278 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
279 declaration.
280
d9f719f1
PA
2812018-05-02 Pedro Alves <palves@redhat.com>
282
283 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
284 add_inf_child_target.
285 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
286 add_inf_child_target.
287 * aix-thread.c (aix_thread_target_info): New.
288 (aix_thread_target) <shortname, longname, doc>: Delete.
289 <info>: New.
290 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
291 add_inf_child_target.
292 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
293 add_inf_child_target.
294 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
295 add_inf_child_target.
296 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
297 add_inf_child_target.
298 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
299 add_inf_child_target.
300 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
301 add_inf_child_target.
302 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
303 add_inf_child_target.
304 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
305 add_inf_child_target.
306 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
307 add_inf_child_target.
308 * bfd-target.c (target_bfd_target_info): New.
309 (target_bfd) <shortname, longname, doc>: Delete.
310 <info>: New.
311 * bsd-kvm.c (bsd_kvm_target_info): New.
312 (bsd_kvm_target) <shortname, longname, doc>: Delete.
313 <info>: New.
314 (bsd_kvm_target::open): Rename to ...
315 (bsd_kvm_target_open): ... this. Adjust.
316 * bsd-uthread.c (bsd_uthread_target_info): New.
317 (bsd_uthread_target) <shortname, longname, doc>: Delete.
318 <info>: New.
319 * corefile.c (core_file_command): Adjust.
320 * corelow.c (core_target_info): New.
321 (core_target) <shortname, longname, doc>: Delete.
322 <info>: New.
323 (core_target::open): Rename to ...
324 (core_target_open): ... this. Adjust.
325 * ctf.c (ctf_target_info): New.
326 (ctf_target) <shortname, longname, doc>: Delete.
327 <info>: New.
328 (ctf_target::open): Rename to ...
329 (ctf_target_open): ... this.
330 (_initialize_ctf): Adjust.
331 * exec.c (exec_target_info): New.
332 (exec_target) <shortname, longname, doc>: Delete.
333 <info>: New.
334 (exec_target::open): Rename to ...
335 (exec_target_open): ... this.
336 * gdbcore.h (core_target_open): Declare.
337 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
338 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
339 add_inf_child_target.
340 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
341 add_inf_child_target.
342 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
343 add_inf_child_target.
344 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
345 add_inf_child_target.
346 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
347 add_inf_child_target.
348 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
349 add_inf_child_target.
350 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
351 add_inf_child_target.
352 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
353 add_inf_child_target.
354 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
355 add_inf_child_target.
356 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
357 add_inf_child_target.
358 * inf-child.c (inf_child_target_info): New.
359 (inf_child_target::info): New.
360 (inf_child_open_target): Remove 'target' parameter. Use
361 get_native_target instead.
362 (inf_child_target::open): Delete.
363 (add_inf_child_target): New.
364 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
365 Delete.
366 <info>: New.
367 (add_inf_child_target): Declare.
368 (inf_child_open_target): Declare.
369 * linux-thread-db.c (thread_db_target_info): New.
370 (thread_db_target) <shortname, longname, doc>: Delete.
371 <info>: New.
372 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
373 add_inf_child_target.
374 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
375 add_inf_child_target.
376 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
377 add_inf_child_target.
378 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
379 add_inf_child_target.
380 * make-target-delegates (print_class): Adjust.
381 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
382 add_inf_child_target.
383 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
384 add_inf_child_target.
385 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
386 add_inf_child_target.
387 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
388 add_inf_child_target.
389 * nto-procfs.c (nto_native_target_info): New.
390 (nto_procfs_target_native) <shortname, longname, doc>:
391 Delete.
392 <info>: New.
393 (nto_procfs_target_info): New.
394 (nto_procfs_target_procfs) <shortname, longname, doc>:
395 Delete.
396 <info>: New.
397 (init_procfs_targets): Adjust.
398 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
399 add_inf_child_target.
400 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
401 add_inf_child_target.
402 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
403 add_inf_child_target.
404 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
405 add_inf_child_target.
406 * ravenscar-thread.c (ravenscar_target_info): New.
407 (ravenscar_thread_target) <shortname, longname, doc>:
408 Delete.
409 <info>: New.
410 * record-btrace.c (record_btrace_target_info):
411 (record_btrace_target) <shortname, longname, doc>: Delete.
412 <info>: New.
413 (record_btrace_target::open): Rename to ...
414 (record_btrace_target_open): ... this. Adjust.
415 * record-full.c (record_longname, record_doc): New.
416 (record_full_base_target) <shortname, longname, doc>: Delete.
417 <info>: New.
418 (record_full_target_info): New.
419 (record_full_target): <shortname>: Delete.
420 <info>: New.
421 (record_full_core_open_1, record_full_open_1): Update comments.
422 (record_full_base_target::open): Rename to ...
423 (record_full_open): ... this.
424 (cmd_record_full_restore): Update.
425 (_initialize_record_full): Update.
426 * remote-sim.c (remote_sim_target_info): New.
427 (gdbsim_target) <shortname, longname, doc>: Delete.
428 <info>: New.
429 (gdbsim_target::open): Rename to ...
430 (gdbsim_target_open): ... this.
431 (_initialize_remote_sim): Adjust.
432 * remote.c (remote_doc): New.
433 (remote_target_info): New.
434 (remote_target) <shortname, longname, doc>: Delete.
435 <info>: New.
436 (extended_remote_target_info): New.
437 (extended_remote_target) <shortname, longname, doc>: Delete.
438 <info>: New.
439 (remote_target::open_1): Make static. Adjust.
440 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
441 * s390-linux-nat.c (_initialize_s390_nat): Use
442 add_inf_child_target.
443 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
444 add_inf_child_target.
445 * sol-thread.c (thread_db_target_info): New.
446 (sol_thread_target) <shortname, longname, doc>: Delete.
447 <info>: New.
448 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
449 add_inf_child_target.
450 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
451 add_inf_child_target.
452 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
453 add_inf_child_target.
454 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
455 add_inf_child_target.
456 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
457 add_inf_child_target.
458 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
459 add_inf_child_target.
460 * spu-linux-nat.c (_initialize_spu_nat): Use
461 add_inf_child_target.
462 * spu-multiarch.c (spu_multiarch_target_info): New.
463 (spu_multiarch_target) <shortname, longname, doc>: Delete.
464 <info>: New.
465 * target-delegates.c: Regenerate.
466 * target.c: Include <unordered_map>.
467 (target_ops_p): Delete.
468 (DEF_VEC_P(target_ops_p)): Delete.
469 (target_factories): New.
470 (test_target_info): New.
471 (test_target_ops::info): New.
472 (open_target): Adjust to use target_factories.
473 (add_target_with_completer): Rename to ...
474 (add_target): ... this. Change prototype. Register target_info
475 and open callback in target_factories. Register target_info in
476 command context instead of target_ops.
477 (add_target): Delete old implementation.
478 (add_deprecated_target_alias): Change prototype. Adjust.
479 (the_native_target): New.
480 (set_native_target, get_native_target): New.
481 (find_default_run_target): Use the_native_target.
482 (find_attach_target, find_run_target): Simplify.
483 (target_ops::open): Delete.
484 (dummy_target_info): New.
485 (dummy_target::shortname, dummy_target::longname)
486 (dummy_target::doc): Delete.
487 (dummy_target::info): New.
488 (debug_target::shortname, debug_target::longname)
489 (debug_target::doc): Delete.
490 (debug_target::info): New.
491 * target.h (struct target_info): New.
492 (target_ops::~target_ops): Add comment.
493 (target_ops::info): New.
494 (target_ops::shortname, target_ops::longname, target_ops::doc): No
495 longer virtual. Implement in terms of target_info.
496 (set_native_target, get_native_target): Declare.
497 (target_open_ftype): New.
498 (add_target, add_target_with_completer)
499 (add_deprecated_target_alias): Change prototype.
500 (test_target) <shortname, longname, doc>: Delete.
501 <info>: New.
502 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
503 add_inf_child_target.
504 * tracefile-tfile.c (tfile_target_info): New.
505 (tfile_target) <shortname, longname, doc>: Delete.
506 <info>: New.
507 (tfile_target::open): Rename to ...
508 (tfile_target_open): ... this.
509 (_initialize_tracefile_tfile): Adjust.
510 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
511 add_inf_child_target.
512 * windows-nat.c (_initialize_windows_nat): Use
513 add_inf_child_target.
514 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
515 add_inf_child_target.
516
135340af
PA
5172018-05-02 Pedro Alves <palves@redhat.com>
518
519 * linux-nat.h (linux_nat_target) <low_new_thread,
520 low_delete_thread, low_new_fork, low_forget_process,
521 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
522 New virtual methods.
523 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
524 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
525 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
526 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
527 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
528 Delete.
529 * linux-fork.c (delete_fork): Adjust to call low method.
530 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
531 (linux_nat_new_fork, linux_nat_forget_process_hook)
532 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
533 (linux_nat_status_is_event):
534 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
535 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
536 to call low method.
537 (sigtrap_is_event): Rename to ...
538 (linux_nat_target::low_status_is_event): ... this.
539 (linux_nat_set_status_is_event): Delete.
540 (save_stop_reason, linux_nat_wait_1)
541 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
542 low methods.
543 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
544 (linux_nat_set_new_fork, linux_nat_set_forget_process)
545 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
546 (linux_nat_set_prepare_to_resume): Delete.
547 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
548 low virtual methods.
549 * amd64-linux-nat.c: Likewise.
550 * arm-linux-nat.c: Likewise.
551 * i386-linux-nat.c: Likewise.
552 * ia64-linux-nat.c: Likewise.
553 * mips-linux-nat.c: Likewise.
554 * ppc-linux-nat.c: Likewise.
555 * s390-linux-nat.c: Likewise.
556 * sparc64-linux-nat.c: Likewise.
557 * x86-linux-nat.c: Likewise.
558 * x86-linux-nat.h: Include "nat/x86-linux.h".
559 (x86_linux_nat_target) <low_new_fork, low_forget_process,
560 low_prepare_to_resume, low_new_thread, low_delete_thread>:
561 Override methods.
562
57810aa7
PA
5632018-05-02 Pedro Alves <palves@redhat.com>
564
565 * target.h (target_ops)
566 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
567 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
568 stopped_by_watchpoint, have_continuable_watchpoint,
569 stopped_data_address, watchpoint_addr_within_range,
570 can_accel_watchpoint_condition, can_run, thread_alive,
571 has_all_memory, has_memory, has_stack, has_registers,
572 has_execution, can_async_p, is_async_p, supports_non_stop,
573 always_non_stop_p, can_execute_reverse, supports_multi_process,
574 supports_enable_disable_tracepoint,
575 supports_disable_randomization, supports_string_tracing,
576 supports_evaluation_of_breakpoint_conditions,
577 can_run_breakpoint_commands, filesystem_is_local,
578 can_download_tracepoint, get_trace_state_variable_value,
579 set_trace_notes, get_tib_address, use_agent, can_use_agent,
580 record_is_replaying, record_will_replay,
581 augmented_libraries_svr4_read>: Adjust to return bool.
582 * aarch64-linux-nat.c: All implementations adjusted.
583 * aix-thread.c: All implementations adjusted.
584 * arm-linux-nat.c: All implementations adjusted.
585 * breakpoint.c: All implementations adjusted.
586 * bsd-kvm.c: All implementations adjusted.
587 * bsd-uthread.c: All implementations adjusted.
588 * corelow.c: All implementations adjusted.
589 * ctf.c: All implementations adjusted.
590 * darwin-nat.c: All implementations adjusted.
591 * darwin-nat.h: All implementations adjusted.
592 * exec.c: All implementations adjusted.
593 * fbsd-nat.c: All implementations adjusted.
594 * fbsd-nat.h: All implementations adjusted.
595 * gnu-nat.c: All implementations adjusted.
596 * gnu-nat.h: All implementations adjusted.
597 * go32-nat.c: All implementations adjusted.
598 * ia64-linux-nat.c: All implementations adjusted.
599 * inf-child.c: All implementations adjusted.
600 * inf-child.h: All implementations adjusted.
601 * inf-ptrace.c: All implementations adjusted.
602 * inf-ptrace.h: All implementations adjusted.
603 * linux-nat.c: All implementations adjusted.
604 * linux-nat.h: All implementations adjusted.
605 * mips-linux-nat.c: All implementations adjusted.
606 * nto-procfs.c: All implementations adjusted.
607 * ppc-linux-nat.c: All implementations adjusted.
608 * procfs.c: All implementations adjusted.
609 * ravenscar-thread.c: All implementations adjusted.
610 * record-btrace.c: All implementations adjusted.
611 * record-full.c: All implementations adjusted.
612 * remote-sim.c: All implementations adjusted.
613 * remote.c: All implementations adjusted.
614 * s390-linux-nat.c: All implementations adjusted.
615 * sol-thread.c: All implementations adjusted.
616 * spu-multiarch.c: All implementations adjusted.
617 * target-delegates.c: All implementations adjusted.
618 * target.c: All implementations adjusted.
619 * target.h: All implementations adjusted.
620 * tracefile-tfile.c: All implementations adjusted.
621 * tracefile.c: All implementations adjusted.
622 * tracefile.h: All implementations adjusted.
623 * windows-nat.c: All implementations adjusted.
624 * x86-linux-nat.h: All implementations adjusted.
625 * x86-nat.h: All implementations adjusted.
626
ad6a4e2d
PA
6272018-05-02 Pedro Alves <palves@redhat.com>
628
629 * make-target-delegates (scan_target_h): Don't trim lines here.
630 Replace sequences of tabs and/or whitespace with a single
631 whitespace.
632 (top level, parsing methods): Trim each line before processing it
633 here.
634
f6ac5f3d
PA
6352018-05-02 Pedro Alves <palves@redhat.com>
636 John Baldwin <jhb@freebsd.org>
637
638 * target.h (enum strata) <debug_stratum>: New.
639 (struct target_ops) <all delegation methods>: Replace by C++
640 virtual methods, and drop "to_" prefix. All references updated
641 throughout.
642 <to_shortname, to_longname, to_doc, to_data,
643 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
644 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
645 virtual methods. All references updated throughout.
646 <can_attach, supports_terminal_ours, can_create_inferior,
647 get_thread_control_capabilities, attach_no_wait>: New
648 virtual methods.
649 <insert_breakpoint, remove_breakpoint>: Now
650 TARGET_DEFAULT_NORETURN methods.
651 <info_proc>: Now returns bool.
652 <to_magic>: Delete.
653 (OPS_MAGIC): Delete.
654 (current_target): Delete. All references replaced by references
655 to ...
656 (target_stack): ... this. New.
657 (target_shortname, target_longname): Adjust.
658 (target_can_run): Now a function declaration.
659 (default_child_has_all_memory, default_child_has_memory)
660 (default_child_has_stack, default_child_has_registers)
661 (default_child_has_execution): Remove target_ops parameter.
662 (complete_target_initialization): Delete.
663 (memory_breakpoint_target): New template class.
664 (test_target_ops): Refactor as a C++ class with virtual methods.
665 * make-target-delegates (NAME_PART): Tighten.
666 (POINTER_PART, CP_SYMBOL): New.
667 (SIMPLE_RETURN_PART): Reimplement.
668 (VEC_RETURN_PART): Expect less.
669 (RETURN_PART, VIRTUAL_PART): New.
670 (METHOD): Adjust to C++ virtual methods.
671 (scan_target_h): Remove reference to C99.
672 (dname): Output "target_ops::" prefix.
673 (write_function_header): Adjust to output a C++ class method.
674 (write_declaration): New.
675 (write_delegator): Adjust to output a C++ class method.
676 (tdname): Output "dummy_target::" prefix.
677 (write_tdefault, write_debugmethod): Adjust to output a C++ class
678 method.
679 (tdefault_names, debug_names): Delete.
680 (return_types, tdefaults, styles, argtypes_array): New.
681 (top level): All methods are delegators.
682 (print_class): New.
683 (top level): Print dummy_target and debug_target classes.
684 * target-delegates.c: Regenerate.
685 * target-debug.h (target_debug_print_enum_info_proc_what)
686 (target_debug_print_thread_control_capabilities)
687 (target_debug_print_thread_info_p): New.
688 * target.c (dummy_target): Delete.
689 (the_dummy_target, the_debug_target): New.
690 (target_stack): Now extern.
691 (set_targetdebug): Push/unpush debug target.
692 (default_child_has_all_memory, default_child_has_memory)
693 (default_child_has_stack, default_child_has_registers)
694 (default_child_has_execution): Remove target_ops parameter.
695 (complete_target_initialization): Delete.
696 (add_target_with_completer): No longer call
697 complete_target_initialization.
698 (target_supports_terminal_ours): Use regular delegation.
699 (update_current_target): Delete.
700 (push_target): No longer check magic number. Don't call
701 update_current_target.
702 (unpush_target): Don't call update_current_target.
703 (target_is_pushed): No longer check magic number.
704 (target_require_runnable): Skip for all stratums over
705 process_stratum.
706 (target_ops::info_proc): New.
707 (target_info_proc): Use find_target_at and
708 find_default_run_target.
709 (target_supports_disable_randomization): Use regular delegation.
710 (target_get_osdata): Use find_target_at.
711 (target_ops::open, target_ops::close, target_ops::can_attach)
712 (target_ops::attach, target_ops::can_create_inferior)
713 (target_ops::create_inferior, target_ops::can_run)
714 (target_can_run): New.
715 (default_fileio_target): Use regular delegation.
716 (target_ops::fileio_open, target_ops::fileio_pwrite)
717 (target_ops::fileio_pread, target_ops::fileio_fstat)
718 (target_ops::fileio_close, target_ops::fileio_unlink)
719 (target_ops::fileio_readlink): New.
720 (target_fileio_open_1, target_fileio_unlink)
721 (target_fileio_readlink): Always call the target method. Handle
722 FILEIO_ENOSYS.
723 (return_zero, return_zero_has_execution): Delete.
724 (init_dummy_target): Delete.
725 (dummy_target::dummy_target, dummy_target::shortname)
726 (dummy_target::longname, dummy_target::doc)
727 (debug_target::debug_target, debug_target::shortname)
728 (debug_target::longname, debug_target::doc): New.
729 (target_supports_delete_record): Use regular delegation.
730 (setup_target_debug): Delete.
731 (maintenance_print_target_stack): Skip debug_stratum.
732 (initialize_targets): Instantiate the_dummy_target and
733 the_debug_target.
734 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
735 use target_stack.
736 (target_auxv_search, fprint_target_auxv): Adjust.
737 (info_auxv_command): Adjust to use target_stack.
738 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
739 * exceptions.c (print_flush): Handle a NULL target_stack.
740 * regcache.c (target_ops_no_register): Refactor as class with
741 virtual methods.
742
743 * exec.c (exec_target): New class.
744 (exec_ops): Now an exec_target.
745 (exec_open, exec_close_1, exec_get_section_table)
746 (exec_xfer_partial, exec_files_info, exec_has_memory)
747 (exec_make_note_section): Refactor as exec_target methods.
748 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
749 Delete.
750 (exec_target::find_memory_regions): New.
751 (_initialize_exec): Don't call init_exec_ops.
752 * gdbcore.h (exec_file_clear): Delete.
753
754 * corefile.c (core_target): Delete.
755 (core_file_command): Adjust.
756 * corelow.c (core_target): New class.
757 (the_core_target): New.
758 (core_close): Remove target_ops parameter.
759 (core_close_cleanup): Adjust.
760 (core_target::close): New.
761 (core_open, core_detach, get_core_registers, core_files_info)
762 (core_xfer_partial, core_thread_alive, core_read_description)
763 (core_pid_to_str, core_thread_name, core_has_memory)
764 (core_has_stack, core_has_registers, core_info_proc): Rework as
765 core_target methods.
766 (ignore, core_remove_breakpoint, init_core_ops): Delete.
767 (_initialize_corelow): Initialize the_core_target.
768 * gdbcore.h (core_target): Delete.
769 (the_core_target): New.
770
771 * ctf.c: (ctf_target): New class.
772 (ctf_ops): Now a ctf_target.
773 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
774 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
775 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
776 methods.
777 (init_ctf_ops): Delete.
778 (_initialize_ctf): Don't call it.
779 * tracefile-tfile.c (tfile_target): New class.
780 (tfile_ops): Now a tfile_target.
781 (tfile_open, tfile_close, tfile_files_info)
782 (tfile_get_tracepoint_status, tfile_trace_find)
783 (tfile_fetch_registers, tfile_xfer_partial)
784 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
785 Refactor as tfile_target methods.
786 (tfile_xfer_partial_features): Remove target_ops parameter.
787 (init_tfile_ops): Delete.
788 (_initialize_tracefile_tfile): Don't call it.
789 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
790 (tracefile_has_stack, tracefile_has_registers)
791 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
792 tracefile_target methods.
793 (init_tracefile_ops): Delete.
794 (tracefile_target::tracefile_target): New.
795 * tracefile.h: Include "target.h".
796 (tracefile_target): New class.
797 (init_tracefile_ops): Delete.
798
799 * spu-multiarch.c (spu_multiarch_target): New class.
800 (spu_ops): Now a spu_multiarch_target.
801 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
802 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
803 (spu_search_memory, spu_mourn_inferior): Refactor as
804 spu_multiarch_target methods.
805 (init_spu_ops): Delete.
806 (_initialize_spu_multiarch): Remove references to init_spu_ops,
807 complete_target_initialization.
808
809 * ravenscar-thread.c (ravenscar_thread_target): New class.
810 (ravenscar_ops): Now a ravenscar_thread_target.
811 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
812 (ravenscar_thread_alive, ravenscar_pid_to_str)
813 (ravenscar_fetch_registers, ravenscar_store_registers)
814 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
815 (ravenscar_stopped_by_hw_breakpoint)
816 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
817 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
818 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
819 methods.
820 (init_ravenscar_thread_ops): Delete.
821 (_initialize_ravenscar): Remove references to
822 init_ravenscar_thread_ops and complete_target_initialization.
823
824 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
825 (bsd_uthread_target): New class.
826 (bsd_uthread_ops): Now a bsd_uthread_target.
827 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
828 (bsd_uthread_close, bsd_uthread_mourn_inferior)
829 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
830 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
831 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
832 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
833 (bsd_uthread_target): Delete function.
834 (_initialize_bsd_uthread): Remove reference to
835 complete_target_initialization.
836
837 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
838 (target_bfd): ... this new class.
839 (target_bfd_xfer_partial, target_bfd_get_section_table)
840 (target_bfd_close): Refactor as target_bfd methods.
841 (target_bfd::~target_bfd): New.
842 (target_bfd_reopen): Adjust.
843 (target_bfd::close): New.
844
845 * record-btrace.c (record_btrace_target): New class.
846 (record_btrace_ops): Now a record_btrace_target.
847 (record_btrace_open, record_btrace_stop_recording)
848 (record_btrace_disconnect, record_btrace_close)
849 (record_btrace_async, record_btrace_info)
850 (record_btrace_insn_history, record_btrace_insn_history_range)
851 (record_btrace_insn_history_from, record_btrace_call_history)
852 (record_btrace_call_history_range)
853 (record_btrace_call_history_from, record_btrace_record_method)
854 (record_btrace_is_replaying, record_btrace_will_replay)
855 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
856 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
857 (record_btrace_store_registers, record_btrace_prepare_to_store)
858 (record_btrace_to_get_unwinder)
859 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
860 (record_btrace_commit_resume, record_btrace_wait)
861 (record_btrace_stop, record_btrace_can_execute_reverse)
862 (record_btrace_stopped_by_sw_breakpoint)
863 (record_btrace_supports_stopped_by_sw_breakpoint)
864 (record_btrace_stopped_by_hw_breakpoint)
865 (record_btrace_supports_stopped_by_hw_breakpoint)
866 (record_btrace_update_thread_list, record_btrace_thread_alive)
867 (record_btrace_goto_begin, record_btrace_goto_end)
868 (record_btrace_goto, record_btrace_stop_replaying_all)
869 (record_btrace_execution_direction)
870 (record_btrace_prepare_to_generate_core)
871 (record_btrace_done_generating_core): Refactor as
872 record_btrace_target methods.
873 (init_record_btrace_ops): Delete.
874 (_initialize_record_btrace): Remove reference to
875 init_record_btrace_ops.
876 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
877 the execution_direction global.
878 (record_full_base_target, record_full_target)
879 (record_full_core_target): New classes.
880 (record_full_ops): Now a record_full_target.
881 (record_full_core_ops): Now a record_full_core_target.
882 (record_full_target::detach, record_full_target::disconnect)
883 (record_full_core_target::disconnect)
884 (record_full_target::mourn_inferior, record_full_target::kill):
885 New.
886 (record_full_open, record_full_close, record_full_async): Refactor
887 as methods of the record_full_base_target class.
888 (record_full_resume, record_full_commit_resume): Refactor
889 as methods of the record_full_target class.
890 (record_full_wait, record_full_stopped_by_watchpoint)
891 (record_full_stopped_data_address)
892 (record_full_stopped_by_sw_breakpoint)
893 (record_full_supports_stopped_by_sw_breakpoint)
894 (record_full_stopped_by_hw_breakpoint)
895 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
896 methods of the record_full_base_target class.
897 (record_full_store_registers, record_full_xfer_partial)
898 (record_full_insert_breakpoint, record_full_remove_breakpoint):
899 Refactor as methods of the record_full_target class.
900 (record_full_can_execute_reverse, record_full_get_bookmark)
901 (record_full_goto_bookmark, record_full_execution_direction)
902 (record_full_record_method, record_full_info, record_full_delete)
903 (record_full_is_replaying, record_full_will_replay)
904 (record_full_goto_begin, record_full_goto_end, record_full_goto)
905 (record_full_stop_replaying): Refactor as methods of the
906 record_full_base_target class.
907 (record_full_core_resume, record_full_core_kill)
908 (record_full_core_fetch_registers)
909 (record_full_core_prepare_to_store)
910 (record_full_core_store_registers, record_full_core_xfer_partial)
911 (record_full_core_insert_breakpoint)
912 (record_full_core_remove_breakpoint)
913 (record_full_core_has_execution): Refactor
914 as methods of the record_full_core_target class.
915 (record_full_base_target::supports_delete_record): New.
916 (init_record_full_ops): Delete.
917 (init_record_full_core_ops): Delete.
918 (record_full_save): Refactor as method of the
919 record_full_base_target class.
920 (_initialize_record_full): Remove references to
921 init_record_full_ops and init_record_full_core_ops.
922
923 * remote.c (remote_target, extended_remote_target): New classes.
924 (remote_ops): Now a remote_target.
925 (extended_remote_ops): Now an extended_remote_target.
926 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
927 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
928 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
929 (remote_pass_signals, remote_set_syscall_catchpoint)
930 (remote_program_signals, )
931 (remote_thread_always_alive): Remove target_ops parameter.
932 (remote_thread_alive, remote_thread_name)
933 (remote_update_thread_list, remote_threads_extra_info)
934 (remote_static_tracepoint_marker_at)
935 (remote_static_tracepoint_markers_by_strid)
936 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
937 (remote_open): Refactor as methods of remote_target.
938 (extended_remote_open, extended_remote_detach)
939 (extended_remote_attach, extended_remote_post_attach):
940 (extended_remote_supports_disable_randomization)
941 (extended_remote_create_inferior): : Refactor as method of
942 extended_remote_target.
943 (remote_set_permissions, remote_open_1, remote_detach)
944 (remote_follow_fork, remote_follow_exec, remote_disconnect)
945 (remote_resume, remote_commit_resume, remote_stop)
946 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
947 (remote_terminal_ours, remote_wait, remote_fetch_registers)
948 (remote_prepare_to_store, remote_store_registers)
949 (remote_flash_erase, remote_flash_done, remote_files_info)
950 (remote_kill, remote_mourn, remote_insert_breakpoint)
951 (remote_remove_breakpoint, remote_insert_watchpoint)
952 (remote_watchpoint_addr_within_range)
953 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
954 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
955 (remote_supports_stopped_by_sw_breakpoint)
956 (remote_stopped_by_hw_breakpoint)
957 (remote_supports_stopped_by_hw_breakpoint)
958 (remote_stopped_by_watchpoint, remote_stopped_data_address)
959 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
960 (remote_verify_memory): Refactor as methods of remote_target.
961 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
962 parameter.
963 (remote_xfer_partial, remote_get_memory_xfer_limit)
964 (remote_search_memory, remote_rcmd, remote_memory_map)
965 (remote_pid_to_str, remote_get_thread_local_address)
966 (remote_get_tib_address, remote_read_description): Refactor as
967 methods of remote_target.
968 (remote_target::fileio_open, remote_target::fileio_pwrite)
969 (remote_target::fileio_pread, remote_target::fileio_close): New.
970 (remote_hostio_readlink, remote_hostio_fstat)
971 (remote_filesystem_is_local, remote_can_execute_reverse)
972 (remote_supports_non_stop, remote_supports_disable_randomization)
973 (remote_supports_multi_process, remote_supports_cond_breakpoints)
974 (remote_supports_enable_disable_tracepoint)
975 (remote_supports_string_tracing)
976 (remote_can_run_breakpoint_commands, remote_trace_init)
977 (remote_download_tracepoint, remote_can_download_tracepoint)
978 (remote_download_trace_state_variable, remote_enable_tracepoint)
979 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
980 (remote_trace_start, remote_get_trace_status)
981 (remote_get_tracepoint_status, remote_trace_stop)
982 (remote_trace_find, remote_get_trace_state_variable_value)
983 (remote_save_trace_data, remote_get_raw_trace_data)
984 (remote_set_disconnected_tracing, remote_core_of_thread)
985 (remote_set_circular_trace_buffer, remote_traceframe_info)
986 (remote_get_min_fast_tracepoint_insn_len)
987 (remote_set_trace_buffer_size, remote_set_trace_notes)
988 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
989 (remote_disable_btrace, remote_teardown_btrace)
990 (remote_read_btrace, remote_btrace_conf)
991 (remote_augmented_libraries_svr4_read, remote_load)
992 (remote_pid_to_exec_file, remote_can_do_single_step)
993 (remote_execution_direction, remote_thread_handle_to_thread_info):
994 Refactor as methods of remote_target.
995 (init_remote_ops, init_extended_remote_ops): Delete.
996 (remote_can_async_p, remote_is_async_p, remote_async)
997 (remote_thread_events, remote_upload_tracepoints)
998 (remote_upload_trace_state_variables): Refactor as methods of
999 remote_target.
1000 (_initialize_remote): Remove references to init_remote_ops and
1001 init_extended_remote_ops.
1002
1003 * remote-sim.c (gdbsim_target): New class.
1004 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
1005 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
1006 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
1007 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
1008 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
1009 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
1010 Refactor as methods of gdbsim_target.
1011 (gdbsim_ops): Now a gdbsim_target.
1012 (init_gdbsim_ops): Delete.
1013 (gdbsim_cntrl_c): Adjust.
1014 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
1015
1016 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
1017 (the_amd64_linux_nat_target): New.
1018 (amd64_linux_fetch_inferior_registers)
1019 (amd64_linux_store_inferior_registers): Refactor as methods of
1020 amd64_linux_nat_target.
1021 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
1022 * i386-linux-nat.c: Don't include "linux-nat.h".
1023 (i386_linux_nat_target): New class.
1024 (the_i386_linux_nat_target): New.
1025 (i386_linux_fetch_inferior_registers)
1026 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
1027 as methods of i386_linux_nat_target.
1028 (_initialize_i386_linux_nat): Adjust. Set linux_target.
1029 * inf-child.c (inf_child_ops): Delete.
1030 (inf_child_fetch_inferior_registers)
1031 (inf_child_store_inferior_registers): Delete.
1032 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
1033 methods of inf_child_target.
1034 (inf_child_target::supports_terminal_ours)
1035 (inf_child_target::terminal_init)
1036 (inf_child_target::terminal_inferior)
1037 (inf_child_target::terminal_ours_for_output)
1038 (inf_child_target::terminal_ours, inf_child_target::interrupt)
1039 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
1040 New.
1041 (inf_child_open, inf_child_disconnect, inf_child_close)
1042 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
1043 (inf_child_post_startup_inferior, inf_child_can_run)
1044 (inf_child_pid_to_exec_file): Refactor as methods of
1045 inf_child_target.
1046 (inf_child_follow_fork): Delete.
1047 (inf_child_target::can_create_inferior)
1048 (inf_child_target::can_attach): New.
1049 (inf_child_target::has_all_memory, inf_child_target::has_memory)
1050 (inf_child_target::has_stack, inf_child_target::has_registers)
1051 (inf_child_target::has_execution): New.
1052 (inf_child_fileio_open, inf_child_fileio_pwrite)
1053 (inf_child_fileio_pread, inf_child_fileio_fstat)
1054 (inf_child_fileio_close, inf_child_fileio_unlink)
1055 (inf_child_fileio_readlink, inf_child_use_agent)
1056 (inf_child_can_use_agent): Refactor as methods of
1057 inf_child_target.
1058 (return_zero, inf_child_target): Delete.
1059 (inf_child_target::inf_child_target): New.
1060 * inf-child.h: Include "target.h".
1061 (inf_child_target): Delete function prototype.
1062 (inf_child_target): New class.
1063 (inf_child_open_target, inf_child_mourn_inferior)
1064 (inf_child_maybe_unpush_target): Delete.
1065 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
1066 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
1067 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
1068 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
1069 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
1070 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
1071 (inf_ptrace_wait, inf_ptrace_xfer_partial)
1072 (inf_ptrace_thread_alive, inf_ptrace_files_info)
1073 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
1074 methods of inf_ptrace_target.
1075 (inf_ptrace_target): Delete function.
1076 * inf-ptrace.h: Include "inf-child.h".
1077 (inf_ptrace_target): Delete function declaration.
1078 (inf_ptrace_target): New class.
1079 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
1080 * linux-nat.c (linux_target): New.
1081 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
1082 (linux_nat_target::~linux_nat_target): New.
1083 (linux_child_post_attach, linux_child_post_startup_inferior)
1084 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
1085 (linux_child_remove_fork_catchpoint)
1086 (linux_child_insert_vfork_catchpoint)
1087 (linux_child_remove_vfork_catchpoint)
1088 (linux_child_insert_exec_catchpoint)
1089 (linux_child_remove_exec_catchpoint)
1090 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
1091 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
1092 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
1093 (linux_nat_stopped_data_address)
1094 (linux_nat_stopped_by_sw_breakpoint)
1095 (linux_nat_supports_stopped_by_sw_breakpoint)
1096 (linux_nat_stopped_by_hw_breakpoint)
1097 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
1098 (linux_nat_kill, linux_nat_mourn_inferior)
1099 (linux_nat_xfer_partial, linux_nat_thread_alive)
1100 (linux_nat_update_thread_list, linux_nat_pid_to_str)
1101 (linux_nat_thread_name, linux_child_pid_to_exec_file)
1102 (linux_child_static_tracepoint_markers_by_strid)
1103 (linux_nat_is_async_p, linux_nat_can_async_p)
1104 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
1105 (linux_nat_supports_multi_process)
1106 (linux_nat_supports_disable_randomization, linux_nat_async)
1107 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
1108 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
1109 (linux_nat_fileio_open, linux_nat_fileio_readlink)
1110 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
1111 methods of linux_nat_target.
1112 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
1113 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
1114 parameter.
1115 (check_stopped_by_watchpoint): Adjust.
1116 (linux_xfer_partial): Delete.
1117 (linux_target_install_ops, linux_target, linux_nat_add_target):
1118 Delete.
1119 (linux_nat_target::linux_nat_target): New.
1120 * linux-nat.h: Include "inf-ptrace.h".
1121 (linux_nat_target): New.
1122 (linux_target, linux_target_install_ops, linux_nat_add_target):
1123 Delete function declarations.
1124 (linux_target): Declare global.
1125 * linux-thread-db.c (thread_db_target): New.
1126 (thread_db_target::thread_db_target): New.
1127 (thread_db_ops): Delete.
1128 (the_thread_db_target): New.
1129 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
1130 (thread_db_update_thread_list, thread_db_pid_to_str)
1131 (thread_db_extra_thread_info)
1132 (thread_db_thread_handle_to_thread_info)
1133 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
1134 (thread_db_resume): Refactor as methods of thread_db_target.
1135 (init_thread_db_ops): Delete.
1136 (_initialize_thread_db): Remove reference to init_thread_db_ops.
1137 * x86-linux-nat.c: Don't include "linux-nat.h".
1138 (super_post_startup_inferior): Delete.
1139 (x86_linux_nat_target::~x86_linux_nat_target): New.
1140 (x86_linux_child_post_startup_inferior)
1141 (x86_linux_read_description, x86_linux_enable_btrace)
1142 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
1143 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
1144 methods of x86_linux_nat_target.
1145 (x86_linux_create_target): Delete. Bits folded ...
1146 (x86_linux_add_target): ... here. Now takes a linux_nat_target
1147 pointer.
1148 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
1149 (x86_linux_nat_target): New class.
1150 (x86_linux_create_target): Delete.
1151 (x86_linux_add_target): Now takes a linux_nat_target pointer.
1152 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
1153 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
1154 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
1155 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
1156 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
1157 make extern.
1158 (x86_use_watchpoints): Delete.
1159 * x86-nat.h: Include "breakpoint.h" and "target.h".
1160 (x86_use_watchpoints): Delete.
1161 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
1162 (x86_stopped_by_watchpoint, x86_stopped_data_address)
1163 (x86_insert_watchpoint, x86_remove_watchpoint)
1164 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
1165 (x86_stopped_by_hw_breakpoint): New declarations.
1166 (x86_nat_target): New template class.
1167
1168 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
1169 (the_ppc_linux_nat_target): New.
1170 (ppc_linux_fetch_inferior_registers)
1171 (ppc_linux_can_use_hw_breakpoint)
1172 (ppc_linux_region_ok_for_hw_watchpoint)
1173 (ppc_linux_ranged_break_num_registers)
1174 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
1175 (ppc_linux_insert_mask_watchpoint)
1176 (ppc_linux_remove_mask_watchpoint)
1177 (ppc_linux_can_accel_watchpoint_condition)
1178 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
1179 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
1180 (ppc_linux_watchpoint_addr_within_range)
1181 (ppc_linux_masked_watch_num_registers)
1182 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
1183 (ppc_linux_read_description): Refactor as methods of
1184 ppc_linux_nat_target.
1185 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
1186
1187 * procfs.c (procfs_xfer_partial): Delete forward declaration.
1188 (procfs_target): New class.
1189 (the_procfs_target): New.
1190 (procfs_target): Delete function.
1191 (procfs_auxv_parse, procfs_attach, procfs_detach)
1192 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
1193 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
1194 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
1195 (procfs_create_inferior, procfs_update_thread_list)
1196 (procfs_thread_alive, procfs_pid_to_str)
1197 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
1198 (procfs_stopped_data_address, procfs_insert_watchpoint)
1199 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
1200 (proc_find_memory_regions, procfs_info_proc)
1201 (procfs_make_note_section): Refactor as methods of procfs_target.
1202 (_initialize_procfs): Adjust.
1203 * sol-thread.c (sol_thread_target): New class.
1204 (sol_thread_ops): Now a sol_thread_target.
1205 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
1206 (sol_thread_fetch_registers, sol_thread_store_registers)
1207 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
1208 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
1209 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
1210 (init_sol_thread_ops): Delete.
1211 (_initialize_sol_thread): Adjust. Remove references to
1212 init_sol_thread_ops and complete_target_initialization.
1213
1214 * windows-nat.c (windows_nat_target): New class.
1215 (windows_fetch_inferior_registers)
1216 (windows_store_inferior_registers, windows_resume, windows_wait)
1217 (windows_attach, windows_detach, windows_pid_to_exec_file)
1218 (windows_files_info, windows_create_inferior)
1219 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
1220 (windows_close, windows_pid_to_str, windows_xfer_partial)
1221 (windows_get_tib_address, windows_get_ada_task_ptid)
1222 (windows_thread_name, windows_thread_alive): Refactor as
1223 windows_nat_target methods.
1224 (do_initial_windows_stuff): Adjust.
1225 (windows_target): Delete function.
1226 (_initialize_windows_nat): Adjust.
1227
1228 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
1229 (darwin_mourn_inferior, darwin_kill_inferior)
1230 (darwin_create_inferior, darwin_attach, darwin_detach)
1231 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
1232 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
1233 (darwin_supports_multi_process): Refactor as darwin_nat_target
1234 methods.
1235 (darwin_resume_to, darwin_files_info): Delete.
1236 (_initialize_darwin_inferior): Rename to ...
1237 (_initialize_darwin_nat): ... this. Adjust to C++ification.
1238 * darwin-nat.h: Include "inf-child.h".
1239 (darwin_nat_target): New class.
1240 (darwin_complete_target): Delete.
1241 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
1242 (darwin_target): New.
1243 (i386_darwin_fetch_inferior_registers)
1244 (i386_darwin_store_inferior_registers): Refactor as methods of
1245 darwin_nat_target.
1246 (darwin_complete_target): Delete, with ...
1247 (_initialize_i386_darwin_nat): ... bits factored out here.
1248
1249 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
1250 (the_alpha_linux_nat_target): New.
1251 (alpha_linux_register_u_offset): Refactor as
1252 alpha_linux_nat_target method.
1253 (_initialize_alpha_linux_nat): Adjust.
1254 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
1255 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
1256 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
1257 methods of linux_nat_trad_target.
1258 (linux_trad_target): Delete.
1259 * linux-nat-trad.h (linux_trad_target): Delete function.
1260 (linux_nat_trad_target): New class.
1261 * mips-linux-nat.c (mips_linux_nat_target): New class.
1262 (super_fetch_registers, super_store_registers, super_close):
1263 Delete.
1264 (the_mips_linux_nat_target): New.
1265 (mips64_linux_regsets_fetch_registers)
1266 (mips64_linux_regsets_store_registers)
1267 (mips64_linux_fetch_registers, mips64_linux_store_registers)
1268 (mips_linux_register_u_offset, mips_linux_read_description)
1269 (mips_linux_can_use_hw_breakpoint)
1270 (mips_linux_stopped_by_watchpoint)
1271 (mips_linux_stopped_data_address)
1272 (mips_linux_region_ok_for_hw_watchpoint)
1273 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
1274 (mips_linux_close): Refactor as methods of mips_linux_nat.
1275 (_initialize_mips_linux_nat): Adjust to C++ification.
1276
1277 * aix-thread.c (aix_thread_target): New class.
1278 (aix_thread_ops): Now an aix_thread_target.
1279 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
1280 (aix_thread_fetch_registers, aix_thread_store_registers)
1281 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
1282 (aix_thread_thread_alive, aix_thread_pid_to_str)
1283 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
1284 Refactor as methods of aix_thread_target.
1285 (init_aix_thread_ops): Delete.
1286 (_initialize_aix_thread): Remove references to init_aix_thread_ops
1287 and complete_target_initialization.
1288 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
1289 (rs6000_nat_target): New class.
1290 (the_rs6000_nat_target): New.
1291 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
1292 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
1293 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
1294 (super_create_inferior): Delete.
1295 (_initialize_rs6000_nat): Adjust to C++ification.
1296
1297 * arm-linux-nat.c (arm_linux_nat_target): New class.
1298 (the_arm_linux_nat_target): New.
1299 (arm_linux_fetch_inferior_registers)
1300 (arm_linux_store_inferior_registers, arm_linux_read_description)
1301 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
1302 (arm_linux_remove_hw_breakpoint)
1303 (arm_linux_region_ok_for_hw_watchpoint)
1304 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
1305 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
1306 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
1307 arm_linux_nat_target.
1308 (_initialize_arm_linux_nat): Adjust to C++ification.
1309
1310 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
1311 (the_aarch64_linux_nat_target): New.
1312 (aarch64_linux_fetch_inferior_registers)
1313 (aarch64_linux_store_inferior_registers)
1314 (aarch64_linux_child_post_startup_inferior)
1315 (aarch64_linux_read_description)
1316 (aarch64_linux_can_use_hw_breakpoint)
1317 (aarch64_linux_insert_hw_breakpoint)
1318 (aarch64_linux_remove_hw_breakpoint)
1319 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
1320 (aarch64_linux_region_ok_for_hw_watchpoint)
1321 (aarch64_linux_stopped_data_address)
1322 (aarch64_linux_stopped_by_watchpoint)
1323 (aarch64_linux_watchpoint_addr_within_range)
1324 (aarch64_linux_can_do_single_step): Refactor as methods of
1325 aarch64_linux_nat_target.
1326 (super_post_startup_inferior): Delete.
1327 (_initialize_aarch64_linux_nat): Adjust to C++ification.
1328
1329 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
1330 (the_hppa_linux_nat_target): New.
1331 (hppa_linux_fetch_inferior_registers)
1332 (hppa_linux_store_inferior_registers): Refactor as methods of
1333 hppa_linux_nat_target.
1334 (_initialize_hppa_linux_nat): Adjust to C++ification.
1335
1336 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
1337 (the_ia64_linux_nat_target): New.
1338 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
1339 (ia64_linux_stopped_data_address)
1340 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
1341 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
1342 ia64_linux_nat_target methods.
1343 (super_xfer_partial): Delete.
1344 (_initialize_ia64_linux_nat): Adjust to C++ification.
1345
1346 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
1347 (the_m32r_linux_nat_target): New.
1348 (m32r_linux_fetch_inferior_registers)
1349 (m32r_linux_store_inferior_registers): Refactor as
1350 m32r_linux_nat_target methods.
1351 (_initialize_m32r_linux_nat): Adjust to C++ification.
1352
1353 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
1354 (the_m68k_linux_nat_target): New.
1355 (m68k_linux_fetch_inferior_registers)
1356 (m68k_linux_store_inferior_registers): Refactor as
1357 m68k_linux_nat_target methods.
1358 (_initialize_m68k_linux_nat): Adjust to C++ification.
1359
1360 * s390-linux-nat.c (s390_linux_nat_target): New class.
1361 (the_s390_linux_nat_target): New.
1362 (s390_linux_fetch_inferior_registers)
1363 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
1364 (s390_insert_watchpoint, s390_remove_watchpoint)
1365 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
1366 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
1367 (s390_auxv_parse, s390_read_description): Refactor as methods of
1368 s390_linux_nat_target.
1369 (_initialize_s390_nat): Adjust to C++ification.
1370
1371 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
1372 (the_sparc_linux_nat_target): New.
1373 (_initialize_sparc_linux_nat): Adjust to C++ification.
1374 * sparc-nat.c (sparc_fetch_inferior_registers)
1375 (sparc_store_inferior_registers): Remove target_ops parameter.
1376 * sparc-nat.h (sparc_fetch_inferior_registers)
1377 (sparc_store_inferior_registers): Remove target_ops parameter.
1378 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
1379 (the_sparc64_linux_nat_target): New.
1380 (_initialize_sparc64_linux_nat): Adjust to C++ification.
1381
1382 * spu-linux-nat.c (spu_linux_nat_target): New class.
1383 (the_spu_linux_nat_target): New.
1384 (spu_child_post_startup_inferior, spu_child_post_attach)
1385 (spu_child_wait, spu_fetch_inferior_registers)
1386 (spu_store_inferior_registers, spu_xfer_partial)
1387 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
1388 methods.
1389 (_initialize_spu_nat): Adjust to C++ification.
1390
1391 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
1392 (the_tilegx_linux_nat_target): New.
1393 (fetch_inferior_registers, store_inferior_registers):
1394 Refactor as methods.
1395 (_initialize_tile_linux_nat): Adjust to C++ification.
1396
1397 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
1398 (the_xtensa_linux_nat_target): New.
1399 (xtensa_linux_fetch_inferior_registers)
1400 (xtensa_linux_store_inferior_registers): Refactor as
1401 xtensa_linux_nat_target methods.
1402 (_initialize_xtensa_linux_nat): Adjust to C++ification.
1403
1404 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
1405 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
1406 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
1407 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
1408 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
1409 (fbsd_stopped_by_sw_breakpoint)
1410 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
1411 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
1412 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
1413 (fbsd_post_startup_inferior, fbsd_post_attach)
1414 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
1415 (fbsd_set_syscall_catchpoint)
1416 (super_xfer_partial, super_resume, super_wait)
1417 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
1418 (fbsd_handle_debug_trap): Remove target_ops parameter.
1419 (fbsd_nat_add_target): Delete.
1420 * fbsd-nat.h: Include "inf-ptrace.h".
1421 (fbsd_nat_add_target): Delete.
1422 (USE_SIGTRAP_SIGINFO): Define.
1423 (fbsd_nat_target): New class.
1424
1425 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
1426 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
1427 (amd64bsd_target): Delete.
1428 * amd64-bsd-nat.h: New file.
1429 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
1430 "x86-bsd-nat.h".
1431 (amd64_fbsd_nat_target): New class.
1432 (the_amd64_fbsd_nat_target): New.
1433 (amd64fbsd_read_description): Refactor as method of
1434 amd64_fbsd_nat_target.
1435 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
1436 (_initialize_amd64fbsd_nat): Adjust to C++ification.
1437 * amd64-nat.h (amd64bsd_target): Delete function declaration.
1438 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
1439 (i386bsd_store_inferior_registers): Remove target_ops parameter.
1440 (i386bsd_target): Delete.
1441 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
1442 (i386bsd_fetch_inferior_registers)
1443 (i386bsd_store_inferior_registers): Declare.
1444 (i386_bsd_nat_target): New class.
1445 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
1446 (the_i386_fbsd_nat_target): New.
1447 (i386fbsd_resume, i386fbsd_read_description): Refactor as
1448 i386_fbsd_nat_target methods.
1449 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
1450 (_initialize_i386fbsd_nat): Adjust to C++ification.
1451 * x86-bsd-nat.c (super_mourn_inferior): Delete.
1452 (x86bsd_mourn_inferior, x86bsd_target): Delete.
1453 (_initialize_x86_bsd_nat): Adjust to C++ification.
1454 * x86-bsd-nat.h: Include "x86-nat.h".
1455 (x86bsd_target): Delete declaration.
1456 (x86bsd_nat_target): New class.
1457
1458 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
1459 (the_aarch64_fbsd_nat_target): New.
1460 (aarch64_fbsd_fetch_inferior_registers)
1461 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
1462 aarch64_fbsd_nat_target.
1463 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
1464 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
1465 (the_alpha_bsd_nat_target): New.
1466 (alphabsd_fetch_inferior_registers)
1467 (alphabsd_store_inferior_registers): Refactor as
1468 alpha_bsd_nat_target methods.
1469 (_initialize_alphabsd_nat): Refactor as methods of
1470 alpha_bsd_nat_target.
1471 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
1472 (the_amd64_nbsd_nat_target): New.
1473 (_initialize_amd64nbsd_nat): Adjust to C++ification.
1474 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
1475 (the_amd64_obsd_nat_target): New.
1476 (_initialize_amd64obsd_nat): Adjust to C++ification.
1477 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
1478 (the_arm_fbsd_nat_target): New.
1479 (arm_fbsd_fetch_inferior_registers)
1480 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
1481 (_initialize_arm_fbsd_nat): Refactor as methods of
1482 arm_fbsd_nat_target.
1483 (_initialize_arm_fbsd_nat): Adjust to C++ification.
1484 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
1485 (the_arm_netbsd_nat_target): New.
1486 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
1487 arm_netbsd_nat_target.
1488 (_initialize_arm_netbsd_nat): Adjust to C++ification.
1489 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
1490 (the_hppa_nbsd_nat_target): New.
1491 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
1492 hppa_nbsd_nat_target methods.
1493 (_initialize_hppanbsd_nat): Adjust to C++ification.
1494 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
1495 (the_hppa_obsd_nat_target): New.
1496 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
1497 methods of hppa_obsd_nat_target.
1498 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
1499 add_target.
1500 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
1501 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
1502 add_target.
1503 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
1504 (_initialize_i386obsd_nat): Use add_target.
1505 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
1506 (the_m68k_bsd_nat_target): New.
1507 (m68kbsd_fetch_inferior_registers)
1508 (m68kbsd_store_inferior_registers): Refactor as methods of
1509 m68k_bsd_nat_target.
1510 (_initialize_m68kbsd_nat): Adjust to C++ification.
1511 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
1512 (the_mips_fbsd_nat_target): New.
1513 (mips_fbsd_fetch_inferior_registers)
1514 (mips_fbsd_store_inferior_registers): Refactor as methods of
1515 mips_fbsd_nat_target.
1516 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
1517 add_target.
1518 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
1519 (the_mips_nbsd_nat_target): New.
1520 (mipsnbsd_fetch_inferior_registers)
1521 (mipsnbsd_store_inferior_registers): Refactor as methods of
1522 mips_nbsd_nat_target.
1523 (_initialize_mipsnbsd_nat): Adjust to C++ification.
1524 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
1525 (the_mips64_obsd_nat_target): New.
1526 (mips64obsd_fetch_inferior_registers)
1527 (mips64obsd_store_inferior_registers): Refactor as methods of
1528 mips64_obsd_nat_target.
1529 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
1530 add_target.
1531 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
1532 nbsd_nat_target.
1533 * nbsd-nat.h: Include "inf-ptrace.h".
1534 (nbsd_nat_target): New class.
1535 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
1536 (obsd_wait): Refactor as methods of obsd_nat_target.
1537 (obsd_add_target): Delete.
1538 * obsd-nat.h: Include "inf-ptrace.h".
1539 (obsd_nat_target): New class.
1540 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
1541 (the_ppc_fbsd_nat_target): New.
1542 (ppcfbsd_fetch_inferior_registers)
1543 (ppcfbsd_store_inferior_registers): Refactor as methods of
1544 ppc_fbsd_nat_target.
1545 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
1546 add_target.
1547 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
1548 (the_ppc_nbsd_nat_target): New.
1549 (ppcnbsd_fetch_inferior_registers)
1550 (ppcnbsd_store_inferior_registers): Refactor as methods of
1551 ppc_nbsd_nat_target.
1552 (_initialize_ppcnbsd_nat): Adjust to C++ification.
1553 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
1554 (the_ppc_obsd_nat_target): New.
1555 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
1556 methods of ppc_obsd_nat_target.
1557 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
1558 add_target.
1559 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
1560 (the_sh_nbsd_nat_target): New.
1561 (shnbsd_fetch_inferior_registers)
1562 (shnbsd_store_inferior_registers): Refactor as methods of
1563 sh_nbsd_nat_target.
1564 (_initialize_shnbsd_nat): Adjust to C++ification.
1565 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
1566 (inf_ptrace_xfer_partial): Delete.
1567 (sparc_xfer_partial, sparc_target): Delete.
1568 * sparc-nat.h (sparc_fetch_inferior_registers)
1569 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
1570 (sparc_target): Delete function declaration.
1571 (sparc_target): New template class.
1572 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
1573 (_initialize_sparcnbsd_nat): Adjust to C++ification.
1574 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
1575 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
1576 add_target.
1577 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
1578 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
1579 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
1580 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
1581 add_target.
1582 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
1583 (the_vax_bsd_nat_target): New.
1584 (vaxbsd_fetch_inferior_registers)
1585 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
1586 methods.
1587 (_initialize_vaxbsd_nat): Adjust to C++ification.
1588
1589 * bsd-kvm.c (bsd_kvm_target): New class.
1590 (bsd_kvm_ops): Now a bsd_kvm_target.
1591 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
1592 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
1593 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
1594 bsd_kvm_target.
1595 (bsd_kvm_return_one): Delete.
1596 (bsd_kvm_add_target): Adjust to C++ification.
1597
1598 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
1599 (nto_procfs_target_procfs): New classes.
1600 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
1601 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
1602 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
1603 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
1604 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
1605 (procfs_remove_hw_breakpoint, procfs_resume)
1606 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
1607 (procfs_kill_inferior, procfs_store_registers)
1608 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
1609 as methods of nto_procfs_target.
1610 (nto_procfs_ops): Now an nto_procfs_target_procfs.
1611 (nto_native_ops): Delete.
1612 (procfs_open, procfs_native_open): Delete.
1613 (nto_native_ops): Now an nto_procfs_target_native.
1614 (init_procfs_targets): Adjust to C++ification.
1615 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
1616 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
1617 Refactor as methods of nto_procfs_target.
1618
1619 * go32-nat.c (go32_nat_target): New class.
1620 (the_go32_nat_target): New.
1621 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
1622 (go32_store_registers, go32_xfer_partial, go32_files_info)
1623 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
1624 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
1625 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
1626 (go32_pid_to_str): Refactor as methods of go32_nat_target.
1627 (go32_target): Delete.
1628 (_initialize_go32_nat): Adjust to C++ification.
1629
1630 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
1631 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
1632 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
1633 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
1634 gnu_nat_target.
1635 (gnu_target): Delete.
1636 * gnu-nat.h (gnu_target): Delete.
1637 (gnu_nat_target): New class.
1638 * i386-gnu-nat.c (gnu_base_target): New.
1639 (i386_gnu_nat_target): New class.
1640 (the_i386_gnu_nat_target): New.
1641 (_initialize_i386gnu_nat): Adjust to C++ification.
1642
3fffc070
PA
16432018-05-02 Pedro Alves <palves@redhat.com>
1644
1645 * bfd-target.c (target_bfd_xclose): Rename to ...
1646 (target_bfd_close): ... this.
1647 (target_bfd_reopen): Adjust.
1648 * target.c (target_close): Remove references to to_xclose.
1649 * target.h (target_ops::to_xclose): Delete.
1650 (target_ops::to_close): Update comments.
1651
6798487f
PA
16522018-05-02 Pedro Alves <palves@redhat.com>
1653
1654 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
1655 "linux-nat.h".
1656 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
1657 * inf-ptrace.c (inf_ptrace_register_u_offset)
1658 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
1659 (inf_ptrace_store_register, inf_ptrace_store_registers)
1660 (inf_ptrace_trad_target): Move to ...
1661 * linux-nat-trad.c: ... this new file.
1662 * linux-nat-trad.h: New file.
1663 * linux-nat.c (linux_target_install_ops): Make extern.
1664 (linux_trad_target): Delete.
1665 * linux-nat.h (linux_trad_target): Delete declaration.
1666 (linux_target_install_ops): Declare.
1667 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
1668 "linux-nat.h".
1669
c1955e17
PA
16702018-05-02 Pedro Alves <palves@redhat.com>
1671
1672 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
1673 procfs_target/add_target here.
1674 * procfs.c (procfs_target): Make static.
1675 (_initialize_procfs): Call add_target here.
1676 * procfs.h (struct target_ops): Remove forward declaration.
1677 (procfs_target): Remove declaration.
1678 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
1679
b5c8fcb1
PA
16802018-05-02 Pedro Alves <palves@redhat.com>
1681
1682 * procfs.c (procfs_stopped_by_watchpoint)
1683 (procfs_insert_watchpoint, procfs_remove_watchpoint)
1684 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
1685 Forward declare.
1686 (procfs_use_watchpoints): Delete, move contents...
1687 (procfs_target): ... here.
1688 * procfs.h (procfs_use_watchpoints): Delete declaration.
1689 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
1690 procfs_use_watchpoints.
1691 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
1692 procfs_use_watchpoints.
1693
0489430a
TT
16942018-05-02 Tom Tromey <tom@tromey.com>
1695
1696 PR python/20084:
1697 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
1698 and var_zuinteger_unlimited.
1699 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
1700 and PARAM_ZUINTEGER_UNLIMITED.
1701 (set_parameter_value): Handle var_zuinteger and
1702 var_zuinteger_unlimited.
1703 (add_setshow_generic): Likewise.
1704 (parmpy_init): Likewise.
1705
1632f8ba
DR
17062018-04-28 Dan Robertson <danlrobertson89@gmail.com>
1707
1708 PR rust/23124
1709 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
1710 pointer is not null before dereferencing it.
1711
76761936
TT
17122018-04-30 Tom Tromey <tom@tromey.com>
1713
1714 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
1715 is_mi_like_p.
1716
2d33446d
TT
17172018-04-30 Tom Tromey <tom@tromey.com>
1718
1719 * breakpoint.c (mention): Remove use of is_mi_like_p.
1720 (print_mention_ranged_breakpoint): Likewise.
1721 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
1722 of is_mi_like_p.
1723
f3c6abab
TT
17242018-04-30 Tom Tromey <tom@tromey.com>
1725
1726 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
1727
40c03530
TT
17282018-04-30 Tom Tromey <tom@tromey.com>
1729
1730 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
1731 (info_spu_event_command): Remove some uses of is_mi_like_p.
1732
2038b7fd
TT
17332018-04-30 Tom Tromey <tom@tromey.com>
1734
1735 * python/py-framefilter.c (py_print_single_arg)
1736 (enumerate_locals, py_print_args, py_print_frame): Remove some
1737 uses of is_mi_like_p.
1738
4904c3c6
TT
17392018-04-30 Tom Tromey <tom@tromey.com>
1740
1741 * ui-out.c: Update.
1742 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
1743 * ui-out.h (ui_out::is_mi_like_p): Now const.
1744 (ui_out::do_is_mi_like_p): Now const.
1745 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
1746
7c66fffc
TT
17472018-04-30 Tom Tromey <tom@tromey.com>
1748
1749 * varobj.c (varobj_set_visualizer): Use new_reference.
1750 * python/python.c (gdbpy_decode_line): Use new_reference.
1751 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
1752 new_reference.
1753
bbfa6f00
TT
17542018-04-30 Tom Tromey <tom@tromey.com>
1755
1756 * varobj.c (install_new_value): Use new_reference.
1757 * value.h (value_incref): Return void. Swap intro comment with
1758 value_decref.
1759 * value.c (set_value_parent): Use new_reference.
1760 (value_incref): Return void. Update intro comment.
1761 (release_value): Use new_reference.
1762 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
1763
1831a9f9
TT
17642018-04-30 Tom Tromey <tom@tromey.com>
1765
1766 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
1767 * gdb_bfd.h (new_bfd_ref): Remove.
1768 (gdb_bfd_open): Update comment.
1769 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
1770 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
1771 (gdb_bfd_fdopenr): Use new_reference.
1772 * exec.c (exec_file_attach): Use new_reference.
1773
7c1b5f3d
TT
17742018-04-30 Tom Tromey <tom@tromey.com>
1775
1776 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
1777 method.
1778
e11fb955
TT
17792018-04-30 Tom Tromey <tom@tromey.com>
1780
1781 * jit.c (jit_read_code_entry): Use type_align.
1782 * i386-tdep.c (i386_gdbarch_init): Don't call
1783 set_gdbarch_long_long_align_bit.
1784 * gdbarch.sh: Remove long_long_align_bit.
1785 * gdbarch.c, gdbarch.h: Rebuild.
1786 * arc-tdep.c (arc_type_align): New function.
1787 (arc_gdbarch_init): Use arc_type_align. Don't call
1788 set_gdbarch_long_long_align_bit.
1789
2fff16dd
TT
17902018-04-30 Tom Tromey <tom@tromey.com>
1791
1792 * rust-lang.c (rust_type_alignment): Remove.
1793 (rust_composite_type): Use type_align.
1794
6d7bb824
TT
17952018-04-30 Tom Tromey <tom@tromey.com>
1796
1797 * NEWS: Mention Type.align.
1798 * python/py-type.c (typy_get_alignof): New function.
1799 (type_object_getset): Add "alignof".
1800
007e1530
TT
18012018-04-30 Tom Tromey <tom@tromey.com>
1802
1803 PR exp/17095:
1804 * NEWS: Update.
1805 * std-operator.def (UNOP_ALIGNOF): New operator.
1806 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
1807 New.
1808 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
1809 * c-lang.c (c_op_print_tab): Add alignof.
1810 * c-exp.y (ALIGNOF): New token.
1811 (exp): Add "ALIGNOF" production.
1812 (ident_tokens): Add _Alignof and alignof.
1813
2b4424c3
TT
18142018-04-30 Tom Tromey <tom@tromey.com>
1815
1816 * i386-tdep.c (i386_type_align): New function.
1817 (i386_gdbarch_init): Update.
1818 * gdbarch.sh (type_align): New method.
1819 * gdbarch.c, gdbarch.h: Rebuild.
1820 * arch-utils.h (default_type_align): Declare.
1821 * arch-utils.c (default_type_align): New function.
1822 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
1823 (struct type) <align_log2>: New field.
1824 <instance_flags>: Now a bitfield.
1825 (TYPE_RAW_ALIGN): New macro.
1826 (type_align, type_raw_align, set_type_align): Declare.
1827 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
1828 functions.
1829 * dwarf2read.c (quirk_rust_enum): Set type alignment.
1830 (get_alignment, maybe_set_alignment): New functions.
1831 (read_structure_type, read_enumeration_type, read_array_type)
1832 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
1833 (read_subrange_type, read_base_type): Set type alignment.
1834
d33bc52e
SM
18352018-04-30 Simon Marchi <simon.marchi@ericsson.com>
1836
1837 * dwarf2read.c (read_index_from_section): Use bool.
1838
e28b63a9
FG
18392018-04-29 Fabian Groffen <grobian@gentoo.org>
1840
1841 PR gdb/22950
1842 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
1843 with #ifdef.
1844
cd8c76e4
JR
18452018-04-29 John Reiser <jreiser@BitWagon.com>
1846
1847 PR build/22873
1848 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
1849 last step, and do it atomically.
1850
476d250e
AO
18512018-04-27 Alexandre Oliva <aoliva@redhat.com>
1852
1853 * compile/compile-c-types.c (convert_int, convert_float):
1854 Update for C FE v1.
1855
6873858b
TT
18562018-04-27 Tom Tromey <tom@tromey.com>
1857
1858 PR rust/22545:
1859 * rust-lang.c (rust_inclusive_range_type_p): New function.
1860 (rust_range): Handle inclusive ranges.
1861 (rust_compute_range): Likewise.
1862 * rust-exp.y (struct rust_op) <inclusive>: New field.
1863 (DOTDOTEQ): New constant.
1864 (range_expr): Add "..=" productions.
1865 (operator_tokens): Add "..=" token.
1866 (ast_range): Add "inclusive" parameter.
1867 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
1868 ranges.
1869 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
1870 bounds values.
1871 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
1872 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
1873 Update comments.
1874 * expprint.c (print_subexp_standard): Handle new bounds values.
1875 (dump_subexp_body_standard): Likewise.
1876
632e107b
TT
18772018-04-27 Tom Tromey <tom@tromey.com>
1878
1879 * configure: Rebuild.
1880 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
1881 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
1882 "OVERRIDE".
1883 (class symbol_needs_eval_context): Likewise.
1884 * dwarf2read.c (mock_mapped_index::symbol_name_count)
1885 (mock_mapped_index::symbol_name_at): Use "override". Remove
1886 "virtual".
1887 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
1888 "override".
1889 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
1890 * aarch64-tdep.c (instruction_reader::read): Use "override".
1891 (instruction_reader_test::read): Likewise.
1892 * arm-tdep.c (instruction_reader::read): Use "override".
1893 (instruction_reader_thumb::read): Likewise.
1894
b75abf5b
AK
18952018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
1896
1897 PR remote/9665
1898 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
1899 instead of remote_send.
1900 (remote_send): Remove.
1901
79188d8d
PA
19022018-04-26 Pedro Alves <palves@redhat.com>
1903
1904 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
1905 find_function_start_sal instead of find_pc_line.
1906
f50776aa
PA
19072018-04-26 Pedro Alves <palves@redhat.com>
1908
1909 * breakpoint.c (set_breakpoint_location_function): Handle
1910 mst_data_gnu_ifunc.
1911 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
1912 * elfread.c (elf_symtab_read): Give data symbols with
1913 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
1914 (elf_rel_plt_read): Update comment.
1915 * linespec.c (convert_linespec_to_sals): Handle
1916 mst_data_gnu_ifunc.
1917 (minsym_found): Handle mst_data_gnu_ifunc.
1918 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
1919 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
1920 * parse.c (find_minsym_type_and_address): Handle
1921 mst_data_gnu_ifunc.
1922 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
1923 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
1924 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
1925 comment.
1926 <mst_data_gnu_ifunc>: New enumerator.
1927
20944a6e
PA
19282018-04-26 Pedro Alves <palves@redhat.com>
1929
1930 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
1931 (lookup_minimal_symbol_by_pc_section): ... this. Replace
1932 'want_trampoline' parameter by a lookup_msym_prefer parameter.
1933 Handle it.
1934 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
1935 (lookup_minimal_symbol_by_pc): Adjust.
1936 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
1937 (lookup_solib_trampoline_symbol_by_pc): Adjust.
1938 * minsyms.h (lookup_msym_prefer): New enum.
1939 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
1940 parameter by a lookup_msym_prefer parameter.
1941
1adeb822
PA
19422018-04-26 Pedro Alves <palves@redhat.com>
1943
1944 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
1945 ends in "@plt" instead of looking at the symbol's section.
1946
a0aca7b0
PA
19472018-04-26 Pedro Alves <palves@redhat.com>
1948
1949 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
1950 all references.
1951 (find_pc_partial_function_gnu_ifunc): Rename to ...
1952 (find_pc_partial_function): ... this, and remove references to
1953 'is_gnu_ifunc_p'.
1954 (find_pc_partial_function): Delete old implementation.
1955 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
1956
76af0f26
PA
19572018-04-26 Pedro Alves <palves@redhat.com>
1958
1959 * linespec.c (struct bound_minimal_symbol_search_key): New.
1960 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
1961 skip first line if we found a GNU ifunc minimal symbol by name.
1962 (compare_msymbols): Change parameters to work with a destructured
1963 lhs minsym.
1964 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
1965 functions.
1966
3467ec66
PA
19672018-04-26 Pedro Alves <palves@redhat.com>
1968
1969 * breakpoint.c (set_breakpoint_location_function): Don't resolve
1970 ifunc targets here. Instead, if we have an ifunc minsym, use its
1971 address/name.
1972 (add_location_to_breakpoint): Store the minsym and the objfile in
1973 the breakpoint location.
1974 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
1975 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
1976 Record the minsym in the sal.
1977 * symtab.h (symtab_and_line) <msymbol>: New field.
1978
28f4fa4d
PA
19792018-04-26 Pedro Alves <palves@redhat.com>
1980
1981 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
1982 unless we actually resolved the ifunc.
1983
ca31ab1d
PA
19842018-04-26 Pedro Alves <palves@redhat.com>
1985
1986 * c-exp.y (variable production): Prefer ifunc minsyms over
1987 regular function symbols.
1988 * symtab.c (find_gnu_ifunc): New function.
1989 * minsyms.h (lookup_msym_prefer): New enum.
1990 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
1991 parameter by a lookup_msym_prefer parameter.
1992 * symtab.h (find_gnu_ifunc): New declaration.
1993
8388016d
PA
19942018-04-26 Pedro Alves <palves@redhat.com>
1995
1996 * blockframe.c (find_gnu_ifunc_target_type): New function.
1997 (find_function_type): New.
1998 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
1999 return a value with a memory address.
2000 (eval_call): For calls to GNU ifunc functions, try to find the
2001 type of the target function from the type that the resolver
2002 returns.
2003 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
2004 symbols.
2005 * infcall.c (find_function_return_type): Delete.
2006 (find_function_addr): Add 'function_type' parameter. For calls to
2007 GNU ifunc functions, try to find the type of the target function
2008 from the type that the resolver returns, and return it via
2009 FUNCTION_TYPE.
2010 (call_function_by_hand_dummy): Adjust to use the function type
2011 returned by find_function_addr.
2012 (find_function_addr): Add 'function_type' parameter and move
2013 description here.
2014 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
2015 declarations.
2016
a376e11d
PA
20172018-04-26 Pedro Alves <palves@redhat.com>
2018
2019 * c-exp.y (variable production): Skip finding an alias for ifunc
2020 symbols.
2021
02e169e2
PA
20222018-04-26 Pedro Alves <palves@redhat.com>
2023
2024 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
2025
249b5733
PA
20262018-04-25 Pedro Alves <palves@redhat.com>
2027
2028 * infcmd.c (kill_command): Print the pid as string, not the whole
2029 thread's ptid. Add comment. s/has been killed/killed/ in output
2030 message.
2031 * remote.c (remote_detach_1): Print the pid as string, not the
2032 whole thread's ptid.
2033
f67c0c91
SDJ
20342018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
2035 Sergio Durigan Junior <sergiodj@redhat.com>
2036 Pedro Alves <palves@redhat.com>
2037
2038 * infcmd.c (kill_command): Print message when inferior has
2039 been killed.
2040 * inferior.c (print_inferior_events): Remove 'static'. Set as
2041 '1'.
2042 (add_inferior): Improve message printed when
2043 'print_inferior_events' is on.
2044 (exit_inferior): Remove message printed when
2045 'print_inferior_events' is on.
2046 (detach_inferior): Improve message printed when
2047 'print_inferior_events' is on.
2048 (initialize_inferiors): Use 'add_inferior_silent' to set
2049 'current_inferior_'.
2050 * inferior.h (print_inferior_events): Declare here as
2051 'extern'.
2052 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
2053 '[Detaching...]' messages when 'print_inferior_events' is on.
2054 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
2055 as prefix/suffix for messages. Remove periods. Fix erroneous
2056 'Detaching after fork from child...', replace it by '... from
2057 parent...'.
2058 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
2059 prefix/suffix when printing 'Detaching...' messages. Print
2060 them when 'print_inferior_events' is on.
2061 * remote.c (remote_detach_1): Print message when detaching
2062 from inferior and '!is_fork_parent'.
2063
e427af18
TT
20642018-04-24 Tom Tromey <tom@tromey.com>
2065
2066 * cli-out.h: Reindent.
2067
05b1d8d6
TT
20682018-04-24 Tom Tromey <tom@tromey.com>
2069
2070 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
2071 (cli_ui_out::do_field_string): Use fputs_filtered.
2072 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
2073
a95c7dab
TT
20742018-04-23 Tom Tromey <tom@tromey.com>
2075
2076 * guile/scm-frame.c (gdbscm_frame_read_var): Use
2077 gdb::unique_xmalloc_ptr.
2078
458412c3
TT
20792018-04-23 Tom Tromey <tom@tromey.com>
2080
2081 * configure: Rebuild.
2082
db86b02b
RS
20832018-04-22 Rajendra SY <rajendra.sy@gmail.com>
2084
2085 PR gdb/23095
2086 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
2087 prepare_for_testing. Set normal_bp to r_debug_state if target
2088 is bsd.
2089
00aecdcf
PA
20902018-04-21 Pedro Alves <palves@redhat.com>
2091 Rajendra SY <rajendra.sy@gmail.com>
2092
2093 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
2094 * remote.c (extended_remote_attach): In all-stop mode, mark the
2095 thread as executing.
2096
224608c3
PW
20972018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2098
2099 * thread.c (thread_apply_all_command): Fix comment.
2100 (thread_command): Fix comment.
2101
3b74854b
AH
21022018-04-10 Alan Hayward <alan.hayward@arm.com>
2103
2104 * common/tdesc.h (tdesc_create_feature): Remove xml filename
2105 parameter.
2106 * features/aarch64-core.c (create_feature_aarch64_core):
2107 Regenerate.
2108 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
2109 Likewise.
2110 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
2111 Likewise.
2112 * features/i386/32bit-avx512.c
2113 (create_feature_i386_32bit_avx512): Likewise.
2114 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
2115 Likewise.
2116 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
2117 Likewise.
2118 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
2119 Likewise.
2120 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
2121 Likewise.
2122 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
2123 Likewise.
2124 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
2125 Likewise.
2126 * features/i386/64bit-avx512.c
2127 (create_feature_i386_64bit_avx512): Likewise.
2128 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
2129 Likewise.
2130 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
2131 Likewise.
2132 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
2133 Likewise.
2134 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
2135 Likewise.
2136 * features/i386/64bit-segments.c
2137 (create_feature_i386_64bit_segments): Likewise.
2138 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
2139 Likewise.
2140 * features/i386/x32-core.c
2141 (create_feature_i386_x32_core): Likewise.
2142 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
2143 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
2144 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
2145 * target-descriptions.c: In generated code, don't pass xml
2146 filename.
2147
e98577a9
AH
21482018-04-18 Alan Hayward <alan.hayward@arm.com>
2149
2150 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
2151 (print_xml_feature::visit_post): Likewise.
2152 (print_xml_feature::visit): Likewise.
2153 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
2154 (print_xml_feature): Add new class.
2155 * regformats/regdat.sh: Null xmltarget on feature targets.
2156 * target-descriptions.c (struct target_desc): Add xmltarget.
2157 (maintenance_check_tdesc_xml_convert): Add unittest function.
2158 (tdesc_get_features_xml): Add function to get xml.
2159 (maintenance_check_xml_descriptions): Test xml generation.
2160 * xml-tdesc.c (string_read_description_xml): Add function.
2161 * xml-tdesc.h (string_read_description_xml): Add declaration.
2162
ad7fc756
AH
21632018-04-18 Alan Hayward <alan.hayward@arm.com>
2164
2165 * features/Makefile: Add feature marker to targets with new style
2166 target descriptions.
2167 * regformats/aarch64.dat: Regenerate.
2168 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
2169 * regformats/i386/amd64-avx-linux.dat: Likewise.
2170 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
2171 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
2172 * regformats/i386/amd64-linux.dat: Likewise.
2173 * regformats/i386/amd64-mpx-linux.dat: Likewise.
2174 * regformats/i386/amd64.dat: Likewise.
2175 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
2176 * regformats/i386/i386-avx-linux.dat: Likewise.
2177 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
2178 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
2179 * regformats/i386/i386-linux.dat: Likewise.
2180 * regformats/i386/i386-mmx-linux.dat: Likewise.
2181 * regformats/i386/i386-mpx-linux.dat: Likewise.
2182 * regformats/i386/i386.dat: Likewise.
2183 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
2184 * regformats/i386/x32-avx-linux.dat: Likewise.
2185 * regformats/i386/x32-linux.dat: Likewise.
2186 * regformats/tic6x-c62x-linux.dat: Likewise.
2187 * regformats/tic6x-c64x-linux.dat: Likewise.
2188 * regformats/tic6x-c64xp-linux.dat: Likewise.
2189 * regformats/regdat.sh: Parse feature marker.
2190
d278f585
AH
21912018-04-18 Alan Hayward <alan.hayward@arm.com>
2192
2193 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
2194 (tdesc_osabi_name): Likewise.
2195 * target-descriptions.c (tdesc_architecture_name): Add new
2196 function.
2197 (tdesc_osabi_name): Likewise.
2198
eee8a18d
AH
21992018-04-18 Alan Hayward <alan.hayward@arm.com>
2200
2201 * common/tdesc.c (tdesc_predefined_type): Move to here.
2202 (tdesc_named_type): Likewise.
2203 (tdesc_create_vector): Likewise.
2204 (tdesc_create_struct): Likewise.
2205 (tdesc_set_struct_size): Likewise.
2206 (tdesc_create_union): Likewise.
2207 (tdesc_create_flags): Likewise.
2208 (tdesc_create_enum): Likewise.
2209 (tdesc_add_field): Likewise.
2210 (tdesc_add_typed_bitfield): Likewise.
2211 (tdesc_add_bitfield): Likewise.
2212 (tdesc_add_flag): Likewise.
2213 (tdesc_add_enum_value): Likewise.
2214 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
2215 (struct tdesc_type_vector): Likewise.
2216 (struct tdesc_type_field): Likewise.
2217 (struct tdesc_type_with_fields): Likewise.
2218 (tdesc_create_enum): Add declaration.
2219 (tdesc_add_typed_bitfield): Likewise.
2220 (tdesc_add_enum_value): Likewise.
2221 * target-descriptions.c (tdesc_type_field): Move from here.
2222 (tdesc_type_builtin): Likewise.
2223 (tdesc_type_vector): Likewise.
2224 (tdesc_type_with_fields): Likewise.
2225 (tdesc_predefined_types): Likewise.
2226 (tdesc_named_type): Likewise.
2227 (tdesc_create_vector): Likewise.
2228 (tdesc_create_struct): Likewise.
2229 (tdesc_set_struct_size): Likewise.
2230 (tdesc_create_union): Likewise.
2231 (tdesc_create_flags): Likewise.
2232 (tdesc_create_enum): Likewise.
2233 (tdesc_add_field): Likewise.
2234 (tdesc_add_typed_bitfield): Likewise.
2235 (tdesc_add_bitfield): Likewise.
2236 (tdesc_add_flag): Likewise.
2237 (tdesc_add_enum_value): Likewise.
2238 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
2239 (tdesc_add_typed_bitfield): Likewise.
2240 (tdesc_add_enum_value): Likewise.
2241
82ec9bc7
AH
22422018-04-18 Alan Hayward <alan.hayward@arm.com>
2243
2244 * common/tdesc.c (tdesc_feature::accept): Move to here.
2245 (tdesc_feature::operator==): Likewise.
2246 (tdesc_create_reg): Likewise.
2247 * common/tdesc.h (tdesc_type_kind): Likewise.
2248 (struct tdesc_type): Likewise.
2249 (struct tdesc_feature): Likewise.
2250 * regformats/regdat.sh: Create a feature.
2251 * target-descriptions.c (tdesc_type_kind): Move from here.
2252 (tdesc_type): Likewise.
2253 (tdesc_type_up): Likewise.
2254 (tdesc_feature): Likewise.
2255 (tdesc_create_reg): Likewise.
2256
ea3e7d71
AH
22572018-04-18 Alan Hayward <alan.hayward@arm.com>
2258
2259 * Makefile.in: Add arch/tdesc.c
2260 * common/tdesc.c: New file.
2261 * common/tdesc.h (tdesc_element_visitor): Move to here.
2262 (tdesc_element): Likewise.
2263 (tdesc_reg): Likewise.
2264 (tdesc_reg_up): Likewise.
2265 * regformats/regdef.h (reg): Add offset to constructors.
2266 * target-descriptions.c (tdesc_element_visitor): Move from here.
2267 (tdesc_element): Likewise.
2268 (tdesc_reg): Likewise.
2269 (tdesc_reg_up): Likewise.
2270
bedda9ac
TT
22712018-04-17 Tom Tromey <tom@tromey.com>
2272
2273 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
2274 discriminant field.
2275
a037790e
TT
22762018-04-17 Tom Tromey <tom@tromey.com>
2277
2278 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
2279
c7dcbf88
AA
22802018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
2281
2282 * symtab.c (print_symbol_info): Skip printing filename and line
2283 number when `last' is NULL.
2284 (symtab_symbol_info): Use empty string instead of NULL for first
2285 invocation of print_symbol_info.
2286 (rbreak_command): Pass NULL to `last' parameter of
2287 print_symbol_info.
2288
07d28c77
SM
22892018-04-16 Simon Marchi <simon.marchi@ericsson.com>
2290
2291 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
2292 instead of nullptr.
2293
8a3de5e1
PA
22942018-04-16 Pedro Alves <palves@redhat.com>
2295
2296 * MAINTAINERS (sh): Remove.
2297 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
2298 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
2299 (ALLDEPFILES): Remove sh64-tdep.c.
2300 * NEWS: Mentions that support for SH-5/SH64 is removed.
2301 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
2302 (sh*-*-openbsd*): Ditto.
2303 (sh64-*-elf*): Remove.
2304 (sh*): Remove.
2305 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
2306 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
2307 * sh-tdep.c: No longer include "sh64-tdep.h".
2308 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
2309 * sh64-tdep.c, sh64-tdep.h: Remove files.
2310
a2a79012
PA
23112018-04-16 Pedro Alves <palves@redhat.com>
2312
2313 * MAINTAINERS: Remove m88k.
2314 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
2315 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
2316 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
2317 * NEWS: Mention that support for m88k was removed.
2318 * configure.host (m88*-*-*): Remove support.
2319 * configure.nat (m88k-*-*): Remove support.
2320 * configure.tgt (m88*-*-openbsd*): Remove.
2321 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
2322
eda4efb1
SM
23232018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
2324
2325 * configure.tgt (x86_tobjs): New variable.
2326 (amd64_tobjs, i386_tobjs): Use it.
2327
b744723f
AA
23282018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2329
2330 * symtab.c (print_symbol_info): Precede the symbol definition by
2331 the line number when available.
2332 * NEWS: Advertise this enhancement.
2333
4a4495d6
MM
23342018-04-13 Markus Metzger <markus.t.metzger@intel.com>
2335
2336 * NEWS (New options): announce set/show record btrace cpu.
2337 * btrace.c: Include record-btrace.h.
2338 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
2339 the vendor is unknown.
2340 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
2341 Maybe overwrite the btrace configuration's cpu.
2342 (btrace_compute_ftrace): Add cpu parameter. Update callers.
2343 (btrace_fetch): Add cpu parameter. Update callers.
2344 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
2345 Maybe overwrite the btrace configuration's cpu. Skip enabling
2346 errata workarounds if the vendor is unknown.
2347 * python/py-record-btrace.c: Include record-btrace.h.
2348 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
2349 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
2350 * record-btrace.c (record_btrace_cpu_state_kind): New.
2351 (record_btrace_cpu): New.
2352 (set_record_btrace_cpu_cmdlist): New.
2353 (record_btrace_get_cpu): New.
2354 (require_btrace_thread, record_btrace_info)
2355 (record_btrace_resume_thread): Call record_btrace_get_cpu.
2356 (cmd_set_record_btrace_cpu_none): New.
2357 (cmd_set_record_btrace_cpu_auto): New.
2358 (cmd_set_record_btrace_cpu): New.
2359 (cmd_show_record_btrace_cpu): New.
2360 (_initialize_record_btrace): Initialize set/show record btrace cpu
2361 commands.
2362 * record-btrace.h (record_btrace_get_cpu): New.
2363
69f90c75
MM
23642018-04-13 Markus Metzger <markus.t.metzger@intel.com>
2365
2366 * record.c (set_record_command): Fix typo in message.
2367
b85310e1
MM
23682018-04-13 Markus Metzger <markus.t.metzger@intel.com>
2369
2370 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
2371
1d509aa6
MM
23722018-04-13 Markus Metzger <markus.t.metzger@intel.com>
2373
2374 * infrun.c (process_event_stop_test): Call
2375 gdbarch_in_indirect_branch_thunk.
2376 * gdbarch.sh (in_indirect_branch_thunk): New.
2377 * gdbarch.c: Regenerated.
2378 * gdbarch.h: Regenerated.
2379 * x86-tdep.h: New.
2380 * x86-tdep.c: New.
2381 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
2382 (HFILES_NO_SRCDIR): Add x86-tdep.h.
2383 (ALLDEPFILES): Add x86-tdep.c.
2384 * arch-utils.h (default_in_indirect_branch_thunk): New.
2385 * arch-utils.c (default_in_indirect_branch_thunk): New.
2386 * i386-tdep: Include x86-tdep.h.
2387 (i386_in_indirect_branch_thunk): New.
2388 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
2389 function.
2390 * amd64-tdep: Include x86-tdep.h.
2391 (amd64_in_indirect_branch_thunk): New.
2392 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
2393
b4be9bfd
JK
23942018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
2395
2396 PR gdb/23053
2397 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
2398 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
2399 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
2400 regression.
2401
53d7df28
TT
24022018-04-12 Tom Tromey <tom@tromey.com>
2403
2404 * rust-lang.c (rust_print_struct_def): Remove univariant code.
2405 (rust_evaluate_subexp): Likewise.
2406
70b33f19
PA
24072018-04-12 Pedro Alves <palves@redhat.com>
2408
2409 * procfs.c (procfs_detach): Make forward declaration's prototype
2410 match definition's protototype.
2411 (proc_get_LDT_entry): Remove stale do_cleanups call.
2412
436411b1
PA
24132018-04-12 Pedro Alves <palves@redhat.com>
2414
2415 * target.h (target_ops::to_has_exited): Delete.
2416 (target_has_exited): Delete.
2417 * target-delegates.c: Regenerate.
2418
20db9c52
PA
24192018-04-11 Pedro Alves <palves@redhat.com>
2420
2421 * target.c (fileio_fh_t::t): Add comment.
2422 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
2423 (target_fileio_close): Handle a NULL target.
2424 (invalidate_fileio_fh): New.
2425 (target_close): Call it.
2426 * remote.c (remote_hostio_send_command): No longer check whether
2427 remote_desc is open.
2428
5ff79300
PA
24292018-04-11 Pedro Alves <palves@redhat.com>
2430
2431 * target.c (fileio_fh_t): Make it a named struct instead of a
2432 typedef.
2433 (fileio_fh_t::is_closed): New method.
2434 (DEF_VEC_O (fileio_fh_t)): Remove.
2435 (fileio_fhandles): Now a std::vector.
2436 (is_closed_fileio_fh): Delete.
2437 (acquire_fileio_fd): Adjust. Rename parameters.
2438 (release_fileio_fd): Adjust.
2439 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
2440 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
2441 (target_fileio_close): Adjust.
2442
6e22e10d
SM
24432018-04-10 Simon Marchi <simon.marchi@ericsson.com>
2444
2445 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
2446 index.
2447
731f534f
PA
24482018-04-10 Pedro Alves <palves@redhat.com>
2449
2450 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
2451 (scoped_finish_thread_state): New class.
2452 * infcmd.c (run_command_1): Use it instead of finish_thread_state
2453 cleanup.
2454 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
2455 (fetch_inferior_event, normal_stop): Likewise.
2456 * thread.c (finish_thread_state_cleanup): Delete.
2457
d5f4488f
SM
24582018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
2459 Pedro Alves <palves@redhat.com>
2460
2461 * value.c: Include "selftest.h" and "common/array-view.h".
2462 (struct range) <operator ==>: New.
2463 (test_ranges_contain): New.
2464 (check_ranges_vector): New.
2465 (test_insert_into_bit_range_vector): New.
2466 (_initialize_values): Register selftests.
2467 * common/array-view.h (operator==, operator!=): New.
2468
b24531ed
SM
24692018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
2470
2471 * common/gdb_vecs.h (unordered_remove): Add overload that takes
2472 an iterator.
2473 * inline-frame.c: Include <algorithm>.
2474 (struct inline_state): Add constructor.
2475 (inline_state_s): Remove.
2476 (DEF_VEC_O(inline_state_s)): Remove.
2477 (inline_states): Change type to std::vector.
2478 (find_inline_frame_state): Adjust to std::vector.
2479 (allocate_inline_frame_state): Remove.
2480 (clear_inline_frame_state): Adjust to std::vector.
2481 (skip_inline_frames): Adjust to std::vector.
2482
c252925c
SM
24832018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
2484
2485 * tracepoint.h (struct trace_state_variable): Add constructor.
2486 <name>: Change type to std::string.
2487 * tracepoint.c (tsv_s): Remove.
2488 (DEF_VEC_O(tsv_s)): Remove.
2489 (tvariables): Change to std::vector.
2490 (create_trace_state_variable): Adjust to std::vector.
2491 (find_trace_state_variable): Likewise.
2492 (find_trace_state_variable_by_number): Likewise.
2493 (delete_trace_state_variable): Likewise.
2494 (trace_variable_command): Adjust to std::string.
2495 (delete_trace_variable_command): Likewise.
2496 (tvariables_info_1): Adjust to std::vector.
2497 (save_trace_state_variables): Likewise.
2498 (start_tracing): Likewise.
2499 (merge_uploaded_trace_state_variables): Adjust to std::vector
2500 and std::string.
2501 * target.h (struct target_ops)
2502 <to_download_trace_state_variable>: Pass reference to
2503 trace_state_variable.
2504 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
2505 * target-delegates.c: Re-generate.
2506 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
2507 (mi_tsv_deleted): Likewise.
2508 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
2509 * remote.c (remote_download_trace_state_variable): Change
2510 pointer to reference and adjust.
2511 * make-target-delegates (parse_argtypes): Handle references.
2512 (write_function_header): Likewise.
2513 (munge_type): Likewise.
2514
c9638d26
SM
25152018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
2516
2517 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2518 string_view-selftests.c.
2519 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
2520 testsuite.
2521 * unittests/basic_string_view/cons/char/1.cc: Likewise.
2522 * unittests/basic_string_view/cons/char/2.cc: Likewise.
2523 * unittests/basic_string_view/cons/char/3.cc: Likewise.
2524 * unittests/basic_string_view/element_access/char/1.cc:
2525 Likewise.
2526 * unittests/basic_string_view/element_access/char/empty.cc:
2527 Likewise.
2528 * unittests/basic_string_view/element_access/char/front_back.cc:
2529 Likewise.
2530 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
2531 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
2532 Likewise.
2533 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
2534 Likewise.
2535 * unittests/basic_string_view/modifiers/swap/char/1.cc:
2536 Likewise.
2537 * unittests/basic_string_view/operations/compare/char/1.cc:
2538 Likewise.
2539 * unittests/basic_string_view/operations/compare/char/13650.cc:
2540 Likewise.
2541 * unittests/basic_string_view/operations/copy/char/1.cc:
2542 Likewise.
2543 * unittests/basic_string_view/operations/data/char/1.cc:
2544 Likewise.
2545 * unittests/basic_string_view/operations/find/char/1.cc:
2546 Likewise.
2547 * unittests/basic_string_view/operations/find/char/2.cc:
2548 Likewise.
2549 * unittests/basic_string_view/operations/find/char/3.cc:
2550 Likewise.
2551 * unittests/basic_string_view/operations/find/char/4.cc:
2552 Likewise.
2553 * unittests/basic_string_view/operations/rfind/char/1.cc:
2554 Likewise.
2555 * unittests/basic_string_view/operations/rfind/char/2.cc:
2556 Likewise.
2557 * unittests/basic_string_view/operations/rfind/char/3.cc:
2558 Likewise.
2559 * unittests/basic_string_view/operations/substr/char/1.cc:
2560 Likewise.
2561 * unittests/basic_string_view/operators/char/2.cc: Likewise.
2562 * unittests/string_view-selftests.c: New file.
2563
fdc11678
SM
25642018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
2565
2566 * unittests/basic_string_view/capacity/1.cc: New file.
2567 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
2568 * unittests/basic_string_view/cons/char/1.cc: New file.
2569 * unittests/basic_string_view/cons/char/2.cc: New file.
2570 * unittests/basic_string_view/cons/char/3.cc: New file.
2571 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
2572 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
2573 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
2574 * unittests/basic_string_view/element_access/char/1.cc: New file.
2575 * unittests/basic_string_view/element_access/char/2.cc: New file.
2576 * unittests/basic_string_view/element_access/char/empty.cc: New file.
2577 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
2578 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
2579 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
2580 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
2581 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
2582 * unittests/basic_string_view/include.cc: New file.
2583 * unittests/basic_string_view/inserters/char/1.cc: New file.
2584 * unittests/basic_string_view/inserters/char/2.cc: New file.
2585 * unittests/basic_string_view/inserters/char/3.cc: New file.
2586 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
2587 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
2588 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
2589 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
2590 * unittests/basic_string_view/literals/types.cc: New file.
2591 * unittests/basic_string_view/literals/values.cc: New file.
2592 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
2593 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
2594 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
2595 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
2596 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
2597 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
2598 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
2599 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
2600 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
2601 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
2602 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
2603 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
2604 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
2605 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
2606 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
2607 * unittests/basic_string_view/operations/data/char/1.cc: New file.
2608 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
2609 * unittests/basic_string_view/operations/find/char/1.cc: New file.
2610 * unittests/basic_string_view/operations/find/char/2.cc: New file.
2611 * unittests/basic_string_view/operations/find/char/3.cc: New file.
2612 * unittests/basic_string_view/operations/find/char/4.cc: New file.
2613 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
2614 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
2615 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
2616 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
2617 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
2618 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
2619 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
2620 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
2621 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
2622 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
2623 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
2624 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
2625 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
2626 * unittests/basic_string_view/operators/char/2.cc: New file.
2627 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
2628 * unittests/basic_string_view/range_access/char/1.cc: New file.
2629 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
2630 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
2631 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
2632 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
2633 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
2634 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
2635 * unittests/basic_string_view/requirements/typedefs.cc: New file.
2636 * unittests/basic_string_view/typedefs.cc: New file.
2637 * unittests/basic_string_view/types/1.cc: New file.
2638
8345c4a2
SM
26392018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
2640
2641 * common/gdb_string_view.h: Remove libstdc++ implementation
2642 details, adjust to gdb reality.
2643 * common/gdb_string_view.tcc: Likewise.
2644 * cli/cli-script.c (struct string_view): Remove.
2645 (user_args) <m_args>: Change element type to gdb::string_view.
2646 (user_args::insert_args): Adjust.
2647
7adcdf08
SM
26482018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
2649
2650 * common/gdb_string_view.h: New file.
2651 * common/gdb_string_view.tcc: New file.
2652
41260ac2
SM
26532018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
2654
2655 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
2656 * configure: Re-generate.
2657
0bee6dd4
PA
26582018-04-09 Pedro Alves <palves@redhat.com>
2659
2660 * gdbarch.sh: Include "observable.h" instead of "observer.h".
2661 (set_target_gdbarch): Call
2662 gdb::observers::architecture_changed.notify instead of
2663 observer_notify_architecture_changed.
2664
6f14adc5
SM
26652018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
2666
2667 * tracepoint.c (struct current_traceframe_cleanup): Remove.
2668 (do_restore_current_traceframe_cleanup): Remove.
2669 (restore_current_traceframe_cleanup_dtor): Remove.
2670 (make_cleanup_restore_current_traceframe): Remove.
2671 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
2672 New.
2673 * tracepoint.h (struct scoped_restore_current_traceframe): New.
2674 * infrun.c (fetch_inferior_event): Use
2675 scoped_restore_current_traceframe.
2676
b2bdb8cf
SM
26772018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
2678
2679 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
2680 Remove.
2681 <n_allocated_type_units>: Remove.
2682 <all_type_units>: Change to std::vector.
2683 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
2684 to std::vector change.
2685 (dwarf2_per_objfile::get_cutu): Likewise.
2686 (dwarf2_per_objfile::get_tu): Likewise.
2687 (create_signatured_type_table_from_index): Likewise.
2688 (create_signatured_type_table_from_debug_names): Likewise.
2689 (dw2_symtab_iter_next): Likewise.
2690 (dw2_print_stats): Likewise.
2691 (dw2_expand_all_symtabs): Likewise.
2692 (dw2_expand_marked_cus): Likewise.
2693 (dw2_debug_names_iterator::next): Likewise.
2694 (dwarf2_initialize_objfile): Likewise.
2695 (add_signatured_type_cu_to_table): Likewise.
2696 (create_all_type_units): Likewise.
2697 (add_type_unit): Likewise.
2698 (struct tu_abbrev_offset): Add constructor.
2699 (build_type_psymtabs_1): Adjust to std::vector change.
2700 (print_tu_stats): Likewise.
2701 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
2702 (write_debug_names): Likewise.
2703
b76e467d
SM
27042018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
2705
2706 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
2707 Make an std::vector.
2708 <n_comp_units>: Remove.
2709 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
2710 to std::vector change.
2711 (dwarf2_per_objfile::get_cutu): Likewise.
2712 (dwarf2_per_objfile::get_cu): Likewise.
2713 (create_cus_from_index): Likewise.
2714 (create_addrmap_from_index): Likewise.
2715 (create_addrmap_from_aranges): Likewise.
2716 (dwarf2_read_index): Likewise.
2717 (dw2_find_last_source_symtab): Likewise.
2718 (dw2_map_symtabs_matching_filename): Likewise.
2719 (dw2_symtab_iter_next): Likewise.
2720 (dw2_print_stats): Likewise.
2721 (dw2_expand_all_symtabs): Likewise.
2722 (dw2_expand_symtabs_with_fullname): Likewise.
2723 (dw2_expand_marked_cus): Likewise.
2724 (dw2_map_symbol_filenames): Likewise.
2725 (create_cus_from_debug_names): Likewise.
2726 (dwarf2_read_debug_names): Likewise.
2727 (dw2_debug_names_iterator::next): Likewise.
2728 (dwarf2_initialize_objfile): Likewise.
2729 (set_partial_user): Likewise.
2730 (dwarf2_build_psymtabs_hard): Likewise.
2731 (read_comp_units_from_section): Remove arguments, adjust to
2732 std::vector change.
2733 (create_all_comp_units): Adjust to std::vector and
2734 read_comp_units_from_section changes.
2735 (dwarf2_find_containing_comp_unit): Adjust to std::vector
2736 change.
2737 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
2738 (psyms_seen_size): Likewise.
2739 (write_gdbindex): Likewise.
2740 (write_debug_names): Likewise.
2741
12359b5e
SM
27422018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
2743
2744 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
2745 with dwarf2_per_objfile.
2746 (create_cus_from_index): Likewise.
2747 (create_signatured_type_table_from_index): Likewise.
2748 (dwarf2_read_index): Likewise.
2749 (dwarf2_initialize_objfile): Likewise.
2750 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
2751 per_cu rather than get_dwarf2_per_objfile.
2752
ff4c9fec
SM
27532018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
2754
2755 * dwarf2read.h (struct signatured_type): Forward declare.
2756 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
2757 New methods.
2758 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
2759 (dw2_get_cutu): ...this.
2760 (dwarf2_per_objfile::get_cu): Rename from...
2761 (dw2_get_cu): ...this.
2762 (dwarf2_per_objfile::get_tu): New.
2763 (create_addrmap_from_index): Adjust.
2764 (create_addrmap_from_aranges): Adjust.
2765 (dw2_find_last_source_symtab): Adjust.
2766 (dw2_map_symtabs_matching_filename): Adjust.
2767 (dw2_symtab_iter_next): Adjust.
2768 (dw2_print_stats): Adjust.
2769 (dw2_expand_all_symtabs): Adjust.
2770 (dw2_expand_symtabs_with_fullname): Adjust.
2771 (dw2_expand_marked_cus): Adjust.
2772 (dw_expand_symtabs_matching_file_matcher): Adjust.
2773 (dw2_map_symbol_filenames): Adjust.
2774 (dw2_debug_names_iterator::next): Adjust.
2775 (dwarf2_initialize_objfile): Adjust.
2776 (set_partial_user): Adjust.
2777 (dwarf2_build_psymtabs_hard): Adjust.
2778
5ca3fcb6
SM
27792018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
2780
2781 * dwarf2read.c (create_signatured_type_table_from_debug_names):
2782 Remove unused variables.
2783 (dw2_map_symtabs_matching_filename): Likewise.
2784 (dwarf2_record_block_ranges): Likewise.
2785 (dwarf2_read_addr_index): Likewise.
2786 (follow_die_offset): Likewise.
2787
b2e586e8
SM
27882018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
2789
2790 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
2791 to symbol_file_add_main.
2792
7c4e78cf
SM
27932018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
2794
2795 PR mi/22299
2796 * mi/mi-console.c (do_fputc_async_safe): New.
2797 (mi_console_file::write_async_safe): New.
2798 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
2799 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
2800 New.
2801 * ui-file.c (ui_file::putstrn): Adjust call to
2802 fputstrn_unfiltered.
2803 * utils.c (printchar): Replace do_fputs and do_fprintf
2804 parameters by do_fputc.
2805 (fputstr_filtered): Adjust call to printchar.
2806 (fputstr_unfiltered): Likewise.
2807 (fputstrn_filtered): Likewise.
2808 (fputstrn_unfiltered): Add do_fputc parameter, pass to
2809 printchar.
2810 * utils.h (do_fputc_ftype): New typedef.
2811 (fputstrn_unfiltered): Add do_fputc parameter.
2812
5dc026d3
SM
28132018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
2814
2815 * regformats/i386/i386-avx.dat: Remove.
2816
c912f608
SM
28172018-04-07 Simon Marchi <simon.marchi@ericsson.com>
2818
2819 PR gdb/22979
2820 * amd64-tdep.c (amd64_none_init_abi): New function.
2821 (amd64_x32_none_init_abi): New function.
2822 (_initialize_amd64_tdep): Register handlers for x86-64 and
2823 x64_32 with GDB_OSABI_NONE.
2824 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
2825 GDB_OSABI_NONE osabi.
2826
26540402
SM
28272018-04-07 Simon Marchi <simon.marchi@ericsson.com>
2828
2829 PR gdb/22980
2830 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
2831 GDB_OSABI_NONE.
2832 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
2833 * osabi.c (gdb_osabi_names): Add "unknown" entry.
2834
9018be22
SM
28352018-04-07 Simon Marchi <simon.marchi@ericsson.com>
2836
2837 * common/byte-vector.h (char_vector): New type.
2838 * target.h (target_read_alloc): Return
2839 gdb::optional<byte_vector>.
2840 (target_read_stralloc): Return gdb::optional<char_vector>.
2841 (target_get_osdata): Return gdb::optional<char_vector>.
2842 * target.c (target_read_alloc_1): Templatize. Replacement
2843 manual memory management with vector.
2844 (target_read_alloc): Change return type, adjust.
2845 (target_read_stralloc): Change return type, adjust.
2846 (target_get_osdata): Change return type, adjust.
2847 * auxv.c (struct auxv_info) <length>: Remove.
2848 <data>: Change type to gdb::optional<byte_vector>.
2849 (auxv_inferior_data_cleanup): Free auxv_info with delete.
2850 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
2851 (target_auxv_search): Adjust.
2852 (fprint_target_auxv): Adjust.
2853 * avr-tdep.c (avr_io_reg_read_command): Adjust.
2854 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
2855 (linux_make_corefile_notes): Adjust.
2856 * osdata.c (get_osdata): Adjust.
2857 * remote.c (remote_get_threads_with_qxfer): Adjust.
2858 (remote_memory_map): Adjust.
2859 (remote_traceframe_info): Adjust.
2860 (btrace_read_config): Adjust.
2861 (remote_read_btrace): Adjust.
2862 (remote_pid_to_exec_file): Adjust.
2863 * solib-aix.c (solib_aix_get_library_list): Adjust.
2864 * solib-dsbt.c (decode_loadmap): Don't free buf.
2865 (dsbt_get_initial_loadmaps): Adjust.
2866 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
2867 * solib-target.c (solib_target_current_sos): Adjust.
2868 * tracepoint.c (sdata_make_value): Adjust.
2869 * xml-support.c (xinclude_start_include): Adjust.
2870 (xml_fetch_content_from_file): Adjust.
2871 * xml-support.h (xml_fetch_another): Change return type.
2872 (xml_fetch_content_from_file): Change return type.
2873 * xml-syscall.c (xml_init_syscalls_info): Adjust.
2874 * xml-tdesc.c (file_read_description_xml): Adjust.
2875 (fetch_available_features_from_target): Change return type.
2876 (target_fetch_description_xml): Adjust.
2877 (target_read_description_xml): Adjust.
2878
14c88955
TT
28792018-04-06 Tom Tromey <tom@tromey.com>
2880
2881 * value.c (~value): Update.
2882 (struct value) <contents>: Now unique_xmalloc_ptr.
2883 (value_contents_bits_eq, allocate_value_contents)
2884 (value_contents_raw, value_contents_all_raw)
2885 (value_contents_for_printing, value_contents_for_printing_const)
2886 (set_value_enclosing_type): Update.
2887
0c7e6dd8
TT
28882018-04-06 Tom Tromey <tom@tromey.com>
2889
2890 * value.c (range_s): Remove typedef, VEC.
2891 (struct range): Add operator<.
2892 (range_lessthan): Remove.
2893 (ranges_contain): Change type.
2894 (~value): Update.
2895 (struct value) <unavailable, optimized_out>: Now std::vector.
2896 (value_entirely_available)
2897 (value_entirely_covered_by_range_vector)
2898 (value_entirely_unavailable, value_entirely_optimized_out):
2899 Update.
2900 (insert_into_bit_range_vector): Change argument type.
2901 (find_first_range_overlap): Likewise.
2902 (struct ranges_and_idx, value_contents_bits_eq)
2903 (require_not_optimized_out, require_available): Update.
2904 (ranges_copy_adjusted): Change argument types.
2905 (value_optimized_out, value_copy, value_fetch_lazy): Update.
2906
2c8331b9
TT
29072018-04-06 Tom Tromey <tom@tromey.com>
2908
2909 * value.c (~value): Update.
2910 (struct value) <parent>: Now a value_ref_ptr.
2911 (value_parent, set_value_parent, value_address, value_copy):
2912 Update.
2913
466ce3ae
TT
29142018-04-06 Tom Tromey <tom@tromey.com>
2915
2916 * value.c (struct value): Add constructor, destructor, and member
2917 initializers.
2918 (allocate_value_lazy, value_decref): Update.
2919
062d818d
TT
29202018-04-06 Tom Tromey <tom@tromey.com>
2921
2922 * value.c (struct value) <released, next>: Remove.
2923 (all_values): Now a std::vector.
2924 (allocate_value_lazy): Update.
2925 (value_next): Remove.
2926 (value_mark, value_free_to_mark, release_value)
2927 (value_release_to_mark): Update.
2928
a6535de1
TT
29292018-04-06 Tom Tromey <tom@tromey.com>
2930
2931 * value.h (fetch_subexp_value, value_release_to_mark): Update.
2932 (free_value_chain): Remove.
2933 * value.c (free_value_chain): Remove.
2934 (value_release_to_mark): Return a std::vector.
2935 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
2936 std::vector.
2937 (check_condition): Update.
2938 * eval.c (fetch_subexp_value): Change "val_chain" to a
2939 std::vector.
2940 * breakpoint.c (update_watchpoint): Update.
2941 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
2942
b5621201
TT
29432018-04-06 Tom Tromey <tom@tromey.com>
2944
2945 * value.h (free_all_values): Remove.
2946 * value.c (free_all_values): Remove.
2947
4d0266a0
TT
29482018-04-06 Tom Tromey <tom@tromey.com>
2949
2950 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
2951 (value_history_chain, value_history_count): Remove.
2952 (value_history): New global.
2953 (record_latest_value, access_value_history, show_values)
2954 (preserve_values): Update.
2955
b4d61099
TT
29562018-04-06 Tom Tromey <tom@tromey.com>
2957
2958 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
2959 * varobj.c (varobj_set_display_format, varobj_set_value)
2960 (install_default_visualizer, construct_visualizer)
2961 (install_new_value, ~varobj, varobj_get_value_type)
2962 (my_value_of_variable, varobj_editable_p): Update.
2963 * c-varobj.c (c_describe_child, c_value_of_variable)
2964 (cplus_number_of_children, cplus_describe_child): Update.
2965 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
2966 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
2967 (ada_value_of_variable, ada_value_is_changeable_p): Update.
2968
9b558729
TT
29692018-04-06 Tom Tromey <tom@tromey.com>
2970
2971 * printcmd.c (last_examine_address): Change type to
2972 value_ref_ptr.
2973 (do_examine, x_command): Update.
2974
850645cf
TT
29752018-04-06 Tom Tromey <tom@tromey.com>
2976
2977 * value.c (release_value): Update.
2978 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
2979 (struct bpstats) <val>: Now a value_ref_ptr.
2980 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
2981 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
2982 (~watchpoint, print_it_watchpoint, watch_command_1)
2983 (invalidate_bp_value_on_memory_change): Update.
2984
22bc8444
TT
29852018-04-06 Tom Tromey <tom@tromey.com>
2986
2987 * varobj.c (varobj_clear_saved_item)
2988 (update_dynamic_varobj_children, install_new_value, ~varobj):
2989 Update.
2990 * value.h (value_incref): Move declaration earlier.
2991 (value_decref): Rename from value_free.
2992 (struct value_ref_policy): New.
2993 (value_ref_ptr): New typedef.
2994 (struct value_deleter): Remove.
2995 (gdb_value_up): Remove typedef.
2996 (release_value): Change return type.
2997 (release_value_or_incref): Remove.
2998 * value.c (set_value_parent): Update.
2999 (value_incref): Change return type.
3000 (value_decref): Rename from value_free.
3001 (value_free_to_mark, free_all_values, free_value_chain): Update.
3002 (release_value): Return value_ref_ptr.
3003 (release_value_or_incref): Remove.
3004 (record_latest_value, set_internalvar, clear_internalvar):
3005 Update.
3006 * stack.c (info_frame_command): Don't call value_free.
3007 * python/py-value.c (valpy_dealloc, valpy_new)
3008 (value_to_value_object): Update.
3009 * printcmd.c (do_examine): Update.
3010 * opencl-lang.c (lval_func_free_closure): Update.
3011 * mi/mi-main.c (register_changed_p): Don't call value_free.
3012 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
3013 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
3014 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
3015 value_free.
3016 * guile/scm-value.c (vlscm_free_value_smob)
3017 (vlscm_scm_from_value): Update.
3018 * frame.c (frame_register_unwind, frame_unwind_register_signed)
3019 (frame_unwind_register_unsigned, get_frame_register_bytes)
3020 (put_frame_register_bytes): Don't call value_free.
3021 * findvar.c (address_from_register): Don't call value_free.
3022 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
3023 * dwarf2loc.c (entry_data_value_free_closure)
3024 (value_of_dwarf_reg_entry, free_pieced_value_closure)
3025 (dwarf2_evaluate_loc_desc_full): Update.
3026 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
3027 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
3028 (~watchpoint, watch_command_1)
3029 (invalidate_bp_value_on_memory_change): Update.
3030 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
3031
7f8a5d38
SM
30322018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
3033
3034 PR gdb/23022
3035 * warning.m4: Add -Wno-error=deprecated-register.
3036 * configure: Re-generate.
3037
8a76bd3b
TT
30382018-04-05 Tom Tromey <tom@tromey.com>
3039
3040 * linespec.h: Remove include of "vec.h".
3041
8e8d776e
TT
30422018-04-05 Tom Tromey <tom@tromey.com>
3043
3044 * linespec.c (typep): Remove typedef.
3045 (find_methods, find_superclass_methods): Take a std::vector.
3046 (find_method): Use std::vector.
3047
9b2f8581
TT
30482018-04-05 Tom Tromey <tom@tromey.com>
3049
3050 * utils.c (compare_strings): Remove.
3051 * utils.h (compare_strings): Remove.
3052 * objc-lang.h (find_imps): Update.
3053 * objc-lang.c (find_methods): Take a std::vector.
3054 (uniquify_strings, find_imps): Likewise.
3055 * linespec.c (find_methods): Take a std::vector.
3056 (decode_objc): Use std::vector.
3057 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
3058 a std::vector.
3059 (find_method, find_function_symbols): Use std::vector.
3060
459a2e4c
TT
30612018-04-05 Tom Tromey <tom@tromey.com>
3062
3063 * completer.c (completion_tracker::completion_tracker): Remove
3064 cast.
3065 (completion_tracker::discard_completions): Likewise.
3066 * breakpoint.c (ambiguous_names_p): Remove cast.
3067 * ada-lang.c (_initialize_ada_language): Remove cast.
3068 * utils.h (streq): Update.
3069 (streq_hash): Add new declaration.
3070 * utils.c (streq): Return bool.
3071 (streq_hash): New function.
3072
9be2c17a
TT
30732018-04-05 Tom Tromey <tom@tromey.com>
3074
3075 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
3076 Remove a string copy.
3077
f73c6ece
TT
30782018-04-05 Tom Tromey <tom@tromey.com>
3079
3080 * linespec.c (filter_results): Use std::vector.
3081 (decode_line_2, decode_line_full): Update.
3082
53a0f8a2
TT
30832018-04-05 Tom Tromey <tom@tromey.com>
3084
3085 * linespec.c (canonical_to_fullform): Return std::string.
3086 (filter_results): Update.
3087 (struct decode_line_2_item): Add constructor.
3088 <fullform, displayform>: Now std::string.
3089 (decode_line_2_compare_items): Now a std::sort comparator.
3090 (decode_line_2): Update.
3091
a5b5adf5
TT
30922018-04-05 Tom Tromey <tom@tromey.com>
3093
3094 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
3095 (unexpected_linespec_error): Update.
3096 (linespec_parse_basic, parse_linespec): Update.
3097
6a307fc5
TT
30982018-04-05 Tom Tromey <tom@tromey.com>
3099
3100 * linespec.c (linespec_parse_basic): Reindent.
3101
41c1efc6
TT
31022018-04-05 Tom Tromey <tom@tromey.com>
3103
3104 * minsyms.h (iterate_over_minimal_symbols): Update.
3105 * minsyms.c (iterate_over_minimal_symbols): Take a
3106 gdb::function_view.
3107 * linespec.c (struct collect_minsyms): Remove.
3108 (compare_msyms): Now a std::sort comparator.
3109 (add_minsym): Add parameters.
3110 (search_minsyms_for_name): Update. Use std::vector.
3111
c5edbf3d
TT
31122018-04-03 Tom Tromey <tom@tromey.com>
3113
3114 * mipsread.c (read_alphacoff_dynamic_symtab): Use
3115 gdb::byte_vector.
3116
b39efc48
WP
31172018-04-02 Weimin Pan <weimin.pan@oracle.com>
3118
3119 * MAINTAINERS (Write After Approval): Add Weimin Pan.
3120
121ad66c 31212018-04-02 Weimin Pan <weimin.pan@oracle.com>
79f18731
WP
3122
3123 PR gdb/16959
3124 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
3125 printing static type.
3126
09473be8
TT
31272018-04-01 Tom Tromey <tom@tromey.com>
3128
3129 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
3130 (rs6000_xfer_shared_libraries): Update.
3131
ec1f2d91
SM
31322018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
3133
3134 * common/gdb_vecs.h (char_ptr): Remove.
3135 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
3136
d8611974
SM
31372018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
3138
3139 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
3140 with std::vector.
3141 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
3142
a18ba4e4
SM
31432018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
3144
3145 * tracepoint.h (struct uploaded_tp): Initialize fields.
3146 <actions, step_actions, cmd_strings>: Change type to
3147 std::vector<char *>.
3148 * tracepoint.c (get_uploaded_tp): Allocate with new.
3149 (free_uploaded_tps): Free with delete.
3150 (parse_tracepoint_definition): Adjust to std::vector change.
3151 * breakpoint.c (read_uploaded_action): Likewise.
3152 (create_tracepoint_from_upload): Likewise.
3153 * ctf.c (ctf_write_uploaded_tp): Likewise.
3154 (SET_ARRAY_FIELD): Likewise.
3155 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
3156
a7961323
TT
31572018-03-30 Tom Tromey <tom@tromey.com>
3158
3159 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
3160 std::unique_ptr.
3161 (svr4_keep_data_in_core): Update.
3162 (svr4_read_so_list): Update.
3163
e83e4e24
TT
31642018-03-30 Tom Tromey <tom@tromey.com>
3165
3166 * windows-nat.c (handle_output_debug_string, handle_exception):
3167 Update.
3168 * target.h (target_read_string): Update.
3169 * target.c (target_read_string): Change "string" to
3170 unique_xmalloc_ptr.
3171 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
3172 Update.
3173 * solib-frv.c (frv_current_sos): Update.
3174 * solib-dsbt.c (dsbt_current_sos): Update.
3175 * solib-darwin.c (darwin_current_sos): Update.
3176 * linux-thread-db.c (inferior_has_bug): Update.
3177 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
3178 Update. Remove alloca.
3179 * ada-lang.c (ada_main_name): Update.
3180
263db9a1
TT
31812018-03-30 Tom Tromey <tom@tromey.com>
3182
3183 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
3184 (struct dwo_file_deleter): New.
3185 (dwo_file_up): New typedef.
3186 (open_and_init_dwo_file): Use dwo_file_up.
3187 (free_dwo_file_cleanup): Remove.
3188
5dafb3d1
TT
31892018-03-30 Tom Tromey <tom@tromey.com>
3190
3191 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
3192 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
3193
11ed8cad
TT
31942018-03-30 Tom Tromey <tom@tromey.com>
3195
3196 * dwarf2read.c (class free_cached_comp_units): New class.
3197 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
3198 (free_cached_comp_units): Remove function.
3199
9ae79dac
TT
32002018-03-30 Tom Tromey <tom@tromey.com>
3201
3202 * utils.h (make_cleanup_unpush_target): Remove.
3203 * inf-ptrace.c (struct target_unpusher): New.
3204 (target_unpush_up) New typedef.
3205 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
3206 target_unpush_up.
3207 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
3208
5aa89276
TT
32092018-03-27 Tom Tromey <tom@tromey.com>
3210
3211 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
3212
1dbeed45
TT
32132018-03-27 Pedro Alves <palves@redhat.com>
3214 Tom Tromey <tom@tromey.com>
3215
3216 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
3217 destructor. Now a class.
3218 (gdb_readline_wrapper_cleanup): Remove function.
3219 (gdb_readline_wrapper): Remove cleanups.
3220
c819b2c0
TT
32212018-03-27 Tom Tromey <tom@tromey.com>
3222
3223 * typeprint.h (struct type_print_options) <local_typedefs,
3224 global_typedefs>: Remove "struct" keyword.
3225 (class typedef_hash_table): New class.
3226 (recursively_update_typedef_hash, add_template_parameters)
3227 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
3228 (find_typedef_in_hash): Don't declare.
3229 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
3230 (typedef_hash_table::recursively_update): Rename from
3231 recursively_update_typedef_hash. Now a member.
3232 (typedef_hash_table::add_template_parameters): Rename from
3233 add_template_parameters. Now a member.
3234 (typedef_hash_table::typedef_hash_table): Now a constructor;
3235 rename from create_typedef_hash.
3236 (typedef_hash_table::~typedef_hash_table): Now a destructor;
3237 rename from free_typedef_hash.
3238 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
3239 (do_free_global_table): Remove.
3240 (typedef_hash_table::typedef_hash_table): New constructor; renamed
3241 from copy_type_recursive.
3242 (create_global_typedef_table): Remove.
3243 (typedef_hash_table::find_global_typedef): Now a member of
3244 typedef_hash_table.
3245 (typedef_hash_table::find_typedef): Rename from
3246 find_typedef_in_hash; now a member.
3247 (whatis_exp): Update.
3248 * extension.h (struct ext_lang_type_printers): Add constructor and
3249 destructor.
3250 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
3251 declare.
3252 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
3253 Now a constructor; rename from start_ext_lang_type_printers.
3254 (ext_lang_type_printers): Now a destructor; rename from
3255 free_ext_lang_type_printers.
3256 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
3257 Update.
3258 (c_type_print_base_struct_union): Update. Remove cleanups.
3259
608219fb
TT
32602018-03-27 Tom Tromey <tom@tromey.com>
3261
3262 * dwarf-index-write.c: Include <cmath>.
3263
3fcded8f
JB
32642018-03-27 Joel Brobecker <brobecker@adacore.com>
3265
3266 * NEWS: Add entry describing new "set|show varsize-limit" command.
3267 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
3268 command.
3269 * printcmd.c (_initialize_printcmd): Add "set var" alias of
3270 "set variable".
3271
cd4fb1b2
SM
32722018-03-27 Simon Marchi <simon.marchi@ericsson.com>
3273
3274 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
3275 dwarf-index-write.c
3276 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
3277 * dwarf-index-common.c: New file.
3278 * dwarf-index-common.h: New file.
3279 * dwarf-index-write.c: New file.
3280 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
3281 (struct dwarf2_section_info): Move from here.
3282 (dwarf2_section_info_def): Likewise.
3283 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
3284 (offset_type): Likewise.
3285 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
3286 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
3287 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
3288 (byte_swap): Likewise.
3289 (MAYBE_SWAP): Likewise.
3290 (dwarf2_per_cu_ptr): Likewise.
3291 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
3292 (struct tu_stats): Likewise.
3293 (struct dwarf2_per_objfile): Likewise.
3294 (struct dwarf2_per_cu_data): Likewise.
3295 (struct signatured_type): Likewise.
3296 (sig_type_ptr): Likewise.
3297 (DEF_VEC_P (sig_type_ptr)): Likewise.
3298 (INDEX4_SUFFIX): Likewise.
3299 (INDEX5_SUFFIX): Likewise.
3300 (DEBUG_STR_SUFFIX): Likewise.
3301 (dwarf2_read_section): Make non-static.
3302 (mapped_index_string_hash): Move from here.
3303 (dwarf5_djb_hash): Likewise.
3304 (file_write): Likewise.
3305 (class data_buf): Likewise.
3306 (struct symtab_index_entry): Likewise.
3307 (struct mapped_symtab): Likewise.
3308 (find_slot): Likewise.
3309 (hash_expand): Likewise.
3310 (add_index_entry): Likewise.
3311 (uniquify_cu_indices): Likewise.
3312 (class c_str_view): Likewise.
3313 (class c_str_view_hasher): Likewise.
3314 (class vector_hasher): Likewise.
3315 (write_hash_table): Likewise.
3316 (psym_index_map): Likewise.
3317 (struct addrmap_index_data): Likewise.
3318 (add_address_entry): Likewise.
3319 (add_address_entry_worker): Likewise.
3320 (write_address_map): Likewise.
3321 (symbol_kind): Likewise.
3322 (write_psymbols): Likewise.
3323 (struct signatured_type_index_data): Likewise.
3324 (write_one_signatured_type): Likewise.
3325 (recursively_count_psymbols): Likewise.
3326 (recursively_write_psymbols): Likewise.
3327 (class debug_names): Likewise.
3328 (check_dwarf64_offsets): Likewise.
3329 (psyms_seen_size): Likewise.
3330 (write_gdbindex): Likewise.
3331 (write_debug_names): Likewise.
3332 (assert_file_size): Likewise.
3333 (write_psymtabs_to_index): Likewise.
3334 (save_gdb_index_command): Likewise.
3335 (_initialize_dwarf2_read): Don't register the "save gdb-index"
3336 command.
3337 * dwarf2read.h: New file.
3338
59cc4834
JB
33392018-03-27 Joel Brobecker <brobecker@adacore.com>
3340
3341 PR gdb/22670
3342 * dwarf2read.c (dwarf2_physname): Do not return the demangled
3343 symbol name if the CU's language stores symbol names in linkage
3344 format.
3345 * language.h (struct language_defn)
3346 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
3347 all instances of this struct.
3348
67501539
TT
33492018-03-26 Tom Tromey <tom@tromey.com>
3350
3351 * stack.c (backtrace_command_1): Remove verbose code.
3352
76c939ac
TT
33532018-03-26 Tom Tromey <tom@tromey.com>
3354
3355 * python/py-framefilter.c (py_print_type): Don't catch
3356 exceptions. Return void.
3357 (py_print_value): Likewise.
3358 (py_print_single_arg): Likewise.
3359 (enumerate_args): Don't catch exceptions.
3360 (py_print_args): Likewise.
3361 (py_print_frame): Likewise.
3362 (gdbpy_apply_frame_filter): Catch exceptions here.
3363
9507b29c
TT
33642018-03-26 Tom Tromey <tom@tromey.com>
3365
3366 * stack.c (_initialize_stack): Remove trailing newlines from help
3367 text. Add "Usage" line to "backtrace" help.
3368
eb68e487
TT
33692018-03-26 Tom Tromey <tom@tromey.com>
3370
3371 PR python/16486:
3372 * python/py-framefilter.c (py_print_args): Call wrap_hint.
3373
1f111921
TT
33742018-03-26 Tom Tromey <tom@tromey.com>
3375
3376 * python/py-framefilter.c (py_print_single_arg): Return
3377 EXT_LANG_BT_ERROR from catch.
3378
fb7eb8b5
TT
33792018-03-26 Tom Tromey <tom@tromey.com>
3380
3381 PR backtrace/15584:
3382 * stack.c (backtrace_command_1): Move some code into no-filters
3383 "if".
3384
4ca59a9f
TT
33852018-03-26 Tom Tromey <tom@tromey.com>
3386
3387 * python/py-framefilter.c (throw_quit_or_print_exception): New
3388 function.
3389 (gdbpy_apply_frame_filter): Use it.
3390
92256134
TT
33912018-03-26 Tom Tromey <tom@tromey.com>
3392
3393 PR cli/17716:
3394 * python/py-framefilter.c (py_print_type, py_print_value)
3395 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
3396 RETURN_MASK_ERROR.
3397
7a630bc2
TT
33982018-03-26 Tom Tromey <tom@tromey.com>
3399
3400 * python/py-framefilter.c (enumerate_args): Use
3401 gdb::unique_xmalloc_ptr.
3402
63283d4a
TT
34032018-03-26 Tom Tromey <tom@tromey.com>
3404
3405 * python/py-framefilter.c (py_print_frame): Return
3406 EXT_LANG_BT_OK.
3407 (gdbpy_apply_frame_filter): Update comment.
3408 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
3409 Remove.
3410 <EXT_LANG_BT_NO_FILTERS>: Change value.
3411
978d6c75
TT
34122018-03-26 Tom Tromey <tom@tromey.com>
3413
3414 PR backtrace/15582:
3415 * stack.c (backtrace_command): Parse "hide" argument.
3416 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
3417 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
3418 constant.
3419
1cf7e640
TT
34202018-03-26 Tom Tromey <tom@tromey.com>
3421
3422 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
3423 add "flags".
3424 (backtrace_command): Remove "fulltrace", add "flags".
3425
ea3b0687
TT
34262018-03-26 Tom Tromey <tom@tromey.com>
3427
3428 * stack.c (backtrace_command): Rewrite command line parsing.
3429
9f034d75
SM
34302018-03-26 Simon Marchi <simon.marchi@ericsson.com>
3431
3432 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
3433
ce1459e5
SM
34342018-03-26 Simon Marchi <simon.marchi@ericsson.com>
3435
3436 * filename-seen-cache.h: Add include guard.
3437
4f7ae6f5
KS
34382018-03-26 Keith Seitz <keiths@redhat.com>
3439
3440 * symfile.c (place_section): Remove "struct" from section_addr_info
3441 in comment.
3442 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
3443 "struct" keyword from section_addr_info.
3444
5cd3e386
AH
34452018-03-26 Alan Hayward <alan.hayward@arm.com>
3446
3447 * regformats/regdef.h (reg): Add constructors.
3448
3e5ef9a4
PA
34492018-03-25 Pedro Alves <palves@redhat.com>
3450
3451 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
3452 if then/else bodies in var_func_name extraction.
3453
c88d2fcc 34542018-03-23 Weimin Pan <weimin.pan@oracle.com>
bce02d88
WP
3455
3456 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
3457 lookup_minimal_symbol() to find symbol entry.
3458 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
3459
b7fee5a3
KS
34602018-03-23 Keith Seitz <keiths@redhat.com>
3461
3462 PR c++/22968
3463 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
3464 nested type definitions for C++, too.
3465
2cc9b304
TT
34662018-03-23 Tom Tromey <tom@tromey.com>
3467
3468 * machoread.c (struct oso_el): Add a constructor. Don't define as
3469 a typedef.
3470 (macho_register_oso): Remove.
3471 (macho_symtab_read): Take a std::vector.
3472 (oso_el_compare_name): Now a std::sort comparator.
3473 (macho_symfile_read_all_oso): Take a std::vector.
3474 (macho_symfile_read): Use std::vector. Remove cleanups.
3475
a2b2bc12
TT
34762018-03-22 Tom Tromey <tom@tromey.com>
3477
3478 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
3479 (record_full_goto_bookmark): Use std::string.
3480
7a8f494c
PFC
34812018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3482
3483 PR tdep/18295
3484 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
3485 a single mask.
3486
dd6d677f
PFC
34872018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3488
3489 * rs6000-tdep.c (store_insn_p): New function.
3490 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
3491 and cr_reg to their unshifted values. Use store_insn_p to
3492 match LR saves using either R1 or fdata->alloca_reg. Use
3493 store_insn_p to match CR saves. Set alloca_reg_offset
3494 when alloca_reg and framep are set. Remove lr_reg shift
3495 when assigning to fdata->lr_register.
3496
26d6cec4
AA
34972018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
3498
3499 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
3500 command line args instead of emitting a warning.
3501
5d9310c4
SM
35022018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
3503
3504 * tracepoint.h (struct static_tracepoint_marker): Initialize
3505 fields, define default constructor, move constructor and move
3506 assignment, disable the rest.
3507 <str_id, extra>: Make std::string.
3508 (release_static_tracepoint_marker): Remove.
3509 (free_current_marker): Remove.
3510 * tracepoint.c (free_current_marker): Remove.
3511 (parse_static_tracepoint_marker_definition): Adjust to
3512 std::string, use new hex2str overload.
3513 (release_static_tracepoint_marker): Remove.
3514 (print_one_static_tracepoint_marker): Get marker by reference
3515 and adjust to std::string.
3516 (info_static_tracepoint_markers_command): Adjust to std::vector
3517 changes
3518 * target.h (static_tracepoint_marker_p): Remove typedef.
3519 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
3520 (struct target_ops) <to_static_tracepoint_marker_at>: Return
3521 bool.
3522 <to_static_tracepoint_markers_by_strid>: Return std::vector.
3523 * target-debug.h
3524 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
3525 (target_debug_print_std_vector_static_tracepoint_marker): New.
3526 (target_debug_print_struct_static_tracepoint_marker_p): Rename
3527 to...
3528 (target_debug_print_static_tracepoint_marker_p): ... this.
3529 * target-delegates.c: Re-generate.
3530 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
3531 Make std::string.
3532 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
3533 (decode_static_tracepoint_spec): Adjust to std::vector.
3534 (tracepoint_print_one_detail): Adjust to std::string.
3535 (strace_marker_decode_location): Adjust to std::string.
3536 (update_static_tracepoint): Adjust to std::string, remove call
3537 to release_static_tracepoint_marker.
3538 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
3539 Adjust to std::vector.
3540 * remote.c (remote_static_tracepoint_marker_at): Return bool.
3541 (remote_static_tracepoint_markers_by_strid): Adjust to
3542 std::vector.
3543 * common/rsp-low.h (hex2str): New overload with explicit count
3544 of bytes.
3545 * common/rsp-low.c (hex2str): New overload with explicit count
3546 of bytes.
3547 * unittests/rsp-low-selftests.c (test_hex2str): New function.
3548 (_initialize_rsp_low_selftests): Add test_hex2str test.
3549 * unittests/tracepoint-selftests.c
3550 (test_parse_static_tracepoint_marker_definition): Adjust to
3551 std::string.
3552
62c222b6
SM
35532018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
3554
3555 * tracepoint.c (parse_static_tracepoint_marker_definition):
3556 Consider case where the definition is followed by more
3557 definitions.
3558 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3559 tracepoint-selftests.c.
3560 * unittests/tracepoint-selftests.c: New.
3561
7eb2418f
PFC
35622018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3563
3564 * MAINTAINERS (Write After Approval): Add Pedro Franco de
3565 Carvalho.
3566
7cbe16e9
SR
35672018-03-20 Stephen Roberts <stephen.roberts@arm.com>
3568
3d6b3b82 3569 * symtab.c (find_pc_sect_line): fixed indentation.
7cbe16e9 3570
4ee89e90
SR
35712018-03-20 Stephen Roberts <stephen.roberts@arm.com>
3572
3d6b3b82 3573 * symtab.c (find_pc_sect_line): now uses binary search.
4ee89e90 3574
92630041
TT
35752018-03-19 Tom Tromey <tom@tromey.com>
3576
3577 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
3578 "IDENT" production.
3579
76727919
TT
35802018-03-19 Pedro Alves <palves@redhat.com>
3581 Tom Tromey <tom@tromey.com>
3582
3583 * unittests/observable-selftests.c: New file.
3584 * common/observable.h: New file.
3585 * observable.h: New file.
3586 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
3587 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
3588 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
3589 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
3590 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
3591 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
3592 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
3593 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
3594 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
3595 python/py-breakpoint.c, python/py-finishbreakpoint.c,
3596 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
3597 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
3598 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
3599 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
3600 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
3601 tui/tui-interp.c, valops.c: Update all users.
3602 * tui/tui-hooks.c (tui_bp_created_observer)
3603 (tui_bp_deleted_observer, tui_bp_modified_observer)
3604 (tui_inferior_exit_observer, tui_before_prompt_observer)
3605 (tui_normal_stop_observer, tui_register_changed_observer):
3606 Remove.
3607 (tui_observers_token): New global.
3608 (attach_or_detach, tui_attach_detach_observers): New functions.
3609 (tui_install_hooks, tui_remove_hooks): Use
3610 tui_attach_detach_observers.
3611 * record-btrace.c (record_btrace_thread_observer): Remove.
3612 (record_btrace_thread_observer_token): New global.
3613 * observer.sh: Remove.
3614 * observer.c: Rename to observable.c.
3615 * observable.c (namespace gdb_observers): Define new objects.
3616 (observer_debug): Move into gdb_observers namespace.
3617 (struct observer, struct observer_list, xalloc_observer_list_node)
3618 (xfree_observer_list_node, generic_observer_attach)
3619 (generic_observer_detach, generic_observer_notify): Remove.
3620 (_initialize_observer): Update.
3621 Don't include observer.inc.
3622 * Makefile.in (generated_files): Remove observer.h, observer.inc.
3623 (clean mostlyclean): Likewise.
3624 (observer.h, observer.inc): Remove targets.
3625 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
3626 (COMMON_SFILES): Use observable.c, not observer.c.
3627 * .gitignore: Remove observer.h.
3628
1cb1f3da
TT
36292018-03-18 Tom Tromey <tom@tromey.com>
3630
3631 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
3632 gdb::def_vector.
3633 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
3634
a06ab151
TT
36352018-03-17 Tom Tromey <tom@tromey.com>
3636
3637 * auto-load.c (auto_load_objfile_script_1): Use std::string.
3638
770623f7
TT
36392018-03-17 Tom Tromey <tom@tromey.com>
3640
3641 * target.c (class scoped_target_fd): New.
3642 (target_fileio_close_cleanup): Remove.
3643 (target_fileio_read_alloc_1): Use scoped_target_fd.
3644
39be3c7e
SM
36452018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
3646
3647 * silent-rules.mk: New.
3648 * Makefile.in: Include silent-rules.mk
3649 (srcdir, VPATH, top_srcdir): Move up.
3650 (COMPILE): Add ECHO_CXX.
3651 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
3652 (init.c): Add ECHO_INIT_C.
3653 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
3654 (version.c): Add ECHO_GEN.
3655 (printcmd.o): Add ECHO_CXX.
3656 (target-float.o): Add ECHO_CXX.
3657 (ada-exp.o): Add ECHO_CXX.
3658 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
3659 (insight$(EXEEXT)): Add ECHO_CXXLD.
3660 * gnulib/configure.ac: Add AM_SILENT_RULES.
3661 * gnulib/aclocal.m4: Re-generate.
3662 * gnulib/configure: Re-generate.
3663 * gnulib/import/Makefile.in: Re-generate.
3664
37e136b1
TT
36652018-03-16 Tom Tromey <tom@tromey.com>
3666
3667 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
3668 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
3669 * utils.c (do_free_section_addr_info)
3670 (make_cleanup_free_section_addr_info): Remove.
3671 * symfile.h (struct other_sections): Add constructor.
3672 (struct section_addr_info): Remove.
3673 (section_addr_info): New typedef.
3674 (struct sym_fns) <sym_offsets>: Change type of parameter.
3675 (build_section_addr_info_from_objfile)
3676 (relative_addr_info_to_section_offsets, addr_info_make_relative)
3677 (default_symfile_offsets, symbol_file_add)
3678 (symbol_file_add_from_bfd)
3679 (build_section_addr_info_from_section_table): Update.
3680 (alloc_section_addr_info, free_section_addr_info): Don't declare.
3681 * symfile.c (alloc_section_addr_info): Remove.
3682 (build_section_addr_info_from_section_table): Change return type.
3683 Update.
3684 (build_section_addr_info_from_bfd)
3685 (build_section_addr_info_from_objfile): Likewise.
3686 (free_section_addr_info): Remove.
3687 (relative_addr_info_to_section_offsets): Change type of "addrs".
3688 (addrs_section_compar): Now a std::sort comparator.
3689 (addrs_section_sort): Change return type.
3690 (addr_info_make_relative): Change type of "addrs". Update.
3691 (default_symfile_offsets, syms_from_objfile_1)
3692 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
3693 (symbol_file_add_separate): Update.
3694 (symbol_file_add): Change type of "addrs". Update.
3695 (add_symbol_file_command): Update. Remove cleanups.
3696 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
3697 cleanups.
3698 * symfile-debug.c (debug_sym_offsets): Change type of "info".
3699 * solib.c (solib_read_symbols): Update.
3700 * objfiles.c (objfile_relocate): Update. Remove cleanups.
3701 * machoread.c (macho_symfile_offsets): Update.
3702 * jit.c (jit_bfd_try_read_symtab): Update.
3703
03afa6ef
SM
37042018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
3705
3706 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3707 unittests/utils-selftests.c.
3708 * unittests/utils-selftests.c: New file.
3709
3ae9ce5d
TT
37102018-03-14 Tom Tromey <tom@tromey.com>
3711
3712 PR cli/14977:
3713 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
3714 for NULL.
3715
b8c2339b
TT
37162018-03-14 Tom Tromey <tom@tromey.com>
3717
3718 PR cli/19918:
3719 * printcmd.c (printf_pointer): Allow "-" in format.
3720
80ae639d
TT
37212018-03-14 Tom Tromey <tom@tromey.com>
3722
3723 * printcmd.c (_initialize_printcmd): Add usage to printf.
3724
0d671d99
YQ
37252018-03-14 Yao Qi <qiyao@sourceware.org>
3726
3727 * MAINTAINERS: Update my email address.
3728
b577b6af
TT
37292018-03-13 Tom Tromey <tom@tromey.com>
3730
3731 * machoread.c (macho_check_dsym): Change filenamep to a
3732 std::string*.
3733 (macho_symfile_read): Update.
3734 * symfile.c (load_command): Use std::string.
3735
89a3b63e
AB
37362018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
3737
3738 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
3739 to error message string.
3740 (riscv_register_name): Use xsnprintf instead of sprintf.
3741 (riscv_insn::fetch_instruction): Use gdb_assert instead of
3742 internal_error.
3743 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
3744 error.
3745 (riscv_push_dummy_call): Likewise.
3746
984c7238
TT
37472018-03-12 Tom Tromey <tom@tromey.com>
3748
3749 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
3750 Use gdb::byte_vector.
3751 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
3752
933522d1
YQ
37532018-03-12 Yao Qi <yao.qi@linaro.org>
3754
3755 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
3756 parameter type to readable_regcache.
3757 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
3758 the declaration.
3759
be2daae6
TT
37602018-03-11 Tom Tromey <tom@tromey.com>
3761
3762 * dwarf2read.c (struct nextfield): Add initializers.
3763 (struct nextfnfield): Remove.
3764 (struct fnfieldlist): Add initializers. Remove "length" and
3765 "head", use std::vector.
3766 (struct decl_field_list): Remove.
3767 (struct field_info): Add initializers.
3768 <fields, baseclasses>: Now std::vector.
3769 <nbaseclasses, nfnfields, typedef_field_list_count,
3770 nested_types_list_count>: Remove.
3771 (dwarf2_add_field, dwarf2_add_type_defn)
3772 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
3773 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
3774 (process_structure_scope): Update.
3775
484cf504
TT
37762018-03-11 Tom Tromey <tom@tromey.com>
3777
3778 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
3779 for use by std::sort.
3780 (build_type_psymtabs_1): Use std::vector.
3781
9bd8e0b0
EZ
37822018-03-09 Eli Zaretskii <eliz@gnu.org>
3783
3784 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
3785 and LIBMPFR in the printed configuration.
3786
5dc1a704
TT
37872018-03-08 Tom Tromey <tom@tromey.com>
3788
3789 * source.c (get_filename_and_charpos): Use scoped_fd.
3790 * nto-procfs.c (procfs_open_1): Use scoped_fd.
3791 (procfs_pidlist): Likewise.
3792 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
3793 (iterate_over_mappings): Likewise.
3794
fdf07f3a
TT
37952018-03-08 Tom Tromey <tom@tromey.com>
3796
3797 * infcall.c (struct call_return_meta_info)
3798 <stack_temporaries_enabled>: Remove.
3799 (get_call_return_value, call_function_by_hand_dummy): Update.
3800 * thread.c (disable_thread_stack_temporaries): Remove.
3801 (enable_thread_stack_temporaries): Remove.
3802 (thread_stack_temporaries_enabled_p): Return bool.
3803 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
3804 (get_last_thread_stack_temporary): Update.
3805 * eval.c (evaluate_subexp): Update.
3806 * gdbthread.h (class enable_thread_stack_temporaries): Now a
3807 class, not a function.
3808 (value_ptr, value_vec): Remove typedefs.
3809 (class thread_info) <stack_temporaries_enabled>: Now bool.
3810 <stack_temporaries>: Now a std::vector.
3811 (thread_stack_temporaries_enabled_p)
3812 (value_in_thread_stack_temporaries): Return bool.
3813
567a3e54
SM
38142018-03-08 Simon Marchi <simon.marchi@ericsson.com>
3815
3816 * remote.c (putpkt_binary): Fix omitted bytes reporting.
3817 (getpkt_or_notif_sane_1): Likewise.
3818
00b40057
SM
38192018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
3820
3821 * build-id.c (build_id_to_debug_bfd): Use std::string.
3822
a8dbfd58
SM
38232018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
3824
3825 * build-id.c (find_separate_debug_file_by_buildid): Return
3826 std::string.
3827 * build-id.h (find_separate_debug_file_by_buildid): Return
3828 std::string.
3829 * coffread.c (coff_symfile_read): Adjust to std::string.
3830 * elfread.c (elf_symfile_read): Adjust to std::string.
3831 * symfile.c (separate_debug_file_exists): Change parameter to
3832 std::string.
3833 (find_separate_debug_file): Return std::string.
3834 (find_separate_debug_file_by_debuglink): Return std::string.
3835 * symfile.h (find_separate_debug_file_by_debuglink): Return
3836 std::string.
3837
e6a58aa8
SM
38382018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
3839
3840 * common/xml-utils.c (xml_escape_text): Move code to...
3841 (xml_escape_text_append): ... this new function.
3842 * common/xml-utils.h (xml_escape_text_append): New declaration.
3843 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
3844 New function.
3845 (_initialize_xml_utils): register test_xml_escape_text_append as
3846 a selftest.
3847
4ef0bef6
AH
38482018-03-07 Alan Hayward <alan.hayward@arm.com>
3849
3850 * defs.h: Remove MAX_REGISTER_SIZE.
3851 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
3852 asserts.
3853 * python/py-unwind.c (pyuw_sniffer): Likewise.
3854
e0d3522b
TT
38552018-03-07 Tom Tromey <tom@tromey.com>
3856
3857 * linux-tdep.c (linux_info_proc): Update.
3858 * target.h (struct target_ops) <to_fileio_readlink>: Return
3859 optional<string>.
3860 (target_fileio_readlink): Return optional<string>.
3861 * remote.c (remote_hostio_readlink): Return optional<string>.
3862 * inf-child.c (inf_child_fileio_readlink): Return
3863 optional<string>.
3864 * target.c (target_fileio_readlink): Return optional<string>.
3865
ea005f31
AB
38662018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
3867
3868 * regcache.c (cooked_read_test): Add riscv to the list of
3869 architectures that have a save_reggroup.
3870
e95a97d4
AA
38712018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
3872
3873 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
3874 value is not a dynamic class object.
3875
d8344f3d
TT
38762018-03-06 Tom Tromey <tom@tromey.com>
3877
3878 * rust-exp.y: Formatting fixes.
3879
9add17f2
AB
38802018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
3881
3882 * riscv-tdep.c (riscv_register_name): Remove target description
3883 support.
3884 (riscv_gdbarch_init): Remove target description check.
3885
c9486dfe
AB
38862018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
3887
3888 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
3889 comment.
3890 * riscv-tdep.h: Likewise.
3891
d74aff3d
AB
38922018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
3893
3894 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
3895 (riscv_pseudo_register_write): Delete.
3896 (riscv_gdbarch_init): Remove all use of pseudo registers.
3897
7ea78b59
SM
38982018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
3899
3900 * record-btrace.c (btrace_print_lines): Replace cleanup
3901 parameter with RAII equivalents.
3902 (btrace_insn_history): Replace cleanup with RAII equivalents.
3903 * ui-out.h (make_cleanup_ui_out_list_begin_end,
3904 make_cleanup_ui_out_tuple_begin_end): Remove.
3905 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
3906 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
3907 make_cleanup_ui_out_list_begin_end): Remove.
3908
53127008
SM
39092018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
3910
3911 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
3912 parameter types to std::vector. Use bool.
3913 (record_btrace_wait): Replace VEC(tp_t) with
3914 std::vector<thread_info *>.
3915 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
3916
228f1508
SM
39172018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
3918
3919 * record-btrace.c (record_btrace_disable_callback): Remove.
3920 (struct scoped_btrace_disable): New.
3921 (record_btrace_open): Use scoped_btrace_disable.
3922
b2970c23
AB
39232018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
3924
3925 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
3926 reading values from registers.
3927
fb294655
AB
39282018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
3929
3930 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
3931 where appropriate.
3932
cab5bb9d
AB
39332018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
3934
3935 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
3936 change parameter type. Use GDB's print functions, and use
3937 core_addr_to_string where appropriate.
3938 (riscv_push_dummy_call): Use core_addr_to_string where
3939 appropriate, update call to riscv_print_arg_location, and reindent
3940 a few lines.
3941 (riscv_return_value): Update call to riscv_print_arg_location.
3942
dbbb1059
AB
39432018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
3944 Tim Newsome <tim@sifive.com>
3945 Albert Ou <a0u@eecs.berkeley.edu>
3946 Darius Rad <darius@bluespec.com>
3947
3948 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
3949 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
3950 (ALLDEPFILES): Add riscv-tdep.c
3951 * configure.tgt: Add riscv support.
3952 * riscv-tdep.c: New file.
3953 * riscv-tdep.h: New file.
3954 * NEWS: Mention new target.
3955 * MAINTAINERS: Add entry for riscv.
3956
5dc43913
AB
39572018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
3958
3959 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
3960 fields within aggregates.
3961
3dea1ef7
SM
39622018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
3963
3964 * record-btrace.c (btrace_print_lines): Change type of flags to
3965 gdb_disassembly_flags.
3966
7efba073
JB
39672018-03-04 John Baldwin <jhb@FreeBSD.org>
3968
3969 * fbsd-nat.c: Include "inf-ptrace.h".
3970 (USE_SIGTRAP_SIGINFO): Conditionally define.
3971 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
3972 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
3973 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
3974 function.
3975 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
3976 Likewise.
3977 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
3978 Likewise.
3979 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
3980 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
3981 "supports_stopped_by_hw_breakpoint" target methods.
3982
386a8676
JB
39832018-03-04 John Baldwin <jhb@FreeBSD.org>
3984
3985 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
3986 * fbsd-nat.c (debug_fbsd_nat): New variable.
3987 (show_fbsd_nat_debug): New function.
3988 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
3989 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
3990
12279366
JB
39912018-03-04 John Baldwin <jhb@FreeBSD.org>
3992
3993 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
3994 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
3995 prototype.
3996 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
3997 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
3998 method.
3999
54693cf5
SM
40002018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
4001
4002 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
4003 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
4004
ccb2231c
SM
40052018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
4006
4007 * charset.c (struct charset_vector): New.
4008 (charsets): Change type to charset_vector.
4009 (find_charset_names): Adjust.
4010 (add_one): Adjust.
4011 (_initialize_charset): Adjust.
4012
6fb16ce6
SM
40132018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
4014
4015 * progspace.h (struct program_space) <deleted_solibs>: Change
4016 type to std::vector<std::string>.
4017 * progspace.c (clear_program_space_solib_cache): Adjust.
4018 * breakpoint.c (print_solib_event): Adjust.
4019 (check_status_catch_solib): Adjust.
4020 * solib.c (update_solib_list): Adjust.
4021 * ui-out.h (class ui_out) <field_string>: New overload.
4022 * ui-out.c (ui_out::field_string): New overload.
4023
564b1e3f
SM
40242018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
4025
4026 * progspace.h (struct program_space): Add constructor and
4027 destructor, initialize fields.
4028 (add_program_space): Remove.
4029 * progspace.c (add_program_space): Rename to...
4030 (program_space::program_space): ... this.
4031 (release_program_space): Rename to...
4032 (program_space::~program_space): ... this.
4033 (delete_program_space): Use delete to delete program_space.
4034 (initialize_progspace): Use new to allocate program_space.
4035 * inferior.c (add_inferior_with_spaces): Likewise.
4036 (clone_inferior_command): Likewise.
4037 * infrun.c (follow_fork_inferior): Likewise.
4038 (handle_vfork_child_exec_or_exit): Likewise.
4039
e80aaf61
SM
40402018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
4041
4042 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
4043 (delim_string_to_char_ptr_vec): Return std::vector of
4044 gdb::unique_xmalloc_ptr.
4045 (dirnames_to_char_ptr_vec_append): Take std::vector of
4046 gdb::unique_xmalloc_ptr.
4047 (dirnames_to_char_ptr_vec): Return std::vector of
4048 gdb::unique_xmalloc_ptr.
4049 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
4050 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
4051 (delim_string_to_char_ptr_vec): Return an std::vector of
4052 gdb::unique_xmalloc_ptr, adjust the code.
4053 (dirnames_to_char_ptr_vec_append): Take an std::vector of
4054 gdb::unique_xmalloc_ptr, adjust the code.
4055 (dirnames_to_char_ptr_vec): Return an std::vector of
4056 gdb::unique_xmalloc_ptr, adjust the code.
4057 * auto-load.c (auto_load_safe_path_vec): Change type to
4058 std::vector of gdb::unique_xmalloc_ptr.
4059 (auto_load_expand_dir_vars): Return an std::vector of
4060 gdb::unique_xmalloc_ptr, adjust the code.
4061 (auto_load_safe_path_vec_update): Adjust.
4062 (filename_is_in_auto_load_safe_path_vec): Adjust.
4063 (auto_load_objfile_script_1): Adjust.
4064 * build-id.c (build_id_to_debug_bfd): Adjust.
4065 * linux-thread-db.c (thread_db_load_search): Adjust.
4066 * source.c (add_path): Adjust.
4067 (openp): Adjust.
4068 * symfile.c (find_separate_debug_file): Adjust.
4069 * utils.c (do_free_char_ptr_vec): Remove.
4070 (make_cleanup_free_char_ptr_vec): Remove.
4071
ab818ade
SDJ
40722018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
4073
4074 PR gdb/22907
4075 * common/pathstuff.c: Conditionally include "<windows.h>".
4076
e1e6f073
GS
40772018-03-01 Georg Sauthoff <mail@georg.so>
4078
4079 PR gdb/22888
4080 * gcore.in: Quote variables and switch interpreter to bash.
4081
c7b15a66
TT
40822018-03-01 Tom Tromey <tom@tromey.com>
4083
4084 * dwarf2read.c (alloc_discriminant_info): Fix default_index
4085 assertion. Add assertion for discriminant_index.
4086 (quirk_rust_enum): Use correct base type name in univariant case.
4087
0cb7c7b0
SM
40882018-03-01 Simon Marchi <simon.marchi@ericsson.com>
4089
4090 * record.c (get_call_history_modifiers): Return a
4091 record_print_flags.
4092 (cmd_record_call_history): Adjust.
4093 * record-btrace.c (record_btrace_call_history): Adjust.
4094 (record_btrace_call_history_range): Adjust.
4095 (record_btrace_call_history_from): Adjust.
4096 * target-debug.h (target_debug_print_record_print_flags): New.
4097 * target-delegates.c: Re-generate.
4098 * target.c (target_call_history): Change flags type.
4099 (target_call_history_from): Likewise.
4100 (target_call_history_range): Likewise.
4101 * target.h (struct target_ops) <target_call_history>: Likewise.
4102 (target_call_history_from): Likewise.
4103 (target_call_history_range): Likewise.
4104
25e3c82c
SDJ
41052018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
4106 Simon Marchi <simon.marchi@polymtl.ca>
4107
4108 * common/common-utils.c: Include "sys/stat.h".
4109 (is_regular_file): Move here from "source.c"; change return
4110 type to "bool".
4111 * common/common-utils.h (is_regular_file): New prototype.
4112 * common/pathstuff.c (contains_dir_separator): New function.
4113 * common/pathstuff.h (contains_dir_separator): New prototype.
4114 * source.c: Don't include "sys/stat.h".
4115 (is_regular_file): Move to "common/common-utils.c".
4116
b4987c95
SDJ
41172018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
4118
4119 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
4120 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
4121 * auto-load.c: Include "common/pathstuff.h".
4122 * common/common-def.h (current_directory): Move here.
4123 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
4124 function.
4125 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
4126 prototype.
4127 * common/pathstuff.c: New file.
4128 * common/pathstuff.h: New file.
4129 * compile/compile.c: Include "common/pathstuff.h".
4130 * defs.h (current_directory): Move to "common/common-defs.h".
4131 * dwarf2read.c: Include "common/pathstuff.h".
4132 * exec.c: Likewise.
4133 * guile/scm-safe-call.c: Likewise.
4134 * linux-thread-db.c: Likewise.
4135 * main.c: Likewise.
4136 * nto-tdep.c: Likewise.
4137 * objfiles.c: Likewise.
4138 * source.c: Likewise.
4139 * symtab.c: Likewise.
4140 * utils.c: Include "common/pathstuff.h".
4141 (gdb_realpath): Move to "common/pathstuff.c".
4142 (gdb_realpath_keepfile): Likewise.
4143 (gdb_abspath): Likewise.
4144 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
4145 (gdb_realpath_keepfile): Likewise.
4146 (gdb_abspath): Likewise.
4147
f169cfdc
JB
41482018-02-28 John Baldwin <jhb@FreeBSD.org>
4149
4150 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
4151 wildcard process pid for super_resume for kernels with a
4152 specific bug.
4153
e05cac70
PM
41542018-02-27 Phil Muldoon <pmuldoon@redhat.com>
4155
4156 * compile/compile.c (get_args): Add additional comments
4157 explaining function.
4158
55089490
TT
41592018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
4160 Tom Tromey <tom@tromey.com>
4161
4162 * target.h (memory_write_request_s): Remove typedef. Don't define
4163 VEC.
4164 (target_write_memory_blocks): Change argument to std::vector.
4165 (struct memory_write_request): Add constructor.
4166 * target-memory.c (compare_block_starting_address): Return bool.
4167 Change argument types.
4168 (claim_memory): Change arguments to use std::vector.
4169 (split_regular_and_flash_blocks, blocks_to_erase)
4170 (compute_garbled_blocks): Likewise.
4171 (cleanup_request_data, cleanup_write_requests_vector): Remove.
4172 (target_write_memory_blocks): Change argument to std::vector.
4173 * symfile.c (struct load_section_data): Add constructor and
4174 destructor. Use std::vector for "requests".
4175 (struct load_progress_data): Add initializers.
4176 (load_section_callback): Update. Use "new".
4177 (clear_memory_write_data): Remove.
4178 (generic_load): Update.
4179
0c305b61
AH
41802018-02-27 Alan Hayward <alan.hayward@arm.com>
4181
4182 * arch/aarch64.h: Use common/tdesc.h.
4183
c5196c92
MR
41842018-02-26 Maciej W. Rozycki <macro@mips.com>
4185
4186 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
4187 architecture with a 64-bit ABI.
4188
37c33887
MR
41892018-02-26 Maciej W. Rozycki <macro@mips.com>
4190
4191 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
4192 ahead of target description loading.
4193
d4dd3282
TT
41942018-02-26 Tom Tromey <tom@tromey.com>
4195
4196 * stack.c (backtrace_command_1): Update.
4197 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
4198 of "flags".
4199 * python/py-framefilter.c (py_print_frame)
4200 (gdbpy_apply_frame_filter): Change type of "flags".
4201 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
4202 of "flags".
4203 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
4204 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
4205 * extension.h (enum frame_filter_flag): Rename from
4206 frame_filter_flags.
4207 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
4208 (apply_ext_lang_frame_filter): Change type of "flags".
4209 * extension.c (apply_ext_lang_frame_filter): Change type of
4210 "flags".
4211 * extension-priv.h (struct extension_language_ops)
4212 <apply_frame_filter>: Change type of "flags".
4213
6893c19a
TT
42142018-02-26 Tom Tromey <tom@tromey.com>
4215
4216 PR python/16497:
4217 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
4218 off-by-one in py_end computation.
4219 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
4220 PRINT_MORE_FRAMES.
4221 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
4222 constant.
4223
2ddeaf8a
TT
42242018-02-26 Tom Tromey <tom@tromey.com>
4225
4226 * dwarf2read.c (struct variant_field): New.
4227 (struct nextfield) <variant>: New field.
4228 (dwarf2_add_field): Handle DW_TAG_variant_part.
4229 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
4230 discriminated union.
4231 (read_structure_type): Handle DW_TAG_variant_part.
4232 (handle_struct_member_die): New function, extracted from
4233 process_structure_scope. Handle DW_TAG_variant.
4234 (process_structure_scope): Handle discriminated unions. Call
4235 handle_struct_member_die.
4236
c9317f21
TT
42372018-02-26 Tom Tromey <tom@tromey.com>
4238
4239 * rust-lang.h (rust_last_path_segment): Declare.
4240 * rust-lang.c (rust_last_path_segment): Now public. Change
4241 contract.
4242 (struct disr_info): Remove.
4243 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
4244 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
4245 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
4246 (rust_enum_p, rust_enum_variant): New function.
4247 (rust_underscore_fields): Remove "offset" parameter.
4248 (rust_print_enum): New function.
4249 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
4250 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
4251 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
4252 enums.
4253 (rust_internal_print_type): New function, from rust_print_type.
4254 Remove enum code.
4255 (rust_print_type): Call rust_internal_print_type.
4256 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
4257 Update enum handling.
4258 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
4259 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
4260 (rust_union_quirks): New functions.
4261 (process_full_comp_unit, process_full_type_unit): Call
4262 rust_union_quirks.
4263 (process_structure_scope): Update rust_unions if necessary.
4264
7c22600a
TT
42652018-02-26 Tom Tromey <tom@tromey.com>
4266
4267 * value.h (value_union_variant): Declare.
4268 * valops.c (value_union_variant): New function.
4269 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
4270 (struct discriminant_info): New.
4271 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
4272 enumerator.
4273 (struct main_type) <flag_discriminated_union>: New field.
4274
15ce8941
TT
42752018-02-26 Tom Tromey <tom@tromey.com>
4276
4277 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4278 unittests/unpack-selftests.c.
4279 * unittests/unpack-selftests.c: New file.
4280 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
4281
48fbe735
YQ
42822018-02-26 Yao Qi <yao.qi@linaro.org>
4283
4284 * dwarf2read.c (struct partial_die_info) <read>: New method.
4285 (read_partial_die): Remove the declaration.
4286 (load_partial_dies): Update.
4287 (partial_die_info::partial_die_info):
4288 (read_partial_die): Change it to partial_die_info::read.
4289
52356b79
YQ
42902018-02-26 Yao Qi <yao.qi@linaro.org>
4291
4292 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
4293 (fixup_partial_die): Remove declaration.
4294 (scan_partial_symbols): Update.
4295 (partial_die_parent_scope): Likewise.
4296 (partial_die_full_name): Likewise.
4297 (fixup_partial_die): Change it to partial_die_info::fixup.
4298
35cc7ed7
YQ
42992018-02-26 Yao Qi <yao.qi@linaro.org>
4300
4301 * dwarf2read.c (read_partial_die): Update the declaration.
4302 (load_partial_dies): Caller update.
4303 (read_partial_die): Remove one argument abbrev_len.
4304
6f06d47b
YQ
43052018-02-26 Yao Qi <yao.qi@linaro.org>
4306
4307 * dwarf2read.c (struct partial_die_info): Add ctor, delete
4308 assignment operator.
4309 (load_partial_dies): Use ctor and copy ctor.
4310 (read_partial_die): Update.
4311 (dwarf2_cu::find_partial_die): Use ctor.
4312
d590ff25
YQ
43132018-02-26 Yao Qi <yao.qi@linaro.org>
4314
4315 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
4316 (find_partial_die_in_comp_unit): Change it to
4317 dwarf2_cu::find_partial_die.
4318 (find_partial_die): Update.
4319
fd0a254f
YQ
43202018-02-26 Yao Qi <yao.qi@linaro.org>
4321
4322 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
4323 is NULL.
4324
cd9983dd
YQ
43252018-02-26 Yao Qi <yao.qi@linaro.org>
4326
4327 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
4328
f46cd62a
AH
43292018-02-26 Alan Hayward <alan.hayward@arm.com>
4330
4331 * arch/amd64.h: Use common/tdesc.h.
4332 * arch/i386.c: Likewise.
4333 * arch/i386.h: Likewise.
4334 * arch/tic6x.c: Likewise.
4335 * arch/tdesc.h: Move file from here...
4336 * common/tdesc.h: ...to here.
4337 * features/aarch64-core.c: Regenerate.
4338 * features/aarch64-fpu.c: Regenerate.
4339 * features/i386/32bit-avx.c: Regenerate.
4340 * features/i386/32bit-avx512.c: Regenerate.
4341 * features/i386/32bit-core.c: Regenerate.
4342 * features/i386/32bit-linux.c: Regenerate.
4343 * features/i386/32bit-mpx.c: Regenerate.
4344 * features/i386/32bit-pkeys.c: Regenerate.
4345 * features/i386/32bit-sse.c: Regenerate.
4346 * features/i386/64bit-avx.c: Regenerate.
4347 * features/i386/64bit-avx512.c: Regenerate.
4348 * features/i386/64bit-core.c: Regenerate.
4349 * features/i386/64bit-linux.c: Regenerate.
4350 * features/i386/64bit-mpx.c: Regenerate.
4351 * features/i386/64bit-pkeys.c: Regenerate.
4352 * features/i386/64bit-segments.c: Regenerate.
4353 * features/i386/64bit-sse.c: Regenerate.
4354 * features/i386/x32-core.c: Regenerate.
4355 * features/tic6x-c6xp.c: Regenerate.
4356 * features/tic6x-core.c: Regenerate.
4357 * features/tic6x-gp.c: Regenerate.
4358 * target-descriptions.c: Use common/tdesc.h.
4359 * target-descriptions.h: Likewise.
4360
9b292f68
TT
43612018-02-24 Tom Tromey <tom@tromey.com>
4362
4363 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
4364 (try_thread_db_load_from_dir, thread_db_load_search): Use
4365 std::string.
4366 (info_auto_load_libthread_db_compare): Return bool. Change
4367 argument types.
4368 (info_auto_load_libthread_db): Use std::vector, std::string.
4369 Remove cleanups.
4370
281d762b
TT
43712018-02-24 Tom Tromey <tom@tromey.com>
4372
4373 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
4374 std::string.
4375 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
4376 std::string*.
4377 * gdbarch.c: Rebuild.
4378 * gdbarch.h: Rebuild.
4379 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
4380 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
4381 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
4382 std::string*.
4383
9d8780f0
SM
43842018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
4385
4386 * gdbtypes.h (sect_offset): Change type to uint64_t.
4387 (sect_offset_str): New function.
4388 * dwarf2read.c (create_addrmap_from_aranges): Use
4389 sect_offset_str.
4390 (error_check_comp_unit_head): Likewise.
4391 (create_debug_type_hash_table): Likewise.
4392 (read_cutu_die_from_dwo): Likewise.
4393 (init_cutu_and_read_dies): Likewise.
4394 (init_cutu_and_read_dies_no_follow): Likewise.
4395 (process_psymtab_comp_unit_reader): Likewise.
4396 (partial_die_parent_scope): Likewise.
4397 (peek_die_abbrev): Likewise.
4398 (process_queue): Likewise.
4399 (dwarf2_physname): Likewise.
4400 (read_namespace_alias): Likewise.
4401 (read_import_statement): Likewise.
4402 (create_dwo_cu_reader): Likewise.
4403 (create_cus_hash_table): Likewise.
4404 (lookup_dwo_cutu): Likewise.
4405 (inherit_abstract_dies): Likewise.
4406 (read_func_scope): Likewise.
4407 (read_call_site_scope): Likewise.
4408 (dwarf2_add_member_fn): Likewise.
4409 (read_common_block): Likewise.
4410 (read_module_type): Likewise.
4411 (read_typedef): Likewise.
4412 (read_subrange_type): Likewise.
4413 (load_partial_dies): Likewise.
4414 (read_partial_die): Likewise.
4415 (find_partial_die): Likewise.
4416 (read_str_index): Likewise.
4417 (dwarf2_string_attr): Likewise.
4418 (build_error_marker_type): Likewise.
4419 (lookup_die_type): Likewise.
4420 (dump_die_shallow): Likewise.
4421 (follow_die_ref): Likewise.
4422 (dwarf2_fetch_die_loc_sect_off): Likewise.
4423 (dwarf2_fetch_constant_bytes): Likewise.
4424 (follow_die_sig): Likewise.
4425 (get_signatured_type): Likewise.
4426 (get_DW_AT_signature_type): Likewise.
4427 (dwarf2_find_containing_comp_unit): Likewise.
4428 (set_die_type): Likewise.
4429
8ec57239
JB
44302018-02-21 John Baldwin <jhb@FreeBSD.org>
4431
4432 * arch/aarch64.c: Include "common-defs.h".
4433 * arch/amd64.c: Likewise.
4434 * arch/i386.c: Likewise.
4435
3eac2b65
TT
44362018-02-21 Tom Tromey <tom@tromey.com>
4437
4438 * value.h: (extract_field_op): Update.
4439 * eval.c (extract_field_op): Return a const char *.
4440 * expression.h (parse_expression_for_completion): Update.
4441 * completer.c (complete_expression): Update.
4442 (add_struct_fields): Make fieldname const.
4443 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
4444 (mark_completion_tag, parse_exp_in_context_1): Update.
4445 (parse_expression_for_completion): Change "name" to
4446 unique_xmalloc_ptr*.
4447
6ccb583f
TT
44482018-02-21 Tom Tromey <tom@tromey.com>
4449
4450 * infcall.c (call_function_by_hand_dummy): Use std::vector.
4451
c113ed0c
YQ
44522018-02-21 Yao Qi <yao.qi@linaro.org>
4453
4454 * avr-tdep.c (avr_read_pc): Change parameter type to
4455 readable_regcache.
4456 * gdbarch.sh (read_pc): Likewise.
4457 * gdbarch.c: Re-generated.
4458 * gdbarch.h: Re-generated.
4459 * hppa-tdep.c (hppa_read_pc): Change parameter type to
4460 readable_regcache.
4461 * ia64-tdep.c (ia64_read_pc): Likewise.
4462 * mips-tdep.c (mips_read_pc): Likewise.
4463 * spu-tdep.c (spu_read_pc): Likewise.
4464
4c74fe6b
YQ
44652018-02-21 Yao Qi <yao.qi@linaro.org>
4466
4467 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
4468 * regcache-dump.c: New file.
4469 * regcache.c: Move register_dump to regcache-dump.c.
4470 (maintenance_print_registers): Likewise.
4471 (maintenance_print_raw_registers): Likewise.
4472 (maintenance_print_cooked_registers): Likewise.
4473 (maintenance_print_register_groups): Likewise.
4474 (maintenance_print_remote_registers): Likewise.
4475 (_initialize_regcache): Likewise.
4476 * regcache.h (register_dump): Moved from regcache.c.
4477
796bb026
YQ
44782018-02-21 Yao Qi <yao.qi@linaro.org>
4479
4480 * regcache.c (regcache::regcache): Update.
4481 (regcache::invalidate): Move it to detached_regcache::invalidate.
4482 (get_thread_arch_aspace_regcache): Update.
4483 (regcache::raw_update): Update.
4484 (regcache::cooked_read): Remove some code.
4485 (regcache::cooked_read_value): Likewise.
4486 (regcache::raw_write): Remove assert on m_readonly_p.
4487 (regcache::raw_supply_integer): Move it to
4488 detached_regcache::raw_supply_integer.
4489 (regcache::raw_supply_zeroed): Likewise.
4490 * regcache.h (detached_regcache) <raw_supply_integer>: New
4491 declaration.
4492 <raw_supply_zeroed, invalidate>: Likewise.
4493 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
4494 <invalidate>: Likewise.
4495 <m_readonly_p>: Removed.
4496
215c69dc
YQ
44972018-02-21 Yao Qi <yao.qi@linaro.org>
4498
4499 * infcmd.c (get_return_value): Let stop_regs point to
4500 get_current_regcache.
4501 * regcache.c (regcache::regcache): Remove.
4502 (register_dump_reg_buffer): New class.
4503 (regcache_print): Adjust.
4504 * regcache.h (regcache): Remove constructors.
4505
f3384e66
YQ
45062018-02-21 Yao Qi <yao.qi@linaro.org>
4507
4508 * regcache.c (class register_dump): New class.
4509 (register_dump_regcache, register_dump_none): New class.
4510 (register_dump_remote, register_dump_groups): New class.
4511 (regcache_print): Update.
4512 * regcache.h (regcache_dump_what): Move it to regcache.c.
4513 (regcache) <dump>: Remove.
4514
c8ec2f33
YQ
45152018-02-21 Yao Qi <yao.qi@linaro.org>
4516
4517 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
4518 reg_buffer_rw *.
4519 (jit_unwind_reg_set_impl): Call raw_supply.
4520 (jit_frame_sniffer): Use reg_buffer_rw.
4521 * record-full.c (record_full_core_regbuf): Change its type.
4522 (record_full_core_open_1): Use reg_buffer_rw.
4523 (record_full_close): Likewise.
4524 (record_full_core_fetch_registers): Use regcache->raw_supply.
4525 (record_full_core_store_registers): Likewise.
4526 * regcache.c (regcache::get_register_status): Move it to
4527 reg_buffer.
4528 (regcache_raw_set_cached_value): Remove.
4529 (regcache::raw_set_cached_value): Remove.
4530 (regcache::raw_write): Call raw_supply.
4531 (regcache::raw_supply): Move it to reg_buffer_rw.
4532 * regcache.h (regcache_raw_set_cached_value): Remove.
4533 (reg_buffer_rw): New class.
4534
daf6667d
YQ
45352018-02-21 Yao Qi <yao.qi@linaro.org>
4536
4537 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
4538 readonly_detached_regcache.
4539 (dummy_frame_prev_register): Use regcache->cooked_read.
4540 * frame.c (frame_save_as_regcache): Change return type.
4541 (frame_pop): Update.
4542 * frame.h (frame_save_as_regcache): Update declaration.
4543 * inferior.h (get_infcall_suspend_state_regcache): Update
4544 declaration.
4545 * infrun.c (infcall_suspend_state) <registers>: use
4546 readonly_detached_regcache.
4547 (save_infcall_suspend_state): Don't use regcache_dup.
4548 (get_infcall_suspend_state_regcache): Change return type.
4549 * linux-fork.c (struct fork_info) <savedregs>: Change to
4550 readonly_detached_regcache.
4551 <pc>: New field.
4552 (fork_save_infrun_state): Don't use regcache_dup.
4553 (info_checkpoints_command): Adjust.
4554 * mi/mi-main.c (register_changed_p): Update declaration.
4555 (mi_cmd_data_list_changed_registers): Use
4556 readonly_detached_regcache.
4557 (register_changed_p): Change parameter type to
4558 readonly_detached_regcache.
4559 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
4560 readonly_detached_regcache.
4561 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
4562 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
4563 New.
4564 (regcache::save): Move it to reg_buffer.
4565 (regcache::restore): Change parameter type.
4566 (regcache_dup): Remove.
4567 * regcache.h (reg_buffer) <save>: New method.
4568 (readonly_detached_regcache): New class.
4569 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
4570 readonly_detached_regcache.
4571 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
4572
fc5b8736
YQ
45732018-02-21 Yao Qi <yao.qi@linaro.org>
4574
4575 * frame.c (frame_save_as_regcache): Use regcache method save.
4576 (frame_pop): Use regcache method restore.
4577 * infrun.c (restore_infcall_suspend_state): Likewise.
4578 * linux-fork.c (fork_load_infrun_state): Likewise.
4579 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
4580 save.
4581 * regcache.c (regcache_save): Remove.
4582 (regcache::restore): More asserts.
4583 (regcache_cpy): Remove.
4584 * regcache.h (regcache_save): Remove the declaration.
4585 (regcache::restore): Move from private to public.
4586 Remove the friend declaration of regcache_cpy.
4587 (regcache_cpy): Remove declaration.
4588
849d0ba8
YQ
45892018-02-21 Yao Qi <yao.qi@linaro.org>
4590
4591 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
4592 parameter type to 'readable_regcache *'.
4593 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
4594 * arm-tdep.c (arm_neon_quad_read): Likewise.
4595 (arm_pseudo_read): Likewise.
4596 * avr-tdep.c (avr_pseudo_register_read): Likewise.
4597 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
4598 * frv-tdep.c (frv_pseudo_register_read): Likewise.
4599 * gdbarch.c: Re-generated.
4600 * gdbarch.h: Re-generated.
4601 * gdbarch.sh (pseudo_register_read): Change parameter type to
4602 'readable_regcache *'.
4603 (pseudo_register_read_value): Likewise.
4604 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
4605 (h8300_pseudo_register_read): Likewise.
4606 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
4607 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
4608 (i386_pseudo_register_read_into_value): Likewise.
4609 (i386_pseudo_register_read_value): Likewise.
4610 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
4611 declaration.
4612 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
4613 * m32c-tdep.c (m32c_raw_read): Likewise.
4614 (m32c_read_flg): Likewise.
4615 (m32c_banked_register): Likewise.
4616 (m32c_banked_read): Likewise.
4617 (m32c_sb_read): Likewise.
4618 (m32c_part_read): Likewise.
4619 (m32c_cat_read): Likewise.
4620 (m32c_r3r2r1r0_read): Likewise.
4621 (m32c_pseudo_register_read): Likewise.
4622 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
4623 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
4624 (mep_pseudo_cr64_read): Likewise.
4625 (mep_pseudo_register_read): Likewise.
4626 * mips-tdep.c (mips_pseudo_register_read): Likewise.
4627 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
4628 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
4629 * regcache.c (regcache::raw_read): Move it to readable_regcache.
4630 (regcache::cooked_read): Likewise.
4631 (regcache::cooked_read_value): Likewise.
4632 (regcache_cooked_read_signed):
4633 (regcache::cooked_read): Likewise.
4634 * regcache.h (readable_regcache): New class.
4635 (regcache): Inherit readable_regcache. Move some methods to
4636 readable_regcache.
4637 * rl78-tdep.c (rl78_pseudo_register_read): Change
4638 parameter type to 'readable_regcache *'.
4639 * rs6000-tdep.c (do_regcache_raw_read): Remove.
4640 (e500_pseudo_register_read): Change parameter type to
4641 'readable_regcache *'.
4642 (dfp_pseudo_register_read): Likewise.
4643 (vsx_pseudo_register_read): Likewise.
4644 (efpr_pseudo_register_read): Likewise.
4645 * s390-tdep.c (s390_pseudo_register_read): Likewise.
4646 * sh-tdep.c (sh_pseudo_register_read): Likewise.
4647 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
4648 (sh64_pseudo_register_read): Likewise.
4649 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
4650 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
4651 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
4652 (spu_pseudo_register_read): Likewise.
4653 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
4654 (xtensa_pseudo_register_read): Likewise.
4655
31716595
YQ
46562018-02-21 Yao Qi <yao.qi@linaro.org>
4657
4658 * regcache.c (regcache::regcache): Call reg_buffer ctor.
4659 (regcache::arch): Move it to reg_buffer::arch.
4660 (regcache::register_buffer): Likewise.
4661 (regcache::assert_regnum): Likewise.
4662 (regcache::num_raw_registers): Likewise.
4663 * regcache.h (reg_buffer): New class.
4664 (regcache): Inherit reg_buffer.
4665
7104e59b
SM
46662018-02-20 Simon Marchi <simon.marchi@ericsson.com>
4667
4668 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
4669 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
4670
2d8adcbd
MM
46712018-02-20 Markus Metzger <markus.t.metzger@intel.com>
4672
4673 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
4674
b5884fa7
AH
46752018-02-19 Alan Hayward <alan.hayward@arm.com>
4676
4677 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
4678 (SFILES): Remove common/*.c files.
4679 (COMMON_OBS): Remove some *.o files built from common/*.c files.
4680 * common/common.host: Add common reference.
4681 * configure.ac: Likewise.
4682 * configure: Regenerate.
4683
fd90ace4
YQ
46842018-02-16 Yao Qi <yao.qi@linaro.org>
4685
4686 * block.c (block_namespace_info): Inherit allocate_on_obstack.
4687 (block_initialize_namespace): Use new.
4688 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
4689 (dwarf2_free_objfile): Use delete.
4690 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
4691 (copy_type_recursive): Use new.
4692 * gdb_obstack.h (allocate_on_obstack): New.
4693
85046ae2
YQ
46942018-02-15 Yao Qi <yao.qi@linaro.org>
4695
4696 PR gdb/22849
4697 * inferior.c (exit_inferior_1): Reset inf->control.
4698
355c559b
JB
46992018-02-15 Joel Brobecker <brobecker@adacore.com>
4700
4701 * ada-lang.c (ada_to_fixed_value_create): Delete advance
4702 declaration.
4703
980548fd
PA
47042018-02-14 Pedro Alves <palves@redhat.com>
4705
4706 * frame-unwind.c (frame_unwind_try_unwinder): Always call
4707 frame_cleanup_after_sniffer on exception.
4708
692d6f97
TT
47092018-02-14 Tom Tromey <tom@tromey.com>
4710
4711 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
4712 const.
4713 (solib_bfd_open): Make pathname const.
4714 * solib.c (solib_bfd_open): Make pathname const.
4715 * solib-spu.c (spu_bfd_fopen): Make name const.
4716 (spu_bfd_open): Make pathname const.
4717 * solib-darwin.c (darwin_bfd_open): Make pathname const.
4718 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
4719
e0cc99a6
TT
47202018-02-14 Tom Tromey <tom@tromey.com>
4721
4722 * symfile.c (symfile_bfd_open): Update.
4723 * source.h (openp, source_full_path_of, find_and_open_source):
4724 Change argument type to unique_xmalloc_ptr.
4725 * source.c (openp): Take a unique_xmalloc_ptr.
4726 (source_full_path_of, find_and_open_source): Likewise.
4727 (open_source_file, symtab_to_fullname): Update.
4728 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
4729 unique_xmalloc_ptr.
4730 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
4731 (exec_file_find): Update.
4732 * psymtab.c (psymtab_to_fullname): Update.
4733 * nto-tdep.h (nto_find_and_open_solib): Update.
4734 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
4735 unique_xmalloc_ptr.
4736 * exec.c (exec_file_attach): Update.
4737 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
4738 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
4739
b46a8d7c
TT
47402018-02-14 Tom Tromey <tom@tromey.com>
4741
4742 * solib.c: Include source.h.
4743 * nto-tdep.c: Include source.h.
4744 * mi/mi-cmd-env.c: Include source.h.
4745 * infcmd.c: Include source.h.
4746 * exec.c: Include source.h.
4747 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
4748 (add_path, directory_switch, source_path, init_source_path): Move
4749 declarations...
4750 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
4751 (add_path, directory_switch, source_path, init_source_path):
4752 ...here.
4753
797bc1cb
TT
47542018-02-14 Tom Tromey <tom@tromey.com>
4755
4756 * solist.h (exec_file_find, solib_find): Return
4757 unique_xmalloc_ptr.
4758 (solib_bfd_fopen): Take a const char *.
4759 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
4760 (exec_file_find, solib_find): Likewise.
4761 (solib_bfd_fopen): Do not take ownership of "pathname".
4762 (solib_bfd_open): Use unique_xmalloc_ptr.
4763 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
4764 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
4765 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
4766 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
4767
f98b2e33
JB
47682018-02-14 Joel Brobecker <brobecker@adacore.com>
4769
4770 * ada-lang.c (name_match_type_from_name): Remove reference to
4771 ada_name_for_lookup in function's documentation.
4772 * ada-lang.h (ada_name_for_lookup): Delete declaration.
4773
24b9144d
SM
47742018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
4775
4776 * defs.h (enum openp_flags): New enum.
4777 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
4778 Move to enum openp_flags.
4779 (openp_flags): New enum flags.
4780 (openp): Change parameter type to openp_flags.
4781 * source.c (openp): Change parameter type to openp_flags.
4782 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
4783 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
4784
387cd15b
SM
47852018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
4786
4787 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
4788 per-command.
4789
b303c6f6
AB
47902018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
4791
4792 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
4793 into...
4794 (class dwarf2_queue_guard): ...the destructor of this new class.
4795 (dw2_do_instantiate_symtab): Create instance of the new class
4796 dwarf2_queue_guard, remove cleanup.
4797
9c3630e9
TT
47982018-02-09 Tom Tromey <tom@tromey.com>
4799
4800 * source.c (find_source_lines): Don't reference past the end of
4801 the vector.
4802
c4e12631
MM
48032018-02-09 Markus Metzger <markus.t.metzger@intel.com>
4804
4805 * remote.c (remote_btrace_maybe_reopen): Change error message.
4806 * btrace.c (btrace_enable): Likewise.
4807 (parse_xml_btrace): Likewise.
4808 (parse_xml_btrace_conf): Likewise.
4809
88711fbf
MM
48102018-02-09 Markus Metzger <markus.t.metzger@intel.com>
4811
4812 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
4813 (linux_enable_pt, linux_enable_bts): Call
4814 diagnose_perf_event_open_fail.
4815
17ad2a4f
MM
48162018-02-09 Markus Metzger <markus.t.metzger@intel.com>
4817
4818 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
4819 Remove parameter and change return type. Update callers. Move it.
4820 (linux_enable_bts, linux_enable_pt): Improve error message.
4821 (linux_enable_pt): Remove zero buffer size check.
4822 (linux_enable_btrace): Improve error messages. Remove NULL return
4823 check.
4824
de6242d3
MM
48252018-02-09 Markus Metzger <markus.t.metzger@intel.com>
4826
4827 * btrace.c (btrace_enable): Remove target_supports_btrace call.
4828 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
4829 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
4830 (linux_supports_pt, linux_supports_btrace): Remove.
4831 (linux_enable_bts): Call cpu_supports_bts.
4832 * nat/linux-btrace.h (linux_supports_btrace): Remove.
4833 * remote.c (remote_supports_btrace): Remove.
4834 (init_remote_ops): Remove remote_supports_btrace.
4835 * target-delegates.c: Regenerated.
4836 * target.c (target_supports_btrace): Remove.
4837 * target.h (target_ops) <to_supports_btrace>: Remove
4838 (target_supports_btrace): Remove.
4839 * x86-linux-nat.c (x86_linux_create_target): Remove
4840 linux_supports_btrace.
4841
9ee23a85
MM
48422018-02-09 Markus Metzger <markus.t.metzger@intel.com>
4843
4844 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
4845 btrace failed.
4846 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
4847 exception and use message in own exception.
4848
5c3284c1
MM
48492018-02-09 Markus Metzger <markus.t.metzger@intel.com>
4850
4851 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
4852 (perf_event_pt_event_type): Use gdb_file_up.
4853 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
4854 scoped_fd, and scoped_mmap.
4855
84696f37
MM
48562018-02-09 Markus Metzger <markus.t.metzger@intel.com>
4857
4858 * common/scoped_mmap.h: New.
4859 * unittests/scoped_mmap-selftest.c: New.
4860 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4861 unittests/scoped_mmap-selftest.c.
4862
ea4a0888
MM
48632018-02-09 Markus Metzger <markus.t.metzger@intel.com>
4864
4865 * common/scoped_fd.h: New.
4866 * unittests/scoped_fd-selftest.c: New.
4867 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4868 unittests/scoped_fd-selftest.c.
4869
869e8290
TT
48702018-02-09 Tom Tromey <tom@tromey.com>
4871
4872 * auto-load.c (auto_load_section_scripts): Use
4873 gdb::unique_xmalloc_ptr.
4874
a37a2ae7
TT
48752018-02-09 Tom Tromey <tom@tromey.com>
4876
4877 * auto-load.c (execute_script_contents): Use std::string.
4878
4e725347
JB
48792018-02-09 Joel Brobecker <brobecker@adacore.com>
4880
4881 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
4882 Python function, rather than a new command.
4883
9a897d43
TT
48842018-02-08 Tom Tromey <tom@tromey.com>
4885
4886 * solib.c (solib_find_1): Use std::string.
4887 (solib_bfd_fopen): Use unique_xmalloc_ptr.
4888
58ef3771
TT
48892018-02-08 Tom Tromey <tom@tromey.com>
4890
4891 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
4892
a9abc434
TT
48932018-02-08 Tom Tromey <tom@tromey.com>
4894
4895 * source.c (find_source_lines): Use gdb::def_vector.
4896
84f27c6f
TT
48972018-02-08 Tom Tromey <tom@tromey.com>
4898
4899 * macrocmd.c (struct temporary_macro_definition): New.
4900 (macro_define_command): Use temporary_macro_definition. Remove
4901 cleanups.
4902 (free_macro_definition_ptr): Remove.
4903
0354904b
TT
49042018-02-08 Tom Tromey <tom@tromey.com>
4905
4906 * macroexp.c (maybe_expand): Use std::string.
4907
1739cf24
TT
49082018-02-08 Tom Tromey <tom@tromey.com>
4909
4910 * macroexp.c (struct macro_buffer): Add initializers for some
4911 members.
4912 (init_buffer, init_shared_buffer, free_buffer)
4913 (free_buffer_return_text): Remove.
4914 (macro_buffer): New constructors.
4915 (~macro_buffer): New destructor.
4916 (macro_buffer::set_shared): New method.
4917 (macro_buffer::resize_buffer, macro_buffer::appendc)
4918 (macro_buffer::appendmem): Now methods, not free functions.
4919 (set_token, append_tokens_without_splicing, stringify)
4920 (macro_stringify): Update.
4921 (gather_arguments): Change return type. Remove argc_p argument,
4922 add args_ptr argument. Use std::vector.
4923 (substitute_args): Remove argc argument. Accept std::vector.
4924 (expand): Update. Use std::vector.
4925 (scan, macro_expand, macro_expand_next): Update.
4926
f6c2623e
TT
49272018-02-08 Tom Tromey <tom@tromey.com>
4928
4929 * symtab.c (default_collect_symbol_completion_matches_break_on):
4930 Use unique_xmalloc_ptr.
4931 * macroscope.h: (sal_macro_scope, user_macro_scope)
4932 (default_macro_scope): Return unique_xmalloc_ptr.
4933 * macroscope.c (sal_macro_scope, user_macro_scope)
4934 (default_macro_scope): Return unique_xmalloc_ptr.
4935 * macroexp.h (macro_expand, macro_expand_once): Return
4936 unique_xmalloc_ptr.
4937 * macroexp.c (macro_expand, macro_expand_once): Return
4938 unique_xmalloc_ptr.
4939 * macrocmd.c (macro_expand_command, macro_expand_once_command)
4940 (info_macro_command, info_macros_command): Use
4941 unique_xmalloc_ptr.
4942 * compile/compile-c-support.c (write_macro_definitions): Use
4943 unique_xmalloc_ptr.
4944 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
4945
c2e0e465
SM
49462018-02-07 Simon Marchi <simon.marchi@ericsson.com>
4947
4948 * value.c (value_static_field): Assign field type instead of
4949 containing type when returning an optimized out value.
4950
3f8c94b4
YQ
49512018-02-06 Yao Qi <yao.qi@linaro.org>
4952
4953 * ft32-tdep.c (ft32_read_pc): Remove.
4954 (ft32_write_pc): Remove.
4955 (ft32_gdbarch_init): Update.
4956 * m32r-tdep.c (m32r_read_pc): Remove.
4957 (m32r_gdbarch_init): Update.
4958 * mep-tdep.c (mep_read_pc): Remove.
4959 (mep_gdbarch_init): Update.
4960 * microblaze-tdep.c (microblaze_write_pc): Remove.
4961 (microblaze_gdbarch_init): Update.
4962 * mn10300-tdep.c (mn10300_read_pc): Remove.
4963 (mn10300_write_pc): Remove.
4964 (mn10300_gdbarch_init): Update.
4965 * moxie-tdep.c (moxie_read_pc): Remove.
4966 (moxie_write_pc): Remove.
4967 (moxie_gdbarch_init): Update.
4968
bca65a23
YQ
49692018-02-06 Yao Qi <yao.qi@linaro.org>
4970
4971 * expprint.c (print_subexp_standard): Handle
4972 OP_F77_UNDETERMINED_ARGLIST.
4973 (dump_subexp_body_standard): Likewise.
4974
583e3f90 49752018-02-05 Alan Hayward <alan.hayward@arm.com>
b8df6ca7 4976
583e3f90
YQ
4977 * target-descriptions.c (tdesc_element_visitor) Add empty
4978 implementations.
b8df6ca7
AH
4979 (tdesc_type): Move make_gdb_type from here.
4980 (tdesc_type_builtin): Likewise.
4981 (tdesc_type_vector): Likewise.
4982 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
4983 (make_gdb_type_struct): Move from tdesc_type_with_fields.
4984 (make_gdb_type_union): Likewise.
4985 (make_gdb_type_flags): Likewise.
4986 (make_gdb_type_enum): Likewise.
4987 (make_gdb_type): New function.
4988 (tdesc_register_type): Use static make_gdb_type.
4989
e813d34a
RK
49902018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
4991
4992 * infcmd.c (default_print_one_register_info): Align natural-format
4993 column values consistently one under another.
4994 (pad_to_column): New function.
4995
0eb876f5
JB
49962018-02-05 Joel Brobecker <brobecker@adacore.com>
4997
4998 * dwarf2read.c (dwarf2_physname): Move commment.
4999
0625771b
LS
50002018-02-01 Leszek Swirski <leszeks@google.com>
5001
5002 * varobj.c (varobj_formatted_print_options): Allow recursive
5003 pretty printing if pretty printing is enabled.
5004
59498c30
LS
50052018-02-01 Leszek Swirski <leszeks@google.com>
5006
5007 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
5008 names after a structop as a filename.
5009
2d9e6acb
YQ
50102018-02-01 Yao Qi <yao.qi@linaro.org>
5011
5012 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
5013 (arm_record_coproc_data_proc): Likewise.
5014
df95a9cf
YQ
50152018-02-01 Yao Qi <yao.qi@linaro.org>
5016
5017 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
5018
07e5f5cf
NP
50192018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
5020
5021 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
5022 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
5023
3045b475
PA
50242018-01-31 Pedro Alves <palves@redhat.com>
5025
5026 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
5027 * inflow.c (child_terminal_save_inferior): Wrap reference to
5028 tcgetpgrp in HAVE_TERMIOS_H.
5029 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
5030 _WIN32.
5031 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
5032 always iterate over all inferiors.
5033 (gdbsim_cntrl_c): Adjust.
5034 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
5035
929b5ad4
JB
50362018-01-31 Joel Brobecker <brobecker@adacore.com>
5037
5038 * gdbtypes.c (lookup_array_range_type): Make sure the array's
5039 index type is objfile-owned if the element type is as well.
5040
29236ca2
JB
50412018-01-31 Joel Brobecker <brobecker@adacore.com>
5042
5043 GDB 8.1 released.
5044
c81e8879
PR
50452018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
5046
5047 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
5048 "features/s390x-linux64.c".
5049 (_initialize_s390_linux_tdep): Remove initialization of tdescs
5050 s390_linux32 and s390x_linux64.
5051 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
5052 default tdesc.
5053 * s390-tdep.c: Include "features/s390-linux32.c" and
5054 "features/s390x-linux64.c".
5055 (s390_tdesc_valid): Add check for tdesc_has_registers.
5056 (s390_gdbarch_init): Make sure there is always a valid tdesc.
5057 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
5058 tdesc_s390x_linux64.
5059 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
5060 tdesc_s390x_linux64 to...
5061 * s390-tdep.h: ...here.
5062
e671cd59
PA
50632018-01-30 Pedro Alves <palves@redhat.com>
5064
5065 PR gdb/13211
5066 * config.in, configure: Regenerate.
5067 * configure.ac: Check for getpgid.
5068 * go32-nat.c (go32_pass_ctrlc): New.
5069 (go32_target): Install it.
5070 * inf-child.c (inf_child_target): Install
5071 child_terminal_save_inferior, child_pass_ctrlc and
5072 child_interrupt.
5073 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
5074 (inf_ptrace_target): No longer install it.
5075 * infcmd.c (interrupt_target_1): Adjust.
5076 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
5077 (child_interrupt): Declare.
5078 (inferior::terminal_state): New.
5079 * inflow.c (struct terminal_info): Update comments.
5080 (inferior_process_group): Delete.
5081 (terminal_is_ours): Delete.
5082 (gdb_tty_state): New.
5083 (child_terminal_init): Adjust.
5084 (is_gdb_terminal, sharing_input_terminal_1)
5085 (sharing_input_terminal): New functions.
5086 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
5087 Set the process's actual process group in the foreground if
5088 possible. Handle is_ours_for_output/is_ours distinction. Don't
5089 mark terminal as the inferior's if not sharing GDB's terminal.
5090 Don't check attach_flag.
5091 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
5092 pass down a target_terminal_state.
5093 (child_terminal_save_inferior): New, factored out from ...
5094 (child_terminal_ours_1): ... this. Handle
5095 target_terminal_state::is_ours_for_output.
5096 (child_interrupt, child_pass_ctrlc): New.
5097 (inflow_inferior_exit): Clear the inferior's terminal_state.
5098 (copy_terminal_info): Copy the inferior's terminal state.
5099 (_initialize_inflow): Remove reference to terminal_is_ours.
5100 * inflow.h (inferior_process_group): Delete.
5101 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
5102 * procfs.c (procfs_target): Don't install procfs_interrupt.
5103 (procfs_interrupt): Delete.
5104 * remote.c (remote_serial_quit_handler): Adjust.
5105 (remote_interrupt): Remove ptid parameter. Adjust.
5106 * target-delegates.c: Regenerate.
5107 * target.c: Include "terminal.h".
5108 (target_terminal::terminal_state): Rename to ...
5109 (target_terminal::m_terminal_state): ... this.
5110 (target_terminal::init): Adjust.
5111 (target_terminal::inferior): Adjust to per-inferior
5112 terminal_state.
5113 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
5114 (target_terminal::ours, target_terminal::ours_for_output): Use
5115 target_terminal_is_ours_kind.
5116 (target_interrupt): Remove ptid parameter. Adjust.
5117 (default_target_pass_ctrlc): Adjust.
5118 * target.h (target_ops::to_terminal_save_inferior): New field.
5119 (target_ops::to_interrupt): Remove ptid_t parameter.
5120 (target_interrupt): Remove ptid_t parameter. Update comment.
5121 (target_pass_ctrlc): Update comment.
5122 * target/target.h (target_terminal_state): New scoped enum,
5123 factored out of ...
5124 (target_terminal::terminal_state): ... here.
5125 (target_terminal::inferior): Update comments.
5126 (target_terminal::restore_inferior): New.
5127 (target_terminal::is_inferior, target_terminal::is_ours)
5128 (target_terminal::is_ours_for_output): Adjust.
5129 (target_terminal::scoped_restore_terminal_state): Adjust to
5130 rename, and call restore_inferior() instead of inferior().
5131 (target_terminal::scoped_restore_terminal_state::m_state): Change
5132 type.
5133 (target_terminal::terminal_state): Rename to ...
5134 (target_terminal::m_terminal_state): ... this and change type.
5135
9c3a5d93
PA
51362018-01-30 Pedro Alves <palves@redhat.com>
5137
5138 * linux-nat.c (wait_for_signal): New function.
5139 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
5140 directly.
5141 (async_terminal_is_ours)
5142 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
5143 (linux_nat_add_target): Don't override
5144 to_terminal_inferior/to_terminal_ours.
5145
69ab5edb
SDJ
51462018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
5147
5148 * remote.c (remote_follow_fork): Don't call "detach_inferior".
5149
fc8e7e75
SM
51502018-01-28 Simon Marchi <simon.marchi@ericsson.com>
5151
5152 * dwarf2read.c (free_dwo_files): Add forward-declaration.
5153 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
5154 dwarf2_per_objfile_free here.
5155 (dwarf2_per_objfile_free): Remove.
5156 (_initialize_dwarf2_read): Don't register
5157 dwarf2_per_objfile_free as a registry cleanup.
5158
b2a426e2
EZ
51592018-01-27 Eli Zaretskii <eliz@gnu.org>
5160
5161 Avoid compilation errors in MinGW native builds
5162
5163 The error is triggered by including python-internal.h, and the
5164 error message is:
5165
5166 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
5167 from build-gnulib/import/math.h:27,
5168 from d:/usr/Python26/include/pyport.h:235,
5169 from d:/usr/Python26/include/Python.h:58,
5170 from python/python-internal.h:94,
5171 from python/py-arch.c:24:
5172 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
5173 using ::hypot;
5174 ^~~~~
5175
5176 This happens because Python headers define 'hypot' to expand t
5177 '_hypot' in the Windows builds.
5178 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
5179 'hypoth'. This avoids a compilation error.
5180
0bdd8eac
AH
51812018-01-26 Alan Hayward <alan.hayward@arm.com>
5182
5183 * MAINTAINERS (Write After Approval): Fix ordering.
5184
56ae9dc3
AH
51852018-01-26 Alan Hayward <alan.hayward@arm.com>
5186
5187 * MAINTAINERS (Write After Approval): Add Alan Hayward.
5188
7433498b
AM
51892018-01-26 Alan Modra <amodra@gmail.com>
5190
5191 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
5192 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
5193 Remove nop. Make const. Comment.
5194 (powerpc32_plt_stub_so_2): New.
5195 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
5196 Correct count. Update uses.
5197 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
5198 Move common code reading PLT entry word. Correct
5199 powerpc32_plt_stub PLT address calculation.
5200 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
5201 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
5202 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
5203 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
5204 (ppc64_standard_linkage8): Likewise.
5205 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
5206 Correct insns description.
5207 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
5208
0f59d5fc
PA
52092018-01-24 Pedro Alves <palves@redhat.com>
5210
5211 GCC PR libstdc++/83906
5212 * gdbtypes.c (operator==(const dynamic_prop &,
5213 const dynamic_prop &)): New.
5214 (operator==(const range_bounds &, const range_bounds &)): New.
5215 (check_types_equal): Use them instead of memcmp.
5216 * gdbtypes.h (operator==(const dynamic_prop &,
5217 const dynamic_prop &)): Declare.
5218 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
5219 (operator==(const range_bounds &, const range_bounds &)): Declare.
5220 (operator!=(const range_bounds &, const range_bounds &)): Declare.
5221
ef8914a4
PR
52222018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5223
5224 * s390-linux-tdep.c (s390_record_address_mask)
5225 (s390_record_calc_disp_common, s390_record_calc_disp)
5226 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
5227 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
5228 (s390_process_record): Move to s390-tdep.c.
5229 (s390_linux_init_abi_any): Adjust.
5230 * s390-tdep.c (s390_record_address_mask)
5231 (s390_record_calc_disp_common, s390_record_calc_disp)
5232 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
5233 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
5234 (s390_process_record): Moved from s390-linux-tdep.c
5235 (s390_gdbarch_init): Adjust.
5236
d6e58945
PR
52372018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5238
5239 * s390-linux-nat.c (s390-tdep.h): New include.
5240 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
5241 (HFILES_NO_SRCDIR): Add s390-tdep.h.
5242 (ALLDEPFILES): Add s390-tdep.c.
5243 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
5244 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
5245 * s390-tdep.h: ...this. New file.
5246 * s390-linux-tdep.c (s390-tdep.h): New include.
5247 (_initialize_s390_tdep): Rename to...
5248 (_initialize_s390_linux_tdep): ...this and adjust.
5249 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
5250 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
5251 s390-tdep.h.
5252 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
5253 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
5254 (s390_is_partial_instruction, s390_software_single_step)
5255 (is_non_branch_ril, s390_displaced_step_copy_insn)
5256 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
5257 (s390_prologue_data, s390_addr, s390_store, s390_load)
5258 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
5259 (s390_register_call_saved, s390_guess_tracepoint_registers)
5260 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
5261 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
5262 (s390_pseudo_register_name, s390_pseudo_register_type)
5263 (s390_pseudo_register_read, s390_pseudo_register_write)
5264 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
5265 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
5266 (s390_addr_bits_remove, s390_address_class_type_flags)
5267 (s390_address_class_type_flags_to_name)
5268 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
5269 (s390_function_arg_float, s390_function_arg_vector)
5270 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
5271 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
5272 (s390_frame_align, s390_register_return_value, s390_return_value)
5273 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
5274 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
5275 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
5276 (s390_trad_frame_prev_register, s390_unwind_cache)
5277 (s390_prologue_frame_unwind_cache)
5278 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
5279 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
5280 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
5281 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
5282 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
5283 (s390_frame_base_address, s390_local_base_address)
5284 (s390_frame_base, s390_gcc_target_options)
5285 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
5286 (s390_validate_reg_range, s390_tdesc_valid)
5287 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
5288 * s390-tdep.c: ...this. New file.
5289
9c0b896e
PR
52902018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5291
5292 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
5293 (s390_process_record, s390_gdbarch_tdep_alloc)
5294 (s390_linux_init_abi_any): Use/set new hook.
5295
7042632b
PR
52962018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5297
5298 * s390-linux-tdep.c (osabi.h): New include.
5299 (s390_linux_init_abi_31, s390_linux_init_abi_64)
5300 (s390_linux_init_abi_any): New functions.
5301 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
5302
650f5e13
PR
53032018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5304
5305 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
5306 tdesc_has_registers check
5307
47c9317e
PR
53082018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5309
5310 * s390-linux-tdep.c (s390_tdesc_valid): New function.
5311 (s390_validate_reg_range): New macro.
5312 (s390_gdbarch_init): Adjust.
5313
095085d8
PR
53142018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5315
5316 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
5317 (s390_gdbarch_tdep_alloc): Adjust.
5318 (s390_gdbarch_init): Adjust.
5319
ab9bcc67
PR
53202018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5321
5322 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
5323 <have_tdb>: Change type to bool.
5324 (s390_gdbarch_tdep_alloc): Adjust.
5325 (s390_gdbarch_init): Adjust.
5326
21f6f5ff
PR
53272018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5328
5329 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
5330 (gdbarch_tdep) <have_upper, have_vx>: New fields.
5331 (s390_gdbarch_tdep_alloc): New function.
5332 (s390_gdbarch_init): Allocate tdep at start and use its fields
5333 instead of separate variables.
5334
0eb97953
PR
53352018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5336
5337 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
5338 when looking for cached gdbarch and add comment for remaining.
5339
5c319bb2
PA
53402018-01-22 Pedro Alves <palves@redhat.com>
5341 Sergio Durigan Junior <sergiodj@redhat.com>
5342
5343 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
5344 case.
5345
d65ce302
MR
53462018-01-22 Maciej W. Rozycki <macro@mips.com>
5347
5348 * MAINTAINERS: Update my company e-mail address.
5349
ec7a5fcb
YQ
53502018-01-22 Yao Qi <yao.qi@linaro.org>
5351
5352 * regcache.c (cooked_write_test): New function.
5353 (_initialize_regcache): Register the test.
5354
11f57cb6
YQ
53552018-01-22 Yao Qi <yao.qi@linaro.org>
5356
5357 * ia64-tdep.c (ia64_pseudo_register_read): Call
5358 regcache->cooked_read instead of regcache_cooked_read_unsigned.
5359 * m32c-tdep.c (m32c_cat_read): Likewise.
5360 (m32c_r3r2r1r0_read): Likewise.
5361 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
5362 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
5363
03f50fc8
YQ
53642018-01-22 Yao Qi <yao.qi@linaro.org>
5365
5366 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
5367 method raw_read instead of regcache_raw_read.
5368 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
5369 * arm-tdep.c (arm_neon_quad_read): Likewise.
5370 * avr-tdep.c (avr_pseudo_register_read): Likewise.
5371 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
5372 * frv-tdep.c (frv_pseudo_register_read): Likewise.
5373 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
5374 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
5375 (i386_pseudo_register_read_into_value): Likewise.
5376 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
5377 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
5378 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
5379 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
5380 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
5381 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
5382 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
5383 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
5384 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
5385
dc711524
YQ
53862018-01-22 Yao Qi <yao.qi@linaro.org>
5387
5388 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
5389 * configure.tgt: Remove target mt.
5390 * mt-tdep.c: Remove.
5391 * regcache.c (cooked_read_test): Remove the check for mt.
5392
3f5a868b
YQ
53932018-01-22 Yao Qi <yao.qi@linaro.org>
5394
5395 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
5396 instead of gdbarch_pseudo_register_read_value.
5397
de4cb04a
JB
53982018-01-22 Joel Brobecker <brobecker@adacore.com>
5399
5400 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
5401 language is Ada.
5402
a9e40818
JB
54032018-01-22 Joel Brobecker <brobecker@adacore.com>
5404
5405 * linespec.c (create_sals_line_offset): Remove code that preserved
5406 the symtab_and_line's line number.
5407
e707fc44
AB
54082018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
5409
5410 * varobj.c (varobj_create): Don't set valid_block when creating a
5411 floating varobj.
5412
03d0bf7b
AB
54132018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
5414
5415 * varobj.c (varobj_create): Remove out of date comment.
5416
ae451627
AB
54172018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
5418
5419 PR mi/20395
5420 * ada-exp.y (write_var_from_sym): Pass extra parameter when
5421 updating innermost block.
5422 * parse.c (innermost_block_tracker::update): Take extra type
5423 parameter, and check types match before updating innermost block.
5424 (write_dollar_variable): Update innermost block for registers.
5425 * parser-defs.h (enum innermost_block_tracker_type): New enum.
5426 (innermost_block_tracker::innermost_block_tracker): Initialise
5427 m_types member.
5428 (innermost_block_tracker::reset): Take type parameter.
5429 (innermost_block_tracker::update): Take type parameter, and pass
5430 type through as needed.
5431 (innermost_block_tracker::m_types): New member.
5432 * varobj.c (varobj_create): Pass type when reseting innermost
5433 block.
5434
aee1fcdf
AB
54352018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
5436
5437 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
5438 * ada-lang.c (resolve_subexp): Likewise.
5439 * breakpoint.c (set_breakpoint_condition) Likewise.
5440 (watch_command_1) Likewise.
5441 * c-exp.y (variable): Likewise.
5442 * d-exp.y (PrimaryExpression): Likewise.
5443 * f-exp.y (variable): Likewise.
5444 * go-exp.y (variable): Likewise.
5445 * m2-exp.y (variable): Likewise.
5446 * objfiles.c (objfile::~objfile): Likewise.
5447 * p-exp.y (variable): Likewise.
5448 * parse.c (innermost_block): Change type.
5449 * parser-defs.h (class innermost_block_tracker): New.
5450 (innermost_block): Change to innermost_block_tracker.
5451 * printcmd.c (display_command): Switch to innermost_block API.
5452 (do_one_display): Likewise.
5453 * rust-exp.y (do_one_display): Likewise.
5454 * symfile.c (clear_symtab_users): Likewise.
5455 * varobj.c (varobj_create): Switch to innermost_block API, replace
5456 use of innermost_block with block stored on varobj object.
5457
396af9a1
AB
54582018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
5459
5460 * expression.h (innermost_block): Remove declaration.
5461 * varobj.c: Add 'parser-defs.h' include.
5462
fcfcc376
TT
54632018-01-19 Tom Tromey <tom@tromey.com>
5464
5465 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
5466 symbols in the static and global blocks.
5467
5a6c3296
JC
54682018-01-19 James Clarke <jrtc27@jrtc27.com>
5469
5470 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
5471 gdb_ptrace.h, and move including gdb_wait.h ...
5472 * nat/linux-ptrace.h: ... to here.
5473
bc09b0c1
SM
54742018-01-19 Simon Marchi <simon.marchi@ericsson.com>
5475
5476 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
5477 inf_ptrace_detach_success.
5478 (inf_ptrace_detach_success): Add inferior parameter, use it
5479 instead of inferior_ptid, pass it to detach_inferior.
5480 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
5481 parameter.
5482 * inferior.c (detach_inferior): Add overload that takes an
5483 inferior object.
5484 * inferior.h (detach_inferior): Likewise.
5485 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
5486 use inferior_ptid, adjust call to inf_ptrace_detach_success.
5487 * linux-thread-db.c (thread_db_detach): Use inf parameter.
5488
6e1e1966
SM
54892018-01-19 Simon Marchi <simon.marchi@ericsson.com>
5490
5491 * target.h (struct target_ops) <to_detach>: Add inferior
5492 parameter.
5493 (target_detach): Likewise.
5494 * target.c (dispose_inferior): Pass inferior down.
5495 (target_detach): Pass inferior down. Assert that it is equal to
5496 the current inferior.
5497 * aix-thread.c (aix_thread_detach): Pass inferior down.
5498 * corefile.c (core_file_command): Pass current_inferior() down.
5499 * corelow.c (core_detach): Add inferior parameter.
5500 * darwin-nat.c (darwin_detach): Likewise.
5501 * gnu-nat.c (gnu_detach): Likewise.
5502 * inf-ptrace.c (inf_ptrace_detach): Likewise.
5503 * infcmd.c (detach_command): Pass current_inferior() down to
5504 target_detach.
5505 * infrun.c (follow_fork_inferior): Pass parent_inf to
5506 target_detach.
5507 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
5508 target_detach.
5509 * linux-nat.c (linux_nat_detach): Add inferior parameter.
5510 * linux-thread-db.c (thread_db_detach): Likewise.
5511 * nto-procfs.c (procfs_detach): Likewise.
5512 * procfs.c (procfs_detach): Likewise.
5513 * record.c (record_detach): Likewise.
5514 * record.h (struct inferior): Forward-declare.
5515 (record_detach): Add inferior parameter.
5516 * remote-sim.c (gdbsim_detach): Likewise.
5517 * remote.c (remote_detach_1): Likewise.
5518 (remote_detach): Likewise.
5519 (extended_remote_detach): Likewise.
5520 * sol-thread.c (sol_thread_detach): Likewise.
5521 * target-debug.h (target_debug_print_inferior_p): New macro.
5522 * target-delegates.c: Re-generate.
5523 * top.c (kill_or_detach): Pass inferior down to target_detach.
5524 * windows-nat.c (windows_detach): Add inferior parameter.
5525
6bd6f3b6
SM
55262018-01-19 Simon Marchi <simon.marchi@ericsson.com>
5527
5528 * target.h (struct target_ops) <to_detach>: Remove args
5529 parameter.
5530 (target_detach): Likewise.
5531 * target.c (dispose_inferior): Adjust.
5532 (target_detach): Remove args parameter, adjust.
5533 * aix-thread.c (aix_thread_detach): Adjust.
5534 * corefile.c (core_file_command): Adjust.
5535 * corelow.c (core_detach): Adjust.
5536 * darwin-nat.c (darwin_detach): Adjust.
5537 * gnu-nat.c (gnu_detach): Adjust.
5538 * inf-ptrace.c (inf_ptrace_detach): Adjust.
5539 * infcmd.c (detach_command): Adjust
5540 * infrun.c (follow_fork_inferior): Adjust.
5541 (handle_vfork_child_exec_or_exit): Adjust.
5542 * linux-fork.c (linux_fork_detach): Remove args parameter.
5543 * linux-fork.h (linux_fork_detach): Likewise.
5544 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
5545 * linux-thread-db.c (thread_db_detach): Likewise.
5546 * nto-procfs.c (procfs_detach): Likewise.
5547 * procfs.c (procfs_detach): Likewise.
5548 (do_detach): Remove signo parameter.
5549 * record.c (record_detach): Remove args parameter.
5550 * record.h (record_detach): Likewise.
5551 * remote-sim.c (gdbsim_detach): Likewise.
5552 * remote.c (remote_detach_1): Likewise.
5553 (remote_detach): Likewise.
5554 (extended_remote_detach): Likewise.
5555 * sol-thread.c (sol_thread_detach): Likewise.
5556 * target-delegates.c: Re-generate.
5557 * top.c (struct qt_args) <args>: Remove field.
5558 (kill_or_detach): Don't pass args.
5559 (quit_force): Don't set args.
5560 * windows-nat.c (windows_detach): Remove args parameter.
5561
88af8ea8
YQ
55622018-01-19 Yao Qi <yao.qi@linaro.org>
5563
5564 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
5565 (arm_linux_init_abi): Install it.
5566
dea445b9
YQ
55672018-01-19 Yao Qi <yao.qi@linaro.org>
5568
5569 * osabi.c (gdb_osabi_names): Extend the regexp for
5570 arm-linux-gnueabihf.
5571
4a17f768
YQ
55722018-01-18 Yao Qi <yao.qi@linaro.org>
5573
5574 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
5575 m_abbrevs.
5576 (abbrev_table::add_abbrev): Update.
5577 (abbrev_table::lookup_abbrev): Update.
5578
d679c21a
YQ
55792018-01-18 Yao Qi <yao.qi@linaro.org>
5580
5581 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
5582
7d937cad
SDJ
55832018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
5584
5585 * compile/compile.c (compile_to_object): Convert "triplet_rx"
5586 to "std::string".
5587
9e14690d
TT
55882018-01-17 Tom Tromey <tom@tromey.com>
5589
5590 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
5591
50a82047
TT
55922018-01-17 Tom Tromey <tom@tromey.com>
5593
5594 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
5595 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
5596 (create_array_type_with_stride): Update.
5597 * dwarf2read.c (set_die_type): Update.
5598
c89b44cd
TT
55992018-01-17 Tom Tromey <tom@tromey.com>
5600
5601 * dwarf2read.c (delayed_method_info): Remove typedef.
5602 (dwarf2_cu::method_info): Now a std::vector.
5603 (add_to_method_list): Update.
5604 (free_delayed_list): Remove.
5605 (compute_delayed_physnames): Update.
5606 (process_full_comp_unit, process_full_type_unit): Clear the method
5607 list. Remove cleanups.
5608 (psymtab_include_file_name): Add name_holder parameter. Use
5609 unique_xmalloc_ptr.
5610 (dwarf_decode_lines): Update.
5611
fcd3b13d
SM
56122018-01-17 Tom Tromey <tom@tromey.com>
5613 Simon Marchi <simon.marchi@ericsson.com>
5614
5615 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
5616 (dwarf2_per_objfile::free_cached_comp_units)
5617 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
5618 (init_cutu_and_read_dies_no_follow): Update.
5619 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
5620 (dwarf2_cu::~dwarf2_cu): New.
5621 (free_heap_comp_unit, free_stack_comp_unit): Remove.
5622 (age_cached_comp_units, free_one_cached_comp_unit): Update.
5623
685af9cd
TT
56242018-01-17 Tom Tromey <tom@tromey.com>
5625 Simon Marchi <simon.marchi@ericsson.com>
5626
5627 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
5628 (struct die_reader_specs) <abbrev_table>: New member.
5629 (struct abbrev_table): Add constructor.
5630 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
5631 <abbrev_obstack>: Now an auto_obstack.
5632 (abbrev_table_up): New typedef.
5633 (init_cu_die_reader): Add abbrev_table parameter.
5634 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
5635 Add result_dwo_abbrev_table.
5636 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
5637 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
5638 Update.
5639 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
5640 parameter.
5641 (skip_children): Update.
5642 (abbrev_table::alloc_abbrev): Rename from
5643 abbrev_table_alloc_abbrev.
5644 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
5645 (abbrev_table::lookup_abbrev): Rename from
5646 abbrev_table_lookup_abbrev.
5647 (abbrev_table_read_table): Return abbrev_table_up.
5648 (abbrev_table_free, abbrev_table_free_cleanup)
5649 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
5650 (load_partial_dies): Update.
5651
5e2db402
TT
56522018-01-17 Tom Tromey <tom@tromey.com>
5653
5654 * dwarf2read.c (dwarf2_compute_name): Update comment.
5655 (read_func_scope, read_variable): Update.
5656 (new_symbol): Remove.
5657 (new_symbol_full): Rename to new_symbol.
5658
ee7f689e 56592018-01-17 Mike Gulick <mgulick@mathworks.com>
41667530
MG
5660
5661 PR gdb/16577
5662 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
5663 a warning instead of throwing an error, set section size to 0 and return
5664 NULL.
5665 * gdb_bfd.h (gdb_bfd_map_section): Update description.
5666
4d9b86e1
SM
56672018-01-17 Simon Marchi <simon.marchi@ericsson.com>
5668
5669 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
5670 std::string.
5671 (linux_ptrace_attach_fail_reason_string): Likewise.
5672 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
5673 Likewise.
5674 (linux_ptrace_attach_fail_reason_string): Likewise.
5675 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
5676
a7b2d0fb
SM
56772018-01-17 Simon Marchi <simon.marchi@ericsson.com>
5678
5679 * linux-nat.c (linux_nat_attach): Remove xstrdup.
5680
f517c180
EA
56812018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
5682
5683 PR gdb/21559
5684 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
5685 checking for fs_base/gs_base fields in struct user_regs_struct.
5686 * configure: Regenerate.
5687
7045b1ca
YQ
56882018-01-17 Yao Qi <yao.qi@linaro.org>
5689
5690 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
5691 function.
5692 (aarch64_linux_init_abi): Install it to gdbarch hook
5693 gcc_target_options.
5694
db422fb2
PA
56952018-01-15 Pedro Alves <palves@redhat.com>
5696
5697 * common/signals-state-save-restore.c
5698 (save_original_signals_state): Fix typos.
5699
ba643918
SDJ
57002017-01-12 Tom Tromey <tom@tromey.com>
5701 Sergio Durigan Junior <sergiodj@redhat.com>
5702
5703 * Makefile.in (install-only): Install gdb-add-index.
5704
906b4aac
JB
57052018-01-12 John Baldwin <jhb@FreeBSD.org>
5706
5707 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
5708
bdf2a94a
AA
57092018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5710
5711 * infrun.c (keep_going_pass_signal): Clear step-over info when
5712 insert_breakpoints fails.
5713
71d378ae
PA
57142018-01-11 Pedro Alves <palves@redhat.com>
5715
5716 PR gdb/22583
5717 * infrun.c (resume): Rename to ...
5718 (resume_1): ... this.
5719 (resume): Reimplement as wrapper around resume_1.
5720
3cada740
PA
57212018-01-11 Pedro Alves <palves@redhat.com>
5722
5723 PR remote/22597
5724 * remote.c (remote_parse_stop_reply): Default to the last-set
5725 general thread instead of to 'magic_null_ptid'.
5726
618daa93
PA
57272018-01-10 Pedro Alves <palves@redhat.com>
5728
5729 * language.h (language_get_symbol_name_matcher): Rename ...
5730 (get_symbol_name_matcher): ... this.
5731 * language.c (language_get_symbol_name_matcher): Ditto.
5732 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
5733 callers adjusted.
5734
c63d3e8d
PA
57352018-01-10 Pedro Alves <palves@redhat.com>
5736
5737 PR gdb/22670
5738 * dwarf2read.c
5739 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
5740 Adjust to use language_get_symbol_name_matcher instead of
5741 language_defn::la_get_symbol_name_matcher.
5742 * language.c (language_get_symbol_name_matcher): If in Ada mode
5743 and the lookup name is a verbatim match, return Ada's matcher.
5744 * language.h (language_get_symbol_name_matcher): Adjust comment.
5745 (ada_lookup_name_info::verbatim_p):: New method.
5746
d4c2a405
PA
57472018-01-10 Pedro Alves <palves@redhat.com>
5748
5749 PR gdb/22670
5750 * ada-lang.c (ada_collect_symbol_completion_matches): If the
5751 minsym's language is language_auto or language_cplus, pass down
5752 language_ada instead.
5753 * symtab.c (compare_symbol_name): Don't frob symbol language here.
5754
8825213e
PA
57552018-01-10 Pedro Alves <palves@redhat.com>
5756
5757 PR gdb/22670
5758 * minsyms.c (linkage_name_str): New function.
5759 (iterate_over_minimal_symbols): Use it.
5760
2d97a5d9
JB
57612018-01-09 John Baldwin <jhb@FreeBSD.org>
5762
5763 * NEWS: Document that 'info proc' now works on FreeBSD.
5764
92fce24d
JB
57652018-01-09 John Baldwin <jhb@FreeBSD.org>
5766
5767 * configure.ac: Check for kinfo_getfile in libutil.
5768 * configure: Regenerate.
5769 * config.in: Regenerate.
5770 * fbsd-nat.c: Include "fbsd-tdep.h".
5771 (fbsd_fetch_cmdline): New.
5772 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
5773 rather than calling error.
5774 (fbsd_info_proc): New.
5775 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
5776 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
5777 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
5778
262f62f5
JB
57792018-01-09 John Baldwin <jhb@FreeBSD.org>
5780
5781 * fbsd-nat.c (struct free_deleter): Remove.
5782 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
5783
b999e203
JB
57842018-01-09 John Baldwin <jhb@FreeBSD.org>
5785
5786 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
5787 NULL for an empty pathname.
5788
d2176225
JB
57892018-01-09 John Baldwin <jhb@FreeBSD.org>
5790
5791 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
5792 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
5793 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
5794 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
5795 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
5796 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
5797 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
5798 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
5799 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
5800 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
5801 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
5802 (fbsd_core_fetch_timeval, fbsd_print_sigset)
5803 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
5804 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
5805 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
5806
9c4ac400
ST
58072018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
5808
5809 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
5810 (gnu_xfer_auxv): New function.
5811 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
5812 TARGET_OBJECT_AUXV.
5813
1e5ded6c
YQ
58142018-01-08 Yao Qi <yao.qi@linaro.org>
5815 Simon Marchi <simon.marchi@ericsson.com>
5816
5817 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
5818 common/selftest.c.
5819 (COMMON_OBS): Remove selftest.o.
5820 * configure.ac: Append selftest-arch.c and common/selftest.c to
5821 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
5822 * configure: Re-generated.
5823 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
5824 GDB_SELF_TEST.
5825 (maintenance_info_selftests): Likewise.
5826
04bafb1e
XR
58272018-01-08 Xavier Roirand <roirand@adacore.com>
5828
5829 * ada-valprint.c (val_print_packed_array_elements): Use
5830 proper number of elements when printing an array indexed
5831 by an enumeration type.
5832
518817b3
SM
58332018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
5834
5835 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
5836 (dw2_get_file_names_reader): Adjust.
5837 (lookup_dwo_signatured_type): Adjust.
5838 (lookup_dwp_signatured_type): Adjust.
5839 (lookup_signatured_type): Adjust.
5840 (create_type_unit_group): Adjust.
5841 (get_type_unit_group): Adjust.
5842 (process_psymtab_comp_unit_reader): Adjust.
5843 (build_type_psymtabs_reader): Adjust.
5844 (scan_partial_symbols): Adjust.
5845 (add_partial_symbol): Adjust.
5846 (add_partial_subprogram): Adjust.
5847 (peek_die_abbrev): Adjust.
5848 (fixup_go_packaging): Adjust.
5849 (process_imported_unit_die): Adjust.
5850 (dwarf2_compute_name): Adjust.
5851 (dwarf2_physname): Adjust.
5852 (read_import_statement): Adjust.
5853 (handle_DW_AT_stmt_list): Adjust.
5854 (read_file_scope): Adjust.
5855 (read_func_scope): Adjust.
5856 (read_lexical_block_scope): Adjust.
5857 (read_call_site_scope): Adjust.
5858 (read_variable): Adjust.
5859 (dwarf2_rnglists_process): Adjust.
5860 (dwarf2_ranges_process): Adjust.
5861 (dwarf2_ranges_read): Adjust.
5862 (dwarf2_get_pc_bounds): Adjust.
5863 (dwarf2_record_block_ranges): Adjust.
5864 (dwarf2_add_field): Adjust.
5865 (dwarf2_add_member_fn): Adjust.
5866 (read_structure_type): Adjust.
5867 (process_structure_scope): Adjust.
5868 (read_enumeration_type): Adjust.
5869 (read_array_type): Adjust.
5870 (mark_common_block_symbol_computed): Adjust.
5871 (read_common_block): Adjust.
5872 (read_namespace_type): Adjust.
5873 (read_namespace): Adjust.
5874 (read_module_type): Adjust.
5875 (read_tag_pointer_type): Adjust.
5876 (read_tag_ptr_to_member_type): Adjust.
5877 (read_tag_string_type): Adjust.
5878 (read_subroutine_type): Adjust.
5879 (read_typedef): Adjust.
5880 (read_base_type): Adjust.
5881 (attr_to_dynamic_prop): Adjust.
5882 (read_subrange_type): Adjust.
5883 (read_unspecified_type): Adjust.
5884 (dwarf2_read_abbrevs): Adjust.
5885 (load_partial_dies): Adjust.
5886 (read_partial_die): Adjust.
5887 (find_partial_die): Adjust.
5888 (guess_partial_die_structure_name): Adjust.
5889 (fixup_partial_die): Adjust.
5890 (read_attribute_value): Adjust.
5891 (read_addr_index): Adjust.
5892 (read_addr_index_from_leb128): Adjust.
5893 (read_str_index): Adjust.
5894 (dwarf2_string_attr): Adjust.
5895 (get_debug_line_section): Adjust.
5896 (dwarf_decode_line_header): Adjust.
5897 (lnp_state_machine::check_line_address): Adjust.
5898 (dwarf_decode_lines_1): Adjust.
5899 (dwarf_decode_lines): Adjust.
5900 (dwarf2_start_symtab): Adjust.
5901 (var_decode_location): Adjust.
5902 (new_symbol_full): Adjust.
5903 (dwarf2_const_value_data): Adjust.
5904 (dwarf2_const_value_attr): Adjust.
5905 (dwarf2_const_value): Adjust.
5906 (die_type): Adjust.
5907 (die_containing_type): Adjust.
5908 (build_error_marker_type): Adjust.
5909 (lookup_die_type): Adjust.
5910 (guess_full_die_structure_name): Adjust.
5911 (anonymous_struct_prefix): Adjust.
5912 (determine_prefix): Adjust.
5913 (dwarf2_name): Adjust.
5914 (follow_die_ref_or_sig): Adjust.
5915 (follow_die_offset): Adjust.
5916 (follow_die_ref): Adjust.
5917 (follow_die_sig_1): Adjust.
5918 (follow_die_sig): Adjust.
5919 (get_signatured_type): Adjust.
5920 (get_DW_AT_signature_type): Adjust.
5921 (decode_locdesc): Adjust.
5922 (dwarf_decode_macros): Adjust.
5923 (cu_debug_loc_section): Adjust.
5924 (fill_in_loclist_baton): Adjust.
5925 (dwarf2_symbol_mark_computed): Adjust.
5926 (init_one_comp_unit): Don't assign
5927 dwarf2_cu::dwarf2_per_objfile.
5928 (set_die_type): Adjust.
5929
ed2dc618
SM
59302018-01-07 Simon Marchi <simon.marchi@ericsson.com>
5931
5932 * dwarf2read.c (struct mapped_debug_names): Add constructor.
5933 <dwarf2_per_objfile>: New field.
5934 (dwarf2_per_objfile): Remove global.
5935 (get_dwarf2_per_objfile): New function.
5936 (set_dwarf2_per_objfile): New function.
5937 (dwarf2_build_psymtabs_hard): Change objfile parameter to
5938 dwarf2_per_objfile.
5939 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
5940 (read_abbrev_offset): Likewise.
5941 (read_indirect_string): Likewise.
5942 (read_indirect_line_string): Likewise.
5943 (read_indirect_string_at_offset): Likewise.
5944 (read_indirect_string_from_dwz): Likewise.
5945 (dwarf2_find_containing_comp_unit): Change objfile parameter to
5946 dwarf2_per_objfile.
5947 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
5948 (create_all_comp_units): Change objfile parameter to
5949 dwarf2_per_objfile.
5950 (create_all_type_units): Likewise.
5951 (process_queue): Add dwarf2_per_objfile parameter.
5952 (read_and_check_comp_unit_head): Likewise.
5953 (lookup_dwo_unit_in_dwp): Likewise.
5954 (get_dwp_file): Likewise.
5955 (process_cu_includes): Likewise.
5956 (struct free_dwo_file_cleanup_data): New struct.
5957 (dwarf2_has_info): Use get_dwarf2_per_objfile and
5958 set_dwarf2_per_objfile.
5959 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
5960 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
5961 context, adjust calls.
5962 (dw2_instantiate_symtab): Likewise.
5963 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
5964 (dw2_get_cu): Likewise.
5965 (create_cu_from_index_list): Change objfile parameter to
5966 dwarf2_per_objfile.
5967 (create_cus_from_index_list): Get dwarf2_per_objfile from
5968 context, adjust calls.
5969 (create_cus_from_index): Likewise.
5970 (create_signatured_type_table_from_index): Change objfile
5971 parameter to dwarf2_per_objfile.
5972 (create_signatured_type_table_from_debug_names): Change objfile
5973 parameter to dwarf2_per_objfile.
5974 (create_addrmap_from_index): Likewise.
5975 (create_addrmap_from_aranges): Likewise.
5976 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
5977 (dw2_setup): Remove.
5978 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
5979 context.
5980 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
5981 get_dwarf2_per_objfile.
5982 (dw2_forget_cached_source_info): Likewise.
5983 (dw2_map_symtabs_matching_filename): Likewise.
5984 (struct dw2_symtab_iterator) <index>: Remove.
5985 <dwarf2_per_objfile>: New field.
5986 (dw2_symtab_iter_init): Replace index parameter with
5987 dwarf2_per_objfile.
5988 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
5989 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
5990 (dw2_print_stats): Likewise.
5991 (dw2_dump): Likewise.
5992 (dw2_expand_symtabs_for_function): Likewise.
5993 (dw2_expand_all_symtabs): Likewise.
5994 (dw2_expand_symtabs_with_fullname): Likewise.
5995 (dw2_expand_marked_cus): Replace index and objfile parameters
5996 with dwarf2_per_objfile.
5997 (dw_expand_symtabs_matching_file_matcher): Add
5998 dwarf2_per_objfile parameter and adjust calls.
5999 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
6000 adjust calls.
6001 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
6002 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
6003 adjust calls.
6004 (create_cus_from_debug_names_list): Replace objfile parameter
6005 with dwarf2_per_objfile and adjust calls.
6006 (create_cus_from_debug_names): Likewise.
6007 (dwarf2_read_debug_names): Likewise.
6008 (mapped_debug_names::namei_to_name): Adjust call.
6009 (dw2_debug_names_iterator::next): Likewise.
6010 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
6011 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
6012 (dw2_debug_names_dump): Likewise.
6013 (dw2_debug_names_expand_symtabs_for_function): Likewise.
6014 (dw2_debug_names_expand_symtabs_matching): Likewise.
6015 (dwarf2_initialize_objfile): Likewise.
6016 (dwarf2_build_psymtabs): Likewise.
6017 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
6018 this_cu.
6019 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
6020 (read_and_check_comp_unit_head): Likewise.
6021 (read_abbrev_offset): Likewise.
6022 (create_debug_type_hash_table): Likewise.
6023 (create_debug_types_hash_table): Likewise.
6024 (create_all_type_units): Replace objfile parameter with
6025 dwarf2_per_objfile.
6026 (add_type_unit): Add dwarf2_per_objfile parameter.
6027 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
6028 with dwarf2_per_objfile.
6029 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
6030 (lookup_dwp_signatured_type): Likewise.
6031 (lookup_signatured_type): Likewise.
6032 (read_cutu_die_from_dwo): Likewise.
6033 (init_tu_and_read_dwo_dies): Likewise.
6034 (init_cutu_and_read_dies): Likewise.
6035 (init_cutu_and_read_dies_no_follow): Likewise.
6036 (allocate_type_unit_groups_table): Add objfile parameter.
6037 (create_type_unit_group): Use dwarf2_per_objfile from cu.
6038 (get_type_unit_group): Likewise.
6039 (process_psymtab_comp_unit): Update call.
6040 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
6041 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
6042 (print_tu_stats): Likewise.
6043 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
6044 in void* parameter.
6045 (build_type_psymtabs): Change objfile parameter to
6046 dwarf2_per_objfile.
6047 (process_skeletonless_type_unit): Use dwarf2_per_objfile
6048 passed in void* parameter.
6049 (process_skeletonless_type_units): Change objfile parameter to
6050 dwarf2_per_objfile.
6051 (set_partial_user): Likewise.
6052 (dwarf2_build_psymtabs_hard): Likewise.
6053 (read_comp_units_from_section): Likewise.
6054 (create_all_comp_units): Likewise.
6055 (scan_partial_symbols): Update calls.
6056 (add_partial_symbol): Likewise.
6057 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
6058 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
6059 (process_queue): Add dwarf2_per_objfile parameter.
6060 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
6061 (compute_compunit_symtab_includes): Likewise.
6062 (process_cu_includes): Add dwarf2_per_objfile parameter.
6063 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
6064 (process_full_type_unit): Likewise.
6065 (process_imported_unit_die): Update call.
6066 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
6067 (read_file_scope): Likewise.
6068 (allocate_dwo_file_hash_table): Add objfile parameter.
6069 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
6070 (create_cus_hash_table): Likewise.
6071 (create_dwp_hash_table): Likewise.
6072 (create_dwo_unit_in_dwp_v1): Likewise.
6073 (create_dwp_v2_section): Likewise.
6074 (create_dwo_unit_in_dwp_v2): Likewise.
6075 (lookup_dwo_unit_in_dwp): Likewise.
6076 (try_open_dwop_file): Likewise.
6077 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
6078 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
6079 cleanup to include a reference to dwarf2_per_objfile.
6080 (open_dwp_file): Add dwarf2_per_objfile parameter.
6081 (open_and_init_dwp_file): Likewise.
6082 (get_dwp_file): Likewise.
6083 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
6084 (queue_and_load_all_dwo_tus): Update call.
6085 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
6086 data.
6087 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
6088 (dwarf2_ranges_process): Likewise.
6089 (dwarf2_get_pc_bounds): Likewise.
6090 (mark_common_block_symbol_computed): Likewise.
6091 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
6092 (dwarf2_read_abbrevs): Update call.
6093 (read_partial_die): Use dwarf2_per_objfile from cu.
6094 (find_partial_die): Likewise.
6095 (fixup_partial_die): Likewise.
6096 (read_attribute_value): Likewise.
6097 (read_indirect_string_at_offset_from): Add objfile parameter.
6098 (read_indirect_string_at_offset): Add dwarf2_per_objfile
6099 parameter.
6100 (read_indirect_string_from_dwz): Add objfile parameter.
6101 (read_indirect_string): Add objfile parameter.
6102 (read_addr_index_1): Add dwarf2_per_objfile parameter.
6103 (read_addr_index): Use dwarf2_per_objfile from cu.
6104 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
6105 call dw2_setup.
6106 (read_str_index): Use dwarf2_per_objfile from cu.
6107 (get_debug_line_section): Likewise.
6108 (read_formatted_entries): Add dwarf2_per_objfile parameter.
6109 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
6110 (new_symbol_full): Use dwarf2_per_objfile from cu.
6111 (build_error_marker_type): Likewise.
6112 (lookup_die_type): Likewise.
6113 (determine_prefix): Likewise.
6114 (follow_die_offset): Likewise.
6115 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
6116 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
6117 (dwarf2_fetch_die_type_sect_off): Likewise.
6118 (dwarf2_get_die_type): Likewise.
6119 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
6120 (get_signatured_type): Likewise.
6121 (get_DW_AT_signature_type): Likewise.
6122 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
6123 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
6124 (cu_debug_loc_section): Likewise.
6125 (fill_in_loclist_baton): Likewise.
6126 (dwarf2_symbol_mark_computed): Likewise.
6127 (dwarf2_find_containing_comp_unit): Change objfile parameter to
6128 dwarf2_per_objfile.
6129 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
6130 parameter.
6131 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
6132 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
6133 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
6134 (set_die_type): Use dwarf2_free_objfile from cu.
6135 (get_die_type_at_offset): Likewise.
6136 (dwarf2_per_objfile_free): Don't assign global variable.
6137 (debug_names) <constructor>: Add dwarf2_per_objfile
6138 parameter, update m_debugstrlookup construction.
6139 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
6140 parameter.
6141 <m_dwarf2_per_objfile>: New field.
6142 <lookup>: Use m_dwarf2_per_objfile.
6143 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
6144 (psyms_seen_size): Likewise.
6145 (write_gdbindex): Replace objfile parameter with
6146 dwarf2_per_objfile.
6147 (write_debug_names): Likewise.
6148 (write_psymtabs_to_index): Likewise.
6149 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
6150 calls.
6151
e3b94546
SM
61522018-01-07 Simon Marchi <simon.marchi@ericsson.com>
6153
6154 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
6155 <dwarf2_per_objfile>: New field.
6156 (struct dwarf2_per_cu_data) <objfile>: Remove.
6157 <dwarf2_per_objfile>: New field.
6158 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
6159 of objfile.
6160 (create_signatured_type_table_from_index): Likewise.
6161 (create_debug_type_hash_table): Likewise.
6162 (fill_in_sig_entry_from_dwo_entry): Likewise.
6163 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
6164 (create_type_unit_group): Assign dwarf2_per_objfile instead of
6165 objfile.
6166 (create_partial_symtab): Access objfile through
6167 dwarf2_per_objfile.
6168 (process_psymtab_comp_unit_reader): Likewise.
6169 (read_comp_units_from_section): Likewise.
6170 (scan_partial_symbols): Likewise.
6171 (add_partial_symbol): Likewise.
6172 (add_partial_subprogram): Likewise.
6173 (peek_die_abbrev): Likewise.
6174 (fixup_go_packaging): Likewise.
6175 (process_full_comp_unit): Likewise.
6176 (process_full_type_unit): Likewise.
6177 (process_imported_unit_die): Likewise.
6178 (dwarf2_compute_name): Likewise.
6179 (dwarf2_physname): Likewise.
6180 (read_import_statement): Likewise.
6181 (create_cus_hash_table): Assign dwarf2_physname instead of
6182 objfile.
6183 (read_func_scope): Access objfile through dwarf2_per_objfile.
6184 (read_lexical_block_scope): Likewise.
6185 (read_call_site_scope): Likewise.
6186 (read_variable): Likewise.
6187 (dwarf2_rnglists_process): Likewise.
6188 (dwarf2_ranges_process): Likewise.
6189 (dwarf2_ranges_read): Likewise.
6190 (dwarf2_record_block_ranges): Likewise.
6191 (dwarf2_add_field): Likewise.
6192 (dwarf2_add_member_fn): Likewise.
6193 (read_structure_type): Likewise.
6194 (process_structure_scope): Likewise.
6195 (read_enumeration_type): Likewise.
6196 (read_array_type): Likewise.
6197 (read_common_block): Likewise.
6198 (read_namespace_type): Likewise.
6199 (read_namespace): Likewise.
6200 (read_module_type): Likewise.
6201 (read_tag_pointer_type): Likewise.
6202 (read_tag_ptr_to_member_type): Likewise.
6203 (read_tag_string_type): Likewise.
6204 (read_subroutine_type): Likewise.
6205 (read_typedef): Likewise.
6206 (read_base_type): Likewise.
6207 (attr_to_dynamic_prop): Likewise.
6208 (read_subrange_type): Likewise.
6209 (read_unspecified_type): Likewise.
6210 (load_partial_dies): Likewise.
6211 (read_partial_die): Likewise.
6212 (find_partial_die): Likewise.
6213 (guess_partial_die_structure_name): Likewise.
6214 (fixup_partial_die): Likewise.
6215 (read_attribute_value): Likewise.
6216 (read_addr_index_from_leb128): Likewise.
6217 (dwarf2_read_addr_index): Likewise.
6218 (dwarf2_string_attr): Likewise.
6219 (lnp_state_machine::check_line_address): Likewise.
6220 (dwarf_decode_lines_1): Likewise.
6221 (dwarf_decode_lines): Likewise.
6222 (dwarf2_start_symtab): Likewise.
6223 (var_decode_location): Likewise.
6224 (new_symbol_full): Likewise.
6225 (dwarf2_const_value_data): Likewise.
6226 (dwarf2_const_value_attr): Likewise.
6227 (dwarf2_const_value): Likewise.
6228 (die_type): Likewise.
6229 (die_containing_type): Likewise.
6230 (lookup_die_type): Likewise.
6231 (guess_full_die_structure_name): Likewise.
6232 (anonymous_struct_prefix): Likewise.
6233 (dwarf2_name): Likewise.
6234 (follow_die_ref_or_sig): Likewise.
6235 (follow_die_offset): Likewise.
6236 (follow_die_ref): Likewise.
6237 (dwarf2_fetch_die_loc_sect_off): Likewise.
6238 (dwarf2_fetch_constant_bytes): Likewise.
6239 (dwarf2_fetch_die_type_sect_off): Likewise.
6240 (dwarf2_get_die_type): Likewise.
6241 (follow_die_sig): Likewise.
6242 (decode_locdesc): Likewise.
6243 (dwarf2_per_cu_objfile): Likewise.
6244 (dwarf2_per_cu_text_offset): Likewise.
6245 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
6246 objfile.
6247 (set_die_type): Access objfile through
6248 dwarf2_per_objfile.
6249
b01ba14d
SM
62502018-01-07 Simon Marchi <simon.marchi@ericsson.com>
6251
6252 * valprint.c (converted_character_d): Remove typedef.
6253 (DEF_VEC_O (converted_character_d)): Remove.
6254 (count_next_character): Use std::vector.
6255 (print_converted_chars_to_obstack): Likewise.
6256 (generic_printstr): Likewise.
6257
4d0fdd9b
SM
62582018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
6259
6260 * xml-support.h (struct gdb_xml_value): Add constructor.
6261 <value>: Change type to unique_xmalloc_ptr.
6262 (gdb_xml_value_s): Remove typedef.
6263 (DEF_VEC_O (gdb_xml_value_s)): Remove.
6264 (gdb_xml_element_start_handler): Change parameter type to
6265 std::vector.
6266 (xml_find_attribute): Likewise.
6267 * xml-support.c (xml_find_attribute): Change parameter type to
6268 std::vector and adjust.
6269 (gdb_xml_values_cleanup): Remove.
6270 (gdb_xml_parser::start_element): Adjust to std::vector.
6271 (xinclude_start_include): Change paraeter type to std::vector
6272 and adjust.
6273 * btrace.c (check_xml_btrace_version): Likewise.
6274 (parse_xml_btrace_block): Likewise.
6275 (parse_xml_btrace_pt_config_cpu): Likewise.
6276 (parse_xml_btrace_pt): Likewise.
6277 (parse_xml_btrace_conf_bts): Likewise.
6278 (parse_xml_btrace_conf_pt): Likewise.
6279 * memory-map.c (memory_map_start_memory): Likewise.
6280 (memory_map_start_property): Likewise.
6281 * osdata.c (osdata_start_osdata): Likewise.
6282 (osdata_start_item): Likewise.
6283 (osdata_start_column): Likewise.
6284 * remote.c (start_thread): Likewise.
6285 * solib-aix.c (library_list_start_library): Likewise.
6286 (library_list_start_list): Likewise.
6287 * solib-svr4.c (library_list_start_library): Likewise.
6288 (svr4_library_list_start_list): Likewise.
6289 * solib-target.c (library_list_start_segment): Likewise.
6290 (library_list_start_section): Likewise.
6291 (library_list_start_library): Likewise.
6292 (library_list_start_list): Likewise.
6293 * tracepoint.c (traceframe_info_start_memory): Likewise.
6294 (traceframe_info_start_tvar): Likewise.
6295 * xml-syscall.c (syscall_start_syscall): Likewise.
6296 * xml-tdesc.c (tdesc_start_target): Likewise.
6297 (tdesc_start_feature): Likewise.
6298 (tdesc_start_reg): Likewise.
6299 (tdesc_start_union): Likewise.
6300 (tdesc_start_struct): Likewise.
6301 (tdesc_start_flags): Likewise.
6302 (tdesc_start_enum): Likewise.
6303 (tdesc_start_field): Likewise.
6304 (tdesc_start_enum_value): Likewise.
6305 (tdesc_start_vector): Likewise.
6306
f979c73f
SM
63072018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
6308
6309 * extension.h (struct xmethod_worker) <clone>: Remove.
6310 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
6311 Remove.
6312 (python_xmethod_worker::clone): Remove.
6313 * valops.c (find_overload_match): Use std::move instead of
6314 clone.
6315
ba18742c
SM
63162018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
6317
6318 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
6319 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
6320 <free_xmethod_worker_data>: Remove.
6321 <get_matching_xmethod_workers>: Chance VEC to std::vector.
6322 <get_xmethod_arg_types>: Remove.
6323 <get_xmethod_result_type>: Remove.
6324 <invoke_xmethod>: Remove.
6325 * extension.c (new_xmethod_worker): Remove.
6326 (clone_xmethod_worker): Remove.
6327 (get_matching_xmethod_workers): Return void, pass std::vector by
6328 pointer.
6329 (get_xmethod_arg_types): Rename to...
6330 (xmethod_worker::get_arg_types): ... this, and adjust.
6331 (get_xmethod_result_type): Rename to...
6332 (xmethod_worker::get_result_type): ... this, and adjust.
6333 (invoke_xmethod): Remove.
6334 (free_xmethod_worker): Remove.
6335 (free_xmethod_worker_vec): Remove.
6336 * extension.h (enum ext_lang_rc): Move here from
6337 extension-priv.h.
6338 (struct xmethod_worker): Add constructor and destructor.
6339 <data>: Remove.
6340 <value>: Remove.
6341 <invoke, clone, do_get_result_type, do_get_arg_types>: New
6342 virtual pure methods.
6343 <get_arg_types, get_result_type>: New methods.
6344 (xmethod_worker_ptr): Remove typedef.
6345 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
6346 (xmethod_worker_vec): Remove typedef.
6347 (xmethod_worker_up): New typedef.
6348 (invoke_xmethod): Remove.
6349 (clone_xmethod_worker): Remove.
6350 (free_xmethod_worker): Remove.
6351 (free_xmethod_worker_vec): Remove.
6352 (get_xmethod_arg_types): Remove.
6353 (get_xmethod_result_type): Remove.
6354 * valops.c (find_method_list): Use std::vector, don't use
6355 intermediate vector.
6356 (value_find_oload_method_list): Use std::vector.
6357 (find_overload_match): Use std::vector.
6358 (find_oload_champ): Use std::vector.
6359 * value.c (value_free): Use operator delete.
6360 (value_of_xmethod): Rename to...
6361 (value_from_xmethod): ... this. Don't assign
6362 xmethod_worker::value, take rvalue-reference.
6363 (result_type_of_xmethod): Adjust.
6364 (call_xmethod): Adjust.
6365 * value.h: Include extension.h.
6366 (struct xmethod_worker): Don't forward-declare.
6367 (value_of_xmethod): Rename to...
6368 (value_from_xmethod): ... this, take rvalue-reference.
6369 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
6370 (struct python_xmethod_worker): ... this, add constructor and
6371 destructor.
6372 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
6373 (gdbpy_free_xmethod_worker_data): Rename to...
6374 (python_xmethod_worker::~python_xmethod_worker): ... this and
6375 adjust.
6376 (gdbpy_clone_xmethod_worker_data): Rename to...
6377 (python_xmethod_worker::clone): ... this and adjust.
6378 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
6379 temporary vector.
6380 (gdbpy_get_xmethod_arg_types): Rename to...
6381 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
6382 (gdbpy_get_xmethod_result_type): Rename to...
6383 (python_xmethod_worker::do_get_result_type): ... this and
6384 adjust.
6385 (gdbpy_invoke_xmethod): Rename to...
6386 (python_xmethod_worker::invoke): ... this and adjust.
6387 (new_python_xmethod_worker): Rename to...
6388 (python_xmethod_worker::python_xmethod_worker): ... this and
6389 adjust.
6390 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
6391 Remove.
6392 (gdbpy_free_xmethod_worker_data): Remove.
6393 (gdbpy_get_matching_xmethod_workers): Use std::vector.
6394 (gdbpy_get_xmethod_arg_types): Remove.
6395 (gdbpy_get_xmethod_result_type): Remove.
6396 (gdbpy_invoke_xmethod): Remove.
6397 * python/python.c (python_extension_ops): Remove obsolete
6398 callbacks.
6399
e379cee6
PA
64002018-01-05 Pedro Alves <palves@redhat.com>
6401
6402 PR gdb/18653
6403 * common/signals-state-save-restore.c
6404 (save_original_signals_state): New parameter 'quiet'. Warn if we
6405 find a custom handler preinstalled, instead of internal erroring.
6406 But only warn if !quiet.
6407 * common/signals-state-save-restore.h
6408 (save_original_signals_state): New parameter 'quiet'.
6409 * main.c (captured_main_1): Move save_original_signals_state call
6410 after option handling, and pass QUIET.
6411
a655456c
PA
64122018-01-05 Pedro Alves <palves@redhat.com>
6413
6414 * spu-tdep.c (spu_catch_start): Pass
6415 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
6416
de63c46b
PA
64172018-01-05 Pedro Alves <palves@redhat.com>
6418
6419 PR gdb/22670
6420 * ada-lang.c (literal_symbol_name_matcher): New function.
6421 (ada_get_symbol_name_matcher): Use it for
6422 symbol_name_match_type::SEARCH_NAME.
6423 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
6424 it down instead of assuming symbol_name_match_type::FULL.
6425 * block.h (block_lookup_symbol): New parameter 'match_type'.
6426 * c-valprint.c (print_unpacked_pointer): Use
6427 lookup_symbol_search_name instead of lookup_symbol.
6428 * compile/compile-object-load.c (get_out_value_type): Pass down
6429 symbol_name_match_type::SEARCH_NAME.
6430 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
6431 symbol_name_match_type::FULL.
6432 * cp-support.c (cp_get_symbol_name_matcher): Handle
6433 symbol_name_match_type::SEARCH_NAME.
6434 * infrun.c (insert_exception_resume_breakpoint): Use
6435 lookup_symbol_search_name.
6436 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
6437 * psymtab.c (maintenance_check_psymtabs): Use
6438 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
6439 * stack.c (print_frame_args): Use lookup_symbol_search_name and
6440 SYMBOL_SEARCH_NAME.
6441 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
6442 if symbol_name_match_type::SEARCH_NAME.
6443 (lookup_symbol_in_language): Pass down
6444 symbol_name_match_type::FULL.
6445 (lookup_symbol_search_name): New.
6446 (lookup_language_this): Pass down
6447 symbol_name_match_type::SEARCH_NAME.
6448 (lookup_symbol_aux, lookup_local_symbol): New parameter
6449 'match_type'. Pass it down.
6450 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
6451 (lookup_symbol_search_name): New declaration.
6452 (lookup_symbol_in_block): New 'match_type' parameter.
6453
f98fc17b
PA
64542018-01-05 Pedro Alves <palves@redhat.com>
6455
6456 PR gdb/22670
6457 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
6458 ada_lookup_symbol.
6459 (ada_lookup_symbol): Reimplement in terms of
6460 ada_lookup_symbol_list, bits factored out from
6461 ada_lookup_encoded_symbol.
6462
342f8240
JB
64632018-01-05 Joel Brobecker <brobecker@adacore.com>
6464
6465 * ada-exp.y (write_object_renaming): When subscripting an array
6466 using a symbol as the index, pass the block in call to
6467 ada_lookup_encoded_symbol when looking that symbol up.
6468
7150d33c
JG
64692018-01-05 Jerome Guitton <guitton@adacore.com>
6470
6471 * ada-lang.c (ada_array_length): Use ada_index_type instead of
6472 TYPE_INDEX_TYPE.
6473
cc0e770c
JB
64742018-01-05 Joel Brobecker <brobecker@adacore.com>
6475
6476 * ada-lang.c (ada_to_fixed_value_create): Add handling of
6477 the case where VALUE_LVAL (val0) is not lval_memory.
6478
f79da888 64792018-01-05 Xavier Roirand <roirand@adacore.com>
e3861a03
XR
6480
6481 * ada-valprint.c (print_optional_low_bound): Handle
6482 character-indexed array printing like boolean-indexed array
6483 printing.
6484
cd385f94
JB
64852018-01-05 Joel Brobecker <brobecker@adacore.com>
6486
6487 * NEWS: Create a new section for the next release branch.
6488 Rename the section of the current branch, now that it has
6489 been cut.
6490
09aca949
JB
64912018-01-05 Joel Brobecker <brobecker@adacore.com>
6492
6493 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
6494 * version.in: Bump version to 8.1.50.DATE-git.
6495
9f757bf7
XR
64962018-01-03 Xavier Roirand <roirand@adacore.com>
6497
6498 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
6499 Add field.
6500 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
6501 Add field.
6502 (default_exception_support_info) <catch_handlers_sym>: Add field.
6503 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
6504 (ada_exception_name_addr_1): Add "catch handlers" handling.
6505 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
6506 Update all callers.
6507 (create_excep_cond_exprs) <ex>: Add parameter.
6508 (re_set_exception): Update create_excep_cond_exprs call.
6509 (print_it_exception, print_one_exception, print_mention_exception)
6510 (print_recreate_exception): Add "catch handler" handling.
6511 (allocate_location_catch_handlers, re_set_catch_handlers)
6512 (check_status_catch_handlers, print_it_catch_handlers)
6513 (print_one_catch_handlers, print_mention_catch_handlers)
6514 (print_recreate_catch_handlers): New function.
6515 (catch_handlers_breakpoint_ops): New variable.
6516 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
6517 Add parameter. Add "catch handler" handling.
6518 (ada_exception_sym_name, ada_exception_breakpoint_ops):
6519 Add "catch handler" handling.
6520 (ada_exception_catchpoint_cond_string): Add "catch handler"
6521 handling.
6522 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
6523 call.
6524 (catch_ada_handlers_command): New function.
6525 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
6526 operations structure.
6527 (_initialize_ada_language): Add "catch handlers" command entry.
6528 * NEWS: Document "catch handlers" feature.
6529
9fe561ab
JB
65302018-01-02 Joel Brobecker <brobecker@adacore.com>
6531
6532 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
6533 account when creating the array type of the slice.
6534 (ada_value_slice): Likewise.
6535
a405673c
JB
65362018-01-02 Joel Brobecker <brobecker@adacore.com>
6537
6538 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
6539 New enum value.
6540 (create_array_type_with_stride): Add byte_stride_prop parameter.
6541 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
6542 New parameter. Update all callers in this file.
6543 (array_type_has_dynamic_stride): New function.
6544 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
6545 of arrays with dynamic byte strides.
6546 * dwarf2read.c (read_array_type): Add support for dynamic
6547 DW_AT_byte_stride attributes.
6548
74a2f8ff
JB
65492018-01-02 Joel Brobecker <brobecker@adacore.com>
6550
6551 * dwarf2read.c (read_unspecified_type): Treat
6552 DW_TAG_enumeration_type DIEs from Ada units as stubs.
6553
e2882c85
JB
65542018-01-01 Joel Brobecker <brobecker@adacore.com>
6555
6556 Update copyright year range in all GDB files.
6557
1690bb24
JB
65582018-01-01 Joel Brobecker <brobecker@adacore.com>
6559
6560 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
6561 and gdb/testsuite/gdb.base/step-line.c.
6562
0f0c98a8
JB
65632018-01-01 Joel Brobecker <brobecker@adacore.com>
6564
6565 * copyright.py (main): Dump the contents of
6566 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
6567 even if BY_HAND is empty.
6568
82e1e79a
JB
65692018-01-01 Joel Brobecker <brobecker@adacore.com>
6570
6571 * top.c (print_gdb_version): Update Copyright year in version
6572 message.
6573
053f54e5 65742018-01-01 Joel Brobecker <brobecker@adacore.com>
47fea877 6575
053f54e5 6576 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
47fea877 6577
053f54e5 6578For older changes see ChangeLog-2017.
c906108c
SS
6579\f
6580Local Variables:
6581mode: change-log
6582left-margin: 8
6583fill-column: 74
6584version-control: never
57da7796 6585coding: utf-8
c906108c 6586End: