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