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