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