]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/ChangeLog
Remove old lint code
[thirdparty/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
dba7455e
TT
12018-07-30 Tom Tromey <tom@tromey.com>
2
3 * cli/cli-decode.c (lookup_cmd): Remove lint code.
4 * value.c (unpack_long): Remove lint code.
5 * valops.c (value_ind): Remove lint code.
6 * valarith.c (value_x_binop, value_x_unop, value_equal)
7 (value_pos): Remove lint code.
8
37cc0cae
TV
92018-07-28 Tom de Vries <tdevries@suse.de>
10
11 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
12 with undefined upper bound as <optimized out>.
13
129eb0f1
SDJ
142018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
15
16 * gcore.in: Rename variable "name" to "prefix". Expand
17 "usage" text.
18
6af79d7b
JT
192018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
20
21 * windows-nat.c (windows_nat_target::create_inferior): Update to
22 call close() in global namespace.
23
79748972
TT
242018-07-26 Tom Tromey <tom@tromey.com>
25
26 * dwarf-index-write.c (add_address_entry): Don't add objfile
27 offsets.
28 * dbxread.c (find_stab_function): Rename from
29 find_stab_function_addr. Return a bound_minimal_symbol.
30 (read_dbx_symtab): Use raw_text_low, raw_text_high.
31 Don't add objfile offsets.
32 (end_psymtab): Use raw_text_low, raw_text_high,
33 MSYMBOL_VALUE_RAW_ADDRESS.
34 (read_ofile_symtab): Update.
35 (process_one_symbol): Update.
36 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
37 offsets.
38 (dw2_relocate): Remove.
39 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
40 searching addrmap.
41 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
42 Update.
43 (process_psymtab_comp_unit_reader, add_partial_symbol)
44 (add_partial_subprogram, dwarf2_ranges_read): Update.
45 (load_partial_dies): Update.
46 (add_address_entry): Don't add objfile offsets.
47 (dwarf2_build_include_psymtabs): Update.
48 (create_addrmap_from_aranges): Don't add objfile offsets.
49 (dw2_find_pc_sect_compunit_symtab): Update.
50 * mdebugread.c (parse_symbol): Don't add objfile offsets.
51 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
52 Update.
53 (parse_partial_symbols): Don't add objfile offsets. Use
54 raw_text_low, raw_text_high. Update.
55 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
56 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
57 or call 'relocate' quick function. Clear psymbol_map.
58 * psympriv.h (struct partial_symbol) <address>: Add section
59 offset.
60 <set_unrelocated_address>: Rename from set_address.
61 <raw_text_low, raw_text_high>: New methods.
62 <text_low, text_high>: Add objfile parameter.
63 (add_psymbol_to_bcache): Add 'section' parameter. Call
64 set_unrelocated_address.
65 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
66 (find_pc_psymbol): Update.
67 (fixup_psymbol_section, relocate_psymtabs): Remove.
68 (dump_psymtab, psym_functions): Update.
69 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
70 parameter.
71 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
72 (start_psymtab_common): Update.
73 * symfile-debug.c (debug_qf_relocate): Remove.
74 (debug_sym_quick_functions): Update.
75 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
76 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
77 Update.
78
52948f01
TT
792018-07-26 Tom Tromey <tromey@redhat.com>
80
81 * dbxread.c (end_psymtab): Use text_high_valid and
82 text_low_valid.
83 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
84 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
85 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
86 Update comment.
87 <text_low_valid, text_high_valid>: New fields.
88 <set_text_low, set_text_high>: Update.
89 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
90
4ae976d1
TT
912018-07-26 Tom Tromey <tom@tromey.com>
92
93 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
94 Update.
95 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
96 textlow and texthigh fields.
97 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
98 Update.
99 * mdebugread.c (parse_lines, parse_partial_symbols)
100 (psymtab_to_symtab_1): Update.
101 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
102 Rename fields. Update comment. Now private.
103 <text_low, text_high, set_text_low, set_text_high>: New methods.
104 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
105 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
106 (start_psymtab_common, maintenance_info_psymtabs)
107 (maintenance_check_psymtabs): Update.
108 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
109 texthigh fields.
110 (scan_xcoff_symtab): Update.
111
02e9e7f7
TT
1122018-07-26 Tom Tromey <tromey@redhat.com>
113
114 * psympriv.h (struct partial_symbol) <unrelocated_address,
115 address, set_address>: New methods.
116 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
117 (fixup_psymbol_section, relocate_psymtabs): Update.
118 (print_partial_symbols): Add 'objfile' parameter. Update.
119 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
120 Update.
121
8a6d4234
TT
1222018-07-26 Tom Tromey <tom@tromey.com>
123
124 * dwarf-index-write.c (write_psymbols, debug_names::insert)
125 (debug_names::write_psymbols): Update.
126 * psympriv.h (struct partial_symbol): Derive from
127 general_symbol_info.
128 <obj_section>: New method.
129 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
130 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
131 (find_pc_sect_psymbol, fixup_psymbol_section)
132 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
133 (print_partial_symbols, recursively_search_psymtabs)
134 (compare_psymbols, psymbol_hash, psymbol_compare)
135 (add_psymbol_to_bcache, maintenance_check_psymtabs)
136 (psymbol_name_matches, psym_fill_psymbol_map): Update.
137
08994e1d
TT
1382018-07-26 Tom Tromey <tromey@redhat.com>
139
140 * dbxread.c (end_psymtab): Remove dead code.
141
3c3bb058
AB
1422018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
143
144 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
145 DWARF unwinders are disabled.
146 * dwarf2-frame.c: Add dwarf2read.h include.
147 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
148 disabled.
149 (dwarf2_frame_unwinders_enabled_p): Define.
150 (show_dwarf_unwinders_enabled_p): New function.
151 (_initialize_dwarf2_frame): Register switch to control DWARF
152 unwinder use.
153 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
154 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
155 (show_dwarf_cmdlist): Remove static keyword.
156 * dwarf2read.h (set_dwarf_cmdlist): Declare.
157 (show_dwarf_cmdlist): Declare.
158 * NEWS: Document new feature.
159
9e7f3bbb
TV
1602018-07-26 Tom de Vries <tdevries@suse.de>
161
162 PR breakpoints/23366
163 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
164
506f5c41
TV
1652018-07-26 Tom de Vries <tdevries@suse.de>
166
167 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
168 DW_AT_count can't be translated to a dynamic prop.
169
16f808ec
TV
1702018-07-25 Tom de Vries <tdevries@suse.de>
171
172 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
173 try/catch.
174
d7154a8d
JV
1752018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
176
177 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
178
a45389f6
JB
1792018-07-25 Joel Brobecker <brobecker@adacore.com>
180
181 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
182
380618d6
KS
1832018-07-24 Keith Seitz <keiths@redhat.comt
184
185 PR symtab/23010
186 * dwarf2read.c (dw2_add_symbol_to_list): New function.
187 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
188 instead of add_symbol_to_list.
189 (read_file_scope): Call prepare_one_comp_unit before reading
190 any other DIEs.
191
4b17aefe
SM
1922018-07-24 Simon Marchi <simon.marchi@ericsson.com>
193
194 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
195
29d17e47
TT
1962018-07-24 Tom Tromey <tom@tromey.com>
197
198 * utils.c (malloc, realloc, free): Don't declare.
199 * configure, config.in: Rebuild.
200 * configure.ac: Don't check for declarations of free, malloc, or
201 realloc.
202
cf4088a9
SM
2032018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
204
205 * aarch64-linux-nat.c
206 (aarch64_linux_nat_target::stopped_data_address): Remove unused
207 variable.
208 * arm-linux-nat.c (fetch_regs): Likewise.
209 (store_regs): Likewise.
210 (fetch_vfp_regs): Likewise.
211 (store_vfp_regs): Likewise.
212 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
213 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
214 (arm_linux_nat_target::insert_watchpoint): Likewise.
215 (arm_linux_nat_target::remove_watchpoint): Likewise.
216 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
217 Likewise.
218 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
219 Likewise.
220 * ppc-linux-nat.c (fetch_register): Likewise.
221 (fetch_all_gp_regs): Likewise.
222 (fetch_ppc_registers): Likewise.
223 (store_all_gp_regs): Likewise.
224 (store_ppc_registers): Likewise.
225 (hwdebug_insert_point): Likewise.
226 (can_use_watchpoint_cond_accel): Likewise.
227 * remote-sim.c (gdb_os_write_stdout): Likewise.
228
a0de763e
TT
2292018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
230 Tom Tromey <tom@tromey.com>
231
232 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
233 test for it.
234 * configure: Rebuild.
235
3b20124b
TT
2362018-07-22 Tom Tromey <tom@tromey.com>
237
238 * regformats/regdat.sh: Define xmltarget_${name} inside
239 #ifndef IN_PROCESS_AGENT.
240
8c8807f4
TT
2412018-07-22 Tom Tromey <tom@tromey.com>
242
243 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
244
c486b610
TT
2452018-07-22 Tom Tromey <tom@tromey.com>
246
247 * symfile.c (reread_symbols): Notify iter, not objfile.
248
494f80a9
TT
2492018-07-22 Tom Tromey <tom@tromey.com>
250
251 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
252 Use arch_ops.
253 (ravenscar_thread_target::prepare_to_store): Likewise.
254
c51f6a54
TT
2552018-07-22 Tom Tromey <tom@tromey.com>
256
257 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
258 unused variable. Call value_fetch_lazy when needed.
259 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
260 Remove unused variable. Call value_fetch_lazy when needed.
261
374fd1fd
TT
2622018-07-22 Tom Tromey <tom@tromey.com>
263
264 * m32c-tdep.c (mark_dma): Return void.
265 (make_regs): Remove unused declarations.
266
d5e9a511
TT
2672018-07-22 Tom Tromey <tom@tromey.com>
268
269 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
270 cmdscm_get_valid_command_smob_arg_unsafe for effect.
271 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
272 bkscm_get_valid_block_smob_arg_unsafe for effect.
273
996d693a
TT
2742018-07-22 Tom Tromey <tom@tromey.com>
275
276 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
277 value_type.
278
15766370
TT
2792018-07-22 Tom Tromey <tom@tromey.com>
280
281 * windows-nat.c (saved_context): Conditionally define.
282 * remote.c (remote_target::remote_btrace_maybe_reopen):
283 Conditionally declare "warned".
284 * inflow.c (sigquit_ours): Conditionally define.
285 (new_tty): Move "tty" declaration inside #if.
286 * guile/guile.c (guile_datadir): Conditionally define.
287 * charset.c (set_be_le_names): Move some declarations inside #if.
288 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
289 #if.
290 (parse_xml_btrace_conf): Likewise.
291
f4e80e13
TT
2922018-07-22 Tom Tromey <tom@tromey.com>
293
294 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
295
8d49165d
TT
2962018-07-22 Tom Tromey <tom@tromey.com>
297
298 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
299 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
300 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
301 * buildsym-legacy.c (get_macro_table): Remove unused variable.
302 * stack.c (frame_apply_level_command): Remove unused variable.
303 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
304 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
305 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
306 unused variable.
307 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
308 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
309 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
310 variable.
311 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
312 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
313 variable.
314 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
315 Remove unused variable.
316 * cli/cli-script.c (recurse_read_control_structure): Remove unused
317 variable.
318 * common/tdesc.c (print_xml_feature::visit): Remove unused
319 variable.
320 * compile/compile-object-load.c (store_regs): Remove unused
321 variables.
322 * complaints.c (clear_complaints): Remove unused variable.
323 * corelow.c (core_target_open): Remove unused variable.
324 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
325 variable.
326 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
327 variable.
328 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
329 variable.
330 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
331 variable.
332 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
333 variable.
334 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
335 variable.
336 * ia64-tdep.c (examine_prologue): Remove unused variable.
337 * infcall.c (run_inferior_call): Remove unused variable.
338 * inferior.c (exit_inferior): Remove unused variable.
339 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
340 * linespec.c (decode_line_2): Remove unused variable.
341 * linux-nat.c (super_close): Remove.
342 * linux-tdep.c (linux_info_proc): Remove unused variable.
343 * mi/mi-main.c (mi_execute_command): Remove unused variable.
344 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
345 Remove unused variable.
346 * parse.c (find_minsym_type_and_address): Remove unused variable.
347 * printcmd.c (info_symbol_command, printf_floating): Remove unused
348 variable.
349 * python/py-breakpoint.c (bppy_set_commands): Remove unused
350 variable.
351 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
352 variables.
353 * record-btrace.c (record_btrace_target::store_registers): Remove
354 unused variable.
355 (cmd_show_record_btrace_cpu): Remove unused variable.
356 * riscv-tdep.c (riscv_register_reggroup_p)
357 (riscv_push_dummy_call, riscv_return_value): Remove unused
358 variable.
359 * rust-exp.y (literal): Remove unused variable.
360 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
361 unused variable.
362 <STRUCTOP_ANONYMOUS>: Likewise.
363 * s390-linux-tdep.c (s390_linux_init_abi_31)
364 (s390_linux_init_abi_64): Remove unused variable.
365 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
366 (file_select_thread, net_windows_open, _initialize_ser_windows):
367 Remove unused variables.
368 * symtab.c (find_pc_sect_line): Remove unused variable.
369 * target-memory.c (compute_garbled_blocks): Remove unused
370 variable.
371 (target_write_memory_blocks): Remove unused variable.
372 * target.c (target_stack::unpush): Remove unused variables.
373 * tracepoint.c (start_tracing, all_tracepoint_actions)
374 (merge_uploaded_trace_state_variables)
375 (print_one_static_tracepoint_marker): Remove unused variable.
376 * unittests/basic_string_view/element_access/char/1.cc (test01):
377 Remove unused variable.
378 * windows-nat.c (windows_continue, windows_add_all_dlls)
379 (do_initial_windows_stuff, windows_nat_target::create_inferior):
380 Remove unused variables.
381
17cbafdb
SM
3822018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
383
384 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
385 attr_profile in HAVE_ELF.
386 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
387 HAVE_ELF.
388
0ee6c332
SM
3892018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
390
391 * frame.c (frame_register_unwind): Change parameter name.
392 (frame_unwind_register): Likewise.
393 (frame_unwind_register_value): Likewise.
394 (frame_unwind_register_signed): Likewise.
395 (frame_unwind_register_unsigned): Likewise.
396 * frame.h (frame_register_unwind): Likewise.
397 (frame_unwind_register): Likewise.
398 (frame_unwind_register_value): Likewise.
399 (frame_unwind_register_signed): Likewise.
400 (frame_unwind_register_unsigned): Likewise.
401 (frame_unwind_arch): Likewise.
402
e2e31f10
MR
4032018-07-20 Maciej W. Rozycki <macro@mips.com>
404
405 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
406 ISA maintenance.
407
2d389915
MR
4082018-07-20 Maciej W. Rozycki <macro@mips.com>
409
410 * mips-linux-nat.c (mips_linux_nat_target::read_description):
411 Call `get_ptrace_pid' rather than extracting the ptrace PID by
412 hand.
413
cbb09508
KS
4142018-07-20 Keith Seitz <keiths@redhat.com>
415
416 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
417 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
418 m_compunit_symtab, m_language>: Add "m_" prefix.
419 Update all uses.
420 * buildsym.c: Update all uses.
421
bfe2e011
TT
4222018-07-20 Tom Tromey <tom@tromey.com>
423
424 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
425 * buildsym.h (record_line_ftype): Remove typedef.
426
0e6f3061
TT
4272018-07-20 Tom Tromey <tom@tromey.com>
428
429 * buildsym-legacy.h (augment_type_symtab): Don't declare.
430 (end_expandable_symtab): Likewise.
431 (end_symtab_get_static_block): Likewise.
432 (end_symtab_from_static_block): Likewise.
433 * buildsym-legacy.c (augment_type_symtab): Remove.
434 (end_expandable_symtab): Remove.
435 (end_symtab_get_static_block): Remove.
436 (end_symtab_from_static_block): Remove.
437
804d2729
TT
4382018-07-20 Tom Tromey <tom@tromey.com>
439
440 * dwarf2read.c: Include buildsym.h.
441 (struct dwarf2_cu) <builder>: New method.
442 (fixup_go_packaging): Update.
443 (process_full_comp_unit, process_full_type_unit): Update. Don't
444 use scoped_free_pendings.
445 (using_directives): Add "cu" parameter, remove "language".
446 (read_import_statement, setup_type_unit_groups, )
447 (read_func_scope, read_lexical_block_scope)
448 (dwarf2_record_block_ranges, read_namespace): Update.
449 (lnp_state_machine::lnp_state_machine): Add cu parameter.
450 (lnp_state_machine::handle_end_sequence): Update.
451 (class lnp_state_machine) <m_cu>: New member.
452 <m_record_line_callback>: Remove.
453 <m_currently_recording_lines>: New member.
454 (lnp_state_machine::handle_set_file): Update.
455 (noop_record_line): Remove.
456 (dwarf_record_line_p): Add cu parameter.
457 (dwarf_record_line_1, dwarf_finish_line): Likewise.
458 (lnp_state_machine::record_line)
459 (lnp_state_machine::lnp_state_machine)
460 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
461 (dwarf_decode_lines): Update.
462 (dwarf2_start_subfile): Add cu parameter.
463 (dwarf2_start_symtab, new_symbol): Update.
464 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
465 Remove dwarf2_per_objfile parameter.
466 (dwarf_decode_macros): Update.
467
80e649fc
TT
4682018-07-20 Tom Tromey <tom@tromey.com>
469
470 * stabsread.c (define_symbol): Update.
471 * buildsym-legacy.h (get_buildsym_compunit): Declare.
472 * dwarf2read.c (new_symbol): Update.
473 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
474 * cp-namespace.c: Include buildsym.h.
475 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
476 * buildsym-legacy.c (get_buildsym_compunit): New function.
477
0baae8db
TT
4782018-07-20 Tom Tromey <tom@tromey.com>
479
480 * xcoffread.c: Include buildsym-legacy.h.
481 * windows-nat.c: Include buildsym-legacy.h.
482 * stabsread.c: Include buildsym-legacy.h.
483 * mdebugread.c: Include buildsym-legacy.h.
484 * buildsym-legacy.h: New file.
485 * buildsym-legacy.c: New file, from buildsym.c.
486 * go32-nat.c: Include buildsym-legacy.h.
487 * dwarf2read.c: Include buildsym-legacy.h.
488 * dbxread.c: Include buildsym-legacy.h.
489 * cp-namespace.c: Include buildsym-legacy.h.
490 * coffread.c: Include buildsym-legacy.h.
491 * buildsym.h: Move some contents to buildsym-legacy.h.
492 * buildsym.c: Include buildsym-legacy.h. Move many functions to
493 buildsym-legacy.c.
494 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
495
ab209f6f
TT
4962018-07-20 Tom Tromey <tom@tromey.com>
497
498 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
499 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
500 (buildsym_compunit::buildsym_compunit)
501 (buildsym_compunit::~buildsym_compunit)
502 (buildsym_compunit::get_macro_table): Define.
503
74c72eac
TT
5042018-07-20 Tom Tromey <tom@tromey.com>
505
506 * buildsym.c (reset_symtab_globals): Remove.
507 (buildsym_compunit::end_symtab_from_static_block): Update.
508 (buildsym_compunit::augment_type_symtab): Update.
509 (end_symtab_from_static_block): Call free_buildsym_compunit.
510 (augment_type_symtab, end_symtab, end_expandable_symtab):
511 Likewise.
512
da6580e5
TT
5132018-07-20 Tom Tromey <tom@tromey.com>
514
515 * arch-utils.c: Do not include buildsym.h.
516 * mipsread.c: Do not include buildsym.h.
517 * machoread.c: Do not include buildsym.h.
518 * elfread.c: Do not include buildsym.h.
519
4a2125f5
TT
5202018-07-20 Tom Tromey <tom@tromey.com>
521
522 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
523 initialization.
524 (buildsym_compunit): Add new constructor.
525 (struct buildsym_compunit) <get_last_source_file, finish_block,
526 record_block_range, start_subfile, patch_subfile_names,
527 push_subfile, pop_subfile, record_line, get_compunit_symtab,
528 set_last_source_start_addr, get_last_source_start_addr,
529 get_local_using_directives, set_local_using_directives,
530 get_global_using_directives, outermost_context_p,
531 get_current_context_stack, get_context_stack_depth,
532 get_current_subfile, get_local_symbols, get_file_symbols,
533 get_global_symbols, record_debugformat, record_producer,
534 push_context, pop_context, end_symtab_get_static_block,
535 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
536 New public methods.
537 <record_pending_block, finish_block_internal, make_blockvector,
538 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
539 private methods.
540 Update all users.
541
5422018-05-22 Tom Tromey <tom@tromey.com>
543
544 * buildsym.c (record_pending_block): Move earlier. Remove objfile
545 parameter.
546 (finish_block_internal): Update.
547
6b213a47
TT
5482018-07-20 Tom Tromey <tom@tromey.com>
549
550 * buildsym.c (record_pending_block): Move earlier. Remove objfile
551 parameter.
552 (finish_block_internal): Update.
553
b80a981d
TT
5542018-07-20 Tom Tromey <tom@tromey.com>
555
556 * buildsym.h (EXTERN): Don't define or undef.
557 * buildsym.c (EXTERN): Don't define.
558
ddb70602
TT
5592018-07-20 Tom Tromey <tom@tromey.com>
560
561 * buildsym.c: Remove TODO comment.
562
b37dd3bc
TT
5632018-07-20 Tom Tromey <tom@tromey.com>
564
565 * coffread.c (coff_symtab_read): Update.
566 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
567 (xcoff_new_init): Update.
568 * mipsread.c (mipscoff_new_init): Update.
569 * mdebugread.c (mdebug_build_psymtabs): Update.
570 * elfread.c (elf_new_init): Update.
571 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
572 Update.
573 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
574 (coffstab_build_psymtabs, elfstab_build_psymtabs)
575 (stabsect_build_psymtabs): Update.
576 * buildsym.h (buildsym_init): Don't declare.
577 * buildsym.c: Update comment.
578 (prepare_for_building): Remove.
579 (start_symtab, restart_symtab): Update.
580 (reset_symtab_globals): Update comment.
581 (buildsym_init): Remove.
582
e148f09d
TT
5832018-07-20 Tom Tromey <tom@tromey.com>
584
585 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
586 * stabsread.c (patch_block_stabs, define_symbol, read_type)
587 (read_enum_type, common_block_start, common_block_end)
588 (cleanup_undefined_types_1, finish_global_stabs): Update.
589 * mdebugread.c (psymtab_to_symtab_1): Update.
590 * dwarf2read.c (fixup_go_packaging, read_func_scope)
591 (read_lexical_block_scope, new_symbol): Update.
592 * dbxread.c (process_one_symbol): Update.
593 * coffread.c (coff_symtab_read, process_coff_symbol)
594 (coff_read_enum_type): Update.
595 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
596 declare.
597 (get_local_symbols, get_file_symbols, get_global_symbols): New
598 functions.
599 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
600 m_global_symbols.
601 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
602 (~scoped_free_pendings): Update.
603 (finish_block, prepare_for_building, reset_symtab_globals)
604 (end_symtab_get_static_block, end_symtab_with_blockvector)
605 (augment_type_symtab, push_context): Update.
606 (get_local_symbols, get_file_symbols, get_global_symbols): New
607 functions.
608 (buildsym_init): Update.
609
93b8bea4
TT
6102018-07-20 Tom Tromey <tom@tromey.com>
611
612 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
613 (process_full_type_unit): Likewise.
614 (dwarf2_start_symtab): Set list_in_scope.
615
f62f6af5
TT
6162018-07-20 Tom Tromey <tom@tromey.com>
617
618 * dwarf2read.c (process_psymtab_comp_unit_reader)
619 (build_type_psymtabs_reader): Do not set list_in_scope.
620
1d376700
TT
6212018-07-20 Tom Tromey <tom@tromey.com>
622
623 * buildsym.c (free_pendings): Remove.
624 (add_symbol_to_list, scoped_free_pendings)
625 (finish_block_internal, buildsym_init): Update.
626
c233e9c6
TT
6272018-07-20 Tom Tromey <tom@tromey.com>
628
629 * xcoffread.c (read_xcoff_symtab): Update.
630 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
631 Update.
632 * dbxread.c (process_one_symbol): Update.
633 * coffread.c (coff_symtab_read): Update.
634 * buildsym.h (finish_block): Update.
635 * buildsym.c (finish_block): Remove "listhead" argument.
636 (end_symtab_get_static_block): Update.
637
5ac04550
TT
6382018-07-20 Tom Tromey <tom@tromey.com>
639
640 * buildsym.h (class scoped_free_pendings): Remove constructor.
641 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
642 method.
643 <m_pending_block_obstack, m_pending_blocks>: New members.
644 (pending_block_obstack, pending_blocks): Remove.
645 (scoped_free_pendings::scoped_free_pendings): Default.
646 (~scoped_free_pendings): Update.
647 (free_pending_blocks): Remove.
648 (finish_block_internal, record_pending_block, make_blockvector)
649 (end_symtab_get_static_block, augment_type_symtab, push_context)
650 (buildsym_init): Update.
651
7ea05a7b
TT
6522018-07-20 Tom Tromey <tom@tromey.com>
653
654 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
655 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
656 members.
657 (pending_addrmap, pending_addrmap_obstack)
658 (pending_addrmap_interesting): Remove.
659 (scoped_free_pendings, record_block_range, make_blockvector)
660 (prepare_for_building, reset_symtab_globals, buildsym_init):
661 Update.
662
3c65e5b3
TT
6632018-07-20 Tom Tromey <tom@tromey.com>
664
665 * xcoffread.c (process_linenos): Update.
666 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
667 * mdebugread.c (psymtab_to_symtab_1): Update.
668 * dwarf2read.c (setup_type_unit_groups)
669 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
670 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
671 * dbxread.c (process_one_symbol): Update.
672 * coffread.c (coff_symtab_read, enter_linenos)
673 (process_coff_symbol): Update.
674 * buildsym.h (current_subfile): Don't declare.
675 (get_current_subfile): Declare.
676 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
677 member.
678 (start_subfile, free_buildsym_compunit, push_subfile)
679 (prepare_for_building, start_symtab): Update.
680 (get_current_subfile): New function.
681
a60f3166
TT
6822018-07-20 Tom Tromey <tom@tromey.com>
683
684 * coffread.c (coff_symtab_read): Update.
685 * xcoffread.c (read_xcoff_symtab): Update.
686 * dwarf2read.c (new_symbol): Update.
687 (read_func_scope, read_lexical_block_scope): Update.
688 * dbxread.c (process_one_symbol): Update.
689 * buildsym.h (context_stack, context_stack_depth): Don't declare.
690 (outermost_context_p): Remove macro.
691 (outermost_context_p, get_current_context_stack)
692 (get_context_stack_depth): Declare.
693 (pop_context): Return struct context_stack.
694 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
695 member.
696 (context_stack_size): Remove.
697 (INITIAL_CONTEXT_STACK_SIZE): Remove.
698 (prepare_for_building, end_symtab_get_static_block)
699 (augment_type_symtab, push_context): Update.
700 (pop_context): Return struct context_stack.
701 (outermost_context_p, get_current_context_stack)
702 (get_context_stack_depth): New functions.
703 (buildsym_init): Update.
704
56ba65a0
TT
7052018-07-20 Tom Tromey <tom@tromey.com>
706
707 * rust-exp.y: Now a pure parser. Update all rules.
708 (%union): Move earlier.
709 (current_parser, work_obstack): Remove globals.
710 (rust_parser, ~rust_parser): Update.
711 (class rust_parser) <copy_name, concat3, crate_name, super_name,
712 lex_character, lex_number, lex_string, lex_identifier,
713 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
714 convert_name, convert_params_to_expression,
715 convert_ast_to_expression, ast_basic_type, ast_operation,
716 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
717 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
718 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
719 ast_array_type, ast_slice_type, ast_reference_type,
720 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
721 (rust_parse): Update.
722 (rustyyerror, rustyylex): Add parser parameter.
723 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
724 (rust_lex_stringish_test, rust_lex_test_sequence)
725 (rust_lex_test_trailing_dot, rust_lex_test_completion)
726 (rust_lex_test_push_back, rust_lex_tests): Update.
727
4c693332
PA
7282018-07-19 Pedro Alves <palves@redhat.com>
729
730 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
731 gdb::unique_xmalloc_ptr.
732 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
733 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
734 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
735 copy-initialization.
736 * guile/scm-pretty-print.c (ppscm_print_children): Use
737 gdb::unique_xmalloc_ptr instead of cleanups.
738 (gdbscm_apply_val_pretty_printer): Remove cleanups.
739 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
740 gdb::unique_xmalloc_ptr.
741 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
742 Adjust to use gdb::unique_xmalloc_ptr.
743 * guile/scm-utils.c (extract_arg): Adjust.
744 * guile/scm-value.c (gdbscm_value_field): Adjust to use
745 gdb::unique_xmalloc_ptr instead of a cleanup.
746
4581dc82
TT
7472018-07-19 Tom Tromey <tom@tromey.com>
748
749 * utils.c (do_value_free_to_mark)
750 (make_cleanup_value_free_to_mark): Remove.
751 * utils.h (make_cleanup_value_free_to_mark): Remove.
752
43cc6c3a
PA
7532018-07-19 Pedro Alves <palves@redhat.com>
754
755 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
756 forwarding reference.
757
3a5f2a48
PA
7582018-07-18 Pedro Alves <palves@redhat.com>
759
760 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
761 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
762 cleanup.
763
557e56be
PA
7642018-07-18 Pedro Alves <palves@redhat.com>
765
766 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
767 exceptions.
768 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
769 (gdbscm_wrap): New.
770 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
771 directly instead of a cleanup.
772 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
773 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
774 (vlscm_binop_gdbthrow): New, factored out from ...
775 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
776 (vlscm_rich_compare): Use gdbscm_wrap.
777 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
778 instead of a cleanup.
779 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
780 cleanup.
781 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
782 Use xfree directly instead of a cleanup.
783 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
784 Adjust to use gdbscm_wrap and scoped_value_mark.
785 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
786 (gdbscm_value_address, gdbscm_value_dereference)
787 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
788 scoped_value_mark.
789 (gdbscm_value_dynamic_type): Use scoped_value_mark.
790 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
791 scoped_value_mark.
792 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
793 gdbscm_wrap and scoped_value_mark.
794 (gdbscm_value_to_string): Use xfree directly instead of a
795 cleanup. Move 'buffer' unique_ptr to TRY scope.
796 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
797 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
798 scoped_value_mark.
799 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
800 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
801 scoped_value_mark.
802 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
803 gdbscm_wrap.
804
42dc7699
TV
8052018-07-18 Tom de Vries <tdevries@suse.de>
806
807 * findvar.c (default_read_var_value): Also resolve dynamic type for
808 LOC_OPTIMIZED_OUT vars.
809
6592ceed
MR
8102018-07-18 Maciej W. Rozycki <macro@mips.com>
811
812 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
813 decoding.
814
c6c6149a
TT
8152018-07-17 Tom Tromey <tom@tromey.com>
816
817 * guile/scm-param.c (pascm_set_func, pascm_show_func)
818 (compute_enum_list, pascm_set_param_value_x)
819 (gdbscm_parameter_value): Update.
820 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
821 (gdbscm_scm_to_host_string): Update.
822 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
823 Update.
824 * guile/scm-cmd.c (cmdscm_add_completion): Update.
825 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
826 * guile/scm-string.c (gdbscm_scm_to_string): Return
827 unique_xmalloc_ptr.
828 (gdbscm_scm_to_host_string): Likewise.
829
a1a31cb8
TT
8302018-07-17 Tom Tromey <tom@tromey.com>
831
832 * guile/guile.c (gdbscm_eval_from_control_command): Update.
833 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
834 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
835 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
836 unique_xmalloc_ptr.
837
15bf3002
TT
8382018-07-17 Tom Tromey <tom@tromey.com>
839
840 * guile/scm-param.c (pascm_signal_setshow_error): Update.
841 * guile/guile-internal.h (gdbscm_exception_message_to_string):
842 Update.
843 * guile/scm-cmd.c (cmdscm_function): Update.
844 * guile/scm-pretty-print.c
845 (ppscm_print_exception_unless_memory_error): Update.
846 * guile/scm-exception.c (gdbscm_exception_message_to_string):
847 Return unique_xmalloc_ptr.
848
7eb1a66c
TT
8492018-07-17 Tom Tromey <tom@tromey.com>
850
851 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
852 Use string_printf.
853
ce73f310
JW
8542018-07-17 Jim Wilson <jimw@sifive.com>
855
27724bad
JW
856 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
857 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
858 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
859 unecessary braces after EF_RISCV_RVC test. Delete call to
860 set_gdbarch_decr_pc_after_break.
861
ce73f310
JW
862 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
863 RISCV_LAST_FP_REGNUM + 1.
864 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
865
056dec39
TT
8662018-07-17 Tom Tromey <tom@tromey.com>
867
868 * configure.ac: Remove --disable-gdbcli.
869 * configure: Rebuild.
870 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
871 (SUBDIR_CLI_CFLAGS): Remove.
872 (SFILES): Use SUBDIR_CLI_SRCS.
873 (COMMON_OBS): Use SUBDIR_CLI_OBS.
874
4735f0ed
TT
8752018-07-17 Tom Tromey <tom@tromey.com>
876
877 PR gdb/18624:
878 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
879
117a0e99
JW
8802018-07-16 Jim Wilson <jimw@sifive.com>
881
882 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
883
8a67aaa8
SM
8842018-07-16 Simon Marchi <simon.marchi@ericsson.com>
885
886 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
887 variable.
888 (libunwind_frame_sniffer): Likewise.
889 (libunwind_frame_prev_register): Likewise.
890 (libunwind_sigtramp_frame_sniffer): Likewise.
891 * ia64-tdep.c (ia64_access_reg): Likewise.
892 (ia64_access_rse_reg): Likewise.
893 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
894 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
895
ec74dcd8
SM
8962018-07-16 Simon Marchi <simon.marchi@ericsson.com>
897
898 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
899
a700e753
SM
9002018-07-16 Simon Marchi <simon.marchi@ericsson.com>
901
902 * remote-sim.c (gdbsim_target::close,
903 gdbsim_target::mourn_inferior): Remove unused variables.
904
8b411ff8
SM
9052018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
906
907 * ia64-tdep.c (ktab_buf): New global.
908 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
909 (get_kernel_table): Adjust.
910
edb0470b
TT
9112018-07-16 Tom Tromey <tom@tromey.com>
912
913 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
914 * dwarf2read.c (using_directives, new_symbol): Use
915 outermost_context_p.
916 * dbxread.c (process_one_symbol): Use outermost_context_p.
917 * coffread.c (coff_symtab_read): Use outermost_context_p.
918
6cccc9a8
TT
9192018-07-16 Tom Tromey <tom@tromey.com>
920
921 * dwarf2read.c (using_directives, read_func_scope)
922 (read_lexical_block_scope): Update.
923 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
924 * buildsym.h (local_using_directives, global_using_directives):
925 Don't declare.
926 (get_local_using_directives, set_local_using_directives)
927 (get_global_using_directives): Declare.
928 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
929 m_global_using_directives>: New members.
930 (finish_block_internal, prepare_for_building)
931 (reset_symtab_globals, end_symtab_get_static_block)
932 (push_context): Update.
933 (get_local_using_directives, set_local_using_directives)
934 (get_global_using_directives): New functions.
935 (buildsym_init): Update.
936
652788a7
TT
9372018-07-16 Tom Tromey <tom@tromey.com>
938
939 * xcoffread.c (xcoff_initial_scan): Don't call
940 free_pending_blocks.
941 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
942 * buildsym.h (class scoped_free_pendings): Add constructor.
943 (free_pending_blocks): Don't declare.
944 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
945 (free_pending_blocks): Now static.
946
8419ee53
TT
9472018-07-16 Tom Tromey <tom@tromey.com>
948
949 * buildsym.h (push_subfile, pop_subfile): Update declarations.
950 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
951 member.
952 (struct subfile_stack): Remove.
953 (subfile_stack): Remove.
954 (push_subfile, pop_subfile, buildsym_init): Update.
955
ccdac490
TT
9562018-07-16 Tom Tromey <tom@tromey.com>
957
958 * buildsym.c (push_subfile): Use gdb_assert.
959 (pop_subfile): Use gdb_assert.
960
43130d6f
TT
9612018-07-16 Tom Tromey <tom@tromey.com>
962
963 * buildsym.h (merge_symbol_lists): Remove.
964 * buildsym.c (merge_symbol_lists): Remove.
965
77d6f1aa
TT
9662018-07-16 Tom Tromey <tom@tromey.com>
967
968 * stabsread.c (scan_file_globals): Update comment.
969 * stabsread.h (scan_file_globals): Move from buildsym.h.
970 * buildsym.h (scan_file_globals): Move to stabsread.h.
971
2c722d18
TT
9722018-07-16 Tom Tromey <tom@tromey.com>
973
974 * xcoffread.c (xcoff_new_init): Update.
975 * mipsread.c (mipscoff_new_init): Update.
976 * mdebugread.c (mdebug_build_psymtabs): Update.
977 * elfread.c (elf_new_init): Update.
978 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
979 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
980 * buildsym.h (buildsym_new_init): Don't declare.
981 * buildsym.c (buildsym_new_init): Remove.
982
5985ac61
TT
9832018-07-16 Tom Tromey <tom@tromey.com>
984
985 * stabsread.h (within_function): Move from buildsym.h.
986 * stabsread.c (start_stabs): Clear within_function.
987 * coffread.c (coff_start_symtab): Clear within_function.
988 * buildsym.h (within_function): Move to stabsread.h.
989 * buildsym.c (prepare_for_building): Update.
990
6b84eeb2
TT
9912018-07-16 Tom Tromey <tom@tromey.com>
992
993 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
994 * dwarf2read.c (dwarf2_start_symtab): Don't set
995 processing_gcc_compilation.
996 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
997
2150c3ef
TT
9982018-07-16 Tom Tromey <tom@tromey.com>
999
1000 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
1001 (next_symbol_text_func): Move from buildsym.h.
1002 * stabsread.c (hashname): Move from buildsym.c.
1003 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
1004 (next_symbol_text_func, hashname): Move to stabsread.h.
1005 * buildsym.c: Don't include bcache.h
1006 (hashname): Move to stasbread.c.
1007
0ec44fc0
TT
10082018-07-16 Tom Tromey <tom@tromey.com>
1009
1010 * buildsym.h (context_stack_size): Don't declare.
1011 * buildsym.c (context_stack_size): New global.
1012
81cc346d
TT
10132018-07-16 Tom Tromey <tom@tromey.com>
1014
1015 * dbxread.c (processing_acc_compilation): New global.
1016 * buildsym.h (processing_acc_compilation): Don't declare.
1017
2c99ee5c
TT
10182018-07-16 Tom Tromey <tom@tromey.com>
1019
1020 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
1021 * dbxread.c (read_ofile_symtab): Update.
1022 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
1023 * buildsym.h (last_source_start_addr): Remove.
1024 (set_last_source_start_addr, get_last_source_start_addr):
1025 Declare.
1026 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
1027 parameter.
1028 (struct buildsym_compunit) <m_last_source_start_addr>: New
1029 member.
1030 (prepare_for_building): Remove start_addr parameter.
1031 (start_symtab, restart_symtab, end_symtab_get_static_block)
1032 (end_symtab_with_blockvector): Update.
1033 (set_last_source_start_addr, get_last_source_start_addr): New
1034 functions.
1035
530fedbc
TT
10362018-07-16 Tom Tromey <tom@tromey.com>
1037
1038 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
1039 member.
1040 (have_line_numbers): Remove.
1041 (record_line, prepare_for_building, end_symtab_get_static_block)
1042 (augment_type_symtab): Update.
1043
6a976300
TT
10442018-07-16 Tom Tromey <tom@tromey.com>
1045
1046 * buildsym.c (~buildsym_compunit): Free the macro table.
1047 (struct buildsym_compunit) <get_macro_table, release_macros>: New
1048 methods.
1049 <m_pending_macros>: New member.
1050 (pending_macros): Remove.
1051 (~scoped_free_pendings, get_macro_table, prepare_for_building)
1052 (reset_symtab_globals, end_symtab_get_static_block)
1053 (end_symtab_with_blockvector, augment_type_symtab)
1054 (buildsym_init): Update.
1055
c0015d44
TT
10562018-07-16 Tom Tromey <tom@tromey.com>
1057
1058 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
1059 parameter.
1060 (buildsym_compunit::set_last_source_file): New method.
1061 <m_last_source_file>: New member.
1062 (prepare_for_building): Remove "name" parameter.
1063 (start_symtab, restart_symtab, reset_symtab_globals): Update.
1064 (last_source_file): Remove.
1065 (set_last_source_file, get_last_source_file): Update.
1066
e62cca7c
TT
10672018-07-16 Tom Tromey <tom@tromey.com>
1068
1069 * buildsym.c (prepare_for_building): Add assert.
1070
905eb0e2
TT
10712018-07-16 Tom Tromey <tom@tromey.com>
1072
1073 * buildsym.c (~buildsym_compunit): Update.
1074 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
1075 (start_subfile, patch_subfile_names)
1076 (end_symtab_with_blockvector): Update.
1077
b248663f
TT
10782018-07-16 Tom Tromey <tom@tromey.com>
1079
1080 * buildsym.c (struct buildsym_compunit): Add constructor,
1081 destructor, initializers.
1082 (start_buildsym_compunit): Remove.
1083 (free_buildsym_compunit): Use "delete".
1084 (start_symtab, restart_symtab): Use "new".
1085
ff27d073
SM
10862018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
1087
1088 * symfile.c (set_objfile_default_section_offset): Remove struct
1089 keyword.
1090
6a15ecf5
SH
10912018-07-14 Stafford Horne <shorne@gmail.com>
1092
1093 * (Responsible Maintainers): Add myself as or1k maintainer.
1094
027a4c30
TT
10952018-07-13 Tom Tromey <tom@tromey.com>
1096
1097 * symfile.c (set_objfile_default_section_offset): Use extra braces
1098 around initializer.
1099
5c1eda30
AA
11002018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1101
1102 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
1103 non-branching basr.
1104
bc7b042b
PW
11052018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1106
1107 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1108 unittests/cli-utils-selftests.c
1109 * unittests/cli-utils-selftests.c: New file.
1110
a14c4daa
PW
11112018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1112
1113 * NEWS: Mention new commands. Mention change to 'thread apply'.
1114
1fe75df7
PW
11152018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1116
1117 * thread.c (thr_try_catch_cmd): New function.
1118 (thread_apply_all_command): Handle qcs flags.
1119 (thread_apply_command): Handle qcs flags.
1120 (taas_command): New function.
1121 (tfaas_command): New function.
1122 (_initialize_thread): Update to setup the new commands 'taas
1123 and 'tfaas'. Change doc string for 'thread apply'.
1124
6a70eb7d
PW
11252018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1126
1127 * stack.c: (trailing_outermost_frame): New function, mostly
1128 extracted from backtrace_command_1.
1129 (leading_innermost_frame): New function.
1130 (backtrace_command_1): Update to call trailing_outermost_frame.
1131 (frame_apply_command_count): New function.
1132 (frame_apply_level_command): New function.
1133 (frame_apply_all_command): New function.
1134 (frame_apply_command): New function.
1135 (faas_command): New function.
1136 (frame_cmd_list): New variable.
1137 (_initialize_stack): Update to setup the new commands 'frame apply'
1138 and 'faas'.
1139
529c08b2
PW
11402018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1141
1142 * cli-utils.c (number_or_range_parser::get_number): Only handle
1143 numbers or convenience var as numbers.
1144 (parse_flags): New function.
1145 (parse_flags_qcs): New function.
1146 (number_or_range_parser::finished): Ensure parsing end is detected
1147 before end of string.
1148 * cli-utils.h (parse_flags): New function.
1149 (parse_flags_qcs): New function.
1150 (number_or_range_parser): Remove m_finished bool.
1151 (number_or_range_parser::skip_range): Set m_in_range to false.
1152
64b58472
SDJ
11532018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
1154
1155 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
1156 on Windows.
1157
c7ab0aef
SDJ
11582018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1159 Jan Kratochvil <jan.kratochvil@redhat.com>
1160 Paul Fertser <fercerpav@gmail.com>
1161 Tsutomu Seki <sekiriki@gmail.com>
1162 Pedro Alves <palves@redhat.com>
1163
1164 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1165 'unittests/parse-connection-spec-selftests.c'.
1166 (COMMON_SFILES): Add 'common/netstuff.c'.
1167 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
1168 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
1169 * common/netstuff.c: New file.
1170 * common/netstuff.h: New file.
1171 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
1172 (wait_for_connect): Update comment. New parameter
1173 'gdb::optional<int> sock' instead of 'struct serial *scb'.
1174 Use 'sock' directly instead of 'scb->fd'.
1175 (try_connect): New function, with code from 'net_open'.
1176 (net_open): Rewrite main loop to deal with multiple
1177 sockets/addresses. Handle IPv6-style hostnames; implement
1178 support for IPv6 connections.
1179 * unittests/parse-connection-spec-selftests.c: New file.
1180
4c7333b3
PA
11812018-07-11 Pedro Alves <palves@redhat.com>
1182
1183 PR gdb/23377
1184 * remote.c (remote_target::remote_detach_pid): Call
1185 set_current_process.
1186
a6f88f6e
PA
11872018-07-11 Pedro Alves <palves@redhat.com>
1188
1189 * h8300-tdep.c (h8300_gdbarch_init): Remove
1190 set_gdbarch_ecoff_reg_to_regnum calls.
1191
16ff70dd
SDJ
11922018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1193
1194 PR c++/23373
1195 * c-typeprint.c (c_type_print_base_struct_union): Don't print
1196 offsets/sizes for static members of a class/struct.
1197
12863263
AH
11982018-07-11 Alan Hayward <alan.hayward@arm.com>
1199
1200 * target-descriptions.c (tdesc_register_bitsize): Rename.
1201 * target-descriptions.h (tdesc_register_bitsize): Likewise.
1202 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
1203 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
1204
1123588c
TT
12052018-07-10 Tom Tromey <tom@tromey.com>
1206
1207 * breakpoint.c (moribund_locations): Now static and a
1208 std::vector.
1209 (breakpoint_init_inferior, moribund_breakpoint_here_p)
1210 (build_bpstat_chain, update_global_location_list)
1211 (breakpoint_retire_moribund): Update.
1212 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
1213 VEC.
1214
8c49aa89
AB
12152018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
1216
1217 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
1218 (riscv_register_reggroup_p): Use new function, remove unneeded
1219 parenthesis.
1220 (riscv_push_dummy_call): Extend assert to compare against xlen or
1221 flen based on register type.
1222
42ecac17
AB
12232018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
1224
1225 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
1226
055303e2
AB
12272018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
1228
1229 * remote.c (show_hardware_watchpoint_limit): New function.
1230 (show_hardware_watchpoint_length_limit): New function.
1231 (show_hardware_breakpoint_limit): New function.
1232 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
1233 where appropriate, update help text.
1234
8fd32c1c
TT
12352018-07-09 Tom Tromey <tom@tromey.com>
1236
1237 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
1238 (CLIBS): Don't mention NAT_CLIBS.
1239
31278b51
TT
12402018-07-09 Tom Tromey <tom@tromey.com>
1241
1242 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
1243 (LIBGDB_OBS, clean mostlyclean): Update.
1244 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
1245
e5fd1493
TT
12462018-07-09 Tom Tromey <tom@tromey.com>
1247
1248 * Makefile.in (%.c: %.y): Use ECHO_YACC.
1249 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
1250 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
1251
981e0c0c
TT
12522018-07-09 Tom Tromey <tom@tromey.com>
1253
1254 * Makefile.in (ALLDEPFILES): Remove exec.c.
1255 (COMMON_OBS): Remove exec.o.
1256 (COMMON_SFILES): Add exec.c.
1257
14ccceb2
TT
12582018-07-09 Tom Tromey <tom@tromey.com>
1259
1260 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
1261
5d3c3a68
TT
12622018-07-09 Tom Tromey <tom@tromey.com>
1263
1264 * Makefile.in (clean mostlyclean): Remove stamp-version.
1265 (version.c): Depend on stamp-version.
1266 (stamp-version): New rule, from version.c rule.
1267
1998086d
TT
12682018-07-09 Tom Tromey <tom@tromey.com>
1269
1270 * Makefile.in (init.c): Depend on stamp-init.
1271 (stamp-init): New rule, from init.c rule.
1272 (clean mostlyclean): Remove stamp-init.
1273
4c754949
TT
12742018-07-09 Tom Tromey <tom@tromey.com>
1275
1276 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
1277 SUBDIR_GCC_COMPILE_SRCS.
1278
6497f1dd
TT
12792018-07-09 Tom Tromey <tom@tromey.com>
1280
1281 * Makefile.in (init.c): Remove some unused sed rules.
1282
97a34db9
TT
12832018-07-09 Tom Tromey <tom@tromey.com>
1284
1285 * Makefile.in (TSOBS): Remove.
1286 (INIT_FILES): Update.
1287 (LIBGDB_OBS): Update.
1288 (COMMON_SFILES): Add inflow.c.
1289 (SFILES): Remove inflow.c.
1290
25289ac1
JK
12912018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1292
1293 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
1294
e83f4d97
SM
12952018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
1296
4869c585
SM
1297 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
1298 get_saveloc_name, is_signal_frame_name, step_name,
1299 init_remote_name, create_addr_space_name,
1300 destroy_addr_space_name, search_unwind_table_name,
1301 find_dyn_list_name): Constify.
e83f4d97 1302
6821842f
SM
13032018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
1304
1305 * darwin-nat.c (darwin_pthread_kill): New function.
1306 (darwin_resume_thread): Use darwin_pthread_kill.
1307
c530603c
TV
13082018-07-05 Tom de Vries <tdevries@suse.de>
1309
1310 * macroexp.c (macro_buffer) <operator=>: New member function.
1311
a7d0f0f0
TT
13122018-07-04 Tom Tromey <tom@tromey.com>
1313
1314 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
1315
6242c6a6
SM
13162018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
1317
1318 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
1319 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
1320 * maint.c: Likewise.
1321 * top.c: Likewise.
1322
4e5b2f89
JB
13232018-07-04 Joel Brobecker <brobecker@adacore.com>
1324
1325 * NEWS: Create a new section for the next release branch.
1326 Rename the section of the current branch, now that it has
1327 been cut.
1328
538ccc4a
JB
13292018-07-04 Joel Brobecker <brobecker@adacore.com>
1330
1331 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
1332 * version.in: Bump version to 8.2.50.DATE-git.
1333
1b919490
VB
13342018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1335 Pedro Alves <palves@redhat.com>
1336
1337 * linux-nat.c (linux_init_ptrace): Rename to ...
1338 (linux_init_ptrace_procfs): ... this. Call
1339 linux_proc_init_warnings.
1340 (linux_nat_target::post_attach)
1341 (linux_nat_target::post_startup_inferior): Adjust.
1342 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
1343 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
1344
1ea5da02
TV
13452018-07-04 Tom de Vries <tdevries@suse.de>
1346
1347 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
1348 check ...
1349 (read_comp_unit_head): ... here.
1350
f51e0e20
TT
13512018-07-03 Tom Tromey <tom@tromey.com>
1352
1353 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
1354 (stop_tracing, tstatus_command)
1355 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
1356 (print_one_static_tracepoint_marker): Update.
1357 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
1358 std::vector.
1359 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
1360 VEC.
1361 (all_tracepoints, static_tracepoints_here): Return std::vector.
1362
d7e15655
TT
13632018-07-03 Tom Tromey <tom@tromey.com>
1364
1365 * common/ptid.c (ptid_equal): Remove.
1366 * common/ptid.h (ptid_equal): Don't declare.
1367 * ada-tasks.c: Update.
1368 * breakpoint.c: Update.
1369 * common/agent.c: Update.
1370 * corelow.c: Update.
1371 * darwin-nat-info.c: Update.
1372 * darwin-nat.c: Update.
1373 * dcache.c: Update.
1374 * dtrace-probe.c: Update.
1375 * dummy-frame.c: Update.
1376 * fbsd-nat.c: Update.
1377 * frame.c: Update.
1378 * gdbthread.h: Update.
1379 * gnu-nat.c: Update.
1380 * go32-nat.c: Update.
1381 * inf-loop.c: Update.
1382 * inf-ptrace.c: Update.
1383 * infcall.c: Update.
1384 * infcmd.c: Update.
1385 * inflow.c: Update.
1386 * infrun.c: Update.
1387 * linux-fork.c: Update.
1388 * linux-nat.c: Update.
1389 * linux-thread-db.c: Update.
1390 * mi/mi-cmd-var.c: Update.
1391 * mi/mi-interp.c: Update.
1392 * mi/mi-main.c: Update.
1393 * nto-procfs.c: Update.
1394 * ppc-linux-tdep.c: Update.
1395 * procfs.c: Update.
1396 * python/py-inferior.c: Update.
1397 * python/py-record-btrace.c: Update.
1398 * python/py-record.c: Update.
1399 * ravenscar-thread.c: Update.
1400 * regcache.c: Update.
1401 * remote-sim.c: Update.
1402 * remote.c: Update.
1403 * sol-thread.c: Update.
1404 * solib.c: Update.
1405 * target.c: Update.
1406 * tui/tui-stack.c: Update.
1407 * varobj.c: Update.
1408 * windows-nat.c: Update.
1409 * windows-tdep.c: Update.
1410
26a57c92
TT
14112018-07-03 Tom Tromey <tom@tromey.com>
1412
1413 * common/ptid.c (ptid_match): Remove.
1414 * common/ptid.h (ptid_match): Don't declare.
1415 * fbsd-nat.c: Update.
1416 * infcmd.c: Update.
1417 * infrun.c: Update.
1418 * linux-nat.c: Update.
1419 * record-btrace.c: Update.
1420 * regcache.c: Update.
1421 * remote.c: Update.
1422
d2a107e3
TT
14232018-07-03 Tom Tromey <tom@tromey.com>
1424
1425 * common/ptid.c (ptid_tid_p): Remove.
1426 * common/ptid.h (ptid_tid_p): Don't declare.
1427 * sol-thread.c: Update.
1428
15a9e13e
TT
14292018-07-03 Tom Tromey <tom@tromey.com>
1430
1431 * common/ptid.c (ptid_lwp_p): Remove.
1432 * common/ptid.h (ptid_lwp_p): Don't declare.
1433 * fbsd-nat.c: Update.
1434 * linux-nat.c: Update.
1435 * nat/linux-procfs.c: Update.
1436 * nat/x86-linux-dregs.c: Update.
1437 * sol-thread.c: Update.
1438
0e998d96
TT
14392018-07-03 Tom Tromey <tom@tromey.com>
1440
1441 * common/ptid.c (ptid_is_pid): Remove.
1442 * common/ptid.h (ptid_is_pid): Don't declare.
1443 * infrun.c: Update.
1444 * linux-nat.c: Update.
1445 * mi/mi-interp.c: Update.
1446 * remote.c: Update.
1447 * thread.c: Update.
1448
cc6bcb54
TT
14492018-07-03 Tom Tromey <tom@tromey.com>
1450
1451 * common/ptid.c (ptid_get_tid): Remove.
1452 * common/ptid.h (ptid_get_tid): Don't declare.
1453 * ada-tasks.c: Update.
1454 * aix-thread.c: Update.
1455 * bsd-uthread.c: Update.
1456 * darwin-nat.c: Update.
1457 * fbsd-nat.c: Update.
1458 * i386-darwin-nat.c: Update.
1459 * infrun.c: Update.
1460 * linux-tdep.c: Update.
1461 * nto-procfs.c: Update.
1462 * ppc-ravenscar-thread.c: Update.
1463 * python/py-infthread.c: Update.
1464 * ravenscar-thread.c: Update.
1465 * sol-thread.c: Update.
1466 * sparc-ravenscar-thread.c: Update.
1467 * windows-nat.c: Update.
1468
e38504b3
TT
14692018-07-03 Tom Tromey <tom@tromey.com>
1470
1471 * common/ptid.c (ptid_get_lwp): Remove.
1472 * common/ptid.h (ptid_get_lwp): Don't declare.
1473 * aarch64-linux-nat.c: Update.
1474 * ada-tasks.c: Update.
1475 * aix-thread.c: Update.
1476 * amd64-linux-nat.c: Update.
1477 * arm-linux-nat.c: Update.
1478 * corelow.c: Update.
1479 * fbsd-nat.c: Update.
1480 * fbsd-tdep.c: Update.
1481 * gnu-nat.c: Update.
1482 * i386-cygwin-tdep.c: Update.
1483 * i386-gnu-nat.c: Update.
1484 * i386-linux-nat.c: Update.
1485 * ia64-linux-nat.c: Update.
1486 * inf-ptrace.c: Update.
1487 * infrun.c: Update.
1488 * linux-fork.c: Update.
1489 * linux-nat.c: Update.
1490 * linux-tdep.c: Update.
1491 * linux-thread-db.c: Update.
1492 * mips-linux-nat.c: Update.
1493 * nat/aarch64-linux-hw-point.c: Update.
1494 * nat/aarch64-linux.c: Update.
1495 * nat/linux-btrace.c: Update.
1496 * nat/linux-osdata.c: Update.
1497 * nat/linux-procfs.c: Update.
1498 * nat/x86-linux-dregs.c: Update.
1499 * obsd-nat.c: Update.
1500 * ppc-fbsd-nat.c: Update.
1501 * ppc-linux-nat.c: Update.
1502 * procfs.c: Update.
1503 * python/py-infthread.c: Update.
1504 * ravenscar-thread.c: Update.
1505 * remote.c: Update.
1506 * s390-linux-nat.c: Update.
1507 * sol-thread.c: Update.
1508 * sol2-tdep.c: Update.
1509 * spu-linux-nat.c: Update.
1510 * x86-linux-nat.c: Update.
1511 * xtensa-linux-nat.c: Update.
1512
e99b03dc
TT
15132018-07-03 Tom Tromey <tom@tromey.com>
1514
1515 * common/ptid.c (ptid_get_pid): Remove.
1516 * common/ptid.h (ptid_get_pid): Don't declare.
1517 * aarch64-linux-nat.c: Update.
1518 * ada-lang.c: Update.
1519 * aix-thread.c: Update.
1520 * alpha-bsd-nat.c: Update.
1521 * amd64-fbsd-nat.c: Update.
1522 * amd64-linux-nat.c: Update.
1523 * arm-linux-nat.c: Update.
1524 * arm-nbsd-nat.c: Update.
1525 * auxv.c: Update.
1526 * break-catch-syscall.c: Update.
1527 * breakpoint.c: Update.
1528 * bsd-uthread.c: Update.
1529 * corelow.c: Update.
1530 * ctf.c: Update.
1531 * darwin-nat.c: Update.
1532 * fbsd-nat.c: Update.
1533 * fbsd-tdep.c: Update.
1534 * gcore.c: Update.
1535 * gnu-nat.c: Update.
1536 * hppa-nbsd-nat.c: Update.
1537 * hppa-obsd-nat.c: Update.
1538 * i386-fbsd-nat.c: Update.
1539 * ia64-linux-nat.c: Update.
1540 * inf-ptrace.c: Update.
1541 * infcmd.c: Update.
1542 * inferior.c: Update.
1543 * inferior.h: Update.
1544 * inflow.c: Update.
1545 * infrun.c: Update.
1546 * linux-fork.c: Update.
1547 * linux-nat.c: Update.
1548 * linux-tdep.c: Update.
1549 * linux-thread-db.c: Update.
1550 * m68k-bsd-nat.c: Update.
1551 * mi/mi-interp.c: Update.
1552 * mi/mi-main.c: Update.
1553 * mips-linux-nat.c: Update.
1554 * mips-nbsd-nat.c: Update.
1555 * mips64-obsd-nat.c: Update.
1556 * nat/aarch64-linux-hw-point.c: Update.
1557 * nat/aarch64-linux.c: Update.
1558 * nat/linux-btrace.c: Update.
1559 * nat/linux-osdata.c: Update.
1560 * nat/linux-procfs.c: Update.
1561 * nat/x86-linux-dregs.c: Update.
1562 * nto-procfs.c: Update.
1563 * obsd-nat.c: Update.
1564 * ppc-linux-nat.c: Update.
1565 * ppc-nbsd-nat.c: Update.
1566 * ppc-obsd-nat.c: Update.
1567 * proc-service.c: Update.
1568 * procfs.c: Update.
1569 * python/py-inferior.c: Update.
1570 * python/py-infthread.c: Update.
1571 * ravenscar-thread.c: Update.
1572 * record.c: Update.
1573 * remote-sim.c: Update.
1574 * remote.c: Update.
1575 * rs6000-nat.c: Update.
1576 * s390-linux-nat.c: Update.
1577 * sh-nbsd-nat.c: Update.
1578 * sol-thread.c: Update.
1579 * sparc-nat.c: Update.
1580 * sparc64-tdep.c: Update.
1581 * spu-linux-nat.c: Update.
1582 * spu-tdep.c: Update.
1583 * target-debug.h: Update.
1584 * target.c: Update.
1585 * thread.c: Update.
1586 * tid-parse.c: Update.
1587 * tracefile-tfile.c: Update.
1588 * vax-bsd-nat.c: Update.
1589 * windows-nat.c: Update.
1590 * x86-linux-nat.c: Update.
1591 * x86-nat.c: Update.
1592
f2907e49
TT
15932018-07-03 Tom Tromey <tom@tromey.com>
1594
1595 * common/ptid.c (pid_to_ptid): Remove.
1596 * common/ptid.h (pid_to_ptid): Don't declare.
1597 * aix-thread.c: Update.
1598 * arm-linux-nat.c: Update.
1599 * common/ptid.c: Update.
1600 * common/ptid.h: Update.
1601 * corelow.c: Update.
1602 * ctf.c: Update.
1603 * darwin-nat.c: Update.
1604 * fbsd-nat.c: Update.
1605 * fork-child.c: Update.
1606 * gnu-nat.c: Update.
1607 * go32-nat.c: Update.
1608 * inf-ptrace.c: Update.
1609 * infcmd.c: Update.
1610 * inferior.c: Update.
1611 * infrun.c: Update.
1612 * linux-fork.c: Update.
1613 * linux-nat.c: Update.
1614 * nat/aarch64-linux-hw-point.c: Update.
1615 * nat/fork-inferior.c: Update.
1616 * nat/x86-linux-dregs.c: Update.
1617 * nto-procfs.c: Update.
1618 * obsd-nat.c: Update.
1619 * procfs.c: Update.
1620 * progspace.c: Update.
1621 * remote.c: Update.
1622 * rs6000-nat.c: Update.
1623 * s390-linux-nat.c: Update.
1624 * sol-thread.c: Update.
1625 * spu-linux-nat.c: Update.
1626 * target.c: Update.
1627 * top.c: Update.
1628 * tracefile-tfile.c: Update.
1629 * windows-nat.c: Update.
1630
fd79271b
TT
16312018-07-03 Tom Tromey <tom@tromey.com>
1632
1633 * common/ptid.h (ptid_build): Don't declare.
1634 * common/ptid.c (ptid_build): Remove.
1635 * aix-thread.c: Update.
1636 * bsd-kvm.c: Update.
1637 * bsd-uthread.c: Update.
1638 * common/agent.c: Update.
1639 * common/ptid.c: Update.
1640 * common/ptid.h: Update.
1641 * corelow.c: Update.
1642 * darwin-nat.c: Update.
1643 * fbsd-nat.c: Update.
1644 * gnu-nat.c: Update.
1645 * linux-fork.c: Update.
1646 * linux-nat.c: Update.
1647 * linux-thread-db.c: Update.
1648 * nat/linux-osdata.c: Update.
1649 * nat/linux-procfs.c: Update.
1650 * nto-procfs.c: Update.
1651 * obsd-nat.c: Update.
1652 * proc-service.c: Update.
1653 * procfs.c: Update.
1654 * ravenscar-thread.c: Update.
1655 * remote-sim.c: Update.
1656 * remote.c: Update.
1657 * sol-thread.c: Update.
1658 * target.c: Update.
1659 * windows-nat.c: Update.
1660
057302ce
TT
16612018-07-03 Tom Tromey <tom@tromey.com>
1662
1663 * infrun.c (follow_exec): Use exit_inferior_silent.
1664 * inferior.c (exit_inferior_num_silent): Remove.
1665 * inferior.h (exit_inferior_num_silent): Don't declare.
1666
a50c11c6
TT
16672018-07-03 Tom Tromey <tom@tromey.com>
1668
1669 PR cli/23340:
1670 * darwin-nat.c (darwin_attach_pid): Reset inferior and
1671 inferior_ptid on error.
1672
471b9d15
MR
16732018-07-02 Maciej W. Rozycki <macro@mips.com>
1674 Simon Marchi <simon.marchi@polymtl.ca>
1675
1676 PR tdep/8282
1677 * disasm.h (gdb_disassembler): Add
1678 `m_disassembler_options_holder'. member
1679 * disasm.c (get_all_disassembler_options): New function.
1680 (gdb_disassembler::gdb_disassembler): Use it.
1681 (gdb_buffered_insn_length_init_dis): Likewise.
1682 (gdb_buffered_insn_length): Adjust accordingly.
1683 (set_disassembler_options): Handle options with arguments.
1684 (show_disassembler_options_sfunc): Likewise. Add a leading new
1685 line if showing options with descriptions.
1686 (disassembler_options_completer): Adapt to using the
1687 `disasm_options_and_args_t' structure.
1688 * mips-tdep.c (mips_disassembler_options): New variable.
1689 (mips_disassembler_options_o32): Likewise.
1690 (mips_disassembler_options_n32): Likewise.
1691 (mips_disassembler_options_n64): Likewise.
1692 (gdb_print_insn_mips): Don't set `disassembler_options'.
1693 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
1694 functions.
1695 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
1696 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
1697 `gdbarch_disassembler_options_implicit' and
1698 `gdbarch_valid_disassembler_options'.
1699 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
1700 `disasm_options_and_args_t' structure.
1701 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
1702 method.
1703 (valid_disassembler_options): Switch from `disasm_options_t' to
1704 the `disasm_options_and_args_t' structure.
1705 * NEWS: Document `set disassembler-options' support for the MIPS
1706 target.
1707 * gdbarch.h: Regenerate.
1708 * gdbarch.c: Regenerate.
1709
41823f29
SH
17102018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
1711
1712 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
1713
41206e32
JB
17142018-06-29 Joel Brobecker <brobecker@adacore.com>
1715
1716 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
1717 parameter in call to amd64_target_description.
1718 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
1719 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
1720 (amd64fbsd_init_abi): Likewise.
1721 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
1722 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
1723 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
1724 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
1725
de52b960
PA
17262018-06-29 Pedro Alves <palves@redhat.com>
1727
1728 * gdb/amd64-tdep.h (amd64_create_target_description): Add
1729 "segments" parameter.
1730 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
1731 (_initialize_amd64_tdep): Update call to
1732 amd64_create_target_description.
1733 (amd64_target_description): Add "segments" parameter. Adjust
1734 the implementation to use it.
1735 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
1736 call to amd64_create_target_description.
1737 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
1738 * gdb/arch/amd64.h (amd64_create_target_description): Add
1739 "segments" register.
1740 * gdb/arch/amd64.c (amd64_create_target_description): Add
1741 "segments" parameter. Call create_feature_i386_64bit_segments
1742 only if SEGMENTS is true.
1743 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
1744 call to amd64_create_target_description.
1745
75acb486
PA
17462018-06-29 Pedro Alves <palves@redhat.com>
1747
1748 * thread.c (thread_target_id_str): New, factored out from ...
1749 (print_thread_info_1): ... here. Use it to compute the max
1750 "Target Id" column width.
1751
c76a8ea3
PA
17522018-06-29 Pedro Alves <palves@redhat.com>
1753
1754 * remote.c (remote_target::extra_thread_info): Delete
1755 'display_buf' and 'n' locals. from the cache, regardless of
1756 packet mechanims is in use. Use cache for qThreadExtra and qP
1757 methods too.
1758
cd2bb709
PA
17592018-06-29 Pedro Alves <palves@redhat.com>
1760
1761 * blockframe.c (find_pc_sect_containing_function): New function.
1762 * breakpoint.c (print_breakpoint_location): Don't call
1763 find_pc_sect_function.
1764 * linespec.c (create_sals_line_offset): Record the location's
1765 symbol in the sal.
1766 * linespec.c (convert_address_location_to_sals): Fill in sal's
1767 symbol with find_pc_sect_containing_function.
1768 * symtab.c (find_function_start_sal): Rename to ...
1769 (find_function_start_sal_1): ... this.
1770 (find_function_start_sal): Reimplement as wrapper around
1771 find_function_start_sal_1, and use
1772 find_pc_sect_containing_function to fill in the sal's symbol.
1773 (find_function_start_sal(symbol*, bool)): Adjust.
1774 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
1775 comments.
1776 (find_pc_sect_containing_function): Declare.
1777
991ff292
PA
17782018-06-29 Pedro Alves <palves@redhat.com>
1779
1780 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
1781 true if the the location has no symbol.
1782
44cee4fd
TT
17832018-06-28 Tom Tromey <tom@tromey.com>
1784
1785 * NEWS: Mention --enable-codesign.
1786 * silent-rules.mk (ECHO_SIGN): New variable.
1787 * configure.ac: Add --enable-codesign.
1788 * configure: Rebuild.
1789 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
1790 (gdb$(EXEEXT)): Optionally invoke codesign.
1791
f2ffa92b
PA
17922018-06-28 Pedro Alves <palves@redhat.com>
1793
1794 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
1795 comments.
1796 (switch_to_thread_no_regs): Adjust comment.
1797 * infcmd.c (stop_pc): Delete.
1798 (post_create_inferior, info_program_command): Replace references
1799 to stop_pc with references to thread_info->suspend.stop_pc.
1800 * inferior.h (stop_pc): Delete declaration.
1801 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
1802 (handle_inferior_event_1, handle_signal_stop)
1803 (process_event_stop_test, keep_going_stepped_thread)
1804 (handle_step_into_function, handle_step_into_function_backward)
1805 (print_stop_location): Replace references to stop_pc with
1806 references to thread_info->suspend.stop_pc.
1807 (struct infcall_suspend_state) <stop_pc>: Delete field.
1808 (save_infcall_suspend_state, restore_infcall_suspend_state):
1809 Remove references to inf_stat->stop_pc.
1810 * linux-fork.c (fork_load_infrun_state): Likewise.
1811 * record-btrace.c (record_btrace_set_replay): Likewise.
1812 * record-full.c (record_full_goto_entry): Likewise.
1813 * remote.c (print_one_stopped_thread): Likewise.
1814 * target.c (target_resume): Extend comment.
1815 * thread.c (set_executing_thread): New.
1816 (set_executing): Use it.
1817 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
1818 Remove references to stop_pc.
1819
ecdc3a72
PA
18202018-06-28 Pedro Alves <palves@redhat.com>
1821
1822 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
1823 Moving fetching stop_pc until after ecs->event_thread is refreshed.
1824
d95d3aef
TT
18252018-06-28 Tom Tromey <tom@tromey.com>
1826
1827 * coffread.c (coff_symfile_finish): Update.
1828 * xcoffread.c (xcoff_symfile_finish): Update.
1829 * elfread.c (elf_symfile_finish): Update.
1830 * symfile.h (dwarf2_free_objfile): Don't declare.
1831 * dwarf2read.c (_initialize_dwarf2_read): Use
1832 register_objfile_data_with_cleanup.
1833 (dwarf2_free_objfile): Now static. Change signature.
1834
291f9a96
PT
18352018-06-28 Petr Tesarik <ptesarik@suse.cz>
1836
1837 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
1838 option "-o" to add-symbol-file-load to add an offset to each
1839 section's load address.
1840 * symfile.c (set_objfile_default_section_offset): New function.
1841
d81a3eaf
PT
18422018-06-28 Petr Tesarik <ptesarik@suse.cz>
1843
1844 * symfile.c (add_symbol_file_command): Make sure that sections
1845 with the same name are sorted in the same order.
1846
ed6dfe51
PT
18472018-06-28 Petr Tesarik <ptesarik@suse.cz>
1848
1849 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
1850 require the second argument. If omitted, load sections at the
1851 addresses specified in the file.
1852
d4d429d5
PT
18532018-06-28 Petr Tesarik <ptesarik@suse.cz>
1854
1855 * symfile.c (symbol_file_command, symbol_file_add_main_1)
1856 (_initialize_symfile): Add option "-o" to symbol-file to add an
1857 offset to each section of the symbol file.
1858
39b27ab6
PT
18592018-06-28 Petr Tesarik <ptesarik@suse.cz>
1860
1861 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
1862
41827fc3
TT
18632018-06-27 Tom Tromey <tom@tromey.com>
1864
1865 * stack.c (_initialize_stack): Update "func" help text.
1866
0c6aef22
TT
18672018-06-27 Tom Tromey <tom@tromey.com>
1868
1869 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
1870 std::vector.
1871 (unwind_infopy_str, pyuw_create_unwind_info)
1872 (unwind_infopy_add_saved_register, pyuw_sniffer)
1873 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
1874 Update.
1875 (struct saved_reg): Add constructor.
1876 <value>: Now a gdbpy_ref<>.
1877
63177289
TT
18782018-06-27 Tom Tromey <tom@tromey.com>
1879
1880 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
1881
e76f78a0
SM
18822018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1883
1884 * gdb-gdb.py.in: Format using autopep8.
1885
9a14af7b
SM
18862018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1887
1888 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
1889 (type_lookup_function): Recognize CORE_ADDR values.
1890
189366cd
SM
18912018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1892
1893 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
1894 print tag_name.
1895
68ad5fb9
SM
18962018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1897
1898 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
1899 <__lt__>: Add.
1900
141ec9f6
SM
19012018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1902
1903 * gdb-gdb.py: Move to...
1904 * gdb-gdb.py.in: ... here.
1905 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
1906 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
1907 dependencies.
1908 (distclean): Remove gdb-gdb.py when cleaning.
1909 (gdb-gdb.py, gdb-gdb.gdb): New rules.
1910 * configure: Re-generate.
1911
4c4e7ad4
PA
19122018-06-27 Pedro Alves <palves@redhat.com>
1913
1914 * proc-service.c (get_ps_regcache): New.
1915 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1916 (ps_lsetfpregs): Use it.
1917
7ab6656f
OJ
19182018-06-27 Omair Javaid <omair.javaid@linaro.org>
1919
1920 PR gdb/21695
1921 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
1922 (dwarf_decode_lines_1): Adjust.
1923
bd583225
SM
19242018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1925
1926 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
1927 override.
1928 <info_proc>: Likewise.
1929
9a325b7b
JB
19302018-06-26 Joel Brobecker <brobecker@adacore.com>
1931
1932 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
1933 to windows_fetch_one_register, and only handle the case of
1934 fetching one register. Move the code that reloads the context
1935 and iterates over all registers if R is negative to...
1936 (windows_nat_target::fetch_registers): ... here.
1937 (do_windows_store_inferior_registers): Rename to
1938 windows_store_one_register, and only handle the case of storing
1939 one register. Move the code that handles the case where r is
1940 negative to...
1941 (windows_nat_target::store_registers) ... here.
1942
a33ccfc7
TT
19432018-06-26 Tom Tromey <tom@tromey.com>
1944
1945 PR rust/22574:
1946 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
1947 * rust-lang.c (rust_print_struct_def): Add podata parameter.
1948 Update.
1949 (rust_internal_print_type): Add podata parameter.
1950 (rust_print_type): Update.
1951
e0c547d1
TT
19522018-06-26 Tom Tromey <tom@tromey.com>
1953
1954 * typeprint.h (struct print_offset_data) <update, finish,
1955 maybe_print_hole>: New methods.
1956 <indentation>: New constant.
1957 * typeprint.c (print_offset_data::indentation): Define.
1958 (print_offset_data::maybe_print_hole, print_offset_data::update)
1959 (print_offset_data::finish): Move from c-typeprint.c and rename.
1960 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
1961 (print_spaces_filtered_with_print_options): Update.
1962 (c_print_type_union_field_offset, maybe_print_hole)
1963 (c_print_type_struct_field_offset): Move to typeprint.c and
1964 rename.
1965 (c_type_print_base_struct_union): Update.
1966
75cbc781
PA
19672018-06-25 Pedro Alves <palves@redhat.com>
1968
1969 * gdbthread.h (thread_info_ref, delete_thread)
1970 (delete_thread_silent, first_thread_of_inferior)
1971 (any_thread_of_inferior, switch_to_thread)
1972 (enable_thread_stack_temporaries)
1973 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1974 (get_last_thread_stack_temporary)
1975 (value_in_thread_stack_temporaries, can_access_registers_thread):
1976 Spell out "struct thread_info" instead of just "thread_info".
1977 * inferior.h (notice_new_inferior): Likewise.
1978
b7a08269
PA
19792018-06-25 Pedro Alves <palves@redhat.com>
1980
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 detach_inferior.
1985 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
1986 delete_thread.
1987 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
1988 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
1989 and pass a thread_info pointer to delete_thread.
1990 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
1991 pass thread_info pointer to delete_thread.
1992 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
1993 delete_thread_silent call.
1994 * procfs.c (procfs_target::detach): Pass inferior pointer to
1995 detach_inferior.
1996 (procfs_target::wait): Pass thread_info pointer to delete_thread.
1997 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
1998 delete_thread_silent call.
1999 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2000 pass thread_info pointer to delete_thread.
2001 (windows_nat_target::detach): Pass inferior pointer to
2002 delete_inferior.
2003
8e7767e3
AH
20042018-06-22 Alan Hayward <alan.hayward@arm.com>
2005
2006 * regcache.c (readable_regcache::read_part): Fix asserts.
2007 (reg_buffer::raw_collect_part): New function.
2008 (regcache::write_part): Fix asserts.
2009 (reg_buffer::raw_supply_part): New function.
2010 (regcache::transfer_regset_register): New helper function.
2011 (regcache::transfer_regset): Call new functions.
2012 (regcache_supply_regset): Use gdb_byte*.
2013 (regcache::supply_regset): Likewise.
2014 (regcache_collect_regset): Likewise.
2015 (regcache::collect_regset): Likewise.
2016 * regcache.h (reg_buffer::raw_collect_part): New declaration.
2017 (reg_buffer::raw_supply_part): Likewise.
2018 (regcache::transfer_regset_register): Likewise.
2019 (regcache::transfer_regset): Use gdb_byte*.
2020
bfd60e34
AH
20212018-06-22 Alan Hayward <alan.hayward@arm.com>
2022
2023 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
2024
00431a78
PA
20252018-06-21 Pedro Alves <palves@redhat.com>
2026
2027 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
2028 instead of a ptid_t. All callers adjusted.
2029 * ada-tasks.c (ada_get_task_number): Likewise. All callers
2030 adjusted.
2031 (print_ada_task_info, display_current_task_id, task_command_1):
2032 Adjust.
2033 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
2034 inferior_thread.
2035 (breakpoint_kind): Adjust.
2036 (remove_breakpoints_pid): Rename to ...
2037 (remove_breakpoints_inf): ... this. Adjust to take an inferior
2038 pointer. All callers adjusted.
2039 (bpstat_clear_actions): Use inferior_thread.
2040 (get_bpstat_thread): New.
2041 (bpstat_do_actions): Use it.
2042 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
2043 to take a thread_info pointer. All callers adjusted.
2044 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
2045 (breakpoint_re_set_thread): Use inferior_thread.
2046 * breakpoint.h (struct inferior): Forward declare.
2047 (bpstat_stop_status): Update.
2048 (remove_breakpoints_pid): Delete.
2049 (remove_breakpoints_inf): New.
2050 * bsd-uthread.c (bsd_uthread_target::wait)
2051 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
2052 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
2053 (maint_btrace_packet_history_cmd)
2054 (maint_btrace_clear_packet_history_cmd): Adjust.
2055 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
2056 inferior_thread.
2057 * cli/cli-interp.c: Include "inferior.h".
2058 * common/refcounted-object.h (struct
2059 refcounted_object_ref_policy): New.
2060 * compile/compile-object-load.c: Include gdbthread.h.
2061 (store_regs): Use inferior_thread.
2062 * corelow.c (core_target::close): Use current_inferior.
2063 (core_target_open): Adjust to use first_thread_of_inferior and use
2064 the current inferior.
2065 * ctf.c (ctf_target::close): Adjust to use current_inferior.
2066 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
2067 <thread>: ... this new field. All references adjusted.
2068 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
2069 Take a thread_info pointer instead of a ptid_t.
2070 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
2071 (dummy_frame_discard, register_dummy_frame_dtor): Take a
2072 thread_info pointer instead of a ptid_t.
2073 * elfread.c: Include "inferior.h".
2074 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
2075 Use inferior_thread.
2076 * eval.c (evaluate_subexp): Likewise.
2077 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
2078 inferior_thread.
2079 * gdb_proc_service.h (struct thread_info): Forward declare.
2080 (struct ps_prochandle) <ptid>: Delete, replaced by ...
2081 <thread>: ... this new field. All references adjusted.
2082 * gdbarch.h, gdbarch.c: Regenerate.
2083 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
2084 'thread' parameter. All implementations and callers adjusted.
2085 * gdbthread.h (thread_info) <set_running>: New method.
2086 (delete_thread, delete_thread_silent): Take a thread_info pointer
2087 instead of a ptid.
2088 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
2089 (first_thread_of_process): Delete, replaced by ...
2090 (first_thread_of_inferior): ... this new function. All callers
2091 adjusted.
2092 (any_live_thread_of_process): Delete, replaced by ...
2093 (any_live_thread_of_inferior): ... this new function. All callers
2094 adjusted.
2095 (switch_to_thread, switch_to_no_thread): Declare.
2096 (is_executing): Delete.
2097 (enable_thread_stack_temporaries): Update comment.
2098 <enable_thread_stack_temporaries>: Take a thread_info pointer
2099 instead of a ptid_t. Incref the thread.
2100 <~enable_thread_stack_temporaries>: Decref the thread.
2101 <m_ptid>: Delete
2102 <m_thr>: New.
2103 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2104 (get_last_thread_stack_temporary)
2105 (value_in_thread_stack_temporaries, can_access_registers_thread):
2106 Take a thread_info pointer instead of a ptid_t. All callers
2107 adjusted.
2108 * infcall.c (get_call_return_value): Use inferior_thread.
2109 (run_inferior_call): Work with thread pointers instead of ptid_t.
2110 (call_function_by_hand_dummy): Work with thread pointers instead
2111 of ptid_t. Use thread_info_ref.
2112 * infcmd.c (proceed_thread_callback): Access thread's state
2113 directly.
2114 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
2115 access thread's state directly.
2116 (continue_command): Use inferior_thread.
2117 (info_program_command): Use find_thread_ptid and access thread
2118 state directly.
2119 (proceed_after_attach_callback): Use thread state directly.
2120 (notice_new_inferior): Take a thread_info pointer instead of a
2121 ptid_t. All callers adjusted.
2122 (exit_inferior): Take an inferior pointer instead of a pid. All
2123 callers adjusted.
2124 (exit_inferior_silent): New.
2125 (detach_inferior): Delete.
2126 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
2127 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
2128 (detach_inferior_command, kill_inferior_command): Use
2129 find_inferior_id instead of valid_gdb_inferior_id and
2130 gdb_inferior_id_to_pid.
2131 (inferior_command): Use inferior and thread pointers.
2132 * inferior.h (struct thread_info): Forward declare.
2133 (notice_new_inferior): Take a thread_info pointer instead of a
2134 ptid_t. All callers adjusted.
2135 (detach_inferior): Delete declaration.
2136 (exit_inferior, exit_inferior_silent): Take an inferior pointer
2137 instead of a pid. All callers adjusted.
2138 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
2139 (valid_gdb_inferior_id): Delete.
2140 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
2141 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
2142 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
2143 ...
2144 <inf>: ... this new field.
2145 <step_ptid>: Delete, replaced by ...
2146 <step_thread>: ... this new field.
2147 (get_displaced_stepping_state): Take an inferior pointer instead
2148 of a pid. All callers adjusted.
2149 (displaced_step_in_progress_any_inferior): Adjust.
2150 (displaced_step_in_progress_thread): Take a thread pointer instead
2151 of a ptid_t. All callers adjusted.
2152 (displaced_step_in_progress, add_displaced_stepping_state): Take
2153 an inferior pointer instead of a pid. All callers adjusted.
2154 (get_displaced_step_closure_by_addr): Adjust.
2155 (remove_displaced_stepping_state): Take an inferior pointer
2156 instead of a pid. All callers adjusted.
2157 (displaced_step_prepare_throw, displaced_step_prepare)
2158 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
2159 All callers adjusted.
2160 (start_step_over): Adjust.
2161 (infrun_thread_ptid_changed): Remove bit updating ptids in the
2162 displaced step queue.
2163 (do_target_resume): Adjust.
2164 (fetch_inferior_event): Use inferior_thread.
2165 (context_switch, get_inferior_stop_soon): Take an
2166 execution_control_state pointer instead of a ptid_t. All callers
2167 adjusted.
2168 (switch_to_thread_cleanup): Delete.
2169 (stop_all_threads): Use scoped_restore_current_thread.
2170 * inline-frame.c: Include "gdbthread.h".
2171 (inline_state) <inline_state>: Take a thread pointer instead of a
2172 ptid_t. All callers adjusted.
2173 <ptid>: Delete, replaced by ...
2174 <thread>: ... this new field.
2175 (find_inline_frame_state): Take a thread pointer instead of a
2176 ptid_t. All callers adjusted.
2177 (skip_inline_frames, step_into_inline_frame)
2178 (inline_skipped_frames, inline_skipped_symbol): Take a thread
2179 pointer instead of a ptid_t. All callers adjusted.
2180 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
2181 (inline_skipped_frames, inline_skipped_symbol): Likewise.
2182 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
2183 pointers directly.
2184 * linux-nat.c (get_detach_signal): Likewise.
2185 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
2186 (thread_db_notice_clone): Adjust.
2187 (thread_db_find_new_threads_silently)
2188 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
2189 a thread pointer instead of a ptid_t. All callers adjusted.
2190 * mi/mi-cmd-var.c: Include "inferior.h".
2191 (mi_cmd_var_update_iter): Update to use thread pointers.
2192 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
2193 inferior directly.
2194 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
2195 out to ...
2196 (mi_output_running): ... this new function.
2197 (mi_on_resume_1): Adjust to use it.
2198 (mi_user_selected_context_changed): Adjust to use inferior_thread.
2199 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
2200 directly.
2201 (interrupt_thread_callback): : Adjust to use thread and inferior
2202 pointers.
2203 * proc-service.c: Include "gdbthread.h".
2204 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
2205 * progspace-and-thread.c: Include "inferior.h".
2206 * progspace.c: Include "inferior.h".
2207 * python/py-exitedevent.c (create_exited_event_object): Adjust to
2208 hold a reference to an inferior_object.
2209 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
2210 inferior_thread.
2211 * python/py-inferior.c (struct inferior_object): Give the type a
2212 tag name instead of a typedef.
2213 (python_on_normal_stop): No need to check if the current thread is
2214 listed.
2215 (inferior_to_inferior_object): Change return type to
2216 inferior_object. All callers adjusted.
2217 (find_thread_object): Delete, bits factored out to ...
2218 (thread_to_thread_object): ... this new function.
2219 * python/py-infthread.c (create_thread_object): Use
2220 inferior_to_inferior_object.
2221 (thpy_is_stopped): Use thread pointer directly.
2222 (gdbpy_selected_thread): Use inferior_thread.
2223 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
2224 field, replaced with ...
2225 <thread>: ... this new field. All users adjusted.
2226 (btpy_insn_or_gap_new): Drop const.
2227 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
2228 callers adjusted.
2229 * python/py-record.c: Include "gdbthread.h".
2230 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2231 a ptid_t. All callers adjusted.
2232 (gdbpy_current_recording): Use inferior_thread.
2233 * python/py-record.h (recpy_record_object) <ptid>: Delete
2234 field, replaced with ...
2235 <thread>: ... this new field. All users adjusted.
2236 (recpy_element_object) <ptid>: Delete
2237 field, replaced with ...
2238 <thread>: ... this new field. All users adjusted.
2239 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2240 a ptid_t. All callers adjusted.
2241 * python/py-threadevent.c: Include "gdbthread.h".
2242 (get_event_thread): Use thread_to_thread_object.
2243 * python/python-internal.h (struct inferior_object): Forward
2244 declare.
2245 (find_thread_object, find_inferior_object): Delete declarations.
2246 (thread_to_thread_object, inferior_to_inferior_object): New
2247 declarations.
2248 * record-btrace.c: Include "inferior.h".
2249 (require_btrace_thread): Use inferior_thread.
2250 (record_btrace_frame_sniffer)
2251 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
2252 (get_thread_current_frame): Use scoped_restore_current_thread and
2253 switch_to_thread.
2254 (get_thread_current_frame): Use thread pointer directly.
2255 (record_btrace_replay_at_breakpoint): Use thread's inferior
2256 pointer directly.
2257 * record-full.c: Include "inferior.h".
2258 * regcache.c: Include "gdbthread.h".
2259 (get_thread_arch_regcache): Use the inferior's address space
2260 directly.
2261 (get_thread_regcache, registers_changed_thread): New.
2262 * regcache.h (get_thread_regcache(thread_info *thread)): New
2263 overload.
2264 (registers_changed_thread): New.
2265 (remote_target) <remote_detach_1>: Swap order of parameters.
2266 (remote_add_thread): <remote_add_thread>: Return the new thread.
2267 (get_remote_thread_info(ptid_t)): New overload.
2268 (remote_target::remote_notice_new_inferior): Use thread pointers
2269 directly.
2270 (remote_target::process_initial_stop_replies): Use
2271 thread_info::set_running.
2272 (remote_target::remote_detach_1, remote_target::detach)
2273 (extended_remote_target::detach): Adjust.
2274 * stack.c (frame_show_address): Use inferior_thread.
2275 * target-debug.h (target_debug_print_thread_info_pp): New.
2276 * target-delegates.c: Regenerate.
2277 * target.c (default_thread_address_space): Delete.
2278 (memory_xfer_partial_1): Use current_inferior.
2279 (target_detach): Use current_inferior.
2280 (target_thread_address_space): Delete.
2281 (generic_mourn_inferior): Use current_inferior.
2282 * target.h (struct target_ops) <thread_address_space>: Delete.
2283 (target_thread_address_space): Delete.
2284 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
2285 pointers directly.
2286 (delete_thread_1, delete_thread, delete_thread_silent): Take a
2287 thread pointer instead of a ptid_t. Adjust all callers.
2288 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
2289 (first_thread_of_process): Delete, replaced by ...
2290 (first_thread_of_inferior): ... this new function. All callers
2291 adjusted.
2292 (any_thread_of_process): Rename to ...
2293 (any_thread_of_inferior): ... this, and take an inferior pointer.
2294 (any_live_thread_of_process): Rename to ...
2295 (any_live_thread_of_inferior): ... this, and take an inferior
2296 pointer.
2297 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2298 (value_in_thread_stack_temporaries)
2299 (get_last_thread_stack_temporary): Take a thread pointer instead
2300 of a ptid_t. Adjust all callers.
2301 (thread_info::set_running): New.
2302 (validate_registers_access): Use inferior_thread.
2303 (can_access_registers_ptid): Rename to ...
2304 (can_access_registers_thread): ... this, and take a thread
2305 pointer.
2306 (print_thread_info_1): Adjust to compare thread pointers instead
2307 of ptids.
2308 (switch_to_no_thread, switch_to_thread): Make extern.
2309 (scoped_restore_current_thread::~scoped_restore_current_thread):
2310 Use m_thread pointer directly.
2311 (scoped_restore_current_thread::scoped_restore_current_thread):
2312 Use inferior_thread.
2313 (thread_command): Use thread pointer directly.
2314 (thread_num_make_value_helper): Use inferior_thread.
2315 * top.c (execute_command): Use inferior_thread.
2316 * tui/tui-interp.c: Include "inferior.h".
2317 * varobj.c (varobj_create): Use inferior_thread.
2318 (value_of_root_1): Use find_thread_global_id instead of
2319 global_thread_id_to_ptid.
2320
33bab475
AH
23212018-06-21 Alan Hayward <alan.hayward@arm.com>
2322
2323 * regcache.c (readable_regcache::read_part): Avoid memcpy when
2324 possible.
2325 (regcache::write_part): Likewise.
2326 (readable_regcache::cooked_read_part): Update comment.
2327 (readable_regcache::cooked_write_part): Likewise.
2328 * regcache.h: (readable_regcache::read_part): Likewise.
2329 (regcache::write_part): Likewise.
2330
8363f9d5
RB
23312018-06-21 Richard Bunt <richard.bunt@arm.com>
2332 Dirk Schubert <dirk.schubert@arm.com>
2333
2334 * aarch64-linux-nat.c (post_attach): New.
2335 (aarch64_linux_nat_target::post_attach): Override post_attach to
2336 record the number of hardware debug registers.
2337
0d0b0ea2
TT
23382018-06-20 Tom Tromey <tom@tromey.com>
2339
2340 * python/py-param.c (add_setshow_generic): Make parameters const.
2341 (parmpy_init): Update.
2342
302abd6e
SM
23432018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
2344
2345 * regcache.h (regcache_cooked_read_ftype): Rename to...
2346 (register_read_ftype): ...this, change type to function_view.
2347 (class reg_buffer) <save>: Remove src parameter.
2348 (readonly_detached_regcache) <readonly_detached_regcache>: Make
2349 parameter non-const in first overload. Remove src parameter in
2350 second overload.
2351 * regcache.c (do_cooked_read): Remove.
2352 (readonly_detached_regcache::readonly_detached_regcache): Make
2353 parameter non-const, adjust call to other constructor.
2354 (reg_buffer::save): Remove src parameter.
2355 * frame.c (do_frame_register_read): Remove.
2356 (frame_save_as_regcache): Use lambda function.
2357 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
2358 parameter to ppu2spu_data *.
2359 (ppu2spu_sniffer): Use lambda function.
2360
19f3f25f
SM
23612018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
2362
2363 * record-full.c (record_full_target::insert_breakpoint): Remove
2364 "struct" keyword, add const.
2365
d0ac1c44
SM
23662018-06-19 Simon Marchi <simon.marchi@ericsson.com>
2367
2368 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
2369 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
2370 * configure.ac: Remove AC_PREREQ, add missing quoting.
2371 * gnulib/configure.ac: Modernize usage of
2372 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
2373 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
2374 (AUTOMAKE_VERSION): Bump to 1.15.1.
2375 * configure: Re-generate.
2376 * config.in: Re-generate.
2377 * aclocal.m4: Re-generate.
2378 * gnulib/aclocal.m4: Re-generate.
2379 * gnulib/config.in: Re-generate.
2380 * gnulib/configure: Re-generate.
2381 * gnulib/import/Makefile.in: Re-generate.
2382
6ae50267
PA
23832018-06-19 Pedro Alves <palves@redhat.com>
2384
2385 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
2386 (lookup_minimal_symbol_by_pc_section): ... here with
2387 gdb_assert_not_reached added.
2388
61b04dd0
PA
23892018-06-19 Pedro Alves <palves@redhat.com>
2390
2391 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
2392 parameter with a block parameter. Compare location's block symbol
2393 with the frame's block instead of addresses.
2394 (skip_inline_frames): Pass the current block instead of the
2395 frame's address. Break out as soon as we determine the frame
2396 should not be skipped.
2397
f709fabb
TT
23982018-06-18 Tom Tromey <tom@tromey.com>
2399
2400 * solib-aix.c (solib_aix_get_section_offsets): Return
2401 unique_xmalloc_ptr.
2402 (solib_aix_solib_create_inferior_hook): Update.
2403
668eb2f0
TT
24042018-06-18 Tom Tromey <tom@tromey.com>
2405
2406 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
2407
309822ca
TT
24082018-06-18 Tom Tromey <tom@tromey.com>
2409
2410 * solib-frv.c (frv_relocate_main_executable): Use
2411 unique_xmalloc_ptr.
2412 * solib-dsbt.c (dsbt_relocate_main_executable): Use
2413 unique_xmalloc_ptr.
2414
06424eac
TT
24152018-06-18 Tom Tromey <tom@tromey.com>
2416
2417 * objfiles.h (inhibit_section_map_updates): Update.
2418 (resume_section_map_updates, resume_section_map_updates_cleanup):
2419 Remove.
2420 * solib-svr4.c (svr4_handle_solib_event): Update.
2421 * objfiles.c (inhibit_section_map_updates): Return
2422 scoped_restore_tmpl<int>.
2423 (resume_section_map_updates, resume_section_map_updates_cleanup):
2424 Remove.
2425
b4be9fad
TT
24262018-06-18 Tom Tromey <tom@tromey.com>
2427
2428 * valprint.h (read_string): Update.
2429 * valprint.c (read_string): Change type of "buffer".
2430 (val_print_string): Update.
2431 * python/py-value.c (valpy_string): Update.
2432 * language.h (struct language_defn) <la_get_string>: Change
2433 type of "buffer".
2434 (default_get_string, c_get_string): Update.
2435 * language.c (default_get_string): Change type of "buffer".
2436 * guile/scm-value.c (gdbscm_value_to_string): Update.
2437 * c-lang.c (c_get_string): Change type of "buffer".
2438
3f0dbd67
TT
24392018-06-18 Tom Tromey <tom@tromey.com>
2440
2441 * ser-mingw.c (struct pipe_state_destroyer): New.
2442 (pipe_state_up): New typedef.
2443 (cleanup_pipe_state): Remove.
2444 (pipe_windows_open): Use pipe_state_up. Don't release argv.
2445
69d340c6
TT
24462018-06-18 Tom Tromey <tom@tromey.com>
2447
2448 * rust-lang.h (rust_yyerror): Don't declare.
2449 * rust-lang.c (rust_language_defn): Update.
2450 * rust-exp.y (yyerror): Now static.
2451 * parse.c (parse_exp_in_context_1): Update.
2452 * p-lang.h (p_yyerror): Don't declare.
2453 * p-lang.c (p_language_defn): Update.
2454 * p-exp.y (yyerror): Now static.
2455 * opencl-lang.c (opencl_language_defn): Update.
2456 * objc-lang.c (objc_language_defn): Update.
2457 * m2-lang.h (m2_yyerror): Don't declare.
2458 * m2-lang.c (m2_language_defn): Update.
2459 * m2-exp.y (yyerror): Now static.
2460 * language.h (struct language_defn) <la_error>: Remove.
2461 * language.c (unk_lang_error): Remove.
2462 (unknown_language_defn, auto_language_defn): Remove.
2463 * go-lang.h (go_yyerror): Don't declare.
2464 * go-lang.c (go_language_defn): Update.
2465 * go-exp.y (yyerror): Now static.
2466 * f-lang.h (f_yyerror): Don't declare.
2467 * f-lang.c (f_language_defn): Update.
2468 * f-exp.y (yyerror): Now static.
2469 * d-lang.h (d_yyerror): Don't declare.
2470 * d-lang.c (d_language_defn): Update.
2471 * d-exp.y (yyerror): Now static.
2472 * c-lang.h (c_yyerror): Don't declare.
2473 * c-lang.c (c_language_defn, cplus_language_defn)
2474 (asm_language_defn, minimal_language_defn): Update.
2475 * c-exp.y (yyerror): Now static.
2476 * ada-lang.h (ada_yyerror): Don't declare.
2477 * ada-lang.c (ada_language_defn): Update.
2478 * ada-exp.y (yyerror): Now static.
2479
e9902bfc
AH
24802018-06-18 Alan Hayward <alan.hayward@arm.com>
2481
2482 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
2483 (store_sveregs_to_thread): Likewise.
2484 (aarch64_linux_fetch_inferior_registers): Check for SVE.
2485 (aarch64_linux_store_inferior_registers): Likewise.
2486 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
2487 function.
2488 (aarch64_sve_regs_copy_to_regcache): Likewise.
2489 (aarch64_sve_regs_copy_from_regcache): Likewise.
2490 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
2491 declaration.
2492 (aarch64_sve_regs_copy_to_regcache): Likewise.
2493 (aarch64_sve_regs_copy_from_regcache): Likewise.
2494 (sve_context): Structure from Linux headers.
2495 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
2496 (SVE_SIG_ZREG_SIZE): Likewise.
2497 (SVE_SIG_PREG_SIZE): Likewise.
2498 (SVE_SIG_FFR_SIZE): Likewise.
2499 (SVE_SIG_REGS_OFFSET): Likewise.
2500 (SVE_SIG_ZREGS_OFFSET): Likewise.
2501 (SVE_SIG_ZREG_OFFSET): Likewise.
2502 (SVE_SIG_ZREGS_SIZE): Likewise.
2503 (SVE_SIG_PREGS_OFFSET): Likewise.
2504 (SVE_SIG_PREG_OFFSET): Likewise.
2505 (SVE_SIG_PREGS_SIZE): Likewise.
2506 (SVE_SIG_FFR_OFFSET): Likewise.
2507 (SVE_SIG_REGS_SIZE): Likewise.
2508 (SVE_SIG_CONTEXT_SIZE): Likewise.
2509 (SVE_PT_REGS_MASK): Likewise.
2510 (SVE_PT_REGS_FPSIMD): Likewise.
2511 (SVE_PT_REGS_SVE): Likewise.
2512 (SVE_PT_VL_INHERIT): Likewise.
2513 (SVE_PT_VL_ONEXEC): Likewise.
2514 (SVE_PT_REGS_OFFSET): Likewise.
2515 (SVE_PT_FPSIMD_OFFSET): Likewise.
2516 (SVE_PT_FPSIMD_SIZE): Likewise.
2517 (SVE_PT_SVE_ZREG_SIZE): Likewise.
2518 (SVE_PT_SVE_PREG_SIZE): Likewise.
2519 (SVE_PT_SVE_FFR_SIZE): Likewise.
2520 (SVE_PT_SVE_FPSR_SIZE): Likewise.
2521 (SVE_PT_SVE_FPCR_SIZE): Likewise.
2522 (__SVE_SIG_TO_PT): Likewise.
2523 (SVE_PT_SVE_OFFSET): Likewise.
2524 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
2525 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
2526 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
2527 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
2528 (SVE_PT_SVE_PREG_OFFSET): Likewise.
2529 (SVE_PT_SVE_PREGS_SIZE): Likewise.
2530 (SVE_PT_SVE_FFR_OFFSET): Likewise.
2531 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
2532 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
2533 (SVE_PT_SVE_SIZE): Likewise.
2534 (SVE_PT_SIZE): Likewise.
2535 (HAS_SVE_STATE): New define.
2536
17a1cc89
AH
25372018-06-18 Alan Hayward <alan.hayward@arm.com>
2538
2539 * nat/aarch64-sve-linux-sigcontext.h: New file.
2540 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
2541 new files.
2542 (SVE_VQ_MIN): Likewise.
2543 (SVE_VQ_MAX): Likewise.
2544 (SVE_VL_MIN): Likewise.
2545 (SVE_VL_MAX): Likewise.
2546 (SVE_NUM_ZREGS): Likewise.
2547 (SVE_NUM_PREGS): Likewise.
2548 (sve_vl_valid): Likewise.
2549 (struct user_sve_header): Likewise.
2550
7010835a
AB
25512018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
2552 Richard Bunt <Richard.Bunt@arm.com>
2553
2554 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
2555 was requested by GDB.
2556
479b3ef4
TV
25572018-06-15 Tom de Vries <tdevries@suse.de>
2558
2559 * MAINTAINERS (Write After Approval): Add Tom de Vries.
2560
8199b8f4
SM
25612018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
2562
2563 * gnulib/update-gnulib.sh: Print expected versions of
2564 autoconf/aclocal.
2565
55c748a1
SM
25662018-06-14 Simon Marchi <simon.marchi@ericsson.com>
2567
2568 * arch-utils.c (default_type_align): Use type_length_units.
2569 * gdbtypes.c (type_align): Use type_length_units.
2570
87a8eca7
PW
25712018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2572
2573 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
2574 of 'define' command.
2575
5d9a0608
TV
25762018-06-14 Tom de Vries <tdevries@suse.de>
2577
2578 PR cli/22573
2579 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
2580 get_no_prettyformat_print_options.
2581
ab89b5a5
SM
25822018-06-13 Simon Marchi <simon.marchi@ericsson.com>
2583
2584 * sparc-nat.h: Include target.h.
2585 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
2586 <fetch_registers>: Remove this argument in function call.
2587 <store_registers>: Remove this argument in function call, remove
2588 extra semicolon.
2589 <low_forget_process>: Call sparc64_forget_process instead of
2590 sparc_forget_process.
2591
62c808ae
RO
25922018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2593
2594 * procfs.c (_initialize_procfs): Use add_inf_child_target.
2595 (procfs_target::make_corefile_notes): Adjust to new
2596 target_read_alloc return type.
2597
1840d81a
AB
25982018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2599 Stephen Roberts <stephen.roberts@arm.com>
2600
2601 PR gdb/22882
2602 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
2603 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
2604 Move should_notify_stop local into more inner scope.
2605
9516f85a
AB
26062018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2607 Stephen Roberts <stephen.roberts@arm.com>
2608
2609 PR gdb/22882
2610 * infrun.c (resume_1): Add call to mark_async_event_handler.
2611
defd2172
AB
26122018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2613
2614 * infrun.c (do_target_wait): Change old version of $pc printed.
2615
7b23e087
SM
26162018-06-11 Simon Marchi <simon.marchi@ericsson.com>
2617
2618 * dwarf2read.c (read_index_from_section): Rename to...
2619 (read_gdb_index_from_section): ... this, update all callers.
2620 (dwarf2_read_index): Rename to...
2621 (dwarf2_read_gdb_index): ... this, update all callers.
2622
69c67a0b
JDA
26232018-06-11 John David Anglin <danglin@gcc.gnu.org>
2624
2625 * gdb/hppa-linux-nat.c
2626 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
2627 hppa_linux_nat_target::fetch_registers.
2628
65d4cada
AH
26292018-06-11 Alan Hayward <alan.hayward@arm.com>
2630
2631 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
2632 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
2633 (AARCH64_DWARF_SVE_FFR): Likewise.
2634 (AARCH64_DWARF_SVE_P0): Likewise.
2635 (AARCH64_DWARF_SVE_Z0): Likewise.
2636
f868386e
AH
26372018-06-11 Alan Hayward <alan.hayward@arm.com>
2638
2639 * common/common-regcache.h (raw_compare): New function.
2640 * regcache.c (regcache::raw_compare): Likewise.
2641 * regcache.h (regcache::raw_compare): New declaration.
2642
9c861883
AH
26432018-06-11 Alan Hayward <alan.hayward@arm.com>
2644
2645 * common/common-regcache.h (reg_buffer_common): New structure.
2646 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
2647 (reg_buffer::raw_supply): Likewise.
2648 (reg_buffer::raw_supply_integer): Likewise.
2649 (reg_buffer::raw_supply_zeroed): Likewise.
2650 (reg_buffer::raw_collect): Likewise.
2651 (reg_buffer::raw_collect_integer): Likewise.
2652 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
2653 (reg_buffer::raw_supply): Likewise.
2654 (reg_buffer::raw_supply_integer): Likewise.
2655 (reg_buffer::raw_supply_zeroed): Likewise.
2656 (reg_buffer::raw_collect): Likewise.
2657 (reg_buffer::raw_collect_integer): Likewise.
2658
953edf2b
TT
26592018-06-10 Tom Tromey <tom@tromey.com>
2660
2661 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
2662 (class remote_state) <stop_reply_queue>: Now std::vector.
2663 (remote_state::~remote_state)
2664 (remote_target::stop_reply_queue_length): Update.
2665 (struct queue_iter_param, remove_child_of_pending_fork)
2666 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
2667 (check_pending_event_prevents_wildcard_vcont_callback)
2668 (remove_stop_reply_for_inferior)
2669 (remove_stop_reply_of_remote_state)
2670 (remote_notif_remove_once_on_match)
2671 (stop_reply_match_ptid_and_ws)
2672 (remote_kill_child_of_pending_fork): Remove.
2673 (remote_target::remove_new_fork_children)
2674 (remote_target::check_pending_events_prevent_wildcard_vcont)
2675 (remote_target::discard_pending_stop_replies)
2676 (remote_target::discard_pending_stop_replies_in_queue)
2677 (remote_target::remote_notif_remove_queued_reply)
2678 (remote_target::queued_stop_reply)
2679 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
2680 (remote_target::wait, remote_target::kill_new_fork_children)
2681 (remote_target::async): Update.
2682
1ddbba9d
TT
26832018-06-10 Tom Tromey <tom@tromey.com>
2684
2685 * record-full.c (record_full_arch_list_cleanups): Remove.
2686 (record_full_message): Use try/catch.
2687 (record_full_wait_cleanups): Remove.
2688 (record_full_wait_1): Use try/catch.
2689 (record_full_restore): Likewise.
2690
219605fd
TT
26912018-06-10 Tom Tromey <tom@tromey.com>
2692
2693 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
2694 declare VEC. Add constructor.
2695 <in_target_beneath>: Now bool.
2696 (record_full_breakpoints): Now a std::vector, static.
2697 (record_full_sync_record_breakpoints)
2698 (record_full_init_record_breakpoints)
2699 (record_full_target::insert_breakpoint)
2700 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
2701
71b73764
SM
27022018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
2703
2704 * dwarf2read.c (process_cu_includes): Remove struct keyword.
2705 * serial.c (serial_interface_lookup): Remove struct keyword.
2706
4360561f
TT
27072018-06-10 Tom Tromey <tom@tromey.com>
2708
2709 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
2710 method.
2711 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
2712 a method.
2713 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
2714 method.
2715 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
2716 "beneath" as a method.
2717 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
2718 Use "beneath" as a method.
2719
d14b92bf
TT
27202018-06-10 Tom Tromey <tom@tromey.com>
2721
2722 * tracefile.c (struct trace_file_writer_deleter): New.
2723 <operator()>: Rename from trace_file_writer_xfree.
2724 (trace_file_writer_up): New typedef.
2725 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
2726
835dcf92
SM
27272018-06-09 Simon Marchi <simon.marchi@ericsson.com>
2728
2729 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
2730 <m_registers, m_register_status>: Change type to
2731 std::unique_ptr.
2732 * regcache.c (reg_buffer::reg_buffer): Use new instead of
2733 XCNEWVEC.
2734
aac0d564
SM
27352018-06-09 Simon Marchi <simon.marchi@ericsson.com>
2736
2737 * common/common-regcache.h (enum register_status): Add
2738 underlying type "signed char".
2739 * regcache.h (reg_buffer) <m_register_status>: Change type to
2740 register_status *.
2741 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
2742 register_status instead of signed char.
2743 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
2744 (reg_buffer::get_register_status): Remove cast.
2745 (readable_regcache::raw_read): Remove cast.
2746 (readable_regcache::cooked_read): Remove cast.
2747
77ad7394
TT
27482018-06-09 Tom Tromey <tom@tromey.com>
2749
2750 * source.c (reverse_search_command, forward_search_command): Use
2751 scoped_fd.
2752
191cca63
TT
27532018-06-09 Tom Tromey <tom@tromey.com>
2754
2755 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
2756 (serial_ops_list): Now static, std::vector.
2757 (serial_interface_lookup, serial_add_interface): Update.
2758
c5d0225d
TT
27592018-06-09 Tom Tromey <tom@tromey.com>
2760
2761 * dwarf2read.c (process_cu_includes): Update.
2762 (process_full_comp_unit): Update.
2763 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
2764 std::vector.
2765
aeab5128
PK
27662018-06-08 Paul Koning <paul_koning@dell.com>
2767
2768 PR gdb/23252
2769
2770 * python/python.c (do_start_initialization):
2771 Avoid call to internal Python API.
2772 (init__gdb_module): New function.
2773
5045b3d7
GB
27742018-06-08 Gary Benson <gbenson@redhat.com>
2775
2776 * linux-thread-db.c (valprint.h): New include.
2777 (struct check_thread_db_info): New structure.
2778 (check_thread_db_on_load, tdb_testinfo): New static globals.
2779 (check_thread_db, check_thread_db_callback): New functions.
2780 (try_thread_db_load_1): Run integrity checks if requested.
2781 (maintenance_check_libthread_db): New function.
2782 (_initialize_thread_db): Register "maint check libthread-db"
2783 and "maint set/show check-libthread-db".
2784 * NEWS: Mention the above new commands.
2785
2f4f025f
TT
27862018-06-08 Tom Tromey <tom@tromey.com>
2787
2788 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
2789 now a method.
2790
343b0027
TT
27912018-06-08 Tom Tromey <tom@tromey.com>
2792
2793 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
2794
8dcc53b3
TT
27952018-06-08 Tom Tromey <tom@tromey.com>
2796
2797 * common/btrace-common.h (struct btrace_data): Add constructor,
2798 destructor, move assignment operator.
2799 <empty, clear, fini>: New methods.
2800 <format>: Initialize.
2801 (btrace_data_init, btrace_data_fini, btrace_data_clear)
2802 (btrace_data_empty): Don't declare.
2803 * common/btrace-common.c (btrace_data_init): Remove.
2804 (btrace_data::fini): Rename from btrace_data_fini.
2805 (btrace_data::empty): Rename from btrace_data_empty.
2806 (btrace_data::clear): Rename from btrace_data_clear. Return
2807 bool.
2808 * btrace.h (make_cleanup_btrace_data): Don't declare.
2809 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
2810 (parse_xml_btrace): Update.
2811 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
2812 (maint_btrace_clear_packet_history_cmd): Update.
2813
a1740ee1
PA
28142018-06-07 Pedro Alves <palves@redhat.com>
2815
2816 * target.h (target_ops) <beneath>: Now a method. All references
2817 updated.
2818 (class target_stack): New.
2819 * target.c (g_target_stack): New.
2820 (g_current_top_target): Delete.
2821 (current_top_target): Get the top target out of g_target_stack.
2822 (target_stack::push, target_stack::unpush): New.
2823 (push_target, unpush_target): Reimplement.
2824 (target_is_pushed): Reimplement in terms of g_target_stack.
2825 (target_ops::beneath, target_stack::find_beneath): New.
2826
d6ca69cd
PA
28272018-06-07 Pedro Alves <palves@redhat.com>
2828
2829 * target.h (find_target_beneath): Delete declaration.
2830 * target.c (find_target_beneath): Delete definition.
2831 * aix-thread.c: All callers of find_target_beneath adjusted to
2832 call target_ops::beneath instead.
2833 * bsd-uthread.c: Likewise.
2834 * linux-thread-db.c: Likewise.
2835 * ravenscar-thread.c: Likewise.
2836 * sol-thread.c: Likewise.
2837 * spu-multiarch.c: Likewise.
2838
b6a8c27b
PA
28392018-06-07 Pedro Alves <palves@redhat.com>
2840
2841 * target.h (target_ops) <beneath>: Now a method. All references
2842 updated.
2843 (target_ops) <m_beneath>: New.
2844 * target.c (target_ops::beneath): New.
2845 * corelow.c: Adjust all references to target_ops::beneath.
2846 * linux-thread-db.c: Likewise.
2847 * make-target-delegates: Likewise.
2848 * record-btrace.c: Likewise.
2849 * record-full.c: Likewise.
2850 * remote.c: Likewise.
2851 * target.c: Likewise.
2852 * target-delegates.c: Regenerate.
2853
8b88a78e
PA
28542018-06-07 Pedro Alves <palves@redhat.com>
2855
2856 * target.h (target_stack): Delete.
2857 (current_top_target): Declare function.
2858 * target.c (target_stack): Delete.
2859 (g_current_top_target): New.
2860 (current_top_target): New function.
2861 * auxv.c: Use current_top_target instead of target_stack
2862 throughout.
2863 * avr-tdep.c: Likewise.
2864 * breakpoint.c: Likewise.
2865 * corefile.c: Likewise.
2866 * elfread.c: Likewise.
2867 * eval.c: Likewise.
2868 * exceptions.c: Likewise.
2869 * frame.c: Likewise.
2870 * gdbarch-selftests.c: Likewise.
2871 * gnu-v3-abi.c: Likewise.
2872 * ia64-tdep.c: Likewise.
2873 * ia64-vms-tdep.c: Likewise.
2874 * infcall.c: Likewise.
2875 * infcmd.c: Likewise.
2876 * infrun.c: Likewise.
2877 * linespec.c: Likewise.
2878 * linux-tdep.c: Likewise.
2879 * minsyms.c: Likewise.
2880 * ppc-linux-nat.c: Likewise.
2881 * ppc-linux-tdep.c: Likewise.
2882 * procfs.c: Likewise.
2883 * regcache.c: Likewise.
2884 * remote.c: Likewise.
2885 * rs6000-tdep.c: Likewise.
2886 * s390-linux-nat.c: Likewise.
2887 * s390-tdep.c: Likewise.
2888 * solib-aix.c: Likewise.
2889 * solib-darwin.c: Likewise.
2890 * solib-dsbt.c: Likewise.
2891 * solib-spu.c: Likewise.
2892 * solib-svr4.c: Likewise.
2893 * solib-target.c: Likewise.
2894 * sparc-tdep.c: Likewise.
2895 * sparc64-tdep.c: Likewise.
2896 * spu-tdep.c: Likewise.
2897 * symfile.c: Likewise.
2898 * symtab.c: Likewise.
2899 * target-descriptions.c: Likewise.
2900 * target-memory.c: Likewise.
2901 * target.c: Likewise.
2902 * target.h: Likewise.
2903 * tracefile-tfile.c: Likewise.
2904 * tracepoint.c: Likewise.
2905 * valops.c: Likewise.
2906 * valprint.c: Likewise.
2907 * value.c: Likewise.
2908 * windows-tdep.c: Likewise.
2909 * mi/mi-main.c: Likewise.
2910
c7110220
TT
29112018-06-07 Tom Tromey <tom@tromey.com>
2912
2913 * valprint.h (build_address_symbolic): Declare.
2914 * printcmd.c (print_address_symbolic): Update.
2915 (build_address_symbolic): Change "name" and "filename" to
2916 std::string.
2917 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
2918 Update.
2919 * defs.h (build_address_symbolic): Remove declaration.
2920
63bad7b6
AH
29212018-06-07 Alan Hayward <alan.hayward@arm.com>
2922
2923 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
2924 (aarch64_vnv_type): Add function.
2925 (aarch64_pseudo_register_name): Add V regs for SVE.
2926 (aarch64_pseudo_register_type): Likewise.
2927 (aarch64_pseudo_register_reggroup_p): Likewise.
2928 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
2929 (aarch64_pseudo_read_value): Add V regs for SVE.
2930 (aarch64_pseudo_write_2): Use V0 offset for SVE
2931 (aarch64_pseudo_write): Add V regs for SVE.
2932 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
2933
13e3c608
SDJ
29342018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
2935
2936 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
2937 (sve_vl_from_vq): Likewise.
2938
c61b06a1
TT
29392018-06-05 Tom Tromey <tom@tromey.com>
2940
2941 * cli/cli-cmds.c (show_version): Update.
2942 * top.c (print_gdb_version): Add "interactive" parameter.
2943 Update.
2944 * main.c (captured_main_1): Update.
2945 * top.h (print_gdb_version): Add "interactive" parameter and a
2946 comment.
2947
115f7325
DM
29482018-06-05 David Malcolm <dmalcolm@redhat.com>
2949
2950 * common/enum-flags.h: Add trailing semicolon to example in
2951 comment.
2952
eb6af809
TT
29532018-06-05 Tom Tromey <tom@tromey.com>
2954
2955 PR cli/12326:
2956 * NEWS: Add entry about pager.
2957 * utils.c (pagination_disabled_for_command): New global.
2958 (prompt_for_continue): Allow "c" response to prompt.
2959 (reinitialize_more_filter): Clear
2960 pagination_disabled_for_command.
2961 (fputs_maybe_filtered): Check pagination_disabled_for_command.
2962
54d343a2
TT
29632018-06-04 Tom Tromey <tom@tromey.com>
2964
2965 * ada-lang.h (ada_lookup_symbol_list): Update.
2966 * ada-lang.c (resolve_subexp): Update.
2967 (symbols_are_identical_enums): Change type of syms. Remove nsyms
2968 parameter.
2969 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
2970 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
2971 results parameter to std::vector.
2972 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
2973 Update.
2974 * ada-exp.y (block_lookup): Update.
2975 (select_possible_type_sym): Change type of syms. Remove nsyms
2976 parameter.
2977 (write_var_or_type, write_name_assoc): Update.
2978
178d6a63
JB
29792018-06-04 Joel Brobecker <brobecker@adacore.com>
2980
2981 * windows-nat.c (windows_nat_target::xfer_partial): Return
2982 TARGET_XFER_E_IO if we need to delegate to the target beneath
2983 but BENEATH is NULL.
2984
baf00c2d
SM
29852018-06-04 Simon Marchi <simon.marchi@ericsson.com>
2986
2987 * Makefile.in (config.status): Add configure.nat as a
2988 dependency.
2989
214b073c
TT
29902018-06-04 Tom Tromey <tom@tromey.com>
2991
2992 * cp-name-parser.y (cpname_state): Add method declarations.
2993 (HANDLE_QUAL): Update.
2994 (cpname_state::d_grab, cpname_state::fill_comp)
2995 (cpname_state::make_operator, cpname_state::make_dtor)
2996 (cpname_state::make_builtin_type, cpname_state::make_name)
2997 (cpname_state::d_qualify, cpname_state::d_int_type)
2998 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
2999 (%union): Move earlier.
3000
62b74cb8
AH
30012018-06-04 Alan Hayward <alan.hayward@arm.com>
3002
3003 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
3004
3c5cd5c3
AH
30052018-06-04 Alan Hayward <alan.hayward@arm.com>
3006
3007 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
3008 (aarch64_pseudo_write_1): Likewise.
3009 (aarch64_pseudo_read_value): Use helper.
3010 (aarch64_pseudo_write): Likewise.
3011
59f413d5
PA
30122018-06-04 Pedro Alves <palves@redhat.com>
3013
3014 * darwin-nat.c (darwin_ops): Delete.
3015 (darwin_attach_pid): Use get_native_target.
3016
1332a140
AH
30172018-06-04 Alan Hayward <alan.hayward@arm.com>
3018
3019 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
3020 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
3021
ba2d2bb2
AH
30222018-06-04 Alan Hayward <alan.hayward@arm.com>
3023
3024 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
3025 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
3026 (aarch64_gdbarch_init): Check for SVE.
3027 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
3028
30292018-06-04 Alan Hayward <alan.hayward@arm.com>
39bfb937
AH
3030
3031 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
3032 * aarch64-tdep.h (aarch64_read_description): Likewise.
3033 * arch/aarch64.c (aarch64_create_target_description): Likewise.
3034 * arch/aarch64.h (aarch64_create_target_description): Likewise.
3035 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
3036 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
3037 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
3038
41c60b4b
SM
30392018-06-02 Simon Marchi <simon.marchi@ericsson.com>
3040
3041 * value.c (value_fetch_lazy_bitfield): New.
3042 (value_fetch_lazy_memory): New.
3043 (value_fetch_lazy_register): New.
3044 (value_fetch_lazy): Factor out to smaller functions.
3045
7b640f72
TT
30462018-06-01 Tom Tromey <tom@tromey.com>
3047
3048 * cp-name-parser.y (backslashable, represented): Now const.
3049
98e69eb3
TT
30502018-06-01 Tom Tromey <tom@tromey.com>
3051
3052 * cp-name-parser.y: Include parser-defs.h.
3053 (parser_fprintf): Remove declaration.
3054
49265499
TT
30552018-06-01 Tom Tromey <tom@tromey.com>
3056
3057 * cp-name-parser.y: Use %pure-parser, %lex-param, and
3058 %parse-param.
3059 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
3060 (global_result): Remove globals.
3061 (struct cpname_state): New.
3062 (yyparse): Don't declare.
3063 (yylex, yyerror): Move declarations after %union.
3064 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
3065 (make_name): Add state parameter.
3066 Update all callers.
3067 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
3068 parameter.
3069 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
3070 Update.
3071 (yylex): Add lvalp, state parameters.
3072 (yyerror): Add state parameter.
3073 (cp_demangled_name_to_comp): Update.
3074
55b6c984
TT
30752018-06-01 Tom Tromey <tom@tromey.com>
3076
3077 * cp-name-parser.y (parser_fprintf): Declare.
3078 (GDB_YY_REMAP_PREFIX): Define.
3079 Include yy-remap.h. Don't redefine yy* identifiers.
3080
3513a6bb
TT
30812018-06-01 Tom Tromey <tom@tromey.com>
3082
3083 * python/py-type.c (typy_legacy_template_argument): Update.
3084 * cp-support.h (cp_demangled_name_to_comp): Update.
3085 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
3086 parameter to be a "std::string *".
3087 (main): Update.
3088
e9cb46ab
L
30892018-06-01 H.J. Lu <hongjiu.lu@intel.com>
3090
3091 * ada-lex.l: Include "diagnostics.h" instead of
3092 "common/diagnostics.h".
3093 * unittests/environ-selftests.c: Likewise.
3094 * common/diagnostics.h: Moved to ../include.
3095
8e817061
JB
30962018-06-01 Joel Brobecker <brobecker@adacore.com>
3097
3098 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
3099 to language_mode_manual while calling breakpoint_re_set_one.
3100
a737d952
TT
31012018-06-01 Tom Tromey <tom@tromey.com>
3102
3103 * valops.c (value_cast_structs, destructor_name_p): Update.
3104 * symtab.c (gdb_mangle_name): Update.
3105 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
3106 Update.
3107 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
3108 (pascal_object_print_value_fields, pascal_object_print_value):
3109 Update.
3110 * p-typeprint.c (pascal_type_print_derivation_info): Update.
3111 * linespec.c (find_methods): Update.
3112 * gdbtypes.h (type_name_no_tag): Remove.
3113 (type_name_or_error): Rename from type_name_no_tag_or_error.
3114 * gdbtypes.c (type_name_no_tag): Remove.
3115 (type_name_or_error): Rename from type_name_no_tag_or_error.
3116 (lookup_struct_elt_type, check_typedef): Update.
3117 * expprint.c (print_subexp_standard): Update.
3118 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
3119 * d-namespace.c (d_lookup_nested_symbol): Update.
3120 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
3121 (cp_print_class_member): Update.
3122 * cp-namespace.c (cp_lookup_nested_symbol): Update.
3123 * completer.c (add_struct_fields): Update.
3124 * c-typeprint.c (cp_type_print_derivation_info)
3125 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
3126 Update.
3127 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
3128 (ada_prefer_type, ada_is_exception_sym): Update.
3129
e86ca25f
TT
31302018-06-01 Tom Tromey <tom@tromey.com>
3131
3132 * valops.c (enum_constant_from_type, value_namespace_elt)
3133 (value_maybe_namespace_elt): Update.
3134 * valarith.c (find_size_for_pointer_math): Update.
3135 * target-descriptions.c (make_gdb_type): Update.
3136 * symmisc.c (print_symbol): Update.
3137 * stabsread.c (define_symbol, read_type)
3138 (complain_about_struct_wipeout, add_undefined_type)
3139 (cleanup_undefined_types_1): Update.
3140 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
3141 (rust_range_type_p, val_print_struct, rust_print_struct_def)
3142 (rust_internal_print_type, rust_composite_type)
3143 (rust_evaluate_funcall, rust_evaluate_subexp)
3144 (rust_inclusive_range_type_p): Update.
3145 * python/py-type.c (typy_get_tag): Update.
3146 * p-typeprint.c (pascal_type_print_base): Update.
3147 * mdebugread.c (parse_symbol, parse_type): Update.
3148 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
3149 Update.
3150 * guile/scm-type.c (gdbscm_type_tag): Update.
3151 * go-lang.c (sixg_string_p): Update.
3152 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
3153 Update.
3154 * gdbtypes.h (struct main_type) <tag_name>: Remove.
3155 (TYPE_TAG_NAME): Remove.
3156 * gdbtypes.c (type_name_no_tag): Simplify.
3157 (check_typedef, check_types_equal, recursive_dump_type)
3158 (copy_type_recursive, arch_composite_type): Update.
3159 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
3160 in summary mode when needed.
3161 * eval.c (evaluate_funcall): Update.
3162 * dwarf2read.c (fixup_go_packaging, read_structure_type)
3163 (process_structure_scope, read_enumeration_type)
3164 (read_namespace_type, read_module_type, determine_prefix): Update.
3165 * cp-support.c (inspect_type): Update.
3166 * coffread.c (process_coff_symbol, decode_base_type): Update.
3167 * c-varobj.c (c_is_path_expr_parent): Update.
3168 * c-typeprint.c (c_type_print_base_struct_union): Update.
3169 (c_type_print_base_1): Update. Print struct/class/union/enum in
3170 summary when using C language.
3171 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
3172 (gen_maybe_namespace_elt): Update.
3173 * ada-lang.c (ada_type_name): Simplify.
3174 (empty_record, ada_template_to_fixed_record_type_1)
3175 (template_to_static_fixed_type)
3176 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
3177
c1ec8cea
TT
31782018-06-01 Tom Tromey <tom@tromey.com>
3179
3180 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
3181 c_print_type.
3182 * c-typeprint.c (c_print_type_1): Add "language" parameter.
3183 (c_print_type): Update.
3184 (c_print_type): New overload.
3185 (c_type_print_varspec_prefix, c_type_print_args)
3186 (c_type_print_varspec_suffix, c_print_type_no_offsets)
3187 (c_type_print_base_struct_union, c_type_print_base_1)
3188 (cp_type_print_method_args): Add "language" parameter.
3189 (c_type_print_base): Update.
3190 * c-lang.h (c_print_type): Add new overload.
3191
bc8453a7
TT
31922018-06-01 Tom Tromey <tom@tromey.com>
3193
3194 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
3195 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
3196
739e8682
AH
31972018-06-01 Alan Hayward <alan.hayward@arm.com>
3198
3199 * aarch64-tdep.c (aarch64_sve_register_names): New const
3200 var.
3201 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
3202 (AARCH64_SVE_Z_REGS_NUM): New define.
3203 (AARCH64_SVE_P_REGS_NUM): Likewise.
3204 (AARCH64_SVE_NUM_REGS): Likewise.
3205
8a60efe7
UB
32062018-05-31 Uros Bizjak <ubizjak@gmail.com>
3207
3208 * nat/linux-ptrace.h [__alpha__]
3209 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
3210 definitions.
3211
4b2dfa9d
MR
32122018-05-31 Maciej W. Rozycki <macro@mips.com>
3213
3214 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
3215 the endianness selected.
3216 * NEWS: Document `set endian auto' mode operation update.
3217
122394f1
AH
32182018-05-31 Alan Hayward <alan.hayward@arm.com>
3219
3220 * Makefile.in: Add new header.
3221 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
3222 (sve_vl_from_vg): Likewise.
3223 (sve_vq_from_vl): Likewise.
3224 (sve_vl_from_vq): Likewise.
3225 (sve_vq_from_vg): Likewise.
3226 (sve_vg_from_vq): Likewise.
3227 * configure.nat: Add new c file.
3228 * nat/aarch64-sve-linux-ptrace.c: New file.
3229 * nat/aarch64-sve-linux-ptrace.h: New file.
3230
95228a0d
AH
32312018-05-31 Alan Hayward <alan.hayward@arm.com>
3232
3233 * aarch64-linux-nat.c (aarch64_linux_read_description):
3234 Add parmeter zero.
3235 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
3236 Likewise.
3237 * aarch64-tdep.c (tdesc_aarch64_list): Add.
3238 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
3239 (aarch64_gdbarch_init): Add parmeter zero.
3240 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
3241 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
3242 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
3243 parmeter.
3244 * doc/gdb.texinfo: Describe SVE feature
3245 * features/aarch64-sve.c: New file.
3246
5969f0db
OJ
32472018-05-31 Omair Javaid <omair.javaid@linaro.org>
3248
3249 PR gdb/23210
3250 * gdbarch.sh (significant_addr_bit): Default to zero when
3251 not set by target architecture.
3252 * gdbarch.c: Re-generated.
3253 * utils.c (address_significant): Update.
3254
61367c61
JB
32552018-05-30 Joel Brobecker <brobecker@adacore.com>
3256
3257 * stack.c (func_command): Remove trailing newline in call to error.
3258
34a79281
SM
32592018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3260
3261 * regcache.h (regcache_raw_collect): Remove, update callers to
3262 use regcache::raw_collect.
3263 * regcache.c (regcache_raw_collect): Remove.
3264
73e1c03f
SM
32652018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3266
3267 * regcache.h (regcache_raw_supply): Remove, update callers to
3268 use detached_regcache::raw_supply.
3269 * regcache.c (regcache_raw_supply): Remove.
3270
e4c4a59b
SM
32712018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3272
3273 * regcache.h (regcache_cooked_write_part): Remove, update
3274 callers to use regcache::cooked_write_part.
3275 * regcache.c (regcache_cooked_write_part): Remove.
3276
73bb0000
SM
32772018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3278
3279 * regcache.h (regcache_cooked_read_part): Remove, update callers
3280 to use readable_regcache::cooked_read_part.
3281 * regcache.c (regcache_cooked_read_part): Remove.
3282
46a45e9d
SM
32832018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3284
3285 * regcache.h (regcache_cooked_read_value): Remove, update
3286 callers to use readable_regcache::cooked_read_value.
3287 * regcache.c (regcache_cooked_read_value): Remove.
3288
b66f5587
SM
32892018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3290
3291 * regcache.h (regcache_cooked_write): Remove, update callers to
3292 use regcache::cooked_write.
3293 * regcache.c (regcache_cooked_write): Remove.
3294
6aa7d724
SM
32952018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3296
3297 * regcache.h (regcache_invalidate): Remove, update callers to
3298 use detached_regcache::invalidate instead.
3299 * regcache.c (regcache_invalidate): Remove.
3300
4f0420fd
SM
33012018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3302
3303 * regcache.h (regcache_raw_write_part): Remove, update callers
3304 to use regcache::raw_write_part instead.
3305 * regcache.c (regcache_raw_write_part): Remove.
3306
502fe83e
SM
33072018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3308
3309 * regcache.h (regcache_raw_read_part): Remove, update callers to
3310 use readable_regcache::raw_read_part instead.
3311 * regcache.c (regcache_raw_read_part): Remove.
3312
dca08e1f
SM
33132018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3314
3315 * regcache.h (regcache_cooked_read): Remove, update callers to
3316 use readable_regcache::cooked_read instead.
3317 * regcache.c (regcache_cooked_read): Remove.
3318
10eaee5f
SM
33192018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3320
3321 * regcache.h (regcache_raw_write): Remove, update callers to use
3322 regcache::raw_write instead.
3323 * regcache.c (regcache_raw_write): Remove.
3324
0b883586
SM
33252018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3326
3327 * regcache.h (regcache_raw_read): Remove, update callers to use
3328 readable_regcache::raw_read instead.
3329 * regcache.c (regcache_raw_read): Remove.
3330
0b47d985
SM
33312018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3332
3333 * regcache.h (regcache_raw_update): Remove, update callers to
3334 use readable_regcache::raw_update instead.
3335 * regcache.c (regcache_raw_update): Remove.
3336
0ec9f114
SM
33372018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3338
3339 * regcache.h (regcache_register_status): Remove, update callers
3340 to use reg_buffer::get_register_status directly instead.
3341 * regcache.c (regcache_register_status): Remove.
3342
222312d3
SM
33432018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3344
3345 * regcache.h (regcache_get_ptid): Remove, update all callers to
3346 call regcache::ptid instead.
3347 * regcache.c (regcache_get_ptid): Remove.
3348
fdbe37e3
SM
33492018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3350
3351 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
3352
f7c6f423
PA
33532018-05-30 Pedro Alves <palves@redhat.com>
3354
3355 * common/common-exceptions.h (exception_rethrow): Use
3356 ATTRIBUTE_NORETURN.
3357
52941706
SM
33582018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
3359
3360 * breakpoint.c (print_solib_event, check_status_catch_solib):
3361 Remove struct keyword in range-based for loops.
3362 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
3363 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
3364 Likewise.
3365 * linespec.c (find_superclass_methods, search_minsyms_for_name):
3366 Likewise.
3367 * symfile.c (addr_info_make_relative): Likewise.
3368 * thread.c (value_in_thread_stack_temporaries): Likewise.
3369
bf2977b5
WP
33702018-06-12 Weimin Pan <weimin.pan@oracle.com>
3371
3372 PR gdb/16841
3373 * valops.c (value_struct_elt_for_reference): Call check_typedef on
3374 aggregate type to get its real type before accessing it.
3375
64cc34d8
WP
33762018-05-29 Weimin Pan <weimin.pan@oracle.com>
3377
3378 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
3379 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
3380 * coff-pe-read.c (add_pe_forwarded_sym): Replace
3381 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
3382 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
3383 * jit.c (jit_breakpoint_re_set_internal): Likewise.
3384 * printcmd.c (info_address_command): Likewise.
3385
e7ec8713
TT
33862018-05-29 Tom Tromey <tom@tromey.com>
3387
3388 * windows-nat.c (handle_exception): Update fall-through comment.
3389
bcb430e4
TT
33902018-05-29 Tom Tromey <tom@tromey.com>
3391
3392 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
3393 (struct program_space) <added_solibs>: Now a std::vector.
3394 * breakpoint.c (print_solib_event): Update.
3395 (check_status_catch_solib): Update.
3396 * progspace.c (clear_program_space_solib_cache): Update.
3397 * solib.c (update_solib_list): Update.
3398
894882e3
TT
33992018-05-29 Tom Tromey <tom@tromey.com>
3400
3401 * python/py-type.c (typy_richcompare): Update.
3402 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
3403 * gdbtypes.h (types_deeply_equal): Return bool.
3404 (types_equal): Likewise.
3405 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
3406 declare VEC.
3407 (check_types_equal): Change worklist to std::vector. Return
3408 bool.
3409 (struct type_equality_entry): Add constructor.
3410 (compare_maybe_null_strings): Return bool.
3411 (check_types_worklist): Return bool. Change worklist to
3412 std::vector.
3413 (types_deeply_equal): Use std::vector.
3414 (types_equal): Return bool.
3415 (compare_maybe_null_strings): Simplify.
3416
10b2ded4
TT
34172018-05-29 Tom Tromey <tom@tromey.com>
3418
3419 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
3420
4f7deebe
TT
34212018-05-29 Tom Tromey <tom@tromey.com>
3422
3423 * objc-lang.h: Don't include cp-support.h.
3424 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
3425 declare VEC.
3426
b8283aea
TT
34272018-05-27 Tom Tromey <tom@tromey.com>
3428
3429 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
3430
41a883c8
TT
34312018-05-25 Tom Tromey <tom@tromey.com>
3432
3433 * value.c (value::location): Initialize.
3434
bf259e25
TT
34352018-05-25 Tom Tromey <tom@tromey.com>
3436
3437 * dbxread.c (init_bincl_list): Remove.
3438 (bincl_list): Now a std::vector.
3439 (bincls_allocated, next_bincl): Remove.
3440 (free_bincl_list, do_free_bincl_list_cleanup)
3441 (make_cleanup_free_bincl_list): Remove.
3442 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
3443 unique_xmalloc_ptr.
3444 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
3445 (struct header_file_location): Add constructor.
3446 (add_bincl_to_list): Remove.
3447
d525a99b
TT
34482018-05-25 Tom Tromey <tom@tromey.com>
3449
3450 * tui/tui.c (tui_enable): Update.
3451 * mi/mi-interp.c (mi_interp::init): Update.
3452 * interps.h (class interp) <name>: New method.
3453 <m_name>: Rename from name.
3454 (~scoped_restore_interp): Update.
3455 * interps.c (interp::interp): Update.
3456 (interp_add, interp_set, interp_lookup_existing)
3457 (current_interp_named_p): Update.
3458
da505cff
TT
34592018-05-25 Tom Tromey <tom@tromey.com>
3460
3461 * interps.c (interp_name): Remove.
3462 * mi/mi-interp.c (mi_interp::init): Update.
3463 * interps.h (interp_name): Remove.
3464 (~scoped_restore_interp): Update.
3465 * tui/tui.c (tui_enable): Update.
3466
29f94340
TT
34672018-05-25 Tom Tromey <tom@tromey.com>
3468
3469 * utils.c (fputs_maybe_filtered): Update.
3470 * linespec.c (decode_line_full): Update.
3471 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
3472 (mi_print_breakpoint_for_event, mi_solib_loaded)
3473 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3474 (mi_user_selected_context_changed): Update.
3475 * mi/mi-main.c (mi_execute_command): Update.
3476 * cli/cli-script.c (execute_control_command): Update.
3477 * python/python.c (execute_gdb_command): Update.
3478 * solib.c (info_sharedlibrary_command): Update.
3479 * interps.c (interp_ui_out): Remove.
3480 * interps.h (interp_ui_out): Remove.
3481
716b8bc5
TT
34822018-05-25 Tom Tromey <tom@tromey.com>
3483
3484 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
3485 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
3486 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
3487
753ff9bd
TT
34882018-05-25 Tom Tromey <tom@tromey.com>
3489
3490 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
3491 * interps.c (interp_exec): Use scoped_restore.
3492
5ca3b260
TT
34932018-05-25 Tom Tromey <tom@tromey.com>
3494
3495 * remote.c (remote_target::remote_file_get): Use
3496 gdb::byte_vector.
3497 (remote_target::remote_file_put): Likewise.
3498
3173aa2f
TT
34992018-05-25 Tom Tromey <tom@tromey.com>
3500
3501 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
3502 a std::string.
3503 (get_pe_section_index, add_pe_exported_sym): Update.
3504 (read_pe_exported_syms): Use gdb::def_vector.
3505
09a5e1b5
TT
35062018-05-25 Tom Tromey <tom@tromey.com>
3507
3508 * frame.c (remove_prev_frame): Remove.
3509 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
3510
d8dab6c3
MR
35112018-05-25 Maciej W. Rozycki <macro@mips.com>
3512
3513 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
3514 Remove prototypes.
3515 * mips-linux-nat.c (supply_fpregset): Always call
3516 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
3517 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
3518 `mips_fill_fpregset'.
3519 * mips-linux-tdep.c (mips_supply_fpregset)
3520 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
3521 (mips_fill_fpregset_wrapper): Remove functions.
3522 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
3523 (mips_linux_fpregset): Remove variable.
3524 (mips_linux_iterate_over_regset_sections): Use
3525 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
3526 (mips_linux_o32_sigframe_init): Remove comment.
3527
3c69da40
PA
35282018-05-25 Pedro Alves <palves@redhat.com>
3529
3530 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
3531 (struct readahead_cache, struct packet_reg, struct
3532 remote_arch_state, class remote_state): Move higher up in the
3533 file.
3534 (remote_target::m_remote_state): Now an object instead of a pointer.
3535 (remote_target::get_remote_state): Adjust.
3536
39f0c204
AB
35372018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
3538
3539 * stack.c (select_and_print_frame): Delete.
3540 (struct function_bounds): Move struct within function.
3541 (func_command): Most content moved into new function
3542 find_frame_for_function, use new function, print result, add
3543 function comment.
3544 (find_frame_for_function): New function, now returns a result.
3545
d392224a
PW
35462018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3547
3548 * stack.c (iterate_over_block_arg_vars): Fix comment.
3549 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
3550
45f25d6c
AB
35512018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
3552
3553 PR gdb/23203
3554 * frame.c
3555 (scoped_restore_selected_frame::scoped_restore_selected_frame):
3556 Define.
3557 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
3558 Define.
3559 * frame.h (class scoped_restore_selected_frame): New class.
3560 * stack.c (print_frame_local_vars): Remove catching and rethrowing
3561 of any exception, use scoped_restore_selected_frame to restore the
3562 frame instead.
3563
da05d921
PA
35642018-05-24 Pedro Alves <palves@redhat.com>
3565
3566 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
3567 override.
3568
a8be540e
TT
35692018-05-23 Tom Tromey <tom@tromey.com>
3570
3571 * complaints.c (struct complaints): Remove.
3572 (symfile_complaint_book): Remove.
3573 (series): New global.
3574 (complaint_internal): Update.
3575 (clear_complaints): Update.
3576
ff1cf532
TT
35772018-05-23 Tom Tromey <tom@tromey.com>
3578
3579 * complaints.c (counters): New global.
3580 (struct complain): Remove.
3581 (struct complaints) <root>: Remove.
3582 (complaint_sentinel): Remove.
3583 (symfile_complaint_book): Update.
3584 (find_complaint) Remove.
3585 (complaint_internal, clear_complaints): Update.
3586
7ff88174
TT
35872018-05-23 Tom Tromey <tom@tromey.com>
3588
3589 * complaints.c (struct complain) <file, line>: Remove.
3590 (find_complaint): Remove file, line parameters.
3591 (complaint_internal): Update.
3592
de54e1a5
TT
35932018-05-23 Tom Tromey <tom@tromey.com>
3594
3595 * complaints.c (vcomplaint): Remove.
3596 (complaint_internal) Merge in contents of vcomplaint.
3597
2ac237e5
TT
35982018-05-23 Tom Tromey <tom@tromey.com>
3599
3600 * complaints.c (struct complaints) <explanation>: Remove.
3601 (symfile_explanations): Remove.
3602 (symfile_complaint_book): Update.
3603 (vcomplaint): Update.
3604 (struct explanation): Remove.
3605
b98664d3
TT
36062018-05-23 Tom Tromey <tom@tromey.com>
3607
3608 * complaints.c (symfile_complaints): Remove.
3609 (complaint_internal): Remove "complaints" parameter.
3610 (clear_complaints, vcomplaint): Remove "c" parameter.
3611 (get_complaints): Remove.
3612 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
3613 (dwarf2_debug_line_missing_file_complaint)
3614 (dwarf2_debug_line_missing_end_sequence_complaint)
3615 (dwarf2_complex_location_expr_complaint)
3616 (dwarf2_const_value_length_mismatch_complaint)
3617 (dwarf2_section_buffer_overflow_complaint)
3618 (dwarf2_macro_malformed_definition_complaint)
3619 (dwarf2_invalid_attrib_class_complaint)
3620 (create_addrmap_from_index, dw2_symtab_iter_next)
3621 (dw2_expand_marked_cus)
3622 (dw2_debug_names_iterator::find_vec_in_debug_names)
3623 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
3624 (create_debug_type_hash_table, init_cutu_and_read_dies)
3625 (partial_die_parent_scope, add_partial_enumeration)
3626 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
3627 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
3628 (read_import_statement, read_file_scope, create_dwo_cu_reader)
3629 (create_cus_hash_table, create_dwp_hash_table)
3630 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
3631 (dwarf2_rnglists_process, dwarf2_ranges_process)
3632 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
3633 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
3634 (handle_struct_member_die, process_structure_scope)
3635 (read_array_type, read_common_block, read_module_type)
3636 (read_tag_pointer_type, read_typedef, read_base_type)
3637 (read_subrange_type, load_partial_dies, partial_die_info::read)
3638 (partial_die_info::read, partial_die_info::read)
3639 (partial_die_info::read, read_checked_initial_length_and_offset)
3640 (dwarf2_string_attr, read_formatted_entries)
3641 (dwarf_decode_line_header)
3642 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3643 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
3644 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
3645 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3646 (get_signatured_type, get_DW_AT_signature_type)
3647 (decode_locdesc, file_file_name, consume_improper_spaces)
3648 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
3649 (dwarf_decode_macro_bytes, dwarf_decode_macros)
3650 (dwarf2_symbol_mark_computed, set_die_type)
3651 (read_attribute_value): Update.
3652 * stap-probe.c (handle_stap_probe, get_stap_base_address):
3653 Update.
3654 * dbxread.c (unknown_symtype_complaint)
3655 (lbrac_mismatch_complaint, repeated_header_complaint)
3656 (set_namestring, function_outside_compilation_unit_complaint)
3657 (read_dbx_symtab, process_one_symbol): Update.
3658 * gdbtypes.c (stub_noname_complaint): Update.
3659 * windows-nat.c (handle_unload_dll): Update.
3660 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
3661 (decode_base_type): Update.
3662 * xcoffread.c (bf_notfound_complaint, ef_complaint)
3663 (eb_complaint, record_include_begin, record_include_end)
3664 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
3665 (process_xcoff_symbol, read_symbol)
3666 (function_outside_compilation_unit_complaint)
3667 (scan_xcoff_symtab): Update.
3668 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
3669 * buildsym.c (finish_block_internal, make_blockvector)
3670 (end_symtab_get_static_block, augment_type_symtab): Update.
3671 * dtrace-probe.c (dtrace_process_dof)
3672 (dtrace_static_probe_ops::get_probes): Update.
3673 * complaints.h (struct complaint): Don't declare.
3674 (symfile_complaints): Remove.
3675 (complaint_internal): Remove "complaints" parameter.
3676 (complaint): Likewise.
3677 (clear_complaints): Likewise.
3678 * symfile.c (syms_from_objfile_1, finish_new_objfile)
3679 (reread_symbols): Update.
3680 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
3681 (dwarf2_frame_cache, decode_frame_entry): Update.
3682 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
3683 * objc-lang.c (lookup_objc_class, lookup_child_selector)
3684 (info_selectors_command): Update.
3685 * macrotab.c (macro_include, check_for_redefinition)
3686 (macro_undef): Update.
3687 * objfiles.c (filter_overlapping_sections): Update.
3688 * stabsread.c (invalid_cpp_abbrev_complaint)
3689 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
3690 (define_symbol, error_type, read_type, rs6000_builtin_type)
3691 (stabs_method_name_from_physname, read_member_functions)
3692 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
3693 (attach_fields_to_type, complain_about_struct_wipeout)
3694 (read_range_type, read_args, common_block_start)
3695 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
3696 Update.
3697 * mdebugread.c (index_complaint, unknown_ext_complaint)
3698 (basic_type_complaint, bad_tag_guess_complaint)
3699 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
3700 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
3701 (parse_procedure, parse_lines)
3702 (function_outside_compilation_unit_complaint)
3703 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
3704 (bad_tag_guess_complaint, reg_value_complaint): Update.
3705 * cp-support.c (demangled_name_complaint): Update.
3706 * macroscope.c (sal_macro_scope): Update.
3707 * dwarf-index-write.c (class debug_names): Update.
3708
4e9668d0
TT
37092018-05-23 Tom Tromey <tom@tromey.com>
3710
3711 * complaints.c (clear_complaints): Remove "noisy" parameter.
3712 * complaints.h (clear_complaints): Update.
3713 * symfile.c (syms_from_objfile_1, finish_new_objfile)
3714 (reread_symbols): Update.
3715
43ba33c7
TT
37162018-05-23 Tom Tromey <tom@tromey.com>
3717
3718 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
3719 SUBSEQUENT_MESSAGE.
3720 (vcomplaint, clear_complaints): Update.
3721 (symfile_explanations): Remove some messages.
3722
2b9496b2
TT
37232018-05-23 Tom Tromey <tom@tromey.com>
3724
3725 * complaints.c (internal_complaint): Remove.
3726 * complaints.h (internal_complaint): Remove.
3727
35f1fea3
MR
37282018-05-22 Maciej W. Rozycki <macro@mips.com>
3729
3730 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
3731
6b8edb51
PA
37322018-05-22 Pedro Alves <palves@redhat.com>
3733
3734 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
3735 (remote_fileio_badfd, remote_fileio_return_errno)
3736 (remote_fileio_return_success, remote_fileio_func_open)
3737 (remote_fileio_func_open, remote_fileio_func_close)
3738 (remote_fileio_func_read, remote_fileio_func_write)
3739 (remote_fileio_func_lseek, remote_fileio_func_rename)
3740 (remote_fileio_func_unlink, remote_fileio_func_stat)
3741 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
3742 (remote_fileio_func_isatty, remote_fileio_func_system): Add
3743 remote_target parameter.
3744 (remote_fio_func_map) <func>: Add remote_target parameter.
3745 (do_remote_fileio_request, remote_fileio_request):
3746 * remote-fileio.h (remote_fileio_request):
3747 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
3748 remote_target parameter.
3749 (remote_notif_process, handle_notification): Adjust to pass down
3750 the remote.
3751 (remote_notif_state_allocate): Add remote_target parameter. Save
3752 it.
3753 * remote-notif.h (struct remote_target): Forward declare.
3754 (struct notif_client) <parse, ack, can_get_pending_events>: Add
3755 remote_target parameter.
3756 (struct remote_notif_state) <remote>: New field.
3757 (remote_notif_ack, remote_notif_parse): Add remote_target
3758 parameter.
3759 (remote_notif_state_allocate, remote_notif_state_allocate): Add
3760 remote_target parameter.
3761 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
3762 (threads_listing_context, rmt_thread_action, protocol_feature)
3763 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
3764 (packet_result, struct threads_listing_context, remote_state):
3765 Move definitions and declarations higher up.
3766 (remote_target) <~remote_target>: Declare.
3767 (remote_download_command_source, remote_file_put, remote_file_get)
3768 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
3769 (remote_hostio_pread_vFile, remote_hostio_send_command)
3770 (remote_hostio_set_filesystem, remote_hostio_open)
3771 (remote_hostio_close, remote_hostio_unlink, remote_state)
3772 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
3773 (get_memory_write_packet_size, get_memory_read_packet_size)
3774 (append_pending_thread_resumptions, remote_detach_1)
3775 (append_resumption, remote_resume_with_vcont)
3776 (add_current_inferior_and_thread, wait_ns, wait_as)
3777 (process_stop_reply, remote_notice_new_inferior)
3778 (process_initial_stop_replies, remote_add_thread)
3779 (btrace_sync_conf, remote_btrace_maybe_reopen)
3780 (remove_new_fork_children, kill_new_fork_children)
3781 (discard_pending_stop_replies, stop_reply_queue_length)
3782 (check_pending_events_prevent_wildcard_vcont)
3783 (discard_pending_stop_replies_in_queue, stop_reply)
3784 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
3785 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
3786 (remote_interrupt_as, remote_interrupt_ns)
3787 (remote_get_noisy_reply, remote_query_attached)
3788 (remote_add_inferior, remote_current_thread, get_current_thread)
3789 (set_thread, set_general_thread, set_continue_thread)
3790 (set_general_process, write_ptid)
3791 (remote_unpack_thread_info_response, remote_get_threadinfo)
3792 (parse_threadlist_response, remote_get_threadlist)
3793 (remote_threadlist_iterator, remote_get_threads_with_ql)
3794 (remote_get_threads_with_qxfer)
3795 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
3796 (get_offsets, remote_check_symbols, remote_supported_packet)
3797 (remote_query_supported, remote_packet_size)
3798 (remote_serial_quit_handler, remote_detach_pid)
3799 (remote_vcont_probe, remote_resume_with_hc)
3800 (send_interrupt_sequence, interrupt_query)
3801 (remote_notif_get_pending_events, fetch_register_using_p)
3802 (send_g_packet, process_g_packet, fetch_registers_using_g)
3803 (store_register_using_P, store_registers_using_G)
3804 (set_remote_traceframe, check_binary_download)
3805 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
3806 (remote_xfer_live_readonly_partial, remote_read_bytes)
3807 (remote_send_printf, remote_flash_write, readchar)
3808 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
3809 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
3810 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
3811 (extended_remote_disable_randomization, extended_remote_run)
3812 (send_environment_packet, extended_remote_environment_support)
3813 (extended_remote_set_inferior_cwd, remote_write_qxfer)
3814 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
3815 (packet_command): Now methods of ...
3816 (remote_target): ... this class.
3817 (m_remote_state) <remote_target>: New field.
3818 (struct remote_state) <stop_reply_queue,
3819 remote_async_inferior_event_token, wait_forever_enabled_p>: New
3820 fields.
3821 (remote_state::remote_state): Allocate stop_reply_queue.
3822 (remote_state): Delete global.
3823 (get_remote_state_raw): Delete.
3824 (remote_target::get_remote_state): Allocate m_remote_state on
3825 demand.
3826 (get_current_remote_target): New.
3827 (remote_ops, extended_remote_ops): Delete.
3828 (wait_forever_enabled_p, remote_async_inferior_event_token):
3829 Delete, moved to struct remote_state.
3830 (remote_target::close): Delete self. Destruction bits split to
3831 ...
3832 (remote_target::~remote_target): ... this.
3833 (show_memory_packet_size): Adjust to use
3834 get_current_remote_target.
3835 (struct protocol_feature) <func>: Add remote_target parameter.
3836 All callers adjusted.
3837 (curr_quit_handler_target): New.
3838 (remote_serial_quit_handler): Reimplement.
3839 (remote_target::open_1): Adjust to use get_current_remote_target.
3840 Heap-allocate remote_target/extended_remote_target instances.
3841 (vcont_builder::vcont_builder): Add remote_target parameter, and
3842 save it in m_remote. All callers adjusted.
3843 (vcont_builder::m_remote): New field.
3844 (vcont_builder::restart, vcont_builder::flush)
3845 (vcont_builder::push_action): Use it.
3846 (remote_target::commit_resume): Use it.
3847 (struct queue_iter_param) <remote>: New field.
3848 (remote_target::remove_new_fork_children): Fill in 'remote' field.
3849 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
3850 (check_pending_event_prevents_wildcard_vcont_callback)
3851 (remote_target::check_pending_events_prevent_wildcard_vcont)
3852 (remote_target::discard_pending_stop_replies)
3853 (remote_target::discard_pending_stop_replies_in_queue)
3854 (remote_target::remote_notif_remove_queued_reply): Fill in
3855 'remote' field.
3856 (remote_notif_get_pending_events): New.
3857 (remote_target::readchar, remote_target::remote_serial_write):
3858 Save/restore curr_quit_handler_target.
3859 (putpkt): New.
3860 (kill_new_fork_children): Fill in 'remote' field.
3861 (packet_command): Use get_current_remote_target, defer to
3862 remote_target method of same name.
3863 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
3864 parameter, and save it in m_remote. All callers adjusted.
3865 (scoped_remote_fd::release): Use m_remote.
3866 (scoped_remote_fd::m_remote): New field.
3867 (remote_file_put, remote_file_get, remote_file_delete): Use
3868 get_current_remote_target, defer to remote_target method of same
3869 name.
3870 (remote_btrace_reset): Add remote_state paremeter. Update all
3871 callers.
3872 (remote_async_inferior_event_handler). Pass down 'data'.
3873 (remote_new_objfile): Use get_current_remote_target.
3874 (remote_target::vcont_r_supported): New.
3875 (set_range_stepping): Use get_current_remote_target and
3876 remote_target::vcont_r_supported.
3877 (_initialize_remote): Don't allocate 'remote_state' and
3878 'stop_reply_queue' globals.
3879 * remote.h (struct remote_target): Forward declare.
3880 (getpkt, putpkt, remote_notif_get_pending_events): Add
3881 'remote_target' parameter.
3882
f5db4863
PA
38832018-05-22 Pedro Alves <palves@redhat.com>
3884
3885 * remote.c (vcont_builder): Now a class. Make all data members
3886 private.
3887 (vcont_builder) <vcont_builder, restart, flush, push_action>:
3888 Declare methods.
3889 (vcont_builder_restart): Rename to ...
3890 (vcont_builder::restart): ... this.
3891 (vcont_builder_flush): Rename to ...
3892 (vcont_builder::flush): ... this.
3893 (vcont_builder_push_action): Rename to ...
3894 (vcont_builder::push_action): ... this.
3895 (remote_target::commit_resume): Adjust.
3896
cc0be08f
PA
38972018-05-22 Pedro Alves <palves@redhat.com>
3898
3899 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
3900 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
3901 (get_fixed_memory_packet_size): New.
3902 (get_memory_packet_size): Use it.
3903 (set_memory_packet_size): Don't override the config size with
3904 DEFAULT_MAX_MEMORY_PACKET_SIZE.
3905 (show_memory_packet_size): Use get_fixed_memory_packet_size.
3906 Don't refer to get_memory_packet_size if not connected to a remote
3907 target. Show "(default)" if configured size is 0.
3908
9607784a
PA
39092018-05-22 Pedro Alves <palves@redhat.com>
3910
3911 * remote.c (remote_target::mourn_inferior): Move
3912 discard_pending_stop_replies call here from ...
3913 (_initialize_remote): ... here.
3914
0e9a6b2f
PA
39152018-05-22 Pedro Alves <palves@redhat.com>
3916
3917 * remote.c (compare_section_command): Remove set_general_process
3918 call.
3919
43c3a0e4
PA
39202018-05-22 Pedro Alves <palves@redhat.com>
3921
3922 * remote.c (struct packet_reg, struct remote_arch_state):
3923 Move higher up in the file.
3924 (remote_state) <m_arch_states>: Store remote_arch_state values
3925 instead of remote_arch_state pointers.
3926 (remote_state::get_remote_arch_state): Adjust.
3927
9d6eea31
PA
39282018-05-22 Pedro Alves <palves@redhat.com>
3929
3930 * remote.c: Include <unordered_map>.
3931 (remote_state): Now a class.
3932 (remote_state) <get_remote_arch_state>: Declare method.
3933 <get_remote_arch_state>: New field.
3934 (remote_arch_state) <remote_arch_state>: Declare ctor.
3935 <regs>: Now a unique_ptr.
3936 (remote_gdbarch_data_handle): Delete.
3937 (get_remote_arch_state): Delete.
3938 (remote_state::get_remote_arch_state): New.
3939 (get_remote_state): Adjust to call remote_state's
3940 get_remote_arch_state method.
3941 (init_remote_state): Delete, bits factored out to ...
3942 (remote_arch_state::remote_arch_state): ... this new method.
3943 (get_remote_packet_size, get_memory_packet_size)
3944 (process_g_packet, remote_target::fetch_registers)
3945 (remote_target::prepare_to_store, store_registers_using_G)
3946 (remote_target::store_registers, remote_target::get_trace_status):
3947 Adjust to call remote_state's method.
3948 (_initialize_remote): Remove reference to
3949 remote_gdbarch_data_handle.
3950
dd194f6b
PA
39512018-05-22 Pedro Alves <palves@redhat.com>
3952
3953 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
3954 pread>: New method declarations.
3955 (remote_target::open_1): Adjust.
3956 (readahead_cache_invalidate): Rename to ...
3957 (readahead_cache::invalidate): ... this, and adjust to be a class
3958 method.
3959 (readahead_cache_invalidate_fd): Rename to ...
3960 (readahead_cache::invalidate_fd): ... this, and adjust to be a
3961 class method.
3962 (remote_hostio_pwrite): Adjust.
3963 (remote_hostio_pread_from_cache): Rename to ...
3964 (readahead_cache::pread): ... this, and adjust to be a class
3965 method.
3966 (remote_hostio_close): Adjust.
3967
440b7aec
PA
39682018-05-22 Pedro Alves <palves@redhat.com>
3969
3970 * remote.c (remote_hostio_close_cleanup): Delete.
3971 (class scoped_remote_fd): New.
3972 (remote_file_put, remote_file_get): Use it.
3973
de44f5a7
PA
39742018-05-22 Pedro Alves <palves@redhat.com>
3975
3976 (struct vCont_action_support): Use bool and initialize all fields.
3977 (struct readahead_cache): Initialize all fields.
3978 (remote_state): Use bool and initialize all fields.
3979 (remote_state::remote_state, remote_state::~remote_state): New.
3980 (new_remote_state): Delete.
3981 (_initialize_remote): Use new to allocate remote_state.
3982
b1b60145
PA
39832018-05-22 Pedro Alves <palves@redhat.com>
3984 張俊芝 <zjz@zjz.name>
3985
3986 PR gdb/22973
3987 * c-exp.y: Include "c-support.h".
3988 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
3989 of tolower. Use c_ident_is_alpha to scan names.
3990 * c-lang.c: Include "c-support.h".
3991 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
3992 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
3993 * c-support.h: New file, with bits factored out from ...
3994 * cp-name-parser.y: ... this file.
3995 Include "c-support.h".
3996 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
3997 c-support.h and renamed.
3998 (symbol_end, yylex): Adjust.
3999
0ec848ad
PFC
40002018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4001
4002 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
4003 parameter type to CORE_ADDR.
4004 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
4005 parameter type in declaration to CORE_ADDR.
4006 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
4007 target_auxv_search to get AT_HWCAP and use the result to get the
4008 target description.
4009 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
4010 to CORE_ADDR. Remove the cast of the return value to unsigned
4011 long. Fix error predicate of target_auxv_search.
4012 (ppc_linux_nat_target::read_description): Change the type of the
4013 hwcap variable to CORE_ADDR.
4014
0fb2aaa1
PFC
40152018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4016
4017 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
4018 if the size of fpscr is larger than 32 bits.
4019
2c3305f6
PFC
40202018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4021
4022 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
4023 (ppc32_linux_vsxregmap): New global.
4024 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
4025 regcache_supply_regset, and regcache_collect_regset.
4026 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
4027 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
4028 (fetch_vsx_register, store_vsx_register): Remove.
4029 (fetch_vsx_registers): Add regno parameter. Get regset using
4030 ppc_linux_vsxregset. Use regset to supply registers.
4031 (store_vsx_registers): Add regno parameter. Get regset using
4032 ppc_linux_vsxregset. Use regset to collect registers.
4033 (fetch_register): Call fetch_vsx_registers instead of
4034 fetch_vsx_register.
4035 (store_register): Call store_vsx_registers instead of
4036 store_vsx_register.
4037 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
4038 new regno parameter.
4039 (store_ppc_registers): Call store_vsx_registers with -1 for the
4040 new regno parameter.
4041 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
4042 (ppc_collect_vsxregset): Remove.
4043
1d75a658
PFC
40442018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4045
4046 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
4047 offset fields.
4048 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
4049 for vector register offset fields.
4050 (ppc64_fbsd_reg_offsets): Likewise.
4051 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4052 to vector register offset fields.
4053 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4054 to vector register offset fields.
4055 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
4056 vector register offset fields.
4057 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
4058 initializers for vector register offset fields.
4059 (rs6000_aix64_reg_offsets): Likewise.
4060 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
4061 (ppc_supply_vrregset): Remove.
4062 (ppc_collect_vrregset): Remove.
4063 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
4064 (ppc_linux_vrregset) : New function.
4065 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
4066 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
4067 (ppc32_linux_vrregset): Remove.
4068 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
4069 and use result instead of ppc32_linux_vrregset.
4070 (ppc32_linux_reg_offsets): Remove initializers for vector register
4071 offset fields.
4072 (ppc64_linux_reg_offsets): Likewise.
4073 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
4074 * ppc-linux-nat.c: Include regset.h.
4075 (gdb_vrregset_t): Adjust comment to account for little-endian
4076 mode.
4077 (supply_vrregset, fill_vrregset): Remove.
4078 (fetch_altivec_register, store_altivec_register): Remove.
4079 (fetch_altivec_registers): Add regno parameter. Get regset using
4080 ppc_linux_vrregset. Use regset to supply registers.
4081 (store_altivec_registers): Add regno parameter. Get regset using
4082 ppc_linux_vrregset. Use regset to collect registers.
4083 (fetch_register): Call fetch_altivec_registers instead of
4084 fetch_altivec_register.
4085 (store_register): Call store_altivec_registers instead of
4086 store_altivec_register.
4087 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
4088 the new regno parameter.
4089 (store_ppc_registers): Call store_altivec_registers with -1 for
4090 the new regno parameter.
4091
d078308a
PFC
40922018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4093
4094 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
4095 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
4096 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
4097 (gdb_vrregset_t): Change array type size to
4098 PPC_LINUX_SIZEOF_VRREGSET.
4099 (gdb_vsxregset_t): Change array type size to
4100 PPC_LINUX_SIZEOF_VSXREGSET.
4101 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
4102 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
4103 PPC_LINUX_SIZEOF_VSXREGSET.
4104
2e077f5e
PFC
41052018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4106
4107 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
4108 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
4109 nat/ppc-linux.c.
4110 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
4111 ppc_linux_target_wordsize with tid.
4112 (ppc_linux_nat_target::read_description): Call ppc_linux_target
4113 wordsize with tid.
4114 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
4115 (ppc64_64bit_inferior_p): Add static and inline specifiers.
4116 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
4117 tid parameter. Remove static specifier.
4118 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
4119 (ppc_linux_target_wordsize): New declaration.
4120
bd64614e
PFC
41212018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4122
4123 * arch/ppc-linux-common.c: New file.
4124 * arch/ppc-linux-common.h: New file.
4125 * arch/ppc-linux-tdesc.h: New file.
4126 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
4127 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
4128 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
4129 arch/ppc-linux-tdesc.h.
4130 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
4131 arch/ppc-linux-tdesc.h.
4132 (ppc_linux_nat_target::read_description): Remove target
4133 description matching code. Fill a ppc_linux_features struct and
4134 call ppc_linux_match_description with it. Move comment about ISA
4135 2.05 to ppc-linux-common.c.
4136 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
4137 arch/ppc-linux-tdesc.h.
4138 (ppc_linux_core_read_description): Remove target description
4139 matching code. Fill a ppc_linux_features struct and call
4140 ppc_linux_match_description with it.
4141 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
4142 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
4143 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
4144 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
4145 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
4146 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
4147 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
4148 (tdesc_powerpc_e500l): Remove.
4149
241db429
JB
41502018-05-22 Joel Brobecker <brobecker@adacore.com>
4151
4152 * ada-lang.c (catch_assert_command): Pass empty string instead
4153 of NULL for excep_string argument.
4154
75d74cca
MR
41552018-05-22 Maciej W. Rozycki <macro@mips.com>
4156
4157 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
4158 the width of the requested register exceeds the width of the
4159 `ptrace' data type.
4160
122b53ea
TT
41612018-05-21 Tom Tromey <tom@tromey.com>
4162
4163 * printcmd.c (output_command): Remove.
4164 (output_command_const): Rename to output_command.
4165 * valprint.h (output_command): Rename from output_command_const.
4166 * tracepoint.c (trace_dump_actions): Call output_command.
4167
bc18fbb5
TT
41682018-05-21 Tom Tromey <tom@tromey.com>
4169
4170 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4171 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
4172 * ada-lang.h (create_ada_exception_catchpoint): Update.
4173 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
4174 std::string.
4175 (create_excep_cond_exprs, ~ada_catchpoint)
4176 (should_stop_exception, print_one_exception)
4177 (print_mention_exception, print_recreate_exception): Update.
4178 (ada_get_next_arg): Remove.
4179 (catch_ada_exception_command_split): Use std::string. Change type
4180 of "excep_string", "cond_string".
4181 (catch_ada_exception_command): Update.
4182 (create_ada_exception_catchpoint): Change type of excep_string.
4183 (ada_exception_sal): Remove excep_string parameter.
4184 (~ada_catchpoint): Remove.
4185
790217f6
TT
41862018-05-21 Tom Tromey <tom@tromey.com>
4187
4188 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
4189 cleanup.
4190
6f46ac85
TT
41912018-05-21 Tom Tromey <tom@tromey.com>
4192
4193 * ada-lang.c (ada_exception_message_1, ada_exception_message):
4194 Return unique_xmalloc_ptr.
4195 (print_it_exception): Update.
4196
15b6611c
TT
41972018-05-21 Tom Tromey <tom@tromey.com>
4198
4199 * tracepoint.c (trace_dump_actions): Use std::string.
4200
c0c9f665
TT
42012018-05-21 Tom Tromey <tom@tromey.com>
4202
4203 * symfile.c (reread_symbols): Use std::string for original_name.
4204
22ca247e
TT
42052018-05-21 Tom Tromey <tom@tromey.com>
4206
4207 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
4208 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
4209 constructor.
4210
184cde75
SM
42112018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
4212
4213 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
4214 instance to...
4215 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
4216 * objfiles.c (get_objfile_bfd_data): Allocate
4217 objfile_per_bfd_storage with obstack_new when allocating on
4218 obstack.
4219
e39db4db
SM
42202018-05-20 Simon Marchi <simon.marchi@ericsson.com>
4221
4222 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
4223 OBSTACK_ZALLOC.
4224 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
4225 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
4226 * mdebugread.c (mdebug_build_psymtabs): Likewise.
4227 (add_pending): Likewise.
4228 (parse_symbol): Likewise.
4229 (parse_partial_symbols): Likewise.
4230 (psymtab_to_symtab_1): Likewise.
4231 (new_psymtab): Likewise.
4232 (elfmdebug_build_psymtabs): Likewise.
4233 * minsyms.c (terminate_minimal_symbol_table): Likewise.
4234 * objfiles.c (get_objfile_bfd_data): Likewise.
4235 (objfile_register_static_link): Likewise.
4236 * psymtab.c (allocate_psymtab): Likewise.
4237 * stabsread.c (read_member_functions): Likewise.
4238 * xcoffread.c (xcoff_end_psymtab): Likewise.
4239
284a0e3c
SM
42402018-05-20 Simon Marchi <simon.marchi@ericsson.com>
4241
4242 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
4243 compiler supports std::is_trivially_constructible.
4244 * common/poison.h: Include obstack.h.
4245 (IsMallocable): Define to is_trivially_constructible if the
4246 compiler supports it, define to true_type otherwise.
4247 (xobnew): New.
4248 (XOBNEW): Redefine.
4249 (xobnewvec): New.
4250 (XOBNEWVEC): Redefine.
4251 * gdb_obstack.h (obstack_zalloc): New.
4252 (OBSTACK_ZALLOC): Redefine.
4253 (obstack_calloc): New.
4254 (OBSTACK_CALLOC): Redefine.
4255 (obstack_new): New.
4256 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
4257 (gdbarch_obstack): New declaration in gdbarch.h, definition in
4258 gdbarch.c.
4259 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
4260 obstack_calloc/obstack_zalloc.
4261 (gdbarch_obstack_zalloc): Remove.
4262 * target-descriptions.c (tdesc_data_init): Use obstack_new.
4263
59f66be3
PW
42642018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4265
4266 * stack.c (backtrace_command_1): Remove useless variable int i.
4267
50c65c2d
PW
42682018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4269
4270 * stack.c (print_frame_info): Fix comment.
4271
7ff8cb8c
TT
42722018-05-18 Tom Tromey <tom@tromey.com>
4273
4274 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
4275 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
4276 (~dwarf2_per_objfile): Update
4277 (dwarf2_get_dwz_file): Use new.
4278 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
4279 unique_ptr.
4280
400174b1
TT
42812018-05-18 Tom Tromey <tom@tromey.com>
4282
4283 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
4284 unique_ptr.
4285 * dwarf2read.c (struct dwp_file): Add constructor and
4286 initializers.
4287 (open_and_init_dwp_file): Return a unique_ptr.
4288 (dwarf2_per_objfile, create_dwp_hash_table)
4289 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
4290 (lookup_dwo_unit_in_dwp): Update.
4291 (open_and_init_dwp_file, get_dwp_file): Update.
4292
3063847f
TT
42932018-05-18 Tom Tromey <tom@tromey.com>
4294
4295 * dwarf2read.c (dwarf2_per_objfile): Update.
4296 (struct mapped_index): Add initializers.
4297 (dwarf2_read_index): Use new.
4298 (dw2_symtab_iter_init): Update.
4299 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
4300 unique_ptr.
4301
d3d02dee
SM
43022018-05-18 Simon Marchi <simon.marchi@ericsson.com>
4303
4304 * dwarf2read.c (mapped_index) <total_size>: Remove.
4305
1d143c36
SM
43062018-05-18 Simon Marchi <simon.marchi@ericsson.com>
4307
4308 * unittests/format_pieces-selftests.c (test_format_specifier):
4309 Add ARI comments.
4310
ce1e8424
TT
43112018-05-18 Tom Tromey <tom@tromey.com>
4312
4313 * c-typeprint.c (maybe_print_hole): New function.
4314 (c_print_type_struct_field_offset): Update.
4315 (c_type_print_base_struct_union): Call maybe_print_hole.
4316
ddfe970e
KS
43172018-05-17 Keith Seitz <keiths@redhat.com>
4318
4319 * breakpoint.c (build_bpstat_chain): New function, moved from
4320 bpstat_stop_status.
4321 (bpstat_stop_status): Add optional parameter, `stop_chain'.
4322 If no stop chain is passed, call build_bpstat_chain to build it.
4323 * breakpoint.h (build_bpstat_chain): Declare.
4324 (bpstat_stop_status): Move documentation here from breakpoint.c.
4325 * infrun.c (handle_signal_stop): Before eliding inlined frames,
4326 build the stop chain and pass it to skip_inline_frames.
4327 Pass this stop chain to bpstat_stop_status.
4328 * inline-frame.c: Include breakpoint.h.
4329 (stopped_by_user_bp_inline_frame): New function.
4330 (skip_inline_frames): Add parameter `stop_chain'.
4331 Move documention to inline-frame.h.
4332 If non-NULL, use stopped_by_user_bp_inline_frame to determine
4333 whether the frame should be elided.
4334 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
4335 Add moved documentation and update for new parameter.
4336
b17992c1
SM
43372018-05-17 Simon Marchi <simon.marchi@ericsson.com>
4338
4339 PR cli/14975
4340 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4341 unittests/format_pieces-selftests.c.
4342 * common/format.h (format_piece) <operator==>: New.
4343 (format_pieces) <operator[]>: Remove.
4344 * common/format.c (format_pieces::format_pieces): Handle \e.
4345 * unittests/format_pieces-selftests.c: New.
4346
58f0c718
TT
43472018-05-17 Tom Tromey <tom@tromey.com>
4348
4349 PR symtab/23010:
4350 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
4351 (dw2_instantiate_symtab): Add skip_partial parameter.
4352 (dw2_find_last_source_symtab, dw2_map_expand_apply)
4353 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
4354 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
4355 (dw2_expand_symtabs_matching_one)
4356 (dw2_find_pc_sect_compunit_symtab)
4357 (dw2_debug_names_lookup_symbol)
4358 (dw2_debug_names_expand_symtabs_for_function): Update.
4359 (init_cutu_and_read_dies): Add skip_partial parameter.
4360 (process_psymtab_comp_unit, build_type_psymtabs_1)
4361 (process_skeletonless_type_unit, load_partial_comp_unit)
4362 (psymtab_to_symtab_1): Update.
4363 (load_full_comp_unit): Add skip_partial parameter.
4364 (process_imported_unit_die, dwarf2_read_addr_index)
4365 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
4366 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
4367 (read_signatured_type): Update.
4368
3e618834
SM
43692018-05-17 Simon Marchi <simon.marchi@ericsson.com>
4370
4371 * value.c (release_value): Remove unused variable.
4372 (record_latest_value): Likewise.
4373 (access_value_history): Likewise.
4374 (preserve_values): Likewise.
4375
fe10fe31
TT
43762018-05-17 Tom Tromey <tom@tromey.com>
4377
4378 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
4379 Initialize.
4380
1d761124
MR
43812018-05-16 Maciej W. Rozycki <macro@mips.com>
4382
4383 PR gdb/22286
4384 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
4385 Also handle registers whose width is not a multiple of
4386 PTRACE_TYPE_RET.
4387 (linux_nat_trad_target::store_register): Likewise.
4388
06333fea
TT
43892018-05-16 Tom Tromey <tom@tromey.com>
4390
4391 * gdbcore.h (core_bfd): Redefine.
4392 * corelow.c (core_target::close): Update.
4393 (core_target_open): Update.
4394 * progspace.h (struct program_space) <cbfd>: Now a
4395 gdb_bfd_ref_ptr.
4396
921222e2
TT
43972018-05-16 Tom Tromey <tom@tromey.com>
4398
4399 PR cli/19551:
4400 * symfile-add-flags.h (enum symfile_add_flags)
4401 <SYMFILE_NOT_FILENAME>: New constant.
4402 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
4403 objfile name from BFD.
4404 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
4405 * minidebug.c (find_separate_debug_file_in_section): Put
4406 ".gnu_debugdata" into BFD's file name.
4407
3acb7083
SM
44082018-05-16 Simon Marchi <simon.marchi@ericsson.com>
4409
4410 * regcache.c (regcache_read_ftype, regcache_write_ftype):
4411 Remove.
4412
561a72d4
TC
44132018-05-15 Tamar Christina <tamar.christina@arm.com>
4414
4415 PR binutils/21446
4416 * aarch64-tdep.c (aarch64_analyze_prologue,
4417 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
4418 Indicate not interested in errors.
4419
4e6ff0e1
MR
44202018-05-15 Maciej W. Rozycki <macro@mips.com>
4421
4422 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
4423 Supply the MIPS_ZERO_REGNUM register.
4424
ea33cd92
MR
44252018-05-15 Maciej W. Rozycki <macro@mips.com>
4426
4427 * mips-tdep.c (mask_address_var): Make variable static.
4428
2d79090e
TT
44292018-05-14 Tom Tromey <tom@tromey.com>
4430
4431 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
4432
cf4912ae
AB
44332018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
4434
4435 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
4436 FXSAVE_ADDR for the mxcsr register.
4437
67e6f569
MF
44382018-05-11 Max Filippov <jcmvbkbc@gmail.com>
4439
4440 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
4441
15244507
PA
44422018-05-11 Pedro Alves <palves@redhat.com>
4443
4444 * corelow.c (core_target) <core_target>: No longer inline.
4445 Initialize m_core_gdbarch, m_core_vec and build the section table
4446 here.
4447 <~core_target>: New.
4448 <core_gdbarch, get_core_register_section>: New methods.
4449 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
4450 factored out from ...
4451 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
4452 (core_ops): Delete.
4453 (sniff_core_bfd): Add gdbarch parameter.
4454 (core_close): Delete, merged into ...
4455 (core_target::close): ... here. Delete self.
4456 (core_close_cleanup): Delete.
4457 (core_target_open): Allocate a core_target on the heap. Use a
4458 unique_ptr instead of a cleanup. Bits moved into the core_target
4459 ctor. Adjust to use core_target methods instead of globals.
4460 (get_core_register_section): Rename to ...
4461 (core_target::get_core_register_section): ... this and adjust.
4462 (struct get_core_registers_cb_data): New.
4463 (get_core_registers_cb): Use it. Use bool.
4464 (core_target::fetch_registers, core_target::files_info)
4465 (core_target::xfer_partial, core_target::read_description)
4466 (core_target::pid_to, core_target::thread_name): Adjust to
4467 reference class fields instead of globals.
4468 * target.h (struct target_ops_deleter, target_ops_up): New.
4469
451953fa
PA
44702018-05-11 Pedro Alves <palves@redhat.com>
4471
4472 * corefile.c (core_file_command): Move to corelow.c.
4473 * corelow.c (the_core_target): Delete.
4474 (core_file_command): Moved from corefile.c. Check exec_bfd
4475 instead of the_core_target. Use target_detach instead of calling
4476 into the_core_target directly.
4477 (maybe_say_no_core_file_now): New.
4478 (core_target::detach): Use it.
4479 (_initialize_corelow): Remove references to the_core_target.
4480 * gdbcore.h (the_core_target): Delete.
4481
e540a5a2 44822018-05-11 Tom Tromey <tromey@redhat.com>
3afc23a6 4483 Pedro Alves <palves@redhat.com>
e540a5a2
TT
4484
4485 * corefile.c (core_bfd): Remove.
4486 * gdbcore.h (core_bfd): Now a macro.
4487 * progspace.h (struct program_space) <cbfd>: New field.
4488
633cf254
TT
44892018-05-11 Tom Tromey <tom@tromey.com>
4490
4491 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
4492 gdb::def_vector.
4493
1a34f210
TT
44942018-05-10 Tom Tromey <tom@tromey.com>
4495
4496 * configure: Rebuild.
4497 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
4498
190852c8
JB
44992018-05-10 Joel Brobecker <brobecker@adacore.com>
4500
4501 PR server/23158:
4502 * regformats/regdat.sh: Adjust script, following the addition
4503 of the new expedite_regs parameter to init_target_desc.
4504
8727de56
OJ
45052018-05-10 Omair Javaid <omair.javaid@linaro.org>
4506
4507 PR gdb/23127
4508 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
4509 set_gdbarch_significant_addr_bit.
4510 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
4511 set_gdbarch_significant_addr_bit.
4512 * utils.c (address_significant): Update to sign extend addr.
4513
37d9e062
MF
45142018-05-09 Max Filippov <jcmvbkbc@gmail.com>
4515
4516 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
4517 (xtensa_linux_init_abi): Limit tdep->num_regs by
4518 tdep->num_nopriv_regs.
4519 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
4520 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
4521 not initialized.
4522
7402fbca
SM
45232018-05-08 Simon Marchi <simon.marchi@ericsson.com>
4524
4525 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
4526
8ee22052
AB
45272018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
4528
4529 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
4530 (I387_MXCSR_INIT_VAL): New constant.
4531 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
4532 buffer if it was supplied by the inferior.
4533 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
4534 (i387_xsave_get_clear_bv): New function.
4535 (i387_supply_xsave): Only read x87 control registers from the
4536 xsave buffer if the feature is enabled, and the state will have
4537 been written, otherwise, provide a suitable default.
4538 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
4539 including x87 control registers. Update control registers if they
4540 have changed from the default value, and mark features as enabled
4541 as required.
4542 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
4543
968ae51b
UW
45442018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
4545
4546 * spu-tdep.c (info_spu_event_command): Fix output formatting.
4547
aff689d3
TT
45482018-05-07 Tom Tromey <tom@tromey.com>
4549
4550 * configure: Rebuild.
4551 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
4552
ce887586
TT
45532018-05-07 Tom Tromey <tom@tromey.com>
4554
4555 PR tdep/20362:
4556 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
4557 bit. Use correct value for VDIV.
4558
85e26832
TT
45592018-05-04 Tom Tromey <tom@tromey.com>
4560
4561 * configure: Rebuild.
4562 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
4563
449b1ac7
TT
45642018-05-04 Tom Tromey <tom@tromey.com>
4565
4566 * linux-record.c (record_linux_system_call) <case
4567 RECORD_SYS_RECVFROM>: Add "break".
4568
15c9ffd6
TT
45692018-05-04 Tom Tromey <tom@tromey.com>
4570
4571 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
4572 Add missing "break".
4573 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
4574 Add missing "break".
4575
e3829d13
TT
45762018-05-04 Tom Tromey <tom@tromey.com>
4577
4578 * rs6000-tdep.c (ppc_process_record_op4)
4579 (ppc_process_record_op63): Add fall-through comment.
4580
da0e1563
TT
45812018-05-04 Tom Tromey <tom@tromey.com>
4582
4583 * i386-tdep.c (i386_process_record): Add fall-through comment.
4584
0019cd49
TT
45852018-05-04 Tom Tromey <tom@tromey.com>
4586
4587 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
4588 comment.
4589
565e0eda
TT
45902018-05-04 Tom Tromey <tom@tromey.com>
4591
4592 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
4593 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
4594 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
4595 comment.
4596 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
4597 comment.
4598 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
4599 comment.
4600
621846f4
TT
46012018-05-04 Tom Tromey <tom@tromey.com>
4602
4603 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
4604
86a73007
TT
46052018-05-04 Tom Tromey <tom@tromey.com>
4606
4607 * s390-tdep.c (s390_process_record): Fix fall-through comments.
4608 * xcoffread.c (scan_xcoff_symtab): Move comment later.
4609 * symfile.c (section_is_mapped): Fix fall-through comment.
4610 * stabsread.c (define_symbol, read_member_functions): Fix
4611 fall-through comment.
4612 * s390-linux-tdep.c (s390_process_record): Fix fall-through
4613 comment.
4614 * remote.c (remote_wait_as): Fix fall-through comment.
4615 * p-exp.y (yylex): Fix fall-through comment.
4616 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
4617 comment.
4618 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
4619 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
4620 * jv-exp.y (yylex): Fix fall-through comment.
4621 * go-exp.y (lex_one_token): Fix fall-through comment.
4622 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
4623 fall-through comment.
4624 * f-exp.y (yylex): Fix fall-through comment.
4625 * dwarf2read.c (process_die): Fix fall-through comments.
4626 * dbxread.c (process_one_symbol): Fix fall-through comment.
4627 * d-exp.y (lex_one_token): Fix fall-through comment.
4628 * cp-name-parser.y (yylex): Fix fall-through comment.
4629 * coffread.c (coff_symtab_read): Fix fall-through comment.
4630 * c-exp.y (lex_one_token): Fix fall-through comment.
4631 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
4632 comment.
4633 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
4634 comment.
4635
56bcdbea
TT
46362018-05-04 Tom Tromey <tom@tromey.com>
4637
4638 PR python/22730:
4639 * NEWS: Mention gdb.execute change.
4640 * gdbcmd.h (execute_control_command): Don't declare.
4641 * python/python.c (execute_gdb_command): Use read_command_lines_1,
4642 execute_control_commands, execute_control_commands_to_string.
4643 * cli/cli-script.h (execute_control_commands)
4644 (execute_control_commands_to_string): Declare.
4645 (execute_control_command): Add from_tty parameter.
4646 * cli/cli-script.c (execute_control_commands)
4647 (execute_control_commands_to_string): New functions.
4648 (execute_user_command): Use execute_control_commands.
4649 (execute_control_command_1): Add "from_tty" parameter. Update.
4650 (execute_control_command): Likewise.
4651
a913fffb
TT
46522018-05-04 Tom Tromey <tom@tromey.com>
4653
4654 PR python/22731:
4655 * NEWS: Mention that breakpoint commands are writable.
4656 * python/py-breakpoint.c (bppy_set_commands): New function.
4657 (breakpoint_object_getset) <"commands">: Use it.
4658
60b3cef2
TT
46592018-05-04 Tom Tromey <tom@tromey.com>
4660
4661 * tracepoint.c (actions_command): Update.
4662 * mi/mi-cmd-break.c (mi_command_line_array)
4663 (mi_command_line_array_cnt, mi_command_line_array_ptr)
4664 (mi_read_next_line): Remove.
4665 (mi_cmd_break_commands): Update.
4666 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
4667 function_view.
4668 * cli/cli-script.c (get_command_line): Update.
4669 (process_next_line): Use function_view. Constify.
4670 (recurse_read_control_structure, read_command_lines)
4671 (read_command_lines_1): Change argument types to function_view.
4672 (do_define_command, document_command): Update.
4673 * breakpoint.h (check_tracepoint_command): Don't declare.
4674 * breakpoint.c (check_tracepoint_command): Remove.
4675 (commands_command_1, create_tracepoint_from_upload): Update.
4676
7a2c85f2
TT
46772018-05-04 Tom Tromey <tom@tromey.com>
4678
4679 PR gdb/11750:
4680 * cli/cli-script.h (enum command_control_type) <define_control>:
4681 New constant.
4682 * cli/cli-script.c (multi_line_command_p): Handle define_control.
4683 (build_command_line, execute_control_command_1)
4684 (process_next_line): Likewise.
4685 (do_define_command): New function, extracted from define_command.
4686 (define_command): Use it.
4687
295dc222
TT
46882018-05-04 Tom Tromey <tom@tromey.com>
4689
4690 * tracepoint.c (actions_command): Update.
4691 * cli/cli-script.h (read_command_lines): Update.
4692 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
4693 (MAX_TMPBUF): Remove define.
4694 (define_command): Use string_printf.
4695 (document_command): Likewise.
4696 * breakpoint.c (commands_command_1): Update.
4697
1263a9d5
TT
46982018-05-04 Tom Tromey <tom@tromey.com>
4699
4700 * top.c (execute_command): Update.
4701 * cli/cli-script.h (print_command_lines): Now varargs.
4702 * cli/cli-script.c (print_command_lines): Now varargs.
4703 (execute_control_command_1) <case while_control, case if_control>:
4704 Update.
4705
12973681
TT
47062018-05-04 Tom Tromey <tom@tromey.com>
4707
4708 * tracepoint.c (all_tracepoint_actions): Rename from
4709 all_tracepoint_actions_and_cleanup. Change return type.
4710 (actions_command, encode_actions_1, encode_actions)
4711 (trace_dump_actions, tdump_command): Update.
4712 * remote.c (remote_download_command_source): Update.
4713 * python/python.c (gdbpy_eval_from_control_command)
4714 (python_command, python_interactive_command): Update.
4715 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
4716 * guile/guile.c (guile_command)
4717 (gdbscm_eval_from_control_command, guile_command): Update.
4718 * compile/compile.c (compile_code_command)
4719 (compile_print_command, compile_to_object): Update.
4720 * cli/cli-script.h (struct command_lines_deleter): New.
4721 (counted_command_line): New typedef.
4722 (struct command_line): Add constructor, destructor.
4723 <body_list>: Remove.
4724 <body_list_0, body_list_1>: New members.
4725 (command_line_up): Remove typedef.
4726 (read_command_lines, read_command_lines_1, get_command_line):
4727 Update.
4728 (copy_command_lines): Don't declare.
4729 * cli/cli-script.c (build_command_line): Use "new".
4730 (get_command_line): Return counted_command_line.
4731 (print_command_lines, execute_user_command)
4732 (execute_control_command_1, while_command, if_command): Update.
4733 (realloc_body_list): Remove.
4734 (process_next_line, recurse_read_control_structure): Update.
4735 (read_command_lines, read_command_lines_1): Return counted_command_line.
4736 (free_command_lines): Use "delete".
4737 (copy_command_lines): Remove.
4738 (define_command, document_command, show_user_1): Update.
4739 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
4740 a counted_command_line.
4741 * breakpoint.h (counted_command_line): Remove typedef.
4742 (breakpoint_set_commands): Update.
4743 * breakpoint.c (check_no_tracepoint_commands)
4744 (validate_commands_for_breakpoint): Update.
4745 (breakpoint_set_commands): Change commands to be a
4746 counted_command_line.
4747 (commands_command_1, update_dprintf_command_list)
4748 (create_tracepoint_from_upload): Update.
4749
e2fc72e2
TT
47502018-05-04 Tom Tromey <tom@tromey.com>
4751
4752 * cli/cli-decode.h (cmd_list_element): New constructor.
4753 (~cmd_list_element): New destructor.
4754 (struct cmd_list_element): Add initializers.
4755 * cli/cli-decode.c (do_add_cmd): Use "new".
4756 (delete_cmd): Use "delete".
4757
a3b60e45
JK
47582018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
4759 Pedro Alves <palves@redhat.com>
4760
4761 PR breakpoints/19806 and support for PR external/20207.
4762 * NEWS: Mention Aarch64 watchpoint improvements.
4763 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
4764 watchpoints and PR external/20207 watchpoints.
4765 * nat/aarch64-linux-hw-point.c
4766 (kernel_supports_any_contiguous_range): New.
4767 (aarch64_watchpoint_offset): New.
4768 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
4769 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
4770 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
4771 (aarch64_align_watchpoint): New parameters aligned_offset_p and
4772 next_addr_orig_p. Support PR external/20207 watchpoints.
4773 (aarch64_downgrade_regs): New.
4774 (aarch64_dr_state_insert_one_point): New parameters offset and
4775 addr_orig.
4776 (aarch64_dr_state_remove_one_point): Likewise.
4777 (aarch64_handle_breakpoint): Update caller.
4778 (aarch64_handle_aligned_watchpoint): Likewise.
4779 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
4780 aligned_offset.
4781 (aarch64_linux_set_debug_regs): Remove const from state. Call
4782 aarch64_downgrade_regs.
4783 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
4784 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
4785 (DR_CONTROL_MASK): ... this.
4786 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
4787 (unsigned int aarch64_watchpoint_offset): New prototype.
4788 (aarch64_linux_set_debug_regs): Remove const from state.
4789 * utils.c (align_up, align_down): Move to ...
4790 * common/common-utils.c (align_up, align_down): ... here.
4791 * utils.h (align_up, align_down): Move to ...
4792 * common/common-utils.h (align_up, align_down): ... here.
4793
05bc7456
JB
47942018-05-04 Joel Brobecker <brobecker@adacore.com>
4795
4796 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
4797 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
4798 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
4799 Re-implement to match the ABI as summarized in GCC's
4800 gcc/config/sparc/sparc.c. All callers updated.
4801 (sparc32_store_arguments): Remove assertion.
4802
2f433492
TT
48032018-05-04 Tom Tromey <tom@tromey.com>
4804
4805 * printcmd.c: Don't include tui.h.
4806 (decode_format): Use skip_spaces.
4807
9be2ae8f
TT
48082018-05-04 Tom Tromey <tom@tromey.com>
4809
4810 PR gdb/22619:
4811 * printcmd.c (last_count): New global.
4812 (x_command): Use saved count when repeating.
4813
f0b3976b
TT
48142018-05-04 Tom Tromey <tom@tromey.com>
4815
4816 * nto-procfs.c (do_closedir_cleanup): Remove.
4817 (procfs_pidlist): Use gdb_dir_up.
4818 * procfs.c (do_closedir_cleanup): Remove.
4819 (proc_update_threads): Use gdb_dir_up.
4820 * common/filestuff.h (struct gdb_dir_deleter): New.
4821 (gdb_dir_up): New typedef.
4822
862d101a
TT
48232018-05-04 Tom Tromey <tom@tromey.com>
4824
4825 * ada-lang.c (print_mention_exception): Use std::string.
4826
cb7de75e
TT
48272018-05-04 Tom Tromey <tom@tromey.com>
4828
4829 * ada-lang.c (create_excep_cond_exprs): Update.
4830 (ada_exception_catchpoint_cond_string): Use std::string.
4831
49d83361
TT
48322018-05-04 Tom Tromey <tom@tromey.com>
4833
4834 * ada-lang.c (xget_renaming_scope): Return std::string.
4835 (old_renaming_is_invisible): Update.
4836
ade72a34
TT
48372018-05-04 Tom Tromey <tom@tromey.com>
4838
4839 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
4840 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
4841
2be4d7f0
UW
48422018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
4843
4844 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
4845
69b6ecb0
TT
48462018-05-04 Tom Tromey <tom@tromey.com>
4847
4848 * remote.c (remote_query_supported_append): Change type.
4849 (remote_check_symbols): Update.
4850
bf27f0e2
PP
48512018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
4852
4853 PR gdb/11420
4854 * configure.ac: Prepend libpython.
4855 * python/python-config.py: Likewise.
4856 * configure: Regenerate.
4857
4ea17de8
SM
48582018-05-03 Simon Marchi <simon.marchi@ericsson.com>
4859
4860 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
4861
bd732259
PA
48622018-05-03 Pedro Alves <palves@redhat.com>
4863
4864 * s390-linux-nat.c
4865 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
4866 override. Write 'true' instead of '1'.
4867 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
4868 declaration.
4869
d9f719f1
PA
48702018-05-02 Pedro Alves <palves@redhat.com>
4871
4872 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
4873 add_inf_child_target.
4874 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
4875 add_inf_child_target.
4876 * aix-thread.c (aix_thread_target_info): New.
4877 (aix_thread_target) <shortname, longname, doc>: Delete.
4878 <info>: New.
4879 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
4880 add_inf_child_target.
4881 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
4882 add_inf_child_target.
4883 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
4884 add_inf_child_target.
4885 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
4886 add_inf_child_target.
4887 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
4888 add_inf_child_target.
4889 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
4890 add_inf_child_target.
4891 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
4892 add_inf_child_target.
4893 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
4894 add_inf_child_target.
4895 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
4896 add_inf_child_target.
4897 * bfd-target.c (target_bfd_target_info): New.
4898 (target_bfd) <shortname, longname, doc>: Delete.
4899 <info>: New.
4900 * bsd-kvm.c (bsd_kvm_target_info): New.
4901 (bsd_kvm_target) <shortname, longname, doc>: Delete.
4902 <info>: New.
4903 (bsd_kvm_target::open): Rename to ...
4904 (bsd_kvm_target_open): ... this. Adjust.
4905 * bsd-uthread.c (bsd_uthread_target_info): New.
4906 (bsd_uthread_target) <shortname, longname, doc>: Delete.
4907 <info>: New.
4908 * corefile.c (core_file_command): Adjust.
4909 * corelow.c (core_target_info): New.
4910 (core_target) <shortname, longname, doc>: Delete.
4911 <info>: New.
4912 (core_target::open): Rename to ...
4913 (core_target_open): ... this. Adjust.
4914 * ctf.c (ctf_target_info): New.
4915 (ctf_target) <shortname, longname, doc>: Delete.
4916 <info>: New.
4917 (ctf_target::open): Rename to ...
4918 (ctf_target_open): ... this.
4919 (_initialize_ctf): Adjust.
4920 * exec.c (exec_target_info): New.
4921 (exec_target) <shortname, longname, doc>: Delete.
4922 <info>: New.
4923 (exec_target::open): Rename to ...
4924 (exec_target_open): ... this.
4925 * gdbcore.h (core_target_open): Declare.
4926 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
4927 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
4928 add_inf_child_target.
4929 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
4930 add_inf_child_target.
4931 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
4932 add_inf_child_target.
4933 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
4934 add_inf_child_target.
4935 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
4936 add_inf_child_target.
4937 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
4938 add_inf_child_target.
4939 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
4940 add_inf_child_target.
4941 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
4942 add_inf_child_target.
4943 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
4944 add_inf_child_target.
4945 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
4946 add_inf_child_target.
4947 * inf-child.c (inf_child_target_info): New.
4948 (inf_child_target::info): New.
4949 (inf_child_open_target): Remove 'target' parameter. Use
4950 get_native_target instead.
4951 (inf_child_target::open): Delete.
4952 (add_inf_child_target): New.
4953 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
4954 Delete.
4955 <info>: New.
4956 (add_inf_child_target): Declare.
4957 (inf_child_open_target): Declare.
4958 * linux-thread-db.c (thread_db_target_info): New.
4959 (thread_db_target) <shortname, longname, doc>: Delete.
4960 <info>: New.
4961 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
4962 add_inf_child_target.
4963 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
4964 add_inf_child_target.
4965 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
4966 add_inf_child_target.
4967 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
4968 add_inf_child_target.
4969 * make-target-delegates (print_class): Adjust.
4970 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
4971 add_inf_child_target.
4972 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
4973 add_inf_child_target.
4974 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
4975 add_inf_child_target.
4976 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
4977 add_inf_child_target.
4978 * nto-procfs.c (nto_native_target_info): New.
4979 (nto_procfs_target_native) <shortname, longname, doc>:
4980 Delete.
4981 <info>: New.
4982 (nto_procfs_target_info): New.
4983 (nto_procfs_target_procfs) <shortname, longname, doc>:
4984 Delete.
4985 <info>: New.
4986 (init_procfs_targets): Adjust.
4987 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
4988 add_inf_child_target.
4989 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
4990 add_inf_child_target.
4991 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
4992 add_inf_child_target.
4993 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
4994 add_inf_child_target.
4995 * ravenscar-thread.c (ravenscar_target_info): New.
4996 (ravenscar_thread_target) <shortname, longname, doc>:
4997 Delete.
4998 <info>: New.
4999 * record-btrace.c (record_btrace_target_info):
5000 (record_btrace_target) <shortname, longname, doc>: Delete.
5001 <info>: New.
5002 (record_btrace_target::open): Rename to ...
5003 (record_btrace_target_open): ... this. Adjust.
5004 * record-full.c (record_longname, record_doc): New.
5005 (record_full_base_target) <shortname, longname, doc>: Delete.
5006 <info>: New.
5007 (record_full_target_info): New.
5008 (record_full_target): <shortname>: Delete.
5009 <info>: New.
5010 (record_full_core_open_1, record_full_open_1): Update comments.
5011 (record_full_base_target::open): Rename to ...
5012 (record_full_open): ... this.
5013 (cmd_record_full_restore): Update.
5014 (_initialize_record_full): Update.
5015 * remote-sim.c (remote_sim_target_info): New.
5016 (gdbsim_target) <shortname, longname, doc>: Delete.
5017 <info>: New.
5018 (gdbsim_target::open): Rename to ...
5019 (gdbsim_target_open): ... this.
5020 (_initialize_remote_sim): Adjust.
5021 * remote.c (remote_doc): New.
5022 (remote_target_info): New.
5023 (remote_target) <shortname, longname, doc>: Delete.
5024 <info>: New.
5025 (extended_remote_target_info): New.
5026 (extended_remote_target) <shortname, longname, doc>: Delete.
5027 <info>: New.
5028 (remote_target::open_1): Make static. Adjust.
5029 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
5030 * s390-linux-nat.c (_initialize_s390_nat): Use
5031 add_inf_child_target.
5032 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
5033 add_inf_child_target.
5034 * sol-thread.c (thread_db_target_info): New.
5035 (sol_thread_target) <shortname, longname, doc>: Delete.
5036 <info>: New.
5037 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
5038 add_inf_child_target.
5039 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
5040 add_inf_child_target.
5041 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
5042 add_inf_child_target.
5043 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
5044 add_inf_child_target.
5045 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
5046 add_inf_child_target.
5047 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
5048 add_inf_child_target.
5049 * spu-linux-nat.c (_initialize_spu_nat): Use
5050 add_inf_child_target.
5051 * spu-multiarch.c (spu_multiarch_target_info): New.
5052 (spu_multiarch_target) <shortname, longname, doc>: Delete.
5053 <info>: New.
5054 * target-delegates.c: Regenerate.
5055 * target.c: Include <unordered_map>.
5056 (target_ops_p): Delete.
5057 (DEF_VEC_P(target_ops_p)): Delete.
5058 (target_factories): New.
5059 (test_target_info): New.
5060 (test_target_ops::info): New.
5061 (open_target): Adjust to use target_factories.
5062 (add_target_with_completer): Rename to ...
5063 (add_target): ... this. Change prototype. Register target_info
5064 and open callback in target_factories. Register target_info in
5065 command context instead of target_ops.
5066 (add_target): Delete old implementation.
5067 (add_deprecated_target_alias): Change prototype. Adjust.
5068 (the_native_target): New.
5069 (set_native_target, get_native_target): New.
5070 (find_default_run_target): Use the_native_target.
5071 (find_attach_target, find_run_target): Simplify.
5072 (target_ops::open): Delete.
5073 (dummy_target_info): New.
5074 (dummy_target::shortname, dummy_target::longname)
5075 (dummy_target::doc): Delete.
5076 (dummy_target::info): New.
5077 (debug_target::shortname, debug_target::longname)
5078 (debug_target::doc): Delete.
5079 (debug_target::info): New.
5080 * target.h (struct target_info): New.
5081 (target_ops::~target_ops): Add comment.
5082 (target_ops::info): New.
5083 (target_ops::shortname, target_ops::longname, target_ops::doc): No
5084 longer virtual. Implement in terms of target_info.
5085 (set_native_target, get_native_target): Declare.
5086 (target_open_ftype): New.
5087 (add_target, add_target_with_completer)
5088 (add_deprecated_target_alias): Change prototype.
5089 (test_target) <shortname, longname, doc>: Delete.
5090 <info>: New.
5091 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
5092 add_inf_child_target.
5093 * tracefile-tfile.c (tfile_target_info): New.
5094 (tfile_target) <shortname, longname, doc>: Delete.
5095 <info>: New.
5096 (tfile_target::open): Rename to ...
5097 (tfile_target_open): ... this.
5098 (_initialize_tracefile_tfile): Adjust.
5099 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
5100 add_inf_child_target.
5101 * windows-nat.c (_initialize_windows_nat): Use
5102 add_inf_child_target.
5103 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
5104 add_inf_child_target.
5105
135340af
PA
51062018-05-02 Pedro Alves <palves@redhat.com>
5107
5108 * linux-nat.h (linux_nat_target) <low_new_thread,
5109 low_delete_thread, low_new_fork, low_forget_process,
5110 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
5111 New virtual methods.
5112 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5113 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
5114 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
5115 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5116 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
5117 Delete.
5118 * linux-fork.c (delete_fork): Adjust to call low method.
5119 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
5120 (linux_nat_new_fork, linux_nat_forget_process_hook)
5121 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
5122 (linux_nat_status_is_event):
5123 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
5124 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
5125 to call low method.
5126 (sigtrap_is_event): Rename to ...
5127 (linux_nat_target::low_status_is_event): ... this.
5128 (linux_nat_set_status_is_event): Delete.
5129 (save_stop_reason, linux_nat_wait_1)
5130 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
5131 low methods.
5132 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5133 (linux_nat_set_new_fork, linux_nat_set_forget_process)
5134 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5135 (linux_nat_set_prepare_to_resume): Delete.
5136 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
5137 low virtual methods.
5138 * amd64-linux-nat.c: Likewise.
5139 * arm-linux-nat.c: Likewise.
5140 * i386-linux-nat.c: Likewise.
5141 * ia64-linux-nat.c: Likewise.
5142 * mips-linux-nat.c: Likewise.
5143 * ppc-linux-nat.c: Likewise.
5144 * s390-linux-nat.c: Likewise.
5145 * sparc64-linux-nat.c: Likewise.
5146 * x86-linux-nat.c: Likewise.
5147 * x86-linux-nat.h: Include "nat/x86-linux.h".
5148 (x86_linux_nat_target) <low_new_fork, low_forget_process,
5149 low_prepare_to_resume, low_new_thread, low_delete_thread>:
5150 Override methods.
5151
57810aa7
PA
51522018-05-02 Pedro Alves <palves@redhat.com>
5153
5154 * target.h (target_ops)
5155 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5156 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
5157 stopped_by_watchpoint, have_continuable_watchpoint,
5158 stopped_data_address, watchpoint_addr_within_range,
5159 can_accel_watchpoint_condition, can_run, thread_alive,
5160 has_all_memory, has_memory, has_stack, has_registers,
5161 has_execution, can_async_p, is_async_p, supports_non_stop,
5162 always_non_stop_p, can_execute_reverse, supports_multi_process,
5163 supports_enable_disable_tracepoint,
5164 supports_disable_randomization, supports_string_tracing,
5165 supports_evaluation_of_breakpoint_conditions,
5166 can_run_breakpoint_commands, filesystem_is_local,
5167 can_download_tracepoint, get_trace_state_variable_value,
5168 set_trace_notes, get_tib_address, use_agent, can_use_agent,
5169 record_is_replaying, record_will_replay,
5170 augmented_libraries_svr4_read>: Adjust to return bool.
5171 * aarch64-linux-nat.c: All implementations adjusted.
5172 * aix-thread.c: All implementations adjusted.
5173 * arm-linux-nat.c: All implementations adjusted.
5174 * breakpoint.c: All implementations adjusted.
5175 * bsd-kvm.c: All implementations adjusted.
5176 * bsd-uthread.c: All implementations adjusted.
5177 * corelow.c: All implementations adjusted.
5178 * ctf.c: All implementations adjusted.
5179 * darwin-nat.c: All implementations adjusted.
5180 * darwin-nat.h: All implementations adjusted.
5181 * exec.c: All implementations adjusted.
5182 * fbsd-nat.c: All implementations adjusted.
5183 * fbsd-nat.h: All implementations adjusted.
5184 * gnu-nat.c: All implementations adjusted.
5185 * gnu-nat.h: All implementations adjusted.
5186 * go32-nat.c: All implementations adjusted.
5187 * ia64-linux-nat.c: All implementations adjusted.
5188 * inf-child.c: All implementations adjusted.
5189 * inf-child.h: All implementations adjusted.
5190 * inf-ptrace.c: All implementations adjusted.
5191 * inf-ptrace.h: All implementations adjusted.
5192 * linux-nat.c: All implementations adjusted.
5193 * linux-nat.h: All implementations adjusted.
5194 * mips-linux-nat.c: All implementations adjusted.
5195 * nto-procfs.c: All implementations adjusted.
5196 * ppc-linux-nat.c: All implementations adjusted.
5197 * procfs.c: All implementations adjusted.
5198 * ravenscar-thread.c: All implementations adjusted.
5199 * record-btrace.c: All implementations adjusted.
5200 * record-full.c: All implementations adjusted.
5201 * remote-sim.c: All implementations adjusted.
5202 * remote.c: All implementations adjusted.
5203 * s390-linux-nat.c: All implementations adjusted.
5204 * sol-thread.c: All implementations adjusted.
5205 * spu-multiarch.c: All implementations adjusted.
5206 * target-delegates.c: All implementations adjusted.
5207 * target.c: All implementations adjusted.
5208 * target.h: All implementations adjusted.
5209 * tracefile-tfile.c: All implementations adjusted.
5210 * tracefile.c: All implementations adjusted.
5211 * tracefile.h: All implementations adjusted.
5212 * windows-nat.c: All implementations adjusted.
5213 * x86-linux-nat.h: All implementations adjusted.
5214 * x86-nat.h: All implementations adjusted.
5215
ad6a4e2d
PA
52162018-05-02 Pedro Alves <palves@redhat.com>
5217
5218 * make-target-delegates (scan_target_h): Don't trim lines here.
5219 Replace sequences of tabs and/or whitespace with a single
5220 whitespace.
5221 (top level, parsing methods): Trim each line before processing it
5222 here.
5223
f6ac5f3d
PA
52242018-05-02 Pedro Alves <palves@redhat.com>
5225 John Baldwin <jhb@freebsd.org>
5226
5227 * target.h (enum strata) <debug_stratum>: New.
5228 (struct target_ops) <all delegation methods>: Replace by C++
5229 virtual methods, and drop "to_" prefix. All references updated
5230 throughout.
5231 <to_shortname, to_longname, to_doc, to_data,
5232 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
5233 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
5234 virtual methods. All references updated throughout.
5235 <can_attach, supports_terminal_ours, can_create_inferior,
5236 get_thread_control_capabilities, attach_no_wait>: New
5237 virtual methods.
5238 <insert_breakpoint, remove_breakpoint>: Now
5239 TARGET_DEFAULT_NORETURN methods.
5240 <info_proc>: Now returns bool.
5241 <to_magic>: Delete.
5242 (OPS_MAGIC): Delete.
5243 (current_target): Delete. All references replaced by references
5244 to ...
5245 (target_stack): ... this. New.
5246 (target_shortname, target_longname): Adjust.
5247 (target_can_run): Now a function declaration.
5248 (default_child_has_all_memory, default_child_has_memory)
5249 (default_child_has_stack, default_child_has_registers)
5250 (default_child_has_execution): Remove target_ops parameter.
5251 (complete_target_initialization): Delete.
5252 (memory_breakpoint_target): New template class.
5253 (test_target_ops): Refactor as a C++ class with virtual methods.
5254 * make-target-delegates (NAME_PART): Tighten.
5255 (POINTER_PART, CP_SYMBOL): New.
5256 (SIMPLE_RETURN_PART): Reimplement.
5257 (VEC_RETURN_PART): Expect less.
5258 (RETURN_PART, VIRTUAL_PART): New.
5259 (METHOD): Adjust to C++ virtual methods.
5260 (scan_target_h): Remove reference to C99.
5261 (dname): Output "target_ops::" prefix.
5262 (write_function_header): Adjust to output a C++ class method.
5263 (write_declaration): New.
5264 (write_delegator): Adjust to output a C++ class method.
5265 (tdname): Output "dummy_target::" prefix.
5266 (write_tdefault, write_debugmethod): Adjust to output a C++ class
5267 method.
5268 (tdefault_names, debug_names): Delete.
5269 (return_types, tdefaults, styles, argtypes_array): New.
5270 (top level): All methods are delegators.
5271 (print_class): New.
5272 (top level): Print dummy_target and debug_target classes.
5273 * target-delegates.c: Regenerate.
5274 * target-debug.h (target_debug_print_enum_info_proc_what)
5275 (target_debug_print_thread_control_capabilities)
5276 (target_debug_print_thread_info_p): New.
5277 * target.c (dummy_target): Delete.
5278 (the_dummy_target, the_debug_target): New.
5279 (target_stack): Now extern.
5280 (set_targetdebug): Push/unpush debug target.
5281 (default_child_has_all_memory, default_child_has_memory)
5282 (default_child_has_stack, default_child_has_registers)
5283 (default_child_has_execution): Remove target_ops parameter.
5284 (complete_target_initialization): Delete.
5285 (add_target_with_completer): No longer call
5286 complete_target_initialization.
5287 (target_supports_terminal_ours): Use regular delegation.
5288 (update_current_target): Delete.
5289 (push_target): No longer check magic number. Don't call
5290 update_current_target.
5291 (unpush_target): Don't call update_current_target.
5292 (target_is_pushed): No longer check magic number.
5293 (target_require_runnable): Skip for all stratums over
5294 process_stratum.
5295 (target_ops::info_proc): New.
5296 (target_info_proc): Use find_target_at and
5297 find_default_run_target.
5298 (target_supports_disable_randomization): Use regular delegation.
5299 (target_get_osdata): Use find_target_at.
5300 (target_ops::open, target_ops::close, target_ops::can_attach)
5301 (target_ops::attach, target_ops::can_create_inferior)
5302 (target_ops::create_inferior, target_ops::can_run)
5303 (target_can_run): New.
5304 (default_fileio_target): Use regular delegation.
5305 (target_ops::fileio_open, target_ops::fileio_pwrite)
5306 (target_ops::fileio_pread, target_ops::fileio_fstat)
5307 (target_ops::fileio_close, target_ops::fileio_unlink)
5308 (target_ops::fileio_readlink): New.
5309 (target_fileio_open_1, target_fileio_unlink)
5310 (target_fileio_readlink): Always call the target method. Handle
5311 FILEIO_ENOSYS.
5312 (return_zero, return_zero_has_execution): Delete.
5313 (init_dummy_target): Delete.
5314 (dummy_target::dummy_target, dummy_target::shortname)
5315 (dummy_target::longname, dummy_target::doc)
5316 (debug_target::debug_target, debug_target::shortname)
5317 (debug_target::longname, debug_target::doc): New.
5318 (target_supports_delete_record): Use regular delegation.
5319 (setup_target_debug): Delete.
5320 (maintenance_print_target_stack): Skip debug_stratum.
5321 (initialize_targets): Instantiate the_dummy_target and
5322 the_debug_target.
5323 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
5324 use target_stack.
5325 (target_auxv_search, fprint_target_auxv): Adjust.
5326 (info_auxv_command): Adjust to use target_stack.
5327 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
5328 * exceptions.c (print_flush): Handle a NULL target_stack.
5329 * regcache.c (target_ops_no_register): Refactor as class with
5330 virtual methods.
5331
5332 * exec.c (exec_target): New class.
5333 (exec_ops): Now an exec_target.
5334 (exec_open, exec_close_1, exec_get_section_table)
5335 (exec_xfer_partial, exec_files_info, exec_has_memory)
5336 (exec_make_note_section): Refactor as exec_target methods.
5337 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
5338 Delete.
5339 (exec_target::find_memory_regions): New.
5340 (_initialize_exec): Don't call init_exec_ops.
5341 * gdbcore.h (exec_file_clear): Delete.
5342
5343 * corefile.c (core_target): Delete.
5344 (core_file_command): Adjust.
5345 * corelow.c (core_target): New class.
5346 (the_core_target): New.
5347 (core_close): Remove target_ops parameter.
5348 (core_close_cleanup): Adjust.
5349 (core_target::close): New.
5350 (core_open, core_detach, get_core_registers, core_files_info)
5351 (core_xfer_partial, core_thread_alive, core_read_description)
5352 (core_pid_to_str, core_thread_name, core_has_memory)
5353 (core_has_stack, core_has_registers, core_info_proc): Rework as
5354 core_target methods.
5355 (ignore, core_remove_breakpoint, init_core_ops): Delete.
5356 (_initialize_corelow): Initialize the_core_target.
5357 * gdbcore.h (core_target): Delete.
5358 (the_core_target): New.
5359
5360 * ctf.c: (ctf_target): New class.
5361 (ctf_ops): Now a ctf_target.
5362 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
5363 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
5364 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
5365 methods.
5366 (init_ctf_ops): Delete.
5367 (_initialize_ctf): Don't call it.
5368 * tracefile-tfile.c (tfile_target): New class.
5369 (tfile_ops): Now a tfile_target.
5370 (tfile_open, tfile_close, tfile_files_info)
5371 (tfile_get_tracepoint_status, tfile_trace_find)
5372 (tfile_fetch_registers, tfile_xfer_partial)
5373 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
5374 Refactor as tfile_target methods.
5375 (tfile_xfer_partial_features): Remove target_ops parameter.
5376 (init_tfile_ops): Delete.
5377 (_initialize_tracefile_tfile): Don't call it.
5378 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
5379 (tracefile_has_stack, tracefile_has_registers)
5380 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
5381 tracefile_target methods.
5382 (init_tracefile_ops): Delete.
5383 (tracefile_target::tracefile_target): New.
5384 * tracefile.h: Include "target.h".
5385 (tracefile_target): New class.
5386 (init_tracefile_ops): Delete.
5387
5388 * spu-multiarch.c (spu_multiarch_target): New class.
5389 (spu_ops): Now a spu_multiarch_target.
5390 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
5391 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
5392 (spu_search_memory, spu_mourn_inferior): Refactor as
5393 spu_multiarch_target methods.
5394 (init_spu_ops): Delete.
5395 (_initialize_spu_multiarch): Remove references to init_spu_ops,
5396 complete_target_initialization.
5397
5398 * ravenscar-thread.c (ravenscar_thread_target): New class.
5399 (ravenscar_ops): Now a ravenscar_thread_target.
5400 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
5401 (ravenscar_thread_alive, ravenscar_pid_to_str)
5402 (ravenscar_fetch_registers, ravenscar_store_registers)
5403 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
5404 (ravenscar_stopped_by_hw_breakpoint)
5405 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
5406 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
5407 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
5408 methods.
5409 (init_ravenscar_thread_ops): Delete.
5410 (_initialize_ravenscar): Remove references to
5411 init_ravenscar_thread_ops and complete_target_initialization.
5412
5413 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
5414 (bsd_uthread_target): New class.
5415 (bsd_uthread_ops): Now a bsd_uthread_target.
5416 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
5417 (bsd_uthread_close, bsd_uthread_mourn_inferior)
5418 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
5419 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
5420 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
5421 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
5422 (bsd_uthread_target): Delete function.
5423 (_initialize_bsd_uthread): Remove reference to
5424 complete_target_initialization.
5425
5426 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
5427 (target_bfd): ... this new class.
5428 (target_bfd_xfer_partial, target_bfd_get_section_table)
5429 (target_bfd_close): Refactor as target_bfd methods.
5430 (target_bfd::~target_bfd): New.
5431 (target_bfd_reopen): Adjust.
5432 (target_bfd::close): New.
5433
5434 * record-btrace.c (record_btrace_target): New class.
5435 (record_btrace_ops): Now a record_btrace_target.
5436 (record_btrace_open, record_btrace_stop_recording)
5437 (record_btrace_disconnect, record_btrace_close)
5438 (record_btrace_async, record_btrace_info)
5439 (record_btrace_insn_history, record_btrace_insn_history_range)
5440 (record_btrace_insn_history_from, record_btrace_call_history)
5441 (record_btrace_call_history_range)
5442 (record_btrace_call_history_from, record_btrace_record_method)
5443 (record_btrace_is_replaying, record_btrace_will_replay)
5444 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
5445 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
5446 (record_btrace_store_registers, record_btrace_prepare_to_store)
5447 (record_btrace_to_get_unwinder)
5448 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
5449 (record_btrace_commit_resume, record_btrace_wait)
5450 (record_btrace_stop, record_btrace_can_execute_reverse)
5451 (record_btrace_stopped_by_sw_breakpoint)
5452 (record_btrace_supports_stopped_by_sw_breakpoint)
5453 (record_btrace_stopped_by_hw_breakpoint)
5454 (record_btrace_supports_stopped_by_hw_breakpoint)
5455 (record_btrace_update_thread_list, record_btrace_thread_alive)
5456 (record_btrace_goto_begin, record_btrace_goto_end)
5457 (record_btrace_goto, record_btrace_stop_replaying_all)
5458 (record_btrace_execution_direction)
5459 (record_btrace_prepare_to_generate_core)
5460 (record_btrace_done_generating_core): Refactor as
5461 record_btrace_target methods.
5462 (init_record_btrace_ops): Delete.
5463 (_initialize_record_btrace): Remove reference to
5464 init_record_btrace_ops.
5465 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
5466 the execution_direction global.
5467 (record_full_base_target, record_full_target)
5468 (record_full_core_target): New classes.
5469 (record_full_ops): Now a record_full_target.
5470 (record_full_core_ops): Now a record_full_core_target.
5471 (record_full_target::detach, record_full_target::disconnect)
5472 (record_full_core_target::disconnect)
5473 (record_full_target::mourn_inferior, record_full_target::kill):
5474 New.
5475 (record_full_open, record_full_close, record_full_async): Refactor
5476 as methods of the record_full_base_target class.
5477 (record_full_resume, record_full_commit_resume): Refactor
5478 as methods of the record_full_target class.
5479 (record_full_wait, record_full_stopped_by_watchpoint)
5480 (record_full_stopped_data_address)
5481 (record_full_stopped_by_sw_breakpoint)
5482 (record_full_supports_stopped_by_sw_breakpoint)
5483 (record_full_stopped_by_hw_breakpoint)
5484 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
5485 methods of the record_full_base_target class.
5486 (record_full_store_registers, record_full_xfer_partial)
5487 (record_full_insert_breakpoint, record_full_remove_breakpoint):
5488 Refactor as methods of the record_full_target class.
5489 (record_full_can_execute_reverse, record_full_get_bookmark)
5490 (record_full_goto_bookmark, record_full_execution_direction)
5491 (record_full_record_method, record_full_info, record_full_delete)
5492 (record_full_is_replaying, record_full_will_replay)
5493 (record_full_goto_begin, record_full_goto_end, record_full_goto)
5494 (record_full_stop_replaying): Refactor as methods of the
5495 record_full_base_target class.
5496 (record_full_core_resume, record_full_core_kill)
5497 (record_full_core_fetch_registers)
5498 (record_full_core_prepare_to_store)
5499 (record_full_core_store_registers, record_full_core_xfer_partial)
5500 (record_full_core_insert_breakpoint)
5501 (record_full_core_remove_breakpoint)
5502 (record_full_core_has_execution): Refactor
5503 as methods of the record_full_core_target class.
5504 (record_full_base_target::supports_delete_record): New.
5505 (init_record_full_ops): Delete.
5506 (init_record_full_core_ops): Delete.
5507 (record_full_save): Refactor as method of the
5508 record_full_base_target class.
5509 (_initialize_record_full): Remove references to
5510 init_record_full_ops and init_record_full_core_ops.
5511
5512 * remote.c (remote_target, extended_remote_target): New classes.
5513 (remote_ops): Now a remote_target.
5514 (extended_remote_ops): Now an extended_remote_target.
5515 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
5516 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
5517 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
5518 (remote_pass_signals, remote_set_syscall_catchpoint)
5519 (remote_program_signals, )
5520 (remote_thread_always_alive): Remove target_ops parameter.
5521 (remote_thread_alive, remote_thread_name)
5522 (remote_update_thread_list, remote_threads_extra_info)
5523 (remote_static_tracepoint_marker_at)
5524 (remote_static_tracepoint_markers_by_strid)
5525 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
5526 (remote_open): Refactor as methods of remote_target.
5527 (extended_remote_open, extended_remote_detach)
5528 (extended_remote_attach, extended_remote_post_attach):
5529 (extended_remote_supports_disable_randomization)
5530 (extended_remote_create_inferior): : Refactor as method of
5531 extended_remote_target.
5532 (remote_set_permissions, remote_open_1, remote_detach)
5533 (remote_follow_fork, remote_follow_exec, remote_disconnect)
5534 (remote_resume, remote_commit_resume, remote_stop)
5535 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
5536 (remote_terminal_ours, remote_wait, remote_fetch_registers)
5537 (remote_prepare_to_store, remote_store_registers)
5538 (remote_flash_erase, remote_flash_done, remote_files_info)
5539 (remote_kill, remote_mourn, remote_insert_breakpoint)
5540 (remote_remove_breakpoint, remote_insert_watchpoint)
5541 (remote_watchpoint_addr_within_range)
5542 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
5543 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
5544 (remote_supports_stopped_by_sw_breakpoint)
5545 (remote_stopped_by_hw_breakpoint)
5546 (remote_supports_stopped_by_hw_breakpoint)
5547 (remote_stopped_by_watchpoint, remote_stopped_data_address)
5548 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
5549 (remote_verify_memory): Refactor as methods of remote_target.
5550 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
5551 parameter.
5552 (remote_xfer_partial, remote_get_memory_xfer_limit)
5553 (remote_search_memory, remote_rcmd, remote_memory_map)
5554 (remote_pid_to_str, remote_get_thread_local_address)
5555 (remote_get_tib_address, remote_read_description): Refactor as
5556 methods of remote_target.
5557 (remote_target::fileio_open, remote_target::fileio_pwrite)
5558 (remote_target::fileio_pread, remote_target::fileio_close): New.
5559 (remote_hostio_readlink, remote_hostio_fstat)
5560 (remote_filesystem_is_local, remote_can_execute_reverse)
5561 (remote_supports_non_stop, remote_supports_disable_randomization)
5562 (remote_supports_multi_process, remote_supports_cond_breakpoints)
5563 (remote_supports_enable_disable_tracepoint)
5564 (remote_supports_string_tracing)
5565 (remote_can_run_breakpoint_commands, remote_trace_init)
5566 (remote_download_tracepoint, remote_can_download_tracepoint)
5567 (remote_download_trace_state_variable, remote_enable_tracepoint)
5568 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
5569 (remote_trace_start, remote_get_trace_status)
5570 (remote_get_tracepoint_status, remote_trace_stop)
5571 (remote_trace_find, remote_get_trace_state_variable_value)
5572 (remote_save_trace_data, remote_get_raw_trace_data)
5573 (remote_set_disconnected_tracing, remote_core_of_thread)
5574 (remote_set_circular_trace_buffer, remote_traceframe_info)
5575 (remote_get_min_fast_tracepoint_insn_len)
5576 (remote_set_trace_buffer_size, remote_set_trace_notes)
5577 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
5578 (remote_disable_btrace, remote_teardown_btrace)
5579 (remote_read_btrace, remote_btrace_conf)
5580 (remote_augmented_libraries_svr4_read, remote_load)
5581 (remote_pid_to_exec_file, remote_can_do_single_step)
5582 (remote_execution_direction, remote_thread_handle_to_thread_info):
5583 Refactor as methods of remote_target.
5584 (init_remote_ops, init_extended_remote_ops): Delete.
5585 (remote_can_async_p, remote_is_async_p, remote_async)
5586 (remote_thread_events, remote_upload_tracepoints)
5587 (remote_upload_trace_state_variables): Refactor as methods of
5588 remote_target.
5589 (_initialize_remote): Remove references to init_remote_ops and
5590 init_extended_remote_ops.
5591
5592 * remote-sim.c (gdbsim_target): New class.
5593 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
5594 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
5595 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
5596 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
5597 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
5598 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
5599 Refactor as methods of gdbsim_target.
5600 (gdbsim_ops): Now a gdbsim_target.
5601 (init_gdbsim_ops): Delete.
5602 (gdbsim_cntrl_c): Adjust.
5603 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
5604
5605 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
5606 (the_amd64_linux_nat_target): New.
5607 (amd64_linux_fetch_inferior_registers)
5608 (amd64_linux_store_inferior_registers): Refactor as methods of
5609 amd64_linux_nat_target.
5610 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
5611 * i386-linux-nat.c: Don't include "linux-nat.h".
5612 (i386_linux_nat_target): New class.
5613 (the_i386_linux_nat_target): New.
5614 (i386_linux_fetch_inferior_registers)
5615 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
5616 as methods of i386_linux_nat_target.
5617 (_initialize_i386_linux_nat): Adjust. Set linux_target.
5618 * inf-child.c (inf_child_ops): Delete.
5619 (inf_child_fetch_inferior_registers)
5620 (inf_child_store_inferior_registers): Delete.
5621 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
5622 methods of inf_child_target.
5623 (inf_child_target::supports_terminal_ours)
5624 (inf_child_target::terminal_init)
5625 (inf_child_target::terminal_inferior)
5626 (inf_child_target::terminal_ours_for_output)
5627 (inf_child_target::terminal_ours, inf_child_target::interrupt)
5628 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
5629 New.
5630 (inf_child_open, inf_child_disconnect, inf_child_close)
5631 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
5632 (inf_child_post_startup_inferior, inf_child_can_run)
5633 (inf_child_pid_to_exec_file): Refactor as methods of
5634 inf_child_target.
5635 (inf_child_follow_fork): Delete.
5636 (inf_child_target::can_create_inferior)
5637 (inf_child_target::can_attach): New.
5638 (inf_child_target::has_all_memory, inf_child_target::has_memory)
5639 (inf_child_target::has_stack, inf_child_target::has_registers)
5640 (inf_child_target::has_execution): New.
5641 (inf_child_fileio_open, inf_child_fileio_pwrite)
5642 (inf_child_fileio_pread, inf_child_fileio_fstat)
5643 (inf_child_fileio_close, inf_child_fileio_unlink)
5644 (inf_child_fileio_readlink, inf_child_use_agent)
5645 (inf_child_can_use_agent): Refactor as methods of
5646 inf_child_target.
5647 (return_zero, inf_child_target): Delete.
5648 (inf_child_target::inf_child_target): New.
5649 * inf-child.h: Include "target.h".
5650 (inf_child_target): Delete function prototype.
5651 (inf_child_target): New class.
5652 (inf_child_open_target, inf_child_mourn_inferior)
5653 (inf_child_maybe_unpush_target): Delete.
5654 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
5655 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
5656 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
5657 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
5658 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
5659 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
5660 (inf_ptrace_wait, inf_ptrace_xfer_partial)
5661 (inf_ptrace_thread_alive, inf_ptrace_files_info)
5662 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
5663 methods of inf_ptrace_target.
5664 (inf_ptrace_target): Delete function.
5665 * inf-ptrace.h: Include "inf-child.h".
5666 (inf_ptrace_target): Delete function declaration.
5667 (inf_ptrace_target): New class.
5668 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
5669 * linux-nat.c (linux_target): New.
5670 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
5671 (linux_nat_target::~linux_nat_target): New.
5672 (linux_child_post_attach, linux_child_post_startup_inferior)
5673 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
5674 (linux_child_remove_fork_catchpoint)
5675 (linux_child_insert_vfork_catchpoint)
5676 (linux_child_remove_vfork_catchpoint)
5677 (linux_child_insert_exec_catchpoint)
5678 (linux_child_remove_exec_catchpoint)
5679 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
5680 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
5681 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
5682 (linux_nat_stopped_data_address)
5683 (linux_nat_stopped_by_sw_breakpoint)
5684 (linux_nat_supports_stopped_by_sw_breakpoint)
5685 (linux_nat_stopped_by_hw_breakpoint)
5686 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
5687 (linux_nat_kill, linux_nat_mourn_inferior)
5688 (linux_nat_xfer_partial, linux_nat_thread_alive)
5689 (linux_nat_update_thread_list, linux_nat_pid_to_str)
5690 (linux_nat_thread_name, linux_child_pid_to_exec_file)
5691 (linux_child_static_tracepoint_markers_by_strid)
5692 (linux_nat_is_async_p, linux_nat_can_async_p)
5693 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
5694 (linux_nat_supports_multi_process)
5695 (linux_nat_supports_disable_randomization, linux_nat_async)
5696 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
5697 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
5698 (linux_nat_fileio_open, linux_nat_fileio_readlink)
5699 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
5700 methods of linux_nat_target.
5701 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
5702 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
5703 parameter.
5704 (check_stopped_by_watchpoint): Adjust.
5705 (linux_xfer_partial): Delete.
5706 (linux_target_install_ops, linux_target, linux_nat_add_target):
5707 Delete.
5708 (linux_nat_target::linux_nat_target): New.
5709 * linux-nat.h: Include "inf-ptrace.h".
5710 (linux_nat_target): New.
5711 (linux_target, linux_target_install_ops, linux_nat_add_target):
5712 Delete function declarations.
5713 (linux_target): Declare global.
5714 * linux-thread-db.c (thread_db_target): New.
5715 (thread_db_target::thread_db_target): New.
5716 (thread_db_ops): Delete.
5717 (the_thread_db_target): New.
5718 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
5719 (thread_db_update_thread_list, thread_db_pid_to_str)
5720 (thread_db_extra_thread_info)
5721 (thread_db_thread_handle_to_thread_info)
5722 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
5723 (thread_db_resume): Refactor as methods of thread_db_target.
5724 (init_thread_db_ops): Delete.
5725 (_initialize_thread_db): Remove reference to init_thread_db_ops.
5726 * x86-linux-nat.c: Don't include "linux-nat.h".
5727 (super_post_startup_inferior): Delete.
5728 (x86_linux_nat_target::~x86_linux_nat_target): New.
5729 (x86_linux_child_post_startup_inferior)
5730 (x86_linux_read_description, x86_linux_enable_btrace)
5731 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
5732 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
5733 methods of x86_linux_nat_target.
5734 (x86_linux_create_target): Delete. Bits folded ...
5735 (x86_linux_add_target): ... here. Now takes a linux_nat_target
5736 pointer.
5737 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
5738 (x86_linux_nat_target): New class.
5739 (x86_linux_create_target): Delete.
5740 (x86_linux_add_target): Now takes a linux_nat_target pointer.
5741 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
5742 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
5743 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
5744 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
5745 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
5746 make extern.
5747 (x86_use_watchpoints): Delete.
5748 * x86-nat.h: Include "breakpoint.h" and "target.h".
5749 (x86_use_watchpoints): Delete.
5750 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
5751 (x86_stopped_by_watchpoint, x86_stopped_data_address)
5752 (x86_insert_watchpoint, x86_remove_watchpoint)
5753 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
5754 (x86_stopped_by_hw_breakpoint): New declarations.
5755 (x86_nat_target): New template class.
5756
5757 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
5758 (the_ppc_linux_nat_target): New.
5759 (ppc_linux_fetch_inferior_registers)
5760 (ppc_linux_can_use_hw_breakpoint)
5761 (ppc_linux_region_ok_for_hw_watchpoint)
5762 (ppc_linux_ranged_break_num_registers)
5763 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
5764 (ppc_linux_insert_mask_watchpoint)
5765 (ppc_linux_remove_mask_watchpoint)
5766 (ppc_linux_can_accel_watchpoint_condition)
5767 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
5768 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
5769 (ppc_linux_watchpoint_addr_within_range)
5770 (ppc_linux_masked_watch_num_registers)
5771 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
5772 (ppc_linux_read_description): Refactor as methods of
5773 ppc_linux_nat_target.
5774 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
5775
5776 * procfs.c (procfs_xfer_partial): Delete forward declaration.
5777 (procfs_target): New class.
5778 (the_procfs_target): New.
5779 (procfs_target): Delete function.
5780 (procfs_auxv_parse, procfs_attach, procfs_detach)
5781 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
5782 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
5783 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
5784 (procfs_create_inferior, procfs_update_thread_list)
5785 (procfs_thread_alive, procfs_pid_to_str)
5786 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
5787 (procfs_stopped_data_address, procfs_insert_watchpoint)
5788 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
5789 (proc_find_memory_regions, procfs_info_proc)
5790 (procfs_make_note_section): Refactor as methods of procfs_target.
5791 (_initialize_procfs): Adjust.
5792 * sol-thread.c (sol_thread_target): New class.
5793 (sol_thread_ops): Now a sol_thread_target.
5794 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
5795 (sol_thread_fetch_registers, sol_thread_store_registers)
5796 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
5797 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
5798 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
5799 (init_sol_thread_ops): Delete.
5800 (_initialize_sol_thread): Adjust. Remove references to
5801 init_sol_thread_ops and complete_target_initialization.
5802
5803 * windows-nat.c (windows_nat_target): New class.
5804 (windows_fetch_inferior_registers)
5805 (windows_store_inferior_registers, windows_resume, windows_wait)
5806 (windows_attach, windows_detach, windows_pid_to_exec_file)
5807 (windows_files_info, windows_create_inferior)
5808 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
5809 (windows_close, windows_pid_to_str, windows_xfer_partial)
5810 (windows_get_tib_address, windows_get_ada_task_ptid)
5811 (windows_thread_name, windows_thread_alive): Refactor as
5812 windows_nat_target methods.
5813 (do_initial_windows_stuff): Adjust.
5814 (windows_target): Delete function.
5815 (_initialize_windows_nat): Adjust.
5816
5817 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
5818 (darwin_mourn_inferior, darwin_kill_inferior)
5819 (darwin_create_inferior, darwin_attach, darwin_detach)
5820 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
5821 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
5822 (darwin_supports_multi_process): Refactor as darwin_nat_target
5823 methods.
5824 (darwin_resume_to, darwin_files_info): Delete.
5825 (_initialize_darwin_inferior): Rename to ...
5826 (_initialize_darwin_nat): ... this. Adjust to C++ification.
5827 * darwin-nat.h: Include "inf-child.h".
5828 (darwin_nat_target): New class.
5829 (darwin_complete_target): Delete.
5830 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
5831 (darwin_target): New.
5832 (i386_darwin_fetch_inferior_registers)
5833 (i386_darwin_store_inferior_registers): Refactor as methods of
5834 darwin_nat_target.
5835 (darwin_complete_target): Delete, with ...
5836 (_initialize_i386_darwin_nat): ... bits factored out here.
5837
5838 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
5839 (the_alpha_linux_nat_target): New.
5840 (alpha_linux_register_u_offset): Refactor as
5841 alpha_linux_nat_target method.
5842 (_initialize_alpha_linux_nat): Adjust.
5843 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
5844 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
5845 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
5846 methods of linux_nat_trad_target.
5847 (linux_trad_target): Delete.
5848 * linux-nat-trad.h (linux_trad_target): Delete function.
5849 (linux_nat_trad_target): New class.
5850 * mips-linux-nat.c (mips_linux_nat_target): New class.
5851 (super_fetch_registers, super_store_registers, super_close):
5852 Delete.
5853 (the_mips_linux_nat_target): New.
5854 (mips64_linux_regsets_fetch_registers)
5855 (mips64_linux_regsets_store_registers)
5856 (mips64_linux_fetch_registers, mips64_linux_store_registers)
5857 (mips_linux_register_u_offset, mips_linux_read_description)
5858 (mips_linux_can_use_hw_breakpoint)
5859 (mips_linux_stopped_by_watchpoint)
5860 (mips_linux_stopped_data_address)
5861 (mips_linux_region_ok_for_hw_watchpoint)
5862 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
5863 (mips_linux_close): Refactor as methods of mips_linux_nat.
5864 (_initialize_mips_linux_nat): Adjust to C++ification.
5865
5866 * aix-thread.c (aix_thread_target): New class.
5867 (aix_thread_ops): Now an aix_thread_target.
5868 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
5869 (aix_thread_fetch_registers, aix_thread_store_registers)
5870 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
5871 (aix_thread_thread_alive, aix_thread_pid_to_str)
5872 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
5873 Refactor as methods of aix_thread_target.
5874 (init_aix_thread_ops): Delete.
5875 (_initialize_aix_thread): Remove references to init_aix_thread_ops
5876 and complete_target_initialization.
5877 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
5878 (rs6000_nat_target): New class.
5879 (the_rs6000_nat_target): New.
5880 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
5881 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
5882 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
5883 (super_create_inferior): Delete.
5884 (_initialize_rs6000_nat): Adjust to C++ification.
5885
5886 * arm-linux-nat.c (arm_linux_nat_target): New class.
5887 (the_arm_linux_nat_target): New.
5888 (arm_linux_fetch_inferior_registers)
5889 (arm_linux_store_inferior_registers, arm_linux_read_description)
5890 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
5891 (arm_linux_remove_hw_breakpoint)
5892 (arm_linux_region_ok_for_hw_watchpoint)
5893 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
5894 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
5895 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
5896 arm_linux_nat_target.
5897 (_initialize_arm_linux_nat): Adjust to C++ification.
5898
5899 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
5900 (the_aarch64_linux_nat_target): New.
5901 (aarch64_linux_fetch_inferior_registers)
5902 (aarch64_linux_store_inferior_registers)
5903 (aarch64_linux_child_post_startup_inferior)
5904 (aarch64_linux_read_description)
5905 (aarch64_linux_can_use_hw_breakpoint)
5906 (aarch64_linux_insert_hw_breakpoint)
5907 (aarch64_linux_remove_hw_breakpoint)
5908 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
5909 (aarch64_linux_region_ok_for_hw_watchpoint)
5910 (aarch64_linux_stopped_data_address)
5911 (aarch64_linux_stopped_by_watchpoint)
5912 (aarch64_linux_watchpoint_addr_within_range)
5913 (aarch64_linux_can_do_single_step): Refactor as methods of
5914 aarch64_linux_nat_target.
5915 (super_post_startup_inferior): Delete.
5916 (_initialize_aarch64_linux_nat): Adjust to C++ification.
5917
5918 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
5919 (the_hppa_linux_nat_target): New.
5920 (hppa_linux_fetch_inferior_registers)
5921 (hppa_linux_store_inferior_registers): Refactor as methods of
5922 hppa_linux_nat_target.
5923 (_initialize_hppa_linux_nat): Adjust to C++ification.
5924
5925 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
5926 (the_ia64_linux_nat_target): New.
5927 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
5928 (ia64_linux_stopped_data_address)
5929 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
5930 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
5931 ia64_linux_nat_target methods.
5932 (super_xfer_partial): Delete.
5933 (_initialize_ia64_linux_nat): Adjust to C++ification.
5934
5935 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
5936 (the_m32r_linux_nat_target): New.
5937 (m32r_linux_fetch_inferior_registers)
5938 (m32r_linux_store_inferior_registers): Refactor as
5939 m32r_linux_nat_target methods.
5940 (_initialize_m32r_linux_nat): Adjust to C++ification.
5941
5942 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
5943 (the_m68k_linux_nat_target): New.
5944 (m68k_linux_fetch_inferior_registers)
5945 (m68k_linux_store_inferior_registers): Refactor as
5946 m68k_linux_nat_target methods.
5947 (_initialize_m68k_linux_nat): Adjust to C++ification.
5948
5949 * s390-linux-nat.c (s390_linux_nat_target): New class.
5950 (the_s390_linux_nat_target): New.
5951 (s390_linux_fetch_inferior_registers)
5952 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
5953 (s390_insert_watchpoint, s390_remove_watchpoint)
5954 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
5955 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
5956 (s390_auxv_parse, s390_read_description): Refactor as methods of
5957 s390_linux_nat_target.
5958 (_initialize_s390_nat): Adjust to C++ification.
5959
5960 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
5961 (the_sparc_linux_nat_target): New.
5962 (_initialize_sparc_linux_nat): Adjust to C++ification.
5963 * sparc-nat.c (sparc_fetch_inferior_registers)
5964 (sparc_store_inferior_registers): Remove target_ops parameter.
5965 * sparc-nat.h (sparc_fetch_inferior_registers)
5966 (sparc_store_inferior_registers): Remove target_ops parameter.
5967 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
5968 (the_sparc64_linux_nat_target): New.
5969 (_initialize_sparc64_linux_nat): Adjust to C++ification.
5970
5971 * spu-linux-nat.c (spu_linux_nat_target): New class.
5972 (the_spu_linux_nat_target): New.
5973 (spu_child_post_startup_inferior, spu_child_post_attach)
5974 (spu_child_wait, spu_fetch_inferior_registers)
5975 (spu_store_inferior_registers, spu_xfer_partial)
5976 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
5977 methods.
5978 (_initialize_spu_nat): Adjust to C++ification.
5979
5980 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
5981 (the_tilegx_linux_nat_target): New.
5982 (fetch_inferior_registers, store_inferior_registers):
5983 Refactor as methods.
5984 (_initialize_tile_linux_nat): Adjust to C++ification.
5985
5986 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
5987 (the_xtensa_linux_nat_target): New.
5988 (xtensa_linux_fetch_inferior_registers)
5989 (xtensa_linux_store_inferior_registers): Refactor as
5990 xtensa_linux_nat_target methods.
5991 (_initialize_xtensa_linux_nat): Adjust to C++ification.
5992
5993 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
5994 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
5995 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
5996 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
5997 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
5998 (fbsd_stopped_by_sw_breakpoint)
5999 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
6000 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
6001 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
6002 (fbsd_post_startup_inferior, fbsd_post_attach)
6003 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
6004 (fbsd_set_syscall_catchpoint)
6005 (super_xfer_partial, super_resume, super_wait)
6006 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
6007 (fbsd_handle_debug_trap): Remove target_ops parameter.
6008 (fbsd_nat_add_target): Delete.
6009 * fbsd-nat.h: Include "inf-ptrace.h".
6010 (fbsd_nat_add_target): Delete.
6011 (USE_SIGTRAP_SIGINFO): Define.
6012 (fbsd_nat_target): New class.
6013
6014 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
6015 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
6016 (amd64bsd_target): Delete.
6017 * amd64-bsd-nat.h: New file.
6018 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
6019 "x86-bsd-nat.h".
6020 (amd64_fbsd_nat_target): New class.
6021 (the_amd64_fbsd_nat_target): New.
6022 (amd64fbsd_read_description): Refactor as method of
6023 amd64_fbsd_nat_target.
6024 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6025 (_initialize_amd64fbsd_nat): Adjust to C++ification.
6026 * amd64-nat.h (amd64bsd_target): Delete function declaration.
6027 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
6028 (i386bsd_store_inferior_registers): Remove target_ops parameter.
6029 (i386bsd_target): Delete.
6030 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
6031 (i386bsd_fetch_inferior_registers)
6032 (i386bsd_store_inferior_registers): Declare.
6033 (i386_bsd_nat_target): New class.
6034 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
6035 (the_i386_fbsd_nat_target): New.
6036 (i386fbsd_resume, i386fbsd_read_description): Refactor as
6037 i386_fbsd_nat_target methods.
6038 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6039 (_initialize_i386fbsd_nat): Adjust to C++ification.
6040 * x86-bsd-nat.c (super_mourn_inferior): Delete.
6041 (x86bsd_mourn_inferior, x86bsd_target): Delete.
6042 (_initialize_x86_bsd_nat): Adjust to C++ification.
6043 * x86-bsd-nat.h: Include "x86-nat.h".
6044 (x86bsd_target): Delete declaration.
6045 (x86bsd_nat_target): New class.
6046
6047 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
6048 (the_aarch64_fbsd_nat_target): New.
6049 (aarch64_fbsd_fetch_inferior_registers)
6050 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
6051 aarch64_fbsd_nat_target.
6052 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
6053 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
6054 (the_alpha_bsd_nat_target): New.
6055 (alphabsd_fetch_inferior_registers)
6056 (alphabsd_store_inferior_registers): Refactor as
6057 alpha_bsd_nat_target methods.
6058 (_initialize_alphabsd_nat): Refactor as methods of
6059 alpha_bsd_nat_target.
6060 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
6061 (the_amd64_nbsd_nat_target): New.
6062 (_initialize_amd64nbsd_nat): Adjust to C++ification.
6063 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
6064 (the_amd64_obsd_nat_target): New.
6065 (_initialize_amd64obsd_nat): Adjust to C++ification.
6066 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
6067 (the_arm_fbsd_nat_target): New.
6068 (arm_fbsd_fetch_inferior_registers)
6069 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
6070 (_initialize_arm_fbsd_nat): Refactor as methods of
6071 arm_fbsd_nat_target.
6072 (_initialize_arm_fbsd_nat): Adjust to C++ification.
6073 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
6074 (the_arm_netbsd_nat_target): New.
6075 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
6076 arm_netbsd_nat_target.
6077 (_initialize_arm_netbsd_nat): Adjust to C++ification.
6078 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
6079 (the_hppa_nbsd_nat_target): New.
6080 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
6081 hppa_nbsd_nat_target methods.
6082 (_initialize_hppanbsd_nat): Adjust to C++ification.
6083 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
6084 (the_hppa_obsd_nat_target): New.
6085 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
6086 methods of hppa_obsd_nat_target.
6087 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
6088 add_target.
6089 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
6090 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
6091 add_target.
6092 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
6093 (_initialize_i386obsd_nat): Use add_target.
6094 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
6095 (the_m68k_bsd_nat_target): New.
6096 (m68kbsd_fetch_inferior_registers)
6097 (m68kbsd_store_inferior_registers): Refactor as methods of
6098 m68k_bsd_nat_target.
6099 (_initialize_m68kbsd_nat): Adjust to C++ification.
6100 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
6101 (the_mips_fbsd_nat_target): New.
6102 (mips_fbsd_fetch_inferior_registers)
6103 (mips_fbsd_store_inferior_registers): Refactor as methods of
6104 mips_fbsd_nat_target.
6105 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
6106 add_target.
6107 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
6108 (the_mips_nbsd_nat_target): New.
6109 (mipsnbsd_fetch_inferior_registers)
6110 (mipsnbsd_store_inferior_registers): Refactor as methods of
6111 mips_nbsd_nat_target.
6112 (_initialize_mipsnbsd_nat): Adjust to C++ification.
6113 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
6114 (the_mips64_obsd_nat_target): New.
6115 (mips64obsd_fetch_inferior_registers)
6116 (mips64obsd_store_inferior_registers): Refactor as methods of
6117 mips64_obsd_nat_target.
6118 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
6119 add_target.
6120 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
6121 nbsd_nat_target.
6122 * nbsd-nat.h: Include "inf-ptrace.h".
6123 (nbsd_nat_target): New class.
6124 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
6125 (obsd_wait): Refactor as methods of obsd_nat_target.
6126 (obsd_add_target): Delete.
6127 * obsd-nat.h: Include "inf-ptrace.h".
6128 (obsd_nat_target): New class.
6129 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
6130 (the_ppc_fbsd_nat_target): New.
6131 (ppcfbsd_fetch_inferior_registers)
6132 (ppcfbsd_store_inferior_registers): Refactor as methods of
6133 ppc_fbsd_nat_target.
6134 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
6135 add_target.
6136 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
6137 (the_ppc_nbsd_nat_target): New.
6138 (ppcnbsd_fetch_inferior_registers)
6139 (ppcnbsd_store_inferior_registers): Refactor as methods of
6140 ppc_nbsd_nat_target.
6141 (_initialize_ppcnbsd_nat): Adjust to C++ification.
6142 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
6143 (the_ppc_obsd_nat_target): New.
6144 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
6145 methods of ppc_obsd_nat_target.
6146 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
6147 add_target.
6148 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
6149 (the_sh_nbsd_nat_target): New.
6150 (shnbsd_fetch_inferior_registers)
6151 (shnbsd_store_inferior_registers): Refactor as methods of
6152 sh_nbsd_nat_target.
6153 (_initialize_shnbsd_nat): Adjust to C++ification.
6154 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
6155 (inf_ptrace_xfer_partial): Delete.
6156 (sparc_xfer_partial, sparc_target): Delete.
6157 * sparc-nat.h (sparc_fetch_inferior_registers)
6158 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
6159 (sparc_target): Delete function declaration.
6160 (sparc_target): New template class.
6161 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
6162 (_initialize_sparcnbsd_nat): Adjust to C++ification.
6163 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
6164 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
6165 add_target.
6166 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
6167 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
6168 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
6169 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
6170 add_target.
6171 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
6172 (the_vax_bsd_nat_target): New.
6173 (vaxbsd_fetch_inferior_registers)
6174 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
6175 methods.
6176 (_initialize_vaxbsd_nat): Adjust to C++ification.
6177
6178 * bsd-kvm.c (bsd_kvm_target): New class.
6179 (bsd_kvm_ops): Now a bsd_kvm_target.
6180 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
6181 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
6182 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
6183 bsd_kvm_target.
6184 (bsd_kvm_return_one): Delete.
6185 (bsd_kvm_add_target): Adjust to C++ification.
6186
6187 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
6188 (nto_procfs_target_procfs): New classes.
6189 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
6190 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
6191 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
6192 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
6193 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
6194 (procfs_remove_hw_breakpoint, procfs_resume)
6195 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
6196 (procfs_kill_inferior, procfs_store_registers)
6197 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
6198 as methods of nto_procfs_target.
6199 (nto_procfs_ops): Now an nto_procfs_target_procfs.
6200 (nto_native_ops): Delete.
6201 (procfs_open, procfs_native_open): Delete.
6202 (nto_native_ops): Now an nto_procfs_target_native.
6203 (init_procfs_targets): Adjust to C++ification.
6204 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
6205 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
6206 Refactor as methods of nto_procfs_target.
6207
6208 * go32-nat.c (go32_nat_target): New class.
6209 (the_go32_nat_target): New.
6210 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
6211 (go32_store_registers, go32_xfer_partial, go32_files_info)
6212 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
6213 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
6214 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
6215 (go32_pid_to_str): Refactor as methods of go32_nat_target.
6216 (go32_target): Delete.
6217 (_initialize_go32_nat): Adjust to C++ification.
6218
6219 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
6220 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
6221 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
6222 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
6223 gnu_nat_target.
6224 (gnu_target): Delete.
6225 * gnu-nat.h (gnu_target): Delete.
6226 (gnu_nat_target): New class.
6227 * i386-gnu-nat.c (gnu_base_target): New.
6228 (i386_gnu_nat_target): New class.
6229 (the_i386_gnu_nat_target): New.
6230 (_initialize_i386gnu_nat): Adjust to C++ification.
6231
3fffc070
PA
62322018-05-02 Pedro Alves <palves@redhat.com>
6233
6234 * bfd-target.c (target_bfd_xclose): Rename to ...
6235 (target_bfd_close): ... this.
6236 (target_bfd_reopen): Adjust.
6237 * target.c (target_close): Remove references to to_xclose.
6238 * target.h (target_ops::to_xclose): Delete.
6239 (target_ops::to_close): Update comments.
6240
6798487f
PA
62412018-05-02 Pedro Alves <palves@redhat.com>
6242
6243 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
6244 "linux-nat.h".
6245 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
6246 * inf-ptrace.c (inf_ptrace_register_u_offset)
6247 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6248 (inf_ptrace_store_register, inf_ptrace_store_registers)
6249 (inf_ptrace_trad_target): Move to ...
6250 * linux-nat-trad.c: ... this new file.
6251 * linux-nat-trad.h: New file.
6252 * linux-nat.c (linux_target_install_ops): Make extern.
6253 (linux_trad_target): Delete.
6254 * linux-nat.h (linux_trad_target): Delete declaration.
6255 (linux_target_install_ops): Declare.
6256 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
6257 "linux-nat.h".
6258
c1955e17
PA
62592018-05-02 Pedro Alves <palves@redhat.com>
6260
6261 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6262 procfs_target/add_target here.
6263 * procfs.c (procfs_target): Make static.
6264 (_initialize_procfs): Call add_target here.
6265 * procfs.h (struct target_ops): Remove forward declaration.
6266 (procfs_target): Remove declaration.
6267 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
6268
b5c8fcb1
PA
62692018-05-02 Pedro Alves <palves@redhat.com>
6270
6271 * procfs.c (procfs_stopped_by_watchpoint)
6272 (procfs_insert_watchpoint, procfs_remove_watchpoint)
6273 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
6274 Forward declare.
6275 (procfs_use_watchpoints): Delete, move contents...
6276 (procfs_target): ... here.
6277 * procfs.h (procfs_use_watchpoints): Delete declaration.
6278 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6279 procfs_use_watchpoints.
6280 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
6281 procfs_use_watchpoints.
6282
0489430a
TT
62832018-05-02 Tom Tromey <tom@tromey.com>
6284
6285 PR python/20084:
6286 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
6287 and var_zuinteger_unlimited.
6288 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
6289 and PARAM_ZUINTEGER_UNLIMITED.
6290 (set_parameter_value): Handle var_zuinteger and
6291 var_zuinteger_unlimited.
6292 (add_setshow_generic): Likewise.
6293 (parmpy_init): Likewise.
6294
1632f8ba
DR
62952018-04-28 Dan Robertson <danlrobertson89@gmail.com>
6296
6297 PR rust/23124
6298 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
6299 pointer is not null before dereferencing it.
6300
76761936
TT
63012018-04-30 Tom Tromey <tom@tromey.com>
6302
6303 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
6304 is_mi_like_p.
6305
2d33446d
TT
63062018-04-30 Tom Tromey <tom@tromey.com>
6307
6308 * breakpoint.c (mention): Remove use of is_mi_like_p.
6309 (print_mention_ranged_breakpoint): Likewise.
6310 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
6311 of is_mi_like_p.
6312
f3c6abab
TT
63132018-04-30 Tom Tromey <tom@tromey.com>
6314
6315 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
6316
40c03530
TT
63172018-04-30 Tom Tromey <tom@tromey.com>
6318
6319 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
6320 (info_spu_event_command): Remove some uses of is_mi_like_p.
6321
2038b7fd
TT
63222018-04-30 Tom Tromey <tom@tromey.com>
6323
6324 * python/py-framefilter.c (py_print_single_arg)
6325 (enumerate_locals, py_print_args, py_print_frame): Remove some
6326 uses of is_mi_like_p.
6327
4904c3c6
TT
63282018-04-30 Tom Tromey <tom@tromey.com>
6329
6330 * ui-out.c: Update.
6331 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
6332 * ui-out.h (ui_out::is_mi_like_p): Now const.
6333 (ui_out::do_is_mi_like_p): Now const.
6334 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
6335
7c66fffc
TT
63362018-04-30 Tom Tromey <tom@tromey.com>
6337
6338 * varobj.c (varobj_set_visualizer): Use new_reference.
6339 * python/python.c (gdbpy_decode_line): Use new_reference.
6340 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
6341 new_reference.
6342
bbfa6f00
TT
63432018-04-30 Tom Tromey <tom@tromey.com>
6344
6345 * varobj.c (install_new_value): Use new_reference.
6346 * value.h (value_incref): Return void. Swap intro comment with
6347 value_decref.
6348 * value.c (set_value_parent): Use new_reference.
6349 (value_incref): Return void. Update intro comment.
6350 (release_value): Use new_reference.
6351 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
6352
1831a9f9
TT
63532018-04-30 Tom Tromey <tom@tromey.com>
6354
6355 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
6356 * gdb_bfd.h (new_bfd_ref): Remove.
6357 (gdb_bfd_open): Update comment.
6358 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
6359 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
6360 (gdb_bfd_fdopenr): Use new_reference.
6361 * exec.c (exec_file_attach): Use new_reference.
6362
7c1b5f3d
TT
63632018-04-30 Tom Tromey <tom@tromey.com>
6364
6365 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
6366 method.
6367
e11fb955
TT
63682018-04-30 Tom Tromey <tom@tromey.com>
6369
6370 * jit.c (jit_read_code_entry): Use type_align.
6371 * i386-tdep.c (i386_gdbarch_init): Don't call
6372 set_gdbarch_long_long_align_bit.
6373 * gdbarch.sh: Remove long_long_align_bit.
6374 * gdbarch.c, gdbarch.h: Rebuild.
6375 * arc-tdep.c (arc_type_align): New function.
6376 (arc_gdbarch_init): Use arc_type_align. Don't call
6377 set_gdbarch_long_long_align_bit.
6378
2fff16dd
TT
63792018-04-30 Tom Tromey <tom@tromey.com>
6380
6381 * rust-lang.c (rust_type_alignment): Remove.
6382 (rust_composite_type): Use type_align.
6383
6d7bb824
TT
63842018-04-30 Tom Tromey <tom@tromey.com>
6385
6386 * NEWS: Mention Type.align.
6387 * python/py-type.c (typy_get_alignof): New function.
6388 (type_object_getset): Add "alignof".
6389
007e1530
TT
63902018-04-30 Tom Tromey <tom@tromey.com>
6391
6392 PR exp/17095:
6393 * NEWS: Update.
6394 * std-operator.def (UNOP_ALIGNOF): New operator.
6395 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
6396 New.
6397 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
6398 * c-lang.c (c_op_print_tab): Add alignof.
6399 * c-exp.y (ALIGNOF): New token.
6400 (exp): Add "ALIGNOF" production.
6401 (ident_tokens): Add _Alignof and alignof.
6402
2b4424c3
TT
64032018-04-30 Tom Tromey <tom@tromey.com>
6404
6405 * i386-tdep.c (i386_type_align): New function.
6406 (i386_gdbarch_init): Update.
6407 * gdbarch.sh (type_align): New method.
6408 * gdbarch.c, gdbarch.h: Rebuild.
6409 * arch-utils.h (default_type_align): Declare.
6410 * arch-utils.c (default_type_align): New function.
6411 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
6412 (struct type) <align_log2>: New field.
6413 <instance_flags>: Now a bitfield.
6414 (TYPE_RAW_ALIGN): New macro.
6415 (type_align, type_raw_align, set_type_align): Declare.
6416 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
6417 functions.
6418 * dwarf2read.c (quirk_rust_enum): Set type alignment.
6419 (get_alignment, maybe_set_alignment): New functions.
6420 (read_structure_type, read_enumeration_type, read_array_type)
6421 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
6422 (read_subrange_type, read_base_type): Set type alignment.
6423
d33bc52e
SM
64242018-04-30 Simon Marchi <simon.marchi@ericsson.com>
6425
6426 * dwarf2read.c (read_index_from_section): Use bool.
6427
e28b63a9
FG
64282018-04-29 Fabian Groffen <grobian@gentoo.org>
6429
6430 PR gdb/22950
6431 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
6432 with #ifdef.
6433
cd8c76e4
JR
64342018-04-29 John Reiser <jreiser@BitWagon.com>
6435
6436 PR build/22873
6437 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
6438 last step, and do it atomically.
6439
476d250e
AO
64402018-04-27 Alexandre Oliva <aoliva@redhat.com>
6441
6442 * compile/compile-c-types.c (convert_int, convert_float):
6443 Update for C FE v1.
6444
6873858b
TT
64452018-04-27 Tom Tromey <tom@tromey.com>
6446
6447 PR rust/22545:
6448 * rust-lang.c (rust_inclusive_range_type_p): New function.
6449 (rust_range): Handle inclusive ranges.
6450 (rust_compute_range): Likewise.
6451 * rust-exp.y (struct rust_op) <inclusive>: New field.
6452 (DOTDOTEQ): New constant.
6453 (range_expr): Add "..=" productions.
6454 (operator_tokens): Add "..=" token.
6455 (ast_range): Add "inclusive" parameter.
6456 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
6457 ranges.
6458 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
6459 bounds values.
6460 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
6461 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
6462 Update comments.
6463 * expprint.c (print_subexp_standard): Handle new bounds values.
6464 (dump_subexp_body_standard): Likewise.
6465
632e107b
TT
64662018-04-27 Tom Tromey <tom@tromey.com>
6467
6468 * configure: Rebuild.
6469 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
6470 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
6471 "OVERRIDE".
6472 (class symbol_needs_eval_context): Likewise.
6473 * dwarf2read.c (mock_mapped_index::symbol_name_count)
6474 (mock_mapped_index::symbol_name_at): Use "override". Remove
6475 "virtual".
6476 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
6477 "override".
6478 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
6479 * aarch64-tdep.c (instruction_reader::read): Use "override".
6480 (instruction_reader_test::read): Likewise.
6481 * arm-tdep.c (instruction_reader::read): Use "override".
6482 (instruction_reader_thumb::read): Likewise.
6483
b75abf5b
AK
64842018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
6485
6486 PR remote/9665
6487 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
6488 instead of remote_send.
6489 (remote_send): Remove.
6490
79188d8d
PA
64912018-04-26 Pedro Alves <palves@redhat.com>
6492
6493 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
6494 find_function_start_sal instead of find_pc_line.
6495
f50776aa
PA
64962018-04-26 Pedro Alves <palves@redhat.com>
6497
6498 * breakpoint.c (set_breakpoint_location_function): Handle
6499 mst_data_gnu_ifunc.
6500 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
6501 * elfread.c (elf_symtab_read): Give data symbols with
6502 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
6503 (elf_rel_plt_read): Update comment.
6504 * linespec.c (convert_linespec_to_sals): Handle
6505 mst_data_gnu_ifunc.
6506 (minsym_found): Handle mst_data_gnu_ifunc.
6507 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
6508 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
6509 * parse.c (find_minsym_type_and_address): Handle
6510 mst_data_gnu_ifunc.
6511 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
6512 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
6513 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
6514 comment.
6515 <mst_data_gnu_ifunc>: New enumerator.
6516
20944a6e
PA
65172018-04-26 Pedro Alves <palves@redhat.com>
6518
6519 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
6520 (lookup_minimal_symbol_by_pc_section): ... this. Replace
6521 'want_trampoline' parameter by a lookup_msym_prefer parameter.
6522 Handle it.
6523 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
6524 (lookup_minimal_symbol_by_pc): Adjust.
6525 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
6526 (lookup_solib_trampoline_symbol_by_pc): Adjust.
6527 * minsyms.h (lookup_msym_prefer): New enum.
6528 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
6529 parameter by a lookup_msym_prefer parameter.
6530
1adeb822
PA
65312018-04-26 Pedro Alves <palves@redhat.com>
6532
6533 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
6534 ends in "@plt" instead of looking at the symbol's section.
6535
a0aca7b0
PA
65362018-04-26 Pedro Alves <palves@redhat.com>
6537
6538 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
6539 all references.
6540 (find_pc_partial_function_gnu_ifunc): Rename to ...
6541 (find_pc_partial_function): ... this, and remove references to
6542 'is_gnu_ifunc_p'.
6543 (find_pc_partial_function): Delete old implementation.
6544 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
6545
76af0f26
PA
65462018-04-26 Pedro Alves <palves@redhat.com>
6547
6548 * linespec.c (struct bound_minimal_symbol_search_key): New.
6549 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
6550 skip first line if we found a GNU ifunc minimal symbol by name.
6551 (compare_msymbols): Change parameters to work with a destructured
6552 lhs minsym.
6553 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
6554 functions.
6555
3467ec66
PA
65562018-04-26 Pedro Alves <palves@redhat.com>
6557
6558 * breakpoint.c (set_breakpoint_location_function): Don't resolve
6559 ifunc targets here. Instead, if we have an ifunc minsym, use its
6560 address/name.
6561 (add_location_to_breakpoint): Store the minsym and the objfile in
6562 the breakpoint location.
6563 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
6564 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
6565 Record the minsym in the sal.
6566 * symtab.h (symtab_and_line) <msymbol>: New field.
6567
28f4fa4d
PA
65682018-04-26 Pedro Alves <palves@redhat.com>
6569
6570 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
6571 unless we actually resolved the ifunc.
6572
ca31ab1d
PA
65732018-04-26 Pedro Alves <palves@redhat.com>
6574
6575 * c-exp.y (variable production): Prefer ifunc minsyms over
6576 regular function symbols.
6577 * symtab.c (find_gnu_ifunc): New function.
6578 * minsyms.h (lookup_msym_prefer): New enum.
6579 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
6580 parameter by a lookup_msym_prefer parameter.
6581 * symtab.h (find_gnu_ifunc): New declaration.
6582
8388016d
PA
65832018-04-26 Pedro Alves <palves@redhat.com>
6584
6585 * blockframe.c (find_gnu_ifunc_target_type): New function.
6586 (find_function_type): New.
6587 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
6588 return a value with a memory address.
6589 (eval_call): For calls to GNU ifunc functions, try to find the
6590 type of the target function from the type that the resolver
6591 returns.
6592 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
6593 symbols.
6594 * infcall.c (find_function_return_type): Delete.
6595 (find_function_addr): Add 'function_type' parameter. For calls to
6596 GNU ifunc functions, try to find the type of the target function
6597 from the type that the resolver returns, and return it via
6598 FUNCTION_TYPE.
6599 (call_function_by_hand_dummy): Adjust to use the function type
6600 returned by find_function_addr.
6601 (find_function_addr): Add 'function_type' parameter and move
6602 description here.
6603 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
6604 declarations.
6605
a376e11d
PA
66062018-04-26 Pedro Alves <palves@redhat.com>
6607
6608 * c-exp.y (variable production): Skip finding an alias for ifunc
6609 symbols.
6610
02e169e2
PA
66112018-04-26 Pedro Alves <palves@redhat.com>
6612
6613 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
6614
249b5733
PA
66152018-04-25 Pedro Alves <palves@redhat.com>
6616
6617 * infcmd.c (kill_command): Print the pid as string, not the whole
6618 thread's ptid. Add comment. s/has been killed/killed/ in output
6619 message.
6620 * remote.c (remote_detach_1): Print the pid as string, not the
6621 whole thread's ptid.
6622
f67c0c91
SDJ
66232018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6624 Sergio Durigan Junior <sergiodj@redhat.com>
6625 Pedro Alves <palves@redhat.com>
6626
6627 * infcmd.c (kill_command): Print message when inferior has
6628 been killed.
6629 * inferior.c (print_inferior_events): Remove 'static'. Set as
6630 '1'.
6631 (add_inferior): Improve message printed when
6632 'print_inferior_events' is on.
6633 (exit_inferior): Remove message printed when
6634 'print_inferior_events' is on.
6635 (detach_inferior): Improve message printed when
6636 'print_inferior_events' is on.
6637 (initialize_inferiors): Use 'add_inferior_silent' to set
6638 'current_inferior_'.
6639 * inferior.h (print_inferior_events): Declare here as
6640 'extern'.
6641 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
6642 '[Detaching...]' messages when 'print_inferior_events' is on.
6643 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
6644 as prefix/suffix for messages. Remove periods. Fix erroneous
6645 'Detaching after fork from child...', replace it by '... from
6646 parent...'.
6647 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
6648 prefix/suffix when printing 'Detaching...' messages. Print
6649 them when 'print_inferior_events' is on.
6650 * remote.c (remote_detach_1): Print message when detaching
6651 from inferior and '!is_fork_parent'.
6652
e427af18
TT
66532018-04-24 Tom Tromey <tom@tromey.com>
6654
6655 * cli-out.h: Reindent.
6656
05b1d8d6
TT
66572018-04-24 Tom Tromey <tom@tromey.com>
6658
6659 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
6660 (cli_ui_out::do_field_string): Use fputs_filtered.
6661 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
6662
a95c7dab
TT
66632018-04-23 Tom Tromey <tom@tromey.com>
6664
6665 * guile/scm-frame.c (gdbscm_frame_read_var): Use
6666 gdb::unique_xmalloc_ptr.
6667
458412c3
TT
66682018-04-23 Tom Tromey <tom@tromey.com>
6669
6670 * configure: Rebuild.
6671
db86b02b
RS
66722018-04-22 Rajendra SY <rajendra.sy@gmail.com>
6673
6674 PR gdb/23095
6675 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
6676 prepare_for_testing. Set normal_bp to r_debug_state if target
6677 is bsd.
6678
00aecdcf
PA
66792018-04-21 Pedro Alves <palves@redhat.com>
6680 Rajendra SY <rajendra.sy@gmail.com>
6681
6682 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
6683 * remote.c (extended_remote_attach): In all-stop mode, mark the
6684 thread as executing.
6685
224608c3
PW
66862018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6687
6688 * thread.c (thread_apply_all_command): Fix comment.
6689 (thread_command): Fix comment.
6690
3b74854b
AH
66912018-04-10 Alan Hayward <alan.hayward@arm.com>
6692
6693 * common/tdesc.h (tdesc_create_feature): Remove xml filename
6694 parameter.
6695 * features/aarch64-core.c (create_feature_aarch64_core):
6696 Regenerate.
6697 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
6698 Likewise.
6699 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
6700 Likewise.
6701 * features/i386/32bit-avx512.c
6702 (create_feature_i386_32bit_avx512): Likewise.
6703 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
6704 Likewise.
6705 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
6706 Likewise.
6707 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
6708 Likewise.
6709 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
6710 Likewise.
6711 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
6712 Likewise.
6713 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
6714 Likewise.
6715 * features/i386/64bit-avx512.c
6716 (create_feature_i386_64bit_avx512): Likewise.
6717 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
6718 Likewise.
6719 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
6720 Likewise.
6721 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
6722 Likewise.
6723 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
6724 Likewise.
6725 * features/i386/64bit-segments.c
6726 (create_feature_i386_64bit_segments): Likewise.
6727 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
6728 Likewise.
6729 * features/i386/x32-core.c
6730 (create_feature_i386_x32_core): Likewise.
6731 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
6732 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
6733 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
6734 * target-descriptions.c: In generated code, don't pass xml
6735 filename.
6736
e98577a9
AH
67372018-04-18 Alan Hayward <alan.hayward@arm.com>
6738
6739 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
6740 (print_xml_feature::visit_post): Likewise.
6741 (print_xml_feature::visit): Likewise.
6742 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
6743 (print_xml_feature): Add new class.
6744 * regformats/regdat.sh: Null xmltarget on feature targets.
6745 * target-descriptions.c (struct target_desc): Add xmltarget.
6746 (maintenance_check_tdesc_xml_convert): Add unittest function.
6747 (tdesc_get_features_xml): Add function to get xml.
6748 (maintenance_check_xml_descriptions): Test xml generation.
6749 * xml-tdesc.c (string_read_description_xml): Add function.
6750 * xml-tdesc.h (string_read_description_xml): Add declaration.
6751
ad7fc756
AH
67522018-04-18 Alan Hayward <alan.hayward@arm.com>
6753
6754 * features/Makefile: Add feature marker to targets with new style
6755 target descriptions.
6756 * regformats/aarch64.dat: Regenerate.
6757 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
6758 * regformats/i386/amd64-avx-linux.dat: Likewise.
6759 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
6760 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
6761 * regformats/i386/amd64-linux.dat: Likewise.
6762 * regformats/i386/amd64-mpx-linux.dat: Likewise.
6763 * regformats/i386/amd64.dat: Likewise.
6764 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
6765 * regformats/i386/i386-avx-linux.dat: Likewise.
6766 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
6767 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
6768 * regformats/i386/i386-linux.dat: Likewise.
6769 * regformats/i386/i386-mmx-linux.dat: Likewise.
6770 * regformats/i386/i386-mpx-linux.dat: Likewise.
6771 * regformats/i386/i386.dat: Likewise.
6772 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
6773 * regformats/i386/x32-avx-linux.dat: Likewise.
6774 * regformats/i386/x32-linux.dat: Likewise.
6775 * regformats/tic6x-c62x-linux.dat: Likewise.
6776 * regformats/tic6x-c64x-linux.dat: Likewise.
6777 * regformats/tic6x-c64xp-linux.dat: Likewise.
6778 * regformats/regdat.sh: Parse feature marker.
6779
d278f585
AH
67802018-04-18 Alan Hayward <alan.hayward@arm.com>
6781
6782 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
6783 (tdesc_osabi_name): Likewise.
6784 * target-descriptions.c (tdesc_architecture_name): Add new
6785 function.
6786 (tdesc_osabi_name): Likewise.
6787
eee8a18d
AH
67882018-04-18 Alan Hayward <alan.hayward@arm.com>
6789
6790 * common/tdesc.c (tdesc_predefined_type): Move to here.
6791 (tdesc_named_type): Likewise.
6792 (tdesc_create_vector): Likewise.
6793 (tdesc_create_struct): Likewise.
6794 (tdesc_set_struct_size): Likewise.
6795 (tdesc_create_union): Likewise.
6796 (tdesc_create_flags): Likewise.
6797 (tdesc_create_enum): Likewise.
6798 (tdesc_add_field): Likewise.
6799 (tdesc_add_typed_bitfield): Likewise.
6800 (tdesc_add_bitfield): Likewise.
6801 (tdesc_add_flag): Likewise.
6802 (tdesc_add_enum_value): Likewise.
6803 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
6804 (struct tdesc_type_vector): Likewise.
6805 (struct tdesc_type_field): Likewise.
6806 (struct tdesc_type_with_fields): Likewise.
6807 (tdesc_create_enum): Add declaration.
6808 (tdesc_add_typed_bitfield): Likewise.
6809 (tdesc_add_enum_value): Likewise.
6810 * target-descriptions.c (tdesc_type_field): Move from here.
6811 (tdesc_type_builtin): Likewise.
6812 (tdesc_type_vector): Likewise.
6813 (tdesc_type_with_fields): Likewise.
6814 (tdesc_predefined_types): Likewise.
6815 (tdesc_named_type): Likewise.
6816 (tdesc_create_vector): Likewise.
6817 (tdesc_create_struct): Likewise.
6818 (tdesc_set_struct_size): Likewise.
6819 (tdesc_create_union): Likewise.
6820 (tdesc_create_flags): Likewise.
6821 (tdesc_create_enum): Likewise.
6822 (tdesc_add_field): Likewise.
6823 (tdesc_add_typed_bitfield): Likewise.
6824 (tdesc_add_bitfield): Likewise.
6825 (tdesc_add_flag): Likewise.
6826 (tdesc_add_enum_value): Likewise.
6827 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
6828 (tdesc_add_typed_bitfield): Likewise.
6829 (tdesc_add_enum_value): Likewise.
6830
82ec9bc7
AH
68312018-04-18 Alan Hayward <alan.hayward@arm.com>
6832
6833 * common/tdesc.c (tdesc_feature::accept): Move to here.
6834 (tdesc_feature::operator==): Likewise.
6835 (tdesc_create_reg): Likewise.
6836 * common/tdesc.h (tdesc_type_kind): Likewise.
6837 (struct tdesc_type): Likewise.
6838 (struct tdesc_feature): Likewise.
6839 * regformats/regdat.sh: Create a feature.
6840 * target-descriptions.c (tdesc_type_kind): Move from here.
6841 (tdesc_type): Likewise.
6842 (tdesc_type_up): Likewise.
6843 (tdesc_feature): Likewise.
6844 (tdesc_create_reg): Likewise.
6845
ea3e7d71
AH
68462018-04-18 Alan Hayward <alan.hayward@arm.com>
6847
6848 * Makefile.in: Add arch/tdesc.c
6849 * common/tdesc.c: New file.
6850 * common/tdesc.h (tdesc_element_visitor): Move to here.
6851 (tdesc_element): Likewise.
6852 (tdesc_reg): Likewise.
6853 (tdesc_reg_up): Likewise.
6854 * regformats/regdef.h (reg): Add offset to constructors.
6855 * target-descriptions.c (tdesc_element_visitor): Move from here.
6856 (tdesc_element): Likewise.
6857 (tdesc_reg): Likewise.
6858 (tdesc_reg_up): Likewise.
6859
bedda9ac
TT
68602018-04-17 Tom Tromey <tom@tromey.com>
6861
6862 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
6863 discriminant field.
6864
a037790e
TT
68652018-04-17 Tom Tromey <tom@tromey.com>
6866
6867 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
6868
c7dcbf88
AA
68692018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
6870
6871 * symtab.c (print_symbol_info): Skip printing filename and line
6872 number when `last' is NULL.
6873 (symtab_symbol_info): Use empty string instead of NULL for first
6874 invocation of print_symbol_info.
6875 (rbreak_command): Pass NULL to `last' parameter of
6876 print_symbol_info.
6877
07d28c77
SM
68782018-04-16 Simon Marchi <simon.marchi@ericsson.com>
6879
6880 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
6881 instead of nullptr.
6882
8a3de5e1
PA
68832018-04-16 Pedro Alves <palves@redhat.com>
6884
6885 * MAINTAINERS (sh): Remove.
6886 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
6887 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
6888 (ALLDEPFILES): Remove sh64-tdep.c.
6889 * NEWS: Mentions that support for SH-5/SH64 is removed.
6890 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
6891 (sh*-*-openbsd*): Ditto.
6892 (sh64-*-elf*): Remove.
6893 (sh*): Remove.
6894 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
6895 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
6896 * sh-tdep.c: No longer include "sh64-tdep.h".
6897 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
6898 * sh64-tdep.c, sh64-tdep.h: Remove files.
6899
a2a79012
PA
69002018-04-16 Pedro Alves <palves@redhat.com>
6901
6902 * MAINTAINERS: Remove m88k.
6903 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
6904 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
6905 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
6906 * NEWS: Mention that support for m88k was removed.
6907 * configure.host (m88*-*-*): Remove support.
6908 * configure.nat (m88k-*-*): Remove support.
6909 * configure.tgt (m88*-*-openbsd*): Remove.
6910 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
6911
eda4efb1
SM
69122018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
6913
6914 * configure.tgt (x86_tobjs): New variable.
6915 (amd64_tobjs, i386_tobjs): Use it.
6916
b744723f
AA
69172018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6918
6919 * symtab.c (print_symbol_info): Precede the symbol definition by
6920 the line number when available.
6921 * NEWS: Advertise this enhancement.
6922
4a4495d6
MM
69232018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6924
6925 * NEWS (New options): announce set/show record btrace cpu.
6926 * btrace.c: Include record-btrace.h.
6927 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
6928 the vendor is unknown.
6929 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
6930 Maybe overwrite the btrace configuration's cpu.
6931 (btrace_compute_ftrace): Add cpu parameter. Update callers.
6932 (btrace_fetch): Add cpu parameter. Update callers.
6933 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
6934 Maybe overwrite the btrace configuration's cpu. Skip enabling
6935 errata workarounds if the vendor is unknown.
6936 * python/py-record-btrace.c: Include record-btrace.h.
6937 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
6938 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
6939 * record-btrace.c (record_btrace_cpu_state_kind): New.
6940 (record_btrace_cpu): New.
6941 (set_record_btrace_cpu_cmdlist): New.
6942 (record_btrace_get_cpu): New.
6943 (require_btrace_thread, record_btrace_info)
6944 (record_btrace_resume_thread): Call record_btrace_get_cpu.
6945 (cmd_set_record_btrace_cpu_none): New.
6946 (cmd_set_record_btrace_cpu_auto): New.
6947 (cmd_set_record_btrace_cpu): New.
6948 (cmd_show_record_btrace_cpu): New.
6949 (_initialize_record_btrace): Initialize set/show record btrace cpu
6950 commands.
6951 * record-btrace.h (record_btrace_get_cpu): New.
6952
69f90c75
MM
69532018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6954
6955 * record.c (set_record_command): Fix typo in message.
6956
b85310e1
MM
69572018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6958
6959 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
6960
1d509aa6
MM
69612018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6962
6963 * infrun.c (process_event_stop_test): Call
6964 gdbarch_in_indirect_branch_thunk.
6965 * gdbarch.sh (in_indirect_branch_thunk): New.
6966 * gdbarch.c: Regenerated.
6967 * gdbarch.h: Regenerated.
6968 * x86-tdep.h: New.
6969 * x86-tdep.c: New.
6970 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
6971 (HFILES_NO_SRCDIR): Add x86-tdep.h.
6972 (ALLDEPFILES): Add x86-tdep.c.
6973 * arch-utils.h (default_in_indirect_branch_thunk): New.
6974 * arch-utils.c (default_in_indirect_branch_thunk): New.
6975 * i386-tdep: Include x86-tdep.h.
6976 (i386_in_indirect_branch_thunk): New.
6977 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
6978 function.
6979 * amd64-tdep: Include x86-tdep.h.
6980 (amd64_in_indirect_branch_thunk): New.
6981 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
6982
b4be9bfd
JK
69832018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
6984
6985 PR gdb/23053
6986 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
6987 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
6988 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
6989 regression.
6990
53d7df28
TT
69912018-04-12 Tom Tromey <tom@tromey.com>
6992
6993 * rust-lang.c (rust_print_struct_def): Remove univariant code.
6994 (rust_evaluate_subexp): Likewise.
6995
70b33f19
PA
69962018-04-12 Pedro Alves <palves@redhat.com>
6997
6998 * procfs.c (procfs_detach): Make forward declaration's prototype
6999 match definition's protototype.
7000 (proc_get_LDT_entry): Remove stale do_cleanups call.
7001
436411b1
PA
70022018-04-12 Pedro Alves <palves@redhat.com>
7003
7004 * target.h (target_ops::to_has_exited): Delete.
7005 (target_has_exited): Delete.
7006 * target-delegates.c: Regenerate.
7007
20db9c52
PA
70082018-04-11 Pedro Alves <palves@redhat.com>
7009
7010 * target.c (fileio_fh_t::t): Add comment.
7011 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7012 (target_fileio_close): Handle a NULL target.
7013 (invalidate_fileio_fh): New.
7014 (target_close): Call it.
7015 * remote.c (remote_hostio_send_command): No longer check whether
7016 remote_desc is open.
7017
5ff79300
PA
70182018-04-11 Pedro Alves <palves@redhat.com>
7019
7020 * target.c (fileio_fh_t): Make it a named struct instead of a
7021 typedef.
7022 (fileio_fh_t::is_closed): New method.
7023 (DEF_VEC_O (fileio_fh_t)): Remove.
7024 (fileio_fhandles): Now a std::vector.
7025 (is_closed_fileio_fh): Delete.
7026 (acquire_fileio_fd): Adjust. Rename parameters.
7027 (release_fileio_fd): Adjust.
7028 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
7029 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7030 (target_fileio_close): Adjust.
7031
6e22e10d
SM
70322018-04-10 Simon Marchi <simon.marchi@ericsson.com>
7033
7034 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
7035 index.
7036
731f534f
PA
70372018-04-10 Pedro Alves <palves@redhat.com>
7038
7039 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
7040 (scoped_finish_thread_state): New class.
7041 * infcmd.c (run_command_1): Use it instead of finish_thread_state
7042 cleanup.
7043 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
7044 (fetch_inferior_event, normal_stop): Likewise.
7045 * thread.c (finish_thread_state_cleanup): Delete.
7046
d5f4488f
SM
70472018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7048 Pedro Alves <palves@redhat.com>
7049
7050 * value.c: Include "selftest.h" and "common/array-view.h".
7051 (struct range) <operator ==>: New.
7052 (test_ranges_contain): New.
7053 (check_ranges_vector): New.
7054 (test_insert_into_bit_range_vector): New.
7055 (_initialize_values): Register selftests.
7056 * common/array-view.h (operator==, operator!=): New.
7057
b24531ed
SM
70582018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7059
7060 * common/gdb_vecs.h (unordered_remove): Add overload that takes
7061 an iterator.
7062 * inline-frame.c: Include <algorithm>.
7063 (struct inline_state): Add constructor.
7064 (inline_state_s): Remove.
7065 (DEF_VEC_O(inline_state_s)): Remove.
7066 (inline_states): Change type to std::vector.
7067 (find_inline_frame_state): Adjust to std::vector.
7068 (allocate_inline_frame_state): Remove.
7069 (clear_inline_frame_state): Adjust to std::vector.
7070 (skip_inline_frames): Adjust to std::vector.
7071
c252925c
SM
70722018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7073
7074 * tracepoint.h (struct trace_state_variable): Add constructor.
7075 <name>: Change type to std::string.
7076 * tracepoint.c (tsv_s): Remove.
7077 (DEF_VEC_O(tsv_s)): Remove.
7078 (tvariables): Change to std::vector.
7079 (create_trace_state_variable): Adjust to std::vector.
7080 (find_trace_state_variable): Likewise.
7081 (find_trace_state_variable_by_number): Likewise.
7082 (delete_trace_state_variable): Likewise.
7083 (trace_variable_command): Adjust to std::string.
7084 (delete_trace_variable_command): Likewise.
7085 (tvariables_info_1): Adjust to std::vector.
7086 (save_trace_state_variables): Likewise.
7087 (start_tracing): Likewise.
7088 (merge_uploaded_trace_state_variables): Adjust to std::vector
7089 and std::string.
7090 * target.h (struct target_ops)
7091 <to_download_trace_state_variable>: Pass reference to
7092 trace_state_variable.
7093 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
7094 * target-delegates.c: Re-generate.
7095 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
7096 (mi_tsv_deleted): Likewise.
7097 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
7098 * remote.c (remote_download_trace_state_variable): Change
7099 pointer to reference and adjust.
7100 * make-target-delegates (parse_argtypes): Handle references.
7101 (write_function_header): Likewise.
7102 (munge_type): Likewise.
7103
c9638d26
SM
71042018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7105
7106 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7107 string_view-selftests.c.
7108 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
7109 testsuite.
7110 * unittests/basic_string_view/cons/char/1.cc: Likewise.
7111 * unittests/basic_string_view/cons/char/2.cc: Likewise.
7112 * unittests/basic_string_view/cons/char/3.cc: Likewise.
7113 * unittests/basic_string_view/element_access/char/1.cc:
7114 Likewise.
7115 * unittests/basic_string_view/element_access/char/empty.cc:
7116 Likewise.
7117 * unittests/basic_string_view/element_access/char/front_back.cc:
7118 Likewise.
7119 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
7120 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
7121 Likewise.
7122 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
7123 Likewise.
7124 * unittests/basic_string_view/modifiers/swap/char/1.cc:
7125 Likewise.
7126 * unittests/basic_string_view/operations/compare/char/1.cc:
7127 Likewise.
7128 * unittests/basic_string_view/operations/compare/char/13650.cc:
7129 Likewise.
7130 * unittests/basic_string_view/operations/copy/char/1.cc:
7131 Likewise.
7132 * unittests/basic_string_view/operations/data/char/1.cc:
7133 Likewise.
7134 * unittests/basic_string_view/operations/find/char/1.cc:
7135 Likewise.
7136 * unittests/basic_string_view/operations/find/char/2.cc:
7137 Likewise.
7138 * unittests/basic_string_view/operations/find/char/3.cc:
7139 Likewise.
7140 * unittests/basic_string_view/operations/find/char/4.cc:
7141 Likewise.
7142 * unittests/basic_string_view/operations/rfind/char/1.cc:
7143 Likewise.
7144 * unittests/basic_string_view/operations/rfind/char/2.cc:
7145 Likewise.
7146 * unittests/basic_string_view/operations/rfind/char/3.cc:
7147 Likewise.
7148 * unittests/basic_string_view/operations/substr/char/1.cc:
7149 Likewise.
7150 * unittests/basic_string_view/operators/char/2.cc: Likewise.
7151 * unittests/string_view-selftests.c: New file.
7152
fdc11678
SM
71532018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7154
7155 * unittests/basic_string_view/capacity/1.cc: New file.
7156 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
7157 * unittests/basic_string_view/cons/char/1.cc: New file.
7158 * unittests/basic_string_view/cons/char/2.cc: New file.
7159 * unittests/basic_string_view/cons/char/3.cc: New file.
7160 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
7161 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
7162 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
7163 * unittests/basic_string_view/element_access/char/1.cc: New file.
7164 * unittests/basic_string_view/element_access/char/2.cc: New file.
7165 * unittests/basic_string_view/element_access/char/empty.cc: New file.
7166 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
7167 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
7168 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
7169 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
7170 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
7171 * unittests/basic_string_view/include.cc: New file.
7172 * unittests/basic_string_view/inserters/char/1.cc: New file.
7173 * unittests/basic_string_view/inserters/char/2.cc: New file.
7174 * unittests/basic_string_view/inserters/char/3.cc: New file.
7175 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
7176 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
7177 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
7178 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
7179 * unittests/basic_string_view/literals/types.cc: New file.
7180 * unittests/basic_string_view/literals/values.cc: New file.
7181 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
7182 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
7183 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
7184 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
7185 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
7186 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
7187 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
7188 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
7189 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
7190 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
7191 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
7192 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
7193 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
7194 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
7195 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
7196 * unittests/basic_string_view/operations/data/char/1.cc: New file.
7197 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
7198 * unittests/basic_string_view/operations/find/char/1.cc: New file.
7199 * unittests/basic_string_view/operations/find/char/2.cc: New file.
7200 * unittests/basic_string_view/operations/find/char/3.cc: New file.
7201 * unittests/basic_string_view/operations/find/char/4.cc: New file.
7202 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
7203 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
7204 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
7205 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
7206 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
7207 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
7208 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
7209 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
7210 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
7211 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
7212 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
7213 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
7214 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
7215 * unittests/basic_string_view/operators/char/2.cc: New file.
7216 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
7217 * unittests/basic_string_view/range_access/char/1.cc: New file.
7218 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
7219 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
7220 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
7221 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
7222 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
7223 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
7224 * unittests/basic_string_view/requirements/typedefs.cc: New file.
7225 * unittests/basic_string_view/typedefs.cc: New file.
7226 * unittests/basic_string_view/types/1.cc: New file.
7227
8345c4a2
SM
72282018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7229
7230 * common/gdb_string_view.h: Remove libstdc++ implementation
7231 details, adjust to gdb reality.
7232 * common/gdb_string_view.tcc: Likewise.
7233 * cli/cli-script.c (struct string_view): Remove.
7234 (user_args) <m_args>: Change element type to gdb::string_view.
7235 (user_args::insert_args): Adjust.
7236
7adcdf08
SM
72372018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7238
7239 * common/gdb_string_view.h: New file.
7240 * common/gdb_string_view.tcc: New file.
7241
41260ac2
SM
72422018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7243
7244 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
7245 * configure: Re-generate.
7246
0bee6dd4
PA
72472018-04-09 Pedro Alves <palves@redhat.com>
7248
7249 * gdbarch.sh: Include "observable.h" instead of "observer.h".
7250 (set_target_gdbarch): Call
7251 gdb::observers::architecture_changed.notify instead of
7252 observer_notify_architecture_changed.
7253
6f14adc5
SM
72542018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7255
7256 * tracepoint.c (struct current_traceframe_cleanup): Remove.
7257 (do_restore_current_traceframe_cleanup): Remove.
7258 (restore_current_traceframe_cleanup_dtor): Remove.
7259 (make_cleanup_restore_current_traceframe): Remove.
7260 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
7261 New.
7262 * tracepoint.h (struct scoped_restore_current_traceframe): New.
7263 * infrun.c (fetch_inferior_event): Use
7264 scoped_restore_current_traceframe.
7265
b2bdb8cf
SM
72662018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7267
7268 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
7269 Remove.
7270 <n_allocated_type_units>: Remove.
7271 <all_type_units>: Change to std::vector.
7272 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7273 to std::vector change.
7274 (dwarf2_per_objfile::get_cutu): Likewise.
7275 (dwarf2_per_objfile::get_tu): Likewise.
7276 (create_signatured_type_table_from_index): Likewise.
7277 (create_signatured_type_table_from_debug_names): Likewise.
7278 (dw2_symtab_iter_next): Likewise.
7279 (dw2_print_stats): Likewise.
7280 (dw2_expand_all_symtabs): Likewise.
7281 (dw2_expand_marked_cus): Likewise.
7282 (dw2_debug_names_iterator::next): Likewise.
7283 (dwarf2_initialize_objfile): Likewise.
7284 (add_signatured_type_cu_to_table): Likewise.
7285 (create_all_type_units): Likewise.
7286 (add_type_unit): Likewise.
7287 (struct tu_abbrev_offset): Add constructor.
7288 (build_type_psymtabs_1): Adjust to std::vector change.
7289 (print_tu_stats): Likewise.
7290 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7291 (write_debug_names): Likewise.
7292
b76e467d
SM
72932018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7294
7295 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
7296 Make an std::vector.
7297 <n_comp_units>: Remove.
7298 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7299 to std::vector change.
7300 (dwarf2_per_objfile::get_cutu): Likewise.
7301 (dwarf2_per_objfile::get_cu): Likewise.
7302 (create_cus_from_index): Likewise.
7303 (create_addrmap_from_index): Likewise.
7304 (create_addrmap_from_aranges): Likewise.
7305 (dwarf2_read_index): Likewise.
7306 (dw2_find_last_source_symtab): Likewise.
7307 (dw2_map_symtabs_matching_filename): Likewise.
7308 (dw2_symtab_iter_next): Likewise.
7309 (dw2_print_stats): Likewise.
7310 (dw2_expand_all_symtabs): Likewise.
7311 (dw2_expand_symtabs_with_fullname): Likewise.
7312 (dw2_expand_marked_cus): Likewise.
7313 (dw2_map_symbol_filenames): Likewise.
7314 (create_cus_from_debug_names): Likewise.
7315 (dwarf2_read_debug_names): Likewise.
7316 (dw2_debug_names_iterator::next): Likewise.
7317 (dwarf2_initialize_objfile): Likewise.
7318 (set_partial_user): Likewise.
7319 (dwarf2_build_psymtabs_hard): Likewise.
7320 (read_comp_units_from_section): Remove arguments, adjust to
7321 std::vector change.
7322 (create_all_comp_units): Adjust to std::vector and
7323 read_comp_units_from_section changes.
7324 (dwarf2_find_containing_comp_unit): Adjust to std::vector
7325 change.
7326 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7327 (psyms_seen_size): Likewise.
7328 (write_gdbindex): Likewise.
7329 (write_debug_names): Likewise.
7330
12359b5e
SM
73312018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7332
7333 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
7334 with dwarf2_per_objfile.
7335 (create_cus_from_index): Likewise.
7336 (create_signatured_type_table_from_index): Likewise.
7337 (dwarf2_read_index): Likewise.
7338 (dwarf2_initialize_objfile): Likewise.
7339 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
7340 per_cu rather than get_dwarf2_per_objfile.
7341
ff4c9fec
SM
73422018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7343
7344 * dwarf2read.h (struct signatured_type): Forward declare.
7345 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
7346 New methods.
7347 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
7348 (dw2_get_cutu): ...this.
7349 (dwarf2_per_objfile::get_cu): Rename from...
7350 (dw2_get_cu): ...this.
7351 (dwarf2_per_objfile::get_tu): New.
7352 (create_addrmap_from_index): Adjust.
7353 (create_addrmap_from_aranges): Adjust.
7354 (dw2_find_last_source_symtab): Adjust.
7355 (dw2_map_symtabs_matching_filename): Adjust.
7356 (dw2_symtab_iter_next): Adjust.
7357 (dw2_print_stats): Adjust.
7358 (dw2_expand_all_symtabs): Adjust.
7359 (dw2_expand_symtabs_with_fullname): Adjust.
7360 (dw2_expand_marked_cus): Adjust.
7361 (dw_expand_symtabs_matching_file_matcher): Adjust.
7362 (dw2_map_symbol_filenames): Adjust.
7363 (dw2_debug_names_iterator::next): Adjust.
7364 (dwarf2_initialize_objfile): Adjust.
7365 (set_partial_user): Adjust.
7366 (dwarf2_build_psymtabs_hard): Adjust.
7367
5ca3fcb6
SM
73682018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7369
7370 * dwarf2read.c (create_signatured_type_table_from_debug_names):
7371 Remove unused variables.
7372 (dw2_map_symtabs_matching_filename): Likewise.
7373 (dwarf2_record_block_ranges): Likewise.
7374 (dwarf2_read_addr_index): Likewise.
7375 (follow_die_offset): Likewise.
7376
b2e586e8
SM
73772018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7378
7379 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
7380 to symbol_file_add_main.
7381
7c4e78cf
SM
73822018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7383
7384 PR mi/22299
7385 * mi/mi-console.c (do_fputc_async_safe): New.
7386 (mi_console_file::write_async_safe): New.
7387 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
7388 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
7389 New.
7390 * ui-file.c (ui_file::putstrn): Adjust call to
7391 fputstrn_unfiltered.
7392 * utils.c (printchar): Replace do_fputs and do_fprintf
7393 parameters by do_fputc.
7394 (fputstr_filtered): Adjust call to printchar.
7395 (fputstr_unfiltered): Likewise.
7396 (fputstrn_filtered): Likewise.
7397 (fputstrn_unfiltered): Add do_fputc parameter, pass to
7398 printchar.
7399 * utils.h (do_fputc_ftype): New typedef.
7400 (fputstrn_unfiltered): Add do_fputc parameter.
7401
5dc026d3
SM
74022018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7403
7404 * regformats/i386/i386-avx.dat: Remove.
7405
c912f608
SM
74062018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7407
7408 PR gdb/22979
7409 * amd64-tdep.c (amd64_none_init_abi): New function.
7410 (amd64_x32_none_init_abi): New function.
7411 (_initialize_amd64_tdep): Register handlers for x86-64 and
7412 x64_32 with GDB_OSABI_NONE.
7413 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
7414 GDB_OSABI_NONE osabi.
7415
26540402
SM
74162018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7417
7418 PR gdb/22980
7419 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
7420 GDB_OSABI_NONE.
7421 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
7422 * osabi.c (gdb_osabi_names): Add "unknown" entry.
7423
9018be22
SM
74242018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7425
7426 * common/byte-vector.h (char_vector): New type.
7427 * target.h (target_read_alloc): Return
7428 gdb::optional<byte_vector>.
7429 (target_read_stralloc): Return gdb::optional<char_vector>.
7430 (target_get_osdata): Return gdb::optional<char_vector>.
7431 * target.c (target_read_alloc_1): Templatize. Replacement
7432 manual memory management with vector.
7433 (target_read_alloc): Change return type, adjust.
7434 (target_read_stralloc): Change return type, adjust.
7435 (target_get_osdata): Change return type, adjust.
7436 * auxv.c (struct auxv_info) <length>: Remove.
7437 <data>: Change type to gdb::optional<byte_vector>.
7438 (auxv_inferior_data_cleanup): Free auxv_info with delete.
7439 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
7440 (target_auxv_search): Adjust.
7441 (fprint_target_auxv): Adjust.
7442 * avr-tdep.c (avr_io_reg_read_command): Adjust.
7443 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
7444 (linux_make_corefile_notes): Adjust.
7445 * osdata.c (get_osdata): Adjust.
7446 * remote.c (remote_get_threads_with_qxfer): Adjust.
7447 (remote_memory_map): Adjust.
7448 (remote_traceframe_info): Adjust.
7449 (btrace_read_config): Adjust.
7450 (remote_read_btrace): Adjust.
7451 (remote_pid_to_exec_file): Adjust.
7452 * solib-aix.c (solib_aix_get_library_list): Adjust.
7453 * solib-dsbt.c (decode_loadmap): Don't free buf.
7454 (dsbt_get_initial_loadmaps): Adjust.
7455 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
7456 * solib-target.c (solib_target_current_sos): Adjust.
7457 * tracepoint.c (sdata_make_value): Adjust.
7458 * xml-support.c (xinclude_start_include): Adjust.
7459 (xml_fetch_content_from_file): Adjust.
7460 * xml-support.h (xml_fetch_another): Change return type.
7461 (xml_fetch_content_from_file): Change return type.
7462 * xml-syscall.c (xml_init_syscalls_info): Adjust.
7463 * xml-tdesc.c (file_read_description_xml): Adjust.
7464 (fetch_available_features_from_target): Change return type.
7465 (target_fetch_description_xml): Adjust.
7466 (target_read_description_xml): Adjust.
7467
14c88955
TT
74682018-04-06 Tom Tromey <tom@tromey.com>
7469
7470 * value.c (~value): Update.
7471 (struct value) <contents>: Now unique_xmalloc_ptr.
7472 (value_contents_bits_eq, allocate_value_contents)
7473 (value_contents_raw, value_contents_all_raw)
7474 (value_contents_for_printing, value_contents_for_printing_const)
7475 (set_value_enclosing_type): Update.
7476
0c7e6dd8
TT
74772018-04-06 Tom Tromey <tom@tromey.com>
7478
7479 * value.c (range_s): Remove typedef, VEC.
7480 (struct range): Add operator<.
7481 (range_lessthan): Remove.
7482 (ranges_contain): Change type.
7483 (~value): Update.
7484 (struct value) <unavailable, optimized_out>: Now std::vector.
7485 (value_entirely_available)
7486 (value_entirely_covered_by_range_vector)
7487 (value_entirely_unavailable, value_entirely_optimized_out):
7488 Update.
7489 (insert_into_bit_range_vector): Change argument type.
7490 (find_first_range_overlap): Likewise.
7491 (struct ranges_and_idx, value_contents_bits_eq)
7492 (require_not_optimized_out, require_available): Update.
7493 (ranges_copy_adjusted): Change argument types.
7494 (value_optimized_out, value_copy, value_fetch_lazy): Update.
7495
2c8331b9
TT
74962018-04-06 Tom Tromey <tom@tromey.com>
7497
7498 * value.c (~value): Update.
7499 (struct value) <parent>: Now a value_ref_ptr.
7500 (value_parent, set_value_parent, value_address, value_copy):
7501 Update.
7502
466ce3ae
TT
75032018-04-06 Tom Tromey <tom@tromey.com>
7504
7505 * value.c (struct value): Add constructor, destructor, and member
7506 initializers.
7507 (allocate_value_lazy, value_decref): Update.
7508
062d818d
TT
75092018-04-06 Tom Tromey <tom@tromey.com>
7510
7511 * value.c (struct value) <released, next>: Remove.
7512 (all_values): Now a std::vector.
7513 (allocate_value_lazy): Update.
7514 (value_next): Remove.
7515 (value_mark, value_free_to_mark, release_value)
7516 (value_release_to_mark): Update.
7517
a6535de1
TT
75182018-04-06 Tom Tromey <tom@tromey.com>
7519
7520 * value.h (fetch_subexp_value, value_release_to_mark): Update.
7521 (free_value_chain): Remove.
7522 * value.c (free_value_chain): Remove.
7523 (value_release_to_mark): Return a std::vector.
7524 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
7525 std::vector.
7526 (check_condition): Update.
7527 * eval.c (fetch_subexp_value): Change "val_chain" to a
7528 std::vector.
7529 * breakpoint.c (update_watchpoint): Update.
7530 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
7531
b5621201
TT
75322018-04-06 Tom Tromey <tom@tromey.com>
7533
7534 * value.h (free_all_values): Remove.
7535 * value.c (free_all_values): Remove.
7536
4d0266a0
TT
75372018-04-06 Tom Tromey <tom@tromey.com>
7538
7539 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
7540 (value_history_chain, value_history_count): Remove.
7541 (value_history): New global.
7542 (record_latest_value, access_value_history, show_values)
7543 (preserve_values): Update.
7544
b4d61099
TT
75452018-04-06 Tom Tromey <tom@tromey.com>
7546
7547 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
7548 * varobj.c (varobj_set_display_format, varobj_set_value)
7549 (install_default_visualizer, construct_visualizer)
7550 (install_new_value, ~varobj, varobj_get_value_type)
7551 (my_value_of_variable, varobj_editable_p): Update.
7552 * c-varobj.c (c_describe_child, c_value_of_variable)
7553 (cplus_number_of_children, cplus_describe_child): Update.
7554 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
7555 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
7556 (ada_value_of_variable, ada_value_is_changeable_p): Update.
7557
9b558729
TT
75582018-04-06 Tom Tromey <tom@tromey.com>
7559
7560 * printcmd.c (last_examine_address): Change type to
7561 value_ref_ptr.
7562 (do_examine, x_command): Update.
7563
850645cf
TT
75642018-04-06 Tom Tromey <tom@tromey.com>
7565
7566 * value.c (release_value): Update.
7567 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
7568 (struct bpstats) <val>: Now a value_ref_ptr.
7569 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7570 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7571 (~watchpoint, print_it_watchpoint, watch_command_1)
7572 (invalidate_bp_value_on_memory_change): Update.
7573
22bc8444
TT
75742018-04-06 Tom Tromey <tom@tromey.com>
7575
7576 * varobj.c (varobj_clear_saved_item)
7577 (update_dynamic_varobj_children, install_new_value, ~varobj):
7578 Update.
7579 * value.h (value_incref): Move declaration earlier.
7580 (value_decref): Rename from value_free.
7581 (struct value_ref_policy): New.
7582 (value_ref_ptr): New typedef.
7583 (struct value_deleter): Remove.
7584 (gdb_value_up): Remove typedef.
7585 (release_value): Change return type.
7586 (release_value_or_incref): Remove.
7587 * value.c (set_value_parent): Update.
7588 (value_incref): Change return type.
7589 (value_decref): Rename from value_free.
7590 (value_free_to_mark, free_all_values, free_value_chain): Update.
7591 (release_value): Return value_ref_ptr.
7592 (release_value_or_incref): Remove.
7593 (record_latest_value, set_internalvar, clear_internalvar):
7594 Update.
7595 * stack.c (info_frame_command): Don't call value_free.
7596 * python/py-value.c (valpy_dealloc, valpy_new)
7597 (value_to_value_object): Update.
7598 * printcmd.c (do_examine): Update.
7599 * opencl-lang.c (lval_func_free_closure): Update.
7600 * mi/mi-main.c (register_changed_p): Don't call value_free.
7601 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
7602 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
7603 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
7604 value_free.
7605 * guile/scm-value.c (vlscm_free_value_smob)
7606 (vlscm_scm_from_value): Update.
7607 * frame.c (frame_register_unwind, frame_unwind_register_signed)
7608 (frame_unwind_register_unsigned, get_frame_register_bytes)
7609 (put_frame_register_bytes): Don't call value_free.
7610 * findvar.c (address_from_register): Don't call value_free.
7611 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
7612 * dwarf2loc.c (entry_data_value_free_closure)
7613 (value_of_dwarf_reg_entry, free_pieced_value_closure)
7614 (dwarf2_evaluate_loc_desc_full): Update.
7615 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7616 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7617 (~watchpoint, watch_command_1)
7618 (invalidate_bp_value_on_memory_change): Update.
7619 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
7620
7f8a5d38
SM
76212018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
7622
7623 PR gdb/23022
7624 * warning.m4: Add -Wno-error=deprecated-register.
7625 * configure: Re-generate.
7626
8a76bd3b
TT
76272018-04-05 Tom Tromey <tom@tromey.com>
7628
7629 * linespec.h: Remove include of "vec.h".
7630
8e8d776e
TT
76312018-04-05 Tom Tromey <tom@tromey.com>
7632
7633 * linespec.c (typep): Remove typedef.
7634 (find_methods, find_superclass_methods): Take a std::vector.
7635 (find_method): Use std::vector.
7636
9b2f8581
TT
76372018-04-05 Tom Tromey <tom@tromey.com>
7638
7639 * utils.c (compare_strings): Remove.
7640 * utils.h (compare_strings): Remove.
7641 * objc-lang.h (find_imps): Update.
7642 * objc-lang.c (find_methods): Take a std::vector.
7643 (uniquify_strings, find_imps): Likewise.
7644 * linespec.c (find_methods): Take a std::vector.
7645 (decode_objc): Use std::vector.
7646 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
7647 a std::vector.
7648 (find_method, find_function_symbols): Use std::vector.
7649
459a2e4c
TT
76502018-04-05 Tom Tromey <tom@tromey.com>
7651
7652 * completer.c (completion_tracker::completion_tracker): Remove
7653 cast.
7654 (completion_tracker::discard_completions): Likewise.
7655 * breakpoint.c (ambiguous_names_p): Remove cast.
7656 * ada-lang.c (_initialize_ada_language): Remove cast.
7657 * utils.h (streq): Update.
7658 (streq_hash): Add new declaration.
7659 * utils.c (streq): Return bool.
7660 (streq_hash): New function.
7661
9be2c17a
TT
76622018-04-05 Tom Tromey <tom@tromey.com>
7663
7664 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
7665 Remove a string copy.
7666
f73c6ece
TT
76672018-04-05 Tom Tromey <tom@tromey.com>
7668
7669 * linespec.c (filter_results): Use std::vector.
7670 (decode_line_2, decode_line_full): Update.
7671
53a0f8a2
TT
76722018-04-05 Tom Tromey <tom@tromey.com>
7673
7674 * linespec.c (canonical_to_fullform): Return std::string.
7675 (filter_results): Update.
7676 (struct decode_line_2_item): Add constructor.
7677 <fullform, displayform>: Now std::string.
7678 (decode_line_2_compare_items): Now a std::sort comparator.
7679 (decode_line_2): Update.
7680
a5b5adf5
TT
76812018-04-05 Tom Tromey <tom@tromey.com>
7682
7683 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
7684 (unexpected_linespec_error): Update.
7685 (linespec_parse_basic, parse_linespec): Update.
7686
6a307fc5
TT
76872018-04-05 Tom Tromey <tom@tromey.com>
7688
7689 * linespec.c (linespec_parse_basic): Reindent.
7690
41c1efc6
TT
76912018-04-05 Tom Tromey <tom@tromey.com>
7692
7693 * minsyms.h (iterate_over_minimal_symbols): Update.
7694 * minsyms.c (iterate_over_minimal_symbols): Take a
7695 gdb::function_view.
7696 * linespec.c (struct collect_minsyms): Remove.
7697 (compare_msyms): Now a std::sort comparator.
7698 (add_minsym): Add parameters.
7699 (search_minsyms_for_name): Update. Use std::vector.
7700
c5edbf3d
TT
77012018-04-03 Tom Tromey <tom@tromey.com>
7702
7703 * mipsread.c (read_alphacoff_dynamic_symtab): Use
7704 gdb::byte_vector.
7705
b39efc48
WP
77062018-04-02 Weimin Pan <weimin.pan@oracle.com>
7707
7708 * MAINTAINERS (Write After Approval): Add Weimin Pan.
7709
121ad66c 77102018-04-02 Weimin Pan <weimin.pan@oracle.com>
79f18731
WP
7711
7712 PR gdb/16959
7713 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
7714 printing static type.
7715
09473be8
TT
77162018-04-01 Tom Tromey <tom@tromey.com>
7717
7718 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
7719 (rs6000_xfer_shared_libraries): Update.
7720
ec1f2d91
SM
77212018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
7722
7723 * common/gdb_vecs.h (char_ptr): Remove.
7724 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
7725
d8611974
SM
77262018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
7727
7728 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
7729 with std::vector.
7730 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
7731
a18ba4e4
SM
77322018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
7733
7734 * tracepoint.h (struct uploaded_tp): Initialize fields.
7735 <actions, step_actions, cmd_strings>: Change type to
7736 std::vector<char *>.
7737 * tracepoint.c (get_uploaded_tp): Allocate with new.
7738 (free_uploaded_tps): Free with delete.
7739 (parse_tracepoint_definition): Adjust to std::vector change.
7740 * breakpoint.c (read_uploaded_action): Likewise.
7741 (create_tracepoint_from_upload): Likewise.
7742 * ctf.c (ctf_write_uploaded_tp): Likewise.
7743 (SET_ARRAY_FIELD): Likewise.
7744 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
7745
a7961323
TT
77462018-03-30 Tom Tromey <tom@tromey.com>
7747
7748 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
7749 std::unique_ptr.
7750 (svr4_keep_data_in_core): Update.
7751 (svr4_read_so_list): Update.
7752
e83e4e24
TT
77532018-03-30 Tom Tromey <tom@tromey.com>
7754
7755 * windows-nat.c (handle_output_debug_string, handle_exception):
7756 Update.
7757 * target.h (target_read_string): Update.
7758 * target.c (target_read_string): Change "string" to
7759 unique_xmalloc_ptr.
7760 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
7761 Update.
7762 * solib-frv.c (frv_current_sos): Update.
7763 * solib-dsbt.c (dsbt_current_sos): Update.
7764 * solib-darwin.c (darwin_current_sos): Update.
7765 * linux-thread-db.c (inferior_has_bug): Update.
7766 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
7767 Update. Remove alloca.
7768 * ada-lang.c (ada_main_name): Update.
7769
263db9a1
TT
77702018-03-30 Tom Tromey <tom@tromey.com>
7771
7772 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
7773 (struct dwo_file_deleter): New.
7774 (dwo_file_up): New typedef.
7775 (open_and_init_dwo_file): Use dwo_file_up.
7776 (free_dwo_file_cleanup): Remove.
7777
5dafb3d1
TT
77782018-03-30 Tom Tromey <tom@tromey.com>
7779
7780 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
7781 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
7782
11ed8cad
TT
77832018-03-30 Tom Tromey <tom@tromey.com>
7784
7785 * dwarf2read.c (class free_cached_comp_units): New class.
7786 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
7787 (free_cached_comp_units): Remove function.
7788
9ae79dac
TT
77892018-03-30 Tom Tromey <tom@tromey.com>
7790
7791 * utils.h (make_cleanup_unpush_target): Remove.
7792 * inf-ptrace.c (struct target_unpusher): New.
7793 (target_unpush_up) New typedef.
7794 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
7795 target_unpush_up.
7796 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
7797
5aa89276
TT
77982018-03-27 Tom Tromey <tom@tromey.com>
7799
7800 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
7801
1dbeed45
TT
78022018-03-27 Pedro Alves <palves@redhat.com>
7803 Tom Tromey <tom@tromey.com>
7804
7805 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
7806 destructor. Now a class.
7807 (gdb_readline_wrapper_cleanup): Remove function.
7808 (gdb_readline_wrapper): Remove cleanups.
7809
c819b2c0
TT
78102018-03-27 Tom Tromey <tom@tromey.com>
7811
7812 * typeprint.h (struct type_print_options) <local_typedefs,
7813 global_typedefs>: Remove "struct" keyword.
7814 (class typedef_hash_table): New class.
7815 (recursively_update_typedef_hash, add_template_parameters)
7816 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
7817 (find_typedef_in_hash): Don't declare.
7818 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
7819 (typedef_hash_table::recursively_update): Rename from
7820 recursively_update_typedef_hash. Now a member.
7821 (typedef_hash_table::add_template_parameters): Rename from
7822 add_template_parameters. Now a member.
7823 (typedef_hash_table::typedef_hash_table): Now a constructor;
7824 rename from create_typedef_hash.
7825 (typedef_hash_table::~typedef_hash_table): Now a destructor;
7826 rename from free_typedef_hash.
7827 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
7828 (do_free_global_table): Remove.
7829 (typedef_hash_table::typedef_hash_table): New constructor; renamed
7830 from copy_type_recursive.
7831 (create_global_typedef_table): Remove.
7832 (typedef_hash_table::find_global_typedef): Now a member of
7833 typedef_hash_table.
7834 (typedef_hash_table::find_typedef): Rename from
7835 find_typedef_in_hash; now a member.
7836 (whatis_exp): Update.
7837 * extension.h (struct ext_lang_type_printers): Add constructor and
7838 destructor.
7839 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
7840 declare.
7841 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
7842 Now a constructor; rename from start_ext_lang_type_printers.
7843 (ext_lang_type_printers): Now a destructor; rename from
7844 free_ext_lang_type_printers.
7845 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
7846 Update.
7847 (c_type_print_base_struct_union): Update. Remove cleanups.
7848
608219fb
TT
78492018-03-27 Tom Tromey <tom@tromey.com>
7850
7851 * dwarf-index-write.c: Include <cmath>.
7852
3fcded8f
JB
78532018-03-27 Joel Brobecker <brobecker@adacore.com>
7854
7855 * NEWS: Add entry describing new "set|show varsize-limit" command.
7856 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
7857 command.
7858 * printcmd.c (_initialize_printcmd): Add "set var" alias of
7859 "set variable".
7860
cd4fb1b2
SM
78612018-03-27 Simon Marchi <simon.marchi@ericsson.com>
7862
7863 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
7864 dwarf-index-write.c
7865 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
7866 * dwarf-index-common.c: New file.
7867 * dwarf-index-common.h: New file.
7868 * dwarf-index-write.c: New file.
7869 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
7870 (struct dwarf2_section_info): Move from here.
7871 (dwarf2_section_info_def): Likewise.
7872 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
7873 (offset_type): Likewise.
7874 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
7875 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
7876 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
7877 (byte_swap): Likewise.
7878 (MAYBE_SWAP): Likewise.
7879 (dwarf2_per_cu_ptr): Likewise.
7880 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
7881 (struct tu_stats): Likewise.
7882 (struct dwarf2_per_objfile): Likewise.
7883 (struct dwarf2_per_cu_data): Likewise.
7884 (struct signatured_type): Likewise.
7885 (sig_type_ptr): Likewise.
7886 (DEF_VEC_P (sig_type_ptr)): Likewise.
7887 (INDEX4_SUFFIX): Likewise.
7888 (INDEX5_SUFFIX): Likewise.
7889 (DEBUG_STR_SUFFIX): Likewise.
7890 (dwarf2_read_section): Make non-static.
7891 (mapped_index_string_hash): Move from here.
7892 (dwarf5_djb_hash): Likewise.
7893 (file_write): Likewise.
7894 (class data_buf): Likewise.
7895 (struct symtab_index_entry): Likewise.
7896 (struct mapped_symtab): Likewise.
7897 (find_slot): Likewise.
7898 (hash_expand): Likewise.
7899 (add_index_entry): Likewise.
7900 (uniquify_cu_indices): Likewise.
7901 (class c_str_view): Likewise.
7902 (class c_str_view_hasher): Likewise.
7903 (class vector_hasher): Likewise.
7904 (write_hash_table): Likewise.
7905 (psym_index_map): Likewise.
7906 (struct addrmap_index_data): Likewise.
7907 (add_address_entry): Likewise.
7908 (add_address_entry_worker): Likewise.
7909 (write_address_map): Likewise.
7910 (symbol_kind): Likewise.
7911 (write_psymbols): Likewise.
7912 (struct signatured_type_index_data): Likewise.
7913 (write_one_signatured_type): Likewise.
7914 (recursively_count_psymbols): Likewise.
7915 (recursively_write_psymbols): Likewise.
7916 (class debug_names): Likewise.
7917 (check_dwarf64_offsets): Likewise.
7918 (psyms_seen_size): Likewise.
7919 (write_gdbindex): Likewise.
7920 (write_debug_names): Likewise.
7921 (assert_file_size): Likewise.
7922 (write_psymtabs_to_index): Likewise.
7923 (save_gdb_index_command): Likewise.
7924 (_initialize_dwarf2_read): Don't register the "save gdb-index"
7925 command.
7926 * dwarf2read.h: New file.
7927
59cc4834
JB
79282018-03-27 Joel Brobecker <brobecker@adacore.com>
7929
7930 PR gdb/22670
7931 * dwarf2read.c (dwarf2_physname): Do not return the demangled
7932 symbol name if the CU's language stores symbol names in linkage
7933 format.
7934 * language.h (struct language_defn)
7935 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
7936 all instances of this struct.
7937
67501539
TT
79382018-03-26 Tom Tromey <tom@tromey.com>
7939
7940 * stack.c (backtrace_command_1): Remove verbose code.
7941
76c939ac
TT
79422018-03-26 Tom Tromey <tom@tromey.com>
7943
7944 * python/py-framefilter.c (py_print_type): Don't catch
7945 exceptions. Return void.
7946 (py_print_value): Likewise.
7947 (py_print_single_arg): Likewise.
7948 (enumerate_args): Don't catch exceptions.
7949 (py_print_args): Likewise.
7950 (py_print_frame): Likewise.
7951 (gdbpy_apply_frame_filter): Catch exceptions here.
7952
9507b29c
TT
79532018-03-26 Tom Tromey <tom@tromey.com>
7954
7955 * stack.c (_initialize_stack): Remove trailing newlines from help
7956 text. Add "Usage" line to "backtrace" help.
7957
eb68e487
TT
79582018-03-26 Tom Tromey <tom@tromey.com>
7959
7960 PR python/16486:
7961 * python/py-framefilter.c (py_print_args): Call wrap_hint.
7962
1f111921
TT
79632018-03-26 Tom Tromey <tom@tromey.com>
7964
7965 * python/py-framefilter.c (py_print_single_arg): Return
7966 EXT_LANG_BT_ERROR from catch.
7967
fb7eb8b5
TT
79682018-03-26 Tom Tromey <tom@tromey.com>
7969
7970 PR backtrace/15584:
7971 * stack.c (backtrace_command_1): Move some code into no-filters
7972 "if".
7973
4ca59a9f
TT
79742018-03-26 Tom Tromey <tom@tromey.com>
7975
7976 * python/py-framefilter.c (throw_quit_or_print_exception): New
7977 function.
7978 (gdbpy_apply_frame_filter): Use it.
7979
92256134
TT
79802018-03-26 Tom Tromey <tom@tromey.com>
7981
7982 PR cli/17716:
7983 * python/py-framefilter.c (py_print_type, py_print_value)
7984 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
7985 RETURN_MASK_ERROR.
7986
7a630bc2
TT
79872018-03-26 Tom Tromey <tom@tromey.com>
7988
7989 * python/py-framefilter.c (enumerate_args): Use
7990 gdb::unique_xmalloc_ptr.
7991
63283d4a
TT
79922018-03-26 Tom Tromey <tom@tromey.com>
7993
7994 * python/py-framefilter.c (py_print_frame): Return
7995 EXT_LANG_BT_OK.
7996 (gdbpy_apply_frame_filter): Update comment.
7997 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
7998 Remove.
7999 <EXT_LANG_BT_NO_FILTERS>: Change value.
8000
978d6c75
TT
80012018-03-26 Tom Tromey <tom@tromey.com>
8002
8003 PR backtrace/15582:
8004 * stack.c (backtrace_command): Parse "hide" argument.
8005 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
8006 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
8007 constant.
8008
1cf7e640
TT
80092018-03-26 Tom Tromey <tom@tromey.com>
8010
8011 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
8012 add "flags".
8013 (backtrace_command): Remove "fulltrace", add "flags".
8014
ea3b0687
TT
80152018-03-26 Tom Tromey <tom@tromey.com>
8016
8017 * stack.c (backtrace_command): Rewrite command line parsing.
8018
9f034d75
SM
80192018-03-26 Simon Marchi <simon.marchi@ericsson.com>
8020
8021 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
8022
ce1459e5
SM
80232018-03-26 Simon Marchi <simon.marchi@ericsson.com>
8024
8025 * filename-seen-cache.h: Add include guard.
8026
4f7ae6f5
KS
80272018-03-26 Keith Seitz <keiths@redhat.com>
8028
8029 * symfile.c (place_section): Remove "struct" from section_addr_info
8030 in comment.
8031 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
8032 "struct" keyword from section_addr_info.
8033
5cd3e386
AH
80342018-03-26 Alan Hayward <alan.hayward@arm.com>
8035
8036 * regformats/regdef.h (reg): Add constructors.
8037
3e5ef9a4
PA
80382018-03-25 Pedro Alves <palves@redhat.com>
8039
8040 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
8041 if then/else bodies in var_func_name extraction.
8042
c88d2fcc 80432018-03-23 Weimin Pan <weimin.pan@oracle.com>
bce02d88
WP
8044
8045 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
8046 lookup_minimal_symbol() to find symbol entry.
8047 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
8048
b7fee5a3
KS
80492018-03-23 Keith Seitz <keiths@redhat.com>
8050
8051 PR c++/22968
8052 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
8053 nested type definitions for C++, too.
8054
2cc9b304
TT
80552018-03-23 Tom Tromey <tom@tromey.com>
8056
8057 * machoread.c (struct oso_el): Add a constructor. Don't define as
8058 a typedef.
8059 (macho_register_oso): Remove.
8060 (macho_symtab_read): Take a std::vector.
8061 (oso_el_compare_name): Now a std::sort comparator.
8062 (macho_symfile_read_all_oso): Take a std::vector.
8063 (macho_symfile_read): Use std::vector. Remove cleanups.
8064
a2b2bc12
TT
80652018-03-22 Tom Tromey <tom@tromey.com>
8066
8067 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
8068 (record_full_goto_bookmark): Use std::string.
8069
7a8f494c
PFC
80702018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8071
8072 PR tdep/18295
8073 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
8074 a single mask.
8075
dd6d677f
PFC
80762018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8077
8078 * rs6000-tdep.c (store_insn_p): New function.
8079 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
8080 and cr_reg to their unshifted values. Use store_insn_p to
8081 match LR saves using either R1 or fdata->alloca_reg. Use
8082 store_insn_p to match CR saves. Set alloca_reg_offset
8083 when alloca_reg and framep are set. Remove lr_reg shift
8084 when assigning to fdata->lr_register.
8085
26d6cec4
AA
80862018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
8087
8088 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
8089 command line args instead of emitting a warning.
8090
5d9310c4
SM
80912018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8092
8093 * tracepoint.h (struct static_tracepoint_marker): Initialize
8094 fields, define default constructor, move constructor and move
8095 assignment, disable the rest.
8096 <str_id, extra>: Make std::string.
8097 (release_static_tracepoint_marker): Remove.
8098 (free_current_marker): Remove.
8099 * tracepoint.c (free_current_marker): Remove.
8100 (parse_static_tracepoint_marker_definition): Adjust to
8101 std::string, use new hex2str overload.
8102 (release_static_tracepoint_marker): Remove.
8103 (print_one_static_tracepoint_marker): Get marker by reference
8104 and adjust to std::string.
8105 (info_static_tracepoint_markers_command): Adjust to std::vector
8106 changes
8107 * target.h (static_tracepoint_marker_p): Remove typedef.
8108 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
8109 (struct target_ops) <to_static_tracepoint_marker_at>: Return
8110 bool.
8111 <to_static_tracepoint_markers_by_strid>: Return std::vector.
8112 * target-debug.h
8113 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
8114 (target_debug_print_std_vector_static_tracepoint_marker): New.
8115 (target_debug_print_struct_static_tracepoint_marker_p): Rename
8116 to...
8117 (target_debug_print_static_tracepoint_marker_p): ... this.
8118 * target-delegates.c: Re-generate.
8119 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
8120 Make std::string.
8121 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
8122 (decode_static_tracepoint_spec): Adjust to std::vector.
8123 (tracepoint_print_one_detail): Adjust to std::string.
8124 (strace_marker_decode_location): Adjust to std::string.
8125 (update_static_tracepoint): Adjust to std::string, remove call
8126 to release_static_tracepoint_marker.
8127 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
8128 Adjust to std::vector.
8129 * remote.c (remote_static_tracepoint_marker_at): Return bool.
8130 (remote_static_tracepoint_markers_by_strid): Adjust to
8131 std::vector.
8132 * common/rsp-low.h (hex2str): New overload with explicit count
8133 of bytes.
8134 * common/rsp-low.c (hex2str): New overload with explicit count
8135 of bytes.
8136 * unittests/rsp-low-selftests.c (test_hex2str): New function.
8137 (_initialize_rsp_low_selftests): Add test_hex2str test.
8138 * unittests/tracepoint-selftests.c
8139 (test_parse_static_tracepoint_marker_definition): Adjust to
8140 std::string.
8141
62c222b6
SM
81422018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8143
8144 * tracepoint.c (parse_static_tracepoint_marker_definition):
8145 Consider case where the definition is followed by more
8146 definitions.
8147 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8148 tracepoint-selftests.c.
8149 * unittests/tracepoint-selftests.c: New.
8150
7eb2418f
PFC
81512018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8152
8153 * MAINTAINERS (Write After Approval): Add Pedro Franco de
8154 Carvalho.
8155
7cbe16e9
SR
81562018-03-20 Stephen Roberts <stephen.roberts@arm.com>
8157
3d6b3b82 8158 * symtab.c (find_pc_sect_line): fixed indentation.
7cbe16e9 8159
4ee89e90
SR
81602018-03-20 Stephen Roberts <stephen.roberts@arm.com>
8161
3d6b3b82 8162 * symtab.c (find_pc_sect_line): now uses binary search.
4ee89e90 8163
92630041
TT
81642018-03-19 Tom Tromey <tom@tromey.com>
8165
8166 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
8167 "IDENT" production.
8168
76727919
TT
81692018-03-19 Pedro Alves <palves@redhat.com>
8170 Tom Tromey <tom@tromey.com>
8171
8172 * unittests/observable-selftests.c: New file.
8173 * common/observable.h: New file.
8174 * observable.h: New file.
8175 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
8176 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
8177 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
8178 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
8179 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
8180 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
8181 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
8182 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
8183 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
8184 python/py-breakpoint.c, python/py-finishbreakpoint.c,
8185 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
8186 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
8187 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
8188 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
8189 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
8190 tui/tui-interp.c, valops.c: Update all users.
8191 * tui/tui-hooks.c (tui_bp_created_observer)
8192 (tui_bp_deleted_observer, tui_bp_modified_observer)
8193 (tui_inferior_exit_observer, tui_before_prompt_observer)
8194 (tui_normal_stop_observer, tui_register_changed_observer):
8195 Remove.
8196 (tui_observers_token): New global.
8197 (attach_or_detach, tui_attach_detach_observers): New functions.
8198 (tui_install_hooks, tui_remove_hooks): Use
8199 tui_attach_detach_observers.
8200 * record-btrace.c (record_btrace_thread_observer): Remove.
8201 (record_btrace_thread_observer_token): New global.
8202 * observer.sh: Remove.
8203 * observer.c: Rename to observable.c.
8204 * observable.c (namespace gdb_observers): Define new objects.
8205 (observer_debug): Move into gdb_observers namespace.
8206 (struct observer, struct observer_list, xalloc_observer_list_node)
8207 (xfree_observer_list_node, generic_observer_attach)
8208 (generic_observer_detach, generic_observer_notify): Remove.
8209 (_initialize_observer): Update.
8210 Don't include observer.inc.
8211 * Makefile.in (generated_files): Remove observer.h, observer.inc.
8212 (clean mostlyclean): Likewise.
8213 (observer.h, observer.inc): Remove targets.
8214 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
8215 (COMMON_SFILES): Use observable.c, not observer.c.
8216 * .gitignore: Remove observer.h.
8217
1cb1f3da
TT
82182018-03-18 Tom Tromey <tom@tromey.com>
8219
8220 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
8221 gdb::def_vector.
8222 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
8223
a06ab151
TT
82242018-03-17 Tom Tromey <tom@tromey.com>
8225
8226 * auto-load.c (auto_load_objfile_script_1): Use std::string.
8227
770623f7
TT
82282018-03-17 Tom Tromey <tom@tromey.com>
8229
8230 * target.c (class scoped_target_fd): New.
8231 (target_fileio_close_cleanup): Remove.
8232 (target_fileio_read_alloc_1): Use scoped_target_fd.
8233
39be3c7e
SM
82342018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
8235
8236 * silent-rules.mk: New.
8237 * Makefile.in: Include silent-rules.mk
8238 (srcdir, VPATH, top_srcdir): Move up.
8239 (COMPILE): Add ECHO_CXX.
8240 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
8241 (init.c): Add ECHO_INIT_C.
8242 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
8243 (version.c): Add ECHO_GEN.
8244 (printcmd.o): Add ECHO_CXX.
8245 (target-float.o): Add ECHO_CXX.
8246 (ada-exp.o): Add ECHO_CXX.
8247 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
8248 (insight$(EXEEXT)): Add ECHO_CXXLD.
8249 * gnulib/configure.ac: Add AM_SILENT_RULES.
8250 * gnulib/aclocal.m4: Re-generate.
8251 * gnulib/configure: Re-generate.
8252 * gnulib/import/Makefile.in: Re-generate.
8253
37e136b1
TT
82542018-03-16 Tom Tromey <tom@tromey.com>
8255
8256 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
8257 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
8258 * utils.c (do_free_section_addr_info)
8259 (make_cleanup_free_section_addr_info): Remove.
8260 * symfile.h (struct other_sections): Add constructor.
8261 (struct section_addr_info): Remove.
8262 (section_addr_info): New typedef.
8263 (struct sym_fns) <sym_offsets>: Change type of parameter.
8264 (build_section_addr_info_from_objfile)
8265 (relative_addr_info_to_section_offsets, addr_info_make_relative)
8266 (default_symfile_offsets, symbol_file_add)
8267 (symbol_file_add_from_bfd)
8268 (build_section_addr_info_from_section_table): Update.
8269 (alloc_section_addr_info, free_section_addr_info): Don't declare.
8270 * symfile.c (alloc_section_addr_info): Remove.
8271 (build_section_addr_info_from_section_table): Change return type.
8272 Update.
8273 (build_section_addr_info_from_bfd)
8274 (build_section_addr_info_from_objfile): Likewise.
8275 (free_section_addr_info): Remove.
8276 (relative_addr_info_to_section_offsets): Change type of "addrs".
8277 (addrs_section_compar): Now a std::sort comparator.
8278 (addrs_section_sort): Change return type.
8279 (addr_info_make_relative): Change type of "addrs". Update.
8280 (default_symfile_offsets, syms_from_objfile_1)
8281 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
8282 (symbol_file_add_separate): Update.
8283 (symbol_file_add): Change type of "addrs". Update.
8284 (add_symbol_file_command): Update. Remove cleanups.
8285 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
8286 cleanups.
8287 * symfile-debug.c (debug_sym_offsets): Change type of "info".
8288 * solib.c (solib_read_symbols): Update.
8289 * objfiles.c (objfile_relocate): Update. Remove cleanups.
8290 * machoread.c (macho_symfile_offsets): Update.
8291 * jit.c (jit_bfd_try_read_symtab): Update.
8292
03afa6ef
SM
82932018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
8294
8295 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8296 unittests/utils-selftests.c.
8297 * unittests/utils-selftests.c: New file.
8298
3ae9ce5d
TT
82992018-03-14 Tom Tromey <tom@tromey.com>
8300
8301 PR cli/14977:
8302 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
8303 for NULL.
8304
b8c2339b
TT
83052018-03-14 Tom Tromey <tom@tromey.com>
8306
8307 PR cli/19918:
8308 * printcmd.c (printf_pointer): Allow "-" in format.
8309
80ae639d
TT
83102018-03-14 Tom Tromey <tom@tromey.com>
8311
8312 * printcmd.c (_initialize_printcmd): Add usage to printf.
8313
0d671d99
YQ
83142018-03-14 Yao Qi <qiyao@sourceware.org>
8315
8316 * MAINTAINERS: Update my email address.
8317
b577b6af
TT
83182018-03-13 Tom Tromey <tom@tromey.com>
8319
8320 * machoread.c (macho_check_dsym): Change filenamep to a
8321 std::string*.
8322 (macho_symfile_read): Update.
8323 * symfile.c (load_command): Use std::string.
8324
89a3b63e
AB
83252018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
8326
8327 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
8328 to error message string.
8329 (riscv_register_name): Use xsnprintf instead of sprintf.
8330 (riscv_insn::fetch_instruction): Use gdb_assert instead of
8331 internal_error.
8332 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
8333 error.
8334 (riscv_push_dummy_call): Likewise.
8335
984c7238
TT
83362018-03-12 Tom Tromey <tom@tromey.com>
8337
8338 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
8339 Use gdb::byte_vector.
8340 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
8341
933522d1
YQ
83422018-03-12 Yao Qi <yao.qi@linaro.org>
8343
8344 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
8345 parameter type to readable_regcache.
8346 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
8347 the declaration.
8348
be2daae6
TT
83492018-03-11 Tom Tromey <tom@tromey.com>
8350
8351 * dwarf2read.c (struct nextfield): Add initializers.
8352 (struct nextfnfield): Remove.
8353 (struct fnfieldlist): Add initializers. Remove "length" and
8354 "head", use std::vector.
8355 (struct decl_field_list): Remove.
8356 (struct field_info): Add initializers.
8357 <fields, baseclasses>: Now std::vector.
8358 <nbaseclasses, nfnfields, typedef_field_list_count,
8359 nested_types_list_count>: Remove.
8360 (dwarf2_add_field, dwarf2_add_type_defn)
8361 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
8362 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
8363 (process_structure_scope): Update.
8364
484cf504
TT
83652018-03-11 Tom Tromey <tom@tromey.com>
8366
8367 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
8368 for use by std::sort.
8369 (build_type_psymtabs_1): Use std::vector.
8370
9bd8e0b0
EZ
83712018-03-09 Eli Zaretskii <eliz@gnu.org>
8372
8373 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
8374 and LIBMPFR in the printed configuration.
8375
5dc1a704
TT
83762018-03-08 Tom Tromey <tom@tromey.com>
8377
8378 * source.c (get_filename_and_charpos): Use scoped_fd.
8379 * nto-procfs.c (procfs_open_1): Use scoped_fd.
8380 (procfs_pidlist): Likewise.
8381 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
8382 (iterate_over_mappings): Likewise.
8383
fdf07f3a
TT
83842018-03-08 Tom Tromey <tom@tromey.com>
8385
8386 * infcall.c (struct call_return_meta_info)
8387 <stack_temporaries_enabled>: Remove.
8388 (get_call_return_value, call_function_by_hand_dummy): Update.
8389 * thread.c (disable_thread_stack_temporaries): Remove.
8390 (enable_thread_stack_temporaries): Remove.
8391 (thread_stack_temporaries_enabled_p): Return bool.
8392 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
8393 (get_last_thread_stack_temporary): Update.
8394 * eval.c (evaluate_subexp): Update.
8395 * gdbthread.h (class enable_thread_stack_temporaries): Now a
8396 class, not a function.
8397 (value_ptr, value_vec): Remove typedefs.
8398 (class thread_info) <stack_temporaries_enabled>: Now bool.
8399 <stack_temporaries>: Now a std::vector.
8400 (thread_stack_temporaries_enabled_p)
8401 (value_in_thread_stack_temporaries): Return bool.
8402
567a3e54
SM
84032018-03-08 Simon Marchi <simon.marchi@ericsson.com>
8404
8405 * remote.c (putpkt_binary): Fix omitted bytes reporting.
8406 (getpkt_or_notif_sane_1): Likewise.
8407
00b40057
SM
84082018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8409
8410 * build-id.c (build_id_to_debug_bfd): Use std::string.
8411
a8dbfd58
SM
84122018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8413
8414 * build-id.c (find_separate_debug_file_by_buildid): Return
8415 std::string.
8416 * build-id.h (find_separate_debug_file_by_buildid): Return
8417 std::string.
8418 * coffread.c (coff_symfile_read): Adjust to std::string.
8419 * elfread.c (elf_symfile_read): Adjust to std::string.
8420 * symfile.c (separate_debug_file_exists): Change parameter to
8421 std::string.
8422 (find_separate_debug_file): Return std::string.
8423 (find_separate_debug_file_by_debuglink): Return std::string.
8424 * symfile.h (find_separate_debug_file_by_debuglink): Return
8425 std::string.
8426
e6a58aa8
SM
84272018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8428
8429 * common/xml-utils.c (xml_escape_text): Move code to...
8430 (xml_escape_text_append): ... this new function.
8431 * common/xml-utils.h (xml_escape_text_append): New declaration.
8432 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
8433 New function.
8434 (_initialize_xml_utils): register test_xml_escape_text_append as
8435 a selftest.
8436
4ef0bef6
AH
84372018-03-07 Alan Hayward <alan.hayward@arm.com>
8438
8439 * defs.h: Remove MAX_REGISTER_SIZE.
8440 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
8441 asserts.
8442 * python/py-unwind.c (pyuw_sniffer): Likewise.
8443
e0d3522b
TT
84442018-03-07 Tom Tromey <tom@tromey.com>
8445
8446 * linux-tdep.c (linux_info_proc): Update.
8447 * target.h (struct target_ops) <to_fileio_readlink>: Return
8448 optional<string>.
8449 (target_fileio_readlink): Return optional<string>.
8450 * remote.c (remote_hostio_readlink): Return optional<string>.
8451 * inf-child.c (inf_child_fileio_readlink): Return
8452 optional<string>.
8453 * target.c (target_fileio_readlink): Return optional<string>.
8454
ea005f31
AB
84552018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
8456
8457 * regcache.c (cooked_read_test): Add riscv to the list of
8458 architectures that have a save_reggroup.
8459
e95a97d4
AA
84602018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
8461
8462 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
8463 value is not a dynamic class object.
8464
d8344f3d
TT
84652018-03-06 Tom Tromey <tom@tromey.com>
8466
8467 * rust-exp.y: Formatting fixes.
8468
9add17f2
AB
84692018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8470
8471 * riscv-tdep.c (riscv_register_name): Remove target description
8472 support.
8473 (riscv_gdbarch_init): Remove target description check.
8474
c9486dfe
AB
84752018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8476
8477 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
8478 comment.
8479 * riscv-tdep.h: Likewise.
8480
d74aff3d
AB
84812018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8482
8483 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
8484 (riscv_pseudo_register_write): Delete.
8485 (riscv_gdbarch_init): Remove all use of pseudo registers.
8486
7ea78b59
SM
84872018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8488
8489 * record-btrace.c (btrace_print_lines): Replace cleanup
8490 parameter with RAII equivalents.
8491 (btrace_insn_history): Replace cleanup with RAII equivalents.
8492 * ui-out.h (make_cleanup_ui_out_list_begin_end,
8493 make_cleanup_ui_out_tuple_begin_end): Remove.
8494 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
8495 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
8496 make_cleanup_ui_out_list_begin_end): Remove.
8497
53127008
SM
84982018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8499
8500 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
8501 parameter types to std::vector. Use bool.
8502 (record_btrace_wait): Replace VEC(tp_t) with
8503 std::vector<thread_info *>.
8504 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
8505
228f1508
SM
85062018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8507
8508 * record-btrace.c (record_btrace_disable_callback): Remove.
8509 (struct scoped_btrace_disable): New.
8510 (record_btrace_open): Use scoped_btrace_disable.
8511
b2970c23
AB
85122018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8513
8514 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
8515 reading values from registers.
8516
fb294655
AB
85172018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8518
8519 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
8520 where appropriate.
8521
cab5bb9d
AB
85222018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8523
8524 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
8525 change parameter type. Use GDB's print functions, and use
8526 core_addr_to_string where appropriate.
8527 (riscv_push_dummy_call): Use core_addr_to_string where
8528 appropriate, update call to riscv_print_arg_location, and reindent
8529 a few lines.
8530 (riscv_return_value): Update call to riscv_print_arg_location.
8531
dbbb1059
AB
85322018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8533 Tim Newsome <tim@sifive.com>
8534 Albert Ou <a0u@eecs.berkeley.edu>
8535 Darius Rad <darius@bluespec.com>
8536
8537 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
8538 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
8539 (ALLDEPFILES): Add riscv-tdep.c
8540 * configure.tgt: Add riscv support.
8541 * riscv-tdep.c: New file.
8542 * riscv-tdep.h: New file.
8543 * NEWS: Mention new target.
8544 * MAINTAINERS: Add entry for riscv.
8545
5dc43913
AB
85462018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8547
8548 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
8549 fields within aggregates.
8550
3dea1ef7
SM
85512018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
8552
8553 * record-btrace.c (btrace_print_lines): Change type of flags to
8554 gdb_disassembly_flags.
8555
7efba073
JB
85562018-03-04 John Baldwin <jhb@FreeBSD.org>
8557
8558 * fbsd-nat.c: Include "inf-ptrace.h".
8559 (USE_SIGTRAP_SIGINFO): Conditionally define.
8560 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
8561 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
8562 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
8563 function.
8564 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
8565 Likewise.
8566 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
8567 Likewise.
8568 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
8569 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
8570 "supports_stopped_by_hw_breakpoint" target methods.
8571
386a8676
JB
85722018-03-04 John Baldwin <jhb@FreeBSD.org>
8573
8574 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
8575 * fbsd-nat.c (debug_fbsd_nat): New variable.
8576 (show_fbsd_nat_debug): New function.
8577 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
8578 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
8579
12279366
JB
85802018-03-04 John Baldwin <jhb@FreeBSD.org>
8581
8582 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
8583 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
8584 prototype.
8585 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
8586 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
8587 method.
8588
54693cf5
SM
85892018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8590
8591 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
8592 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
8593
ccb2231c
SM
85942018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8595
8596 * charset.c (struct charset_vector): New.
8597 (charsets): Change type to charset_vector.
8598 (find_charset_names): Adjust.
8599 (add_one): Adjust.
8600 (_initialize_charset): Adjust.
8601
6fb16ce6
SM
86022018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8603
8604 * progspace.h (struct program_space) <deleted_solibs>: Change
8605 type to std::vector<std::string>.
8606 * progspace.c (clear_program_space_solib_cache): Adjust.
8607 * breakpoint.c (print_solib_event): Adjust.
8608 (check_status_catch_solib): Adjust.
8609 * solib.c (update_solib_list): Adjust.
8610 * ui-out.h (class ui_out) <field_string>: New overload.
8611 * ui-out.c (ui_out::field_string): New overload.
8612
564b1e3f
SM
86132018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8614
8615 * progspace.h (struct program_space): Add constructor and
8616 destructor, initialize fields.
8617 (add_program_space): Remove.
8618 * progspace.c (add_program_space): Rename to...
8619 (program_space::program_space): ... this.
8620 (release_program_space): Rename to...
8621 (program_space::~program_space): ... this.
8622 (delete_program_space): Use delete to delete program_space.
8623 (initialize_progspace): Use new to allocate program_space.
8624 * inferior.c (add_inferior_with_spaces): Likewise.
8625 (clone_inferior_command): Likewise.
8626 * infrun.c (follow_fork_inferior): Likewise.
8627 (handle_vfork_child_exec_or_exit): Likewise.
8628
e80aaf61
SM
86292018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8630
8631 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
8632 (delim_string_to_char_ptr_vec): Return std::vector of
8633 gdb::unique_xmalloc_ptr.
8634 (dirnames_to_char_ptr_vec_append): Take std::vector of
8635 gdb::unique_xmalloc_ptr.
8636 (dirnames_to_char_ptr_vec): Return std::vector of
8637 gdb::unique_xmalloc_ptr.
8638 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
8639 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
8640 (delim_string_to_char_ptr_vec): Return an std::vector of
8641 gdb::unique_xmalloc_ptr, adjust the code.
8642 (dirnames_to_char_ptr_vec_append): Take an std::vector of
8643 gdb::unique_xmalloc_ptr, adjust the code.
8644 (dirnames_to_char_ptr_vec): Return an std::vector of
8645 gdb::unique_xmalloc_ptr, adjust the code.
8646 * auto-load.c (auto_load_safe_path_vec): Change type to
8647 std::vector of gdb::unique_xmalloc_ptr.
8648 (auto_load_expand_dir_vars): Return an std::vector of
8649 gdb::unique_xmalloc_ptr, adjust the code.
8650 (auto_load_safe_path_vec_update): Adjust.
8651 (filename_is_in_auto_load_safe_path_vec): Adjust.
8652 (auto_load_objfile_script_1): Adjust.
8653 * build-id.c (build_id_to_debug_bfd): Adjust.
8654 * linux-thread-db.c (thread_db_load_search): Adjust.
8655 * source.c (add_path): Adjust.
8656 (openp): Adjust.
8657 * symfile.c (find_separate_debug_file): Adjust.
8658 * utils.c (do_free_char_ptr_vec): Remove.
8659 (make_cleanup_free_char_ptr_vec): Remove.
8660
ab818ade
SDJ
86612018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
8662
8663 PR gdb/22907
8664 * common/pathstuff.c: Conditionally include "<windows.h>".
8665
e1e6f073
GS
86662018-03-01 Georg Sauthoff <mail@georg.so>
8667
8668 PR gdb/22888
8669 * gcore.in: Quote variables and switch interpreter to bash.
8670
c7b15a66
TT
86712018-03-01 Tom Tromey <tom@tromey.com>
8672
8673 * dwarf2read.c (alloc_discriminant_info): Fix default_index
8674 assertion. Add assertion for discriminant_index.
8675 (quirk_rust_enum): Use correct base type name in univariant case.
8676
0cb7c7b0
SM
86772018-03-01 Simon Marchi <simon.marchi@ericsson.com>
8678
8679 * record.c (get_call_history_modifiers): Return a
8680 record_print_flags.
8681 (cmd_record_call_history): Adjust.
8682 * record-btrace.c (record_btrace_call_history): Adjust.
8683 (record_btrace_call_history_range): Adjust.
8684 (record_btrace_call_history_from): Adjust.
8685 * target-debug.h (target_debug_print_record_print_flags): New.
8686 * target-delegates.c: Re-generate.
8687 * target.c (target_call_history): Change flags type.
8688 (target_call_history_from): Likewise.
8689 (target_call_history_range): Likewise.
8690 * target.h (struct target_ops) <target_call_history>: Likewise.
8691 (target_call_history_from): Likewise.
8692 (target_call_history_range): Likewise.
8693
25e3c82c
SDJ
86942018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
8695 Simon Marchi <simon.marchi@polymtl.ca>
8696
8697 * common/common-utils.c: Include "sys/stat.h".
8698 (is_regular_file): Move here from "source.c"; change return
8699 type to "bool".
8700 * common/common-utils.h (is_regular_file): New prototype.
8701 * common/pathstuff.c (contains_dir_separator): New function.
8702 * common/pathstuff.h (contains_dir_separator): New prototype.
8703 * source.c: Don't include "sys/stat.h".
8704 (is_regular_file): Move to "common/common-utils.c".
8705
b4987c95
SDJ
87062018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
8707
8708 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
8709 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
8710 * auto-load.c: Include "common/pathstuff.h".
8711 * common/common-def.h (current_directory): Move here.
8712 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
8713 function.
8714 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
8715 prototype.
8716 * common/pathstuff.c: New file.
8717 * common/pathstuff.h: New file.
8718 * compile/compile.c: Include "common/pathstuff.h".
8719 * defs.h (current_directory): Move to "common/common-defs.h".
8720 * dwarf2read.c: Include "common/pathstuff.h".
8721 * exec.c: Likewise.
8722 * guile/scm-safe-call.c: Likewise.
8723 * linux-thread-db.c: Likewise.
8724 * main.c: Likewise.
8725 * nto-tdep.c: Likewise.
8726 * objfiles.c: Likewise.
8727 * source.c: Likewise.
8728 * symtab.c: Likewise.
8729 * utils.c: Include "common/pathstuff.h".
8730 (gdb_realpath): Move to "common/pathstuff.c".
8731 (gdb_realpath_keepfile): Likewise.
8732 (gdb_abspath): Likewise.
8733 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
8734 (gdb_realpath_keepfile): Likewise.
8735 (gdb_abspath): Likewise.
8736
f169cfdc
JB
87372018-02-28 John Baldwin <jhb@FreeBSD.org>
8738
8739 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
8740 wildcard process pid for super_resume for kernels with a
8741 specific bug.
8742
e05cac70
PM
87432018-02-27 Phil Muldoon <pmuldoon@redhat.com>
8744
8745 * compile/compile.c (get_args): Add additional comments
8746 explaining function.
8747
55089490
TT
87482018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
8749 Tom Tromey <tom@tromey.com>
8750
8751 * target.h (memory_write_request_s): Remove typedef. Don't define
8752 VEC.
8753 (target_write_memory_blocks): Change argument to std::vector.
8754 (struct memory_write_request): Add constructor.
8755 * target-memory.c (compare_block_starting_address): Return bool.
8756 Change argument types.
8757 (claim_memory): Change arguments to use std::vector.
8758 (split_regular_and_flash_blocks, blocks_to_erase)
8759 (compute_garbled_blocks): Likewise.
8760 (cleanup_request_data, cleanup_write_requests_vector): Remove.
8761 (target_write_memory_blocks): Change argument to std::vector.
8762 * symfile.c (struct load_section_data): Add constructor and
8763 destructor. Use std::vector for "requests".
8764 (struct load_progress_data): Add initializers.
8765 (load_section_callback): Update. Use "new".
8766 (clear_memory_write_data): Remove.
8767 (generic_load): Update.
8768
0c305b61
AH
87692018-02-27 Alan Hayward <alan.hayward@arm.com>
8770
8771 * arch/aarch64.h: Use common/tdesc.h.
8772
c5196c92
MR
87732018-02-26 Maciej W. Rozycki <macro@mips.com>
8774
8775 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
8776 architecture with a 64-bit ABI.
8777
37c33887
MR
87782018-02-26 Maciej W. Rozycki <macro@mips.com>
8779
8780 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
8781 ahead of target description loading.
8782
d4dd3282
TT
87832018-02-26 Tom Tromey <tom@tromey.com>
8784
8785 * stack.c (backtrace_command_1): Update.
8786 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
8787 of "flags".
8788 * python/py-framefilter.c (py_print_frame)
8789 (gdbpy_apply_frame_filter): Change type of "flags".
8790 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
8791 of "flags".
8792 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
8793 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
8794 * extension.h (enum frame_filter_flag): Rename from
8795 frame_filter_flags.
8796 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
8797 (apply_ext_lang_frame_filter): Change type of "flags".
8798 * extension.c (apply_ext_lang_frame_filter): Change type of
8799 "flags".
8800 * extension-priv.h (struct extension_language_ops)
8801 <apply_frame_filter>: Change type of "flags".
8802
6893c19a
TT
88032018-02-26 Tom Tromey <tom@tromey.com>
8804
8805 PR python/16497:
8806 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
8807 off-by-one in py_end computation.
8808 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
8809 PRINT_MORE_FRAMES.
8810 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
8811 constant.
8812
2ddeaf8a
TT
88132018-02-26 Tom Tromey <tom@tromey.com>
8814
8815 * dwarf2read.c (struct variant_field): New.
8816 (struct nextfield) <variant>: New field.
8817 (dwarf2_add_field): Handle DW_TAG_variant_part.
8818 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
8819 discriminated union.
8820 (read_structure_type): Handle DW_TAG_variant_part.
8821 (handle_struct_member_die): New function, extracted from
8822 process_structure_scope. Handle DW_TAG_variant.
8823 (process_structure_scope): Handle discriminated unions. Call
8824 handle_struct_member_die.
8825
c9317f21
TT
88262018-02-26 Tom Tromey <tom@tromey.com>
8827
8828 * rust-lang.h (rust_last_path_segment): Declare.
8829 * rust-lang.c (rust_last_path_segment): Now public. Change
8830 contract.
8831 (struct disr_info): Remove.
8832 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
8833 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
8834 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
8835 (rust_enum_p, rust_enum_variant): New function.
8836 (rust_underscore_fields): Remove "offset" parameter.
8837 (rust_print_enum): New function.
8838 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
8839 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
8840 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
8841 enums.
8842 (rust_internal_print_type): New function, from rust_print_type.
8843 Remove enum code.
8844 (rust_print_type): Call rust_internal_print_type.
8845 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
8846 Update enum handling.
8847 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
8848 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
8849 (rust_union_quirks): New functions.
8850 (process_full_comp_unit, process_full_type_unit): Call
8851 rust_union_quirks.
8852 (process_structure_scope): Update rust_unions if necessary.
8853
7c22600a
TT
88542018-02-26 Tom Tromey <tom@tromey.com>
8855
8856 * value.h (value_union_variant): Declare.
8857 * valops.c (value_union_variant): New function.
8858 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
8859 (struct discriminant_info): New.
8860 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
8861 enumerator.
8862 (struct main_type) <flag_discriminated_union>: New field.
8863
15ce8941
TT
88642018-02-26 Tom Tromey <tom@tromey.com>
8865
8866 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8867 unittests/unpack-selftests.c.
8868 * unittests/unpack-selftests.c: New file.
8869 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
8870
48fbe735
YQ
88712018-02-26 Yao Qi <yao.qi@linaro.org>
8872
8873 * dwarf2read.c (struct partial_die_info) <read>: New method.
8874 (read_partial_die): Remove the declaration.
8875 (load_partial_dies): Update.
8876 (partial_die_info::partial_die_info):
8877 (read_partial_die): Change it to partial_die_info::read.
8878
52356b79
YQ
88792018-02-26 Yao Qi <yao.qi@linaro.org>
8880
8881 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
8882 (fixup_partial_die): Remove declaration.
8883 (scan_partial_symbols): Update.
8884 (partial_die_parent_scope): Likewise.
8885 (partial_die_full_name): Likewise.
8886 (fixup_partial_die): Change it to partial_die_info::fixup.
8887
35cc7ed7
YQ
88882018-02-26 Yao Qi <yao.qi@linaro.org>
8889
8890 * dwarf2read.c (read_partial_die): Update the declaration.
8891 (load_partial_dies): Caller update.
8892 (read_partial_die): Remove one argument abbrev_len.
8893
6f06d47b
YQ
88942018-02-26 Yao Qi <yao.qi@linaro.org>
8895
8896 * dwarf2read.c (struct partial_die_info): Add ctor, delete
8897 assignment operator.
8898 (load_partial_dies): Use ctor and copy ctor.
8899 (read_partial_die): Update.
8900 (dwarf2_cu::find_partial_die): Use ctor.
8901
d590ff25
YQ
89022018-02-26 Yao Qi <yao.qi@linaro.org>
8903
8904 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
8905 (find_partial_die_in_comp_unit): Change it to
8906 dwarf2_cu::find_partial_die.
8907 (find_partial_die): Update.
8908
fd0a254f
YQ
89092018-02-26 Yao Qi <yao.qi@linaro.org>
8910
8911 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
8912 is NULL.
8913
cd9983dd
YQ
89142018-02-26 Yao Qi <yao.qi@linaro.org>
8915
8916 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
8917
f46cd62a
AH
89182018-02-26 Alan Hayward <alan.hayward@arm.com>
8919
8920 * arch/amd64.h: Use common/tdesc.h.
8921 * arch/i386.c: Likewise.
8922 * arch/i386.h: Likewise.
8923 * arch/tic6x.c: Likewise.
8924 * arch/tdesc.h: Move file from here...
8925 * common/tdesc.h: ...to here.
8926 * features/aarch64-core.c: Regenerate.
8927 * features/aarch64-fpu.c: Regenerate.
8928 * features/i386/32bit-avx.c: Regenerate.
8929 * features/i386/32bit-avx512.c: Regenerate.
8930 * features/i386/32bit-core.c: Regenerate.
8931 * features/i386/32bit-linux.c: Regenerate.
8932 * features/i386/32bit-mpx.c: Regenerate.
8933 * features/i386/32bit-pkeys.c: Regenerate.
8934 * features/i386/32bit-sse.c: Regenerate.
8935 * features/i386/64bit-avx.c: Regenerate.
8936 * features/i386/64bit-avx512.c: Regenerate.
8937 * features/i386/64bit-core.c: Regenerate.
8938 * features/i386/64bit-linux.c: Regenerate.
8939 * features/i386/64bit-mpx.c: Regenerate.
8940 * features/i386/64bit-pkeys.c: Regenerate.
8941 * features/i386/64bit-segments.c: Regenerate.
8942 * features/i386/64bit-sse.c: Regenerate.
8943 * features/i386/x32-core.c: Regenerate.
8944 * features/tic6x-c6xp.c: Regenerate.
8945 * features/tic6x-core.c: Regenerate.
8946 * features/tic6x-gp.c: Regenerate.
8947 * target-descriptions.c: Use common/tdesc.h.
8948 * target-descriptions.h: Likewise.
8949
9b292f68
TT
89502018-02-24 Tom Tromey <tom@tromey.com>
8951
8952 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
8953 (try_thread_db_load_from_dir, thread_db_load_search): Use
8954 std::string.
8955 (info_auto_load_libthread_db_compare): Return bool. Change
8956 argument types.
8957 (info_auto_load_libthread_db): Use std::vector, std::string.
8958 Remove cleanups.
8959
281d762b
TT
89602018-02-24 Tom Tromey <tom@tromey.com>
8961
8962 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
8963 std::string.
8964 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
8965 std::string*.
8966 * gdbarch.c: Rebuild.
8967 * gdbarch.h: Rebuild.
8968 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
8969 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
8970 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
8971 std::string*.
8972
9d8780f0
SM
89732018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
8974
8975 * gdbtypes.h (sect_offset): Change type to uint64_t.
8976 (sect_offset_str): New function.
8977 * dwarf2read.c (create_addrmap_from_aranges): Use
8978 sect_offset_str.
8979 (error_check_comp_unit_head): Likewise.
8980 (create_debug_type_hash_table): Likewise.
8981 (read_cutu_die_from_dwo): Likewise.
8982 (init_cutu_and_read_dies): Likewise.
8983 (init_cutu_and_read_dies_no_follow): Likewise.
8984 (process_psymtab_comp_unit_reader): Likewise.
8985 (partial_die_parent_scope): Likewise.
8986 (peek_die_abbrev): Likewise.
8987 (process_queue): Likewise.
8988 (dwarf2_physname): Likewise.
8989 (read_namespace_alias): Likewise.
8990 (read_import_statement): Likewise.
8991 (create_dwo_cu_reader): Likewise.
8992 (create_cus_hash_table): Likewise.
8993 (lookup_dwo_cutu): Likewise.
8994 (inherit_abstract_dies): Likewise.
8995 (read_func_scope): Likewise.
8996 (read_call_site_scope): Likewise.
8997 (dwarf2_add_member_fn): Likewise.
8998 (read_common_block): Likewise.
8999 (read_module_type): Likewise.
9000 (read_typedef): Likewise.
9001 (read_subrange_type): Likewise.
9002 (load_partial_dies): Likewise.
9003 (read_partial_die): Likewise.
9004 (find_partial_die): Likewise.
9005 (read_str_index): Likewise.
9006 (dwarf2_string_attr): Likewise.
9007 (build_error_marker_type): Likewise.
9008 (lookup_die_type): Likewise.
9009 (dump_die_shallow): Likewise.
9010 (follow_die_ref): Likewise.
9011 (dwarf2_fetch_die_loc_sect_off): Likewise.
9012 (dwarf2_fetch_constant_bytes): Likewise.
9013 (follow_die_sig): Likewise.
9014 (get_signatured_type): Likewise.
9015 (get_DW_AT_signature_type): Likewise.
9016 (dwarf2_find_containing_comp_unit): Likewise.
9017 (set_die_type): Likewise.
9018
8ec57239
JB
90192018-02-21 John Baldwin <jhb@FreeBSD.org>
9020
9021 * arch/aarch64.c: Include "common-defs.h".
9022 * arch/amd64.c: Likewise.
9023 * arch/i386.c: Likewise.
9024
3eac2b65
TT
90252018-02-21 Tom Tromey <tom@tromey.com>
9026
9027 * value.h: (extract_field_op): Update.
9028 * eval.c (extract_field_op): Return a const char *.
9029 * expression.h (parse_expression_for_completion): Update.
9030 * completer.c (complete_expression): Update.
9031 (add_struct_fields): Make fieldname const.
9032 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
9033 (mark_completion_tag, parse_exp_in_context_1): Update.
9034 (parse_expression_for_completion): Change "name" to
9035 unique_xmalloc_ptr*.
9036
6ccb583f
TT
90372018-02-21 Tom Tromey <tom@tromey.com>
9038
9039 * infcall.c (call_function_by_hand_dummy): Use std::vector.
9040
c113ed0c
YQ
90412018-02-21 Yao Qi <yao.qi@linaro.org>
9042
9043 * avr-tdep.c (avr_read_pc): Change parameter type to
9044 readable_regcache.
9045 * gdbarch.sh (read_pc): Likewise.
9046 * gdbarch.c: Re-generated.
9047 * gdbarch.h: Re-generated.
9048 * hppa-tdep.c (hppa_read_pc): Change parameter type to
9049 readable_regcache.
9050 * ia64-tdep.c (ia64_read_pc): Likewise.
9051 * mips-tdep.c (mips_read_pc): Likewise.
9052 * spu-tdep.c (spu_read_pc): Likewise.
9053
4c74fe6b
YQ
90542018-02-21 Yao Qi <yao.qi@linaro.org>
9055
9056 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
9057 * regcache-dump.c: New file.
9058 * regcache.c: Move register_dump to regcache-dump.c.
9059 (maintenance_print_registers): Likewise.
9060 (maintenance_print_raw_registers): Likewise.
9061 (maintenance_print_cooked_registers): Likewise.
9062 (maintenance_print_register_groups): Likewise.
9063 (maintenance_print_remote_registers): Likewise.
9064 (_initialize_regcache): Likewise.
9065 * regcache.h (register_dump): Moved from regcache.c.
9066
796bb026
YQ
90672018-02-21 Yao Qi <yao.qi@linaro.org>
9068
9069 * regcache.c (regcache::regcache): Update.
9070 (regcache::invalidate): Move it to detached_regcache::invalidate.
9071 (get_thread_arch_aspace_regcache): Update.
9072 (regcache::raw_update): Update.
9073 (regcache::cooked_read): Remove some code.
9074 (regcache::cooked_read_value): Likewise.
9075 (regcache::raw_write): Remove assert on m_readonly_p.
9076 (regcache::raw_supply_integer): Move it to
9077 detached_regcache::raw_supply_integer.
9078 (regcache::raw_supply_zeroed): Likewise.
9079 * regcache.h (detached_regcache) <raw_supply_integer>: New
9080 declaration.
9081 <raw_supply_zeroed, invalidate>: Likewise.
9082 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
9083 <invalidate>: Likewise.
9084 <m_readonly_p>: Removed.
9085
215c69dc
YQ
90862018-02-21 Yao Qi <yao.qi@linaro.org>
9087
9088 * infcmd.c (get_return_value): Let stop_regs point to
9089 get_current_regcache.
9090 * regcache.c (regcache::regcache): Remove.
9091 (register_dump_reg_buffer): New class.
9092 (regcache_print): Adjust.
9093 * regcache.h (regcache): Remove constructors.
9094
f3384e66
YQ
90952018-02-21 Yao Qi <yao.qi@linaro.org>
9096
9097 * regcache.c (class register_dump): New class.
9098 (register_dump_regcache, register_dump_none): New class.
9099 (register_dump_remote, register_dump_groups): New class.
9100 (regcache_print): Update.
9101 * regcache.h (regcache_dump_what): Move it to regcache.c.
9102 (regcache) <dump>: Remove.
9103
c8ec2f33
YQ
91042018-02-21 Yao Qi <yao.qi@linaro.org>
9105
9106 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
9107 reg_buffer_rw *.
9108 (jit_unwind_reg_set_impl): Call raw_supply.
9109 (jit_frame_sniffer): Use reg_buffer_rw.
9110 * record-full.c (record_full_core_regbuf): Change its type.
9111 (record_full_core_open_1): Use reg_buffer_rw.
9112 (record_full_close): Likewise.
9113 (record_full_core_fetch_registers): Use regcache->raw_supply.
9114 (record_full_core_store_registers): Likewise.
9115 * regcache.c (regcache::get_register_status): Move it to
9116 reg_buffer.
9117 (regcache_raw_set_cached_value): Remove.
9118 (regcache::raw_set_cached_value): Remove.
9119 (regcache::raw_write): Call raw_supply.
9120 (regcache::raw_supply): Move it to reg_buffer_rw.
9121 * regcache.h (regcache_raw_set_cached_value): Remove.
9122 (reg_buffer_rw): New class.
9123
daf6667d
YQ
91242018-02-21 Yao Qi <yao.qi@linaro.org>
9125
9126 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
9127 readonly_detached_regcache.
9128 (dummy_frame_prev_register): Use regcache->cooked_read.
9129 * frame.c (frame_save_as_regcache): Change return type.
9130 (frame_pop): Update.
9131 * frame.h (frame_save_as_regcache): Update declaration.
9132 * inferior.h (get_infcall_suspend_state_regcache): Update
9133 declaration.
9134 * infrun.c (infcall_suspend_state) <registers>: use
9135 readonly_detached_regcache.
9136 (save_infcall_suspend_state): Don't use regcache_dup.
9137 (get_infcall_suspend_state_regcache): Change return type.
9138 * linux-fork.c (struct fork_info) <savedregs>: Change to
9139 readonly_detached_regcache.
9140 <pc>: New field.
9141 (fork_save_infrun_state): Don't use regcache_dup.
9142 (info_checkpoints_command): Adjust.
9143 * mi/mi-main.c (register_changed_p): Update declaration.
9144 (mi_cmd_data_list_changed_registers): Use
9145 readonly_detached_regcache.
9146 (register_changed_p): Change parameter type to
9147 readonly_detached_regcache.
9148 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
9149 readonly_detached_regcache.
9150 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
9151 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
9152 New.
9153 (regcache::save): Move it to reg_buffer.
9154 (regcache::restore): Change parameter type.
9155 (regcache_dup): Remove.
9156 * regcache.h (reg_buffer) <save>: New method.
9157 (readonly_detached_regcache): New class.
9158 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
9159 readonly_detached_regcache.
9160 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
9161
fc5b8736
YQ
91622018-02-21 Yao Qi <yao.qi@linaro.org>
9163
9164 * frame.c (frame_save_as_regcache): Use regcache method save.
9165 (frame_pop): Use regcache method restore.
9166 * infrun.c (restore_infcall_suspend_state): Likewise.
9167 * linux-fork.c (fork_load_infrun_state): Likewise.
9168 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
9169 save.
9170 * regcache.c (regcache_save): Remove.
9171 (regcache::restore): More asserts.
9172 (regcache_cpy): Remove.
9173 * regcache.h (regcache_save): Remove the declaration.
9174 (regcache::restore): Move from private to public.
9175 Remove the friend declaration of regcache_cpy.
9176 (regcache_cpy): Remove declaration.
9177
849d0ba8
YQ
91782018-02-21 Yao Qi <yao.qi@linaro.org>
9179
9180 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
9181 parameter type to 'readable_regcache *'.
9182 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9183 * arm-tdep.c (arm_neon_quad_read): Likewise.
9184 (arm_pseudo_read): Likewise.
9185 * avr-tdep.c (avr_pseudo_register_read): Likewise.
9186 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9187 * frv-tdep.c (frv_pseudo_register_read): Likewise.
9188 * gdbarch.c: Re-generated.
9189 * gdbarch.h: Re-generated.
9190 * gdbarch.sh (pseudo_register_read): Change parameter type to
9191 'readable_regcache *'.
9192 (pseudo_register_read_value): Likewise.
9193 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
9194 (h8300_pseudo_register_read): Likewise.
9195 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
9196 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9197 (i386_pseudo_register_read_into_value): Likewise.
9198 (i386_pseudo_register_read_value): Likewise.
9199 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
9200 declaration.
9201 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
9202 * m32c-tdep.c (m32c_raw_read): Likewise.
9203 (m32c_read_flg): Likewise.
9204 (m32c_banked_register): Likewise.
9205 (m32c_banked_read): Likewise.
9206 (m32c_sb_read): Likewise.
9207 (m32c_part_read): Likewise.
9208 (m32c_cat_read): Likewise.
9209 (m32c_r3r2r1r0_read): Likewise.
9210 (m32c_pseudo_register_read): Likewise.
9211 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9212 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9213 (mep_pseudo_cr64_read): Likewise.
9214 (mep_pseudo_register_read): Likewise.
9215 * mips-tdep.c (mips_pseudo_register_read): Likewise.
9216 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9217 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9218 * regcache.c (regcache::raw_read): Move it to readable_regcache.
9219 (regcache::cooked_read): Likewise.
9220 (regcache::cooked_read_value): Likewise.
9221 (regcache_cooked_read_signed):
9222 (regcache::cooked_read): Likewise.
9223 * regcache.h (readable_regcache): New class.
9224 (regcache): Inherit readable_regcache. Move some methods to
9225 readable_regcache.
9226 * rl78-tdep.c (rl78_pseudo_register_read): Change
9227 parameter type to 'readable_regcache *'.
9228 * rs6000-tdep.c (do_regcache_raw_read): Remove.
9229 (e500_pseudo_register_read): Change parameter type to
9230 'readable_regcache *'.
9231 (dfp_pseudo_register_read): Likewise.
9232 (vsx_pseudo_register_read): Likewise.
9233 (efpr_pseudo_register_read): Likewise.
9234 * s390-tdep.c (s390_pseudo_register_read): Likewise.
9235 * sh-tdep.c (sh_pseudo_register_read): Likewise.
9236 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
9237 (sh64_pseudo_register_read): Likewise.
9238 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9239 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9240 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9241 (spu_pseudo_register_read): Likewise.
9242 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9243 (xtensa_pseudo_register_read): Likewise.
9244
31716595
YQ
92452018-02-21 Yao Qi <yao.qi@linaro.org>
9246
9247 * regcache.c (regcache::regcache): Call reg_buffer ctor.
9248 (regcache::arch): Move it to reg_buffer::arch.
9249 (regcache::register_buffer): Likewise.
9250 (regcache::assert_regnum): Likewise.
9251 (regcache::num_raw_registers): Likewise.
9252 * regcache.h (reg_buffer): New class.
9253 (regcache): Inherit reg_buffer.
9254
7104e59b
SM
92552018-02-20 Simon Marchi <simon.marchi@ericsson.com>
9256
9257 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
9258 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
9259
2d8adcbd
MM
92602018-02-20 Markus Metzger <markus.t.metzger@intel.com>
9261
9262 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
9263
b5884fa7
AH
92642018-02-19 Alan Hayward <alan.hayward@arm.com>
9265
9266 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
9267 (SFILES): Remove common/*.c files.
9268 (COMMON_OBS): Remove some *.o files built from common/*.c files.
9269 * common/common.host: Add common reference.
9270 * configure.ac: Likewise.
9271 * configure: Regenerate.
9272
fd90ace4
YQ
92732018-02-16 Yao Qi <yao.qi@linaro.org>
9274
9275 * block.c (block_namespace_info): Inherit allocate_on_obstack.
9276 (block_initialize_namespace): Use new.
9277 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
9278 (dwarf2_free_objfile): Use delete.
9279 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
9280 (copy_type_recursive): Use new.
9281 * gdb_obstack.h (allocate_on_obstack): New.
9282
85046ae2
YQ
92832018-02-15 Yao Qi <yao.qi@linaro.org>
9284
9285 PR gdb/22849
9286 * inferior.c (exit_inferior_1): Reset inf->control.
9287
355c559b
JB
92882018-02-15 Joel Brobecker <brobecker@adacore.com>
9289
9290 * ada-lang.c (ada_to_fixed_value_create): Delete advance
9291 declaration.
9292
980548fd
PA
92932018-02-14 Pedro Alves <palves@redhat.com>
9294
9295 * frame-unwind.c (frame_unwind_try_unwinder): Always call
9296 frame_cleanup_after_sniffer on exception.
9297
692d6f97
TT
92982018-02-14 Tom Tromey <tom@tromey.com>
9299
9300 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
9301 const.
9302 (solib_bfd_open): Make pathname const.
9303 * solib.c (solib_bfd_open): Make pathname const.
9304 * solib-spu.c (spu_bfd_fopen): Make name const.
9305 (spu_bfd_open): Make pathname const.
9306 * solib-darwin.c (darwin_bfd_open): Make pathname const.
9307 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
9308
e0cc99a6
TT
93092018-02-14 Tom Tromey <tom@tromey.com>
9310
9311 * symfile.c (symfile_bfd_open): Update.
9312 * source.h (openp, source_full_path_of, find_and_open_source):
9313 Change argument type to unique_xmalloc_ptr.
9314 * source.c (openp): Take a unique_xmalloc_ptr.
9315 (source_full_path_of, find_and_open_source): Likewise.
9316 (open_source_file, symtab_to_fullname): Update.
9317 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
9318 unique_xmalloc_ptr.
9319 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
9320 (exec_file_find): Update.
9321 * psymtab.c (psymtab_to_fullname): Update.
9322 * nto-tdep.h (nto_find_and_open_solib): Update.
9323 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
9324 unique_xmalloc_ptr.
9325 * exec.c (exec_file_attach): Update.
9326 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
9327 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
9328
b46a8d7c
TT
93292018-02-14 Tom Tromey <tom@tromey.com>
9330
9331 * solib.c: Include source.h.
9332 * nto-tdep.c: Include source.h.
9333 * mi/mi-cmd-env.c: Include source.h.
9334 * infcmd.c: Include source.h.
9335 * exec.c: Include source.h.
9336 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
9337 (add_path, directory_switch, source_path, init_source_path): Move
9338 declarations...
9339 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
9340 (add_path, directory_switch, source_path, init_source_path):
9341 ...here.
9342
797bc1cb
TT
93432018-02-14 Tom Tromey <tom@tromey.com>
9344
9345 * solist.h (exec_file_find, solib_find): Return
9346 unique_xmalloc_ptr.
9347 (solib_bfd_fopen): Take a const char *.
9348 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
9349 (exec_file_find, solib_find): Likewise.
9350 (solib_bfd_fopen): Do not take ownership of "pathname".
9351 (solib_bfd_open): Use unique_xmalloc_ptr.
9352 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
9353 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
9354 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
9355 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
9356
f98b2e33
JB
93572018-02-14 Joel Brobecker <brobecker@adacore.com>
9358
9359 * ada-lang.c (name_match_type_from_name): Remove reference to
9360 ada_name_for_lookup in function's documentation.
9361 * ada-lang.h (ada_name_for_lookup): Delete declaration.
9362
24b9144d
SM
93632018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
9364
9365 * defs.h (enum openp_flags): New enum.
9366 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
9367 Move to enum openp_flags.
9368 (openp_flags): New enum flags.
9369 (openp): Change parameter type to openp_flags.
9370 * source.c (openp): Change parameter type to openp_flags.
9371 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
9372 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
9373
387cd15b
SM
93742018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
9375
9376 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
9377 per-command.
9378
b303c6f6
AB
93792018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
9380
9381 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
9382 into...
9383 (class dwarf2_queue_guard): ...the destructor of this new class.
9384 (dw2_do_instantiate_symtab): Create instance of the new class
9385 dwarf2_queue_guard, remove cleanup.
9386
9c3630e9
TT
93872018-02-09 Tom Tromey <tom@tromey.com>
9388
9389 * source.c (find_source_lines): Don't reference past the end of
9390 the vector.
9391
c4e12631
MM
93922018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9393
9394 * remote.c (remote_btrace_maybe_reopen): Change error message.
9395 * btrace.c (btrace_enable): Likewise.
9396 (parse_xml_btrace): Likewise.
9397 (parse_xml_btrace_conf): Likewise.
9398
88711fbf
MM
93992018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9400
9401 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
9402 (linux_enable_pt, linux_enable_bts): Call
9403 diagnose_perf_event_open_fail.
9404
17ad2a4f
MM
94052018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9406
9407 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
9408 Remove parameter and change return type. Update callers. Move it.
9409 (linux_enable_bts, linux_enable_pt): Improve error message.
9410 (linux_enable_pt): Remove zero buffer size check.
9411 (linux_enable_btrace): Improve error messages. Remove NULL return
9412 check.
9413
de6242d3
MM
94142018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9415
9416 * btrace.c (btrace_enable): Remove target_supports_btrace call.
9417 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
9418 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
9419 (linux_supports_pt, linux_supports_btrace): Remove.
9420 (linux_enable_bts): Call cpu_supports_bts.
9421 * nat/linux-btrace.h (linux_supports_btrace): Remove.
9422 * remote.c (remote_supports_btrace): Remove.
9423 (init_remote_ops): Remove remote_supports_btrace.
9424 * target-delegates.c: Regenerated.
9425 * target.c (target_supports_btrace): Remove.
9426 * target.h (target_ops) <to_supports_btrace>: Remove
9427 (target_supports_btrace): Remove.
9428 * x86-linux-nat.c (x86_linux_create_target): Remove
9429 linux_supports_btrace.
9430
9ee23a85
MM
94312018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9432
9433 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
9434 btrace failed.
9435 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
9436 exception and use message in own exception.
9437
5c3284c1
MM
94382018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9439
9440 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
9441 (perf_event_pt_event_type): Use gdb_file_up.
9442 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
9443 scoped_fd, and scoped_mmap.
9444
84696f37
MM
94452018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9446
9447 * common/scoped_mmap.h: New.
9448 * unittests/scoped_mmap-selftest.c: New.
9449 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9450 unittests/scoped_mmap-selftest.c.
9451
ea4a0888
MM
94522018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9453
9454 * common/scoped_fd.h: New.
9455 * unittests/scoped_fd-selftest.c: New.
9456 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9457 unittests/scoped_fd-selftest.c.
9458
869e8290
TT
94592018-02-09 Tom Tromey <tom@tromey.com>
9460
9461 * auto-load.c (auto_load_section_scripts): Use
9462 gdb::unique_xmalloc_ptr.
9463
a37a2ae7
TT
94642018-02-09 Tom Tromey <tom@tromey.com>
9465
9466 * auto-load.c (execute_script_contents): Use std::string.
9467
4e725347
JB
94682018-02-09 Joel Brobecker <brobecker@adacore.com>
9469
9470 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
9471 Python function, rather than a new command.
9472
9a897d43
TT
94732018-02-08 Tom Tromey <tom@tromey.com>
9474
9475 * solib.c (solib_find_1): Use std::string.
9476 (solib_bfd_fopen): Use unique_xmalloc_ptr.
9477
58ef3771
TT
94782018-02-08 Tom Tromey <tom@tromey.com>
9479
9480 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
9481
a9abc434
TT
94822018-02-08 Tom Tromey <tom@tromey.com>
9483
9484 * source.c (find_source_lines): Use gdb::def_vector.
9485
84f27c6f
TT
94862018-02-08 Tom Tromey <tom@tromey.com>
9487
9488 * macrocmd.c (struct temporary_macro_definition): New.
9489 (macro_define_command): Use temporary_macro_definition. Remove
9490 cleanups.
9491 (free_macro_definition_ptr): Remove.
9492
0354904b
TT
94932018-02-08 Tom Tromey <tom@tromey.com>
9494
9495 * macroexp.c (maybe_expand): Use std::string.
9496
1739cf24
TT
94972018-02-08 Tom Tromey <tom@tromey.com>
9498
9499 * macroexp.c (struct macro_buffer): Add initializers for some
9500 members.
9501 (init_buffer, init_shared_buffer, free_buffer)
9502 (free_buffer_return_text): Remove.
9503 (macro_buffer): New constructors.
9504 (~macro_buffer): New destructor.
9505 (macro_buffer::set_shared): New method.
9506 (macro_buffer::resize_buffer, macro_buffer::appendc)
9507 (macro_buffer::appendmem): Now methods, not free functions.
9508 (set_token, append_tokens_without_splicing, stringify)
9509 (macro_stringify): Update.
9510 (gather_arguments): Change return type. Remove argc_p argument,
9511 add args_ptr argument. Use std::vector.
9512 (substitute_args): Remove argc argument. Accept std::vector.
9513 (expand): Update. Use std::vector.
9514 (scan, macro_expand, macro_expand_next): Update.
9515
f6c2623e
TT
95162018-02-08 Tom Tromey <tom@tromey.com>
9517
9518 * symtab.c (default_collect_symbol_completion_matches_break_on):
9519 Use unique_xmalloc_ptr.
9520 * macroscope.h: (sal_macro_scope, user_macro_scope)
9521 (default_macro_scope): Return unique_xmalloc_ptr.
9522 * macroscope.c (sal_macro_scope, user_macro_scope)
9523 (default_macro_scope): Return unique_xmalloc_ptr.
9524 * macroexp.h (macro_expand, macro_expand_once): Return
9525 unique_xmalloc_ptr.
9526 * macroexp.c (macro_expand, macro_expand_once): Return
9527 unique_xmalloc_ptr.
9528 * macrocmd.c (macro_expand_command, macro_expand_once_command)
9529 (info_macro_command, info_macros_command): Use
9530 unique_xmalloc_ptr.
9531 * compile/compile-c-support.c (write_macro_definitions): Use
9532 unique_xmalloc_ptr.
9533 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
9534
c2e0e465
SM
95352018-02-07 Simon Marchi <simon.marchi@ericsson.com>
9536
9537 * value.c (value_static_field): Assign field type instead of
9538 containing type when returning an optimized out value.
9539
3f8c94b4
YQ
95402018-02-06 Yao Qi <yao.qi@linaro.org>
9541
9542 * ft32-tdep.c (ft32_read_pc): Remove.
9543 (ft32_write_pc): Remove.
9544 (ft32_gdbarch_init): Update.
9545 * m32r-tdep.c (m32r_read_pc): Remove.
9546 (m32r_gdbarch_init): Update.
9547 * mep-tdep.c (mep_read_pc): Remove.
9548 (mep_gdbarch_init): Update.
9549 * microblaze-tdep.c (microblaze_write_pc): Remove.
9550 (microblaze_gdbarch_init): Update.
9551 * mn10300-tdep.c (mn10300_read_pc): Remove.
9552 (mn10300_write_pc): Remove.
9553 (mn10300_gdbarch_init): Update.
9554 * moxie-tdep.c (moxie_read_pc): Remove.
9555 (moxie_write_pc): Remove.
9556 (moxie_gdbarch_init): Update.
9557
bca65a23
YQ
95582018-02-06 Yao Qi <yao.qi@linaro.org>
9559
9560 * expprint.c (print_subexp_standard): Handle
9561 OP_F77_UNDETERMINED_ARGLIST.
9562 (dump_subexp_body_standard): Likewise.
9563
583e3f90 95642018-02-05 Alan Hayward <alan.hayward@arm.com>
b8df6ca7 9565
583e3f90
YQ
9566 * target-descriptions.c (tdesc_element_visitor) Add empty
9567 implementations.
b8df6ca7
AH
9568 (tdesc_type): Move make_gdb_type from here.
9569 (tdesc_type_builtin): Likewise.
9570 (tdesc_type_vector): Likewise.
9571 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
9572 (make_gdb_type_struct): Move from tdesc_type_with_fields.
9573 (make_gdb_type_union): Likewise.
9574 (make_gdb_type_flags): Likewise.
9575 (make_gdb_type_enum): Likewise.
9576 (make_gdb_type): New function.
9577 (tdesc_register_type): Use static make_gdb_type.
9578
e813d34a
RK
95792018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
9580
9581 * infcmd.c (default_print_one_register_info): Align natural-format
9582 column values consistently one under another.
9583 (pad_to_column): New function.
9584
0eb876f5
JB
95852018-02-05 Joel Brobecker <brobecker@adacore.com>
9586
9587 * dwarf2read.c (dwarf2_physname): Move commment.
9588
0625771b
LS
95892018-02-01 Leszek Swirski <leszeks@google.com>
9590
9591 * varobj.c (varobj_formatted_print_options): Allow recursive
9592 pretty printing if pretty printing is enabled.
9593
59498c30
LS
95942018-02-01 Leszek Swirski <leszeks@google.com>
9595
9596 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
9597 names after a structop as a filename.
9598
2d9e6acb
YQ
95992018-02-01 Yao Qi <yao.qi@linaro.org>
9600
9601 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
9602 (arm_record_coproc_data_proc): Likewise.
9603
df95a9cf
YQ
96042018-02-01 Yao Qi <yao.qi@linaro.org>
9605
9606 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
9607
07e5f5cf
NP
96082018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
9609
9610 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
9611 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
9612
3045b475
PA
96132018-01-31 Pedro Alves <palves@redhat.com>
9614
9615 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
9616 * inflow.c (child_terminal_save_inferior): Wrap reference to
9617 tcgetpgrp in HAVE_TERMIOS_H.
9618 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
9619 _WIN32.
9620 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
9621 always iterate over all inferiors.
9622 (gdbsim_cntrl_c): Adjust.
9623 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
9624
929b5ad4
JB
96252018-01-31 Joel Brobecker <brobecker@adacore.com>
9626
9627 * gdbtypes.c (lookup_array_range_type): Make sure the array's
9628 index type is objfile-owned if the element type is as well.
9629
29236ca2
JB
96302018-01-31 Joel Brobecker <brobecker@adacore.com>
9631
9632 GDB 8.1 released.
9633
c81e8879
PR
96342018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
9635
9636 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
9637 "features/s390x-linux64.c".
9638 (_initialize_s390_linux_tdep): Remove initialization of tdescs
9639 s390_linux32 and s390x_linux64.
9640 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
9641 default tdesc.
9642 * s390-tdep.c: Include "features/s390-linux32.c" and
9643 "features/s390x-linux64.c".
9644 (s390_tdesc_valid): Add check for tdesc_has_registers.
9645 (s390_gdbarch_init): Make sure there is always a valid tdesc.
9646 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
9647 tdesc_s390x_linux64.
9648 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
9649 tdesc_s390x_linux64 to...
9650 * s390-tdep.h: ...here.
9651
e671cd59
PA
96522018-01-30 Pedro Alves <palves@redhat.com>
9653
9654 PR gdb/13211
9655 * config.in, configure: Regenerate.
9656 * configure.ac: Check for getpgid.
9657 * go32-nat.c (go32_pass_ctrlc): New.
9658 (go32_target): Install it.
9659 * inf-child.c (inf_child_target): Install
9660 child_terminal_save_inferior, child_pass_ctrlc and
9661 child_interrupt.
9662 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
9663 (inf_ptrace_target): No longer install it.
9664 * infcmd.c (interrupt_target_1): Adjust.
9665 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
9666 (child_interrupt): Declare.
9667 (inferior::terminal_state): New.
9668 * inflow.c (struct terminal_info): Update comments.
9669 (inferior_process_group): Delete.
9670 (terminal_is_ours): Delete.
9671 (gdb_tty_state): New.
9672 (child_terminal_init): Adjust.
9673 (is_gdb_terminal, sharing_input_terminal_1)
9674 (sharing_input_terminal): New functions.
9675 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
9676 Set the process's actual process group in the foreground if
9677 possible. Handle is_ours_for_output/is_ours distinction. Don't
9678 mark terminal as the inferior's if not sharing GDB's terminal.
9679 Don't check attach_flag.
9680 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
9681 pass down a target_terminal_state.
9682 (child_terminal_save_inferior): New, factored out from ...
9683 (child_terminal_ours_1): ... this. Handle
9684 target_terminal_state::is_ours_for_output.
9685 (child_interrupt, child_pass_ctrlc): New.
9686 (inflow_inferior_exit): Clear the inferior's terminal_state.
9687 (copy_terminal_info): Copy the inferior's terminal state.
9688 (_initialize_inflow): Remove reference to terminal_is_ours.
9689 * inflow.h (inferior_process_group): Delete.
9690 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
9691 * procfs.c (procfs_target): Don't install procfs_interrupt.
9692 (procfs_interrupt): Delete.
9693 * remote.c (remote_serial_quit_handler): Adjust.
9694 (remote_interrupt): Remove ptid parameter. Adjust.
9695 * target-delegates.c: Regenerate.
9696 * target.c: Include "terminal.h".
9697 (target_terminal::terminal_state): Rename to ...
9698 (target_terminal::m_terminal_state): ... this.
9699 (target_terminal::init): Adjust.
9700 (target_terminal::inferior): Adjust to per-inferior
9701 terminal_state.
9702 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
9703 (target_terminal::ours, target_terminal::ours_for_output): Use
9704 target_terminal_is_ours_kind.
9705 (target_interrupt): Remove ptid parameter. Adjust.
9706 (default_target_pass_ctrlc): Adjust.
9707 * target.h (target_ops::to_terminal_save_inferior): New field.
9708 (target_ops::to_interrupt): Remove ptid_t parameter.
9709 (target_interrupt): Remove ptid_t parameter. Update comment.
9710 (target_pass_ctrlc): Update comment.
9711 * target/target.h (target_terminal_state): New scoped enum,
9712 factored out of ...
9713 (target_terminal::terminal_state): ... here.
9714 (target_terminal::inferior): Update comments.
9715 (target_terminal::restore_inferior): New.
9716 (target_terminal::is_inferior, target_terminal::is_ours)
9717 (target_terminal::is_ours_for_output): Adjust.
9718 (target_terminal::scoped_restore_terminal_state): Adjust to
9719 rename, and call restore_inferior() instead of inferior().
9720 (target_terminal::scoped_restore_terminal_state::m_state): Change
9721 type.
9722 (target_terminal::terminal_state): Rename to ...
9723 (target_terminal::m_terminal_state): ... this and change type.
9724
9c3a5d93
PA
97252018-01-30 Pedro Alves <palves@redhat.com>
9726
9727 * linux-nat.c (wait_for_signal): New function.
9728 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
9729 directly.
9730 (async_terminal_is_ours)
9731 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
9732 (linux_nat_add_target): Don't override
9733 to_terminal_inferior/to_terminal_ours.
9734
69ab5edb
SDJ
97352018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
9736
9737 * remote.c (remote_follow_fork): Don't call "detach_inferior".
9738
fc8e7e75
SM
97392018-01-28 Simon Marchi <simon.marchi@ericsson.com>
9740
9741 * dwarf2read.c (free_dwo_files): Add forward-declaration.
9742 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
9743 dwarf2_per_objfile_free here.
9744 (dwarf2_per_objfile_free): Remove.
9745 (_initialize_dwarf2_read): Don't register
9746 dwarf2_per_objfile_free as a registry cleanup.
9747
b2a426e2
EZ
97482018-01-27 Eli Zaretskii <eliz@gnu.org>
9749
9750 Avoid compilation errors in MinGW native builds
9751
9752 The error is triggered by including python-internal.h, and the
9753 error message is:
9754
9755 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
9756 from build-gnulib/import/math.h:27,
9757 from d:/usr/Python26/include/pyport.h:235,
9758 from d:/usr/Python26/include/Python.h:58,
9759 from python/python-internal.h:94,
9760 from python/py-arch.c:24:
9761 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
9762 using ::hypot;
9763 ^~~~~
9764
9765 This happens because Python headers define 'hypot' to expand t
9766 '_hypot' in the Windows builds.
9767 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
9768 'hypoth'. This avoids a compilation error.
9769
0bdd8eac
AH
97702018-01-26 Alan Hayward <alan.hayward@arm.com>
9771
9772 * MAINTAINERS (Write After Approval): Fix ordering.
9773
56ae9dc3
AH
97742018-01-26 Alan Hayward <alan.hayward@arm.com>
9775
9776 * MAINTAINERS (Write After Approval): Add Alan Hayward.
9777
7433498b
AM
97782018-01-26 Alan Modra <amodra@gmail.com>
9779
9780 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
9781 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
9782 Remove nop. Make const. Comment.
9783 (powerpc32_plt_stub_so_2): New.
9784 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
9785 Correct count. Update uses.
9786 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
9787 Move common code reading PLT entry word. Correct
9788 powerpc32_plt_stub PLT address calculation.
9789 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
9790 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
9791 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
9792 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
9793 (ppc64_standard_linkage8): Likewise.
9794 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
9795 Correct insns description.
9796 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
9797
0f59d5fc
PA
97982018-01-24 Pedro Alves <palves@redhat.com>
9799
9800 GCC PR libstdc++/83906
9801 * gdbtypes.c (operator==(const dynamic_prop &,
9802 const dynamic_prop &)): New.
9803 (operator==(const range_bounds &, const range_bounds &)): New.
9804 (check_types_equal): Use them instead of memcmp.
9805 * gdbtypes.h (operator==(const dynamic_prop &,
9806 const dynamic_prop &)): Declare.
9807 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
9808 (operator==(const range_bounds &, const range_bounds &)): Declare.
9809 (operator!=(const range_bounds &, const range_bounds &)): Declare.
9810
ef8914a4
PR
98112018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9812
9813 * s390-linux-tdep.c (s390_record_address_mask)
9814 (s390_record_calc_disp_common, s390_record_calc_disp)
9815 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
9816 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
9817 (s390_process_record): Move to s390-tdep.c.
9818 (s390_linux_init_abi_any): Adjust.
9819 * s390-tdep.c (s390_record_address_mask)
9820 (s390_record_calc_disp_common, s390_record_calc_disp)
9821 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
9822 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
9823 (s390_process_record): Moved from s390-linux-tdep.c
9824 (s390_gdbarch_init): Adjust.
9825
d6e58945
PR
98262018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9827
9828 * s390-linux-nat.c (s390-tdep.h): New include.
9829 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
9830 (HFILES_NO_SRCDIR): Add s390-tdep.h.
9831 (ALLDEPFILES): Add s390-tdep.c.
9832 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
9833 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
9834 * s390-tdep.h: ...this. New file.
9835 * s390-linux-tdep.c (s390-tdep.h): New include.
9836 (_initialize_s390_tdep): Rename to...
9837 (_initialize_s390_linux_tdep): ...this and adjust.
9838 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
9839 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
9840 s390-tdep.h.
9841 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
9842 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
9843 (s390_is_partial_instruction, s390_software_single_step)
9844 (is_non_branch_ril, s390_displaced_step_copy_insn)
9845 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
9846 (s390_prologue_data, s390_addr, s390_store, s390_load)
9847 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
9848 (s390_register_call_saved, s390_guess_tracepoint_registers)
9849 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
9850 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
9851 (s390_pseudo_register_name, s390_pseudo_register_type)
9852 (s390_pseudo_register_read, s390_pseudo_register_write)
9853 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
9854 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
9855 (s390_addr_bits_remove, s390_address_class_type_flags)
9856 (s390_address_class_type_flags_to_name)
9857 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
9858 (s390_function_arg_float, s390_function_arg_vector)
9859 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
9860 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
9861 (s390_frame_align, s390_register_return_value, s390_return_value)
9862 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
9863 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
9864 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
9865 (s390_trad_frame_prev_register, s390_unwind_cache)
9866 (s390_prologue_frame_unwind_cache)
9867 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
9868 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
9869 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
9870 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
9871 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
9872 (s390_frame_base_address, s390_local_base_address)
9873 (s390_frame_base, s390_gcc_target_options)
9874 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
9875 (s390_validate_reg_range, s390_tdesc_valid)
9876 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
9877 * s390-tdep.c: ...this. New file.
9878
9c0b896e
PR
98792018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9880
9881 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
9882 (s390_process_record, s390_gdbarch_tdep_alloc)
9883 (s390_linux_init_abi_any): Use/set new hook.
9884
7042632b
PR
98852018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9886
9887 * s390-linux-tdep.c (osabi.h): New include.
9888 (s390_linux_init_abi_31, s390_linux_init_abi_64)
9889 (s390_linux_init_abi_any): New functions.
9890 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
9891
650f5e13
PR
98922018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9893
9894 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
9895 tdesc_has_registers check
9896
47c9317e
PR
98972018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9898
9899 * s390-linux-tdep.c (s390_tdesc_valid): New function.
9900 (s390_validate_reg_range): New macro.
9901 (s390_gdbarch_init): Adjust.
9902
095085d8
PR
99032018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9904
9905 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
9906 (s390_gdbarch_tdep_alloc): Adjust.
9907 (s390_gdbarch_init): Adjust.
9908
ab9bcc67
PR
99092018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9910
9911 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
9912 <have_tdb>: Change type to bool.
9913 (s390_gdbarch_tdep_alloc): Adjust.
9914 (s390_gdbarch_init): Adjust.
9915
21f6f5ff
PR
99162018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9917
9918 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
9919 (gdbarch_tdep) <have_upper, have_vx>: New fields.
9920 (s390_gdbarch_tdep_alloc): New function.
9921 (s390_gdbarch_init): Allocate tdep at start and use its fields
9922 instead of separate variables.
9923
0eb97953
PR
99242018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9925
9926 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
9927 when looking for cached gdbarch and add comment for remaining.
9928
5c319bb2
PA
99292018-01-22 Pedro Alves <palves@redhat.com>
9930 Sergio Durigan Junior <sergiodj@redhat.com>
9931
9932 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
9933 case.
9934
d65ce302
MR
99352018-01-22 Maciej W. Rozycki <macro@mips.com>
9936
9937 * MAINTAINERS: Update my company e-mail address.
9938
ec7a5fcb
YQ
99392018-01-22 Yao Qi <yao.qi@linaro.org>
9940
9941 * regcache.c (cooked_write_test): New function.
9942 (_initialize_regcache): Register the test.
9943
11f57cb6
YQ
99442018-01-22 Yao Qi <yao.qi@linaro.org>
9945
9946 * ia64-tdep.c (ia64_pseudo_register_read): Call
9947 regcache->cooked_read instead of regcache_cooked_read_unsigned.
9948 * m32c-tdep.c (m32c_cat_read): Likewise.
9949 (m32c_r3r2r1r0_read): Likewise.
9950 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9951 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9952
03f50fc8
YQ
99532018-01-22 Yao Qi <yao.qi@linaro.org>
9954
9955 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
9956 method raw_read instead of regcache_raw_read.
9957 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9958 * arm-tdep.c (arm_neon_quad_read): Likewise.
9959 * avr-tdep.c (avr_pseudo_register_read): Likewise.
9960 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9961 * frv-tdep.c (frv_pseudo_register_read): Likewise.
9962 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
9963 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9964 (i386_pseudo_register_read_into_value): Likewise.
9965 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9966 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9967 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9968 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
9969 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
9970 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9971 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9972 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9973 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
9974
dc711524
YQ
99752018-01-22 Yao Qi <yao.qi@linaro.org>
9976
9977 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
9978 * configure.tgt: Remove target mt.
9979 * mt-tdep.c: Remove.
9980 * regcache.c (cooked_read_test): Remove the check for mt.
9981
3f5a868b
YQ
99822018-01-22 Yao Qi <yao.qi@linaro.org>
9983
9984 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
9985 instead of gdbarch_pseudo_register_read_value.
9986
de4cb04a
JB
99872018-01-22 Joel Brobecker <brobecker@adacore.com>
9988
9989 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
9990 language is Ada.
9991
a9e40818
JB
99922018-01-22 Joel Brobecker <brobecker@adacore.com>
9993
9994 * linespec.c (create_sals_line_offset): Remove code that preserved
9995 the symtab_and_line's line number.
9996
e707fc44
AB
99972018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9998
9999 * varobj.c (varobj_create): Don't set valid_block when creating a
10000 floating varobj.
10001
03d0bf7b
AB
100022018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10003
10004 * varobj.c (varobj_create): Remove out of date comment.
10005
ae451627
AB
100062018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10007
10008 PR mi/20395
10009 * ada-exp.y (write_var_from_sym): Pass extra parameter when
10010 updating innermost block.
10011 * parse.c (innermost_block_tracker::update): Take extra type
10012 parameter, and check types match before updating innermost block.
10013 (write_dollar_variable): Update innermost block for registers.
10014 * parser-defs.h (enum innermost_block_tracker_type): New enum.
10015 (innermost_block_tracker::innermost_block_tracker): Initialise
10016 m_types member.
10017 (innermost_block_tracker::reset): Take type parameter.
10018 (innermost_block_tracker::update): Take type parameter, and pass
10019 type through as needed.
10020 (innermost_block_tracker::m_types): New member.
10021 * varobj.c (varobj_create): Pass type when reseting innermost
10022 block.
10023
aee1fcdf
AB
100242018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10025
10026 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
10027 * ada-lang.c (resolve_subexp): Likewise.
10028 * breakpoint.c (set_breakpoint_condition) Likewise.
10029 (watch_command_1) Likewise.
10030 * c-exp.y (variable): Likewise.
10031 * d-exp.y (PrimaryExpression): Likewise.
10032 * f-exp.y (variable): Likewise.
10033 * go-exp.y (variable): Likewise.
10034 * m2-exp.y (variable): Likewise.
10035 * objfiles.c (objfile::~objfile): Likewise.
10036 * p-exp.y (variable): Likewise.
10037 * parse.c (innermost_block): Change type.
10038 * parser-defs.h (class innermost_block_tracker): New.
10039 (innermost_block): Change to innermost_block_tracker.
10040 * printcmd.c (display_command): Switch to innermost_block API.
10041 (do_one_display): Likewise.
10042 * rust-exp.y (do_one_display): Likewise.
10043 * symfile.c (clear_symtab_users): Likewise.
10044 * varobj.c (varobj_create): Switch to innermost_block API, replace
10045 use of innermost_block with block stored on varobj object.
10046
396af9a1
AB
100472018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10048
10049 * expression.h (innermost_block): Remove declaration.
10050 * varobj.c: Add 'parser-defs.h' include.
10051
fcfcc376
TT
100522018-01-19 Tom Tromey <tom@tromey.com>
10053
10054 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
10055 symbols in the static and global blocks.
10056
5a6c3296
JC
100572018-01-19 James Clarke <jrtc27@jrtc27.com>
10058
10059 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
10060 gdb_ptrace.h, and move including gdb_wait.h ...
10061 * nat/linux-ptrace.h: ... to here.
10062
bc09b0c1
SM
100632018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10064
10065 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
10066 inf_ptrace_detach_success.
10067 (inf_ptrace_detach_success): Add inferior parameter, use it
10068 instead of inferior_ptid, pass it to detach_inferior.
10069 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
10070 parameter.
10071 * inferior.c (detach_inferior): Add overload that takes an
10072 inferior object.
10073 * inferior.h (detach_inferior): Likewise.
10074 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
10075 use inferior_ptid, adjust call to inf_ptrace_detach_success.
10076 * linux-thread-db.c (thread_db_detach): Use inf parameter.
10077
6e1e1966
SM
100782018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10079
10080 * target.h (struct target_ops) <to_detach>: Add inferior
10081 parameter.
10082 (target_detach): Likewise.
10083 * target.c (dispose_inferior): Pass inferior down.
10084 (target_detach): Pass inferior down. Assert that it is equal to
10085 the current inferior.
10086 * aix-thread.c (aix_thread_detach): Pass inferior down.
10087 * corefile.c (core_file_command): Pass current_inferior() down.
10088 * corelow.c (core_detach): Add inferior parameter.
10089 * darwin-nat.c (darwin_detach): Likewise.
10090 * gnu-nat.c (gnu_detach): Likewise.
10091 * inf-ptrace.c (inf_ptrace_detach): Likewise.
10092 * infcmd.c (detach_command): Pass current_inferior() down to
10093 target_detach.
10094 * infrun.c (follow_fork_inferior): Pass parent_inf to
10095 target_detach.
10096 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
10097 target_detach.
10098 * linux-nat.c (linux_nat_detach): Add inferior parameter.
10099 * linux-thread-db.c (thread_db_detach): Likewise.
10100 * nto-procfs.c (procfs_detach): Likewise.
10101 * procfs.c (procfs_detach): Likewise.
10102 * record.c (record_detach): Likewise.
10103 * record.h (struct inferior): Forward-declare.
10104 (record_detach): Add inferior parameter.
10105 * remote-sim.c (gdbsim_detach): Likewise.
10106 * remote.c (remote_detach_1): Likewise.
10107 (remote_detach): Likewise.
10108 (extended_remote_detach): Likewise.
10109 * sol-thread.c (sol_thread_detach): Likewise.
10110 * target-debug.h (target_debug_print_inferior_p): New macro.
10111 * target-delegates.c: Re-generate.
10112 * top.c (kill_or_detach): Pass inferior down to target_detach.
10113 * windows-nat.c (windows_detach): Add inferior parameter.
10114
6bd6f3b6
SM
101152018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10116
10117 * target.h (struct target_ops) <to_detach>: Remove args
10118 parameter.
10119 (target_detach): Likewise.
10120 * target.c (dispose_inferior): Adjust.
10121 (target_detach): Remove args parameter, adjust.
10122 * aix-thread.c (aix_thread_detach): Adjust.
10123 * corefile.c (core_file_command): Adjust.
10124 * corelow.c (core_detach): Adjust.
10125 * darwin-nat.c (darwin_detach): Adjust.
10126 * gnu-nat.c (gnu_detach): Adjust.
10127 * inf-ptrace.c (inf_ptrace_detach): Adjust.
10128 * infcmd.c (detach_command): Adjust
10129 * infrun.c (follow_fork_inferior): Adjust.
10130 (handle_vfork_child_exec_or_exit): Adjust.
10131 * linux-fork.c (linux_fork_detach): Remove args parameter.
10132 * linux-fork.h (linux_fork_detach): Likewise.
10133 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
10134 * linux-thread-db.c (thread_db_detach): Likewise.
10135 * nto-procfs.c (procfs_detach): Likewise.
10136 * procfs.c (procfs_detach): Likewise.
10137 (do_detach): Remove signo parameter.
10138 * record.c (record_detach): Remove args parameter.
10139 * record.h (record_detach): Likewise.
10140 * remote-sim.c (gdbsim_detach): Likewise.
10141 * remote.c (remote_detach_1): Likewise.
10142 (remote_detach): Likewise.
10143 (extended_remote_detach): Likewise.
10144 * sol-thread.c (sol_thread_detach): Likewise.
10145 * target-delegates.c: Re-generate.
10146 * top.c (struct qt_args) <args>: Remove field.
10147 (kill_or_detach): Don't pass args.
10148 (quit_force): Don't set args.
10149 * windows-nat.c (windows_detach): Remove args parameter.
10150
88af8ea8
YQ
101512018-01-19 Yao Qi <yao.qi@linaro.org>
10152
10153 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
10154 (arm_linux_init_abi): Install it.
10155
dea445b9
YQ
101562018-01-19 Yao Qi <yao.qi@linaro.org>
10157
10158 * osabi.c (gdb_osabi_names): Extend the regexp for
10159 arm-linux-gnueabihf.
10160
4a17f768
YQ
101612018-01-18 Yao Qi <yao.qi@linaro.org>
10162
10163 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
10164 m_abbrevs.
10165 (abbrev_table::add_abbrev): Update.
10166 (abbrev_table::lookup_abbrev): Update.
10167
d679c21a
YQ
101682018-01-18 Yao Qi <yao.qi@linaro.org>
10169
10170 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
10171
7d937cad
SDJ
101722018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
10173
10174 * compile/compile.c (compile_to_object): Convert "triplet_rx"
10175 to "std::string".
10176
9e14690d
TT
101772018-01-17 Tom Tromey <tom@tromey.com>
10178
10179 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
10180
50a82047
TT
101812018-01-17 Tom Tromey <tom@tromey.com>
10182
10183 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
10184 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
10185 (create_array_type_with_stride): Update.
10186 * dwarf2read.c (set_die_type): Update.
10187
c89b44cd
TT
101882018-01-17 Tom Tromey <tom@tromey.com>
10189
10190 * dwarf2read.c (delayed_method_info): Remove typedef.
10191 (dwarf2_cu::method_info): Now a std::vector.
10192 (add_to_method_list): Update.
10193 (free_delayed_list): Remove.
10194 (compute_delayed_physnames): Update.
10195 (process_full_comp_unit, process_full_type_unit): Clear the method
10196 list. Remove cleanups.
10197 (psymtab_include_file_name): Add name_holder parameter. Use
10198 unique_xmalloc_ptr.
10199 (dwarf_decode_lines): Update.
10200
fcd3b13d
SM
102012018-01-17 Tom Tromey <tom@tromey.com>
10202 Simon Marchi <simon.marchi@ericsson.com>
10203
10204 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
10205 (dwarf2_per_objfile::free_cached_comp_units)
10206 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10207 (init_cutu_and_read_dies_no_follow): Update.
10208 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
10209 (dwarf2_cu::~dwarf2_cu): New.
10210 (free_heap_comp_unit, free_stack_comp_unit): Remove.
10211 (age_cached_comp_units, free_one_cached_comp_unit): Update.
10212
685af9cd
TT
102132018-01-17 Tom Tromey <tom@tromey.com>
10214 Simon Marchi <simon.marchi@ericsson.com>
10215
10216 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
10217 (struct die_reader_specs) <abbrev_table>: New member.
10218 (struct abbrev_table): Add constructor.
10219 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
10220 <abbrev_obstack>: Now an auto_obstack.
10221 (abbrev_table_up): New typedef.
10222 (init_cu_die_reader): Add abbrev_table parameter.
10223 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
10224 Add result_dwo_abbrev_table.
10225 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10226 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
10227 Update.
10228 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
10229 parameter.
10230 (skip_children): Update.
10231 (abbrev_table::alloc_abbrev): Rename from
10232 abbrev_table_alloc_abbrev.
10233 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
10234 (abbrev_table::lookup_abbrev): Rename from
10235 abbrev_table_lookup_abbrev.
10236 (abbrev_table_read_table): Return abbrev_table_up.
10237 (abbrev_table_free, abbrev_table_free_cleanup)
10238 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
10239 (load_partial_dies): Update.
10240
5e2db402
TT
102412018-01-17 Tom Tromey <tom@tromey.com>
10242
10243 * dwarf2read.c (dwarf2_compute_name): Update comment.
10244 (read_func_scope, read_variable): Update.
10245 (new_symbol): Remove.
10246 (new_symbol_full): Rename to new_symbol.
10247
ee7f689e 102482018-01-17 Mike Gulick <mgulick@mathworks.com>
41667530
MG
10249
10250 PR gdb/16577
10251 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
10252 a warning instead of throwing an error, set section size to 0 and return
10253 NULL.
10254 * gdb_bfd.h (gdb_bfd_map_section): Update description.
10255
4d9b86e1
SM
102562018-01-17 Simon Marchi <simon.marchi@ericsson.com>
10257
10258 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
10259 std::string.
10260 (linux_ptrace_attach_fail_reason_string): Likewise.
10261 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
10262 Likewise.
10263 (linux_ptrace_attach_fail_reason_string): Likewise.
10264 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
10265
a7b2d0fb
SM
102662018-01-17 Simon Marchi <simon.marchi@ericsson.com>
10267
10268 * linux-nat.c (linux_nat_attach): Remove xstrdup.
10269
f517c180
EA
102702018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
10271
10272 PR gdb/21559
10273 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
10274 checking for fs_base/gs_base fields in struct user_regs_struct.
10275 * configure: Regenerate.
10276
7045b1ca
YQ
102772018-01-17 Yao Qi <yao.qi@linaro.org>
10278
10279 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
10280 function.
10281 (aarch64_linux_init_abi): Install it to gdbarch hook
10282 gcc_target_options.
10283
db422fb2
PA
102842018-01-15 Pedro Alves <palves@redhat.com>
10285
10286 * common/signals-state-save-restore.c
10287 (save_original_signals_state): Fix typos.
10288
ba643918
SDJ
102892017-01-12 Tom Tromey <tom@tromey.com>
10290 Sergio Durigan Junior <sergiodj@redhat.com>
10291
10292 * Makefile.in (install-only): Install gdb-add-index.
10293
906b4aac
JB
102942018-01-12 John Baldwin <jhb@FreeBSD.org>
10295
10296 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
10297
bdf2a94a
AA
102982018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
10299
10300 * infrun.c (keep_going_pass_signal): Clear step-over info when
10301 insert_breakpoints fails.
10302
71d378ae
PA
103032018-01-11 Pedro Alves <palves@redhat.com>
10304
10305 PR gdb/22583
10306 * infrun.c (resume): Rename to ...
10307 (resume_1): ... this.
10308 (resume): Reimplement as wrapper around resume_1.
10309
3cada740
PA
103102018-01-11 Pedro Alves <palves@redhat.com>
10311
10312 PR remote/22597
10313 * remote.c (remote_parse_stop_reply): Default to the last-set
10314 general thread instead of to 'magic_null_ptid'.
10315
618daa93
PA
103162018-01-10 Pedro Alves <palves@redhat.com>
10317
10318 * language.h (language_get_symbol_name_matcher): Rename ...
10319 (get_symbol_name_matcher): ... this.
10320 * language.c (language_get_symbol_name_matcher): Ditto.
10321 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
10322 callers adjusted.
10323
c63d3e8d
PA
103242018-01-10 Pedro Alves <palves@redhat.com>
10325
10326 PR gdb/22670
10327 * dwarf2read.c
10328 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
10329 Adjust to use language_get_symbol_name_matcher instead of
10330 language_defn::la_get_symbol_name_matcher.
10331 * language.c (language_get_symbol_name_matcher): If in Ada mode
10332 and the lookup name is a verbatim match, return Ada's matcher.
10333 * language.h (language_get_symbol_name_matcher): Adjust comment.
10334 (ada_lookup_name_info::verbatim_p):: New method.
10335
d4c2a405
PA
103362018-01-10 Pedro Alves <palves@redhat.com>
10337
10338 PR gdb/22670
10339 * ada-lang.c (ada_collect_symbol_completion_matches): If the
10340 minsym's language is language_auto or language_cplus, pass down
10341 language_ada instead.
10342 * symtab.c (compare_symbol_name): Don't frob symbol language here.
10343
8825213e
PA
103442018-01-10 Pedro Alves <palves@redhat.com>
10345
10346 PR gdb/22670
10347 * minsyms.c (linkage_name_str): New function.
10348 (iterate_over_minimal_symbols): Use it.
10349
2d97a5d9
JB
103502018-01-09 John Baldwin <jhb@FreeBSD.org>
10351
10352 * NEWS: Document that 'info proc' now works on FreeBSD.
10353
92fce24d
JB
103542018-01-09 John Baldwin <jhb@FreeBSD.org>
10355
10356 * configure.ac: Check for kinfo_getfile in libutil.
10357 * configure: Regenerate.
10358 * config.in: Regenerate.
10359 * fbsd-nat.c: Include "fbsd-tdep.h".
10360 (fbsd_fetch_cmdline): New.
10361 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
10362 rather than calling error.
10363 (fbsd_info_proc): New.
10364 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
10365 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
10366 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
10367
262f62f5
JB
103682018-01-09 John Baldwin <jhb@FreeBSD.org>
10369
10370 * fbsd-nat.c (struct free_deleter): Remove.
10371 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
10372
b999e203
JB
103732018-01-09 John Baldwin <jhb@FreeBSD.org>
10374
10375 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
10376 NULL for an empty pathname.
10377
d2176225
JB
103782018-01-09 John Baldwin <jhb@FreeBSD.org>
10379
10380 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
10381 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
10382 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
10383 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
10384 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
10385 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
10386 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
10387 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
10388 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
10389 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
10390 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
10391 (fbsd_core_fetch_timeval, fbsd_print_sigset)
10392 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
10393 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
10394 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
10395
9c4ac400
ST
103962018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
10397
10398 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
10399 (gnu_xfer_auxv): New function.
10400 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
10401 TARGET_OBJECT_AUXV.
10402
1e5ded6c
YQ
104032018-01-08 Yao Qi <yao.qi@linaro.org>
10404 Simon Marchi <simon.marchi@ericsson.com>
10405
10406 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
10407 common/selftest.c.
10408 (COMMON_OBS): Remove selftest.o.
10409 * configure.ac: Append selftest-arch.c and common/selftest.c to
10410 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
10411 * configure: Re-generated.
10412 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
10413 GDB_SELF_TEST.
10414 (maintenance_info_selftests): Likewise.
10415
04bafb1e
XR
104162018-01-08 Xavier Roirand <roirand@adacore.com>
10417
10418 * ada-valprint.c (val_print_packed_array_elements): Use
10419 proper number of elements when printing an array indexed
10420 by an enumeration type.
10421
518817b3
SM
104222018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10423
10424 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
10425 (dw2_get_file_names_reader): Adjust.
10426 (lookup_dwo_signatured_type): Adjust.
10427 (lookup_dwp_signatured_type): Adjust.
10428 (lookup_signatured_type): Adjust.
10429 (create_type_unit_group): Adjust.
10430 (get_type_unit_group): Adjust.
10431 (process_psymtab_comp_unit_reader): Adjust.
10432 (build_type_psymtabs_reader): Adjust.
10433 (scan_partial_symbols): Adjust.
10434 (add_partial_symbol): Adjust.
10435 (add_partial_subprogram): Adjust.
10436 (peek_die_abbrev): Adjust.
10437 (fixup_go_packaging): Adjust.
10438 (process_imported_unit_die): Adjust.
10439 (dwarf2_compute_name): Adjust.
10440 (dwarf2_physname): Adjust.
10441 (read_import_statement): Adjust.
10442 (handle_DW_AT_stmt_list): Adjust.
10443 (read_file_scope): Adjust.
10444 (read_func_scope): Adjust.
10445 (read_lexical_block_scope): Adjust.
10446 (read_call_site_scope): Adjust.
10447 (read_variable): Adjust.
10448 (dwarf2_rnglists_process): Adjust.
10449 (dwarf2_ranges_process): Adjust.
10450 (dwarf2_ranges_read): Adjust.
10451 (dwarf2_get_pc_bounds): Adjust.
10452 (dwarf2_record_block_ranges): Adjust.
10453 (dwarf2_add_field): Adjust.
10454 (dwarf2_add_member_fn): Adjust.
10455 (read_structure_type): Adjust.
10456 (process_structure_scope): Adjust.
10457 (read_enumeration_type): Adjust.
10458 (read_array_type): Adjust.
10459 (mark_common_block_symbol_computed): Adjust.
10460 (read_common_block): Adjust.
10461 (read_namespace_type): Adjust.
10462 (read_namespace): Adjust.
10463 (read_module_type): Adjust.
10464 (read_tag_pointer_type): Adjust.
10465 (read_tag_ptr_to_member_type): Adjust.
10466 (read_tag_string_type): Adjust.
10467 (read_subroutine_type): Adjust.
10468 (read_typedef): Adjust.
10469 (read_base_type): Adjust.
10470 (attr_to_dynamic_prop): Adjust.
10471 (read_subrange_type): Adjust.
10472 (read_unspecified_type): Adjust.
10473 (dwarf2_read_abbrevs): Adjust.
10474 (load_partial_dies): Adjust.
10475 (read_partial_die): Adjust.
10476 (find_partial_die): Adjust.
10477 (guess_partial_die_structure_name): Adjust.
10478 (fixup_partial_die): Adjust.
10479 (read_attribute_value): Adjust.
10480 (read_addr_index): Adjust.
10481 (read_addr_index_from_leb128): Adjust.
10482 (read_str_index): Adjust.
10483 (dwarf2_string_attr): Adjust.
10484 (get_debug_line_section): Adjust.
10485 (dwarf_decode_line_header): Adjust.
10486 (lnp_state_machine::check_line_address): Adjust.
10487 (dwarf_decode_lines_1): Adjust.
10488 (dwarf_decode_lines): Adjust.
10489 (dwarf2_start_symtab): Adjust.
10490 (var_decode_location): Adjust.
10491 (new_symbol_full): Adjust.
10492 (dwarf2_const_value_data): Adjust.
10493 (dwarf2_const_value_attr): Adjust.
10494 (dwarf2_const_value): Adjust.
10495 (die_type): Adjust.
10496 (die_containing_type): Adjust.
10497 (build_error_marker_type): Adjust.
10498 (lookup_die_type): Adjust.
10499 (guess_full_die_structure_name): Adjust.
10500 (anonymous_struct_prefix): Adjust.
10501 (determine_prefix): Adjust.
10502 (dwarf2_name): Adjust.
10503 (follow_die_ref_or_sig): Adjust.
10504 (follow_die_offset): Adjust.
10505 (follow_die_ref): Adjust.
10506 (follow_die_sig_1): Adjust.
10507 (follow_die_sig): Adjust.
10508 (get_signatured_type): Adjust.
10509 (get_DW_AT_signature_type): Adjust.
10510 (decode_locdesc): Adjust.
10511 (dwarf_decode_macros): Adjust.
10512 (cu_debug_loc_section): Adjust.
10513 (fill_in_loclist_baton): Adjust.
10514 (dwarf2_symbol_mark_computed): Adjust.
10515 (init_one_comp_unit): Don't assign
10516 dwarf2_cu::dwarf2_per_objfile.
10517 (set_die_type): Adjust.
10518
ed2dc618
SM
105192018-01-07 Simon Marchi <simon.marchi@ericsson.com>
10520
10521 * dwarf2read.c (struct mapped_debug_names): Add constructor.
10522 <dwarf2_per_objfile>: New field.
10523 (dwarf2_per_objfile): Remove global.
10524 (get_dwarf2_per_objfile): New function.
10525 (set_dwarf2_per_objfile): New function.
10526 (dwarf2_build_psymtabs_hard): Change objfile parameter to
10527 dwarf2_per_objfile.
10528 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
10529 (read_abbrev_offset): Likewise.
10530 (read_indirect_string): Likewise.
10531 (read_indirect_line_string): Likewise.
10532 (read_indirect_string_at_offset): Likewise.
10533 (read_indirect_string_from_dwz): Likewise.
10534 (dwarf2_find_containing_comp_unit): Change objfile parameter to
10535 dwarf2_per_objfile.
10536 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
10537 (create_all_comp_units): Change objfile parameter to
10538 dwarf2_per_objfile.
10539 (create_all_type_units): Likewise.
10540 (process_queue): Add dwarf2_per_objfile parameter.
10541 (read_and_check_comp_unit_head): Likewise.
10542 (lookup_dwo_unit_in_dwp): Likewise.
10543 (get_dwp_file): Likewise.
10544 (process_cu_includes): Likewise.
10545 (struct free_dwo_file_cleanup_data): New struct.
10546 (dwarf2_has_info): Use get_dwarf2_per_objfile and
10547 set_dwarf2_per_objfile.
10548 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
10549 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
10550 context, adjust calls.
10551 (dw2_instantiate_symtab): Likewise.
10552 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
10553 (dw2_get_cu): Likewise.
10554 (create_cu_from_index_list): Change objfile parameter to
10555 dwarf2_per_objfile.
10556 (create_cus_from_index_list): Get dwarf2_per_objfile from
10557 context, adjust calls.
10558 (create_cus_from_index): Likewise.
10559 (create_signatured_type_table_from_index): Change objfile
10560 parameter to dwarf2_per_objfile.
10561 (create_signatured_type_table_from_debug_names): Change objfile
10562 parameter to dwarf2_per_objfile.
10563 (create_addrmap_from_index): Likewise.
10564 (create_addrmap_from_aranges): Likewise.
10565 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
10566 (dw2_setup): Remove.
10567 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
10568 context.
10569 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
10570 get_dwarf2_per_objfile.
10571 (dw2_forget_cached_source_info): Likewise.
10572 (dw2_map_symtabs_matching_filename): Likewise.
10573 (struct dw2_symtab_iterator) <index>: Remove.
10574 <dwarf2_per_objfile>: New field.
10575 (dw2_symtab_iter_init): Replace index parameter with
10576 dwarf2_per_objfile.
10577 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
10578 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
10579 (dw2_print_stats): Likewise.
10580 (dw2_dump): Likewise.
10581 (dw2_expand_symtabs_for_function): Likewise.
10582 (dw2_expand_all_symtabs): Likewise.
10583 (dw2_expand_symtabs_with_fullname): Likewise.
10584 (dw2_expand_marked_cus): Replace index and objfile parameters
10585 with dwarf2_per_objfile.
10586 (dw_expand_symtabs_matching_file_matcher): Add
10587 dwarf2_per_objfile parameter and adjust calls.
10588 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
10589 adjust calls.
10590 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
10591 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
10592 adjust calls.
10593 (create_cus_from_debug_names_list): Replace objfile parameter
10594 with dwarf2_per_objfile and adjust calls.
10595 (create_cus_from_debug_names): Likewise.
10596 (dwarf2_read_debug_names): Likewise.
10597 (mapped_debug_names::namei_to_name): Adjust call.
10598 (dw2_debug_names_iterator::next): Likewise.
10599 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
10600 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
10601 (dw2_debug_names_dump): Likewise.
10602 (dw2_debug_names_expand_symtabs_for_function): Likewise.
10603 (dw2_debug_names_expand_symtabs_matching): Likewise.
10604 (dwarf2_initialize_objfile): Likewise.
10605 (dwarf2_build_psymtabs): Likewise.
10606 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
10607 this_cu.
10608 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
10609 (read_and_check_comp_unit_head): Likewise.
10610 (read_abbrev_offset): Likewise.
10611 (create_debug_type_hash_table): Likewise.
10612 (create_debug_types_hash_table): Likewise.
10613 (create_all_type_units): Replace objfile parameter with
10614 dwarf2_per_objfile.
10615 (add_type_unit): Add dwarf2_per_objfile parameter.
10616 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
10617 with dwarf2_per_objfile.
10618 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
10619 (lookup_dwp_signatured_type): Likewise.
10620 (lookup_signatured_type): Likewise.
10621 (read_cutu_die_from_dwo): Likewise.
10622 (init_tu_and_read_dwo_dies): Likewise.
10623 (init_cutu_and_read_dies): Likewise.
10624 (init_cutu_and_read_dies_no_follow): Likewise.
10625 (allocate_type_unit_groups_table): Add objfile parameter.
10626 (create_type_unit_group): Use dwarf2_per_objfile from cu.
10627 (get_type_unit_group): Likewise.
10628 (process_psymtab_comp_unit): Update call.
10629 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
10630 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
10631 (print_tu_stats): Likewise.
10632 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
10633 in void* parameter.
10634 (build_type_psymtabs): Change objfile parameter to
10635 dwarf2_per_objfile.
10636 (process_skeletonless_type_unit): Use dwarf2_per_objfile
10637 passed in void* parameter.
10638 (process_skeletonless_type_units): Change objfile parameter to
10639 dwarf2_per_objfile.
10640 (set_partial_user): Likewise.
10641 (dwarf2_build_psymtabs_hard): Likewise.
10642 (read_comp_units_from_section): Likewise.
10643 (create_all_comp_units): Likewise.
10644 (scan_partial_symbols): Update calls.
10645 (add_partial_symbol): Likewise.
10646 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
10647 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
10648 (process_queue): Add dwarf2_per_objfile parameter.
10649 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
10650 (compute_compunit_symtab_includes): Likewise.
10651 (process_cu_includes): Add dwarf2_per_objfile parameter.
10652 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
10653 (process_full_type_unit): Likewise.
10654 (process_imported_unit_die): Update call.
10655 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
10656 (read_file_scope): Likewise.
10657 (allocate_dwo_file_hash_table): Add objfile parameter.
10658 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
10659 (create_cus_hash_table): Likewise.
10660 (create_dwp_hash_table): Likewise.
10661 (create_dwo_unit_in_dwp_v1): Likewise.
10662 (create_dwp_v2_section): Likewise.
10663 (create_dwo_unit_in_dwp_v2): Likewise.
10664 (lookup_dwo_unit_in_dwp): Likewise.
10665 (try_open_dwop_file): Likewise.
10666 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
10667 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
10668 cleanup to include a reference to dwarf2_per_objfile.
10669 (open_dwp_file): Add dwarf2_per_objfile parameter.
10670 (open_and_init_dwp_file): Likewise.
10671 (get_dwp_file): Likewise.
10672 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
10673 (queue_and_load_all_dwo_tus): Update call.
10674 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
10675 data.
10676 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
10677 (dwarf2_ranges_process): Likewise.
10678 (dwarf2_get_pc_bounds): Likewise.
10679 (mark_common_block_symbol_computed): Likewise.
10680 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
10681 (dwarf2_read_abbrevs): Update call.
10682 (read_partial_die): Use dwarf2_per_objfile from cu.
10683 (find_partial_die): Likewise.
10684 (fixup_partial_die): Likewise.
10685 (read_attribute_value): Likewise.
10686 (read_indirect_string_at_offset_from): Add objfile parameter.
10687 (read_indirect_string_at_offset): Add dwarf2_per_objfile
10688 parameter.
10689 (read_indirect_string_from_dwz): Add objfile parameter.
10690 (read_indirect_string): Add objfile parameter.
10691 (read_addr_index_1): Add dwarf2_per_objfile parameter.
10692 (read_addr_index): Use dwarf2_per_objfile from cu.
10693 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
10694 call dw2_setup.
10695 (read_str_index): Use dwarf2_per_objfile from cu.
10696 (get_debug_line_section): Likewise.
10697 (read_formatted_entries): Add dwarf2_per_objfile parameter.
10698 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
10699 (new_symbol_full): Use dwarf2_per_objfile from cu.
10700 (build_error_marker_type): Likewise.
10701 (lookup_die_type): Likewise.
10702 (determine_prefix): Likewise.
10703 (follow_die_offset): Likewise.
10704 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
10705 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
10706 (dwarf2_fetch_die_type_sect_off): Likewise.
10707 (dwarf2_get_die_type): Likewise.
10708 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
10709 (get_signatured_type): Likewise.
10710 (get_DW_AT_signature_type): Likewise.
10711 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
10712 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
10713 (cu_debug_loc_section): Likewise.
10714 (fill_in_loclist_baton): Likewise.
10715 (dwarf2_symbol_mark_computed): Likewise.
10716 (dwarf2_find_containing_comp_unit): Change objfile parameter to
10717 dwarf2_per_objfile.
10718 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
10719 parameter.
10720 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
10721 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
10722 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
10723 (set_die_type): Use dwarf2_free_objfile from cu.
10724 (get_die_type_at_offset): Likewise.
10725 (dwarf2_per_objfile_free): Don't assign global variable.
10726 (debug_names) <constructor>: Add dwarf2_per_objfile
10727 parameter, update m_debugstrlookup construction.
10728 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
10729 parameter.
10730 <m_dwarf2_per_objfile>: New field.
10731 <lookup>: Use m_dwarf2_per_objfile.
10732 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
10733 (psyms_seen_size): Likewise.
10734 (write_gdbindex): Replace objfile parameter with
10735 dwarf2_per_objfile.
10736 (write_debug_names): Likewise.
10737 (write_psymtabs_to_index): Likewise.
10738 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
10739 calls.
10740
e3b94546
SM
107412018-01-07 Simon Marchi <simon.marchi@ericsson.com>
10742
10743 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
10744 <dwarf2_per_objfile>: New field.
10745 (struct dwarf2_per_cu_data) <objfile>: Remove.
10746 <dwarf2_per_objfile>: New field.
10747 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
10748 of objfile.
10749 (create_signatured_type_table_from_index): Likewise.
10750 (create_debug_type_hash_table): Likewise.
10751 (fill_in_sig_entry_from_dwo_entry): Likewise.
10752 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
10753 (create_type_unit_group): Assign dwarf2_per_objfile instead of
10754 objfile.
10755 (create_partial_symtab): Access objfile through
10756 dwarf2_per_objfile.
10757 (process_psymtab_comp_unit_reader): Likewise.
10758 (read_comp_units_from_section): Likewise.
10759 (scan_partial_symbols): Likewise.
10760 (add_partial_symbol): Likewise.
10761 (add_partial_subprogram): Likewise.
10762 (peek_die_abbrev): Likewise.
10763 (fixup_go_packaging): Likewise.
10764 (process_full_comp_unit): Likewise.
10765 (process_full_type_unit): Likewise.
10766 (process_imported_unit_die): Likewise.
10767 (dwarf2_compute_name): Likewise.
10768 (dwarf2_physname): Likewise.
10769 (read_import_statement): Likewise.
10770 (create_cus_hash_table): Assign dwarf2_physname instead of
10771 objfile.
10772 (read_func_scope): Access objfile through dwarf2_per_objfile.
10773 (read_lexical_block_scope): Likewise.
10774 (read_call_site_scope): Likewise.
10775 (read_variable): Likewise.
10776 (dwarf2_rnglists_process): Likewise.
10777 (dwarf2_ranges_process): Likewise.
10778 (dwarf2_ranges_read): Likewise.
10779 (dwarf2_record_block_ranges): Likewise.
10780 (dwarf2_add_field): Likewise.
10781 (dwarf2_add_member_fn): Likewise.
10782 (read_structure_type): Likewise.
10783 (process_structure_scope): Likewise.
10784 (read_enumeration_type): Likewise.
10785 (read_array_type): Likewise.
10786 (read_common_block): Likewise.
10787 (read_namespace_type): Likewise.
10788 (read_namespace): Likewise.
10789 (read_module_type): Likewise.
10790 (read_tag_pointer_type): Likewise.
10791 (read_tag_ptr_to_member_type): Likewise.
10792 (read_tag_string_type): Likewise.
10793 (read_subroutine_type): Likewise.
10794 (read_typedef): Likewise.
10795 (read_base_type): Likewise.
10796 (attr_to_dynamic_prop): Likewise.
10797 (read_subrange_type): Likewise.
10798 (read_unspecified_type): Likewise.
10799 (load_partial_dies): Likewise.
10800 (read_partial_die): Likewise.
10801 (find_partial_die): Likewise.
10802 (guess_partial_die_structure_name): Likewise.
10803 (fixup_partial_die): Likewise.
10804 (read_attribute_value): Likewise.
10805 (read_addr_index_from_leb128): Likewise.
10806 (dwarf2_read_addr_index): Likewise.
10807 (dwarf2_string_attr): Likewise.
10808 (lnp_state_machine::check_line_address): Likewise.
10809 (dwarf_decode_lines_1): Likewise.
10810 (dwarf_decode_lines): Likewise.
10811 (dwarf2_start_symtab): Likewise.
10812 (var_decode_location): Likewise.
10813 (new_symbol_full): Likewise.
10814 (dwarf2_const_value_data): Likewise.
10815 (dwarf2_const_value_attr): Likewise.
10816 (dwarf2_const_value): Likewise.
10817 (die_type): Likewise.
10818 (die_containing_type): Likewise.
10819 (lookup_die_type): Likewise.
10820 (guess_full_die_structure_name): Likewise.
10821 (anonymous_struct_prefix): Likewise.
10822 (dwarf2_name): Likewise.
10823 (follow_die_ref_or_sig): Likewise.
10824 (follow_die_offset): Likewise.
10825 (follow_die_ref): Likewise.
10826 (dwarf2_fetch_die_loc_sect_off): Likewise.
10827 (dwarf2_fetch_constant_bytes): Likewise.
10828 (dwarf2_fetch_die_type_sect_off): Likewise.
10829 (dwarf2_get_die_type): Likewise.
10830 (follow_die_sig): Likewise.
10831 (decode_locdesc): Likewise.
10832 (dwarf2_per_cu_objfile): Likewise.
10833 (dwarf2_per_cu_text_offset): Likewise.
10834 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
10835 objfile.
10836 (set_die_type): Access objfile through
10837 dwarf2_per_objfile.
10838
b01ba14d
SM
108392018-01-07 Simon Marchi <simon.marchi@ericsson.com>
10840
10841 * valprint.c (converted_character_d): Remove typedef.
10842 (DEF_VEC_O (converted_character_d)): Remove.
10843 (count_next_character): Use std::vector.
10844 (print_converted_chars_to_obstack): Likewise.
10845 (generic_printstr): Likewise.
10846
4d0fdd9b
SM
108472018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10848
10849 * xml-support.h (struct gdb_xml_value): Add constructor.
10850 <value>: Change type to unique_xmalloc_ptr.
10851 (gdb_xml_value_s): Remove typedef.
10852 (DEF_VEC_O (gdb_xml_value_s)): Remove.
10853 (gdb_xml_element_start_handler): Change parameter type to
10854 std::vector.
10855 (xml_find_attribute): Likewise.
10856 * xml-support.c (xml_find_attribute): Change parameter type to
10857 std::vector and adjust.
10858 (gdb_xml_values_cleanup): Remove.
10859 (gdb_xml_parser::start_element): Adjust to std::vector.
10860 (xinclude_start_include): Change paraeter type to std::vector
10861 and adjust.
10862 * btrace.c (check_xml_btrace_version): Likewise.
10863 (parse_xml_btrace_block): Likewise.
10864 (parse_xml_btrace_pt_config_cpu): Likewise.
10865 (parse_xml_btrace_pt): Likewise.
10866 (parse_xml_btrace_conf_bts): Likewise.
10867 (parse_xml_btrace_conf_pt): Likewise.
10868 * memory-map.c (memory_map_start_memory): Likewise.
10869 (memory_map_start_property): Likewise.
10870 * osdata.c (osdata_start_osdata): Likewise.
10871 (osdata_start_item): Likewise.
10872 (osdata_start_column): Likewise.
10873 * remote.c (start_thread): Likewise.
10874 * solib-aix.c (library_list_start_library): Likewise.
10875 (library_list_start_list): Likewise.
10876 * solib-svr4.c (library_list_start_library): Likewise.
10877 (svr4_library_list_start_list): Likewise.
10878 * solib-target.c (library_list_start_segment): Likewise.
10879 (library_list_start_section): Likewise.
10880 (library_list_start_library): Likewise.
10881 (library_list_start_list): Likewise.
10882 * tracepoint.c (traceframe_info_start_memory): Likewise.
10883 (traceframe_info_start_tvar): Likewise.
10884 * xml-syscall.c (syscall_start_syscall): Likewise.
10885 * xml-tdesc.c (tdesc_start_target): Likewise.
10886 (tdesc_start_feature): Likewise.
10887 (tdesc_start_reg): Likewise.
10888 (tdesc_start_union): Likewise.
10889 (tdesc_start_struct): Likewise.
10890 (tdesc_start_flags): Likewise.
10891 (tdesc_start_enum): Likewise.
10892 (tdesc_start_field): Likewise.
10893 (tdesc_start_enum_value): Likewise.
10894 (tdesc_start_vector): Likewise.
10895
f979c73f
SM
108962018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10897
10898 * extension.h (struct xmethod_worker) <clone>: Remove.
10899 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
10900 Remove.
10901 (python_xmethod_worker::clone): Remove.
10902 * valops.c (find_overload_match): Use std::move instead of
10903 clone.
10904
ba18742c
SM
109052018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10906
10907 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
10908 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
10909 <free_xmethod_worker_data>: Remove.
10910 <get_matching_xmethod_workers>: Chance VEC to std::vector.
10911 <get_xmethod_arg_types>: Remove.
10912 <get_xmethod_result_type>: Remove.
10913 <invoke_xmethod>: Remove.
10914 * extension.c (new_xmethod_worker): Remove.
10915 (clone_xmethod_worker): Remove.
10916 (get_matching_xmethod_workers): Return void, pass std::vector by
10917 pointer.
10918 (get_xmethod_arg_types): Rename to...
10919 (xmethod_worker::get_arg_types): ... this, and adjust.
10920 (get_xmethod_result_type): Rename to...
10921 (xmethod_worker::get_result_type): ... this, and adjust.
10922 (invoke_xmethod): Remove.
10923 (free_xmethod_worker): Remove.
10924 (free_xmethod_worker_vec): Remove.
10925 * extension.h (enum ext_lang_rc): Move here from
10926 extension-priv.h.
10927 (struct xmethod_worker): Add constructor and destructor.
10928 <data>: Remove.
10929 <value>: Remove.
10930 <invoke, clone, do_get_result_type, do_get_arg_types>: New
10931 virtual pure methods.
10932 <get_arg_types, get_result_type>: New methods.
10933 (xmethod_worker_ptr): Remove typedef.
10934 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
10935 (xmethod_worker_vec): Remove typedef.
10936 (xmethod_worker_up): New typedef.
10937 (invoke_xmethod): Remove.
10938 (clone_xmethod_worker): Remove.
10939 (free_xmethod_worker): Remove.
10940 (free_xmethod_worker_vec): Remove.
10941 (get_xmethod_arg_types): Remove.
10942 (get_xmethod_result_type): Remove.
10943 * valops.c (find_method_list): Use std::vector, don't use
10944 intermediate vector.
10945 (value_find_oload_method_list): Use std::vector.
10946 (find_overload_match): Use std::vector.
10947 (find_oload_champ): Use std::vector.
10948 * value.c (value_free): Use operator delete.
10949 (value_of_xmethod): Rename to...
10950 (value_from_xmethod): ... this. Don't assign
10951 xmethod_worker::value, take rvalue-reference.
10952 (result_type_of_xmethod): Adjust.
10953 (call_xmethod): Adjust.
10954 * value.h: Include extension.h.
10955 (struct xmethod_worker): Don't forward-declare.
10956 (value_of_xmethod): Rename to...
10957 (value_from_xmethod): ... this, take rvalue-reference.
10958 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
10959 (struct python_xmethod_worker): ... this, add constructor and
10960 destructor.
10961 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
10962 (gdbpy_free_xmethod_worker_data): Rename to...
10963 (python_xmethod_worker::~python_xmethod_worker): ... this and
10964 adjust.
10965 (gdbpy_clone_xmethod_worker_data): Rename to...
10966 (python_xmethod_worker::clone): ... this and adjust.
10967 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
10968 temporary vector.
10969 (gdbpy_get_xmethod_arg_types): Rename to...
10970 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
10971 (gdbpy_get_xmethod_result_type): Rename to...
10972 (python_xmethod_worker::do_get_result_type): ... this and
10973 adjust.
10974 (gdbpy_invoke_xmethod): Rename to...
10975 (python_xmethod_worker::invoke): ... this and adjust.
10976 (new_python_xmethod_worker): Rename to...
10977 (python_xmethod_worker::python_xmethod_worker): ... this and
10978 adjust.
10979 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
10980 Remove.
10981 (gdbpy_free_xmethod_worker_data): Remove.
10982 (gdbpy_get_matching_xmethod_workers): Use std::vector.
10983 (gdbpy_get_xmethod_arg_types): Remove.
10984 (gdbpy_get_xmethod_result_type): Remove.
10985 (gdbpy_invoke_xmethod): Remove.
10986 * python/python.c (python_extension_ops): Remove obsolete
10987 callbacks.
10988
e379cee6
PA
109892018-01-05 Pedro Alves <palves@redhat.com>
10990
10991 PR gdb/18653
10992 * common/signals-state-save-restore.c
10993 (save_original_signals_state): New parameter 'quiet'. Warn if we
10994 find a custom handler preinstalled, instead of internal erroring.
10995 But only warn if !quiet.
10996 * common/signals-state-save-restore.h
10997 (save_original_signals_state): New parameter 'quiet'.
10998 * main.c (captured_main_1): Move save_original_signals_state call
10999 after option handling, and pass QUIET.
11000
a655456c
PA
110012018-01-05 Pedro Alves <palves@redhat.com>
11002
11003 * spu-tdep.c (spu_catch_start): Pass
11004 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
11005
de63c46b
PA
110062018-01-05 Pedro Alves <palves@redhat.com>
11007
11008 PR gdb/22670
11009 * ada-lang.c (literal_symbol_name_matcher): New function.
11010 (ada_get_symbol_name_matcher): Use it for
11011 symbol_name_match_type::SEARCH_NAME.
11012 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
11013 it down instead of assuming symbol_name_match_type::FULL.
11014 * block.h (block_lookup_symbol): New parameter 'match_type'.
11015 * c-valprint.c (print_unpacked_pointer): Use
11016 lookup_symbol_search_name instead of lookup_symbol.
11017 * compile/compile-object-load.c (get_out_value_type): Pass down
11018 symbol_name_match_type::SEARCH_NAME.
11019 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
11020 symbol_name_match_type::FULL.
11021 * cp-support.c (cp_get_symbol_name_matcher): Handle
11022 symbol_name_match_type::SEARCH_NAME.
11023 * infrun.c (insert_exception_resume_breakpoint): Use
11024 lookup_symbol_search_name.
11025 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
11026 * psymtab.c (maintenance_check_psymtabs): Use
11027 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
11028 * stack.c (print_frame_args): Use lookup_symbol_search_name and
11029 SYMBOL_SEARCH_NAME.
11030 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
11031 if symbol_name_match_type::SEARCH_NAME.
11032 (lookup_symbol_in_language): Pass down
11033 symbol_name_match_type::FULL.
11034 (lookup_symbol_search_name): New.
11035 (lookup_language_this): Pass down
11036 symbol_name_match_type::SEARCH_NAME.
11037 (lookup_symbol_aux, lookup_local_symbol): New parameter
11038 'match_type'. Pass it down.
11039 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
11040 (lookup_symbol_search_name): New declaration.
11041 (lookup_symbol_in_block): New 'match_type' parameter.
11042
f98fc17b
PA
110432018-01-05 Pedro Alves <palves@redhat.com>
11044
11045 PR gdb/22670
11046 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
11047 ada_lookup_symbol.
11048 (ada_lookup_symbol): Reimplement in terms of
11049 ada_lookup_symbol_list, bits factored out from
11050 ada_lookup_encoded_symbol.
11051
342f8240
JB
110522018-01-05 Joel Brobecker <brobecker@adacore.com>
11053
11054 * ada-exp.y (write_object_renaming): When subscripting an array
11055 using a symbol as the index, pass the block in call to
11056 ada_lookup_encoded_symbol when looking that symbol up.
11057
7150d33c
JG
110582018-01-05 Jerome Guitton <guitton@adacore.com>
11059
11060 * ada-lang.c (ada_array_length): Use ada_index_type instead of
11061 TYPE_INDEX_TYPE.
11062
cc0e770c
JB
110632018-01-05 Joel Brobecker <brobecker@adacore.com>
11064
11065 * ada-lang.c (ada_to_fixed_value_create): Add handling of
11066 the case where VALUE_LVAL (val0) is not lval_memory.
11067
f79da888 110682018-01-05 Xavier Roirand <roirand@adacore.com>
e3861a03
XR
11069
11070 * ada-valprint.c (print_optional_low_bound): Handle
11071 character-indexed array printing like boolean-indexed array
11072 printing.
11073
cd385f94
JB
110742018-01-05 Joel Brobecker <brobecker@adacore.com>
11075
11076 * NEWS: Create a new section for the next release branch.
11077 Rename the section of the current branch, now that it has
11078 been cut.
11079
09aca949
JB
110802018-01-05 Joel Brobecker <brobecker@adacore.com>
11081
11082 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
11083 * version.in: Bump version to 8.1.50.DATE-git.
11084
9f757bf7
XR
110852018-01-03 Xavier Roirand <roirand@adacore.com>
11086
11087 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
11088 Add field.
11089 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
11090 Add field.
11091 (default_exception_support_info) <catch_handlers_sym>: Add field.
11092 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
11093 (ada_exception_name_addr_1): Add "catch handlers" handling.
11094 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
11095 Update all callers.
11096 (create_excep_cond_exprs) <ex>: Add parameter.
11097 (re_set_exception): Update create_excep_cond_exprs call.
11098 (print_it_exception, print_one_exception, print_mention_exception)
11099 (print_recreate_exception): Add "catch handler" handling.
11100 (allocate_location_catch_handlers, re_set_catch_handlers)
11101 (check_status_catch_handlers, print_it_catch_handlers)
11102 (print_one_catch_handlers, print_mention_catch_handlers)
11103 (print_recreate_catch_handlers): New function.
11104 (catch_handlers_breakpoint_ops): New variable.
11105 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
11106 Add parameter. Add "catch handler" handling.
11107 (ada_exception_sym_name, ada_exception_breakpoint_ops):
11108 Add "catch handler" handling.
11109 (ada_exception_catchpoint_cond_string): Add "catch handler"
11110 handling.
11111 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
11112 call.
11113 (catch_ada_handlers_command): New function.
11114 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
11115 operations structure.
11116 (_initialize_ada_language): Add "catch handlers" command entry.
11117 * NEWS: Document "catch handlers" feature.
11118
9fe561ab
JB
111192018-01-02 Joel Brobecker <brobecker@adacore.com>
11120
11121 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
11122 account when creating the array type of the slice.
11123 (ada_value_slice): Likewise.
11124
a405673c
JB
111252018-01-02 Joel Brobecker <brobecker@adacore.com>
11126
11127 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
11128 New enum value.
11129 (create_array_type_with_stride): Add byte_stride_prop parameter.
11130 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
11131 New parameter. Update all callers in this file.
11132 (array_type_has_dynamic_stride): New function.
11133 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
11134 of arrays with dynamic byte strides.
11135 * dwarf2read.c (read_array_type): Add support for dynamic
11136 DW_AT_byte_stride attributes.
11137
74a2f8ff
JB
111382018-01-02 Joel Brobecker <brobecker@adacore.com>
11139
11140 * dwarf2read.c (read_unspecified_type): Treat
11141 DW_TAG_enumeration_type DIEs from Ada units as stubs.
11142
e2882c85
JB
111432018-01-01 Joel Brobecker <brobecker@adacore.com>
11144
11145 Update copyright year range in all GDB files.
11146
1690bb24
JB
111472018-01-01 Joel Brobecker <brobecker@adacore.com>
11148
11149 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
11150 and gdb/testsuite/gdb.base/step-line.c.
11151
0f0c98a8
JB
111522018-01-01 Joel Brobecker <brobecker@adacore.com>
11153
11154 * copyright.py (main): Dump the contents of
11155 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
11156 even if BY_HAND is empty.
11157
82e1e79a
JB
111582018-01-01 Joel Brobecker <brobecker@adacore.com>
11159
11160 * top.c (print_gdb_version): Update Copyright year in version
11161 message.
11162
053f54e5 111632018-01-01 Joel Brobecker <brobecker@adacore.com>
47fea877 11164
053f54e5 11165 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
47fea877 11166
053f54e5 11167For older changes see ChangeLog-2017.
c906108c
SS
11168\f
11169Local Variables:
11170mode: change-log
11171left-margin: 8
11172fill-column: 74
11173version-control: never
57da7796 11174coding: utf-8
c906108c 11175End: