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