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