Use get_remote_packet_size in download_tracepoint
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2
3 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
4 Replace array buf with gdb::char_vector buf, of size
5 get_remote_packet_size (). Replace references to buf and
6 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
7 and xsnprintf with snprintf. Raise errors if the buffer is too
8 small.
9
10 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
11
12 * remote.c (remote_target::download_tracepoint): Fix the has_more
13 predicate in the QTDP action list iteration.
14
15 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
16
17 * remote.c (remote_target::download_tracepoint): Fix indentation
18 in for block.
19
20 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
21
22 * proc-api.c (_initialize_proc_api): Remove c, unused.
23 * procfs.c (procfs_init_inferior): Remove signals, unused.
24 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
25 unused.
26
27 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
28 Andrew Burgess <andrew.burgess@embecosm.com>
29
30 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
31 'W_STOPCODE (0)' as this could be ambiguous.
32
33 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
34
35 * ser-tcp.c (net_open): Fix thinko when deciding whether to
36 disable TCP's Nagle algorithm (use "ai_protocol" instead of
37 "ai_socktype").
38
39 2018-08-02 Tom Tromey <tom@tromey.com>
40
41 PR symtab/16842.
42 * dwarf2read.c (read_func_scope): Set symtab on template parameter
43 symbols.
44 (process_structure_scope): Likewise.
45
46 2018-08-02 Xavier Roirand <roirand@adacore.com>
47
48 PR gdb/22629:
49 * darwin-nat.c (darwin_kill_inferior): Fix handling of
50 kill inferior.
51
52 2018-08-02 Tom Tromey <tom@tromey.com>
53
54 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
55 (darwin_suspend_inferior, darwin_resume_inferior)
56 (darwin_decode_notify_message, darwin_resume_inferior_threads)
57 (darwin_check_new_threads): Check result of get_darwin_inferior.
58
59 2018-07-31 Joel Brobecker <brobecker@adacore.com>
60
61 GDB 8.1.1 released.
62
63 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
64
65 * varobj.c (varobj_get_path_expr_parent): Report an error if
66 parent is a dynamic varobj.
67
68 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
69
70 * gnulib/aclocal.m4: Re-generate.
71 * gnulib/config.in: Re-generate.
72 * gnulib/configure: Re-generate.
73 * gnulib/import/Makefile.in: Re-generate.
74 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
75 * gnulib/import/m4/onceonly.m4: Re-generate.
76
77 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
78
79 * target-descriptions.c (struct xml_test_tdesc): New.
80 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
81 (record_xml_tdesc): Update.
82 (maintenance_check_xml_descriptions): Update.
83 * target-descriptions.h (record_xml_tdesc): Update comment.
84
85 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
86
87 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
88 checking array bounds are defined.
89
90 2018-07-30 Tom Tromey <tom@tromey.com>
91
92 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
93 irreflexivity violation.
94
95 2018-07-30 Tom Tromey <tom@tromey.com>
96
97 * cli/cli-decode.c (lookup_cmd): Remove lint code.
98 * value.c (unpack_long): Remove lint code.
99 * valops.c (value_ind): Remove lint code.
100 * valarith.c (value_x_binop, value_x_unop, value_equal)
101 (value_pos): Remove lint code.
102
103 2018-07-28 Tom de Vries <tdevries@suse.de>
104
105 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
106 with undefined upper bound as <optimized out>.
107
108 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
109
110 * gcore.in: Rename variable "name" to "prefix". Expand
111 "usage" text.
112
113 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
114
115 * windows-nat.c (windows_nat_target::create_inferior): Update to
116 call close() in global namespace.
117
118 2018-07-26 Tom Tromey <tom@tromey.com>
119
120 * dwarf-index-write.c (add_address_entry): Don't add objfile
121 offsets.
122 * dbxread.c (find_stab_function): Rename from
123 find_stab_function_addr. Return a bound_minimal_symbol.
124 (read_dbx_symtab): Use raw_text_low, raw_text_high.
125 Don't add objfile offsets.
126 (end_psymtab): Use raw_text_low, raw_text_high,
127 MSYMBOL_VALUE_RAW_ADDRESS.
128 (read_ofile_symtab): Update.
129 (process_one_symbol): Update.
130 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
131 offsets.
132 (dw2_relocate): Remove.
133 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
134 searching addrmap.
135 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
136 Update.
137 (process_psymtab_comp_unit_reader, add_partial_symbol)
138 (add_partial_subprogram, dwarf2_ranges_read): Update.
139 (load_partial_dies): Update.
140 (add_address_entry): Don't add objfile offsets.
141 (dwarf2_build_include_psymtabs): Update.
142 (create_addrmap_from_aranges): Don't add objfile offsets.
143 (dw2_find_pc_sect_compunit_symtab): Update.
144 * mdebugread.c (parse_symbol): Don't add objfile offsets.
145 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
146 Update.
147 (parse_partial_symbols): Don't add objfile offsets. Use
148 raw_text_low, raw_text_high. Update.
149 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
150 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
151 or call 'relocate' quick function. Clear psymbol_map.
152 * psympriv.h (struct partial_symbol) <address>: Add section
153 offset.
154 <set_unrelocated_address>: Rename from set_address.
155 <raw_text_low, raw_text_high>: New methods.
156 <text_low, text_high>: Add objfile parameter.
157 (add_psymbol_to_bcache): Add 'section' parameter. Call
158 set_unrelocated_address.
159 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
160 (find_pc_psymbol): Update.
161 (fixup_psymbol_section, relocate_psymtabs): Remove.
162 (dump_psymtab, psym_functions): Update.
163 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
164 parameter.
165 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
166 (start_psymtab_common): Update.
167 * symfile-debug.c (debug_qf_relocate): Remove.
168 (debug_sym_quick_functions): Update.
169 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
170 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
171 Update.
172
173 2018-07-26 Tom Tromey <tromey@redhat.com>
174
175 * dbxread.c (end_psymtab): Use text_high_valid and
176 text_low_valid.
177 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
178 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
179 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
180 Update comment.
181 <text_low_valid, text_high_valid>: New fields.
182 <set_text_low, set_text_high>: Update.
183 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
184
185 2018-07-26 Tom Tromey <tom@tromey.com>
186
187 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
188 Update.
189 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
190 textlow and texthigh fields.
191 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
192 Update.
193 * mdebugread.c (parse_lines, parse_partial_symbols)
194 (psymtab_to_symtab_1): Update.
195 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
196 Rename fields. Update comment. Now private.
197 <text_low, text_high, set_text_low, set_text_high>: New methods.
198 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
199 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
200 (start_psymtab_common, maintenance_info_psymtabs)
201 (maintenance_check_psymtabs): Update.
202 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
203 texthigh fields.
204 (scan_xcoff_symtab): Update.
205
206 2018-07-26 Tom Tromey <tromey@redhat.com>
207
208 * psympriv.h (struct partial_symbol) <unrelocated_address,
209 address, set_address>: New methods.
210 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
211 (fixup_psymbol_section, relocate_psymtabs): Update.
212 (print_partial_symbols): Add 'objfile' parameter. Update.
213 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
214 Update.
215
216 2018-07-26 Tom Tromey <tom@tromey.com>
217
218 * dwarf-index-write.c (write_psymbols, debug_names::insert)
219 (debug_names::write_psymbols): Update.
220 * psympriv.h (struct partial_symbol): Derive from
221 general_symbol_info.
222 <obj_section>: New method.
223 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
224 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
225 (find_pc_sect_psymbol, fixup_psymbol_section)
226 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
227 (print_partial_symbols, recursively_search_psymtabs)
228 (compare_psymbols, psymbol_hash, psymbol_compare)
229 (add_psymbol_to_bcache, maintenance_check_psymtabs)
230 (psymbol_name_matches, psym_fill_psymbol_map): Update.
231
232 2018-07-26 Tom Tromey <tromey@redhat.com>
233
234 * dbxread.c (end_psymtab): Remove dead code.
235
236 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
237
238 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
239 DWARF unwinders are disabled.
240 * dwarf2-frame.c: Add dwarf2read.h include.
241 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
242 disabled.
243 (dwarf2_frame_unwinders_enabled_p): Define.
244 (show_dwarf_unwinders_enabled_p): New function.
245 (_initialize_dwarf2_frame): Register switch to control DWARF
246 unwinder use.
247 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
248 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
249 (show_dwarf_cmdlist): Remove static keyword.
250 * dwarf2read.h (set_dwarf_cmdlist): Declare.
251 (show_dwarf_cmdlist): Declare.
252 * NEWS: Document new feature.
253
254 2018-07-26 Tom de Vries <tdevries@suse.de>
255
256 PR breakpoints/23366
257 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
258
259 2018-07-26 Tom de Vries <tdevries@suse.de>
260
261 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
262 DW_AT_count can't be translated to a dynamic prop.
263
264 2018-07-25 Tom de Vries <tdevries@suse.de>
265
266 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
267 try/catch.
268
269 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
270
271 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
272
273 2018-07-25 Joel Brobecker <brobecker@adacore.com>
274
275 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
276
277 2018-07-24 Keith Seitz <keiths@redhat.comt
278
279 PR symtab/23010
280 * dwarf2read.c (dw2_add_symbol_to_list): New function.
281 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
282 instead of add_symbol_to_list.
283 (read_file_scope): Call prepare_one_comp_unit before reading
284 any other DIEs.
285
286 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
287
288 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
289
290 2018-07-24 Tom Tromey <tom@tromey.com>
291
292 * utils.c (malloc, realloc, free): Don't declare.
293 * configure, config.in: Rebuild.
294 * configure.ac: Don't check for declarations of free, malloc, or
295 realloc.
296
297 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
298
299 * aarch64-linux-nat.c
300 (aarch64_linux_nat_target::stopped_data_address): Remove unused
301 variable.
302 * arm-linux-nat.c (fetch_regs): Likewise.
303 (store_regs): Likewise.
304 (fetch_vfp_regs): Likewise.
305 (store_vfp_regs): Likewise.
306 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
307 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
308 (arm_linux_nat_target::insert_watchpoint): Likewise.
309 (arm_linux_nat_target::remove_watchpoint): Likewise.
310 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
311 Likewise.
312 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
313 Likewise.
314 * ppc-linux-nat.c (fetch_register): Likewise.
315 (fetch_all_gp_regs): Likewise.
316 (fetch_ppc_registers): Likewise.
317 (store_all_gp_regs): Likewise.
318 (store_ppc_registers): Likewise.
319 (hwdebug_insert_point): Likewise.
320 (can_use_watchpoint_cond_accel): Likewise.
321 * remote-sim.c (gdb_os_write_stdout): Likewise.
322
323 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
324 Tom Tromey <tom@tromey.com>
325
326 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
327 test for it.
328 * configure: Rebuild.
329
330 2018-07-22 Tom Tromey <tom@tromey.com>
331
332 * regformats/regdat.sh: Define xmltarget_${name} inside
333 #ifndef IN_PROCESS_AGENT.
334
335 2018-07-22 Tom Tromey <tom@tromey.com>
336
337 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
338
339 2018-07-22 Tom Tromey <tom@tromey.com>
340
341 * symfile.c (reread_symbols): Notify iter, not objfile.
342
343 2018-07-22 Tom Tromey <tom@tromey.com>
344
345 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
346 Use arch_ops.
347 (ravenscar_thread_target::prepare_to_store): Likewise.
348
349 2018-07-22 Tom Tromey <tom@tromey.com>
350
351 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
352 unused variable. Call value_fetch_lazy when needed.
353 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
354 Remove unused variable. Call value_fetch_lazy when needed.
355
356 2018-07-22 Tom Tromey <tom@tromey.com>
357
358 * m32c-tdep.c (mark_dma): Return void.
359 (make_regs): Remove unused declarations.
360
361 2018-07-22 Tom Tromey <tom@tromey.com>
362
363 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
364 cmdscm_get_valid_command_smob_arg_unsafe for effect.
365 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
366 bkscm_get_valid_block_smob_arg_unsafe for effect.
367
368 2018-07-22 Tom Tromey <tom@tromey.com>
369
370 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
371 value_type.
372
373 2018-07-22 Tom Tromey <tom@tromey.com>
374
375 * windows-nat.c (saved_context): Conditionally define.
376 * remote.c (remote_target::remote_btrace_maybe_reopen):
377 Conditionally declare "warned".
378 * inflow.c (sigquit_ours): Conditionally define.
379 (new_tty): Move "tty" declaration inside #if.
380 * guile/guile.c (guile_datadir): Conditionally define.
381 * charset.c (set_be_le_names): Move some declarations inside #if.
382 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
383 #if.
384 (parse_xml_btrace_conf): Likewise.
385
386 2018-07-22 Tom Tromey <tom@tromey.com>
387
388 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
389
390 2018-07-22 Tom Tromey <tom@tromey.com>
391
392 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
393 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
394 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
395 * buildsym-legacy.c (get_macro_table): Remove unused variable.
396 * stack.c (frame_apply_level_command): Remove unused variable.
397 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
398 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
399 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
400 unused variable.
401 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
402 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
403 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
404 variable.
405 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
406 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
407 variable.
408 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
409 Remove unused variable.
410 * cli/cli-script.c (recurse_read_control_structure): Remove unused
411 variable.
412 * common/tdesc.c (print_xml_feature::visit): Remove unused
413 variable.
414 * compile/compile-object-load.c (store_regs): Remove unused
415 variables.
416 * complaints.c (clear_complaints): Remove unused variable.
417 * corelow.c (core_target_open): Remove unused variable.
418 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
419 variable.
420 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
421 variable.
422 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
423 variable.
424 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
425 variable.
426 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
427 variable.
428 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
429 variable.
430 * ia64-tdep.c (examine_prologue): Remove unused variable.
431 * infcall.c (run_inferior_call): Remove unused variable.
432 * inferior.c (exit_inferior): Remove unused variable.
433 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
434 * linespec.c (decode_line_2): Remove unused variable.
435 * linux-nat.c (super_close): Remove.
436 * linux-tdep.c (linux_info_proc): Remove unused variable.
437 * mi/mi-main.c (mi_execute_command): Remove unused variable.
438 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
439 Remove unused variable.
440 * parse.c (find_minsym_type_and_address): Remove unused variable.
441 * printcmd.c (info_symbol_command, printf_floating): Remove unused
442 variable.
443 * python/py-breakpoint.c (bppy_set_commands): Remove unused
444 variable.
445 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
446 variables.
447 * record-btrace.c (record_btrace_target::store_registers): Remove
448 unused variable.
449 (cmd_show_record_btrace_cpu): Remove unused variable.
450 * riscv-tdep.c (riscv_register_reggroup_p)
451 (riscv_push_dummy_call, riscv_return_value): Remove unused
452 variable.
453 * rust-exp.y (literal): Remove unused variable.
454 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
455 unused variable.
456 <STRUCTOP_ANONYMOUS>: Likewise.
457 * s390-linux-tdep.c (s390_linux_init_abi_31)
458 (s390_linux_init_abi_64): Remove unused variable.
459 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
460 (file_select_thread, net_windows_open, _initialize_ser_windows):
461 Remove unused variables.
462 * symtab.c (find_pc_sect_line): Remove unused variable.
463 * target-memory.c (compute_garbled_blocks): Remove unused
464 variable.
465 (target_write_memory_blocks): Remove unused variable.
466 * target.c (target_stack::unpush): Remove unused variables.
467 * tracepoint.c (start_tracing, all_tracepoint_actions)
468 (merge_uploaded_trace_state_variables)
469 (print_one_static_tracepoint_marker): Remove unused variable.
470 * unittests/basic_string_view/element_access/char/1.cc (test01):
471 Remove unused variable.
472 * windows-nat.c (windows_continue, windows_add_all_dlls)
473 (do_initial_windows_stuff, windows_nat_target::create_inferior):
474 Remove unused variables.
475
476 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
477
478 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
479 attr_profile in HAVE_ELF.
480 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
481 HAVE_ELF.
482
483 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
484
485 * frame.c (frame_register_unwind): Change parameter name.
486 (frame_unwind_register): Likewise.
487 (frame_unwind_register_value): Likewise.
488 (frame_unwind_register_signed): Likewise.
489 (frame_unwind_register_unsigned): Likewise.
490 * frame.h (frame_register_unwind): Likewise.
491 (frame_unwind_register): Likewise.
492 (frame_unwind_register_value): Likewise.
493 (frame_unwind_register_signed): Likewise.
494 (frame_unwind_register_unsigned): Likewise.
495 (frame_unwind_arch): Likewise.
496
497 2018-07-20 Maciej W. Rozycki <macro@mips.com>
498
499 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
500 ISA maintenance.
501
502 2018-07-20 Maciej W. Rozycki <macro@mips.com>
503
504 * mips-linux-nat.c (mips_linux_nat_target::read_description):
505 Call `get_ptrace_pid' rather than extracting the ptrace PID by
506 hand.
507
508 2018-07-20 Keith Seitz <keiths@redhat.com>
509
510 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
511 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
512 m_compunit_symtab, m_language>: Add "m_" prefix.
513 Update all uses.
514 * buildsym.c: Update all uses.
515
516 2018-07-20 Tom Tromey <tom@tromey.com>
517
518 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
519 * buildsym.h (record_line_ftype): Remove typedef.
520
521 2018-07-20 Tom Tromey <tom@tromey.com>
522
523 * buildsym-legacy.h (augment_type_symtab): Don't declare.
524 (end_expandable_symtab): Likewise.
525 (end_symtab_get_static_block): Likewise.
526 (end_symtab_from_static_block): Likewise.
527 * buildsym-legacy.c (augment_type_symtab): Remove.
528 (end_expandable_symtab): Remove.
529 (end_symtab_get_static_block): Remove.
530 (end_symtab_from_static_block): Remove.
531
532 2018-07-20 Tom Tromey <tom@tromey.com>
533
534 * dwarf2read.c: Include buildsym.h.
535 (struct dwarf2_cu) <builder>: New method.
536 (fixup_go_packaging): Update.
537 (process_full_comp_unit, process_full_type_unit): Update. Don't
538 use scoped_free_pendings.
539 (using_directives): Add "cu" parameter, remove "language".
540 (read_import_statement, setup_type_unit_groups, )
541 (read_func_scope, read_lexical_block_scope)
542 (dwarf2_record_block_ranges, read_namespace): Update.
543 (lnp_state_machine::lnp_state_machine): Add cu parameter.
544 (lnp_state_machine::handle_end_sequence): Update.
545 (class lnp_state_machine) <m_cu>: New member.
546 <m_record_line_callback>: Remove.
547 <m_currently_recording_lines>: New member.
548 (lnp_state_machine::handle_set_file): Update.
549 (noop_record_line): Remove.
550 (dwarf_record_line_p): Add cu parameter.
551 (dwarf_record_line_1, dwarf_finish_line): Likewise.
552 (lnp_state_machine::record_line)
553 (lnp_state_machine::lnp_state_machine)
554 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
555 (dwarf_decode_lines): Update.
556 (dwarf2_start_subfile): Add cu parameter.
557 (dwarf2_start_symtab, new_symbol): Update.
558 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
559 Remove dwarf2_per_objfile parameter.
560 (dwarf_decode_macros): Update.
561
562 2018-07-20 Tom Tromey <tom@tromey.com>
563
564 * stabsread.c (define_symbol): Update.
565 * buildsym-legacy.h (get_buildsym_compunit): Declare.
566 * dwarf2read.c (new_symbol): Update.
567 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
568 * cp-namespace.c: Include buildsym.h.
569 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
570 * buildsym-legacy.c (get_buildsym_compunit): New function.
571
572 2018-07-20 Tom Tromey <tom@tromey.com>
573
574 * xcoffread.c: Include buildsym-legacy.h.
575 * windows-nat.c: Include buildsym-legacy.h.
576 * stabsread.c: Include buildsym-legacy.h.
577 * mdebugread.c: Include buildsym-legacy.h.
578 * buildsym-legacy.h: New file.
579 * buildsym-legacy.c: New file, from buildsym.c.
580 * go32-nat.c: Include buildsym-legacy.h.
581 * dwarf2read.c: Include buildsym-legacy.h.
582 * dbxread.c: Include buildsym-legacy.h.
583 * cp-namespace.c: Include buildsym-legacy.h.
584 * coffread.c: Include buildsym-legacy.h.
585 * buildsym.h: Move some contents to buildsym-legacy.h.
586 * buildsym.c: Include buildsym-legacy.h. Move many functions to
587 buildsym-legacy.c.
588 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
589
590 2018-07-20 Tom Tromey <tom@tromey.com>
591
592 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
593 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
594 (buildsym_compunit::buildsym_compunit)
595 (buildsym_compunit::~buildsym_compunit)
596 (buildsym_compunit::get_macro_table): Define.
597
598 2018-07-20 Tom Tromey <tom@tromey.com>
599
600 * buildsym.c (reset_symtab_globals): Remove.
601 (buildsym_compunit::end_symtab_from_static_block): Update.
602 (buildsym_compunit::augment_type_symtab): Update.
603 (end_symtab_from_static_block): Call free_buildsym_compunit.
604 (augment_type_symtab, end_symtab, end_expandable_symtab):
605 Likewise.
606
607 2018-07-20 Tom Tromey <tom@tromey.com>
608
609 * arch-utils.c: Do not include buildsym.h.
610 * mipsread.c: Do not include buildsym.h.
611 * machoread.c: Do not include buildsym.h.
612 * elfread.c: Do not include buildsym.h.
613
614 2018-07-20 Tom Tromey <tom@tromey.com>
615
616 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
617 initialization.
618 (buildsym_compunit): Add new constructor.
619 (struct buildsym_compunit) <get_last_source_file, finish_block,
620 record_block_range, start_subfile, patch_subfile_names,
621 push_subfile, pop_subfile, record_line, get_compunit_symtab,
622 set_last_source_start_addr, get_last_source_start_addr,
623 get_local_using_directives, set_local_using_directives,
624 get_global_using_directives, outermost_context_p,
625 get_current_context_stack, get_context_stack_depth,
626 get_current_subfile, get_local_symbols, get_file_symbols,
627 get_global_symbols, record_debugformat, record_producer,
628 push_context, pop_context, end_symtab_get_static_block,
629 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
630 New public methods.
631 <record_pending_block, finish_block_internal, make_blockvector,
632 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
633 private methods.
634 Update all users.
635
636 2018-05-22 Tom Tromey <tom@tromey.com>
637
638 * buildsym.c (record_pending_block): Move earlier. Remove objfile
639 parameter.
640 (finish_block_internal): Update.
641
642 2018-07-20 Tom Tromey <tom@tromey.com>
643
644 * buildsym.c (record_pending_block): Move earlier. Remove objfile
645 parameter.
646 (finish_block_internal): Update.
647
648 2018-07-20 Tom Tromey <tom@tromey.com>
649
650 * buildsym.h (EXTERN): Don't define or undef.
651 * buildsym.c (EXTERN): Don't define.
652
653 2018-07-20 Tom Tromey <tom@tromey.com>
654
655 * buildsym.c: Remove TODO comment.
656
657 2018-07-20 Tom Tromey <tom@tromey.com>
658
659 * coffread.c (coff_symtab_read): Update.
660 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
661 (xcoff_new_init): Update.
662 * mipsread.c (mipscoff_new_init): Update.
663 * mdebugread.c (mdebug_build_psymtabs): Update.
664 * elfread.c (elf_new_init): Update.
665 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
666 Update.
667 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
668 (coffstab_build_psymtabs, elfstab_build_psymtabs)
669 (stabsect_build_psymtabs): Update.
670 * buildsym.h (buildsym_init): Don't declare.
671 * buildsym.c: Update comment.
672 (prepare_for_building): Remove.
673 (start_symtab, restart_symtab): Update.
674 (reset_symtab_globals): Update comment.
675 (buildsym_init): Remove.
676
677 2018-07-20 Tom Tromey <tom@tromey.com>
678
679 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
680 * stabsread.c (patch_block_stabs, define_symbol, read_type)
681 (read_enum_type, common_block_start, common_block_end)
682 (cleanup_undefined_types_1, finish_global_stabs): Update.
683 * mdebugread.c (psymtab_to_symtab_1): Update.
684 * dwarf2read.c (fixup_go_packaging, read_func_scope)
685 (read_lexical_block_scope, new_symbol): Update.
686 * dbxread.c (process_one_symbol): Update.
687 * coffread.c (coff_symtab_read, process_coff_symbol)
688 (coff_read_enum_type): Update.
689 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
690 declare.
691 (get_local_symbols, get_file_symbols, get_global_symbols): New
692 functions.
693 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
694 m_global_symbols.
695 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
696 (~scoped_free_pendings): Update.
697 (finish_block, prepare_for_building, reset_symtab_globals)
698 (end_symtab_get_static_block, end_symtab_with_blockvector)
699 (augment_type_symtab, push_context): Update.
700 (get_local_symbols, get_file_symbols, get_global_symbols): New
701 functions.
702 (buildsym_init): Update.
703
704 2018-07-20 Tom Tromey <tom@tromey.com>
705
706 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
707 (process_full_type_unit): Likewise.
708 (dwarf2_start_symtab): Set list_in_scope.
709
710 2018-07-20 Tom Tromey <tom@tromey.com>
711
712 * dwarf2read.c (process_psymtab_comp_unit_reader)
713 (build_type_psymtabs_reader): Do not set list_in_scope.
714
715 2018-07-20 Tom Tromey <tom@tromey.com>
716
717 * buildsym.c (free_pendings): Remove.
718 (add_symbol_to_list, scoped_free_pendings)
719 (finish_block_internal, buildsym_init): Update.
720
721 2018-07-20 Tom Tromey <tom@tromey.com>
722
723 * xcoffread.c (read_xcoff_symtab): Update.
724 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
725 Update.
726 * dbxread.c (process_one_symbol): Update.
727 * coffread.c (coff_symtab_read): Update.
728 * buildsym.h (finish_block): Update.
729 * buildsym.c (finish_block): Remove "listhead" argument.
730 (end_symtab_get_static_block): Update.
731
732 2018-07-20 Tom Tromey <tom@tromey.com>
733
734 * buildsym.h (class scoped_free_pendings): Remove constructor.
735 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
736 method.
737 <m_pending_block_obstack, m_pending_blocks>: New members.
738 (pending_block_obstack, pending_blocks): Remove.
739 (scoped_free_pendings::scoped_free_pendings): Default.
740 (~scoped_free_pendings): Update.
741 (free_pending_blocks): Remove.
742 (finish_block_internal, record_pending_block, make_blockvector)
743 (end_symtab_get_static_block, augment_type_symtab, push_context)
744 (buildsym_init): Update.
745
746 2018-07-20 Tom Tromey <tom@tromey.com>
747
748 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
749 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
750 members.
751 (pending_addrmap, pending_addrmap_obstack)
752 (pending_addrmap_interesting): Remove.
753 (scoped_free_pendings, record_block_range, make_blockvector)
754 (prepare_for_building, reset_symtab_globals, buildsym_init):
755 Update.
756
757 2018-07-20 Tom Tromey <tom@tromey.com>
758
759 * xcoffread.c (process_linenos): Update.
760 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
761 * mdebugread.c (psymtab_to_symtab_1): Update.
762 * dwarf2read.c (setup_type_unit_groups)
763 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
764 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
765 * dbxread.c (process_one_symbol): Update.
766 * coffread.c (coff_symtab_read, enter_linenos)
767 (process_coff_symbol): Update.
768 * buildsym.h (current_subfile): Don't declare.
769 (get_current_subfile): Declare.
770 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
771 member.
772 (start_subfile, free_buildsym_compunit, push_subfile)
773 (prepare_for_building, start_symtab): Update.
774 (get_current_subfile): New function.
775
776 2018-07-20 Tom Tromey <tom@tromey.com>
777
778 * coffread.c (coff_symtab_read): Update.
779 * xcoffread.c (read_xcoff_symtab): Update.
780 * dwarf2read.c (new_symbol): Update.
781 (read_func_scope, read_lexical_block_scope): Update.
782 * dbxread.c (process_one_symbol): Update.
783 * buildsym.h (context_stack, context_stack_depth): Don't declare.
784 (outermost_context_p): Remove macro.
785 (outermost_context_p, get_current_context_stack)
786 (get_context_stack_depth): Declare.
787 (pop_context): Return struct context_stack.
788 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
789 member.
790 (context_stack_size): Remove.
791 (INITIAL_CONTEXT_STACK_SIZE): Remove.
792 (prepare_for_building, end_symtab_get_static_block)
793 (augment_type_symtab, push_context): Update.
794 (pop_context): Return struct context_stack.
795 (outermost_context_p, get_current_context_stack)
796 (get_context_stack_depth): New functions.
797 (buildsym_init): Update.
798
799 2018-07-20 Tom Tromey <tom@tromey.com>
800
801 * rust-exp.y: Now a pure parser. Update all rules.
802 (%union): Move earlier.
803 (current_parser, work_obstack): Remove globals.
804 (rust_parser, ~rust_parser): Update.
805 (class rust_parser) <copy_name, concat3, crate_name, super_name,
806 lex_character, lex_number, lex_string, lex_identifier,
807 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
808 convert_name, convert_params_to_expression,
809 convert_ast_to_expression, ast_basic_type, ast_operation,
810 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
811 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
812 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
813 ast_array_type, ast_slice_type, ast_reference_type,
814 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
815 (rust_parse): Update.
816 (rustyyerror, rustyylex): Add parser parameter.
817 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
818 (rust_lex_stringish_test, rust_lex_test_sequence)
819 (rust_lex_test_trailing_dot, rust_lex_test_completion)
820 (rust_lex_test_push_back, rust_lex_tests): Update.
821
822 2018-07-19 Pedro Alves <palves@redhat.com>
823
824 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
825 gdb::unique_xmalloc_ptr.
826 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
827 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
828 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
829 copy-initialization.
830 * guile/scm-pretty-print.c (ppscm_print_children): Use
831 gdb::unique_xmalloc_ptr instead of cleanups.
832 (gdbscm_apply_val_pretty_printer): Remove cleanups.
833 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
834 gdb::unique_xmalloc_ptr.
835 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
836 Adjust to use gdb::unique_xmalloc_ptr.
837 * guile/scm-utils.c (extract_arg): Adjust.
838 * guile/scm-value.c (gdbscm_value_field): Adjust to use
839 gdb::unique_xmalloc_ptr instead of a cleanup.
840
841 2018-07-19 Tom Tromey <tom@tromey.com>
842
843 * utils.c (do_value_free_to_mark)
844 (make_cleanup_value_free_to_mark): Remove.
845 * utils.h (make_cleanup_value_free_to_mark): Remove.
846
847 2018-07-19 Pedro Alves <palves@redhat.com>
848
849 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
850 forwarding reference.
851
852 2018-07-18 Pedro Alves <palves@redhat.com>
853
854 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
855 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
856 cleanup.
857
858 2018-07-18 Pedro Alves <palves@redhat.com>
859
860 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
861 exceptions.
862 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
863 (gdbscm_wrap): New.
864 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
865 directly instead of a cleanup.
866 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
867 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
868 (vlscm_binop_gdbthrow): New, factored out from ...
869 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
870 (vlscm_rich_compare): Use gdbscm_wrap.
871 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
872 instead of a cleanup.
873 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
874 cleanup.
875 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
876 Use xfree directly instead of a cleanup.
877 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
878 Adjust to use gdbscm_wrap and scoped_value_mark.
879 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
880 (gdbscm_value_address, gdbscm_value_dereference)
881 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
882 scoped_value_mark.
883 (gdbscm_value_dynamic_type): Use scoped_value_mark.
884 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
885 scoped_value_mark.
886 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
887 gdbscm_wrap and scoped_value_mark.
888 (gdbscm_value_to_string): Use xfree directly instead of a
889 cleanup. Move 'buffer' unique_ptr to TRY scope.
890 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
891 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
892 scoped_value_mark.
893 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
894 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
895 scoped_value_mark.
896 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
897 gdbscm_wrap.
898
899 2018-07-18 Tom de Vries <tdevries@suse.de>
900
901 * findvar.c (default_read_var_value): Also resolve dynamic type for
902 LOC_OPTIMIZED_OUT vars.
903
904 2018-07-18 Maciej W. Rozycki <macro@mips.com>
905
906 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
907 decoding.
908
909 2018-07-17 Tom Tromey <tom@tromey.com>
910
911 * guile/scm-param.c (pascm_set_func, pascm_show_func)
912 (compute_enum_list, pascm_set_param_value_x)
913 (gdbscm_parameter_value): Update.
914 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
915 (gdbscm_scm_to_host_string): Update.
916 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
917 Update.
918 * guile/scm-cmd.c (cmdscm_add_completion): Update.
919 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
920 * guile/scm-string.c (gdbscm_scm_to_string): Return
921 unique_xmalloc_ptr.
922 (gdbscm_scm_to_host_string): Likewise.
923
924 2018-07-17 Tom Tromey <tom@tromey.com>
925
926 * guile/guile.c (gdbscm_eval_from_control_command): Update.
927 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
928 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
929 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
930 unique_xmalloc_ptr.
931
932 2018-07-17 Tom Tromey <tom@tromey.com>
933
934 * guile/scm-param.c (pascm_signal_setshow_error): Update.
935 * guile/guile-internal.h (gdbscm_exception_message_to_string):
936 Update.
937 * guile/scm-cmd.c (cmdscm_function): Update.
938 * guile/scm-pretty-print.c
939 (ppscm_print_exception_unless_memory_error): Update.
940 * guile/scm-exception.c (gdbscm_exception_message_to_string):
941 Return unique_xmalloc_ptr.
942
943 2018-07-17 Tom Tromey <tom@tromey.com>
944
945 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
946 Use string_printf.
947
948 2018-07-17 Jim Wilson <jimw@sifive.com>
949
950 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
951 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
952 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
953 unecessary braces after EF_RISCV_RVC test. Delete call to
954 set_gdbarch_decr_pc_after_break.
955
956 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
957 RISCV_LAST_FP_REGNUM + 1.
958 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
959
960 2018-07-17 Tom Tromey <tom@tromey.com>
961
962 * configure.ac: Remove --disable-gdbcli.
963 * configure: Rebuild.
964 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
965 (SUBDIR_CLI_CFLAGS): Remove.
966 (SFILES): Use SUBDIR_CLI_SRCS.
967 (COMMON_OBS): Use SUBDIR_CLI_OBS.
968
969 2018-07-17 Tom Tromey <tom@tromey.com>
970
971 PR gdb/18624:
972 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
973
974 2018-07-16 Jim Wilson <jimw@sifive.com>
975
976 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
977
978 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
979
980 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
981 variable.
982 (libunwind_frame_sniffer): Likewise.
983 (libunwind_frame_prev_register): Likewise.
984 (libunwind_sigtramp_frame_sniffer): Likewise.
985 * ia64-tdep.c (ia64_access_reg): Likewise.
986 (ia64_access_rse_reg): Likewise.
987 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
988 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
989
990 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
991
992 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
993
994 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
995
996 * remote-sim.c (gdbsim_target::close,
997 gdbsim_target::mourn_inferior): Remove unused variables.
998
999 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
1000
1001 * ia64-tdep.c (ktab_buf): New global.
1002 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
1003 (get_kernel_table): Adjust.
1004
1005 2018-07-16 Tom Tromey <tom@tromey.com>
1006
1007 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
1008 * dwarf2read.c (using_directives, new_symbol): Use
1009 outermost_context_p.
1010 * dbxread.c (process_one_symbol): Use outermost_context_p.
1011 * coffread.c (coff_symtab_read): Use outermost_context_p.
1012
1013 2018-07-16 Tom Tromey <tom@tromey.com>
1014
1015 * dwarf2read.c (using_directives, read_func_scope)
1016 (read_lexical_block_scope): Update.
1017 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1018 * buildsym.h (local_using_directives, global_using_directives):
1019 Don't declare.
1020 (get_local_using_directives, set_local_using_directives)
1021 (get_global_using_directives): Declare.
1022 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
1023 m_global_using_directives>: New members.
1024 (finish_block_internal, prepare_for_building)
1025 (reset_symtab_globals, end_symtab_get_static_block)
1026 (push_context): Update.
1027 (get_local_using_directives, set_local_using_directives)
1028 (get_global_using_directives): New functions.
1029 (buildsym_init): Update.
1030
1031 2018-07-16 Tom Tromey <tom@tromey.com>
1032
1033 * xcoffread.c (xcoff_initial_scan): Don't call
1034 free_pending_blocks.
1035 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
1036 * buildsym.h (class scoped_free_pendings): Add constructor.
1037 (free_pending_blocks): Don't declare.
1038 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
1039 (free_pending_blocks): Now static.
1040
1041 2018-07-16 Tom Tromey <tom@tromey.com>
1042
1043 * buildsym.h (push_subfile, pop_subfile): Update declarations.
1044 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
1045 member.
1046 (struct subfile_stack): Remove.
1047 (subfile_stack): Remove.
1048 (push_subfile, pop_subfile, buildsym_init): Update.
1049
1050 2018-07-16 Tom Tromey <tom@tromey.com>
1051
1052 * buildsym.c (push_subfile): Use gdb_assert.
1053 (pop_subfile): Use gdb_assert.
1054
1055 2018-07-16 Tom Tromey <tom@tromey.com>
1056
1057 * buildsym.h (merge_symbol_lists): Remove.
1058 * buildsym.c (merge_symbol_lists): Remove.
1059
1060 2018-07-16 Tom Tromey <tom@tromey.com>
1061
1062 * stabsread.c (scan_file_globals): Update comment.
1063 * stabsread.h (scan_file_globals): Move from buildsym.h.
1064 * buildsym.h (scan_file_globals): Move to stabsread.h.
1065
1066 2018-07-16 Tom Tromey <tom@tromey.com>
1067
1068 * xcoffread.c (xcoff_new_init): Update.
1069 * mipsread.c (mipscoff_new_init): Update.
1070 * mdebugread.c (mdebug_build_psymtabs): Update.
1071 * elfread.c (elf_new_init): Update.
1072 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
1073 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
1074 * buildsym.h (buildsym_new_init): Don't declare.
1075 * buildsym.c (buildsym_new_init): Remove.
1076
1077 2018-07-16 Tom Tromey <tom@tromey.com>
1078
1079 * stabsread.h (within_function): Move from buildsym.h.
1080 * stabsread.c (start_stabs): Clear within_function.
1081 * coffread.c (coff_start_symtab): Clear within_function.
1082 * buildsym.h (within_function): Move to stabsread.h.
1083 * buildsym.c (prepare_for_building): Update.
1084
1085 2018-07-16 Tom Tromey <tom@tromey.com>
1086
1087 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
1088 * dwarf2read.c (dwarf2_start_symtab): Don't set
1089 processing_gcc_compilation.
1090 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
1091
1092 2018-07-16 Tom Tromey <tom@tromey.com>
1093
1094 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
1095 (next_symbol_text_func): Move from buildsym.h.
1096 * stabsread.c (hashname): Move from buildsym.c.
1097 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
1098 (next_symbol_text_func, hashname): Move to stabsread.h.
1099 * buildsym.c: Don't include bcache.h
1100 (hashname): Move to stasbread.c.
1101
1102 2018-07-16 Tom Tromey <tom@tromey.com>
1103
1104 * buildsym.h (context_stack_size): Don't declare.
1105 * buildsym.c (context_stack_size): New global.
1106
1107 2018-07-16 Tom Tromey <tom@tromey.com>
1108
1109 * dbxread.c (processing_acc_compilation): New global.
1110 * buildsym.h (processing_acc_compilation): Don't declare.
1111
1112 2018-07-16 Tom Tromey <tom@tromey.com>
1113
1114 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
1115 * dbxread.c (read_ofile_symtab): Update.
1116 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
1117 * buildsym.h (last_source_start_addr): Remove.
1118 (set_last_source_start_addr, get_last_source_start_addr):
1119 Declare.
1120 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
1121 parameter.
1122 (struct buildsym_compunit) <m_last_source_start_addr>: New
1123 member.
1124 (prepare_for_building): Remove start_addr parameter.
1125 (start_symtab, restart_symtab, end_symtab_get_static_block)
1126 (end_symtab_with_blockvector): Update.
1127 (set_last_source_start_addr, get_last_source_start_addr): New
1128 functions.
1129
1130 2018-07-16 Tom Tromey <tom@tromey.com>
1131
1132 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
1133 member.
1134 (have_line_numbers): Remove.
1135 (record_line, prepare_for_building, end_symtab_get_static_block)
1136 (augment_type_symtab): Update.
1137
1138 2018-07-16 Tom Tromey <tom@tromey.com>
1139
1140 * buildsym.c (~buildsym_compunit): Free the macro table.
1141 (struct buildsym_compunit) <get_macro_table, release_macros>: New
1142 methods.
1143 <m_pending_macros>: New member.
1144 (pending_macros): Remove.
1145 (~scoped_free_pendings, get_macro_table, prepare_for_building)
1146 (reset_symtab_globals, end_symtab_get_static_block)
1147 (end_symtab_with_blockvector, augment_type_symtab)
1148 (buildsym_init): Update.
1149
1150 2018-07-16 Tom Tromey <tom@tromey.com>
1151
1152 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
1153 parameter.
1154 (buildsym_compunit::set_last_source_file): New method.
1155 <m_last_source_file>: New member.
1156 (prepare_for_building): Remove "name" parameter.
1157 (start_symtab, restart_symtab, reset_symtab_globals): Update.
1158 (last_source_file): Remove.
1159 (set_last_source_file, get_last_source_file): Update.
1160
1161 2018-07-16 Tom Tromey <tom@tromey.com>
1162
1163 * buildsym.c (prepare_for_building): Add assert.
1164
1165 2018-07-16 Tom Tromey <tom@tromey.com>
1166
1167 * buildsym.c (~buildsym_compunit): Update.
1168 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
1169 (start_subfile, patch_subfile_names)
1170 (end_symtab_with_blockvector): Update.
1171
1172 2018-07-16 Tom Tromey <tom@tromey.com>
1173
1174 * buildsym.c (struct buildsym_compunit): Add constructor,
1175 destructor, initializers.
1176 (start_buildsym_compunit): Remove.
1177 (free_buildsym_compunit): Use "delete".
1178 (start_symtab, restart_symtab): Use "new".
1179
1180 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
1181
1182 * symfile.c (set_objfile_default_section_offset): Remove struct
1183 keyword.
1184
1185 2018-07-14 Stafford Horne <shorne@gmail.com>
1186
1187 * (Responsible Maintainers): Add myself as or1k maintainer.
1188
1189 2018-07-13 Tom Tromey <tom@tromey.com>
1190
1191 * symfile.c (set_objfile_default_section_offset): Use extra braces
1192 around initializer.
1193
1194 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1195
1196 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
1197 non-branching basr.
1198
1199 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1200
1201 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1202 unittests/cli-utils-selftests.c
1203 * unittests/cli-utils-selftests.c: New file.
1204
1205 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1206
1207 * NEWS: Mention new commands. Mention change to 'thread apply'.
1208
1209 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1210
1211 * thread.c (thr_try_catch_cmd): New function.
1212 (thread_apply_all_command): Handle qcs flags.
1213 (thread_apply_command): Handle qcs flags.
1214 (taas_command): New function.
1215 (tfaas_command): New function.
1216 (_initialize_thread): Update to setup the new commands 'taas
1217 and 'tfaas'. Change doc string for 'thread apply'.
1218
1219 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1220
1221 * stack.c: (trailing_outermost_frame): New function, mostly
1222 extracted from backtrace_command_1.
1223 (leading_innermost_frame): New function.
1224 (backtrace_command_1): Update to call trailing_outermost_frame.
1225 (frame_apply_command_count): New function.
1226 (frame_apply_level_command): New function.
1227 (frame_apply_all_command): New function.
1228 (frame_apply_command): New function.
1229 (faas_command): New function.
1230 (frame_cmd_list): New variable.
1231 (_initialize_stack): Update to setup the new commands 'frame apply'
1232 and 'faas'.
1233
1234 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1235
1236 * cli-utils.c (number_or_range_parser::get_number): Only handle
1237 numbers or convenience var as numbers.
1238 (parse_flags): New function.
1239 (parse_flags_qcs): New function.
1240 (number_or_range_parser::finished): Ensure parsing end is detected
1241 before end of string.
1242 * cli-utils.h (parse_flags): New function.
1243 (parse_flags_qcs): New function.
1244 (number_or_range_parser): Remove m_finished bool.
1245 (number_or_range_parser::skip_range): Set m_in_range to false.
1246
1247 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
1248
1249 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
1250 on Windows.
1251
1252 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1253 Jan Kratochvil <jan.kratochvil@redhat.com>
1254 Paul Fertser <fercerpav@gmail.com>
1255 Tsutomu Seki <sekiriki@gmail.com>
1256 Pedro Alves <palves@redhat.com>
1257
1258 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1259 'unittests/parse-connection-spec-selftests.c'.
1260 (COMMON_SFILES): Add 'common/netstuff.c'.
1261 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
1262 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
1263 * common/netstuff.c: New file.
1264 * common/netstuff.h: New file.
1265 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
1266 (wait_for_connect): Update comment. New parameter
1267 'gdb::optional<int> sock' instead of 'struct serial *scb'.
1268 Use 'sock' directly instead of 'scb->fd'.
1269 (try_connect): New function, with code from 'net_open'.
1270 (net_open): Rewrite main loop to deal with multiple
1271 sockets/addresses. Handle IPv6-style hostnames; implement
1272 support for IPv6 connections.
1273 * unittests/parse-connection-spec-selftests.c: New file.
1274
1275 2018-07-11 Pedro Alves <palves@redhat.com>
1276
1277 PR gdb/23377
1278 * remote.c (remote_target::remote_detach_pid): Call
1279 set_current_process.
1280
1281 2018-07-11 Pedro Alves <palves@redhat.com>
1282
1283 * h8300-tdep.c (h8300_gdbarch_init): Remove
1284 set_gdbarch_ecoff_reg_to_regnum calls.
1285
1286 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1287
1288 PR c++/23373
1289 * c-typeprint.c (c_type_print_base_struct_union): Don't print
1290 offsets/sizes for static members of a class/struct.
1291
1292 2018-07-11 Alan Hayward <alan.hayward@arm.com>
1293
1294 * target-descriptions.c (tdesc_register_bitsize): Rename.
1295 * target-descriptions.h (tdesc_register_bitsize): Likewise.
1296 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
1297 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
1298
1299 2018-07-10 Tom Tromey <tom@tromey.com>
1300
1301 * breakpoint.c (moribund_locations): Now static and a
1302 std::vector.
1303 (breakpoint_init_inferior, moribund_breakpoint_here_p)
1304 (build_bpstat_chain, update_global_location_list)
1305 (breakpoint_retire_moribund): Update.
1306 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
1307 VEC.
1308
1309 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
1310
1311 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
1312 (riscv_register_reggroup_p): Use new function, remove unneeded
1313 parenthesis.
1314 (riscv_push_dummy_call): Extend assert to compare against xlen or
1315 flen based on register type.
1316
1317 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
1318
1319 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
1320
1321 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
1322
1323 * remote.c (show_hardware_watchpoint_limit): New function.
1324 (show_hardware_watchpoint_length_limit): New function.
1325 (show_hardware_breakpoint_limit): New function.
1326 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
1327 where appropriate, update help text.
1328
1329 2018-07-09 Tom Tromey <tom@tromey.com>
1330
1331 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
1332 (CLIBS): Don't mention NAT_CLIBS.
1333
1334 2018-07-09 Tom Tromey <tom@tromey.com>
1335
1336 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
1337 (LIBGDB_OBS, clean mostlyclean): Update.
1338 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
1339
1340 2018-07-09 Tom Tromey <tom@tromey.com>
1341
1342 * Makefile.in (%.c: %.y): Use ECHO_YACC.
1343 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
1344 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
1345
1346 2018-07-09 Tom Tromey <tom@tromey.com>
1347
1348 * Makefile.in (ALLDEPFILES): Remove exec.c.
1349 (COMMON_OBS): Remove exec.o.
1350 (COMMON_SFILES): Add exec.c.
1351
1352 2018-07-09 Tom Tromey <tom@tromey.com>
1353
1354 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
1355
1356 2018-07-09 Tom Tromey <tom@tromey.com>
1357
1358 * Makefile.in (clean mostlyclean): Remove stamp-version.
1359 (version.c): Depend on stamp-version.
1360 (stamp-version): New rule, from version.c rule.
1361
1362 2018-07-09 Tom Tromey <tom@tromey.com>
1363
1364 * Makefile.in (init.c): Depend on stamp-init.
1365 (stamp-init): New rule, from init.c rule.
1366 (clean mostlyclean): Remove stamp-init.
1367
1368 2018-07-09 Tom Tromey <tom@tromey.com>
1369
1370 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
1371 SUBDIR_GCC_COMPILE_SRCS.
1372
1373 2018-07-09 Tom Tromey <tom@tromey.com>
1374
1375 * Makefile.in (init.c): Remove some unused sed rules.
1376
1377 2018-07-09 Tom Tromey <tom@tromey.com>
1378
1379 * Makefile.in (TSOBS): Remove.
1380 (INIT_FILES): Update.
1381 (LIBGDB_OBS): Update.
1382 (COMMON_SFILES): Add inflow.c.
1383 (SFILES): Remove inflow.c.
1384
1385 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1386
1387 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
1388
1389 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
1390
1391 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
1392 get_saveloc_name, is_signal_frame_name, step_name,
1393 init_remote_name, create_addr_space_name,
1394 destroy_addr_space_name, search_unwind_table_name,
1395 find_dyn_list_name): Constify.
1396
1397 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
1398
1399 * darwin-nat.c (darwin_pthread_kill): New function.
1400 (darwin_resume_thread): Use darwin_pthread_kill.
1401
1402 2018-07-05 Tom de Vries <tdevries@suse.de>
1403
1404 * macroexp.c (macro_buffer) <operator=>: New member function.
1405
1406 2018-07-04 Tom Tromey <tom@tromey.com>
1407
1408 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
1409
1410 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
1411
1412 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
1413 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
1414 * maint.c: Likewise.
1415 * top.c: Likewise.
1416
1417 2018-07-04 Joel Brobecker <brobecker@adacore.com>
1418
1419 * NEWS: Create a new section for the next release branch.
1420 Rename the section of the current branch, now that it has
1421 been cut.
1422
1423 2018-07-04 Joel Brobecker <brobecker@adacore.com>
1424
1425 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
1426 * version.in: Bump version to 8.2.50.DATE-git.
1427
1428 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1429 Pedro Alves <palves@redhat.com>
1430
1431 * linux-nat.c (linux_init_ptrace): Rename to ...
1432 (linux_init_ptrace_procfs): ... this. Call
1433 linux_proc_init_warnings.
1434 (linux_nat_target::post_attach)
1435 (linux_nat_target::post_startup_inferior): Adjust.
1436 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
1437 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
1438
1439 2018-07-04 Tom de Vries <tdevries@suse.de>
1440
1441 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
1442 check ...
1443 (read_comp_unit_head): ... here.
1444
1445 2018-07-03 Tom Tromey <tom@tromey.com>
1446
1447 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
1448 (stop_tracing, tstatus_command)
1449 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
1450 (print_one_static_tracepoint_marker): Update.
1451 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
1452 std::vector.
1453 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
1454 VEC.
1455 (all_tracepoints, static_tracepoints_here): Return std::vector.
1456
1457 2018-07-03 Tom Tromey <tom@tromey.com>
1458
1459 * common/ptid.c (ptid_equal): Remove.
1460 * common/ptid.h (ptid_equal): Don't declare.
1461 * ada-tasks.c: Update.
1462 * breakpoint.c: Update.
1463 * common/agent.c: Update.
1464 * corelow.c: Update.
1465 * darwin-nat-info.c: Update.
1466 * darwin-nat.c: Update.
1467 * dcache.c: Update.
1468 * dtrace-probe.c: Update.
1469 * dummy-frame.c: Update.
1470 * fbsd-nat.c: Update.
1471 * frame.c: Update.
1472 * gdbthread.h: Update.
1473 * gnu-nat.c: Update.
1474 * go32-nat.c: Update.
1475 * inf-loop.c: Update.
1476 * inf-ptrace.c: Update.
1477 * infcall.c: Update.
1478 * infcmd.c: Update.
1479 * inflow.c: Update.
1480 * infrun.c: Update.
1481 * linux-fork.c: Update.
1482 * linux-nat.c: Update.
1483 * linux-thread-db.c: Update.
1484 * mi/mi-cmd-var.c: Update.
1485 * mi/mi-interp.c: Update.
1486 * mi/mi-main.c: Update.
1487 * nto-procfs.c: Update.
1488 * ppc-linux-tdep.c: Update.
1489 * procfs.c: Update.
1490 * python/py-inferior.c: Update.
1491 * python/py-record-btrace.c: Update.
1492 * python/py-record.c: Update.
1493 * ravenscar-thread.c: Update.
1494 * regcache.c: Update.
1495 * remote-sim.c: Update.
1496 * remote.c: Update.
1497 * sol-thread.c: Update.
1498 * solib.c: Update.
1499 * target.c: Update.
1500 * tui/tui-stack.c: Update.
1501 * varobj.c: Update.
1502 * windows-nat.c: Update.
1503 * windows-tdep.c: Update.
1504
1505 2018-07-03 Tom Tromey <tom@tromey.com>
1506
1507 * common/ptid.c (ptid_match): Remove.
1508 * common/ptid.h (ptid_match): Don't declare.
1509 * fbsd-nat.c: Update.
1510 * infcmd.c: Update.
1511 * infrun.c: Update.
1512 * linux-nat.c: Update.
1513 * record-btrace.c: Update.
1514 * regcache.c: Update.
1515 * remote.c: Update.
1516
1517 2018-07-03 Tom Tromey <tom@tromey.com>
1518
1519 * common/ptid.c (ptid_tid_p): Remove.
1520 * common/ptid.h (ptid_tid_p): Don't declare.
1521 * sol-thread.c: Update.
1522
1523 2018-07-03 Tom Tromey <tom@tromey.com>
1524
1525 * common/ptid.c (ptid_lwp_p): Remove.
1526 * common/ptid.h (ptid_lwp_p): Don't declare.
1527 * fbsd-nat.c: Update.
1528 * linux-nat.c: Update.
1529 * nat/linux-procfs.c: Update.
1530 * nat/x86-linux-dregs.c: Update.
1531 * sol-thread.c: Update.
1532
1533 2018-07-03 Tom Tromey <tom@tromey.com>
1534
1535 * common/ptid.c (ptid_is_pid): Remove.
1536 * common/ptid.h (ptid_is_pid): Don't declare.
1537 * infrun.c: Update.
1538 * linux-nat.c: Update.
1539 * mi/mi-interp.c: Update.
1540 * remote.c: Update.
1541 * thread.c: Update.
1542
1543 2018-07-03 Tom Tromey <tom@tromey.com>
1544
1545 * common/ptid.c (ptid_get_tid): Remove.
1546 * common/ptid.h (ptid_get_tid): Don't declare.
1547 * ada-tasks.c: Update.
1548 * aix-thread.c: Update.
1549 * bsd-uthread.c: Update.
1550 * darwin-nat.c: Update.
1551 * fbsd-nat.c: Update.
1552 * i386-darwin-nat.c: Update.
1553 * infrun.c: Update.
1554 * linux-tdep.c: Update.
1555 * nto-procfs.c: Update.
1556 * ppc-ravenscar-thread.c: Update.
1557 * python/py-infthread.c: Update.
1558 * ravenscar-thread.c: Update.
1559 * sol-thread.c: Update.
1560 * sparc-ravenscar-thread.c: Update.
1561 * windows-nat.c: Update.
1562
1563 2018-07-03 Tom Tromey <tom@tromey.com>
1564
1565 * common/ptid.c (ptid_get_lwp): Remove.
1566 * common/ptid.h (ptid_get_lwp): Don't declare.
1567 * aarch64-linux-nat.c: Update.
1568 * ada-tasks.c: Update.
1569 * aix-thread.c: Update.
1570 * amd64-linux-nat.c: Update.
1571 * arm-linux-nat.c: Update.
1572 * corelow.c: Update.
1573 * fbsd-nat.c: Update.
1574 * fbsd-tdep.c: Update.
1575 * gnu-nat.c: Update.
1576 * i386-cygwin-tdep.c: Update.
1577 * i386-gnu-nat.c: Update.
1578 * i386-linux-nat.c: Update.
1579 * ia64-linux-nat.c: Update.
1580 * inf-ptrace.c: Update.
1581 * infrun.c: Update.
1582 * linux-fork.c: Update.
1583 * linux-nat.c: Update.
1584 * linux-tdep.c: Update.
1585 * linux-thread-db.c: Update.
1586 * mips-linux-nat.c: Update.
1587 * nat/aarch64-linux-hw-point.c: Update.
1588 * nat/aarch64-linux.c: Update.
1589 * nat/linux-btrace.c: Update.
1590 * nat/linux-osdata.c: Update.
1591 * nat/linux-procfs.c: Update.
1592 * nat/x86-linux-dregs.c: Update.
1593 * obsd-nat.c: Update.
1594 * ppc-fbsd-nat.c: Update.
1595 * ppc-linux-nat.c: Update.
1596 * procfs.c: Update.
1597 * python/py-infthread.c: Update.
1598 * ravenscar-thread.c: Update.
1599 * remote.c: Update.
1600 * s390-linux-nat.c: Update.
1601 * sol-thread.c: Update.
1602 * sol2-tdep.c: Update.
1603 * spu-linux-nat.c: Update.
1604 * x86-linux-nat.c: Update.
1605 * xtensa-linux-nat.c: Update.
1606
1607 2018-07-03 Tom Tromey <tom@tromey.com>
1608
1609 * common/ptid.c (ptid_get_pid): Remove.
1610 * common/ptid.h (ptid_get_pid): Don't declare.
1611 * aarch64-linux-nat.c: Update.
1612 * ada-lang.c: Update.
1613 * aix-thread.c: Update.
1614 * alpha-bsd-nat.c: Update.
1615 * amd64-fbsd-nat.c: Update.
1616 * amd64-linux-nat.c: Update.
1617 * arm-linux-nat.c: Update.
1618 * arm-nbsd-nat.c: Update.
1619 * auxv.c: Update.
1620 * break-catch-syscall.c: Update.
1621 * breakpoint.c: Update.
1622 * bsd-uthread.c: Update.
1623 * corelow.c: Update.
1624 * ctf.c: Update.
1625 * darwin-nat.c: Update.
1626 * fbsd-nat.c: Update.
1627 * fbsd-tdep.c: Update.
1628 * gcore.c: Update.
1629 * gnu-nat.c: Update.
1630 * hppa-nbsd-nat.c: Update.
1631 * hppa-obsd-nat.c: Update.
1632 * i386-fbsd-nat.c: Update.
1633 * ia64-linux-nat.c: Update.
1634 * inf-ptrace.c: Update.
1635 * infcmd.c: Update.
1636 * inferior.c: Update.
1637 * inferior.h: Update.
1638 * inflow.c: Update.
1639 * infrun.c: Update.
1640 * linux-fork.c: Update.
1641 * linux-nat.c: Update.
1642 * linux-tdep.c: Update.
1643 * linux-thread-db.c: Update.
1644 * m68k-bsd-nat.c: Update.
1645 * mi/mi-interp.c: Update.
1646 * mi/mi-main.c: Update.
1647 * mips-linux-nat.c: Update.
1648 * mips-nbsd-nat.c: Update.
1649 * mips64-obsd-nat.c: Update.
1650 * nat/aarch64-linux-hw-point.c: Update.
1651 * nat/aarch64-linux.c: Update.
1652 * nat/linux-btrace.c: Update.
1653 * nat/linux-osdata.c: Update.
1654 * nat/linux-procfs.c: Update.
1655 * nat/x86-linux-dregs.c: Update.
1656 * nto-procfs.c: Update.
1657 * obsd-nat.c: Update.
1658 * ppc-linux-nat.c: Update.
1659 * ppc-nbsd-nat.c: Update.
1660 * ppc-obsd-nat.c: Update.
1661 * proc-service.c: Update.
1662 * procfs.c: Update.
1663 * python/py-inferior.c: Update.
1664 * python/py-infthread.c: Update.
1665 * ravenscar-thread.c: Update.
1666 * record.c: Update.
1667 * remote-sim.c: Update.
1668 * remote.c: Update.
1669 * rs6000-nat.c: Update.
1670 * s390-linux-nat.c: Update.
1671 * sh-nbsd-nat.c: Update.
1672 * sol-thread.c: Update.
1673 * sparc-nat.c: Update.
1674 * sparc64-tdep.c: Update.
1675 * spu-linux-nat.c: Update.
1676 * spu-tdep.c: Update.
1677 * target-debug.h: Update.
1678 * target.c: Update.
1679 * thread.c: Update.
1680 * tid-parse.c: Update.
1681 * tracefile-tfile.c: Update.
1682 * vax-bsd-nat.c: Update.
1683 * windows-nat.c: Update.
1684 * x86-linux-nat.c: Update.
1685 * x86-nat.c: Update.
1686
1687 2018-07-03 Tom Tromey <tom@tromey.com>
1688
1689 * common/ptid.c (pid_to_ptid): Remove.
1690 * common/ptid.h (pid_to_ptid): Don't declare.
1691 * aix-thread.c: Update.
1692 * arm-linux-nat.c: Update.
1693 * common/ptid.c: Update.
1694 * common/ptid.h: Update.
1695 * corelow.c: Update.
1696 * ctf.c: Update.
1697 * darwin-nat.c: Update.
1698 * fbsd-nat.c: Update.
1699 * fork-child.c: Update.
1700 * gnu-nat.c: Update.
1701 * go32-nat.c: Update.
1702 * inf-ptrace.c: Update.
1703 * infcmd.c: Update.
1704 * inferior.c: Update.
1705 * infrun.c: Update.
1706 * linux-fork.c: Update.
1707 * linux-nat.c: Update.
1708 * nat/aarch64-linux-hw-point.c: Update.
1709 * nat/fork-inferior.c: Update.
1710 * nat/x86-linux-dregs.c: Update.
1711 * nto-procfs.c: Update.
1712 * obsd-nat.c: Update.
1713 * procfs.c: Update.
1714 * progspace.c: Update.
1715 * remote.c: Update.
1716 * rs6000-nat.c: Update.
1717 * s390-linux-nat.c: Update.
1718 * sol-thread.c: Update.
1719 * spu-linux-nat.c: Update.
1720 * target.c: Update.
1721 * top.c: Update.
1722 * tracefile-tfile.c: Update.
1723 * windows-nat.c: Update.
1724
1725 2018-07-03 Tom Tromey <tom@tromey.com>
1726
1727 * common/ptid.h (ptid_build): Don't declare.
1728 * common/ptid.c (ptid_build): Remove.
1729 * aix-thread.c: Update.
1730 * bsd-kvm.c: Update.
1731 * bsd-uthread.c: Update.
1732 * common/agent.c: Update.
1733 * common/ptid.c: Update.
1734 * common/ptid.h: Update.
1735 * corelow.c: Update.
1736 * darwin-nat.c: Update.
1737 * fbsd-nat.c: Update.
1738 * gnu-nat.c: Update.
1739 * linux-fork.c: Update.
1740 * linux-nat.c: Update.
1741 * linux-thread-db.c: Update.
1742 * nat/linux-osdata.c: Update.
1743 * nat/linux-procfs.c: Update.
1744 * nto-procfs.c: Update.
1745 * obsd-nat.c: Update.
1746 * proc-service.c: Update.
1747 * procfs.c: Update.
1748 * ravenscar-thread.c: Update.
1749 * remote-sim.c: Update.
1750 * remote.c: Update.
1751 * sol-thread.c: Update.
1752 * target.c: Update.
1753 * windows-nat.c: Update.
1754
1755 2018-07-03 Tom Tromey <tom@tromey.com>
1756
1757 * infrun.c (follow_exec): Use exit_inferior_silent.
1758 * inferior.c (exit_inferior_num_silent): Remove.
1759 * inferior.h (exit_inferior_num_silent): Don't declare.
1760
1761 2018-07-03 Tom Tromey <tom@tromey.com>
1762
1763 PR cli/23340:
1764 * darwin-nat.c (darwin_attach_pid): Reset inferior and
1765 inferior_ptid on error.
1766
1767 2018-07-02 Maciej W. Rozycki <macro@mips.com>
1768 Simon Marchi <simon.marchi@polymtl.ca>
1769
1770 PR tdep/8282
1771 * disasm.h (gdb_disassembler): Add
1772 `m_disassembler_options_holder'. member
1773 * disasm.c (get_all_disassembler_options): New function.
1774 (gdb_disassembler::gdb_disassembler): Use it.
1775 (gdb_buffered_insn_length_init_dis): Likewise.
1776 (gdb_buffered_insn_length): Adjust accordingly.
1777 (set_disassembler_options): Handle options with arguments.
1778 (show_disassembler_options_sfunc): Likewise. Add a leading new
1779 line if showing options with descriptions.
1780 (disassembler_options_completer): Adapt to using the
1781 `disasm_options_and_args_t' structure.
1782 * mips-tdep.c (mips_disassembler_options): New variable.
1783 (mips_disassembler_options_o32): Likewise.
1784 (mips_disassembler_options_n32): Likewise.
1785 (mips_disassembler_options_n64): Likewise.
1786 (gdb_print_insn_mips): Don't set `disassembler_options'.
1787 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
1788 functions.
1789 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
1790 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
1791 `gdbarch_disassembler_options_implicit' and
1792 `gdbarch_valid_disassembler_options'.
1793 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
1794 `disasm_options_and_args_t' structure.
1795 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
1796 method.
1797 (valid_disassembler_options): Switch from `disasm_options_t' to
1798 the `disasm_options_and_args_t' structure.
1799 * NEWS: Document `set disassembler-options' support for the MIPS
1800 target.
1801 * gdbarch.h: Regenerate.
1802 * gdbarch.c: Regenerate.
1803
1804 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
1805
1806 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
1807
1808 2018-06-29 Joel Brobecker <brobecker@adacore.com>
1809
1810 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
1811 parameter in call to amd64_target_description.
1812 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
1813 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
1814 (amd64fbsd_init_abi): Likewise.
1815 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
1816 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
1817 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
1818 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
1819
1820 2018-06-29 Pedro Alves <palves@redhat.com>
1821
1822 * gdb/amd64-tdep.h (amd64_create_target_description): Add
1823 "segments" parameter.
1824 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
1825 (_initialize_amd64_tdep): Update call to
1826 amd64_create_target_description.
1827 (amd64_target_description): Add "segments" parameter. Adjust
1828 the implementation to use it.
1829 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
1830 call to amd64_create_target_description.
1831 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
1832 * gdb/arch/amd64.h (amd64_create_target_description): Add
1833 "segments" register.
1834 * gdb/arch/amd64.c (amd64_create_target_description): Add
1835 "segments" parameter. Call create_feature_i386_64bit_segments
1836 only if SEGMENTS is true.
1837 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
1838 call to amd64_create_target_description.
1839
1840 2018-06-29 Pedro Alves <palves@redhat.com>
1841
1842 * thread.c (thread_target_id_str): New, factored out from ...
1843 (print_thread_info_1): ... here. Use it to compute the max
1844 "Target Id" column width.
1845
1846 2018-06-29 Pedro Alves <palves@redhat.com>
1847
1848 * remote.c (remote_target::extra_thread_info): Delete
1849 'display_buf' and 'n' locals. from the cache, regardless of
1850 packet mechanims is in use. Use cache for qThreadExtra and qP
1851 methods too.
1852
1853 2018-06-29 Pedro Alves <palves@redhat.com>
1854
1855 * blockframe.c (find_pc_sect_containing_function): New function.
1856 * breakpoint.c (print_breakpoint_location): Don't call
1857 find_pc_sect_function.
1858 * linespec.c (create_sals_line_offset): Record the location's
1859 symbol in the sal.
1860 * linespec.c (convert_address_location_to_sals): Fill in sal's
1861 symbol with find_pc_sect_containing_function.
1862 * symtab.c (find_function_start_sal): Rename to ...
1863 (find_function_start_sal_1): ... this.
1864 (find_function_start_sal): Reimplement as wrapper around
1865 find_function_start_sal_1, and use
1866 find_pc_sect_containing_function to fill in the sal's symbol.
1867 (find_function_start_sal(symbol*, bool)): Adjust.
1868 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
1869 comments.
1870 (find_pc_sect_containing_function): Declare.
1871
1872 2018-06-29 Pedro Alves <palves@redhat.com>
1873
1874 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
1875 true if the the location has no symbol.
1876
1877 2018-06-28 Tom Tromey <tom@tromey.com>
1878
1879 * NEWS: Mention --enable-codesign.
1880 * silent-rules.mk (ECHO_SIGN): New variable.
1881 * configure.ac: Add --enable-codesign.
1882 * configure: Rebuild.
1883 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
1884 (gdb$(EXEEXT)): Optionally invoke codesign.
1885
1886 2018-06-28 Pedro Alves <palves@redhat.com>
1887
1888 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
1889 comments.
1890 (switch_to_thread_no_regs): Adjust comment.
1891 * infcmd.c (stop_pc): Delete.
1892 (post_create_inferior, info_program_command): Replace references
1893 to stop_pc with references to thread_info->suspend.stop_pc.
1894 * inferior.h (stop_pc): Delete declaration.
1895 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
1896 (handle_inferior_event_1, handle_signal_stop)
1897 (process_event_stop_test, keep_going_stepped_thread)
1898 (handle_step_into_function, handle_step_into_function_backward)
1899 (print_stop_location): Replace references to stop_pc with
1900 references to thread_info->suspend.stop_pc.
1901 (struct infcall_suspend_state) <stop_pc>: Delete field.
1902 (save_infcall_suspend_state, restore_infcall_suspend_state):
1903 Remove references to inf_stat->stop_pc.
1904 * linux-fork.c (fork_load_infrun_state): Likewise.
1905 * record-btrace.c (record_btrace_set_replay): Likewise.
1906 * record-full.c (record_full_goto_entry): Likewise.
1907 * remote.c (print_one_stopped_thread): Likewise.
1908 * target.c (target_resume): Extend comment.
1909 * thread.c (set_executing_thread): New.
1910 (set_executing): Use it.
1911 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
1912 Remove references to stop_pc.
1913
1914 2018-06-28 Pedro Alves <palves@redhat.com>
1915
1916 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
1917 Moving fetching stop_pc until after ecs->event_thread is refreshed.
1918
1919 2018-06-28 Tom Tromey <tom@tromey.com>
1920
1921 * coffread.c (coff_symfile_finish): Update.
1922 * xcoffread.c (xcoff_symfile_finish): Update.
1923 * elfread.c (elf_symfile_finish): Update.
1924 * symfile.h (dwarf2_free_objfile): Don't declare.
1925 * dwarf2read.c (_initialize_dwarf2_read): Use
1926 register_objfile_data_with_cleanup.
1927 (dwarf2_free_objfile): Now static. Change signature.
1928
1929 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1930
1931 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
1932 option "-o" to add-symbol-file-load to add an offset to each
1933 section's load address.
1934 * symfile.c (set_objfile_default_section_offset): New function.
1935
1936 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1937
1938 * symfile.c (add_symbol_file_command): Make sure that sections
1939 with the same name are sorted in the same order.
1940
1941 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1942
1943 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
1944 require the second argument. If omitted, load sections at the
1945 addresses specified in the file.
1946
1947 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1948
1949 * symfile.c (symbol_file_command, symbol_file_add_main_1)
1950 (_initialize_symfile): Add option "-o" to symbol-file to add an
1951 offset to each section of the symbol file.
1952
1953 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1954
1955 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
1956
1957 2018-06-27 Tom Tromey <tom@tromey.com>
1958
1959 * stack.c (_initialize_stack): Update "func" help text.
1960
1961 2018-06-27 Tom Tromey <tom@tromey.com>
1962
1963 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
1964 std::vector.
1965 (unwind_infopy_str, pyuw_create_unwind_info)
1966 (unwind_infopy_add_saved_register, pyuw_sniffer)
1967 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
1968 Update.
1969 (struct saved_reg): Add constructor.
1970 <value>: Now a gdbpy_ref<>.
1971
1972 2018-06-27 Tom Tromey <tom@tromey.com>
1973
1974 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
1975
1976 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1977
1978 * gdb-gdb.py.in: Format using autopep8.
1979
1980 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1981
1982 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
1983 (type_lookup_function): Recognize CORE_ADDR values.
1984
1985 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1986
1987 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
1988 print tag_name.
1989
1990 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1991
1992 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
1993 <__lt__>: Add.
1994
1995 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1996
1997 * gdb-gdb.py: Move to...
1998 * gdb-gdb.py.in: ... here.
1999 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
2000 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
2001 dependencies.
2002 (distclean): Remove gdb-gdb.py when cleaning.
2003 (gdb-gdb.py, gdb-gdb.gdb): New rules.
2004 * configure: Re-generate.
2005
2006 2018-06-27 Pedro Alves <palves@redhat.com>
2007
2008 * proc-service.c (get_ps_regcache): New.
2009 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2010 (ps_lsetfpregs): Use it.
2011
2012 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
2013
2014 PR gdb/21695
2015 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
2016 (dwarf_decode_lines_1): Adjust.
2017
2018 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2019
2020 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
2021 override.
2022 <info_proc>: Likewise.
2023
2024 2018-06-26 Joel Brobecker <brobecker@adacore.com>
2025
2026 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
2027 to windows_fetch_one_register, and only handle the case of
2028 fetching one register. Move the code that reloads the context
2029 and iterates over all registers if R is negative to...
2030 (windows_nat_target::fetch_registers): ... here.
2031 (do_windows_store_inferior_registers): Rename to
2032 windows_store_one_register, and only handle the case of storing
2033 one register. Move the code that handles the case where r is
2034 negative to...
2035 (windows_nat_target::store_registers) ... here.
2036
2037 2018-06-26 Tom Tromey <tom@tromey.com>
2038
2039 PR rust/22574:
2040 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
2041 * rust-lang.c (rust_print_struct_def): Add podata parameter.
2042 Update.
2043 (rust_internal_print_type): Add podata parameter.
2044 (rust_print_type): Update.
2045
2046 2018-06-26 Tom Tromey <tom@tromey.com>
2047
2048 * typeprint.h (struct print_offset_data) <update, finish,
2049 maybe_print_hole>: New methods.
2050 <indentation>: New constant.
2051 * typeprint.c (print_offset_data::indentation): Define.
2052 (print_offset_data::maybe_print_hole, print_offset_data::update)
2053 (print_offset_data::finish): Move from c-typeprint.c and rename.
2054 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
2055 (print_spaces_filtered_with_print_options): Update.
2056 (c_print_type_union_field_offset, maybe_print_hole)
2057 (c_print_type_struct_field_offset): Move to typeprint.c and
2058 rename.
2059 (c_type_print_base_struct_union): Update.
2060
2061 2018-06-25 Pedro Alves <palves@redhat.com>
2062
2063 * gdbthread.h (thread_info_ref, delete_thread)
2064 (delete_thread_silent, first_thread_of_inferior)
2065 (any_thread_of_inferior, switch_to_thread)
2066 (enable_thread_stack_temporaries)
2067 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2068 (get_last_thread_stack_temporary)
2069 (value_in_thread_stack_temporaries, can_access_registers_thread):
2070 Spell out "struct thread_info" instead of just "thread_info".
2071 * inferior.h (notice_new_inferior): Likewise.
2072
2073 2018-06-25 Pedro Alves <palves@redhat.com>
2074
2075 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2076 pass thread_info pointer to delete_thread.
2077 (windows_nat_target::detach): Pass inferior pointer to
2078 detach_inferior.
2079 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
2080 delete_thread.
2081 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
2082 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
2083 and pass a thread_info pointer to delete_thread.
2084 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
2085 pass thread_info pointer to delete_thread.
2086 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
2087 delete_thread_silent call.
2088 * procfs.c (procfs_target::detach): Pass inferior pointer to
2089 detach_inferior.
2090 (procfs_target::wait): Pass thread_info pointer to delete_thread.
2091 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
2092 delete_thread_silent call.
2093 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2094 pass thread_info pointer to delete_thread.
2095 (windows_nat_target::detach): Pass inferior pointer to
2096 delete_inferior.
2097
2098 2018-06-22 Alan Hayward <alan.hayward@arm.com>
2099
2100 * regcache.c (readable_regcache::read_part): Fix asserts.
2101 (reg_buffer::raw_collect_part): New function.
2102 (regcache::write_part): Fix asserts.
2103 (reg_buffer::raw_supply_part): New function.
2104 (regcache::transfer_regset_register): New helper function.
2105 (regcache::transfer_regset): Call new functions.
2106 (regcache_supply_regset): Use gdb_byte*.
2107 (regcache::supply_regset): Likewise.
2108 (regcache_collect_regset): Likewise.
2109 (regcache::collect_regset): Likewise.
2110 * regcache.h (reg_buffer::raw_collect_part): New declaration.
2111 (reg_buffer::raw_supply_part): Likewise.
2112 (regcache::transfer_regset_register): Likewise.
2113 (regcache::transfer_regset): Use gdb_byte*.
2114
2115 2018-06-22 Alan Hayward <alan.hayward@arm.com>
2116
2117 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
2118
2119 2018-06-21 Pedro Alves <palves@redhat.com>
2120
2121 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
2122 instead of a ptid_t. All callers adjusted.
2123 * ada-tasks.c (ada_get_task_number): Likewise. All callers
2124 adjusted.
2125 (print_ada_task_info, display_current_task_id, task_command_1):
2126 Adjust.
2127 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
2128 inferior_thread.
2129 (breakpoint_kind): Adjust.
2130 (remove_breakpoints_pid): Rename to ...
2131 (remove_breakpoints_inf): ... this. Adjust to take an inferior
2132 pointer. All callers adjusted.
2133 (bpstat_clear_actions): Use inferior_thread.
2134 (get_bpstat_thread): New.
2135 (bpstat_do_actions): Use it.
2136 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
2137 to take a thread_info pointer. All callers adjusted.
2138 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
2139 (breakpoint_re_set_thread): Use inferior_thread.
2140 * breakpoint.h (struct inferior): Forward declare.
2141 (bpstat_stop_status): Update.
2142 (remove_breakpoints_pid): Delete.
2143 (remove_breakpoints_inf): New.
2144 * bsd-uthread.c (bsd_uthread_target::wait)
2145 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
2146 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
2147 (maint_btrace_packet_history_cmd)
2148 (maint_btrace_clear_packet_history_cmd): Adjust.
2149 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
2150 inferior_thread.
2151 * cli/cli-interp.c: Include "inferior.h".
2152 * common/refcounted-object.h (struct
2153 refcounted_object_ref_policy): New.
2154 * compile/compile-object-load.c: Include gdbthread.h.
2155 (store_regs): Use inferior_thread.
2156 * corelow.c (core_target::close): Use current_inferior.
2157 (core_target_open): Adjust to use first_thread_of_inferior and use
2158 the current inferior.
2159 * ctf.c (ctf_target::close): Adjust to use current_inferior.
2160 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
2161 <thread>: ... this new field. All references adjusted.
2162 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
2163 Take a thread_info pointer instead of a ptid_t.
2164 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
2165 (dummy_frame_discard, register_dummy_frame_dtor): Take a
2166 thread_info pointer instead of a ptid_t.
2167 * elfread.c: Include "inferior.h".
2168 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
2169 Use inferior_thread.
2170 * eval.c (evaluate_subexp): Likewise.
2171 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
2172 inferior_thread.
2173 * gdb_proc_service.h (struct thread_info): Forward declare.
2174 (struct ps_prochandle) <ptid>: Delete, replaced by ...
2175 <thread>: ... this new field. All references adjusted.
2176 * gdbarch.h, gdbarch.c: Regenerate.
2177 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
2178 'thread' parameter. All implementations and callers adjusted.
2179 * gdbthread.h (thread_info) <set_running>: New method.
2180 (delete_thread, delete_thread_silent): Take a thread_info pointer
2181 instead of a ptid.
2182 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
2183 (first_thread_of_process): Delete, replaced by ...
2184 (first_thread_of_inferior): ... this new function. All callers
2185 adjusted.
2186 (any_live_thread_of_process): Delete, replaced by ...
2187 (any_live_thread_of_inferior): ... this new function. All callers
2188 adjusted.
2189 (switch_to_thread, switch_to_no_thread): Declare.
2190 (is_executing): Delete.
2191 (enable_thread_stack_temporaries): Update comment.
2192 <enable_thread_stack_temporaries>: Take a thread_info pointer
2193 instead of a ptid_t. Incref the thread.
2194 <~enable_thread_stack_temporaries>: Decref the thread.
2195 <m_ptid>: Delete
2196 <m_thr>: New.
2197 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2198 (get_last_thread_stack_temporary)
2199 (value_in_thread_stack_temporaries, can_access_registers_thread):
2200 Take a thread_info pointer instead of a ptid_t. All callers
2201 adjusted.
2202 * infcall.c (get_call_return_value): Use inferior_thread.
2203 (run_inferior_call): Work with thread pointers instead of ptid_t.
2204 (call_function_by_hand_dummy): Work with thread pointers instead
2205 of ptid_t. Use thread_info_ref.
2206 * infcmd.c (proceed_thread_callback): Access thread's state
2207 directly.
2208 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
2209 access thread's state directly.
2210 (continue_command): Use inferior_thread.
2211 (info_program_command): Use find_thread_ptid and access thread
2212 state directly.
2213 (proceed_after_attach_callback): Use thread state directly.
2214 (notice_new_inferior): Take a thread_info pointer instead of a
2215 ptid_t. All callers adjusted.
2216 (exit_inferior): Take an inferior pointer instead of a pid. All
2217 callers adjusted.
2218 (exit_inferior_silent): New.
2219 (detach_inferior): Delete.
2220 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
2221 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
2222 (detach_inferior_command, kill_inferior_command): Use
2223 find_inferior_id instead of valid_gdb_inferior_id and
2224 gdb_inferior_id_to_pid.
2225 (inferior_command): Use inferior and thread pointers.
2226 * inferior.h (struct thread_info): Forward declare.
2227 (notice_new_inferior): Take a thread_info pointer instead of a
2228 ptid_t. All callers adjusted.
2229 (detach_inferior): Delete declaration.
2230 (exit_inferior, exit_inferior_silent): Take an inferior pointer
2231 instead of a pid. All callers adjusted.
2232 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
2233 (valid_gdb_inferior_id): Delete.
2234 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
2235 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
2236 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
2237 ...
2238 <inf>: ... this new field.
2239 <step_ptid>: Delete, replaced by ...
2240 <step_thread>: ... this new field.
2241 (get_displaced_stepping_state): Take an inferior pointer instead
2242 of a pid. All callers adjusted.
2243 (displaced_step_in_progress_any_inferior): Adjust.
2244 (displaced_step_in_progress_thread): Take a thread pointer instead
2245 of a ptid_t. All callers adjusted.
2246 (displaced_step_in_progress, add_displaced_stepping_state): Take
2247 an inferior pointer instead of a pid. All callers adjusted.
2248 (get_displaced_step_closure_by_addr): Adjust.
2249 (remove_displaced_stepping_state): Take an inferior pointer
2250 instead of a pid. All callers adjusted.
2251 (displaced_step_prepare_throw, displaced_step_prepare)
2252 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
2253 All callers adjusted.
2254 (start_step_over): Adjust.
2255 (infrun_thread_ptid_changed): Remove bit updating ptids in the
2256 displaced step queue.
2257 (do_target_resume): Adjust.
2258 (fetch_inferior_event): Use inferior_thread.
2259 (context_switch, get_inferior_stop_soon): Take an
2260 execution_control_state pointer instead of a ptid_t. All callers
2261 adjusted.
2262 (switch_to_thread_cleanup): Delete.
2263 (stop_all_threads): Use scoped_restore_current_thread.
2264 * inline-frame.c: Include "gdbthread.h".
2265 (inline_state) <inline_state>: Take a thread pointer instead of a
2266 ptid_t. All callers adjusted.
2267 <ptid>: Delete, replaced by ...
2268 <thread>: ... this new field.
2269 (find_inline_frame_state): Take a thread pointer instead of a
2270 ptid_t. All callers adjusted.
2271 (skip_inline_frames, step_into_inline_frame)
2272 (inline_skipped_frames, inline_skipped_symbol): Take a thread
2273 pointer instead of a ptid_t. All callers adjusted.
2274 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
2275 (inline_skipped_frames, inline_skipped_symbol): Likewise.
2276 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
2277 pointers directly.
2278 * linux-nat.c (get_detach_signal): Likewise.
2279 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
2280 (thread_db_notice_clone): Adjust.
2281 (thread_db_find_new_threads_silently)
2282 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
2283 a thread pointer instead of a ptid_t. All callers adjusted.
2284 * mi/mi-cmd-var.c: Include "inferior.h".
2285 (mi_cmd_var_update_iter): Update to use thread pointers.
2286 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
2287 inferior directly.
2288 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
2289 out to ...
2290 (mi_output_running): ... this new function.
2291 (mi_on_resume_1): Adjust to use it.
2292 (mi_user_selected_context_changed): Adjust to use inferior_thread.
2293 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
2294 directly.
2295 (interrupt_thread_callback): : Adjust to use thread and inferior
2296 pointers.
2297 * proc-service.c: Include "gdbthread.h".
2298 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
2299 * progspace-and-thread.c: Include "inferior.h".
2300 * progspace.c: Include "inferior.h".
2301 * python/py-exitedevent.c (create_exited_event_object): Adjust to
2302 hold a reference to an inferior_object.
2303 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
2304 inferior_thread.
2305 * python/py-inferior.c (struct inferior_object): Give the type a
2306 tag name instead of a typedef.
2307 (python_on_normal_stop): No need to check if the current thread is
2308 listed.
2309 (inferior_to_inferior_object): Change return type to
2310 inferior_object. All callers adjusted.
2311 (find_thread_object): Delete, bits factored out to ...
2312 (thread_to_thread_object): ... this new function.
2313 * python/py-infthread.c (create_thread_object): Use
2314 inferior_to_inferior_object.
2315 (thpy_is_stopped): Use thread pointer directly.
2316 (gdbpy_selected_thread): Use inferior_thread.
2317 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
2318 field, replaced with ...
2319 <thread>: ... this new field. All users adjusted.
2320 (btpy_insn_or_gap_new): Drop const.
2321 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
2322 callers adjusted.
2323 * python/py-record.c: Include "gdbthread.h".
2324 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2325 a ptid_t. All callers adjusted.
2326 (gdbpy_current_recording): Use inferior_thread.
2327 * python/py-record.h (recpy_record_object) <ptid>: Delete
2328 field, replaced with ...
2329 <thread>: ... this new field. All users adjusted.
2330 (recpy_element_object) <ptid>: Delete
2331 field, replaced with ...
2332 <thread>: ... this new field. All users adjusted.
2333 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2334 a ptid_t. All callers adjusted.
2335 * python/py-threadevent.c: Include "gdbthread.h".
2336 (get_event_thread): Use thread_to_thread_object.
2337 * python/python-internal.h (struct inferior_object): Forward
2338 declare.
2339 (find_thread_object, find_inferior_object): Delete declarations.
2340 (thread_to_thread_object, inferior_to_inferior_object): New
2341 declarations.
2342 * record-btrace.c: Include "inferior.h".
2343 (require_btrace_thread): Use inferior_thread.
2344 (record_btrace_frame_sniffer)
2345 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
2346 (get_thread_current_frame): Use scoped_restore_current_thread and
2347 switch_to_thread.
2348 (get_thread_current_frame): Use thread pointer directly.
2349 (record_btrace_replay_at_breakpoint): Use thread's inferior
2350 pointer directly.
2351 * record-full.c: Include "inferior.h".
2352 * regcache.c: Include "gdbthread.h".
2353 (get_thread_arch_regcache): Use the inferior's address space
2354 directly.
2355 (get_thread_regcache, registers_changed_thread): New.
2356 * regcache.h (get_thread_regcache(thread_info *thread)): New
2357 overload.
2358 (registers_changed_thread): New.
2359 (remote_target) <remote_detach_1>: Swap order of parameters.
2360 (remote_add_thread): <remote_add_thread>: Return the new thread.
2361 (get_remote_thread_info(ptid_t)): New overload.
2362 (remote_target::remote_notice_new_inferior): Use thread pointers
2363 directly.
2364 (remote_target::process_initial_stop_replies): Use
2365 thread_info::set_running.
2366 (remote_target::remote_detach_1, remote_target::detach)
2367 (extended_remote_target::detach): Adjust.
2368 * stack.c (frame_show_address): Use inferior_thread.
2369 * target-debug.h (target_debug_print_thread_info_pp): New.
2370 * target-delegates.c: Regenerate.
2371 * target.c (default_thread_address_space): Delete.
2372 (memory_xfer_partial_1): Use current_inferior.
2373 (target_detach): Use current_inferior.
2374 (target_thread_address_space): Delete.
2375 (generic_mourn_inferior): Use current_inferior.
2376 * target.h (struct target_ops) <thread_address_space>: Delete.
2377 (target_thread_address_space): Delete.
2378 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
2379 pointers directly.
2380 (delete_thread_1, delete_thread, delete_thread_silent): Take a
2381 thread pointer instead of a ptid_t. Adjust all callers.
2382 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
2383 (first_thread_of_process): Delete, replaced by ...
2384 (first_thread_of_inferior): ... this new function. All callers
2385 adjusted.
2386 (any_thread_of_process): Rename to ...
2387 (any_thread_of_inferior): ... this, and take an inferior pointer.
2388 (any_live_thread_of_process): Rename to ...
2389 (any_live_thread_of_inferior): ... this, and take an inferior
2390 pointer.
2391 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2392 (value_in_thread_stack_temporaries)
2393 (get_last_thread_stack_temporary): Take a thread pointer instead
2394 of a ptid_t. Adjust all callers.
2395 (thread_info::set_running): New.
2396 (validate_registers_access): Use inferior_thread.
2397 (can_access_registers_ptid): Rename to ...
2398 (can_access_registers_thread): ... this, and take a thread
2399 pointer.
2400 (print_thread_info_1): Adjust to compare thread pointers instead
2401 of ptids.
2402 (switch_to_no_thread, switch_to_thread): Make extern.
2403 (scoped_restore_current_thread::~scoped_restore_current_thread):
2404 Use m_thread pointer directly.
2405 (scoped_restore_current_thread::scoped_restore_current_thread):
2406 Use inferior_thread.
2407 (thread_command): Use thread pointer directly.
2408 (thread_num_make_value_helper): Use inferior_thread.
2409 * top.c (execute_command): Use inferior_thread.
2410 * tui/tui-interp.c: Include "inferior.h".
2411 * varobj.c (varobj_create): Use inferior_thread.
2412 (value_of_root_1): Use find_thread_global_id instead of
2413 global_thread_id_to_ptid.
2414
2415 2018-06-21 Alan Hayward <alan.hayward@arm.com>
2416
2417 * regcache.c (readable_regcache::read_part): Avoid memcpy when
2418 possible.
2419 (regcache::write_part): Likewise.
2420 (readable_regcache::cooked_read_part): Update comment.
2421 (readable_regcache::cooked_write_part): Likewise.
2422 * regcache.h: (readable_regcache::read_part): Likewise.
2423 (regcache::write_part): Likewise.
2424
2425 2018-06-21 Richard Bunt <richard.bunt@arm.com>
2426 Dirk Schubert <dirk.schubert@arm.com>
2427
2428 * aarch64-linux-nat.c (post_attach): New.
2429 (aarch64_linux_nat_target::post_attach): Override post_attach to
2430 record the number of hardware debug registers.
2431
2432 2018-06-20 Tom Tromey <tom@tromey.com>
2433
2434 * python/py-param.c (add_setshow_generic): Make parameters const.
2435 (parmpy_init): Update.
2436
2437 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
2438
2439 * regcache.h (regcache_cooked_read_ftype): Rename to...
2440 (register_read_ftype): ...this, change type to function_view.
2441 (class reg_buffer) <save>: Remove src parameter.
2442 (readonly_detached_regcache) <readonly_detached_regcache>: Make
2443 parameter non-const in first overload. Remove src parameter in
2444 second overload.
2445 * regcache.c (do_cooked_read): Remove.
2446 (readonly_detached_regcache::readonly_detached_regcache): Make
2447 parameter non-const, adjust call to other constructor.
2448 (reg_buffer::save): Remove src parameter.
2449 * frame.c (do_frame_register_read): Remove.
2450 (frame_save_as_regcache): Use lambda function.
2451 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
2452 parameter to ppu2spu_data *.
2453 (ppu2spu_sniffer): Use lambda function.
2454
2455 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
2456
2457 * record-full.c (record_full_target::insert_breakpoint): Remove
2458 "struct" keyword, add const.
2459
2460 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
2461
2462 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
2463 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
2464 * configure.ac: Remove AC_PREREQ, add missing quoting.
2465 * gnulib/configure.ac: Modernize usage of
2466 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
2467 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
2468 (AUTOMAKE_VERSION): Bump to 1.15.1.
2469 * configure: Re-generate.
2470 * config.in: Re-generate.
2471 * aclocal.m4: Re-generate.
2472 * gnulib/aclocal.m4: Re-generate.
2473 * gnulib/config.in: Re-generate.
2474 * gnulib/configure: Re-generate.
2475 * gnulib/import/Makefile.in: Re-generate.
2476
2477 2018-06-19 Pedro Alves <palves@redhat.com>
2478
2479 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
2480 (lookup_minimal_symbol_by_pc_section): ... here with
2481 gdb_assert_not_reached added.
2482
2483 2018-06-19 Pedro Alves <palves@redhat.com>
2484
2485 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
2486 parameter with a block parameter. Compare location's block symbol
2487 with the frame's block instead of addresses.
2488 (skip_inline_frames): Pass the current block instead of the
2489 frame's address. Break out as soon as we determine the frame
2490 should not be skipped.
2491
2492 2018-06-18 Tom Tromey <tom@tromey.com>
2493
2494 * solib-aix.c (solib_aix_get_section_offsets): Return
2495 unique_xmalloc_ptr.
2496 (solib_aix_solib_create_inferior_hook): Update.
2497
2498 2018-06-18 Tom Tromey <tom@tromey.com>
2499
2500 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
2501
2502 2018-06-18 Tom Tromey <tom@tromey.com>
2503
2504 * solib-frv.c (frv_relocate_main_executable): Use
2505 unique_xmalloc_ptr.
2506 * solib-dsbt.c (dsbt_relocate_main_executable): Use
2507 unique_xmalloc_ptr.
2508
2509 2018-06-18 Tom Tromey <tom@tromey.com>
2510
2511 * objfiles.h (inhibit_section_map_updates): Update.
2512 (resume_section_map_updates, resume_section_map_updates_cleanup):
2513 Remove.
2514 * solib-svr4.c (svr4_handle_solib_event): Update.
2515 * objfiles.c (inhibit_section_map_updates): Return
2516 scoped_restore_tmpl<int>.
2517 (resume_section_map_updates, resume_section_map_updates_cleanup):
2518 Remove.
2519
2520 2018-06-18 Tom Tromey <tom@tromey.com>
2521
2522 * valprint.h (read_string): Update.
2523 * valprint.c (read_string): Change type of "buffer".
2524 (val_print_string): Update.
2525 * python/py-value.c (valpy_string): Update.
2526 * language.h (struct language_defn) <la_get_string>: Change
2527 type of "buffer".
2528 (default_get_string, c_get_string): Update.
2529 * language.c (default_get_string): Change type of "buffer".
2530 * guile/scm-value.c (gdbscm_value_to_string): Update.
2531 * c-lang.c (c_get_string): Change type of "buffer".
2532
2533 2018-06-18 Tom Tromey <tom@tromey.com>
2534
2535 * ser-mingw.c (struct pipe_state_destroyer): New.
2536 (pipe_state_up): New typedef.
2537 (cleanup_pipe_state): Remove.
2538 (pipe_windows_open): Use pipe_state_up. Don't release argv.
2539
2540 2018-06-18 Tom Tromey <tom@tromey.com>
2541
2542 * rust-lang.h (rust_yyerror): Don't declare.
2543 * rust-lang.c (rust_language_defn): Update.
2544 * rust-exp.y (yyerror): Now static.
2545 * parse.c (parse_exp_in_context_1): Update.
2546 * p-lang.h (p_yyerror): Don't declare.
2547 * p-lang.c (p_language_defn): Update.
2548 * p-exp.y (yyerror): Now static.
2549 * opencl-lang.c (opencl_language_defn): Update.
2550 * objc-lang.c (objc_language_defn): Update.
2551 * m2-lang.h (m2_yyerror): Don't declare.
2552 * m2-lang.c (m2_language_defn): Update.
2553 * m2-exp.y (yyerror): Now static.
2554 * language.h (struct language_defn) <la_error>: Remove.
2555 * language.c (unk_lang_error): Remove.
2556 (unknown_language_defn, auto_language_defn): Remove.
2557 * go-lang.h (go_yyerror): Don't declare.
2558 * go-lang.c (go_language_defn): Update.
2559 * go-exp.y (yyerror): Now static.
2560 * f-lang.h (f_yyerror): Don't declare.
2561 * f-lang.c (f_language_defn): Update.
2562 * f-exp.y (yyerror): Now static.
2563 * d-lang.h (d_yyerror): Don't declare.
2564 * d-lang.c (d_language_defn): Update.
2565 * d-exp.y (yyerror): Now static.
2566 * c-lang.h (c_yyerror): Don't declare.
2567 * c-lang.c (c_language_defn, cplus_language_defn)
2568 (asm_language_defn, minimal_language_defn): Update.
2569 * c-exp.y (yyerror): Now static.
2570 * ada-lang.h (ada_yyerror): Don't declare.
2571 * ada-lang.c (ada_language_defn): Update.
2572 * ada-exp.y (yyerror): Now static.
2573
2574 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2575
2576 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
2577 (store_sveregs_to_thread): Likewise.
2578 (aarch64_linux_fetch_inferior_registers): Check for SVE.
2579 (aarch64_linux_store_inferior_registers): Likewise.
2580 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
2581 function.
2582 (aarch64_sve_regs_copy_to_regcache): Likewise.
2583 (aarch64_sve_regs_copy_from_regcache): Likewise.
2584 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
2585 declaration.
2586 (aarch64_sve_regs_copy_to_regcache): Likewise.
2587 (aarch64_sve_regs_copy_from_regcache): Likewise.
2588 (sve_context): Structure from Linux headers.
2589 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
2590 (SVE_SIG_ZREG_SIZE): Likewise.
2591 (SVE_SIG_PREG_SIZE): Likewise.
2592 (SVE_SIG_FFR_SIZE): Likewise.
2593 (SVE_SIG_REGS_OFFSET): Likewise.
2594 (SVE_SIG_ZREGS_OFFSET): Likewise.
2595 (SVE_SIG_ZREG_OFFSET): Likewise.
2596 (SVE_SIG_ZREGS_SIZE): Likewise.
2597 (SVE_SIG_PREGS_OFFSET): Likewise.
2598 (SVE_SIG_PREG_OFFSET): Likewise.
2599 (SVE_SIG_PREGS_SIZE): Likewise.
2600 (SVE_SIG_FFR_OFFSET): Likewise.
2601 (SVE_SIG_REGS_SIZE): Likewise.
2602 (SVE_SIG_CONTEXT_SIZE): Likewise.
2603 (SVE_PT_REGS_MASK): Likewise.
2604 (SVE_PT_REGS_FPSIMD): Likewise.
2605 (SVE_PT_REGS_SVE): Likewise.
2606 (SVE_PT_VL_INHERIT): Likewise.
2607 (SVE_PT_VL_ONEXEC): Likewise.
2608 (SVE_PT_REGS_OFFSET): Likewise.
2609 (SVE_PT_FPSIMD_OFFSET): Likewise.
2610 (SVE_PT_FPSIMD_SIZE): Likewise.
2611 (SVE_PT_SVE_ZREG_SIZE): Likewise.
2612 (SVE_PT_SVE_PREG_SIZE): Likewise.
2613 (SVE_PT_SVE_FFR_SIZE): Likewise.
2614 (SVE_PT_SVE_FPSR_SIZE): Likewise.
2615 (SVE_PT_SVE_FPCR_SIZE): Likewise.
2616 (__SVE_SIG_TO_PT): Likewise.
2617 (SVE_PT_SVE_OFFSET): Likewise.
2618 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
2619 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
2620 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
2621 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
2622 (SVE_PT_SVE_PREG_OFFSET): Likewise.
2623 (SVE_PT_SVE_PREGS_SIZE): Likewise.
2624 (SVE_PT_SVE_FFR_OFFSET): Likewise.
2625 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
2626 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
2627 (SVE_PT_SVE_SIZE): Likewise.
2628 (SVE_PT_SIZE): Likewise.
2629 (HAS_SVE_STATE): New define.
2630
2631 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2632
2633 * nat/aarch64-sve-linux-sigcontext.h: New file.
2634 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
2635 new files.
2636 (SVE_VQ_MIN): Likewise.
2637 (SVE_VQ_MAX): Likewise.
2638 (SVE_VL_MIN): Likewise.
2639 (SVE_VL_MAX): Likewise.
2640 (SVE_NUM_ZREGS): Likewise.
2641 (SVE_NUM_PREGS): Likewise.
2642 (sve_vl_valid): Likewise.
2643 (struct user_sve_header): Likewise.
2644
2645 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
2646 Richard Bunt <Richard.Bunt@arm.com>
2647
2648 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
2649 was requested by GDB.
2650
2651 2018-06-15 Tom de Vries <tdevries@suse.de>
2652
2653 * MAINTAINERS (Write After Approval): Add Tom de Vries.
2654
2655 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
2656
2657 * gnulib/update-gnulib.sh: Print expected versions of
2658 autoconf/aclocal.
2659
2660 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
2661
2662 * arch-utils.c (default_type_align): Use type_length_units.
2663 * gdbtypes.c (type_align): Use type_length_units.
2664
2665 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2666
2667 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
2668 of 'define' command.
2669
2670 2018-06-14 Tom de Vries <tdevries@suse.de>
2671
2672 PR cli/22573
2673 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
2674 get_no_prettyformat_print_options.
2675
2676 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
2677
2678 * sparc-nat.h: Include target.h.
2679 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
2680 <fetch_registers>: Remove this argument in function call.
2681 <store_registers>: Remove this argument in function call, remove
2682 extra semicolon.
2683 <low_forget_process>: Call sparc64_forget_process instead of
2684 sparc_forget_process.
2685
2686 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2687
2688 * procfs.c (_initialize_procfs): Use add_inf_child_target.
2689 (procfs_target::make_corefile_notes): Adjust to new
2690 target_read_alloc return type.
2691
2692 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2693 Stephen Roberts <stephen.roberts@arm.com>
2694
2695 PR gdb/22882
2696 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
2697 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
2698 Move should_notify_stop local into more inner scope.
2699
2700 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2701 Stephen Roberts <stephen.roberts@arm.com>
2702
2703 PR gdb/22882
2704 * infrun.c (resume_1): Add call to mark_async_event_handler.
2705
2706 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2707
2708 * infrun.c (do_target_wait): Change old version of $pc printed.
2709
2710 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
2711
2712 * dwarf2read.c (read_index_from_section): Rename to...
2713 (read_gdb_index_from_section): ... this, update all callers.
2714 (dwarf2_read_index): Rename to...
2715 (dwarf2_read_gdb_index): ... this, update all callers.
2716
2717 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
2718
2719 * gdb/hppa-linux-nat.c
2720 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
2721 hppa_linux_nat_target::fetch_registers.
2722
2723 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2724
2725 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
2726 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
2727 (AARCH64_DWARF_SVE_FFR): Likewise.
2728 (AARCH64_DWARF_SVE_P0): Likewise.
2729 (AARCH64_DWARF_SVE_Z0): Likewise.
2730
2731 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2732
2733 * common/common-regcache.h (raw_compare): New function.
2734 * regcache.c (regcache::raw_compare): Likewise.
2735 * regcache.h (regcache::raw_compare): New declaration.
2736
2737 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2738
2739 * common/common-regcache.h (reg_buffer_common): New structure.
2740 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
2741 (reg_buffer::raw_supply): Likewise.
2742 (reg_buffer::raw_supply_integer): Likewise.
2743 (reg_buffer::raw_supply_zeroed): Likewise.
2744 (reg_buffer::raw_collect): Likewise.
2745 (reg_buffer::raw_collect_integer): Likewise.
2746 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
2747 (reg_buffer::raw_supply): Likewise.
2748 (reg_buffer::raw_supply_integer): Likewise.
2749 (reg_buffer::raw_supply_zeroed): Likewise.
2750 (reg_buffer::raw_collect): Likewise.
2751 (reg_buffer::raw_collect_integer): Likewise.
2752
2753 2018-06-10 Tom Tromey <tom@tromey.com>
2754
2755 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
2756 (class remote_state) <stop_reply_queue>: Now std::vector.
2757 (remote_state::~remote_state)
2758 (remote_target::stop_reply_queue_length): Update.
2759 (struct queue_iter_param, remove_child_of_pending_fork)
2760 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
2761 (check_pending_event_prevents_wildcard_vcont_callback)
2762 (remove_stop_reply_for_inferior)
2763 (remove_stop_reply_of_remote_state)
2764 (remote_notif_remove_once_on_match)
2765 (stop_reply_match_ptid_and_ws)
2766 (remote_kill_child_of_pending_fork): Remove.
2767 (remote_target::remove_new_fork_children)
2768 (remote_target::check_pending_events_prevent_wildcard_vcont)
2769 (remote_target::discard_pending_stop_replies)
2770 (remote_target::discard_pending_stop_replies_in_queue)
2771 (remote_target::remote_notif_remove_queued_reply)
2772 (remote_target::queued_stop_reply)
2773 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
2774 (remote_target::wait, remote_target::kill_new_fork_children)
2775 (remote_target::async): Update.
2776
2777 2018-06-10 Tom Tromey <tom@tromey.com>
2778
2779 * record-full.c (record_full_arch_list_cleanups): Remove.
2780 (record_full_message): Use try/catch.
2781 (record_full_wait_cleanups): Remove.
2782 (record_full_wait_1): Use try/catch.
2783 (record_full_restore): Likewise.
2784
2785 2018-06-10 Tom Tromey <tom@tromey.com>
2786
2787 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
2788 declare VEC. Add constructor.
2789 <in_target_beneath>: Now bool.
2790 (record_full_breakpoints): Now a std::vector, static.
2791 (record_full_sync_record_breakpoints)
2792 (record_full_init_record_breakpoints)
2793 (record_full_target::insert_breakpoint)
2794 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
2795
2796 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
2797
2798 * dwarf2read.c (process_cu_includes): Remove struct keyword.
2799 * serial.c (serial_interface_lookup): Remove struct keyword.
2800
2801 2018-06-10 Tom Tromey <tom@tromey.com>
2802
2803 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
2804 method.
2805 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
2806 a method.
2807 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
2808 method.
2809 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
2810 "beneath" as a method.
2811 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
2812 Use "beneath" as a method.
2813
2814 2018-06-10 Tom Tromey <tom@tromey.com>
2815
2816 * tracefile.c (struct trace_file_writer_deleter): New.
2817 <operator()>: Rename from trace_file_writer_xfree.
2818 (trace_file_writer_up): New typedef.
2819 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
2820
2821 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
2822
2823 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
2824 <m_registers, m_register_status>: Change type to
2825 std::unique_ptr.
2826 * regcache.c (reg_buffer::reg_buffer): Use new instead of
2827 XCNEWVEC.
2828
2829 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
2830
2831 * common/common-regcache.h (enum register_status): Add
2832 underlying type "signed char".
2833 * regcache.h (reg_buffer) <m_register_status>: Change type to
2834 register_status *.
2835 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
2836 register_status instead of signed char.
2837 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
2838 (reg_buffer::get_register_status): Remove cast.
2839 (readable_regcache::raw_read): Remove cast.
2840 (readable_regcache::cooked_read): Remove cast.
2841
2842 2018-06-09 Tom Tromey <tom@tromey.com>
2843
2844 * source.c (reverse_search_command, forward_search_command): Use
2845 scoped_fd.
2846
2847 2018-06-09 Tom Tromey <tom@tromey.com>
2848
2849 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
2850 (serial_ops_list): Now static, std::vector.
2851 (serial_interface_lookup, serial_add_interface): Update.
2852
2853 2018-06-09 Tom Tromey <tom@tromey.com>
2854
2855 * dwarf2read.c (process_cu_includes): Update.
2856 (process_full_comp_unit): Update.
2857 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
2858 std::vector.
2859
2860 2018-06-08 Paul Koning <paul_koning@dell.com>
2861
2862 PR gdb/23252
2863
2864 * python/python.c (do_start_initialization):
2865 Avoid call to internal Python API.
2866 (init__gdb_module): New function.
2867
2868 2018-06-08 Gary Benson <gbenson@redhat.com>
2869
2870 * linux-thread-db.c (valprint.h): New include.
2871 (struct check_thread_db_info): New structure.
2872 (check_thread_db_on_load, tdb_testinfo): New static globals.
2873 (check_thread_db, check_thread_db_callback): New functions.
2874 (try_thread_db_load_1): Run integrity checks if requested.
2875 (maintenance_check_libthread_db): New function.
2876 (_initialize_thread_db): Register "maint check libthread-db"
2877 and "maint set/show check-libthread-db".
2878 * NEWS: Mention the above new commands.
2879
2880 2018-06-08 Tom Tromey <tom@tromey.com>
2881
2882 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
2883 now a method.
2884
2885 2018-06-08 Tom Tromey <tom@tromey.com>
2886
2887 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
2888
2889 2018-06-08 Tom Tromey <tom@tromey.com>
2890
2891 * common/btrace-common.h (struct btrace_data): Add constructor,
2892 destructor, move assignment operator.
2893 <empty, clear, fini>: New methods.
2894 <format>: Initialize.
2895 (btrace_data_init, btrace_data_fini, btrace_data_clear)
2896 (btrace_data_empty): Don't declare.
2897 * common/btrace-common.c (btrace_data_init): Remove.
2898 (btrace_data::fini): Rename from btrace_data_fini.
2899 (btrace_data::empty): Rename from btrace_data_empty.
2900 (btrace_data::clear): Rename from btrace_data_clear. Return
2901 bool.
2902 * btrace.h (make_cleanup_btrace_data): Don't declare.
2903 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
2904 (parse_xml_btrace): Update.
2905 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
2906 (maint_btrace_clear_packet_history_cmd): Update.
2907
2908 2018-06-07 Pedro Alves <palves@redhat.com>
2909
2910 * target.h (target_ops) <beneath>: Now a method. All references
2911 updated.
2912 (class target_stack): New.
2913 * target.c (g_target_stack): New.
2914 (g_current_top_target): Delete.
2915 (current_top_target): Get the top target out of g_target_stack.
2916 (target_stack::push, target_stack::unpush): New.
2917 (push_target, unpush_target): Reimplement.
2918 (target_is_pushed): Reimplement in terms of g_target_stack.
2919 (target_ops::beneath, target_stack::find_beneath): New.
2920
2921 2018-06-07 Pedro Alves <palves@redhat.com>
2922
2923 * target.h (find_target_beneath): Delete declaration.
2924 * target.c (find_target_beneath): Delete definition.
2925 * aix-thread.c: All callers of find_target_beneath adjusted to
2926 call target_ops::beneath instead.
2927 * bsd-uthread.c: Likewise.
2928 * linux-thread-db.c: Likewise.
2929 * ravenscar-thread.c: Likewise.
2930 * sol-thread.c: Likewise.
2931 * spu-multiarch.c: Likewise.
2932
2933 2018-06-07 Pedro Alves <palves@redhat.com>
2934
2935 * target.h (target_ops) <beneath>: Now a method. All references
2936 updated.
2937 (target_ops) <m_beneath>: New.
2938 * target.c (target_ops::beneath): New.
2939 * corelow.c: Adjust all references to target_ops::beneath.
2940 * linux-thread-db.c: Likewise.
2941 * make-target-delegates: Likewise.
2942 * record-btrace.c: Likewise.
2943 * record-full.c: Likewise.
2944 * remote.c: Likewise.
2945 * target.c: Likewise.
2946 * target-delegates.c: Regenerate.
2947
2948 2018-06-07 Pedro Alves <palves@redhat.com>
2949
2950 * target.h (target_stack): Delete.
2951 (current_top_target): Declare function.
2952 * target.c (target_stack): Delete.
2953 (g_current_top_target): New.
2954 (current_top_target): New function.
2955 * auxv.c: Use current_top_target instead of target_stack
2956 throughout.
2957 * avr-tdep.c: Likewise.
2958 * breakpoint.c: Likewise.
2959 * corefile.c: Likewise.
2960 * elfread.c: Likewise.
2961 * eval.c: Likewise.
2962 * exceptions.c: Likewise.
2963 * frame.c: Likewise.
2964 * gdbarch-selftests.c: Likewise.
2965 * gnu-v3-abi.c: Likewise.
2966 * ia64-tdep.c: Likewise.
2967 * ia64-vms-tdep.c: Likewise.
2968 * infcall.c: Likewise.
2969 * infcmd.c: Likewise.
2970 * infrun.c: Likewise.
2971 * linespec.c: Likewise.
2972 * linux-tdep.c: Likewise.
2973 * minsyms.c: Likewise.
2974 * ppc-linux-nat.c: Likewise.
2975 * ppc-linux-tdep.c: Likewise.
2976 * procfs.c: Likewise.
2977 * regcache.c: Likewise.
2978 * remote.c: Likewise.
2979 * rs6000-tdep.c: Likewise.
2980 * s390-linux-nat.c: Likewise.
2981 * s390-tdep.c: Likewise.
2982 * solib-aix.c: Likewise.
2983 * solib-darwin.c: Likewise.
2984 * solib-dsbt.c: Likewise.
2985 * solib-spu.c: Likewise.
2986 * solib-svr4.c: Likewise.
2987 * solib-target.c: Likewise.
2988 * sparc-tdep.c: Likewise.
2989 * sparc64-tdep.c: Likewise.
2990 * spu-tdep.c: Likewise.
2991 * symfile.c: Likewise.
2992 * symtab.c: Likewise.
2993 * target-descriptions.c: Likewise.
2994 * target-memory.c: Likewise.
2995 * target.c: Likewise.
2996 * target.h: Likewise.
2997 * tracefile-tfile.c: Likewise.
2998 * tracepoint.c: Likewise.
2999 * valops.c: Likewise.
3000 * valprint.c: Likewise.
3001 * value.c: Likewise.
3002 * windows-tdep.c: Likewise.
3003 * mi/mi-main.c: Likewise.
3004
3005 2018-06-07 Tom Tromey <tom@tromey.com>
3006
3007 * valprint.h (build_address_symbolic): Declare.
3008 * printcmd.c (print_address_symbolic): Update.
3009 (build_address_symbolic): Change "name" and "filename" to
3010 std::string.
3011 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
3012 Update.
3013 * defs.h (build_address_symbolic): Remove declaration.
3014
3015 2018-06-07 Alan Hayward <alan.hayward@arm.com>
3016
3017 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
3018 (aarch64_vnv_type): Add function.
3019 (aarch64_pseudo_register_name): Add V regs for SVE.
3020 (aarch64_pseudo_register_type): Likewise.
3021 (aarch64_pseudo_register_reggroup_p): Likewise.
3022 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
3023 (aarch64_pseudo_read_value): Add V regs for SVE.
3024 (aarch64_pseudo_write_2): Use V0 offset for SVE
3025 (aarch64_pseudo_write): Add V regs for SVE.
3026 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
3027
3028 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
3029
3030 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
3031 (sve_vl_from_vq): Likewise.
3032
3033 2018-06-05 Tom Tromey <tom@tromey.com>
3034
3035 * cli/cli-cmds.c (show_version): Update.
3036 * top.c (print_gdb_version): Add "interactive" parameter.
3037 Update.
3038 * main.c (captured_main_1): Update.
3039 * top.h (print_gdb_version): Add "interactive" parameter and a
3040 comment.
3041
3042 2018-06-05 David Malcolm <dmalcolm@redhat.com>
3043
3044 * common/enum-flags.h: Add trailing semicolon to example in
3045 comment.
3046
3047 2018-06-05 Tom Tromey <tom@tromey.com>
3048
3049 PR cli/12326:
3050 * NEWS: Add entry about pager.
3051 * utils.c (pagination_disabled_for_command): New global.
3052 (prompt_for_continue): Allow "c" response to prompt.
3053 (reinitialize_more_filter): Clear
3054 pagination_disabled_for_command.
3055 (fputs_maybe_filtered): Check pagination_disabled_for_command.
3056
3057 2018-06-04 Tom Tromey <tom@tromey.com>
3058
3059 * ada-lang.h (ada_lookup_symbol_list): Update.
3060 * ada-lang.c (resolve_subexp): Update.
3061 (symbols_are_identical_enums): Change type of syms. Remove nsyms
3062 parameter.
3063 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
3064 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
3065 results parameter to std::vector.
3066 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
3067 Update.
3068 * ada-exp.y (block_lookup): Update.
3069 (select_possible_type_sym): Change type of syms. Remove nsyms
3070 parameter.
3071 (write_var_or_type, write_name_assoc): Update.
3072
3073 2018-06-04 Joel Brobecker <brobecker@adacore.com>
3074
3075 * windows-nat.c (windows_nat_target::xfer_partial): Return
3076 TARGET_XFER_E_IO if we need to delegate to the target beneath
3077 but BENEATH is NULL.
3078
3079 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
3080
3081 * Makefile.in (config.status): Add configure.nat as a
3082 dependency.
3083
3084 2018-06-04 Tom Tromey <tom@tromey.com>
3085
3086 * cp-name-parser.y (cpname_state): Add method declarations.
3087 (HANDLE_QUAL): Update.
3088 (cpname_state::d_grab, cpname_state::fill_comp)
3089 (cpname_state::make_operator, cpname_state::make_dtor)
3090 (cpname_state::make_builtin_type, cpname_state::make_name)
3091 (cpname_state::d_qualify, cpname_state::d_int_type)
3092 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
3093 (%union): Move earlier.
3094
3095 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3096
3097 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
3098
3099 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3100
3101 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
3102 (aarch64_pseudo_write_1): Likewise.
3103 (aarch64_pseudo_read_value): Use helper.
3104 (aarch64_pseudo_write): Likewise.
3105
3106 2018-06-04 Pedro Alves <palves@redhat.com>
3107
3108 * darwin-nat.c (darwin_ops): Delete.
3109 (darwin_attach_pid): Use get_native_target.
3110
3111 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3112
3113 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
3114 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
3115
3116 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3117
3118 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
3119 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
3120 (aarch64_gdbarch_init): Check for SVE.
3121 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
3122
3123 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3124
3125 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
3126 * aarch64-tdep.h (aarch64_read_description): Likewise.
3127 * arch/aarch64.c (aarch64_create_target_description): Likewise.
3128 * arch/aarch64.h (aarch64_create_target_description): Likewise.
3129 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
3130 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
3131 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
3132
3133 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
3134
3135 * value.c (value_fetch_lazy_bitfield): New.
3136 (value_fetch_lazy_memory): New.
3137 (value_fetch_lazy_register): New.
3138 (value_fetch_lazy): Factor out to smaller functions.
3139
3140 2018-06-01 Tom Tromey <tom@tromey.com>
3141
3142 * cp-name-parser.y (backslashable, represented): Now const.
3143
3144 2018-06-01 Tom Tromey <tom@tromey.com>
3145
3146 * cp-name-parser.y: Include parser-defs.h.
3147 (parser_fprintf): Remove declaration.
3148
3149 2018-06-01 Tom Tromey <tom@tromey.com>
3150
3151 * cp-name-parser.y: Use %pure-parser, %lex-param, and
3152 %parse-param.
3153 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
3154 (global_result): Remove globals.
3155 (struct cpname_state): New.
3156 (yyparse): Don't declare.
3157 (yylex, yyerror): Move declarations after %union.
3158 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
3159 (make_name): Add state parameter.
3160 Update all callers.
3161 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
3162 parameter.
3163 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
3164 Update.
3165 (yylex): Add lvalp, state parameters.
3166 (yyerror): Add state parameter.
3167 (cp_demangled_name_to_comp): Update.
3168
3169 2018-06-01 Tom Tromey <tom@tromey.com>
3170
3171 * cp-name-parser.y (parser_fprintf): Declare.
3172 (GDB_YY_REMAP_PREFIX): Define.
3173 Include yy-remap.h. Don't redefine yy* identifiers.
3174
3175 2018-06-01 Tom Tromey <tom@tromey.com>
3176
3177 * python/py-type.c (typy_legacy_template_argument): Update.
3178 * cp-support.h (cp_demangled_name_to_comp): Update.
3179 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
3180 parameter to be a "std::string *".
3181 (main): Update.
3182
3183 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
3184
3185 * ada-lex.l: Include "diagnostics.h" instead of
3186 "common/diagnostics.h".
3187 * unittests/environ-selftests.c: Likewise.
3188 * common/diagnostics.h: Moved to ../include.
3189
3190 2018-06-01 Joel Brobecker <brobecker@adacore.com>
3191
3192 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
3193 to language_mode_manual while calling breakpoint_re_set_one.
3194
3195 2018-06-01 Tom Tromey <tom@tromey.com>
3196
3197 * valops.c (value_cast_structs, destructor_name_p): Update.
3198 * symtab.c (gdb_mangle_name): Update.
3199 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
3200 Update.
3201 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
3202 (pascal_object_print_value_fields, pascal_object_print_value):
3203 Update.
3204 * p-typeprint.c (pascal_type_print_derivation_info): Update.
3205 * linespec.c (find_methods): Update.
3206 * gdbtypes.h (type_name_no_tag): Remove.
3207 (type_name_or_error): Rename from type_name_no_tag_or_error.
3208 * gdbtypes.c (type_name_no_tag): Remove.
3209 (type_name_or_error): Rename from type_name_no_tag_or_error.
3210 (lookup_struct_elt_type, check_typedef): Update.
3211 * expprint.c (print_subexp_standard): Update.
3212 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
3213 * d-namespace.c (d_lookup_nested_symbol): Update.
3214 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
3215 (cp_print_class_member): Update.
3216 * cp-namespace.c (cp_lookup_nested_symbol): Update.
3217 * completer.c (add_struct_fields): Update.
3218 * c-typeprint.c (cp_type_print_derivation_info)
3219 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
3220 Update.
3221 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
3222 (ada_prefer_type, ada_is_exception_sym): Update.
3223
3224 2018-06-01 Tom Tromey <tom@tromey.com>
3225
3226 * valops.c (enum_constant_from_type, value_namespace_elt)
3227 (value_maybe_namespace_elt): Update.
3228 * valarith.c (find_size_for_pointer_math): Update.
3229 * target-descriptions.c (make_gdb_type): Update.
3230 * symmisc.c (print_symbol): Update.
3231 * stabsread.c (define_symbol, read_type)
3232 (complain_about_struct_wipeout, add_undefined_type)
3233 (cleanup_undefined_types_1): Update.
3234 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
3235 (rust_range_type_p, val_print_struct, rust_print_struct_def)
3236 (rust_internal_print_type, rust_composite_type)
3237 (rust_evaluate_funcall, rust_evaluate_subexp)
3238 (rust_inclusive_range_type_p): Update.
3239 * python/py-type.c (typy_get_tag): Update.
3240 * p-typeprint.c (pascal_type_print_base): Update.
3241 * mdebugread.c (parse_symbol, parse_type): Update.
3242 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
3243 Update.
3244 * guile/scm-type.c (gdbscm_type_tag): Update.
3245 * go-lang.c (sixg_string_p): Update.
3246 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
3247 Update.
3248 * gdbtypes.h (struct main_type) <tag_name>: Remove.
3249 (TYPE_TAG_NAME): Remove.
3250 * gdbtypes.c (type_name_no_tag): Simplify.
3251 (check_typedef, check_types_equal, recursive_dump_type)
3252 (copy_type_recursive, arch_composite_type): Update.
3253 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
3254 in summary mode when needed.
3255 * eval.c (evaluate_funcall): Update.
3256 * dwarf2read.c (fixup_go_packaging, read_structure_type)
3257 (process_structure_scope, read_enumeration_type)
3258 (read_namespace_type, read_module_type, determine_prefix): Update.
3259 * cp-support.c (inspect_type): Update.
3260 * coffread.c (process_coff_symbol, decode_base_type): Update.
3261 * c-varobj.c (c_is_path_expr_parent): Update.
3262 * c-typeprint.c (c_type_print_base_struct_union): Update.
3263 (c_type_print_base_1): Update. Print struct/class/union/enum in
3264 summary when using C language.
3265 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
3266 (gen_maybe_namespace_elt): Update.
3267 * ada-lang.c (ada_type_name): Simplify.
3268 (empty_record, ada_template_to_fixed_record_type_1)
3269 (template_to_static_fixed_type)
3270 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
3271
3272 2018-06-01 Tom Tromey <tom@tromey.com>
3273
3274 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
3275 c_print_type.
3276 * c-typeprint.c (c_print_type_1): Add "language" parameter.
3277 (c_print_type): Update.
3278 (c_print_type): New overload.
3279 (c_type_print_varspec_prefix, c_type_print_args)
3280 (c_type_print_varspec_suffix, c_print_type_no_offsets)
3281 (c_type_print_base_struct_union, c_type_print_base_1)
3282 (cp_type_print_method_args): Add "language" parameter.
3283 (c_type_print_base): Update.
3284 * c-lang.h (c_print_type): Add new overload.
3285
3286 2018-06-01 Tom Tromey <tom@tromey.com>
3287
3288 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
3289 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
3290
3291 2018-06-01 Alan Hayward <alan.hayward@arm.com>
3292
3293 * aarch64-tdep.c (aarch64_sve_register_names): New const
3294 var.
3295 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
3296 (AARCH64_SVE_Z_REGS_NUM): New define.
3297 (AARCH64_SVE_P_REGS_NUM): Likewise.
3298 (AARCH64_SVE_NUM_REGS): Likewise.
3299
3300 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
3301
3302 * nat/linux-ptrace.h [__alpha__]
3303 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
3304 definitions.
3305
3306 2018-05-31 Maciej W. Rozycki <macro@mips.com>
3307
3308 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
3309 the endianness selected.
3310 * NEWS: Document `set endian auto' mode operation update.
3311
3312 2018-05-31 Alan Hayward <alan.hayward@arm.com>
3313
3314 * Makefile.in: Add new header.
3315 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
3316 (sve_vl_from_vg): Likewise.
3317 (sve_vq_from_vl): Likewise.
3318 (sve_vl_from_vq): Likewise.
3319 (sve_vq_from_vg): Likewise.
3320 (sve_vg_from_vq): Likewise.
3321 * configure.nat: Add new c file.
3322 * nat/aarch64-sve-linux-ptrace.c: New file.
3323 * nat/aarch64-sve-linux-ptrace.h: New file.
3324
3325 2018-05-31 Alan Hayward <alan.hayward@arm.com>
3326
3327 * aarch64-linux-nat.c (aarch64_linux_read_description):
3328 Add parmeter zero.
3329 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
3330 Likewise.
3331 * aarch64-tdep.c (tdesc_aarch64_list): Add.
3332 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
3333 (aarch64_gdbarch_init): Add parmeter zero.
3334 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
3335 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
3336 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
3337 parmeter.
3338 * doc/gdb.texinfo: Describe SVE feature
3339 * features/aarch64-sve.c: New file.
3340
3341 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
3342
3343 PR gdb/23210
3344 * gdbarch.sh (significant_addr_bit): Default to zero when
3345 not set by target architecture.
3346 * gdbarch.c: Re-generated.
3347 * utils.c (address_significant): Update.
3348
3349 2018-05-30 Joel Brobecker <brobecker@adacore.com>
3350
3351 * stack.c (func_command): Remove trailing newline in call to error.
3352
3353 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3354
3355 * regcache.h (regcache_raw_collect): Remove, update callers to
3356 use regcache::raw_collect.
3357 * regcache.c (regcache_raw_collect): Remove.
3358
3359 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3360
3361 * regcache.h (regcache_raw_supply): Remove, update callers to
3362 use detached_regcache::raw_supply.
3363 * regcache.c (regcache_raw_supply): Remove.
3364
3365 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3366
3367 * regcache.h (regcache_cooked_write_part): Remove, update
3368 callers to use regcache::cooked_write_part.
3369 * regcache.c (regcache_cooked_write_part): Remove.
3370
3371 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3372
3373 * regcache.h (regcache_cooked_read_part): Remove, update callers
3374 to use readable_regcache::cooked_read_part.
3375 * regcache.c (regcache_cooked_read_part): Remove.
3376
3377 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3378
3379 * regcache.h (regcache_cooked_read_value): Remove, update
3380 callers to use readable_regcache::cooked_read_value.
3381 * regcache.c (regcache_cooked_read_value): Remove.
3382
3383 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3384
3385 * regcache.h (regcache_cooked_write): Remove, update callers to
3386 use regcache::cooked_write.
3387 * regcache.c (regcache_cooked_write): Remove.
3388
3389 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3390
3391 * regcache.h (regcache_invalidate): Remove, update callers to
3392 use detached_regcache::invalidate instead.
3393 * regcache.c (regcache_invalidate): Remove.
3394
3395 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3396
3397 * regcache.h (regcache_raw_write_part): Remove, update callers
3398 to use regcache::raw_write_part instead.
3399 * regcache.c (regcache_raw_write_part): Remove.
3400
3401 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3402
3403 * regcache.h (regcache_raw_read_part): Remove, update callers to
3404 use readable_regcache::raw_read_part instead.
3405 * regcache.c (regcache_raw_read_part): Remove.
3406
3407 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3408
3409 * regcache.h (regcache_cooked_read): Remove, update callers to
3410 use readable_regcache::cooked_read instead.
3411 * regcache.c (regcache_cooked_read): Remove.
3412
3413 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3414
3415 * regcache.h (regcache_raw_write): Remove, update callers to use
3416 regcache::raw_write instead.
3417 * regcache.c (regcache_raw_write): Remove.
3418
3419 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3420
3421 * regcache.h (regcache_raw_read): Remove, update callers to use
3422 readable_regcache::raw_read instead.
3423 * regcache.c (regcache_raw_read): Remove.
3424
3425 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3426
3427 * regcache.h (regcache_raw_update): Remove, update callers to
3428 use readable_regcache::raw_update instead.
3429 * regcache.c (regcache_raw_update): Remove.
3430
3431 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3432
3433 * regcache.h (regcache_register_status): Remove, update callers
3434 to use reg_buffer::get_register_status directly instead.
3435 * regcache.c (regcache_register_status): Remove.
3436
3437 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3438
3439 * regcache.h (regcache_get_ptid): Remove, update all callers to
3440 call regcache::ptid instead.
3441 * regcache.c (regcache_get_ptid): Remove.
3442
3443 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3444
3445 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
3446
3447 2018-05-30 Pedro Alves <palves@redhat.com>
3448
3449 * common/common-exceptions.h (exception_rethrow): Use
3450 ATTRIBUTE_NORETURN.
3451
3452 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
3453
3454 * breakpoint.c (print_solib_event, check_status_catch_solib):
3455 Remove struct keyword in range-based for loops.
3456 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
3457 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
3458 Likewise.
3459 * linespec.c (find_superclass_methods, search_minsyms_for_name):
3460 Likewise.
3461 * symfile.c (addr_info_make_relative): Likewise.
3462 * thread.c (value_in_thread_stack_temporaries): Likewise.
3463
3464 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
3465
3466 PR gdb/16841
3467 * valops.c (value_struct_elt_for_reference): Call check_typedef on
3468 aggregate type to get its real type before accessing it.
3469
3470 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
3471
3472 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
3473 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
3474 * coff-pe-read.c (add_pe_forwarded_sym): Replace
3475 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
3476 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
3477 * jit.c (jit_breakpoint_re_set_internal): Likewise.
3478 * printcmd.c (info_address_command): Likewise.
3479
3480 2018-05-29 Tom Tromey <tom@tromey.com>
3481
3482 * windows-nat.c (handle_exception): Update fall-through comment.
3483
3484 2018-05-29 Tom Tromey <tom@tromey.com>
3485
3486 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
3487 (struct program_space) <added_solibs>: Now a std::vector.
3488 * breakpoint.c (print_solib_event): Update.
3489 (check_status_catch_solib): Update.
3490 * progspace.c (clear_program_space_solib_cache): Update.
3491 * solib.c (update_solib_list): Update.
3492
3493 2018-05-29 Tom Tromey <tom@tromey.com>
3494
3495 * python/py-type.c (typy_richcompare): Update.
3496 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
3497 * gdbtypes.h (types_deeply_equal): Return bool.
3498 (types_equal): Likewise.
3499 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
3500 declare VEC.
3501 (check_types_equal): Change worklist to std::vector. Return
3502 bool.
3503 (struct type_equality_entry): Add constructor.
3504 (compare_maybe_null_strings): Return bool.
3505 (check_types_worklist): Return bool. Change worklist to
3506 std::vector.
3507 (types_deeply_equal): Use std::vector.
3508 (types_equal): Return bool.
3509 (compare_maybe_null_strings): Simplify.
3510
3511 2018-05-29 Tom Tromey <tom@tromey.com>
3512
3513 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
3514
3515 2018-05-29 Tom Tromey <tom@tromey.com>
3516
3517 * objc-lang.h: Don't include cp-support.h.
3518 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
3519 declare VEC.
3520
3521 2018-05-27 Tom Tromey <tom@tromey.com>
3522
3523 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
3524
3525 2018-05-25 Tom Tromey <tom@tromey.com>
3526
3527 * value.c (value::location): Initialize.
3528
3529 2018-05-25 Tom Tromey <tom@tromey.com>
3530
3531 * dbxread.c (init_bincl_list): Remove.
3532 (bincl_list): Now a std::vector.
3533 (bincls_allocated, next_bincl): Remove.
3534 (free_bincl_list, do_free_bincl_list_cleanup)
3535 (make_cleanup_free_bincl_list): Remove.
3536 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
3537 unique_xmalloc_ptr.
3538 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
3539 (struct header_file_location): Add constructor.
3540 (add_bincl_to_list): Remove.
3541
3542 2018-05-25 Tom Tromey <tom@tromey.com>
3543
3544 * tui/tui.c (tui_enable): Update.
3545 * mi/mi-interp.c (mi_interp::init): Update.
3546 * interps.h (class interp) <name>: New method.
3547 <m_name>: Rename from name.
3548 (~scoped_restore_interp): Update.
3549 * interps.c (interp::interp): Update.
3550 (interp_add, interp_set, interp_lookup_existing)
3551 (current_interp_named_p): Update.
3552
3553 2018-05-25 Tom Tromey <tom@tromey.com>
3554
3555 * interps.c (interp_name): Remove.
3556 * mi/mi-interp.c (mi_interp::init): Update.
3557 * interps.h (interp_name): Remove.
3558 (~scoped_restore_interp): Update.
3559 * tui/tui.c (tui_enable): Update.
3560
3561 2018-05-25 Tom Tromey <tom@tromey.com>
3562
3563 * utils.c (fputs_maybe_filtered): Update.
3564 * linespec.c (decode_line_full): Update.
3565 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
3566 (mi_print_breakpoint_for_event, mi_solib_loaded)
3567 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3568 (mi_user_selected_context_changed): Update.
3569 * mi/mi-main.c (mi_execute_command): Update.
3570 * cli/cli-script.c (execute_control_command): Update.
3571 * python/python.c (execute_gdb_command): Update.
3572 * solib.c (info_sharedlibrary_command): Update.
3573 * interps.c (interp_ui_out): Remove.
3574 * interps.h (interp_ui_out): Remove.
3575
3576 2018-05-25 Tom Tromey <tom@tromey.com>
3577
3578 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
3579 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
3580 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
3581
3582 2018-05-25 Tom Tromey <tom@tromey.com>
3583
3584 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
3585 * interps.c (interp_exec): Use scoped_restore.
3586
3587 2018-05-25 Tom Tromey <tom@tromey.com>
3588
3589 * remote.c (remote_target::remote_file_get): Use
3590 gdb::byte_vector.
3591 (remote_target::remote_file_put): Likewise.
3592
3593 2018-05-25 Tom Tromey <tom@tromey.com>
3594
3595 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
3596 a std::string.
3597 (get_pe_section_index, add_pe_exported_sym): Update.
3598 (read_pe_exported_syms): Use gdb::def_vector.
3599
3600 2018-05-25 Tom Tromey <tom@tromey.com>
3601
3602 * frame.c (remove_prev_frame): Remove.
3603 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
3604
3605 2018-05-25 Maciej W. Rozycki <macro@mips.com>
3606
3607 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
3608 Remove prototypes.
3609 * mips-linux-nat.c (supply_fpregset): Always call
3610 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
3611 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
3612 `mips_fill_fpregset'.
3613 * mips-linux-tdep.c (mips_supply_fpregset)
3614 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
3615 (mips_fill_fpregset_wrapper): Remove functions.
3616 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
3617 (mips_linux_fpregset): Remove variable.
3618 (mips_linux_iterate_over_regset_sections): Use
3619 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
3620 (mips_linux_o32_sigframe_init): Remove comment.
3621
3622 2018-05-25 Pedro Alves <palves@redhat.com>
3623
3624 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
3625 (struct readahead_cache, struct packet_reg, struct
3626 remote_arch_state, class remote_state): Move higher up in the
3627 file.
3628 (remote_target::m_remote_state): Now an object instead of a pointer.
3629 (remote_target::get_remote_state): Adjust.
3630
3631 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
3632
3633 * stack.c (select_and_print_frame): Delete.
3634 (struct function_bounds): Move struct within function.
3635 (func_command): Most content moved into new function
3636 find_frame_for_function, use new function, print result, add
3637 function comment.
3638 (find_frame_for_function): New function, now returns a result.
3639
3640 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3641
3642 * stack.c (iterate_over_block_arg_vars): Fix comment.
3643 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
3644
3645 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
3646
3647 PR gdb/23203
3648 * frame.c
3649 (scoped_restore_selected_frame::scoped_restore_selected_frame):
3650 Define.
3651 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
3652 Define.
3653 * frame.h (class scoped_restore_selected_frame): New class.
3654 * stack.c (print_frame_local_vars): Remove catching and rethrowing
3655 of any exception, use scoped_restore_selected_frame to restore the
3656 frame instead.
3657
3658 2018-05-24 Pedro Alves <palves@redhat.com>
3659
3660 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
3661 override.
3662
3663 2018-05-23 Tom Tromey <tom@tromey.com>
3664
3665 * complaints.c (struct complaints): Remove.
3666 (symfile_complaint_book): Remove.
3667 (series): New global.
3668 (complaint_internal): Update.
3669 (clear_complaints): Update.
3670
3671 2018-05-23 Tom Tromey <tom@tromey.com>
3672
3673 * complaints.c (counters): New global.
3674 (struct complain): Remove.
3675 (struct complaints) <root>: Remove.
3676 (complaint_sentinel): Remove.
3677 (symfile_complaint_book): Update.
3678 (find_complaint) Remove.
3679 (complaint_internal, clear_complaints): Update.
3680
3681 2018-05-23 Tom Tromey <tom@tromey.com>
3682
3683 * complaints.c (struct complain) <file, line>: Remove.
3684 (find_complaint): Remove file, line parameters.
3685 (complaint_internal): Update.
3686
3687 2018-05-23 Tom Tromey <tom@tromey.com>
3688
3689 * complaints.c (vcomplaint): Remove.
3690 (complaint_internal) Merge in contents of vcomplaint.
3691
3692 2018-05-23 Tom Tromey <tom@tromey.com>
3693
3694 * complaints.c (struct complaints) <explanation>: Remove.
3695 (symfile_explanations): Remove.
3696 (symfile_complaint_book): Update.
3697 (vcomplaint): Update.
3698 (struct explanation): Remove.
3699
3700 2018-05-23 Tom Tromey <tom@tromey.com>
3701
3702 * complaints.c (symfile_complaints): Remove.
3703 (complaint_internal): Remove "complaints" parameter.
3704 (clear_complaints, vcomplaint): Remove "c" parameter.
3705 (get_complaints): Remove.
3706 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
3707 (dwarf2_debug_line_missing_file_complaint)
3708 (dwarf2_debug_line_missing_end_sequence_complaint)
3709 (dwarf2_complex_location_expr_complaint)
3710 (dwarf2_const_value_length_mismatch_complaint)
3711 (dwarf2_section_buffer_overflow_complaint)
3712 (dwarf2_macro_malformed_definition_complaint)
3713 (dwarf2_invalid_attrib_class_complaint)
3714 (create_addrmap_from_index, dw2_symtab_iter_next)
3715 (dw2_expand_marked_cus)
3716 (dw2_debug_names_iterator::find_vec_in_debug_names)
3717 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
3718 (create_debug_type_hash_table, init_cutu_and_read_dies)
3719 (partial_die_parent_scope, add_partial_enumeration)
3720 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
3721 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
3722 (read_import_statement, read_file_scope, create_dwo_cu_reader)
3723 (create_cus_hash_table, create_dwp_hash_table)
3724 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
3725 (dwarf2_rnglists_process, dwarf2_ranges_process)
3726 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
3727 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
3728 (handle_struct_member_die, process_structure_scope)
3729 (read_array_type, read_common_block, read_module_type)
3730 (read_tag_pointer_type, read_typedef, read_base_type)
3731 (read_subrange_type, load_partial_dies, partial_die_info::read)
3732 (partial_die_info::read, partial_die_info::read)
3733 (partial_die_info::read, read_checked_initial_length_and_offset)
3734 (dwarf2_string_attr, read_formatted_entries)
3735 (dwarf_decode_line_header)
3736 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3737 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
3738 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
3739 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3740 (get_signatured_type, get_DW_AT_signature_type)
3741 (decode_locdesc, file_file_name, consume_improper_spaces)
3742 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
3743 (dwarf_decode_macro_bytes, dwarf_decode_macros)
3744 (dwarf2_symbol_mark_computed, set_die_type)
3745 (read_attribute_value): Update.
3746 * stap-probe.c (handle_stap_probe, get_stap_base_address):
3747 Update.
3748 * dbxread.c (unknown_symtype_complaint)
3749 (lbrac_mismatch_complaint, repeated_header_complaint)
3750 (set_namestring, function_outside_compilation_unit_complaint)
3751 (read_dbx_symtab, process_one_symbol): Update.
3752 * gdbtypes.c (stub_noname_complaint): Update.
3753 * windows-nat.c (handle_unload_dll): Update.
3754 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
3755 (decode_base_type): Update.
3756 * xcoffread.c (bf_notfound_complaint, ef_complaint)
3757 (eb_complaint, record_include_begin, record_include_end)
3758 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
3759 (process_xcoff_symbol, read_symbol)
3760 (function_outside_compilation_unit_complaint)
3761 (scan_xcoff_symtab): Update.
3762 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
3763 * buildsym.c (finish_block_internal, make_blockvector)
3764 (end_symtab_get_static_block, augment_type_symtab): Update.
3765 * dtrace-probe.c (dtrace_process_dof)
3766 (dtrace_static_probe_ops::get_probes): Update.
3767 * complaints.h (struct complaint): Don't declare.
3768 (symfile_complaints): Remove.
3769 (complaint_internal): Remove "complaints" parameter.
3770 (complaint): Likewise.
3771 (clear_complaints): Likewise.
3772 * symfile.c (syms_from_objfile_1, finish_new_objfile)
3773 (reread_symbols): Update.
3774 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
3775 (dwarf2_frame_cache, decode_frame_entry): Update.
3776 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
3777 * objc-lang.c (lookup_objc_class, lookup_child_selector)
3778 (info_selectors_command): Update.
3779 * macrotab.c (macro_include, check_for_redefinition)
3780 (macro_undef): Update.
3781 * objfiles.c (filter_overlapping_sections): Update.
3782 * stabsread.c (invalid_cpp_abbrev_complaint)
3783 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
3784 (define_symbol, error_type, read_type, rs6000_builtin_type)
3785 (stabs_method_name_from_physname, read_member_functions)
3786 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
3787 (attach_fields_to_type, complain_about_struct_wipeout)
3788 (read_range_type, read_args, common_block_start)
3789 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
3790 Update.
3791 * mdebugread.c (index_complaint, unknown_ext_complaint)
3792 (basic_type_complaint, bad_tag_guess_complaint)
3793 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
3794 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
3795 (parse_procedure, parse_lines)
3796 (function_outside_compilation_unit_complaint)
3797 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
3798 (bad_tag_guess_complaint, reg_value_complaint): Update.
3799 * cp-support.c (demangled_name_complaint): Update.
3800 * macroscope.c (sal_macro_scope): Update.
3801 * dwarf-index-write.c (class debug_names): Update.
3802
3803 2018-05-23 Tom Tromey <tom@tromey.com>
3804
3805 * complaints.c (clear_complaints): Remove "noisy" parameter.
3806 * complaints.h (clear_complaints): Update.
3807 * symfile.c (syms_from_objfile_1, finish_new_objfile)
3808 (reread_symbols): Update.
3809
3810 2018-05-23 Tom Tromey <tom@tromey.com>
3811
3812 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
3813 SUBSEQUENT_MESSAGE.
3814 (vcomplaint, clear_complaints): Update.
3815 (symfile_explanations): Remove some messages.
3816
3817 2018-05-23 Tom Tromey <tom@tromey.com>
3818
3819 * complaints.c (internal_complaint): Remove.
3820 * complaints.h (internal_complaint): Remove.
3821
3822 2018-05-22 Maciej W. Rozycki <macro@mips.com>
3823
3824 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
3825
3826 2018-05-22 Pedro Alves <palves@redhat.com>
3827
3828 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
3829 (remote_fileio_badfd, remote_fileio_return_errno)
3830 (remote_fileio_return_success, remote_fileio_func_open)
3831 (remote_fileio_func_open, remote_fileio_func_close)
3832 (remote_fileio_func_read, remote_fileio_func_write)
3833 (remote_fileio_func_lseek, remote_fileio_func_rename)
3834 (remote_fileio_func_unlink, remote_fileio_func_stat)
3835 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
3836 (remote_fileio_func_isatty, remote_fileio_func_system): Add
3837 remote_target parameter.
3838 (remote_fio_func_map) <func>: Add remote_target parameter.
3839 (do_remote_fileio_request, remote_fileio_request):
3840 * remote-fileio.h (remote_fileio_request):
3841 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
3842 remote_target parameter.
3843 (remote_notif_process, handle_notification): Adjust to pass down
3844 the remote.
3845 (remote_notif_state_allocate): Add remote_target parameter. Save
3846 it.
3847 * remote-notif.h (struct remote_target): Forward declare.
3848 (struct notif_client) <parse, ack, can_get_pending_events>: Add
3849 remote_target parameter.
3850 (struct remote_notif_state) <remote>: New field.
3851 (remote_notif_ack, remote_notif_parse): Add remote_target
3852 parameter.
3853 (remote_notif_state_allocate, remote_notif_state_allocate): Add
3854 remote_target parameter.
3855 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
3856 (threads_listing_context, rmt_thread_action, protocol_feature)
3857 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
3858 (packet_result, struct threads_listing_context, remote_state):
3859 Move definitions and declarations higher up.
3860 (remote_target) <~remote_target>: Declare.
3861 (remote_download_command_source, remote_file_put, remote_file_get)
3862 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
3863 (remote_hostio_pread_vFile, remote_hostio_send_command)
3864 (remote_hostio_set_filesystem, remote_hostio_open)
3865 (remote_hostio_close, remote_hostio_unlink, remote_state)
3866 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
3867 (get_memory_write_packet_size, get_memory_read_packet_size)
3868 (append_pending_thread_resumptions, remote_detach_1)
3869 (append_resumption, remote_resume_with_vcont)
3870 (add_current_inferior_and_thread, wait_ns, wait_as)
3871 (process_stop_reply, remote_notice_new_inferior)
3872 (process_initial_stop_replies, remote_add_thread)
3873 (btrace_sync_conf, remote_btrace_maybe_reopen)
3874 (remove_new_fork_children, kill_new_fork_children)
3875 (discard_pending_stop_replies, stop_reply_queue_length)
3876 (check_pending_events_prevent_wildcard_vcont)
3877 (discard_pending_stop_replies_in_queue, stop_reply)
3878 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
3879 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
3880 (remote_interrupt_as, remote_interrupt_ns)
3881 (remote_get_noisy_reply, remote_query_attached)
3882 (remote_add_inferior, remote_current_thread, get_current_thread)
3883 (set_thread, set_general_thread, set_continue_thread)
3884 (set_general_process, write_ptid)
3885 (remote_unpack_thread_info_response, remote_get_threadinfo)
3886 (parse_threadlist_response, remote_get_threadlist)
3887 (remote_threadlist_iterator, remote_get_threads_with_ql)
3888 (remote_get_threads_with_qxfer)
3889 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
3890 (get_offsets, remote_check_symbols, remote_supported_packet)
3891 (remote_query_supported, remote_packet_size)
3892 (remote_serial_quit_handler, remote_detach_pid)
3893 (remote_vcont_probe, remote_resume_with_hc)
3894 (send_interrupt_sequence, interrupt_query)
3895 (remote_notif_get_pending_events, fetch_register_using_p)
3896 (send_g_packet, process_g_packet, fetch_registers_using_g)
3897 (store_register_using_P, store_registers_using_G)
3898 (set_remote_traceframe, check_binary_download)
3899 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
3900 (remote_xfer_live_readonly_partial, remote_read_bytes)
3901 (remote_send_printf, remote_flash_write, readchar)
3902 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
3903 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
3904 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
3905 (extended_remote_disable_randomization, extended_remote_run)
3906 (send_environment_packet, extended_remote_environment_support)
3907 (extended_remote_set_inferior_cwd, remote_write_qxfer)
3908 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
3909 (packet_command): Now methods of ...
3910 (remote_target): ... this class.
3911 (m_remote_state) <remote_target>: New field.
3912 (struct remote_state) <stop_reply_queue,
3913 remote_async_inferior_event_token, wait_forever_enabled_p>: New
3914 fields.
3915 (remote_state::remote_state): Allocate stop_reply_queue.
3916 (remote_state): Delete global.
3917 (get_remote_state_raw): Delete.
3918 (remote_target::get_remote_state): Allocate m_remote_state on
3919 demand.
3920 (get_current_remote_target): New.
3921 (remote_ops, extended_remote_ops): Delete.
3922 (wait_forever_enabled_p, remote_async_inferior_event_token):
3923 Delete, moved to struct remote_state.
3924 (remote_target::close): Delete self. Destruction bits split to
3925 ...
3926 (remote_target::~remote_target): ... this.
3927 (show_memory_packet_size): Adjust to use
3928 get_current_remote_target.
3929 (struct protocol_feature) <func>: Add remote_target parameter.
3930 All callers adjusted.
3931 (curr_quit_handler_target): New.
3932 (remote_serial_quit_handler): Reimplement.
3933 (remote_target::open_1): Adjust to use get_current_remote_target.
3934 Heap-allocate remote_target/extended_remote_target instances.
3935 (vcont_builder::vcont_builder): Add remote_target parameter, and
3936 save it in m_remote. All callers adjusted.
3937 (vcont_builder::m_remote): New field.
3938 (vcont_builder::restart, vcont_builder::flush)
3939 (vcont_builder::push_action): Use it.
3940 (remote_target::commit_resume): Use it.
3941 (struct queue_iter_param) <remote>: New field.
3942 (remote_target::remove_new_fork_children): Fill in 'remote' field.
3943 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
3944 (check_pending_event_prevents_wildcard_vcont_callback)
3945 (remote_target::check_pending_events_prevent_wildcard_vcont)
3946 (remote_target::discard_pending_stop_replies)
3947 (remote_target::discard_pending_stop_replies_in_queue)
3948 (remote_target::remote_notif_remove_queued_reply): Fill in
3949 'remote' field.
3950 (remote_notif_get_pending_events): New.
3951 (remote_target::readchar, remote_target::remote_serial_write):
3952 Save/restore curr_quit_handler_target.
3953 (putpkt): New.
3954 (kill_new_fork_children): Fill in 'remote' field.
3955 (packet_command): Use get_current_remote_target, defer to
3956 remote_target method of same name.
3957 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
3958 parameter, and save it in m_remote. All callers adjusted.
3959 (scoped_remote_fd::release): Use m_remote.
3960 (scoped_remote_fd::m_remote): New field.
3961 (remote_file_put, remote_file_get, remote_file_delete): Use
3962 get_current_remote_target, defer to remote_target method of same
3963 name.
3964 (remote_btrace_reset): Add remote_state paremeter. Update all
3965 callers.
3966 (remote_async_inferior_event_handler). Pass down 'data'.
3967 (remote_new_objfile): Use get_current_remote_target.
3968 (remote_target::vcont_r_supported): New.
3969 (set_range_stepping): Use get_current_remote_target and
3970 remote_target::vcont_r_supported.
3971 (_initialize_remote): Don't allocate 'remote_state' and
3972 'stop_reply_queue' globals.
3973 * remote.h (struct remote_target): Forward declare.
3974 (getpkt, putpkt, remote_notif_get_pending_events): Add
3975 'remote_target' parameter.
3976
3977 2018-05-22 Pedro Alves <palves@redhat.com>
3978
3979 * remote.c (vcont_builder): Now a class. Make all data members
3980 private.
3981 (vcont_builder) <vcont_builder, restart, flush, push_action>:
3982 Declare methods.
3983 (vcont_builder_restart): Rename to ...
3984 (vcont_builder::restart): ... this.
3985 (vcont_builder_flush): Rename to ...
3986 (vcont_builder::flush): ... this.
3987 (vcont_builder_push_action): Rename to ...
3988 (vcont_builder::push_action): ... this.
3989 (remote_target::commit_resume): Adjust.
3990
3991 2018-05-22 Pedro Alves <palves@redhat.com>
3992
3993 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
3994 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
3995 (get_fixed_memory_packet_size): New.
3996 (get_memory_packet_size): Use it.
3997 (set_memory_packet_size): Don't override the config size with
3998 DEFAULT_MAX_MEMORY_PACKET_SIZE.
3999 (show_memory_packet_size): Use get_fixed_memory_packet_size.
4000 Don't refer to get_memory_packet_size if not connected to a remote
4001 target. Show "(default)" if configured size is 0.
4002
4003 2018-05-22 Pedro Alves <palves@redhat.com>
4004
4005 * remote.c (remote_target::mourn_inferior): Move
4006 discard_pending_stop_replies call here from ...
4007 (_initialize_remote): ... here.
4008
4009 2018-05-22 Pedro Alves <palves@redhat.com>
4010
4011 * remote.c (compare_section_command): Remove set_general_process
4012 call.
4013
4014 2018-05-22 Pedro Alves <palves@redhat.com>
4015
4016 * remote.c (struct packet_reg, struct remote_arch_state):
4017 Move higher up in the file.
4018 (remote_state) <m_arch_states>: Store remote_arch_state values
4019 instead of remote_arch_state pointers.
4020 (remote_state::get_remote_arch_state): Adjust.
4021
4022 2018-05-22 Pedro Alves <palves@redhat.com>
4023
4024 * remote.c: Include <unordered_map>.
4025 (remote_state): Now a class.
4026 (remote_state) <get_remote_arch_state>: Declare method.
4027 <get_remote_arch_state>: New field.
4028 (remote_arch_state) <remote_arch_state>: Declare ctor.
4029 <regs>: Now a unique_ptr.
4030 (remote_gdbarch_data_handle): Delete.
4031 (get_remote_arch_state): Delete.
4032 (remote_state::get_remote_arch_state): New.
4033 (get_remote_state): Adjust to call remote_state's
4034 get_remote_arch_state method.
4035 (init_remote_state): Delete, bits factored out to ...
4036 (remote_arch_state::remote_arch_state): ... this new method.
4037 (get_remote_packet_size, get_memory_packet_size)
4038 (process_g_packet, remote_target::fetch_registers)
4039 (remote_target::prepare_to_store, store_registers_using_G)
4040 (remote_target::store_registers, remote_target::get_trace_status):
4041 Adjust to call remote_state's method.
4042 (_initialize_remote): Remove reference to
4043 remote_gdbarch_data_handle.
4044
4045 2018-05-22 Pedro Alves <palves@redhat.com>
4046
4047 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
4048 pread>: New method declarations.
4049 (remote_target::open_1): Adjust.
4050 (readahead_cache_invalidate): Rename to ...
4051 (readahead_cache::invalidate): ... this, and adjust to be a class
4052 method.
4053 (readahead_cache_invalidate_fd): Rename to ...
4054 (readahead_cache::invalidate_fd): ... this, and adjust to be a
4055 class method.
4056 (remote_hostio_pwrite): Adjust.
4057 (remote_hostio_pread_from_cache): Rename to ...
4058 (readahead_cache::pread): ... this, and adjust to be a class
4059 method.
4060 (remote_hostio_close): Adjust.
4061
4062 2018-05-22 Pedro Alves <palves@redhat.com>
4063
4064 * remote.c (remote_hostio_close_cleanup): Delete.
4065 (class scoped_remote_fd): New.
4066 (remote_file_put, remote_file_get): Use it.
4067
4068 2018-05-22 Pedro Alves <palves@redhat.com>
4069
4070 (struct vCont_action_support): Use bool and initialize all fields.
4071 (struct readahead_cache): Initialize all fields.
4072 (remote_state): Use bool and initialize all fields.
4073 (remote_state::remote_state, remote_state::~remote_state): New.
4074 (new_remote_state): Delete.
4075 (_initialize_remote): Use new to allocate remote_state.
4076
4077 2018-05-22 Pedro Alves <palves@redhat.com>
4078 張俊芝 <zjz@zjz.name>
4079
4080 PR gdb/22973
4081 * c-exp.y: Include "c-support.h".
4082 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
4083 of tolower. Use c_ident_is_alpha to scan names.
4084 * c-lang.c: Include "c-support.h".
4085 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
4086 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
4087 * c-support.h: New file, with bits factored out from ...
4088 * cp-name-parser.y: ... this file.
4089 Include "c-support.h".
4090 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
4091 c-support.h and renamed.
4092 (symbol_end, yylex): Adjust.
4093
4094 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4095
4096 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
4097 parameter type to CORE_ADDR.
4098 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
4099 parameter type in declaration to CORE_ADDR.
4100 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
4101 target_auxv_search to get AT_HWCAP and use the result to get the
4102 target description.
4103 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
4104 to CORE_ADDR. Remove the cast of the return value to unsigned
4105 long. Fix error predicate of target_auxv_search.
4106 (ppc_linux_nat_target::read_description): Change the type of the
4107 hwcap variable to CORE_ADDR.
4108
4109 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4110
4111 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
4112 if the size of fpscr is larger than 32 bits.
4113
4114 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4115
4116 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
4117 (ppc32_linux_vsxregmap): New global.
4118 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
4119 regcache_supply_regset, and regcache_collect_regset.
4120 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
4121 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
4122 (fetch_vsx_register, store_vsx_register): Remove.
4123 (fetch_vsx_registers): Add regno parameter. Get regset using
4124 ppc_linux_vsxregset. Use regset to supply registers.
4125 (store_vsx_registers): Add regno parameter. Get regset using
4126 ppc_linux_vsxregset. Use regset to collect registers.
4127 (fetch_register): Call fetch_vsx_registers instead of
4128 fetch_vsx_register.
4129 (store_register): Call store_vsx_registers instead of
4130 store_vsx_register.
4131 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
4132 new regno parameter.
4133 (store_ppc_registers): Call store_vsx_registers with -1 for the
4134 new regno parameter.
4135 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
4136 (ppc_collect_vsxregset): Remove.
4137
4138 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4139
4140 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
4141 offset fields.
4142 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
4143 for vector register offset fields.
4144 (ppc64_fbsd_reg_offsets): Likewise.
4145 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4146 to vector register offset fields.
4147 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4148 to vector register offset fields.
4149 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
4150 vector register offset fields.
4151 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
4152 initializers for vector register offset fields.
4153 (rs6000_aix64_reg_offsets): Likewise.
4154 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
4155 (ppc_supply_vrregset): Remove.
4156 (ppc_collect_vrregset): Remove.
4157 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
4158 (ppc_linux_vrregset) : New function.
4159 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
4160 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
4161 (ppc32_linux_vrregset): Remove.
4162 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
4163 and use result instead of ppc32_linux_vrregset.
4164 (ppc32_linux_reg_offsets): Remove initializers for vector register
4165 offset fields.
4166 (ppc64_linux_reg_offsets): Likewise.
4167 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
4168 * ppc-linux-nat.c: Include regset.h.
4169 (gdb_vrregset_t): Adjust comment to account for little-endian
4170 mode.
4171 (supply_vrregset, fill_vrregset): Remove.
4172 (fetch_altivec_register, store_altivec_register): Remove.
4173 (fetch_altivec_registers): Add regno parameter. Get regset using
4174 ppc_linux_vrregset. Use regset to supply registers.
4175 (store_altivec_registers): Add regno parameter. Get regset using
4176 ppc_linux_vrregset. Use regset to collect registers.
4177 (fetch_register): Call fetch_altivec_registers instead of
4178 fetch_altivec_register.
4179 (store_register): Call store_altivec_registers instead of
4180 store_altivec_register.
4181 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
4182 the new regno parameter.
4183 (store_ppc_registers): Call store_altivec_registers with -1 for
4184 the new regno parameter.
4185
4186 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4187
4188 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
4189 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
4190 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
4191 (gdb_vrregset_t): Change array type size to
4192 PPC_LINUX_SIZEOF_VRREGSET.
4193 (gdb_vsxregset_t): Change array type size to
4194 PPC_LINUX_SIZEOF_VSXREGSET.
4195 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
4196 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
4197 PPC_LINUX_SIZEOF_VSXREGSET.
4198
4199 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4200
4201 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
4202 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
4203 nat/ppc-linux.c.
4204 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
4205 ppc_linux_target_wordsize with tid.
4206 (ppc_linux_nat_target::read_description): Call ppc_linux_target
4207 wordsize with tid.
4208 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
4209 (ppc64_64bit_inferior_p): Add static and inline specifiers.
4210 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
4211 tid parameter. Remove static specifier.
4212 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
4213 (ppc_linux_target_wordsize): New declaration.
4214
4215 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4216
4217 * arch/ppc-linux-common.c: New file.
4218 * arch/ppc-linux-common.h: New file.
4219 * arch/ppc-linux-tdesc.h: New file.
4220 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
4221 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
4222 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
4223 arch/ppc-linux-tdesc.h.
4224 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
4225 arch/ppc-linux-tdesc.h.
4226 (ppc_linux_nat_target::read_description): Remove target
4227 description matching code. Fill a ppc_linux_features struct and
4228 call ppc_linux_match_description with it. Move comment about ISA
4229 2.05 to ppc-linux-common.c.
4230 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
4231 arch/ppc-linux-tdesc.h.
4232 (ppc_linux_core_read_description): Remove target description
4233 matching code. Fill a ppc_linux_features struct and call
4234 ppc_linux_match_description with it.
4235 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
4236 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
4237 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
4238 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
4239 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
4240 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
4241 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
4242 (tdesc_powerpc_e500l): Remove.
4243
4244 2018-05-22 Joel Brobecker <brobecker@adacore.com>
4245
4246 * ada-lang.c (catch_assert_command): Pass empty string instead
4247 of NULL for excep_string argument.
4248
4249 2018-05-22 Maciej W. Rozycki <macro@mips.com>
4250
4251 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
4252 the width of the requested register exceeds the width of the
4253 `ptrace' data type.
4254
4255 2018-05-21 Tom Tromey <tom@tromey.com>
4256
4257 * printcmd.c (output_command): Remove.
4258 (output_command_const): Rename to output_command.
4259 * valprint.h (output_command): Rename from output_command_const.
4260 * tracepoint.c (trace_dump_actions): Call output_command.
4261
4262 2018-05-21 Tom Tromey <tom@tromey.com>
4263
4264 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4265 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
4266 * ada-lang.h (create_ada_exception_catchpoint): Update.
4267 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
4268 std::string.
4269 (create_excep_cond_exprs, ~ada_catchpoint)
4270 (should_stop_exception, print_one_exception)
4271 (print_mention_exception, print_recreate_exception): Update.
4272 (ada_get_next_arg): Remove.
4273 (catch_ada_exception_command_split): Use std::string. Change type
4274 of "excep_string", "cond_string".
4275 (catch_ada_exception_command): Update.
4276 (create_ada_exception_catchpoint): Change type of excep_string.
4277 (ada_exception_sal): Remove excep_string parameter.
4278 (~ada_catchpoint): Remove.
4279
4280 2018-05-21 Tom Tromey <tom@tromey.com>
4281
4282 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
4283 cleanup.
4284
4285 2018-05-21 Tom Tromey <tom@tromey.com>
4286
4287 * ada-lang.c (ada_exception_message_1, ada_exception_message):
4288 Return unique_xmalloc_ptr.
4289 (print_it_exception): Update.
4290
4291 2018-05-21 Tom Tromey <tom@tromey.com>
4292
4293 * tracepoint.c (trace_dump_actions): Use std::string.
4294
4295 2018-05-21 Tom Tromey <tom@tromey.com>
4296
4297 * symfile.c (reread_symbols): Use std::string for original_name.
4298
4299 2018-05-21 Tom Tromey <tom@tromey.com>
4300
4301 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
4302 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
4303 constructor.
4304
4305 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
4306
4307 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
4308 instance to...
4309 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
4310 * objfiles.c (get_objfile_bfd_data): Allocate
4311 objfile_per_bfd_storage with obstack_new when allocating on
4312 obstack.
4313
4314 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
4315
4316 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
4317 OBSTACK_ZALLOC.
4318 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
4319 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
4320 * mdebugread.c (mdebug_build_psymtabs): Likewise.
4321 (add_pending): Likewise.
4322 (parse_symbol): Likewise.
4323 (parse_partial_symbols): Likewise.
4324 (psymtab_to_symtab_1): Likewise.
4325 (new_psymtab): Likewise.
4326 (elfmdebug_build_psymtabs): Likewise.
4327 * minsyms.c (terminate_minimal_symbol_table): Likewise.
4328 * objfiles.c (get_objfile_bfd_data): Likewise.
4329 (objfile_register_static_link): Likewise.
4330 * psymtab.c (allocate_psymtab): Likewise.
4331 * stabsread.c (read_member_functions): Likewise.
4332 * xcoffread.c (xcoff_end_psymtab): Likewise.
4333
4334 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
4335
4336 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
4337 compiler supports std::is_trivially_constructible.
4338 * common/poison.h: Include obstack.h.
4339 (IsMallocable): Define to is_trivially_constructible if the
4340 compiler supports it, define to true_type otherwise.
4341 (xobnew): New.
4342 (XOBNEW): Redefine.
4343 (xobnewvec): New.
4344 (XOBNEWVEC): Redefine.
4345 * gdb_obstack.h (obstack_zalloc): New.
4346 (OBSTACK_ZALLOC): Redefine.
4347 (obstack_calloc): New.
4348 (OBSTACK_CALLOC): Redefine.
4349 (obstack_new): New.
4350 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
4351 (gdbarch_obstack): New declaration in gdbarch.h, definition in
4352 gdbarch.c.
4353 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
4354 obstack_calloc/obstack_zalloc.
4355 (gdbarch_obstack_zalloc): Remove.
4356 * target-descriptions.c (tdesc_data_init): Use obstack_new.
4357
4358 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4359
4360 * stack.c (backtrace_command_1): Remove useless variable int i.
4361
4362 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4363
4364 * stack.c (print_frame_info): Fix comment.
4365
4366 2018-05-18 Tom Tromey <tom@tromey.com>
4367
4368 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
4369 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
4370 (~dwarf2_per_objfile): Update
4371 (dwarf2_get_dwz_file): Use new.
4372 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
4373 unique_ptr.
4374
4375 2018-05-18 Tom Tromey <tom@tromey.com>
4376
4377 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
4378 unique_ptr.
4379 * dwarf2read.c (struct dwp_file): Add constructor and
4380 initializers.
4381 (open_and_init_dwp_file): Return a unique_ptr.
4382 (dwarf2_per_objfile, create_dwp_hash_table)
4383 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
4384 (lookup_dwo_unit_in_dwp): Update.
4385 (open_and_init_dwp_file, get_dwp_file): Update.
4386
4387 2018-05-18 Tom Tromey <tom@tromey.com>
4388
4389 * dwarf2read.c (dwarf2_per_objfile): Update.
4390 (struct mapped_index): Add initializers.
4391 (dwarf2_read_index): Use new.
4392 (dw2_symtab_iter_init): Update.
4393 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
4394 unique_ptr.
4395
4396 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
4397
4398 * dwarf2read.c (mapped_index) <total_size>: Remove.
4399
4400 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
4401
4402 * unittests/format_pieces-selftests.c (test_format_specifier):
4403 Add ARI comments.
4404
4405 2018-05-18 Tom Tromey <tom@tromey.com>
4406
4407 * c-typeprint.c (maybe_print_hole): New function.
4408 (c_print_type_struct_field_offset): Update.
4409 (c_type_print_base_struct_union): Call maybe_print_hole.
4410
4411 2018-05-17 Keith Seitz <keiths@redhat.com>
4412
4413 * breakpoint.c (build_bpstat_chain): New function, moved from
4414 bpstat_stop_status.
4415 (bpstat_stop_status): Add optional parameter, `stop_chain'.
4416 If no stop chain is passed, call build_bpstat_chain to build it.
4417 * breakpoint.h (build_bpstat_chain): Declare.
4418 (bpstat_stop_status): Move documentation here from breakpoint.c.
4419 * infrun.c (handle_signal_stop): Before eliding inlined frames,
4420 build the stop chain and pass it to skip_inline_frames.
4421 Pass this stop chain to bpstat_stop_status.
4422 * inline-frame.c: Include breakpoint.h.
4423 (stopped_by_user_bp_inline_frame): New function.
4424 (skip_inline_frames): Add parameter `stop_chain'.
4425 Move documention to inline-frame.h.
4426 If non-NULL, use stopped_by_user_bp_inline_frame to determine
4427 whether the frame should be elided.
4428 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
4429 Add moved documentation and update for new parameter.
4430
4431 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
4432
4433 PR cli/14975
4434 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4435 unittests/format_pieces-selftests.c.
4436 * common/format.h (format_piece) <operator==>: New.
4437 (format_pieces) <operator[]>: Remove.
4438 * common/format.c (format_pieces::format_pieces): Handle \e.
4439 * unittests/format_pieces-selftests.c: New.
4440
4441 2018-05-17 Tom Tromey <tom@tromey.com>
4442
4443 PR symtab/23010:
4444 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
4445 (dw2_instantiate_symtab): Add skip_partial parameter.
4446 (dw2_find_last_source_symtab, dw2_map_expand_apply)
4447 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
4448 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
4449 (dw2_expand_symtabs_matching_one)
4450 (dw2_find_pc_sect_compunit_symtab)
4451 (dw2_debug_names_lookup_symbol)
4452 (dw2_debug_names_expand_symtabs_for_function): Update.
4453 (init_cutu_and_read_dies): Add skip_partial parameter.
4454 (process_psymtab_comp_unit, build_type_psymtabs_1)
4455 (process_skeletonless_type_unit, load_partial_comp_unit)
4456 (psymtab_to_symtab_1): Update.
4457 (load_full_comp_unit): Add skip_partial parameter.
4458 (process_imported_unit_die, dwarf2_read_addr_index)
4459 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
4460 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
4461 (read_signatured_type): Update.
4462
4463 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
4464
4465 * value.c (release_value): Remove unused variable.
4466 (record_latest_value): Likewise.
4467 (access_value_history): Likewise.
4468 (preserve_values): Likewise.
4469
4470 2018-05-17 Tom Tromey <tom@tromey.com>
4471
4472 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
4473 Initialize.
4474
4475 2018-05-16 Maciej W. Rozycki <macro@mips.com>
4476
4477 PR gdb/22286
4478 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
4479 Also handle registers whose width is not a multiple of
4480 PTRACE_TYPE_RET.
4481 (linux_nat_trad_target::store_register): Likewise.
4482
4483 2018-05-16 Tom Tromey <tom@tromey.com>
4484
4485 * gdbcore.h (core_bfd): Redefine.
4486 * corelow.c (core_target::close): Update.
4487 (core_target_open): Update.
4488 * progspace.h (struct program_space) <cbfd>: Now a
4489 gdb_bfd_ref_ptr.
4490
4491 2018-05-16 Tom Tromey <tom@tromey.com>
4492
4493 PR cli/19551:
4494 * symfile-add-flags.h (enum symfile_add_flags)
4495 <SYMFILE_NOT_FILENAME>: New constant.
4496 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
4497 objfile name from BFD.
4498 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
4499 * minidebug.c (find_separate_debug_file_in_section): Put
4500 ".gnu_debugdata" into BFD's file name.
4501
4502 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
4503
4504 * regcache.c (regcache_read_ftype, regcache_write_ftype):
4505 Remove.
4506
4507 2018-05-15 Tamar Christina <tamar.christina@arm.com>
4508
4509 PR binutils/21446
4510 * aarch64-tdep.c (aarch64_analyze_prologue,
4511 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
4512 Indicate not interested in errors.
4513
4514 2018-05-15 Maciej W. Rozycki <macro@mips.com>
4515
4516 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
4517 Supply the MIPS_ZERO_REGNUM register.
4518
4519 2018-05-15 Maciej W. Rozycki <macro@mips.com>
4520
4521 * mips-tdep.c (mask_address_var): Make variable static.
4522
4523 2018-05-14 Tom Tromey <tom@tromey.com>
4524
4525 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
4526
4527 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
4528
4529 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
4530 FXSAVE_ADDR for the mxcsr register.
4531
4532 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
4533
4534 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
4535
4536 2018-05-11 Pedro Alves <palves@redhat.com>
4537
4538 * corelow.c (core_target) <core_target>: No longer inline.
4539 Initialize m_core_gdbarch, m_core_vec and build the section table
4540 here.
4541 <~core_target>: New.
4542 <core_gdbarch, get_core_register_section>: New methods.
4543 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
4544 factored out from ...
4545 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
4546 (core_ops): Delete.
4547 (sniff_core_bfd): Add gdbarch parameter.
4548 (core_close): Delete, merged into ...
4549 (core_target::close): ... here. Delete self.
4550 (core_close_cleanup): Delete.
4551 (core_target_open): Allocate a core_target on the heap. Use a
4552 unique_ptr instead of a cleanup. Bits moved into the core_target
4553 ctor. Adjust to use core_target methods instead of globals.
4554 (get_core_register_section): Rename to ...
4555 (core_target::get_core_register_section): ... this and adjust.
4556 (struct get_core_registers_cb_data): New.
4557 (get_core_registers_cb): Use it. Use bool.
4558 (core_target::fetch_registers, core_target::files_info)
4559 (core_target::xfer_partial, core_target::read_description)
4560 (core_target::pid_to, core_target::thread_name): Adjust to
4561 reference class fields instead of globals.
4562 * target.h (struct target_ops_deleter, target_ops_up): New.
4563
4564 2018-05-11 Pedro Alves <palves@redhat.com>
4565
4566 * corefile.c (core_file_command): Move to corelow.c.
4567 * corelow.c (the_core_target): Delete.
4568 (core_file_command): Moved from corefile.c. Check exec_bfd
4569 instead of the_core_target. Use target_detach instead of calling
4570 into the_core_target directly.
4571 (maybe_say_no_core_file_now): New.
4572 (core_target::detach): Use it.
4573 (_initialize_corelow): Remove references to the_core_target.
4574 * gdbcore.h (the_core_target): Delete.
4575
4576 2018-05-11 Tom Tromey <tromey@redhat.com>
4577 Pedro Alves <palves@redhat.com>
4578
4579 * corefile.c (core_bfd): Remove.
4580 * gdbcore.h (core_bfd): Now a macro.
4581 * progspace.h (struct program_space) <cbfd>: New field.
4582
4583 2018-05-11 Tom Tromey <tom@tromey.com>
4584
4585 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
4586 gdb::def_vector.
4587
4588 2018-05-10 Tom Tromey <tom@tromey.com>
4589
4590 * configure: Rebuild.
4591 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
4592
4593 2018-05-10 Joel Brobecker <brobecker@adacore.com>
4594
4595 PR server/23158:
4596 * regformats/regdat.sh: Adjust script, following the addition
4597 of the new expedite_regs parameter to init_target_desc.
4598
4599 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
4600
4601 PR gdb/23127
4602 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
4603 set_gdbarch_significant_addr_bit.
4604 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
4605 set_gdbarch_significant_addr_bit.
4606 * utils.c (address_significant): Update to sign extend addr.
4607
4608 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
4609
4610 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
4611 (xtensa_linux_init_abi): Limit tdep->num_regs by
4612 tdep->num_nopriv_regs.
4613 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
4614 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
4615 not initialized.
4616
4617 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
4618
4619 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
4620
4621 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
4622
4623 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
4624 (I387_MXCSR_INIT_VAL): New constant.
4625 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
4626 buffer if it was supplied by the inferior.
4627 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
4628 (i387_xsave_get_clear_bv): New function.
4629 (i387_supply_xsave): Only read x87 control registers from the
4630 xsave buffer if the feature is enabled, and the state will have
4631 been written, otherwise, provide a suitable default.
4632 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
4633 including x87 control registers. Update control registers if they
4634 have changed from the default value, and mark features as enabled
4635 as required.
4636 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
4637
4638 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
4639
4640 * spu-tdep.c (info_spu_event_command): Fix output formatting.
4641
4642 2018-05-07 Tom Tromey <tom@tromey.com>
4643
4644 * configure: Rebuild.
4645 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
4646
4647 2018-05-07 Tom Tromey <tom@tromey.com>
4648
4649 PR tdep/20362:
4650 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
4651 bit. Use correct value for VDIV.
4652
4653 2018-05-04 Tom Tromey <tom@tromey.com>
4654
4655 * configure: Rebuild.
4656 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
4657
4658 2018-05-04 Tom Tromey <tom@tromey.com>
4659
4660 * linux-record.c (record_linux_system_call) <case
4661 RECORD_SYS_RECVFROM>: Add "break".
4662
4663 2018-05-04 Tom Tromey <tom@tromey.com>
4664
4665 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
4666 Add missing "break".
4667 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
4668 Add missing "break".
4669
4670 2018-05-04 Tom Tromey <tom@tromey.com>
4671
4672 * rs6000-tdep.c (ppc_process_record_op4)
4673 (ppc_process_record_op63): Add fall-through comment.
4674
4675 2018-05-04 Tom Tromey <tom@tromey.com>
4676
4677 * i386-tdep.c (i386_process_record): Add fall-through comment.
4678
4679 2018-05-04 Tom Tromey <tom@tromey.com>
4680
4681 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
4682 comment.
4683
4684 2018-05-04 Tom Tromey <tom@tromey.com>
4685
4686 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
4687 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
4688 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
4689 comment.
4690 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
4691 comment.
4692 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
4693 comment.
4694
4695 2018-05-04 Tom Tromey <tom@tromey.com>
4696
4697 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
4698
4699 2018-05-04 Tom Tromey <tom@tromey.com>
4700
4701 * s390-tdep.c (s390_process_record): Fix fall-through comments.
4702 * xcoffread.c (scan_xcoff_symtab): Move comment later.
4703 * symfile.c (section_is_mapped): Fix fall-through comment.
4704 * stabsread.c (define_symbol, read_member_functions): Fix
4705 fall-through comment.
4706 * s390-linux-tdep.c (s390_process_record): Fix fall-through
4707 comment.
4708 * remote.c (remote_wait_as): Fix fall-through comment.
4709 * p-exp.y (yylex): Fix fall-through comment.
4710 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
4711 comment.
4712 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
4713 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
4714 * jv-exp.y (yylex): Fix fall-through comment.
4715 * go-exp.y (lex_one_token): Fix fall-through comment.
4716 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
4717 fall-through comment.
4718 * f-exp.y (yylex): Fix fall-through comment.
4719 * dwarf2read.c (process_die): Fix fall-through comments.
4720 * dbxread.c (process_one_symbol): Fix fall-through comment.
4721 * d-exp.y (lex_one_token): Fix fall-through comment.
4722 * cp-name-parser.y (yylex): Fix fall-through comment.
4723 * coffread.c (coff_symtab_read): Fix fall-through comment.
4724 * c-exp.y (lex_one_token): Fix fall-through comment.
4725 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
4726 comment.
4727 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
4728 comment.
4729
4730 2018-05-04 Tom Tromey <tom@tromey.com>
4731
4732 PR python/22730:
4733 * NEWS: Mention gdb.execute change.
4734 * gdbcmd.h (execute_control_command): Don't declare.
4735 * python/python.c (execute_gdb_command): Use read_command_lines_1,
4736 execute_control_commands, execute_control_commands_to_string.
4737 * cli/cli-script.h (execute_control_commands)
4738 (execute_control_commands_to_string): Declare.
4739 (execute_control_command): Add from_tty parameter.
4740 * cli/cli-script.c (execute_control_commands)
4741 (execute_control_commands_to_string): New functions.
4742 (execute_user_command): Use execute_control_commands.
4743 (execute_control_command_1): Add "from_tty" parameter. Update.
4744 (execute_control_command): Likewise.
4745
4746 2018-05-04 Tom Tromey <tom@tromey.com>
4747
4748 PR python/22731:
4749 * NEWS: Mention that breakpoint commands are writable.
4750 * python/py-breakpoint.c (bppy_set_commands): New function.
4751 (breakpoint_object_getset) <"commands">: Use it.
4752
4753 2018-05-04 Tom Tromey <tom@tromey.com>
4754
4755 * tracepoint.c (actions_command): Update.
4756 * mi/mi-cmd-break.c (mi_command_line_array)
4757 (mi_command_line_array_cnt, mi_command_line_array_ptr)
4758 (mi_read_next_line): Remove.
4759 (mi_cmd_break_commands): Update.
4760 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
4761 function_view.
4762 * cli/cli-script.c (get_command_line): Update.
4763 (process_next_line): Use function_view. Constify.
4764 (recurse_read_control_structure, read_command_lines)
4765 (read_command_lines_1): Change argument types to function_view.
4766 (do_define_command, document_command): Update.
4767 * breakpoint.h (check_tracepoint_command): Don't declare.
4768 * breakpoint.c (check_tracepoint_command): Remove.
4769 (commands_command_1, create_tracepoint_from_upload): Update.
4770
4771 2018-05-04 Tom Tromey <tom@tromey.com>
4772
4773 PR gdb/11750:
4774 * cli/cli-script.h (enum command_control_type) <define_control>:
4775 New constant.
4776 * cli/cli-script.c (multi_line_command_p): Handle define_control.
4777 (build_command_line, execute_control_command_1)
4778 (process_next_line): Likewise.
4779 (do_define_command): New function, extracted from define_command.
4780 (define_command): Use it.
4781
4782 2018-05-04 Tom Tromey <tom@tromey.com>
4783
4784 * tracepoint.c (actions_command): Update.
4785 * cli/cli-script.h (read_command_lines): Update.
4786 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
4787 (MAX_TMPBUF): Remove define.
4788 (define_command): Use string_printf.
4789 (document_command): Likewise.
4790 * breakpoint.c (commands_command_1): Update.
4791
4792 2018-05-04 Tom Tromey <tom@tromey.com>
4793
4794 * top.c (execute_command): Update.
4795 * cli/cli-script.h (print_command_lines): Now varargs.
4796 * cli/cli-script.c (print_command_lines): Now varargs.
4797 (execute_control_command_1) <case while_control, case if_control>:
4798 Update.
4799
4800 2018-05-04 Tom Tromey <tom@tromey.com>
4801
4802 * tracepoint.c (all_tracepoint_actions): Rename from
4803 all_tracepoint_actions_and_cleanup. Change return type.
4804 (actions_command, encode_actions_1, encode_actions)
4805 (trace_dump_actions, tdump_command): Update.
4806 * remote.c (remote_download_command_source): Update.
4807 * python/python.c (gdbpy_eval_from_control_command)
4808 (python_command, python_interactive_command): Update.
4809 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
4810 * guile/guile.c (guile_command)
4811 (gdbscm_eval_from_control_command, guile_command): Update.
4812 * compile/compile.c (compile_code_command)
4813 (compile_print_command, compile_to_object): Update.
4814 * cli/cli-script.h (struct command_lines_deleter): New.
4815 (counted_command_line): New typedef.
4816 (struct command_line): Add constructor, destructor.
4817 <body_list>: Remove.
4818 <body_list_0, body_list_1>: New members.
4819 (command_line_up): Remove typedef.
4820 (read_command_lines, read_command_lines_1, get_command_line):
4821 Update.
4822 (copy_command_lines): Don't declare.
4823 * cli/cli-script.c (build_command_line): Use "new".
4824 (get_command_line): Return counted_command_line.
4825 (print_command_lines, execute_user_command)
4826 (execute_control_command_1, while_command, if_command): Update.
4827 (realloc_body_list): Remove.
4828 (process_next_line, recurse_read_control_structure): Update.
4829 (read_command_lines, read_command_lines_1): Return counted_command_line.
4830 (free_command_lines): Use "delete".
4831 (copy_command_lines): Remove.
4832 (define_command, document_command, show_user_1): Update.
4833 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
4834 a counted_command_line.
4835 * breakpoint.h (counted_command_line): Remove typedef.
4836 (breakpoint_set_commands): Update.
4837 * breakpoint.c (check_no_tracepoint_commands)
4838 (validate_commands_for_breakpoint): Update.
4839 (breakpoint_set_commands): Change commands to be a
4840 counted_command_line.
4841 (commands_command_1, update_dprintf_command_list)
4842 (create_tracepoint_from_upload): Update.
4843
4844 2018-05-04 Tom Tromey <tom@tromey.com>
4845
4846 * cli/cli-decode.h (cmd_list_element): New constructor.
4847 (~cmd_list_element): New destructor.
4848 (struct cmd_list_element): Add initializers.
4849 * cli/cli-decode.c (do_add_cmd): Use "new".
4850 (delete_cmd): Use "delete".
4851
4852 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
4853 Pedro Alves <palves@redhat.com>
4854
4855 PR breakpoints/19806 and support for PR external/20207.
4856 * NEWS: Mention Aarch64 watchpoint improvements.
4857 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
4858 watchpoints and PR external/20207 watchpoints.
4859 * nat/aarch64-linux-hw-point.c
4860 (kernel_supports_any_contiguous_range): New.
4861 (aarch64_watchpoint_offset): New.
4862 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
4863 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
4864 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
4865 (aarch64_align_watchpoint): New parameters aligned_offset_p and
4866 next_addr_orig_p. Support PR external/20207 watchpoints.
4867 (aarch64_downgrade_regs): New.
4868 (aarch64_dr_state_insert_one_point): New parameters offset and
4869 addr_orig.
4870 (aarch64_dr_state_remove_one_point): Likewise.
4871 (aarch64_handle_breakpoint): Update caller.
4872 (aarch64_handle_aligned_watchpoint): Likewise.
4873 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
4874 aligned_offset.
4875 (aarch64_linux_set_debug_regs): Remove const from state. Call
4876 aarch64_downgrade_regs.
4877 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
4878 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
4879 (DR_CONTROL_MASK): ... this.
4880 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
4881 (unsigned int aarch64_watchpoint_offset): New prototype.
4882 (aarch64_linux_set_debug_regs): Remove const from state.
4883 * utils.c (align_up, align_down): Move to ...
4884 * common/common-utils.c (align_up, align_down): ... here.
4885 * utils.h (align_up, align_down): Move to ...
4886 * common/common-utils.h (align_up, align_down): ... here.
4887
4888 2018-05-04 Joel Brobecker <brobecker@adacore.com>
4889
4890 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
4891 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
4892 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
4893 Re-implement to match the ABI as summarized in GCC's
4894 gcc/config/sparc/sparc.c. All callers updated.
4895 (sparc32_store_arguments): Remove assertion.
4896
4897 2018-05-04 Tom Tromey <tom@tromey.com>
4898
4899 * printcmd.c: Don't include tui.h.
4900 (decode_format): Use skip_spaces.
4901
4902 2018-05-04 Tom Tromey <tom@tromey.com>
4903
4904 PR gdb/22619:
4905 * printcmd.c (last_count): New global.
4906 (x_command): Use saved count when repeating.
4907
4908 2018-05-04 Tom Tromey <tom@tromey.com>
4909
4910 * nto-procfs.c (do_closedir_cleanup): Remove.
4911 (procfs_pidlist): Use gdb_dir_up.
4912 * procfs.c (do_closedir_cleanup): Remove.
4913 (proc_update_threads): Use gdb_dir_up.
4914 * common/filestuff.h (struct gdb_dir_deleter): New.
4915 (gdb_dir_up): New typedef.
4916
4917 2018-05-04 Tom Tromey <tom@tromey.com>
4918
4919 * ada-lang.c (print_mention_exception): Use std::string.
4920
4921 2018-05-04 Tom Tromey <tom@tromey.com>
4922
4923 * ada-lang.c (create_excep_cond_exprs): Update.
4924 (ada_exception_catchpoint_cond_string): Use std::string.
4925
4926 2018-05-04 Tom Tromey <tom@tromey.com>
4927
4928 * ada-lang.c (xget_renaming_scope): Return std::string.
4929 (old_renaming_is_invisible): Update.
4930
4931 2018-05-04 Tom Tromey <tom@tromey.com>
4932
4933 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
4934 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
4935
4936 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
4937
4938 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
4939
4940 2018-05-04 Tom Tromey <tom@tromey.com>
4941
4942 * remote.c (remote_query_supported_append): Change type.
4943 (remote_check_symbols): Update.
4944
4945 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
4946
4947 PR gdb/11420
4948 * configure.ac: Prepend libpython.
4949 * python/python-config.py: Likewise.
4950 * configure: Regenerate.
4951
4952 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
4953
4954 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
4955
4956 2018-05-03 Pedro Alves <palves@redhat.com>
4957
4958 * s390-linux-nat.c
4959 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
4960 override. Write 'true' instead of '1'.
4961 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
4962 declaration.
4963
4964 2018-05-02 Pedro Alves <palves@redhat.com>
4965
4966 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
4967 add_inf_child_target.
4968 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
4969 add_inf_child_target.
4970 * aix-thread.c (aix_thread_target_info): New.
4971 (aix_thread_target) <shortname, longname, doc>: Delete.
4972 <info>: New.
4973 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
4974 add_inf_child_target.
4975 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
4976 add_inf_child_target.
4977 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
4978 add_inf_child_target.
4979 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
4980 add_inf_child_target.
4981 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
4982 add_inf_child_target.
4983 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
4984 add_inf_child_target.
4985 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
4986 add_inf_child_target.
4987 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
4988 add_inf_child_target.
4989 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
4990 add_inf_child_target.
4991 * bfd-target.c (target_bfd_target_info): New.
4992 (target_bfd) <shortname, longname, doc>: Delete.
4993 <info>: New.
4994 * bsd-kvm.c (bsd_kvm_target_info): New.
4995 (bsd_kvm_target) <shortname, longname, doc>: Delete.
4996 <info>: New.
4997 (bsd_kvm_target::open): Rename to ...
4998 (bsd_kvm_target_open): ... this. Adjust.
4999 * bsd-uthread.c (bsd_uthread_target_info): New.
5000 (bsd_uthread_target) <shortname, longname, doc>: Delete.
5001 <info>: New.
5002 * corefile.c (core_file_command): Adjust.
5003 * corelow.c (core_target_info): New.
5004 (core_target) <shortname, longname, doc>: Delete.
5005 <info>: New.
5006 (core_target::open): Rename to ...
5007 (core_target_open): ... this. Adjust.
5008 * ctf.c (ctf_target_info): New.
5009 (ctf_target) <shortname, longname, doc>: Delete.
5010 <info>: New.
5011 (ctf_target::open): Rename to ...
5012 (ctf_target_open): ... this.
5013 (_initialize_ctf): Adjust.
5014 * exec.c (exec_target_info): New.
5015 (exec_target) <shortname, longname, doc>: Delete.
5016 <info>: New.
5017 (exec_target::open): Rename to ...
5018 (exec_target_open): ... this.
5019 * gdbcore.h (core_target_open): Declare.
5020 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
5021 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
5022 add_inf_child_target.
5023 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
5024 add_inf_child_target.
5025 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
5026 add_inf_child_target.
5027 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
5028 add_inf_child_target.
5029 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
5030 add_inf_child_target.
5031 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
5032 add_inf_child_target.
5033 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
5034 add_inf_child_target.
5035 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
5036 add_inf_child_target.
5037 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
5038 add_inf_child_target.
5039 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
5040 add_inf_child_target.
5041 * inf-child.c (inf_child_target_info): New.
5042 (inf_child_target::info): New.
5043 (inf_child_open_target): Remove 'target' parameter. Use
5044 get_native_target instead.
5045 (inf_child_target::open): Delete.
5046 (add_inf_child_target): New.
5047 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
5048 Delete.
5049 <info>: New.
5050 (add_inf_child_target): Declare.
5051 (inf_child_open_target): Declare.
5052 * linux-thread-db.c (thread_db_target_info): New.
5053 (thread_db_target) <shortname, longname, doc>: Delete.
5054 <info>: New.
5055 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
5056 add_inf_child_target.
5057 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
5058 add_inf_child_target.
5059 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
5060 add_inf_child_target.
5061 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
5062 add_inf_child_target.
5063 * make-target-delegates (print_class): Adjust.
5064 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
5065 add_inf_child_target.
5066 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
5067 add_inf_child_target.
5068 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
5069 add_inf_child_target.
5070 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
5071 add_inf_child_target.
5072 * nto-procfs.c (nto_native_target_info): New.
5073 (nto_procfs_target_native) <shortname, longname, doc>:
5074 Delete.
5075 <info>: New.
5076 (nto_procfs_target_info): New.
5077 (nto_procfs_target_procfs) <shortname, longname, doc>:
5078 Delete.
5079 <info>: New.
5080 (init_procfs_targets): Adjust.
5081 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
5082 add_inf_child_target.
5083 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
5084 add_inf_child_target.
5085 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
5086 add_inf_child_target.
5087 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
5088 add_inf_child_target.
5089 * ravenscar-thread.c (ravenscar_target_info): New.
5090 (ravenscar_thread_target) <shortname, longname, doc>:
5091 Delete.
5092 <info>: New.
5093 * record-btrace.c (record_btrace_target_info):
5094 (record_btrace_target) <shortname, longname, doc>: Delete.
5095 <info>: New.
5096 (record_btrace_target::open): Rename to ...
5097 (record_btrace_target_open): ... this. Adjust.
5098 * record-full.c (record_longname, record_doc): New.
5099 (record_full_base_target) <shortname, longname, doc>: Delete.
5100 <info>: New.
5101 (record_full_target_info): New.
5102 (record_full_target): <shortname>: Delete.
5103 <info>: New.
5104 (record_full_core_open_1, record_full_open_1): Update comments.
5105 (record_full_base_target::open): Rename to ...
5106 (record_full_open): ... this.
5107 (cmd_record_full_restore): Update.
5108 (_initialize_record_full): Update.
5109 * remote-sim.c (remote_sim_target_info): New.
5110 (gdbsim_target) <shortname, longname, doc>: Delete.
5111 <info>: New.
5112 (gdbsim_target::open): Rename to ...
5113 (gdbsim_target_open): ... this.
5114 (_initialize_remote_sim): Adjust.
5115 * remote.c (remote_doc): New.
5116 (remote_target_info): New.
5117 (remote_target) <shortname, longname, doc>: Delete.
5118 <info>: New.
5119 (extended_remote_target_info): New.
5120 (extended_remote_target) <shortname, longname, doc>: Delete.
5121 <info>: New.
5122 (remote_target::open_1): Make static. Adjust.
5123 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
5124 * s390-linux-nat.c (_initialize_s390_nat): Use
5125 add_inf_child_target.
5126 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
5127 add_inf_child_target.
5128 * sol-thread.c (thread_db_target_info): New.
5129 (sol_thread_target) <shortname, longname, doc>: Delete.
5130 <info>: New.
5131 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
5132 add_inf_child_target.
5133 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
5134 add_inf_child_target.
5135 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
5136 add_inf_child_target.
5137 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
5138 add_inf_child_target.
5139 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
5140 add_inf_child_target.
5141 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
5142 add_inf_child_target.
5143 * spu-linux-nat.c (_initialize_spu_nat): Use
5144 add_inf_child_target.
5145 * spu-multiarch.c (spu_multiarch_target_info): New.
5146 (spu_multiarch_target) <shortname, longname, doc>: Delete.
5147 <info>: New.
5148 * target-delegates.c: Regenerate.
5149 * target.c: Include <unordered_map>.
5150 (target_ops_p): Delete.
5151 (DEF_VEC_P(target_ops_p)): Delete.
5152 (target_factories): New.
5153 (test_target_info): New.
5154 (test_target_ops::info): New.
5155 (open_target): Adjust to use target_factories.
5156 (add_target_with_completer): Rename to ...
5157 (add_target): ... this. Change prototype. Register target_info
5158 and open callback in target_factories. Register target_info in
5159 command context instead of target_ops.
5160 (add_target): Delete old implementation.
5161 (add_deprecated_target_alias): Change prototype. Adjust.
5162 (the_native_target): New.
5163 (set_native_target, get_native_target): New.
5164 (find_default_run_target): Use the_native_target.
5165 (find_attach_target, find_run_target): Simplify.
5166 (target_ops::open): Delete.
5167 (dummy_target_info): New.
5168 (dummy_target::shortname, dummy_target::longname)
5169 (dummy_target::doc): Delete.
5170 (dummy_target::info): New.
5171 (debug_target::shortname, debug_target::longname)
5172 (debug_target::doc): Delete.
5173 (debug_target::info): New.
5174 * target.h (struct target_info): New.
5175 (target_ops::~target_ops): Add comment.
5176 (target_ops::info): New.
5177 (target_ops::shortname, target_ops::longname, target_ops::doc): No
5178 longer virtual. Implement in terms of target_info.
5179 (set_native_target, get_native_target): Declare.
5180 (target_open_ftype): New.
5181 (add_target, add_target_with_completer)
5182 (add_deprecated_target_alias): Change prototype.
5183 (test_target) <shortname, longname, doc>: Delete.
5184 <info>: New.
5185 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
5186 add_inf_child_target.
5187 * tracefile-tfile.c (tfile_target_info): New.
5188 (tfile_target) <shortname, longname, doc>: Delete.
5189 <info>: New.
5190 (tfile_target::open): Rename to ...
5191 (tfile_target_open): ... this.
5192 (_initialize_tracefile_tfile): Adjust.
5193 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
5194 add_inf_child_target.
5195 * windows-nat.c (_initialize_windows_nat): Use
5196 add_inf_child_target.
5197 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
5198 add_inf_child_target.
5199
5200 2018-05-02 Pedro Alves <palves@redhat.com>
5201
5202 * linux-nat.h (linux_nat_target) <low_new_thread,
5203 low_delete_thread, low_new_fork, low_forget_process,
5204 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
5205 New virtual methods.
5206 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5207 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
5208 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
5209 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5210 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
5211 Delete.
5212 * linux-fork.c (delete_fork): Adjust to call low method.
5213 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
5214 (linux_nat_new_fork, linux_nat_forget_process_hook)
5215 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
5216 (linux_nat_status_is_event):
5217 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
5218 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
5219 to call low method.
5220 (sigtrap_is_event): Rename to ...
5221 (linux_nat_target::low_status_is_event): ... this.
5222 (linux_nat_set_status_is_event): Delete.
5223 (save_stop_reason, linux_nat_wait_1)
5224 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
5225 low methods.
5226 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5227 (linux_nat_set_new_fork, linux_nat_set_forget_process)
5228 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5229 (linux_nat_set_prepare_to_resume): Delete.
5230 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
5231 low virtual methods.
5232 * amd64-linux-nat.c: Likewise.
5233 * arm-linux-nat.c: Likewise.
5234 * i386-linux-nat.c: Likewise.
5235 * ia64-linux-nat.c: Likewise.
5236 * mips-linux-nat.c: Likewise.
5237 * ppc-linux-nat.c: Likewise.
5238 * s390-linux-nat.c: Likewise.
5239 * sparc64-linux-nat.c: Likewise.
5240 * x86-linux-nat.c: Likewise.
5241 * x86-linux-nat.h: Include "nat/x86-linux.h".
5242 (x86_linux_nat_target) <low_new_fork, low_forget_process,
5243 low_prepare_to_resume, low_new_thread, low_delete_thread>:
5244 Override methods.
5245
5246 2018-05-02 Pedro Alves <palves@redhat.com>
5247
5248 * target.h (target_ops)
5249 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5250 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
5251 stopped_by_watchpoint, have_continuable_watchpoint,
5252 stopped_data_address, watchpoint_addr_within_range,
5253 can_accel_watchpoint_condition, can_run, thread_alive,
5254 has_all_memory, has_memory, has_stack, has_registers,
5255 has_execution, can_async_p, is_async_p, supports_non_stop,
5256 always_non_stop_p, can_execute_reverse, supports_multi_process,
5257 supports_enable_disable_tracepoint,
5258 supports_disable_randomization, supports_string_tracing,
5259 supports_evaluation_of_breakpoint_conditions,
5260 can_run_breakpoint_commands, filesystem_is_local,
5261 can_download_tracepoint, get_trace_state_variable_value,
5262 set_trace_notes, get_tib_address, use_agent, can_use_agent,
5263 record_is_replaying, record_will_replay,
5264 augmented_libraries_svr4_read>: Adjust to return bool.
5265 * aarch64-linux-nat.c: All implementations adjusted.
5266 * aix-thread.c: All implementations adjusted.
5267 * arm-linux-nat.c: All implementations adjusted.
5268 * breakpoint.c: All implementations adjusted.
5269 * bsd-kvm.c: All implementations adjusted.
5270 * bsd-uthread.c: All implementations adjusted.
5271 * corelow.c: All implementations adjusted.
5272 * ctf.c: All implementations adjusted.
5273 * darwin-nat.c: All implementations adjusted.
5274 * darwin-nat.h: All implementations adjusted.
5275 * exec.c: All implementations adjusted.
5276 * fbsd-nat.c: All implementations adjusted.
5277 * fbsd-nat.h: All implementations adjusted.
5278 * gnu-nat.c: All implementations adjusted.
5279 * gnu-nat.h: All implementations adjusted.
5280 * go32-nat.c: All implementations adjusted.
5281 * ia64-linux-nat.c: All implementations adjusted.
5282 * inf-child.c: All implementations adjusted.
5283 * inf-child.h: All implementations adjusted.
5284 * inf-ptrace.c: All implementations adjusted.
5285 * inf-ptrace.h: All implementations adjusted.
5286 * linux-nat.c: All implementations adjusted.
5287 * linux-nat.h: All implementations adjusted.
5288 * mips-linux-nat.c: All implementations adjusted.
5289 * nto-procfs.c: All implementations adjusted.
5290 * ppc-linux-nat.c: All implementations adjusted.
5291 * procfs.c: All implementations adjusted.
5292 * ravenscar-thread.c: All implementations adjusted.
5293 * record-btrace.c: All implementations adjusted.
5294 * record-full.c: All implementations adjusted.
5295 * remote-sim.c: All implementations adjusted.
5296 * remote.c: All implementations adjusted.
5297 * s390-linux-nat.c: All implementations adjusted.
5298 * sol-thread.c: All implementations adjusted.
5299 * spu-multiarch.c: All implementations adjusted.
5300 * target-delegates.c: All implementations adjusted.
5301 * target.c: All implementations adjusted.
5302 * target.h: All implementations adjusted.
5303 * tracefile-tfile.c: All implementations adjusted.
5304 * tracefile.c: All implementations adjusted.
5305 * tracefile.h: All implementations adjusted.
5306 * windows-nat.c: All implementations adjusted.
5307 * x86-linux-nat.h: All implementations adjusted.
5308 * x86-nat.h: All implementations adjusted.
5309
5310 2018-05-02 Pedro Alves <palves@redhat.com>
5311
5312 * make-target-delegates (scan_target_h): Don't trim lines here.
5313 Replace sequences of tabs and/or whitespace with a single
5314 whitespace.
5315 (top level, parsing methods): Trim each line before processing it
5316 here.
5317
5318 2018-05-02 Pedro Alves <palves@redhat.com>
5319 John Baldwin <jhb@freebsd.org>
5320
5321 * target.h (enum strata) <debug_stratum>: New.
5322 (struct target_ops) <all delegation methods>: Replace by C++
5323 virtual methods, and drop "to_" prefix. All references updated
5324 throughout.
5325 <to_shortname, to_longname, to_doc, to_data,
5326 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
5327 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
5328 virtual methods. All references updated throughout.
5329 <can_attach, supports_terminal_ours, can_create_inferior,
5330 get_thread_control_capabilities, attach_no_wait>: New
5331 virtual methods.
5332 <insert_breakpoint, remove_breakpoint>: Now
5333 TARGET_DEFAULT_NORETURN methods.
5334 <info_proc>: Now returns bool.
5335 <to_magic>: Delete.
5336 (OPS_MAGIC): Delete.
5337 (current_target): Delete. All references replaced by references
5338 to ...
5339 (target_stack): ... this. New.
5340 (target_shortname, target_longname): Adjust.
5341 (target_can_run): Now a function declaration.
5342 (default_child_has_all_memory, default_child_has_memory)
5343 (default_child_has_stack, default_child_has_registers)
5344 (default_child_has_execution): Remove target_ops parameter.
5345 (complete_target_initialization): Delete.
5346 (memory_breakpoint_target): New template class.
5347 (test_target_ops): Refactor as a C++ class with virtual methods.
5348 * make-target-delegates (NAME_PART): Tighten.
5349 (POINTER_PART, CP_SYMBOL): New.
5350 (SIMPLE_RETURN_PART): Reimplement.
5351 (VEC_RETURN_PART): Expect less.
5352 (RETURN_PART, VIRTUAL_PART): New.
5353 (METHOD): Adjust to C++ virtual methods.
5354 (scan_target_h): Remove reference to C99.
5355 (dname): Output "target_ops::" prefix.
5356 (write_function_header): Adjust to output a C++ class method.
5357 (write_declaration): New.
5358 (write_delegator): Adjust to output a C++ class method.
5359 (tdname): Output "dummy_target::" prefix.
5360 (write_tdefault, write_debugmethod): Adjust to output a C++ class
5361 method.
5362 (tdefault_names, debug_names): Delete.
5363 (return_types, tdefaults, styles, argtypes_array): New.
5364 (top level): All methods are delegators.
5365 (print_class): New.
5366 (top level): Print dummy_target and debug_target classes.
5367 * target-delegates.c: Regenerate.
5368 * target-debug.h (target_debug_print_enum_info_proc_what)
5369 (target_debug_print_thread_control_capabilities)
5370 (target_debug_print_thread_info_p): New.
5371 * target.c (dummy_target): Delete.
5372 (the_dummy_target, the_debug_target): New.
5373 (target_stack): Now extern.
5374 (set_targetdebug): Push/unpush debug target.
5375 (default_child_has_all_memory, default_child_has_memory)
5376 (default_child_has_stack, default_child_has_registers)
5377 (default_child_has_execution): Remove target_ops parameter.
5378 (complete_target_initialization): Delete.
5379 (add_target_with_completer): No longer call
5380 complete_target_initialization.
5381 (target_supports_terminal_ours): Use regular delegation.
5382 (update_current_target): Delete.
5383 (push_target): No longer check magic number. Don't call
5384 update_current_target.
5385 (unpush_target): Don't call update_current_target.
5386 (target_is_pushed): No longer check magic number.
5387 (target_require_runnable): Skip for all stratums over
5388 process_stratum.
5389 (target_ops::info_proc): New.
5390 (target_info_proc): Use find_target_at and
5391 find_default_run_target.
5392 (target_supports_disable_randomization): Use regular delegation.
5393 (target_get_osdata): Use find_target_at.
5394 (target_ops::open, target_ops::close, target_ops::can_attach)
5395 (target_ops::attach, target_ops::can_create_inferior)
5396 (target_ops::create_inferior, target_ops::can_run)
5397 (target_can_run): New.
5398 (default_fileio_target): Use regular delegation.
5399 (target_ops::fileio_open, target_ops::fileio_pwrite)
5400 (target_ops::fileio_pread, target_ops::fileio_fstat)
5401 (target_ops::fileio_close, target_ops::fileio_unlink)
5402 (target_ops::fileio_readlink): New.
5403 (target_fileio_open_1, target_fileio_unlink)
5404 (target_fileio_readlink): Always call the target method. Handle
5405 FILEIO_ENOSYS.
5406 (return_zero, return_zero_has_execution): Delete.
5407 (init_dummy_target): Delete.
5408 (dummy_target::dummy_target, dummy_target::shortname)
5409 (dummy_target::longname, dummy_target::doc)
5410 (debug_target::debug_target, debug_target::shortname)
5411 (debug_target::longname, debug_target::doc): New.
5412 (target_supports_delete_record): Use regular delegation.
5413 (setup_target_debug): Delete.
5414 (maintenance_print_target_stack): Skip debug_stratum.
5415 (initialize_targets): Instantiate the_dummy_target and
5416 the_debug_target.
5417 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
5418 use target_stack.
5419 (target_auxv_search, fprint_target_auxv): Adjust.
5420 (info_auxv_command): Adjust to use target_stack.
5421 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
5422 * exceptions.c (print_flush): Handle a NULL target_stack.
5423 * regcache.c (target_ops_no_register): Refactor as class with
5424 virtual methods.
5425
5426 * exec.c (exec_target): New class.
5427 (exec_ops): Now an exec_target.
5428 (exec_open, exec_close_1, exec_get_section_table)
5429 (exec_xfer_partial, exec_files_info, exec_has_memory)
5430 (exec_make_note_section): Refactor as exec_target methods.
5431 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
5432 Delete.
5433 (exec_target::find_memory_regions): New.
5434 (_initialize_exec): Don't call init_exec_ops.
5435 * gdbcore.h (exec_file_clear): Delete.
5436
5437 * corefile.c (core_target): Delete.
5438 (core_file_command): Adjust.
5439 * corelow.c (core_target): New class.
5440 (the_core_target): New.
5441 (core_close): Remove target_ops parameter.
5442 (core_close_cleanup): Adjust.
5443 (core_target::close): New.
5444 (core_open, core_detach, get_core_registers, core_files_info)
5445 (core_xfer_partial, core_thread_alive, core_read_description)
5446 (core_pid_to_str, core_thread_name, core_has_memory)
5447 (core_has_stack, core_has_registers, core_info_proc): Rework as
5448 core_target methods.
5449 (ignore, core_remove_breakpoint, init_core_ops): Delete.
5450 (_initialize_corelow): Initialize the_core_target.
5451 * gdbcore.h (core_target): Delete.
5452 (the_core_target): New.
5453
5454 * ctf.c: (ctf_target): New class.
5455 (ctf_ops): Now a ctf_target.
5456 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
5457 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
5458 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
5459 methods.
5460 (init_ctf_ops): Delete.
5461 (_initialize_ctf): Don't call it.
5462 * tracefile-tfile.c (tfile_target): New class.
5463 (tfile_ops): Now a tfile_target.
5464 (tfile_open, tfile_close, tfile_files_info)
5465 (tfile_get_tracepoint_status, tfile_trace_find)
5466 (tfile_fetch_registers, tfile_xfer_partial)
5467 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
5468 Refactor as tfile_target methods.
5469 (tfile_xfer_partial_features): Remove target_ops parameter.
5470 (init_tfile_ops): Delete.
5471 (_initialize_tracefile_tfile): Don't call it.
5472 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
5473 (tracefile_has_stack, tracefile_has_registers)
5474 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
5475 tracefile_target methods.
5476 (init_tracefile_ops): Delete.
5477 (tracefile_target::tracefile_target): New.
5478 * tracefile.h: Include "target.h".
5479 (tracefile_target): New class.
5480 (init_tracefile_ops): Delete.
5481
5482 * spu-multiarch.c (spu_multiarch_target): New class.
5483 (spu_ops): Now a spu_multiarch_target.
5484 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
5485 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
5486 (spu_search_memory, spu_mourn_inferior): Refactor as
5487 spu_multiarch_target methods.
5488 (init_spu_ops): Delete.
5489 (_initialize_spu_multiarch): Remove references to init_spu_ops,
5490 complete_target_initialization.
5491
5492 * ravenscar-thread.c (ravenscar_thread_target): New class.
5493 (ravenscar_ops): Now a ravenscar_thread_target.
5494 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
5495 (ravenscar_thread_alive, ravenscar_pid_to_str)
5496 (ravenscar_fetch_registers, ravenscar_store_registers)
5497 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
5498 (ravenscar_stopped_by_hw_breakpoint)
5499 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
5500 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
5501 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
5502 methods.
5503 (init_ravenscar_thread_ops): Delete.
5504 (_initialize_ravenscar): Remove references to
5505 init_ravenscar_thread_ops and complete_target_initialization.
5506
5507 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
5508 (bsd_uthread_target): New class.
5509 (bsd_uthread_ops): Now a bsd_uthread_target.
5510 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
5511 (bsd_uthread_close, bsd_uthread_mourn_inferior)
5512 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
5513 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
5514 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
5515 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
5516 (bsd_uthread_target): Delete function.
5517 (_initialize_bsd_uthread): Remove reference to
5518 complete_target_initialization.
5519
5520 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
5521 (target_bfd): ... this new class.
5522 (target_bfd_xfer_partial, target_bfd_get_section_table)
5523 (target_bfd_close): Refactor as target_bfd methods.
5524 (target_bfd::~target_bfd): New.
5525 (target_bfd_reopen): Adjust.
5526 (target_bfd::close): New.
5527
5528 * record-btrace.c (record_btrace_target): New class.
5529 (record_btrace_ops): Now a record_btrace_target.
5530 (record_btrace_open, record_btrace_stop_recording)
5531 (record_btrace_disconnect, record_btrace_close)
5532 (record_btrace_async, record_btrace_info)
5533 (record_btrace_insn_history, record_btrace_insn_history_range)
5534 (record_btrace_insn_history_from, record_btrace_call_history)
5535 (record_btrace_call_history_range)
5536 (record_btrace_call_history_from, record_btrace_record_method)
5537 (record_btrace_is_replaying, record_btrace_will_replay)
5538 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
5539 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
5540 (record_btrace_store_registers, record_btrace_prepare_to_store)
5541 (record_btrace_to_get_unwinder)
5542 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
5543 (record_btrace_commit_resume, record_btrace_wait)
5544 (record_btrace_stop, record_btrace_can_execute_reverse)
5545 (record_btrace_stopped_by_sw_breakpoint)
5546 (record_btrace_supports_stopped_by_sw_breakpoint)
5547 (record_btrace_stopped_by_hw_breakpoint)
5548 (record_btrace_supports_stopped_by_hw_breakpoint)
5549 (record_btrace_update_thread_list, record_btrace_thread_alive)
5550 (record_btrace_goto_begin, record_btrace_goto_end)
5551 (record_btrace_goto, record_btrace_stop_replaying_all)
5552 (record_btrace_execution_direction)
5553 (record_btrace_prepare_to_generate_core)
5554 (record_btrace_done_generating_core): Refactor as
5555 record_btrace_target methods.
5556 (init_record_btrace_ops): Delete.
5557 (_initialize_record_btrace): Remove reference to
5558 init_record_btrace_ops.
5559 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
5560 the execution_direction global.
5561 (record_full_base_target, record_full_target)
5562 (record_full_core_target): New classes.
5563 (record_full_ops): Now a record_full_target.
5564 (record_full_core_ops): Now a record_full_core_target.
5565 (record_full_target::detach, record_full_target::disconnect)
5566 (record_full_core_target::disconnect)
5567 (record_full_target::mourn_inferior, record_full_target::kill):
5568 New.
5569 (record_full_open, record_full_close, record_full_async): Refactor
5570 as methods of the record_full_base_target class.
5571 (record_full_resume, record_full_commit_resume): Refactor
5572 as methods of the record_full_target class.
5573 (record_full_wait, record_full_stopped_by_watchpoint)
5574 (record_full_stopped_data_address)
5575 (record_full_stopped_by_sw_breakpoint)
5576 (record_full_supports_stopped_by_sw_breakpoint)
5577 (record_full_stopped_by_hw_breakpoint)
5578 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
5579 methods of the record_full_base_target class.
5580 (record_full_store_registers, record_full_xfer_partial)
5581 (record_full_insert_breakpoint, record_full_remove_breakpoint):
5582 Refactor as methods of the record_full_target class.
5583 (record_full_can_execute_reverse, record_full_get_bookmark)
5584 (record_full_goto_bookmark, record_full_execution_direction)
5585 (record_full_record_method, record_full_info, record_full_delete)
5586 (record_full_is_replaying, record_full_will_replay)
5587 (record_full_goto_begin, record_full_goto_end, record_full_goto)
5588 (record_full_stop_replaying): Refactor as methods of the
5589 record_full_base_target class.
5590 (record_full_core_resume, record_full_core_kill)
5591 (record_full_core_fetch_registers)
5592 (record_full_core_prepare_to_store)
5593 (record_full_core_store_registers, record_full_core_xfer_partial)
5594 (record_full_core_insert_breakpoint)
5595 (record_full_core_remove_breakpoint)
5596 (record_full_core_has_execution): Refactor
5597 as methods of the record_full_core_target class.
5598 (record_full_base_target::supports_delete_record): New.
5599 (init_record_full_ops): Delete.
5600 (init_record_full_core_ops): Delete.
5601 (record_full_save): Refactor as method of the
5602 record_full_base_target class.
5603 (_initialize_record_full): Remove references to
5604 init_record_full_ops and init_record_full_core_ops.
5605
5606 * remote.c (remote_target, extended_remote_target): New classes.
5607 (remote_ops): Now a remote_target.
5608 (extended_remote_ops): Now an extended_remote_target.
5609 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
5610 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
5611 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
5612 (remote_pass_signals, remote_set_syscall_catchpoint)
5613 (remote_program_signals, )
5614 (remote_thread_always_alive): Remove target_ops parameter.
5615 (remote_thread_alive, remote_thread_name)
5616 (remote_update_thread_list, remote_threads_extra_info)
5617 (remote_static_tracepoint_marker_at)
5618 (remote_static_tracepoint_markers_by_strid)
5619 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
5620 (remote_open): Refactor as methods of remote_target.
5621 (extended_remote_open, extended_remote_detach)
5622 (extended_remote_attach, extended_remote_post_attach):
5623 (extended_remote_supports_disable_randomization)
5624 (extended_remote_create_inferior): : Refactor as method of
5625 extended_remote_target.
5626 (remote_set_permissions, remote_open_1, remote_detach)
5627 (remote_follow_fork, remote_follow_exec, remote_disconnect)
5628 (remote_resume, remote_commit_resume, remote_stop)
5629 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
5630 (remote_terminal_ours, remote_wait, remote_fetch_registers)
5631 (remote_prepare_to_store, remote_store_registers)
5632 (remote_flash_erase, remote_flash_done, remote_files_info)
5633 (remote_kill, remote_mourn, remote_insert_breakpoint)
5634 (remote_remove_breakpoint, remote_insert_watchpoint)
5635 (remote_watchpoint_addr_within_range)
5636 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
5637 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
5638 (remote_supports_stopped_by_sw_breakpoint)
5639 (remote_stopped_by_hw_breakpoint)
5640 (remote_supports_stopped_by_hw_breakpoint)
5641 (remote_stopped_by_watchpoint, remote_stopped_data_address)
5642 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
5643 (remote_verify_memory): Refactor as methods of remote_target.
5644 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
5645 parameter.
5646 (remote_xfer_partial, remote_get_memory_xfer_limit)
5647 (remote_search_memory, remote_rcmd, remote_memory_map)
5648 (remote_pid_to_str, remote_get_thread_local_address)
5649 (remote_get_tib_address, remote_read_description): Refactor as
5650 methods of remote_target.
5651 (remote_target::fileio_open, remote_target::fileio_pwrite)
5652 (remote_target::fileio_pread, remote_target::fileio_close): New.
5653 (remote_hostio_readlink, remote_hostio_fstat)
5654 (remote_filesystem_is_local, remote_can_execute_reverse)
5655 (remote_supports_non_stop, remote_supports_disable_randomization)
5656 (remote_supports_multi_process, remote_supports_cond_breakpoints)
5657 (remote_supports_enable_disable_tracepoint)
5658 (remote_supports_string_tracing)
5659 (remote_can_run_breakpoint_commands, remote_trace_init)
5660 (remote_download_tracepoint, remote_can_download_tracepoint)
5661 (remote_download_trace_state_variable, remote_enable_tracepoint)
5662 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
5663 (remote_trace_start, remote_get_trace_status)
5664 (remote_get_tracepoint_status, remote_trace_stop)
5665 (remote_trace_find, remote_get_trace_state_variable_value)
5666 (remote_save_trace_data, remote_get_raw_trace_data)
5667 (remote_set_disconnected_tracing, remote_core_of_thread)
5668 (remote_set_circular_trace_buffer, remote_traceframe_info)
5669 (remote_get_min_fast_tracepoint_insn_len)
5670 (remote_set_trace_buffer_size, remote_set_trace_notes)
5671 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
5672 (remote_disable_btrace, remote_teardown_btrace)
5673 (remote_read_btrace, remote_btrace_conf)
5674 (remote_augmented_libraries_svr4_read, remote_load)
5675 (remote_pid_to_exec_file, remote_can_do_single_step)
5676 (remote_execution_direction, remote_thread_handle_to_thread_info):
5677 Refactor as methods of remote_target.
5678 (init_remote_ops, init_extended_remote_ops): Delete.
5679 (remote_can_async_p, remote_is_async_p, remote_async)
5680 (remote_thread_events, remote_upload_tracepoints)
5681 (remote_upload_trace_state_variables): Refactor as methods of
5682 remote_target.
5683 (_initialize_remote): Remove references to init_remote_ops and
5684 init_extended_remote_ops.
5685
5686 * remote-sim.c (gdbsim_target): New class.
5687 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
5688 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
5689 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
5690 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
5691 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
5692 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
5693 Refactor as methods of gdbsim_target.
5694 (gdbsim_ops): Now a gdbsim_target.
5695 (init_gdbsim_ops): Delete.
5696 (gdbsim_cntrl_c): Adjust.
5697 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
5698
5699 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
5700 (the_amd64_linux_nat_target): New.
5701 (amd64_linux_fetch_inferior_registers)
5702 (amd64_linux_store_inferior_registers): Refactor as methods of
5703 amd64_linux_nat_target.
5704 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
5705 * i386-linux-nat.c: Don't include "linux-nat.h".
5706 (i386_linux_nat_target): New class.
5707 (the_i386_linux_nat_target): New.
5708 (i386_linux_fetch_inferior_registers)
5709 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
5710 as methods of i386_linux_nat_target.
5711 (_initialize_i386_linux_nat): Adjust. Set linux_target.
5712 * inf-child.c (inf_child_ops): Delete.
5713 (inf_child_fetch_inferior_registers)
5714 (inf_child_store_inferior_registers): Delete.
5715 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
5716 methods of inf_child_target.
5717 (inf_child_target::supports_terminal_ours)
5718 (inf_child_target::terminal_init)
5719 (inf_child_target::terminal_inferior)
5720 (inf_child_target::terminal_ours_for_output)
5721 (inf_child_target::terminal_ours, inf_child_target::interrupt)
5722 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
5723 New.
5724 (inf_child_open, inf_child_disconnect, inf_child_close)
5725 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
5726 (inf_child_post_startup_inferior, inf_child_can_run)
5727 (inf_child_pid_to_exec_file): Refactor as methods of
5728 inf_child_target.
5729 (inf_child_follow_fork): Delete.
5730 (inf_child_target::can_create_inferior)
5731 (inf_child_target::can_attach): New.
5732 (inf_child_target::has_all_memory, inf_child_target::has_memory)
5733 (inf_child_target::has_stack, inf_child_target::has_registers)
5734 (inf_child_target::has_execution): New.
5735 (inf_child_fileio_open, inf_child_fileio_pwrite)
5736 (inf_child_fileio_pread, inf_child_fileio_fstat)
5737 (inf_child_fileio_close, inf_child_fileio_unlink)
5738 (inf_child_fileio_readlink, inf_child_use_agent)
5739 (inf_child_can_use_agent): Refactor as methods of
5740 inf_child_target.
5741 (return_zero, inf_child_target): Delete.
5742 (inf_child_target::inf_child_target): New.
5743 * inf-child.h: Include "target.h".
5744 (inf_child_target): Delete function prototype.
5745 (inf_child_target): New class.
5746 (inf_child_open_target, inf_child_mourn_inferior)
5747 (inf_child_maybe_unpush_target): Delete.
5748 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
5749 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
5750 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
5751 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
5752 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
5753 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
5754 (inf_ptrace_wait, inf_ptrace_xfer_partial)
5755 (inf_ptrace_thread_alive, inf_ptrace_files_info)
5756 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
5757 methods of inf_ptrace_target.
5758 (inf_ptrace_target): Delete function.
5759 * inf-ptrace.h: Include "inf-child.h".
5760 (inf_ptrace_target): Delete function declaration.
5761 (inf_ptrace_target): New class.
5762 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
5763 * linux-nat.c (linux_target): New.
5764 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
5765 (linux_nat_target::~linux_nat_target): New.
5766 (linux_child_post_attach, linux_child_post_startup_inferior)
5767 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
5768 (linux_child_remove_fork_catchpoint)
5769 (linux_child_insert_vfork_catchpoint)
5770 (linux_child_remove_vfork_catchpoint)
5771 (linux_child_insert_exec_catchpoint)
5772 (linux_child_remove_exec_catchpoint)
5773 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
5774 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
5775 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
5776 (linux_nat_stopped_data_address)
5777 (linux_nat_stopped_by_sw_breakpoint)
5778 (linux_nat_supports_stopped_by_sw_breakpoint)
5779 (linux_nat_stopped_by_hw_breakpoint)
5780 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
5781 (linux_nat_kill, linux_nat_mourn_inferior)
5782 (linux_nat_xfer_partial, linux_nat_thread_alive)
5783 (linux_nat_update_thread_list, linux_nat_pid_to_str)
5784 (linux_nat_thread_name, linux_child_pid_to_exec_file)
5785 (linux_child_static_tracepoint_markers_by_strid)
5786 (linux_nat_is_async_p, linux_nat_can_async_p)
5787 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
5788 (linux_nat_supports_multi_process)
5789 (linux_nat_supports_disable_randomization, linux_nat_async)
5790 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
5791 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
5792 (linux_nat_fileio_open, linux_nat_fileio_readlink)
5793 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
5794 methods of linux_nat_target.
5795 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
5796 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
5797 parameter.
5798 (check_stopped_by_watchpoint): Adjust.
5799 (linux_xfer_partial): Delete.
5800 (linux_target_install_ops, linux_target, linux_nat_add_target):
5801 Delete.
5802 (linux_nat_target::linux_nat_target): New.
5803 * linux-nat.h: Include "inf-ptrace.h".
5804 (linux_nat_target): New.
5805 (linux_target, linux_target_install_ops, linux_nat_add_target):
5806 Delete function declarations.
5807 (linux_target): Declare global.
5808 * linux-thread-db.c (thread_db_target): New.
5809 (thread_db_target::thread_db_target): New.
5810 (thread_db_ops): Delete.
5811 (the_thread_db_target): New.
5812 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
5813 (thread_db_update_thread_list, thread_db_pid_to_str)
5814 (thread_db_extra_thread_info)
5815 (thread_db_thread_handle_to_thread_info)
5816 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
5817 (thread_db_resume): Refactor as methods of thread_db_target.
5818 (init_thread_db_ops): Delete.
5819 (_initialize_thread_db): Remove reference to init_thread_db_ops.
5820 * x86-linux-nat.c: Don't include "linux-nat.h".
5821 (super_post_startup_inferior): Delete.
5822 (x86_linux_nat_target::~x86_linux_nat_target): New.
5823 (x86_linux_child_post_startup_inferior)
5824 (x86_linux_read_description, x86_linux_enable_btrace)
5825 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
5826 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
5827 methods of x86_linux_nat_target.
5828 (x86_linux_create_target): Delete. Bits folded ...
5829 (x86_linux_add_target): ... here. Now takes a linux_nat_target
5830 pointer.
5831 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
5832 (x86_linux_nat_target): New class.
5833 (x86_linux_create_target): Delete.
5834 (x86_linux_add_target): Now takes a linux_nat_target pointer.
5835 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
5836 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
5837 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
5838 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
5839 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
5840 make extern.
5841 (x86_use_watchpoints): Delete.
5842 * x86-nat.h: Include "breakpoint.h" and "target.h".
5843 (x86_use_watchpoints): Delete.
5844 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
5845 (x86_stopped_by_watchpoint, x86_stopped_data_address)
5846 (x86_insert_watchpoint, x86_remove_watchpoint)
5847 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
5848 (x86_stopped_by_hw_breakpoint): New declarations.
5849 (x86_nat_target): New template class.
5850
5851 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
5852 (the_ppc_linux_nat_target): New.
5853 (ppc_linux_fetch_inferior_registers)
5854 (ppc_linux_can_use_hw_breakpoint)
5855 (ppc_linux_region_ok_for_hw_watchpoint)
5856 (ppc_linux_ranged_break_num_registers)
5857 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
5858 (ppc_linux_insert_mask_watchpoint)
5859 (ppc_linux_remove_mask_watchpoint)
5860 (ppc_linux_can_accel_watchpoint_condition)
5861 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
5862 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
5863 (ppc_linux_watchpoint_addr_within_range)
5864 (ppc_linux_masked_watch_num_registers)
5865 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
5866 (ppc_linux_read_description): Refactor as methods of
5867 ppc_linux_nat_target.
5868 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
5869
5870 * procfs.c (procfs_xfer_partial): Delete forward declaration.
5871 (procfs_target): New class.
5872 (the_procfs_target): New.
5873 (procfs_target): Delete function.
5874 (procfs_auxv_parse, procfs_attach, procfs_detach)
5875 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
5876 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
5877 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
5878 (procfs_create_inferior, procfs_update_thread_list)
5879 (procfs_thread_alive, procfs_pid_to_str)
5880 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
5881 (procfs_stopped_data_address, procfs_insert_watchpoint)
5882 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
5883 (proc_find_memory_regions, procfs_info_proc)
5884 (procfs_make_note_section): Refactor as methods of procfs_target.
5885 (_initialize_procfs): Adjust.
5886 * sol-thread.c (sol_thread_target): New class.
5887 (sol_thread_ops): Now a sol_thread_target.
5888 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
5889 (sol_thread_fetch_registers, sol_thread_store_registers)
5890 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
5891 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
5892 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
5893 (init_sol_thread_ops): Delete.
5894 (_initialize_sol_thread): Adjust. Remove references to
5895 init_sol_thread_ops and complete_target_initialization.
5896
5897 * windows-nat.c (windows_nat_target): New class.
5898 (windows_fetch_inferior_registers)
5899 (windows_store_inferior_registers, windows_resume, windows_wait)
5900 (windows_attach, windows_detach, windows_pid_to_exec_file)
5901 (windows_files_info, windows_create_inferior)
5902 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
5903 (windows_close, windows_pid_to_str, windows_xfer_partial)
5904 (windows_get_tib_address, windows_get_ada_task_ptid)
5905 (windows_thread_name, windows_thread_alive): Refactor as
5906 windows_nat_target methods.
5907 (do_initial_windows_stuff): Adjust.
5908 (windows_target): Delete function.
5909 (_initialize_windows_nat): Adjust.
5910
5911 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
5912 (darwin_mourn_inferior, darwin_kill_inferior)
5913 (darwin_create_inferior, darwin_attach, darwin_detach)
5914 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
5915 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
5916 (darwin_supports_multi_process): Refactor as darwin_nat_target
5917 methods.
5918 (darwin_resume_to, darwin_files_info): Delete.
5919 (_initialize_darwin_inferior): Rename to ...
5920 (_initialize_darwin_nat): ... this. Adjust to C++ification.
5921 * darwin-nat.h: Include "inf-child.h".
5922 (darwin_nat_target): New class.
5923 (darwin_complete_target): Delete.
5924 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
5925 (darwin_target): New.
5926 (i386_darwin_fetch_inferior_registers)
5927 (i386_darwin_store_inferior_registers): Refactor as methods of
5928 darwin_nat_target.
5929 (darwin_complete_target): Delete, with ...
5930 (_initialize_i386_darwin_nat): ... bits factored out here.
5931
5932 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
5933 (the_alpha_linux_nat_target): New.
5934 (alpha_linux_register_u_offset): Refactor as
5935 alpha_linux_nat_target method.
5936 (_initialize_alpha_linux_nat): Adjust.
5937 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
5938 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
5939 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
5940 methods of linux_nat_trad_target.
5941 (linux_trad_target): Delete.
5942 * linux-nat-trad.h (linux_trad_target): Delete function.
5943 (linux_nat_trad_target): New class.
5944 * mips-linux-nat.c (mips_linux_nat_target): New class.
5945 (super_fetch_registers, super_store_registers, super_close):
5946 Delete.
5947 (the_mips_linux_nat_target): New.
5948 (mips64_linux_regsets_fetch_registers)
5949 (mips64_linux_regsets_store_registers)
5950 (mips64_linux_fetch_registers, mips64_linux_store_registers)
5951 (mips_linux_register_u_offset, mips_linux_read_description)
5952 (mips_linux_can_use_hw_breakpoint)
5953 (mips_linux_stopped_by_watchpoint)
5954 (mips_linux_stopped_data_address)
5955 (mips_linux_region_ok_for_hw_watchpoint)
5956 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
5957 (mips_linux_close): Refactor as methods of mips_linux_nat.
5958 (_initialize_mips_linux_nat): Adjust to C++ification.
5959
5960 * aix-thread.c (aix_thread_target): New class.
5961 (aix_thread_ops): Now an aix_thread_target.
5962 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
5963 (aix_thread_fetch_registers, aix_thread_store_registers)
5964 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
5965 (aix_thread_thread_alive, aix_thread_pid_to_str)
5966 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
5967 Refactor as methods of aix_thread_target.
5968 (init_aix_thread_ops): Delete.
5969 (_initialize_aix_thread): Remove references to init_aix_thread_ops
5970 and complete_target_initialization.
5971 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
5972 (rs6000_nat_target): New class.
5973 (the_rs6000_nat_target): New.
5974 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
5975 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
5976 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
5977 (super_create_inferior): Delete.
5978 (_initialize_rs6000_nat): Adjust to C++ification.
5979
5980 * arm-linux-nat.c (arm_linux_nat_target): New class.
5981 (the_arm_linux_nat_target): New.
5982 (arm_linux_fetch_inferior_registers)
5983 (arm_linux_store_inferior_registers, arm_linux_read_description)
5984 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
5985 (arm_linux_remove_hw_breakpoint)
5986 (arm_linux_region_ok_for_hw_watchpoint)
5987 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
5988 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
5989 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
5990 arm_linux_nat_target.
5991 (_initialize_arm_linux_nat): Adjust to C++ification.
5992
5993 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
5994 (the_aarch64_linux_nat_target): New.
5995 (aarch64_linux_fetch_inferior_registers)
5996 (aarch64_linux_store_inferior_registers)
5997 (aarch64_linux_child_post_startup_inferior)
5998 (aarch64_linux_read_description)
5999 (aarch64_linux_can_use_hw_breakpoint)
6000 (aarch64_linux_insert_hw_breakpoint)
6001 (aarch64_linux_remove_hw_breakpoint)
6002 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
6003 (aarch64_linux_region_ok_for_hw_watchpoint)
6004 (aarch64_linux_stopped_data_address)
6005 (aarch64_linux_stopped_by_watchpoint)
6006 (aarch64_linux_watchpoint_addr_within_range)
6007 (aarch64_linux_can_do_single_step): Refactor as methods of
6008 aarch64_linux_nat_target.
6009 (super_post_startup_inferior): Delete.
6010 (_initialize_aarch64_linux_nat): Adjust to C++ification.
6011
6012 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
6013 (the_hppa_linux_nat_target): New.
6014 (hppa_linux_fetch_inferior_registers)
6015 (hppa_linux_store_inferior_registers): Refactor as methods of
6016 hppa_linux_nat_target.
6017 (_initialize_hppa_linux_nat): Adjust to C++ification.
6018
6019 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
6020 (the_ia64_linux_nat_target): New.
6021 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
6022 (ia64_linux_stopped_data_address)
6023 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
6024 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
6025 ia64_linux_nat_target methods.
6026 (super_xfer_partial): Delete.
6027 (_initialize_ia64_linux_nat): Adjust to C++ification.
6028
6029 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
6030 (the_m32r_linux_nat_target): New.
6031 (m32r_linux_fetch_inferior_registers)
6032 (m32r_linux_store_inferior_registers): Refactor as
6033 m32r_linux_nat_target methods.
6034 (_initialize_m32r_linux_nat): Adjust to C++ification.
6035
6036 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
6037 (the_m68k_linux_nat_target): New.
6038 (m68k_linux_fetch_inferior_registers)
6039 (m68k_linux_store_inferior_registers): Refactor as
6040 m68k_linux_nat_target methods.
6041 (_initialize_m68k_linux_nat): Adjust to C++ification.
6042
6043 * s390-linux-nat.c (s390_linux_nat_target): New class.
6044 (the_s390_linux_nat_target): New.
6045 (s390_linux_fetch_inferior_registers)
6046 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
6047 (s390_insert_watchpoint, s390_remove_watchpoint)
6048 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
6049 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
6050 (s390_auxv_parse, s390_read_description): Refactor as methods of
6051 s390_linux_nat_target.
6052 (_initialize_s390_nat): Adjust to C++ification.
6053
6054 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
6055 (the_sparc_linux_nat_target): New.
6056 (_initialize_sparc_linux_nat): Adjust to C++ification.
6057 * sparc-nat.c (sparc_fetch_inferior_registers)
6058 (sparc_store_inferior_registers): Remove target_ops parameter.
6059 * sparc-nat.h (sparc_fetch_inferior_registers)
6060 (sparc_store_inferior_registers): Remove target_ops parameter.
6061 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
6062 (the_sparc64_linux_nat_target): New.
6063 (_initialize_sparc64_linux_nat): Adjust to C++ification.
6064
6065 * spu-linux-nat.c (spu_linux_nat_target): New class.
6066 (the_spu_linux_nat_target): New.
6067 (spu_child_post_startup_inferior, spu_child_post_attach)
6068 (spu_child_wait, spu_fetch_inferior_registers)
6069 (spu_store_inferior_registers, spu_xfer_partial)
6070 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
6071 methods.
6072 (_initialize_spu_nat): Adjust to C++ification.
6073
6074 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
6075 (the_tilegx_linux_nat_target): New.
6076 (fetch_inferior_registers, store_inferior_registers):
6077 Refactor as methods.
6078 (_initialize_tile_linux_nat): Adjust to C++ification.
6079
6080 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
6081 (the_xtensa_linux_nat_target): New.
6082 (xtensa_linux_fetch_inferior_registers)
6083 (xtensa_linux_store_inferior_registers): Refactor as
6084 xtensa_linux_nat_target methods.
6085 (_initialize_xtensa_linux_nat): Adjust to C++ification.
6086
6087 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
6088 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
6089 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
6090 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
6091 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
6092 (fbsd_stopped_by_sw_breakpoint)
6093 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
6094 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
6095 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
6096 (fbsd_post_startup_inferior, fbsd_post_attach)
6097 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
6098 (fbsd_set_syscall_catchpoint)
6099 (super_xfer_partial, super_resume, super_wait)
6100 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
6101 (fbsd_handle_debug_trap): Remove target_ops parameter.
6102 (fbsd_nat_add_target): Delete.
6103 * fbsd-nat.h: Include "inf-ptrace.h".
6104 (fbsd_nat_add_target): Delete.
6105 (USE_SIGTRAP_SIGINFO): Define.
6106 (fbsd_nat_target): New class.
6107
6108 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
6109 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
6110 (amd64bsd_target): Delete.
6111 * amd64-bsd-nat.h: New file.
6112 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
6113 "x86-bsd-nat.h".
6114 (amd64_fbsd_nat_target): New class.
6115 (the_amd64_fbsd_nat_target): New.
6116 (amd64fbsd_read_description): Refactor as method of
6117 amd64_fbsd_nat_target.
6118 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6119 (_initialize_amd64fbsd_nat): Adjust to C++ification.
6120 * amd64-nat.h (amd64bsd_target): Delete function declaration.
6121 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
6122 (i386bsd_store_inferior_registers): Remove target_ops parameter.
6123 (i386bsd_target): Delete.
6124 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
6125 (i386bsd_fetch_inferior_registers)
6126 (i386bsd_store_inferior_registers): Declare.
6127 (i386_bsd_nat_target): New class.
6128 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
6129 (the_i386_fbsd_nat_target): New.
6130 (i386fbsd_resume, i386fbsd_read_description): Refactor as
6131 i386_fbsd_nat_target methods.
6132 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6133 (_initialize_i386fbsd_nat): Adjust to C++ification.
6134 * x86-bsd-nat.c (super_mourn_inferior): Delete.
6135 (x86bsd_mourn_inferior, x86bsd_target): Delete.
6136 (_initialize_x86_bsd_nat): Adjust to C++ification.
6137 * x86-bsd-nat.h: Include "x86-nat.h".
6138 (x86bsd_target): Delete declaration.
6139 (x86bsd_nat_target): New class.
6140
6141 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
6142 (the_aarch64_fbsd_nat_target): New.
6143 (aarch64_fbsd_fetch_inferior_registers)
6144 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
6145 aarch64_fbsd_nat_target.
6146 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
6147 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
6148 (the_alpha_bsd_nat_target): New.
6149 (alphabsd_fetch_inferior_registers)
6150 (alphabsd_store_inferior_registers): Refactor as
6151 alpha_bsd_nat_target methods.
6152 (_initialize_alphabsd_nat): Refactor as methods of
6153 alpha_bsd_nat_target.
6154 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
6155 (the_amd64_nbsd_nat_target): New.
6156 (_initialize_amd64nbsd_nat): Adjust to C++ification.
6157 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
6158 (the_amd64_obsd_nat_target): New.
6159 (_initialize_amd64obsd_nat): Adjust to C++ification.
6160 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
6161 (the_arm_fbsd_nat_target): New.
6162 (arm_fbsd_fetch_inferior_registers)
6163 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
6164 (_initialize_arm_fbsd_nat): Refactor as methods of
6165 arm_fbsd_nat_target.
6166 (_initialize_arm_fbsd_nat): Adjust to C++ification.
6167 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
6168 (the_arm_netbsd_nat_target): New.
6169 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
6170 arm_netbsd_nat_target.
6171 (_initialize_arm_netbsd_nat): Adjust to C++ification.
6172 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
6173 (the_hppa_nbsd_nat_target): New.
6174 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
6175 hppa_nbsd_nat_target methods.
6176 (_initialize_hppanbsd_nat): Adjust to C++ification.
6177 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
6178 (the_hppa_obsd_nat_target): New.
6179 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
6180 methods of hppa_obsd_nat_target.
6181 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
6182 add_target.
6183 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
6184 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
6185 add_target.
6186 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
6187 (_initialize_i386obsd_nat): Use add_target.
6188 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
6189 (the_m68k_bsd_nat_target): New.
6190 (m68kbsd_fetch_inferior_registers)
6191 (m68kbsd_store_inferior_registers): Refactor as methods of
6192 m68k_bsd_nat_target.
6193 (_initialize_m68kbsd_nat): Adjust to C++ification.
6194 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
6195 (the_mips_fbsd_nat_target): New.
6196 (mips_fbsd_fetch_inferior_registers)
6197 (mips_fbsd_store_inferior_registers): Refactor as methods of
6198 mips_fbsd_nat_target.
6199 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
6200 add_target.
6201 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
6202 (the_mips_nbsd_nat_target): New.
6203 (mipsnbsd_fetch_inferior_registers)
6204 (mipsnbsd_store_inferior_registers): Refactor as methods of
6205 mips_nbsd_nat_target.
6206 (_initialize_mipsnbsd_nat): Adjust to C++ification.
6207 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
6208 (the_mips64_obsd_nat_target): New.
6209 (mips64obsd_fetch_inferior_registers)
6210 (mips64obsd_store_inferior_registers): Refactor as methods of
6211 mips64_obsd_nat_target.
6212 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
6213 add_target.
6214 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
6215 nbsd_nat_target.
6216 * nbsd-nat.h: Include "inf-ptrace.h".
6217 (nbsd_nat_target): New class.
6218 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
6219 (obsd_wait): Refactor as methods of obsd_nat_target.
6220 (obsd_add_target): Delete.
6221 * obsd-nat.h: Include "inf-ptrace.h".
6222 (obsd_nat_target): New class.
6223 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
6224 (the_ppc_fbsd_nat_target): New.
6225 (ppcfbsd_fetch_inferior_registers)
6226 (ppcfbsd_store_inferior_registers): Refactor as methods of
6227 ppc_fbsd_nat_target.
6228 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
6229 add_target.
6230 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
6231 (the_ppc_nbsd_nat_target): New.
6232 (ppcnbsd_fetch_inferior_registers)
6233 (ppcnbsd_store_inferior_registers): Refactor as methods of
6234 ppc_nbsd_nat_target.
6235 (_initialize_ppcnbsd_nat): Adjust to C++ification.
6236 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
6237 (the_ppc_obsd_nat_target): New.
6238 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
6239 methods of ppc_obsd_nat_target.
6240 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
6241 add_target.
6242 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
6243 (the_sh_nbsd_nat_target): New.
6244 (shnbsd_fetch_inferior_registers)
6245 (shnbsd_store_inferior_registers): Refactor as methods of
6246 sh_nbsd_nat_target.
6247 (_initialize_shnbsd_nat): Adjust to C++ification.
6248 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
6249 (inf_ptrace_xfer_partial): Delete.
6250 (sparc_xfer_partial, sparc_target): Delete.
6251 * sparc-nat.h (sparc_fetch_inferior_registers)
6252 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
6253 (sparc_target): Delete function declaration.
6254 (sparc_target): New template class.
6255 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
6256 (_initialize_sparcnbsd_nat): Adjust to C++ification.
6257 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
6258 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
6259 add_target.
6260 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
6261 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
6262 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
6263 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
6264 add_target.
6265 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
6266 (the_vax_bsd_nat_target): New.
6267 (vaxbsd_fetch_inferior_registers)
6268 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
6269 methods.
6270 (_initialize_vaxbsd_nat): Adjust to C++ification.
6271
6272 * bsd-kvm.c (bsd_kvm_target): New class.
6273 (bsd_kvm_ops): Now a bsd_kvm_target.
6274 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
6275 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
6276 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
6277 bsd_kvm_target.
6278 (bsd_kvm_return_one): Delete.
6279 (bsd_kvm_add_target): Adjust to C++ification.
6280
6281 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
6282 (nto_procfs_target_procfs): New classes.
6283 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
6284 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
6285 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
6286 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
6287 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
6288 (procfs_remove_hw_breakpoint, procfs_resume)
6289 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
6290 (procfs_kill_inferior, procfs_store_registers)
6291 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
6292 as methods of nto_procfs_target.
6293 (nto_procfs_ops): Now an nto_procfs_target_procfs.
6294 (nto_native_ops): Delete.
6295 (procfs_open, procfs_native_open): Delete.
6296 (nto_native_ops): Now an nto_procfs_target_native.
6297 (init_procfs_targets): Adjust to C++ification.
6298 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
6299 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
6300 Refactor as methods of nto_procfs_target.
6301
6302 * go32-nat.c (go32_nat_target): New class.
6303 (the_go32_nat_target): New.
6304 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
6305 (go32_store_registers, go32_xfer_partial, go32_files_info)
6306 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
6307 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
6308 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
6309 (go32_pid_to_str): Refactor as methods of go32_nat_target.
6310 (go32_target): Delete.
6311 (_initialize_go32_nat): Adjust to C++ification.
6312
6313 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
6314 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
6315 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
6316 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
6317 gnu_nat_target.
6318 (gnu_target): Delete.
6319 * gnu-nat.h (gnu_target): Delete.
6320 (gnu_nat_target): New class.
6321 * i386-gnu-nat.c (gnu_base_target): New.
6322 (i386_gnu_nat_target): New class.
6323 (the_i386_gnu_nat_target): New.
6324 (_initialize_i386gnu_nat): Adjust to C++ification.
6325
6326 2018-05-02 Pedro Alves <palves@redhat.com>
6327
6328 * bfd-target.c (target_bfd_xclose): Rename to ...
6329 (target_bfd_close): ... this.
6330 (target_bfd_reopen): Adjust.
6331 * target.c (target_close): Remove references to to_xclose.
6332 * target.h (target_ops::to_xclose): Delete.
6333 (target_ops::to_close): Update comments.
6334
6335 2018-05-02 Pedro Alves <palves@redhat.com>
6336
6337 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
6338 "linux-nat.h".
6339 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
6340 * inf-ptrace.c (inf_ptrace_register_u_offset)
6341 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6342 (inf_ptrace_store_register, inf_ptrace_store_registers)
6343 (inf_ptrace_trad_target): Move to ...
6344 * linux-nat-trad.c: ... this new file.
6345 * linux-nat-trad.h: New file.
6346 * linux-nat.c (linux_target_install_ops): Make extern.
6347 (linux_trad_target): Delete.
6348 * linux-nat.h (linux_trad_target): Delete declaration.
6349 (linux_target_install_ops): Declare.
6350 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
6351 "linux-nat.h".
6352
6353 2018-05-02 Pedro Alves <palves@redhat.com>
6354
6355 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6356 procfs_target/add_target here.
6357 * procfs.c (procfs_target): Make static.
6358 (_initialize_procfs): Call add_target here.
6359 * procfs.h (struct target_ops): Remove forward declaration.
6360 (procfs_target): Remove declaration.
6361 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
6362
6363 2018-05-02 Pedro Alves <palves@redhat.com>
6364
6365 * procfs.c (procfs_stopped_by_watchpoint)
6366 (procfs_insert_watchpoint, procfs_remove_watchpoint)
6367 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
6368 Forward declare.
6369 (procfs_use_watchpoints): Delete, move contents...
6370 (procfs_target): ... here.
6371 * procfs.h (procfs_use_watchpoints): Delete declaration.
6372 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6373 procfs_use_watchpoints.
6374 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
6375 procfs_use_watchpoints.
6376
6377 2018-05-02 Tom Tromey <tom@tromey.com>
6378
6379 PR python/20084:
6380 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
6381 and var_zuinteger_unlimited.
6382 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
6383 and PARAM_ZUINTEGER_UNLIMITED.
6384 (set_parameter_value): Handle var_zuinteger and
6385 var_zuinteger_unlimited.
6386 (add_setshow_generic): Likewise.
6387 (parmpy_init): Likewise.
6388
6389 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
6390
6391 PR rust/23124
6392 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
6393 pointer is not null before dereferencing it.
6394
6395 2018-04-30 Tom Tromey <tom@tromey.com>
6396
6397 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
6398 is_mi_like_p.
6399
6400 2018-04-30 Tom Tromey <tom@tromey.com>
6401
6402 * breakpoint.c (mention): Remove use of is_mi_like_p.
6403 (print_mention_ranged_breakpoint): Likewise.
6404 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
6405 of is_mi_like_p.
6406
6407 2018-04-30 Tom Tromey <tom@tromey.com>
6408
6409 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
6410
6411 2018-04-30 Tom Tromey <tom@tromey.com>
6412
6413 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
6414 (info_spu_event_command): Remove some uses of is_mi_like_p.
6415
6416 2018-04-30 Tom Tromey <tom@tromey.com>
6417
6418 * python/py-framefilter.c (py_print_single_arg)
6419 (enumerate_locals, py_print_args, py_print_frame): Remove some
6420 uses of is_mi_like_p.
6421
6422 2018-04-30 Tom Tromey <tom@tromey.com>
6423
6424 * ui-out.c: Update.
6425 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
6426 * ui-out.h (ui_out::is_mi_like_p): Now const.
6427 (ui_out::do_is_mi_like_p): Now const.
6428 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
6429
6430 2018-04-30 Tom Tromey <tom@tromey.com>
6431
6432 * varobj.c (varobj_set_visualizer): Use new_reference.
6433 * python/python.c (gdbpy_decode_line): Use new_reference.
6434 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
6435 new_reference.
6436
6437 2018-04-30 Tom Tromey <tom@tromey.com>
6438
6439 * varobj.c (install_new_value): Use new_reference.
6440 * value.h (value_incref): Return void. Swap intro comment with
6441 value_decref.
6442 * value.c (set_value_parent): Use new_reference.
6443 (value_incref): Return void. Update intro comment.
6444 (release_value): Use new_reference.
6445 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
6446
6447 2018-04-30 Tom Tromey <tom@tromey.com>
6448
6449 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
6450 * gdb_bfd.h (new_bfd_ref): Remove.
6451 (gdb_bfd_open): Update comment.
6452 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
6453 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
6454 (gdb_bfd_fdopenr): Use new_reference.
6455 * exec.c (exec_file_attach): Use new_reference.
6456
6457 2018-04-30 Tom Tromey <tom@tromey.com>
6458
6459 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
6460 method.
6461
6462 2018-04-30 Tom Tromey <tom@tromey.com>
6463
6464 * jit.c (jit_read_code_entry): Use type_align.
6465 * i386-tdep.c (i386_gdbarch_init): Don't call
6466 set_gdbarch_long_long_align_bit.
6467 * gdbarch.sh: Remove long_long_align_bit.
6468 * gdbarch.c, gdbarch.h: Rebuild.
6469 * arc-tdep.c (arc_type_align): New function.
6470 (arc_gdbarch_init): Use arc_type_align. Don't call
6471 set_gdbarch_long_long_align_bit.
6472
6473 2018-04-30 Tom Tromey <tom@tromey.com>
6474
6475 * rust-lang.c (rust_type_alignment): Remove.
6476 (rust_composite_type): Use type_align.
6477
6478 2018-04-30 Tom Tromey <tom@tromey.com>
6479
6480 * NEWS: Mention Type.align.
6481 * python/py-type.c (typy_get_alignof): New function.
6482 (type_object_getset): Add "alignof".
6483
6484 2018-04-30 Tom Tromey <tom@tromey.com>
6485
6486 PR exp/17095:
6487 * NEWS: Update.
6488 * std-operator.def (UNOP_ALIGNOF): New operator.
6489 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
6490 New.
6491 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
6492 * c-lang.c (c_op_print_tab): Add alignof.
6493 * c-exp.y (ALIGNOF): New token.
6494 (exp): Add "ALIGNOF" production.
6495 (ident_tokens): Add _Alignof and alignof.
6496
6497 2018-04-30 Tom Tromey <tom@tromey.com>
6498
6499 * i386-tdep.c (i386_type_align): New function.
6500 (i386_gdbarch_init): Update.
6501 * gdbarch.sh (type_align): New method.
6502 * gdbarch.c, gdbarch.h: Rebuild.
6503 * arch-utils.h (default_type_align): Declare.
6504 * arch-utils.c (default_type_align): New function.
6505 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
6506 (struct type) <align_log2>: New field.
6507 <instance_flags>: Now a bitfield.
6508 (TYPE_RAW_ALIGN): New macro.
6509 (type_align, type_raw_align, set_type_align): Declare.
6510 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
6511 functions.
6512 * dwarf2read.c (quirk_rust_enum): Set type alignment.
6513 (get_alignment, maybe_set_alignment): New functions.
6514 (read_structure_type, read_enumeration_type, read_array_type)
6515 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
6516 (read_subrange_type, read_base_type): Set type alignment.
6517
6518 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
6519
6520 * dwarf2read.c (read_index_from_section): Use bool.
6521
6522 2018-04-29 Fabian Groffen <grobian@gentoo.org>
6523
6524 PR gdb/22950
6525 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
6526 with #ifdef.
6527
6528 2018-04-29 John Reiser <jreiser@BitWagon.com>
6529
6530 PR build/22873
6531 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
6532 last step, and do it atomically.
6533
6534 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
6535
6536 * compile/compile-c-types.c (convert_int, convert_float):
6537 Update for C FE v1.
6538
6539 2018-04-27 Tom Tromey <tom@tromey.com>
6540
6541 PR rust/22545:
6542 * rust-lang.c (rust_inclusive_range_type_p): New function.
6543 (rust_range): Handle inclusive ranges.
6544 (rust_compute_range): Likewise.
6545 * rust-exp.y (struct rust_op) <inclusive>: New field.
6546 (DOTDOTEQ): New constant.
6547 (range_expr): Add "..=" productions.
6548 (operator_tokens): Add "..=" token.
6549 (ast_range): Add "inclusive" parameter.
6550 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
6551 ranges.
6552 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
6553 bounds values.
6554 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
6555 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
6556 Update comments.
6557 * expprint.c (print_subexp_standard): Handle new bounds values.
6558 (dump_subexp_body_standard): Likewise.
6559
6560 2018-04-27 Tom Tromey <tom@tromey.com>
6561
6562 * configure: Rebuild.
6563 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
6564 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
6565 "OVERRIDE".
6566 (class symbol_needs_eval_context): Likewise.
6567 * dwarf2read.c (mock_mapped_index::symbol_name_count)
6568 (mock_mapped_index::symbol_name_at): Use "override". Remove
6569 "virtual".
6570 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
6571 "override".
6572 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
6573 * aarch64-tdep.c (instruction_reader::read): Use "override".
6574 (instruction_reader_test::read): Likewise.
6575 * arm-tdep.c (instruction_reader::read): Use "override".
6576 (instruction_reader_thumb::read): Likewise.
6577
6578 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
6579
6580 PR remote/9665
6581 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
6582 instead of remote_send.
6583 (remote_send): Remove.
6584
6585 2018-04-26 Pedro Alves <palves@redhat.com>
6586
6587 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
6588 find_function_start_sal instead of find_pc_line.
6589
6590 2018-04-26 Pedro Alves <palves@redhat.com>
6591
6592 * breakpoint.c (set_breakpoint_location_function): Handle
6593 mst_data_gnu_ifunc.
6594 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
6595 * elfread.c (elf_symtab_read): Give data symbols with
6596 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
6597 (elf_rel_plt_read): Update comment.
6598 * linespec.c (convert_linespec_to_sals): Handle
6599 mst_data_gnu_ifunc.
6600 (minsym_found): Handle mst_data_gnu_ifunc.
6601 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
6602 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
6603 * parse.c (find_minsym_type_and_address): Handle
6604 mst_data_gnu_ifunc.
6605 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
6606 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
6607 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
6608 comment.
6609 <mst_data_gnu_ifunc>: New enumerator.
6610
6611 2018-04-26 Pedro Alves <palves@redhat.com>
6612
6613 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
6614 (lookup_minimal_symbol_by_pc_section): ... this. Replace
6615 'want_trampoline' parameter by a lookup_msym_prefer parameter.
6616 Handle it.
6617 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
6618 (lookup_minimal_symbol_by_pc): Adjust.
6619 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
6620 (lookup_solib_trampoline_symbol_by_pc): Adjust.
6621 * minsyms.h (lookup_msym_prefer): New enum.
6622 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
6623 parameter by a lookup_msym_prefer parameter.
6624
6625 2018-04-26 Pedro Alves <palves@redhat.com>
6626
6627 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
6628 ends in "@plt" instead of looking at the symbol's section.
6629
6630 2018-04-26 Pedro Alves <palves@redhat.com>
6631
6632 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
6633 all references.
6634 (find_pc_partial_function_gnu_ifunc): Rename to ...
6635 (find_pc_partial_function): ... this, and remove references to
6636 'is_gnu_ifunc_p'.
6637 (find_pc_partial_function): Delete old implementation.
6638 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
6639
6640 2018-04-26 Pedro Alves <palves@redhat.com>
6641
6642 * linespec.c (struct bound_minimal_symbol_search_key): New.
6643 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
6644 skip first line if we found a GNU ifunc minimal symbol by name.
6645 (compare_msymbols): Change parameters to work with a destructured
6646 lhs minsym.
6647 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
6648 functions.
6649
6650 2018-04-26 Pedro Alves <palves@redhat.com>
6651
6652 * breakpoint.c (set_breakpoint_location_function): Don't resolve
6653 ifunc targets here. Instead, if we have an ifunc minsym, use its
6654 address/name.
6655 (add_location_to_breakpoint): Store the minsym and the objfile in
6656 the breakpoint location.
6657 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
6658 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
6659 Record the minsym in the sal.
6660 * symtab.h (symtab_and_line) <msymbol>: New field.
6661
6662 2018-04-26 Pedro Alves <palves@redhat.com>
6663
6664 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
6665 unless we actually resolved the ifunc.
6666
6667 2018-04-26 Pedro Alves <palves@redhat.com>
6668
6669 * c-exp.y (variable production): Prefer ifunc minsyms over
6670 regular function symbols.
6671 * symtab.c (find_gnu_ifunc): New function.
6672 * minsyms.h (lookup_msym_prefer): New enum.
6673 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
6674 parameter by a lookup_msym_prefer parameter.
6675 * symtab.h (find_gnu_ifunc): New declaration.
6676
6677 2018-04-26 Pedro Alves <palves@redhat.com>
6678
6679 * blockframe.c (find_gnu_ifunc_target_type): New function.
6680 (find_function_type): New.
6681 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
6682 return a value with a memory address.
6683 (eval_call): For calls to GNU ifunc functions, try to find the
6684 type of the target function from the type that the resolver
6685 returns.
6686 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
6687 symbols.
6688 * infcall.c (find_function_return_type): Delete.
6689 (find_function_addr): Add 'function_type' parameter. For calls to
6690 GNU ifunc functions, try to find the type of the target function
6691 from the type that the resolver returns, and return it via
6692 FUNCTION_TYPE.
6693 (call_function_by_hand_dummy): Adjust to use the function type
6694 returned by find_function_addr.
6695 (find_function_addr): Add 'function_type' parameter and move
6696 description here.
6697 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
6698 declarations.
6699
6700 2018-04-26 Pedro Alves <palves@redhat.com>
6701
6702 * c-exp.y (variable production): Skip finding an alias for ifunc
6703 symbols.
6704
6705 2018-04-26 Pedro Alves <palves@redhat.com>
6706
6707 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
6708
6709 2018-04-25 Pedro Alves <palves@redhat.com>
6710
6711 * infcmd.c (kill_command): Print the pid as string, not the whole
6712 thread's ptid. Add comment. s/has been killed/killed/ in output
6713 message.
6714 * remote.c (remote_detach_1): Print the pid as string, not the
6715 whole thread's ptid.
6716
6717 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6718 Sergio Durigan Junior <sergiodj@redhat.com>
6719 Pedro Alves <palves@redhat.com>
6720
6721 * infcmd.c (kill_command): Print message when inferior has
6722 been killed.
6723 * inferior.c (print_inferior_events): Remove 'static'. Set as
6724 '1'.
6725 (add_inferior): Improve message printed when
6726 'print_inferior_events' is on.
6727 (exit_inferior): Remove message printed when
6728 'print_inferior_events' is on.
6729 (detach_inferior): Improve message printed when
6730 'print_inferior_events' is on.
6731 (initialize_inferiors): Use 'add_inferior_silent' to set
6732 'current_inferior_'.
6733 * inferior.h (print_inferior_events): Declare here as
6734 'extern'.
6735 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
6736 '[Detaching...]' messages when 'print_inferior_events' is on.
6737 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
6738 as prefix/suffix for messages. Remove periods. Fix erroneous
6739 'Detaching after fork from child...', replace it by '... from
6740 parent...'.
6741 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
6742 prefix/suffix when printing 'Detaching...' messages. Print
6743 them when 'print_inferior_events' is on.
6744 * remote.c (remote_detach_1): Print message when detaching
6745 from inferior and '!is_fork_parent'.
6746
6747 2018-04-24 Tom Tromey <tom@tromey.com>
6748
6749 * cli-out.h: Reindent.
6750
6751 2018-04-24 Tom Tromey <tom@tromey.com>
6752
6753 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
6754 (cli_ui_out::do_field_string): Use fputs_filtered.
6755 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
6756
6757 2018-04-23 Tom Tromey <tom@tromey.com>
6758
6759 * guile/scm-frame.c (gdbscm_frame_read_var): Use
6760 gdb::unique_xmalloc_ptr.
6761
6762 2018-04-23 Tom Tromey <tom@tromey.com>
6763
6764 * configure: Rebuild.
6765
6766 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
6767
6768 PR gdb/23095
6769 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
6770 prepare_for_testing. Set normal_bp to r_debug_state if target
6771 is bsd.
6772
6773 2018-04-21 Pedro Alves <palves@redhat.com>
6774 Rajendra SY <rajendra.sy@gmail.com>
6775
6776 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
6777 * remote.c (extended_remote_attach): In all-stop mode, mark the
6778 thread as executing.
6779
6780 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6781
6782 * thread.c (thread_apply_all_command): Fix comment.
6783 (thread_command): Fix comment.
6784
6785 2018-04-10 Alan Hayward <alan.hayward@arm.com>
6786
6787 * common/tdesc.h (tdesc_create_feature): Remove xml filename
6788 parameter.
6789 * features/aarch64-core.c (create_feature_aarch64_core):
6790 Regenerate.
6791 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
6792 Likewise.
6793 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
6794 Likewise.
6795 * features/i386/32bit-avx512.c
6796 (create_feature_i386_32bit_avx512): Likewise.
6797 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
6798 Likewise.
6799 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
6800 Likewise.
6801 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
6802 Likewise.
6803 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
6804 Likewise.
6805 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
6806 Likewise.
6807 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
6808 Likewise.
6809 * features/i386/64bit-avx512.c
6810 (create_feature_i386_64bit_avx512): Likewise.
6811 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
6812 Likewise.
6813 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
6814 Likewise.
6815 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
6816 Likewise.
6817 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
6818 Likewise.
6819 * features/i386/64bit-segments.c
6820 (create_feature_i386_64bit_segments): Likewise.
6821 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
6822 Likewise.
6823 * features/i386/x32-core.c
6824 (create_feature_i386_x32_core): Likewise.
6825 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
6826 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
6827 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
6828 * target-descriptions.c: In generated code, don't pass xml
6829 filename.
6830
6831 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6832
6833 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
6834 (print_xml_feature::visit_post): Likewise.
6835 (print_xml_feature::visit): Likewise.
6836 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
6837 (print_xml_feature): Add new class.
6838 * regformats/regdat.sh: Null xmltarget on feature targets.
6839 * target-descriptions.c (struct target_desc): Add xmltarget.
6840 (maintenance_check_tdesc_xml_convert): Add unittest function.
6841 (tdesc_get_features_xml): Add function to get xml.
6842 (maintenance_check_xml_descriptions): Test xml generation.
6843 * xml-tdesc.c (string_read_description_xml): Add function.
6844 * xml-tdesc.h (string_read_description_xml): Add declaration.
6845
6846 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6847
6848 * features/Makefile: Add feature marker to targets with new style
6849 target descriptions.
6850 * regformats/aarch64.dat: Regenerate.
6851 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
6852 * regformats/i386/amd64-avx-linux.dat: Likewise.
6853 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
6854 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
6855 * regformats/i386/amd64-linux.dat: Likewise.
6856 * regformats/i386/amd64-mpx-linux.dat: Likewise.
6857 * regformats/i386/amd64.dat: Likewise.
6858 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
6859 * regformats/i386/i386-avx-linux.dat: Likewise.
6860 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
6861 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
6862 * regformats/i386/i386-linux.dat: Likewise.
6863 * regformats/i386/i386-mmx-linux.dat: Likewise.
6864 * regformats/i386/i386-mpx-linux.dat: Likewise.
6865 * regformats/i386/i386.dat: Likewise.
6866 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
6867 * regformats/i386/x32-avx-linux.dat: Likewise.
6868 * regformats/i386/x32-linux.dat: Likewise.
6869 * regformats/tic6x-c62x-linux.dat: Likewise.
6870 * regformats/tic6x-c64x-linux.dat: Likewise.
6871 * regformats/tic6x-c64xp-linux.dat: Likewise.
6872 * regformats/regdat.sh: Parse feature marker.
6873
6874 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6875
6876 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
6877 (tdesc_osabi_name): Likewise.
6878 * target-descriptions.c (tdesc_architecture_name): Add new
6879 function.
6880 (tdesc_osabi_name): Likewise.
6881
6882 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6883
6884 * common/tdesc.c (tdesc_predefined_type): Move to here.
6885 (tdesc_named_type): Likewise.
6886 (tdesc_create_vector): Likewise.
6887 (tdesc_create_struct): Likewise.
6888 (tdesc_set_struct_size): Likewise.
6889 (tdesc_create_union): Likewise.
6890 (tdesc_create_flags): Likewise.
6891 (tdesc_create_enum): Likewise.
6892 (tdesc_add_field): Likewise.
6893 (tdesc_add_typed_bitfield): Likewise.
6894 (tdesc_add_bitfield): Likewise.
6895 (tdesc_add_flag): Likewise.
6896 (tdesc_add_enum_value): Likewise.
6897 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
6898 (struct tdesc_type_vector): Likewise.
6899 (struct tdesc_type_field): Likewise.
6900 (struct tdesc_type_with_fields): Likewise.
6901 (tdesc_create_enum): Add declaration.
6902 (tdesc_add_typed_bitfield): Likewise.
6903 (tdesc_add_enum_value): Likewise.
6904 * target-descriptions.c (tdesc_type_field): Move from here.
6905 (tdesc_type_builtin): Likewise.
6906 (tdesc_type_vector): Likewise.
6907 (tdesc_type_with_fields): Likewise.
6908 (tdesc_predefined_types): Likewise.
6909 (tdesc_named_type): Likewise.
6910 (tdesc_create_vector): Likewise.
6911 (tdesc_create_struct): Likewise.
6912 (tdesc_set_struct_size): Likewise.
6913 (tdesc_create_union): Likewise.
6914 (tdesc_create_flags): Likewise.
6915 (tdesc_create_enum): Likewise.
6916 (tdesc_add_field): Likewise.
6917 (tdesc_add_typed_bitfield): Likewise.
6918 (tdesc_add_bitfield): Likewise.
6919 (tdesc_add_flag): Likewise.
6920 (tdesc_add_enum_value): Likewise.
6921 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
6922 (tdesc_add_typed_bitfield): Likewise.
6923 (tdesc_add_enum_value): Likewise.
6924
6925 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6926
6927 * common/tdesc.c (tdesc_feature::accept): Move to here.
6928 (tdesc_feature::operator==): Likewise.
6929 (tdesc_create_reg): Likewise.
6930 * common/tdesc.h (tdesc_type_kind): Likewise.
6931 (struct tdesc_type): Likewise.
6932 (struct tdesc_feature): Likewise.
6933 * regformats/regdat.sh: Create a feature.
6934 * target-descriptions.c (tdesc_type_kind): Move from here.
6935 (tdesc_type): Likewise.
6936 (tdesc_type_up): Likewise.
6937 (tdesc_feature): Likewise.
6938 (tdesc_create_reg): Likewise.
6939
6940 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6941
6942 * Makefile.in: Add arch/tdesc.c
6943 * common/tdesc.c: New file.
6944 * common/tdesc.h (tdesc_element_visitor): Move to here.
6945 (tdesc_element): Likewise.
6946 (tdesc_reg): Likewise.
6947 (tdesc_reg_up): Likewise.
6948 * regformats/regdef.h (reg): Add offset to constructors.
6949 * target-descriptions.c (tdesc_element_visitor): Move from here.
6950 (tdesc_element): Likewise.
6951 (tdesc_reg): Likewise.
6952 (tdesc_reg_up): Likewise.
6953
6954 2018-04-17 Tom Tromey <tom@tromey.com>
6955
6956 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
6957 discriminant field.
6958
6959 2018-04-17 Tom Tromey <tom@tromey.com>
6960
6961 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
6962
6963 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
6964
6965 * symtab.c (print_symbol_info): Skip printing filename and line
6966 number when `last' is NULL.
6967 (symtab_symbol_info): Use empty string instead of NULL for first
6968 invocation of print_symbol_info.
6969 (rbreak_command): Pass NULL to `last' parameter of
6970 print_symbol_info.
6971
6972 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
6973
6974 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
6975 instead of nullptr.
6976
6977 2018-04-16 Pedro Alves <palves@redhat.com>
6978
6979 * MAINTAINERS (sh): Remove.
6980 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
6981 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
6982 (ALLDEPFILES): Remove sh64-tdep.c.
6983 * NEWS: Mentions that support for SH-5/SH64 is removed.
6984 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
6985 (sh*-*-openbsd*): Ditto.
6986 (sh64-*-elf*): Remove.
6987 (sh*): Remove.
6988 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
6989 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
6990 * sh-tdep.c: No longer include "sh64-tdep.h".
6991 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
6992 * sh64-tdep.c, sh64-tdep.h: Remove files.
6993
6994 2018-04-16 Pedro Alves <palves@redhat.com>
6995
6996 * MAINTAINERS: Remove m88k.
6997 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
6998 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
6999 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
7000 * NEWS: Mention that support for m88k was removed.
7001 * configure.host (m88*-*-*): Remove support.
7002 * configure.nat (m88k-*-*): Remove support.
7003 * configure.tgt (m88*-*-openbsd*): Remove.
7004 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
7005
7006 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
7007
7008 * configure.tgt (x86_tobjs): New variable.
7009 (amd64_tobjs, i386_tobjs): Use it.
7010
7011 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7012
7013 * symtab.c (print_symbol_info): Precede the symbol definition by
7014 the line number when available.
7015 * NEWS: Advertise this enhancement.
7016
7017 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7018
7019 * NEWS (New options): announce set/show record btrace cpu.
7020 * btrace.c: Include record-btrace.h.
7021 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
7022 the vendor is unknown.
7023 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
7024 Maybe overwrite the btrace configuration's cpu.
7025 (btrace_compute_ftrace): Add cpu parameter. Update callers.
7026 (btrace_fetch): Add cpu parameter. Update callers.
7027 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
7028 Maybe overwrite the btrace configuration's cpu. Skip enabling
7029 errata workarounds if the vendor is unknown.
7030 * python/py-record-btrace.c: Include record-btrace.h.
7031 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
7032 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
7033 * record-btrace.c (record_btrace_cpu_state_kind): New.
7034 (record_btrace_cpu): New.
7035 (set_record_btrace_cpu_cmdlist): New.
7036 (record_btrace_get_cpu): New.
7037 (require_btrace_thread, record_btrace_info)
7038 (record_btrace_resume_thread): Call record_btrace_get_cpu.
7039 (cmd_set_record_btrace_cpu_none): New.
7040 (cmd_set_record_btrace_cpu_auto): New.
7041 (cmd_set_record_btrace_cpu): New.
7042 (cmd_show_record_btrace_cpu): New.
7043 (_initialize_record_btrace): Initialize set/show record btrace cpu
7044 commands.
7045 * record-btrace.h (record_btrace_get_cpu): New.
7046
7047 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7048
7049 * record.c (set_record_command): Fix typo in message.
7050
7051 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7052
7053 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
7054
7055 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7056
7057 * infrun.c (process_event_stop_test): Call
7058 gdbarch_in_indirect_branch_thunk.
7059 * gdbarch.sh (in_indirect_branch_thunk): New.
7060 * gdbarch.c: Regenerated.
7061 * gdbarch.h: Regenerated.
7062 * x86-tdep.h: New.
7063 * x86-tdep.c: New.
7064 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
7065 (HFILES_NO_SRCDIR): Add x86-tdep.h.
7066 (ALLDEPFILES): Add x86-tdep.c.
7067 * arch-utils.h (default_in_indirect_branch_thunk): New.
7068 * arch-utils.c (default_in_indirect_branch_thunk): New.
7069 * i386-tdep: Include x86-tdep.h.
7070 (i386_in_indirect_branch_thunk): New.
7071 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
7072 function.
7073 * amd64-tdep: Include x86-tdep.h.
7074 (amd64_in_indirect_branch_thunk): New.
7075 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
7076
7077 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
7078
7079 PR gdb/23053
7080 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
7081 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
7082 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
7083 regression.
7084
7085 2018-04-12 Tom Tromey <tom@tromey.com>
7086
7087 * rust-lang.c (rust_print_struct_def): Remove univariant code.
7088 (rust_evaluate_subexp): Likewise.
7089
7090 2018-04-12 Pedro Alves <palves@redhat.com>
7091
7092 * procfs.c (procfs_detach): Make forward declaration's prototype
7093 match definition's protototype.
7094 (proc_get_LDT_entry): Remove stale do_cleanups call.
7095
7096 2018-04-12 Pedro Alves <palves@redhat.com>
7097
7098 * target.h (target_ops::to_has_exited): Delete.
7099 (target_has_exited): Delete.
7100 * target-delegates.c: Regenerate.
7101
7102 2018-04-11 Pedro Alves <palves@redhat.com>
7103
7104 * target.c (fileio_fh_t::t): Add comment.
7105 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7106 (target_fileio_close): Handle a NULL target.
7107 (invalidate_fileio_fh): New.
7108 (target_close): Call it.
7109 * remote.c (remote_hostio_send_command): No longer check whether
7110 remote_desc is open.
7111
7112 2018-04-11 Pedro Alves <palves@redhat.com>
7113
7114 * target.c (fileio_fh_t): Make it a named struct instead of a
7115 typedef.
7116 (fileio_fh_t::is_closed): New method.
7117 (DEF_VEC_O (fileio_fh_t)): Remove.
7118 (fileio_fhandles): Now a std::vector.
7119 (is_closed_fileio_fh): Delete.
7120 (acquire_fileio_fd): Adjust. Rename parameters.
7121 (release_fileio_fd): Adjust.
7122 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
7123 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7124 (target_fileio_close): Adjust.
7125
7126 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
7127
7128 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
7129 index.
7130
7131 2018-04-10 Pedro Alves <palves@redhat.com>
7132
7133 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
7134 (scoped_finish_thread_state): New class.
7135 * infcmd.c (run_command_1): Use it instead of finish_thread_state
7136 cleanup.
7137 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
7138 (fetch_inferior_event, normal_stop): Likewise.
7139 * thread.c (finish_thread_state_cleanup): Delete.
7140
7141 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7142 Pedro Alves <palves@redhat.com>
7143
7144 * value.c: Include "selftest.h" and "common/array-view.h".
7145 (struct range) <operator ==>: New.
7146 (test_ranges_contain): New.
7147 (check_ranges_vector): New.
7148 (test_insert_into_bit_range_vector): New.
7149 (_initialize_values): Register selftests.
7150 * common/array-view.h (operator==, operator!=): New.
7151
7152 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7153
7154 * common/gdb_vecs.h (unordered_remove): Add overload that takes
7155 an iterator.
7156 * inline-frame.c: Include <algorithm>.
7157 (struct inline_state): Add constructor.
7158 (inline_state_s): Remove.
7159 (DEF_VEC_O(inline_state_s)): Remove.
7160 (inline_states): Change type to std::vector.
7161 (find_inline_frame_state): Adjust to std::vector.
7162 (allocate_inline_frame_state): Remove.
7163 (clear_inline_frame_state): Adjust to std::vector.
7164 (skip_inline_frames): Adjust to std::vector.
7165
7166 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7167
7168 * tracepoint.h (struct trace_state_variable): Add constructor.
7169 <name>: Change type to std::string.
7170 * tracepoint.c (tsv_s): Remove.
7171 (DEF_VEC_O(tsv_s)): Remove.
7172 (tvariables): Change to std::vector.
7173 (create_trace_state_variable): Adjust to std::vector.
7174 (find_trace_state_variable): Likewise.
7175 (find_trace_state_variable_by_number): Likewise.
7176 (delete_trace_state_variable): Likewise.
7177 (trace_variable_command): Adjust to std::string.
7178 (delete_trace_variable_command): Likewise.
7179 (tvariables_info_1): Adjust to std::vector.
7180 (save_trace_state_variables): Likewise.
7181 (start_tracing): Likewise.
7182 (merge_uploaded_trace_state_variables): Adjust to std::vector
7183 and std::string.
7184 * target.h (struct target_ops)
7185 <to_download_trace_state_variable>: Pass reference to
7186 trace_state_variable.
7187 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
7188 * target-delegates.c: Re-generate.
7189 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
7190 (mi_tsv_deleted): Likewise.
7191 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
7192 * remote.c (remote_download_trace_state_variable): Change
7193 pointer to reference and adjust.
7194 * make-target-delegates (parse_argtypes): Handle references.
7195 (write_function_header): Likewise.
7196 (munge_type): Likewise.
7197
7198 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7199
7200 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7201 string_view-selftests.c.
7202 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
7203 testsuite.
7204 * unittests/basic_string_view/cons/char/1.cc: Likewise.
7205 * unittests/basic_string_view/cons/char/2.cc: Likewise.
7206 * unittests/basic_string_view/cons/char/3.cc: Likewise.
7207 * unittests/basic_string_view/element_access/char/1.cc:
7208 Likewise.
7209 * unittests/basic_string_view/element_access/char/empty.cc:
7210 Likewise.
7211 * unittests/basic_string_view/element_access/char/front_back.cc:
7212 Likewise.
7213 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
7214 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
7215 Likewise.
7216 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
7217 Likewise.
7218 * unittests/basic_string_view/modifiers/swap/char/1.cc:
7219 Likewise.
7220 * unittests/basic_string_view/operations/compare/char/1.cc:
7221 Likewise.
7222 * unittests/basic_string_view/operations/compare/char/13650.cc:
7223 Likewise.
7224 * unittests/basic_string_view/operations/copy/char/1.cc:
7225 Likewise.
7226 * unittests/basic_string_view/operations/data/char/1.cc:
7227 Likewise.
7228 * unittests/basic_string_view/operations/find/char/1.cc:
7229 Likewise.
7230 * unittests/basic_string_view/operations/find/char/2.cc:
7231 Likewise.
7232 * unittests/basic_string_view/operations/find/char/3.cc:
7233 Likewise.
7234 * unittests/basic_string_view/operations/find/char/4.cc:
7235 Likewise.
7236 * unittests/basic_string_view/operations/rfind/char/1.cc:
7237 Likewise.
7238 * unittests/basic_string_view/operations/rfind/char/2.cc:
7239 Likewise.
7240 * unittests/basic_string_view/operations/rfind/char/3.cc:
7241 Likewise.
7242 * unittests/basic_string_view/operations/substr/char/1.cc:
7243 Likewise.
7244 * unittests/basic_string_view/operators/char/2.cc: Likewise.
7245 * unittests/string_view-selftests.c: New file.
7246
7247 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7248
7249 * unittests/basic_string_view/capacity/1.cc: New file.
7250 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
7251 * unittests/basic_string_view/cons/char/1.cc: New file.
7252 * unittests/basic_string_view/cons/char/2.cc: New file.
7253 * unittests/basic_string_view/cons/char/3.cc: New file.
7254 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
7255 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
7256 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
7257 * unittests/basic_string_view/element_access/char/1.cc: New file.
7258 * unittests/basic_string_view/element_access/char/2.cc: New file.
7259 * unittests/basic_string_view/element_access/char/empty.cc: New file.
7260 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
7261 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
7262 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
7263 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
7264 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
7265 * unittests/basic_string_view/include.cc: New file.
7266 * unittests/basic_string_view/inserters/char/1.cc: New file.
7267 * unittests/basic_string_view/inserters/char/2.cc: New file.
7268 * unittests/basic_string_view/inserters/char/3.cc: New file.
7269 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
7270 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
7271 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
7272 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
7273 * unittests/basic_string_view/literals/types.cc: New file.
7274 * unittests/basic_string_view/literals/values.cc: New file.
7275 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
7276 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
7277 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
7278 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
7279 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
7280 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
7281 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
7282 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
7283 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
7284 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
7285 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
7286 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
7287 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
7288 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
7289 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
7290 * unittests/basic_string_view/operations/data/char/1.cc: New file.
7291 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
7292 * unittests/basic_string_view/operations/find/char/1.cc: New file.
7293 * unittests/basic_string_view/operations/find/char/2.cc: New file.
7294 * unittests/basic_string_view/operations/find/char/3.cc: New file.
7295 * unittests/basic_string_view/operations/find/char/4.cc: New file.
7296 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
7297 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
7298 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
7299 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
7300 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
7301 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
7302 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
7303 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
7304 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
7305 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
7306 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
7307 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
7308 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
7309 * unittests/basic_string_view/operators/char/2.cc: New file.
7310 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
7311 * unittests/basic_string_view/range_access/char/1.cc: New file.
7312 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
7313 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
7314 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
7315 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
7316 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
7317 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
7318 * unittests/basic_string_view/requirements/typedefs.cc: New file.
7319 * unittests/basic_string_view/typedefs.cc: New file.
7320 * unittests/basic_string_view/types/1.cc: New file.
7321
7322 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7323
7324 * common/gdb_string_view.h: Remove libstdc++ implementation
7325 details, adjust to gdb reality.
7326 * common/gdb_string_view.tcc: Likewise.
7327 * cli/cli-script.c (struct string_view): Remove.
7328 (user_args) <m_args>: Change element type to gdb::string_view.
7329 (user_args::insert_args): Adjust.
7330
7331 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7332
7333 * common/gdb_string_view.h: New file.
7334 * common/gdb_string_view.tcc: New file.
7335
7336 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7337
7338 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
7339 * configure: Re-generate.
7340
7341 2018-04-09 Pedro Alves <palves@redhat.com>
7342
7343 * gdbarch.sh: Include "observable.h" instead of "observer.h".
7344 (set_target_gdbarch): Call
7345 gdb::observers::architecture_changed.notify instead of
7346 observer_notify_architecture_changed.
7347
7348 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7349
7350 * tracepoint.c (struct current_traceframe_cleanup): Remove.
7351 (do_restore_current_traceframe_cleanup): Remove.
7352 (restore_current_traceframe_cleanup_dtor): Remove.
7353 (make_cleanup_restore_current_traceframe): Remove.
7354 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
7355 New.
7356 * tracepoint.h (struct scoped_restore_current_traceframe): New.
7357 * infrun.c (fetch_inferior_event): Use
7358 scoped_restore_current_traceframe.
7359
7360 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7361
7362 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
7363 Remove.
7364 <n_allocated_type_units>: Remove.
7365 <all_type_units>: Change to std::vector.
7366 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7367 to std::vector change.
7368 (dwarf2_per_objfile::get_cutu): Likewise.
7369 (dwarf2_per_objfile::get_tu): Likewise.
7370 (create_signatured_type_table_from_index): Likewise.
7371 (create_signatured_type_table_from_debug_names): Likewise.
7372 (dw2_symtab_iter_next): Likewise.
7373 (dw2_print_stats): Likewise.
7374 (dw2_expand_all_symtabs): Likewise.
7375 (dw2_expand_marked_cus): Likewise.
7376 (dw2_debug_names_iterator::next): Likewise.
7377 (dwarf2_initialize_objfile): Likewise.
7378 (add_signatured_type_cu_to_table): Likewise.
7379 (create_all_type_units): Likewise.
7380 (add_type_unit): Likewise.
7381 (struct tu_abbrev_offset): Add constructor.
7382 (build_type_psymtabs_1): Adjust to std::vector change.
7383 (print_tu_stats): Likewise.
7384 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7385 (write_debug_names): Likewise.
7386
7387 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7388
7389 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
7390 Make an std::vector.
7391 <n_comp_units>: Remove.
7392 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7393 to std::vector change.
7394 (dwarf2_per_objfile::get_cutu): Likewise.
7395 (dwarf2_per_objfile::get_cu): Likewise.
7396 (create_cus_from_index): Likewise.
7397 (create_addrmap_from_index): Likewise.
7398 (create_addrmap_from_aranges): Likewise.
7399 (dwarf2_read_index): Likewise.
7400 (dw2_find_last_source_symtab): Likewise.
7401 (dw2_map_symtabs_matching_filename): Likewise.
7402 (dw2_symtab_iter_next): Likewise.
7403 (dw2_print_stats): Likewise.
7404 (dw2_expand_all_symtabs): Likewise.
7405 (dw2_expand_symtabs_with_fullname): Likewise.
7406 (dw2_expand_marked_cus): Likewise.
7407 (dw2_map_symbol_filenames): Likewise.
7408 (create_cus_from_debug_names): Likewise.
7409 (dwarf2_read_debug_names): Likewise.
7410 (dw2_debug_names_iterator::next): Likewise.
7411 (dwarf2_initialize_objfile): Likewise.
7412 (set_partial_user): Likewise.
7413 (dwarf2_build_psymtabs_hard): Likewise.
7414 (read_comp_units_from_section): Remove arguments, adjust to
7415 std::vector change.
7416 (create_all_comp_units): Adjust to std::vector and
7417 read_comp_units_from_section changes.
7418 (dwarf2_find_containing_comp_unit): Adjust to std::vector
7419 change.
7420 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7421 (psyms_seen_size): Likewise.
7422 (write_gdbindex): Likewise.
7423 (write_debug_names): Likewise.
7424
7425 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7426
7427 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
7428 with dwarf2_per_objfile.
7429 (create_cus_from_index): Likewise.
7430 (create_signatured_type_table_from_index): Likewise.
7431 (dwarf2_read_index): Likewise.
7432 (dwarf2_initialize_objfile): Likewise.
7433 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
7434 per_cu rather than get_dwarf2_per_objfile.
7435
7436 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7437
7438 * dwarf2read.h (struct signatured_type): Forward declare.
7439 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
7440 New methods.
7441 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
7442 (dw2_get_cutu): ...this.
7443 (dwarf2_per_objfile::get_cu): Rename from...
7444 (dw2_get_cu): ...this.
7445 (dwarf2_per_objfile::get_tu): New.
7446 (create_addrmap_from_index): Adjust.
7447 (create_addrmap_from_aranges): Adjust.
7448 (dw2_find_last_source_symtab): Adjust.
7449 (dw2_map_symtabs_matching_filename): Adjust.
7450 (dw2_symtab_iter_next): Adjust.
7451 (dw2_print_stats): Adjust.
7452 (dw2_expand_all_symtabs): Adjust.
7453 (dw2_expand_symtabs_with_fullname): Adjust.
7454 (dw2_expand_marked_cus): Adjust.
7455 (dw_expand_symtabs_matching_file_matcher): Adjust.
7456 (dw2_map_symbol_filenames): Adjust.
7457 (dw2_debug_names_iterator::next): Adjust.
7458 (dwarf2_initialize_objfile): Adjust.
7459 (set_partial_user): Adjust.
7460 (dwarf2_build_psymtabs_hard): Adjust.
7461
7462 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7463
7464 * dwarf2read.c (create_signatured_type_table_from_debug_names):
7465 Remove unused variables.
7466 (dw2_map_symtabs_matching_filename): Likewise.
7467 (dwarf2_record_block_ranges): Likewise.
7468 (dwarf2_read_addr_index): Likewise.
7469 (follow_die_offset): Likewise.
7470
7471 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7472
7473 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
7474 to symbol_file_add_main.
7475
7476 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7477
7478 PR mi/22299
7479 * mi/mi-console.c (do_fputc_async_safe): New.
7480 (mi_console_file::write_async_safe): New.
7481 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
7482 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
7483 New.
7484 * ui-file.c (ui_file::putstrn): Adjust call to
7485 fputstrn_unfiltered.
7486 * utils.c (printchar): Replace do_fputs and do_fprintf
7487 parameters by do_fputc.
7488 (fputstr_filtered): Adjust call to printchar.
7489 (fputstr_unfiltered): Likewise.
7490 (fputstrn_filtered): Likewise.
7491 (fputstrn_unfiltered): Add do_fputc parameter, pass to
7492 printchar.
7493 * utils.h (do_fputc_ftype): New typedef.
7494 (fputstrn_unfiltered): Add do_fputc parameter.
7495
7496 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7497
7498 * regformats/i386/i386-avx.dat: Remove.
7499
7500 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7501
7502 PR gdb/22979
7503 * amd64-tdep.c (amd64_none_init_abi): New function.
7504 (amd64_x32_none_init_abi): New function.
7505 (_initialize_amd64_tdep): Register handlers for x86-64 and
7506 x64_32 with GDB_OSABI_NONE.
7507 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
7508 GDB_OSABI_NONE osabi.
7509
7510 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7511
7512 PR gdb/22980
7513 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
7514 GDB_OSABI_NONE.
7515 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
7516 * osabi.c (gdb_osabi_names): Add "unknown" entry.
7517
7518 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7519
7520 * common/byte-vector.h (char_vector): New type.
7521 * target.h (target_read_alloc): Return
7522 gdb::optional<byte_vector>.
7523 (target_read_stralloc): Return gdb::optional<char_vector>.
7524 (target_get_osdata): Return gdb::optional<char_vector>.
7525 * target.c (target_read_alloc_1): Templatize. Replacement
7526 manual memory management with vector.
7527 (target_read_alloc): Change return type, adjust.
7528 (target_read_stralloc): Change return type, adjust.
7529 (target_get_osdata): Change return type, adjust.
7530 * auxv.c (struct auxv_info) <length>: Remove.
7531 <data>: Change type to gdb::optional<byte_vector>.
7532 (auxv_inferior_data_cleanup): Free auxv_info with delete.
7533 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
7534 (target_auxv_search): Adjust.
7535 (fprint_target_auxv): Adjust.
7536 * avr-tdep.c (avr_io_reg_read_command): Adjust.
7537 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
7538 (linux_make_corefile_notes): Adjust.
7539 * osdata.c (get_osdata): Adjust.
7540 * remote.c (remote_get_threads_with_qxfer): Adjust.
7541 (remote_memory_map): Adjust.
7542 (remote_traceframe_info): Adjust.
7543 (btrace_read_config): Adjust.
7544 (remote_read_btrace): Adjust.
7545 (remote_pid_to_exec_file): Adjust.
7546 * solib-aix.c (solib_aix_get_library_list): Adjust.
7547 * solib-dsbt.c (decode_loadmap): Don't free buf.
7548 (dsbt_get_initial_loadmaps): Adjust.
7549 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
7550 * solib-target.c (solib_target_current_sos): Adjust.
7551 * tracepoint.c (sdata_make_value): Adjust.
7552 * xml-support.c (xinclude_start_include): Adjust.
7553 (xml_fetch_content_from_file): Adjust.
7554 * xml-support.h (xml_fetch_another): Change return type.
7555 (xml_fetch_content_from_file): Change return type.
7556 * xml-syscall.c (xml_init_syscalls_info): Adjust.
7557 * xml-tdesc.c (file_read_description_xml): Adjust.
7558 (fetch_available_features_from_target): Change return type.
7559 (target_fetch_description_xml): Adjust.
7560 (target_read_description_xml): Adjust.
7561
7562 2018-04-06 Tom Tromey <tom@tromey.com>
7563
7564 * value.c (~value): Update.
7565 (struct value) <contents>: Now unique_xmalloc_ptr.
7566 (value_contents_bits_eq, allocate_value_contents)
7567 (value_contents_raw, value_contents_all_raw)
7568 (value_contents_for_printing, value_contents_for_printing_const)
7569 (set_value_enclosing_type): Update.
7570
7571 2018-04-06 Tom Tromey <tom@tromey.com>
7572
7573 * value.c (range_s): Remove typedef, VEC.
7574 (struct range): Add operator<.
7575 (range_lessthan): Remove.
7576 (ranges_contain): Change type.
7577 (~value): Update.
7578 (struct value) <unavailable, optimized_out>: Now std::vector.
7579 (value_entirely_available)
7580 (value_entirely_covered_by_range_vector)
7581 (value_entirely_unavailable, value_entirely_optimized_out):
7582 Update.
7583 (insert_into_bit_range_vector): Change argument type.
7584 (find_first_range_overlap): Likewise.
7585 (struct ranges_and_idx, value_contents_bits_eq)
7586 (require_not_optimized_out, require_available): Update.
7587 (ranges_copy_adjusted): Change argument types.
7588 (value_optimized_out, value_copy, value_fetch_lazy): Update.
7589
7590 2018-04-06 Tom Tromey <tom@tromey.com>
7591
7592 * value.c (~value): Update.
7593 (struct value) <parent>: Now a value_ref_ptr.
7594 (value_parent, set_value_parent, value_address, value_copy):
7595 Update.
7596
7597 2018-04-06 Tom Tromey <tom@tromey.com>
7598
7599 * value.c (struct value): Add constructor, destructor, and member
7600 initializers.
7601 (allocate_value_lazy, value_decref): Update.
7602
7603 2018-04-06 Tom Tromey <tom@tromey.com>
7604
7605 * value.c (struct value) <released, next>: Remove.
7606 (all_values): Now a std::vector.
7607 (allocate_value_lazy): Update.
7608 (value_next): Remove.
7609 (value_mark, value_free_to_mark, release_value)
7610 (value_release_to_mark): Update.
7611
7612 2018-04-06 Tom Tromey <tom@tromey.com>
7613
7614 * value.h (fetch_subexp_value, value_release_to_mark): Update.
7615 (free_value_chain): Remove.
7616 * value.c (free_value_chain): Remove.
7617 (value_release_to_mark): Return a std::vector.
7618 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
7619 std::vector.
7620 (check_condition): Update.
7621 * eval.c (fetch_subexp_value): Change "val_chain" to a
7622 std::vector.
7623 * breakpoint.c (update_watchpoint): Update.
7624 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
7625
7626 2018-04-06 Tom Tromey <tom@tromey.com>
7627
7628 * value.h (free_all_values): Remove.
7629 * value.c (free_all_values): Remove.
7630
7631 2018-04-06 Tom Tromey <tom@tromey.com>
7632
7633 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
7634 (value_history_chain, value_history_count): Remove.
7635 (value_history): New global.
7636 (record_latest_value, access_value_history, show_values)
7637 (preserve_values): Update.
7638
7639 2018-04-06 Tom Tromey <tom@tromey.com>
7640
7641 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
7642 * varobj.c (varobj_set_display_format, varobj_set_value)
7643 (install_default_visualizer, construct_visualizer)
7644 (install_new_value, ~varobj, varobj_get_value_type)
7645 (my_value_of_variable, varobj_editable_p): Update.
7646 * c-varobj.c (c_describe_child, c_value_of_variable)
7647 (cplus_number_of_children, cplus_describe_child): Update.
7648 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
7649 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
7650 (ada_value_of_variable, ada_value_is_changeable_p): Update.
7651
7652 2018-04-06 Tom Tromey <tom@tromey.com>
7653
7654 * printcmd.c (last_examine_address): Change type to
7655 value_ref_ptr.
7656 (do_examine, x_command): Update.
7657
7658 2018-04-06 Tom Tromey <tom@tromey.com>
7659
7660 * value.c (release_value): Update.
7661 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
7662 (struct bpstats) <val>: Now a value_ref_ptr.
7663 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7664 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7665 (~watchpoint, print_it_watchpoint, watch_command_1)
7666 (invalidate_bp_value_on_memory_change): Update.
7667
7668 2018-04-06 Tom Tromey <tom@tromey.com>
7669
7670 * varobj.c (varobj_clear_saved_item)
7671 (update_dynamic_varobj_children, install_new_value, ~varobj):
7672 Update.
7673 * value.h (value_incref): Move declaration earlier.
7674 (value_decref): Rename from value_free.
7675 (struct value_ref_policy): New.
7676 (value_ref_ptr): New typedef.
7677 (struct value_deleter): Remove.
7678 (gdb_value_up): Remove typedef.
7679 (release_value): Change return type.
7680 (release_value_or_incref): Remove.
7681 * value.c (set_value_parent): Update.
7682 (value_incref): Change return type.
7683 (value_decref): Rename from value_free.
7684 (value_free_to_mark, free_all_values, free_value_chain): Update.
7685 (release_value): Return value_ref_ptr.
7686 (release_value_or_incref): Remove.
7687 (record_latest_value, set_internalvar, clear_internalvar):
7688 Update.
7689 * stack.c (info_frame_command): Don't call value_free.
7690 * python/py-value.c (valpy_dealloc, valpy_new)
7691 (value_to_value_object): Update.
7692 * printcmd.c (do_examine): Update.
7693 * opencl-lang.c (lval_func_free_closure): Update.
7694 * mi/mi-main.c (register_changed_p): Don't call value_free.
7695 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
7696 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
7697 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
7698 value_free.
7699 * guile/scm-value.c (vlscm_free_value_smob)
7700 (vlscm_scm_from_value): Update.
7701 * frame.c (frame_register_unwind, frame_unwind_register_signed)
7702 (frame_unwind_register_unsigned, get_frame_register_bytes)
7703 (put_frame_register_bytes): Don't call value_free.
7704 * findvar.c (address_from_register): Don't call value_free.
7705 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
7706 * dwarf2loc.c (entry_data_value_free_closure)
7707 (value_of_dwarf_reg_entry, free_pieced_value_closure)
7708 (dwarf2_evaluate_loc_desc_full): Update.
7709 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7710 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7711 (~watchpoint, watch_command_1)
7712 (invalidate_bp_value_on_memory_change): Update.
7713 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
7714
7715 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
7716
7717 PR gdb/23022
7718 * warning.m4: Add -Wno-error=deprecated-register.
7719 * configure: Re-generate.
7720
7721 2018-04-05 Tom Tromey <tom@tromey.com>
7722
7723 * linespec.h: Remove include of "vec.h".
7724
7725 2018-04-05 Tom Tromey <tom@tromey.com>
7726
7727 * linespec.c (typep): Remove typedef.
7728 (find_methods, find_superclass_methods): Take a std::vector.
7729 (find_method): Use std::vector.
7730
7731 2018-04-05 Tom Tromey <tom@tromey.com>
7732
7733 * utils.c (compare_strings): Remove.
7734 * utils.h (compare_strings): Remove.
7735 * objc-lang.h (find_imps): Update.
7736 * objc-lang.c (find_methods): Take a std::vector.
7737 (uniquify_strings, find_imps): Likewise.
7738 * linespec.c (find_methods): Take a std::vector.
7739 (decode_objc): Use std::vector.
7740 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
7741 a std::vector.
7742 (find_method, find_function_symbols): Use std::vector.
7743
7744 2018-04-05 Tom Tromey <tom@tromey.com>
7745
7746 * completer.c (completion_tracker::completion_tracker): Remove
7747 cast.
7748 (completion_tracker::discard_completions): Likewise.
7749 * breakpoint.c (ambiguous_names_p): Remove cast.
7750 * ada-lang.c (_initialize_ada_language): Remove cast.
7751 * utils.h (streq): Update.
7752 (streq_hash): Add new declaration.
7753 * utils.c (streq): Return bool.
7754 (streq_hash): New function.
7755
7756 2018-04-05 Tom Tromey <tom@tromey.com>
7757
7758 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
7759 Remove a string copy.
7760
7761 2018-04-05 Tom Tromey <tom@tromey.com>
7762
7763 * linespec.c (filter_results): Use std::vector.
7764 (decode_line_2, decode_line_full): Update.
7765
7766 2018-04-05 Tom Tromey <tom@tromey.com>
7767
7768 * linespec.c (canonical_to_fullform): Return std::string.
7769 (filter_results): Update.
7770 (struct decode_line_2_item): Add constructor.
7771 <fullform, displayform>: Now std::string.
7772 (decode_line_2_compare_items): Now a std::sort comparator.
7773 (decode_line_2): Update.
7774
7775 2018-04-05 Tom Tromey <tom@tromey.com>
7776
7777 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
7778 (unexpected_linespec_error): Update.
7779 (linespec_parse_basic, parse_linespec): Update.
7780
7781 2018-04-05 Tom Tromey <tom@tromey.com>
7782
7783 * linespec.c (linespec_parse_basic): Reindent.
7784
7785 2018-04-05 Tom Tromey <tom@tromey.com>
7786
7787 * minsyms.h (iterate_over_minimal_symbols): Update.
7788 * minsyms.c (iterate_over_minimal_symbols): Take a
7789 gdb::function_view.
7790 * linespec.c (struct collect_minsyms): Remove.
7791 (compare_msyms): Now a std::sort comparator.
7792 (add_minsym): Add parameters.
7793 (search_minsyms_for_name): Update. Use std::vector.
7794
7795 2018-04-03 Tom Tromey <tom@tromey.com>
7796
7797 * mipsread.c (read_alphacoff_dynamic_symtab): Use
7798 gdb::byte_vector.
7799
7800 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
7801
7802 * MAINTAINERS (Write After Approval): Add Weimin Pan.
7803
7804 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
7805
7806 PR gdb/16959
7807 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
7808 printing static type.
7809
7810 2018-04-01 Tom Tromey <tom@tromey.com>
7811
7812 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
7813 (rs6000_xfer_shared_libraries): Update.
7814
7815 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
7816
7817 * common/gdb_vecs.h (char_ptr): Remove.
7818 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
7819
7820 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
7821
7822 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
7823 with std::vector.
7824 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
7825
7826 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
7827
7828 * tracepoint.h (struct uploaded_tp): Initialize fields.
7829 <actions, step_actions, cmd_strings>: Change type to
7830 std::vector<char *>.
7831 * tracepoint.c (get_uploaded_tp): Allocate with new.
7832 (free_uploaded_tps): Free with delete.
7833 (parse_tracepoint_definition): Adjust to std::vector change.
7834 * breakpoint.c (read_uploaded_action): Likewise.
7835 (create_tracepoint_from_upload): Likewise.
7836 * ctf.c (ctf_write_uploaded_tp): Likewise.
7837 (SET_ARRAY_FIELD): Likewise.
7838 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
7839
7840 2018-03-30 Tom Tromey <tom@tromey.com>
7841
7842 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
7843 std::unique_ptr.
7844 (svr4_keep_data_in_core): Update.
7845 (svr4_read_so_list): Update.
7846
7847 2018-03-30 Tom Tromey <tom@tromey.com>
7848
7849 * windows-nat.c (handle_output_debug_string, handle_exception):
7850 Update.
7851 * target.h (target_read_string): Update.
7852 * target.c (target_read_string): Change "string" to
7853 unique_xmalloc_ptr.
7854 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
7855 Update.
7856 * solib-frv.c (frv_current_sos): Update.
7857 * solib-dsbt.c (dsbt_current_sos): Update.
7858 * solib-darwin.c (darwin_current_sos): Update.
7859 * linux-thread-db.c (inferior_has_bug): Update.
7860 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
7861 Update. Remove alloca.
7862 * ada-lang.c (ada_main_name): Update.
7863
7864 2018-03-30 Tom Tromey <tom@tromey.com>
7865
7866 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
7867 (struct dwo_file_deleter): New.
7868 (dwo_file_up): New typedef.
7869 (open_and_init_dwo_file): Use dwo_file_up.
7870 (free_dwo_file_cleanup): Remove.
7871
7872 2018-03-30 Tom Tromey <tom@tromey.com>
7873
7874 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
7875 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
7876
7877 2018-03-30 Tom Tromey <tom@tromey.com>
7878
7879 * dwarf2read.c (class free_cached_comp_units): New class.
7880 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
7881 (free_cached_comp_units): Remove function.
7882
7883 2018-03-30 Tom Tromey <tom@tromey.com>
7884
7885 * utils.h (make_cleanup_unpush_target): Remove.
7886 * inf-ptrace.c (struct target_unpusher): New.
7887 (target_unpush_up) New typedef.
7888 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
7889 target_unpush_up.
7890 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
7891
7892 2018-03-27 Tom Tromey <tom@tromey.com>
7893
7894 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
7895
7896 2018-03-27 Pedro Alves <palves@redhat.com>
7897 Tom Tromey <tom@tromey.com>
7898
7899 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
7900 destructor. Now a class.
7901 (gdb_readline_wrapper_cleanup): Remove function.
7902 (gdb_readline_wrapper): Remove cleanups.
7903
7904 2018-03-27 Tom Tromey <tom@tromey.com>
7905
7906 * typeprint.h (struct type_print_options) <local_typedefs,
7907 global_typedefs>: Remove "struct" keyword.
7908 (class typedef_hash_table): New class.
7909 (recursively_update_typedef_hash, add_template_parameters)
7910 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
7911 (find_typedef_in_hash): Don't declare.
7912 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
7913 (typedef_hash_table::recursively_update): Rename from
7914 recursively_update_typedef_hash. Now a member.
7915 (typedef_hash_table::add_template_parameters): Rename from
7916 add_template_parameters. Now a member.
7917 (typedef_hash_table::typedef_hash_table): Now a constructor;
7918 rename from create_typedef_hash.
7919 (typedef_hash_table::~typedef_hash_table): Now a destructor;
7920 rename from free_typedef_hash.
7921 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
7922 (do_free_global_table): Remove.
7923 (typedef_hash_table::typedef_hash_table): New constructor; renamed
7924 from copy_type_recursive.
7925 (create_global_typedef_table): Remove.
7926 (typedef_hash_table::find_global_typedef): Now a member of
7927 typedef_hash_table.
7928 (typedef_hash_table::find_typedef): Rename from
7929 find_typedef_in_hash; now a member.
7930 (whatis_exp): Update.
7931 * extension.h (struct ext_lang_type_printers): Add constructor and
7932 destructor.
7933 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
7934 declare.
7935 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
7936 Now a constructor; rename from start_ext_lang_type_printers.
7937 (ext_lang_type_printers): Now a destructor; rename from
7938 free_ext_lang_type_printers.
7939 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
7940 Update.
7941 (c_type_print_base_struct_union): Update. Remove cleanups.
7942
7943 2018-03-27 Tom Tromey <tom@tromey.com>
7944
7945 * dwarf-index-write.c: Include <cmath>.
7946
7947 2018-03-27 Joel Brobecker <brobecker@adacore.com>
7948
7949 * NEWS: Add entry describing new "set|show varsize-limit" command.
7950 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
7951 command.
7952 * printcmd.c (_initialize_printcmd): Add "set var" alias of
7953 "set variable".
7954
7955 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
7956
7957 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
7958 dwarf-index-write.c
7959 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
7960 * dwarf-index-common.c: New file.
7961 * dwarf-index-common.h: New file.
7962 * dwarf-index-write.c: New file.
7963 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
7964 (struct dwarf2_section_info): Move from here.
7965 (dwarf2_section_info_def): Likewise.
7966 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
7967 (offset_type): Likewise.
7968 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
7969 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
7970 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
7971 (byte_swap): Likewise.
7972 (MAYBE_SWAP): Likewise.
7973 (dwarf2_per_cu_ptr): Likewise.
7974 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
7975 (struct tu_stats): Likewise.
7976 (struct dwarf2_per_objfile): Likewise.
7977 (struct dwarf2_per_cu_data): Likewise.
7978 (struct signatured_type): Likewise.
7979 (sig_type_ptr): Likewise.
7980 (DEF_VEC_P (sig_type_ptr)): Likewise.
7981 (INDEX4_SUFFIX): Likewise.
7982 (INDEX5_SUFFIX): Likewise.
7983 (DEBUG_STR_SUFFIX): Likewise.
7984 (dwarf2_read_section): Make non-static.
7985 (mapped_index_string_hash): Move from here.
7986 (dwarf5_djb_hash): Likewise.
7987 (file_write): Likewise.
7988 (class data_buf): Likewise.
7989 (struct symtab_index_entry): Likewise.
7990 (struct mapped_symtab): Likewise.
7991 (find_slot): Likewise.
7992 (hash_expand): Likewise.
7993 (add_index_entry): Likewise.
7994 (uniquify_cu_indices): Likewise.
7995 (class c_str_view): Likewise.
7996 (class c_str_view_hasher): Likewise.
7997 (class vector_hasher): Likewise.
7998 (write_hash_table): Likewise.
7999 (psym_index_map): Likewise.
8000 (struct addrmap_index_data): Likewise.
8001 (add_address_entry): Likewise.
8002 (add_address_entry_worker): Likewise.
8003 (write_address_map): Likewise.
8004 (symbol_kind): Likewise.
8005 (write_psymbols): Likewise.
8006 (struct signatured_type_index_data): Likewise.
8007 (write_one_signatured_type): Likewise.
8008 (recursively_count_psymbols): Likewise.
8009 (recursively_write_psymbols): Likewise.
8010 (class debug_names): Likewise.
8011 (check_dwarf64_offsets): Likewise.
8012 (psyms_seen_size): Likewise.
8013 (write_gdbindex): Likewise.
8014 (write_debug_names): Likewise.
8015 (assert_file_size): Likewise.
8016 (write_psymtabs_to_index): Likewise.
8017 (save_gdb_index_command): Likewise.
8018 (_initialize_dwarf2_read): Don't register the "save gdb-index"
8019 command.
8020 * dwarf2read.h: New file.
8021
8022 2018-03-27 Joel Brobecker <brobecker@adacore.com>
8023
8024 PR gdb/22670
8025 * dwarf2read.c (dwarf2_physname): Do not return the demangled
8026 symbol name if the CU's language stores symbol names in linkage
8027 format.
8028 * language.h (struct language_defn)
8029 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
8030 all instances of this struct.
8031
8032 2018-03-26 Tom Tromey <tom@tromey.com>
8033
8034 * stack.c (backtrace_command_1): Remove verbose code.
8035
8036 2018-03-26 Tom Tromey <tom@tromey.com>
8037
8038 * python/py-framefilter.c (py_print_type): Don't catch
8039 exceptions. Return void.
8040 (py_print_value): Likewise.
8041 (py_print_single_arg): Likewise.
8042 (enumerate_args): Don't catch exceptions.
8043 (py_print_args): Likewise.
8044 (py_print_frame): Likewise.
8045 (gdbpy_apply_frame_filter): Catch exceptions here.
8046
8047 2018-03-26 Tom Tromey <tom@tromey.com>
8048
8049 * stack.c (_initialize_stack): Remove trailing newlines from help
8050 text. Add "Usage" line to "backtrace" help.
8051
8052 2018-03-26 Tom Tromey <tom@tromey.com>
8053
8054 PR python/16486:
8055 * python/py-framefilter.c (py_print_args): Call wrap_hint.
8056
8057 2018-03-26 Tom Tromey <tom@tromey.com>
8058
8059 * python/py-framefilter.c (py_print_single_arg): Return
8060 EXT_LANG_BT_ERROR from catch.
8061
8062 2018-03-26 Tom Tromey <tom@tromey.com>
8063
8064 PR backtrace/15584:
8065 * stack.c (backtrace_command_1): Move some code into no-filters
8066 "if".
8067
8068 2018-03-26 Tom Tromey <tom@tromey.com>
8069
8070 * python/py-framefilter.c (throw_quit_or_print_exception): New
8071 function.
8072 (gdbpy_apply_frame_filter): Use it.
8073
8074 2018-03-26 Tom Tromey <tom@tromey.com>
8075
8076 PR cli/17716:
8077 * python/py-framefilter.c (py_print_type, py_print_value)
8078 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
8079 RETURN_MASK_ERROR.
8080
8081 2018-03-26 Tom Tromey <tom@tromey.com>
8082
8083 * python/py-framefilter.c (enumerate_args): Use
8084 gdb::unique_xmalloc_ptr.
8085
8086 2018-03-26 Tom Tromey <tom@tromey.com>
8087
8088 * python/py-framefilter.c (py_print_frame): Return
8089 EXT_LANG_BT_OK.
8090 (gdbpy_apply_frame_filter): Update comment.
8091 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
8092 Remove.
8093 <EXT_LANG_BT_NO_FILTERS>: Change value.
8094
8095 2018-03-26 Tom Tromey <tom@tromey.com>
8096
8097 PR backtrace/15582:
8098 * stack.c (backtrace_command): Parse "hide" argument.
8099 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
8100 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
8101 constant.
8102
8103 2018-03-26 Tom Tromey <tom@tromey.com>
8104
8105 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
8106 add "flags".
8107 (backtrace_command): Remove "fulltrace", add "flags".
8108
8109 2018-03-26 Tom Tromey <tom@tromey.com>
8110
8111 * stack.c (backtrace_command): Rewrite command line parsing.
8112
8113 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
8114
8115 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
8116
8117 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
8118
8119 * filename-seen-cache.h: Add include guard.
8120
8121 2018-03-26 Keith Seitz <keiths@redhat.com>
8122
8123 * symfile.c (place_section): Remove "struct" from section_addr_info
8124 in comment.
8125 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
8126 "struct" keyword from section_addr_info.
8127
8128 2018-03-26 Alan Hayward <alan.hayward@arm.com>
8129
8130 * regformats/regdef.h (reg): Add constructors.
8131
8132 2018-03-25 Pedro Alves <palves@redhat.com>
8133
8134 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
8135 if then/else bodies in var_func_name extraction.
8136
8137 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
8138
8139 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
8140 lookup_minimal_symbol() to find symbol entry.
8141 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
8142
8143 2018-03-23 Keith Seitz <keiths@redhat.com>
8144
8145 PR c++/22968
8146 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
8147 nested type definitions for C++, too.
8148
8149 2018-03-23 Tom Tromey <tom@tromey.com>
8150
8151 * machoread.c (struct oso_el): Add a constructor. Don't define as
8152 a typedef.
8153 (macho_register_oso): Remove.
8154 (macho_symtab_read): Take a std::vector.
8155 (oso_el_compare_name): Now a std::sort comparator.
8156 (macho_symfile_read_all_oso): Take a std::vector.
8157 (macho_symfile_read): Use std::vector. Remove cleanups.
8158
8159 2018-03-22 Tom Tromey <tom@tromey.com>
8160
8161 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
8162 (record_full_goto_bookmark): Use std::string.
8163
8164 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8165
8166 PR tdep/18295
8167 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
8168 a single mask.
8169
8170 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8171
8172 * rs6000-tdep.c (store_insn_p): New function.
8173 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
8174 and cr_reg to their unshifted values. Use store_insn_p to
8175 match LR saves using either R1 or fdata->alloca_reg. Use
8176 store_insn_p to match CR saves. Set alloca_reg_offset
8177 when alloca_reg and framep are set. Remove lr_reg shift
8178 when assigning to fdata->lr_register.
8179
8180 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
8181
8182 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
8183 command line args instead of emitting a warning.
8184
8185 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8186
8187 * tracepoint.h (struct static_tracepoint_marker): Initialize
8188 fields, define default constructor, move constructor and move
8189 assignment, disable the rest.
8190 <str_id, extra>: Make std::string.
8191 (release_static_tracepoint_marker): Remove.
8192 (free_current_marker): Remove.
8193 * tracepoint.c (free_current_marker): Remove.
8194 (parse_static_tracepoint_marker_definition): Adjust to
8195 std::string, use new hex2str overload.
8196 (release_static_tracepoint_marker): Remove.
8197 (print_one_static_tracepoint_marker): Get marker by reference
8198 and adjust to std::string.
8199 (info_static_tracepoint_markers_command): Adjust to std::vector
8200 changes
8201 * target.h (static_tracepoint_marker_p): Remove typedef.
8202 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
8203 (struct target_ops) <to_static_tracepoint_marker_at>: Return
8204 bool.
8205 <to_static_tracepoint_markers_by_strid>: Return std::vector.
8206 * target-debug.h
8207 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
8208 (target_debug_print_std_vector_static_tracepoint_marker): New.
8209 (target_debug_print_struct_static_tracepoint_marker_p): Rename
8210 to...
8211 (target_debug_print_static_tracepoint_marker_p): ... this.
8212 * target-delegates.c: Re-generate.
8213 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
8214 Make std::string.
8215 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
8216 (decode_static_tracepoint_spec): Adjust to std::vector.
8217 (tracepoint_print_one_detail): Adjust to std::string.
8218 (strace_marker_decode_location): Adjust to std::string.
8219 (update_static_tracepoint): Adjust to std::string, remove call
8220 to release_static_tracepoint_marker.
8221 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
8222 Adjust to std::vector.
8223 * remote.c (remote_static_tracepoint_marker_at): Return bool.
8224 (remote_static_tracepoint_markers_by_strid): Adjust to
8225 std::vector.
8226 * common/rsp-low.h (hex2str): New overload with explicit count
8227 of bytes.
8228 * common/rsp-low.c (hex2str): New overload with explicit count
8229 of bytes.
8230 * unittests/rsp-low-selftests.c (test_hex2str): New function.
8231 (_initialize_rsp_low_selftests): Add test_hex2str test.
8232 * unittests/tracepoint-selftests.c
8233 (test_parse_static_tracepoint_marker_definition): Adjust to
8234 std::string.
8235
8236 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8237
8238 * tracepoint.c (parse_static_tracepoint_marker_definition):
8239 Consider case where the definition is followed by more
8240 definitions.
8241 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8242 tracepoint-selftests.c.
8243 * unittests/tracepoint-selftests.c: New.
8244
8245 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8246
8247 * MAINTAINERS (Write After Approval): Add Pedro Franco de
8248 Carvalho.
8249
8250 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
8251
8252 * symtab.c (find_pc_sect_line): fixed indentation.
8253
8254 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
8255
8256 * symtab.c (find_pc_sect_line): now uses binary search.
8257
8258 2018-03-19 Tom Tromey <tom@tromey.com>
8259
8260 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
8261 "IDENT" production.
8262
8263 2018-03-19 Pedro Alves <palves@redhat.com>
8264 Tom Tromey <tom@tromey.com>
8265
8266 * unittests/observable-selftests.c: New file.
8267 * common/observable.h: New file.
8268 * observable.h: New file.
8269 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
8270 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
8271 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
8272 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
8273 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
8274 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
8275 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
8276 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
8277 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
8278 python/py-breakpoint.c, python/py-finishbreakpoint.c,
8279 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
8280 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
8281 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
8282 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
8283 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
8284 tui/tui-interp.c, valops.c: Update all users.
8285 * tui/tui-hooks.c (tui_bp_created_observer)
8286 (tui_bp_deleted_observer, tui_bp_modified_observer)
8287 (tui_inferior_exit_observer, tui_before_prompt_observer)
8288 (tui_normal_stop_observer, tui_register_changed_observer):
8289 Remove.
8290 (tui_observers_token): New global.
8291 (attach_or_detach, tui_attach_detach_observers): New functions.
8292 (tui_install_hooks, tui_remove_hooks): Use
8293 tui_attach_detach_observers.
8294 * record-btrace.c (record_btrace_thread_observer): Remove.
8295 (record_btrace_thread_observer_token): New global.
8296 * observer.sh: Remove.
8297 * observer.c: Rename to observable.c.
8298 * observable.c (namespace gdb_observers): Define new objects.
8299 (observer_debug): Move into gdb_observers namespace.
8300 (struct observer, struct observer_list, xalloc_observer_list_node)
8301 (xfree_observer_list_node, generic_observer_attach)
8302 (generic_observer_detach, generic_observer_notify): Remove.
8303 (_initialize_observer): Update.
8304 Don't include observer.inc.
8305 * Makefile.in (generated_files): Remove observer.h, observer.inc.
8306 (clean mostlyclean): Likewise.
8307 (observer.h, observer.inc): Remove targets.
8308 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
8309 (COMMON_SFILES): Use observable.c, not observer.c.
8310 * .gitignore: Remove observer.h.
8311
8312 2018-03-18 Tom Tromey <tom@tromey.com>
8313
8314 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
8315 gdb::def_vector.
8316 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
8317
8318 2018-03-17 Tom Tromey <tom@tromey.com>
8319
8320 * auto-load.c (auto_load_objfile_script_1): Use std::string.
8321
8322 2018-03-17 Tom Tromey <tom@tromey.com>
8323
8324 * target.c (class scoped_target_fd): New.
8325 (target_fileio_close_cleanup): Remove.
8326 (target_fileio_read_alloc_1): Use scoped_target_fd.
8327
8328 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
8329
8330 * silent-rules.mk: New.
8331 * Makefile.in: Include silent-rules.mk
8332 (srcdir, VPATH, top_srcdir): Move up.
8333 (COMPILE): Add ECHO_CXX.
8334 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
8335 (init.c): Add ECHO_INIT_C.
8336 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
8337 (version.c): Add ECHO_GEN.
8338 (printcmd.o): Add ECHO_CXX.
8339 (target-float.o): Add ECHO_CXX.
8340 (ada-exp.o): Add ECHO_CXX.
8341 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
8342 (insight$(EXEEXT)): Add ECHO_CXXLD.
8343 * gnulib/configure.ac: Add AM_SILENT_RULES.
8344 * gnulib/aclocal.m4: Re-generate.
8345 * gnulib/configure: Re-generate.
8346 * gnulib/import/Makefile.in: Re-generate.
8347
8348 2018-03-16 Tom Tromey <tom@tromey.com>
8349
8350 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
8351 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
8352 * utils.c (do_free_section_addr_info)
8353 (make_cleanup_free_section_addr_info): Remove.
8354 * symfile.h (struct other_sections): Add constructor.
8355 (struct section_addr_info): Remove.
8356 (section_addr_info): New typedef.
8357 (struct sym_fns) <sym_offsets>: Change type of parameter.
8358 (build_section_addr_info_from_objfile)
8359 (relative_addr_info_to_section_offsets, addr_info_make_relative)
8360 (default_symfile_offsets, symbol_file_add)
8361 (symbol_file_add_from_bfd)
8362 (build_section_addr_info_from_section_table): Update.
8363 (alloc_section_addr_info, free_section_addr_info): Don't declare.
8364 * symfile.c (alloc_section_addr_info): Remove.
8365 (build_section_addr_info_from_section_table): Change return type.
8366 Update.
8367 (build_section_addr_info_from_bfd)
8368 (build_section_addr_info_from_objfile): Likewise.
8369 (free_section_addr_info): Remove.
8370 (relative_addr_info_to_section_offsets): Change type of "addrs".
8371 (addrs_section_compar): Now a std::sort comparator.
8372 (addrs_section_sort): Change return type.
8373 (addr_info_make_relative): Change type of "addrs". Update.
8374 (default_symfile_offsets, syms_from_objfile_1)
8375 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
8376 (symbol_file_add_separate): Update.
8377 (symbol_file_add): Change type of "addrs". Update.
8378 (add_symbol_file_command): Update. Remove cleanups.
8379 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
8380 cleanups.
8381 * symfile-debug.c (debug_sym_offsets): Change type of "info".
8382 * solib.c (solib_read_symbols): Update.
8383 * objfiles.c (objfile_relocate): Update. Remove cleanups.
8384 * machoread.c (macho_symfile_offsets): Update.
8385 * jit.c (jit_bfd_try_read_symtab): Update.
8386
8387 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
8388
8389 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8390 unittests/utils-selftests.c.
8391 * unittests/utils-selftests.c: New file.
8392
8393 2018-03-14 Tom Tromey <tom@tromey.com>
8394
8395 PR cli/14977:
8396 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
8397 for NULL.
8398
8399 2018-03-14 Tom Tromey <tom@tromey.com>
8400
8401 PR cli/19918:
8402 * printcmd.c (printf_pointer): Allow "-" in format.
8403
8404 2018-03-14 Tom Tromey <tom@tromey.com>
8405
8406 * printcmd.c (_initialize_printcmd): Add usage to printf.
8407
8408 2018-03-14 Yao Qi <qiyao@sourceware.org>
8409
8410 * MAINTAINERS: Update my email address.
8411
8412 2018-03-13 Tom Tromey <tom@tromey.com>
8413
8414 * machoread.c (macho_check_dsym): Change filenamep to a
8415 std::string*.
8416 (macho_symfile_read): Update.
8417 * symfile.c (load_command): Use std::string.
8418
8419 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
8420
8421 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
8422 to error message string.
8423 (riscv_register_name): Use xsnprintf instead of sprintf.
8424 (riscv_insn::fetch_instruction): Use gdb_assert instead of
8425 internal_error.
8426 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
8427 error.
8428 (riscv_push_dummy_call): Likewise.
8429
8430 2018-03-12 Tom Tromey <tom@tromey.com>
8431
8432 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
8433 Use gdb::byte_vector.
8434 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
8435
8436 2018-03-12 Yao Qi <yao.qi@linaro.org>
8437
8438 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
8439 parameter type to readable_regcache.
8440 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
8441 the declaration.
8442
8443 2018-03-11 Tom Tromey <tom@tromey.com>
8444
8445 * dwarf2read.c (struct nextfield): Add initializers.
8446 (struct nextfnfield): Remove.
8447 (struct fnfieldlist): Add initializers. Remove "length" and
8448 "head", use std::vector.
8449 (struct decl_field_list): Remove.
8450 (struct field_info): Add initializers.
8451 <fields, baseclasses>: Now std::vector.
8452 <nbaseclasses, nfnfields, typedef_field_list_count,
8453 nested_types_list_count>: Remove.
8454 (dwarf2_add_field, dwarf2_add_type_defn)
8455 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
8456 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
8457 (process_structure_scope): Update.
8458
8459 2018-03-11 Tom Tromey <tom@tromey.com>
8460
8461 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
8462 for use by std::sort.
8463 (build_type_psymtabs_1): Use std::vector.
8464
8465 2018-03-09 Eli Zaretskii <eliz@gnu.org>
8466
8467 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
8468 and LIBMPFR in the printed configuration.
8469
8470 2018-03-08 Tom Tromey <tom@tromey.com>
8471
8472 * source.c (get_filename_and_charpos): Use scoped_fd.
8473 * nto-procfs.c (procfs_open_1): Use scoped_fd.
8474 (procfs_pidlist): Likewise.
8475 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
8476 (iterate_over_mappings): Likewise.
8477
8478 2018-03-08 Tom Tromey <tom@tromey.com>
8479
8480 * infcall.c (struct call_return_meta_info)
8481 <stack_temporaries_enabled>: Remove.
8482 (get_call_return_value, call_function_by_hand_dummy): Update.
8483 * thread.c (disable_thread_stack_temporaries): Remove.
8484 (enable_thread_stack_temporaries): Remove.
8485 (thread_stack_temporaries_enabled_p): Return bool.
8486 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
8487 (get_last_thread_stack_temporary): Update.
8488 * eval.c (evaluate_subexp): Update.
8489 * gdbthread.h (class enable_thread_stack_temporaries): Now a
8490 class, not a function.
8491 (value_ptr, value_vec): Remove typedefs.
8492 (class thread_info) <stack_temporaries_enabled>: Now bool.
8493 <stack_temporaries>: Now a std::vector.
8494 (thread_stack_temporaries_enabled_p)
8495 (value_in_thread_stack_temporaries): Return bool.
8496
8497 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
8498
8499 * remote.c (putpkt_binary): Fix omitted bytes reporting.
8500 (getpkt_or_notif_sane_1): Likewise.
8501
8502 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8503
8504 * build-id.c (build_id_to_debug_bfd): Use std::string.
8505
8506 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8507
8508 * build-id.c (find_separate_debug_file_by_buildid): Return
8509 std::string.
8510 * build-id.h (find_separate_debug_file_by_buildid): Return
8511 std::string.
8512 * coffread.c (coff_symfile_read): Adjust to std::string.
8513 * elfread.c (elf_symfile_read): Adjust to std::string.
8514 * symfile.c (separate_debug_file_exists): Change parameter to
8515 std::string.
8516 (find_separate_debug_file): Return std::string.
8517 (find_separate_debug_file_by_debuglink): Return std::string.
8518 * symfile.h (find_separate_debug_file_by_debuglink): Return
8519 std::string.
8520
8521 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8522
8523 * common/xml-utils.c (xml_escape_text): Move code to...
8524 (xml_escape_text_append): ... this new function.
8525 * common/xml-utils.h (xml_escape_text_append): New declaration.
8526 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
8527 New function.
8528 (_initialize_xml_utils): register test_xml_escape_text_append as
8529 a selftest.
8530
8531 2018-03-07 Alan Hayward <alan.hayward@arm.com>
8532
8533 * defs.h: Remove MAX_REGISTER_SIZE.
8534 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
8535 asserts.
8536 * python/py-unwind.c (pyuw_sniffer): Likewise.
8537
8538 2018-03-07 Tom Tromey <tom@tromey.com>
8539
8540 * linux-tdep.c (linux_info_proc): Update.
8541 * target.h (struct target_ops) <to_fileio_readlink>: Return
8542 optional<string>.
8543 (target_fileio_readlink): Return optional<string>.
8544 * remote.c (remote_hostio_readlink): Return optional<string>.
8545 * inf-child.c (inf_child_fileio_readlink): Return
8546 optional<string>.
8547 * target.c (target_fileio_readlink): Return optional<string>.
8548
8549 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
8550
8551 * regcache.c (cooked_read_test): Add riscv to the list of
8552 architectures that have a save_reggroup.
8553
8554 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
8555
8556 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
8557 value is not a dynamic class object.
8558
8559 2018-03-06 Tom Tromey <tom@tromey.com>
8560
8561 * rust-exp.y: Formatting fixes.
8562
8563 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8564
8565 * riscv-tdep.c (riscv_register_name): Remove target description
8566 support.
8567 (riscv_gdbarch_init): Remove target description check.
8568
8569 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8570
8571 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
8572 comment.
8573 * riscv-tdep.h: Likewise.
8574
8575 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8576
8577 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
8578 (riscv_pseudo_register_write): Delete.
8579 (riscv_gdbarch_init): Remove all use of pseudo registers.
8580
8581 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8582
8583 * record-btrace.c (btrace_print_lines): Replace cleanup
8584 parameter with RAII equivalents.
8585 (btrace_insn_history): Replace cleanup with RAII equivalents.
8586 * ui-out.h (make_cleanup_ui_out_list_begin_end,
8587 make_cleanup_ui_out_tuple_begin_end): Remove.
8588 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
8589 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
8590 make_cleanup_ui_out_list_begin_end): Remove.
8591
8592 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8593
8594 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
8595 parameter types to std::vector. Use bool.
8596 (record_btrace_wait): Replace VEC(tp_t) with
8597 std::vector<thread_info *>.
8598 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
8599
8600 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8601
8602 * record-btrace.c (record_btrace_disable_callback): Remove.
8603 (struct scoped_btrace_disable): New.
8604 (record_btrace_open): Use scoped_btrace_disable.
8605
8606 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8607
8608 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
8609 reading values from registers.
8610
8611 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8612
8613 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
8614 where appropriate.
8615
8616 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8617
8618 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
8619 change parameter type. Use GDB's print functions, and use
8620 core_addr_to_string where appropriate.
8621 (riscv_push_dummy_call): Use core_addr_to_string where
8622 appropriate, update call to riscv_print_arg_location, and reindent
8623 a few lines.
8624 (riscv_return_value): Update call to riscv_print_arg_location.
8625
8626 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8627 Tim Newsome <tim@sifive.com>
8628 Albert Ou <a0u@eecs.berkeley.edu>
8629 Darius Rad <darius@bluespec.com>
8630
8631 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
8632 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
8633 (ALLDEPFILES): Add riscv-tdep.c
8634 * configure.tgt: Add riscv support.
8635 * riscv-tdep.c: New file.
8636 * riscv-tdep.h: New file.
8637 * NEWS: Mention new target.
8638 * MAINTAINERS: Add entry for riscv.
8639
8640 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8641
8642 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
8643 fields within aggregates.
8644
8645 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
8646
8647 * record-btrace.c (btrace_print_lines): Change type of flags to
8648 gdb_disassembly_flags.
8649
8650 2018-03-04 John Baldwin <jhb@FreeBSD.org>
8651
8652 * fbsd-nat.c: Include "inf-ptrace.h".
8653 (USE_SIGTRAP_SIGINFO): Conditionally define.
8654 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
8655 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
8656 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
8657 function.
8658 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
8659 Likewise.
8660 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
8661 Likewise.
8662 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
8663 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
8664 "supports_stopped_by_hw_breakpoint" target methods.
8665
8666 2018-03-04 John Baldwin <jhb@FreeBSD.org>
8667
8668 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
8669 * fbsd-nat.c (debug_fbsd_nat): New variable.
8670 (show_fbsd_nat_debug): New function.
8671 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
8672 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
8673
8674 2018-03-04 John Baldwin <jhb@FreeBSD.org>
8675
8676 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
8677 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
8678 prototype.
8679 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
8680 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
8681 method.
8682
8683 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8684
8685 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
8686 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
8687
8688 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8689
8690 * charset.c (struct charset_vector): New.
8691 (charsets): Change type to charset_vector.
8692 (find_charset_names): Adjust.
8693 (add_one): Adjust.
8694 (_initialize_charset): Adjust.
8695
8696 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8697
8698 * progspace.h (struct program_space) <deleted_solibs>: Change
8699 type to std::vector<std::string>.
8700 * progspace.c (clear_program_space_solib_cache): Adjust.
8701 * breakpoint.c (print_solib_event): Adjust.
8702 (check_status_catch_solib): Adjust.
8703 * solib.c (update_solib_list): Adjust.
8704 * ui-out.h (class ui_out) <field_string>: New overload.
8705 * ui-out.c (ui_out::field_string): New overload.
8706
8707 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8708
8709 * progspace.h (struct program_space): Add constructor and
8710 destructor, initialize fields.
8711 (add_program_space): Remove.
8712 * progspace.c (add_program_space): Rename to...
8713 (program_space::program_space): ... this.
8714 (release_program_space): Rename to...
8715 (program_space::~program_space): ... this.
8716 (delete_program_space): Use delete to delete program_space.
8717 (initialize_progspace): Use new to allocate program_space.
8718 * inferior.c (add_inferior_with_spaces): Likewise.
8719 (clone_inferior_command): Likewise.
8720 * infrun.c (follow_fork_inferior): Likewise.
8721 (handle_vfork_child_exec_or_exit): Likewise.
8722
8723 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8724
8725 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
8726 (delim_string_to_char_ptr_vec): Return std::vector of
8727 gdb::unique_xmalloc_ptr.
8728 (dirnames_to_char_ptr_vec_append): Take std::vector of
8729 gdb::unique_xmalloc_ptr.
8730 (dirnames_to_char_ptr_vec): Return std::vector of
8731 gdb::unique_xmalloc_ptr.
8732 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
8733 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
8734 (delim_string_to_char_ptr_vec): Return an std::vector of
8735 gdb::unique_xmalloc_ptr, adjust the code.
8736 (dirnames_to_char_ptr_vec_append): Take an std::vector of
8737 gdb::unique_xmalloc_ptr, adjust the code.
8738 (dirnames_to_char_ptr_vec): Return an std::vector of
8739 gdb::unique_xmalloc_ptr, adjust the code.
8740 * auto-load.c (auto_load_safe_path_vec): Change type to
8741 std::vector of gdb::unique_xmalloc_ptr.
8742 (auto_load_expand_dir_vars): Return an std::vector of
8743 gdb::unique_xmalloc_ptr, adjust the code.
8744 (auto_load_safe_path_vec_update): Adjust.
8745 (filename_is_in_auto_load_safe_path_vec): Adjust.
8746 (auto_load_objfile_script_1): Adjust.
8747 * build-id.c (build_id_to_debug_bfd): Adjust.
8748 * linux-thread-db.c (thread_db_load_search): Adjust.
8749 * source.c (add_path): Adjust.
8750 (openp): Adjust.
8751 * symfile.c (find_separate_debug_file): Adjust.
8752 * utils.c (do_free_char_ptr_vec): Remove.
8753 (make_cleanup_free_char_ptr_vec): Remove.
8754
8755 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
8756
8757 PR gdb/22907
8758 * common/pathstuff.c: Conditionally include "<windows.h>".
8759
8760 2018-03-01 Georg Sauthoff <mail@georg.so>
8761
8762 PR gdb/22888
8763 * gcore.in: Quote variables and switch interpreter to bash.
8764
8765 2018-03-01 Tom Tromey <tom@tromey.com>
8766
8767 * dwarf2read.c (alloc_discriminant_info): Fix default_index
8768 assertion. Add assertion for discriminant_index.
8769 (quirk_rust_enum): Use correct base type name in univariant case.
8770
8771 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
8772
8773 * record.c (get_call_history_modifiers): Return a
8774 record_print_flags.
8775 (cmd_record_call_history): Adjust.
8776 * record-btrace.c (record_btrace_call_history): Adjust.
8777 (record_btrace_call_history_range): Adjust.
8778 (record_btrace_call_history_from): Adjust.
8779 * target-debug.h (target_debug_print_record_print_flags): New.
8780 * target-delegates.c: Re-generate.
8781 * target.c (target_call_history): Change flags type.
8782 (target_call_history_from): Likewise.
8783 (target_call_history_range): Likewise.
8784 * target.h (struct target_ops) <target_call_history>: Likewise.
8785 (target_call_history_from): Likewise.
8786 (target_call_history_range): Likewise.
8787
8788 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
8789 Simon Marchi <simon.marchi@polymtl.ca>
8790
8791 * common/common-utils.c: Include "sys/stat.h".
8792 (is_regular_file): Move here from "source.c"; change return
8793 type to "bool".
8794 * common/common-utils.h (is_regular_file): New prototype.
8795 * common/pathstuff.c (contains_dir_separator): New function.
8796 * common/pathstuff.h (contains_dir_separator): New prototype.
8797 * source.c: Don't include "sys/stat.h".
8798 (is_regular_file): Move to "common/common-utils.c".
8799
8800 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
8801
8802 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
8803 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
8804 * auto-load.c: Include "common/pathstuff.h".
8805 * common/common-def.h (current_directory): Move here.
8806 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
8807 function.
8808 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
8809 prototype.
8810 * common/pathstuff.c: New file.
8811 * common/pathstuff.h: New file.
8812 * compile/compile.c: Include "common/pathstuff.h".
8813 * defs.h (current_directory): Move to "common/common-defs.h".
8814 * dwarf2read.c: Include "common/pathstuff.h".
8815 * exec.c: Likewise.
8816 * guile/scm-safe-call.c: Likewise.
8817 * linux-thread-db.c: Likewise.
8818 * main.c: Likewise.
8819 * nto-tdep.c: Likewise.
8820 * objfiles.c: Likewise.
8821 * source.c: Likewise.
8822 * symtab.c: Likewise.
8823 * utils.c: Include "common/pathstuff.h".
8824 (gdb_realpath): Move to "common/pathstuff.c".
8825 (gdb_realpath_keepfile): Likewise.
8826 (gdb_abspath): Likewise.
8827 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
8828 (gdb_realpath_keepfile): Likewise.
8829 (gdb_abspath): Likewise.
8830
8831 2018-02-28 John Baldwin <jhb@FreeBSD.org>
8832
8833 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
8834 wildcard process pid for super_resume for kernels with a
8835 specific bug.
8836
8837 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
8838
8839 * compile/compile.c (get_args): Add additional comments
8840 explaining function.
8841
8842 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
8843 Tom Tromey <tom@tromey.com>
8844
8845 * target.h (memory_write_request_s): Remove typedef. Don't define
8846 VEC.
8847 (target_write_memory_blocks): Change argument to std::vector.
8848 (struct memory_write_request): Add constructor.
8849 * target-memory.c (compare_block_starting_address): Return bool.
8850 Change argument types.
8851 (claim_memory): Change arguments to use std::vector.
8852 (split_regular_and_flash_blocks, blocks_to_erase)
8853 (compute_garbled_blocks): Likewise.
8854 (cleanup_request_data, cleanup_write_requests_vector): Remove.
8855 (target_write_memory_blocks): Change argument to std::vector.
8856 * symfile.c (struct load_section_data): Add constructor and
8857 destructor. Use std::vector for "requests".
8858 (struct load_progress_data): Add initializers.
8859 (load_section_callback): Update. Use "new".
8860 (clear_memory_write_data): Remove.
8861 (generic_load): Update.
8862
8863 2018-02-27 Alan Hayward <alan.hayward@arm.com>
8864
8865 * arch/aarch64.h: Use common/tdesc.h.
8866
8867 2018-02-26 Maciej W. Rozycki <macro@mips.com>
8868
8869 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
8870 architecture with a 64-bit ABI.
8871
8872 2018-02-26 Maciej W. Rozycki <macro@mips.com>
8873
8874 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
8875 ahead of target description loading.
8876
8877 2018-02-26 Tom Tromey <tom@tromey.com>
8878
8879 * stack.c (backtrace_command_1): Update.
8880 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
8881 of "flags".
8882 * python/py-framefilter.c (py_print_frame)
8883 (gdbpy_apply_frame_filter): Change type of "flags".
8884 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
8885 of "flags".
8886 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
8887 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
8888 * extension.h (enum frame_filter_flag): Rename from
8889 frame_filter_flags.
8890 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
8891 (apply_ext_lang_frame_filter): Change type of "flags".
8892 * extension.c (apply_ext_lang_frame_filter): Change type of
8893 "flags".
8894 * extension-priv.h (struct extension_language_ops)
8895 <apply_frame_filter>: Change type of "flags".
8896
8897 2018-02-26 Tom Tromey <tom@tromey.com>
8898
8899 PR python/16497:
8900 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
8901 off-by-one in py_end computation.
8902 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
8903 PRINT_MORE_FRAMES.
8904 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
8905 constant.
8906
8907 2018-02-26 Tom Tromey <tom@tromey.com>
8908
8909 * dwarf2read.c (struct variant_field): New.
8910 (struct nextfield) <variant>: New field.
8911 (dwarf2_add_field): Handle DW_TAG_variant_part.
8912 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
8913 discriminated union.
8914 (read_structure_type): Handle DW_TAG_variant_part.
8915 (handle_struct_member_die): New function, extracted from
8916 process_structure_scope. Handle DW_TAG_variant.
8917 (process_structure_scope): Handle discriminated unions. Call
8918 handle_struct_member_die.
8919
8920 2018-02-26 Tom Tromey <tom@tromey.com>
8921
8922 * rust-lang.h (rust_last_path_segment): Declare.
8923 * rust-lang.c (rust_last_path_segment): Now public. Change
8924 contract.
8925 (struct disr_info): Remove.
8926 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
8927 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
8928 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
8929 (rust_enum_p, rust_enum_variant): New function.
8930 (rust_underscore_fields): Remove "offset" parameter.
8931 (rust_print_enum): New function.
8932 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
8933 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
8934 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
8935 enums.
8936 (rust_internal_print_type): New function, from rust_print_type.
8937 Remove enum code.
8938 (rust_print_type): Call rust_internal_print_type.
8939 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
8940 Update enum handling.
8941 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
8942 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
8943 (rust_union_quirks): New functions.
8944 (process_full_comp_unit, process_full_type_unit): Call
8945 rust_union_quirks.
8946 (process_structure_scope): Update rust_unions if necessary.
8947
8948 2018-02-26 Tom Tromey <tom@tromey.com>
8949
8950 * value.h (value_union_variant): Declare.
8951 * valops.c (value_union_variant): New function.
8952 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
8953 (struct discriminant_info): New.
8954 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
8955 enumerator.
8956 (struct main_type) <flag_discriminated_union>: New field.
8957
8958 2018-02-26 Tom Tromey <tom@tromey.com>
8959
8960 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8961 unittests/unpack-selftests.c.
8962 * unittests/unpack-selftests.c: New file.
8963 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
8964
8965 2018-02-26 Yao Qi <yao.qi@linaro.org>
8966
8967 * dwarf2read.c (struct partial_die_info) <read>: New method.
8968 (read_partial_die): Remove the declaration.
8969 (load_partial_dies): Update.
8970 (partial_die_info::partial_die_info):
8971 (read_partial_die): Change it to partial_die_info::read.
8972
8973 2018-02-26 Yao Qi <yao.qi@linaro.org>
8974
8975 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
8976 (fixup_partial_die): Remove declaration.
8977 (scan_partial_symbols): Update.
8978 (partial_die_parent_scope): Likewise.
8979 (partial_die_full_name): Likewise.
8980 (fixup_partial_die): Change it to partial_die_info::fixup.
8981
8982 2018-02-26 Yao Qi <yao.qi@linaro.org>
8983
8984 * dwarf2read.c (read_partial_die): Update the declaration.
8985 (load_partial_dies): Caller update.
8986 (read_partial_die): Remove one argument abbrev_len.
8987
8988 2018-02-26 Yao Qi <yao.qi@linaro.org>
8989
8990 * dwarf2read.c (struct partial_die_info): Add ctor, delete
8991 assignment operator.
8992 (load_partial_dies): Use ctor and copy ctor.
8993 (read_partial_die): Update.
8994 (dwarf2_cu::find_partial_die): Use ctor.
8995
8996 2018-02-26 Yao Qi <yao.qi@linaro.org>
8997
8998 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
8999 (find_partial_die_in_comp_unit): Change it to
9000 dwarf2_cu::find_partial_die.
9001 (find_partial_die): Update.
9002
9003 2018-02-26 Yao Qi <yao.qi@linaro.org>
9004
9005 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
9006 is NULL.
9007
9008 2018-02-26 Yao Qi <yao.qi@linaro.org>
9009
9010 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
9011
9012 2018-02-26 Alan Hayward <alan.hayward@arm.com>
9013
9014 * arch/amd64.h: Use common/tdesc.h.
9015 * arch/i386.c: Likewise.
9016 * arch/i386.h: Likewise.
9017 * arch/tic6x.c: Likewise.
9018 * arch/tdesc.h: Move file from here...
9019 * common/tdesc.h: ...to here.
9020 * features/aarch64-core.c: Regenerate.
9021 * features/aarch64-fpu.c: Regenerate.
9022 * features/i386/32bit-avx.c: Regenerate.
9023 * features/i386/32bit-avx512.c: Regenerate.
9024 * features/i386/32bit-core.c: Regenerate.
9025 * features/i386/32bit-linux.c: Regenerate.
9026 * features/i386/32bit-mpx.c: Regenerate.
9027 * features/i386/32bit-pkeys.c: Regenerate.
9028 * features/i386/32bit-sse.c: Regenerate.
9029 * features/i386/64bit-avx.c: Regenerate.
9030 * features/i386/64bit-avx512.c: Regenerate.
9031 * features/i386/64bit-core.c: Regenerate.
9032 * features/i386/64bit-linux.c: Regenerate.
9033 * features/i386/64bit-mpx.c: Regenerate.
9034 * features/i386/64bit-pkeys.c: Regenerate.
9035 * features/i386/64bit-segments.c: Regenerate.
9036 * features/i386/64bit-sse.c: Regenerate.
9037 * features/i386/x32-core.c: Regenerate.
9038 * features/tic6x-c6xp.c: Regenerate.
9039 * features/tic6x-core.c: Regenerate.
9040 * features/tic6x-gp.c: Regenerate.
9041 * target-descriptions.c: Use common/tdesc.h.
9042 * target-descriptions.h: Likewise.
9043
9044 2018-02-24 Tom Tromey <tom@tromey.com>
9045
9046 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
9047 (try_thread_db_load_from_dir, thread_db_load_search): Use
9048 std::string.
9049 (info_auto_load_libthread_db_compare): Return bool. Change
9050 argument types.
9051 (info_auto_load_libthread_db): Use std::vector, std::string.
9052 Remove cleanups.
9053
9054 2018-02-24 Tom Tromey <tom@tromey.com>
9055
9056 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
9057 std::string.
9058 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
9059 std::string*.
9060 * gdbarch.c: Rebuild.
9061 * gdbarch.h: Rebuild.
9062 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
9063 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
9064 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
9065 std::string*.
9066
9067 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
9068
9069 * gdbtypes.h (sect_offset): Change type to uint64_t.
9070 (sect_offset_str): New function.
9071 * dwarf2read.c (create_addrmap_from_aranges): Use
9072 sect_offset_str.
9073 (error_check_comp_unit_head): Likewise.
9074 (create_debug_type_hash_table): Likewise.
9075 (read_cutu_die_from_dwo): Likewise.
9076 (init_cutu_and_read_dies): Likewise.
9077 (init_cutu_and_read_dies_no_follow): Likewise.
9078 (process_psymtab_comp_unit_reader): Likewise.
9079 (partial_die_parent_scope): Likewise.
9080 (peek_die_abbrev): Likewise.
9081 (process_queue): Likewise.
9082 (dwarf2_physname): Likewise.
9083 (read_namespace_alias): Likewise.
9084 (read_import_statement): Likewise.
9085 (create_dwo_cu_reader): Likewise.
9086 (create_cus_hash_table): Likewise.
9087 (lookup_dwo_cutu): Likewise.
9088 (inherit_abstract_dies): Likewise.
9089 (read_func_scope): Likewise.
9090 (read_call_site_scope): Likewise.
9091 (dwarf2_add_member_fn): Likewise.
9092 (read_common_block): Likewise.
9093 (read_module_type): Likewise.
9094 (read_typedef): Likewise.
9095 (read_subrange_type): Likewise.
9096 (load_partial_dies): Likewise.
9097 (read_partial_die): Likewise.
9098 (find_partial_die): Likewise.
9099 (read_str_index): Likewise.
9100 (dwarf2_string_attr): Likewise.
9101 (build_error_marker_type): Likewise.
9102 (lookup_die_type): Likewise.
9103 (dump_die_shallow): Likewise.
9104 (follow_die_ref): Likewise.
9105 (dwarf2_fetch_die_loc_sect_off): Likewise.
9106 (dwarf2_fetch_constant_bytes): Likewise.
9107 (follow_die_sig): Likewise.
9108 (get_signatured_type): Likewise.
9109 (get_DW_AT_signature_type): Likewise.
9110 (dwarf2_find_containing_comp_unit): Likewise.
9111 (set_die_type): Likewise.
9112
9113 2018-02-21 John Baldwin <jhb@FreeBSD.org>
9114
9115 * arch/aarch64.c: Include "common-defs.h".
9116 * arch/amd64.c: Likewise.
9117 * arch/i386.c: Likewise.
9118
9119 2018-02-21 Tom Tromey <tom@tromey.com>
9120
9121 * value.h: (extract_field_op): Update.
9122 * eval.c (extract_field_op): Return a const char *.
9123 * expression.h (parse_expression_for_completion): Update.
9124 * completer.c (complete_expression): Update.
9125 (add_struct_fields): Make fieldname const.
9126 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
9127 (mark_completion_tag, parse_exp_in_context_1): Update.
9128 (parse_expression_for_completion): Change "name" to
9129 unique_xmalloc_ptr*.
9130
9131 2018-02-21 Tom Tromey <tom@tromey.com>
9132
9133 * infcall.c (call_function_by_hand_dummy): Use std::vector.
9134
9135 2018-02-21 Yao Qi <yao.qi@linaro.org>
9136
9137 * avr-tdep.c (avr_read_pc): Change parameter type to
9138 readable_regcache.
9139 * gdbarch.sh (read_pc): Likewise.
9140 * gdbarch.c: Re-generated.
9141 * gdbarch.h: Re-generated.
9142 * hppa-tdep.c (hppa_read_pc): Change parameter type to
9143 readable_regcache.
9144 * ia64-tdep.c (ia64_read_pc): Likewise.
9145 * mips-tdep.c (mips_read_pc): Likewise.
9146 * spu-tdep.c (spu_read_pc): Likewise.
9147
9148 2018-02-21 Yao Qi <yao.qi@linaro.org>
9149
9150 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
9151 * regcache-dump.c: New file.
9152 * regcache.c: Move register_dump to regcache-dump.c.
9153 (maintenance_print_registers): Likewise.
9154 (maintenance_print_raw_registers): Likewise.
9155 (maintenance_print_cooked_registers): Likewise.
9156 (maintenance_print_register_groups): Likewise.
9157 (maintenance_print_remote_registers): Likewise.
9158 (_initialize_regcache): Likewise.
9159 * regcache.h (register_dump): Moved from regcache.c.
9160
9161 2018-02-21 Yao Qi <yao.qi@linaro.org>
9162
9163 * regcache.c (regcache::regcache): Update.
9164 (regcache::invalidate): Move it to detached_regcache::invalidate.
9165 (get_thread_arch_aspace_regcache): Update.
9166 (regcache::raw_update): Update.
9167 (regcache::cooked_read): Remove some code.
9168 (regcache::cooked_read_value): Likewise.
9169 (regcache::raw_write): Remove assert on m_readonly_p.
9170 (regcache::raw_supply_integer): Move it to
9171 detached_regcache::raw_supply_integer.
9172 (regcache::raw_supply_zeroed): Likewise.
9173 * regcache.h (detached_regcache) <raw_supply_integer>: New
9174 declaration.
9175 <raw_supply_zeroed, invalidate>: Likewise.
9176 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
9177 <invalidate>: Likewise.
9178 <m_readonly_p>: Removed.
9179
9180 2018-02-21 Yao Qi <yao.qi@linaro.org>
9181
9182 * infcmd.c (get_return_value): Let stop_regs point to
9183 get_current_regcache.
9184 * regcache.c (regcache::regcache): Remove.
9185 (register_dump_reg_buffer): New class.
9186 (regcache_print): Adjust.
9187 * regcache.h (regcache): Remove constructors.
9188
9189 2018-02-21 Yao Qi <yao.qi@linaro.org>
9190
9191 * regcache.c (class register_dump): New class.
9192 (register_dump_regcache, register_dump_none): New class.
9193 (register_dump_remote, register_dump_groups): New class.
9194 (regcache_print): Update.
9195 * regcache.h (regcache_dump_what): Move it to regcache.c.
9196 (regcache) <dump>: Remove.
9197
9198 2018-02-21 Yao Qi <yao.qi@linaro.org>
9199
9200 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
9201 reg_buffer_rw *.
9202 (jit_unwind_reg_set_impl): Call raw_supply.
9203 (jit_frame_sniffer): Use reg_buffer_rw.
9204 * record-full.c (record_full_core_regbuf): Change its type.
9205 (record_full_core_open_1): Use reg_buffer_rw.
9206 (record_full_close): Likewise.
9207 (record_full_core_fetch_registers): Use regcache->raw_supply.
9208 (record_full_core_store_registers): Likewise.
9209 * regcache.c (regcache::get_register_status): Move it to
9210 reg_buffer.
9211 (regcache_raw_set_cached_value): Remove.
9212 (regcache::raw_set_cached_value): Remove.
9213 (regcache::raw_write): Call raw_supply.
9214 (regcache::raw_supply): Move it to reg_buffer_rw.
9215 * regcache.h (regcache_raw_set_cached_value): Remove.
9216 (reg_buffer_rw): New class.
9217
9218 2018-02-21 Yao Qi <yao.qi@linaro.org>
9219
9220 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
9221 readonly_detached_regcache.
9222 (dummy_frame_prev_register): Use regcache->cooked_read.
9223 * frame.c (frame_save_as_regcache): Change return type.
9224 (frame_pop): Update.
9225 * frame.h (frame_save_as_regcache): Update declaration.
9226 * inferior.h (get_infcall_suspend_state_regcache): Update
9227 declaration.
9228 * infrun.c (infcall_suspend_state) <registers>: use
9229 readonly_detached_regcache.
9230 (save_infcall_suspend_state): Don't use regcache_dup.
9231 (get_infcall_suspend_state_regcache): Change return type.
9232 * linux-fork.c (struct fork_info) <savedregs>: Change to
9233 readonly_detached_regcache.
9234 <pc>: New field.
9235 (fork_save_infrun_state): Don't use regcache_dup.
9236 (info_checkpoints_command): Adjust.
9237 * mi/mi-main.c (register_changed_p): Update declaration.
9238 (mi_cmd_data_list_changed_registers): Use
9239 readonly_detached_regcache.
9240 (register_changed_p): Change parameter type to
9241 readonly_detached_regcache.
9242 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
9243 readonly_detached_regcache.
9244 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
9245 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
9246 New.
9247 (regcache::save): Move it to reg_buffer.
9248 (regcache::restore): Change parameter type.
9249 (regcache_dup): Remove.
9250 * regcache.h (reg_buffer) <save>: New method.
9251 (readonly_detached_regcache): New class.
9252 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
9253 readonly_detached_regcache.
9254 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
9255
9256 2018-02-21 Yao Qi <yao.qi@linaro.org>
9257
9258 * frame.c (frame_save_as_regcache): Use regcache method save.
9259 (frame_pop): Use regcache method restore.
9260 * infrun.c (restore_infcall_suspend_state): Likewise.
9261 * linux-fork.c (fork_load_infrun_state): Likewise.
9262 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
9263 save.
9264 * regcache.c (regcache_save): Remove.
9265 (regcache::restore): More asserts.
9266 (regcache_cpy): Remove.
9267 * regcache.h (regcache_save): Remove the declaration.
9268 (regcache::restore): Move from private to public.
9269 Remove the friend declaration of regcache_cpy.
9270 (regcache_cpy): Remove declaration.
9271
9272 2018-02-21 Yao Qi <yao.qi@linaro.org>
9273
9274 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
9275 parameter type to 'readable_regcache *'.
9276 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9277 * arm-tdep.c (arm_neon_quad_read): Likewise.
9278 (arm_pseudo_read): Likewise.
9279 * avr-tdep.c (avr_pseudo_register_read): Likewise.
9280 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9281 * frv-tdep.c (frv_pseudo_register_read): Likewise.
9282 * gdbarch.c: Re-generated.
9283 * gdbarch.h: Re-generated.
9284 * gdbarch.sh (pseudo_register_read): Change parameter type to
9285 'readable_regcache *'.
9286 (pseudo_register_read_value): Likewise.
9287 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
9288 (h8300_pseudo_register_read): Likewise.
9289 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
9290 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9291 (i386_pseudo_register_read_into_value): Likewise.
9292 (i386_pseudo_register_read_value): Likewise.
9293 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
9294 declaration.
9295 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
9296 * m32c-tdep.c (m32c_raw_read): Likewise.
9297 (m32c_read_flg): Likewise.
9298 (m32c_banked_register): Likewise.
9299 (m32c_banked_read): Likewise.
9300 (m32c_sb_read): Likewise.
9301 (m32c_part_read): Likewise.
9302 (m32c_cat_read): Likewise.
9303 (m32c_r3r2r1r0_read): Likewise.
9304 (m32c_pseudo_register_read): Likewise.
9305 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9306 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9307 (mep_pseudo_cr64_read): Likewise.
9308 (mep_pseudo_register_read): Likewise.
9309 * mips-tdep.c (mips_pseudo_register_read): Likewise.
9310 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9311 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9312 * regcache.c (regcache::raw_read): Move it to readable_regcache.
9313 (regcache::cooked_read): Likewise.
9314 (regcache::cooked_read_value): Likewise.
9315 (regcache_cooked_read_signed):
9316 (regcache::cooked_read): Likewise.
9317 * regcache.h (readable_regcache): New class.
9318 (regcache): Inherit readable_regcache. Move some methods to
9319 readable_regcache.
9320 * rl78-tdep.c (rl78_pseudo_register_read): Change
9321 parameter type to 'readable_regcache *'.
9322 * rs6000-tdep.c (do_regcache_raw_read): Remove.
9323 (e500_pseudo_register_read): Change parameter type to
9324 'readable_regcache *'.
9325 (dfp_pseudo_register_read): Likewise.
9326 (vsx_pseudo_register_read): Likewise.
9327 (efpr_pseudo_register_read): Likewise.
9328 * s390-tdep.c (s390_pseudo_register_read): Likewise.
9329 * sh-tdep.c (sh_pseudo_register_read): Likewise.
9330 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
9331 (sh64_pseudo_register_read): Likewise.
9332 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9333 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9334 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9335 (spu_pseudo_register_read): Likewise.
9336 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9337 (xtensa_pseudo_register_read): Likewise.
9338
9339 2018-02-21 Yao Qi <yao.qi@linaro.org>
9340
9341 * regcache.c (regcache::regcache): Call reg_buffer ctor.
9342 (regcache::arch): Move it to reg_buffer::arch.
9343 (regcache::register_buffer): Likewise.
9344 (regcache::assert_regnum): Likewise.
9345 (regcache::num_raw_registers): Likewise.
9346 * regcache.h (reg_buffer): New class.
9347 (regcache): Inherit reg_buffer.
9348
9349 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
9350
9351 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
9352 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
9353
9354 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
9355
9356 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
9357
9358 2018-02-19 Alan Hayward <alan.hayward@arm.com>
9359
9360 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
9361 (SFILES): Remove common/*.c files.
9362 (COMMON_OBS): Remove some *.o files built from common/*.c files.
9363 * common/common.host: Add common reference.
9364 * configure.ac: Likewise.
9365 * configure: Regenerate.
9366
9367 2018-02-16 Yao Qi <yao.qi@linaro.org>
9368
9369 * block.c (block_namespace_info): Inherit allocate_on_obstack.
9370 (block_initialize_namespace): Use new.
9371 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
9372 (dwarf2_free_objfile): Use delete.
9373 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
9374 (copy_type_recursive): Use new.
9375 * gdb_obstack.h (allocate_on_obstack): New.
9376
9377 2018-02-15 Yao Qi <yao.qi@linaro.org>
9378
9379 PR gdb/22849
9380 * inferior.c (exit_inferior_1): Reset inf->control.
9381
9382 2018-02-15 Joel Brobecker <brobecker@adacore.com>
9383
9384 * ada-lang.c (ada_to_fixed_value_create): Delete advance
9385 declaration.
9386
9387 2018-02-14 Pedro Alves <palves@redhat.com>
9388
9389 * frame-unwind.c (frame_unwind_try_unwinder): Always call
9390 frame_cleanup_after_sniffer on exception.
9391
9392 2018-02-14 Tom Tromey <tom@tromey.com>
9393
9394 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
9395 const.
9396 (solib_bfd_open): Make pathname const.
9397 * solib.c (solib_bfd_open): Make pathname const.
9398 * solib-spu.c (spu_bfd_fopen): Make name const.
9399 (spu_bfd_open): Make pathname const.
9400 * solib-darwin.c (darwin_bfd_open): Make pathname const.
9401 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
9402
9403 2018-02-14 Tom Tromey <tom@tromey.com>
9404
9405 * symfile.c (symfile_bfd_open): Update.
9406 * source.h (openp, source_full_path_of, find_and_open_source):
9407 Change argument type to unique_xmalloc_ptr.
9408 * source.c (openp): Take a unique_xmalloc_ptr.
9409 (source_full_path_of, find_and_open_source): Likewise.
9410 (open_source_file, symtab_to_fullname): Update.
9411 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
9412 unique_xmalloc_ptr.
9413 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
9414 (exec_file_find): Update.
9415 * psymtab.c (psymtab_to_fullname): Update.
9416 * nto-tdep.h (nto_find_and_open_solib): Update.
9417 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
9418 unique_xmalloc_ptr.
9419 * exec.c (exec_file_attach): Update.
9420 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
9421 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
9422
9423 2018-02-14 Tom Tromey <tom@tromey.com>
9424
9425 * solib.c: Include source.h.
9426 * nto-tdep.c: Include source.h.
9427 * mi/mi-cmd-env.c: Include source.h.
9428 * infcmd.c: Include source.h.
9429 * exec.c: Include source.h.
9430 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
9431 (add_path, directory_switch, source_path, init_source_path): Move
9432 declarations...
9433 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
9434 (add_path, directory_switch, source_path, init_source_path):
9435 ...here.
9436
9437 2018-02-14 Tom Tromey <tom@tromey.com>
9438
9439 * solist.h (exec_file_find, solib_find): Return
9440 unique_xmalloc_ptr.
9441 (solib_bfd_fopen): Take a const char *.
9442 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
9443 (exec_file_find, solib_find): Likewise.
9444 (solib_bfd_fopen): Do not take ownership of "pathname".
9445 (solib_bfd_open): Use unique_xmalloc_ptr.
9446 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
9447 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
9448 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
9449 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
9450
9451 2018-02-14 Joel Brobecker <brobecker@adacore.com>
9452
9453 * ada-lang.c (name_match_type_from_name): Remove reference to
9454 ada_name_for_lookup in function's documentation.
9455 * ada-lang.h (ada_name_for_lookup): Delete declaration.
9456
9457 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
9458
9459 * defs.h (enum openp_flags): New enum.
9460 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
9461 Move to enum openp_flags.
9462 (openp_flags): New enum flags.
9463 (openp): Change parameter type to openp_flags.
9464 * source.c (openp): Change parameter type to openp_flags.
9465 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
9466 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
9467
9468 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
9469
9470 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
9471 per-command.
9472
9473 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
9474
9475 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
9476 into...
9477 (class dwarf2_queue_guard): ...the destructor of this new class.
9478 (dw2_do_instantiate_symtab): Create instance of the new class
9479 dwarf2_queue_guard, remove cleanup.
9480
9481 2018-02-09 Tom Tromey <tom@tromey.com>
9482
9483 * source.c (find_source_lines): Don't reference past the end of
9484 the vector.
9485
9486 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9487
9488 * remote.c (remote_btrace_maybe_reopen): Change error message.
9489 * btrace.c (btrace_enable): Likewise.
9490 (parse_xml_btrace): Likewise.
9491 (parse_xml_btrace_conf): Likewise.
9492
9493 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9494
9495 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
9496 (linux_enable_pt, linux_enable_bts): Call
9497 diagnose_perf_event_open_fail.
9498
9499 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9500
9501 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
9502 Remove parameter and change return type. Update callers. Move it.
9503 (linux_enable_bts, linux_enable_pt): Improve error message.
9504 (linux_enable_pt): Remove zero buffer size check.
9505 (linux_enable_btrace): Improve error messages. Remove NULL return
9506 check.
9507
9508 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9509
9510 * btrace.c (btrace_enable): Remove target_supports_btrace call.
9511 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
9512 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
9513 (linux_supports_pt, linux_supports_btrace): Remove.
9514 (linux_enable_bts): Call cpu_supports_bts.
9515 * nat/linux-btrace.h (linux_supports_btrace): Remove.
9516 * remote.c (remote_supports_btrace): Remove.
9517 (init_remote_ops): Remove remote_supports_btrace.
9518 * target-delegates.c: Regenerated.
9519 * target.c (target_supports_btrace): Remove.
9520 * target.h (target_ops) <to_supports_btrace>: Remove
9521 (target_supports_btrace): Remove.
9522 * x86-linux-nat.c (x86_linux_create_target): Remove
9523 linux_supports_btrace.
9524
9525 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9526
9527 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
9528 btrace failed.
9529 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
9530 exception and use message in own exception.
9531
9532 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9533
9534 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
9535 (perf_event_pt_event_type): Use gdb_file_up.
9536 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
9537 scoped_fd, and scoped_mmap.
9538
9539 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9540
9541 * common/scoped_mmap.h: New.
9542 * unittests/scoped_mmap-selftest.c: New.
9543 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9544 unittests/scoped_mmap-selftest.c.
9545
9546 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9547
9548 * common/scoped_fd.h: New.
9549 * unittests/scoped_fd-selftest.c: New.
9550 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9551 unittests/scoped_fd-selftest.c.
9552
9553 2018-02-09 Tom Tromey <tom@tromey.com>
9554
9555 * auto-load.c (auto_load_section_scripts): Use
9556 gdb::unique_xmalloc_ptr.
9557
9558 2018-02-09 Tom Tromey <tom@tromey.com>
9559
9560 * auto-load.c (execute_script_contents): Use std::string.
9561
9562 2018-02-09 Joel Brobecker <brobecker@adacore.com>
9563
9564 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
9565 Python function, rather than a new command.
9566
9567 2018-02-08 Tom Tromey <tom@tromey.com>
9568
9569 * solib.c (solib_find_1): Use std::string.
9570 (solib_bfd_fopen): Use unique_xmalloc_ptr.
9571
9572 2018-02-08 Tom Tromey <tom@tromey.com>
9573
9574 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
9575
9576 2018-02-08 Tom Tromey <tom@tromey.com>
9577
9578 * source.c (find_source_lines): Use gdb::def_vector.
9579
9580 2018-02-08 Tom Tromey <tom@tromey.com>
9581
9582 * macrocmd.c (struct temporary_macro_definition): New.
9583 (macro_define_command): Use temporary_macro_definition. Remove
9584 cleanups.
9585 (free_macro_definition_ptr): Remove.
9586
9587 2018-02-08 Tom Tromey <tom@tromey.com>
9588
9589 * macroexp.c (maybe_expand): Use std::string.
9590
9591 2018-02-08 Tom Tromey <tom@tromey.com>
9592
9593 * macroexp.c (struct macro_buffer): Add initializers for some
9594 members.
9595 (init_buffer, init_shared_buffer, free_buffer)
9596 (free_buffer_return_text): Remove.
9597 (macro_buffer): New constructors.
9598 (~macro_buffer): New destructor.
9599 (macro_buffer::set_shared): New method.
9600 (macro_buffer::resize_buffer, macro_buffer::appendc)
9601 (macro_buffer::appendmem): Now methods, not free functions.
9602 (set_token, append_tokens_without_splicing, stringify)
9603 (macro_stringify): Update.
9604 (gather_arguments): Change return type. Remove argc_p argument,
9605 add args_ptr argument. Use std::vector.
9606 (substitute_args): Remove argc argument. Accept std::vector.
9607 (expand): Update. Use std::vector.
9608 (scan, macro_expand, macro_expand_next): Update.
9609
9610 2018-02-08 Tom Tromey <tom@tromey.com>
9611
9612 * symtab.c (default_collect_symbol_completion_matches_break_on):
9613 Use unique_xmalloc_ptr.
9614 * macroscope.h: (sal_macro_scope, user_macro_scope)
9615 (default_macro_scope): Return unique_xmalloc_ptr.
9616 * macroscope.c (sal_macro_scope, user_macro_scope)
9617 (default_macro_scope): Return unique_xmalloc_ptr.
9618 * macroexp.h (macro_expand, macro_expand_once): Return
9619 unique_xmalloc_ptr.
9620 * macroexp.c (macro_expand, macro_expand_once): Return
9621 unique_xmalloc_ptr.
9622 * macrocmd.c (macro_expand_command, macro_expand_once_command)
9623 (info_macro_command, info_macros_command): Use
9624 unique_xmalloc_ptr.
9625 * compile/compile-c-support.c (write_macro_definitions): Use
9626 unique_xmalloc_ptr.
9627 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
9628
9629 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
9630
9631 * value.c (value_static_field): Assign field type instead of
9632 containing type when returning an optimized out value.
9633
9634 2018-02-06 Yao Qi <yao.qi@linaro.org>
9635
9636 * ft32-tdep.c (ft32_read_pc): Remove.
9637 (ft32_write_pc): Remove.
9638 (ft32_gdbarch_init): Update.
9639 * m32r-tdep.c (m32r_read_pc): Remove.
9640 (m32r_gdbarch_init): Update.
9641 * mep-tdep.c (mep_read_pc): Remove.
9642 (mep_gdbarch_init): Update.
9643 * microblaze-tdep.c (microblaze_write_pc): Remove.
9644 (microblaze_gdbarch_init): Update.
9645 * mn10300-tdep.c (mn10300_read_pc): Remove.
9646 (mn10300_write_pc): Remove.
9647 (mn10300_gdbarch_init): Update.
9648 * moxie-tdep.c (moxie_read_pc): Remove.
9649 (moxie_write_pc): Remove.
9650 (moxie_gdbarch_init): Update.
9651
9652 2018-02-06 Yao Qi <yao.qi@linaro.org>
9653
9654 * expprint.c (print_subexp_standard): Handle
9655 OP_F77_UNDETERMINED_ARGLIST.
9656 (dump_subexp_body_standard): Likewise.
9657
9658 2018-02-05 Alan Hayward <alan.hayward@arm.com>
9659
9660 * target-descriptions.c (tdesc_element_visitor) Add empty
9661 implementations.
9662 (tdesc_type): Move make_gdb_type from here.
9663 (tdesc_type_builtin): Likewise.
9664 (tdesc_type_vector): Likewise.
9665 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
9666 (make_gdb_type_struct): Move from tdesc_type_with_fields.
9667 (make_gdb_type_union): Likewise.
9668 (make_gdb_type_flags): Likewise.
9669 (make_gdb_type_enum): Likewise.
9670 (make_gdb_type): New function.
9671 (tdesc_register_type): Use static make_gdb_type.
9672
9673 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
9674
9675 * infcmd.c (default_print_one_register_info): Align natural-format
9676 column values consistently one under another.
9677 (pad_to_column): New function.
9678
9679 2018-02-05 Joel Brobecker <brobecker@adacore.com>
9680
9681 * dwarf2read.c (dwarf2_physname): Move commment.
9682
9683 2018-02-01 Leszek Swirski <leszeks@google.com>
9684
9685 * varobj.c (varobj_formatted_print_options): Allow recursive
9686 pretty printing if pretty printing is enabled.
9687
9688 2018-02-01 Leszek Swirski <leszeks@google.com>
9689
9690 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
9691 names after a structop as a filename.
9692
9693 2018-02-01 Yao Qi <yao.qi@linaro.org>
9694
9695 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
9696 (arm_record_coproc_data_proc): Likewise.
9697
9698 2018-02-01 Yao Qi <yao.qi@linaro.org>
9699
9700 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
9701
9702 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
9703
9704 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
9705 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
9706
9707 2018-01-31 Pedro Alves <palves@redhat.com>
9708
9709 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
9710 * inflow.c (child_terminal_save_inferior): Wrap reference to
9711 tcgetpgrp in HAVE_TERMIOS_H.
9712 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
9713 _WIN32.
9714 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
9715 always iterate over all inferiors.
9716 (gdbsim_cntrl_c): Adjust.
9717 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
9718
9719 2018-01-31 Joel Brobecker <brobecker@adacore.com>
9720
9721 * gdbtypes.c (lookup_array_range_type): Make sure the array's
9722 index type is objfile-owned if the element type is as well.
9723
9724 2018-01-31 Joel Brobecker <brobecker@adacore.com>
9725
9726 GDB 8.1 released.
9727
9728 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
9729
9730 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
9731 "features/s390x-linux64.c".
9732 (_initialize_s390_linux_tdep): Remove initialization of tdescs
9733 s390_linux32 and s390x_linux64.
9734 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
9735 default tdesc.
9736 * s390-tdep.c: Include "features/s390-linux32.c" and
9737 "features/s390x-linux64.c".
9738 (s390_tdesc_valid): Add check for tdesc_has_registers.
9739 (s390_gdbarch_init): Make sure there is always a valid tdesc.
9740 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
9741 tdesc_s390x_linux64.
9742 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
9743 tdesc_s390x_linux64 to...
9744 * s390-tdep.h: ...here.
9745
9746 2018-01-30 Pedro Alves <palves@redhat.com>
9747
9748 PR gdb/13211
9749 * config.in, configure: Regenerate.
9750 * configure.ac: Check for getpgid.
9751 * go32-nat.c (go32_pass_ctrlc): New.
9752 (go32_target): Install it.
9753 * inf-child.c (inf_child_target): Install
9754 child_terminal_save_inferior, child_pass_ctrlc and
9755 child_interrupt.
9756 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
9757 (inf_ptrace_target): No longer install it.
9758 * infcmd.c (interrupt_target_1): Adjust.
9759 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
9760 (child_interrupt): Declare.
9761 (inferior::terminal_state): New.
9762 * inflow.c (struct terminal_info): Update comments.
9763 (inferior_process_group): Delete.
9764 (terminal_is_ours): Delete.
9765 (gdb_tty_state): New.
9766 (child_terminal_init): Adjust.
9767 (is_gdb_terminal, sharing_input_terminal_1)
9768 (sharing_input_terminal): New functions.
9769 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
9770 Set the process's actual process group in the foreground if
9771 possible. Handle is_ours_for_output/is_ours distinction. Don't
9772 mark terminal as the inferior's if not sharing GDB's terminal.
9773 Don't check attach_flag.
9774 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
9775 pass down a target_terminal_state.
9776 (child_terminal_save_inferior): New, factored out from ...
9777 (child_terminal_ours_1): ... this. Handle
9778 target_terminal_state::is_ours_for_output.
9779 (child_interrupt, child_pass_ctrlc): New.
9780 (inflow_inferior_exit): Clear the inferior's terminal_state.
9781 (copy_terminal_info): Copy the inferior's terminal state.
9782 (_initialize_inflow): Remove reference to terminal_is_ours.
9783 * inflow.h (inferior_process_group): Delete.
9784 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
9785 * procfs.c (procfs_target): Don't install procfs_interrupt.
9786 (procfs_interrupt): Delete.
9787 * remote.c (remote_serial_quit_handler): Adjust.
9788 (remote_interrupt): Remove ptid parameter. Adjust.
9789 * target-delegates.c: Regenerate.
9790 * target.c: Include "terminal.h".
9791 (target_terminal::terminal_state): Rename to ...
9792 (target_terminal::m_terminal_state): ... this.
9793 (target_terminal::init): Adjust.
9794 (target_terminal::inferior): Adjust to per-inferior
9795 terminal_state.
9796 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
9797 (target_terminal::ours, target_terminal::ours_for_output): Use
9798 target_terminal_is_ours_kind.
9799 (target_interrupt): Remove ptid parameter. Adjust.
9800 (default_target_pass_ctrlc): Adjust.
9801 * target.h (target_ops::to_terminal_save_inferior): New field.
9802 (target_ops::to_interrupt): Remove ptid_t parameter.
9803 (target_interrupt): Remove ptid_t parameter. Update comment.
9804 (target_pass_ctrlc): Update comment.
9805 * target/target.h (target_terminal_state): New scoped enum,
9806 factored out of ...
9807 (target_terminal::terminal_state): ... here.
9808 (target_terminal::inferior): Update comments.
9809 (target_terminal::restore_inferior): New.
9810 (target_terminal::is_inferior, target_terminal::is_ours)
9811 (target_terminal::is_ours_for_output): Adjust.
9812 (target_terminal::scoped_restore_terminal_state): Adjust to
9813 rename, and call restore_inferior() instead of inferior().
9814 (target_terminal::scoped_restore_terminal_state::m_state): Change
9815 type.
9816 (target_terminal::terminal_state): Rename to ...
9817 (target_terminal::m_terminal_state): ... this and change type.
9818
9819 2018-01-30 Pedro Alves <palves@redhat.com>
9820
9821 * linux-nat.c (wait_for_signal): New function.
9822 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
9823 directly.
9824 (async_terminal_is_ours)
9825 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
9826 (linux_nat_add_target): Don't override
9827 to_terminal_inferior/to_terminal_ours.
9828
9829 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
9830
9831 * remote.c (remote_follow_fork): Don't call "detach_inferior".
9832
9833 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
9834
9835 * dwarf2read.c (free_dwo_files): Add forward-declaration.
9836 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
9837 dwarf2_per_objfile_free here.
9838 (dwarf2_per_objfile_free): Remove.
9839 (_initialize_dwarf2_read): Don't register
9840 dwarf2_per_objfile_free as a registry cleanup.
9841
9842 2018-01-27 Eli Zaretskii <eliz@gnu.org>
9843
9844 Avoid compilation errors in MinGW native builds
9845
9846 The error is triggered by including python-internal.h, and the
9847 error message is:
9848
9849 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
9850 from build-gnulib/import/math.h:27,
9851 from d:/usr/Python26/include/pyport.h:235,
9852 from d:/usr/Python26/include/Python.h:58,
9853 from python/python-internal.h:94,
9854 from python/py-arch.c:24:
9855 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
9856 using ::hypot;
9857 ^~~~~
9858
9859 This happens because Python headers define 'hypot' to expand t
9860 '_hypot' in the Windows builds.
9861 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
9862 'hypoth'. This avoids a compilation error.
9863
9864 2018-01-26 Alan Hayward <alan.hayward@arm.com>
9865
9866 * MAINTAINERS (Write After Approval): Fix ordering.
9867
9868 2018-01-26 Alan Hayward <alan.hayward@arm.com>
9869
9870 * MAINTAINERS (Write After Approval): Add Alan Hayward.
9871
9872 2018-01-26 Alan Modra <amodra@gmail.com>
9873
9874 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
9875 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
9876 Remove nop. Make const. Comment.
9877 (powerpc32_plt_stub_so_2): New.
9878 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
9879 Correct count. Update uses.
9880 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
9881 Move common code reading PLT entry word. Correct
9882 powerpc32_plt_stub PLT address calculation.
9883 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
9884 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
9885 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
9886 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
9887 (ppc64_standard_linkage8): Likewise.
9888 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
9889 Correct insns description.
9890 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
9891
9892 2018-01-24 Pedro Alves <palves@redhat.com>
9893
9894 GCC PR libstdc++/83906
9895 * gdbtypes.c (operator==(const dynamic_prop &,
9896 const dynamic_prop &)): New.
9897 (operator==(const range_bounds &, const range_bounds &)): New.
9898 (check_types_equal): Use them instead of memcmp.
9899 * gdbtypes.h (operator==(const dynamic_prop &,
9900 const dynamic_prop &)): Declare.
9901 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
9902 (operator==(const range_bounds &, const range_bounds &)): Declare.
9903 (operator!=(const range_bounds &, const range_bounds &)): Declare.
9904
9905 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9906
9907 * s390-linux-tdep.c (s390_record_address_mask)
9908 (s390_record_calc_disp_common, s390_record_calc_disp)
9909 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
9910 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
9911 (s390_process_record): Move to s390-tdep.c.
9912 (s390_linux_init_abi_any): Adjust.
9913 * s390-tdep.c (s390_record_address_mask)
9914 (s390_record_calc_disp_common, s390_record_calc_disp)
9915 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
9916 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
9917 (s390_process_record): Moved from s390-linux-tdep.c
9918 (s390_gdbarch_init): Adjust.
9919
9920 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9921
9922 * s390-linux-nat.c (s390-tdep.h): New include.
9923 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
9924 (HFILES_NO_SRCDIR): Add s390-tdep.h.
9925 (ALLDEPFILES): Add s390-tdep.c.
9926 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
9927 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
9928 * s390-tdep.h: ...this. New file.
9929 * s390-linux-tdep.c (s390-tdep.h): New include.
9930 (_initialize_s390_tdep): Rename to...
9931 (_initialize_s390_linux_tdep): ...this and adjust.
9932 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
9933 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
9934 s390-tdep.h.
9935 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
9936 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
9937 (s390_is_partial_instruction, s390_software_single_step)
9938 (is_non_branch_ril, s390_displaced_step_copy_insn)
9939 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
9940 (s390_prologue_data, s390_addr, s390_store, s390_load)
9941 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
9942 (s390_register_call_saved, s390_guess_tracepoint_registers)
9943 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
9944 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
9945 (s390_pseudo_register_name, s390_pseudo_register_type)
9946 (s390_pseudo_register_read, s390_pseudo_register_write)
9947 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
9948 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
9949 (s390_addr_bits_remove, s390_address_class_type_flags)
9950 (s390_address_class_type_flags_to_name)
9951 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
9952 (s390_function_arg_float, s390_function_arg_vector)
9953 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
9954 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
9955 (s390_frame_align, s390_register_return_value, s390_return_value)
9956 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
9957 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
9958 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
9959 (s390_trad_frame_prev_register, s390_unwind_cache)
9960 (s390_prologue_frame_unwind_cache)
9961 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
9962 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
9963 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
9964 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
9965 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
9966 (s390_frame_base_address, s390_local_base_address)
9967 (s390_frame_base, s390_gcc_target_options)
9968 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
9969 (s390_validate_reg_range, s390_tdesc_valid)
9970 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
9971 * s390-tdep.c: ...this. New file.
9972
9973 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9974
9975 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
9976 (s390_process_record, s390_gdbarch_tdep_alloc)
9977 (s390_linux_init_abi_any): Use/set new hook.
9978
9979 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9980
9981 * s390-linux-tdep.c (osabi.h): New include.
9982 (s390_linux_init_abi_31, s390_linux_init_abi_64)
9983 (s390_linux_init_abi_any): New functions.
9984 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
9985
9986 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9987
9988 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
9989 tdesc_has_registers check
9990
9991 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9992
9993 * s390-linux-tdep.c (s390_tdesc_valid): New function.
9994 (s390_validate_reg_range): New macro.
9995 (s390_gdbarch_init): Adjust.
9996
9997 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9998
9999 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
10000 (s390_gdbarch_tdep_alloc): Adjust.
10001 (s390_gdbarch_init): Adjust.
10002
10003 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10004
10005 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
10006 <have_tdb>: Change type to bool.
10007 (s390_gdbarch_tdep_alloc): Adjust.
10008 (s390_gdbarch_init): Adjust.
10009
10010 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10011
10012 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
10013 (gdbarch_tdep) <have_upper, have_vx>: New fields.
10014 (s390_gdbarch_tdep_alloc): New function.
10015 (s390_gdbarch_init): Allocate tdep at start and use its fields
10016 instead of separate variables.
10017
10018 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10019
10020 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
10021 when looking for cached gdbarch and add comment for remaining.
10022
10023 2018-01-22 Pedro Alves <palves@redhat.com>
10024 Sergio Durigan Junior <sergiodj@redhat.com>
10025
10026 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
10027 case.
10028
10029 2018-01-22 Maciej W. Rozycki <macro@mips.com>
10030
10031 * MAINTAINERS: Update my company e-mail address.
10032
10033 2018-01-22 Yao Qi <yao.qi@linaro.org>
10034
10035 * regcache.c (cooked_write_test): New function.
10036 (_initialize_regcache): Register the test.
10037
10038 2018-01-22 Yao Qi <yao.qi@linaro.org>
10039
10040 * ia64-tdep.c (ia64_pseudo_register_read): Call
10041 regcache->cooked_read instead of regcache_cooked_read_unsigned.
10042 * m32c-tdep.c (m32c_cat_read): Likewise.
10043 (m32c_r3r2r1r0_read): Likewise.
10044 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10045 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10046
10047 2018-01-22 Yao Qi <yao.qi@linaro.org>
10048
10049 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
10050 method raw_read instead of regcache_raw_read.
10051 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10052 * arm-tdep.c (arm_neon_quad_read): Likewise.
10053 * avr-tdep.c (avr_pseudo_register_read): Likewise.
10054 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10055 * frv-tdep.c (frv_pseudo_register_read): Likewise.
10056 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
10057 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10058 (i386_pseudo_register_read_into_value): Likewise.
10059 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10060 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10061 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10062 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
10063 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
10064 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10065 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10066 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10067 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
10068
10069 2018-01-22 Yao Qi <yao.qi@linaro.org>
10070
10071 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
10072 * configure.tgt: Remove target mt.
10073 * mt-tdep.c: Remove.
10074 * regcache.c (cooked_read_test): Remove the check for mt.
10075
10076 2018-01-22 Yao Qi <yao.qi@linaro.org>
10077
10078 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
10079 instead of gdbarch_pseudo_register_read_value.
10080
10081 2018-01-22 Joel Brobecker <brobecker@adacore.com>
10082
10083 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
10084 language is Ada.
10085
10086 2018-01-22 Joel Brobecker <brobecker@adacore.com>
10087
10088 * linespec.c (create_sals_line_offset): Remove code that preserved
10089 the symtab_and_line's line number.
10090
10091 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10092
10093 * varobj.c (varobj_create): Don't set valid_block when creating a
10094 floating varobj.
10095
10096 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10097
10098 * varobj.c (varobj_create): Remove out of date comment.
10099
10100 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10101
10102 PR mi/20395
10103 * ada-exp.y (write_var_from_sym): Pass extra parameter when
10104 updating innermost block.
10105 * parse.c (innermost_block_tracker::update): Take extra type
10106 parameter, and check types match before updating innermost block.
10107 (write_dollar_variable): Update innermost block for registers.
10108 * parser-defs.h (enum innermost_block_tracker_type): New enum.
10109 (innermost_block_tracker::innermost_block_tracker): Initialise
10110 m_types member.
10111 (innermost_block_tracker::reset): Take type parameter.
10112 (innermost_block_tracker::update): Take type parameter, and pass
10113 type through as needed.
10114 (innermost_block_tracker::m_types): New member.
10115 * varobj.c (varobj_create): Pass type when reseting innermost
10116 block.
10117
10118 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10119
10120 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
10121 * ada-lang.c (resolve_subexp): Likewise.
10122 * breakpoint.c (set_breakpoint_condition) Likewise.
10123 (watch_command_1) Likewise.
10124 * c-exp.y (variable): Likewise.
10125 * d-exp.y (PrimaryExpression): Likewise.
10126 * f-exp.y (variable): Likewise.
10127 * go-exp.y (variable): Likewise.
10128 * m2-exp.y (variable): Likewise.
10129 * objfiles.c (objfile::~objfile): Likewise.
10130 * p-exp.y (variable): Likewise.
10131 * parse.c (innermost_block): Change type.
10132 * parser-defs.h (class innermost_block_tracker): New.
10133 (innermost_block): Change to innermost_block_tracker.
10134 * printcmd.c (display_command): Switch to innermost_block API.
10135 (do_one_display): Likewise.
10136 * rust-exp.y (do_one_display): Likewise.
10137 * symfile.c (clear_symtab_users): Likewise.
10138 * varobj.c (varobj_create): Switch to innermost_block API, replace
10139 use of innermost_block with block stored on varobj object.
10140
10141 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10142
10143 * expression.h (innermost_block): Remove declaration.
10144 * varobj.c: Add 'parser-defs.h' include.
10145
10146 2018-01-19 Tom Tromey <tom@tromey.com>
10147
10148 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
10149 symbols in the static and global blocks.
10150
10151 2018-01-19 James Clarke <jrtc27@jrtc27.com>
10152
10153 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
10154 gdb_ptrace.h, and move including gdb_wait.h ...
10155 * nat/linux-ptrace.h: ... to here.
10156
10157 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10158
10159 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
10160 inf_ptrace_detach_success.
10161 (inf_ptrace_detach_success): Add inferior parameter, use it
10162 instead of inferior_ptid, pass it to detach_inferior.
10163 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
10164 parameter.
10165 * inferior.c (detach_inferior): Add overload that takes an
10166 inferior object.
10167 * inferior.h (detach_inferior): Likewise.
10168 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
10169 use inferior_ptid, adjust call to inf_ptrace_detach_success.
10170 * linux-thread-db.c (thread_db_detach): Use inf parameter.
10171
10172 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10173
10174 * target.h (struct target_ops) <to_detach>: Add inferior
10175 parameter.
10176 (target_detach): Likewise.
10177 * target.c (dispose_inferior): Pass inferior down.
10178 (target_detach): Pass inferior down. Assert that it is equal to
10179 the current inferior.
10180 * aix-thread.c (aix_thread_detach): Pass inferior down.
10181 * corefile.c (core_file_command): Pass current_inferior() down.
10182 * corelow.c (core_detach): Add inferior parameter.
10183 * darwin-nat.c (darwin_detach): Likewise.
10184 * gnu-nat.c (gnu_detach): Likewise.
10185 * inf-ptrace.c (inf_ptrace_detach): Likewise.
10186 * infcmd.c (detach_command): Pass current_inferior() down to
10187 target_detach.
10188 * infrun.c (follow_fork_inferior): Pass parent_inf to
10189 target_detach.
10190 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
10191 target_detach.
10192 * linux-nat.c (linux_nat_detach): Add inferior parameter.
10193 * linux-thread-db.c (thread_db_detach): Likewise.
10194 * nto-procfs.c (procfs_detach): Likewise.
10195 * procfs.c (procfs_detach): Likewise.
10196 * record.c (record_detach): Likewise.
10197 * record.h (struct inferior): Forward-declare.
10198 (record_detach): Add inferior parameter.
10199 * remote-sim.c (gdbsim_detach): Likewise.
10200 * remote.c (remote_detach_1): Likewise.
10201 (remote_detach): Likewise.
10202 (extended_remote_detach): Likewise.
10203 * sol-thread.c (sol_thread_detach): Likewise.
10204 * target-debug.h (target_debug_print_inferior_p): New macro.
10205 * target-delegates.c: Re-generate.
10206 * top.c (kill_or_detach): Pass inferior down to target_detach.
10207 * windows-nat.c (windows_detach): Add inferior parameter.
10208
10209 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10210
10211 * target.h (struct target_ops) <to_detach>: Remove args
10212 parameter.
10213 (target_detach): Likewise.
10214 * target.c (dispose_inferior): Adjust.
10215 (target_detach): Remove args parameter, adjust.
10216 * aix-thread.c (aix_thread_detach): Adjust.
10217 * corefile.c (core_file_command): Adjust.
10218 * corelow.c (core_detach): Adjust.
10219 * darwin-nat.c (darwin_detach): Adjust.
10220 * gnu-nat.c (gnu_detach): Adjust.
10221 * inf-ptrace.c (inf_ptrace_detach): Adjust.
10222 * infcmd.c (detach_command): Adjust
10223 * infrun.c (follow_fork_inferior): Adjust.
10224 (handle_vfork_child_exec_or_exit): Adjust.
10225 * linux-fork.c (linux_fork_detach): Remove args parameter.
10226 * linux-fork.h (linux_fork_detach): Likewise.
10227 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
10228 * linux-thread-db.c (thread_db_detach): Likewise.
10229 * nto-procfs.c (procfs_detach): Likewise.
10230 * procfs.c (procfs_detach): Likewise.
10231 (do_detach): Remove signo parameter.
10232 * record.c (record_detach): Remove args parameter.
10233 * record.h (record_detach): Likewise.
10234 * remote-sim.c (gdbsim_detach): Likewise.
10235 * remote.c (remote_detach_1): Likewise.
10236 (remote_detach): Likewise.
10237 (extended_remote_detach): Likewise.
10238 * sol-thread.c (sol_thread_detach): Likewise.
10239 * target-delegates.c: Re-generate.
10240 * top.c (struct qt_args) <args>: Remove field.
10241 (kill_or_detach): Don't pass args.
10242 (quit_force): Don't set args.
10243 * windows-nat.c (windows_detach): Remove args parameter.
10244
10245 2018-01-19 Yao Qi <yao.qi@linaro.org>
10246
10247 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
10248 (arm_linux_init_abi): Install it.
10249
10250 2018-01-19 Yao Qi <yao.qi@linaro.org>
10251
10252 * osabi.c (gdb_osabi_names): Extend the regexp for
10253 arm-linux-gnueabihf.
10254
10255 2018-01-18 Yao Qi <yao.qi@linaro.org>
10256
10257 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
10258 m_abbrevs.
10259 (abbrev_table::add_abbrev): Update.
10260 (abbrev_table::lookup_abbrev): Update.
10261
10262 2018-01-18 Yao Qi <yao.qi@linaro.org>
10263
10264 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
10265
10266 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
10267
10268 * compile/compile.c (compile_to_object): Convert "triplet_rx"
10269 to "std::string".
10270
10271 2018-01-17 Tom Tromey <tom@tromey.com>
10272
10273 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
10274
10275 2018-01-17 Tom Tromey <tom@tromey.com>
10276
10277 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
10278 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
10279 (create_array_type_with_stride): Update.
10280 * dwarf2read.c (set_die_type): Update.
10281
10282 2018-01-17 Tom Tromey <tom@tromey.com>
10283
10284 * dwarf2read.c (delayed_method_info): Remove typedef.
10285 (dwarf2_cu::method_info): Now a std::vector.
10286 (add_to_method_list): Update.
10287 (free_delayed_list): Remove.
10288 (compute_delayed_physnames): Update.
10289 (process_full_comp_unit, process_full_type_unit): Clear the method
10290 list. Remove cleanups.
10291 (psymtab_include_file_name): Add name_holder parameter. Use
10292 unique_xmalloc_ptr.
10293 (dwarf_decode_lines): Update.
10294
10295 2018-01-17 Tom Tromey <tom@tromey.com>
10296 Simon Marchi <simon.marchi@ericsson.com>
10297
10298 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
10299 (dwarf2_per_objfile::free_cached_comp_units)
10300 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10301 (init_cutu_and_read_dies_no_follow): Update.
10302 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
10303 (dwarf2_cu::~dwarf2_cu): New.
10304 (free_heap_comp_unit, free_stack_comp_unit): Remove.
10305 (age_cached_comp_units, free_one_cached_comp_unit): Update.
10306
10307 2018-01-17 Tom Tromey <tom@tromey.com>
10308 Simon Marchi <simon.marchi@ericsson.com>
10309
10310 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
10311 (struct die_reader_specs) <abbrev_table>: New member.
10312 (struct abbrev_table): Add constructor.
10313 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
10314 <abbrev_obstack>: Now an auto_obstack.
10315 (abbrev_table_up): New typedef.
10316 (init_cu_die_reader): Add abbrev_table parameter.
10317 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
10318 Add result_dwo_abbrev_table.
10319 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10320 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
10321 Update.
10322 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
10323 parameter.
10324 (skip_children): Update.
10325 (abbrev_table::alloc_abbrev): Rename from
10326 abbrev_table_alloc_abbrev.
10327 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
10328 (abbrev_table::lookup_abbrev): Rename from
10329 abbrev_table_lookup_abbrev.
10330 (abbrev_table_read_table): Return abbrev_table_up.
10331 (abbrev_table_free, abbrev_table_free_cleanup)
10332 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
10333 (load_partial_dies): Update.
10334
10335 2018-01-17 Tom Tromey <tom@tromey.com>
10336
10337 * dwarf2read.c (dwarf2_compute_name): Update comment.
10338 (read_func_scope, read_variable): Update.
10339 (new_symbol): Remove.
10340 (new_symbol_full): Rename to new_symbol.
10341
10342 2018-01-17 Mike Gulick <mgulick@mathworks.com>
10343
10344 PR gdb/16577
10345 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
10346 a warning instead of throwing an error, set section size to 0 and return
10347 NULL.
10348 * gdb_bfd.h (gdb_bfd_map_section): Update description.
10349
10350 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
10351
10352 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
10353 std::string.
10354 (linux_ptrace_attach_fail_reason_string): Likewise.
10355 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
10356 Likewise.
10357 (linux_ptrace_attach_fail_reason_string): Likewise.
10358 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
10359
10360 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
10361
10362 * linux-nat.c (linux_nat_attach): Remove xstrdup.
10363
10364 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
10365
10366 PR gdb/21559
10367 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
10368 checking for fs_base/gs_base fields in struct user_regs_struct.
10369 * configure: Regenerate.
10370
10371 2018-01-17 Yao Qi <yao.qi@linaro.org>
10372
10373 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
10374 function.
10375 (aarch64_linux_init_abi): Install it to gdbarch hook
10376 gcc_target_options.
10377
10378 2018-01-15 Pedro Alves <palves@redhat.com>
10379
10380 * common/signals-state-save-restore.c
10381 (save_original_signals_state): Fix typos.
10382
10383 2017-01-12 Tom Tromey <tom@tromey.com>
10384 Sergio Durigan Junior <sergiodj@redhat.com>
10385
10386 * Makefile.in (install-only): Install gdb-add-index.
10387
10388 2018-01-12 John Baldwin <jhb@FreeBSD.org>
10389
10390 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
10391
10392 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
10393
10394 * infrun.c (keep_going_pass_signal): Clear step-over info when
10395 insert_breakpoints fails.
10396
10397 2018-01-11 Pedro Alves <palves@redhat.com>
10398
10399 PR gdb/22583
10400 * infrun.c (resume): Rename to ...
10401 (resume_1): ... this.
10402 (resume): Reimplement as wrapper around resume_1.
10403
10404 2018-01-11 Pedro Alves <palves@redhat.com>
10405
10406 PR remote/22597
10407 * remote.c (remote_parse_stop_reply): Default to the last-set
10408 general thread instead of to 'magic_null_ptid'.
10409
10410 2018-01-10 Pedro Alves <palves@redhat.com>
10411
10412 * language.h (language_get_symbol_name_matcher): Rename ...
10413 (get_symbol_name_matcher): ... this.
10414 * language.c (language_get_symbol_name_matcher): Ditto.
10415 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
10416 callers adjusted.
10417
10418 2018-01-10 Pedro Alves <palves@redhat.com>
10419
10420 PR gdb/22670
10421 * dwarf2read.c
10422 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
10423 Adjust to use language_get_symbol_name_matcher instead of
10424 language_defn::la_get_symbol_name_matcher.
10425 * language.c (language_get_symbol_name_matcher): If in Ada mode
10426 and the lookup name is a verbatim match, return Ada's matcher.
10427 * language.h (language_get_symbol_name_matcher): Adjust comment.
10428 (ada_lookup_name_info::verbatim_p):: New method.
10429
10430 2018-01-10 Pedro Alves <palves@redhat.com>
10431
10432 PR gdb/22670
10433 * ada-lang.c (ada_collect_symbol_completion_matches): If the
10434 minsym's language is language_auto or language_cplus, pass down
10435 language_ada instead.
10436 * symtab.c (compare_symbol_name): Don't frob symbol language here.
10437
10438 2018-01-10 Pedro Alves <palves@redhat.com>
10439
10440 PR gdb/22670
10441 * minsyms.c (linkage_name_str): New function.
10442 (iterate_over_minimal_symbols): Use it.
10443
10444 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10445
10446 * NEWS: Document that 'info proc' now works on FreeBSD.
10447
10448 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10449
10450 * configure.ac: Check for kinfo_getfile in libutil.
10451 * configure: Regenerate.
10452 * config.in: Regenerate.
10453 * fbsd-nat.c: Include "fbsd-tdep.h".
10454 (fbsd_fetch_cmdline): New.
10455 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
10456 rather than calling error.
10457 (fbsd_info_proc): New.
10458 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
10459 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
10460 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
10461
10462 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10463
10464 * fbsd-nat.c (struct free_deleter): Remove.
10465 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
10466
10467 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10468
10469 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
10470 NULL for an empty pathname.
10471
10472 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10473
10474 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
10475 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
10476 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
10477 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
10478 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
10479 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
10480 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
10481 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
10482 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
10483 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
10484 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
10485 (fbsd_core_fetch_timeval, fbsd_print_sigset)
10486 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
10487 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
10488 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
10489
10490 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
10491
10492 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
10493 (gnu_xfer_auxv): New function.
10494 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
10495 TARGET_OBJECT_AUXV.
10496
10497 2018-01-08 Yao Qi <yao.qi@linaro.org>
10498 Simon Marchi <simon.marchi@ericsson.com>
10499
10500 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
10501 common/selftest.c.
10502 (COMMON_OBS): Remove selftest.o.
10503 * configure.ac: Append selftest-arch.c and common/selftest.c to
10504 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
10505 * configure: Re-generated.
10506 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
10507 GDB_SELF_TEST.
10508 (maintenance_info_selftests): Likewise.
10509
10510 2018-01-08 Xavier Roirand <roirand@adacore.com>
10511
10512 * ada-valprint.c (val_print_packed_array_elements): Use
10513 proper number of elements when printing an array indexed
10514 by an enumeration type.
10515
10516 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10517
10518 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
10519 (dw2_get_file_names_reader): Adjust.
10520 (lookup_dwo_signatured_type): Adjust.
10521 (lookup_dwp_signatured_type): Adjust.
10522 (lookup_signatured_type): Adjust.
10523 (create_type_unit_group): Adjust.
10524 (get_type_unit_group): Adjust.
10525 (process_psymtab_comp_unit_reader): Adjust.
10526 (build_type_psymtabs_reader): Adjust.
10527 (scan_partial_symbols): Adjust.
10528 (add_partial_symbol): Adjust.
10529 (add_partial_subprogram): Adjust.
10530 (peek_die_abbrev): Adjust.
10531 (fixup_go_packaging): Adjust.
10532 (process_imported_unit_die): Adjust.
10533 (dwarf2_compute_name): Adjust.
10534 (dwarf2_physname): Adjust.
10535 (read_import_statement): Adjust.
10536 (handle_DW_AT_stmt_list): Adjust.
10537 (read_file_scope): Adjust.
10538 (read_func_scope): Adjust.
10539 (read_lexical_block_scope): Adjust.
10540 (read_call_site_scope): Adjust.
10541 (read_variable): Adjust.
10542 (dwarf2_rnglists_process): Adjust.
10543 (dwarf2_ranges_process): Adjust.
10544 (dwarf2_ranges_read): Adjust.
10545 (dwarf2_get_pc_bounds): Adjust.
10546 (dwarf2_record_block_ranges): Adjust.
10547 (dwarf2_add_field): Adjust.
10548 (dwarf2_add_member_fn): Adjust.
10549 (read_structure_type): Adjust.
10550 (process_structure_scope): Adjust.
10551 (read_enumeration_type): Adjust.
10552 (read_array_type): Adjust.
10553 (mark_common_block_symbol_computed): Adjust.
10554 (read_common_block): Adjust.
10555 (read_namespace_type): Adjust.
10556 (read_namespace): Adjust.
10557 (read_module_type): Adjust.
10558 (read_tag_pointer_type): Adjust.
10559 (read_tag_ptr_to_member_type): Adjust.
10560 (read_tag_string_type): Adjust.
10561 (read_subroutine_type): Adjust.
10562 (read_typedef): Adjust.
10563 (read_base_type): Adjust.
10564 (attr_to_dynamic_prop): Adjust.
10565 (read_subrange_type): Adjust.
10566 (read_unspecified_type): Adjust.
10567 (dwarf2_read_abbrevs): Adjust.
10568 (load_partial_dies): Adjust.
10569 (read_partial_die): Adjust.
10570 (find_partial_die): Adjust.
10571 (guess_partial_die_structure_name): Adjust.
10572 (fixup_partial_die): Adjust.
10573 (read_attribute_value): Adjust.
10574 (read_addr_index): Adjust.
10575 (read_addr_index_from_leb128): Adjust.
10576 (read_str_index): Adjust.
10577 (dwarf2_string_attr): Adjust.
10578 (get_debug_line_section): Adjust.
10579 (dwarf_decode_line_header): Adjust.
10580 (lnp_state_machine::check_line_address): Adjust.
10581 (dwarf_decode_lines_1): Adjust.
10582 (dwarf_decode_lines): Adjust.
10583 (dwarf2_start_symtab): Adjust.
10584 (var_decode_location): Adjust.
10585 (new_symbol_full): Adjust.
10586 (dwarf2_const_value_data): Adjust.
10587 (dwarf2_const_value_attr): Adjust.
10588 (dwarf2_const_value): Adjust.
10589 (die_type): Adjust.
10590 (die_containing_type): Adjust.
10591 (build_error_marker_type): Adjust.
10592 (lookup_die_type): Adjust.
10593 (guess_full_die_structure_name): Adjust.
10594 (anonymous_struct_prefix): Adjust.
10595 (determine_prefix): Adjust.
10596 (dwarf2_name): Adjust.
10597 (follow_die_ref_or_sig): Adjust.
10598 (follow_die_offset): Adjust.
10599 (follow_die_ref): Adjust.
10600 (follow_die_sig_1): Adjust.
10601 (follow_die_sig): Adjust.
10602 (get_signatured_type): Adjust.
10603 (get_DW_AT_signature_type): Adjust.
10604 (decode_locdesc): Adjust.
10605 (dwarf_decode_macros): Adjust.
10606 (cu_debug_loc_section): Adjust.
10607 (fill_in_loclist_baton): Adjust.
10608 (dwarf2_symbol_mark_computed): Adjust.
10609 (init_one_comp_unit): Don't assign
10610 dwarf2_cu::dwarf2_per_objfile.
10611 (set_die_type): Adjust.
10612
10613 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
10614
10615 * dwarf2read.c (struct mapped_debug_names): Add constructor.
10616 <dwarf2_per_objfile>: New field.
10617 (dwarf2_per_objfile): Remove global.
10618 (get_dwarf2_per_objfile): New function.
10619 (set_dwarf2_per_objfile): New function.
10620 (dwarf2_build_psymtabs_hard): Change objfile parameter to
10621 dwarf2_per_objfile.
10622 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
10623 (read_abbrev_offset): Likewise.
10624 (read_indirect_string): Likewise.
10625 (read_indirect_line_string): Likewise.
10626 (read_indirect_string_at_offset): Likewise.
10627 (read_indirect_string_from_dwz): Likewise.
10628 (dwarf2_find_containing_comp_unit): Change objfile parameter to
10629 dwarf2_per_objfile.
10630 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
10631 (create_all_comp_units): Change objfile parameter to
10632 dwarf2_per_objfile.
10633 (create_all_type_units): Likewise.
10634 (process_queue): Add dwarf2_per_objfile parameter.
10635 (read_and_check_comp_unit_head): Likewise.
10636 (lookup_dwo_unit_in_dwp): Likewise.
10637 (get_dwp_file): Likewise.
10638 (process_cu_includes): Likewise.
10639 (struct free_dwo_file_cleanup_data): New struct.
10640 (dwarf2_has_info): Use get_dwarf2_per_objfile and
10641 set_dwarf2_per_objfile.
10642 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
10643 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
10644 context, adjust calls.
10645 (dw2_instantiate_symtab): Likewise.
10646 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
10647 (dw2_get_cu): Likewise.
10648 (create_cu_from_index_list): Change objfile parameter to
10649 dwarf2_per_objfile.
10650 (create_cus_from_index_list): Get dwarf2_per_objfile from
10651 context, adjust calls.
10652 (create_cus_from_index): Likewise.
10653 (create_signatured_type_table_from_index): Change objfile
10654 parameter to dwarf2_per_objfile.
10655 (create_signatured_type_table_from_debug_names): Change objfile
10656 parameter to dwarf2_per_objfile.
10657 (create_addrmap_from_index): Likewise.
10658 (create_addrmap_from_aranges): Likewise.
10659 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
10660 (dw2_setup): Remove.
10661 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
10662 context.
10663 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
10664 get_dwarf2_per_objfile.
10665 (dw2_forget_cached_source_info): Likewise.
10666 (dw2_map_symtabs_matching_filename): Likewise.
10667 (struct dw2_symtab_iterator) <index>: Remove.
10668 <dwarf2_per_objfile>: New field.
10669 (dw2_symtab_iter_init): Replace index parameter with
10670 dwarf2_per_objfile.
10671 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
10672 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
10673 (dw2_print_stats): Likewise.
10674 (dw2_dump): Likewise.
10675 (dw2_expand_symtabs_for_function): Likewise.
10676 (dw2_expand_all_symtabs): Likewise.
10677 (dw2_expand_symtabs_with_fullname): Likewise.
10678 (dw2_expand_marked_cus): Replace index and objfile parameters
10679 with dwarf2_per_objfile.
10680 (dw_expand_symtabs_matching_file_matcher): Add
10681 dwarf2_per_objfile parameter and adjust calls.
10682 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
10683 adjust calls.
10684 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
10685 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
10686 adjust calls.
10687 (create_cus_from_debug_names_list): Replace objfile parameter
10688 with dwarf2_per_objfile and adjust calls.
10689 (create_cus_from_debug_names): Likewise.
10690 (dwarf2_read_debug_names): Likewise.
10691 (mapped_debug_names::namei_to_name): Adjust call.
10692 (dw2_debug_names_iterator::next): Likewise.
10693 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
10694 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
10695 (dw2_debug_names_dump): Likewise.
10696 (dw2_debug_names_expand_symtabs_for_function): Likewise.
10697 (dw2_debug_names_expand_symtabs_matching): Likewise.
10698 (dwarf2_initialize_objfile): Likewise.
10699 (dwarf2_build_psymtabs): Likewise.
10700 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
10701 this_cu.
10702 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
10703 (read_and_check_comp_unit_head): Likewise.
10704 (read_abbrev_offset): Likewise.
10705 (create_debug_type_hash_table): Likewise.
10706 (create_debug_types_hash_table): Likewise.
10707 (create_all_type_units): Replace objfile parameter with
10708 dwarf2_per_objfile.
10709 (add_type_unit): Add dwarf2_per_objfile parameter.
10710 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
10711 with dwarf2_per_objfile.
10712 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
10713 (lookup_dwp_signatured_type): Likewise.
10714 (lookup_signatured_type): Likewise.
10715 (read_cutu_die_from_dwo): Likewise.
10716 (init_tu_and_read_dwo_dies): Likewise.
10717 (init_cutu_and_read_dies): Likewise.
10718 (init_cutu_and_read_dies_no_follow): Likewise.
10719 (allocate_type_unit_groups_table): Add objfile parameter.
10720 (create_type_unit_group): Use dwarf2_per_objfile from cu.
10721 (get_type_unit_group): Likewise.
10722 (process_psymtab_comp_unit): Update call.
10723 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
10724 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
10725 (print_tu_stats): Likewise.
10726 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
10727 in void* parameter.
10728 (build_type_psymtabs): Change objfile parameter to
10729 dwarf2_per_objfile.
10730 (process_skeletonless_type_unit): Use dwarf2_per_objfile
10731 passed in void* parameter.
10732 (process_skeletonless_type_units): Change objfile parameter to
10733 dwarf2_per_objfile.
10734 (set_partial_user): Likewise.
10735 (dwarf2_build_psymtabs_hard): Likewise.
10736 (read_comp_units_from_section): Likewise.
10737 (create_all_comp_units): Likewise.
10738 (scan_partial_symbols): Update calls.
10739 (add_partial_symbol): Likewise.
10740 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
10741 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
10742 (process_queue): Add dwarf2_per_objfile parameter.
10743 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
10744 (compute_compunit_symtab_includes): Likewise.
10745 (process_cu_includes): Add dwarf2_per_objfile parameter.
10746 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
10747 (process_full_type_unit): Likewise.
10748 (process_imported_unit_die): Update call.
10749 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
10750 (read_file_scope): Likewise.
10751 (allocate_dwo_file_hash_table): Add objfile parameter.
10752 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
10753 (create_cus_hash_table): Likewise.
10754 (create_dwp_hash_table): Likewise.
10755 (create_dwo_unit_in_dwp_v1): Likewise.
10756 (create_dwp_v2_section): Likewise.
10757 (create_dwo_unit_in_dwp_v2): Likewise.
10758 (lookup_dwo_unit_in_dwp): Likewise.
10759 (try_open_dwop_file): Likewise.
10760 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
10761 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
10762 cleanup to include a reference to dwarf2_per_objfile.
10763 (open_dwp_file): Add dwarf2_per_objfile parameter.
10764 (open_and_init_dwp_file): Likewise.
10765 (get_dwp_file): Likewise.
10766 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
10767 (queue_and_load_all_dwo_tus): Update call.
10768 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
10769 data.
10770 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
10771 (dwarf2_ranges_process): Likewise.
10772 (dwarf2_get_pc_bounds): Likewise.
10773 (mark_common_block_symbol_computed): Likewise.
10774 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
10775 (dwarf2_read_abbrevs): Update call.
10776 (read_partial_die): Use dwarf2_per_objfile from cu.
10777 (find_partial_die): Likewise.
10778 (fixup_partial_die): Likewise.
10779 (read_attribute_value): Likewise.
10780 (read_indirect_string_at_offset_from): Add objfile parameter.
10781 (read_indirect_string_at_offset): Add dwarf2_per_objfile
10782 parameter.
10783 (read_indirect_string_from_dwz): Add objfile parameter.
10784 (read_indirect_string): Add objfile parameter.
10785 (read_addr_index_1): Add dwarf2_per_objfile parameter.
10786 (read_addr_index): Use dwarf2_per_objfile from cu.
10787 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
10788 call dw2_setup.
10789 (read_str_index): Use dwarf2_per_objfile from cu.
10790 (get_debug_line_section): Likewise.
10791 (read_formatted_entries): Add dwarf2_per_objfile parameter.
10792 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
10793 (new_symbol_full): Use dwarf2_per_objfile from cu.
10794 (build_error_marker_type): Likewise.
10795 (lookup_die_type): Likewise.
10796 (determine_prefix): Likewise.
10797 (follow_die_offset): Likewise.
10798 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
10799 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
10800 (dwarf2_fetch_die_type_sect_off): Likewise.
10801 (dwarf2_get_die_type): Likewise.
10802 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
10803 (get_signatured_type): Likewise.
10804 (get_DW_AT_signature_type): Likewise.
10805 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
10806 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
10807 (cu_debug_loc_section): Likewise.
10808 (fill_in_loclist_baton): Likewise.
10809 (dwarf2_symbol_mark_computed): Likewise.
10810 (dwarf2_find_containing_comp_unit): Change objfile parameter to
10811 dwarf2_per_objfile.
10812 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
10813 parameter.
10814 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
10815 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
10816 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
10817 (set_die_type): Use dwarf2_free_objfile from cu.
10818 (get_die_type_at_offset): Likewise.
10819 (dwarf2_per_objfile_free): Don't assign global variable.
10820 (debug_names) <constructor>: Add dwarf2_per_objfile
10821 parameter, update m_debugstrlookup construction.
10822 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
10823 parameter.
10824 <m_dwarf2_per_objfile>: New field.
10825 <lookup>: Use m_dwarf2_per_objfile.
10826 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
10827 (psyms_seen_size): Likewise.
10828 (write_gdbindex): Replace objfile parameter with
10829 dwarf2_per_objfile.
10830 (write_debug_names): Likewise.
10831 (write_psymtabs_to_index): Likewise.
10832 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
10833 calls.
10834
10835 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
10836
10837 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
10838 <dwarf2_per_objfile>: New field.
10839 (struct dwarf2_per_cu_data) <objfile>: Remove.
10840 <dwarf2_per_objfile>: New field.
10841 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
10842 of objfile.
10843 (create_signatured_type_table_from_index): Likewise.
10844 (create_debug_type_hash_table): Likewise.
10845 (fill_in_sig_entry_from_dwo_entry): Likewise.
10846 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
10847 (create_type_unit_group): Assign dwarf2_per_objfile instead of
10848 objfile.
10849 (create_partial_symtab): Access objfile through
10850 dwarf2_per_objfile.
10851 (process_psymtab_comp_unit_reader): Likewise.
10852 (read_comp_units_from_section): Likewise.
10853 (scan_partial_symbols): Likewise.
10854 (add_partial_symbol): Likewise.
10855 (add_partial_subprogram): Likewise.
10856 (peek_die_abbrev): Likewise.
10857 (fixup_go_packaging): Likewise.
10858 (process_full_comp_unit): Likewise.
10859 (process_full_type_unit): Likewise.
10860 (process_imported_unit_die): Likewise.
10861 (dwarf2_compute_name): Likewise.
10862 (dwarf2_physname): Likewise.
10863 (read_import_statement): Likewise.
10864 (create_cus_hash_table): Assign dwarf2_physname instead of
10865 objfile.
10866 (read_func_scope): Access objfile through dwarf2_per_objfile.
10867 (read_lexical_block_scope): Likewise.
10868 (read_call_site_scope): Likewise.
10869 (read_variable): Likewise.
10870 (dwarf2_rnglists_process): Likewise.
10871 (dwarf2_ranges_process): Likewise.
10872 (dwarf2_ranges_read): Likewise.
10873 (dwarf2_record_block_ranges): Likewise.
10874 (dwarf2_add_field): Likewise.
10875 (dwarf2_add_member_fn): Likewise.
10876 (read_structure_type): Likewise.
10877 (process_structure_scope): Likewise.
10878 (read_enumeration_type): Likewise.
10879 (read_array_type): Likewise.
10880 (read_common_block): Likewise.
10881 (read_namespace_type): Likewise.
10882 (read_namespace): Likewise.
10883 (read_module_type): Likewise.
10884 (read_tag_pointer_type): Likewise.
10885 (read_tag_ptr_to_member_type): Likewise.
10886 (read_tag_string_type): Likewise.
10887 (read_subroutine_type): Likewise.
10888 (read_typedef): Likewise.
10889 (read_base_type): Likewise.
10890 (attr_to_dynamic_prop): Likewise.
10891 (read_subrange_type): Likewise.
10892 (read_unspecified_type): Likewise.
10893 (load_partial_dies): Likewise.
10894 (read_partial_die): Likewise.
10895 (find_partial_die): Likewise.
10896 (guess_partial_die_structure_name): Likewise.
10897 (fixup_partial_die): Likewise.
10898 (read_attribute_value): Likewise.
10899 (read_addr_index_from_leb128): Likewise.
10900 (dwarf2_read_addr_index): Likewise.
10901 (dwarf2_string_attr): Likewise.
10902 (lnp_state_machine::check_line_address): Likewise.
10903 (dwarf_decode_lines_1): Likewise.
10904 (dwarf_decode_lines): Likewise.
10905 (dwarf2_start_symtab): Likewise.
10906 (var_decode_location): Likewise.
10907 (new_symbol_full): Likewise.
10908 (dwarf2_const_value_data): Likewise.
10909 (dwarf2_const_value_attr): Likewise.
10910 (dwarf2_const_value): Likewise.
10911 (die_type): Likewise.
10912 (die_containing_type): Likewise.
10913 (lookup_die_type): Likewise.
10914 (guess_full_die_structure_name): Likewise.
10915 (anonymous_struct_prefix): Likewise.
10916 (dwarf2_name): Likewise.
10917 (follow_die_ref_or_sig): Likewise.
10918 (follow_die_offset): Likewise.
10919 (follow_die_ref): Likewise.
10920 (dwarf2_fetch_die_loc_sect_off): Likewise.
10921 (dwarf2_fetch_constant_bytes): Likewise.
10922 (dwarf2_fetch_die_type_sect_off): Likewise.
10923 (dwarf2_get_die_type): Likewise.
10924 (follow_die_sig): Likewise.
10925 (decode_locdesc): Likewise.
10926 (dwarf2_per_cu_objfile): Likewise.
10927 (dwarf2_per_cu_text_offset): Likewise.
10928 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
10929 objfile.
10930 (set_die_type): Access objfile through
10931 dwarf2_per_objfile.
10932
10933 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
10934
10935 * valprint.c (converted_character_d): Remove typedef.
10936 (DEF_VEC_O (converted_character_d)): Remove.
10937 (count_next_character): Use std::vector.
10938 (print_converted_chars_to_obstack): Likewise.
10939 (generic_printstr): Likewise.
10940
10941 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10942
10943 * xml-support.h (struct gdb_xml_value): Add constructor.
10944 <value>: Change type to unique_xmalloc_ptr.
10945 (gdb_xml_value_s): Remove typedef.
10946 (DEF_VEC_O (gdb_xml_value_s)): Remove.
10947 (gdb_xml_element_start_handler): Change parameter type to
10948 std::vector.
10949 (xml_find_attribute): Likewise.
10950 * xml-support.c (xml_find_attribute): Change parameter type to
10951 std::vector and adjust.
10952 (gdb_xml_values_cleanup): Remove.
10953 (gdb_xml_parser::start_element): Adjust to std::vector.
10954 (xinclude_start_include): Change paraeter type to std::vector
10955 and adjust.
10956 * btrace.c (check_xml_btrace_version): Likewise.
10957 (parse_xml_btrace_block): Likewise.
10958 (parse_xml_btrace_pt_config_cpu): Likewise.
10959 (parse_xml_btrace_pt): Likewise.
10960 (parse_xml_btrace_conf_bts): Likewise.
10961 (parse_xml_btrace_conf_pt): Likewise.
10962 * memory-map.c (memory_map_start_memory): Likewise.
10963 (memory_map_start_property): Likewise.
10964 * osdata.c (osdata_start_osdata): Likewise.
10965 (osdata_start_item): Likewise.
10966 (osdata_start_column): Likewise.
10967 * remote.c (start_thread): Likewise.
10968 * solib-aix.c (library_list_start_library): Likewise.
10969 (library_list_start_list): Likewise.
10970 * solib-svr4.c (library_list_start_library): Likewise.
10971 (svr4_library_list_start_list): Likewise.
10972 * solib-target.c (library_list_start_segment): Likewise.
10973 (library_list_start_section): Likewise.
10974 (library_list_start_library): Likewise.
10975 (library_list_start_list): Likewise.
10976 * tracepoint.c (traceframe_info_start_memory): Likewise.
10977 (traceframe_info_start_tvar): Likewise.
10978 * xml-syscall.c (syscall_start_syscall): Likewise.
10979 * xml-tdesc.c (tdesc_start_target): Likewise.
10980 (tdesc_start_feature): Likewise.
10981 (tdesc_start_reg): Likewise.
10982 (tdesc_start_union): Likewise.
10983 (tdesc_start_struct): Likewise.
10984 (tdesc_start_flags): Likewise.
10985 (tdesc_start_enum): Likewise.
10986 (tdesc_start_field): Likewise.
10987 (tdesc_start_enum_value): Likewise.
10988 (tdesc_start_vector): Likewise.
10989
10990 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10991
10992 * extension.h (struct xmethod_worker) <clone>: Remove.
10993 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
10994 Remove.
10995 (python_xmethod_worker::clone): Remove.
10996 * valops.c (find_overload_match): Use std::move instead of
10997 clone.
10998
10999 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11000
11001 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
11002 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
11003 <free_xmethod_worker_data>: Remove.
11004 <get_matching_xmethod_workers>: Chance VEC to std::vector.
11005 <get_xmethod_arg_types>: Remove.
11006 <get_xmethod_result_type>: Remove.
11007 <invoke_xmethod>: Remove.
11008 * extension.c (new_xmethod_worker): Remove.
11009 (clone_xmethod_worker): Remove.
11010 (get_matching_xmethod_workers): Return void, pass std::vector by
11011 pointer.
11012 (get_xmethod_arg_types): Rename to...
11013 (xmethod_worker::get_arg_types): ... this, and adjust.
11014 (get_xmethod_result_type): Rename to...
11015 (xmethod_worker::get_result_type): ... this, and adjust.
11016 (invoke_xmethod): Remove.
11017 (free_xmethod_worker): Remove.
11018 (free_xmethod_worker_vec): Remove.
11019 * extension.h (enum ext_lang_rc): Move here from
11020 extension-priv.h.
11021 (struct xmethod_worker): Add constructor and destructor.
11022 <data>: Remove.
11023 <value>: Remove.
11024 <invoke, clone, do_get_result_type, do_get_arg_types>: New
11025 virtual pure methods.
11026 <get_arg_types, get_result_type>: New methods.
11027 (xmethod_worker_ptr): Remove typedef.
11028 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
11029 (xmethod_worker_vec): Remove typedef.
11030 (xmethod_worker_up): New typedef.
11031 (invoke_xmethod): Remove.
11032 (clone_xmethod_worker): Remove.
11033 (free_xmethod_worker): Remove.
11034 (free_xmethod_worker_vec): Remove.
11035 (get_xmethod_arg_types): Remove.
11036 (get_xmethod_result_type): Remove.
11037 * valops.c (find_method_list): Use std::vector, don't use
11038 intermediate vector.
11039 (value_find_oload_method_list): Use std::vector.
11040 (find_overload_match): Use std::vector.
11041 (find_oload_champ): Use std::vector.
11042 * value.c (value_free): Use operator delete.
11043 (value_of_xmethod): Rename to...
11044 (value_from_xmethod): ... this. Don't assign
11045 xmethod_worker::value, take rvalue-reference.
11046 (result_type_of_xmethod): Adjust.
11047 (call_xmethod): Adjust.
11048 * value.h: Include extension.h.
11049 (struct xmethod_worker): Don't forward-declare.
11050 (value_of_xmethod): Rename to...
11051 (value_from_xmethod): ... this, take rvalue-reference.
11052 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
11053 (struct python_xmethod_worker): ... this, add constructor and
11054 destructor.
11055 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
11056 (gdbpy_free_xmethod_worker_data): Rename to...
11057 (python_xmethod_worker::~python_xmethod_worker): ... this and
11058 adjust.
11059 (gdbpy_clone_xmethod_worker_data): Rename to...
11060 (python_xmethod_worker::clone): ... this and adjust.
11061 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
11062 temporary vector.
11063 (gdbpy_get_xmethod_arg_types): Rename to...
11064 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
11065 (gdbpy_get_xmethod_result_type): Rename to...
11066 (python_xmethod_worker::do_get_result_type): ... this and
11067 adjust.
11068 (gdbpy_invoke_xmethod): Rename to...
11069 (python_xmethod_worker::invoke): ... this and adjust.
11070 (new_python_xmethod_worker): Rename to...
11071 (python_xmethod_worker::python_xmethod_worker): ... this and
11072 adjust.
11073 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
11074 Remove.
11075 (gdbpy_free_xmethod_worker_data): Remove.
11076 (gdbpy_get_matching_xmethod_workers): Use std::vector.
11077 (gdbpy_get_xmethod_arg_types): Remove.
11078 (gdbpy_get_xmethod_result_type): Remove.
11079 (gdbpy_invoke_xmethod): Remove.
11080 * python/python.c (python_extension_ops): Remove obsolete
11081 callbacks.
11082
11083 2018-01-05 Pedro Alves <palves@redhat.com>
11084
11085 PR gdb/18653
11086 * common/signals-state-save-restore.c
11087 (save_original_signals_state): New parameter 'quiet'. Warn if we
11088 find a custom handler preinstalled, instead of internal erroring.
11089 But only warn if !quiet.
11090 * common/signals-state-save-restore.h
11091 (save_original_signals_state): New parameter 'quiet'.
11092 * main.c (captured_main_1): Move save_original_signals_state call
11093 after option handling, and pass QUIET.
11094
11095 2018-01-05 Pedro Alves <palves@redhat.com>
11096
11097 * spu-tdep.c (spu_catch_start): Pass
11098 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
11099
11100 2018-01-05 Pedro Alves <palves@redhat.com>
11101
11102 PR gdb/22670
11103 * ada-lang.c (literal_symbol_name_matcher): New function.
11104 (ada_get_symbol_name_matcher): Use it for
11105 symbol_name_match_type::SEARCH_NAME.
11106 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
11107 it down instead of assuming symbol_name_match_type::FULL.
11108 * block.h (block_lookup_symbol): New parameter 'match_type'.
11109 * c-valprint.c (print_unpacked_pointer): Use
11110 lookup_symbol_search_name instead of lookup_symbol.
11111 * compile/compile-object-load.c (get_out_value_type): Pass down
11112 symbol_name_match_type::SEARCH_NAME.
11113 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
11114 symbol_name_match_type::FULL.
11115 * cp-support.c (cp_get_symbol_name_matcher): Handle
11116 symbol_name_match_type::SEARCH_NAME.
11117 * infrun.c (insert_exception_resume_breakpoint): Use
11118 lookup_symbol_search_name.
11119 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
11120 * psymtab.c (maintenance_check_psymtabs): Use
11121 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
11122 * stack.c (print_frame_args): Use lookup_symbol_search_name and
11123 SYMBOL_SEARCH_NAME.
11124 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
11125 if symbol_name_match_type::SEARCH_NAME.
11126 (lookup_symbol_in_language): Pass down
11127 symbol_name_match_type::FULL.
11128 (lookup_symbol_search_name): New.
11129 (lookup_language_this): Pass down
11130 symbol_name_match_type::SEARCH_NAME.
11131 (lookup_symbol_aux, lookup_local_symbol): New parameter
11132 'match_type'. Pass it down.
11133 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
11134 (lookup_symbol_search_name): New declaration.
11135 (lookup_symbol_in_block): New 'match_type' parameter.
11136
11137 2018-01-05 Pedro Alves <palves@redhat.com>
11138
11139 PR gdb/22670
11140 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
11141 ada_lookup_symbol.
11142 (ada_lookup_symbol): Reimplement in terms of
11143 ada_lookup_symbol_list, bits factored out from
11144 ada_lookup_encoded_symbol.
11145
11146 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11147
11148 * ada-exp.y (write_object_renaming): When subscripting an array
11149 using a symbol as the index, pass the block in call to
11150 ada_lookup_encoded_symbol when looking that symbol up.
11151
11152 2018-01-05 Jerome Guitton <guitton@adacore.com>
11153
11154 * ada-lang.c (ada_array_length): Use ada_index_type instead of
11155 TYPE_INDEX_TYPE.
11156
11157 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11158
11159 * ada-lang.c (ada_to_fixed_value_create): Add handling of
11160 the case where VALUE_LVAL (val0) is not lval_memory.
11161
11162 2018-01-05 Xavier Roirand <roirand@adacore.com>
11163
11164 * ada-valprint.c (print_optional_low_bound): Handle
11165 character-indexed array printing like boolean-indexed array
11166 printing.
11167
11168 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11169
11170 * NEWS: Create a new section for the next release branch.
11171 Rename the section of the current branch, now that it has
11172 been cut.
11173
11174 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11175
11176 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
11177 * version.in: Bump version to 8.1.50.DATE-git.
11178
11179 2018-01-03 Xavier Roirand <roirand@adacore.com>
11180
11181 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
11182 Add field.
11183 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
11184 Add field.
11185 (default_exception_support_info) <catch_handlers_sym>: Add field.
11186 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
11187 (ada_exception_name_addr_1): Add "catch handlers" handling.
11188 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
11189 Update all callers.
11190 (create_excep_cond_exprs) <ex>: Add parameter.
11191 (re_set_exception): Update create_excep_cond_exprs call.
11192 (print_it_exception, print_one_exception, print_mention_exception)
11193 (print_recreate_exception): Add "catch handler" handling.
11194 (allocate_location_catch_handlers, re_set_catch_handlers)
11195 (check_status_catch_handlers, print_it_catch_handlers)
11196 (print_one_catch_handlers, print_mention_catch_handlers)
11197 (print_recreate_catch_handlers): New function.
11198 (catch_handlers_breakpoint_ops): New variable.
11199 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
11200 Add parameter. Add "catch handler" handling.
11201 (ada_exception_sym_name, ada_exception_breakpoint_ops):
11202 Add "catch handler" handling.
11203 (ada_exception_catchpoint_cond_string): Add "catch handler"
11204 handling.
11205 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
11206 call.
11207 (catch_ada_handlers_command): New function.
11208 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
11209 operations structure.
11210 (_initialize_ada_language): Add "catch handlers" command entry.
11211 * NEWS: Document "catch handlers" feature.
11212
11213 2018-01-02 Joel Brobecker <brobecker@adacore.com>
11214
11215 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
11216 account when creating the array type of the slice.
11217 (ada_value_slice): Likewise.
11218
11219 2018-01-02 Joel Brobecker <brobecker@adacore.com>
11220
11221 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
11222 New enum value.
11223 (create_array_type_with_stride): Add byte_stride_prop parameter.
11224 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
11225 New parameter. Update all callers in this file.
11226 (array_type_has_dynamic_stride): New function.
11227 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
11228 of arrays with dynamic byte strides.
11229 * dwarf2read.c (read_array_type): Add support for dynamic
11230 DW_AT_byte_stride attributes.
11231
11232 2018-01-02 Joel Brobecker <brobecker@adacore.com>
11233
11234 * dwarf2read.c (read_unspecified_type): Treat
11235 DW_TAG_enumeration_type DIEs from Ada units as stubs.
11236
11237 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11238
11239 Update copyright year range in all GDB files.
11240
11241 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11242
11243 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
11244 and gdb/testsuite/gdb.base/step-line.c.
11245
11246 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11247
11248 * copyright.py (main): Dump the contents of
11249 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
11250 even if BY_HAND is empty.
11251
11252 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11253
11254 * top.c (print_gdb_version): Update Copyright year in version
11255 message.
11256
11257 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11258
11259 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
11260
11261 For older changes see ChangeLog-2017.
11262 \f
11263 Local Variables:
11264 mode: change-log
11265 left-margin: 8
11266 fill-column: 74
11267 version-control: never
11268 coding: utf-8
11269 End:
This page took 0.263734 seconds and 4 git commands to generate.