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