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