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