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