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