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