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