Fix Cygwin compilation after target_ops C++ conversion.
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
2
3 * windows-nat.c (windows_nat_target::create_inferior): Update to
4 call close() in global namespace.
5
6 2018-07-26 Tom Tromey <tom@tromey.com>
7
8 * dwarf-index-write.c (add_address_entry): Don't add objfile
9 offsets.
10 * dbxread.c (find_stab_function): Rename from
11 find_stab_function_addr. Return a bound_minimal_symbol.
12 (read_dbx_symtab): Use raw_text_low, raw_text_high.
13 Don't add objfile offsets.
14 (end_psymtab): Use raw_text_low, raw_text_high,
15 MSYMBOL_VALUE_RAW_ADDRESS.
16 (read_ofile_symtab): Update.
17 (process_one_symbol): Update.
18 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
19 offsets.
20 (dw2_relocate): Remove.
21 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
22 searching addrmap.
23 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
24 Update.
25 (process_psymtab_comp_unit_reader, add_partial_symbol)
26 (add_partial_subprogram, dwarf2_ranges_read): Update.
27 (load_partial_dies): Update.
28 (add_address_entry): Don't add objfile offsets.
29 (dwarf2_build_include_psymtabs): Update.
30 (create_addrmap_from_aranges): Don't add objfile offsets.
31 (dw2_find_pc_sect_compunit_symtab): Update.
32 * mdebugread.c (parse_symbol): Don't add objfile offsets.
33 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
34 Update.
35 (parse_partial_symbols): Don't add objfile offsets. Use
36 raw_text_low, raw_text_high. Update.
37 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
38 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
39 or call 'relocate' quick function. Clear psymbol_map.
40 * psympriv.h (struct partial_symbol) <address>: Add section
41 offset.
42 <set_unrelocated_address>: Rename from set_address.
43 <raw_text_low, raw_text_high>: New methods.
44 <text_low, text_high>: Add objfile parameter.
45 (add_psymbol_to_bcache): Add 'section' parameter. Call
46 set_unrelocated_address.
47 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
48 (find_pc_psymbol): Update.
49 (fixup_psymbol_section, relocate_psymtabs): Remove.
50 (dump_psymtab, psym_functions): Update.
51 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
52 parameter.
53 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
54 (start_psymtab_common): Update.
55 * symfile-debug.c (debug_qf_relocate): Remove.
56 (debug_sym_quick_functions): Update.
57 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
58 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
59 Update.
60
61 2018-07-26 Tom Tromey <tromey@redhat.com>
62
63 * dbxread.c (end_psymtab): Use text_high_valid and
64 text_low_valid.
65 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
66 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
67 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
68 Update comment.
69 <text_low_valid, text_high_valid>: New fields.
70 <set_text_low, set_text_high>: Update.
71 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
72
73 2018-07-26 Tom Tromey <tom@tromey.com>
74
75 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
76 Update.
77 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
78 textlow and texthigh fields.
79 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
80 Update.
81 * mdebugread.c (parse_lines, parse_partial_symbols)
82 (psymtab_to_symtab_1): Update.
83 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
84 Rename fields. Update comment. Now private.
85 <text_low, text_high, set_text_low, set_text_high>: New methods.
86 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
87 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
88 (start_psymtab_common, maintenance_info_psymtabs)
89 (maintenance_check_psymtabs): Update.
90 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
91 texthigh fields.
92 (scan_xcoff_symtab): Update.
93
94 2018-07-26 Tom Tromey <tromey@redhat.com>
95
96 * psympriv.h (struct partial_symbol) <unrelocated_address,
97 address, set_address>: New methods.
98 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
99 (fixup_psymbol_section, relocate_psymtabs): Update.
100 (print_partial_symbols): Add 'objfile' parameter. Update.
101 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
102 Update.
103
104 2018-07-26 Tom Tromey <tom@tromey.com>
105
106 * dwarf-index-write.c (write_psymbols, debug_names::insert)
107 (debug_names::write_psymbols): Update.
108 * psympriv.h (struct partial_symbol): Derive from
109 general_symbol_info.
110 <obj_section>: New method.
111 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
112 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
113 (find_pc_sect_psymbol, fixup_psymbol_section)
114 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
115 (print_partial_symbols, recursively_search_psymtabs)
116 (compare_psymbols, psymbol_hash, psymbol_compare)
117 (add_psymbol_to_bcache, maintenance_check_psymtabs)
118 (psymbol_name_matches, psym_fill_psymbol_map): Update.
119
120 2018-07-26 Tom Tromey <tromey@redhat.com>
121
122 * dbxread.c (end_psymtab): Remove dead code.
123
124 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
125
126 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
127 DWARF unwinders are disabled.
128 * dwarf2-frame.c: Add dwarf2read.h include.
129 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
130 disabled.
131 (dwarf2_frame_unwinders_enabled_p): Define.
132 (show_dwarf_unwinders_enabled_p): New function.
133 (_initialize_dwarf2_frame): Register switch to control DWARF
134 unwinder use.
135 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
136 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
137 (show_dwarf_cmdlist): Remove static keyword.
138 * dwarf2read.h (set_dwarf_cmdlist): Declare.
139 (show_dwarf_cmdlist): Declare.
140 * NEWS: Document new feature.
141
142 2018-07-26 Tom de Vries <tdevries@suse.de>
143
144 PR breakpoints/23366
145 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
146
147 2018-07-26 Tom de Vries <tdevries@suse.de>
148
149 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
150 DW_AT_count can't be translated to a dynamic prop.
151
152 2018-07-25 Tom de Vries <tdevries@suse.de>
153
154 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
155 try/catch.
156
157 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
158
159 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
160
161 2018-07-25 Joel Brobecker <brobecker@adacore.com>
162
163 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
164
165 2018-07-24 Keith Seitz <keiths@redhat.comt
166
167 PR symtab/23010
168 * dwarf2read.c (dw2_add_symbol_to_list): New function.
169 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
170 instead of add_symbol_to_list.
171 (read_file_scope): Call prepare_one_comp_unit before reading
172 any other DIEs.
173
174 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
175
176 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
177
178 2018-07-24 Tom Tromey <tom@tromey.com>
179
180 * utils.c (malloc, realloc, free): Don't declare.
181 * configure, config.in: Rebuild.
182 * configure.ac: Don't check for declarations of free, malloc, or
183 realloc.
184
185 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
186
187 * aarch64-linux-nat.c
188 (aarch64_linux_nat_target::stopped_data_address): Remove unused
189 variable.
190 * arm-linux-nat.c (fetch_regs): Likewise.
191 (store_regs): Likewise.
192 (fetch_vfp_regs): Likewise.
193 (store_vfp_regs): Likewise.
194 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
195 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
196 (arm_linux_nat_target::insert_watchpoint): Likewise.
197 (arm_linux_nat_target::remove_watchpoint): Likewise.
198 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
199 Likewise.
200 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
201 Likewise.
202 * ppc-linux-nat.c (fetch_register): Likewise.
203 (fetch_all_gp_regs): Likewise.
204 (fetch_ppc_registers): Likewise.
205 (store_all_gp_regs): Likewise.
206 (store_ppc_registers): Likewise.
207 (hwdebug_insert_point): Likewise.
208 (can_use_watchpoint_cond_accel): Likewise.
209 * remote-sim.c (gdb_os_write_stdout): Likewise.
210
211 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
212 Tom Tromey <tom@tromey.com>
213
214 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
215 test for it.
216 * configure: Rebuild.
217
218 2018-07-22 Tom Tromey <tom@tromey.com>
219
220 * regformats/regdat.sh: Define xmltarget_${name} inside
221 #ifndef IN_PROCESS_AGENT.
222
223 2018-07-22 Tom Tromey <tom@tromey.com>
224
225 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
226
227 2018-07-22 Tom Tromey <tom@tromey.com>
228
229 * symfile.c (reread_symbols): Notify iter, not objfile.
230
231 2018-07-22 Tom Tromey <tom@tromey.com>
232
233 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
234 Use arch_ops.
235 (ravenscar_thread_target::prepare_to_store): Likewise.
236
237 2018-07-22 Tom Tromey <tom@tromey.com>
238
239 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
240 unused variable. Call value_fetch_lazy when needed.
241 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
242 Remove unused variable. Call value_fetch_lazy when needed.
243
244 2018-07-22 Tom Tromey <tom@tromey.com>
245
246 * m32c-tdep.c (mark_dma): Return void.
247 (make_regs): Remove unused declarations.
248
249 2018-07-22 Tom Tromey <tom@tromey.com>
250
251 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
252 cmdscm_get_valid_command_smob_arg_unsafe for effect.
253 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
254 bkscm_get_valid_block_smob_arg_unsafe for effect.
255
256 2018-07-22 Tom Tromey <tom@tromey.com>
257
258 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
259 value_type.
260
261 2018-07-22 Tom Tromey <tom@tromey.com>
262
263 * windows-nat.c (saved_context): Conditionally define.
264 * remote.c (remote_target::remote_btrace_maybe_reopen):
265 Conditionally declare "warned".
266 * inflow.c (sigquit_ours): Conditionally define.
267 (new_tty): Move "tty" declaration inside #if.
268 * guile/guile.c (guile_datadir): Conditionally define.
269 * charset.c (set_be_le_names): Move some declarations inside #if.
270 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
271 #if.
272 (parse_xml_btrace_conf): Likewise.
273
274 2018-07-22 Tom Tromey <tom@tromey.com>
275
276 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
277
278 2018-07-22 Tom Tromey <tom@tromey.com>
279
280 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
281 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
282 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
283 * buildsym-legacy.c (get_macro_table): Remove unused variable.
284 * stack.c (frame_apply_level_command): Remove unused variable.
285 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
286 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
287 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
288 unused variable.
289 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
290 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
291 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
292 variable.
293 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
294 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
295 variable.
296 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
297 Remove unused variable.
298 * cli/cli-script.c (recurse_read_control_structure): Remove unused
299 variable.
300 * common/tdesc.c (print_xml_feature::visit): Remove unused
301 variable.
302 * compile/compile-object-load.c (store_regs): Remove unused
303 variables.
304 * complaints.c (clear_complaints): Remove unused variable.
305 * corelow.c (core_target_open): Remove unused variable.
306 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
307 variable.
308 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
309 variable.
310 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
311 variable.
312 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
313 variable.
314 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
315 variable.
316 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
317 variable.
318 * ia64-tdep.c (examine_prologue): Remove unused variable.
319 * infcall.c (run_inferior_call): Remove unused variable.
320 * inferior.c (exit_inferior): Remove unused variable.
321 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
322 * linespec.c (decode_line_2): Remove unused variable.
323 * linux-nat.c (super_close): Remove.
324 * linux-tdep.c (linux_info_proc): Remove unused variable.
325 * mi/mi-main.c (mi_execute_command): Remove unused variable.
326 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
327 Remove unused variable.
328 * parse.c (find_minsym_type_and_address): Remove unused variable.
329 * printcmd.c (info_symbol_command, printf_floating): Remove unused
330 variable.
331 * python/py-breakpoint.c (bppy_set_commands): Remove unused
332 variable.
333 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
334 variables.
335 * record-btrace.c (record_btrace_target::store_registers): Remove
336 unused variable.
337 (cmd_show_record_btrace_cpu): Remove unused variable.
338 * riscv-tdep.c (riscv_register_reggroup_p)
339 (riscv_push_dummy_call, riscv_return_value): Remove unused
340 variable.
341 * rust-exp.y (literal): Remove unused variable.
342 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
343 unused variable.
344 <STRUCTOP_ANONYMOUS>: Likewise.
345 * s390-linux-tdep.c (s390_linux_init_abi_31)
346 (s390_linux_init_abi_64): Remove unused variable.
347 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
348 (file_select_thread, net_windows_open, _initialize_ser_windows):
349 Remove unused variables.
350 * symtab.c (find_pc_sect_line): Remove unused variable.
351 * target-memory.c (compute_garbled_blocks): Remove unused
352 variable.
353 (target_write_memory_blocks): Remove unused variable.
354 * target.c (target_stack::unpush): Remove unused variables.
355 * tracepoint.c (start_tracing, all_tracepoint_actions)
356 (merge_uploaded_trace_state_variables)
357 (print_one_static_tracepoint_marker): Remove unused variable.
358 * unittests/basic_string_view/element_access/char/1.cc (test01):
359 Remove unused variable.
360 * windows-nat.c (windows_continue, windows_add_all_dlls)
361 (do_initial_windows_stuff, windows_nat_target::create_inferior):
362 Remove unused variables.
363
364 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
365
366 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
367 attr_profile in HAVE_ELF.
368 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
369 HAVE_ELF.
370
371 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
372
373 * frame.c (frame_register_unwind): Change parameter name.
374 (frame_unwind_register): Likewise.
375 (frame_unwind_register_value): Likewise.
376 (frame_unwind_register_signed): Likewise.
377 (frame_unwind_register_unsigned): Likewise.
378 * frame.h (frame_register_unwind): Likewise.
379 (frame_unwind_register): Likewise.
380 (frame_unwind_register_value): Likewise.
381 (frame_unwind_register_signed): Likewise.
382 (frame_unwind_register_unsigned): Likewise.
383 (frame_unwind_arch): Likewise.
384
385 2018-07-20 Maciej W. Rozycki <macro@mips.com>
386
387 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
388 ISA maintenance.
389
390 2018-07-20 Maciej W. Rozycki <macro@mips.com>
391
392 * mips-linux-nat.c (mips_linux_nat_target::read_description):
393 Call `get_ptrace_pid' rather than extracting the ptrace PID by
394 hand.
395
396 2018-07-20 Keith Seitz <keiths@redhat.com>
397
398 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
399 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
400 m_compunit_symtab, m_language>: Add "m_" prefix.
401 Update all uses.
402 * buildsym.c: Update all uses.
403
404 2018-07-20 Tom Tromey <tom@tromey.com>
405
406 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
407 * buildsym.h (record_line_ftype): Remove typedef.
408
409 2018-07-20 Tom Tromey <tom@tromey.com>
410
411 * buildsym-legacy.h (augment_type_symtab): Don't declare.
412 (end_expandable_symtab): Likewise.
413 (end_symtab_get_static_block): Likewise.
414 (end_symtab_from_static_block): Likewise.
415 * buildsym-legacy.c (augment_type_symtab): Remove.
416 (end_expandable_symtab): Remove.
417 (end_symtab_get_static_block): Remove.
418 (end_symtab_from_static_block): Remove.
419
420 2018-07-20 Tom Tromey <tom@tromey.com>
421
422 * dwarf2read.c: Include buildsym.h.
423 (struct dwarf2_cu) <builder>: New method.
424 (fixup_go_packaging): Update.
425 (process_full_comp_unit, process_full_type_unit): Update. Don't
426 use scoped_free_pendings.
427 (using_directives): Add "cu" parameter, remove "language".
428 (read_import_statement, setup_type_unit_groups, )
429 (read_func_scope, read_lexical_block_scope)
430 (dwarf2_record_block_ranges, read_namespace): Update.
431 (lnp_state_machine::lnp_state_machine): Add cu parameter.
432 (lnp_state_machine::handle_end_sequence): Update.
433 (class lnp_state_machine) <m_cu>: New member.
434 <m_record_line_callback>: Remove.
435 <m_currently_recording_lines>: New member.
436 (lnp_state_machine::handle_set_file): Update.
437 (noop_record_line): Remove.
438 (dwarf_record_line_p): Add cu parameter.
439 (dwarf_record_line_1, dwarf_finish_line): Likewise.
440 (lnp_state_machine::record_line)
441 (lnp_state_machine::lnp_state_machine)
442 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
443 (dwarf_decode_lines): Update.
444 (dwarf2_start_subfile): Add cu parameter.
445 (dwarf2_start_symtab, new_symbol): Update.
446 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
447 Remove dwarf2_per_objfile parameter.
448 (dwarf_decode_macros): Update.
449
450 2018-07-20 Tom Tromey <tom@tromey.com>
451
452 * stabsread.c (define_symbol): Update.
453 * buildsym-legacy.h (get_buildsym_compunit): Declare.
454 * dwarf2read.c (new_symbol): Update.
455 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
456 * cp-namespace.c: Include buildsym.h.
457 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
458 * buildsym-legacy.c (get_buildsym_compunit): New function.
459
460 2018-07-20 Tom Tromey <tom@tromey.com>
461
462 * xcoffread.c: Include buildsym-legacy.h.
463 * windows-nat.c: Include buildsym-legacy.h.
464 * stabsread.c: Include buildsym-legacy.h.
465 * mdebugread.c: Include buildsym-legacy.h.
466 * buildsym-legacy.h: New file.
467 * buildsym-legacy.c: New file, from buildsym.c.
468 * go32-nat.c: Include buildsym-legacy.h.
469 * dwarf2read.c: Include buildsym-legacy.h.
470 * dbxread.c: Include buildsym-legacy.h.
471 * cp-namespace.c: Include buildsym-legacy.h.
472 * coffread.c: Include buildsym-legacy.h.
473 * buildsym.h: Move some contents to buildsym-legacy.h.
474 * buildsym.c: Include buildsym-legacy.h. Move many functions to
475 buildsym-legacy.c.
476 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
477
478 2018-07-20 Tom Tromey <tom@tromey.com>
479
480 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
481 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
482 (buildsym_compunit::buildsym_compunit)
483 (buildsym_compunit::~buildsym_compunit)
484 (buildsym_compunit::get_macro_table): Define.
485
486 2018-07-20 Tom Tromey <tom@tromey.com>
487
488 * buildsym.c (reset_symtab_globals): Remove.
489 (buildsym_compunit::end_symtab_from_static_block): Update.
490 (buildsym_compunit::augment_type_symtab): Update.
491 (end_symtab_from_static_block): Call free_buildsym_compunit.
492 (augment_type_symtab, end_symtab, end_expandable_symtab):
493 Likewise.
494
495 2018-07-20 Tom Tromey <tom@tromey.com>
496
497 * arch-utils.c: Do not include buildsym.h.
498 * mipsread.c: Do not include buildsym.h.
499 * machoread.c: Do not include buildsym.h.
500 * elfread.c: Do not include buildsym.h.
501
502 2018-07-20 Tom Tromey <tom@tromey.com>
503
504 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
505 initialization.
506 (buildsym_compunit): Add new constructor.
507 (struct buildsym_compunit) <get_last_source_file, finish_block,
508 record_block_range, start_subfile, patch_subfile_names,
509 push_subfile, pop_subfile, record_line, get_compunit_symtab,
510 set_last_source_start_addr, get_last_source_start_addr,
511 get_local_using_directives, set_local_using_directives,
512 get_global_using_directives, outermost_context_p,
513 get_current_context_stack, get_context_stack_depth,
514 get_current_subfile, get_local_symbols, get_file_symbols,
515 get_global_symbols, record_debugformat, record_producer,
516 push_context, pop_context, end_symtab_get_static_block,
517 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
518 New public methods.
519 <record_pending_block, finish_block_internal, make_blockvector,
520 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
521 private methods.
522 Update all users.
523
524 2018-05-22 Tom Tromey <tom@tromey.com>
525
526 * buildsym.c (record_pending_block): Move earlier. Remove objfile
527 parameter.
528 (finish_block_internal): Update.
529
530 2018-07-20 Tom Tromey <tom@tromey.com>
531
532 * buildsym.c (record_pending_block): Move earlier. Remove objfile
533 parameter.
534 (finish_block_internal): Update.
535
536 2018-07-20 Tom Tromey <tom@tromey.com>
537
538 * buildsym.h (EXTERN): Don't define or undef.
539 * buildsym.c (EXTERN): Don't define.
540
541 2018-07-20 Tom Tromey <tom@tromey.com>
542
543 * buildsym.c: Remove TODO comment.
544
545 2018-07-20 Tom Tromey <tom@tromey.com>
546
547 * coffread.c (coff_symtab_read): Update.
548 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
549 (xcoff_new_init): Update.
550 * mipsread.c (mipscoff_new_init): Update.
551 * mdebugread.c (mdebug_build_psymtabs): Update.
552 * elfread.c (elf_new_init): Update.
553 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
554 Update.
555 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
556 (coffstab_build_psymtabs, elfstab_build_psymtabs)
557 (stabsect_build_psymtabs): Update.
558 * buildsym.h (buildsym_init): Don't declare.
559 * buildsym.c: Update comment.
560 (prepare_for_building): Remove.
561 (start_symtab, restart_symtab): Update.
562 (reset_symtab_globals): Update comment.
563 (buildsym_init): Remove.
564
565 2018-07-20 Tom Tromey <tom@tromey.com>
566
567 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
568 * stabsread.c (patch_block_stabs, define_symbol, read_type)
569 (read_enum_type, common_block_start, common_block_end)
570 (cleanup_undefined_types_1, finish_global_stabs): Update.
571 * mdebugread.c (psymtab_to_symtab_1): Update.
572 * dwarf2read.c (fixup_go_packaging, read_func_scope)
573 (read_lexical_block_scope, new_symbol): Update.
574 * dbxread.c (process_one_symbol): Update.
575 * coffread.c (coff_symtab_read, process_coff_symbol)
576 (coff_read_enum_type): Update.
577 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
578 declare.
579 (get_local_symbols, get_file_symbols, get_global_symbols): New
580 functions.
581 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
582 m_global_symbols.
583 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
584 (~scoped_free_pendings): Update.
585 (finish_block, prepare_for_building, reset_symtab_globals)
586 (end_symtab_get_static_block, end_symtab_with_blockvector)
587 (augment_type_symtab, push_context): Update.
588 (get_local_symbols, get_file_symbols, get_global_symbols): New
589 functions.
590 (buildsym_init): Update.
591
592 2018-07-20 Tom Tromey <tom@tromey.com>
593
594 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
595 (process_full_type_unit): Likewise.
596 (dwarf2_start_symtab): Set list_in_scope.
597
598 2018-07-20 Tom Tromey <tom@tromey.com>
599
600 * dwarf2read.c (process_psymtab_comp_unit_reader)
601 (build_type_psymtabs_reader): Do not set list_in_scope.
602
603 2018-07-20 Tom Tromey <tom@tromey.com>
604
605 * buildsym.c (free_pendings): Remove.
606 (add_symbol_to_list, scoped_free_pendings)
607 (finish_block_internal, buildsym_init): Update.
608
609 2018-07-20 Tom Tromey <tom@tromey.com>
610
611 * xcoffread.c (read_xcoff_symtab): Update.
612 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
613 Update.
614 * dbxread.c (process_one_symbol): Update.
615 * coffread.c (coff_symtab_read): Update.
616 * buildsym.h (finish_block): Update.
617 * buildsym.c (finish_block): Remove "listhead" argument.
618 (end_symtab_get_static_block): Update.
619
620 2018-07-20 Tom Tromey <tom@tromey.com>
621
622 * buildsym.h (class scoped_free_pendings): Remove constructor.
623 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
624 method.
625 <m_pending_block_obstack, m_pending_blocks>: New members.
626 (pending_block_obstack, pending_blocks): Remove.
627 (scoped_free_pendings::scoped_free_pendings): Default.
628 (~scoped_free_pendings): Update.
629 (free_pending_blocks): Remove.
630 (finish_block_internal, record_pending_block, make_blockvector)
631 (end_symtab_get_static_block, augment_type_symtab, push_context)
632 (buildsym_init): Update.
633
634 2018-07-20 Tom Tromey <tom@tromey.com>
635
636 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
637 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
638 members.
639 (pending_addrmap, pending_addrmap_obstack)
640 (pending_addrmap_interesting): Remove.
641 (scoped_free_pendings, record_block_range, make_blockvector)
642 (prepare_for_building, reset_symtab_globals, buildsym_init):
643 Update.
644
645 2018-07-20 Tom Tromey <tom@tromey.com>
646
647 * xcoffread.c (process_linenos): Update.
648 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
649 * mdebugread.c (psymtab_to_symtab_1): Update.
650 * dwarf2read.c (setup_type_unit_groups)
651 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
652 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
653 * dbxread.c (process_one_symbol): Update.
654 * coffread.c (coff_symtab_read, enter_linenos)
655 (process_coff_symbol): Update.
656 * buildsym.h (current_subfile): Don't declare.
657 (get_current_subfile): Declare.
658 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
659 member.
660 (start_subfile, free_buildsym_compunit, push_subfile)
661 (prepare_for_building, start_symtab): Update.
662 (get_current_subfile): New function.
663
664 2018-07-20 Tom Tromey <tom@tromey.com>
665
666 * coffread.c (coff_symtab_read): Update.
667 * xcoffread.c (read_xcoff_symtab): Update.
668 * dwarf2read.c (new_symbol): Update.
669 (read_func_scope, read_lexical_block_scope): Update.
670 * dbxread.c (process_one_symbol): Update.
671 * buildsym.h (context_stack, context_stack_depth): Don't declare.
672 (outermost_context_p): Remove macro.
673 (outermost_context_p, get_current_context_stack)
674 (get_context_stack_depth): Declare.
675 (pop_context): Return struct context_stack.
676 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
677 member.
678 (context_stack_size): Remove.
679 (INITIAL_CONTEXT_STACK_SIZE): Remove.
680 (prepare_for_building, end_symtab_get_static_block)
681 (augment_type_symtab, push_context): Update.
682 (pop_context): Return struct context_stack.
683 (outermost_context_p, get_current_context_stack)
684 (get_context_stack_depth): New functions.
685 (buildsym_init): Update.
686
687 2018-07-20 Tom Tromey <tom@tromey.com>
688
689 * rust-exp.y: Now a pure parser. Update all rules.
690 (%union): Move earlier.
691 (current_parser, work_obstack): Remove globals.
692 (rust_parser, ~rust_parser): Update.
693 (class rust_parser) <copy_name, concat3, crate_name, super_name,
694 lex_character, lex_number, lex_string, lex_identifier,
695 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
696 convert_name, convert_params_to_expression,
697 convert_ast_to_expression, ast_basic_type, ast_operation,
698 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
699 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
700 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
701 ast_array_type, ast_slice_type, ast_reference_type,
702 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
703 (rust_parse): Update.
704 (rustyyerror, rustyylex): Add parser parameter.
705 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
706 (rust_lex_stringish_test, rust_lex_test_sequence)
707 (rust_lex_test_trailing_dot, rust_lex_test_completion)
708 (rust_lex_test_push_back, rust_lex_tests): Update.
709
710 2018-07-19 Pedro Alves <palves@redhat.com>
711
712 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
713 gdb::unique_xmalloc_ptr.
714 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
715 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
716 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
717 copy-initialization.
718 * guile/scm-pretty-print.c (ppscm_print_children): Use
719 gdb::unique_xmalloc_ptr instead of cleanups.
720 (gdbscm_apply_val_pretty_printer): Remove cleanups.
721 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
722 gdb::unique_xmalloc_ptr.
723 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
724 Adjust to use gdb::unique_xmalloc_ptr.
725 * guile/scm-utils.c (extract_arg): Adjust.
726 * guile/scm-value.c (gdbscm_value_field): Adjust to use
727 gdb::unique_xmalloc_ptr instead of a cleanup.
728
729 2018-07-19 Tom Tromey <tom@tromey.com>
730
731 * utils.c (do_value_free_to_mark)
732 (make_cleanup_value_free_to_mark): Remove.
733 * utils.h (make_cleanup_value_free_to_mark): Remove.
734
735 2018-07-19 Pedro Alves <palves@redhat.com>
736
737 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
738 forwarding reference.
739
740 2018-07-18 Pedro Alves <palves@redhat.com>
741
742 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
743 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
744 cleanup.
745
746 2018-07-18 Pedro Alves <palves@redhat.com>
747
748 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
749 exceptions.
750 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
751 (gdbscm_wrap): New.
752 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
753 directly instead of a cleanup.
754 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
755 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
756 (vlscm_binop_gdbthrow): New, factored out from ...
757 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
758 (vlscm_rich_compare): Use gdbscm_wrap.
759 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
760 instead of a cleanup.
761 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
762 cleanup.
763 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
764 Use xfree directly instead of a cleanup.
765 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
766 Adjust to use gdbscm_wrap and scoped_value_mark.
767 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
768 (gdbscm_value_address, gdbscm_value_dereference)
769 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
770 scoped_value_mark.
771 (gdbscm_value_dynamic_type): Use scoped_value_mark.
772 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
773 scoped_value_mark.
774 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
775 gdbscm_wrap and scoped_value_mark.
776 (gdbscm_value_to_string): Use xfree directly instead of a
777 cleanup. Move 'buffer' unique_ptr to TRY scope.
778 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
779 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
780 scoped_value_mark.
781 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
782 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
783 scoped_value_mark.
784 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
785 gdbscm_wrap.
786
787 2018-07-18 Tom de Vries <tdevries@suse.de>
788
789 * findvar.c (default_read_var_value): Also resolve dynamic type for
790 LOC_OPTIMIZED_OUT vars.
791
792 2018-07-18 Maciej W. Rozycki <macro@mips.com>
793
794 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
795 decoding.
796
797 2018-07-17 Tom Tromey <tom@tromey.com>
798
799 * guile/scm-param.c (pascm_set_func, pascm_show_func)
800 (compute_enum_list, pascm_set_param_value_x)
801 (gdbscm_parameter_value): Update.
802 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
803 (gdbscm_scm_to_host_string): Update.
804 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
805 Update.
806 * guile/scm-cmd.c (cmdscm_add_completion): Update.
807 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
808 * guile/scm-string.c (gdbscm_scm_to_string): Return
809 unique_xmalloc_ptr.
810 (gdbscm_scm_to_host_string): Likewise.
811
812 2018-07-17 Tom Tromey <tom@tromey.com>
813
814 * guile/guile.c (gdbscm_eval_from_control_command): Update.
815 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
816 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
817 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
818 unique_xmalloc_ptr.
819
820 2018-07-17 Tom Tromey <tom@tromey.com>
821
822 * guile/scm-param.c (pascm_signal_setshow_error): Update.
823 * guile/guile-internal.h (gdbscm_exception_message_to_string):
824 Update.
825 * guile/scm-cmd.c (cmdscm_function): Update.
826 * guile/scm-pretty-print.c
827 (ppscm_print_exception_unless_memory_error): Update.
828 * guile/scm-exception.c (gdbscm_exception_message_to_string):
829 Return unique_xmalloc_ptr.
830
831 2018-07-17 Tom Tromey <tom@tromey.com>
832
833 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
834 Use string_printf.
835
836 2018-07-17 Jim Wilson <jimw@sifive.com>
837
838 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
839 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
840 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
841 unecessary braces after EF_RISCV_RVC test. Delete call to
842 set_gdbarch_decr_pc_after_break.
843
844 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
845 RISCV_LAST_FP_REGNUM + 1.
846 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
847
848 2018-07-17 Tom Tromey <tom@tromey.com>
849
850 * configure.ac: Remove --disable-gdbcli.
851 * configure: Rebuild.
852 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
853 (SUBDIR_CLI_CFLAGS): Remove.
854 (SFILES): Use SUBDIR_CLI_SRCS.
855 (COMMON_OBS): Use SUBDIR_CLI_OBS.
856
857 2018-07-17 Tom Tromey <tom@tromey.com>
858
859 PR gdb/18624:
860 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
861
862 2018-07-16 Jim Wilson <jimw@sifive.com>
863
864 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
865
866 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
867
868 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
869 variable.
870 (libunwind_frame_sniffer): Likewise.
871 (libunwind_frame_prev_register): Likewise.
872 (libunwind_sigtramp_frame_sniffer): Likewise.
873 * ia64-tdep.c (ia64_access_reg): Likewise.
874 (ia64_access_rse_reg): Likewise.
875 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
876 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
877
878 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
879
880 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
881
882 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
883
884 * remote-sim.c (gdbsim_target::close,
885 gdbsim_target::mourn_inferior): Remove unused variables.
886
887 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
888
889 * ia64-tdep.c (ktab_buf): New global.
890 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
891 (get_kernel_table): Adjust.
892
893 2018-07-16 Tom Tromey <tom@tromey.com>
894
895 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
896 * dwarf2read.c (using_directives, new_symbol): Use
897 outermost_context_p.
898 * dbxread.c (process_one_symbol): Use outermost_context_p.
899 * coffread.c (coff_symtab_read): Use outermost_context_p.
900
901 2018-07-16 Tom Tromey <tom@tromey.com>
902
903 * dwarf2read.c (using_directives, read_func_scope)
904 (read_lexical_block_scope): Update.
905 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
906 * buildsym.h (local_using_directives, global_using_directives):
907 Don't declare.
908 (get_local_using_directives, set_local_using_directives)
909 (get_global_using_directives): Declare.
910 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
911 m_global_using_directives>: New members.
912 (finish_block_internal, prepare_for_building)
913 (reset_symtab_globals, end_symtab_get_static_block)
914 (push_context): Update.
915 (get_local_using_directives, set_local_using_directives)
916 (get_global_using_directives): New functions.
917 (buildsym_init): Update.
918
919 2018-07-16 Tom Tromey <tom@tromey.com>
920
921 * xcoffread.c (xcoff_initial_scan): Don't call
922 free_pending_blocks.
923 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
924 * buildsym.h (class scoped_free_pendings): Add constructor.
925 (free_pending_blocks): Don't declare.
926 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
927 (free_pending_blocks): Now static.
928
929 2018-07-16 Tom Tromey <tom@tromey.com>
930
931 * buildsym.h (push_subfile, pop_subfile): Update declarations.
932 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
933 member.
934 (struct subfile_stack): Remove.
935 (subfile_stack): Remove.
936 (push_subfile, pop_subfile, buildsym_init): Update.
937
938 2018-07-16 Tom Tromey <tom@tromey.com>
939
940 * buildsym.c (push_subfile): Use gdb_assert.
941 (pop_subfile): Use gdb_assert.
942
943 2018-07-16 Tom Tromey <tom@tromey.com>
944
945 * buildsym.h (merge_symbol_lists): Remove.
946 * buildsym.c (merge_symbol_lists): Remove.
947
948 2018-07-16 Tom Tromey <tom@tromey.com>
949
950 * stabsread.c (scan_file_globals): Update comment.
951 * stabsread.h (scan_file_globals): Move from buildsym.h.
952 * buildsym.h (scan_file_globals): Move to stabsread.h.
953
954 2018-07-16 Tom Tromey <tom@tromey.com>
955
956 * xcoffread.c (xcoff_new_init): Update.
957 * mipsread.c (mipscoff_new_init): Update.
958 * mdebugread.c (mdebug_build_psymtabs): Update.
959 * elfread.c (elf_new_init): Update.
960 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
961 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
962 * buildsym.h (buildsym_new_init): Don't declare.
963 * buildsym.c (buildsym_new_init): Remove.
964
965 2018-07-16 Tom Tromey <tom@tromey.com>
966
967 * stabsread.h (within_function): Move from buildsym.h.
968 * stabsread.c (start_stabs): Clear within_function.
969 * coffread.c (coff_start_symtab): Clear within_function.
970 * buildsym.h (within_function): Move to stabsread.h.
971 * buildsym.c (prepare_for_building): Update.
972
973 2018-07-16 Tom Tromey <tom@tromey.com>
974
975 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
976 * dwarf2read.c (dwarf2_start_symtab): Don't set
977 processing_gcc_compilation.
978 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
979
980 2018-07-16 Tom Tromey <tom@tromey.com>
981
982 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
983 (next_symbol_text_func): Move from buildsym.h.
984 * stabsread.c (hashname): Move from buildsym.c.
985 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
986 (next_symbol_text_func, hashname): Move to stabsread.h.
987 * buildsym.c: Don't include bcache.h
988 (hashname): Move to stasbread.c.
989
990 2018-07-16 Tom Tromey <tom@tromey.com>
991
992 * buildsym.h (context_stack_size): Don't declare.
993 * buildsym.c (context_stack_size): New global.
994
995 2018-07-16 Tom Tromey <tom@tromey.com>
996
997 * dbxread.c (processing_acc_compilation): New global.
998 * buildsym.h (processing_acc_compilation): Don't declare.
999
1000 2018-07-16 Tom Tromey <tom@tromey.com>
1001
1002 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
1003 * dbxread.c (read_ofile_symtab): Update.
1004 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
1005 * buildsym.h (last_source_start_addr): Remove.
1006 (set_last_source_start_addr, get_last_source_start_addr):
1007 Declare.
1008 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
1009 parameter.
1010 (struct buildsym_compunit) <m_last_source_start_addr>: New
1011 member.
1012 (prepare_for_building): Remove start_addr parameter.
1013 (start_symtab, restart_symtab, end_symtab_get_static_block)
1014 (end_symtab_with_blockvector): Update.
1015 (set_last_source_start_addr, get_last_source_start_addr): New
1016 functions.
1017
1018 2018-07-16 Tom Tromey <tom@tromey.com>
1019
1020 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
1021 member.
1022 (have_line_numbers): Remove.
1023 (record_line, prepare_for_building, end_symtab_get_static_block)
1024 (augment_type_symtab): Update.
1025
1026 2018-07-16 Tom Tromey <tom@tromey.com>
1027
1028 * buildsym.c (~buildsym_compunit): Free the macro table.
1029 (struct buildsym_compunit) <get_macro_table, release_macros>: New
1030 methods.
1031 <m_pending_macros>: New member.
1032 (pending_macros): Remove.
1033 (~scoped_free_pendings, get_macro_table, prepare_for_building)
1034 (reset_symtab_globals, end_symtab_get_static_block)
1035 (end_symtab_with_blockvector, augment_type_symtab)
1036 (buildsym_init): Update.
1037
1038 2018-07-16 Tom Tromey <tom@tromey.com>
1039
1040 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
1041 parameter.
1042 (buildsym_compunit::set_last_source_file): New method.
1043 <m_last_source_file>: New member.
1044 (prepare_for_building): Remove "name" parameter.
1045 (start_symtab, restart_symtab, reset_symtab_globals): Update.
1046 (last_source_file): Remove.
1047 (set_last_source_file, get_last_source_file): Update.
1048
1049 2018-07-16 Tom Tromey <tom@tromey.com>
1050
1051 * buildsym.c (prepare_for_building): Add assert.
1052
1053 2018-07-16 Tom Tromey <tom@tromey.com>
1054
1055 * buildsym.c (~buildsym_compunit): Update.
1056 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
1057 (start_subfile, patch_subfile_names)
1058 (end_symtab_with_blockvector): Update.
1059
1060 2018-07-16 Tom Tromey <tom@tromey.com>
1061
1062 * buildsym.c (struct buildsym_compunit): Add constructor,
1063 destructor, initializers.
1064 (start_buildsym_compunit): Remove.
1065 (free_buildsym_compunit): Use "delete".
1066 (start_symtab, restart_symtab): Use "new".
1067
1068 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
1069
1070 * symfile.c (set_objfile_default_section_offset): Remove struct
1071 keyword.
1072
1073 2018-07-14 Stafford Horne <shorne@gmail.com>
1074
1075 * (Responsible Maintainers): Add myself as or1k maintainer.
1076
1077 2018-07-13 Tom Tromey <tom@tromey.com>
1078
1079 * symfile.c (set_objfile_default_section_offset): Use extra braces
1080 around initializer.
1081
1082 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1083
1084 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
1085 non-branching basr.
1086
1087 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1088
1089 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1090 unittests/cli-utils-selftests.c
1091 * unittests/cli-utils-selftests.c: New file.
1092
1093 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1094
1095 * NEWS: Mention new commands. Mention change to 'thread apply'.
1096
1097 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1098
1099 * thread.c (thr_try_catch_cmd): New function.
1100 (thread_apply_all_command): Handle qcs flags.
1101 (thread_apply_command): Handle qcs flags.
1102 (taas_command): New function.
1103 (tfaas_command): New function.
1104 (_initialize_thread): Update to setup the new commands 'taas
1105 and 'tfaas'. Change doc string for 'thread apply'.
1106
1107 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1108
1109 * stack.c: (trailing_outermost_frame): New function, mostly
1110 extracted from backtrace_command_1.
1111 (leading_innermost_frame): New function.
1112 (backtrace_command_1): Update to call trailing_outermost_frame.
1113 (frame_apply_command_count): New function.
1114 (frame_apply_level_command): New function.
1115 (frame_apply_all_command): New function.
1116 (frame_apply_command): New function.
1117 (faas_command): New function.
1118 (frame_cmd_list): New variable.
1119 (_initialize_stack): Update to setup the new commands 'frame apply'
1120 and 'faas'.
1121
1122 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1123
1124 * cli-utils.c (number_or_range_parser::get_number): Only handle
1125 numbers or convenience var as numbers.
1126 (parse_flags): New function.
1127 (parse_flags_qcs): New function.
1128 (number_or_range_parser::finished): Ensure parsing end is detected
1129 before end of string.
1130 * cli-utils.h (parse_flags): New function.
1131 (parse_flags_qcs): New function.
1132 (number_or_range_parser): Remove m_finished bool.
1133 (number_or_range_parser::skip_range): Set m_in_range to false.
1134
1135 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
1136
1137 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
1138 on Windows.
1139
1140 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1141 Jan Kratochvil <jan.kratochvil@redhat.com>
1142 Paul Fertser <fercerpav@gmail.com>
1143 Tsutomu Seki <sekiriki@gmail.com>
1144 Pedro Alves <palves@redhat.com>
1145
1146 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1147 'unittests/parse-connection-spec-selftests.c'.
1148 (COMMON_SFILES): Add 'common/netstuff.c'.
1149 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
1150 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
1151 * common/netstuff.c: New file.
1152 * common/netstuff.h: New file.
1153 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
1154 (wait_for_connect): Update comment. New parameter
1155 'gdb::optional<int> sock' instead of 'struct serial *scb'.
1156 Use 'sock' directly instead of 'scb->fd'.
1157 (try_connect): New function, with code from 'net_open'.
1158 (net_open): Rewrite main loop to deal with multiple
1159 sockets/addresses. Handle IPv6-style hostnames; implement
1160 support for IPv6 connections.
1161 * unittests/parse-connection-spec-selftests.c: New file.
1162
1163 2018-07-11 Pedro Alves <palves@redhat.com>
1164
1165 PR gdb/23377
1166 * remote.c (remote_target::remote_detach_pid): Call
1167 set_current_process.
1168
1169 2018-07-11 Pedro Alves <palves@redhat.com>
1170
1171 * h8300-tdep.c (h8300_gdbarch_init): Remove
1172 set_gdbarch_ecoff_reg_to_regnum calls.
1173
1174 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1175
1176 PR c++/23373
1177 * c-typeprint.c (c_type_print_base_struct_union): Don't print
1178 offsets/sizes for static members of a class/struct.
1179
1180 2018-07-11 Alan Hayward <alan.hayward@arm.com>
1181
1182 * target-descriptions.c (tdesc_register_bitsize): Rename.
1183 * target-descriptions.h (tdesc_register_bitsize): Likewise.
1184 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
1185 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
1186
1187 2018-07-10 Tom Tromey <tom@tromey.com>
1188
1189 * breakpoint.c (moribund_locations): Now static and a
1190 std::vector.
1191 (breakpoint_init_inferior, moribund_breakpoint_here_p)
1192 (build_bpstat_chain, update_global_location_list)
1193 (breakpoint_retire_moribund): Update.
1194 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
1195 VEC.
1196
1197 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
1198
1199 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
1200 (riscv_register_reggroup_p): Use new function, remove unneeded
1201 parenthesis.
1202 (riscv_push_dummy_call): Extend assert to compare against xlen or
1203 flen based on register type.
1204
1205 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
1206
1207 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
1208
1209 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
1210
1211 * remote.c (show_hardware_watchpoint_limit): New function.
1212 (show_hardware_watchpoint_length_limit): New function.
1213 (show_hardware_breakpoint_limit): New function.
1214 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
1215 where appropriate, update help text.
1216
1217 2018-07-09 Tom Tromey <tom@tromey.com>
1218
1219 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
1220 (CLIBS): Don't mention NAT_CLIBS.
1221
1222 2018-07-09 Tom Tromey <tom@tromey.com>
1223
1224 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
1225 (LIBGDB_OBS, clean mostlyclean): Update.
1226 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
1227
1228 2018-07-09 Tom Tromey <tom@tromey.com>
1229
1230 * Makefile.in (%.c: %.y): Use ECHO_YACC.
1231 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
1232 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
1233
1234 2018-07-09 Tom Tromey <tom@tromey.com>
1235
1236 * Makefile.in (ALLDEPFILES): Remove exec.c.
1237 (COMMON_OBS): Remove exec.o.
1238 (COMMON_SFILES): Add exec.c.
1239
1240 2018-07-09 Tom Tromey <tom@tromey.com>
1241
1242 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
1243
1244 2018-07-09 Tom Tromey <tom@tromey.com>
1245
1246 * Makefile.in (clean mostlyclean): Remove stamp-version.
1247 (version.c): Depend on stamp-version.
1248 (stamp-version): New rule, from version.c rule.
1249
1250 2018-07-09 Tom Tromey <tom@tromey.com>
1251
1252 * Makefile.in (init.c): Depend on stamp-init.
1253 (stamp-init): New rule, from init.c rule.
1254 (clean mostlyclean): Remove stamp-init.
1255
1256 2018-07-09 Tom Tromey <tom@tromey.com>
1257
1258 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
1259 SUBDIR_GCC_COMPILE_SRCS.
1260
1261 2018-07-09 Tom Tromey <tom@tromey.com>
1262
1263 * Makefile.in (init.c): Remove some unused sed rules.
1264
1265 2018-07-09 Tom Tromey <tom@tromey.com>
1266
1267 * Makefile.in (TSOBS): Remove.
1268 (INIT_FILES): Update.
1269 (LIBGDB_OBS): Update.
1270 (COMMON_SFILES): Add inflow.c.
1271 (SFILES): Remove inflow.c.
1272
1273 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1274
1275 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
1276
1277 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
1278
1279 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
1280 get_saveloc_name, is_signal_frame_name, step_name,
1281 init_remote_name, create_addr_space_name,
1282 destroy_addr_space_name, search_unwind_table_name,
1283 find_dyn_list_name): Constify.
1284
1285 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
1286
1287 * darwin-nat.c (darwin_pthread_kill): New function.
1288 (darwin_resume_thread): Use darwin_pthread_kill.
1289
1290 2018-07-05 Tom de Vries <tdevries@suse.de>
1291
1292 * macroexp.c (macro_buffer) <operator=>: New member function.
1293
1294 2018-07-04 Tom Tromey <tom@tromey.com>
1295
1296 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
1297
1298 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
1299
1300 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
1301 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
1302 * maint.c: Likewise.
1303 * top.c: Likewise.
1304
1305 2018-07-04 Joel Brobecker <brobecker@adacore.com>
1306
1307 * NEWS: Create a new section for the next release branch.
1308 Rename the section of the current branch, now that it has
1309 been cut.
1310
1311 2018-07-04 Joel Brobecker <brobecker@adacore.com>
1312
1313 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
1314 * version.in: Bump version to 8.2.50.DATE-git.
1315
1316 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1317 Pedro Alves <palves@redhat.com>
1318
1319 * linux-nat.c (linux_init_ptrace): Rename to ...
1320 (linux_init_ptrace_procfs): ... this. Call
1321 linux_proc_init_warnings.
1322 (linux_nat_target::post_attach)
1323 (linux_nat_target::post_startup_inferior): Adjust.
1324 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
1325 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
1326
1327 2018-07-04 Tom de Vries <tdevries@suse.de>
1328
1329 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
1330 check ...
1331 (read_comp_unit_head): ... here.
1332
1333 2018-07-03 Tom Tromey <tom@tromey.com>
1334
1335 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
1336 (stop_tracing, tstatus_command)
1337 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
1338 (print_one_static_tracepoint_marker): Update.
1339 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
1340 std::vector.
1341 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
1342 VEC.
1343 (all_tracepoints, static_tracepoints_here): Return std::vector.
1344
1345 2018-07-03 Tom Tromey <tom@tromey.com>
1346
1347 * common/ptid.c (ptid_equal): Remove.
1348 * common/ptid.h (ptid_equal): Don't declare.
1349 * ada-tasks.c: Update.
1350 * breakpoint.c: Update.
1351 * common/agent.c: Update.
1352 * corelow.c: Update.
1353 * darwin-nat-info.c: Update.
1354 * darwin-nat.c: Update.
1355 * dcache.c: Update.
1356 * dtrace-probe.c: Update.
1357 * dummy-frame.c: Update.
1358 * fbsd-nat.c: Update.
1359 * frame.c: Update.
1360 * gdbthread.h: Update.
1361 * gnu-nat.c: Update.
1362 * go32-nat.c: Update.
1363 * inf-loop.c: Update.
1364 * inf-ptrace.c: Update.
1365 * infcall.c: Update.
1366 * infcmd.c: Update.
1367 * inflow.c: Update.
1368 * infrun.c: Update.
1369 * linux-fork.c: Update.
1370 * linux-nat.c: Update.
1371 * linux-thread-db.c: Update.
1372 * mi/mi-cmd-var.c: Update.
1373 * mi/mi-interp.c: Update.
1374 * mi/mi-main.c: Update.
1375 * nto-procfs.c: Update.
1376 * ppc-linux-tdep.c: Update.
1377 * procfs.c: Update.
1378 * python/py-inferior.c: Update.
1379 * python/py-record-btrace.c: Update.
1380 * python/py-record.c: Update.
1381 * ravenscar-thread.c: Update.
1382 * regcache.c: Update.
1383 * remote-sim.c: Update.
1384 * remote.c: Update.
1385 * sol-thread.c: Update.
1386 * solib.c: Update.
1387 * target.c: Update.
1388 * tui/tui-stack.c: Update.
1389 * varobj.c: Update.
1390 * windows-nat.c: Update.
1391 * windows-tdep.c: Update.
1392
1393 2018-07-03 Tom Tromey <tom@tromey.com>
1394
1395 * common/ptid.c (ptid_match): Remove.
1396 * common/ptid.h (ptid_match): Don't declare.
1397 * fbsd-nat.c: Update.
1398 * infcmd.c: Update.
1399 * infrun.c: Update.
1400 * linux-nat.c: Update.
1401 * record-btrace.c: Update.
1402 * regcache.c: Update.
1403 * remote.c: Update.
1404
1405 2018-07-03 Tom Tromey <tom@tromey.com>
1406
1407 * common/ptid.c (ptid_tid_p): Remove.
1408 * common/ptid.h (ptid_tid_p): Don't declare.
1409 * sol-thread.c: Update.
1410
1411 2018-07-03 Tom Tromey <tom@tromey.com>
1412
1413 * common/ptid.c (ptid_lwp_p): Remove.
1414 * common/ptid.h (ptid_lwp_p): Don't declare.
1415 * fbsd-nat.c: Update.
1416 * linux-nat.c: Update.
1417 * nat/linux-procfs.c: Update.
1418 * nat/x86-linux-dregs.c: Update.
1419 * sol-thread.c: Update.
1420
1421 2018-07-03 Tom Tromey <tom@tromey.com>
1422
1423 * common/ptid.c (ptid_is_pid): Remove.
1424 * common/ptid.h (ptid_is_pid): Don't declare.
1425 * infrun.c: Update.
1426 * linux-nat.c: Update.
1427 * mi/mi-interp.c: Update.
1428 * remote.c: Update.
1429 * thread.c: Update.
1430
1431 2018-07-03 Tom Tromey <tom@tromey.com>
1432
1433 * common/ptid.c (ptid_get_tid): Remove.
1434 * common/ptid.h (ptid_get_tid): Don't declare.
1435 * ada-tasks.c: Update.
1436 * aix-thread.c: Update.
1437 * bsd-uthread.c: Update.
1438 * darwin-nat.c: Update.
1439 * fbsd-nat.c: Update.
1440 * i386-darwin-nat.c: Update.
1441 * infrun.c: Update.
1442 * linux-tdep.c: Update.
1443 * nto-procfs.c: Update.
1444 * ppc-ravenscar-thread.c: Update.
1445 * python/py-infthread.c: Update.
1446 * ravenscar-thread.c: Update.
1447 * sol-thread.c: Update.
1448 * sparc-ravenscar-thread.c: Update.
1449 * windows-nat.c: Update.
1450
1451 2018-07-03 Tom Tromey <tom@tromey.com>
1452
1453 * common/ptid.c (ptid_get_lwp): Remove.
1454 * common/ptid.h (ptid_get_lwp): Don't declare.
1455 * aarch64-linux-nat.c: Update.
1456 * ada-tasks.c: Update.
1457 * aix-thread.c: Update.
1458 * amd64-linux-nat.c: Update.
1459 * arm-linux-nat.c: Update.
1460 * corelow.c: Update.
1461 * fbsd-nat.c: Update.
1462 * fbsd-tdep.c: Update.
1463 * gnu-nat.c: Update.
1464 * i386-cygwin-tdep.c: Update.
1465 * i386-gnu-nat.c: Update.
1466 * i386-linux-nat.c: Update.
1467 * ia64-linux-nat.c: Update.
1468 * inf-ptrace.c: Update.
1469 * infrun.c: Update.
1470 * linux-fork.c: Update.
1471 * linux-nat.c: Update.
1472 * linux-tdep.c: Update.
1473 * linux-thread-db.c: Update.
1474 * mips-linux-nat.c: Update.
1475 * nat/aarch64-linux-hw-point.c: Update.
1476 * nat/aarch64-linux.c: Update.
1477 * nat/linux-btrace.c: Update.
1478 * nat/linux-osdata.c: Update.
1479 * nat/linux-procfs.c: Update.
1480 * nat/x86-linux-dregs.c: Update.
1481 * obsd-nat.c: Update.
1482 * ppc-fbsd-nat.c: Update.
1483 * ppc-linux-nat.c: Update.
1484 * procfs.c: Update.
1485 * python/py-infthread.c: Update.
1486 * ravenscar-thread.c: Update.
1487 * remote.c: Update.
1488 * s390-linux-nat.c: Update.
1489 * sol-thread.c: Update.
1490 * sol2-tdep.c: Update.
1491 * spu-linux-nat.c: Update.
1492 * x86-linux-nat.c: Update.
1493 * xtensa-linux-nat.c: Update.
1494
1495 2018-07-03 Tom Tromey <tom@tromey.com>
1496
1497 * common/ptid.c (ptid_get_pid): Remove.
1498 * common/ptid.h (ptid_get_pid): Don't declare.
1499 * aarch64-linux-nat.c: Update.
1500 * ada-lang.c: Update.
1501 * aix-thread.c: Update.
1502 * alpha-bsd-nat.c: Update.
1503 * amd64-fbsd-nat.c: Update.
1504 * amd64-linux-nat.c: Update.
1505 * arm-linux-nat.c: Update.
1506 * arm-nbsd-nat.c: Update.
1507 * auxv.c: Update.
1508 * break-catch-syscall.c: Update.
1509 * breakpoint.c: Update.
1510 * bsd-uthread.c: Update.
1511 * corelow.c: Update.
1512 * ctf.c: Update.
1513 * darwin-nat.c: Update.
1514 * fbsd-nat.c: Update.
1515 * fbsd-tdep.c: Update.
1516 * gcore.c: Update.
1517 * gnu-nat.c: Update.
1518 * hppa-nbsd-nat.c: Update.
1519 * hppa-obsd-nat.c: Update.
1520 * i386-fbsd-nat.c: Update.
1521 * ia64-linux-nat.c: Update.
1522 * inf-ptrace.c: Update.
1523 * infcmd.c: Update.
1524 * inferior.c: Update.
1525 * inferior.h: Update.
1526 * inflow.c: Update.
1527 * infrun.c: Update.
1528 * linux-fork.c: Update.
1529 * linux-nat.c: Update.
1530 * linux-tdep.c: Update.
1531 * linux-thread-db.c: Update.
1532 * m68k-bsd-nat.c: Update.
1533 * mi/mi-interp.c: Update.
1534 * mi/mi-main.c: Update.
1535 * mips-linux-nat.c: Update.
1536 * mips-nbsd-nat.c: Update.
1537 * mips64-obsd-nat.c: Update.
1538 * nat/aarch64-linux-hw-point.c: Update.
1539 * nat/aarch64-linux.c: Update.
1540 * nat/linux-btrace.c: Update.
1541 * nat/linux-osdata.c: Update.
1542 * nat/linux-procfs.c: Update.
1543 * nat/x86-linux-dregs.c: Update.
1544 * nto-procfs.c: Update.
1545 * obsd-nat.c: Update.
1546 * ppc-linux-nat.c: Update.
1547 * ppc-nbsd-nat.c: Update.
1548 * ppc-obsd-nat.c: Update.
1549 * proc-service.c: Update.
1550 * procfs.c: Update.
1551 * python/py-inferior.c: Update.
1552 * python/py-infthread.c: Update.
1553 * ravenscar-thread.c: Update.
1554 * record.c: Update.
1555 * remote-sim.c: Update.
1556 * remote.c: Update.
1557 * rs6000-nat.c: Update.
1558 * s390-linux-nat.c: Update.
1559 * sh-nbsd-nat.c: Update.
1560 * sol-thread.c: Update.
1561 * sparc-nat.c: Update.
1562 * sparc64-tdep.c: Update.
1563 * spu-linux-nat.c: Update.
1564 * spu-tdep.c: Update.
1565 * target-debug.h: Update.
1566 * target.c: Update.
1567 * thread.c: Update.
1568 * tid-parse.c: Update.
1569 * tracefile-tfile.c: Update.
1570 * vax-bsd-nat.c: Update.
1571 * windows-nat.c: Update.
1572 * x86-linux-nat.c: Update.
1573 * x86-nat.c: Update.
1574
1575 2018-07-03 Tom Tromey <tom@tromey.com>
1576
1577 * common/ptid.c (pid_to_ptid): Remove.
1578 * common/ptid.h (pid_to_ptid): Don't declare.
1579 * aix-thread.c: Update.
1580 * arm-linux-nat.c: Update.
1581 * common/ptid.c: Update.
1582 * common/ptid.h: Update.
1583 * corelow.c: Update.
1584 * ctf.c: Update.
1585 * darwin-nat.c: Update.
1586 * fbsd-nat.c: Update.
1587 * fork-child.c: Update.
1588 * gnu-nat.c: Update.
1589 * go32-nat.c: Update.
1590 * inf-ptrace.c: Update.
1591 * infcmd.c: Update.
1592 * inferior.c: Update.
1593 * infrun.c: Update.
1594 * linux-fork.c: Update.
1595 * linux-nat.c: Update.
1596 * nat/aarch64-linux-hw-point.c: Update.
1597 * nat/fork-inferior.c: Update.
1598 * nat/x86-linux-dregs.c: Update.
1599 * nto-procfs.c: Update.
1600 * obsd-nat.c: Update.
1601 * procfs.c: Update.
1602 * progspace.c: Update.
1603 * remote.c: Update.
1604 * rs6000-nat.c: Update.
1605 * s390-linux-nat.c: Update.
1606 * sol-thread.c: Update.
1607 * spu-linux-nat.c: Update.
1608 * target.c: Update.
1609 * top.c: Update.
1610 * tracefile-tfile.c: Update.
1611 * windows-nat.c: Update.
1612
1613 2018-07-03 Tom Tromey <tom@tromey.com>
1614
1615 * common/ptid.h (ptid_build): Don't declare.
1616 * common/ptid.c (ptid_build): Remove.
1617 * aix-thread.c: Update.
1618 * bsd-kvm.c: Update.
1619 * bsd-uthread.c: Update.
1620 * common/agent.c: Update.
1621 * common/ptid.c: Update.
1622 * common/ptid.h: Update.
1623 * corelow.c: Update.
1624 * darwin-nat.c: Update.
1625 * fbsd-nat.c: Update.
1626 * gnu-nat.c: Update.
1627 * linux-fork.c: Update.
1628 * linux-nat.c: Update.
1629 * linux-thread-db.c: Update.
1630 * nat/linux-osdata.c: Update.
1631 * nat/linux-procfs.c: Update.
1632 * nto-procfs.c: Update.
1633 * obsd-nat.c: Update.
1634 * proc-service.c: Update.
1635 * procfs.c: Update.
1636 * ravenscar-thread.c: Update.
1637 * remote-sim.c: Update.
1638 * remote.c: Update.
1639 * sol-thread.c: Update.
1640 * target.c: Update.
1641 * windows-nat.c: Update.
1642
1643 2018-07-03 Tom Tromey <tom@tromey.com>
1644
1645 * infrun.c (follow_exec): Use exit_inferior_silent.
1646 * inferior.c (exit_inferior_num_silent): Remove.
1647 * inferior.h (exit_inferior_num_silent): Don't declare.
1648
1649 2018-07-03 Tom Tromey <tom@tromey.com>
1650
1651 PR cli/23340:
1652 * darwin-nat.c (darwin_attach_pid): Reset inferior and
1653 inferior_ptid on error.
1654
1655 2018-07-02 Maciej W. Rozycki <macro@mips.com>
1656 Simon Marchi <simon.marchi@polymtl.ca>
1657
1658 PR tdep/8282
1659 * disasm.h (gdb_disassembler): Add
1660 `m_disassembler_options_holder'. member
1661 * disasm.c (get_all_disassembler_options): New function.
1662 (gdb_disassembler::gdb_disassembler): Use it.
1663 (gdb_buffered_insn_length_init_dis): Likewise.
1664 (gdb_buffered_insn_length): Adjust accordingly.
1665 (set_disassembler_options): Handle options with arguments.
1666 (show_disassembler_options_sfunc): Likewise. Add a leading new
1667 line if showing options with descriptions.
1668 (disassembler_options_completer): Adapt to using the
1669 `disasm_options_and_args_t' structure.
1670 * mips-tdep.c (mips_disassembler_options): New variable.
1671 (mips_disassembler_options_o32): Likewise.
1672 (mips_disassembler_options_n32): Likewise.
1673 (mips_disassembler_options_n64): Likewise.
1674 (gdb_print_insn_mips): Don't set `disassembler_options'.
1675 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
1676 functions.
1677 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
1678 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
1679 `gdbarch_disassembler_options_implicit' and
1680 `gdbarch_valid_disassembler_options'.
1681 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
1682 `disasm_options_and_args_t' structure.
1683 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
1684 method.
1685 (valid_disassembler_options): Switch from `disasm_options_t' to
1686 the `disasm_options_and_args_t' structure.
1687 * NEWS: Document `set disassembler-options' support for the MIPS
1688 target.
1689 * gdbarch.h: Regenerate.
1690 * gdbarch.c: Regenerate.
1691
1692 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
1693
1694 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
1695
1696 2018-06-29 Joel Brobecker <brobecker@adacore.com>
1697
1698 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
1699 parameter in call to amd64_target_description.
1700 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
1701 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
1702 (amd64fbsd_init_abi): Likewise.
1703 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
1704 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
1705 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
1706 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
1707
1708 2018-06-29 Pedro Alves <palves@redhat.com>
1709
1710 * gdb/amd64-tdep.h (amd64_create_target_description): Add
1711 "segments" parameter.
1712 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
1713 (_initialize_amd64_tdep): Update call to
1714 amd64_create_target_description.
1715 (amd64_target_description): Add "segments" parameter. Adjust
1716 the implementation to use it.
1717 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
1718 call to amd64_create_target_description.
1719 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
1720 * gdb/arch/amd64.h (amd64_create_target_description): Add
1721 "segments" register.
1722 * gdb/arch/amd64.c (amd64_create_target_description): Add
1723 "segments" parameter. Call create_feature_i386_64bit_segments
1724 only if SEGMENTS is true.
1725 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
1726 call to amd64_create_target_description.
1727
1728 2018-06-29 Pedro Alves <palves@redhat.com>
1729
1730 * thread.c (thread_target_id_str): New, factored out from ...
1731 (print_thread_info_1): ... here. Use it to compute the max
1732 "Target Id" column width.
1733
1734 2018-06-29 Pedro Alves <palves@redhat.com>
1735
1736 * remote.c (remote_target::extra_thread_info): Delete
1737 'display_buf' and 'n' locals. from the cache, regardless of
1738 packet mechanims is in use. Use cache for qThreadExtra and qP
1739 methods too.
1740
1741 2018-06-29 Pedro Alves <palves@redhat.com>
1742
1743 * blockframe.c (find_pc_sect_containing_function): New function.
1744 * breakpoint.c (print_breakpoint_location): Don't call
1745 find_pc_sect_function.
1746 * linespec.c (create_sals_line_offset): Record the location's
1747 symbol in the sal.
1748 * linespec.c (convert_address_location_to_sals): Fill in sal's
1749 symbol with find_pc_sect_containing_function.
1750 * symtab.c (find_function_start_sal): Rename to ...
1751 (find_function_start_sal_1): ... this.
1752 (find_function_start_sal): Reimplement as wrapper around
1753 find_function_start_sal_1, and use
1754 find_pc_sect_containing_function to fill in the sal's symbol.
1755 (find_function_start_sal(symbol*, bool)): Adjust.
1756 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
1757 comments.
1758 (find_pc_sect_containing_function): Declare.
1759
1760 2018-06-29 Pedro Alves <palves@redhat.com>
1761
1762 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
1763 true if the the location has no symbol.
1764
1765 2018-06-28 Tom Tromey <tom@tromey.com>
1766
1767 * NEWS: Mention --enable-codesign.
1768 * silent-rules.mk (ECHO_SIGN): New variable.
1769 * configure.ac: Add --enable-codesign.
1770 * configure: Rebuild.
1771 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
1772 (gdb$(EXEEXT)): Optionally invoke codesign.
1773
1774 2018-06-28 Pedro Alves <palves@redhat.com>
1775
1776 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
1777 comments.
1778 (switch_to_thread_no_regs): Adjust comment.
1779 * infcmd.c (stop_pc): Delete.
1780 (post_create_inferior, info_program_command): Replace references
1781 to stop_pc with references to thread_info->suspend.stop_pc.
1782 * inferior.h (stop_pc): Delete declaration.
1783 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
1784 (handle_inferior_event_1, handle_signal_stop)
1785 (process_event_stop_test, keep_going_stepped_thread)
1786 (handle_step_into_function, handle_step_into_function_backward)
1787 (print_stop_location): Replace references to stop_pc with
1788 references to thread_info->suspend.stop_pc.
1789 (struct infcall_suspend_state) <stop_pc>: Delete field.
1790 (save_infcall_suspend_state, restore_infcall_suspend_state):
1791 Remove references to inf_stat->stop_pc.
1792 * linux-fork.c (fork_load_infrun_state): Likewise.
1793 * record-btrace.c (record_btrace_set_replay): Likewise.
1794 * record-full.c (record_full_goto_entry): Likewise.
1795 * remote.c (print_one_stopped_thread): Likewise.
1796 * target.c (target_resume): Extend comment.
1797 * thread.c (set_executing_thread): New.
1798 (set_executing): Use it.
1799 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
1800 Remove references to stop_pc.
1801
1802 2018-06-28 Pedro Alves <palves@redhat.com>
1803
1804 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
1805 Moving fetching stop_pc until after ecs->event_thread is refreshed.
1806
1807 2018-06-28 Tom Tromey <tom@tromey.com>
1808
1809 * coffread.c (coff_symfile_finish): Update.
1810 * xcoffread.c (xcoff_symfile_finish): Update.
1811 * elfread.c (elf_symfile_finish): Update.
1812 * symfile.h (dwarf2_free_objfile): Don't declare.
1813 * dwarf2read.c (_initialize_dwarf2_read): Use
1814 register_objfile_data_with_cleanup.
1815 (dwarf2_free_objfile): Now static. Change signature.
1816
1817 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1818
1819 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
1820 option "-o" to add-symbol-file-load to add an offset to each
1821 section's load address.
1822 * symfile.c (set_objfile_default_section_offset): New function.
1823
1824 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1825
1826 * symfile.c (add_symbol_file_command): Make sure that sections
1827 with the same name are sorted in the same order.
1828
1829 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1830
1831 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
1832 require the second argument. If omitted, load sections at the
1833 addresses specified in the file.
1834
1835 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1836
1837 * symfile.c (symbol_file_command, symbol_file_add_main_1)
1838 (_initialize_symfile): Add option "-o" to symbol-file to add an
1839 offset to each section of the symbol file.
1840
1841 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1842
1843 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
1844
1845 2018-06-27 Tom Tromey <tom@tromey.com>
1846
1847 * stack.c (_initialize_stack): Update "func" help text.
1848
1849 2018-06-27 Tom Tromey <tom@tromey.com>
1850
1851 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
1852 std::vector.
1853 (unwind_infopy_str, pyuw_create_unwind_info)
1854 (unwind_infopy_add_saved_register, pyuw_sniffer)
1855 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
1856 Update.
1857 (struct saved_reg): Add constructor.
1858 <value>: Now a gdbpy_ref<>.
1859
1860 2018-06-27 Tom Tromey <tom@tromey.com>
1861
1862 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
1863
1864 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1865
1866 * gdb-gdb.py.in: Format using autopep8.
1867
1868 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1869
1870 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
1871 (type_lookup_function): Recognize CORE_ADDR values.
1872
1873 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1874
1875 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
1876 print tag_name.
1877
1878 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1879
1880 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
1881 <__lt__>: Add.
1882
1883 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1884
1885 * gdb-gdb.py: Move to...
1886 * gdb-gdb.py.in: ... here.
1887 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
1888 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
1889 dependencies.
1890 (distclean): Remove gdb-gdb.py when cleaning.
1891 (gdb-gdb.py, gdb-gdb.gdb): New rules.
1892 * configure: Re-generate.
1893
1894 2018-06-27 Pedro Alves <palves@redhat.com>
1895
1896 * proc-service.c (get_ps_regcache): New.
1897 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1898 (ps_lsetfpregs): Use it.
1899
1900 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
1901
1902 PR gdb/21695
1903 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
1904 (dwarf_decode_lines_1): Adjust.
1905
1906 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1907
1908 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
1909 override.
1910 <info_proc>: Likewise.
1911
1912 2018-06-26 Joel Brobecker <brobecker@adacore.com>
1913
1914 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
1915 to windows_fetch_one_register, and only handle the case of
1916 fetching one register. Move the code that reloads the context
1917 and iterates over all registers if R is negative to...
1918 (windows_nat_target::fetch_registers): ... here.
1919 (do_windows_store_inferior_registers): Rename to
1920 windows_store_one_register, and only handle the case of storing
1921 one register. Move the code that handles the case where r is
1922 negative to...
1923 (windows_nat_target::store_registers) ... here.
1924
1925 2018-06-26 Tom Tromey <tom@tromey.com>
1926
1927 PR rust/22574:
1928 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
1929 * rust-lang.c (rust_print_struct_def): Add podata parameter.
1930 Update.
1931 (rust_internal_print_type): Add podata parameter.
1932 (rust_print_type): Update.
1933
1934 2018-06-26 Tom Tromey <tom@tromey.com>
1935
1936 * typeprint.h (struct print_offset_data) <update, finish,
1937 maybe_print_hole>: New methods.
1938 <indentation>: New constant.
1939 * typeprint.c (print_offset_data::indentation): Define.
1940 (print_offset_data::maybe_print_hole, print_offset_data::update)
1941 (print_offset_data::finish): Move from c-typeprint.c and rename.
1942 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
1943 (print_spaces_filtered_with_print_options): Update.
1944 (c_print_type_union_field_offset, maybe_print_hole)
1945 (c_print_type_struct_field_offset): Move to typeprint.c and
1946 rename.
1947 (c_type_print_base_struct_union): Update.
1948
1949 2018-06-25 Pedro Alves <palves@redhat.com>
1950
1951 * gdbthread.h (thread_info_ref, delete_thread)
1952 (delete_thread_silent, first_thread_of_inferior)
1953 (any_thread_of_inferior, switch_to_thread)
1954 (enable_thread_stack_temporaries)
1955 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1956 (get_last_thread_stack_temporary)
1957 (value_in_thread_stack_temporaries, can_access_registers_thread):
1958 Spell out "struct thread_info" instead of just "thread_info".
1959 * inferior.h (notice_new_inferior): Likewise.
1960
1961 2018-06-25 Pedro Alves <palves@redhat.com>
1962
1963 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
1964 pass thread_info pointer to delete_thread.
1965 (windows_nat_target::detach): Pass inferior pointer to
1966 detach_inferior.
1967 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
1968 delete_thread.
1969 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
1970 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
1971 and pass a thread_info pointer to delete_thread.
1972 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
1973 pass thread_info pointer to delete_thread.
1974 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
1975 delete_thread_silent call.
1976 * procfs.c (procfs_target::detach): Pass inferior pointer to
1977 detach_inferior.
1978 (procfs_target::wait): Pass thread_info pointer to delete_thread.
1979 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
1980 delete_thread_silent call.
1981 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
1982 pass thread_info pointer to delete_thread.
1983 (windows_nat_target::detach): Pass inferior pointer to
1984 delete_inferior.
1985
1986 2018-06-22 Alan Hayward <alan.hayward@arm.com>
1987
1988 * regcache.c (readable_regcache::read_part): Fix asserts.
1989 (reg_buffer::raw_collect_part): New function.
1990 (regcache::write_part): Fix asserts.
1991 (reg_buffer::raw_supply_part): New function.
1992 (regcache::transfer_regset_register): New helper function.
1993 (regcache::transfer_regset): Call new functions.
1994 (regcache_supply_regset): Use gdb_byte*.
1995 (regcache::supply_regset): Likewise.
1996 (regcache_collect_regset): Likewise.
1997 (regcache::collect_regset): Likewise.
1998 * regcache.h (reg_buffer::raw_collect_part): New declaration.
1999 (reg_buffer::raw_supply_part): Likewise.
2000 (regcache::transfer_regset_register): Likewise.
2001 (regcache::transfer_regset): Use gdb_byte*.
2002
2003 2018-06-22 Alan Hayward <alan.hayward@arm.com>
2004
2005 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
2006
2007 2018-06-21 Pedro Alves <palves@redhat.com>
2008
2009 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
2010 instead of a ptid_t. All callers adjusted.
2011 * ada-tasks.c (ada_get_task_number): Likewise. All callers
2012 adjusted.
2013 (print_ada_task_info, display_current_task_id, task_command_1):
2014 Adjust.
2015 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
2016 inferior_thread.
2017 (breakpoint_kind): Adjust.
2018 (remove_breakpoints_pid): Rename to ...
2019 (remove_breakpoints_inf): ... this. Adjust to take an inferior
2020 pointer. All callers adjusted.
2021 (bpstat_clear_actions): Use inferior_thread.
2022 (get_bpstat_thread): New.
2023 (bpstat_do_actions): Use it.
2024 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
2025 to take a thread_info pointer. All callers adjusted.
2026 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
2027 (breakpoint_re_set_thread): Use inferior_thread.
2028 * breakpoint.h (struct inferior): Forward declare.
2029 (bpstat_stop_status): Update.
2030 (remove_breakpoints_pid): Delete.
2031 (remove_breakpoints_inf): New.
2032 * bsd-uthread.c (bsd_uthread_target::wait)
2033 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
2034 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
2035 (maint_btrace_packet_history_cmd)
2036 (maint_btrace_clear_packet_history_cmd): Adjust.
2037 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
2038 inferior_thread.
2039 * cli/cli-interp.c: Include "inferior.h".
2040 * common/refcounted-object.h (struct
2041 refcounted_object_ref_policy): New.
2042 * compile/compile-object-load.c: Include gdbthread.h.
2043 (store_regs): Use inferior_thread.
2044 * corelow.c (core_target::close): Use current_inferior.
2045 (core_target_open): Adjust to use first_thread_of_inferior and use
2046 the current inferior.
2047 * ctf.c (ctf_target::close): Adjust to use current_inferior.
2048 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
2049 <thread>: ... this new field. All references adjusted.
2050 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
2051 Take a thread_info pointer instead of a ptid_t.
2052 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
2053 (dummy_frame_discard, register_dummy_frame_dtor): Take a
2054 thread_info pointer instead of a ptid_t.
2055 * elfread.c: Include "inferior.h".
2056 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
2057 Use inferior_thread.
2058 * eval.c (evaluate_subexp): Likewise.
2059 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
2060 inferior_thread.
2061 * gdb_proc_service.h (struct thread_info): Forward declare.
2062 (struct ps_prochandle) <ptid>: Delete, replaced by ...
2063 <thread>: ... this new field. All references adjusted.
2064 * gdbarch.h, gdbarch.c: Regenerate.
2065 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
2066 'thread' parameter. All implementations and callers adjusted.
2067 * gdbthread.h (thread_info) <set_running>: New method.
2068 (delete_thread, delete_thread_silent): Take a thread_info pointer
2069 instead of a ptid.
2070 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
2071 (first_thread_of_process): Delete, replaced by ...
2072 (first_thread_of_inferior): ... this new function. All callers
2073 adjusted.
2074 (any_live_thread_of_process): Delete, replaced by ...
2075 (any_live_thread_of_inferior): ... this new function. All callers
2076 adjusted.
2077 (switch_to_thread, switch_to_no_thread): Declare.
2078 (is_executing): Delete.
2079 (enable_thread_stack_temporaries): Update comment.
2080 <enable_thread_stack_temporaries>: Take a thread_info pointer
2081 instead of a ptid_t. Incref the thread.
2082 <~enable_thread_stack_temporaries>: Decref the thread.
2083 <m_ptid>: Delete
2084 <m_thr>: New.
2085 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2086 (get_last_thread_stack_temporary)
2087 (value_in_thread_stack_temporaries, can_access_registers_thread):
2088 Take a thread_info pointer instead of a ptid_t. All callers
2089 adjusted.
2090 * infcall.c (get_call_return_value): Use inferior_thread.
2091 (run_inferior_call): Work with thread pointers instead of ptid_t.
2092 (call_function_by_hand_dummy): Work with thread pointers instead
2093 of ptid_t. Use thread_info_ref.
2094 * infcmd.c (proceed_thread_callback): Access thread's state
2095 directly.
2096 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
2097 access thread's state directly.
2098 (continue_command): Use inferior_thread.
2099 (info_program_command): Use find_thread_ptid and access thread
2100 state directly.
2101 (proceed_after_attach_callback): Use thread state directly.
2102 (notice_new_inferior): Take a thread_info pointer instead of a
2103 ptid_t. All callers adjusted.
2104 (exit_inferior): Take an inferior pointer instead of a pid. All
2105 callers adjusted.
2106 (exit_inferior_silent): New.
2107 (detach_inferior): Delete.
2108 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
2109 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
2110 (detach_inferior_command, kill_inferior_command): Use
2111 find_inferior_id instead of valid_gdb_inferior_id and
2112 gdb_inferior_id_to_pid.
2113 (inferior_command): Use inferior and thread pointers.
2114 * inferior.h (struct thread_info): Forward declare.
2115 (notice_new_inferior): Take a thread_info pointer instead of a
2116 ptid_t. All callers adjusted.
2117 (detach_inferior): Delete declaration.
2118 (exit_inferior, exit_inferior_silent): Take an inferior pointer
2119 instead of a pid. All callers adjusted.
2120 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
2121 (valid_gdb_inferior_id): Delete.
2122 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
2123 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
2124 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
2125 ...
2126 <inf>: ... this new field.
2127 <step_ptid>: Delete, replaced by ...
2128 <step_thread>: ... this new field.
2129 (get_displaced_stepping_state): Take an inferior pointer instead
2130 of a pid. All callers adjusted.
2131 (displaced_step_in_progress_any_inferior): Adjust.
2132 (displaced_step_in_progress_thread): Take a thread pointer instead
2133 of a ptid_t. All callers adjusted.
2134 (displaced_step_in_progress, add_displaced_stepping_state): Take
2135 an inferior pointer instead of a pid. All callers adjusted.
2136 (get_displaced_step_closure_by_addr): Adjust.
2137 (remove_displaced_stepping_state): Take an inferior pointer
2138 instead of a pid. All callers adjusted.
2139 (displaced_step_prepare_throw, displaced_step_prepare)
2140 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
2141 All callers adjusted.
2142 (start_step_over): Adjust.
2143 (infrun_thread_ptid_changed): Remove bit updating ptids in the
2144 displaced step queue.
2145 (do_target_resume): Adjust.
2146 (fetch_inferior_event): Use inferior_thread.
2147 (context_switch, get_inferior_stop_soon): Take an
2148 execution_control_state pointer instead of a ptid_t. All callers
2149 adjusted.
2150 (switch_to_thread_cleanup): Delete.
2151 (stop_all_threads): Use scoped_restore_current_thread.
2152 * inline-frame.c: Include "gdbthread.h".
2153 (inline_state) <inline_state>: Take a thread pointer instead of a
2154 ptid_t. All callers adjusted.
2155 <ptid>: Delete, replaced by ...
2156 <thread>: ... this new field.
2157 (find_inline_frame_state): Take a thread pointer instead of a
2158 ptid_t. All callers adjusted.
2159 (skip_inline_frames, step_into_inline_frame)
2160 (inline_skipped_frames, inline_skipped_symbol): Take a thread
2161 pointer instead of a ptid_t. All callers adjusted.
2162 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
2163 (inline_skipped_frames, inline_skipped_symbol): Likewise.
2164 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
2165 pointers directly.
2166 * linux-nat.c (get_detach_signal): Likewise.
2167 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
2168 (thread_db_notice_clone): Adjust.
2169 (thread_db_find_new_threads_silently)
2170 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
2171 a thread pointer instead of a ptid_t. All callers adjusted.
2172 * mi/mi-cmd-var.c: Include "inferior.h".
2173 (mi_cmd_var_update_iter): Update to use thread pointers.
2174 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
2175 inferior directly.
2176 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
2177 out to ...
2178 (mi_output_running): ... this new function.
2179 (mi_on_resume_1): Adjust to use it.
2180 (mi_user_selected_context_changed): Adjust to use inferior_thread.
2181 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
2182 directly.
2183 (interrupt_thread_callback): : Adjust to use thread and inferior
2184 pointers.
2185 * proc-service.c: Include "gdbthread.h".
2186 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
2187 * progspace-and-thread.c: Include "inferior.h".
2188 * progspace.c: Include "inferior.h".
2189 * python/py-exitedevent.c (create_exited_event_object): Adjust to
2190 hold a reference to an inferior_object.
2191 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
2192 inferior_thread.
2193 * python/py-inferior.c (struct inferior_object): Give the type a
2194 tag name instead of a typedef.
2195 (python_on_normal_stop): No need to check if the current thread is
2196 listed.
2197 (inferior_to_inferior_object): Change return type to
2198 inferior_object. All callers adjusted.
2199 (find_thread_object): Delete, bits factored out to ...
2200 (thread_to_thread_object): ... this new function.
2201 * python/py-infthread.c (create_thread_object): Use
2202 inferior_to_inferior_object.
2203 (thpy_is_stopped): Use thread pointer directly.
2204 (gdbpy_selected_thread): Use inferior_thread.
2205 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
2206 field, replaced with ...
2207 <thread>: ... this new field. All users adjusted.
2208 (btpy_insn_or_gap_new): Drop const.
2209 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
2210 callers adjusted.
2211 * python/py-record.c: Include "gdbthread.h".
2212 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2213 a ptid_t. All callers adjusted.
2214 (gdbpy_current_recording): Use inferior_thread.
2215 * python/py-record.h (recpy_record_object) <ptid>: Delete
2216 field, replaced with ...
2217 <thread>: ... this new field. All users adjusted.
2218 (recpy_element_object) <ptid>: Delete
2219 field, replaced with ...
2220 <thread>: ... this new field. All users adjusted.
2221 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2222 a ptid_t. All callers adjusted.
2223 * python/py-threadevent.c: Include "gdbthread.h".
2224 (get_event_thread): Use thread_to_thread_object.
2225 * python/python-internal.h (struct inferior_object): Forward
2226 declare.
2227 (find_thread_object, find_inferior_object): Delete declarations.
2228 (thread_to_thread_object, inferior_to_inferior_object): New
2229 declarations.
2230 * record-btrace.c: Include "inferior.h".
2231 (require_btrace_thread): Use inferior_thread.
2232 (record_btrace_frame_sniffer)
2233 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
2234 (get_thread_current_frame): Use scoped_restore_current_thread and
2235 switch_to_thread.
2236 (get_thread_current_frame): Use thread pointer directly.
2237 (record_btrace_replay_at_breakpoint): Use thread's inferior
2238 pointer directly.
2239 * record-full.c: Include "inferior.h".
2240 * regcache.c: Include "gdbthread.h".
2241 (get_thread_arch_regcache): Use the inferior's address space
2242 directly.
2243 (get_thread_regcache, registers_changed_thread): New.
2244 * regcache.h (get_thread_regcache(thread_info *thread)): New
2245 overload.
2246 (registers_changed_thread): New.
2247 (remote_target) <remote_detach_1>: Swap order of parameters.
2248 (remote_add_thread): <remote_add_thread>: Return the new thread.
2249 (get_remote_thread_info(ptid_t)): New overload.
2250 (remote_target::remote_notice_new_inferior): Use thread pointers
2251 directly.
2252 (remote_target::process_initial_stop_replies): Use
2253 thread_info::set_running.
2254 (remote_target::remote_detach_1, remote_target::detach)
2255 (extended_remote_target::detach): Adjust.
2256 * stack.c (frame_show_address): Use inferior_thread.
2257 * target-debug.h (target_debug_print_thread_info_pp): New.
2258 * target-delegates.c: Regenerate.
2259 * target.c (default_thread_address_space): Delete.
2260 (memory_xfer_partial_1): Use current_inferior.
2261 (target_detach): Use current_inferior.
2262 (target_thread_address_space): Delete.
2263 (generic_mourn_inferior): Use current_inferior.
2264 * target.h (struct target_ops) <thread_address_space>: Delete.
2265 (target_thread_address_space): Delete.
2266 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
2267 pointers directly.
2268 (delete_thread_1, delete_thread, delete_thread_silent): Take a
2269 thread pointer instead of a ptid_t. Adjust all callers.
2270 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
2271 (first_thread_of_process): Delete, replaced by ...
2272 (first_thread_of_inferior): ... this new function. All callers
2273 adjusted.
2274 (any_thread_of_process): Rename to ...
2275 (any_thread_of_inferior): ... this, and take an inferior pointer.
2276 (any_live_thread_of_process): Rename to ...
2277 (any_live_thread_of_inferior): ... this, and take an inferior
2278 pointer.
2279 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2280 (value_in_thread_stack_temporaries)
2281 (get_last_thread_stack_temporary): Take a thread pointer instead
2282 of a ptid_t. Adjust all callers.
2283 (thread_info::set_running): New.
2284 (validate_registers_access): Use inferior_thread.
2285 (can_access_registers_ptid): Rename to ...
2286 (can_access_registers_thread): ... this, and take a thread
2287 pointer.
2288 (print_thread_info_1): Adjust to compare thread pointers instead
2289 of ptids.
2290 (switch_to_no_thread, switch_to_thread): Make extern.
2291 (scoped_restore_current_thread::~scoped_restore_current_thread):
2292 Use m_thread pointer directly.
2293 (scoped_restore_current_thread::scoped_restore_current_thread):
2294 Use inferior_thread.
2295 (thread_command): Use thread pointer directly.
2296 (thread_num_make_value_helper): Use inferior_thread.
2297 * top.c (execute_command): Use inferior_thread.
2298 * tui/tui-interp.c: Include "inferior.h".
2299 * varobj.c (varobj_create): Use inferior_thread.
2300 (value_of_root_1): Use find_thread_global_id instead of
2301 global_thread_id_to_ptid.
2302
2303 2018-06-21 Alan Hayward <alan.hayward@arm.com>
2304
2305 * regcache.c (readable_regcache::read_part): Avoid memcpy when
2306 possible.
2307 (regcache::write_part): Likewise.
2308 (readable_regcache::cooked_read_part): Update comment.
2309 (readable_regcache::cooked_write_part): Likewise.
2310 * regcache.h: (readable_regcache::read_part): Likewise.
2311 (regcache::write_part): Likewise.
2312
2313 2018-06-21 Richard Bunt <richard.bunt@arm.com>
2314 Dirk Schubert <dirk.schubert@arm.com>
2315
2316 * aarch64-linux-nat.c (post_attach): New.
2317 (aarch64_linux_nat_target::post_attach): Override post_attach to
2318 record the number of hardware debug registers.
2319
2320 2018-06-20 Tom Tromey <tom@tromey.com>
2321
2322 * python/py-param.c (add_setshow_generic): Make parameters const.
2323 (parmpy_init): Update.
2324
2325 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
2326
2327 * regcache.h (regcache_cooked_read_ftype): Rename to...
2328 (register_read_ftype): ...this, change type to function_view.
2329 (class reg_buffer) <save>: Remove src parameter.
2330 (readonly_detached_regcache) <readonly_detached_regcache>: Make
2331 parameter non-const in first overload. Remove src parameter in
2332 second overload.
2333 * regcache.c (do_cooked_read): Remove.
2334 (readonly_detached_regcache::readonly_detached_regcache): Make
2335 parameter non-const, adjust call to other constructor.
2336 (reg_buffer::save): Remove src parameter.
2337 * frame.c (do_frame_register_read): Remove.
2338 (frame_save_as_regcache): Use lambda function.
2339 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
2340 parameter to ppu2spu_data *.
2341 (ppu2spu_sniffer): Use lambda function.
2342
2343 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
2344
2345 * record-full.c (record_full_target::insert_breakpoint): Remove
2346 "struct" keyword, add const.
2347
2348 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
2349
2350 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
2351 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
2352 * configure.ac: Remove AC_PREREQ, add missing quoting.
2353 * gnulib/configure.ac: Modernize usage of
2354 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
2355 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
2356 (AUTOMAKE_VERSION): Bump to 1.15.1.
2357 * configure: Re-generate.
2358 * config.in: Re-generate.
2359 * aclocal.m4: Re-generate.
2360 * gnulib/aclocal.m4: Re-generate.
2361 * gnulib/config.in: Re-generate.
2362 * gnulib/configure: Re-generate.
2363 * gnulib/import/Makefile.in: Re-generate.
2364
2365 2018-06-19 Pedro Alves <palves@redhat.com>
2366
2367 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
2368 (lookup_minimal_symbol_by_pc_section): ... here with
2369 gdb_assert_not_reached added.
2370
2371 2018-06-19 Pedro Alves <palves@redhat.com>
2372
2373 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
2374 parameter with a block parameter. Compare location's block symbol
2375 with the frame's block instead of addresses.
2376 (skip_inline_frames): Pass the current block instead of the
2377 frame's address. Break out as soon as we determine the frame
2378 should not be skipped.
2379
2380 2018-06-18 Tom Tromey <tom@tromey.com>
2381
2382 * solib-aix.c (solib_aix_get_section_offsets): Return
2383 unique_xmalloc_ptr.
2384 (solib_aix_solib_create_inferior_hook): Update.
2385
2386 2018-06-18 Tom Tromey <tom@tromey.com>
2387
2388 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
2389
2390 2018-06-18 Tom Tromey <tom@tromey.com>
2391
2392 * solib-frv.c (frv_relocate_main_executable): Use
2393 unique_xmalloc_ptr.
2394 * solib-dsbt.c (dsbt_relocate_main_executable): Use
2395 unique_xmalloc_ptr.
2396
2397 2018-06-18 Tom Tromey <tom@tromey.com>
2398
2399 * objfiles.h (inhibit_section_map_updates): Update.
2400 (resume_section_map_updates, resume_section_map_updates_cleanup):
2401 Remove.
2402 * solib-svr4.c (svr4_handle_solib_event): Update.
2403 * objfiles.c (inhibit_section_map_updates): Return
2404 scoped_restore_tmpl<int>.
2405 (resume_section_map_updates, resume_section_map_updates_cleanup):
2406 Remove.
2407
2408 2018-06-18 Tom Tromey <tom@tromey.com>
2409
2410 * valprint.h (read_string): Update.
2411 * valprint.c (read_string): Change type of "buffer".
2412 (val_print_string): Update.
2413 * python/py-value.c (valpy_string): Update.
2414 * language.h (struct language_defn) <la_get_string>: Change
2415 type of "buffer".
2416 (default_get_string, c_get_string): Update.
2417 * language.c (default_get_string): Change type of "buffer".
2418 * guile/scm-value.c (gdbscm_value_to_string): Update.
2419 * c-lang.c (c_get_string): Change type of "buffer".
2420
2421 2018-06-18 Tom Tromey <tom@tromey.com>
2422
2423 * ser-mingw.c (struct pipe_state_destroyer): New.
2424 (pipe_state_up): New typedef.
2425 (cleanup_pipe_state): Remove.
2426 (pipe_windows_open): Use pipe_state_up. Don't release argv.
2427
2428 2018-06-18 Tom Tromey <tom@tromey.com>
2429
2430 * rust-lang.h (rust_yyerror): Don't declare.
2431 * rust-lang.c (rust_language_defn): Update.
2432 * rust-exp.y (yyerror): Now static.
2433 * parse.c (parse_exp_in_context_1): Update.
2434 * p-lang.h (p_yyerror): Don't declare.
2435 * p-lang.c (p_language_defn): Update.
2436 * p-exp.y (yyerror): Now static.
2437 * opencl-lang.c (opencl_language_defn): Update.
2438 * objc-lang.c (objc_language_defn): Update.
2439 * m2-lang.h (m2_yyerror): Don't declare.
2440 * m2-lang.c (m2_language_defn): Update.
2441 * m2-exp.y (yyerror): Now static.
2442 * language.h (struct language_defn) <la_error>: Remove.
2443 * language.c (unk_lang_error): Remove.
2444 (unknown_language_defn, auto_language_defn): Remove.
2445 * go-lang.h (go_yyerror): Don't declare.
2446 * go-lang.c (go_language_defn): Update.
2447 * go-exp.y (yyerror): Now static.
2448 * f-lang.h (f_yyerror): Don't declare.
2449 * f-lang.c (f_language_defn): Update.
2450 * f-exp.y (yyerror): Now static.
2451 * d-lang.h (d_yyerror): Don't declare.
2452 * d-lang.c (d_language_defn): Update.
2453 * d-exp.y (yyerror): Now static.
2454 * c-lang.h (c_yyerror): Don't declare.
2455 * c-lang.c (c_language_defn, cplus_language_defn)
2456 (asm_language_defn, minimal_language_defn): Update.
2457 * c-exp.y (yyerror): Now static.
2458 * ada-lang.h (ada_yyerror): Don't declare.
2459 * ada-lang.c (ada_language_defn): Update.
2460 * ada-exp.y (yyerror): Now static.
2461
2462 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2463
2464 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
2465 (store_sveregs_to_thread): Likewise.
2466 (aarch64_linux_fetch_inferior_registers): Check for SVE.
2467 (aarch64_linux_store_inferior_registers): Likewise.
2468 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
2469 function.
2470 (aarch64_sve_regs_copy_to_regcache): Likewise.
2471 (aarch64_sve_regs_copy_from_regcache): Likewise.
2472 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
2473 declaration.
2474 (aarch64_sve_regs_copy_to_regcache): Likewise.
2475 (aarch64_sve_regs_copy_from_regcache): Likewise.
2476 (sve_context): Structure from Linux headers.
2477 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
2478 (SVE_SIG_ZREG_SIZE): Likewise.
2479 (SVE_SIG_PREG_SIZE): Likewise.
2480 (SVE_SIG_FFR_SIZE): Likewise.
2481 (SVE_SIG_REGS_OFFSET): Likewise.
2482 (SVE_SIG_ZREGS_OFFSET): Likewise.
2483 (SVE_SIG_ZREG_OFFSET): Likewise.
2484 (SVE_SIG_ZREGS_SIZE): Likewise.
2485 (SVE_SIG_PREGS_OFFSET): Likewise.
2486 (SVE_SIG_PREG_OFFSET): Likewise.
2487 (SVE_SIG_PREGS_SIZE): Likewise.
2488 (SVE_SIG_FFR_OFFSET): Likewise.
2489 (SVE_SIG_REGS_SIZE): Likewise.
2490 (SVE_SIG_CONTEXT_SIZE): Likewise.
2491 (SVE_PT_REGS_MASK): Likewise.
2492 (SVE_PT_REGS_FPSIMD): Likewise.
2493 (SVE_PT_REGS_SVE): Likewise.
2494 (SVE_PT_VL_INHERIT): Likewise.
2495 (SVE_PT_VL_ONEXEC): Likewise.
2496 (SVE_PT_REGS_OFFSET): Likewise.
2497 (SVE_PT_FPSIMD_OFFSET): Likewise.
2498 (SVE_PT_FPSIMD_SIZE): Likewise.
2499 (SVE_PT_SVE_ZREG_SIZE): Likewise.
2500 (SVE_PT_SVE_PREG_SIZE): Likewise.
2501 (SVE_PT_SVE_FFR_SIZE): Likewise.
2502 (SVE_PT_SVE_FPSR_SIZE): Likewise.
2503 (SVE_PT_SVE_FPCR_SIZE): Likewise.
2504 (__SVE_SIG_TO_PT): Likewise.
2505 (SVE_PT_SVE_OFFSET): Likewise.
2506 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
2507 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
2508 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
2509 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
2510 (SVE_PT_SVE_PREG_OFFSET): Likewise.
2511 (SVE_PT_SVE_PREGS_SIZE): Likewise.
2512 (SVE_PT_SVE_FFR_OFFSET): Likewise.
2513 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
2514 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
2515 (SVE_PT_SVE_SIZE): Likewise.
2516 (SVE_PT_SIZE): Likewise.
2517 (HAS_SVE_STATE): New define.
2518
2519 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2520
2521 * nat/aarch64-sve-linux-sigcontext.h: New file.
2522 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
2523 new files.
2524 (SVE_VQ_MIN): Likewise.
2525 (SVE_VQ_MAX): Likewise.
2526 (SVE_VL_MIN): Likewise.
2527 (SVE_VL_MAX): Likewise.
2528 (SVE_NUM_ZREGS): Likewise.
2529 (SVE_NUM_PREGS): Likewise.
2530 (sve_vl_valid): Likewise.
2531 (struct user_sve_header): Likewise.
2532
2533 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
2534 Richard Bunt <Richard.Bunt@arm.com>
2535
2536 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
2537 was requested by GDB.
2538
2539 2018-06-15 Tom de Vries <tdevries@suse.de>
2540
2541 * MAINTAINERS (Write After Approval): Add Tom de Vries.
2542
2543 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
2544
2545 * gnulib/update-gnulib.sh: Print expected versions of
2546 autoconf/aclocal.
2547
2548 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
2549
2550 * arch-utils.c (default_type_align): Use type_length_units.
2551 * gdbtypes.c (type_align): Use type_length_units.
2552
2553 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2554
2555 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
2556 of 'define' command.
2557
2558 2018-06-14 Tom de Vries <tdevries@suse.de>
2559
2560 PR cli/22573
2561 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
2562 get_no_prettyformat_print_options.
2563
2564 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
2565
2566 * sparc-nat.h: Include target.h.
2567 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
2568 <fetch_registers>: Remove this argument in function call.
2569 <store_registers>: Remove this argument in function call, remove
2570 extra semicolon.
2571 <low_forget_process>: Call sparc64_forget_process instead of
2572 sparc_forget_process.
2573
2574 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2575
2576 * procfs.c (_initialize_procfs): Use add_inf_child_target.
2577 (procfs_target::make_corefile_notes): Adjust to new
2578 target_read_alloc return type.
2579
2580 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2581 Stephen Roberts <stephen.roberts@arm.com>
2582
2583 PR gdb/22882
2584 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
2585 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
2586 Move should_notify_stop local into more inner scope.
2587
2588 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2589 Stephen Roberts <stephen.roberts@arm.com>
2590
2591 PR gdb/22882
2592 * infrun.c (resume_1): Add call to mark_async_event_handler.
2593
2594 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2595
2596 * infrun.c (do_target_wait): Change old version of $pc printed.
2597
2598 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
2599
2600 * dwarf2read.c (read_index_from_section): Rename to...
2601 (read_gdb_index_from_section): ... this, update all callers.
2602 (dwarf2_read_index): Rename to...
2603 (dwarf2_read_gdb_index): ... this, update all callers.
2604
2605 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
2606
2607 * gdb/hppa-linux-nat.c
2608 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
2609 hppa_linux_nat_target::fetch_registers.
2610
2611 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2612
2613 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
2614 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
2615 (AARCH64_DWARF_SVE_FFR): Likewise.
2616 (AARCH64_DWARF_SVE_P0): Likewise.
2617 (AARCH64_DWARF_SVE_Z0): Likewise.
2618
2619 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2620
2621 * common/common-regcache.h (raw_compare): New function.
2622 * regcache.c (regcache::raw_compare): Likewise.
2623 * regcache.h (regcache::raw_compare): New declaration.
2624
2625 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2626
2627 * common/common-regcache.h (reg_buffer_common): New structure.
2628 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
2629 (reg_buffer::raw_supply): Likewise.
2630 (reg_buffer::raw_supply_integer): Likewise.
2631 (reg_buffer::raw_supply_zeroed): Likewise.
2632 (reg_buffer::raw_collect): Likewise.
2633 (reg_buffer::raw_collect_integer): Likewise.
2634 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
2635 (reg_buffer::raw_supply): Likewise.
2636 (reg_buffer::raw_supply_integer): Likewise.
2637 (reg_buffer::raw_supply_zeroed): Likewise.
2638 (reg_buffer::raw_collect): Likewise.
2639 (reg_buffer::raw_collect_integer): Likewise.
2640
2641 2018-06-10 Tom Tromey <tom@tromey.com>
2642
2643 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
2644 (class remote_state) <stop_reply_queue>: Now std::vector.
2645 (remote_state::~remote_state)
2646 (remote_target::stop_reply_queue_length): Update.
2647 (struct queue_iter_param, remove_child_of_pending_fork)
2648 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
2649 (check_pending_event_prevents_wildcard_vcont_callback)
2650 (remove_stop_reply_for_inferior)
2651 (remove_stop_reply_of_remote_state)
2652 (remote_notif_remove_once_on_match)
2653 (stop_reply_match_ptid_and_ws)
2654 (remote_kill_child_of_pending_fork): Remove.
2655 (remote_target::remove_new_fork_children)
2656 (remote_target::check_pending_events_prevent_wildcard_vcont)
2657 (remote_target::discard_pending_stop_replies)
2658 (remote_target::discard_pending_stop_replies_in_queue)
2659 (remote_target::remote_notif_remove_queued_reply)
2660 (remote_target::queued_stop_reply)
2661 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
2662 (remote_target::wait, remote_target::kill_new_fork_children)
2663 (remote_target::async): Update.
2664
2665 2018-06-10 Tom Tromey <tom@tromey.com>
2666
2667 * record-full.c (record_full_arch_list_cleanups): Remove.
2668 (record_full_message): Use try/catch.
2669 (record_full_wait_cleanups): Remove.
2670 (record_full_wait_1): Use try/catch.
2671 (record_full_restore): Likewise.
2672
2673 2018-06-10 Tom Tromey <tom@tromey.com>
2674
2675 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
2676 declare VEC. Add constructor.
2677 <in_target_beneath>: Now bool.
2678 (record_full_breakpoints): Now a std::vector, static.
2679 (record_full_sync_record_breakpoints)
2680 (record_full_init_record_breakpoints)
2681 (record_full_target::insert_breakpoint)
2682 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
2683
2684 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
2685
2686 * dwarf2read.c (process_cu_includes): Remove struct keyword.
2687 * serial.c (serial_interface_lookup): Remove struct keyword.
2688
2689 2018-06-10 Tom Tromey <tom@tromey.com>
2690
2691 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
2692 method.
2693 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
2694 a method.
2695 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
2696 method.
2697 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
2698 "beneath" as a method.
2699 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
2700 Use "beneath" as a method.
2701
2702 2018-06-10 Tom Tromey <tom@tromey.com>
2703
2704 * tracefile.c (struct trace_file_writer_deleter): New.
2705 <operator()>: Rename from trace_file_writer_xfree.
2706 (trace_file_writer_up): New typedef.
2707 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
2708
2709 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
2710
2711 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
2712 <m_registers, m_register_status>: Change type to
2713 std::unique_ptr.
2714 * regcache.c (reg_buffer::reg_buffer): Use new instead of
2715 XCNEWVEC.
2716
2717 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
2718
2719 * common/common-regcache.h (enum register_status): Add
2720 underlying type "signed char".
2721 * regcache.h (reg_buffer) <m_register_status>: Change type to
2722 register_status *.
2723 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
2724 register_status instead of signed char.
2725 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
2726 (reg_buffer::get_register_status): Remove cast.
2727 (readable_regcache::raw_read): Remove cast.
2728 (readable_regcache::cooked_read): Remove cast.
2729
2730 2018-06-09 Tom Tromey <tom@tromey.com>
2731
2732 * source.c (reverse_search_command, forward_search_command): Use
2733 scoped_fd.
2734
2735 2018-06-09 Tom Tromey <tom@tromey.com>
2736
2737 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
2738 (serial_ops_list): Now static, std::vector.
2739 (serial_interface_lookup, serial_add_interface): Update.
2740
2741 2018-06-09 Tom Tromey <tom@tromey.com>
2742
2743 * dwarf2read.c (process_cu_includes): Update.
2744 (process_full_comp_unit): Update.
2745 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
2746 std::vector.
2747
2748 2018-06-08 Paul Koning <paul_koning@dell.com>
2749
2750 PR gdb/23252
2751
2752 * python/python.c (do_start_initialization):
2753 Avoid call to internal Python API.
2754 (init__gdb_module): New function.
2755
2756 2018-06-08 Gary Benson <gbenson@redhat.com>
2757
2758 * linux-thread-db.c (valprint.h): New include.
2759 (struct check_thread_db_info): New structure.
2760 (check_thread_db_on_load, tdb_testinfo): New static globals.
2761 (check_thread_db, check_thread_db_callback): New functions.
2762 (try_thread_db_load_1): Run integrity checks if requested.
2763 (maintenance_check_libthread_db): New function.
2764 (_initialize_thread_db): Register "maint check libthread-db"
2765 and "maint set/show check-libthread-db".
2766 * NEWS: Mention the above new commands.
2767
2768 2018-06-08 Tom Tromey <tom@tromey.com>
2769
2770 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
2771 now a method.
2772
2773 2018-06-08 Tom Tromey <tom@tromey.com>
2774
2775 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
2776
2777 2018-06-08 Tom Tromey <tom@tromey.com>
2778
2779 * common/btrace-common.h (struct btrace_data): Add constructor,
2780 destructor, move assignment operator.
2781 <empty, clear, fini>: New methods.
2782 <format>: Initialize.
2783 (btrace_data_init, btrace_data_fini, btrace_data_clear)
2784 (btrace_data_empty): Don't declare.
2785 * common/btrace-common.c (btrace_data_init): Remove.
2786 (btrace_data::fini): Rename from btrace_data_fini.
2787 (btrace_data::empty): Rename from btrace_data_empty.
2788 (btrace_data::clear): Rename from btrace_data_clear. Return
2789 bool.
2790 * btrace.h (make_cleanup_btrace_data): Don't declare.
2791 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
2792 (parse_xml_btrace): Update.
2793 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
2794 (maint_btrace_clear_packet_history_cmd): Update.
2795
2796 2018-06-07 Pedro Alves <palves@redhat.com>
2797
2798 * target.h (target_ops) <beneath>: Now a method. All references
2799 updated.
2800 (class target_stack): New.
2801 * target.c (g_target_stack): New.
2802 (g_current_top_target): Delete.
2803 (current_top_target): Get the top target out of g_target_stack.
2804 (target_stack::push, target_stack::unpush): New.
2805 (push_target, unpush_target): Reimplement.
2806 (target_is_pushed): Reimplement in terms of g_target_stack.
2807 (target_ops::beneath, target_stack::find_beneath): New.
2808
2809 2018-06-07 Pedro Alves <palves@redhat.com>
2810
2811 * target.h (find_target_beneath): Delete declaration.
2812 * target.c (find_target_beneath): Delete definition.
2813 * aix-thread.c: All callers of find_target_beneath adjusted to
2814 call target_ops::beneath instead.
2815 * bsd-uthread.c: Likewise.
2816 * linux-thread-db.c: Likewise.
2817 * ravenscar-thread.c: Likewise.
2818 * sol-thread.c: Likewise.
2819 * spu-multiarch.c: Likewise.
2820
2821 2018-06-07 Pedro Alves <palves@redhat.com>
2822
2823 * target.h (target_ops) <beneath>: Now a method. All references
2824 updated.
2825 (target_ops) <m_beneath>: New.
2826 * target.c (target_ops::beneath): New.
2827 * corelow.c: Adjust all references to target_ops::beneath.
2828 * linux-thread-db.c: Likewise.
2829 * make-target-delegates: Likewise.
2830 * record-btrace.c: Likewise.
2831 * record-full.c: Likewise.
2832 * remote.c: Likewise.
2833 * target.c: Likewise.
2834 * target-delegates.c: Regenerate.
2835
2836 2018-06-07 Pedro Alves <palves@redhat.com>
2837
2838 * target.h (target_stack): Delete.
2839 (current_top_target): Declare function.
2840 * target.c (target_stack): Delete.
2841 (g_current_top_target): New.
2842 (current_top_target): New function.
2843 * auxv.c: Use current_top_target instead of target_stack
2844 throughout.
2845 * avr-tdep.c: Likewise.
2846 * breakpoint.c: Likewise.
2847 * corefile.c: Likewise.
2848 * elfread.c: Likewise.
2849 * eval.c: Likewise.
2850 * exceptions.c: Likewise.
2851 * frame.c: Likewise.
2852 * gdbarch-selftests.c: Likewise.
2853 * gnu-v3-abi.c: Likewise.
2854 * ia64-tdep.c: Likewise.
2855 * ia64-vms-tdep.c: Likewise.
2856 * infcall.c: Likewise.
2857 * infcmd.c: Likewise.
2858 * infrun.c: Likewise.
2859 * linespec.c: Likewise.
2860 * linux-tdep.c: Likewise.
2861 * minsyms.c: Likewise.
2862 * ppc-linux-nat.c: Likewise.
2863 * ppc-linux-tdep.c: Likewise.
2864 * procfs.c: Likewise.
2865 * regcache.c: Likewise.
2866 * remote.c: Likewise.
2867 * rs6000-tdep.c: Likewise.
2868 * s390-linux-nat.c: Likewise.
2869 * s390-tdep.c: Likewise.
2870 * solib-aix.c: Likewise.
2871 * solib-darwin.c: Likewise.
2872 * solib-dsbt.c: Likewise.
2873 * solib-spu.c: Likewise.
2874 * solib-svr4.c: Likewise.
2875 * solib-target.c: Likewise.
2876 * sparc-tdep.c: Likewise.
2877 * sparc64-tdep.c: Likewise.
2878 * spu-tdep.c: Likewise.
2879 * symfile.c: Likewise.
2880 * symtab.c: Likewise.
2881 * target-descriptions.c: Likewise.
2882 * target-memory.c: Likewise.
2883 * target.c: Likewise.
2884 * target.h: Likewise.
2885 * tracefile-tfile.c: Likewise.
2886 * tracepoint.c: Likewise.
2887 * valops.c: Likewise.
2888 * valprint.c: Likewise.
2889 * value.c: Likewise.
2890 * windows-tdep.c: Likewise.
2891 * mi/mi-main.c: Likewise.
2892
2893 2018-06-07 Tom Tromey <tom@tromey.com>
2894
2895 * valprint.h (build_address_symbolic): Declare.
2896 * printcmd.c (print_address_symbolic): Update.
2897 (build_address_symbolic): Change "name" and "filename" to
2898 std::string.
2899 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
2900 Update.
2901 * defs.h (build_address_symbolic): Remove declaration.
2902
2903 2018-06-07 Alan Hayward <alan.hayward@arm.com>
2904
2905 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
2906 (aarch64_vnv_type): Add function.
2907 (aarch64_pseudo_register_name): Add V regs for SVE.
2908 (aarch64_pseudo_register_type): Likewise.
2909 (aarch64_pseudo_register_reggroup_p): Likewise.
2910 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
2911 (aarch64_pseudo_read_value): Add V regs for SVE.
2912 (aarch64_pseudo_write_2): Use V0 offset for SVE
2913 (aarch64_pseudo_write): Add V regs for SVE.
2914 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
2915
2916 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
2917
2918 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
2919 (sve_vl_from_vq): Likewise.
2920
2921 2018-06-05 Tom Tromey <tom@tromey.com>
2922
2923 * cli/cli-cmds.c (show_version): Update.
2924 * top.c (print_gdb_version): Add "interactive" parameter.
2925 Update.
2926 * main.c (captured_main_1): Update.
2927 * top.h (print_gdb_version): Add "interactive" parameter and a
2928 comment.
2929
2930 2018-06-05 David Malcolm <dmalcolm@redhat.com>
2931
2932 * common/enum-flags.h: Add trailing semicolon to example in
2933 comment.
2934
2935 2018-06-05 Tom Tromey <tom@tromey.com>
2936
2937 PR cli/12326:
2938 * NEWS: Add entry about pager.
2939 * utils.c (pagination_disabled_for_command): New global.
2940 (prompt_for_continue): Allow "c" response to prompt.
2941 (reinitialize_more_filter): Clear
2942 pagination_disabled_for_command.
2943 (fputs_maybe_filtered): Check pagination_disabled_for_command.
2944
2945 2018-06-04 Tom Tromey <tom@tromey.com>
2946
2947 * ada-lang.h (ada_lookup_symbol_list): Update.
2948 * ada-lang.c (resolve_subexp): Update.
2949 (symbols_are_identical_enums): Change type of syms. Remove nsyms
2950 parameter.
2951 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
2952 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
2953 results parameter to std::vector.
2954 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
2955 Update.
2956 * ada-exp.y (block_lookup): Update.
2957 (select_possible_type_sym): Change type of syms. Remove nsyms
2958 parameter.
2959 (write_var_or_type, write_name_assoc): Update.
2960
2961 2018-06-04 Joel Brobecker <brobecker@adacore.com>
2962
2963 * windows-nat.c (windows_nat_target::xfer_partial): Return
2964 TARGET_XFER_E_IO if we need to delegate to the target beneath
2965 but BENEATH is NULL.
2966
2967 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
2968
2969 * Makefile.in (config.status): Add configure.nat as a
2970 dependency.
2971
2972 2018-06-04 Tom Tromey <tom@tromey.com>
2973
2974 * cp-name-parser.y (cpname_state): Add method declarations.
2975 (HANDLE_QUAL): Update.
2976 (cpname_state::d_grab, cpname_state::fill_comp)
2977 (cpname_state::make_operator, cpname_state::make_dtor)
2978 (cpname_state::make_builtin_type, cpname_state::make_name)
2979 (cpname_state::d_qualify, cpname_state::d_int_type)
2980 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
2981 (%union): Move earlier.
2982
2983 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2984
2985 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
2986
2987 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2988
2989 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
2990 (aarch64_pseudo_write_1): Likewise.
2991 (aarch64_pseudo_read_value): Use helper.
2992 (aarch64_pseudo_write): Likewise.
2993
2994 2018-06-04 Pedro Alves <palves@redhat.com>
2995
2996 * darwin-nat.c (darwin_ops): Delete.
2997 (darwin_attach_pid): Use get_native_target.
2998
2999 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3000
3001 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
3002 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
3003
3004 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3005
3006 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
3007 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
3008 (aarch64_gdbarch_init): Check for SVE.
3009 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
3010
3011 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3012
3013 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
3014 * aarch64-tdep.h (aarch64_read_description): Likewise.
3015 * arch/aarch64.c (aarch64_create_target_description): Likewise.
3016 * arch/aarch64.h (aarch64_create_target_description): Likewise.
3017 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
3018 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
3019 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
3020
3021 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
3022
3023 * value.c (value_fetch_lazy_bitfield): New.
3024 (value_fetch_lazy_memory): New.
3025 (value_fetch_lazy_register): New.
3026 (value_fetch_lazy): Factor out to smaller functions.
3027
3028 2018-06-01 Tom Tromey <tom@tromey.com>
3029
3030 * cp-name-parser.y (backslashable, represented): Now const.
3031
3032 2018-06-01 Tom Tromey <tom@tromey.com>
3033
3034 * cp-name-parser.y: Include parser-defs.h.
3035 (parser_fprintf): Remove declaration.
3036
3037 2018-06-01 Tom Tromey <tom@tromey.com>
3038
3039 * cp-name-parser.y: Use %pure-parser, %lex-param, and
3040 %parse-param.
3041 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
3042 (global_result): Remove globals.
3043 (struct cpname_state): New.
3044 (yyparse): Don't declare.
3045 (yylex, yyerror): Move declarations after %union.
3046 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
3047 (make_name): Add state parameter.
3048 Update all callers.
3049 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
3050 parameter.
3051 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
3052 Update.
3053 (yylex): Add lvalp, state parameters.
3054 (yyerror): Add state parameter.
3055 (cp_demangled_name_to_comp): Update.
3056
3057 2018-06-01 Tom Tromey <tom@tromey.com>
3058
3059 * cp-name-parser.y (parser_fprintf): Declare.
3060 (GDB_YY_REMAP_PREFIX): Define.
3061 Include yy-remap.h. Don't redefine yy* identifiers.
3062
3063 2018-06-01 Tom Tromey <tom@tromey.com>
3064
3065 * python/py-type.c (typy_legacy_template_argument): Update.
3066 * cp-support.h (cp_demangled_name_to_comp): Update.
3067 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
3068 parameter to be a "std::string *".
3069 (main): Update.
3070
3071 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
3072
3073 * ada-lex.l: Include "diagnostics.h" instead of
3074 "common/diagnostics.h".
3075 * unittests/environ-selftests.c: Likewise.
3076 * common/diagnostics.h: Moved to ../include.
3077
3078 2018-06-01 Joel Brobecker <brobecker@adacore.com>
3079
3080 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
3081 to language_mode_manual while calling breakpoint_re_set_one.
3082
3083 2018-06-01 Tom Tromey <tom@tromey.com>
3084
3085 * valops.c (value_cast_structs, destructor_name_p): Update.
3086 * symtab.c (gdb_mangle_name): Update.
3087 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
3088 Update.
3089 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
3090 (pascal_object_print_value_fields, pascal_object_print_value):
3091 Update.
3092 * p-typeprint.c (pascal_type_print_derivation_info): Update.
3093 * linespec.c (find_methods): Update.
3094 * gdbtypes.h (type_name_no_tag): Remove.
3095 (type_name_or_error): Rename from type_name_no_tag_or_error.
3096 * gdbtypes.c (type_name_no_tag): Remove.
3097 (type_name_or_error): Rename from type_name_no_tag_or_error.
3098 (lookup_struct_elt_type, check_typedef): Update.
3099 * expprint.c (print_subexp_standard): Update.
3100 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
3101 * d-namespace.c (d_lookup_nested_symbol): Update.
3102 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
3103 (cp_print_class_member): Update.
3104 * cp-namespace.c (cp_lookup_nested_symbol): Update.
3105 * completer.c (add_struct_fields): Update.
3106 * c-typeprint.c (cp_type_print_derivation_info)
3107 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
3108 Update.
3109 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
3110 (ada_prefer_type, ada_is_exception_sym): Update.
3111
3112 2018-06-01 Tom Tromey <tom@tromey.com>
3113
3114 * valops.c (enum_constant_from_type, value_namespace_elt)
3115 (value_maybe_namespace_elt): Update.
3116 * valarith.c (find_size_for_pointer_math): Update.
3117 * target-descriptions.c (make_gdb_type): Update.
3118 * symmisc.c (print_symbol): Update.
3119 * stabsread.c (define_symbol, read_type)
3120 (complain_about_struct_wipeout, add_undefined_type)
3121 (cleanup_undefined_types_1): Update.
3122 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
3123 (rust_range_type_p, val_print_struct, rust_print_struct_def)
3124 (rust_internal_print_type, rust_composite_type)
3125 (rust_evaluate_funcall, rust_evaluate_subexp)
3126 (rust_inclusive_range_type_p): Update.
3127 * python/py-type.c (typy_get_tag): Update.
3128 * p-typeprint.c (pascal_type_print_base): Update.
3129 * mdebugread.c (parse_symbol, parse_type): Update.
3130 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
3131 Update.
3132 * guile/scm-type.c (gdbscm_type_tag): Update.
3133 * go-lang.c (sixg_string_p): Update.
3134 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
3135 Update.
3136 * gdbtypes.h (struct main_type) <tag_name>: Remove.
3137 (TYPE_TAG_NAME): Remove.
3138 * gdbtypes.c (type_name_no_tag): Simplify.
3139 (check_typedef, check_types_equal, recursive_dump_type)
3140 (copy_type_recursive, arch_composite_type): Update.
3141 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
3142 in summary mode when needed.
3143 * eval.c (evaluate_funcall): Update.
3144 * dwarf2read.c (fixup_go_packaging, read_structure_type)
3145 (process_structure_scope, read_enumeration_type)
3146 (read_namespace_type, read_module_type, determine_prefix): Update.
3147 * cp-support.c (inspect_type): Update.
3148 * coffread.c (process_coff_symbol, decode_base_type): Update.
3149 * c-varobj.c (c_is_path_expr_parent): Update.
3150 * c-typeprint.c (c_type_print_base_struct_union): Update.
3151 (c_type_print_base_1): Update. Print struct/class/union/enum in
3152 summary when using C language.
3153 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
3154 (gen_maybe_namespace_elt): Update.
3155 * ada-lang.c (ada_type_name): Simplify.
3156 (empty_record, ada_template_to_fixed_record_type_1)
3157 (template_to_static_fixed_type)
3158 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
3159
3160 2018-06-01 Tom Tromey <tom@tromey.com>
3161
3162 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
3163 c_print_type.
3164 * c-typeprint.c (c_print_type_1): Add "language" parameter.
3165 (c_print_type): Update.
3166 (c_print_type): New overload.
3167 (c_type_print_varspec_prefix, c_type_print_args)
3168 (c_type_print_varspec_suffix, c_print_type_no_offsets)
3169 (c_type_print_base_struct_union, c_type_print_base_1)
3170 (cp_type_print_method_args): Add "language" parameter.
3171 (c_type_print_base): Update.
3172 * c-lang.h (c_print_type): Add new overload.
3173
3174 2018-06-01 Tom Tromey <tom@tromey.com>
3175
3176 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
3177 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
3178
3179 2018-06-01 Alan Hayward <alan.hayward@arm.com>
3180
3181 * aarch64-tdep.c (aarch64_sve_register_names): New const
3182 var.
3183 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
3184 (AARCH64_SVE_Z_REGS_NUM): New define.
3185 (AARCH64_SVE_P_REGS_NUM): Likewise.
3186 (AARCH64_SVE_NUM_REGS): Likewise.
3187
3188 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
3189
3190 * nat/linux-ptrace.h [__alpha__]
3191 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
3192 definitions.
3193
3194 2018-05-31 Maciej W. Rozycki <macro@mips.com>
3195
3196 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
3197 the endianness selected.
3198 * NEWS: Document `set endian auto' mode operation update.
3199
3200 2018-05-31 Alan Hayward <alan.hayward@arm.com>
3201
3202 * Makefile.in: Add new header.
3203 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
3204 (sve_vl_from_vg): Likewise.
3205 (sve_vq_from_vl): Likewise.
3206 (sve_vl_from_vq): Likewise.
3207 (sve_vq_from_vg): Likewise.
3208 (sve_vg_from_vq): Likewise.
3209 * configure.nat: Add new c file.
3210 * nat/aarch64-sve-linux-ptrace.c: New file.
3211 * nat/aarch64-sve-linux-ptrace.h: New file.
3212
3213 2018-05-31 Alan Hayward <alan.hayward@arm.com>
3214
3215 * aarch64-linux-nat.c (aarch64_linux_read_description):
3216 Add parmeter zero.
3217 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
3218 Likewise.
3219 * aarch64-tdep.c (tdesc_aarch64_list): Add.
3220 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
3221 (aarch64_gdbarch_init): Add parmeter zero.
3222 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
3223 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
3224 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
3225 parmeter.
3226 * doc/gdb.texinfo: Describe SVE feature
3227 * features/aarch64-sve.c: New file.
3228
3229 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
3230
3231 PR gdb/23210
3232 * gdbarch.sh (significant_addr_bit): Default to zero when
3233 not set by target architecture.
3234 * gdbarch.c: Re-generated.
3235 * utils.c (address_significant): Update.
3236
3237 2018-05-30 Joel Brobecker <brobecker@adacore.com>
3238
3239 * stack.c (func_command): Remove trailing newline in call to error.
3240
3241 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3242
3243 * regcache.h (regcache_raw_collect): Remove, update callers to
3244 use regcache::raw_collect.
3245 * regcache.c (regcache_raw_collect): Remove.
3246
3247 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3248
3249 * regcache.h (regcache_raw_supply): Remove, update callers to
3250 use detached_regcache::raw_supply.
3251 * regcache.c (regcache_raw_supply): Remove.
3252
3253 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3254
3255 * regcache.h (regcache_cooked_write_part): Remove, update
3256 callers to use regcache::cooked_write_part.
3257 * regcache.c (regcache_cooked_write_part): Remove.
3258
3259 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3260
3261 * regcache.h (regcache_cooked_read_part): Remove, update callers
3262 to use readable_regcache::cooked_read_part.
3263 * regcache.c (regcache_cooked_read_part): Remove.
3264
3265 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3266
3267 * regcache.h (regcache_cooked_read_value): Remove, update
3268 callers to use readable_regcache::cooked_read_value.
3269 * regcache.c (regcache_cooked_read_value): Remove.
3270
3271 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3272
3273 * regcache.h (regcache_cooked_write): Remove, update callers to
3274 use regcache::cooked_write.
3275 * regcache.c (regcache_cooked_write): Remove.
3276
3277 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3278
3279 * regcache.h (regcache_invalidate): Remove, update callers to
3280 use detached_regcache::invalidate instead.
3281 * regcache.c (regcache_invalidate): Remove.
3282
3283 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3284
3285 * regcache.h (regcache_raw_write_part): Remove, update callers
3286 to use regcache::raw_write_part instead.
3287 * regcache.c (regcache_raw_write_part): Remove.
3288
3289 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3290
3291 * regcache.h (regcache_raw_read_part): Remove, update callers to
3292 use readable_regcache::raw_read_part instead.
3293 * regcache.c (regcache_raw_read_part): Remove.
3294
3295 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3296
3297 * regcache.h (regcache_cooked_read): Remove, update callers to
3298 use readable_regcache::cooked_read instead.
3299 * regcache.c (regcache_cooked_read): Remove.
3300
3301 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3302
3303 * regcache.h (regcache_raw_write): Remove, update callers to use
3304 regcache::raw_write instead.
3305 * regcache.c (regcache_raw_write): Remove.
3306
3307 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3308
3309 * regcache.h (regcache_raw_read): Remove, update callers to use
3310 readable_regcache::raw_read instead.
3311 * regcache.c (regcache_raw_read): Remove.
3312
3313 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3314
3315 * regcache.h (regcache_raw_update): Remove, update callers to
3316 use readable_regcache::raw_update instead.
3317 * regcache.c (regcache_raw_update): Remove.
3318
3319 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3320
3321 * regcache.h (regcache_register_status): Remove, update callers
3322 to use reg_buffer::get_register_status directly instead.
3323 * regcache.c (regcache_register_status): Remove.
3324
3325 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3326
3327 * regcache.h (regcache_get_ptid): Remove, update all callers to
3328 call regcache::ptid instead.
3329 * regcache.c (regcache_get_ptid): Remove.
3330
3331 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3332
3333 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
3334
3335 2018-05-30 Pedro Alves <palves@redhat.com>
3336
3337 * common/common-exceptions.h (exception_rethrow): Use
3338 ATTRIBUTE_NORETURN.
3339
3340 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
3341
3342 * breakpoint.c (print_solib_event, check_status_catch_solib):
3343 Remove struct keyword in range-based for loops.
3344 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
3345 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
3346 Likewise.
3347 * linespec.c (find_superclass_methods, search_minsyms_for_name):
3348 Likewise.
3349 * symfile.c (addr_info_make_relative): Likewise.
3350 * thread.c (value_in_thread_stack_temporaries): Likewise.
3351
3352 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
3353
3354 PR gdb/16841
3355 * valops.c (value_struct_elt_for_reference): Call check_typedef on
3356 aggregate type to get its real type before accessing it.
3357
3358 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
3359
3360 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
3361 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
3362 * coff-pe-read.c (add_pe_forwarded_sym): Replace
3363 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
3364 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
3365 * jit.c (jit_breakpoint_re_set_internal): Likewise.
3366 * printcmd.c (info_address_command): Likewise.
3367
3368 2018-05-29 Tom Tromey <tom@tromey.com>
3369
3370 * windows-nat.c (handle_exception): Update fall-through comment.
3371
3372 2018-05-29 Tom Tromey <tom@tromey.com>
3373
3374 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
3375 (struct program_space) <added_solibs>: Now a std::vector.
3376 * breakpoint.c (print_solib_event): Update.
3377 (check_status_catch_solib): Update.
3378 * progspace.c (clear_program_space_solib_cache): Update.
3379 * solib.c (update_solib_list): Update.
3380
3381 2018-05-29 Tom Tromey <tom@tromey.com>
3382
3383 * python/py-type.c (typy_richcompare): Update.
3384 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
3385 * gdbtypes.h (types_deeply_equal): Return bool.
3386 (types_equal): Likewise.
3387 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
3388 declare VEC.
3389 (check_types_equal): Change worklist to std::vector. Return
3390 bool.
3391 (struct type_equality_entry): Add constructor.
3392 (compare_maybe_null_strings): Return bool.
3393 (check_types_worklist): Return bool. Change worklist to
3394 std::vector.
3395 (types_deeply_equal): Use std::vector.
3396 (types_equal): Return bool.
3397 (compare_maybe_null_strings): Simplify.
3398
3399 2018-05-29 Tom Tromey <tom@tromey.com>
3400
3401 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
3402
3403 2018-05-29 Tom Tromey <tom@tromey.com>
3404
3405 * objc-lang.h: Don't include cp-support.h.
3406 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
3407 declare VEC.
3408
3409 2018-05-27 Tom Tromey <tom@tromey.com>
3410
3411 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
3412
3413 2018-05-25 Tom Tromey <tom@tromey.com>
3414
3415 * value.c (value::location): Initialize.
3416
3417 2018-05-25 Tom Tromey <tom@tromey.com>
3418
3419 * dbxread.c (init_bincl_list): Remove.
3420 (bincl_list): Now a std::vector.
3421 (bincls_allocated, next_bincl): Remove.
3422 (free_bincl_list, do_free_bincl_list_cleanup)
3423 (make_cleanup_free_bincl_list): Remove.
3424 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
3425 unique_xmalloc_ptr.
3426 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
3427 (struct header_file_location): Add constructor.
3428 (add_bincl_to_list): Remove.
3429
3430 2018-05-25 Tom Tromey <tom@tromey.com>
3431
3432 * tui/tui.c (tui_enable): Update.
3433 * mi/mi-interp.c (mi_interp::init): Update.
3434 * interps.h (class interp) <name>: New method.
3435 <m_name>: Rename from name.
3436 (~scoped_restore_interp): Update.
3437 * interps.c (interp::interp): Update.
3438 (interp_add, interp_set, interp_lookup_existing)
3439 (current_interp_named_p): Update.
3440
3441 2018-05-25 Tom Tromey <tom@tromey.com>
3442
3443 * interps.c (interp_name): Remove.
3444 * mi/mi-interp.c (mi_interp::init): Update.
3445 * interps.h (interp_name): Remove.
3446 (~scoped_restore_interp): Update.
3447 * tui/tui.c (tui_enable): Update.
3448
3449 2018-05-25 Tom Tromey <tom@tromey.com>
3450
3451 * utils.c (fputs_maybe_filtered): Update.
3452 * linespec.c (decode_line_full): Update.
3453 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
3454 (mi_print_breakpoint_for_event, mi_solib_loaded)
3455 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3456 (mi_user_selected_context_changed): Update.
3457 * mi/mi-main.c (mi_execute_command): Update.
3458 * cli/cli-script.c (execute_control_command): Update.
3459 * python/python.c (execute_gdb_command): Update.
3460 * solib.c (info_sharedlibrary_command): Update.
3461 * interps.c (interp_ui_out): Remove.
3462 * interps.h (interp_ui_out): Remove.
3463
3464 2018-05-25 Tom Tromey <tom@tromey.com>
3465
3466 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
3467 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
3468 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
3469
3470 2018-05-25 Tom Tromey <tom@tromey.com>
3471
3472 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
3473 * interps.c (interp_exec): Use scoped_restore.
3474
3475 2018-05-25 Tom Tromey <tom@tromey.com>
3476
3477 * remote.c (remote_target::remote_file_get): Use
3478 gdb::byte_vector.
3479 (remote_target::remote_file_put): Likewise.
3480
3481 2018-05-25 Tom Tromey <tom@tromey.com>
3482
3483 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
3484 a std::string.
3485 (get_pe_section_index, add_pe_exported_sym): Update.
3486 (read_pe_exported_syms): Use gdb::def_vector.
3487
3488 2018-05-25 Tom Tromey <tom@tromey.com>
3489
3490 * frame.c (remove_prev_frame): Remove.
3491 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
3492
3493 2018-05-25 Maciej W. Rozycki <macro@mips.com>
3494
3495 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
3496 Remove prototypes.
3497 * mips-linux-nat.c (supply_fpregset): Always call
3498 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
3499 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
3500 `mips_fill_fpregset'.
3501 * mips-linux-tdep.c (mips_supply_fpregset)
3502 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
3503 (mips_fill_fpregset_wrapper): Remove functions.
3504 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
3505 (mips_linux_fpregset): Remove variable.
3506 (mips_linux_iterate_over_regset_sections): Use
3507 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
3508 (mips_linux_o32_sigframe_init): Remove comment.
3509
3510 2018-05-25 Pedro Alves <palves@redhat.com>
3511
3512 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
3513 (struct readahead_cache, struct packet_reg, struct
3514 remote_arch_state, class remote_state): Move higher up in the
3515 file.
3516 (remote_target::m_remote_state): Now an object instead of a pointer.
3517 (remote_target::get_remote_state): Adjust.
3518
3519 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
3520
3521 * stack.c (select_and_print_frame): Delete.
3522 (struct function_bounds): Move struct within function.
3523 (func_command): Most content moved into new function
3524 find_frame_for_function, use new function, print result, add
3525 function comment.
3526 (find_frame_for_function): New function, now returns a result.
3527
3528 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3529
3530 * stack.c (iterate_over_block_arg_vars): Fix comment.
3531 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
3532
3533 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
3534
3535 PR gdb/23203
3536 * frame.c
3537 (scoped_restore_selected_frame::scoped_restore_selected_frame):
3538 Define.
3539 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
3540 Define.
3541 * frame.h (class scoped_restore_selected_frame): New class.
3542 * stack.c (print_frame_local_vars): Remove catching and rethrowing
3543 of any exception, use scoped_restore_selected_frame to restore the
3544 frame instead.
3545
3546 2018-05-24 Pedro Alves <palves@redhat.com>
3547
3548 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
3549 override.
3550
3551 2018-05-23 Tom Tromey <tom@tromey.com>
3552
3553 * complaints.c (struct complaints): Remove.
3554 (symfile_complaint_book): Remove.
3555 (series): New global.
3556 (complaint_internal): Update.
3557 (clear_complaints): Update.
3558
3559 2018-05-23 Tom Tromey <tom@tromey.com>
3560
3561 * complaints.c (counters): New global.
3562 (struct complain): Remove.
3563 (struct complaints) <root>: Remove.
3564 (complaint_sentinel): Remove.
3565 (symfile_complaint_book): Update.
3566 (find_complaint) Remove.
3567 (complaint_internal, clear_complaints): Update.
3568
3569 2018-05-23 Tom Tromey <tom@tromey.com>
3570
3571 * complaints.c (struct complain) <file, line>: Remove.
3572 (find_complaint): Remove file, line parameters.
3573 (complaint_internal): Update.
3574
3575 2018-05-23 Tom Tromey <tom@tromey.com>
3576
3577 * complaints.c (vcomplaint): Remove.
3578 (complaint_internal) Merge in contents of vcomplaint.
3579
3580 2018-05-23 Tom Tromey <tom@tromey.com>
3581
3582 * complaints.c (struct complaints) <explanation>: Remove.
3583 (symfile_explanations): Remove.
3584 (symfile_complaint_book): Update.
3585 (vcomplaint): Update.
3586 (struct explanation): Remove.
3587
3588 2018-05-23 Tom Tromey <tom@tromey.com>
3589
3590 * complaints.c (symfile_complaints): Remove.
3591 (complaint_internal): Remove "complaints" parameter.
3592 (clear_complaints, vcomplaint): Remove "c" parameter.
3593 (get_complaints): Remove.
3594 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
3595 (dwarf2_debug_line_missing_file_complaint)
3596 (dwarf2_debug_line_missing_end_sequence_complaint)
3597 (dwarf2_complex_location_expr_complaint)
3598 (dwarf2_const_value_length_mismatch_complaint)
3599 (dwarf2_section_buffer_overflow_complaint)
3600 (dwarf2_macro_malformed_definition_complaint)
3601 (dwarf2_invalid_attrib_class_complaint)
3602 (create_addrmap_from_index, dw2_symtab_iter_next)
3603 (dw2_expand_marked_cus)
3604 (dw2_debug_names_iterator::find_vec_in_debug_names)
3605 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
3606 (create_debug_type_hash_table, init_cutu_and_read_dies)
3607 (partial_die_parent_scope, add_partial_enumeration)
3608 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
3609 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
3610 (read_import_statement, read_file_scope, create_dwo_cu_reader)
3611 (create_cus_hash_table, create_dwp_hash_table)
3612 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
3613 (dwarf2_rnglists_process, dwarf2_ranges_process)
3614 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
3615 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
3616 (handle_struct_member_die, process_structure_scope)
3617 (read_array_type, read_common_block, read_module_type)
3618 (read_tag_pointer_type, read_typedef, read_base_type)
3619 (read_subrange_type, load_partial_dies, partial_die_info::read)
3620 (partial_die_info::read, partial_die_info::read)
3621 (partial_die_info::read, read_checked_initial_length_and_offset)
3622 (dwarf2_string_attr, read_formatted_entries)
3623 (dwarf_decode_line_header)
3624 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3625 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
3626 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
3627 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3628 (get_signatured_type, get_DW_AT_signature_type)
3629 (decode_locdesc, file_file_name, consume_improper_spaces)
3630 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
3631 (dwarf_decode_macro_bytes, dwarf_decode_macros)
3632 (dwarf2_symbol_mark_computed, set_die_type)
3633 (read_attribute_value): Update.
3634 * stap-probe.c (handle_stap_probe, get_stap_base_address):
3635 Update.
3636 * dbxread.c (unknown_symtype_complaint)
3637 (lbrac_mismatch_complaint, repeated_header_complaint)
3638 (set_namestring, function_outside_compilation_unit_complaint)
3639 (read_dbx_symtab, process_one_symbol): Update.
3640 * gdbtypes.c (stub_noname_complaint): Update.
3641 * windows-nat.c (handle_unload_dll): Update.
3642 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
3643 (decode_base_type): Update.
3644 * xcoffread.c (bf_notfound_complaint, ef_complaint)
3645 (eb_complaint, record_include_begin, record_include_end)
3646 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
3647 (process_xcoff_symbol, read_symbol)
3648 (function_outside_compilation_unit_complaint)
3649 (scan_xcoff_symtab): Update.
3650 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
3651 * buildsym.c (finish_block_internal, make_blockvector)
3652 (end_symtab_get_static_block, augment_type_symtab): Update.
3653 * dtrace-probe.c (dtrace_process_dof)
3654 (dtrace_static_probe_ops::get_probes): Update.
3655 * complaints.h (struct complaint): Don't declare.
3656 (symfile_complaints): Remove.
3657 (complaint_internal): Remove "complaints" parameter.
3658 (complaint): Likewise.
3659 (clear_complaints): Likewise.
3660 * symfile.c (syms_from_objfile_1, finish_new_objfile)
3661 (reread_symbols): Update.
3662 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
3663 (dwarf2_frame_cache, decode_frame_entry): Update.
3664 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
3665 * objc-lang.c (lookup_objc_class, lookup_child_selector)
3666 (info_selectors_command): Update.
3667 * macrotab.c (macro_include, check_for_redefinition)
3668 (macro_undef): Update.
3669 * objfiles.c (filter_overlapping_sections): Update.
3670 * stabsread.c (invalid_cpp_abbrev_complaint)
3671 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
3672 (define_symbol, error_type, read_type, rs6000_builtin_type)
3673 (stabs_method_name_from_physname, read_member_functions)
3674 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
3675 (attach_fields_to_type, complain_about_struct_wipeout)
3676 (read_range_type, read_args, common_block_start)
3677 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
3678 Update.
3679 * mdebugread.c (index_complaint, unknown_ext_complaint)
3680 (basic_type_complaint, bad_tag_guess_complaint)
3681 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
3682 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
3683 (parse_procedure, parse_lines)
3684 (function_outside_compilation_unit_complaint)
3685 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
3686 (bad_tag_guess_complaint, reg_value_complaint): Update.
3687 * cp-support.c (demangled_name_complaint): Update.
3688 * macroscope.c (sal_macro_scope): Update.
3689 * dwarf-index-write.c (class debug_names): Update.
3690
3691 2018-05-23 Tom Tromey <tom@tromey.com>
3692
3693 * complaints.c (clear_complaints): Remove "noisy" parameter.
3694 * complaints.h (clear_complaints): Update.
3695 * symfile.c (syms_from_objfile_1, finish_new_objfile)
3696 (reread_symbols): Update.
3697
3698 2018-05-23 Tom Tromey <tom@tromey.com>
3699
3700 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
3701 SUBSEQUENT_MESSAGE.
3702 (vcomplaint, clear_complaints): Update.
3703 (symfile_explanations): Remove some messages.
3704
3705 2018-05-23 Tom Tromey <tom@tromey.com>
3706
3707 * complaints.c (internal_complaint): Remove.
3708 * complaints.h (internal_complaint): Remove.
3709
3710 2018-05-22 Maciej W. Rozycki <macro@mips.com>
3711
3712 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
3713
3714 2018-05-22 Pedro Alves <palves@redhat.com>
3715
3716 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
3717 (remote_fileio_badfd, remote_fileio_return_errno)
3718 (remote_fileio_return_success, remote_fileio_func_open)
3719 (remote_fileio_func_open, remote_fileio_func_close)
3720 (remote_fileio_func_read, remote_fileio_func_write)
3721 (remote_fileio_func_lseek, remote_fileio_func_rename)
3722 (remote_fileio_func_unlink, remote_fileio_func_stat)
3723 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
3724 (remote_fileio_func_isatty, remote_fileio_func_system): Add
3725 remote_target parameter.
3726 (remote_fio_func_map) <func>: Add remote_target parameter.
3727 (do_remote_fileio_request, remote_fileio_request):
3728 * remote-fileio.h (remote_fileio_request):
3729 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
3730 remote_target parameter.
3731 (remote_notif_process, handle_notification): Adjust to pass down
3732 the remote.
3733 (remote_notif_state_allocate): Add remote_target parameter. Save
3734 it.
3735 * remote-notif.h (struct remote_target): Forward declare.
3736 (struct notif_client) <parse, ack, can_get_pending_events>: Add
3737 remote_target parameter.
3738 (struct remote_notif_state) <remote>: New field.
3739 (remote_notif_ack, remote_notif_parse): Add remote_target
3740 parameter.
3741 (remote_notif_state_allocate, remote_notif_state_allocate): Add
3742 remote_target parameter.
3743 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
3744 (threads_listing_context, rmt_thread_action, protocol_feature)
3745 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
3746 (packet_result, struct threads_listing_context, remote_state):
3747 Move definitions and declarations higher up.
3748 (remote_target) <~remote_target>: Declare.
3749 (remote_download_command_source, remote_file_put, remote_file_get)
3750 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
3751 (remote_hostio_pread_vFile, remote_hostio_send_command)
3752 (remote_hostio_set_filesystem, remote_hostio_open)
3753 (remote_hostio_close, remote_hostio_unlink, remote_state)
3754 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
3755 (get_memory_write_packet_size, get_memory_read_packet_size)
3756 (append_pending_thread_resumptions, remote_detach_1)
3757 (append_resumption, remote_resume_with_vcont)
3758 (add_current_inferior_and_thread, wait_ns, wait_as)
3759 (process_stop_reply, remote_notice_new_inferior)
3760 (process_initial_stop_replies, remote_add_thread)
3761 (btrace_sync_conf, remote_btrace_maybe_reopen)
3762 (remove_new_fork_children, kill_new_fork_children)
3763 (discard_pending_stop_replies, stop_reply_queue_length)
3764 (check_pending_events_prevent_wildcard_vcont)
3765 (discard_pending_stop_replies_in_queue, stop_reply)
3766 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
3767 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
3768 (remote_interrupt_as, remote_interrupt_ns)
3769 (remote_get_noisy_reply, remote_query_attached)
3770 (remote_add_inferior, remote_current_thread, get_current_thread)
3771 (set_thread, set_general_thread, set_continue_thread)
3772 (set_general_process, write_ptid)
3773 (remote_unpack_thread_info_response, remote_get_threadinfo)
3774 (parse_threadlist_response, remote_get_threadlist)
3775 (remote_threadlist_iterator, remote_get_threads_with_ql)
3776 (remote_get_threads_with_qxfer)
3777 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
3778 (get_offsets, remote_check_symbols, remote_supported_packet)
3779 (remote_query_supported, remote_packet_size)
3780 (remote_serial_quit_handler, remote_detach_pid)
3781 (remote_vcont_probe, remote_resume_with_hc)
3782 (send_interrupt_sequence, interrupt_query)
3783 (remote_notif_get_pending_events, fetch_register_using_p)
3784 (send_g_packet, process_g_packet, fetch_registers_using_g)
3785 (store_register_using_P, store_registers_using_G)
3786 (set_remote_traceframe, check_binary_download)
3787 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
3788 (remote_xfer_live_readonly_partial, remote_read_bytes)
3789 (remote_send_printf, remote_flash_write, readchar)
3790 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
3791 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
3792 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
3793 (extended_remote_disable_randomization, extended_remote_run)
3794 (send_environment_packet, extended_remote_environment_support)
3795 (extended_remote_set_inferior_cwd, remote_write_qxfer)
3796 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
3797 (packet_command): Now methods of ...
3798 (remote_target): ... this class.
3799 (m_remote_state) <remote_target>: New field.
3800 (struct remote_state) <stop_reply_queue,
3801 remote_async_inferior_event_token, wait_forever_enabled_p>: New
3802 fields.
3803 (remote_state::remote_state): Allocate stop_reply_queue.
3804 (remote_state): Delete global.
3805 (get_remote_state_raw): Delete.
3806 (remote_target::get_remote_state): Allocate m_remote_state on
3807 demand.
3808 (get_current_remote_target): New.
3809 (remote_ops, extended_remote_ops): Delete.
3810 (wait_forever_enabled_p, remote_async_inferior_event_token):
3811 Delete, moved to struct remote_state.
3812 (remote_target::close): Delete self. Destruction bits split to
3813 ...
3814 (remote_target::~remote_target): ... this.
3815 (show_memory_packet_size): Adjust to use
3816 get_current_remote_target.
3817 (struct protocol_feature) <func>: Add remote_target parameter.
3818 All callers adjusted.
3819 (curr_quit_handler_target): New.
3820 (remote_serial_quit_handler): Reimplement.
3821 (remote_target::open_1): Adjust to use get_current_remote_target.
3822 Heap-allocate remote_target/extended_remote_target instances.
3823 (vcont_builder::vcont_builder): Add remote_target parameter, and
3824 save it in m_remote. All callers adjusted.
3825 (vcont_builder::m_remote): New field.
3826 (vcont_builder::restart, vcont_builder::flush)
3827 (vcont_builder::push_action): Use it.
3828 (remote_target::commit_resume): Use it.
3829 (struct queue_iter_param) <remote>: New field.
3830 (remote_target::remove_new_fork_children): Fill in 'remote' field.
3831 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
3832 (check_pending_event_prevents_wildcard_vcont_callback)
3833 (remote_target::check_pending_events_prevent_wildcard_vcont)
3834 (remote_target::discard_pending_stop_replies)
3835 (remote_target::discard_pending_stop_replies_in_queue)
3836 (remote_target::remote_notif_remove_queued_reply): Fill in
3837 'remote' field.
3838 (remote_notif_get_pending_events): New.
3839 (remote_target::readchar, remote_target::remote_serial_write):
3840 Save/restore curr_quit_handler_target.
3841 (putpkt): New.
3842 (kill_new_fork_children): Fill in 'remote' field.
3843 (packet_command): Use get_current_remote_target, defer to
3844 remote_target method of same name.
3845 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
3846 parameter, and save it in m_remote. All callers adjusted.
3847 (scoped_remote_fd::release): Use m_remote.
3848 (scoped_remote_fd::m_remote): New field.
3849 (remote_file_put, remote_file_get, remote_file_delete): Use
3850 get_current_remote_target, defer to remote_target method of same
3851 name.
3852 (remote_btrace_reset): Add remote_state paremeter. Update all
3853 callers.
3854 (remote_async_inferior_event_handler). Pass down 'data'.
3855 (remote_new_objfile): Use get_current_remote_target.
3856 (remote_target::vcont_r_supported): New.
3857 (set_range_stepping): Use get_current_remote_target and
3858 remote_target::vcont_r_supported.
3859 (_initialize_remote): Don't allocate 'remote_state' and
3860 'stop_reply_queue' globals.
3861 * remote.h (struct remote_target): Forward declare.
3862 (getpkt, putpkt, remote_notif_get_pending_events): Add
3863 'remote_target' parameter.
3864
3865 2018-05-22 Pedro Alves <palves@redhat.com>
3866
3867 * remote.c (vcont_builder): Now a class. Make all data members
3868 private.
3869 (vcont_builder) <vcont_builder, restart, flush, push_action>:
3870 Declare methods.
3871 (vcont_builder_restart): Rename to ...
3872 (vcont_builder::restart): ... this.
3873 (vcont_builder_flush): Rename to ...
3874 (vcont_builder::flush): ... this.
3875 (vcont_builder_push_action): Rename to ...
3876 (vcont_builder::push_action): ... this.
3877 (remote_target::commit_resume): Adjust.
3878
3879 2018-05-22 Pedro Alves <palves@redhat.com>
3880
3881 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
3882 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
3883 (get_fixed_memory_packet_size): New.
3884 (get_memory_packet_size): Use it.
3885 (set_memory_packet_size): Don't override the config size with
3886 DEFAULT_MAX_MEMORY_PACKET_SIZE.
3887 (show_memory_packet_size): Use get_fixed_memory_packet_size.
3888 Don't refer to get_memory_packet_size if not connected to a remote
3889 target. Show "(default)" if configured size is 0.
3890
3891 2018-05-22 Pedro Alves <palves@redhat.com>
3892
3893 * remote.c (remote_target::mourn_inferior): Move
3894 discard_pending_stop_replies call here from ...
3895 (_initialize_remote): ... here.
3896
3897 2018-05-22 Pedro Alves <palves@redhat.com>
3898
3899 * remote.c (compare_section_command): Remove set_general_process
3900 call.
3901
3902 2018-05-22 Pedro Alves <palves@redhat.com>
3903
3904 * remote.c (struct packet_reg, struct remote_arch_state):
3905 Move higher up in the file.
3906 (remote_state) <m_arch_states>: Store remote_arch_state values
3907 instead of remote_arch_state pointers.
3908 (remote_state::get_remote_arch_state): Adjust.
3909
3910 2018-05-22 Pedro Alves <palves@redhat.com>
3911
3912 * remote.c: Include <unordered_map>.
3913 (remote_state): Now a class.
3914 (remote_state) <get_remote_arch_state>: Declare method.
3915 <get_remote_arch_state>: New field.
3916 (remote_arch_state) <remote_arch_state>: Declare ctor.
3917 <regs>: Now a unique_ptr.
3918 (remote_gdbarch_data_handle): Delete.
3919 (get_remote_arch_state): Delete.
3920 (remote_state::get_remote_arch_state): New.
3921 (get_remote_state): Adjust to call remote_state's
3922 get_remote_arch_state method.
3923 (init_remote_state): Delete, bits factored out to ...
3924 (remote_arch_state::remote_arch_state): ... this new method.
3925 (get_remote_packet_size, get_memory_packet_size)
3926 (process_g_packet, remote_target::fetch_registers)
3927 (remote_target::prepare_to_store, store_registers_using_G)
3928 (remote_target::store_registers, remote_target::get_trace_status):
3929 Adjust to call remote_state's method.
3930 (_initialize_remote): Remove reference to
3931 remote_gdbarch_data_handle.
3932
3933 2018-05-22 Pedro Alves <palves@redhat.com>
3934
3935 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
3936 pread>: New method declarations.
3937 (remote_target::open_1): Adjust.
3938 (readahead_cache_invalidate): Rename to ...
3939 (readahead_cache::invalidate): ... this, and adjust to be a class
3940 method.
3941 (readahead_cache_invalidate_fd): Rename to ...
3942 (readahead_cache::invalidate_fd): ... this, and adjust to be a
3943 class method.
3944 (remote_hostio_pwrite): Adjust.
3945 (remote_hostio_pread_from_cache): Rename to ...
3946 (readahead_cache::pread): ... this, and adjust to be a class
3947 method.
3948 (remote_hostio_close): Adjust.
3949
3950 2018-05-22 Pedro Alves <palves@redhat.com>
3951
3952 * remote.c (remote_hostio_close_cleanup): Delete.
3953 (class scoped_remote_fd): New.
3954 (remote_file_put, remote_file_get): Use it.
3955
3956 2018-05-22 Pedro Alves <palves@redhat.com>
3957
3958 (struct vCont_action_support): Use bool and initialize all fields.
3959 (struct readahead_cache): Initialize all fields.
3960 (remote_state): Use bool and initialize all fields.
3961 (remote_state::remote_state, remote_state::~remote_state): New.
3962 (new_remote_state): Delete.
3963 (_initialize_remote): Use new to allocate remote_state.
3964
3965 2018-05-22 Pedro Alves <palves@redhat.com>
3966 張俊芝 <zjz@zjz.name>
3967
3968 PR gdb/22973
3969 * c-exp.y: Include "c-support.h".
3970 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
3971 of tolower. Use c_ident_is_alpha to scan names.
3972 * c-lang.c: Include "c-support.h".
3973 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
3974 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
3975 * c-support.h: New file, with bits factored out from ...
3976 * cp-name-parser.y: ... this file.
3977 Include "c-support.h".
3978 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
3979 c-support.h and renamed.
3980 (symbol_end, yylex): Adjust.
3981
3982 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3983
3984 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
3985 parameter type to CORE_ADDR.
3986 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
3987 parameter type in declaration to CORE_ADDR.
3988 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
3989 target_auxv_search to get AT_HWCAP and use the result to get the
3990 target description.
3991 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
3992 to CORE_ADDR. Remove the cast of the return value to unsigned
3993 long. Fix error predicate of target_auxv_search.
3994 (ppc_linux_nat_target::read_description): Change the type of the
3995 hwcap variable to CORE_ADDR.
3996
3997 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3998
3999 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
4000 if the size of fpscr is larger than 32 bits.
4001
4002 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4003
4004 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
4005 (ppc32_linux_vsxregmap): New global.
4006 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
4007 regcache_supply_regset, and regcache_collect_regset.
4008 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
4009 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
4010 (fetch_vsx_register, store_vsx_register): Remove.
4011 (fetch_vsx_registers): Add regno parameter. Get regset using
4012 ppc_linux_vsxregset. Use regset to supply registers.
4013 (store_vsx_registers): Add regno parameter. Get regset using
4014 ppc_linux_vsxregset. Use regset to collect registers.
4015 (fetch_register): Call fetch_vsx_registers instead of
4016 fetch_vsx_register.
4017 (store_register): Call store_vsx_registers instead of
4018 store_vsx_register.
4019 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
4020 new regno parameter.
4021 (store_ppc_registers): Call store_vsx_registers with -1 for the
4022 new regno parameter.
4023 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
4024 (ppc_collect_vsxregset): Remove.
4025
4026 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4027
4028 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
4029 offset fields.
4030 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
4031 for vector register offset fields.
4032 (ppc64_fbsd_reg_offsets): Likewise.
4033 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4034 to vector register offset fields.
4035 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4036 to vector register offset fields.
4037 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
4038 vector register offset fields.
4039 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
4040 initializers for vector register offset fields.
4041 (rs6000_aix64_reg_offsets): Likewise.
4042 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
4043 (ppc_supply_vrregset): Remove.
4044 (ppc_collect_vrregset): Remove.
4045 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
4046 (ppc_linux_vrregset) : New function.
4047 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
4048 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
4049 (ppc32_linux_vrregset): Remove.
4050 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
4051 and use result instead of ppc32_linux_vrregset.
4052 (ppc32_linux_reg_offsets): Remove initializers for vector register
4053 offset fields.
4054 (ppc64_linux_reg_offsets): Likewise.
4055 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
4056 * ppc-linux-nat.c: Include regset.h.
4057 (gdb_vrregset_t): Adjust comment to account for little-endian
4058 mode.
4059 (supply_vrregset, fill_vrregset): Remove.
4060 (fetch_altivec_register, store_altivec_register): Remove.
4061 (fetch_altivec_registers): Add regno parameter. Get regset using
4062 ppc_linux_vrregset. Use regset to supply registers.
4063 (store_altivec_registers): Add regno parameter. Get regset using
4064 ppc_linux_vrregset. Use regset to collect registers.
4065 (fetch_register): Call fetch_altivec_registers instead of
4066 fetch_altivec_register.
4067 (store_register): Call store_altivec_registers instead of
4068 store_altivec_register.
4069 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
4070 the new regno parameter.
4071 (store_ppc_registers): Call store_altivec_registers with -1 for
4072 the new regno parameter.
4073
4074 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4075
4076 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
4077 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
4078 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
4079 (gdb_vrregset_t): Change array type size to
4080 PPC_LINUX_SIZEOF_VRREGSET.
4081 (gdb_vsxregset_t): Change array type size to
4082 PPC_LINUX_SIZEOF_VSXREGSET.
4083 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
4084 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
4085 PPC_LINUX_SIZEOF_VSXREGSET.
4086
4087 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4088
4089 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
4090 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
4091 nat/ppc-linux.c.
4092 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
4093 ppc_linux_target_wordsize with tid.
4094 (ppc_linux_nat_target::read_description): Call ppc_linux_target
4095 wordsize with tid.
4096 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
4097 (ppc64_64bit_inferior_p): Add static and inline specifiers.
4098 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
4099 tid parameter. Remove static specifier.
4100 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
4101 (ppc_linux_target_wordsize): New declaration.
4102
4103 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4104
4105 * arch/ppc-linux-common.c: New file.
4106 * arch/ppc-linux-common.h: New file.
4107 * arch/ppc-linux-tdesc.h: New file.
4108 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
4109 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
4110 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
4111 arch/ppc-linux-tdesc.h.
4112 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
4113 arch/ppc-linux-tdesc.h.
4114 (ppc_linux_nat_target::read_description): Remove target
4115 description matching code. Fill a ppc_linux_features struct and
4116 call ppc_linux_match_description with it. Move comment about ISA
4117 2.05 to ppc-linux-common.c.
4118 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
4119 arch/ppc-linux-tdesc.h.
4120 (ppc_linux_core_read_description): Remove target description
4121 matching code. Fill a ppc_linux_features struct and call
4122 ppc_linux_match_description with it.
4123 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
4124 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
4125 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
4126 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
4127 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
4128 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
4129 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
4130 (tdesc_powerpc_e500l): Remove.
4131
4132 2018-05-22 Joel Brobecker <brobecker@adacore.com>
4133
4134 * ada-lang.c (catch_assert_command): Pass empty string instead
4135 of NULL for excep_string argument.
4136
4137 2018-05-22 Maciej W. Rozycki <macro@mips.com>
4138
4139 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
4140 the width of the requested register exceeds the width of the
4141 `ptrace' data type.
4142
4143 2018-05-21 Tom Tromey <tom@tromey.com>
4144
4145 * printcmd.c (output_command): Remove.
4146 (output_command_const): Rename to output_command.
4147 * valprint.h (output_command): Rename from output_command_const.
4148 * tracepoint.c (trace_dump_actions): Call output_command.
4149
4150 2018-05-21 Tom Tromey <tom@tromey.com>
4151
4152 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4153 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
4154 * ada-lang.h (create_ada_exception_catchpoint): Update.
4155 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
4156 std::string.
4157 (create_excep_cond_exprs, ~ada_catchpoint)
4158 (should_stop_exception, print_one_exception)
4159 (print_mention_exception, print_recreate_exception): Update.
4160 (ada_get_next_arg): Remove.
4161 (catch_ada_exception_command_split): Use std::string. Change type
4162 of "excep_string", "cond_string".
4163 (catch_ada_exception_command): Update.
4164 (create_ada_exception_catchpoint): Change type of excep_string.
4165 (ada_exception_sal): Remove excep_string parameter.
4166 (~ada_catchpoint): Remove.
4167
4168 2018-05-21 Tom Tromey <tom@tromey.com>
4169
4170 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
4171 cleanup.
4172
4173 2018-05-21 Tom Tromey <tom@tromey.com>
4174
4175 * ada-lang.c (ada_exception_message_1, ada_exception_message):
4176 Return unique_xmalloc_ptr.
4177 (print_it_exception): Update.
4178
4179 2018-05-21 Tom Tromey <tom@tromey.com>
4180
4181 * tracepoint.c (trace_dump_actions): Use std::string.
4182
4183 2018-05-21 Tom Tromey <tom@tromey.com>
4184
4185 * symfile.c (reread_symbols): Use std::string for original_name.
4186
4187 2018-05-21 Tom Tromey <tom@tromey.com>
4188
4189 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
4190 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
4191 constructor.
4192
4193 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
4194
4195 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
4196 instance to...
4197 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
4198 * objfiles.c (get_objfile_bfd_data): Allocate
4199 objfile_per_bfd_storage with obstack_new when allocating on
4200 obstack.
4201
4202 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
4203
4204 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
4205 OBSTACK_ZALLOC.
4206 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
4207 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
4208 * mdebugread.c (mdebug_build_psymtabs): Likewise.
4209 (add_pending): Likewise.
4210 (parse_symbol): Likewise.
4211 (parse_partial_symbols): Likewise.
4212 (psymtab_to_symtab_1): Likewise.
4213 (new_psymtab): Likewise.
4214 (elfmdebug_build_psymtabs): Likewise.
4215 * minsyms.c (terminate_minimal_symbol_table): Likewise.
4216 * objfiles.c (get_objfile_bfd_data): Likewise.
4217 (objfile_register_static_link): Likewise.
4218 * psymtab.c (allocate_psymtab): Likewise.
4219 * stabsread.c (read_member_functions): Likewise.
4220 * xcoffread.c (xcoff_end_psymtab): Likewise.
4221
4222 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
4223
4224 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
4225 compiler supports std::is_trivially_constructible.
4226 * common/poison.h: Include obstack.h.
4227 (IsMallocable): Define to is_trivially_constructible if the
4228 compiler supports it, define to true_type otherwise.
4229 (xobnew): New.
4230 (XOBNEW): Redefine.
4231 (xobnewvec): New.
4232 (XOBNEWVEC): Redefine.
4233 * gdb_obstack.h (obstack_zalloc): New.
4234 (OBSTACK_ZALLOC): Redefine.
4235 (obstack_calloc): New.
4236 (OBSTACK_CALLOC): Redefine.
4237 (obstack_new): New.
4238 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
4239 (gdbarch_obstack): New declaration in gdbarch.h, definition in
4240 gdbarch.c.
4241 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
4242 obstack_calloc/obstack_zalloc.
4243 (gdbarch_obstack_zalloc): Remove.
4244 * target-descriptions.c (tdesc_data_init): Use obstack_new.
4245
4246 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4247
4248 * stack.c (backtrace_command_1): Remove useless variable int i.
4249
4250 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4251
4252 * stack.c (print_frame_info): Fix comment.
4253
4254 2018-05-18 Tom Tromey <tom@tromey.com>
4255
4256 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
4257 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
4258 (~dwarf2_per_objfile): Update
4259 (dwarf2_get_dwz_file): Use new.
4260 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
4261 unique_ptr.
4262
4263 2018-05-18 Tom Tromey <tom@tromey.com>
4264
4265 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
4266 unique_ptr.
4267 * dwarf2read.c (struct dwp_file): Add constructor and
4268 initializers.
4269 (open_and_init_dwp_file): Return a unique_ptr.
4270 (dwarf2_per_objfile, create_dwp_hash_table)
4271 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
4272 (lookup_dwo_unit_in_dwp): Update.
4273 (open_and_init_dwp_file, get_dwp_file): Update.
4274
4275 2018-05-18 Tom Tromey <tom@tromey.com>
4276
4277 * dwarf2read.c (dwarf2_per_objfile): Update.
4278 (struct mapped_index): Add initializers.
4279 (dwarf2_read_index): Use new.
4280 (dw2_symtab_iter_init): Update.
4281 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
4282 unique_ptr.
4283
4284 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
4285
4286 * dwarf2read.c (mapped_index) <total_size>: Remove.
4287
4288 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
4289
4290 * unittests/format_pieces-selftests.c (test_format_specifier):
4291 Add ARI comments.
4292
4293 2018-05-18 Tom Tromey <tom@tromey.com>
4294
4295 * c-typeprint.c (maybe_print_hole): New function.
4296 (c_print_type_struct_field_offset): Update.
4297 (c_type_print_base_struct_union): Call maybe_print_hole.
4298
4299 2018-05-17 Keith Seitz <keiths@redhat.com>
4300
4301 * breakpoint.c (build_bpstat_chain): New function, moved from
4302 bpstat_stop_status.
4303 (bpstat_stop_status): Add optional parameter, `stop_chain'.
4304 If no stop chain is passed, call build_bpstat_chain to build it.
4305 * breakpoint.h (build_bpstat_chain): Declare.
4306 (bpstat_stop_status): Move documentation here from breakpoint.c.
4307 * infrun.c (handle_signal_stop): Before eliding inlined frames,
4308 build the stop chain and pass it to skip_inline_frames.
4309 Pass this stop chain to bpstat_stop_status.
4310 * inline-frame.c: Include breakpoint.h.
4311 (stopped_by_user_bp_inline_frame): New function.
4312 (skip_inline_frames): Add parameter `stop_chain'.
4313 Move documention to inline-frame.h.
4314 If non-NULL, use stopped_by_user_bp_inline_frame to determine
4315 whether the frame should be elided.
4316 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
4317 Add moved documentation and update for new parameter.
4318
4319 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
4320
4321 PR cli/14975
4322 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4323 unittests/format_pieces-selftests.c.
4324 * common/format.h (format_piece) <operator==>: New.
4325 (format_pieces) <operator[]>: Remove.
4326 * common/format.c (format_pieces::format_pieces): Handle \e.
4327 * unittests/format_pieces-selftests.c: New.
4328
4329 2018-05-17 Tom Tromey <tom@tromey.com>
4330
4331 PR symtab/23010:
4332 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
4333 (dw2_instantiate_symtab): Add skip_partial parameter.
4334 (dw2_find_last_source_symtab, dw2_map_expand_apply)
4335 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
4336 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
4337 (dw2_expand_symtabs_matching_one)
4338 (dw2_find_pc_sect_compunit_symtab)
4339 (dw2_debug_names_lookup_symbol)
4340 (dw2_debug_names_expand_symtabs_for_function): Update.
4341 (init_cutu_and_read_dies): Add skip_partial parameter.
4342 (process_psymtab_comp_unit, build_type_psymtabs_1)
4343 (process_skeletonless_type_unit, load_partial_comp_unit)
4344 (psymtab_to_symtab_1): Update.
4345 (load_full_comp_unit): Add skip_partial parameter.
4346 (process_imported_unit_die, dwarf2_read_addr_index)
4347 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
4348 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
4349 (read_signatured_type): Update.
4350
4351 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
4352
4353 * value.c (release_value): Remove unused variable.
4354 (record_latest_value): Likewise.
4355 (access_value_history): Likewise.
4356 (preserve_values): Likewise.
4357
4358 2018-05-17 Tom Tromey <tom@tromey.com>
4359
4360 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
4361 Initialize.
4362
4363 2018-05-16 Maciej W. Rozycki <macro@mips.com>
4364
4365 PR gdb/22286
4366 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
4367 Also handle registers whose width is not a multiple of
4368 PTRACE_TYPE_RET.
4369 (linux_nat_trad_target::store_register): Likewise.
4370
4371 2018-05-16 Tom Tromey <tom@tromey.com>
4372
4373 * gdbcore.h (core_bfd): Redefine.
4374 * corelow.c (core_target::close): Update.
4375 (core_target_open): Update.
4376 * progspace.h (struct program_space) <cbfd>: Now a
4377 gdb_bfd_ref_ptr.
4378
4379 2018-05-16 Tom Tromey <tom@tromey.com>
4380
4381 PR cli/19551:
4382 * symfile-add-flags.h (enum symfile_add_flags)
4383 <SYMFILE_NOT_FILENAME>: New constant.
4384 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
4385 objfile name from BFD.
4386 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
4387 * minidebug.c (find_separate_debug_file_in_section): Put
4388 ".gnu_debugdata" into BFD's file name.
4389
4390 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
4391
4392 * regcache.c (regcache_read_ftype, regcache_write_ftype):
4393 Remove.
4394
4395 2018-05-15 Tamar Christina <tamar.christina@arm.com>
4396
4397 PR binutils/21446
4398 * aarch64-tdep.c (aarch64_analyze_prologue,
4399 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
4400 Indicate not interested in errors.
4401
4402 2018-05-15 Maciej W. Rozycki <macro@mips.com>
4403
4404 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
4405 Supply the MIPS_ZERO_REGNUM register.
4406
4407 2018-05-15 Maciej W. Rozycki <macro@mips.com>
4408
4409 * mips-tdep.c (mask_address_var): Make variable static.
4410
4411 2018-05-14 Tom Tromey <tom@tromey.com>
4412
4413 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
4414
4415 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
4416
4417 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
4418 FXSAVE_ADDR for the mxcsr register.
4419
4420 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
4421
4422 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
4423
4424 2018-05-11 Pedro Alves <palves@redhat.com>
4425
4426 * corelow.c (core_target) <core_target>: No longer inline.
4427 Initialize m_core_gdbarch, m_core_vec and build the section table
4428 here.
4429 <~core_target>: New.
4430 <core_gdbarch, get_core_register_section>: New methods.
4431 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
4432 factored out from ...
4433 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
4434 (core_ops): Delete.
4435 (sniff_core_bfd): Add gdbarch parameter.
4436 (core_close): Delete, merged into ...
4437 (core_target::close): ... here. Delete self.
4438 (core_close_cleanup): Delete.
4439 (core_target_open): Allocate a core_target on the heap. Use a
4440 unique_ptr instead of a cleanup. Bits moved into the core_target
4441 ctor. Adjust to use core_target methods instead of globals.
4442 (get_core_register_section): Rename to ...
4443 (core_target::get_core_register_section): ... this and adjust.
4444 (struct get_core_registers_cb_data): New.
4445 (get_core_registers_cb): Use it. Use bool.
4446 (core_target::fetch_registers, core_target::files_info)
4447 (core_target::xfer_partial, core_target::read_description)
4448 (core_target::pid_to, core_target::thread_name): Adjust to
4449 reference class fields instead of globals.
4450 * target.h (struct target_ops_deleter, target_ops_up): New.
4451
4452 2018-05-11 Pedro Alves <palves@redhat.com>
4453
4454 * corefile.c (core_file_command): Move to corelow.c.
4455 * corelow.c (the_core_target): Delete.
4456 (core_file_command): Moved from corefile.c. Check exec_bfd
4457 instead of the_core_target. Use target_detach instead of calling
4458 into the_core_target directly.
4459 (maybe_say_no_core_file_now): New.
4460 (core_target::detach): Use it.
4461 (_initialize_corelow): Remove references to the_core_target.
4462 * gdbcore.h (the_core_target): Delete.
4463
4464 2018-05-11 Tom Tromey <tromey@redhat.com>
4465 Pedro Alves <palves@redhat.com>
4466
4467 * corefile.c (core_bfd): Remove.
4468 * gdbcore.h (core_bfd): Now a macro.
4469 * progspace.h (struct program_space) <cbfd>: New field.
4470
4471 2018-05-11 Tom Tromey <tom@tromey.com>
4472
4473 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
4474 gdb::def_vector.
4475
4476 2018-05-10 Tom Tromey <tom@tromey.com>
4477
4478 * configure: Rebuild.
4479 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
4480
4481 2018-05-10 Joel Brobecker <brobecker@adacore.com>
4482
4483 PR server/23158:
4484 * regformats/regdat.sh: Adjust script, following the addition
4485 of the new expedite_regs parameter to init_target_desc.
4486
4487 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
4488
4489 PR gdb/23127
4490 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
4491 set_gdbarch_significant_addr_bit.
4492 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
4493 set_gdbarch_significant_addr_bit.
4494 * utils.c (address_significant): Update to sign extend addr.
4495
4496 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
4497
4498 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
4499 (xtensa_linux_init_abi): Limit tdep->num_regs by
4500 tdep->num_nopriv_regs.
4501 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
4502 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
4503 not initialized.
4504
4505 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
4506
4507 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
4508
4509 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
4510
4511 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
4512 (I387_MXCSR_INIT_VAL): New constant.
4513 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
4514 buffer if it was supplied by the inferior.
4515 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
4516 (i387_xsave_get_clear_bv): New function.
4517 (i387_supply_xsave): Only read x87 control registers from the
4518 xsave buffer if the feature is enabled, and the state will have
4519 been written, otherwise, provide a suitable default.
4520 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
4521 including x87 control registers. Update control registers if they
4522 have changed from the default value, and mark features as enabled
4523 as required.
4524 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
4525
4526 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
4527
4528 * spu-tdep.c (info_spu_event_command): Fix output formatting.
4529
4530 2018-05-07 Tom Tromey <tom@tromey.com>
4531
4532 * configure: Rebuild.
4533 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
4534
4535 2018-05-07 Tom Tromey <tom@tromey.com>
4536
4537 PR tdep/20362:
4538 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
4539 bit. Use correct value for VDIV.
4540
4541 2018-05-04 Tom Tromey <tom@tromey.com>
4542
4543 * configure: Rebuild.
4544 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
4545
4546 2018-05-04 Tom Tromey <tom@tromey.com>
4547
4548 * linux-record.c (record_linux_system_call) <case
4549 RECORD_SYS_RECVFROM>: Add "break".
4550
4551 2018-05-04 Tom Tromey <tom@tromey.com>
4552
4553 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
4554 Add missing "break".
4555 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
4556 Add missing "break".
4557
4558 2018-05-04 Tom Tromey <tom@tromey.com>
4559
4560 * rs6000-tdep.c (ppc_process_record_op4)
4561 (ppc_process_record_op63): Add fall-through comment.
4562
4563 2018-05-04 Tom Tromey <tom@tromey.com>
4564
4565 * i386-tdep.c (i386_process_record): Add fall-through comment.
4566
4567 2018-05-04 Tom Tromey <tom@tromey.com>
4568
4569 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
4570 comment.
4571
4572 2018-05-04 Tom Tromey <tom@tromey.com>
4573
4574 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
4575 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
4576 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
4577 comment.
4578 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
4579 comment.
4580 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
4581 comment.
4582
4583 2018-05-04 Tom Tromey <tom@tromey.com>
4584
4585 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
4586
4587 2018-05-04 Tom Tromey <tom@tromey.com>
4588
4589 * s390-tdep.c (s390_process_record): Fix fall-through comments.
4590 * xcoffread.c (scan_xcoff_symtab): Move comment later.
4591 * symfile.c (section_is_mapped): Fix fall-through comment.
4592 * stabsread.c (define_symbol, read_member_functions): Fix
4593 fall-through comment.
4594 * s390-linux-tdep.c (s390_process_record): Fix fall-through
4595 comment.
4596 * remote.c (remote_wait_as): Fix fall-through comment.
4597 * p-exp.y (yylex): Fix fall-through comment.
4598 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
4599 comment.
4600 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
4601 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
4602 * jv-exp.y (yylex): Fix fall-through comment.
4603 * go-exp.y (lex_one_token): Fix fall-through comment.
4604 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
4605 fall-through comment.
4606 * f-exp.y (yylex): Fix fall-through comment.
4607 * dwarf2read.c (process_die): Fix fall-through comments.
4608 * dbxread.c (process_one_symbol): Fix fall-through comment.
4609 * d-exp.y (lex_one_token): Fix fall-through comment.
4610 * cp-name-parser.y (yylex): Fix fall-through comment.
4611 * coffread.c (coff_symtab_read): Fix fall-through comment.
4612 * c-exp.y (lex_one_token): Fix fall-through comment.
4613 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
4614 comment.
4615 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
4616 comment.
4617
4618 2018-05-04 Tom Tromey <tom@tromey.com>
4619
4620 PR python/22730:
4621 * NEWS: Mention gdb.execute change.
4622 * gdbcmd.h (execute_control_command): Don't declare.
4623 * python/python.c (execute_gdb_command): Use read_command_lines_1,
4624 execute_control_commands, execute_control_commands_to_string.
4625 * cli/cli-script.h (execute_control_commands)
4626 (execute_control_commands_to_string): Declare.
4627 (execute_control_command): Add from_tty parameter.
4628 * cli/cli-script.c (execute_control_commands)
4629 (execute_control_commands_to_string): New functions.
4630 (execute_user_command): Use execute_control_commands.
4631 (execute_control_command_1): Add "from_tty" parameter. Update.
4632 (execute_control_command): Likewise.
4633
4634 2018-05-04 Tom Tromey <tom@tromey.com>
4635
4636 PR python/22731:
4637 * NEWS: Mention that breakpoint commands are writable.
4638 * python/py-breakpoint.c (bppy_set_commands): New function.
4639 (breakpoint_object_getset) <"commands">: Use it.
4640
4641 2018-05-04 Tom Tromey <tom@tromey.com>
4642
4643 * tracepoint.c (actions_command): Update.
4644 * mi/mi-cmd-break.c (mi_command_line_array)
4645 (mi_command_line_array_cnt, mi_command_line_array_ptr)
4646 (mi_read_next_line): Remove.
4647 (mi_cmd_break_commands): Update.
4648 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
4649 function_view.
4650 * cli/cli-script.c (get_command_line): Update.
4651 (process_next_line): Use function_view. Constify.
4652 (recurse_read_control_structure, read_command_lines)
4653 (read_command_lines_1): Change argument types to function_view.
4654 (do_define_command, document_command): Update.
4655 * breakpoint.h (check_tracepoint_command): Don't declare.
4656 * breakpoint.c (check_tracepoint_command): Remove.
4657 (commands_command_1, create_tracepoint_from_upload): Update.
4658
4659 2018-05-04 Tom Tromey <tom@tromey.com>
4660
4661 PR gdb/11750:
4662 * cli/cli-script.h (enum command_control_type) <define_control>:
4663 New constant.
4664 * cli/cli-script.c (multi_line_command_p): Handle define_control.
4665 (build_command_line, execute_control_command_1)
4666 (process_next_line): Likewise.
4667 (do_define_command): New function, extracted from define_command.
4668 (define_command): Use it.
4669
4670 2018-05-04 Tom Tromey <tom@tromey.com>
4671
4672 * tracepoint.c (actions_command): Update.
4673 * cli/cli-script.h (read_command_lines): Update.
4674 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
4675 (MAX_TMPBUF): Remove define.
4676 (define_command): Use string_printf.
4677 (document_command): Likewise.
4678 * breakpoint.c (commands_command_1): Update.
4679
4680 2018-05-04 Tom Tromey <tom@tromey.com>
4681
4682 * top.c (execute_command): Update.
4683 * cli/cli-script.h (print_command_lines): Now varargs.
4684 * cli/cli-script.c (print_command_lines): Now varargs.
4685 (execute_control_command_1) <case while_control, case if_control>:
4686 Update.
4687
4688 2018-05-04 Tom Tromey <tom@tromey.com>
4689
4690 * tracepoint.c (all_tracepoint_actions): Rename from
4691 all_tracepoint_actions_and_cleanup. Change return type.
4692 (actions_command, encode_actions_1, encode_actions)
4693 (trace_dump_actions, tdump_command): Update.
4694 * remote.c (remote_download_command_source): Update.
4695 * python/python.c (gdbpy_eval_from_control_command)
4696 (python_command, python_interactive_command): Update.
4697 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
4698 * guile/guile.c (guile_command)
4699 (gdbscm_eval_from_control_command, guile_command): Update.
4700 * compile/compile.c (compile_code_command)
4701 (compile_print_command, compile_to_object): Update.
4702 * cli/cli-script.h (struct command_lines_deleter): New.
4703 (counted_command_line): New typedef.
4704 (struct command_line): Add constructor, destructor.
4705 <body_list>: Remove.
4706 <body_list_0, body_list_1>: New members.
4707 (command_line_up): Remove typedef.
4708 (read_command_lines, read_command_lines_1, get_command_line):
4709 Update.
4710 (copy_command_lines): Don't declare.
4711 * cli/cli-script.c (build_command_line): Use "new".
4712 (get_command_line): Return counted_command_line.
4713 (print_command_lines, execute_user_command)
4714 (execute_control_command_1, while_command, if_command): Update.
4715 (realloc_body_list): Remove.
4716 (process_next_line, recurse_read_control_structure): Update.
4717 (read_command_lines, read_command_lines_1): Return counted_command_line.
4718 (free_command_lines): Use "delete".
4719 (copy_command_lines): Remove.
4720 (define_command, document_command, show_user_1): Update.
4721 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
4722 a counted_command_line.
4723 * breakpoint.h (counted_command_line): Remove typedef.
4724 (breakpoint_set_commands): Update.
4725 * breakpoint.c (check_no_tracepoint_commands)
4726 (validate_commands_for_breakpoint): Update.
4727 (breakpoint_set_commands): Change commands to be a
4728 counted_command_line.
4729 (commands_command_1, update_dprintf_command_list)
4730 (create_tracepoint_from_upload): Update.
4731
4732 2018-05-04 Tom Tromey <tom@tromey.com>
4733
4734 * cli/cli-decode.h (cmd_list_element): New constructor.
4735 (~cmd_list_element): New destructor.
4736 (struct cmd_list_element): Add initializers.
4737 * cli/cli-decode.c (do_add_cmd): Use "new".
4738 (delete_cmd): Use "delete".
4739
4740 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
4741 Pedro Alves <palves@redhat.com>
4742
4743 PR breakpoints/19806 and support for PR external/20207.
4744 * NEWS: Mention Aarch64 watchpoint improvements.
4745 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
4746 watchpoints and PR external/20207 watchpoints.
4747 * nat/aarch64-linux-hw-point.c
4748 (kernel_supports_any_contiguous_range): New.
4749 (aarch64_watchpoint_offset): New.
4750 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
4751 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
4752 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
4753 (aarch64_align_watchpoint): New parameters aligned_offset_p and
4754 next_addr_orig_p. Support PR external/20207 watchpoints.
4755 (aarch64_downgrade_regs): New.
4756 (aarch64_dr_state_insert_one_point): New parameters offset and
4757 addr_orig.
4758 (aarch64_dr_state_remove_one_point): Likewise.
4759 (aarch64_handle_breakpoint): Update caller.
4760 (aarch64_handle_aligned_watchpoint): Likewise.
4761 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
4762 aligned_offset.
4763 (aarch64_linux_set_debug_regs): Remove const from state. Call
4764 aarch64_downgrade_regs.
4765 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
4766 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
4767 (DR_CONTROL_MASK): ... this.
4768 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
4769 (unsigned int aarch64_watchpoint_offset): New prototype.
4770 (aarch64_linux_set_debug_regs): Remove const from state.
4771 * utils.c (align_up, align_down): Move to ...
4772 * common/common-utils.c (align_up, align_down): ... here.
4773 * utils.h (align_up, align_down): Move to ...
4774 * common/common-utils.h (align_up, align_down): ... here.
4775
4776 2018-05-04 Joel Brobecker <brobecker@adacore.com>
4777
4778 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
4779 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
4780 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
4781 Re-implement to match the ABI as summarized in GCC's
4782 gcc/config/sparc/sparc.c. All callers updated.
4783 (sparc32_store_arguments): Remove assertion.
4784
4785 2018-05-04 Tom Tromey <tom@tromey.com>
4786
4787 * printcmd.c: Don't include tui.h.
4788 (decode_format): Use skip_spaces.
4789
4790 2018-05-04 Tom Tromey <tom@tromey.com>
4791
4792 PR gdb/22619:
4793 * printcmd.c (last_count): New global.
4794 (x_command): Use saved count when repeating.
4795
4796 2018-05-04 Tom Tromey <tom@tromey.com>
4797
4798 * nto-procfs.c (do_closedir_cleanup): Remove.
4799 (procfs_pidlist): Use gdb_dir_up.
4800 * procfs.c (do_closedir_cleanup): Remove.
4801 (proc_update_threads): Use gdb_dir_up.
4802 * common/filestuff.h (struct gdb_dir_deleter): New.
4803 (gdb_dir_up): New typedef.
4804
4805 2018-05-04 Tom Tromey <tom@tromey.com>
4806
4807 * ada-lang.c (print_mention_exception): Use std::string.
4808
4809 2018-05-04 Tom Tromey <tom@tromey.com>
4810
4811 * ada-lang.c (create_excep_cond_exprs): Update.
4812 (ada_exception_catchpoint_cond_string): Use std::string.
4813
4814 2018-05-04 Tom Tromey <tom@tromey.com>
4815
4816 * ada-lang.c (xget_renaming_scope): Return std::string.
4817 (old_renaming_is_invisible): Update.
4818
4819 2018-05-04 Tom Tromey <tom@tromey.com>
4820
4821 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
4822 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
4823
4824 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
4825
4826 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
4827
4828 2018-05-04 Tom Tromey <tom@tromey.com>
4829
4830 * remote.c (remote_query_supported_append): Change type.
4831 (remote_check_symbols): Update.
4832
4833 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
4834
4835 PR gdb/11420
4836 * configure.ac: Prepend libpython.
4837 * python/python-config.py: Likewise.
4838 * configure: Regenerate.
4839
4840 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
4841
4842 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
4843
4844 2018-05-03 Pedro Alves <palves@redhat.com>
4845
4846 * s390-linux-nat.c
4847 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
4848 override. Write 'true' instead of '1'.
4849 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
4850 declaration.
4851
4852 2018-05-02 Pedro Alves <palves@redhat.com>
4853
4854 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
4855 add_inf_child_target.
4856 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
4857 add_inf_child_target.
4858 * aix-thread.c (aix_thread_target_info): New.
4859 (aix_thread_target) <shortname, longname, doc>: Delete.
4860 <info>: New.
4861 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
4862 add_inf_child_target.
4863 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
4864 add_inf_child_target.
4865 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
4866 add_inf_child_target.
4867 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
4868 add_inf_child_target.
4869 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
4870 add_inf_child_target.
4871 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
4872 add_inf_child_target.
4873 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
4874 add_inf_child_target.
4875 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
4876 add_inf_child_target.
4877 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
4878 add_inf_child_target.
4879 * bfd-target.c (target_bfd_target_info): New.
4880 (target_bfd) <shortname, longname, doc>: Delete.
4881 <info>: New.
4882 * bsd-kvm.c (bsd_kvm_target_info): New.
4883 (bsd_kvm_target) <shortname, longname, doc>: Delete.
4884 <info>: New.
4885 (bsd_kvm_target::open): Rename to ...
4886 (bsd_kvm_target_open): ... this. Adjust.
4887 * bsd-uthread.c (bsd_uthread_target_info): New.
4888 (bsd_uthread_target) <shortname, longname, doc>: Delete.
4889 <info>: New.
4890 * corefile.c (core_file_command): Adjust.
4891 * corelow.c (core_target_info): New.
4892 (core_target) <shortname, longname, doc>: Delete.
4893 <info>: New.
4894 (core_target::open): Rename to ...
4895 (core_target_open): ... this. Adjust.
4896 * ctf.c (ctf_target_info): New.
4897 (ctf_target) <shortname, longname, doc>: Delete.
4898 <info>: New.
4899 (ctf_target::open): Rename to ...
4900 (ctf_target_open): ... this.
4901 (_initialize_ctf): Adjust.
4902 * exec.c (exec_target_info): New.
4903 (exec_target) <shortname, longname, doc>: Delete.
4904 <info>: New.
4905 (exec_target::open): Rename to ...
4906 (exec_target_open): ... this.
4907 * gdbcore.h (core_target_open): Declare.
4908 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
4909 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
4910 add_inf_child_target.
4911 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
4912 add_inf_child_target.
4913 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
4914 add_inf_child_target.
4915 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
4916 add_inf_child_target.
4917 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
4918 add_inf_child_target.
4919 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
4920 add_inf_child_target.
4921 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
4922 add_inf_child_target.
4923 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
4924 add_inf_child_target.
4925 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
4926 add_inf_child_target.
4927 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
4928 add_inf_child_target.
4929 * inf-child.c (inf_child_target_info): New.
4930 (inf_child_target::info): New.
4931 (inf_child_open_target): Remove 'target' parameter. Use
4932 get_native_target instead.
4933 (inf_child_target::open): Delete.
4934 (add_inf_child_target): New.
4935 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
4936 Delete.
4937 <info>: New.
4938 (add_inf_child_target): Declare.
4939 (inf_child_open_target): Declare.
4940 * linux-thread-db.c (thread_db_target_info): New.
4941 (thread_db_target) <shortname, longname, doc>: Delete.
4942 <info>: New.
4943 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
4944 add_inf_child_target.
4945 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
4946 add_inf_child_target.
4947 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
4948 add_inf_child_target.
4949 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
4950 add_inf_child_target.
4951 * make-target-delegates (print_class): Adjust.
4952 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
4953 add_inf_child_target.
4954 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
4955 add_inf_child_target.
4956 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
4957 add_inf_child_target.
4958 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
4959 add_inf_child_target.
4960 * nto-procfs.c (nto_native_target_info): New.
4961 (nto_procfs_target_native) <shortname, longname, doc>:
4962 Delete.
4963 <info>: New.
4964 (nto_procfs_target_info): New.
4965 (nto_procfs_target_procfs) <shortname, longname, doc>:
4966 Delete.
4967 <info>: New.
4968 (init_procfs_targets): Adjust.
4969 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
4970 add_inf_child_target.
4971 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
4972 add_inf_child_target.
4973 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
4974 add_inf_child_target.
4975 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
4976 add_inf_child_target.
4977 * ravenscar-thread.c (ravenscar_target_info): New.
4978 (ravenscar_thread_target) <shortname, longname, doc>:
4979 Delete.
4980 <info>: New.
4981 * record-btrace.c (record_btrace_target_info):
4982 (record_btrace_target) <shortname, longname, doc>: Delete.
4983 <info>: New.
4984 (record_btrace_target::open): Rename to ...
4985 (record_btrace_target_open): ... this. Adjust.
4986 * record-full.c (record_longname, record_doc): New.
4987 (record_full_base_target) <shortname, longname, doc>: Delete.
4988 <info>: New.
4989 (record_full_target_info): New.
4990 (record_full_target): <shortname>: Delete.
4991 <info>: New.
4992 (record_full_core_open_1, record_full_open_1): Update comments.
4993 (record_full_base_target::open): Rename to ...
4994 (record_full_open): ... this.
4995 (cmd_record_full_restore): Update.
4996 (_initialize_record_full): Update.
4997 * remote-sim.c (remote_sim_target_info): New.
4998 (gdbsim_target) <shortname, longname, doc>: Delete.
4999 <info>: New.
5000 (gdbsim_target::open): Rename to ...
5001 (gdbsim_target_open): ... this.
5002 (_initialize_remote_sim): Adjust.
5003 * remote.c (remote_doc): New.
5004 (remote_target_info): New.
5005 (remote_target) <shortname, longname, doc>: Delete.
5006 <info>: New.
5007 (extended_remote_target_info): New.
5008 (extended_remote_target) <shortname, longname, doc>: Delete.
5009 <info>: New.
5010 (remote_target::open_1): Make static. Adjust.
5011 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
5012 * s390-linux-nat.c (_initialize_s390_nat): Use
5013 add_inf_child_target.
5014 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
5015 add_inf_child_target.
5016 * sol-thread.c (thread_db_target_info): New.
5017 (sol_thread_target) <shortname, longname, doc>: Delete.
5018 <info>: New.
5019 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
5020 add_inf_child_target.
5021 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
5022 add_inf_child_target.
5023 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
5024 add_inf_child_target.
5025 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
5026 add_inf_child_target.
5027 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
5028 add_inf_child_target.
5029 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
5030 add_inf_child_target.
5031 * spu-linux-nat.c (_initialize_spu_nat): Use
5032 add_inf_child_target.
5033 * spu-multiarch.c (spu_multiarch_target_info): New.
5034 (spu_multiarch_target) <shortname, longname, doc>: Delete.
5035 <info>: New.
5036 * target-delegates.c: Regenerate.
5037 * target.c: Include <unordered_map>.
5038 (target_ops_p): Delete.
5039 (DEF_VEC_P(target_ops_p)): Delete.
5040 (target_factories): New.
5041 (test_target_info): New.
5042 (test_target_ops::info): New.
5043 (open_target): Adjust to use target_factories.
5044 (add_target_with_completer): Rename to ...
5045 (add_target): ... this. Change prototype. Register target_info
5046 and open callback in target_factories. Register target_info in
5047 command context instead of target_ops.
5048 (add_target): Delete old implementation.
5049 (add_deprecated_target_alias): Change prototype. Adjust.
5050 (the_native_target): New.
5051 (set_native_target, get_native_target): New.
5052 (find_default_run_target): Use the_native_target.
5053 (find_attach_target, find_run_target): Simplify.
5054 (target_ops::open): Delete.
5055 (dummy_target_info): New.
5056 (dummy_target::shortname, dummy_target::longname)
5057 (dummy_target::doc): Delete.
5058 (dummy_target::info): New.
5059 (debug_target::shortname, debug_target::longname)
5060 (debug_target::doc): Delete.
5061 (debug_target::info): New.
5062 * target.h (struct target_info): New.
5063 (target_ops::~target_ops): Add comment.
5064 (target_ops::info): New.
5065 (target_ops::shortname, target_ops::longname, target_ops::doc): No
5066 longer virtual. Implement in terms of target_info.
5067 (set_native_target, get_native_target): Declare.
5068 (target_open_ftype): New.
5069 (add_target, add_target_with_completer)
5070 (add_deprecated_target_alias): Change prototype.
5071 (test_target) <shortname, longname, doc>: Delete.
5072 <info>: New.
5073 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
5074 add_inf_child_target.
5075 * tracefile-tfile.c (tfile_target_info): New.
5076 (tfile_target) <shortname, longname, doc>: Delete.
5077 <info>: New.
5078 (tfile_target::open): Rename to ...
5079 (tfile_target_open): ... this.
5080 (_initialize_tracefile_tfile): Adjust.
5081 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
5082 add_inf_child_target.
5083 * windows-nat.c (_initialize_windows_nat): Use
5084 add_inf_child_target.
5085 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
5086 add_inf_child_target.
5087
5088 2018-05-02 Pedro Alves <palves@redhat.com>
5089
5090 * linux-nat.h (linux_nat_target) <low_new_thread,
5091 low_delete_thread, low_new_fork, low_forget_process,
5092 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
5093 New virtual methods.
5094 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5095 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
5096 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
5097 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5098 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
5099 Delete.
5100 * linux-fork.c (delete_fork): Adjust to call low method.
5101 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
5102 (linux_nat_new_fork, linux_nat_forget_process_hook)
5103 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
5104 (linux_nat_status_is_event):
5105 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
5106 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
5107 to call low method.
5108 (sigtrap_is_event): Rename to ...
5109 (linux_nat_target::low_status_is_event): ... this.
5110 (linux_nat_set_status_is_event): Delete.
5111 (save_stop_reason, linux_nat_wait_1)
5112 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
5113 low methods.
5114 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5115 (linux_nat_set_new_fork, linux_nat_set_forget_process)
5116 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5117 (linux_nat_set_prepare_to_resume): Delete.
5118 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
5119 low virtual methods.
5120 * amd64-linux-nat.c: Likewise.
5121 * arm-linux-nat.c: Likewise.
5122 * i386-linux-nat.c: Likewise.
5123 * ia64-linux-nat.c: Likewise.
5124 * mips-linux-nat.c: Likewise.
5125 * ppc-linux-nat.c: Likewise.
5126 * s390-linux-nat.c: Likewise.
5127 * sparc64-linux-nat.c: Likewise.
5128 * x86-linux-nat.c: Likewise.
5129 * x86-linux-nat.h: Include "nat/x86-linux.h".
5130 (x86_linux_nat_target) <low_new_fork, low_forget_process,
5131 low_prepare_to_resume, low_new_thread, low_delete_thread>:
5132 Override methods.
5133
5134 2018-05-02 Pedro Alves <palves@redhat.com>
5135
5136 * target.h (target_ops)
5137 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5138 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
5139 stopped_by_watchpoint, have_continuable_watchpoint,
5140 stopped_data_address, watchpoint_addr_within_range,
5141 can_accel_watchpoint_condition, can_run, thread_alive,
5142 has_all_memory, has_memory, has_stack, has_registers,
5143 has_execution, can_async_p, is_async_p, supports_non_stop,
5144 always_non_stop_p, can_execute_reverse, supports_multi_process,
5145 supports_enable_disable_tracepoint,
5146 supports_disable_randomization, supports_string_tracing,
5147 supports_evaluation_of_breakpoint_conditions,
5148 can_run_breakpoint_commands, filesystem_is_local,
5149 can_download_tracepoint, get_trace_state_variable_value,
5150 set_trace_notes, get_tib_address, use_agent, can_use_agent,
5151 record_is_replaying, record_will_replay,
5152 augmented_libraries_svr4_read>: Adjust to return bool.
5153 * aarch64-linux-nat.c: All implementations adjusted.
5154 * aix-thread.c: All implementations adjusted.
5155 * arm-linux-nat.c: All implementations adjusted.
5156 * breakpoint.c: All implementations adjusted.
5157 * bsd-kvm.c: All implementations adjusted.
5158 * bsd-uthread.c: All implementations adjusted.
5159 * corelow.c: All implementations adjusted.
5160 * ctf.c: All implementations adjusted.
5161 * darwin-nat.c: All implementations adjusted.
5162 * darwin-nat.h: All implementations adjusted.
5163 * exec.c: All implementations adjusted.
5164 * fbsd-nat.c: All implementations adjusted.
5165 * fbsd-nat.h: All implementations adjusted.
5166 * gnu-nat.c: All implementations adjusted.
5167 * gnu-nat.h: All implementations adjusted.
5168 * go32-nat.c: All implementations adjusted.
5169 * ia64-linux-nat.c: All implementations adjusted.
5170 * inf-child.c: All implementations adjusted.
5171 * inf-child.h: All implementations adjusted.
5172 * inf-ptrace.c: All implementations adjusted.
5173 * inf-ptrace.h: All implementations adjusted.
5174 * linux-nat.c: All implementations adjusted.
5175 * linux-nat.h: All implementations adjusted.
5176 * mips-linux-nat.c: All implementations adjusted.
5177 * nto-procfs.c: All implementations adjusted.
5178 * ppc-linux-nat.c: All implementations adjusted.
5179 * procfs.c: All implementations adjusted.
5180 * ravenscar-thread.c: All implementations adjusted.
5181 * record-btrace.c: All implementations adjusted.
5182 * record-full.c: All implementations adjusted.
5183 * remote-sim.c: All implementations adjusted.
5184 * remote.c: All implementations adjusted.
5185 * s390-linux-nat.c: All implementations adjusted.
5186 * sol-thread.c: All implementations adjusted.
5187 * spu-multiarch.c: All implementations adjusted.
5188 * target-delegates.c: All implementations adjusted.
5189 * target.c: All implementations adjusted.
5190 * target.h: All implementations adjusted.
5191 * tracefile-tfile.c: All implementations adjusted.
5192 * tracefile.c: All implementations adjusted.
5193 * tracefile.h: All implementations adjusted.
5194 * windows-nat.c: All implementations adjusted.
5195 * x86-linux-nat.h: All implementations adjusted.
5196 * x86-nat.h: All implementations adjusted.
5197
5198 2018-05-02 Pedro Alves <palves@redhat.com>
5199
5200 * make-target-delegates (scan_target_h): Don't trim lines here.
5201 Replace sequences of tabs and/or whitespace with a single
5202 whitespace.
5203 (top level, parsing methods): Trim each line before processing it
5204 here.
5205
5206 2018-05-02 Pedro Alves <palves@redhat.com>
5207 John Baldwin <jhb@freebsd.org>
5208
5209 * target.h (enum strata) <debug_stratum>: New.
5210 (struct target_ops) <all delegation methods>: Replace by C++
5211 virtual methods, and drop "to_" prefix. All references updated
5212 throughout.
5213 <to_shortname, to_longname, to_doc, to_data,
5214 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
5215 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
5216 virtual methods. All references updated throughout.
5217 <can_attach, supports_terminal_ours, can_create_inferior,
5218 get_thread_control_capabilities, attach_no_wait>: New
5219 virtual methods.
5220 <insert_breakpoint, remove_breakpoint>: Now
5221 TARGET_DEFAULT_NORETURN methods.
5222 <info_proc>: Now returns bool.
5223 <to_magic>: Delete.
5224 (OPS_MAGIC): Delete.
5225 (current_target): Delete. All references replaced by references
5226 to ...
5227 (target_stack): ... this. New.
5228 (target_shortname, target_longname): Adjust.
5229 (target_can_run): Now a function declaration.
5230 (default_child_has_all_memory, default_child_has_memory)
5231 (default_child_has_stack, default_child_has_registers)
5232 (default_child_has_execution): Remove target_ops parameter.
5233 (complete_target_initialization): Delete.
5234 (memory_breakpoint_target): New template class.
5235 (test_target_ops): Refactor as a C++ class with virtual methods.
5236 * make-target-delegates (NAME_PART): Tighten.
5237 (POINTER_PART, CP_SYMBOL): New.
5238 (SIMPLE_RETURN_PART): Reimplement.
5239 (VEC_RETURN_PART): Expect less.
5240 (RETURN_PART, VIRTUAL_PART): New.
5241 (METHOD): Adjust to C++ virtual methods.
5242 (scan_target_h): Remove reference to C99.
5243 (dname): Output "target_ops::" prefix.
5244 (write_function_header): Adjust to output a C++ class method.
5245 (write_declaration): New.
5246 (write_delegator): Adjust to output a C++ class method.
5247 (tdname): Output "dummy_target::" prefix.
5248 (write_tdefault, write_debugmethod): Adjust to output a C++ class
5249 method.
5250 (tdefault_names, debug_names): Delete.
5251 (return_types, tdefaults, styles, argtypes_array): New.
5252 (top level): All methods are delegators.
5253 (print_class): New.
5254 (top level): Print dummy_target and debug_target classes.
5255 * target-delegates.c: Regenerate.
5256 * target-debug.h (target_debug_print_enum_info_proc_what)
5257 (target_debug_print_thread_control_capabilities)
5258 (target_debug_print_thread_info_p): New.
5259 * target.c (dummy_target): Delete.
5260 (the_dummy_target, the_debug_target): New.
5261 (target_stack): Now extern.
5262 (set_targetdebug): Push/unpush debug target.
5263 (default_child_has_all_memory, default_child_has_memory)
5264 (default_child_has_stack, default_child_has_registers)
5265 (default_child_has_execution): Remove target_ops parameter.
5266 (complete_target_initialization): Delete.
5267 (add_target_with_completer): No longer call
5268 complete_target_initialization.
5269 (target_supports_terminal_ours): Use regular delegation.
5270 (update_current_target): Delete.
5271 (push_target): No longer check magic number. Don't call
5272 update_current_target.
5273 (unpush_target): Don't call update_current_target.
5274 (target_is_pushed): No longer check magic number.
5275 (target_require_runnable): Skip for all stratums over
5276 process_stratum.
5277 (target_ops::info_proc): New.
5278 (target_info_proc): Use find_target_at and
5279 find_default_run_target.
5280 (target_supports_disable_randomization): Use regular delegation.
5281 (target_get_osdata): Use find_target_at.
5282 (target_ops::open, target_ops::close, target_ops::can_attach)
5283 (target_ops::attach, target_ops::can_create_inferior)
5284 (target_ops::create_inferior, target_ops::can_run)
5285 (target_can_run): New.
5286 (default_fileio_target): Use regular delegation.
5287 (target_ops::fileio_open, target_ops::fileio_pwrite)
5288 (target_ops::fileio_pread, target_ops::fileio_fstat)
5289 (target_ops::fileio_close, target_ops::fileio_unlink)
5290 (target_ops::fileio_readlink): New.
5291 (target_fileio_open_1, target_fileio_unlink)
5292 (target_fileio_readlink): Always call the target method. Handle
5293 FILEIO_ENOSYS.
5294 (return_zero, return_zero_has_execution): Delete.
5295 (init_dummy_target): Delete.
5296 (dummy_target::dummy_target, dummy_target::shortname)
5297 (dummy_target::longname, dummy_target::doc)
5298 (debug_target::debug_target, debug_target::shortname)
5299 (debug_target::longname, debug_target::doc): New.
5300 (target_supports_delete_record): Use regular delegation.
5301 (setup_target_debug): Delete.
5302 (maintenance_print_target_stack): Skip debug_stratum.
5303 (initialize_targets): Instantiate the_dummy_target and
5304 the_debug_target.
5305 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
5306 use target_stack.
5307 (target_auxv_search, fprint_target_auxv): Adjust.
5308 (info_auxv_command): Adjust to use target_stack.
5309 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
5310 * exceptions.c (print_flush): Handle a NULL target_stack.
5311 * regcache.c (target_ops_no_register): Refactor as class with
5312 virtual methods.
5313
5314 * exec.c (exec_target): New class.
5315 (exec_ops): Now an exec_target.
5316 (exec_open, exec_close_1, exec_get_section_table)
5317 (exec_xfer_partial, exec_files_info, exec_has_memory)
5318 (exec_make_note_section): Refactor as exec_target methods.
5319 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
5320 Delete.
5321 (exec_target::find_memory_regions): New.
5322 (_initialize_exec): Don't call init_exec_ops.
5323 * gdbcore.h (exec_file_clear): Delete.
5324
5325 * corefile.c (core_target): Delete.
5326 (core_file_command): Adjust.
5327 * corelow.c (core_target): New class.
5328 (the_core_target): New.
5329 (core_close): Remove target_ops parameter.
5330 (core_close_cleanup): Adjust.
5331 (core_target::close): New.
5332 (core_open, core_detach, get_core_registers, core_files_info)
5333 (core_xfer_partial, core_thread_alive, core_read_description)
5334 (core_pid_to_str, core_thread_name, core_has_memory)
5335 (core_has_stack, core_has_registers, core_info_proc): Rework as
5336 core_target methods.
5337 (ignore, core_remove_breakpoint, init_core_ops): Delete.
5338 (_initialize_corelow): Initialize the_core_target.
5339 * gdbcore.h (core_target): Delete.
5340 (the_core_target): New.
5341
5342 * ctf.c: (ctf_target): New class.
5343 (ctf_ops): Now a ctf_target.
5344 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
5345 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
5346 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
5347 methods.
5348 (init_ctf_ops): Delete.
5349 (_initialize_ctf): Don't call it.
5350 * tracefile-tfile.c (tfile_target): New class.
5351 (tfile_ops): Now a tfile_target.
5352 (tfile_open, tfile_close, tfile_files_info)
5353 (tfile_get_tracepoint_status, tfile_trace_find)
5354 (tfile_fetch_registers, tfile_xfer_partial)
5355 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
5356 Refactor as tfile_target methods.
5357 (tfile_xfer_partial_features): Remove target_ops parameter.
5358 (init_tfile_ops): Delete.
5359 (_initialize_tracefile_tfile): Don't call it.
5360 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
5361 (tracefile_has_stack, tracefile_has_registers)
5362 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
5363 tracefile_target methods.
5364 (init_tracefile_ops): Delete.
5365 (tracefile_target::tracefile_target): New.
5366 * tracefile.h: Include "target.h".
5367 (tracefile_target): New class.
5368 (init_tracefile_ops): Delete.
5369
5370 * spu-multiarch.c (spu_multiarch_target): New class.
5371 (spu_ops): Now a spu_multiarch_target.
5372 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
5373 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
5374 (spu_search_memory, spu_mourn_inferior): Refactor as
5375 spu_multiarch_target methods.
5376 (init_spu_ops): Delete.
5377 (_initialize_spu_multiarch): Remove references to init_spu_ops,
5378 complete_target_initialization.
5379
5380 * ravenscar-thread.c (ravenscar_thread_target): New class.
5381 (ravenscar_ops): Now a ravenscar_thread_target.
5382 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
5383 (ravenscar_thread_alive, ravenscar_pid_to_str)
5384 (ravenscar_fetch_registers, ravenscar_store_registers)
5385 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
5386 (ravenscar_stopped_by_hw_breakpoint)
5387 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
5388 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
5389 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
5390 methods.
5391 (init_ravenscar_thread_ops): Delete.
5392 (_initialize_ravenscar): Remove references to
5393 init_ravenscar_thread_ops and complete_target_initialization.
5394
5395 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
5396 (bsd_uthread_target): New class.
5397 (bsd_uthread_ops): Now a bsd_uthread_target.
5398 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
5399 (bsd_uthread_close, bsd_uthread_mourn_inferior)
5400 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
5401 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
5402 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
5403 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
5404 (bsd_uthread_target): Delete function.
5405 (_initialize_bsd_uthread): Remove reference to
5406 complete_target_initialization.
5407
5408 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
5409 (target_bfd): ... this new class.
5410 (target_bfd_xfer_partial, target_bfd_get_section_table)
5411 (target_bfd_close): Refactor as target_bfd methods.
5412 (target_bfd::~target_bfd): New.
5413 (target_bfd_reopen): Adjust.
5414 (target_bfd::close): New.
5415
5416 * record-btrace.c (record_btrace_target): New class.
5417 (record_btrace_ops): Now a record_btrace_target.
5418 (record_btrace_open, record_btrace_stop_recording)
5419 (record_btrace_disconnect, record_btrace_close)
5420 (record_btrace_async, record_btrace_info)
5421 (record_btrace_insn_history, record_btrace_insn_history_range)
5422 (record_btrace_insn_history_from, record_btrace_call_history)
5423 (record_btrace_call_history_range)
5424 (record_btrace_call_history_from, record_btrace_record_method)
5425 (record_btrace_is_replaying, record_btrace_will_replay)
5426 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
5427 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
5428 (record_btrace_store_registers, record_btrace_prepare_to_store)
5429 (record_btrace_to_get_unwinder)
5430 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
5431 (record_btrace_commit_resume, record_btrace_wait)
5432 (record_btrace_stop, record_btrace_can_execute_reverse)
5433 (record_btrace_stopped_by_sw_breakpoint)
5434 (record_btrace_supports_stopped_by_sw_breakpoint)
5435 (record_btrace_stopped_by_hw_breakpoint)
5436 (record_btrace_supports_stopped_by_hw_breakpoint)
5437 (record_btrace_update_thread_list, record_btrace_thread_alive)
5438 (record_btrace_goto_begin, record_btrace_goto_end)
5439 (record_btrace_goto, record_btrace_stop_replaying_all)
5440 (record_btrace_execution_direction)
5441 (record_btrace_prepare_to_generate_core)
5442 (record_btrace_done_generating_core): Refactor as
5443 record_btrace_target methods.
5444 (init_record_btrace_ops): Delete.
5445 (_initialize_record_btrace): Remove reference to
5446 init_record_btrace_ops.
5447 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
5448 the execution_direction global.
5449 (record_full_base_target, record_full_target)
5450 (record_full_core_target): New classes.
5451 (record_full_ops): Now a record_full_target.
5452 (record_full_core_ops): Now a record_full_core_target.
5453 (record_full_target::detach, record_full_target::disconnect)
5454 (record_full_core_target::disconnect)
5455 (record_full_target::mourn_inferior, record_full_target::kill):
5456 New.
5457 (record_full_open, record_full_close, record_full_async): Refactor
5458 as methods of the record_full_base_target class.
5459 (record_full_resume, record_full_commit_resume): Refactor
5460 as methods of the record_full_target class.
5461 (record_full_wait, record_full_stopped_by_watchpoint)
5462 (record_full_stopped_data_address)
5463 (record_full_stopped_by_sw_breakpoint)
5464 (record_full_supports_stopped_by_sw_breakpoint)
5465 (record_full_stopped_by_hw_breakpoint)
5466 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
5467 methods of the record_full_base_target class.
5468 (record_full_store_registers, record_full_xfer_partial)
5469 (record_full_insert_breakpoint, record_full_remove_breakpoint):
5470 Refactor as methods of the record_full_target class.
5471 (record_full_can_execute_reverse, record_full_get_bookmark)
5472 (record_full_goto_bookmark, record_full_execution_direction)
5473 (record_full_record_method, record_full_info, record_full_delete)
5474 (record_full_is_replaying, record_full_will_replay)
5475 (record_full_goto_begin, record_full_goto_end, record_full_goto)
5476 (record_full_stop_replaying): Refactor as methods of the
5477 record_full_base_target class.
5478 (record_full_core_resume, record_full_core_kill)
5479 (record_full_core_fetch_registers)
5480 (record_full_core_prepare_to_store)
5481 (record_full_core_store_registers, record_full_core_xfer_partial)
5482 (record_full_core_insert_breakpoint)
5483 (record_full_core_remove_breakpoint)
5484 (record_full_core_has_execution): Refactor
5485 as methods of the record_full_core_target class.
5486 (record_full_base_target::supports_delete_record): New.
5487 (init_record_full_ops): Delete.
5488 (init_record_full_core_ops): Delete.
5489 (record_full_save): Refactor as method of the
5490 record_full_base_target class.
5491 (_initialize_record_full): Remove references to
5492 init_record_full_ops and init_record_full_core_ops.
5493
5494 * remote.c (remote_target, extended_remote_target): New classes.
5495 (remote_ops): Now a remote_target.
5496 (extended_remote_ops): Now an extended_remote_target.
5497 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
5498 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
5499 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
5500 (remote_pass_signals, remote_set_syscall_catchpoint)
5501 (remote_program_signals, )
5502 (remote_thread_always_alive): Remove target_ops parameter.
5503 (remote_thread_alive, remote_thread_name)
5504 (remote_update_thread_list, remote_threads_extra_info)
5505 (remote_static_tracepoint_marker_at)
5506 (remote_static_tracepoint_markers_by_strid)
5507 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
5508 (remote_open): Refactor as methods of remote_target.
5509 (extended_remote_open, extended_remote_detach)
5510 (extended_remote_attach, extended_remote_post_attach):
5511 (extended_remote_supports_disable_randomization)
5512 (extended_remote_create_inferior): : Refactor as method of
5513 extended_remote_target.
5514 (remote_set_permissions, remote_open_1, remote_detach)
5515 (remote_follow_fork, remote_follow_exec, remote_disconnect)
5516 (remote_resume, remote_commit_resume, remote_stop)
5517 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
5518 (remote_terminal_ours, remote_wait, remote_fetch_registers)
5519 (remote_prepare_to_store, remote_store_registers)
5520 (remote_flash_erase, remote_flash_done, remote_files_info)
5521 (remote_kill, remote_mourn, remote_insert_breakpoint)
5522 (remote_remove_breakpoint, remote_insert_watchpoint)
5523 (remote_watchpoint_addr_within_range)
5524 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
5525 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
5526 (remote_supports_stopped_by_sw_breakpoint)
5527 (remote_stopped_by_hw_breakpoint)
5528 (remote_supports_stopped_by_hw_breakpoint)
5529 (remote_stopped_by_watchpoint, remote_stopped_data_address)
5530 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
5531 (remote_verify_memory): Refactor as methods of remote_target.
5532 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
5533 parameter.
5534 (remote_xfer_partial, remote_get_memory_xfer_limit)
5535 (remote_search_memory, remote_rcmd, remote_memory_map)
5536 (remote_pid_to_str, remote_get_thread_local_address)
5537 (remote_get_tib_address, remote_read_description): Refactor as
5538 methods of remote_target.
5539 (remote_target::fileio_open, remote_target::fileio_pwrite)
5540 (remote_target::fileio_pread, remote_target::fileio_close): New.
5541 (remote_hostio_readlink, remote_hostio_fstat)
5542 (remote_filesystem_is_local, remote_can_execute_reverse)
5543 (remote_supports_non_stop, remote_supports_disable_randomization)
5544 (remote_supports_multi_process, remote_supports_cond_breakpoints)
5545 (remote_supports_enable_disable_tracepoint)
5546 (remote_supports_string_tracing)
5547 (remote_can_run_breakpoint_commands, remote_trace_init)
5548 (remote_download_tracepoint, remote_can_download_tracepoint)
5549 (remote_download_trace_state_variable, remote_enable_tracepoint)
5550 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
5551 (remote_trace_start, remote_get_trace_status)
5552 (remote_get_tracepoint_status, remote_trace_stop)
5553 (remote_trace_find, remote_get_trace_state_variable_value)
5554 (remote_save_trace_data, remote_get_raw_trace_data)
5555 (remote_set_disconnected_tracing, remote_core_of_thread)
5556 (remote_set_circular_trace_buffer, remote_traceframe_info)
5557 (remote_get_min_fast_tracepoint_insn_len)
5558 (remote_set_trace_buffer_size, remote_set_trace_notes)
5559 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
5560 (remote_disable_btrace, remote_teardown_btrace)
5561 (remote_read_btrace, remote_btrace_conf)
5562 (remote_augmented_libraries_svr4_read, remote_load)
5563 (remote_pid_to_exec_file, remote_can_do_single_step)
5564 (remote_execution_direction, remote_thread_handle_to_thread_info):
5565 Refactor as methods of remote_target.
5566 (init_remote_ops, init_extended_remote_ops): Delete.
5567 (remote_can_async_p, remote_is_async_p, remote_async)
5568 (remote_thread_events, remote_upload_tracepoints)
5569 (remote_upload_trace_state_variables): Refactor as methods of
5570 remote_target.
5571 (_initialize_remote): Remove references to init_remote_ops and
5572 init_extended_remote_ops.
5573
5574 * remote-sim.c (gdbsim_target): New class.
5575 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
5576 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
5577 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
5578 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
5579 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
5580 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
5581 Refactor as methods of gdbsim_target.
5582 (gdbsim_ops): Now a gdbsim_target.
5583 (init_gdbsim_ops): Delete.
5584 (gdbsim_cntrl_c): Adjust.
5585 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
5586
5587 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
5588 (the_amd64_linux_nat_target): New.
5589 (amd64_linux_fetch_inferior_registers)
5590 (amd64_linux_store_inferior_registers): Refactor as methods of
5591 amd64_linux_nat_target.
5592 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
5593 * i386-linux-nat.c: Don't include "linux-nat.h".
5594 (i386_linux_nat_target): New class.
5595 (the_i386_linux_nat_target): New.
5596 (i386_linux_fetch_inferior_registers)
5597 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
5598 as methods of i386_linux_nat_target.
5599 (_initialize_i386_linux_nat): Adjust. Set linux_target.
5600 * inf-child.c (inf_child_ops): Delete.
5601 (inf_child_fetch_inferior_registers)
5602 (inf_child_store_inferior_registers): Delete.
5603 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
5604 methods of inf_child_target.
5605 (inf_child_target::supports_terminal_ours)
5606 (inf_child_target::terminal_init)
5607 (inf_child_target::terminal_inferior)
5608 (inf_child_target::terminal_ours_for_output)
5609 (inf_child_target::terminal_ours, inf_child_target::interrupt)
5610 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
5611 New.
5612 (inf_child_open, inf_child_disconnect, inf_child_close)
5613 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
5614 (inf_child_post_startup_inferior, inf_child_can_run)
5615 (inf_child_pid_to_exec_file): Refactor as methods of
5616 inf_child_target.
5617 (inf_child_follow_fork): Delete.
5618 (inf_child_target::can_create_inferior)
5619 (inf_child_target::can_attach): New.
5620 (inf_child_target::has_all_memory, inf_child_target::has_memory)
5621 (inf_child_target::has_stack, inf_child_target::has_registers)
5622 (inf_child_target::has_execution): New.
5623 (inf_child_fileio_open, inf_child_fileio_pwrite)
5624 (inf_child_fileio_pread, inf_child_fileio_fstat)
5625 (inf_child_fileio_close, inf_child_fileio_unlink)
5626 (inf_child_fileio_readlink, inf_child_use_agent)
5627 (inf_child_can_use_agent): Refactor as methods of
5628 inf_child_target.
5629 (return_zero, inf_child_target): Delete.
5630 (inf_child_target::inf_child_target): New.
5631 * inf-child.h: Include "target.h".
5632 (inf_child_target): Delete function prototype.
5633 (inf_child_target): New class.
5634 (inf_child_open_target, inf_child_mourn_inferior)
5635 (inf_child_maybe_unpush_target): Delete.
5636 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
5637 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
5638 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
5639 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
5640 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
5641 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
5642 (inf_ptrace_wait, inf_ptrace_xfer_partial)
5643 (inf_ptrace_thread_alive, inf_ptrace_files_info)
5644 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
5645 methods of inf_ptrace_target.
5646 (inf_ptrace_target): Delete function.
5647 * inf-ptrace.h: Include "inf-child.h".
5648 (inf_ptrace_target): Delete function declaration.
5649 (inf_ptrace_target): New class.
5650 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
5651 * linux-nat.c (linux_target): New.
5652 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
5653 (linux_nat_target::~linux_nat_target): New.
5654 (linux_child_post_attach, linux_child_post_startup_inferior)
5655 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
5656 (linux_child_remove_fork_catchpoint)
5657 (linux_child_insert_vfork_catchpoint)
5658 (linux_child_remove_vfork_catchpoint)
5659 (linux_child_insert_exec_catchpoint)
5660 (linux_child_remove_exec_catchpoint)
5661 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
5662 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
5663 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
5664 (linux_nat_stopped_data_address)
5665 (linux_nat_stopped_by_sw_breakpoint)
5666 (linux_nat_supports_stopped_by_sw_breakpoint)
5667 (linux_nat_stopped_by_hw_breakpoint)
5668 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
5669 (linux_nat_kill, linux_nat_mourn_inferior)
5670 (linux_nat_xfer_partial, linux_nat_thread_alive)
5671 (linux_nat_update_thread_list, linux_nat_pid_to_str)
5672 (linux_nat_thread_name, linux_child_pid_to_exec_file)
5673 (linux_child_static_tracepoint_markers_by_strid)
5674 (linux_nat_is_async_p, linux_nat_can_async_p)
5675 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
5676 (linux_nat_supports_multi_process)
5677 (linux_nat_supports_disable_randomization, linux_nat_async)
5678 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
5679 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
5680 (linux_nat_fileio_open, linux_nat_fileio_readlink)
5681 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
5682 methods of linux_nat_target.
5683 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
5684 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
5685 parameter.
5686 (check_stopped_by_watchpoint): Adjust.
5687 (linux_xfer_partial): Delete.
5688 (linux_target_install_ops, linux_target, linux_nat_add_target):
5689 Delete.
5690 (linux_nat_target::linux_nat_target): New.
5691 * linux-nat.h: Include "inf-ptrace.h".
5692 (linux_nat_target): New.
5693 (linux_target, linux_target_install_ops, linux_nat_add_target):
5694 Delete function declarations.
5695 (linux_target): Declare global.
5696 * linux-thread-db.c (thread_db_target): New.
5697 (thread_db_target::thread_db_target): New.
5698 (thread_db_ops): Delete.
5699 (the_thread_db_target): New.
5700 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
5701 (thread_db_update_thread_list, thread_db_pid_to_str)
5702 (thread_db_extra_thread_info)
5703 (thread_db_thread_handle_to_thread_info)
5704 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
5705 (thread_db_resume): Refactor as methods of thread_db_target.
5706 (init_thread_db_ops): Delete.
5707 (_initialize_thread_db): Remove reference to init_thread_db_ops.
5708 * x86-linux-nat.c: Don't include "linux-nat.h".
5709 (super_post_startup_inferior): Delete.
5710 (x86_linux_nat_target::~x86_linux_nat_target): New.
5711 (x86_linux_child_post_startup_inferior)
5712 (x86_linux_read_description, x86_linux_enable_btrace)
5713 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
5714 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
5715 methods of x86_linux_nat_target.
5716 (x86_linux_create_target): Delete. Bits folded ...
5717 (x86_linux_add_target): ... here. Now takes a linux_nat_target
5718 pointer.
5719 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
5720 (x86_linux_nat_target): New class.
5721 (x86_linux_create_target): Delete.
5722 (x86_linux_add_target): Now takes a linux_nat_target pointer.
5723 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
5724 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
5725 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
5726 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
5727 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
5728 make extern.
5729 (x86_use_watchpoints): Delete.
5730 * x86-nat.h: Include "breakpoint.h" and "target.h".
5731 (x86_use_watchpoints): Delete.
5732 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
5733 (x86_stopped_by_watchpoint, x86_stopped_data_address)
5734 (x86_insert_watchpoint, x86_remove_watchpoint)
5735 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
5736 (x86_stopped_by_hw_breakpoint): New declarations.
5737 (x86_nat_target): New template class.
5738
5739 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
5740 (the_ppc_linux_nat_target): New.
5741 (ppc_linux_fetch_inferior_registers)
5742 (ppc_linux_can_use_hw_breakpoint)
5743 (ppc_linux_region_ok_for_hw_watchpoint)
5744 (ppc_linux_ranged_break_num_registers)
5745 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
5746 (ppc_linux_insert_mask_watchpoint)
5747 (ppc_linux_remove_mask_watchpoint)
5748 (ppc_linux_can_accel_watchpoint_condition)
5749 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
5750 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
5751 (ppc_linux_watchpoint_addr_within_range)
5752 (ppc_linux_masked_watch_num_registers)
5753 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
5754 (ppc_linux_read_description): Refactor as methods of
5755 ppc_linux_nat_target.
5756 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
5757
5758 * procfs.c (procfs_xfer_partial): Delete forward declaration.
5759 (procfs_target): New class.
5760 (the_procfs_target): New.
5761 (procfs_target): Delete function.
5762 (procfs_auxv_parse, procfs_attach, procfs_detach)
5763 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
5764 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
5765 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
5766 (procfs_create_inferior, procfs_update_thread_list)
5767 (procfs_thread_alive, procfs_pid_to_str)
5768 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
5769 (procfs_stopped_data_address, procfs_insert_watchpoint)
5770 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
5771 (proc_find_memory_regions, procfs_info_proc)
5772 (procfs_make_note_section): Refactor as methods of procfs_target.
5773 (_initialize_procfs): Adjust.
5774 * sol-thread.c (sol_thread_target): New class.
5775 (sol_thread_ops): Now a sol_thread_target.
5776 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
5777 (sol_thread_fetch_registers, sol_thread_store_registers)
5778 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
5779 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
5780 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
5781 (init_sol_thread_ops): Delete.
5782 (_initialize_sol_thread): Adjust. Remove references to
5783 init_sol_thread_ops and complete_target_initialization.
5784
5785 * windows-nat.c (windows_nat_target): New class.
5786 (windows_fetch_inferior_registers)
5787 (windows_store_inferior_registers, windows_resume, windows_wait)
5788 (windows_attach, windows_detach, windows_pid_to_exec_file)
5789 (windows_files_info, windows_create_inferior)
5790 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
5791 (windows_close, windows_pid_to_str, windows_xfer_partial)
5792 (windows_get_tib_address, windows_get_ada_task_ptid)
5793 (windows_thread_name, windows_thread_alive): Refactor as
5794 windows_nat_target methods.
5795 (do_initial_windows_stuff): Adjust.
5796 (windows_target): Delete function.
5797 (_initialize_windows_nat): Adjust.
5798
5799 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
5800 (darwin_mourn_inferior, darwin_kill_inferior)
5801 (darwin_create_inferior, darwin_attach, darwin_detach)
5802 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
5803 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
5804 (darwin_supports_multi_process): Refactor as darwin_nat_target
5805 methods.
5806 (darwin_resume_to, darwin_files_info): Delete.
5807 (_initialize_darwin_inferior): Rename to ...
5808 (_initialize_darwin_nat): ... this. Adjust to C++ification.
5809 * darwin-nat.h: Include "inf-child.h".
5810 (darwin_nat_target): New class.
5811 (darwin_complete_target): Delete.
5812 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
5813 (darwin_target): New.
5814 (i386_darwin_fetch_inferior_registers)
5815 (i386_darwin_store_inferior_registers): Refactor as methods of
5816 darwin_nat_target.
5817 (darwin_complete_target): Delete, with ...
5818 (_initialize_i386_darwin_nat): ... bits factored out here.
5819
5820 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
5821 (the_alpha_linux_nat_target): New.
5822 (alpha_linux_register_u_offset): Refactor as
5823 alpha_linux_nat_target method.
5824 (_initialize_alpha_linux_nat): Adjust.
5825 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
5826 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
5827 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
5828 methods of linux_nat_trad_target.
5829 (linux_trad_target): Delete.
5830 * linux-nat-trad.h (linux_trad_target): Delete function.
5831 (linux_nat_trad_target): New class.
5832 * mips-linux-nat.c (mips_linux_nat_target): New class.
5833 (super_fetch_registers, super_store_registers, super_close):
5834 Delete.
5835 (the_mips_linux_nat_target): New.
5836 (mips64_linux_regsets_fetch_registers)
5837 (mips64_linux_regsets_store_registers)
5838 (mips64_linux_fetch_registers, mips64_linux_store_registers)
5839 (mips_linux_register_u_offset, mips_linux_read_description)
5840 (mips_linux_can_use_hw_breakpoint)
5841 (mips_linux_stopped_by_watchpoint)
5842 (mips_linux_stopped_data_address)
5843 (mips_linux_region_ok_for_hw_watchpoint)
5844 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
5845 (mips_linux_close): Refactor as methods of mips_linux_nat.
5846 (_initialize_mips_linux_nat): Adjust to C++ification.
5847
5848 * aix-thread.c (aix_thread_target): New class.
5849 (aix_thread_ops): Now an aix_thread_target.
5850 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
5851 (aix_thread_fetch_registers, aix_thread_store_registers)
5852 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
5853 (aix_thread_thread_alive, aix_thread_pid_to_str)
5854 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
5855 Refactor as methods of aix_thread_target.
5856 (init_aix_thread_ops): Delete.
5857 (_initialize_aix_thread): Remove references to init_aix_thread_ops
5858 and complete_target_initialization.
5859 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
5860 (rs6000_nat_target): New class.
5861 (the_rs6000_nat_target): New.
5862 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
5863 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
5864 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
5865 (super_create_inferior): Delete.
5866 (_initialize_rs6000_nat): Adjust to C++ification.
5867
5868 * arm-linux-nat.c (arm_linux_nat_target): New class.
5869 (the_arm_linux_nat_target): New.
5870 (arm_linux_fetch_inferior_registers)
5871 (arm_linux_store_inferior_registers, arm_linux_read_description)
5872 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
5873 (arm_linux_remove_hw_breakpoint)
5874 (arm_linux_region_ok_for_hw_watchpoint)
5875 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
5876 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
5877 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
5878 arm_linux_nat_target.
5879 (_initialize_arm_linux_nat): Adjust to C++ification.
5880
5881 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
5882 (the_aarch64_linux_nat_target): New.
5883 (aarch64_linux_fetch_inferior_registers)
5884 (aarch64_linux_store_inferior_registers)
5885 (aarch64_linux_child_post_startup_inferior)
5886 (aarch64_linux_read_description)
5887 (aarch64_linux_can_use_hw_breakpoint)
5888 (aarch64_linux_insert_hw_breakpoint)
5889 (aarch64_linux_remove_hw_breakpoint)
5890 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
5891 (aarch64_linux_region_ok_for_hw_watchpoint)
5892 (aarch64_linux_stopped_data_address)
5893 (aarch64_linux_stopped_by_watchpoint)
5894 (aarch64_linux_watchpoint_addr_within_range)
5895 (aarch64_linux_can_do_single_step): Refactor as methods of
5896 aarch64_linux_nat_target.
5897 (super_post_startup_inferior): Delete.
5898 (_initialize_aarch64_linux_nat): Adjust to C++ification.
5899
5900 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
5901 (the_hppa_linux_nat_target): New.
5902 (hppa_linux_fetch_inferior_registers)
5903 (hppa_linux_store_inferior_registers): Refactor as methods of
5904 hppa_linux_nat_target.
5905 (_initialize_hppa_linux_nat): Adjust to C++ification.
5906
5907 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
5908 (the_ia64_linux_nat_target): New.
5909 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
5910 (ia64_linux_stopped_data_address)
5911 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
5912 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
5913 ia64_linux_nat_target methods.
5914 (super_xfer_partial): Delete.
5915 (_initialize_ia64_linux_nat): Adjust to C++ification.
5916
5917 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
5918 (the_m32r_linux_nat_target): New.
5919 (m32r_linux_fetch_inferior_registers)
5920 (m32r_linux_store_inferior_registers): Refactor as
5921 m32r_linux_nat_target methods.
5922 (_initialize_m32r_linux_nat): Adjust to C++ification.
5923
5924 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
5925 (the_m68k_linux_nat_target): New.
5926 (m68k_linux_fetch_inferior_registers)
5927 (m68k_linux_store_inferior_registers): Refactor as
5928 m68k_linux_nat_target methods.
5929 (_initialize_m68k_linux_nat): Adjust to C++ification.
5930
5931 * s390-linux-nat.c (s390_linux_nat_target): New class.
5932 (the_s390_linux_nat_target): New.
5933 (s390_linux_fetch_inferior_registers)
5934 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
5935 (s390_insert_watchpoint, s390_remove_watchpoint)
5936 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
5937 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
5938 (s390_auxv_parse, s390_read_description): Refactor as methods of
5939 s390_linux_nat_target.
5940 (_initialize_s390_nat): Adjust to C++ification.
5941
5942 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
5943 (the_sparc_linux_nat_target): New.
5944 (_initialize_sparc_linux_nat): Adjust to C++ification.
5945 * sparc-nat.c (sparc_fetch_inferior_registers)
5946 (sparc_store_inferior_registers): Remove target_ops parameter.
5947 * sparc-nat.h (sparc_fetch_inferior_registers)
5948 (sparc_store_inferior_registers): Remove target_ops parameter.
5949 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
5950 (the_sparc64_linux_nat_target): New.
5951 (_initialize_sparc64_linux_nat): Adjust to C++ification.
5952
5953 * spu-linux-nat.c (spu_linux_nat_target): New class.
5954 (the_spu_linux_nat_target): New.
5955 (spu_child_post_startup_inferior, spu_child_post_attach)
5956 (spu_child_wait, spu_fetch_inferior_registers)
5957 (spu_store_inferior_registers, spu_xfer_partial)
5958 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
5959 methods.
5960 (_initialize_spu_nat): Adjust to C++ification.
5961
5962 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
5963 (the_tilegx_linux_nat_target): New.
5964 (fetch_inferior_registers, store_inferior_registers):
5965 Refactor as methods.
5966 (_initialize_tile_linux_nat): Adjust to C++ification.
5967
5968 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
5969 (the_xtensa_linux_nat_target): New.
5970 (xtensa_linux_fetch_inferior_registers)
5971 (xtensa_linux_store_inferior_registers): Refactor as
5972 xtensa_linux_nat_target methods.
5973 (_initialize_xtensa_linux_nat): Adjust to C++ification.
5974
5975 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
5976 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
5977 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
5978 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
5979 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
5980 (fbsd_stopped_by_sw_breakpoint)
5981 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
5982 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
5983 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
5984 (fbsd_post_startup_inferior, fbsd_post_attach)
5985 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
5986 (fbsd_set_syscall_catchpoint)
5987 (super_xfer_partial, super_resume, super_wait)
5988 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
5989 (fbsd_handle_debug_trap): Remove target_ops parameter.
5990 (fbsd_nat_add_target): Delete.
5991 * fbsd-nat.h: Include "inf-ptrace.h".
5992 (fbsd_nat_add_target): Delete.
5993 (USE_SIGTRAP_SIGINFO): Define.
5994 (fbsd_nat_target): New class.
5995
5996 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
5997 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
5998 (amd64bsd_target): Delete.
5999 * amd64-bsd-nat.h: New file.
6000 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
6001 "x86-bsd-nat.h".
6002 (amd64_fbsd_nat_target): New class.
6003 (the_amd64_fbsd_nat_target): New.
6004 (amd64fbsd_read_description): Refactor as method of
6005 amd64_fbsd_nat_target.
6006 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6007 (_initialize_amd64fbsd_nat): Adjust to C++ification.
6008 * amd64-nat.h (amd64bsd_target): Delete function declaration.
6009 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
6010 (i386bsd_store_inferior_registers): Remove target_ops parameter.
6011 (i386bsd_target): Delete.
6012 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
6013 (i386bsd_fetch_inferior_registers)
6014 (i386bsd_store_inferior_registers): Declare.
6015 (i386_bsd_nat_target): New class.
6016 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
6017 (the_i386_fbsd_nat_target): New.
6018 (i386fbsd_resume, i386fbsd_read_description): Refactor as
6019 i386_fbsd_nat_target methods.
6020 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6021 (_initialize_i386fbsd_nat): Adjust to C++ification.
6022 * x86-bsd-nat.c (super_mourn_inferior): Delete.
6023 (x86bsd_mourn_inferior, x86bsd_target): Delete.
6024 (_initialize_x86_bsd_nat): Adjust to C++ification.
6025 * x86-bsd-nat.h: Include "x86-nat.h".
6026 (x86bsd_target): Delete declaration.
6027 (x86bsd_nat_target): New class.
6028
6029 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
6030 (the_aarch64_fbsd_nat_target): New.
6031 (aarch64_fbsd_fetch_inferior_registers)
6032 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
6033 aarch64_fbsd_nat_target.
6034 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
6035 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
6036 (the_alpha_bsd_nat_target): New.
6037 (alphabsd_fetch_inferior_registers)
6038 (alphabsd_store_inferior_registers): Refactor as
6039 alpha_bsd_nat_target methods.
6040 (_initialize_alphabsd_nat): Refactor as methods of
6041 alpha_bsd_nat_target.
6042 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
6043 (the_amd64_nbsd_nat_target): New.
6044 (_initialize_amd64nbsd_nat): Adjust to C++ification.
6045 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
6046 (the_amd64_obsd_nat_target): New.
6047 (_initialize_amd64obsd_nat): Adjust to C++ification.
6048 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
6049 (the_arm_fbsd_nat_target): New.
6050 (arm_fbsd_fetch_inferior_registers)
6051 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
6052 (_initialize_arm_fbsd_nat): Refactor as methods of
6053 arm_fbsd_nat_target.
6054 (_initialize_arm_fbsd_nat): Adjust to C++ification.
6055 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
6056 (the_arm_netbsd_nat_target): New.
6057 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
6058 arm_netbsd_nat_target.
6059 (_initialize_arm_netbsd_nat): Adjust to C++ification.
6060 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
6061 (the_hppa_nbsd_nat_target): New.
6062 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
6063 hppa_nbsd_nat_target methods.
6064 (_initialize_hppanbsd_nat): Adjust to C++ification.
6065 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
6066 (the_hppa_obsd_nat_target): New.
6067 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
6068 methods of hppa_obsd_nat_target.
6069 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
6070 add_target.
6071 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
6072 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
6073 add_target.
6074 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
6075 (_initialize_i386obsd_nat): Use add_target.
6076 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
6077 (the_m68k_bsd_nat_target): New.
6078 (m68kbsd_fetch_inferior_registers)
6079 (m68kbsd_store_inferior_registers): Refactor as methods of
6080 m68k_bsd_nat_target.
6081 (_initialize_m68kbsd_nat): Adjust to C++ification.
6082 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
6083 (the_mips_fbsd_nat_target): New.
6084 (mips_fbsd_fetch_inferior_registers)
6085 (mips_fbsd_store_inferior_registers): Refactor as methods of
6086 mips_fbsd_nat_target.
6087 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
6088 add_target.
6089 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
6090 (the_mips_nbsd_nat_target): New.
6091 (mipsnbsd_fetch_inferior_registers)
6092 (mipsnbsd_store_inferior_registers): Refactor as methods of
6093 mips_nbsd_nat_target.
6094 (_initialize_mipsnbsd_nat): Adjust to C++ification.
6095 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
6096 (the_mips64_obsd_nat_target): New.
6097 (mips64obsd_fetch_inferior_registers)
6098 (mips64obsd_store_inferior_registers): Refactor as methods of
6099 mips64_obsd_nat_target.
6100 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
6101 add_target.
6102 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
6103 nbsd_nat_target.
6104 * nbsd-nat.h: Include "inf-ptrace.h".
6105 (nbsd_nat_target): New class.
6106 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
6107 (obsd_wait): Refactor as methods of obsd_nat_target.
6108 (obsd_add_target): Delete.
6109 * obsd-nat.h: Include "inf-ptrace.h".
6110 (obsd_nat_target): New class.
6111 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
6112 (the_ppc_fbsd_nat_target): New.
6113 (ppcfbsd_fetch_inferior_registers)
6114 (ppcfbsd_store_inferior_registers): Refactor as methods of
6115 ppc_fbsd_nat_target.
6116 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
6117 add_target.
6118 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
6119 (the_ppc_nbsd_nat_target): New.
6120 (ppcnbsd_fetch_inferior_registers)
6121 (ppcnbsd_store_inferior_registers): Refactor as methods of
6122 ppc_nbsd_nat_target.
6123 (_initialize_ppcnbsd_nat): Adjust to C++ification.
6124 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
6125 (the_ppc_obsd_nat_target): New.
6126 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
6127 methods of ppc_obsd_nat_target.
6128 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
6129 add_target.
6130 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
6131 (the_sh_nbsd_nat_target): New.
6132 (shnbsd_fetch_inferior_registers)
6133 (shnbsd_store_inferior_registers): Refactor as methods of
6134 sh_nbsd_nat_target.
6135 (_initialize_shnbsd_nat): Adjust to C++ification.
6136 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
6137 (inf_ptrace_xfer_partial): Delete.
6138 (sparc_xfer_partial, sparc_target): Delete.
6139 * sparc-nat.h (sparc_fetch_inferior_registers)
6140 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
6141 (sparc_target): Delete function declaration.
6142 (sparc_target): New template class.
6143 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
6144 (_initialize_sparcnbsd_nat): Adjust to C++ification.
6145 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
6146 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
6147 add_target.
6148 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
6149 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
6150 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
6151 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
6152 add_target.
6153 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
6154 (the_vax_bsd_nat_target): New.
6155 (vaxbsd_fetch_inferior_registers)
6156 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
6157 methods.
6158 (_initialize_vaxbsd_nat): Adjust to C++ification.
6159
6160 * bsd-kvm.c (bsd_kvm_target): New class.
6161 (bsd_kvm_ops): Now a bsd_kvm_target.
6162 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
6163 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
6164 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
6165 bsd_kvm_target.
6166 (bsd_kvm_return_one): Delete.
6167 (bsd_kvm_add_target): Adjust to C++ification.
6168
6169 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
6170 (nto_procfs_target_procfs): New classes.
6171 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
6172 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
6173 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
6174 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
6175 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
6176 (procfs_remove_hw_breakpoint, procfs_resume)
6177 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
6178 (procfs_kill_inferior, procfs_store_registers)
6179 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
6180 as methods of nto_procfs_target.
6181 (nto_procfs_ops): Now an nto_procfs_target_procfs.
6182 (nto_native_ops): Delete.
6183 (procfs_open, procfs_native_open): Delete.
6184 (nto_native_ops): Now an nto_procfs_target_native.
6185 (init_procfs_targets): Adjust to C++ification.
6186 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
6187 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
6188 Refactor as methods of nto_procfs_target.
6189
6190 * go32-nat.c (go32_nat_target): New class.
6191 (the_go32_nat_target): New.
6192 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
6193 (go32_store_registers, go32_xfer_partial, go32_files_info)
6194 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
6195 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
6196 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
6197 (go32_pid_to_str): Refactor as methods of go32_nat_target.
6198 (go32_target): Delete.
6199 (_initialize_go32_nat): Adjust to C++ification.
6200
6201 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
6202 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
6203 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
6204 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
6205 gnu_nat_target.
6206 (gnu_target): Delete.
6207 * gnu-nat.h (gnu_target): Delete.
6208 (gnu_nat_target): New class.
6209 * i386-gnu-nat.c (gnu_base_target): New.
6210 (i386_gnu_nat_target): New class.
6211 (the_i386_gnu_nat_target): New.
6212 (_initialize_i386gnu_nat): Adjust to C++ification.
6213
6214 2018-05-02 Pedro Alves <palves@redhat.com>
6215
6216 * bfd-target.c (target_bfd_xclose): Rename to ...
6217 (target_bfd_close): ... this.
6218 (target_bfd_reopen): Adjust.
6219 * target.c (target_close): Remove references to to_xclose.
6220 * target.h (target_ops::to_xclose): Delete.
6221 (target_ops::to_close): Update comments.
6222
6223 2018-05-02 Pedro Alves <palves@redhat.com>
6224
6225 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
6226 "linux-nat.h".
6227 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
6228 * inf-ptrace.c (inf_ptrace_register_u_offset)
6229 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6230 (inf_ptrace_store_register, inf_ptrace_store_registers)
6231 (inf_ptrace_trad_target): Move to ...
6232 * linux-nat-trad.c: ... this new file.
6233 * linux-nat-trad.h: New file.
6234 * linux-nat.c (linux_target_install_ops): Make extern.
6235 (linux_trad_target): Delete.
6236 * linux-nat.h (linux_trad_target): Delete declaration.
6237 (linux_target_install_ops): Declare.
6238 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
6239 "linux-nat.h".
6240
6241 2018-05-02 Pedro Alves <palves@redhat.com>
6242
6243 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6244 procfs_target/add_target here.
6245 * procfs.c (procfs_target): Make static.
6246 (_initialize_procfs): Call add_target here.
6247 * procfs.h (struct target_ops): Remove forward declaration.
6248 (procfs_target): Remove declaration.
6249 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
6250
6251 2018-05-02 Pedro Alves <palves@redhat.com>
6252
6253 * procfs.c (procfs_stopped_by_watchpoint)
6254 (procfs_insert_watchpoint, procfs_remove_watchpoint)
6255 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
6256 Forward declare.
6257 (procfs_use_watchpoints): Delete, move contents...
6258 (procfs_target): ... here.
6259 * procfs.h (procfs_use_watchpoints): Delete declaration.
6260 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6261 procfs_use_watchpoints.
6262 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
6263 procfs_use_watchpoints.
6264
6265 2018-05-02 Tom Tromey <tom@tromey.com>
6266
6267 PR python/20084:
6268 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
6269 and var_zuinteger_unlimited.
6270 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
6271 and PARAM_ZUINTEGER_UNLIMITED.
6272 (set_parameter_value): Handle var_zuinteger and
6273 var_zuinteger_unlimited.
6274 (add_setshow_generic): Likewise.
6275 (parmpy_init): Likewise.
6276
6277 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
6278
6279 PR rust/23124
6280 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
6281 pointer is not null before dereferencing it.
6282
6283 2018-04-30 Tom Tromey <tom@tromey.com>
6284
6285 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
6286 is_mi_like_p.
6287
6288 2018-04-30 Tom Tromey <tom@tromey.com>
6289
6290 * breakpoint.c (mention): Remove use of is_mi_like_p.
6291 (print_mention_ranged_breakpoint): Likewise.
6292 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
6293 of is_mi_like_p.
6294
6295 2018-04-30 Tom Tromey <tom@tromey.com>
6296
6297 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
6298
6299 2018-04-30 Tom Tromey <tom@tromey.com>
6300
6301 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
6302 (info_spu_event_command): Remove some uses of is_mi_like_p.
6303
6304 2018-04-30 Tom Tromey <tom@tromey.com>
6305
6306 * python/py-framefilter.c (py_print_single_arg)
6307 (enumerate_locals, py_print_args, py_print_frame): Remove some
6308 uses of is_mi_like_p.
6309
6310 2018-04-30 Tom Tromey <tom@tromey.com>
6311
6312 * ui-out.c: Update.
6313 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
6314 * ui-out.h (ui_out::is_mi_like_p): Now const.
6315 (ui_out::do_is_mi_like_p): Now const.
6316 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
6317
6318 2018-04-30 Tom Tromey <tom@tromey.com>
6319
6320 * varobj.c (varobj_set_visualizer): Use new_reference.
6321 * python/python.c (gdbpy_decode_line): Use new_reference.
6322 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
6323 new_reference.
6324
6325 2018-04-30 Tom Tromey <tom@tromey.com>
6326
6327 * varobj.c (install_new_value): Use new_reference.
6328 * value.h (value_incref): Return void. Swap intro comment with
6329 value_decref.
6330 * value.c (set_value_parent): Use new_reference.
6331 (value_incref): Return void. Update intro comment.
6332 (release_value): Use new_reference.
6333 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
6334
6335 2018-04-30 Tom Tromey <tom@tromey.com>
6336
6337 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
6338 * gdb_bfd.h (new_bfd_ref): Remove.
6339 (gdb_bfd_open): Update comment.
6340 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
6341 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
6342 (gdb_bfd_fdopenr): Use new_reference.
6343 * exec.c (exec_file_attach): Use new_reference.
6344
6345 2018-04-30 Tom Tromey <tom@tromey.com>
6346
6347 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
6348 method.
6349
6350 2018-04-30 Tom Tromey <tom@tromey.com>
6351
6352 * jit.c (jit_read_code_entry): Use type_align.
6353 * i386-tdep.c (i386_gdbarch_init): Don't call
6354 set_gdbarch_long_long_align_bit.
6355 * gdbarch.sh: Remove long_long_align_bit.
6356 * gdbarch.c, gdbarch.h: Rebuild.
6357 * arc-tdep.c (arc_type_align): New function.
6358 (arc_gdbarch_init): Use arc_type_align. Don't call
6359 set_gdbarch_long_long_align_bit.
6360
6361 2018-04-30 Tom Tromey <tom@tromey.com>
6362
6363 * rust-lang.c (rust_type_alignment): Remove.
6364 (rust_composite_type): Use type_align.
6365
6366 2018-04-30 Tom Tromey <tom@tromey.com>
6367
6368 * NEWS: Mention Type.align.
6369 * python/py-type.c (typy_get_alignof): New function.
6370 (type_object_getset): Add "alignof".
6371
6372 2018-04-30 Tom Tromey <tom@tromey.com>
6373
6374 PR exp/17095:
6375 * NEWS: Update.
6376 * std-operator.def (UNOP_ALIGNOF): New operator.
6377 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
6378 New.
6379 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
6380 * c-lang.c (c_op_print_tab): Add alignof.
6381 * c-exp.y (ALIGNOF): New token.
6382 (exp): Add "ALIGNOF" production.
6383 (ident_tokens): Add _Alignof and alignof.
6384
6385 2018-04-30 Tom Tromey <tom@tromey.com>
6386
6387 * i386-tdep.c (i386_type_align): New function.
6388 (i386_gdbarch_init): Update.
6389 * gdbarch.sh (type_align): New method.
6390 * gdbarch.c, gdbarch.h: Rebuild.
6391 * arch-utils.h (default_type_align): Declare.
6392 * arch-utils.c (default_type_align): New function.
6393 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
6394 (struct type) <align_log2>: New field.
6395 <instance_flags>: Now a bitfield.
6396 (TYPE_RAW_ALIGN): New macro.
6397 (type_align, type_raw_align, set_type_align): Declare.
6398 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
6399 functions.
6400 * dwarf2read.c (quirk_rust_enum): Set type alignment.
6401 (get_alignment, maybe_set_alignment): New functions.
6402 (read_structure_type, read_enumeration_type, read_array_type)
6403 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
6404 (read_subrange_type, read_base_type): Set type alignment.
6405
6406 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
6407
6408 * dwarf2read.c (read_index_from_section): Use bool.
6409
6410 2018-04-29 Fabian Groffen <grobian@gentoo.org>
6411
6412 PR gdb/22950
6413 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
6414 with #ifdef.
6415
6416 2018-04-29 John Reiser <jreiser@BitWagon.com>
6417
6418 PR build/22873
6419 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
6420 last step, and do it atomically.
6421
6422 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
6423
6424 * compile/compile-c-types.c (convert_int, convert_float):
6425 Update for C FE v1.
6426
6427 2018-04-27 Tom Tromey <tom@tromey.com>
6428
6429 PR rust/22545:
6430 * rust-lang.c (rust_inclusive_range_type_p): New function.
6431 (rust_range): Handle inclusive ranges.
6432 (rust_compute_range): Likewise.
6433 * rust-exp.y (struct rust_op) <inclusive>: New field.
6434 (DOTDOTEQ): New constant.
6435 (range_expr): Add "..=" productions.
6436 (operator_tokens): Add "..=" token.
6437 (ast_range): Add "inclusive" parameter.
6438 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
6439 ranges.
6440 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
6441 bounds values.
6442 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
6443 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
6444 Update comments.
6445 * expprint.c (print_subexp_standard): Handle new bounds values.
6446 (dump_subexp_body_standard): Likewise.
6447
6448 2018-04-27 Tom Tromey <tom@tromey.com>
6449
6450 * configure: Rebuild.
6451 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
6452 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
6453 "OVERRIDE".
6454 (class symbol_needs_eval_context): Likewise.
6455 * dwarf2read.c (mock_mapped_index::symbol_name_count)
6456 (mock_mapped_index::symbol_name_at): Use "override". Remove
6457 "virtual".
6458 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
6459 "override".
6460 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
6461 * aarch64-tdep.c (instruction_reader::read): Use "override".
6462 (instruction_reader_test::read): Likewise.
6463 * arm-tdep.c (instruction_reader::read): Use "override".
6464 (instruction_reader_thumb::read): Likewise.
6465
6466 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
6467
6468 PR remote/9665
6469 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
6470 instead of remote_send.
6471 (remote_send): Remove.
6472
6473 2018-04-26 Pedro Alves <palves@redhat.com>
6474
6475 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
6476 find_function_start_sal instead of find_pc_line.
6477
6478 2018-04-26 Pedro Alves <palves@redhat.com>
6479
6480 * breakpoint.c (set_breakpoint_location_function): Handle
6481 mst_data_gnu_ifunc.
6482 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
6483 * elfread.c (elf_symtab_read): Give data symbols with
6484 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
6485 (elf_rel_plt_read): Update comment.
6486 * linespec.c (convert_linespec_to_sals): Handle
6487 mst_data_gnu_ifunc.
6488 (minsym_found): Handle mst_data_gnu_ifunc.
6489 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
6490 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
6491 * parse.c (find_minsym_type_and_address): Handle
6492 mst_data_gnu_ifunc.
6493 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
6494 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
6495 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
6496 comment.
6497 <mst_data_gnu_ifunc>: New enumerator.
6498
6499 2018-04-26 Pedro Alves <palves@redhat.com>
6500
6501 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
6502 (lookup_minimal_symbol_by_pc_section): ... this. Replace
6503 'want_trampoline' parameter by a lookup_msym_prefer parameter.
6504 Handle it.
6505 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
6506 (lookup_minimal_symbol_by_pc): Adjust.
6507 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
6508 (lookup_solib_trampoline_symbol_by_pc): Adjust.
6509 * minsyms.h (lookup_msym_prefer): New enum.
6510 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
6511 parameter by a lookup_msym_prefer parameter.
6512
6513 2018-04-26 Pedro Alves <palves@redhat.com>
6514
6515 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
6516 ends in "@plt" instead of looking at the symbol's section.
6517
6518 2018-04-26 Pedro Alves <palves@redhat.com>
6519
6520 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
6521 all references.
6522 (find_pc_partial_function_gnu_ifunc): Rename to ...
6523 (find_pc_partial_function): ... this, and remove references to
6524 'is_gnu_ifunc_p'.
6525 (find_pc_partial_function): Delete old implementation.
6526 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
6527
6528 2018-04-26 Pedro Alves <palves@redhat.com>
6529
6530 * linespec.c (struct bound_minimal_symbol_search_key): New.
6531 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
6532 skip first line if we found a GNU ifunc minimal symbol by name.
6533 (compare_msymbols): Change parameters to work with a destructured
6534 lhs minsym.
6535 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
6536 functions.
6537
6538 2018-04-26 Pedro Alves <palves@redhat.com>
6539
6540 * breakpoint.c (set_breakpoint_location_function): Don't resolve
6541 ifunc targets here. Instead, if we have an ifunc minsym, use its
6542 address/name.
6543 (add_location_to_breakpoint): Store the minsym and the objfile in
6544 the breakpoint location.
6545 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
6546 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
6547 Record the minsym in the sal.
6548 * symtab.h (symtab_and_line) <msymbol>: New field.
6549
6550 2018-04-26 Pedro Alves <palves@redhat.com>
6551
6552 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
6553 unless we actually resolved the ifunc.
6554
6555 2018-04-26 Pedro Alves <palves@redhat.com>
6556
6557 * c-exp.y (variable production): Prefer ifunc minsyms over
6558 regular function symbols.
6559 * symtab.c (find_gnu_ifunc): New function.
6560 * minsyms.h (lookup_msym_prefer): New enum.
6561 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
6562 parameter by a lookup_msym_prefer parameter.
6563 * symtab.h (find_gnu_ifunc): New declaration.
6564
6565 2018-04-26 Pedro Alves <palves@redhat.com>
6566
6567 * blockframe.c (find_gnu_ifunc_target_type): New function.
6568 (find_function_type): New.
6569 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
6570 return a value with a memory address.
6571 (eval_call): For calls to GNU ifunc functions, try to find the
6572 type of the target function from the type that the resolver
6573 returns.
6574 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
6575 symbols.
6576 * infcall.c (find_function_return_type): Delete.
6577 (find_function_addr): Add 'function_type' parameter. For calls to
6578 GNU ifunc functions, try to find the type of the target function
6579 from the type that the resolver returns, and return it via
6580 FUNCTION_TYPE.
6581 (call_function_by_hand_dummy): Adjust to use the function type
6582 returned by find_function_addr.
6583 (find_function_addr): Add 'function_type' parameter and move
6584 description here.
6585 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
6586 declarations.
6587
6588 2018-04-26 Pedro Alves <palves@redhat.com>
6589
6590 * c-exp.y (variable production): Skip finding an alias for ifunc
6591 symbols.
6592
6593 2018-04-26 Pedro Alves <palves@redhat.com>
6594
6595 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
6596
6597 2018-04-25 Pedro Alves <palves@redhat.com>
6598
6599 * infcmd.c (kill_command): Print the pid as string, not the whole
6600 thread's ptid. Add comment. s/has been killed/killed/ in output
6601 message.
6602 * remote.c (remote_detach_1): Print the pid as string, not the
6603 whole thread's ptid.
6604
6605 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6606 Sergio Durigan Junior <sergiodj@redhat.com>
6607 Pedro Alves <palves@redhat.com>
6608
6609 * infcmd.c (kill_command): Print message when inferior has
6610 been killed.
6611 * inferior.c (print_inferior_events): Remove 'static'. Set as
6612 '1'.
6613 (add_inferior): Improve message printed when
6614 'print_inferior_events' is on.
6615 (exit_inferior): Remove message printed when
6616 'print_inferior_events' is on.
6617 (detach_inferior): Improve message printed when
6618 'print_inferior_events' is on.
6619 (initialize_inferiors): Use 'add_inferior_silent' to set
6620 'current_inferior_'.
6621 * inferior.h (print_inferior_events): Declare here as
6622 'extern'.
6623 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
6624 '[Detaching...]' messages when 'print_inferior_events' is on.
6625 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
6626 as prefix/suffix for messages. Remove periods. Fix erroneous
6627 'Detaching after fork from child...', replace it by '... from
6628 parent...'.
6629 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
6630 prefix/suffix when printing 'Detaching...' messages. Print
6631 them when 'print_inferior_events' is on.
6632 * remote.c (remote_detach_1): Print message when detaching
6633 from inferior and '!is_fork_parent'.
6634
6635 2018-04-24 Tom Tromey <tom@tromey.com>
6636
6637 * cli-out.h: Reindent.
6638
6639 2018-04-24 Tom Tromey <tom@tromey.com>
6640
6641 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
6642 (cli_ui_out::do_field_string): Use fputs_filtered.
6643 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
6644
6645 2018-04-23 Tom Tromey <tom@tromey.com>
6646
6647 * guile/scm-frame.c (gdbscm_frame_read_var): Use
6648 gdb::unique_xmalloc_ptr.
6649
6650 2018-04-23 Tom Tromey <tom@tromey.com>
6651
6652 * configure: Rebuild.
6653
6654 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
6655
6656 PR gdb/23095
6657 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
6658 prepare_for_testing. Set normal_bp to r_debug_state if target
6659 is bsd.
6660
6661 2018-04-21 Pedro Alves <palves@redhat.com>
6662 Rajendra SY <rajendra.sy@gmail.com>
6663
6664 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
6665 * remote.c (extended_remote_attach): In all-stop mode, mark the
6666 thread as executing.
6667
6668 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6669
6670 * thread.c (thread_apply_all_command): Fix comment.
6671 (thread_command): Fix comment.
6672
6673 2018-04-10 Alan Hayward <alan.hayward@arm.com>
6674
6675 * common/tdesc.h (tdesc_create_feature): Remove xml filename
6676 parameter.
6677 * features/aarch64-core.c (create_feature_aarch64_core):
6678 Regenerate.
6679 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
6680 Likewise.
6681 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
6682 Likewise.
6683 * features/i386/32bit-avx512.c
6684 (create_feature_i386_32bit_avx512): Likewise.
6685 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
6686 Likewise.
6687 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
6688 Likewise.
6689 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
6690 Likewise.
6691 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
6692 Likewise.
6693 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
6694 Likewise.
6695 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
6696 Likewise.
6697 * features/i386/64bit-avx512.c
6698 (create_feature_i386_64bit_avx512): Likewise.
6699 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
6700 Likewise.
6701 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
6702 Likewise.
6703 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
6704 Likewise.
6705 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
6706 Likewise.
6707 * features/i386/64bit-segments.c
6708 (create_feature_i386_64bit_segments): Likewise.
6709 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
6710 Likewise.
6711 * features/i386/x32-core.c
6712 (create_feature_i386_x32_core): Likewise.
6713 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
6714 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
6715 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
6716 * target-descriptions.c: In generated code, don't pass xml
6717 filename.
6718
6719 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6720
6721 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
6722 (print_xml_feature::visit_post): Likewise.
6723 (print_xml_feature::visit): Likewise.
6724 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
6725 (print_xml_feature): Add new class.
6726 * regformats/regdat.sh: Null xmltarget on feature targets.
6727 * target-descriptions.c (struct target_desc): Add xmltarget.
6728 (maintenance_check_tdesc_xml_convert): Add unittest function.
6729 (tdesc_get_features_xml): Add function to get xml.
6730 (maintenance_check_xml_descriptions): Test xml generation.
6731 * xml-tdesc.c (string_read_description_xml): Add function.
6732 * xml-tdesc.h (string_read_description_xml): Add declaration.
6733
6734 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6735
6736 * features/Makefile: Add feature marker to targets with new style
6737 target descriptions.
6738 * regformats/aarch64.dat: Regenerate.
6739 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
6740 * regformats/i386/amd64-avx-linux.dat: Likewise.
6741 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
6742 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
6743 * regformats/i386/amd64-linux.dat: Likewise.
6744 * regformats/i386/amd64-mpx-linux.dat: Likewise.
6745 * regformats/i386/amd64.dat: Likewise.
6746 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
6747 * regformats/i386/i386-avx-linux.dat: Likewise.
6748 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
6749 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
6750 * regformats/i386/i386-linux.dat: Likewise.
6751 * regformats/i386/i386-mmx-linux.dat: Likewise.
6752 * regformats/i386/i386-mpx-linux.dat: Likewise.
6753 * regformats/i386/i386.dat: Likewise.
6754 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
6755 * regformats/i386/x32-avx-linux.dat: Likewise.
6756 * regformats/i386/x32-linux.dat: Likewise.
6757 * regformats/tic6x-c62x-linux.dat: Likewise.
6758 * regformats/tic6x-c64x-linux.dat: Likewise.
6759 * regformats/tic6x-c64xp-linux.dat: Likewise.
6760 * regformats/regdat.sh: Parse feature marker.
6761
6762 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6763
6764 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
6765 (tdesc_osabi_name): Likewise.
6766 * target-descriptions.c (tdesc_architecture_name): Add new
6767 function.
6768 (tdesc_osabi_name): Likewise.
6769
6770 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6771
6772 * common/tdesc.c (tdesc_predefined_type): Move to here.
6773 (tdesc_named_type): Likewise.
6774 (tdesc_create_vector): Likewise.
6775 (tdesc_create_struct): Likewise.
6776 (tdesc_set_struct_size): Likewise.
6777 (tdesc_create_union): Likewise.
6778 (tdesc_create_flags): Likewise.
6779 (tdesc_create_enum): Likewise.
6780 (tdesc_add_field): Likewise.
6781 (tdesc_add_typed_bitfield): Likewise.
6782 (tdesc_add_bitfield): Likewise.
6783 (tdesc_add_flag): Likewise.
6784 (tdesc_add_enum_value): Likewise.
6785 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
6786 (struct tdesc_type_vector): Likewise.
6787 (struct tdesc_type_field): Likewise.
6788 (struct tdesc_type_with_fields): Likewise.
6789 (tdesc_create_enum): Add declaration.
6790 (tdesc_add_typed_bitfield): Likewise.
6791 (tdesc_add_enum_value): Likewise.
6792 * target-descriptions.c (tdesc_type_field): Move from here.
6793 (tdesc_type_builtin): Likewise.
6794 (tdesc_type_vector): Likewise.
6795 (tdesc_type_with_fields): Likewise.
6796 (tdesc_predefined_types): Likewise.
6797 (tdesc_named_type): Likewise.
6798 (tdesc_create_vector): Likewise.
6799 (tdesc_create_struct): Likewise.
6800 (tdesc_set_struct_size): Likewise.
6801 (tdesc_create_union): Likewise.
6802 (tdesc_create_flags): Likewise.
6803 (tdesc_create_enum): Likewise.
6804 (tdesc_add_field): Likewise.
6805 (tdesc_add_typed_bitfield): Likewise.
6806 (tdesc_add_bitfield): Likewise.
6807 (tdesc_add_flag): Likewise.
6808 (tdesc_add_enum_value): Likewise.
6809 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
6810 (tdesc_add_typed_bitfield): Likewise.
6811 (tdesc_add_enum_value): Likewise.
6812
6813 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6814
6815 * common/tdesc.c (tdesc_feature::accept): Move to here.
6816 (tdesc_feature::operator==): Likewise.
6817 (tdesc_create_reg): Likewise.
6818 * common/tdesc.h (tdesc_type_kind): Likewise.
6819 (struct tdesc_type): Likewise.
6820 (struct tdesc_feature): Likewise.
6821 * regformats/regdat.sh: Create a feature.
6822 * target-descriptions.c (tdesc_type_kind): Move from here.
6823 (tdesc_type): Likewise.
6824 (tdesc_type_up): Likewise.
6825 (tdesc_feature): Likewise.
6826 (tdesc_create_reg): Likewise.
6827
6828 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6829
6830 * Makefile.in: Add arch/tdesc.c
6831 * common/tdesc.c: New file.
6832 * common/tdesc.h (tdesc_element_visitor): Move to here.
6833 (tdesc_element): Likewise.
6834 (tdesc_reg): Likewise.
6835 (tdesc_reg_up): Likewise.
6836 * regformats/regdef.h (reg): Add offset to constructors.
6837 * target-descriptions.c (tdesc_element_visitor): Move from here.
6838 (tdesc_element): Likewise.
6839 (tdesc_reg): Likewise.
6840 (tdesc_reg_up): Likewise.
6841
6842 2018-04-17 Tom Tromey <tom@tromey.com>
6843
6844 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
6845 discriminant field.
6846
6847 2018-04-17 Tom Tromey <tom@tromey.com>
6848
6849 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
6850
6851 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
6852
6853 * symtab.c (print_symbol_info): Skip printing filename and line
6854 number when `last' is NULL.
6855 (symtab_symbol_info): Use empty string instead of NULL for first
6856 invocation of print_symbol_info.
6857 (rbreak_command): Pass NULL to `last' parameter of
6858 print_symbol_info.
6859
6860 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
6861
6862 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
6863 instead of nullptr.
6864
6865 2018-04-16 Pedro Alves <palves@redhat.com>
6866
6867 * MAINTAINERS (sh): Remove.
6868 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
6869 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
6870 (ALLDEPFILES): Remove sh64-tdep.c.
6871 * NEWS: Mentions that support for SH-5/SH64 is removed.
6872 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
6873 (sh*-*-openbsd*): Ditto.
6874 (sh64-*-elf*): Remove.
6875 (sh*): Remove.
6876 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
6877 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
6878 * sh-tdep.c: No longer include "sh64-tdep.h".
6879 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
6880 * sh64-tdep.c, sh64-tdep.h: Remove files.
6881
6882 2018-04-16 Pedro Alves <palves@redhat.com>
6883
6884 * MAINTAINERS: Remove m88k.
6885 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
6886 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
6887 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
6888 * NEWS: Mention that support for m88k was removed.
6889 * configure.host (m88*-*-*): Remove support.
6890 * configure.nat (m88k-*-*): Remove support.
6891 * configure.tgt (m88*-*-openbsd*): Remove.
6892 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
6893
6894 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
6895
6896 * configure.tgt (x86_tobjs): New variable.
6897 (amd64_tobjs, i386_tobjs): Use it.
6898
6899 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6900
6901 * symtab.c (print_symbol_info): Precede the symbol definition by
6902 the line number when available.
6903 * NEWS: Advertise this enhancement.
6904
6905 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6906
6907 * NEWS (New options): announce set/show record btrace cpu.
6908 * btrace.c: Include record-btrace.h.
6909 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
6910 the vendor is unknown.
6911 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
6912 Maybe overwrite the btrace configuration's cpu.
6913 (btrace_compute_ftrace): Add cpu parameter. Update callers.
6914 (btrace_fetch): Add cpu parameter. Update callers.
6915 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
6916 Maybe overwrite the btrace configuration's cpu. Skip enabling
6917 errata workarounds if the vendor is unknown.
6918 * python/py-record-btrace.c: Include record-btrace.h.
6919 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
6920 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
6921 * record-btrace.c (record_btrace_cpu_state_kind): New.
6922 (record_btrace_cpu): New.
6923 (set_record_btrace_cpu_cmdlist): New.
6924 (record_btrace_get_cpu): New.
6925 (require_btrace_thread, record_btrace_info)
6926 (record_btrace_resume_thread): Call record_btrace_get_cpu.
6927 (cmd_set_record_btrace_cpu_none): New.
6928 (cmd_set_record_btrace_cpu_auto): New.
6929 (cmd_set_record_btrace_cpu): New.
6930 (cmd_show_record_btrace_cpu): New.
6931 (_initialize_record_btrace): Initialize set/show record btrace cpu
6932 commands.
6933 * record-btrace.h (record_btrace_get_cpu): New.
6934
6935 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6936
6937 * record.c (set_record_command): Fix typo in message.
6938
6939 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6940
6941 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
6942
6943 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6944
6945 * infrun.c (process_event_stop_test): Call
6946 gdbarch_in_indirect_branch_thunk.
6947 * gdbarch.sh (in_indirect_branch_thunk): New.
6948 * gdbarch.c: Regenerated.
6949 * gdbarch.h: Regenerated.
6950 * x86-tdep.h: New.
6951 * x86-tdep.c: New.
6952 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
6953 (HFILES_NO_SRCDIR): Add x86-tdep.h.
6954 (ALLDEPFILES): Add x86-tdep.c.
6955 * arch-utils.h (default_in_indirect_branch_thunk): New.
6956 * arch-utils.c (default_in_indirect_branch_thunk): New.
6957 * i386-tdep: Include x86-tdep.h.
6958 (i386_in_indirect_branch_thunk): New.
6959 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
6960 function.
6961 * amd64-tdep: Include x86-tdep.h.
6962 (amd64_in_indirect_branch_thunk): New.
6963 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
6964
6965 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
6966
6967 PR gdb/23053
6968 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
6969 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
6970 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
6971 regression.
6972
6973 2018-04-12 Tom Tromey <tom@tromey.com>
6974
6975 * rust-lang.c (rust_print_struct_def): Remove univariant code.
6976 (rust_evaluate_subexp): Likewise.
6977
6978 2018-04-12 Pedro Alves <palves@redhat.com>
6979
6980 * procfs.c (procfs_detach): Make forward declaration's prototype
6981 match definition's protototype.
6982 (proc_get_LDT_entry): Remove stale do_cleanups call.
6983
6984 2018-04-12 Pedro Alves <palves@redhat.com>
6985
6986 * target.h (target_ops::to_has_exited): Delete.
6987 (target_has_exited): Delete.
6988 * target-delegates.c: Regenerate.
6989
6990 2018-04-11 Pedro Alves <palves@redhat.com>
6991
6992 * target.c (fileio_fh_t::t): Add comment.
6993 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
6994 (target_fileio_close): Handle a NULL target.
6995 (invalidate_fileio_fh): New.
6996 (target_close): Call it.
6997 * remote.c (remote_hostio_send_command): No longer check whether
6998 remote_desc is open.
6999
7000 2018-04-11 Pedro Alves <palves@redhat.com>
7001
7002 * target.c (fileio_fh_t): Make it a named struct instead of a
7003 typedef.
7004 (fileio_fh_t::is_closed): New method.
7005 (DEF_VEC_O (fileio_fh_t)): Remove.
7006 (fileio_fhandles): Now a std::vector.
7007 (is_closed_fileio_fh): Delete.
7008 (acquire_fileio_fd): Adjust. Rename parameters.
7009 (release_fileio_fd): Adjust.
7010 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
7011 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7012 (target_fileio_close): Adjust.
7013
7014 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
7015
7016 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
7017 index.
7018
7019 2018-04-10 Pedro Alves <palves@redhat.com>
7020
7021 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
7022 (scoped_finish_thread_state): New class.
7023 * infcmd.c (run_command_1): Use it instead of finish_thread_state
7024 cleanup.
7025 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
7026 (fetch_inferior_event, normal_stop): Likewise.
7027 * thread.c (finish_thread_state_cleanup): Delete.
7028
7029 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7030 Pedro Alves <palves@redhat.com>
7031
7032 * value.c: Include "selftest.h" and "common/array-view.h".
7033 (struct range) <operator ==>: New.
7034 (test_ranges_contain): New.
7035 (check_ranges_vector): New.
7036 (test_insert_into_bit_range_vector): New.
7037 (_initialize_values): Register selftests.
7038 * common/array-view.h (operator==, operator!=): New.
7039
7040 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7041
7042 * common/gdb_vecs.h (unordered_remove): Add overload that takes
7043 an iterator.
7044 * inline-frame.c: Include <algorithm>.
7045 (struct inline_state): Add constructor.
7046 (inline_state_s): Remove.
7047 (DEF_VEC_O(inline_state_s)): Remove.
7048 (inline_states): Change type to std::vector.
7049 (find_inline_frame_state): Adjust to std::vector.
7050 (allocate_inline_frame_state): Remove.
7051 (clear_inline_frame_state): Adjust to std::vector.
7052 (skip_inline_frames): Adjust to std::vector.
7053
7054 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7055
7056 * tracepoint.h (struct trace_state_variable): Add constructor.
7057 <name>: Change type to std::string.
7058 * tracepoint.c (tsv_s): Remove.
7059 (DEF_VEC_O(tsv_s)): Remove.
7060 (tvariables): Change to std::vector.
7061 (create_trace_state_variable): Adjust to std::vector.
7062 (find_trace_state_variable): Likewise.
7063 (find_trace_state_variable_by_number): Likewise.
7064 (delete_trace_state_variable): Likewise.
7065 (trace_variable_command): Adjust to std::string.
7066 (delete_trace_variable_command): Likewise.
7067 (tvariables_info_1): Adjust to std::vector.
7068 (save_trace_state_variables): Likewise.
7069 (start_tracing): Likewise.
7070 (merge_uploaded_trace_state_variables): Adjust to std::vector
7071 and std::string.
7072 * target.h (struct target_ops)
7073 <to_download_trace_state_variable>: Pass reference to
7074 trace_state_variable.
7075 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
7076 * target-delegates.c: Re-generate.
7077 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
7078 (mi_tsv_deleted): Likewise.
7079 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
7080 * remote.c (remote_download_trace_state_variable): Change
7081 pointer to reference and adjust.
7082 * make-target-delegates (parse_argtypes): Handle references.
7083 (write_function_header): Likewise.
7084 (munge_type): Likewise.
7085
7086 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7087
7088 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7089 string_view-selftests.c.
7090 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
7091 testsuite.
7092 * unittests/basic_string_view/cons/char/1.cc: Likewise.
7093 * unittests/basic_string_view/cons/char/2.cc: Likewise.
7094 * unittests/basic_string_view/cons/char/3.cc: Likewise.
7095 * unittests/basic_string_view/element_access/char/1.cc:
7096 Likewise.
7097 * unittests/basic_string_view/element_access/char/empty.cc:
7098 Likewise.
7099 * unittests/basic_string_view/element_access/char/front_back.cc:
7100 Likewise.
7101 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
7102 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
7103 Likewise.
7104 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
7105 Likewise.
7106 * unittests/basic_string_view/modifiers/swap/char/1.cc:
7107 Likewise.
7108 * unittests/basic_string_view/operations/compare/char/1.cc:
7109 Likewise.
7110 * unittests/basic_string_view/operations/compare/char/13650.cc:
7111 Likewise.
7112 * unittests/basic_string_view/operations/copy/char/1.cc:
7113 Likewise.
7114 * unittests/basic_string_view/operations/data/char/1.cc:
7115 Likewise.
7116 * unittests/basic_string_view/operations/find/char/1.cc:
7117 Likewise.
7118 * unittests/basic_string_view/operations/find/char/2.cc:
7119 Likewise.
7120 * unittests/basic_string_view/operations/find/char/3.cc:
7121 Likewise.
7122 * unittests/basic_string_view/operations/find/char/4.cc:
7123 Likewise.
7124 * unittests/basic_string_view/operations/rfind/char/1.cc:
7125 Likewise.
7126 * unittests/basic_string_view/operations/rfind/char/2.cc:
7127 Likewise.
7128 * unittests/basic_string_view/operations/rfind/char/3.cc:
7129 Likewise.
7130 * unittests/basic_string_view/operations/substr/char/1.cc:
7131 Likewise.
7132 * unittests/basic_string_view/operators/char/2.cc: Likewise.
7133 * unittests/string_view-selftests.c: New file.
7134
7135 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7136
7137 * unittests/basic_string_view/capacity/1.cc: New file.
7138 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
7139 * unittests/basic_string_view/cons/char/1.cc: New file.
7140 * unittests/basic_string_view/cons/char/2.cc: New file.
7141 * unittests/basic_string_view/cons/char/3.cc: New file.
7142 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
7143 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
7144 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
7145 * unittests/basic_string_view/element_access/char/1.cc: New file.
7146 * unittests/basic_string_view/element_access/char/2.cc: New file.
7147 * unittests/basic_string_view/element_access/char/empty.cc: New file.
7148 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
7149 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
7150 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
7151 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
7152 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
7153 * unittests/basic_string_view/include.cc: New file.
7154 * unittests/basic_string_view/inserters/char/1.cc: New file.
7155 * unittests/basic_string_view/inserters/char/2.cc: New file.
7156 * unittests/basic_string_view/inserters/char/3.cc: New file.
7157 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
7158 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
7159 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
7160 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
7161 * unittests/basic_string_view/literals/types.cc: New file.
7162 * unittests/basic_string_view/literals/values.cc: New file.
7163 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
7164 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
7165 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
7166 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
7167 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
7168 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
7169 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
7170 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
7171 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
7172 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
7173 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
7174 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
7175 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
7176 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
7177 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
7178 * unittests/basic_string_view/operations/data/char/1.cc: New file.
7179 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
7180 * unittests/basic_string_view/operations/find/char/1.cc: New file.
7181 * unittests/basic_string_view/operations/find/char/2.cc: New file.
7182 * unittests/basic_string_view/operations/find/char/3.cc: New file.
7183 * unittests/basic_string_view/operations/find/char/4.cc: New file.
7184 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
7185 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
7186 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
7187 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
7188 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
7189 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
7190 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
7191 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
7192 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
7193 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
7194 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
7195 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
7196 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
7197 * unittests/basic_string_view/operators/char/2.cc: New file.
7198 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
7199 * unittests/basic_string_view/range_access/char/1.cc: New file.
7200 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
7201 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
7202 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
7203 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
7204 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
7205 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
7206 * unittests/basic_string_view/requirements/typedefs.cc: New file.
7207 * unittests/basic_string_view/typedefs.cc: New file.
7208 * unittests/basic_string_view/types/1.cc: New file.
7209
7210 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7211
7212 * common/gdb_string_view.h: Remove libstdc++ implementation
7213 details, adjust to gdb reality.
7214 * common/gdb_string_view.tcc: Likewise.
7215 * cli/cli-script.c (struct string_view): Remove.
7216 (user_args) <m_args>: Change element type to gdb::string_view.
7217 (user_args::insert_args): Adjust.
7218
7219 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7220
7221 * common/gdb_string_view.h: New file.
7222 * common/gdb_string_view.tcc: New file.
7223
7224 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7225
7226 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
7227 * configure: Re-generate.
7228
7229 2018-04-09 Pedro Alves <palves@redhat.com>
7230
7231 * gdbarch.sh: Include "observable.h" instead of "observer.h".
7232 (set_target_gdbarch): Call
7233 gdb::observers::architecture_changed.notify instead of
7234 observer_notify_architecture_changed.
7235
7236 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7237
7238 * tracepoint.c (struct current_traceframe_cleanup): Remove.
7239 (do_restore_current_traceframe_cleanup): Remove.
7240 (restore_current_traceframe_cleanup_dtor): Remove.
7241 (make_cleanup_restore_current_traceframe): Remove.
7242 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
7243 New.
7244 * tracepoint.h (struct scoped_restore_current_traceframe): New.
7245 * infrun.c (fetch_inferior_event): Use
7246 scoped_restore_current_traceframe.
7247
7248 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7249
7250 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
7251 Remove.
7252 <n_allocated_type_units>: Remove.
7253 <all_type_units>: Change to std::vector.
7254 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7255 to std::vector change.
7256 (dwarf2_per_objfile::get_cutu): Likewise.
7257 (dwarf2_per_objfile::get_tu): Likewise.
7258 (create_signatured_type_table_from_index): Likewise.
7259 (create_signatured_type_table_from_debug_names): Likewise.
7260 (dw2_symtab_iter_next): Likewise.
7261 (dw2_print_stats): Likewise.
7262 (dw2_expand_all_symtabs): Likewise.
7263 (dw2_expand_marked_cus): Likewise.
7264 (dw2_debug_names_iterator::next): Likewise.
7265 (dwarf2_initialize_objfile): Likewise.
7266 (add_signatured_type_cu_to_table): Likewise.
7267 (create_all_type_units): Likewise.
7268 (add_type_unit): Likewise.
7269 (struct tu_abbrev_offset): Add constructor.
7270 (build_type_psymtabs_1): Adjust to std::vector change.
7271 (print_tu_stats): Likewise.
7272 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7273 (write_debug_names): Likewise.
7274
7275 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7276
7277 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
7278 Make an std::vector.
7279 <n_comp_units>: Remove.
7280 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7281 to std::vector change.
7282 (dwarf2_per_objfile::get_cutu): Likewise.
7283 (dwarf2_per_objfile::get_cu): Likewise.
7284 (create_cus_from_index): Likewise.
7285 (create_addrmap_from_index): Likewise.
7286 (create_addrmap_from_aranges): Likewise.
7287 (dwarf2_read_index): Likewise.
7288 (dw2_find_last_source_symtab): Likewise.
7289 (dw2_map_symtabs_matching_filename): Likewise.
7290 (dw2_symtab_iter_next): Likewise.
7291 (dw2_print_stats): Likewise.
7292 (dw2_expand_all_symtabs): Likewise.
7293 (dw2_expand_symtabs_with_fullname): Likewise.
7294 (dw2_expand_marked_cus): Likewise.
7295 (dw2_map_symbol_filenames): Likewise.
7296 (create_cus_from_debug_names): Likewise.
7297 (dwarf2_read_debug_names): Likewise.
7298 (dw2_debug_names_iterator::next): Likewise.
7299 (dwarf2_initialize_objfile): Likewise.
7300 (set_partial_user): Likewise.
7301 (dwarf2_build_psymtabs_hard): Likewise.
7302 (read_comp_units_from_section): Remove arguments, adjust to
7303 std::vector change.
7304 (create_all_comp_units): Adjust to std::vector and
7305 read_comp_units_from_section changes.
7306 (dwarf2_find_containing_comp_unit): Adjust to std::vector
7307 change.
7308 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7309 (psyms_seen_size): Likewise.
7310 (write_gdbindex): Likewise.
7311 (write_debug_names): Likewise.
7312
7313 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7314
7315 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
7316 with dwarf2_per_objfile.
7317 (create_cus_from_index): Likewise.
7318 (create_signatured_type_table_from_index): Likewise.
7319 (dwarf2_read_index): Likewise.
7320 (dwarf2_initialize_objfile): Likewise.
7321 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
7322 per_cu rather than get_dwarf2_per_objfile.
7323
7324 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7325
7326 * dwarf2read.h (struct signatured_type): Forward declare.
7327 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
7328 New methods.
7329 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
7330 (dw2_get_cutu): ...this.
7331 (dwarf2_per_objfile::get_cu): Rename from...
7332 (dw2_get_cu): ...this.
7333 (dwarf2_per_objfile::get_tu): New.
7334 (create_addrmap_from_index): Adjust.
7335 (create_addrmap_from_aranges): Adjust.
7336 (dw2_find_last_source_symtab): Adjust.
7337 (dw2_map_symtabs_matching_filename): Adjust.
7338 (dw2_symtab_iter_next): Adjust.
7339 (dw2_print_stats): Adjust.
7340 (dw2_expand_all_symtabs): Adjust.
7341 (dw2_expand_symtabs_with_fullname): Adjust.
7342 (dw2_expand_marked_cus): Adjust.
7343 (dw_expand_symtabs_matching_file_matcher): Adjust.
7344 (dw2_map_symbol_filenames): Adjust.
7345 (dw2_debug_names_iterator::next): Adjust.
7346 (dwarf2_initialize_objfile): Adjust.
7347 (set_partial_user): Adjust.
7348 (dwarf2_build_psymtabs_hard): Adjust.
7349
7350 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7351
7352 * dwarf2read.c (create_signatured_type_table_from_debug_names):
7353 Remove unused variables.
7354 (dw2_map_symtabs_matching_filename): Likewise.
7355 (dwarf2_record_block_ranges): Likewise.
7356 (dwarf2_read_addr_index): Likewise.
7357 (follow_die_offset): Likewise.
7358
7359 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7360
7361 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
7362 to symbol_file_add_main.
7363
7364 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7365
7366 PR mi/22299
7367 * mi/mi-console.c (do_fputc_async_safe): New.
7368 (mi_console_file::write_async_safe): New.
7369 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
7370 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
7371 New.
7372 * ui-file.c (ui_file::putstrn): Adjust call to
7373 fputstrn_unfiltered.
7374 * utils.c (printchar): Replace do_fputs and do_fprintf
7375 parameters by do_fputc.
7376 (fputstr_filtered): Adjust call to printchar.
7377 (fputstr_unfiltered): Likewise.
7378 (fputstrn_filtered): Likewise.
7379 (fputstrn_unfiltered): Add do_fputc parameter, pass to
7380 printchar.
7381 * utils.h (do_fputc_ftype): New typedef.
7382 (fputstrn_unfiltered): Add do_fputc parameter.
7383
7384 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7385
7386 * regformats/i386/i386-avx.dat: Remove.
7387
7388 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7389
7390 PR gdb/22979
7391 * amd64-tdep.c (amd64_none_init_abi): New function.
7392 (amd64_x32_none_init_abi): New function.
7393 (_initialize_amd64_tdep): Register handlers for x86-64 and
7394 x64_32 with GDB_OSABI_NONE.
7395 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
7396 GDB_OSABI_NONE osabi.
7397
7398 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7399
7400 PR gdb/22980
7401 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
7402 GDB_OSABI_NONE.
7403 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
7404 * osabi.c (gdb_osabi_names): Add "unknown" entry.
7405
7406 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7407
7408 * common/byte-vector.h (char_vector): New type.
7409 * target.h (target_read_alloc): Return
7410 gdb::optional<byte_vector>.
7411 (target_read_stralloc): Return gdb::optional<char_vector>.
7412 (target_get_osdata): Return gdb::optional<char_vector>.
7413 * target.c (target_read_alloc_1): Templatize. Replacement
7414 manual memory management with vector.
7415 (target_read_alloc): Change return type, adjust.
7416 (target_read_stralloc): Change return type, adjust.
7417 (target_get_osdata): Change return type, adjust.
7418 * auxv.c (struct auxv_info) <length>: Remove.
7419 <data>: Change type to gdb::optional<byte_vector>.
7420 (auxv_inferior_data_cleanup): Free auxv_info with delete.
7421 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
7422 (target_auxv_search): Adjust.
7423 (fprint_target_auxv): Adjust.
7424 * avr-tdep.c (avr_io_reg_read_command): Adjust.
7425 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
7426 (linux_make_corefile_notes): Adjust.
7427 * osdata.c (get_osdata): Adjust.
7428 * remote.c (remote_get_threads_with_qxfer): Adjust.
7429 (remote_memory_map): Adjust.
7430 (remote_traceframe_info): Adjust.
7431 (btrace_read_config): Adjust.
7432 (remote_read_btrace): Adjust.
7433 (remote_pid_to_exec_file): Adjust.
7434 * solib-aix.c (solib_aix_get_library_list): Adjust.
7435 * solib-dsbt.c (decode_loadmap): Don't free buf.
7436 (dsbt_get_initial_loadmaps): Adjust.
7437 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
7438 * solib-target.c (solib_target_current_sos): Adjust.
7439 * tracepoint.c (sdata_make_value): Adjust.
7440 * xml-support.c (xinclude_start_include): Adjust.
7441 (xml_fetch_content_from_file): Adjust.
7442 * xml-support.h (xml_fetch_another): Change return type.
7443 (xml_fetch_content_from_file): Change return type.
7444 * xml-syscall.c (xml_init_syscalls_info): Adjust.
7445 * xml-tdesc.c (file_read_description_xml): Adjust.
7446 (fetch_available_features_from_target): Change return type.
7447 (target_fetch_description_xml): Adjust.
7448 (target_read_description_xml): Adjust.
7449
7450 2018-04-06 Tom Tromey <tom@tromey.com>
7451
7452 * value.c (~value): Update.
7453 (struct value) <contents>: Now unique_xmalloc_ptr.
7454 (value_contents_bits_eq, allocate_value_contents)
7455 (value_contents_raw, value_contents_all_raw)
7456 (value_contents_for_printing, value_contents_for_printing_const)
7457 (set_value_enclosing_type): Update.
7458
7459 2018-04-06 Tom Tromey <tom@tromey.com>
7460
7461 * value.c (range_s): Remove typedef, VEC.
7462 (struct range): Add operator<.
7463 (range_lessthan): Remove.
7464 (ranges_contain): Change type.
7465 (~value): Update.
7466 (struct value) <unavailable, optimized_out>: Now std::vector.
7467 (value_entirely_available)
7468 (value_entirely_covered_by_range_vector)
7469 (value_entirely_unavailable, value_entirely_optimized_out):
7470 Update.
7471 (insert_into_bit_range_vector): Change argument type.
7472 (find_first_range_overlap): Likewise.
7473 (struct ranges_and_idx, value_contents_bits_eq)
7474 (require_not_optimized_out, require_available): Update.
7475 (ranges_copy_adjusted): Change argument types.
7476 (value_optimized_out, value_copy, value_fetch_lazy): Update.
7477
7478 2018-04-06 Tom Tromey <tom@tromey.com>
7479
7480 * value.c (~value): Update.
7481 (struct value) <parent>: Now a value_ref_ptr.
7482 (value_parent, set_value_parent, value_address, value_copy):
7483 Update.
7484
7485 2018-04-06 Tom Tromey <tom@tromey.com>
7486
7487 * value.c (struct value): Add constructor, destructor, and member
7488 initializers.
7489 (allocate_value_lazy, value_decref): Update.
7490
7491 2018-04-06 Tom Tromey <tom@tromey.com>
7492
7493 * value.c (struct value) <released, next>: Remove.
7494 (all_values): Now a std::vector.
7495 (allocate_value_lazy): Update.
7496 (value_next): Remove.
7497 (value_mark, value_free_to_mark, release_value)
7498 (value_release_to_mark): Update.
7499
7500 2018-04-06 Tom Tromey <tom@tromey.com>
7501
7502 * value.h (fetch_subexp_value, value_release_to_mark): Update.
7503 (free_value_chain): Remove.
7504 * value.c (free_value_chain): Remove.
7505 (value_release_to_mark): Return a std::vector.
7506 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
7507 std::vector.
7508 (check_condition): Update.
7509 * eval.c (fetch_subexp_value): Change "val_chain" to a
7510 std::vector.
7511 * breakpoint.c (update_watchpoint): Update.
7512 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
7513
7514 2018-04-06 Tom Tromey <tom@tromey.com>
7515
7516 * value.h (free_all_values): Remove.
7517 * value.c (free_all_values): Remove.
7518
7519 2018-04-06 Tom Tromey <tom@tromey.com>
7520
7521 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
7522 (value_history_chain, value_history_count): Remove.
7523 (value_history): New global.
7524 (record_latest_value, access_value_history, show_values)
7525 (preserve_values): Update.
7526
7527 2018-04-06 Tom Tromey <tom@tromey.com>
7528
7529 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
7530 * varobj.c (varobj_set_display_format, varobj_set_value)
7531 (install_default_visualizer, construct_visualizer)
7532 (install_new_value, ~varobj, varobj_get_value_type)
7533 (my_value_of_variable, varobj_editable_p): Update.
7534 * c-varobj.c (c_describe_child, c_value_of_variable)
7535 (cplus_number_of_children, cplus_describe_child): Update.
7536 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
7537 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
7538 (ada_value_of_variable, ada_value_is_changeable_p): Update.
7539
7540 2018-04-06 Tom Tromey <tom@tromey.com>
7541
7542 * printcmd.c (last_examine_address): Change type to
7543 value_ref_ptr.
7544 (do_examine, x_command): Update.
7545
7546 2018-04-06 Tom Tromey <tom@tromey.com>
7547
7548 * value.c (release_value): Update.
7549 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
7550 (struct bpstats) <val>: Now a value_ref_ptr.
7551 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7552 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7553 (~watchpoint, print_it_watchpoint, watch_command_1)
7554 (invalidate_bp_value_on_memory_change): Update.
7555
7556 2018-04-06 Tom Tromey <tom@tromey.com>
7557
7558 * varobj.c (varobj_clear_saved_item)
7559 (update_dynamic_varobj_children, install_new_value, ~varobj):
7560 Update.
7561 * value.h (value_incref): Move declaration earlier.
7562 (value_decref): Rename from value_free.
7563 (struct value_ref_policy): New.
7564 (value_ref_ptr): New typedef.
7565 (struct value_deleter): Remove.
7566 (gdb_value_up): Remove typedef.
7567 (release_value): Change return type.
7568 (release_value_or_incref): Remove.
7569 * value.c (set_value_parent): Update.
7570 (value_incref): Change return type.
7571 (value_decref): Rename from value_free.
7572 (value_free_to_mark, free_all_values, free_value_chain): Update.
7573 (release_value): Return value_ref_ptr.
7574 (release_value_or_incref): Remove.
7575 (record_latest_value, set_internalvar, clear_internalvar):
7576 Update.
7577 * stack.c (info_frame_command): Don't call value_free.
7578 * python/py-value.c (valpy_dealloc, valpy_new)
7579 (value_to_value_object): Update.
7580 * printcmd.c (do_examine): Update.
7581 * opencl-lang.c (lval_func_free_closure): Update.
7582 * mi/mi-main.c (register_changed_p): Don't call value_free.
7583 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
7584 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
7585 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
7586 value_free.
7587 * guile/scm-value.c (vlscm_free_value_smob)
7588 (vlscm_scm_from_value): Update.
7589 * frame.c (frame_register_unwind, frame_unwind_register_signed)
7590 (frame_unwind_register_unsigned, get_frame_register_bytes)
7591 (put_frame_register_bytes): Don't call value_free.
7592 * findvar.c (address_from_register): Don't call value_free.
7593 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
7594 * dwarf2loc.c (entry_data_value_free_closure)
7595 (value_of_dwarf_reg_entry, free_pieced_value_closure)
7596 (dwarf2_evaluate_loc_desc_full): Update.
7597 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7598 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7599 (~watchpoint, watch_command_1)
7600 (invalidate_bp_value_on_memory_change): Update.
7601 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
7602
7603 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
7604
7605 PR gdb/23022
7606 * warning.m4: Add -Wno-error=deprecated-register.
7607 * configure: Re-generate.
7608
7609 2018-04-05 Tom Tromey <tom@tromey.com>
7610
7611 * linespec.h: Remove include of "vec.h".
7612
7613 2018-04-05 Tom Tromey <tom@tromey.com>
7614
7615 * linespec.c (typep): Remove typedef.
7616 (find_methods, find_superclass_methods): Take a std::vector.
7617 (find_method): Use std::vector.
7618
7619 2018-04-05 Tom Tromey <tom@tromey.com>
7620
7621 * utils.c (compare_strings): Remove.
7622 * utils.h (compare_strings): Remove.
7623 * objc-lang.h (find_imps): Update.
7624 * objc-lang.c (find_methods): Take a std::vector.
7625 (uniquify_strings, find_imps): Likewise.
7626 * linespec.c (find_methods): Take a std::vector.
7627 (decode_objc): Use std::vector.
7628 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
7629 a std::vector.
7630 (find_method, find_function_symbols): Use std::vector.
7631
7632 2018-04-05 Tom Tromey <tom@tromey.com>
7633
7634 * completer.c (completion_tracker::completion_tracker): Remove
7635 cast.
7636 (completion_tracker::discard_completions): Likewise.
7637 * breakpoint.c (ambiguous_names_p): Remove cast.
7638 * ada-lang.c (_initialize_ada_language): Remove cast.
7639 * utils.h (streq): Update.
7640 (streq_hash): Add new declaration.
7641 * utils.c (streq): Return bool.
7642 (streq_hash): New function.
7643
7644 2018-04-05 Tom Tromey <tom@tromey.com>
7645
7646 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
7647 Remove a string copy.
7648
7649 2018-04-05 Tom Tromey <tom@tromey.com>
7650
7651 * linespec.c (filter_results): Use std::vector.
7652 (decode_line_2, decode_line_full): Update.
7653
7654 2018-04-05 Tom Tromey <tom@tromey.com>
7655
7656 * linespec.c (canonical_to_fullform): Return std::string.
7657 (filter_results): Update.
7658 (struct decode_line_2_item): Add constructor.
7659 <fullform, displayform>: Now std::string.
7660 (decode_line_2_compare_items): Now a std::sort comparator.
7661 (decode_line_2): Update.
7662
7663 2018-04-05 Tom Tromey <tom@tromey.com>
7664
7665 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
7666 (unexpected_linespec_error): Update.
7667 (linespec_parse_basic, parse_linespec): Update.
7668
7669 2018-04-05 Tom Tromey <tom@tromey.com>
7670
7671 * linespec.c (linespec_parse_basic): Reindent.
7672
7673 2018-04-05 Tom Tromey <tom@tromey.com>
7674
7675 * minsyms.h (iterate_over_minimal_symbols): Update.
7676 * minsyms.c (iterate_over_minimal_symbols): Take a
7677 gdb::function_view.
7678 * linespec.c (struct collect_minsyms): Remove.
7679 (compare_msyms): Now a std::sort comparator.
7680 (add_minsym): Add parameters.
7681 (search_minsyms_for_name): Update. Use std::vector.
7682
7683 2018-04-03 Tom Tromey <tom@tromey.com>
7684
7685 * mipsread.c (read_alphacoff_dynamic_symtab): Use
7686 gdb::byte_vector.
7687
7688 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
7689
7690 * MAINTAINERS (Write After Approval): Add Weimin Pan.
7691
7692 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
7693
7694 PR gdb/16959
7695 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
7696 printing static type.
7697
7698 2018-04-01 Tom Tromey <tom@tromey.com>
7699
7700 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
7701 (rs6000_xfer_shared_libraries): Update.
7702
7703 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
7704
7705 * common/gdb_vecs.h (char_ptr): Remove.
7706 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
7707
7708 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
7709
7710 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
7711 with std::vector.
7712 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
7713
7714 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
7715
7716 * tracepoint.h (struct uploaded_tp): Initialize fields.
7717 <actions, step_actions, cmd_strings>: Change type to
7718 std::vector<char *>.
7719 * tracepoint.c (get_uploaded_tp): Allocate with new.
7720 (free_uploaded_tps): Free with delete.
7721 (parse_tracepoint_definition): Adjust to std::vector change.
7722 * breakpoint.c (read_uploaded_action): Likewise.
7723 (create_tracepoint_from_upload): Likewise.
7724 * ctf.c (ctf_write_uploaded_tp): Likewise.
7725 (SET_ARRAY_FIELD): Likewise.
7726 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
7727
7728 2018-03-30 Tom Tromey <tom@tromey.com>
7729
7730 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
7731 std::unique_ptr.
7732 (svr4_keep_data_in_core): Update.
7733 (svr4_read_so_list): Update.
7734
7735 2018-03-30 Tom Tromey <tom@tromey.com>
7736
7737 * windows-nat.c (handle_output_debug_string, handle_exception):
7738 Update.
7739 * target.h (target_read_string): Update.
7740 * target.c (target_read_string): Change "string" to
7741 unique_xmalloc_ptr.
7742 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
7743 Update.
7744 * solib-frv.c (frv_current_sos): Update.
7745 * solib-dsbt.c (dsbt_current_sos): Update.
7746 * solib-darwin.c (darwin_current_sos): Update.
7747 * linux-thread-db.c (inferior_has_bug): Update.
7748 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
7749 Update. Remove alloca.
7750 * ada-lang.c (ada_main_name): Update.
7751
7752 2018-03-30 Tom Tromey <tom@tromey.com>
7753
7754 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
7755 (struct dwo_file_deleter): New.
7756 (dwo_file_up): New typedef.
7757 (open_and_init_dwo_file): Use dwo_file_up.
7758 (free_dwo_file_cleanup): Remove.
7759
7760 2018-03-30 Tom Tromey <tom@tromey.com>
7761
7762 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
7763 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
7764
7765 2018-03-30 Tom Tromey <tom@tromey.com>
7766
7767 * dwarf2read.c (class free_cached_comp_units): New class.
7768 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
7769 (free_cached_comp_units): Remove function.
7770
7771 2018-03-30 Tom Tromey <tom@tromey.com>
7772
7773 * utils.h (make_cleanup_unpush_target): Remove.
7774 * inf-ptrace.c (struct target_unpusher): New.
7775 (target_unpush_up) New typedef.
7776 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
7777 target_unpush_up.
7778 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
7779
7780 2018-03-27 Tom Tromey <tom@tromey.com>
7781
7782 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
7783
7784 2018-03-27 Pedro Alves <palves@redhat.com>
7785 Tom Tromey <tom@tromey.com>
7786
7787 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
7788 destructor. Now a class.
7789 (gdb_readline_wrapper_cleanup): Remove function.
7790 (gdb_readline_wrapper): Remove cleanups.
7791
7792 2018-03-27 Tom Tromey <tom@tromey.com>
7793
7794 * typeprint.h (struct type_print_options) <local_typedefs,
7795 global_typedefs>: Remove "struct" keyword.
7796 (class typedef_hash_table): New class.
7797 (recursively_update_typedef_hash, add_template_parameters)
7798 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
7799 (find_typedef_in_hash): Don't declare.
7800 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
7801 (typedef_hash_table::recursively_update): Rename from
7802 recursively_update_typedef_hash. Now a member.
7803 (typedef_hash_table::add_template_parameters): Rename from
7804 add_template_parameters. Now a member.
7805 (typedef_hash_table::typedef_hash_table): Now a constructor;
7806 rename from create_typedef_hash.
7807 (typedef_hash_table::~typedef_hash_table): Now a destructor;
7808 rename from free_typedef_hash.
7809 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
7810 (do_free_global_table): Remove.
7811 (typedef_hash_table::typedef_hash_table): New constructor; renamed
7812 from copy_type_recursive.
7813 (create_global_typedef_table): Remove.
7814 (typedef_hash_table::find_global_typedef): Now a member of
7815 typedef_hash_table.
7816 (typedef_hash_table::find_typedef): Rename from
7817 find_typedef_in_hash; now a member.
7818 (whatis_exp): Update.
7819 * extension.h (struct ext_lang_type_printers): Add constructor and
7820 destructor.
7821 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
7822 declare.
7823 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
7824 Now a constructor; rename from start_ext_lang_type_printers.
7825 (ext_lang_type_printers): Now a destructor; rename from
7826 free_ext_lang_type_printers.
7827 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
7828 Update.
7829 (c_type_print_base_struct_union): Update. Remove cleanups.
7830
7831 2018-03-27 Tom Tromey <tom@tromey.com>
7832
7833 * dwarf-index-write.c: Include <cmath>.
7834
7835 2018-03-27 Joel Brobecker <brobecker@adacore.com>
7836
7837 * NEWS: Add entry describing new "set|show varsize-limit" command.
7838 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
7839 command.
7840 * printcmd.c (_initialize_printcmd): Add "set var" alias of
7841 "set variable".
7842
7843 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
7844
7845 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
7846 dwarf-index-write.c
7847 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
7848 * dwarf-index-common.c: New file.
7849 * dwarf-index-common.h: New file.
7850 * dwarf-index-write.c: New file.
7851 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
7852 (struct dwarf2_section_info): Move from here.
7853 (dwarf2_section_info_def): Likewise.
7854 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
7855 (offset_type): Likewise.
7856 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
7857 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
7858 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
7859 (byte_swap): Likewise.
7860 (MAYBE_SWAP): Likewise.
7861 (dwarf2_per_cu_ptr): Likewise.
7862 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
7863 (struct tu_stats): Likewise.
7864 (struct dwarf2_per_objfile): Likewise.
7865 (struct dwarf2_per_cu_data): Likewise.
7866 (struct signatured_type): Likewise.
7867 (sig_type_ptr): Likewise.
7868 (DEF_VEC_P (sig_type_ptr)): Likewise.
7869 (INDEX4_SUFFIX): Likewise.
7870 (INDEX5_SUFFIX): Likewise.
7871 (DEBUG_STR_SUFFIX): Likewise.
7872 (dwarf2_read_section): Make non-static.
7873 (mapped_index_string_hash): Move from here.
7874 (dwarf5_djb_hash): Likewise.
7875 (file_write): Likewise.
7876 (class data_buf): Likewise.
7877 (struct symtab_index_entry): Likewise.
7878 (struct mapped_symtab): Likewise.
7879 (find_slot): Likewise.
7880 (hash_expand): Likewise.
7881 (add_index_entry): Likewise.
7882 (uniquify_cu_indices): Likewise.
7883 (class c_str_view): Likewise.
7884 (class c_str_view_hasher): Likewise.
7885 (class vector_hasher): Likewise.
7886 (write_hash_table): Likewise.
7887 (psym_index_map): Likewise.
7888 (struct addrmap_index_data): Likewise.
7889 (add_address_entry): Likewise.
7890 (add_address_entry_worker): Likewise.
7891 (write_address_map): Likewise.
7892 (symbol_kind): Likewise.
7893 (write_psymbols): Likewise.
7894 (struct signatured_type_index_data): Likewise.
7895 (write_one_signatured_type): Likewise.
7896 (recursively_count_psymbols): Likewise.
7897 (recursively_write_psymbols): Likewise.
7898 (class debug_names): Likewise.
7899 (check_dwarf64_offsets): Likewise.
7900 (psyms_seen_size): Likewise.
7901 (write_gdbindex): Likewise.
7902 (write_debug_names): Likewise.
7903 (assert_file_size): Likewise.
7904 (write_psymtabs_to_index): Likewise.
7905 (save_gdb_index_command): Likewise.
7906 (_initialize_dwarf2_read): Don't register the "save gdb-index"
7907 command.
7908 * dwarf2read.h: New file.
7909
7910 2018-03-27 Joel Brobecker <brobecker@adacore.com>
7911
7912 PR gdb/22670
7913 * dwarf2read.c (dwarf2_physname): Do not return the demangled
7914 symbol name if the CU's language stores symbol names in linkage
7915 format.
7916 * language.h (struct language_defn)
7917 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
7918 all instances of this struct.
7919
7920 2018-03-26 Tom Tromey <tom@tromey.com>
7921
7922 * stack.c (backtrace_command_1): Remove verbose code.
7923
7924 2018-03-26 Tom Tromey <tom@tromey.com>
7925
7926 * python/py-framefilter.c (py_print_type): Don't catch
7927 exceptions. Return void.
7928 (py_print_value): Likewise.
7929 (py_print_single_arg): Likewise.
7930 (enumerate_args): Don't catch exceptions.
7931 (py_print_args): Likewise.
7932 (py_print_frame): Likewise.
7933 (gdbpy_apply_frame_filter): Catch exceptions here.
7934
7935 2018-03-26 Tom Tromey <tom@tromey.com>
7936
7937 * stack.c (_initialize_stack): Remove trailing newlines from help
7938 text. Add "Usage" line to "backtrace" help.
7939
7940 2018-03-26 Tom Tromey <tom@tromey.com>
7941
7942 PR python/16486:
7943 * python/py-framefilter.c (py_print_args): Call wrap_hint.
7944
7945 2018-03-26 Tom Tromey <tom@tromey.com>
7946
7947 * python/py-framefilter.c (py_print_single_arg): Return
7948 EXT_LANG_BT_ERROR from catch.
7949
7950 2018-03-26 Tom Tromey <tom@tromey.com>
7951
7952 PR backtrace/15584:
7953 * stack.c (backtrace_command_1): Move some code into no-filters
7954 "if".
7955
7956 2018-03-26 Tom Tromey <tom@tromey.com>
7957
7958 * python/py-framefilter.c (throw_quit_or_print_exception): New
7959 function.
7960 (gdbpy_apply_frame_filter): Use it.
7961
7962 2018-03-26 Tom Tromey <tom@tromey.com>
7963
7964 PR cli/17716:
7965 * python/py-framefilter.c (py_print_type, py_print_value)
7966 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
7967 RETURN_MASK_ERROR.
7968
7969 2018-03-26 Tom Tromey <tom@tromey.com>
7970
7971 * python/py-framefilter.c (enumerate_args): Use
7972 gdb::unique_xmalloc_ptr.
7973
7974 2018-03-26 Tom Tromey <tom@tromey.com>
7975
7976 * python/py-framefilter.c (py_print_frame): Return
7977 EXT_LANG_BT_OK.
7978 (gdbpy_apply_frame_filter): Update comment.
7979 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
7980 Remove.
7981 <EXT_LANG_BT_NO_FILTERS>: Change value.
7982
7983 2018-03-26 Tom Tromey <tom@tromey.com>
7984
7985 PR backtrace/15582:
7986 * stack.c (backtrace_command): Parse "hide" argument.
7987 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
7988 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
7989 constant.
7990
7991 2018-03-26 Tom Tromey <tom@tromey.com>
7992
7993 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
7994 add "flags".
7995 (backtrace_command): Remove "fulltrace", add "flags".
7996
7997 2018-03-26 Tom Tromey <tom@tromey.com>
7998
7999 * stack.c (backtrace_command): Rewrite command line parsing.
8000
8001 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
8002
8003 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
8004
8005 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
8006
8007 * filename-seen-cache.h: Add include guard.
8008
8009 2018-03-26 Keith Seitz <keiths@redhat.com>
8010
8011 * symfile.c (place_section): Remove "struct" from section_addr_info
8012 in comment.
8013 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
8014 "struct" keyword from section_addr_info.
8015
8016 2018-03-26 Alan Hayward <alan.hayward@arm.com>
8017
8018 * regformats/regdef.h (reg): Add constructors.
8019
8020 2018-03-25 Pedro Alves <palves@redhat.com>
8021
8022 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
8023 if then/else bodies in var_func_name extraction.
8024
8025 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
8026
8027 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
8028 lookup_minimal_symbol() to find symbol entry.
8029 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
8030
8031 2018-03-23 Keith Seitz <keiths@redhat.com>
8032
8033 PR c++/22968
8034 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
8035 nested type definitions for C++, too.
8036
8037 2018-03-23 Tom Tromey <tom@tromey.com>
8038
8039 * machoread.c (struct oso_el): Add a constructor. Don't define as
8040 a typedef.
8041 (macho_register_oso): Remove.
8042 (macho_symtab_read): Take a std::vector.
8043 (oso_el_compare_name): Now a std::sort comparator.
8044 (macho_symfile_read_all_oso): Take a std::vector.
8045 (macho_symfile_read): Use std::vector. Remove cleanups.
8046
8047 2018-03-22 Tom Tromey <tom@tromey.com>
8048
8049 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
8050 (record_full_goto_bookmark): Use std::string.
8051
8052 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8053
8054 PR tdep/18295
8055 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
8056 a single mask.
8057
8058 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8059
8060 * rs6000-tdep.c (store_insn_p): New function.
8061 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
8062 and cr_reg to their unshifted values. Use store_insn_p to
8063 match LR saves using either R1 or fdata->alloca_reg. Use
8064 store_insn_p to match CR saves. Set alloca_reg_offset
8065 when alloca_reg and framep are set. Remove lr_reg shift
8066 when assigning to fdata->lr_register.
8067
8068 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
8069
8070 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
8071 command line args instead of emitting a warning.
8072
8073 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8074
8075 * tracepoint.h (struct static_tracepoint_marker): Initialize
8076 fields, define default constructor, move constructor and move
8077 assignment, disable the rest.
8078 <str_id, extra>: Make std::string.
8079 (release_static_tracepoint_marker): Remove.
8080 (free_current_marker): Remove.
8081 * tracepoint.c (free_current_marker): Remove.
8082 (parse_static_tracepoint_marker_definition): Adjust to
8083 std::string, use new hex2str overload.
8084 (release_static_tracepoint_marker): Remove.
8085 (print_one_static_tracepoint_marker): Get marker by reference
8086 and adjust to std::string.
8087 (info_static_tracepoint_markers_command): Adjust to std::vector
8088 changes
8089 * target.h (static_tracepoint_marker_p): Remove typedef.
8090 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
8091 (struct target_ops) <to_static_tracepoint_marker_at>: Return
8092 bool.
8093 <to_static_tracepoint_markers_by_strid>: Return std::vector.
8094 * target-debug.h
8095 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
8096 (target_debug_print_std_vector_static_tracepoint_marker): New.
8097 (target_debug_print_struct_static_tracepoint_marker_p): Rename
8098 to...
8099 (target_debug_print_static_tracepoint_marker_p): ... this.
8100 * target-delegates.c: Re-generate.
8101 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
8102 Make std::string.
8103 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
8104 (decode_static_tracepoint_spec): Adjust to std::vector.
8105 (tracepoint_print_one_detail): Adjust to std::string.
8106 (strace_marker_decode_location): Adjust to std::string.
8107 (update_static_tracepoint): Adjust to std::string, remove call
8108 to release_static_tracepoint_marker.
8109 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
8110 Adjust to std::vector.
8111 * remote.c (remote_static_tracepoint_marker_at): Return bool.
8112 (remote_static_tracepoint_markers_by_strid): Adjust to
8113 std::vector.
8114 * common/rsp-low.h (hex2str): New overload with explicit count
8115 of bytes.
8116 * common/rsp-low.c (hex2str): New overload with explicit count
8117 of bytes.
8118 * unittests/rsp-low-selftests.c (test_hex2str): New function.
8119 (_initialize_rsp_low_selftests): Add test_hex2str test.
8120 * unittests/tracepoint-selftests.c
8121 (test_parse_static_tracepoint_marker_definition): Adjust to
8122 std::string.
8123
8124 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8125
8126 * tracepoint.c (parse_static_tracepoint_marker_definition):
8127 Consider case where the definition is followed by more
8128 definitions.
8129 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8130 tracepoint-selftests.c.
8131 * unittests/tracepoint-selftests.c: New.
8132
8133 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8134
8135 * MAINTAINERS (Write After Approval): Add Pedro Franco de
8136 Carvalho.
8137
8138 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
8139
8140 * symtab.c (find_pc_sect_line): fixed indentation.
8141
8142 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
8143
8144 * symtab.c (find_pc_sect_line): now uses binary search.
8145
8146 2018-03-19 Tom Tromey <tom@tromey.com>
8147
8148 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
8149 "IDENT" production.
8150
8151 2018-03-19 Pedro Alves <palves@redhat.com>
8152 Tom Tromey <tom@tromey.com>
8153
8154 * unittests/observable-selftests.c: New file.
8155 * common/observable.h: New file.
8156 * observable.h: New file.
8157 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
8158 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
8159 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
8160 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
8161 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
8162 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
8163 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
8164 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
8165 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
8166 python/py-breakpoint.c, python/py-finishbreakpoint.c,
8167 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
8168 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
8169 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
8170 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
8171 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
8172 tui/tui-interp.c, valops.c: Update all users.
8173 * tui/tui-hooks.c (tui_bp_created_observer)
8174 (tui_bp_deleted_observer, tui_bp_modified_observer)
8175 (tui_inferior_exit_observer, tui_before_prompt_observer)
8176 (tui_normal_stop_observer, tui_register_changed_observer):
8177 Remove.
8178 (tui_observers_token): New global.
8179 (attach_or_detach, tui_attach_detach_observers): New functions.
8180 (tui_install_hooks, tui_remove_hooks): Use
8181 tui_attach_detach_observers.
8182 * record-btrace.c (record_btrace_thread_observer): Remove.
8183 (record_btrace_thread_observer_token): New global.
8184 * observer.sh: Remove.
8185 * observer.c: Rename to observable.c.
8186 * observable.c (namespace gdb_observers): Define new objects.
8187 (observer_debug): Move into gdb_observers namespace.
8188 (struct observer, struct observer_list, xalloc_observer_list_node)
8189 (xfree_observer_list_node, generic_observer_attach)
8190 (generic_observer_detach, generic_observer_notify): Remove.
8191 (_initialize_observer): Update.
8192 Don't include observer.inc.
8193 * Makefile.in (generated_files): Remove observer.h, observer.inc.
8194 (clean mostlyclean): Likewise.
8195 (observer.h, observer.inc): Remove targets.
8196 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
8197 (COMMON_SFILES): Use observable.c, not observer.c.
8198 * .gitignore: Remove observer.h.
8199
8200 2018-03-18 Tom Tromey <tom@tromey.com>
8201
8202 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
8203 gdb::def_vector.
8204 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
8205
8206 2018-03-17 Tom Tromey <tom@tromey.com>
8207
8208 * auto-load.c (auto_load_objfile_script_1): Use std::string.
8209
8210 2018-03-17 Tom Tromey <tom@tromey.com>
8211
8212 * target.c (class scoped_target_fd): New.
8213 (target_fileio_close_cleanup): Remove.
8214 (target_fileio_read_alloc_1): Use scoped_target_fd.
8215
8216 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
8217
8218 * silent-rules.mk: New.
8219 * Makefile.in: Include silent-rules.mk
8220 (srcdir, VPATH, top_srcdir): Move up.
8221 (COMPILE): Add ECHO_CXX.
8222 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
8223 (init.c): Add ECHO_INIT_C.
8224 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
8225 (version.c): Add ECHO_GEN.
8226 (printcmd.o): Add ECHO_CXX.
8227 (target-float.o): Add ECHO_CXX.
8228 (ada-exp.o): Add ECHO_CXX.
8229 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
8230 (insight$(EXEEXT)): Add ECHO_CXXLD.
8231 * gnulib/configure.ac: Add AM_SILENT_RULES.
8232 * gnulib/aclocal.m4: Re-generate.
8233 * gnulib/configure: Re-generate.
8234 * gnulib/import/Makefile.in: Re-generate.
8235
8236 2018-03-16 Tom Tromey <tom@tromey.com>
8237
8238 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
8239 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
8240 * utils.c (do_free_section_addr_info)
8241 (make_cleanup_free_section_addr_info): Remove.
8242 * symfile.h (struct other_sections): Add constructor.
8243 (struct section_addr_info): Remove.
8244 (section_addr_info): New typedef.
8245 (struct sym_fns) <sym_offsets>: Change type of parameter.
8246 (build_section_addr_info_from_objfile)
8247 (relative_addr_info_to_section_offsets, addr_info_make_relative)
8248 (default_symfile_offsets, symbol_file_add)
8249 (symbol_file_add_from_bfd)
8250 (build_section_addr_info_from_section_table): Update.
8251 (alloc_section_addr_info, free_section_addr_info): Don't declare.
8252 * symfile.c (alloc_section_addr_info): Remove.
8253 (build_section_addr_info_from_section_table): Change return type.
8254 Update.
8255 (build_section_addr_info_from_bfd)
8256 (build_section_addr_info_from_objfile): Likewise.
8257 (free_section_addr_info): Remove.
8258 (relative_addr_info_to_section_offsets): Change type of "addrs".
8259 (addrs_section_compar): Now a std::sort comparator.
8260 (addrs_section_sort): Change return type.
8261 (addr_info_make_relative): Change type of "addrs". Update.
8262 (default_symfile_offsets, syms_from_objfile_1)
8263 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
8264 (symbol_file_add_separate): Update.
8265 (symbol_file_add): Change type of "addrs". Update.
8266 (add_symbol_file_command): Update. Remove cleanups.
8267 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
8268 cleanups.
8269 * symfile-debug.c (debug_sym_offsets): Change type of "info".
8270 * solib.c (solib_read_symbols): Update.
8271 * objfiles.c (objfile_relocate): Update. Remove cleanups.
8272 * machoread.c (macho_symfile_offsets): Update.
8273 * jit.c (jit_bfd_try_read_symtab): Update.
8274
8275 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
8276
8277 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8278 unittests/utils-selftests.c.
8279 * unittests/utils-selftests.c: New file.
8280
8281 2018-03-14 Tom Tromey <tom@tromey.com>
8282
8283 PR cli/14977:
8284 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
8285 for NULL.
8286
8287 2018-03-14 Tom Tromey <tom@tromey.com>
8288
8289 PR cli/19918:
8290 * printcmd.c (printf_pointer): Allow "-" in format.
8291
8292 2018-03-14 Tom Tromey <tom@tromey.com>
8293
8294 * printcmd.c (_initialize_printcmd): Add usage to printf.
8295
8296 2018-03-14 Yao Qi <qiyao@sourceware.org>
8297
8298 * MAINTAINERS: Update my email address.
8299
8300 2018-03-13 Tom Tromey <tom@tromey.com>
8301
8302 * machoread.c (macho_check_dsym): Change filenamep to a
8303 std::string*.
8304 (macho_symfile_read): Update.
8305 * symfile.c (load_command): Use std::string.
8306
8307 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
8308
8309 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
8310 to error message string.
8311 (riscv_register_name): Use xsnprintf instead of sprintf.
8312 (riscv_insn::fetch_instruction): Use gdb_assert instead of
8313 internal_error.
8314 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
8315 error.
8316 (riscv_push_dummy_call): Likewise.
8317
8318 2018-03-12 Tom Tromey <tom@tromey.com>
8319
8320 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
8321 Use gdb::byte_vector.
8322 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
8323
8324 2018-03-12 Yao Qi <yao.qi@linaro.org>
8325
8326 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
8327 parameter type to readable_regcache.
8328 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
8329 the declaration.
8330
8331 2018-03-11 Tom Tromey <tom@tromey.com>
8332
8333 * dwarf2read.c (struct nextfield): Add initializers.
8334 (struct nextfnfield): Remove.
8335 (struct fnfieldlist): Add initializers. Remove "length" and
8336 "head", use std::vector.
8337 (struct decl_field_list): Remove.
8338 (struct field_info): Add initializers.
8339 <fields, baseclasses>: Now std::vector.
8340 <nbaseclasses, nfnfields, typedef_field_list_count,
8341 nested_types_list_count>: Remove.
8342 (dwarf2_add_field, dwarf2_add_type_defn)
8343 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
8344 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
8345 (process_structure_scope): Update.
8346
8347 2018-03-11 Tom Tromey <tom@tromey.com>
8348
8349 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
8350 for use by std::sort.
8351 (build_type_psymtabs_1): Use std::vector.
8352
8353 2018-03-09 Eli Zaretskii <eliz@gnu.org>
8354
8355 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
8356 and LIBMPFR in the printed configuration.
8357
8358 2018-03-08 Tom Tromey <tom@tromey.com>
8359
8360 * source.c (get_filename_and_charpos): Use scoped_fd.
8361 * nto-procfs.c (procfs_open_1): Use scoped_fd.
8362 (procfs_pidlist): Likewise.
8363 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
8364 (iterate_over_mappings): Likewise.
8365
8366 2018-03-08 Tom Tromey <tom@tromey.com>
8367
8368 * infcall.c (struct call_return_meta_info)
8369 <stack_temporaries_enabled>: Remove.
8370 (get_call_return_value, call_function_by_hand_dummy): Update.
8371 * thread.c (disable_thread_stack_temporaries): Remove.
8372 (enable_thread_stack_temporaries): Remove.
8373 (thread_stack_temporaries_enabled_p): Return bool.
8374 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
8375 (get_last_thread_stack_temporary): Update.
8376 * eval.c (evaluate_subexp): Update.
8377 * gdbthread.h (class enable_thread_stack_temporaries): Now a
8378 class, not a function.
8379 (value_ptr, value_vec): Remove typedefs.
8380 (class thread_info) <stack_temporaries_enabled>: Now bool.
8381 <stack_temporaries>: Now a std::vector.
8382 (thread_stack_temporaries_enabled_p)
8383 (value_in_thread_stack_temporaries): Return bool.
8384
8385 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
8386
8387 * remote.c (putpkt_binary): Fix omitted bytes reporting.
8388 (getpkt_or_notif_sane_1): Likewise.
8389
8390 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8391
8392 * build-id.c (build_id_to_debug_bfd): Use std::string.
8393
8394 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8395
8396 * build-id.c (find_separate_debug_file_by_buildid): Return
8397 std::string.
8398 * build-id.h (find_separate_debug_file_by_buildid): Return
8399 std::string.
8400 * coffread.c (coff_symfile_read): Adjust to std::string.
8401 * elfread.c (elf_symfile_read): Adjust to std::string.
8402 * symfile.c (separate_debug_file_exists): Change parameter to
8403 std::string.
8404 (find_separate_debug_file): Return std::string.
8405 (find_separate_debug_file_by_debuglink): Return std::string.
8406 * symfile.h (find_separate_debug_file_by_debuglink): Return
8407 std::string.
8408
8409 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8410
8411 * common/xml-utils.c (xml_escape_text): Move code to...
8412 (xml_escape_text_append): ... this new function.
8413 * common/xml-utils.h (xml_escape_text_append): New declaration.
8414 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
8415 New function.
8416 (_initialize_xml_utils): register test_xml_escape_text_append as
8417 a selftest.
8418
8419 2018-03-07 Alan Hayward <alan.hayward@arm.com>
8420
8421 * defs.h: Remove MAX_REGISTER_SIZE.
8422 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
8423 asserts.
8424 * python/py-unwind.c (pyuw_sniffer): Likewise.
8425
8426 2018-03-07 Tom Tromey <tom@tromey.com>
8427
8428 * linux-tdep.c (linux_info_proc): Update.
8429 * target.h (struct target_ops) <to_fileio_readlink>: Return
8430 optional<string>.
8431 (target_fileio_readlink): Return optional<string>.
8432 * remote.c (remote_hostio_readlink): Return optional<string>.
8433 * inf-child.c (inf_child_fileio_readlink): Return
8434 optional<string>.
8435 * target.c (target_fileio_readlink): Return optional<string>.
8436
8437 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
8438
8439 * regcache.c (cooked_read_test): Add riscv to the list of
8440 architectures that have a save_reggroup.
8441
8442 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
8443
8444 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
8445 value is not a dynamic class object.
8446
8447 2018-03-06 Tom Tromey <tom@tromey.com>
8448
8449 * rust-exp.y: Formatting fixes.
8450
8451 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8452
8453 * riscv-tdep.c (riscv_register_name): Remove target description
8454 support.
8455 (riscv_gdbarch_init): Remove target description check.
8456
8457 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8458
8459 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
8460 comment.
8461 * riscv-tdep.h: Likewise.
8462
8463 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8464
8465 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
8466 (riscv_pseudo_register_write): Delete.
8467 (riscv_gdbarch_init): Remove all use of pseudo registers.
8468
8469 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8470
8471 * record-btrace.c (btrace_print_lines): Replace cleanup
8472 parameter with RAII equivalents.
8473 (btrace_insn_history): Replace cleanup with RAII equivalents.
8474 * ui-out.h (make_cleanup_ui_out_list_begin_end,
8475 make_cleanup_ui_out_tuple_begin_end): Remove.
8476 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
8477 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
8478 make_cleanup_ui_out_list_begin_end): Remove.
8479
8480 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8481
8482 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
8483 parameter types to std::vector. Use bool.
8484 (record_btrace_wait): Replace VEC(tp_t) with
8485 std::vector<thread_info *>.
8486 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
8487
8488 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8489
8490 * record-btrace.c (record_btrace_disable_callback): Remove.
8491 (struct scoped_btrace_disable): New.
8492 (record_btrace_open): Use scoped_btrace_disable.
8493
8494 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8495
8496 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
8497 reading values from registers.
8498
8499 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8500
8501 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
8502 where appropriate.
8503
8504 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8505
8506 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
8507 change parameter type. Use GDB's print functions, and use
8508 core_addr_to_string where appropriate.
8509 (riscv_push_dummy_call): Use core_addr_to_string where
8510 appropriate, update call to riscv_print_arg_location, and reindent
8511 a few lines.
8512 (riscv_return_value): Update call to riscv_print_arg_location.
8513
8514 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8515 Tim Newsome <tim@sifive.com>
8516 Albert Ou <a0u@eecs.berkeley.edu>
8517 Darius Rad <darius@bluespec.com>
8518
8519 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
8520 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
8521 (ALLDEPFILES): Add riscv-tdep.c
8522 * configure.tgt: Add riscv support.
8523 * riscv-tdep.c: New file.
8524 * riscv-tdep.h: New file.
8525 * NEWS: Mention new target.
8526 * MAINTAINERS: Add entry for riscv.
8527
8528 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8529
8530 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
8531 fields within aggregates.
8532
8533 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
8534
8535 * record-btrace.c (btrace_print_lines): Change type of flags to
8536 gdb_disassembly_flags.
8537
8538 2018-03-04 John Baldwin <jhb@FreeBSD.org>
8539
8540 * fbsd-nat.c: Include "inf-ptrace.h".
8541 (USE_SIGTRAP_SIGINFO): Conditionally define.
8542 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
8543 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
8544 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
8545 function.
8546 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
8547 Likewise.
8548 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
8549 Likewise.
8550 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
8551 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
8552 "supports_stopped_by_hw_breakpoint" target methods.
8553
8554 2018-03-04 John Baldwin <jhb@FreeBSD.org>
8555
8556 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
8557 * fbsd-nat.c (debug_fbsd_nat): New variable.
8558 (show_fbsd_nat_debug): New function.
8559 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
8560 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
8561
8562 2018-03-04 John Baldwin <jhb@FreeBSD.org>
8563
8564 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
8565 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
8566 prototype.
8567 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
8568 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
8569 method.
8570
8571 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8572
8573 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
8574 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
8575
8576 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8577
8578 * charset.c (struct charset_vector): New.
8579 (charsets): Change type to charset_vector.
8580 (find_charset_names): Adjust.
8581 (add_one): Adjust.
8582 (_initialize_charset): Adjust.
8583
8584 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8585
8586 * progspace.h (struct program_space) <deleted_solibs>: Change
8587 type to std::vector<std::string>.
8588 * progspace.c (clear_program_space_solib_cache): Adjust.
8589 * breakpoint.c (print_solib_event): Adjust.
8590 (check_status_catch_solib): Adjust.
8591 * solib.c (update_solib_list): Adjust.
8592 * ui-out.h (class ui_out) <field_string>: New overload.
8593 * ui-out.c (ui_out::field_string): New overload.
8594
8595 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8596
8597 * progspace.h (struct program_space): Add constructor and
8598 destructor, initialize fields.
8599 (add_program_space): Remove.
8600 * progspace.c (add_program_space): Rename to...
8601 (program_space::program_space): ... this.
8602 (release_program_space): Rename to...
8603 (program_space::~program_space): ... this.
8604 (delete_program_space): Use delete to delete program_space.
8605 (initialize_progspace): Use new to allocate program_space.
8606 * inferior.c (add_inferior_with_spaces): Likewise.
8607 (clone_inferior_command): Likewise.
8608 * infrun.c (follow_fork_inferior): Likewise.
8609 (handle_vfork_child_exec_or_exit): Likewise.
8610
8611 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8612
8613 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
8614 (delim_string_to_char_ptr_vec): Return std::vector of
8615 gdb::unique_xmalloc_ptr.
8616 (dirnames_to_char_ptr_vec_append): Take std::vector of
8617 gdb::unique_xmalloc_ptr.
8618 (dirnames_to_char_ptr_vec): Return std::vector of
8619 gdb::unique_xmalloc_ptr.
8620 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
8621 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
8622 (delim_string_to_char_ptr_vec): Return an std::vector of
8623 gdb::unique_xmalloc_ptr, adjust the code.
8624 (dirnames_to_char_ptr_vec_append): Take an std::vector of
8625 gdb::unique_xmalloc_ptr, adjust the code.
8626 (dirnames_to_char_ptr_vec): Return an std::vector of
8627 gdb::unique_xmalloc_ptr, adjust the code.
8628 * auto-load.c (auto_load_safe_path_vec): Change type to
8629 std::vector of gdb::unique_xmalloc_ptr.
8630 (auto_load_expand_dir_vars): Return an std::vector of
8631 gdb::unique_xmalloc_ptr, adjust the code.
8632 (auto_load_safe_path_vec_update): Adjust.
8633 (filename_is_in_auto_load_safe_path_vec): Adjust.
8634 (auto_load_objfile_script_1): Adjust.
8635 * build-id.c (build_id_to_debug_bfd): Adjust.
8636 * linux-thread-db.c (thread_db_load_search): Adjust.
8637 * source.c (add_path): Adjust.
8638 (openp): Adjust.
8639 * symfile.c (find_separate_debug_file): Adjust.
8640 * utils.c (do_free_char_ptr_vec): Remove.
8641 (make_cleanup_free_char_ptr_vec): Remove.
8642
8643 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
8644
8645 PR gdb/22907
8646 * common/pathstuff.c: Conditionally include "<windows.h>".
8647
8648 2018-03-01 Georg Sauthoff <mail@georg.so>
8649
8650 PR gdb/22888
8651 * gcore.in: Quote variables and switch interpreter to bash.
8652
8653 2018-03-01 Tom Tromey <tom@tromey.com>
8654
8655 * dwarf2read.c (alloc_discriminant_info): Fix default_index
8656 assertion. Add assertion for discriminant_index.
8657 (quirk_rust_enum): Use correct base type name in univariant case.
8658
8659 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
8660
8661 * record.c (get_call_history_modifiers): Return a
8662 record_print_flags.
8663 (cmd_record_call_history): Adjust.
8664 * record-btrace.c (record_btrace_call_history): Adjust.
8665 (record_btrace_call_history_range): Adjust.
8666 (record_btrace_call_history_from): Adjust.
8667 * target-debug.h (target_debug_print_record_print_flags): New.
8668 * target-delegates.c: Re-generate.
8669 * target.c (target_call_history): Change flags type.
8670 (target_call_history_from): Likewise.
8671 (target_call_history_range): Likewise.
8672 * target.h (struct target_ops) <target_call_history>: Likewise.
8673 (target_call_history_from): Likewise.
8674 (target_call_history_range): Likewise.
8675
8676 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
8677 Simon Marchi <simon.marchi@polymtl.ca>
8678
8679 * common/common-utils.c: Include "sys/stat.h".
8680 (is_regular_file): Move here from "source.c"; change return
8681 type to "bool".
8682 * common/common-utils.h (is_regular_file): New prototype.
8683 * common/pathstuff.c (contains_dir_separator): New function.
8684 * common/pathstuff.h (contains_dir_separator): New prototype.
8685 * source.c: Don't include "sys/stat.h".
8686 (is_regular_file): Move to "common/common-utils.c".
8687
8688 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
8689
8690 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
8691 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
8692 * auto-load.c: Include "common/pathstuff.h".
8693 * common/common-def.h (current_directory): Move here.
8694 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
8695 function.
8696 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
8697 prototype.
8698 * common/pathstuff.c: New file.
8699 * common/pathstuff.h: New file.
8700 * compile/compile.c: Include "common/pathstuff.h".
8701 * defs.h (current_directory): Move to "common/common-defs.h".
8702 * dwarf2read.c: Include "common/pathstuff.h".
8703 * exec.c: Likewise.
8704 * guile/scm-safe-call.c: Likewise.
8705 * linux-thread-db.c: Likewise.
8706 * main.c: Likewise.
8707 * nto-tdep.c: Likewise.
8708 * objfiles.c: Likewise.
8709 * source.c: Likewise.
8710 * symtab.c: Likewise.
8711 * utils.c: Include "common/pathstuff.h".
8712 (gdb_realpath): Move to "common/pathstuff.c".
8713 (gdb_realpath_keepfile): Likewise.
8714 (gdb_abspath): Likewise.
8715 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
8716 (gdb_realpath_keepfile): Likewise.
8717 (gdb_abspath): Likewise.
8718
8719 2018-02-28 John Baldwin <jhb@FreeBSD.org>
8720
8721 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
8722 wildcard process pid for super_resume for kernels with a
8723 specific bug.
8724
8725 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
8726
8727 * compile/compile.c (get_args): Add additional comments
8728 explaining function.
8729
8730 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
8731 Tom Tromey <tom@tromey.com>
8732
8733 * target.h (memory_write_request_s): Remove typedef. Don't define
8734 VEC.
8735 (target_write_memory_blocks): Change argument to std::vector.
8736 (struct memory_write_request): Add constructor.
8737 * target-memory.c (compare_block_starting_address): Return bool.
8738 Change argument types.
8739 (claim_memory): Change arguments to use std::vector.
8740 (split_regular_and_flash_blocks, blocks_to_erase)
8741 (compute_garbled_blocks): Likewise.
8742 (cleanup_request_data, cleanup_write_requests_vector): Remove.
8743 (target_write_memory_blocks): Change argument to std::vector.
8744 * symfile.c (struct load_section_data): Add constructor and
8745 destructor. Use std::vector for "requests".
8746 (struct load_progress_data): Add initializers.
8747 (load_section_callback): Update. Use "new".
8748 (clear_memory_write_data): Remove.
8749 (generic_load): Update.
8750
8751 2018-02-27 Alan Hayward <alan.hayward@arm.com>
8752
8753 * arch/aarch64.h: Use common/tdesc.h.
8754
8755 2018-02-26 Maciej W. Rozycki <macro@mips.com>
8756
8757 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
8758 architecture with a 64-bit ABI.
8759
8760 2018-02-26 Maciej W. Rozycki <macro@mips.com>
8761
8762 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
8763 ahead of target description loading.
8764
8765 2018-02-26 Tom Tromey <tom@tromey.com>
8766
8767 * stack.c (backtrace_command_1): Update.
8768 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
8769 of "flags".
8770 * python/py-framefilter.c (py_print_frame)
8771 (gdbpy_apply_frame_filter): Change type of "flags".
8772 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
8773 of "flags".
8774 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
8775 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
8776 * extension.h (enum frame_filter_flag): Rename from
8777 frame_filter_flags.
8778 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
8779 (apply_ext_lang_frame_filter): Change type of "flags".
8780 * extension.c (apply_ext_lang_frame_filter): Change type of
8781 "flags".
8782 * extension-priv.h (struct extension_language_ops)
8783 <apply_frame_filter>: Change type of "flags".
8784
8785 2018-02-26 Tom Tromey <tom@tromey.com>
8786
8787 PR python/16497:
8788 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
8789 off-by-one in py_end computation.
8790 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
8791 PRINT_MORE_FRAMES.
8792 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
8793 constant.
8794
8795 2018-02-26 Tom Tromey <tom@tromey.com>
8796
8797 * dwarf2read.c (struct variant_field): New.
8798 (struct nextfield) <variant>: New field.
8799 (dwarf2_add_field): Handle DW_TAG_variant_part.
8800 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
8801 discriminated union.
8802 (read_structure_type): Handle DW_TAG_variant_part.
8803 (handle_struct_member_die): New function, extracted from
8804 process_structure_scope. Handle DW_TAG_variant.
8805 (process_structure_scope): Handle discriminated unions. Call
8806 handle_struct_member_die.
8807
8808 2018-02-26 Tom Tromey <tom@tromey.com>
8809
8810 * rust-lang.h (rust_last_path_segment): Declare.
8811 * rust-lang.c (rust_last_path_segment): Now public. Change
8812 contract.
8813 (struct disr_info): Remove.
8814 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
8815 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
8816 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
8817 (rust_enum_p, rust_enum_variant): New function.
8818 (rust_underscore_fields): Remove "offset" parameter.
8819 (rust_print_enum): New function.
8820 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
8821 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
8822 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
8823 enums.
8824 (rust_internal_print_type): New function, from rust_print_type.
8825 Remove enum code.
8826 (rust_print_type): Call rust_internal_print_type.
8827 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
8828 Update enum handling.
8829 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
8830 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
8831 (rust_union_quirks): New functions.
8832 (process_full_comp_unit, process_full_type_unit): Call
8833 rust_union_quirks.
8834 (process_structure_scope): Update rust_unions if necessary.
8835
8836 2018-02-26 Tom Tromey <tom@tromey.com>
8837
8838 * value.h (value_union_variant): Declare.
8839 * valops.c (value_union_variant): New function.
8840 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
8841 (struct discriminant_info): New.
8842 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
8843 enumerator.
8844 (struct main_type) <flag_discriminated_union>: New field.
8845
8846 2018-02-26 Tom Tromey <tom@tromey.com>
8847
8848 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8849 unittests/unpack-selftests.c.
8850 * unittests/unpack-selftests.c: New file.
8851 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
8852
8853 2018-02-26 Yao Qi <yao.qi@linaro.org>
8854
8855 * dwarf2read.c (struct partial_die_info) <read>: New method.
8856 (read_partial_die): Remove the declaration.
8857 (load_partial_dies): Update.
8858 (partial_die_info::partial_die_info):
8859 (read_partial_die): Change it to partial_die_info::read.
8860
8861 2018-02-26 Yao Qi <yao.qi@linaro.org>
8862
8863 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
8864 (fixup_partial_die): Remove declaration.
8865 (scan_partial_symbols): Update.
8866 (partial_die_parent_scope): Likewise.
8867 (partial_die_full_name): Likewise.
8868 (fixup_partial_die): Change it to partial_die_info::fixup.
8869
8870 2018-02-26 Yao Qi <yao.qi@linaro.org>
8871
8872 * dwarf2read.c (read_partial_die): Update the declaration.
8873 (load_partial_dies): Caller update.
8874 (read_partial_die): Remove one argument abbrev_len.
8875
8876 2018-02-26 Yao Qi <yao.qi@linaro.org>
8877
8878 * dwarf2read.c (struct partial_die_info): Add ctor, delete
8879 assignment operator.
8880 (load_partial_dies): Use ctor and copy ctor.
8881 (read_partial_die): Update.
8882 (dwarf2_cu::find_partial_die): Use ctor.
8883
8884 2018-02-26 Yao Qi <yao.qi@linaro.org>
8885
8886 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
8887 (find_partial_die_in_comp_unit): Change it to
8888 dwarf2_cu::find_partial_die.
8889 (find_partial_die): Update.
8890
8891 2018-02-26 Yao Qi <yao.qi@linaro.org>
8892
8893 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
8894 is NULL.
8895
8896 2018-02-26 Yao Qi <yao.qi@linaro.org>
8897
8898 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
8899
8900 2018-02-26 Alan Hayward <alan.hayward@arm.com>
8901
8902 * arch/amd64.h: Use common/tdesc.h.
8903 * arch/i386.c: Likewise.
8904 * arch/i386.h: Likewise.
8905 * arch/tic6x.c: Likewise.
8906 * arch/tdesc.h: Move file from here...
8907 * common/tdesc.h: ...to here.
8908 * features/aarch64-core.c: Regenerate.
8909 * features/aarch64-fpu.c: Regenerate.
8910 * features/i386/32bit-avx.c: Regenerate.
8911 * features/i386/32bit-avx512.c: Regenerate.
8912 * features/i386/32bit-core.c: Regenerate.
8913 * features/i386/32bit-linux.c: Regenerate.
8914 * features/i386/32bit-mpx.c: Regenerate.
8915 * features/i386/32bit-pkeys.c: Regenerate.
8916 * features/i386/32bit-sse.c: Regenerate.
8917 * features/i386/64bit-avx.c: Regenerate.
8918 * features/i386/64bit-avx512.c: Regenerate.
8919 * features/i386/64bit-core.c: Regenerate.
8920 * features/i386/64bit-linux.c: Regenerate.
8921 * features/i386/64bit-mpx.c: Regenerate.
8922 * features/i386/64bit-pkeys.c: Regenerate.
8923 * features/i386/64bit-segments.c: Regenerate.
8924 * features/i386/64bit-sse.c: Regenerate.
8925 * features/i386/x32-core.c: Regenerate.
8926 * features/tic6x-c6xp.c: Regenerate.
8927 * features/tic6x-core.c: Regenerate.
8928 * features/tic6x-gp.c: Regenerate.
8929 * target-descriptions.c: Use common/tdesc.h.
8930 * target-descriptions.h: Likewise.
8931
8932 2018-02-24 Tom Tromey <tom@tromey.com>
8933
8934 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
8935 (try_thread_db_load_from_dir, thread_db_load_search): Use
8936 std::string.
8937 (info_auto_load_libthread_db_compare): Return bool. Change
8938 argument types.
8939 (info_auto_load_libthread_db): Use std::vector, std::string.
8940 Remove cleanups.
8941
8942 2018-02-24 Tom Tromey <tom@tromey.com>
8943
8944 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
8945 std::string.
8946 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
8947 std::string*.
8948 * gdbarch.c: Rebuild.
8949 * gdbarch.h: Rebuild.
8950 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
8951 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
8952 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
8953 std::string*.
8954
8955 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
8956
8957 * gdbtypes.h (sect_offset): Change type to uint64_t.
8958 (sect_offset_str): New function.
8959 * dwarf2read.c (create_addrmap_from_aranges): Use
8960 sect_offset_str.
8961 (error_check_comp_unit_head): Likewise.
8962 (create_debug_type_hash_table): Likewise.
8963 (read_cutu_die_from_dwo): Likewise.
8964 (init_cutu_and_read_dies): Likewise.
8965 (init_cutu_and_read_dies_no_follow): Likewise.
8966 (process_psymtab_comp_unit_reader): Likewise.
8967 (partial_die_parent_scope): Likewise.
8968 (peek_die_abbrev): Likewise.
8969 (process_queue): Likewise.
8970 (dwarf2_physname): Likewise.
8971 (read_namespace_alias): Likewise.
8972 (read_import_statement): Likewise.
8973 (create_dwo_cu_reader): Likewise.
8974 (create_cus_hash_table): Likewise.
8975 (lookup_dwo_cutu): Likewise.
8976 (inherit_abstract_dies): Likewise.
8977 (read_func_scope): Likewise.
8978 (read_call_site_scope): Likewise.
8979 (dwarf2_add_member_fn): Likewise.
8980 (read_common_block): Likewise.
8981 (read_module_type): Likewise.
8982 (read_typedef): Likewise.
8983 (read_subrange_type): Likewise.
8984 (load_partial_dies): Likewise.
8985 (read_partial_die): Likewise.
8986 (find_partial_die): Likewise.
8987 (read_str_index): Likewise.
8988 (dwarf2_string_attr): Likewise.
8989 (build_error_marker_type): Likewise.
8990 (lookup_die_type): Likewise.
8991 (dump_die_shallow): Likewise.
8992 (follow_die_ref): Likewise.
8993 (dwarf2_fetch_die_loc_sect_off): Likewise.
8994 (dwarf2_fetch_constant_bytes): Likewise.
8995 (follow_die_sig): Likewise.
8996 (get_signatured_type): Likewise.
8997 (get_DW_AT_signature_type): Likewise.
8998 (dwarf2_find_containing_comp_unit): Likewise.
8999 (set_die_type): Likewise.
9000
9001 2018-02-21 John Baldwin <jhb@FreeBSD.org>
9002
9003 * arch/aarch64.c: Include "common-defs.h".
9004 * arch/amd64.c: Likewise.
9005 * arch/i386.c: Likewise.
9006
9007 2018-02-21 Tom Tromey <tom@tromey.com>
9008
9009 * value.h: (extract_field_op): Update.
9010 * eval.c (extract_field_op): Return a const char *.
9011 * expression.h (parse_expression_for_completion): Update.
9012 * completer.c (complete_expression): Update.
9013 (add_struct_fields): Make fieldname const.
9014 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
9015 (mark_completion_tag, parse_exp_in_context_1): Update.
9016 (parse_expression_for_completion): Change "name" to
9017 unique_xmalloc_ptr*.
9018
9019 2018-02-21 Tom Tromey <tom@tromey.com>
9020
9021 * infcall.c (call_function_by_hand_dummy): Use std::vector.
9022
9023 2018-02-21 Yao Qi <yao.qi@linaro.org>
9024
9025 * avr-tdep.c (avr_read_pc): Change parameter type to
9026 readable_regcache.
9027 * gdbarch.sh (read_pc): Likewise.
9028 * gdbarch.c: Re-generated.
9029 * gdbarch.h: Re-generated.
9030 * hppa-tdep.c (hppa_read_pc): Change parameter type to
9031 readable_regcache.
9032 * ia64-tdep.c (ia64_read_pc): Likewise.
9033 * mips-tdep.c (mips_read_pc): Likewise.
9034 * spu-tdep.c (spu_read_pc): Likewise.
9035
9036 2018-02-21 Yao Qi <yao.qi@linaro.org>
9037
9038 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
9039 * regcache-dump.c: New file.
9040 * regcache.c: Move register_dump to regcache-dump.c.
9041 (maintenance_print_registers): Likewise.
9042 (maintenance_print_raw_registers): Likewise.
9043 (maintenance_print_cooked_registers): Likewise.
9044 (maintenance_print_register_groups): Likewise.
9045 (maintenance_print_remote_registers): Likewise.
9046 (_initialize_regcache): Likewise.
9047 * regcache.h (register_dump): Moved from regcache.c.
9048
9049 2018-02-21 Yao Qi <yao.qi@linaro.org>
9050
9051 * regcache.c (regcache::regcache): Update.
9052 (regcache::invalidate): Move it to detached_regcache::invalidate.
9053 (get_thread_arch_aspace_regcache): Update.
9054 (regcache::raw_update): Update.
9055 (regcache::cooked_read): Remove some code.
9056 (regcache::cooked_read_value): Likewise.
9057 (regcache::raw_write): Remove assert on m_readonly_p.
9058 (regcache::raw_supply_integer): Move it to
9059 detached_regcache::raw_supply_integer.
9060 (regcache::raw_supply_zeroed): Likewise.
9061 * regcache.h (detached_regcache) <raw_supply_integer>: New
9062 declaration.
9063 <raw_supply_zeroed, invalidate>: Likewise.
9064 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
9065 <invalidate>: Likewise.
9066 <m_readonly_p>: Removed.
9067
9068 2018-02-21 Yao Qi <yao.qi@linaro.org>
9069
9070 * infcmd.c (get_return_value): Let stop_regs point to
9071 get_current_regcache.
9072 * regcache.c (regcache::regcache): Remove.
9073 (register_dump_reg_buffer): New class.
9074 (regcache_print): Adjust.
9075 * regcache.h (regcache): Remove constructors.
9076
9077 2018-02-21 Yao Qi <yao.qi@linaro.org>
9078
9079 * regcache.c (class register_dump): New class.
9080 (register_dump_regcache, register_dump_none): New class.
9081 (register_dump_remote, register_dump_groups): New class.
9082 (regcache_print): Update.
9083 * regcache.h (regcache_dump_what): Move it to regcache.c.
9084 (regcache) <dump>: Remove.
9085
9086 2018-02-21 Yao Qi <yao.qi@linaro.org>
9087
9088 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
9089 reg_buffer_rw *.
9090 (jit_unwind_reg_set_impl): Call raw_supply.
9091 (jit_frame_sniffer): Use reg_buffer_rw.
9092 * record-full.c (record_full_core_regbuf): Change its type.
9093 (record_full_core_open_1): Use reg_buffer_rw.
9094 (record_full_close): Likewise.
9095 (record_full_core_fetch_registers): Use regcache->raw_supply.
9096 (record_full_core_store_registers): Likewise.
9097 * regcache.c (regcache::get_register_status): Move it to
9098 reg_buffer.
9099 (regcache_raw_set_cached_value): Remove.
9100 (regcache::raw_set_cached_value): Remove.
9101 (regcache::raw_write): Call raw_supply.
9102 (regcache::raw_supply): Move it to reg_buffer_rw.
9103 * regcache.h (regcache_raw_set_cached_value): Remove.
9104 (reg_buffer_rw): New class.
9105
9106 2018-02-21 Yao Qi <yao.qi@linaro.org>
9107
9108 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
9109 readonly_detached_regcache.
9110 (dummy_frame_prev_register): Use regcache->cooked_read.
9111 * frame.c (frame_save_as_regcache): Change return type.
9112 (frame_pop): Update.
9113 * frame.h (frame_save_as_regcache): Update declaration.
9114 * inferior.h (get_infcall_suspend_state_regcache): Update
9115 declaration.
9116 * infrun.c (infcall_suspend_state) <registers>: use
9117 readonly_detached_regcache.
9118 (save_infcall_suspend_state): Don't use regcache_dup.
9119 (get_infcall_suspend_state_regcache): Change return type.
9120 * linux-fork.c (struct fork_info) <savedregs>: Change to
9121 readonly_detached_regcache.
9122 <pc>: New field.
9123 (fork_save_infrun_state): Don't use regcache_dup.
9124 (info_checkpoints_command): Adjust.
9125 * mi/mi-main.c (register_changed_p): Update declaration.
9126 (mi_cmd_data_list_changed_registers): Use
9127 readonly_detached_regcache.
9128 (register_changed_p): Change parameter type to
9129 readonly_detached_regcache.
9130 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
9131 readonly_detached_regcache.
9132 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
9133 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
9134 New.
9135 (regcache::save): Move it to reg_buffer.
9136 (regcache::restore): Change parameter type.
9137 (regcache_dup): Remove.
9138 * regcache.h (reg_buffer) <save>: New method.
9139 (readonly_detached_regcache): New class.
9140 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
9141 readonly_detached_regcache.
9142 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
9143
9144 2018-02-21 Yao Qi <yao.qi@linaro.org>
9145
9146 * frame.c (frame_save_as_regcache): Use regcache method save.
9147 (frame_pop): Use regcache method restore.
9148 * infrun.c (restore_infcall_suspend_state): Likewise.
9149 * linux-fork.c (fork_load_infrun_state): Likewise.
9150 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
9151 save.
9152 * regcache.c (regcache_save): Remove.
9153 (regcache::restore): More asserts.
9154 (regcache_cpy): Remove.
9155 * regcache.h (regcache_save): Remove the declaration.
9156 (regcache::restore): Move from private to public.
9157 Remove the friend declaration of regcache_cpy.
9158 (regcache_cpy): Remove declaration.
9159
9160 2018-02-21 Yao Qi <yao.qi@linaro.org>
9161
9162 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
9163 parameter type to 'readable_regcache *'.
9164 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9165 * arm-tdep.c (arm_neon_quad_read): Likewise.
9166 (arm_pseudo_read): Likewise.
9167 * avr-tdep.c (avr_pseudo_register_read): Likewise.
9168 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9169 * frv-tdep.c (frv_pseudo_register_read): Likewise.
9170 * gdbarch.c: Re-generated.
9171 * gdbarch.h: Re-generated.
9172 * gdbarch.sh (pseudo_register_read): Change parameter type to
9173 'readable_regcache *'.
9174 (pseudo_register_read_value): Likewise.
9175 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
9176 (h8300_pseudo_register_read): Likewise.
9177 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
9178 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9179 (i386_pseudo_register_read_into_value): Likewise.
9180 (i386_pseudo_register_read_value): Likewise.
9181 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
9182 declaration.
9183 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
9184 * m32c-tdep.c (m32c_raw_read): Likewise.
9185 (m32c_read_flg): Likewise.
9186 (m32c_banked_register): Likewise.
9187 (m32c_banked_read): Likewise.
9188 (m32c_sb_read): Likewise.
9189 (m32c_part_read): Likewise.
9190 (m32c_cat_read): Likewise.
9191 (m32c_r3r2r1r0_read): Likewise.
9192 (m32c_pseudo_register_read): Likewise.
9193 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9194 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9195 (mep_pseudo_cr64_read): Likewise.
9196 (mep_pseudo_register_read): Likewise.
9197 * mips-tdep.c (mips_pseudo_register_read): Likewise.
9198 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9199 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9200 * regcache.c (regcache::raw_read): Move it to readable_regcache.
9201 (regcache::cooked_read): Likewise.
9202 (regcache::cooked_read_value): Likewise.
9203 (regcache_cooked_read_signed):
9204 (regcache::cooked_read): Likewise.
9205 * regcache.h (readable_regcache): New class.
9206 (regcache): Inherit readable_regcache. Move some methods to
9207 readable_regcache.
9208 * rl78-tdep.c (rl78_pseudo_register_read): Change
9209 parameter type to 'readable_regcache *'.
9210 * rs6000-tdep.c (do_regcache_raw_read): Remove.
9211 (e500_pseudo_register_read): Change parameter type to
9212 'readable_regcache *'.
9213 (dfp_pseudo_register_read): Likewise.
9214 (vsx_pseudo_register_read): Likewise.
9215 (efpr_pseudo_register_read): Likewise.
9216 * s390-tdep.c (s390_pseudo_register_read): Likewise.
9217 * sh-tdep.c (sh_pseudo_register_read): Likewise.
9218 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
9219 (sh64_pseudo_register_read): Likewise.
9220 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9221 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9222 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9223 (spu_pseudo_register_read): Likewise.
9224 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9225 (xtensa_pseudo_register_read): Likewise.
9226
9227 2018-02-21 Yao Qi <yao.qi@linaro.org>
9228
9229 * regcache.c (regcache::regcache): Call reg_buffer ctor.
9230 (regcache::arch): Move it to reg_buffer::arch.
9231 (regcache::register_buffer): Likewise.
9232 (regcache::assert_regnum): Likewise.
9233 (regcache::num_raw_registers): Likewise.
9234 * regcache.h (reg_buffer): New class.
9235 (regcache): Inherit reg_buffer.
9236
9237 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
9238
9239 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
9240 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
9241
9242 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
9243
9244 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
9245
9246 2018-02-19 Alan Hayward <alan.hayward@arm.com>
9247
9248 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
9249 (SFILES): Remove common/*.c files.
9250 (COMMON_OBS): Remove some *.o files built from common/*.c files.
9251 * common/common.host: Add common reference.
9252 * configure.ac: Likewise.
9253 * configure: Regenerate.
9254
9255 2018-02-16 Yao Qi <yao.qi@linaro.org>
9256
9257 * block.c (block_namespace_info): Inherit allocate_on_obstack.
9258 (block_initialize_namespace): Use new.
9259 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
9260 (dwarf2_free_objfile): Use delete.
9261 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
9262 (copy_type_recursive): Use new.
9263 * gdb_obstack.h (allocate_on_obstack): New.
9264
9265 2018-02-15 Yao Qi <yao.qi@linaro.org>
9266
9267 PR gdb/22849
9268 * inferior.c (exit_inferior_1): Reset inf->control.
9269
9270 2018-02-15 Joel Brobecker <brobecker@adacore.com>
9271
9272 * ada-lang.c (ada_to_fixed_value_create): Delete advance
9273 declaration.
9274
9275 2018-02-14 Pedro Alves <palves@redhat.com>
9276
9277 * frame-unwind.c (frame_unwind_try_unwinder): Always call
9278 frame_cleanup_after_sniffer on exception.
9279
9280 2018-02-14 Tom Tromey <tom@tromey.com>
9281
9282 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
9283 const.
9284 (solib_bfd_open): Make pathname const.
9285 * solib.c (solib_bfd_open): Make pathname const.
9286 * solib-spu.c (spu_bfd_fopen): Make name const.
9287 (spu_bfd_open): Make pathname const.
9288 * solib-darwin.c (darwin_bfd_open): Make pathname const.
9289 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
9290
9291 2018-02-14 Tom Tromey <tom@tromey.com>
9292
9293 * symfile.c (symfile_bfd_open): Update.
9294 * source.h (openp, source_full_path_of, find_and_open_source):
9295 Change argument type to unique_xmalloc_ptr.
9296 * source.c (openp): Take a unique_xmalloc_ptr.
9297 (source_full_path_of, find_and_open_source): Likewise.
9298 (open_source_file, symtab_to_fullname): Update.
9299 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
9300 unique_xmalloc_ptr.
9301 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
9302 (exec_file_find): Update.
9303 * psymtab.c (psymtab_to_fullname): Update.
9304 * nto-tdep.h (nto_find_and_open_solib): Update.
9305 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
9306 unique_xmalloc_ptr.
9307 * exec.c (exec_file_attach): Update.
9308 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
9309 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
9310
9311 2018-02-14 Tom Tromey <tom@tromey.com>
9312
9313 * solib.c: Include source.h.
9314 * nto-tdep.c: Include source.h.
9315 * mi/mi-cmd-env.c: Include source.h.
9316 * infcmd.c: Include source.h.
9317 * exec.c: Include source.h.
9318 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
9319 (add_path, directory_switch, source_path, init_source_path): Move
9320 declarations...
9321 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
9322 (add_path, directory_switch, source_path, init_source_path):
9323 ...here.
9324
9325 2018-02-14 Tom Tromey <tom@tromey.com>
9326
9327 * solist.h (exec_file_find, solib_find): Return
9328 unique_xmalloc_ptr.
9329 (solib_bfd_fopen): Take a const char *.
9330 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
9331 (exec_file_find, solib_find): Likewise.
9332 (solib_bfd_fopen): Do not take ownership of "pathname".
9333 (solib_bfd_open): Use unique_xmalloc_ptr.
9334 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
9335 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
9336 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
9337 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
9338
9339 2018-02-14 Joel Brobecker <brobecker@adacore.com>
9340
9341 * ada-lang.c (name_match_type_from_name): Remove reference to
9342 ada_name_for_lookup in function's documentation.
9343 * ada-lang.h (ada_name_for_lookup): Delete declaration.
9344
9345 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
9346
9347 * defs.h (enum openp_flags): New enum.
9348 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
9349 Move to enum openp_flags.
9350 (openp_flags): New enum flags.
9351 (openp): Change parameter type to openp_flags.
9352 * source.c (openp): Change parameter type to openp_flags.
9353 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
9354 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
9355
9356 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
9357
9358 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
9359 per-command.
9360
9361 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
9362
9363 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
9364 into...
9365 (class dwarf2_queue_guard): ...the destructor of this new class.
9366 (dw2_do_instantiate_symtab): Create instance of the new class
9367 dwarf2_queue_guard, remove cleanup.
9368
9369 2018-02-09 Tom Tromey <tom@tromey.com>
9370
9371 * source.c (find_source_lines): Don't reference past the end of
9372 the vector.
9373
9374 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9375
9376 * remote.c (remote_btrace_maybe_reopen): Change error message.
9377 * btrace.c (btrace_enable): Likewise.
9378 (parse_xml_btrace): Likewise.
9379 (parse_xml_btrace_conf): Likewise.
9380
9381 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9382
9383 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
9384 (linux_enable_pt, linux_enable_bts): Call
9385 diagnose_perf_event_open_fail.
9386
9387 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9388
9389 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
9390 Remove parameter and change return type. Update callers. Move it.
9391 (linux_enable_bts, linux_enable_pt): Improve error message.
9392 (linux_enable_pt): Remove zero buffer size check.
9393 (linux_enable_btrace): Improve error messages. Remove NULL return
9394 check.
9395
9396 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9397
9398 * btrace.c (btrace_enable): Remove target_supports_btrace call.
9399 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
9400 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
9401 (linux_supports_pt, linux_supports_btrace): Remove.
9402 (linux_enable_bts): Call cpu_supports_bts.
9403 * nat/linux-btrace.h (linux_supports_btrace): Remove.
9404 * remote.c (remote_supports_btrace): Remove.
9405 (init_remote_ops): Remove remote_supports_btrace.
9406 * target-delegates.c: Regenerated.
9407 * target.c (target_supports_btrace): Remove.
9408 * target.h (target_ops) <to_supports_btrace>: Remove
9409 (target_supports_btrace): Remove.
9410 * x86-linux-nat.c (x86_linux_create_target): Remove
9411 linux_supports_btrace.
9412
9413 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9414
9415 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
9416 btrace failed.
9417 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
9418 exception and use message in own exception.
9419
9420 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9421
9422 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
9423 (perf_event_pt_event_type): Use gdb_file_up.
9424 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
9425 scoped_fd, and scoped_mmap.
9426
9427 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9428
9429 * common/scoped_mmap.h: New.
9430 * unittests/scoped_mmap-selftest.c: New.
9431 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9432 unittests/scoped_mmap-selftest.c.
9433
9434 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9435
9436 * common/scoped_fd.h: New.
9437 * unittests/scoped_fd-selftest.c: New.
9438 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9439 unittests/scoped_fd-selftest.c.
9440
9441 2018-02-09 Tom Tromey <tom@tromey.com>
9442
9443 * auto-load.c (auto_load_section_scripts): Use
9444 gdb::unique_xmalloc_ptr.
9445
9446 2018-02-09 Tom Tromey <tom@tromey.com>
9447
9448 * auto-load.c (execute_script_contents): Use std::string.
9449
9450 2018-02-09 Joel Brobecker <brobecker@adacore.com>
9451
9452 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
9453 Python function, rather than a new command.
9454
9455 2018-02-08 Tom Tromey <tom@tromey.com>
9456
9457 * solib.c (solib_find_1): Use std::string.
9458 (solib_bfd_fopen): Use unique_xmalloc_ptr.
9459
9460 2018-02-08 Tom Tromey <tom@tromey.com>
9461
9462 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
9463
9464 2018-02-08 Tom Tromey <tom@tromey.com>
9465
9466 * source.c (find_source_lines): Use gdb::def_vector.
9467
9468 2018-02-08 Tom Tromey <tom@tromey.com>
9469
9470 * macrocmd.c (struct temporary_macro_definition): New.
9471 (macro_define_command): Use temporary_macro_definition. Remove
9472 cleanups.
9473 (free_macro_definition_ptr): Remove.
9474
9475 2018-02-08 Tom Tromey <tom@tromey.com>
9476
9477 * macroexp.c (maybe_expand): Use std::string.
9478
9479 2018-02-08 Tom Tromey <tom@tromey.com>
9480
9481 * macroexp.c (struct macro_buffer): Add initializers for some
9482 members.
9483 (init_buffer, init_shared_buffer, free_buffer)
9484 (free_buffer_return_text): Remove.
9485 (macro_buffer): New constructors.
9486 (~macro_buffer): New destructor.
9487 (macro_buffer::set_shared): New method.
9488 (macro_buffer::resize_buffer, macro_buffer::appendc)
9489 (macro_buffer::appendmem): Now methods, not free functions.
9490 (set_token, append_tokens_without_splicing, stringify)
9491 (macro_stringify): Update.
9492 (gather_arguments): Change return type. Remove argc_p argument,
9493 add args_ptr argument. Use std::vector.
9494 (substitute_args): Remove argc argument. Accept std::vector.
9495 (expand): Update. Use std::vector.
9496 (scan, macro_expand, macro_expand_next): Update.
9497
9498 2018-02-08 Tom Tromey <tom@tromey.com>
9499
9500 * symtab.c (default_collect_symbol_completion_matches_break_on):
9501 Use unique_xmalloc_ptr.
9502 * macroscope.h: (sal_macro_scope, user_macro_scope)
9503 (default_macro_scope): Return unique_xmalloc_ptr.
9504 * macroscope.c (sal_macro_scope, user_macro_scope)
9505 (default_macro_scope): Return unique_xmalloc_ptr.
9506 * macroexp.h (macro_expand, macro_expand_once): Return
9507 unique_xmalloc_ptr.
9508 * macroexp.c (macro_expand, macro_expand_once): Return
9509 unique_xmalloc_ptr.
9510 * macrocmd.c (macro_expand_command, macro_expand_once_command)
9511 (info_macro_command, info_macros_command): Use
9512 unique_xmalloc_ptr.
9513 * compile/compile-c-support.c (write_macro_definitions): Use
9514 unique_xmalloc_ptr.
9515 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
9516
9517 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
9518
9519 * value.c (value_static_field): Assign field type instead of
9520 containing type when returning an optimized out value.
9521
9522 2018-02-06 Yao Qi <yao.qi@linaro.org>
9523
9524 * ft32-tdep.c (ft32_read_pc): Remove.
9525 (ft32_write_pc): Remove.
9526 (ft32_gdbarch_init): Update.
9527 * m32r-tdep.c (m32r_read_pc): Remove.
9528 (m32r_gdbarch_init): Update.
9529 * mep-tdep.c (mep_read_pc): Remove.
9530 (mep_gdbarch_init): Update.
9531 * microblaze-tdep.c (microblaze_write_pc): Remove.
9532 (microblaze_gdbarch_init): Update.
9533 * mn10300-tdep.c (mn10300_read_pc): Remove.
9534 (mn10300_write_pc): Remove.
9535 (mn10300_gdbarch_init): Update.
9536 * moxie-tdep.c (moxie_read_pc): Remove.
9537 (moxie_write_pc): Remove.
9538 (moxie_gdbarch_init): Update.
9539
9540 2018-02-06 Yao Qi <yao.qi@linaro.org>
9541
9542 * expprint.c (print_subexp_standard): Handle
9543 OP_F77_UNDETERMINED_ARGLIST.
9544 (dump_subexp_body_standard): Likewise.
9545
9546 2018-02-05 Alan Hayward <alan.hayward@arm.com>
9547
9548 * target-descriptions.c (tdesc_element_visitor) Add empty
9549 implementations.
9550 (tdesc_type): Move make_gdb_type from here.
9551 (tdesc_type_builtin): Likewise.
9552 (tdesc_type_vector): Likewise.
9553 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
9554 (make_gdb_type_struct): Move from tdesc_type_with_fields.
9555 (make_gdb_type_union): Likewise.
9556 (make_gdb_type_flags): Likewise.
9557 (make_gdb_type_enum): Likewise.
9558 (make_gdb_type): New function.
9559 (tdesc_register_type): Use static make_gdb_type.
9560
9561 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
9562
9563 * infcmd.c (default_print_one_register_info): Align natural-format
9564 column values consistently one under another.
9565 (pad_to_column): New function.
9566
9567 2018-02-05 Joel Brobecker <brobecker@adacore.com>
9568
9569 * dwarf2read.c (dwarf2_physname): Move commment.
9570
9571 2018-02-01 Leszek Swirski <leszeks@google.com>
9572
9573 * varobj.c (varobj_formatted_print_options): Allow recursive
9574 pretty printing if pretty printing is enabled.
9575
9576 2018-02-01 Leszek Swirski <leszeks@google.com>
9577
9578 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
9579 names after a structop as a filename.
9580
9581 2018-02-01 Yao Qi <yao.qi@linaro.org>
9582
9583 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
9584 (arm_record_coproc_data_proc): Likewise.
9585
9586 2018-02-01 Yao Qi <yao.qi@linaro.org>
9587
9588 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
9589
9590 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
9591
9592 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
9593 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
9594
9595 2018-01-31 Pedro Alves <palves@redhat.com>
9596
9597 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
9598 * inflow.c (child_terminal_save_inferior): Wrap reference to
9599 tcgetpgrp in HAVE_TERMIOS_H.
9600 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
9601 _WIN32.
9602 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
9603 always iterate over all inferiors.
9604 (gdbsim_cntrl_c): Adjust.
9605 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
9606
9607 2018-01-31 Joel Brobecker <brobecker@adacore.com>
9608
9609 * gdbtypes.c (lookup_array_range_type): Make sure the array's
9610 index type is objfile-owned if the element type is as well.
9611
9612 2018-01-31 Joel Brobecker <brobecker@adacore.com>
9613
9614 GDB 8.1 released.
9615
9616 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
9617
9618 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
9619 "features/s390x-linux64.c".
9620 (_initialize_s390_linux_tdep): Remove initialization of tdescs
9621 s390_linux32 and s390x_linux64.
9622 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
9623 default tdesc.
9624 * s390-tdep.c: Include "features/s390-linux32.c" and
9625 "features/s390x-linux64.c".
9626 (s390_tdesc_valid): Add check for tdesc_has_registers.
9627 (s390_gdbarch_init): Make sure there is always a valid tdesc.
9628 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
9629 tdesc_s390x_linux64.
9630 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
9631 tdesc_s390x_linux64 to...
9632 * s390-tdep.h: ...here.
9633
9634 2018-01-30 Pedro Alves <palves@redhat.com>
9635
9636 PR gdb/13211
9637 * config.in, configure: Regenerate.
9638 * configure.ac: Check for getpgid.
9639 * go32-nat.c (go32_pass_ctrlc): New.
9640 (go32_target): Install it.
9641 * inf-child.c (inf_child_target): Install
9642 child_terminal_save_inferior, child_pass_ctrlc and
9643 child_interrupt.
9644 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
9645 (inf_ptrace_target): No longer install it.
9646 * infcmd.c (interrupt_target_1): Adjust.
9647 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
9648 (child_interrupt): Declare.
9649 (inferior::terminal_state): New.
9650 * inflow.c (struct terminal_info): Update comments.
9651 (inferior_process_group): Delete.
9652 (terminal_is_ours): Delete.
9653 (gdb_tty_state): New.
9654 (child_terminal_init): Adjust.
9655 (is_gdb_terminal, sharing_input_terminal_1)
9656 (sharing_input_terminal): New functions.
9657 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
9658 Set the process's actual process group in the foreground if
9659 possible. Handle is_ours_for_output/is_ours distinction. Don't
9660 mark terminal as the inferior's if not sharing GDB's terminal.
9661 Don't check attach_flag.
9662 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
9663 pass down a target_terminal_state.
9664 (child_terminal_save_inferior): New, factored out from ...
9665 (child_terminal_ours_1): ... this. Handle
9666 target_terminal_state::is_ours_for_output.
9667 (child_interrupt, child_pass_ctrlc): New.
9668 (inflow_inferior_exit): Clear the inferior's terminal_state.
9669 (copy_terminal_info): Copy the inferior's terminal state.
9670 (_initialize_inflow): Remove reference to terminal_is_ours.
9671 * inflow.h (inferior_process_group): Delete.
9672 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
9673 * procfs.c (procfs_target): Don't install procfs_interrupt.
9674 (procfs_interrupt): Delete.
9675 * remote.c (remote_serial_quit_handler): Adjust.
9676 (remote_interrupt): Remove ptid parameter. Adjust.
9677 * target-delegates.c: Regenerate.
9678 * target.c: Include "terminal.h".
9679 (target_terminal::terminal_state): Rename to ...
9680 (target_terminal::m_terminal_state): ... this.
9681 (target_terminal::init): Adjust.
9682 (target_terminal::inferior): Adjust to per-inferior
9683 terminal_state.
9684 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
9685 (target_terminal::ours, target_terminal::ours_for_output): Use
9686 target_terminal_is_ours_kind.
9687 (target_interrupt): Remove ptid parameter. Adjust.
9688 (default_target_pass_ctrlc): Adjust.
9689 * target.h (target_ops::to_terminal_save_inferior): New field.
9690 (target_ops::to_interrupt): Remove ptid_t parameter.
9691 (target_interrupt): Remove ptid_t parameter. Update comment.
9692 (target_pass_ctrlc): Update comment.
9693 * target/target.h (target_terminal_state): New scoped enum,
9694 factored out of ...
9695 (target_terminal::terminal_state): ... here.
9696 (target_terminal::inferior): Update comments.
9697 (target_terminal::restore_inferior): New.
9698 (target_terminal::is_inferior, target_terminal::is_ours)
9699 (target_terminal::is_ours_for_output): Adjust.
9700 (target_terminal::scoped_restore_terminal_state): Adjust to
9701 rename, and call restore_inferior() instead of inferior().
9702 (target_terminal::scoped_restore_terminal_state::m_state): Change
9703 type.
9704 (target_terminal::terminal_state): Rename to ...
9705 (target_terminal::m_terminal_state): ... this and change type.
9706
9707 2018-01-30 Pedro Alves <palves@redhat.com>
9708
9709 * linux-nat.c (wait_for_signal): New function.
9710 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
9711 directly.
9712 (async_terminal_is_ours)
9713 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
9714 (linux_nat_add_target): Don't override
9715 to_terminal_inferior/to_terminal_ours.
9716
9717 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
9718
9719 * remote.c (remote_follow_fork): Don't call "detach_inferior".
9720
9721 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
9722
9723 * dwarf2read.c (free_dwo_files): Add forward-declaration.
9724 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
9725 dwarf2_per_objfile_free here.
9726 (dwarf2_per_objfile_free): Remove.
9727 (_initialize_dwarf2_read): Don't register
9728 dwarf2_per_objfile_free as a registry cleanup.
9729
9730 2018-01-27 Eli Zaretskii <eliz@gnu.org>
9731
9732 Avoid compilation errors in MinGW native builds
9733
9734 The error is triggered by including python-internal.h, and the
9735 error message is:
9736
9737 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
9738 from build-gnulib/import/math.h:27,
9739 from d:/usr/Python26/include/pyport.h:235,
9740 from d:/usr/Python26/include/Python.h:58,
9741 from python/python-internal.h:94,
9742 from python/py-arch.c:24:
9743 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
9744 using ::hypot;
9745 ^~~~~
9746
9747 This happens because Python headers define 'hypot' to expand t
9748 '_hypot' in the Windows builds.
9749 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
9750 'hypoth'. This avoids a compilation error.
9751
9752 2018-01-26 Alan Hayward <alan.hayward@arm.com>
9753
9754 * MAINTAINERS (Write After Approval): Fix ordering.
9755
9756 2018-01-26 Alan Hayward <alan.hayward@arm.com>
9757
9758 * MAINTAINERS (Write After Approval): Add Alan Hayward.
9759
9760 2018-01-26 Alan Modra <amodra@gmail.com>
9761
9762 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
9763 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
9764 Remove nop. Make const. Comment.
9765 (powerpc32_plt_stub_so_2): New.
9766 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
9767 Correct count. Update uses.
9768 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
9769 Move common code reading PLT entry word. Correct
9770 powerpc32_plt_stub PLT address calculation.
9771 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
9772 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
9773 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
9774 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
9775 (ppc64_standard_linkage8): Likewise.
9776 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
9777 Correct insns description.
9778 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
9779
9780 2018-01-24 Pedro Alves <palves@redhat.com>
9781
9782 GCC PR libstdc++/83906
9783 * gdbtypes.c (operator==(const dynamic_prop &,
9784 const dynamic_prop &)): New.
9785 (operator==(const range_bounds &, const range_bounds &)): New.
9786 (check_types_equal): Use them instead of memcmp.
9787 * gdbtypes.h (operator==(const dynamic_prop &,
9788 const dynamic_prop &)): Declare.
9789 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
9790 (operator==(const range_bounds &, const range_bounds &)): Declare.
9791 (operator!=(const range_bounds &, const range_bounds &)): Declare.
9792
9793 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9794
9795 * s390-linux-tdep.c (s390_record_address_mask)
9796 (s390_record_calc_disp_common, s390_record_calc_disp)
9797 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
9798 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
9799 (s390_process_record): Move to s390-tdep.c.
9800 (s390_linux_init_abi_any): Adjust.
9801 * s390-tdep.c (s390_record_address_mask)
9802 (s390_record_calc_disp_common, s390_record_calc_disp)
9803 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
9804 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
9805 (s390_process_record): Moved from s390-linux-tdep.c
9806 (s390_gdbarch_init): Adjust.
9807
9808 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9809
9810 * s390-linux-nat.c (s390-tdep.h): New include.
9811 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
9812 (HFILES_NO_SRCDIR): Add s390-tdep.h.
9813 (ALLDEPFILES): Add s390-tdep.c.
9814 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
9815 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
9816 * s390-tdep.h: ...this. New file.
9817 * s390-linux-tdep.c (s390-tdep.h): New include.
9818 (_initialize_s390_tdep): Rename to...
9819 (_initialize_s390_linux_tdep): ...this and adjust.
9820 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
9821 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
9822 s390-tdep.h.
9823 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
9824 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
9825 (s390_is_partial_instruction, s390_software_single_step)
9826 (is_non_branch_ril, s390_displaced_step_copy_insn)
9827 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
9828 (s390_prologue_data, s390_addr, s390_store, s390_load)
9829 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
9830 (s390_register_call_saved, s390_guess_tracepoint_registers)
9831 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
9832 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
9833 (s390_pseudo_register_name, s390_pseudo_register_type)
9834 (s390_pseudo_register_read, s390_pseudo_register_write)
9835 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
9836 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
9837 (s390_addr_bits_remove, s390_address_class_type_flags)
9838 (s390_address_class_type_flags_to_name)
9839 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
9840 (s390_function_arg_float, s390_function_arg_vector)
9841 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
9842 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
9843 (s390_frame_align, s390_register_return_value, s390_return_value)
9844 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
9845 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
9846 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
9847 (s390_trad_frame_prev_register, s390_unwind_cache)
9848 (s390_prologue_frame_unwind_cache)
9849 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
9850 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
9851 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
9852 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
9853 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
9854 (s390_frame_base_address, s390_local_base_address)
9855 (s390_frame_base, s390_gcc_target_options)
9856 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
9857 (s390_validate_reg_range, s390_tdesc_valid)
9858 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
9859 * s390-tdep.c: ...this. New file.
9860
9861 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9862
9863 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
9864 (s390_process_record, s390_gdbarch_tdep_alloc)
9865 (s390_linux_init_abi_any): Use/set new hook.
9866
9867 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9868
9869 * s390-linux-tdep.c (osabi.h): New include.
9870 (s390_linux_init_abi_31, s390_linux_init_abi_64)
9871 (s390_linux_init_abi_any): New functions.
9872 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
9873
9874 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9875
9876 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
9877 tdesc_has_registers check
9878
9879 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9880
9881 * s390-linux-tdep.c (s390_tdesc_valid): New function.
9882 (s390_validate_reg_range): New macro.
9883 (s390_gdbarch_init): Adjust.
9884
9885 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9886
9887 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
9888 (s390_gdbarch_tdep_alloc): Adjust.
9889 (s390_gdbarch_init): Adjust.
9890
9891 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9892
9893 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
9894 <have_tdb>: Change type to bool.
9895 (s390_gdbarch_tdep_alloc): Adjust.
9896 (s390_gdbarch_init): Adjust.
9897
9898 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9899
9900 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
9901 (gdbarch_tdep) <have_upper, have_vx>: New fields.
9902 (s390_gdbarch_tdep_alloc): New function.
9903 (s390_gdbarch_init): Allocate tdep at start and use its fields
9904 instead of separate variables.
9905
9906 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9907
9908 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
9909 when looking for cached gdbarch and add comment for remaining.
9910
9911 2018-01-22 Pedro Alves <palves@redhat.com>
9912 Sergio Durigan Junior <sergiodj@redhat.com>
9913
9914 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
9915 case.
9916
9917 2018-01-22 Maciej W. Rozycki <macro@mips.com>
9918
9919 * MAINTAINERS: Update my company e-mail address.
9920
9921 2018-01-22 Yao Qi <yao.qi@linaro.org>
9922
9923 * regcache.c (cooked_write_test): New function.
9924 (_initialize_regcache): Register the test.
9925
9926 2018-01-22 Yao Qi <yao.qi@linaro.org>
9927
9928 * ia64-tdep.c (ia64_pseudo_register_read): Call
9929 regcache->cooked_read instead of regcache_cooked_read_unsigned.
9930 * m32c-tdep.c (m32c_cat_read): Likewise.
9931 (m32c_r3r2r1r0_read): Likewise.
9932 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9933 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9934
9935 2018-01-22 Yao Qi <yao.qi@linaro.org>
9936
9937 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
9938 method raw_read instead of regcache_raw_read.
9939 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9940 * arm-tdep.c (arm_neon_quad_read): Likewise.
9941 * avr-tdep.c (avr_pseudo_register_read): Likewise.
9942 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9943 * frv-tdep.c (frv_pseudo_register_read): Likewise.
9944 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
9945 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9946 (i386_pseudo_register_read_into_value): Likewise.
9947 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9948 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9949 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9950 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
9951 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
9952 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9953 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9954 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9955 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
9956
9957 2018-01-22 Yao Qi <yao.qi@linaro.org>
9958
9959 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
9960 * configure.tgt: Remove target mt.
9961 * mt-tdep.c: Remove.
9962 * regcache.c (cooked_read_test): Remove the check for mt.
9963
9964 2018-01-22 Yao Qi <yao.qi@linaro.org>
9965
9966 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
9967 instead of gdbarch_pseudo_register_read_value.
9968
9969 2018-01-22 Joel Brobecker <brobecker@adacore.com>
9970
9971 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
9972 language is Ada.
9973
9974 2018-01-22 Joel Brobecker <brobecker@adacore.com>
9975
9976 * linespec.c (create_sals_line_offset): Remove code that preserved
9977 the symtab_and_line's line number.
9978
9979 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9980
9981 * varobj.c (varobj_create): Don't set valid_block when creating a
9982 floating varobj.
9983
9984 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9985
9986 * varobj.c (varobj_create): Remove out of date comment.
9987
9988 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9989
9990 PR mi/20395
9991 * ada-exp.y (write_var_from_sym): Pass extra parameter when
9992 updating innermost block.
9993 * parse.c (innermost_block_tracker::update): Take extra type
9994 parameter, and check types match before updating innermost block.
9995 (write_dollar_variable): Update innermost block for registers.
9996 * parser-defs.h (enum innermost_block_tracker_type): New enum.
9997 (innermost_block_tracker::innermost_block_tracker): Initialise
9998 m_types member.
9999 (innermost_block_tracker::reset): Take type parameter.
10000 (innermost_block_tracker::update): Take type parameter, and pass
10001 type through as needed.
10002 (innermost_block_tracker::m_types): New member.
10003 * varobj.c (varobj_create): Pass type when reseting innermost
10004 block.
10005
10006 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10007
10008 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
10009 * ada-lang.c (resolve_subexp): Likewise.
10010 * breakpoint.c (set_breakpoint_condition) Likewise.
10011 (watch_command_1) Likewise.
10012 * c-exp.y (variable): Likewise.
10013 * d-exp.y (PrimaryExpression): Likewise.
10014 * f-exp.y (variable): Likewise.
10015 * go-exp.y (variable): Likewise.
10016 * m2-exp.y (variable): Likewise.
10017 * objfiles.c (objfile::~objfile): Likewise.
10018 * p-exp.y (variable): Likewise.
10019 * parse.c (innermost_block): Change type.
10020 * parser-defs.h (class innermost_block_tracker): New.
10021 (innermost_block): Change to innermost_block_tracker.
10022 * printcmd.c (display_command): Switch to innermost_block API.
10023 (do_one_display): Likewise.
10024 * rust-exp.y (do_one_display): Likewise.
10025 * symfile.c (clear_symtab_users): Likewise.
10026 * varobj.c (varobj_create): Switch to innermost_block API, replace
10027 use of innermost_block with block stored on varobj object.
10028
10029 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10030
10031 * expression.h (innermost_block): Remove declaration.
10032 * varobj.c: Add 'parser-defs.h' include.
10033
10034 2018-01-19 Tom Tromey <tom@tromey.com>
10035
10036 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
10037 symbols in the static and global blocks.
10038
10039 2018-01-19 James Clarke <jrtc27@jrtc27.com>
10040
10041 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
10042 gdb_ptrace.h, and move including gdb_wait.h ...
10043 * nat/linux-ptrace.h: ... to here.
10044
10045 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10046
10047 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
10048 inf_ptrace_detach_success.
10049 (inf_ptrace_detach_success): Add inferior parameter, use it
10050 instead of inferior_ptid, pass it to detach_inferior.
10051 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
10052 parameter.
10053 * inferior.c (detach_inferior): Add overload that takes an
10054 inferior object.
10055 * inferior.h (detach_inferior): Likewise.
10056 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
10057 use inferior_ptid, adjust call to inf_ptrace_detach_success.
10058 * linux-thread-db.c (thread_db_detach): Use inf parameter.
10059
10060 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10061
10062 * target.h (struct target_ops) <to_detach>: Add inferior
10063 parameter.
10064 (target_detach): Likewise.
10065 * target.c (dispose_inferior): Pass inferior down.
10066 (target_detach): Pass inferior down. Assert that it is equal to
10067 the current inferior.
10068 * aix-thread.c (aix_thread_detach): Pass inferior down.
10069 * corefile.c (core_file_command): Pass current_inferior() down.
10070 * corelow.c (core_detach): Add inferior parameter.
10071 * darwin-nat.c (darwin_detach): Likewise.
10072 * gnu-nat.c (gnu_detach): Likewise.
10073 * inf-ptrace.c (inf_ptrace_detach): Likewise.
10074 * infcmd.c (detach_command): Pass current_inferior() down to
10075 target_detach.
10076 * infrun.c (follow_fork_inferior): Pass parent_inf to
10077 target_detach.
10078 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
10079 target_detach.
10080 * linux-nat.c (linux_nat_detach): Add inferior parameter.
10081 * linux-thread-db.c (thread_db_detach): Likewise.
10082 * nto-procfs.c (procfs_detach): Likewise.
10083 * procfs.c (procfs_detach): Likewise.
10084 * record.c (record_detach): Likewise.
10085 * record.h (struct inferior): Forward-declare.
10086 (record_detach): Add inferior parameter.
10087 * remote-sim.c (gdbsim_detach): Likewise.
10088 * remote.c (remote_detach_1): Likewise.
10089 (remote_detach): Likewise.
10090 (extended_remote_detach): Likewise.
10091 * sol-thread.c (sol_thread_detach): Likewise.
10092 * target-debug.h (target_debug_print_inferior_p): New macro.
10093 * target-delegates.c: Re-generate.
10094 * top.c (kill_or_detach): Pass inferior down to target_detach.
10095 * windows-nat.c (windows_detach): Add inferior parameter.
10096
10097 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10098
10099 * target.h (struct target_ops) <to_detach>: Remove args
10100 parameter.
10101 (target_detach): Likewise.
10102 * target.c (dispose_inferior): Adjust.
10103 (target_detach): Remove args parameter, adjust.
10104 * aix-thread.c (aix_thread_detach): Adjust.
10105 * corefile.c (core_file_command): Adjust.
10106 * corelow.c (core_detach): Adjust.
10107 * darwin-nat.c (darwin_detach): Adjust.
10108 * gnu-nat.c (gnu_detach): Adjust.
10109 * inf-ptrace.c (inf_ptrace_detach): Adjust.
10110 * infcmd.c (detach_command): Adjust
10111 * infrun.c (follow_fork_inferior): Adjust.
10112 (handle_vfork_child_exec_or_exit): Adjust.
10113 * linux-fork.c (linux_fork_detach): Remove args parameter.
10114 * linux-fork.h (linux_fork_detach): Likewise.
10115 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
10116 * linux-thread-db.c (thread_db_detach): Likewise.
10117 * nto-procfs.c (procfs_detach): Likewise.
10118 * procfs.c (procfs_detach): Likewise.
10119 (do_detach): Remove signo parameter.
10120 * record.c (record_detach): Remove args parameter.
10121 * record.h (record_detach): Likewise.
10122 * remote-sim.c (gdbsim_detach): Likewise.
10123 * remote.c (remote_detach_1): Likewise.
10124 (remote_detach): Likewise.
10125 (extended_remote_detach): Likewise.
10126 * sol-thread.c (sol_thread_detach): Likewise.
10127 * target-delegates.c: Re-generate.
10128 * top.c (struct qt_args) <args>: Remove field.
10129 (kill_or_detach): Don't pass args.
10130 (quit_force): Don't set args.
10131 * windows-nat.c (windows_detach): Remove args parameter.
10132
10133 2018-01-19 Yao Qi <yao.qi@linaro.org>
10134
10135 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
10136 (arm_linux_init_abi): Install it.
10137
10138 2018-01-19 Yao Qi <yao.qi@linaro.org>
10139
10140 * osabi.c (gdb_osabi_names): Extend the regexp for
10141 arm-linux-gnueabihf.
10142
10143 2018-01-18 Yao Qi <yao.qi@linaro.org>
10144
10145 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
10146 m_abbrevs.
10147 (abbrev_table::add_abbrev): Update.
10148 (abbrev_table::lookup_abbrev): Update.
10149
10150 2018-01-18 Yao Qi <yao.qi@linaro.org>
10151
10152 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
10153
10154 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
10155
10156 * compile/compile.c (compile_to_object): Convert "triplet_rx"
10157 to "std::string".
10158
10159 2018-01-17 Tom Tromey <tom@tromey.com>
10160
10161 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
10162
10163 2018-01-17 Tom Tromey <tom@tromey.com>
10164
10165 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
10166 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
10167 (create_array_type_with_stride): Update.
10168 * dwarf2read.c (set_die_type): Update.
10169
10170 2018-01-17 Tom Tromey <tom@tromey.com>
10171
10172 * dwarf2read.c (delayed_method_info): Remove typedef.
10173 (dwarf2_cu::method_info): Now a std::vector.
10174 (add_to_method_list): Update.
10175 (free_delayed_list): Remove.
10176 (compute_delayed_physnames): Update.
10177 (process_full_comp_unit, process_full_type_unit): Clear the method
10178 list. Remove cleanups.
10179 (psymtab_include_file_name): Add name_holder parameter. Use
10180 unique_xmalloc_ptr.
10181 (dwarf_decode_lines): Update.
10182
10183 2018-01-17 Tom Tromey <tom@tromey.com>
10184 Simon Marchi <simon.marchi@ericsson.com>
10185
10186 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
10187 (dwarf2_per_objfile::free_cached_comp_units)
10188 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10189 (init_cutu_and_read_dies_no_follow): Update.
10190 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
10191 (dwarf2_cu::~dwarf2_cu): New.
10192 (free_heap_comp_unit, free_stack_comp_unit): Remove.
10193 (age_cached_comp_units, free_one_cached_comp_unit): Update.
10194
10195 2018-01-17 Tom Tromey <tom@tromey.com>
10196 Simon Marchi <simon.marchi@ericsson.com>
10197
10198 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
10199 (struct die_reader_specs) <abbrev_table>: New member.
10200 (struct abbrev_table): Add constructor.
10201 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
10202 <abbrev_obstack>: Now an auto_obstack.
10203 (abbrev_table_up): New typedef.
10204 (init_cu_die_reader): Add abbrev_table parameter.
10205 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
10206 Add result_dwo_abbrev_table.
10207 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10208 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
10209 Update.
10210 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
10211 parameter.
10212 (skip_children): Update.
10213 (abbrev_table::alloc_abbrev): Rename from
10214 abbrev_table_alloc_abbrev.
10215 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
10216 (abbrev_table::lookup_abbrev): Rename from
10217 abbrev_table_lookup_abbrev.
10218 (abbrev_table_read_table): Return abbrev_table_up.
10219 (abbrev_table_free, abbrev_table_free_cleanup)
10220 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
10221 (load_partial_dies): Update.
10222
10223 2018-01-17 Tom Tromey <tom@tromey.com>
10224
10225 * dwarf2read.c (dwarf2_compute_name): Update comment.
10226 (read_func_scope, read_variable): Update.
10227 (new_symbol): Remove.
10228 (new_symbol_full): Rename to new_symbol.
10229
10230 2018-01-17 Mike Gulick <mgulick@mathworks.com>
10231
10232 PR gdb/16577
10233 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
10234 a warning instead of throwing an error, set section size to 0 and return
10235 NULL.
10236 * gdb_bfd.h (gdb_bfd_map_section): Update description.
10237
10238 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
10239
10240 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
10241 std::string.
10242 (linux_ptrace_attach_fail_reason_string): Likewise.
10243 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
10244 Likewise.
10245 (linux_ptrace_attach_fail_reason_string): Likewise.
10246 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
10247
10248 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
10249
10250 * linux-nat.c (linux_nat_attach): Remove xstrdup.
10251
10252 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
10253
10254 PR gdb/21559
10255 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
10256 checking for fs_base/gs_base fields in struct user_regs_struct.
10257 * configure: Regenerate.
10258
10259 2018-01-17 Yao Qi <yao.qi@linaro.org>
10260
10261 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
10262 function.
10263 (aarch64_linux_init_abi): Install it to gdbarch hook
10264 gcc_target_options.
10265
10266 2018-01-15 Pedro Alves <palves@redhat.com>
10267
10268 * common/signals-state-save-restore.c
10269 (save_original_signals_state): Fix typos.
10270
10271 2017-01-12 Tom Tromey <tom@tromey.com>
10272 Sergio Durigan Junior <sergiodj@redhat.com>
10273
10274 * Makefile.in (install-only): Install gdb-add-index.
10275
10276 2018-01-12 John Baldwin <jhb@FreeBSD.org>
10277
10278 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
10279
10280 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
10281
10282 * infrun.c (keep_going_pass_signal): Clear step-over info when
10283 insert_breakpoints fails.
10284
10285 2018-01-11 Pedro Alves <palves@redhat.com>
10286
10287 PR gdb/22583
10288 * infrun.c (resume): Rename to ...
10289 (resume_1): ... this.
10290 (resume): Reimplement as wrapper around resume_1.
10291
10292 2018-01-11 Pedro Alves <palves@redhat.com>
10293
10294 PR remote/22597
10295 * remote.c (remote_parse_stop_reply): Default to the last-set
10296 general thread instead of to 'magic_null_ptid'.
10297
10298 2018-01-10 Pedro Alves <palves@redhat.com>
10299
10300 * language.h (language_get_symbol_name_matcher): Rename ...
10301 (get_symbol_name_matcher): ... this.
10302 * language.c (language_get_symbol_name_matcher): Ditto.
10303 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
10304 callers adjusted.
10305
10306 2018-01-10 Pedro Alves <palves@redhat.com>
10307
10308 PR gdb/22670
10309 * dwarf2read.c
10310 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
10311 Adjust to use language_get_symbol_name_matcher instead of
10312 language_defn::la_get_symbol_name_matcher.
10313 * language.c (language_get_symbol_name_matcher): If in Ada mode
10314 and the lookup name is a verbatim match, return Ada's matcher.
10315 * language.h (language_get_symbol_name_matcher): Adjust comment.
10316 (ada_lookup_name_info::verbatim_p):: New method.
10317
10318 2018-01-10 Pedro Alves <palves@redhat.com>
10319
10320 PR gdb/22670
10321 * ada-lang.c (ada_collect_symbol_completion_matches): If the
10322 minsym's language is language_auto or language_cplus, pass down
10323 language_ada instead.
10324 * symtab.c (compare_symbol_name): Don't frob symbol language here.
10325
10326 2018-01-10 Pedro Alves <palves@redhat.com>
10327
10328 PR gdb/22670
10329 * minsyms.c (linkage_name_str): New function.
10330 (iterate_over_minimal_symbols): Use it.
10331
10332 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10333
10334 * NEWS: Document that 'info proc' now works on FreeBSD.
10335
10336 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10337
10338 * configure.ac: Check for kinfo_getfile in libutil.
10339 * configure: Regenerate.
10340 * config.in: Regenerate.
10341 * fbsd-nat.c: Include "fbsd-tdep.h".
10342 (fbsd_fetch_cmdline): New.
10343 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
10344 rather than calling error.
10345 (fbsd_info_proc): New.
10346 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
10347 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
10348 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
10349
10350 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10351
10352 * fbsd-nat.c (struct free_deleter): Remove.
10353 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
10354
10355 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10356
10357 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
10358 NULL for an empty pathname.
10359
10360 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10361
10362 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
10363 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
10364 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
10365 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
10366 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
10367 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
10368 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
10369 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
10370 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
10371 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
10372 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
10373 (fbsd_core_fetch_timeval, fbsd_print_sigset)
10374 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
10375 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
10376 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
10377
10378 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
10379
10380 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
10381 (gnu_xfer_auxv): New function.
10382 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
10383 TARGET_OBJECT_AUXV.
10384
10385 2018-01-08 Yao Qi <yao.qi@linaro.org>
10386 Simon Marchi <simon.marchi@ericsson.com>
10387
10388 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
10389 common/selftest.c.
10390 (COMMON_OBS): Remove selftest.o.
10391 * configure.ac: Append selftest-arch.c and common/selftest.c to
10392 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
10393 * configure: Re-generated.
10394 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
10395 GDB_SELF_TEST.
10396 (maintenance_info_selftests): Likewise.
10397
10398 2018-01-08 Xavier Roirand <roirand@adacore.com>
10399
10400 * ada-valprint.c (val_print_packed_array_elements): Use
10401 proper number of elements when printing an array indexed
10402 by an enumeration type.
10403
10404 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10405
10406 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
10407 (dw2_get_file_names_reader): Adjust.
10408 (lookup_dwo_signatured_type): Adjust.
10409 (lookup_dwp_signatured_type): Adjust.
10410 (lookup_signatured_type): Adjust.
10411 (create_type_unit_group): Adjust.
10412 (get_type_unit_group): Adjust.
10413 (process_psymtab_comp_unit_reader): Adjust.
10414 (build_type_psymtabs_reader): Adjust.
10415 (scan_partial_symbols): Adjust.
10416 (add_partial_symbol): Adjust.
10417 (add_partial_subprogram): Adjust.
10418 (peek_die_abbrev): Adjust.
10419 (fixup_go_packaging): Adjust.
10420 (process_imported_unit_die): Adjust.
10421 (dwarf2_compute_name): Adjust.
10422 (dwarf2_physname): Adjust.
10423 (read_import_statement): Adjust.
10424 (handle_DW_AT_stmt_list): Adjust.
10425 (read_file_scope): Adjust.
10426 (read_func_scope): Adjust.
10427 (read_lexical_block_scope): Adjust.
10428 (read_call_site_scope): Adjust.
10429 (read_variable): Adjust.
10430 (dwarf2_rnglists_process): Adjust.
10431 (dwarf2_ranges_process): Adjust.
10432 (dwarf2_ranges_read): Adjust.
10433 (dwarf2_get_pc_bounds): Adjust.
10434 (dwarf2_record_block_ranges): Adjust.
10435 (dwarf2_add_field): Adjust.
10436 (dwarf2_add_member_fn): Adjust.
10437 (read_structure_type): Adjust.
10438 (process_structure_scope): Adjust.
10439 (read_enumeration_type): Adjust.
10440 (read_array_type): Adjust.
10441 (mark_common_block_symbol_computed): Adjust.
10442 (read_common_block): Adjust.
10443 (read_namespace_type): Adjust.
10444 (read_namespace): Adjust.
10445 (read_module_type): Adjust.
10446 (read_tag_pointer_type): Adjust.
10447 (read_tag_ptr_to_member_type): Adjust.
10448 (read_tag_string_type): Adjust.
10449 (read_subroutine_type): Adjust.
10450 (read_typedef): Adjust.
10451 (read_base_type): Adjust.
10452 (attr_to_dynamic_prop): Adjust.
10453 (read_subrange_type): Adjust.
10454 (read_unspecified_type): Adjust.
10455 (dwarf2_read_abbrevs): Adjust.
10456 (load_partial_dies): Adjust.
10457 (read_partial_die): Adjust.
10458 (find_partial_die): Adjust.
10459 (guess_partial_die_structure_name): Adjust.
10460 (fixup_partial_die): Adjust.
10461 (read_attribute_value): Adjust.
10462 (read_addr_index): Adjust.
10463 (read_addr_index_from_leb128): Adjust.
10464 (read_str_index): Adjust.
10465 (dwarf2_string_attr): Adjust.
10466 (get_debug_line_section): Adjust.
10467 (dwarf_decode_line_header): Adjust.
10468 (lnp_state_machine::check_line_address): Adjust.
10469 (dwarf_decode_lines_1): Adjust.
10470 (dwarf_decode_lines): Adjust.
10471 (dwarf2_start_symtab): Adjust.
10472 (var_decode_location): Adjust.
10473 (new_symbol_full): Adjust.
10474 (dwarf2_const_value_data): Adjust.
10475 (dwarf2_const_value_attr): Adjust.
10476 (dwarf2_const_value): Adjust.
10477 (die_type): Adjust.
10478 (die_containing_type): Adjust.
10479 (build_error_marker_type): Adjust.
10480 (lookup_die_type): Adjust.
10481 (guess_full_die_structure_name): Adjust.
10482 (anonymous_struct_prefix): Adjust.
10483 (determine_prefix): Adjust.
10484 (dwarf2_name): Adjust.
10485 (follow_die_ref_or_sig): Adjust.
10486 (follow_die_offset): Adjust.
10487 (follow_die_ref): Adjust.
10488 (follow_die_sig_1): Adjust.
10489 (follow_die_sig): Adjust.
10490 (get_signatured_type): Adjust.
10491 (get_DW_AT_signature_type): Adjust.
10492 (decode_locdesc): Adjust.
10493 (dwarf_decode_macros): Adjust.
10494 (cu_debug_loc_section): Adjust.
10495 (fill_in_loclist_baton): Adjust.
10496 (dwarf2_symbol_mark_computed): Adjust.
10497 (init_one_comp_unit): Don't assign
10498 dwarf2_cu::dwarf2_per_objfile.
10499 (set_die_type): Adjust.
10500
10501 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
10502
10503 * dwarf2read.c (struct mapped_debug_names): Add constructor.
10504 <dwarf2_per_objfile>: New field.
10505 (dwarf2_per_objfile): Remove global.
10506 (get_dwarf2_per_objfile): New function.
10507 (set_dwarf2_per_objfile): New function.
10508 (dwarf2_build_psymtabs_hard): Change objfile parameter to
10509 dwarf2_per_objfile.
10510 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
10511 (read_abbrev_offset): Likewise.
10512 (read_indirect_string): Likewise.
10513 (read_indirect_line_string): Likewise.
10514 (read_indirect_string_at_offset): Likewise.
10515 (read_indirect_string_from_dwz): Likewise.
10516 (dwarf2_find_containing_comp_unit): Change objfile parameter to
10517 dwarf2_per_objfile.
10518 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
10519 (create_all_comp_units): Change objfile parameter to
10520 dwarf2_per_objfile.
10521 (create_all_type_units): Likewise.
10522 (process_queue): Add dwarf2_per_objfile parameter.
10523 (read_and_check_comp_unit_head): Likewise.
10524 (lookup_dwo_unit_in_dwp): Likewise.
10525 (get_dwp_file): Likewise.
10526 (process_cu_includes): Likewise.
10527 (struct free_dwo_file_cleanup_data): New struct.
10528 (dwarf2_has_info): Use get_dwarf2_per_objfile and
10529 set_dwarf2_per_objfile.
10530 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
10531 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
10532 context, adjust calls.
10533 (dw2_instantiate_symtab): Likewise.
10534 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
10535 (dw2_get_cu): Likewise.
10536 (create_cu_from_index_list): Change objfile parameter to
10537 dwarf2_per_objfile.
10538 (create_cus_from_index_list): Get dwarf2_per_objfile from
10539 context, adjust calls.
10540 (create_cus_from_index): Likewise.
10541 (create_signatured_type_table_from_index): Change objfile
10542 parameter to dwarf2_per_objfile.
10543 (create_signatured_type_table_from_debug_names): Change objfile
10544 parameter to dwarf2_per_objfile.
10545 (create_addrmap_from_index): Likewise.
10546 (create_addrmap_from_aranges): Likewise.
10547 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
10548 (dw2_setup): Remove.
10549 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
10550 context.
10551 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
10552 get_dwarf2_per_objfile.
10553 (dw2_forget_cached_source_info): Likewise.
10554 (dw2_map_symtabs_matching_filename): Likewise.
10555 (struct dw2_symtab_iterator) <index>: Remove.
10556 <dwarf2_per_objfile>: New field.
10557 (dw2_symtab_iter_init): Replace index parameter with
10558 dwarf2_per_objfile.
10559 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
10560 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
10561 (dw2_print_stats): Likewise.
10562 (dw2_dump): Likewise.
10563 (dw2_expand_symtabs_for_function): Likewise.
10564 (dw2_expand_all_symtabs): Likewise.
10565 (dw2_expand_symtabs_with_fullname): Likewise.
10566 (dw2_expand_marked_cus): Replace index and objfile parameters
10567 with dwarf2_per_objfile.
10568 (dw_expand_symtabs_matching_file_matcher): Add
10569 dwarf2_per_objfile parameter and adjust calls.
10570 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
10571 adjust calls.
10572 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
10573 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
10574 adjust calls.
10575 (create_cus_from_debug_names_list): Replace objfile parameter
10576 with dwarf2_per_objfile and adjust calls.
10577 (create_cus_from_debug_names): Likewise.
10578 (dwarf2_read_debug_names): Likewise.
10579 (mapped_debug_names::namei_to_name): Adjust call.
10580 (dw2_debug_names_iterator::next): Likewise.
10581 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
10582 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
10583 (dw2_debug_names_dump): Likewise.
10584 (dw2_debug_names_expand_symtabs_for_function): Likewise.
10585 (dw2_debug_names_expand_symtabs_matching): Likewise.
10586 (dwarf2_initialize_objfile): Likewise.
10587 (dwarf2_build_psymtabs): Likewise.
10588 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
10589 this_cu.
10590 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
10591 (read_and_check_comp_unit_head): Likewise.
10592 (read_abbrev_offset): Likewise.
10593 (create_debug_type_hash_table): Likewise.
10594 (create_debug_types_hash_table): Likewise.
10595 (create_all_type_units): Replace objfile parameter with
10596 dwarf2_per_objfile.
10597 (add_type_unit): Add dwarf2_per_objfile parameter.
10598 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
10599 with dwarf2_per_objfile.
10600 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
10601 (lookup_dwp_signatured_type): Likewise.
10602 (lookup_signatured_type): Likewise.
10603 (read_cutu_die_from_dwo): Likewise.
10604 (init_tu_and_read_dwo_dies): Likewise.
10605 (init_cutu_and_read_dies): Likewise.
10606 (init_cutu_and_read_dies_no_follow): Likewise.
10607 (allocate_type_unit_groups_table): Add objfile parameter.
10608 (create_type_unit_group): Use dwarf2_per_objfile from cu.
10609 (get_type_unit_group): Likewise.
10610 (process_psymtab_comp_unit): Update call.
10611 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
10612 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
10613 (print_tu_stats): Likewise.
10614 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
10615 in void* parameter.
10616 (build_type_psymtabs): Change objfile parameter to
10617 dwarf2_per_objfile.
10618 (process_skeletonless_type_unit): Use dwarf2_per_objfile
10619 passed in void* parameter.
10620 (process_skeletonless_type_units): Change objfile parameter to
10621 dwarf2_per_objfile.
10622 (set_partial_user): Likewise.
10623 (dwarf2_build_psymtabs_hard): Likewise.
10624 (read_comp_units_from_section): Likewise.
10625 (create_all_comp_units): Likewise.
10626 (scan_partial_symbols): Update calls.
10627 (add_partial_symbol): Likewise.
10628 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
10629 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
10630 (process_queue): Add dwarf2_per_objfile parameter.
10631 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
10632 (compute_compunit_symtab_includes): Likewise.
10633 (process_cu_includes): Add dwarf2_per_objfile parameter.
10634 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
10635 (process_full_type_unit): Likewise.
10636 (process_imported_unit_die): Update call.
10637 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
10638 (read_file_scope): Likewise.
10639 (allocate_dwo_file_hash_table): Add objfile parameter.
10640 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
10641 (create_cus_hash_table): Likewise.
10642 (create_dwp_hash_table): Likewise.
10643 (create_dwo_unit_in_dwp_v1): Likewise.
10644 (create_dwp_v2_section): Likewise.
10645 (create_dwo_unit_in_dwp_v2): Likewise.
10646 (lookup_dwo_unit_in_dwp): Likewise.
10647 (try_open_dwop_file): Likewise.
10648 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
10649 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
10650 cleanup to include a reference to dwarf2_per_objfile.
10651 (open_dwp_file): Add dwarf2_per_objfile parameter.
10652 (open_and_init_dwp_file): Likewise.
10653 (get_dwp_file): Likewise.
10654 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
10655 (queue_and_load_all_dwo_tus): Update call.
10656 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
10657 data.
10658 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
10659 (dwarf2_ranges_process): Likewise.
10660 (dwarf2_get_pc_bounds): Likewise.
10661 (mark_common_block_symbol_computed): Likewise.
10662 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
10663 (dwarf2_read_abbrevs): Update call.
10664 (read_partial_die): Use dwarf2_per_objfile from cu.
10665 (find_partial_die): Likewise.
10666 (fixup_partial_die): Likewise.
10667 (read_attribute_value): Likewise.
10668 (read_indirect_string_at_offset_from): Add objfile parameter.
10669 (read_indirect_string_at_offset): Add dwarf2_per_objfile
10670 parameter.
10671 (read_indirect_string_from_dwz): Add objfile parameter.
10672 (read_indirect_string): Add objfile parameter.
10673 (read_addr_index_1): Add dwarf2_per_objfile parameter.
10674 (read_addr_index): Use dwarf2_per_objfile from cu.
10675 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
10676 call dw2_setup.
10677 (read_str_index): Use dwarf2_per_objfile from cu.
10678 (get_debug_line_section): Likewise.
10679 (read_formatted_entries): Add dwarf2_per_objfile parameter.
10680 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
10681 (new_symbol_full): Use dwarf2_per_objfile from cu.
10682 (build_error_marker_type): Likewise.
10683 (lookup_die_type): Likewise.
10684 (determine_prefix): Likewise.
10685 (follow_die_offset): Likewise.
10686 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
10687 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
10688 (dwarf2_fetch_die_type_sect_off): Likewise.
10689 (dwarf2_get_die_type): Likewise.
10690 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
10691 (get_signatured_type): Likewise.
10692 (get_DW_AT_signature_type): Likewise.
10693 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
10694 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
10695 (cu_debug_loc_section): Likewise.
10696 (fill_in_loclist_baton): Likewise.
10697 (dwarf2_symbol_mark_computed): Likewise.
10698 (dwarf2_find_containing_comp_unit): Change objfile parameter to
10699 dwarf2_per_objfile.
10700 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
10701 parameter.
10702 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
10703 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
10704 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
10705 (set_die_type): Use dwarf2_free_objfile from cu.
10706 (get_die_type_at_offset): Likewise.
10707 (dwarf2_per_objfile_free): Don't assign global variable.
10708 (debug_names) <constructor>: Add dwarf2_per_objfile
10709 parameter, update m_debugstrlookup construction.
10710 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
10711 parameter.
10712 <m_dwarf2_per_objfile>: New field.
10713 <lookup>: Use m_dwarf2_per_objfile.
10714 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
10715 (psyms_seen_size): Likewise.
10716 (write_gdbindex): Replace objfile parameter with
10717 dwarf2_per_objfile.
10718 (write_debug_names): Likewise.
10719 (write_psymtabs_to_index): Likewise.
10720 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
10721 calls.
10722
10723 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
10724
10725 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
10726 <dwarf2_per_objfile>: New field.
10727 (struct dwarf2_per_cu_data) <objfile>: Remove.
10728 <dwarf2_per_objfile>: New field.
10729 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
10730 of objfile.
10731 (create_signatured_type_table_from_index): Likewise.
10732 (create_debug_type_hash_table): Likewise.
10733 (fill_in_sig_entry_from_dwo_entry): Likewise.
10734 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
10735 (create_type_unit_group): Assign dwarf2_per_objfile instead of
10736 objfile.
10737 (create_partial_symtab): Access objfile through
10738 dwarf2_per_objfile.
10739 (process_psymtab_comp_unit_reader): Likewise.
10740 (read_comp_units_from_section): Likewise.
10741 (scan_partial_symbols): Likewise.
10742 (add_partial_symbol): Likewise.
10743 (add_partial_subprogram): Likewise.
10744 (peek_die_abbrev): Likewise.
10745 (fixup_go_packaging): Likewise.
10746 (process_full_comp_unit): Likewise.
10747 (process_full_type_unit): Likewise.
10748 (process_imported_unit_die): Likewise.
10749 (dwarf2_compute_name): Likewise.
10750 (dwarf2_physname): Likewise.
10751 (read_import_statement): Likewise.
10752 (create_cus_hash_table): Assign dwarf2_physname instead of
10753 objfile.
10754 (read_func_scope): Access objfile through dwarf2_per_objfile.
10755 (read_lexical_block_scope): Likewise.
10756 (read_call_site_scope): Likewise.
10757 (read_variable): Likewise.
10758 (dwarf2_rnglists_process): Likewise.
10759 (dwarf2_ranges_process): Likewise.
10760 (dwarf2_ranges_read): Likewise.
10761 (dwarf2_record_block_ranges): Likewise.
10762 (dwarf2_add_field): Likewise.
10763 (dwarf2_add_member_fn): Likewise.
10764 (read_structure_type): Likewise.
10765 (process_structure_scope): Likewise.
10766 (read_enumeration_type): Likewise.
10767 (read_array_type): Likewise.
10768 (read_common_block): Likewise.
10769 (read_namespace_type): Likewise.
10770 (read_namespace): Likewise.
10771 (read_module_type): Likewise.
10772 (read_tag_pointer_type): Likewise.
10773 (read_tag_ptr_to_member_type): Likewise.
10774 (read_tag_string_type): Likewise.
10775 (read_subroutine_type): Likewise.
10776 (read_typedef): Likewise.
10777 (read_base_type): Likewise.
10778 (attr_to_dynamic_prop): Likewise.
10779 (read_subrange_type): Likewise.
10780 (read_unspecified_type): Likewise.
10781 (load_partial_dies): Likewise.
10782 (read_partial_die): Likewise.
10783 (find_partial_die): Likewise.
10784 (guess_partial_die_structure_name): Likewise.
10785 (fixup_partial_die): Likewise.
10786 (read_attribute_value): Likewise.
10787 (read_addr_index_from_leb128): Likewise.
10788 (dwarf2_read_addr_index): Likewise.
10789 (dwarf2_string_attr): Likewise.
10790 (lnp_state_machine::check_line_address): Likewise.
10791 (dwarf_decode_lines_1): Likewise.
10792 (dwarf_decode_lines): Likewise.
10793 (dwarf2_start_symtab): Likewise.
10794 (var_decode_location): Likewise.
10795 (new_symbol_full): Likewise.
10796 (dwarf2_const_value_data): Likewise.
10797 (dwarf2_const_value_attr): Likewise.
10798 (dwarf2_const_value): Likewise.
10799 (die_type): Likewise.
10800 (die_containing_type): Likewise.
10801 (lookup_die_type): Likewise.
10802 (guess_full_die_structure_name): Likewise.
10803 (anonymous_struct_prefix): Likewise.
10804 (dwarf2_name): Likewise.
10805 (follow_die_ref_or_sig): Likewise.
10806 (follow_die_offset): Likewise.
10807 (follow_die_ref): Likewise.
10808 (dwarf2_fetch_die_loc_sect_off): Likewise.
10809 (dwarf2_fetch_constant_bytes): Likewise.
10810 (dwarf2_fetch_die_type_sect_off): Likewise.
10811 (dwarf2_get_die_type): Likewise.
10812 (follow_die_sig): Likewise.
10813 (decode_locdesc): Likewise.
10814 (dwarf2_per_cu_objfile): Likewise.
10815 (dwarf2_per_cu_text_offset): Likewise.
10816 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
10817 objfile.
10818 (set_die_type): Access objfile through
10819 dwarf2_per_objfile.
10820
10821 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
10822
10823 * valprint.c (converted_character_d): Remove typedef.
10824 (DEF_VEC_O (converted_character_d)): Remove.
10825 (count_next_character): Use std::vector.
10826 (print_converted_chars_to_obstack): Likewise.
10827 (generic_printstr): Likewise.
10828
10829 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10830
10831 * xml-support.h (struct gdb_xml_value): Add constructor.
10832 <value>: Change type to unique_xmalloc_ptr.
10833 (gdb_xml_value_s): Remove typedef.
10834 (DEF_VEC_O (gdb_xml_value_s)): Remove.
10835 (gdb_xml_element_start_handler): Change parameter type to
10836 std::vector.
10837 (xml_find_attribute): Likewise.
10838 * xml-support.c (xml_find_attribute): Change parameter type to
10839 std::vector and adjust.
10840 (gdb_xml_values_cleanup): Remove.
10841 (gdb_xml_parser::start_element): Adjust to std::vector.
10842 (xinclude_start_include): Change paraeter type to std::vector
10843 and adjust.
10844 * btrace.c (check_xml_btrace_version): Likewise.
10845 (parse_xml_btrace_block): Likewise.
10846 (parse_xml_btrace_pt_config_cpu): Likewise.
10847 (parse_xml_btrace_pt): Likewise.
10848 (parse_xml_btrace_conf_bts): Likewise.
10849 (parse_xml_btrace_conf_pt): Likewise.
10850 * memory-map.c (memory_map_start_memory): Likewise.
10851 (memory_map_start_property): Likewise.
10852 * osdata.c (osdata_start_osdata): Likewise.
10853 (osdata_start_item): Likewise.
10854 (osdata_start_column): Likewise.
10855 * remote.c (start_thread): Likewise.
10856 * solib-aix.c (library_list_start_library): Likewise.
10857 (library_list_start_list): Likewise.
10858 * solib-svr4.c (library_list_start_library): Likewise.
10859 (svr4_library_list_start_list): Likewise.
10860 * solib-target.c (library_list_start_segment): Likewise.
10861 (library_list_start_section): Likewise.
10862 (library_list_start_library): Likewise.
10863 (library_list_start_list): Likewise.
10864 * tracepoint.c (traceframe_info_start_memory): Likewise.
10865 (traceframe_info_start_tvar): Likewise.
10866 * xml-syscall.c (syscall_start_syscall): Likewise.
10867 * xml-tdesc.c (tdesc_start_target): Likewise.
10868 (tdesc_start_feature): Likewise.
10869 (tdesc_start_reg): Likewise.
10870 (tdesc_start_union): Likewise.
10871 (tdesc_start_struct): Likewise.
10872 (tdesc_start_flags): Likewise.
10873 (tdesc_start_enum): Likewise.
10874 (tdesc_start_field): Likewise.
10875 (tdesc_start_enum_value): Likewise.
10876 (tdesc_start_vector): Likewise.
10877
10878 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10879
10880 * extension.h (struct xmethod_worker) <clone>: Remove.
10881 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
10882 Remove.
10883 (python_xmethod_worker::clone): Remove.
10884 * valops.c (find_overload_match): Use std::move instead of
10885 clone.
10886
10887 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10888
10889 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
10890 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
10891 <free_xmethod_worker_data>: Remove.
10892 <get_matching_xmethod_workers>: Chance VEC to std::vector.
10893 <get_xmethod_arg_types>: Remove.
10894 <get_xmethod_result_type>: Remove.
10895 <invoke_xmethod>: Remove.
10896 * extension.c (new_xmethod_worker): Remove.
10897 (clone_xmethod_worker): Remove.
10898 (get_matching_xmethod_workers): Return void, pass std::vector by
10899 pointer.
10900 (get_xmethod_arg_types): Rename to...
10901 (xmethod_worker::get_arg_types): ... this, and adjust.
10902 (get_xmethod_result_type): Rename to...
10903 (xmethod_worker::get_result_type): ... this, and adjust.
10904 (invoke_xmethod): Remove.
10905 (free_xmethod_worker): Remove.
10906 (free_xmethod_worker_vec): Remove.
10907 * extension.h (enum ext_lang_rc): Move here from
10908 extension-priv.h.
10909 (struct xmethod_worker): Add constructor and destructor.
10910 <data>: Remove.
10911 <value>: Remove.
10912 <invoke, clone, do_get_result_type, do_get_arg_types>: New
10913 virtual pure methods.
10914 <get_arg_types, get_result_type>: New methods.
10915 (xmethod_worker_ptr): Remove typedef.
10916 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
10917 (xmethod_worker_vec): Remove typedef.
10918 (xmethod_worker_up): New typedef.
10919 (invoke_xmethod): Remove.
10920 (clone_xmethod_worker): Remove.
10921 (free_xmethod_worker): Remove.
10922 (free_xmethod_worker_vec): Remove.
10923 (get_xmethod_arg_types): Remove.
10924 (get_xmethod_result_type): Remove.
10925 * valops.c (find_method_list): Use std::vector, don't use
10926 intermediate vector.
10927 (value_find_oload_method_list): Use std::vector.
10928 (find_overload_match): Use std::vector.
10929 (find_oload_champ): Use std::vector.
10930 * value.c (value_free): Use operator delete.
10931 (value_of_xmethod): Rename to...
10932 (value_from_xmethod): ... this. Don't assign
10933 xmethod_worker::value, take rvalue-reference.
10934 (result_type_of_xmethod): Adjust.
10935 (call_xmethod): Adjust.
10936 * value.h: Include extension.h.
10937 (struct xmethod_worker): Don't forward-declare.
10938 (value_of_xmethod): Rename to...
10939 (value_from_xmethod): ... this, take rvalue-reference.
10940 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
10941 (struct python_xmethod_worker): ... this, add constructor and
10942 destructor.
10943 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
10944 (gdbpy_free_xmethod_worker_data): Rename to...
10945 (python_xmethod_worker::~python_xmethod_worker): ... this and
10946 adjust.
10947 (gdbpy_clone_xmethod_worker_data): Rename to...
10948 (python_xmethod_worker::clone): ... this and adjust.
10949 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
10950 temporary vector.
10951 (gdbpy_get_xmethod_arg_types): Rename to...
10952 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
10953 (gdbpy_get_xmethod_result_type): Rename to...
10954 (python_xmethod_worker::do_get_result_type): ... this and
10955 adjust.
10956 (gdbpy_invoke_xmethod): Rename to...
10957 (python_xmethod_worker::invoke): ... this and adjust.
10958 (new_python_xmethod_worker): Rename to...
10959 (python_xmethod_worker::python_xmethod_worker): ... this and
10960 adjust.
10961 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
10962 Remove.
10963 (gdbpy_free_xmethod_worker_data): Remove.
10964 (gdbpy_get_matching_xmethod_workers): Use std::vector.
10965 (gdbpy_get_xmethod_arg_types): Remove.
10966 (gdbpy_get_xmethod_result_type): Remove.
10967 (gdbpy_invoke_xmethod): Remove.
10968 * python/python.c (python_extension_ops): Remove obsolete
10969 callbacks.
10970
10971 2018-01-05 Pedro Alves <palves@redhat.com>
10972
10973 PR gdb/18653
10974 * common/signals-state-save-restore.c
10975 (save_original_signals_state): New parameter 'quiet'. Warn if we
10976 find a custom handler preinstalled, instead of internal erroring.
10977 But only warn if !quiet.
10978 * common/signals-state-save-restore.h
10979 (save_original_signals_state): New parameter 'quiet'.
10980 * main.c (captured_main_1): Move save_original_signals_state call
10981 after option handling, and pass QUIET.
10982
10983 2018-01-05 Pedro Alves <palves@redhat.com>
10984
10985 * spu-tdep.c (spu_catch_start): Pass
10986 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
10987
10988 2018-01-05 Pedro Alves <palves@redhat.com>
10989
10990 PR gdb/22670
10991 * ada-lang.c (literal_symbol_name_matcher): New function.
10992 (ada_get_symbol_name_matcher): Use it for
10993 symbol_name_match_type::SEARCH_NAME.
10994 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
10995 it down instead of assuming symbol_name_match_type::FULL.
10996 * block.h (block_lookup_symbol): New parameter 'match_type'.
10997 * c-valprint.c (print_unpacked_pointer): Use
10998 lookup_symbol_search_name instead of lookup_symbol.
10999 * compile/compile-object-load.c (get_out_value_type): Pass down
11000 symbol_name_match_type::SEARCH_NAME.
11001 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
11002 symbol_name_match_type::FULL.
11003 * cp-support.c (cp_get_symbol_name_matcher): Handle
11004 symbol_name_match_type::SEARCH_NAME.
11005 * infrun.c (insert_exception_resume_breakpoint): Use
11006 lookup_symbol_search_name.
11007 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
11008 * psymtab.c (maintenance_check_psymtabs): Use
11009 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
11010 * stack.c (print_frame_args): Use lookup_symbol_search_name and
11011 SYMBOL_SEARCH_NAME.
11012 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
11013 if symbol_name_match_type::SEARCH_NAME.
11014 (lookup_symbol_in_language): Pass down
11015 symbol_name_match_type::FULL.
11016 (lookup_symbol_search_name): New.
11017 (lookup_language_this): Pass down
11018 symbol_name_match_type::SEARCH_NAME.
11019 (lookup_symbol_aux, lookup_local_symbol): New parameter
11020 'match_type'. Pass it down.
11021 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
11022 (lookup_symbol_search_name): New declaration.
11023 (lookup_symbol_in_block): New 'match_type' parameter.
11024
11025 2018-01-05 Pedro Alves <palves@redhat.com>
11026
11027 PR gdb/22670
11028 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
11029 ada_lookup_symbol.
11030 (ada_lookup_symbol): Reimplement in terms of
11031 ada_lookup_symbol_list, bits factored out from
11032 ada_lookup_encoded_symbol.
11033
11034 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11035
11036 * ada-exp.y (write_object_renaming): When subscripting an array
11037 using a symbol as the index, pass the block in call to
11038 ada_lookup_encoded_symbol when looking that symbol up.
11039
11040 2018-01-05 Jerome Guitton <guitton@adacore.com>
11041
11042 * ada-lang.c (ada_array_length): Use ada_index_type instead of
11043 TYPE_INDEX_TYPE.
11044
11045 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11046
11047 * ada-lang.c (ada_to_fixed_value_create): Add handling of
11048 the case where VALUE_LVAL (val0) is not lval_memory.
11049
11050 2018-01-05 Xavier Roirand <roirand@adacore.com>
11051
11052 * ada-valprint.c (print_optional_low_bound): Handle
11053 character-indexed array printing like boolean-indexed array
11054 printing.
11055
11056 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11057
11058 * NEWS: Create a new section for the next release branch.
11059 Rename the section of the current branch, now that it has
11060 been cut.
11061
11062 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11063
11064 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
11065 * version.in: Bump version to 8.1.50.DATE-git.
11066
11067 2018-01-03 Xavier Roirand <roirand@adacore.com>
11068
11069 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
11070 Add field.
11071 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
11072 Add field.
11073 (default_exception_support_info) <catch_handlers_sym>: Add field.
11074 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
11075 (ada_exception_name_addr_1): Add "catch handlers" handling.
11076 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
11077 Update all callers.
11078 (create_excep_cond_exprs) <ex>: Add parameter.
11079 (re_set_exception): Update create_excep_cond_exprs call.
11080 (print_it_exception, print_one_exception, print_mention_exception)
11081 (print_recreate_exception): Add "catch handler" handling.
11082 (allocate_location_catch_handlers, re_set_catch_handlers)
11083 (check_status_catch_handlers, print_it_catch_handlers)
11084 (print_one_catch_handlers, print_mention_catch_handlers)
11085 (print_recreate_catch_handlers): New function.
11086 (catch_handlers_breakpoint_ops): New variable.
11087 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
11088 Add parameter. Add "catch handler" handling.
11089 (ada_exception_sym_name, ada_exception_breakpoint_ops):
11090 Add "catch handler" handling.
11091 (ada_exception_catchpoint_cond_string): Add "catch handler"
11092 handling.
11093 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
11094 call.
11095 (catch_ada_handlers_command): New function.
11096 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
11097 operations structure.
11098 (_initialize_ada_language): Add "catch handlers" command entry.
11099 * NEWS: Document "catch handlers" feature.
11100
11101 2018-01-02 Joel Brobecker <brobecker@adacore.com>
11102
11103 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
11104 account when creating the array type of the slice.
11105 (ada_value_slice): Likewise.
11106
11107 2018-01-02 Joel Brobecker <brobecker@adacore.com>
11108
11109 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
11110 New enum value.
11111 (create_array_type_with_stride): Add byte_stride_prop parameter.
11112 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
11113 New parameter. Update all callers in this file.
11114 (array_type_has_dynamic_stride): New function.
11115 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
11116 of arrays with dynamic byte strides.
11117 * dwarf2read.c (read_array_type): Add support for dynamic
11118 DW_AT_byte_stride attributes.
11119
11120 2018-01-02 Joel Brobecker <brobecker@adacore.com>
11121
11122 * dwarf2read.c (read_unspecified_type): Treat
11123 DW_TAG_enumeration_type DIEs from Ada units as stubs.
11124
11125 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11126
11127 Update copyright year range in all GDB files.
11128
11129 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11130
11131 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
11132 and gdb/testsuite/gdb.base/step-line.c.
11133
11134 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11135
11136 * copyright.py (main): Dump the contents of
11137 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
11138 even if BY_HAND is empty.
11139
11140 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11141
11142 * top.c (print_gdb_version): Update Copyright year in version
11143 message.
11144
11145 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11146
11147 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
11148
11149 For older changes see ChangeLog-2017.
11150 \f
11151 Local Variables:
11152 mode: change-log
11153 left-margin: 8
11154 fill-column: 74
11155 version-control: never
11156 coding: utf-8
11157 End:
This page took 0.513392 seconds and 4 git commands to generate.