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