Variable size for regs mask in collection list
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2
3 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
4 std::vector<unsigned char>.
5 * tracepoint.c (collection_list::collection_list): Remove
6 m_regs_mask initializer from initializer list. Resize
7 m_regs_mask using the largest remote register number.
8 (collection_list::add_remote_register): Remove size check on
9 m_regs_mask. Use at to access element.
10 (collection_list::stringify): Change type of temp_buf to
11 gdb::char_vector. Update uses of temp_buf. Resize if needed to
12 stringify the register mask. Use pack_hex_byte for the register
13 mask.
14
15 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
16
17 * tracepoint.h (class collection_list) <add_register>: Remove.
18 <add_remote_register, add_ax_registers, add_local_register>:
19 Declare.
20 <add_memrange>: Add scope parameter.
21 * tracepoint.c (encode_actions_1): Likewise.
22 (collection_list::add_register): Rename to ...
23 (collection_list::add_remote_register): ... this. Update
24 comment.
25 (collection_list::add_ax_registers, add_local_register): New
26 methods.
27 (collection_list::add_memrange): Add scope parameter. Call
28 add_local_register instead of add_register.
29 (finalize_tracepoint_aexpr): New function.
30 (collection_list::collect_symbol): Update calls to add_memrange.
31 Call add_local_register instead of add_register. Call
32 add_ax_registers. Call finalize_tracepoint_aexpr.
33 (encode_actions_1): Get remote regnos for $reg action. Call
34 add_remote_register, add_ax_registers, and add_local_register.
35 Update call to add_memrange. Call finalize_tracepoint_aexpr.
36 (validate_actionline): Call finalize_tracepoint_aexpr.
37
38 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
39
40 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
41 Replace array buf with gdb::char_vector buf, of size
42 get_remote_packet_size (). Replace references to buf and
43 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
44 and xsnprintf with snprintf. Raise errors if the buffer is too
45 small.
46
47 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
48
49 * remote.c (remote_target::download_tracepoint): Fix the has_more
50 predicate in the QTDP action list iteration.
51
52 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
53
54 * remote.c (remote_target::download_tracepoint): Fix indentation
55 in for block.
56
57 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
58
59 * proc-api.c (_initialize_proc_api): Remove c, unused.
60 * procfs.c (procfs_init_inferior): Remove signals, unused.
61 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
62 unused.
63
64 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
65 Andrew Burgess <andrew.burgess@embecosm.com>
66
67 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
68 'W_STOPCODE (0)' as this could be ambiguous.
69
70 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
71
72 * ser-tcp.c (net_open): Fix thinko when deciding whether to
73 disable TCP's Nagle algorithm (use "ai_protocol" instead of
74 "ai_socktype").
75
76 2018-08-02 Tom Tromey <tom@tromey.com>
77
78 PR symtab/16842.
79 * dwarf2read.c (read_func_scope): Set symtab on template parameter
80 symbols.
81 (process_structure_scope): Likewise.
82
83 2018-08-02 Xavier Roirand <roirand@adacore.com>
84
85 PR gdb/22629:
86 * darwin-nat.c (darwin_kill_inferior): Fix handling of
87 kill inferior.
88
89 2018-08-02 Tom Tromey <tom@tromey.com>
90
91 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
92 (darwin_suspend_inferior, darwin_resume_inferior)
93 (darwin_decode_notify_message, darwin_resume_inferior_threads)
94 (darwin_check_new_threads): Check result of get_darwin_inferior.
95
96 2018-07-31 Joel Brobecker <brobecker@adacore.com>
97
98 GDB 8.1.1 released.
99
100 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
101
102 * varobj.c (varobj_get_path_expr_parent): Report an error if
103 parent is a dynamic varobj.
104
105 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
106
107 * gnulib/aclocal.m4: Re-generate.
108 * gnulib/config.in: Re-generate.
109 * gnulib/configure: Re-generate.
110 * gnulib/import/Makefile.in: Re-generate.
111 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
112 * gnulib/import/m4/onceonly.m4: Re-generate.
113
114 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
115
116 * target-descriptions.c (struct xml_test_tdesc): New.
117 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
118 (record_xml_tdesc): Update.
119 (maintenance_check_xml_descriptions): Update.
120 * target-descriptions.h (record_xml_tdesc): Update comment.
121
122 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
123
124 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
125 checking array bounds are defined.
126
127 2018-07-30 Tom Tromey <tom@tromey.com>
128
129 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
130 irreflexivity violation.
131
132 2018-07-30 Tom Tromey <tom@tromey.com>
133
134 * cli/cli-decode.c (lookup_cmd): Remove lint code.
135 * value.c (unpack_long): Remove lint code.
136 * valops.c (value_ind): Remove lint code.
137 * valarith.c (value_x_binop, value_x_unop, value_equal)
138 (value_pos): Remove lint code.
139
140 2018-07-28 Tom de Vries <tdevries@suse.de>
141
142 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
143 with undefined upper bound as <optimized out>.
144
145 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
146
147 * gcore.in: Rename variable "name" to "prefix". Expand
148 "usage" text.
149
150 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
151
152 * windows-nat.c (windows_nat_target::create_inferior): Update to
153 call close() in global namespace.
154
155 2018-07-26 Tom Tromey <tom@tromey.com>
156
157 * dwarf-index-write.c (add_address_entry): Don't add objfile
158 offsets.
159 * dbxread.c (find_stab_function): Rename from
160 find_stab_function_addr. Return a bound_minimal_symbol.
161 (read_dbx_symtab): Use raw_text_low, raw_text_high.
162 Don't add objfile offsets.
163 (end_psymtab): Use raw_text_low, raw_text_high,
164 MSYMBOL_VALUE_RAW_ADDRESS.
165 (read_ofile_symtab): Update.
166 (process_one_symbol): Update.
167 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
168 offsets.
169 (dw2_relocate): Remove.
170 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
171 searching addrmap.
172 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
173 Update.
174 (process_psymtab_comp_unit_reader, add_partial_symbol)
175 (add_partial_subprogram, dwarf2_ranges_read): Update.
176 (load_partial_dies): Update.
177 (add_address_entry): Don't add objfile offsets.
178 (dwarf2_build_include_psymtabs): Update.
179 (create_addrmap_from_aranges): Don't add objfile offsets.
180 (dw2_find_pc_sect_compunit_symtab): Update.
181 * mdebugread.c (parse_symbol): Don't add objfile offsets.
182 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
183 Update.
184 (parse_partial_symbols): Don't add objfile offsets. Use
185 raw_text_low, raw_text_high. Update.
186 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
187 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
188 or call 'relocate' quick function. Clear psymbol_map.
189 * psympriv.h (struct partial_symbol) <address>: Add section
190 offset.
191 <set_unrelocated_address>: Rename from set_address.
192 <raw_text_low, raw_text_high>: New methods.
193 <text_low, text_high>: Add objfile parameter.
194 (add_psymbol_to_bcache): Add 'section' parameter. Call
195 set_unrelocated_address.
196 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
197 (find_pc_psymbol): Update.
198 (fixup_psymbol_section, relocate_psymtabs): Remove.
199 (dump_psymtab, psym_functions): Update.
200 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
201 parameter.
202 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
203 (start_psymtab_common): Update.
204 * symfile-debug.c (debug_qf_relocate): Remove.
205 (debug_sym_quick_functions): Update.
206 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
207 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
208 Update.
209
210 2018-07-26 Tom Tromey <tromey@redhat.com>
211
212 * dbxread.c (end_psymtab): Use text_high_valid and
213 text_low_valid.
214 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
215 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
216 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
217 Update comment.
218 <text_low_valid, text_high_valid>: New fields.
219 <set_text_low, set_text_high>: Update.
220 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
221
222 2018-07-26 Tom Tromey <tom@tromey.com>
223
224 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
225 Update.
226 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
227 textlow and texthigh fields.
228 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
229 Update.
230 * mdebugread.c (parse_lines, parse_partial_symbols)
231 (psymtab_to_symtab_1): Update.
232 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
233 Rename fields. Update comment. Now private.
234 <text_low, text_high, set_text_low, set_text_high>: New methods.
235 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
236 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
237 (start_psymtab_common, maintenance_info_psymtabs)
238 (maintenance_check_psymtabs): Update.
239 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
240 texthigh fields.
241 (scan_xcoff_symtab): Update.
242
243 2018-07-26 Tom Tromey <tromey@redhat.com>
244
245 * psympriv.h (struct partial_symbol) <unrelocated_address,
246 address, set_address>: New methods.
247 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
248 (fixup_psymbol_section, relocate_psymtabs): Update.
249 (print_partial_symbols): Add 'objfile' parameter. Update.
250 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
251 Update.
252
253 2018-07-26 Tom Tromey <tom@tromey.com>
254
255 * dwarf-index-write.c (write_psymbols, debug_names::insert)
256 (debug_names::write_psymbols): Update.
257 * psympriv.h (struct partial_symbol): Derive from
258 general_symbol_info.
259 <obj_section>: New method.
260 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
261 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
262 (find_pc_sect_psymbol, fixup_psymbol_section)
263 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
264 (print_partial_symbols, recursively_search_psymtabs)
265 (compare_psymbols, psymbol_hash, psymbol_compare)
266 (add_psymbol_to_bcache, maintenance_check_psymtabs)
267 (psymbol_name_matches, psym_fill_psymbol_map): Update.
268
269 2018-07-26 Tom Tromey <tromey@redhat.com>
270
271 * dbxread.c (end_psymtab): Remove dead code.
272
273 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
274
275 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
276 DWARF unwinders are disabled.
277 * dwarf2-frame.c: Add dwarf2read.h include.
278 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
279 disabled.
280 (dwarf2_frame_unwinders_enabled_p): Define.
281 (show_dwarf_unwinders_enabled_p): New function.
282 (_initialize_dwarf2_frame): Register switch to control DWARF
283 unwinder use.
284 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
285 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
286 (show_dwarf_cmdlist): Remove static keyword.
287 * dwarf2read.h (set_dwarf_cmdlist): Declare.
288 (show_dwarf_cmdlist): Declare.
289 * NEWS: Document new feature.
290
291 2018-07-26 Tom de Vries <tdevries@suse.de>
292
293 PR breakpoints/23366
294 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
295
296 2018-07-26 Tom de Vries <tdevries@suse.de>
297
298 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
299 DW_AT_count can't be translated to a dynamic prop.
300
301 2018-07-25 Tom de Vries <tdevries@suse.de>
302
303 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
304 try/catch.
305
306 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
307
308 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
309
310 2018-07-25 Joel Brobecker <brobecker@adacore.com>
311
312 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
313
314 2018-07-24 Keith Seitz <keiths@redhat.comt
315
316 PR symtab/23010
317 * dwarf2read.c (dw2_add_symbol_to_list): New function.
318 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
319 instead of add_symbol_to_list.
320 (read_file_scope): Call prepare_one_comp_unit before reading
321 any other DIEs.
322
323 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
324
325 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
326
327 2018-07-24 Tom Tromey <tom@tromey.com>
328
329 * utils.c (malloc, realloc, free): Don't declare.
330 * configure, config.in: Rebuild.
331 * configure.ac: Don't check for declarations of free, malloc, or
332 realloc.
333
334 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
335
336 * aarch64-linux-nat.c
337 (aarch64_linux_nat_target::stopped_data_address): Remove unused
338 variable.
339 * arm-linux-nat.c (fetch_regs): Likewise.
340 (store_regs): Likewise.
341 (fetch_vfp_regs): Likewise.
342 (store_vfp_regs): Likewise.
343 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
344 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
345 (arm_linux_nat_target::insert_watchpoint): Likewise.
346 (arm_linux_nat_target::remove_watchpoint): Likewise.
347 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
348 Likewise.
349 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
350 Likewise.
351 * ppc-linux-nat.c (fetch_register): Likewise.
352 (fetch_all_gp_regs): Likewise.
353 (fetch_ppc_registers): Likewise.
354 (store_all_gp_regs): Likewise.
355 (store_ppc_registers): Likewise.
356 (hwdebug_insert_point): Likewise.
357 (can_use_watchpoint_cond_accel): Likewise.
358 * remote-sim.c (gdb_os_write_stdout): Likewise.
359
360 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
361 Tom Tromey <tom@tromey.com>
362
363 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
364 test for it.
365 * configure: Rebuild.
366
367 2018-07-22 Tom Tromey <tom@tromey.com>
368
369 * regformats/regdat.sh: Define xmltarget_${name} inside
370 #ifndef IN_PROCESS_AGENT.
371
372 2018-07-22 Tom Tromey <tom@tromey.com>
373
374 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
375
376 2018-07-22 Tom Tromey <tom@tromey.com>
377
378 * symfile.c (reread_symbols): Notify iter, not objfile.
379
380 2018-07-22 Tom Tromey <tom@tromey.com>
381
382 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
383 Use arch_ops.
384 (ravenscar_thread_target::prepare_to_store): Likewise.
385
386 2018-07-22 Tom Tromey <tom@tromey.com>
387
388 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
389 unused variable. Call value_fetch_lazy when needed.
390 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
391 Remove unused variable. Call value_fetch_lazy when needed.
392
393 2018-07-22 Tom Tromey <tom@tromey.com>
394
395 * m32c-tdep.c (mark_dma): Return void.
396 (make_regs): Remove unused declarations.
397
398 2018-07-22 Tom Tromey <tom@tromey.com>
399
400 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
401 cmdscm_get_valid_command_smob_arg_unsafe for effect.
402 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
403 bkscm_get_valid_block_smob_arg_unsafe for effect.
404
405 2018-07-22 Tom Tromey <tom@tromey.com>
406
407 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
408 value_type.
409
410 2018-07-22 Tom Tromey <tom@tromey.com>
411
412 * windows-nat.c (saved_context): Conditionally define.
413 * remote.c (remote_target::remote_btrace_maybe_reopen):
414 Conditionally declare "warned".
415 * inflow.c (sigquit_ours): Conditionally define.
416 (new_tty): Move "tty" declaration inside #if.
417 * guile/guile.c (guile_datadir): Conditionally define.
418 * charset.c (set_be_le_names): Move some declarations inside #if.
419 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
420 #if.
421 (parse_xml_btrace_conf): Likewise.
422
423 2018-07-22 Tom Tromey <tom@tromey.com>
424
425 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
426
427 2018-07-22 Tom Tromey <tom@tromey.com>
428
429 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
430 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
431 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
432 * buildsym-legacy.c (get_macro_table): Remove unused variable.
433 * stack.c (frame_apply_level_command): Remove unused variable.
434 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
435 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
436 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
437 unused variable.
438 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
439 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
440 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
441 variable.
442 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
443 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
444 variable.
445 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
446 Remove unused variable.
447 * cli/cli-script.c (recurse_read_control_structure): Remove unused
448 variable.
449 * common/tdesc.c (print_xml_feature::visit): Remove unused
450 variable.
451 * compile/compile-object-load.c (store_regs): Remove unused
452 variables.
453 * complaints.c (clear_complaints): Remove unused variable.
454 * corelow.c (core_target_open): Remove unused variable.
455 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
456 variable.
457 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
458 variable.
459 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
460 variable.
461 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
462 variable.
463 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
464 variable.
465 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
466 variable.
467 * ia64-tdep.c (examine_prologue): Remove unused variable.
468 * infcall.c (run_inferior_call): Remove unused variable.
469 * inferior.c (exit_inferior): Remove unused variable.
470 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
471 * linespec.c (decode_line_2): Remove unused variable.
472 * linux-nat.c (super_close): Remove.
473 * linux-tdep.c (linux_info_proc): Remove unused variable.
474 * mi/mi-main.c (mi_execute_command): Remove unused variable.
475 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
476 Remove unused variable.
477 * parse.c (find_minsym_type_and_address): Remove unused variable.
478 * printcmd.c (info_symbol_command, printf_floating): Remove unused
479 variable.
480 * python/py-breakpoint.c (bppy_set_commands): Remove unused
481 variable.
482 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
483 variables.
484 * record-btrace.c (record_btrace_target::store_registers): Remove
485 unused variable.
486 (cmd_show_record_btrace_cpu): Remove unused variable.
487 * riscv-tdep.c (riscv_register_reggroup_p)
488 (riscv_push_dummy_call, riscv_return_value): Remove unused
489 variable.
490 * rust-exp.y (literal): Remove unused variable.
491 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
492 unused variable.
493 <STRUCTOP_ANONYMOUS>: Likewise.
494 * s390-linux-tdep.c (s390_linux_init_abi_31)
495 (s390_linux_init_abi_64): Remove unused variable.
496 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
497 (file_select_thread, net_windows_open, _initialize_ser_windows):
498 Remove unused variables.
499 * symtab.c (find_pc_sect_line): Remove unused variable.
500 * target-memory.c (compute_garbled_blocks): Remove unused
501 variable.
502 (target_write_memory_blocks): Remove unused variable.
503 * target.c (target_stack::unpush): Remove unused variables.
504 * tracepoint.c (start_tracing, all_tracepoint_actions)
505 (merge_uploaded_trace_state_variables)
506 (print_one_static_tracepoint_marker): Remove unused variable.
507 * unittests/basic_string_view/element_access/char/1.cc (test01):
508 Remove unused variable.
509 * windows-nat.c (windows_continue, windows_add_all_dlls)
510 (do_initial_windows_stuff, windows_nat_target::create_inferior):
511 Remove unused variables.
512
513 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
514
515 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
516 attr_profile in HAVE_ELF.
517 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
518 HAVE_ELF.
519
520 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
521
522 * frame.c (frame_register_unwind): Change parameter name.
523 (frame_unwind_register): Likewise.
524 (frame_unwind_register_value): Likewise.
525 (frame_unwind_register_signed): Likewise.
526 (frame_unwind_register_unsigned): Likewise.
527 * frame.h (frame_register_unwind): Likewise.
528 (frame_unwind_register): Likewise.
529 (frame_unwind_register_value): Likewise.
530 (frame_unwind_register_signed): Likewise.
531 (frame_unwind_register_unsigned): Likewise.
532 (frame_unwind_arch): Likewise.
533
534 2018-07-20 Maciej W. Rozycki <macro@mips.com>
535
536 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
537 ISA maintenance.
538
539 2018-07-20 Maciej W. Rozycki <macro@mips.com>
540
541 * mips-linux-nat.c (mips_linux_nat_target::read_description):
542 Call `get_ptrace_pid' rather than extracting the ptrace PID by
543 hand.
544
545 2018-07-20 Keith Seitz <keiths@redhat.com>
546
547 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
548 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
549 m_compunit_symtab, m_language>: Add "m_" prefix.
550 Update all uses.
551 * buildsym.c: Update all uses.
552
553 2018-07-20 Tom Tromey <tom@tromey.com>
554
555 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
556 * buildsym.h (record_line_ftype): Remove typedef.
557
558 2018-07-20 Tom Tromey <tom@tromey.com>
559
560 * buildsym-legacy.h (augment_type_symtab): Don't declare.
561 (end_expandable_symtab): Likewise.
562 (end_symtab_get_static_block): Likewise.
563 (end_symtab_from_static_block): Likewise.
564 * buildsym-legacy.c (augment_type_symtab): Remove.
565 (end_expandable_symtab): Remove.
566 (end_symtab_get_static_block): Remove.
567 (end_symtab_from_static_block): Remove.
568
569 2018-07-20 Tom Tromey <tom@tromey.com>
570
571 * dwarf2read.c: Include buildsym.h.
572 (struct dwarf2_cu) <builder>: New method.
573 (fixup_go_packaging): Update.
574 (process_full_comp_unit, process_full_type_unit): Update. Don't
575 use scoped_free_pendings.
576 (using_directives): Add "cu" parameter, remove "language".
577 (read_import_statement, setup_type_unit_groups, )
578 (read_func_scope, read_lexical_block_scope)
579 (dwarf2_record_block_ranges, read_namespace): Update.
580 (lnp_state_machine::lnp_state_machine): Add cu parameter.
581 (lnp_state_machine::handle_end_sequence): Update.
582 (class lnp_state_machine) <m_cu>: New member.
583 <m_record_line_callback>: Remove.
584 <m_currently_recording_lines>: New member.
585 (lnp_state_machine::handle_set_file): Update.
586 (noop_record_line): Remove.
587 (dwarf_record_line_p): Add cu parameter.
588 (dwarf_record_line_1, dwarf_finish_line): Likewise.
589 (lnp_state_machine::record_line)
590 (lnp_state_machine::lnp_state_machine)
591 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
592 (dwarf_decode_lines): Update.
593 (dwarf2_start_subfile): Add cu parameter.
594 (dwarf2_start_symtab, new_symbol): Update.
595 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
596 Remove dwarf2_per_objfile parameter.
597 (dwarf_decode_macros): Update.
598
599 2018-07-20 Tom Tromey <tom@tromey.com>
600
601 * stabsread.c (define_symbol): Update.
602 * buildsym-legacy.h (get_buildsym_compunit): Declare.
603 * dwarf2read.c (new_symbol): Update.
604 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
605 * cp-namespace.c: Include buildsym.h.
606 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
607 * buildsym-legacy.c (get_buildsym_compunit): New function.
608
609 2018-07-20 Tom Tromey <tom@tromey.com>
610
611 * xcoffread.c: Include buildsym-legacy.h.
612 * windows-nat.c: Include buildsym-legacy.h.
613 * stabsread.c: Include buildsym-legacy.h.
614 * mdebugread.c: Include buildsym-legacy.h.
615 * buildsym-legacy.h: New file.
616 * buildsym-legacy.c: New file, from buildsym.c.
617 * go32-nat.c: Include buildsym-legacy.h.
618 * dwarf2read.c: Include buildsym-legacy.h.
619 * dbxread.c: Include buildsym-legacy.h.
620 * cp-namespace.c: Include buildsym-legacy.h.
621 * coffread.c: Include buildsym-legacy.h.
622 * buildsym.h: Move some contents to buildsym-legacy.h.
623 * buildsym.c: Include buildsym-legacy.h. Move many functions to
624 buildsym-legacy.c.
625 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
626
627 2018-07-20 Tom Tromey <tom@tromey.com>
628
629 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
630 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
631 (buildsym_compunit::buildsym_compunit)
632 (buildsym_compunit::~buildsym_compunit)
633 (buildsym_compunit::get_macro_table): Define.
634
635 2018-07-20 Tom Tromey <tom@tromey.com>
636
637 * buildsym.c (reset_symtab_globals): Remove.
638 (buildsym_compunit::end_symtab_from_static_block): Update.
639 (buildsym_compunit::augment_type_symtab): Update.
640 (end_symtab_from_static_block): Call free_buildsym_compunit.
641 (augment_type_symtab, end_symtab, end_expandable_symtab):
642 Likewise.
643
644 2018-07-20 Tom Tromey <tom@tromey.com>
645
646 * arch-utils.c: Do not include buildsym.h.
647 * mipsread.c: Do not include buildsym.h.
648 * machoread.c: Do not include buildsym.h.
649 * elfread.c: Do not include buildsym.h.
650
651 2018-07-20 Tom Tromey <tom@tromey.com>
652
653 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
654 initialization.
655 (buildsym_compunit): Add new constructor.
656 (struct buildsym_compunit) <get_last_source_file, finish_block,
657 record_block_range, start_subfile, patch_subfile_names,
658 push_subfile, pop_subfile, record_line, get_compunit_symtab,
659 set_last_source_start_addr, get_last_source_start_addr,
660 get_local_using_directives, set_local_using_directives,
661 get_global_using_directives, outermost_context_p,
662 get_current_context_stack, get_context_stack_depth,
663 get_current_subfile, get_local_symbols, get_file_symbols,
664 get_global_symbols, record_debugformat, record_producer,
665 push_context, pop_context, end_symtab_get_static_block,
666 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
667 New public methods.
668 <record_pending_block, finish_block_internal, make_blockvector,
669 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
670 private methods.
671 Update all users.
672
673 2018-05-22 Tom Tromey <tom@tromey.com>
674
675 * buildsym.c (record_pending_block): Move earlier. Remove objfile
676 parameter.
677 (finish_block_internal): Update.
678
679 2018-07-20 Tom Tromey <tom@tromey.com>
680
681 * buildsym.c (record_pending_block): Move earlier. Remove objfile
682 parameter.
683 (finish_block_internal): Update.
684
685 2018-07-20 Tom Tromey <tom@tromey.com>
686
687 * buildsym.h (EXTERN): Don't define or undef.
688 * buildsym.c (EXTERN): Don't define.
689
690 2018-07-20 Tom Tromey <tom@tromey.com>
691
692 * buildsym.c: Remove TODO comment.
693
694 2018-07-20 Tom Tromey <tom@tromey.com>
695
696 * coffread.c (coff_symtab_read): Update.
697 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
698 (xcoff_new_init): Update.
699 * mipsread.c (mipscoff_new_init): Update.
700 * mdebugread.c (mdebug_build_psymtabs): Update.
701 * elfread.c (elf_new_init): Update.
702 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
703 Update.
704 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
705 (coffstab_build_psymtabs, elfstab_build_psymtabs)
706 (stabsect_build_psymtabs): Update.
707 * buildsym.h (buildsym_init): Don't declare.
708 * buildsym.c: Update comment.
709 (prepare_for_building): Remove.
710 (start_symtab, restart_symtab): Update.
711 (reset_symtab_globals): Update comment.
712 (buildsym_init): Remove.
713
714 2018-07-20 Tom Tromey <tom@tromey.com>
715
716 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
717 * stabsread.c (patch_block_stabs, define_symbol, read_type)
718 (read_enum_type, common_block_start, common_block_end)
719 (cleanup_undefined_types_1, finish_global_stabs): Update.
720 * mdebugread.c (psymtab_to_symtab_1): Update.
721 * dwarf2read.c (fixup_go_packaging, read_func_scope)
722 (read_lexical_block_scope, new_symbol): Update.
723 * dbxread.c (process_one_symbol): Update.
724 * coffread.c (coff_symtab_read, process_coff_symbol)
725 (coff_read_enum_type): Update.
726 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
727 declare.
728 (get_local_symbols, get_file_symbols, get_global_symbols): New
729 functions.
730 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
731 m_global_symbols.
732 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
733 (~scoped_free_pendings): Update.
734 (finish_block, prepare_for_building, reset_symtab_globals)
735 (end_symtab_get_static_block, end_symtab_with_blockvector)
736 (augment_type_symtab, push_context): Update.
737 (get_local_symbols, get_file_symbols, get_global_symbols): New
738 functions.
739 (buildsym_init): Update.
740
741 2018-07-20 Tom Tromey <tom@tromey.com>
742
743 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
744 (process_full_type_unit): Likewise.
745 (dwarf2_start_symtab): Set list_in_scope.
746
747 2018-07-20 Tom Tromey <tom@tromey.com>
748
749 * dwarf2read.c (process_psymtab_comp_unit_reader)
750 (build_type_psymtabs_reader): Do not set list_in_scope.
751
752 2018-07-20 Tom Tromey <tom@tromey.com>
753
754 * buildsym.c (free_pendings): Remove.
755 (add_symbol_to_list, scoped_free_pendings)
756 (finish_block_internal, buildsym_init): Update.
757
758 2018-07-20 Tom Tromey <tom@tromey.com>
759
760 * xcoffread.c (read_xcoff_symtab): Update.
761 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
762 Update.
763 * dbxread.c (process_one_symbol): Update.
764 * coffread.c (coff_symtab_read): Update.
765 * buildsym.h (finish_block): Update.
766 * buildsym.c (finish_block): Remove "listhead" argument.
767 (end_symtab_get_static_block): Update.
768
769 2018-07-20 Tom Tromey <tom@tromey.com>
770
771 * buildsym.h (class scoped_free_pendings): Remove constructor.
772 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
773 method.
774 <m_pending_block_obstack, m_pending_blocks>: New members.
775 (pending_block_obstack, pending_blocks): Remove.
776 (scoped_free_pendings::scoped_free_pendings): Default.
777 (~scoped_free_pendings): Update.
778 (free_pending_blocks): Remove.
779 (finish_block_internal, record_pending_block, make_blockvector)
780 (end_symtab_get_static_block, augment_type_symtab, push_context)
781 (buildsym_init): Update.
782
783 2018-07-20 Tom Tromey <tom@tromey.com>
784
785 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
786 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
787 members.
788 (pending_addrmap, pending_addrmap_obstack)
789 (pending_addrmap_interesting): Remove.
790 (scoped_free_pendings, record_block_range, make_blockvector)
791 (prepare_for_building, reset_symtab_globals, buildsym_init):
792 Update.
793
794 2018-07-20 Tom Tromey <tom@tromey.com>
795
796 * xcoffread.c (process_linenos): Update.
797 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
798 * mdebugread.c (psymtab_to_symtab_1): Update.
799 * dwarf2read.c (setup_type_unit_groups)
800 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
801 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
802 * dbxread.c (process_one_symbol): Update.
803 * coffread.c (coff_symtab_read, enter_linenos)
804 (process_coff_symbol): Update.
805 * buildsym.h (current_subfile): Don't declare.
806 (get_current_subfile): Declare.
807 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
808 member.
809 (start_subfile, free_buildsym_compunit, push_subfile)
810 (prepare_for_building, start_symtab): Update.
811 (get_current_subfile): New function.
812
813 2018-07-20 Tom Tromey <tom@tromey.com>
814
815 * coffread.c (coff_symtab_read): Update.
816 * xcoffread.c (read_xcoff_symtab): Update.
817 * dwarf2read.c (new_symbol): Update.
818 (read_func_scope, read_lexical_block_scope): Update.
819 * dbxread.c (process_one_symbol): Update.
820 * buildsym.h (context_stack, context_stack_depth): Don't declare.
821 (outermost_context_p): Remove macro.
822 (outermost_context_p, get_current_context_stack)
823 (get_context_stack_depth): Declare.
824 (pop_context): Return struct context_stack.
825 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
826 member.
827 (context_stack_size): Remove.
828 (INITIAL_CONTEXT_STACK_SIZE): Remove.
829 (prepare_for_building, end_symtab_get_static_block)
830 (augment_type_symtab, push_context): Update.
831 (pop_context): Return struct context_stack.
832 (outermost_context_p, get_current_context_stack)
833 (get_context_stack_depth): New functions.
834 (buildsym_init): Update.
835
836 2018-07-20 Tom Tromey <tom@tromey.com>
837
838 * rust-exp.y: Now a pure parser. Update all rules.
839 (%union): Move earlier.
840 (current_parser, work_obstack): Remove globals.
841 (rust_parser, ~rust_parser): Update.
842 (class rust_parser) <copy_name, concat3, crate_name, super_name,
843 lex_character, lex_number, lex_string, lex_identifier,
844 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
845 convert_name, convert_params_to_expression,
846 convert_ast_to_expression, ast_basic_type, ast_operation,
847 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
848 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
849 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
850 ast_array_type, ast_slice_type, ast_reference_type,
851 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
852 (rust_parse): Update.
853 (rustyyerror, rustyylex): Add parser parameter.
854 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
855 (rust_lex_stringish_test, rust_lex_test_sequence)
856 (rust_lex_test_trailing_dot, rust_lex_test_completion)
857 (rust_lex_test_push_back, rust_lex_tests): Update.
858
859 2018-07-19 Pedro Alves <palves@redhat.com>
860
861 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
862 gdb::unique_xmalloc_ptr.
863 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
864 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
865 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
866 copy-initialization.
867 * guile/scm-pretty-print.c (ppscm_print_children): Use
868 gdb::unique_xmalloc_ptr instead of cleanups.
869 (gdbscm_apply_val_pretty_printer): Remove cleanups.
870 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
871 gdb::unique_xmalloc_ptr.
872 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
873 Adjust to use gdb::unique_xmalloc_ptr.
874 * guile/scm-utils.c (extract_arg): Adjust.
875 * guile/scm-value.c (gdbscm_value_field): Adjust to use
876 gdb::unique_xmalloc_ptr instead of a cleanup.
877
878 2018-07-19 Tom Tromey <tom@tromey.com>
879
880 * utils.c (do_value_free_to_mark)
881 (make_cleanup_value_free_to_mark): Remove.
882 * utils.h (make_cleanup_value_free_to_mark): Remove.
883
884 2018-07-19 Pedro Alves <palves@redhat.com>
885
886 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
887 forwarding reference.
888
889 2018-07-18 Pedro Alves <palves@redhat.com>
890
891 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
892 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
893 cleanup.
894
895 2018-07-18 Pedro Alves <palves@redhat.com>
896
897 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
898 exceptions.
899 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
900 (gdbscm_wrap): New.
901 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
902 directly instead of a cleanup.
903 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
904 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
905 (vlscm_binop_gdbthrow): New, factored out from ...
906 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
907 (vlscm_rich_compare): Use gdbscm_wrap.
908 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
909 instead of a cleanup.
910 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
911 cleanup.
912 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
913 Use xfree directly instead of a cleanup.
914 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
915 Adjust to use gdbscm_wrap and scoped_value_mark.
916 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
917 (gdbscm_value_address, gdbscm_value_dereference)
918 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
919 scoped_value_mark.
920 (gdbscm_value_dynamic_type): Use scoped_value_mark.
921 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
922 scoped_value_mark.
923 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
924 gdbscm_wrap and scoped_value_mark.
925 (gdbscm_value_to_string): Use xfree directly instead of a
926 cleanup. Move 'buffer' unique_ptr to TRY scope.
927 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
928 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
929 scoped_value_mark.
930 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
931 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
932 scoped_value_mark.
933 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
934 gdbscm_wrap.
935
936 2018-07-18 Tom de Vries <tdevries@suse.de>
937
938 * findvar.c (default_read_var_value): Also resolve dynamic type for
939 LOC_OPTIMIZED_OUT vars.
940
941 2018-07-18 Maciej W. Rozycki <macro@mips.com>
942
943 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
944 decoding.
945
946 2018-07-17 Tom Tromey <tom@tromey.com>
947
948 * guile/scm-param.c (pascm_set_func, pascm_show_func)
949 (compute_enum_list, pascm_set_param_value_x)
950 (gdbscm_parameter_value): Update.
951 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
952 (gdbscm_scm_to_host_string): Update.
953 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
954 Update.
955 * guile/scm-cmd.c (cmdscm_add_completion): Update.
956 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
957 * guile/scm-string.c (gdbscm_scm_to_string): Return
958 unique_xmalloc_ptr.
959 (gdbscm_scm_to_host_string): Likewise.
960
961 2018-07-17 Tom Tromey <tom@tromey.com>
962
963 * guile/guile.c (gdbscm_eval_from_control_command): Update.
964 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
965 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
966 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
967 unique_xmalloc_ptr.
968
969 2018-07-17 Tom Tromey <tom@tromey.com>
970
971 * guile/scm-param.c (pascm_signal_setshow_error): Update.
972 * guile/guile-internal.h (gdbscm_exception_message_to_string):
973 Update.
974 * guile/scm-cmd.c (cmdscm_function): Update.
975 * guile/scm-pretty-print.c
976 (ppscm_print_exception_unless_memory_error): Update.
977 * guile/scm-exception.c (gdbscm_exception_message_to_string):
978 Return unique_xmalloc_ptr.
979
980 2018-07-17 Tom Tromey <tom@tromey.com>
981
982 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
983 Use string_printf.
984
985 2018-07-17 Jim Wilson <jimw@sifive.com>
986
987 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
988 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
989 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
990 unecessary braces after EF_RISCV_RVC test. Delete call to
991 set_gdbarch_decr_pc_after_break.
992
993 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
994 RISCV_LAST_FP_REGNUM + 1.
995 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
996
997 2018-07-17 Tom Tromey <tom@tromey.com>
998
999 * configure.ac: Remove --disable-gdbcli.
1000 * configure: Rebuild.
1001 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
1002 (SUBDIR_CLI_CFLAGS): Remove.
1003 (SFILES): Use SUBDIR_CLI_SRCS.
1004 (COMMON_OBS): Use SUBDIR_CLI_OBS.
1005
1006 2018-07-17 Tom Tromey <tom@tromey.com>
1007
1008 PR gdb/18624:
1009 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
1010
1011 2018-07-16 Jim Wilson <jimw@sifive.com>
1012
1013 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
1014
1015 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1016
1017 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
1018 variable.
1019 (libunwind_frame_sniffer): Likewise.
1020 (libunwind_frame_prev_register): Likewise.
1021 (libunwind_sigtramp_frame_sniffer): Likewise.
1022 * ia64-tdep.c (ia64_access_reg): Likewise.
1023 (ia64_access_rse_reg): Likewise.
1024 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
1025 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
1026
1027 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1028
1029 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
1030
1031 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1032
1033 * remote-sim.c (gdbsim_target::close,
1034 gdbsim_target::mourn_inferior): Remove unused variables.
1035
1036 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
1037
1038 * ia64-tdep.c (ktab_buf): New global.
1039 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
1040 (get_kernel_table): Adjust.
1041
1042 2018-07-16 Tom Tromey <tom@tromey.com>
1043
1044 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
1045 * dwarf2read.c (using_directives, new_symbol): Use
1046 outermost_context_p.
1047 * dbxread.c (process_one_symbol): Use outermost_context_p.
1048 * coffread.c (coff_symtab_read): Use outermost_context_p.
1049
1050 2018-07-16 Tom Tromey <tom@tromey.com>
1051
1052 * dwarf2read.c (using_directives, read_func_scope)
1053 (read_lexical_block_scope): Update.
1054 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1055 * buildsym.h (local_using_directives, global_using_directives):
1056 Don't declare.
1057 (get_local_using_directives, set_local_using_directives)
1058 (get_global_using_directives): Declare.
1059 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
1060 m_global_using_directives>: New members.
1061 (finish_block_internal, prepare_for_building)
1062 (reset_symtab_globals, end_symtab_get_static_block)
1063 (push_context): Update.
1064 (get_local_using_directives, set_local_using_directives)
1065 (get_global_using_directives): New functions.
1066 (buildsym_init): Update.
1067
1068 2018-07-16 Tom Tromey <tom@tromey.com>
1069
1070 * xcoffread.c (xcoff_initial_scan): Don't call
1071 free_pending_blocks.
1072 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
1073 * buildsym.h (class scoped_free_pendings): Add constructor.
1074 (free_pending_blocks): Don't declare.
1075 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
1076 (free_pending_blocks): Now static.
1077
1078 2018-07-16 Tom Tromey <tom@tromey.com>
1079
1080 * buildsym.h (push_subfile, pop_subfile): Update declarations.
1081 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
1082 member.
1083 (struct subfile_stack): Remove.
1084 (subfile_stack): Remove.
1085 (push_subfile, pop_subfile, buildsym_init): Update.
1086
1087 2018-07-16 Tom Tromey <tom@tromey.com>
1088
1089 * buildsym.c (push_subfile): Use gdb_assert.
1090 (pop_subfile): Use gdb_assert.
1091
1092 2018-07-16 Tom Tromey <tom@tromey.com>
1093
1094 * buildsym.h (merge_symbol_lists): Remove.
1095 * buildsym.c (merge_symbol_lists): Remove.
1096
1097 2018-07-16 Tom Tromey <tom@tromey.com>
1098
1099 * stabsread.c (scan_file_globals): Update comment.
1100 * stabsread.h (scan_file_globals): Move from buildsym.h.
1101 * buildsym.h (scan_file_globals): Move to stabsread.h.
1102
1103 2018-07-16 Tom Tromey <tom@tromey.com>
1104
1105 * xcoffread.c (xcoff_new_init): Update.
1106 * mipsread.c (mipscoff_new_init): Update.
1107 * mdebugread.c (mdebug_build_psymtabs): Update.
1108 * elfread.c (elf_new_init): Update.
1109 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
1110 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
1111 * buildsym.h (buildsym_new_init): Don't declare.
1112 * buildsym.c (buildsym_new_init): Remove.
1113
1114 2018-07-16 Tom Tromey <tom@tromey.com>
1115
1116 * stabsread.h (within_function): Move from buildsym.h.
1117 * stabsread.c (start_stabs): Clear within_function.
1118 * coffread.c (coff_start_symtab): Clear within_function.
1119 * buildsym.h (within_function): Move to stabsread.h.
1120 * buildsym.c (prepare_for_building): Update.
1121
1122 2018-07-16 Tom Tromey <tom@tromey.com>
1123
1124 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
1125 * dwarf2read.c (dwarf2_start_symtab): Don't set
1126 processing_gcc_compilation.
1127 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
1128
1129 2018-07-16 Tom Tromey <tom@tromey.com>
1130
1131 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
1132 (next_symbol_text_func): Move from buildsym.h.
1133 * stabsread.c (hashname): Move from buildsym.c.
1134 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
1135 (next_symbol_text_func, hashname): Move to stabsread.h.
1136 * buildsym.c: Don't include bcache.h
1137 (hashname): Move to stasbread.c.
1138
1139 2018-07-16 Tom Tromey <tom@tromey.com>
1140
1141 * buildsym.h (context_stack_size): Don't declare.
1142 * buildsym.c (context_stack_size): New global.
1143
1144 2018-07-16 Tom Tromey <tom@tromey.com>
1145
1146 * dbxread.c (processing_acc_compilation): New global.
1147 * buildsym.h (processing_acc_compilation): Don't declare.
1148
1149 2018-07-16 Tom Tromey <tom@tromey.com>
1150
1151 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
1152 * dbxread.c (read_ofile_symtab): Update.
1153 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
1154 * buildsym.h (last_source_start_addr): Remove.
1155 (set_last_source_start_addr, get_last_source_start_addr):
1156 Declare.
1157 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
1158 parameter.
1159 (struct buildsym_compunit) <m_last_source_start_addr>: New
1160 member.
1161 (prepare_for_building): Remove start_addr parameter.
1162 (start_symtab, restart_symtab, end_symtab_get_static_block)
1163 (end_symtab_with_blockvector): Update.
1164 (set_last_source_start_addr, get_last_source_start_addr): New
1165 functions.
1166
1167 2018-07-16 Tom Tromey <tom@tromey.com>
1168
1169 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
1170 member.
1171 (have_line_numbers): Remove.
1172 (record_line, prepare_for_building, end_symtab_get_static_block)
1173 (augment_type_symtab): Update.
1174
1175 2018-07-16 Tom Tromey <tom@tromey.com>
1176
1177 * buildsym.c (~buildsym_compunit): Free the macro table.
1178 (struct buildsym_compunit) <get_macro_table, release_macros>: New
1179 methods.
1180 <m_pending_macros>: New member.
1181 (pending_macros): Remove.
1182 (~scoped_free_pendings, get_macro_table, prepare_for_building)
1183 (reset_symtab_globals, end_symtab_get_static_block)
1184 (end_symtab_with_blockvector, augment_type_symtab)
1185 (buildsym_init): Update.
1186
1187 2018-07-16 Tom Tromey <tom@tromey.com>
1188
1189 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
1190 parameter.
1191 (buildsym_compunit::set_last_source_file): New method.
1192 <m_last_source_file>: New member.
1193 (prepare_for_building): Remove "name" parameter.
1194 (start_symtab, restart_symtab, reset_symtab_globals): Update.
1195 (last_source_file): Remove.
1196 (set_last_source_file, get_last_source_file): Update.
1197
1198 2018-07-16 Tom Tromey <tom@tromey.com>
1199
1200 * buildsym.c (prepare_for_building): Add assert.
1201
1202 2018-07-16 Tom Tromey <tom@tromey.com>
1203
1204 * buildsym.c (~buildsym_compunit): Update.
1205 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
1206 (start_subfile, patch_subfile_names)
1207 (end_symtab_with_blockvector): Update.
1208
1209 2018-07-16 Tom Tromey <tom@tromey.com>
1210
1211 * buildsym.c (struct buildsym_compunit): Add constructor,
1212 destructor, initializers.
1213 (start_buildsym_compunit): Remove.
1214 (free_buildsym_compunit): Use "delete".
1215 (start_symtab, restart_symtab): Use "new".
1216
1217 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
1218
1219 * symfile.c (set_objfile_default_section_offset): Remove struct
1220 keyword.
1221
1222 2018-07-14 Stafford Horne <shorne@gmail.com>
1223
1224 * (Responsible Maintainers): Add myself as or1k maintainer.
1225
1226 2018-07-13 Tom Tromey <tom@tromey.com>
1227
1228 * symfile.c (set_objfile_default_section_offset): Use extra braces
1229 around initializer.
1230
1231 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1232
1233 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
1234 non-branching basr.
1235
1236 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1237
1238 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1239 unittests/cli-utils-selftests.c
1240 * unittests/cli-utils-selftests.c: New file.
1241
1242 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1243
1244 * NEWS: Mention new commands. Mention change to 'thread apply'.
1245
1246 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1247
1248 * thread.c (thr_try_catch_cmd): New function.
1249 (thread_apply_all_command): Handle qcs flags.
1250 (thread_apply_command): Handle qcs flags.
1251 (taas_command): New function.
1252 (tfaas_command): New function.
1253 (_initialize_thread): Update to setup the new commands 'taas
1254 and 'tfaas'. Change doc string for 'thread apply'.
1255
1256 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1257
1258 * stack.c: (trailing_outermost_frame): New function, mostly
1259 extracted from backtrace_command_1.
1260 (leading_innermost_frame): New function.
1261 (backtrace_command_1): Update to call trailing_outermost_frame.
1262 (frame_apply_command_count): New function.
1263 (frame_apply_level_command): New function.
1264 (frame_apply_all_command): New function.
1265 (frame_apply_command): New function.
1266 (faas_command): New function.
1267 (frame_cmd_list): New variable.
1268 (_initialize_stack): Update to setup the new commands 'frame apply'
1269 and 'faas'.
1270
1271 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1272
1273 * cli-utils.c (number_or_range_parser::get_number): Only handle
1274 numbers or convenience var as numbers.
1275 (parse_flags): New function.
1276 (parse_flags_qcs): New function.
1277 (number_or_range_parser::finished): Ensure parsing end is detected
1278 before end of string.
1279 * cli-utils.h (parse_flags): New function.
1280 (parse_flags_qcs): New function.
1281 (number_or_range_parser): Remove m_finished bool.
1282 (number_or_range_parser::skip_range): Set m_in_range to false.
1283
1284 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
1285
1286 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
1287 on Windows.
1288
1289 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1290 Jan Kratochvil <jan.kratochvil@redhat.com>
1291 Paul Fertser <fercerpav@gmail.com>
1292 Tsutomu Seki <sekiriki@gmail.com>
1293 Pedro Alves <palves@redhat.com>
1294
1295 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1296 'unittests/parse-connection-spec-selftests.c'.
1297 (COMMON_SFILES): Add 'common/netstuff.c'.
1298 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
1299 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
1300 * common/netstuff.c: New file.
1301 * common/netstuff.h: New file.
1302 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
1303 (wait_for_connect): Update comment. New parameter
1304 'gdb::optional<int> sock' instead of 'struct serial *scb'.
1305 Use 'sock' directly instead of 'scb->fd'.
1306 (try_connect): New function, with code from 'net_open'.
1307 (net_open): Rewrite main loop to deal with multiple
1308 sockets/addresses. Handle IPv6-style hostnames; implement
1309 support for IPv6 connections.
1310 * unittests/parse-connection-spec-selftests.c: New file.
1311
1312 2018-07-11 Pedro Alves <palves@redhat.com>
1313
1314 PR gdb/23377
1315 * remote.c (remote_target::remote_detach_pid): Call
1316 set_current_process.
1317
1318 2018-07-11 Pedro Alves <palves@redhat.com>
1319
1320 * h8300-tdep.c (h8300_gdbarch_init): Remove
1321 set_gdbarch_ecoff_reg_to_regnum calls.
1322
1323 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1324
1325 PR c++/23373
1326 * c-typeprint.c (c_type_print_base_struct_union): Don't print
1327 offsets/sizes for static members of a class/struct.
1328
1329 2018-07-11 Alan Hayward <alan.hayward@arm.com>
1330
1331 * target-descriptions.c (tdesc_register_bitsize): Rename.
1332 * target-descriptions.h (tdesc_register_bitsize): Likewise.
1333 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
1334 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
1335
1336 2018-07-10 Tom Tromey <tom@tromey.com>
1337
1338 * breakpoint.c (moribund_locations): Now static and a
1339 std::vector.
1340 (breakpoint_init_inferior, moribund_breakpoint_here_p)
1341 (build_bpstat_chain, update_global_location_list)
1342 (breakpoint_retire_moribund): Update.
1343 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
1344 VEC.
1345
1346 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
1347
1348 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
1349 (riscv_register_reggroup_p): Use new function, remove unneeded
1350 parenthesis.
1351 (riscv_push_dummy_call): Extend assert to compare against xlen or
1352 flen based on register type.
1353
1354 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
1355
1356 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
1357
1358 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
1359
1360 * remote.c (show_hardware_watchpoint_limit): New function.
1361 (show_hardware_watchpoint_length_limit): New function.
1362 (show_hardware_breakpoint_limit): New function.
1363 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
1364 where appropriate, update help text.
1365
1366 2018-07-09 Tom Tromey <tom@tromey.com>
1367
1368 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
1369 (CLIBS): Don't mention NAT_CLIBS.
1370
1371 2018-07-09 Tom Tromey <tom@tromey.com>
1372
1373 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
1374 (LIBGDB_OBS, clean mostlyclean): Update.
1375 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
1376
1377 2018-07-09 Tom Tromey <tom@tromey.com>
1378
1379 * Makefile.in (%.c: %.y): Use ECHO_YACC.
1380 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
1381 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
1382
1383 2018-07-09 Tom Tromey <tom@tromey.com>
1384
1385 * Makefile.in (ALLDEPFILES): Remove exec.c.
1386 (COMMON_OBS): Remove exec.o.
1387 (COMMON_SFILES): Add exec.c.
1388
1389 2018-07-09 Tom Tromey <tom@tromey.com>
1390
1391 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
1392
1393 2018-07-09 Tom Tromey <tom@tromey.com>
1394
1395 * Makefile.in (clean mostlyclean): Remove stamp-version.
1396 (version.c): Depend on stamp-version.
1397 (stamp-version): New rule, from version.c rule.
1398
1399 2018-07-09 Tom Tromey <tom@tromey.com>
1400
1401 * Makefile.in (init.c): Depend on stamp-init.
1402 (stamp-init): New rule, from init.c rule.
1403 (clean mostlyclean): Remove stamp-init.
1404
1405 2018-07-09 Tom Tromey <tom@tromey.com>
1406
1407 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
1408 SUBDIR_GCC_COMPILE_SRCS.
1409
1410 2018-07-09 Tom Tromey <tom@tromey.com>
1411
1412 * Makefile.in (init.c): Remove some unused sed rules.
1413
1414 2018-07-09 Tom Tromey <tom@tromey.com>
1415
1416 * Makefile.in (TSOBS): Remove.
1417 (INIT_FILES): Update.
1418 (LIBGDB_OBS): Update.
1419 (COMMON_SFILES): Add inflow.c.
1420 (SFILES): Remove inflow.c.
1421
1422 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1423
1424 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
1425
1426 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
1427
1428 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
1429 get_saveloc_name, is_signal_frame_name, step_name,
1430 init_remote_name, create_addr_space_name,
1431 destroy_addr_space_name, search_unwind_table_name,
1432 find_dyn_list_name): Constify.
1433
1434 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
1435
1436 * darwin-nat.c (darwin_pthread_kill): New function.
1437 (darwin_resume_thread): Use darwin_pthread_kill.
1438
1439 2018-07-05 Tom de Vries <tdevries@suse.de>
1440
1441 * macroexp.c (macro_buffer) <operator=>: New member function.
1442
1443 2018-07-04 Tom Tromey <tom@tromey.com>
1444
1445 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
1446
1447 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
1448
1449 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
1450 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
1451 * maint.c: Likewise.
1452 * top.c: Likewise.
1453
1454 2018-07-04 Joel Brobecker <brobecker@adacore.com>
1455
1456 * NEWS: Create a new section for the next release branch.
1457 Rename the section of the current branch, now that it has
1458 been cut.
1459
1460 2018-07-04 Joel Brobecker <brobecker@adacore.com>
1461
1462 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
1463 * version.in: Bump version to 8.2.50.DATE-git.
1464
1465 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1466 Pedro Alves <palves@redhat.com>
1467
1468 * linux-nat.c (linux_init_ptrace): Rename to ...
1469 (linux_init_ptrace_procfs): ... this. Call
1470 linux_proc_init_warnings.
1471 (linux_nat_target::post_attach)
1472 (linux_nat_target::post_startup_inferior): Adjust.
1473 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
1474 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
1475
1476 2018-07-04 Tom de Vries <tdevries@suse.de>
1477
1478 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
1479 check ...
1480 (read_comp_unit_head): ... here.
1481
1482 2018-07-03 Tom Tromey <tom@tromey.com>
1483
1484 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
1485 (stop_tracing, tstatus_command)
1486 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
1487 (print_one_static_tracepoint_marker): Update.
1488 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
1489 std::vector.
1490 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
1491 VEC.
1492 (all_tracepoints, static_tracepoints_here): Return std::vector.
1493
1494 2018-07-03 Tom Tromey <tom@tromey.com>
1495
1496 * common/ptid.c (ptid_equal): Remove.
1497 * common/ptid.h (ptid_equal): Don't declare.
1498 * ada-tasks.c: Update.
1499 * breakpoint.c: Update.
1500 * common/agent.c: Update.
1501 * corelow.c: Update.
1502 * darwin-nat-info.c: Update.
1503 * darwin-nat.c: Update.
1504 * dcache.c: Update.
1505 * dtrace-probe.c: Update.
1506 * dummy-frame.c: Update.
1507 * fbsd-nat.c: Update.
1508 * frame.c: Update.
1509 * gdbthread.h: Update.
1510 * gnu-nat.c: Update.
1511 * go32-nat.c: Update.
1512 * inf-loop.c: Update.
1513 * inf-ptrace.c: Update.
1514 * infcall.c: Update.
1515 * infcmd.c: Update.
1516 * inflow.c: Update.
1517 * infrun.c: Update.
1518 * linux-fork.c: Update.
1519 * linux-nat.c: Update.
1520 * linux-thread-db.c: Update.
1521 * mi/mi-cmd-var.c: Update.
1522 * mi/mi-interp.c: Update.
1523 * mi/mi-main.c: Update.
1524 * nto-procfs.c: Update.
1525 * ppc-linux-tdep.c: Update.
1526 * procfs.c: Update.
1527 * python/py-inferior.c: Update.
1528 * python/py-record-btrace.c: Update.
1529 * python/py-record.c: Update.
1530 * ravenscar-thread.c: Update.
1531 * regcache.c: Update.
1532 * remote-sim.c: Update.
1533 * remote.c: Update.
1534 * sol-thread.c: Update.
1535 * solib.c: Update.
1536 * target.c: Update.
1537 * tui/tui-stack.c: Update.
1538 * varobj.c: Update.
1539 * windows-nat.c: Update.
1540 * windows-tdep.c: Update.
1541
1542 2018-07-03 Tom Tromey <tom@tromey.com>
1543
1544 * common/ptid.c (ptid_match): Remove.
1545 * common/ptid.h (ptid_match): Don't declare.
1546 * fbsd-nat.c: Update.
1547 * infcmd.c: Update.
1548 * infrun.c: Update.
1549 * linux-nat.c: Update.
1550 * record-btrace.c: Update.
1551 * regcache.c: Update.
1552 * remote.c: Update.
1553
1554 2018-07-03 Tom Tromey <tom@tromey.com>
1555
1556 * common/ptid.c (ptid_tid_p): Remove.
1557 * common/ptid.h (ptid_tid_p): Don't declare.
1558 * sol-thread.c: Update.
1559
1560 2018-07-03 Tom Tromey <tom@tromey.com>
1561
1562 * common/ptid.c (ptid_lwp_p): Remove.
1563 * common/ptid.h (ptid_lwp_p): Don't declare.
1564 * fbsd-nat.c: Update.
1565 * linux-nat.c: Update.
1566 * nat/linux-procfs.c: Update.
1567 * nat/x86-linux-dregs.c: Update.
1568 * sol-thread.c: Update.
1569
1570 2018-07-03 Tom Tromey <tom@tromey.com>
1571
1572 * common/ptid.c (ptid_is_pid): Remove.
1573 * common/ptid.h (ptid_is_pid): Don't declare.
1574 * infrun.c: Update.
1575 * linux-nat.c: Update.
1576 * mi/mi-interp.c: Update.
1577 * remote.c: Update.
1578 * thread.c: Update.
1579
1580 2018-07-03 Tom Tromey <tom@tromey.com>
1581
1582 * common/ptid.c (ptid_get_tid): Remove.
1583 * common/ptid.h (ptid_get_tid): Don't declare.
1584 * ada-tasks.c: Update.
1585 * aix-thread.c: Update.
1586 * bsd-uthread.c: Update.
1587 * darwin-nat.c: Update.
1588 * fbsd-nat.c: Update.
1589 * i386-darwin-nat.c: Update.
1590 * infrun.c: Update.
1591 * linux-tdep.c: Update.
1592 * nto-procfs.c: Update.
1593 * ppc-ravenscar-thread.c: Update.
1594 * python/py-infthread.c: Update.
1595 * ravenscar-thread.c: Update.
1596 * sol-thread.c: Update.
1597 * sparc-ravenscar-thread.c: Update.
1598 * windows-nat.c: Update.
1599
1600 2018-07-03 Tom Tromey <tom@tromey.com>
1601
1602 * common/ptid.c (ptid_get_lwp): Remove.
1603 * common/ptid.h (ptid_get_lwp): Don't declare.
1604 * aarch64-linux-nat.c: Update.
1605 * ada-tasks.c: Update.
1606 * aix-thread.c: Update.
1607 * amd64-linux-nat.c: Update.
1608 * arm-linux-nat.c: Update.
1609 * corelow.c: Update.
1610 * fbsd-nat.c: Update.
1611 * fbsd-tdep.c: Update.
1612 * gnu-nat.c: Update.
1613 * i386-cygwin-tdep.c: Update.
1614 * i386-gnu-nat.c: Update.
1615 * i386-linux-nat.c: Update.
1616 * ia64-linux-nat.c: Update.
1617 * inf-ptrace.c: Update.
1618 * infrun.c: Update.
1619 * linux-fork.c: Update.
1620 * linux-nat.c: Update.
1621 * linux-tdep.c: Update.
1622 * linux-thread-db.c: Update.
1623 * mips-linux-nat.c: Update.
1624 * nat/aarch64-linux-hw-point.c: Update.
1625 * nat/aarch64-linux.c: Update.
1626 * nat/linux-btrace.c: Update.
1627 * nat/linux-osdata.c: Update.
1628 * nat/linux-procfs.c: Update.
1629 * nat/x86-linux-dregs.c: Update.
1630 * obsd-nat.c: Update.
1631 * ppc-fbsd-nat.c: Update.
1632 * ppc-linux-nat.c: Update.
1633 * procfs.c: Update.
1634 * python/py-infthread.c: Update.
1635 * ravenscar-thread.c: Update.
1636 * remote.c: Update.
1637 * s390-linux-nat.c: Update.
1638 * sol-thread.c: Update.
1639 * sol2-tdep.c: Update.
1640 * spu-linux-nat.c: Update.
1641 * x86-linux-nat.c: Update.
1642 * xtensa-linux-nat.c: Update.
1643
1644 2018-07-03 Tom Tromey <tom@tromey.com>
1645
1646 * common/ptid.c (ptid_get_pid): Remove.
1647 * common/ptid.h (ptid_get_pid): Don't declare.
1648 * aarch64-linux-nat.c: Update.
1649 * ada-lang.c: Update.
1650 * aix-thread.c: Update.
1651 * alpha-bsd-nat.c: Update.
1652 * amd64-fbsd-nat.c: Update.
1653 * amd64-linux-nat.c: Update.
1654 * arm-linux-nat.c: Update.
1655 * arm-nbsd-nat.c: Update.
1656 * auxv.c: Update.
1657 * break-catch-syscall.c: Update.
1658 * breakpoint.c: Update.
1659 * bsd-uthread.c: Update.
1660 * corelow.c: Update.
1661 * ctf.c: Update.
1662 * darwin-nat.c: Update.
1663 * fbsd-nat.c: Update.
1664 * fbsd-tdep.c: Update.
1665 * gcore.c: Update.
1666 * gnu-nat.c: Update.
1667 * hppa-nbsd-nat.c: Update.
1668 * hppa-obsd-nat.c: Update.
1669 * i386-fbsd-nat.c: Update.
1670 * ia64-linux-nat.c: Update.
1671 * inf-ptrace.c: Update.
1672 * infcmd.c: Update.
1673 * inferior.c: Update.
1674 * inferior.h: Update.
1675 * inflow.c: Update.
1676 * infrun.c: Update.
1677 * linux-fork.c: Update.
1678 * linux-nat.c: Update.
1679 * linux-tdep.c: Update.
1680 * linux-thread-db.c: Update.
1681 * m68k-bsd-nat.c: Update.
1682 * mi/mi-interp.c: Update.
1683 * mi/mi-main.c: Update.
1684 * mips-linux-nat.c: Update.
1685 * mips-nbsd-nat.c: Update.
1686 * mips64-obsd-nat.c: Update.
1687 * nat/aarch64-linux-hw-point.c: Update.
1688 * nat/aarch64-linux.c: Update.
1689 * nat/linux-btrace.c: Update.
1690 * nat/linux-osdata.c: Update.
1691 * nat/linux-procfs.c: Update.
1692 * nat/x86-linux-dregs.c: Update.
1693 * nto-procfs.c: Update.
1694 * obsd-nat.c: Update.
1695 * ppc-linux-nat.c: Update.
1696 * ppc-nbsd-nat.c: Update.
1697 * ppc-obsd-nat.c: Update.
1698 * proc-service.c: Update.
1699 * procfs.c: Update.
1700 * python/py-inferior.c: Update.
1701 * python/py-infthread.c: Update.
1702 * ravenscar-thread.c: Update.
1703 * record.c: Update.
1704 * remote-sim.c: Update.
1705 * remote.c: Update.
1706 * rs6000-nat.c: Update.
1707 * s390-linux-nat.c: Update.
1708 * sh-nbsd-nat.c: Update.
1709 * sol-thread.c: Update.
1710 * sparc-nat.c: Update.
1711 * sparc64-tdep.c: Update.
1712 * spu-linux-nat.c: Update.
1713 * spu-tdep.c: Update.
1714 * target-debug.h: Update.
1715 * target.c: Update.
1716 * thread.c: Update.
1717 * tid-parse.c: Update.
1718 * tracefile-tfile.c: Update.
1719 * vax-bsd-nat.c: Update.
1720 * windows-nat.c: Update.
1721 * x86-linux-nat.c: Update.
1722 * x86-nat.c: Update.
1723
1724 2018-07-03 Tom Tromey <tom@tromey.com>
1725
1726 * common/ptid.c (pid_to_ptid): Remove.
1727 * common/ptid.h (pid_to_ptid): Don't declare.
1728 * aix-thread.c: Update.
1729 * arm-linux-nat.c: Update.
1730 * common/ptid.c: Update.
1731 * common/ptid.h: Update.
1732 * corelow.c: Update.
1733 * ctf.c: Update.
1734 * darwin-nat.c: Update.
1735 * fbsd-nat.c: Update.
1736 * fork-child.c: Update.
1737 * gnu-nat.c: Update.
1738 * go32-nat.c: Update.
1739 * inf-ptrace.c: Update.
1740 * infcmd.c: Update.
1741 * inferior.c: Update.
1742 * infrun.c: Update.
1743 * linux-fork.c: Update.
1744 * linux-nat.c: Update.
1745 * nat/aarch64-linux-hw-point.c: Update.
1746 * nat/fork-inferior.c: Update.
1747 * nat/x86-linux-dregs.c: Update.
1748 * nto-procfs.c: Update.
1749 * obsd-nat.c: Update.
1750 * procfs.c: Update.
1751 * progspace.c: Update.
1752 * remote.c: Update.
1753 * rs6000-nat.c: Update.
1754 * s390-linux-nat.c: Update.
1755 * sol-thread.c: Update.
1756 * spu-linux-nat.c: Update.
1757 * target.c: Update.
1758 * top.c: Update.
1759 * tracefile-tfile.c: Update.
1760 * windows-nat.c: Update.
1761
1762 2018-07-03 Tom Tromey <tom@tromey.com>
1763
1764 * common/ptid.h (ptid_build): Don't declare.
1765 * common/ptid.c (ptid_build): Remove.
1766 * aix-thread.c: Update.
1767 * bsd-kvm.c: Update.
1768 * bsd-uthread.c: Update.
1769 * common/agent.c: Update.
1770 * common/ptid.c: Update.
1771 * common/ptid.h: Update.
1772 * corelow.c: Update.
1773 * darwin-nat.c: Update.
1774 * fbsd-nat.c: Update.
1775 * gnu-nat.c: Update.
1776 * linux-fork.c: Update.
1777 * linux-nat.c: Update.
1778 * linux-thread-db.c: Update.
1779 * nat/linux-osdata.c: Update.
1780 * nat/linux-procfs.c: Update.
1781 * nto-procfs.c: Update.
1782 * obsd-nat.c: Update.
1783 * proc-service.c: Update.
1784 * procfs.c: Update.
1785 * ravenscar-thread.c: Update.
1786 * remote-sim.c: Update.
1787 * remote.c: Update.
1788 * sol-thread.c: Update.
1789 * target.c: Update.
1790 * windows-nat.c: Update.
1791
1792 2018-07-03 Tom Tromey <tom@tromey.com>
1793
1794 * infrun.c (follow_exec): Use exit_inferior_silent.
1795 * inferior.c (exit_inferior_num_silent): Remove.
1796 * inferior.h (exit_inferior_num_silent): Don't declare.
1797
1798 2018-07-03 Tom Tromey <tom@tromey.com>
1799
1800 PR cli/23340:
1801 * darwin-nat.c (darwin_attach_pid): Reset inferior and
1802 inferior_ptid on error.
1803
1804 2018-07-02 Maciej W. Rozycki <macro@mips.com>
1805 Simon Marchi <simon.marchi@polymtl.ca>
1806
1807 PR tdep/8282
1808 * disasm.h (gdb_disassembler): Add
1809 `m_disassembler_options_holder'. member
1810 * disasm.c (get_all_disassembler_options): New function.
1811 (gdb_disassembler::gdb_disassembler): Use it.
1812 (gdb_buffered_insn_length_init_dis): Likewise.
1813 (gdb_buffered_insn_length): Adjust accordingly.
1814 (set_disassembler_options): Handle options with arguments.
1815 (show_disassembler_options_sfunc): Likewise. Add a leading new
1816 line if showing options with descriptions.
1817 (disassembler_options_completer): Adapt to using the
1818 `disasm_options_and_args_t' structure.
1819 * mips-tdep.c (mips_disassembler_options): New variable.
1820 (mips_disassembler_options_o32): Likewise.
1821 (mips_disassembler_options_n32): Likewise.
1822 (mips_disassembler_options_n64): Likewise.
1823 (gdb_print_insn_mips): Don't set `disassembler_options'.
1824 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
1825 functions.
1826 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
1827 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
1828 `gdbarch_disassembler_options_implicit' and
1829 `gdbarch_valid_disassembler_options'.
1830 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
1831 `disasm_options_and_args_t' structure.
1832 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
1833 method.
1834 (valid_disassembler_options): Switch from `disasm_options_t' to
1835 the `disasm_options_and_args_t' structure.
1836 * NEWS: Document `set disassembler-options' support for the MIPS
1837 target.
1838 * gdbarch.h: Regenerate.
1839 * gdbarch.c: Regenerate.
1840
1841 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
1842
1843 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
1844
1845 2018-06-29 Joel Brobecker <brobecker@adacore.com>
1846
1847 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
1848 parameter in call to amd64_target_description.
1849 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
1850 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
1851 (amd64fbsd_init_abi): Likewise.
1852 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
1853 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
1854 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
1855 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
1856
1857 2018-06-29 Pedro Alves <palves@redhat.com>
1858
1859 * gdb/amd64-tdep.h (amd64_create_target_description): Add
1860 "segments" parameter.
1861 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
1862 (_initialize_amd64_tdep): Update call to
1863 amd64_create_target_description.
1864 (amd64_target_description): Add "segments" parameter. Adjust
1865 the implementation to use it.
1866 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
1867 call to amd64_create_target_description.
1868 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
1869 * gdb/arch/amd64.h (amd64_create_target_description): Add
1870 "segments" register.
1871 * gdb/arch/amd64.c (amd64_create_target_description): Add
1872 "segments" parameter. Call create_feature_i386_64bit_segments
1873 only if SEGMENTS is true.
1874 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
1875 call to amd64_create_target_description.
1876
1877 2018-06-29 Pedro Alves <palves@redhat.com>
1878
1879 * thread.c (thread_target_id_str): New, factored out from ...
1880 (print_thread_info_1): ... here. Use it to compute the max
1881 "Target Id" column width.
1882
1883 2018-06-29 Pedro Alves <palves@redhat.com>
1884
1885 * remote.c (remote_target::extra_thread_info): Delete
1886 'display_buf' and 'n' locals. from the cache, regardless of
1887 packet mechanims is in use. Use cache for qThreadExtra and qP
1888 methods too.
1889
1890 2018-06-29 Pedro Alves <palves@redhat.com>
1891
1892 * blockframe.c (find_pc_sect_containing_function): New function.
1893 * breakpoint.c (print_breakpoint_location): Don't call
1894 find_pc_sect_function.
1895 * linespec.c (create_sals_line_offset): Record the location's
1896 symbol in the sal.
1897 * linespec.c (convert_address_location_to_sals): Fill in sal's
1898 symbol with find_pc_sect_containing_function.
1899 * symtab.c (find_function_start_sal): Rename to ...
1900 (find_function_start_sal_1): ... this.
1901 (find_function_start_sal): Reimplement as wrapper around
1902 find_function_start_sal_1, and use
1903 find_pc_sect_containing_function to fill in the sal's symbol.
1904 (find_function_start_sal(symbol*, bool)): Adjust.
1905 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
1906 comments.
1907 (find_pc_sect_containing_function): Declare.
1908
1909 2018-06-29 Pedro Alves <palves@redhat.com>
1910
1911 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
1912 true if the the location has no symbol.
1913
1914 2018-06-28 Tom Tromey <tom@tromey.com>
1915
1916 * NEWS: Mention --enable-codesign.
1917 * silent-rules.mk (ECHO_SIGN): New variable.
1918 * configure.ac: Add --enable-codesign.
1919 * configure: Rebuild.
1920 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
1921 (gdb$(EXEEXT)): Optionally invoke codesign.
1922
1923 2018-06-28 Pedro Alves <palves@redhat.com>
1924
1925 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
1926 comments.
1927 (switch_to_thread_no_regs): Adjust comment.
1928 * infcmd.c (stop_pc): Delete.
1929 (post_create_inferior, info_program_command): Replace references
1930 to stop_pc with references to thread_info->suspend.stop_pc.
1931 * inferior.h (stop_pc): Delete declaration.
1932 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
1933 (handle_inferior_event_1, handle_signal_stop)
1934 (process_event_stop_test, keep_going_stepped_thread)
1935 (handle_step_into_function, handle_step_into_function_backward)
1936 (print_stop_location): Replace references to stop_pc with
1937 references to thread_info->suspend.stop_pc.
1938 (struct infcall_suspend_state) <stop_pc>: Delete field.
1939 (save_infcall_suspend_state, restore_infcall_suspend_state):
1940 Remove references to inf_stat->stop_pc.
1941 * linux-fork.c (fork_load_infrun_state): Likewise.
1942 * record-btrace.c (record_btrace_set_replay): Likewise.
1943 * record-full.c (record_full_goto_entry): Likewise.
1944 * remote.c (print_one_stopped_thread): Likewise.
1945 * target.c (target_resume): Extend comment.
1946 * thread.c (set_executing_thread): New.
1947 (set_executing): Use it.
1948 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
1949 Remove references to stop_pc.
1950
1951 2018-06-28 Pedro Alves <palves@redhat.com>
1952
1953 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
1954 Moving fetching stop_pc until after ecs->event_thread is refreshed.
1955
1956 2018-06-28 Tom Tromey <tom@tromey.com>
1957
1958 * coffread.c (coff_symfile_finish): Update.
1959 * xcoffread.c (xcoff_symfile_finish): Update.
1960 * elfread.c (elf_symfile_finish): Update.
1961 * symfile.h (dwarf2_free_objfile): Don't declare.
1962 * dwarf2read.c (_initialize_dwarf2_read): Use
1963 register_objfile_data_with_cleanup.
1964 (dwarf2_free_objfile): Now static. Change signature.
1965
1966 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1967
1968 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
1969 option "-o" to add-symbol-file-load to add an offset to each
1970 section's load address.
1971 * symfile.c (set_objfile_default_section_offset): New function.
1972
1973 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1974
1975 * symfile.c (add_symbol_file_command): Make sure that sections
1976 with the same name are sorted in the same order.
1977
1978 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1979
1980 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
1981 require the second argument. If omitted, load sections at the
1982 addresses specified in the file.
1983
1984 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1985
1986 * symfile.c (symbol_file_command, symbol_file_add_main_1)
1987 (_initialize_symfile): Add option "-o" to symbol-file to add an
1988 offset to each section of the symbol file.
1989
1990 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1991
1992 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
1993
1994 2018-06-27 Tom Tromey <tom@tromey.com>
1995
1996 * stack.c (_initialize_stack): Update "func" help text.
1997
1998 2018-06-27 Tom Tromey <tom@tromey.com>
1999
2000 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
2001 std::vector.
2002 (unwind_infopy_str, pyuw_create_unwind_info)
2003 (unwind_infopy_add_saved_register, pyuw_sniffer)
2004 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
2005 Update.
2006 (struct saved_reg): Add constructor.
2007 <value>: Now a gdbpy_ref<>.
2008
2009 2018-06-27 Tom Tromey <tom@tromey.com>
2010
2011 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
2012
2013 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2014
2015 * gdb-gdb.py.in: Format using autopep8.
2016
2017 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2018
2019 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
2020 (type_lookup_function): Recognize CORE_ADDR values.
2021
2022 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2023
2024 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
2025 print tag_name.
2026
2027 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2028
2029 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
2030 <__lt__>: Add.
2031
2032 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2033
2034 * gdb-gdb.py: Move to...
2035 * gdb-gdb.py.in: ... here.
2036 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
2037 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
2038 dependencies.
2039 (distclean): Remove gdb-gdb.py when cleaning.
2040 (gdb-gdb.py, gdb-gdb.gdb): New rules.
2041 * configure: Re-generate.
2042
2043 2018-06-27 Pedro Alves <palves@redhat.com>
2044
2045 * proc-service.c (get_ps_regcache): New.
2046 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2047 (ps_lsetfpregs): Use it.
2048
2049 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
2050
2051 PR gdb/21695
2052 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
2053 (dwarf_decode_lines_1): Adjust.
2054
2055 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2056
2057 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
2058 override.
2059 <info_proc>: Likewise.
2060
2061 2018-06-26 Joel Brobecker <brobecker@adacore.com>
2062
2063 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
2064 to windows_fetch_one_register, and only handle the case of
2065 fetching one register. Move the code that reloads the context
2066 and iterates over all registers if R is negative to...
2067 (windows_nat_target::fetch_registers): ... here.
2068 (do_windows_store_inferior_registers): Rename to
2069 windows_store_one_register, and only handle the case of storing
2070 one register. Move the code that handles the case where r is
2071 negative to...
2072 (windows_nat_target::store_registers) ... here.
2073
2074 2018-06-26 Tom Tromey <tom@tromey.com>
2075
2076 PR rust/22574:
2077 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
2078 * rust-lang.c (rust_print_struct_def): Add podata parameter.
2079 Update.
2080 (rust_internal_print_type): Add podata parameter.
2081 (rust_print_type): Update.
2082
2083 2018-06-26 Tom Tromey <tom@tromey.com>
2084
2085 * typeprint.h (struct print_offset_data) <update, finish,
2086 maybe_print_hole>: New methods.
2087 <indentation>: New constant.
2088 * typeprint.c (print_offset_data::indentation): Define.
2089 (print_offset_data::maybe_print_hole, print_offset_data::update)
2090 (print_offset_data::finish): Move from c-typeprint.c and rename.
2091 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
2092 (print_spaces_filtered_with_print_options): Update.
2093 (c_print_type_union_field_offset, maybe_print_hole)
2094 (c_print_type_struct_field_offset): Move to typeprint.c and
2095 rename.
2096 (c_type_print_base_struct_union): Update.
2097
2098 2018-06-25 Pedro Alves <palves@redhat.com>
2099
2100 * gdbthread.h (thread_info_ref, delete_thread)
2101 (delete_thread_silent, first_thread_of_inferior)
2102 (any_thread_of_inferior, switch_to_thread)
2103 (enable_thread_stack_temporaries)
2104 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2105 (get_last_thread_stack_temporary)
2106 (value_in_thread_stack_temporaries, can_access_registers_thread):
2107 Spell out "struct thread_info" instead of just "thread_info".
2108 * inferior.h (notice_new_inferior): Likewise.
2109
2110 2018-06-25 Pedro Alves <palves@redhat.com>
2111
2112 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2113 pass thread_info pointer to delete_thread.
2114 (windows_nat_target::detach): Pass inferior pointer to
2115 detach_inferior.
2116 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
2117 delete_thread.
2118 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
2119 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
2120 and pass a thread_info pointer to delete_thread.
2121 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
2122 pass thread_info pointer to delete_thread.
2123 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
2124 delete_thread_silent call.
2125 * procfs.c (procfs_target::detach): Pass inferior pointer to
2126 detach_inferior.
2127 (procfs_target::wait): Pass thread_info pointer to delete_thread.
2128 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
2129 delete_thread_silent call.
2130 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2131 pass thread_info pointer to delete_thread.
2132 (windows_nat_target::detach): Pass inferior pointer to
2133 delete_inferior.
2134
2135 2018-06-22 Alan Hayward <alan.hayward@arm.com>
2136
2137 * regcache.c (readable_regcache::read_part): Fix asserts.
2138 (reg_buffer::raw_collect_part): New function.
2139 (regcache::write_part): Fix asserts.
2140 (reg_buffer::raw_supply_part): New function.
2141 (regcache::transfer_regset_register): New helper function.
2142 (regcache::transfer_regset): Call new functions.
2143 (regcache_supply_regset): Use gdb_byte*.
2144 (regcache::supply_regset): Likewise.
2145 (regcache_collect_regset): Likewise.
2146 (regcache::collect_regset): Likewise.
2147 * regcache.h (reg_buffer::raw_collect_part): New declaration.
2148 (reg_buffer::raw_supply_part): Likewise.
2149 (regcache::transfer_regset_register): Likewise.
2150 (regcache::transfer_regset): Use gdb_byte*.
2151
2152 2018-06-22 Alan Hayward <alan.hayward@arm.com>
2153
2154 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
2155
2156 2018-06-21 Pedro Alves <palves@redhat.com>
2157
2158 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
2159 instead of a ptid_t. All callers adjusted.
2160 * ada-tasks.c (ada_get_task_number): Likewise. All callers
2161 adjusted.
2162 (print_ada_task_info, display_current_task_id, task_command_1):
2163 Adjust.
2164 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
2165 inferior_thread.
2166 (breakpoint_kind): Adjust.
2167 (remove_breakpoints_pid): Rename to ...
2168 (remove_breakpoints_inf): ... this. Adjust to take an inferior
2169 pointer. All callers adjusted.
2170 (bpstat_clear_actions): Use inferior_thread.
2171 (get_bpstat_thread): New.
2172 (bpstat_do_actions): Use it.
2173 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
2174 to take a thread_info pointer. All callers adjusted.
2175 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
2176 (breakpoint_re_set_thread): Use inferior_thread.
2177 * breakpoint.h (struct inferior): Forward declare.
2178 (bpstat_stop_status): Update.
2179 (remove_breakpoints_pid): Delete.
2180 (remove_breakpoints_inf): New.
2181 * bsd-uthread.c (bsd_uthread_target::wait)
2182 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
2183 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
2184 (maint_btrace_packet_history_cmd)
2185 (maint_btrace_clear_packet_history_cmd): Adjust.
2186 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
2187 inferior_thread.
2188 * cli/cli-interp.c: Include "inferior.h".
2189 * common/refcounted-object.h (struct
2190 refcounted_object_ref_policy): New.
2191 * compile/compile-object-load.c: Include gdbthread.h.
2192 (store_regs): Use inferior_thread.
2193 * corelow.c (core_target::close): Use current_inferior.
2194 (core_target_open): Adjust to use first_thread_of_inferior and use
2195 the current inferior.
2196 * ctf.c (ctf_target::close): Adjust to use current_inferior.
2197 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
2198 <thread>: ... this new field. All references adjusted.
2199 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
2200 Take a thread_info pointer instead of a ptid_t.
2201 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
2202 (dummy_frame_discard, register_dummy_frame_dtor): Take a
2203 thread_info pointer instead of a ptid_t.
2204 * elfread.c: Include "inferior.h".
2205 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
2206 Use inferior_thread.
2207 * eval.c (evaluate_subexp): Likewise.
2208 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
2209 inferior_thread.
2210 * gdb_proc_service.h (struct thread_info): Forward declare.
2211 (struct ps_prochandle) <ptid>: Delete, replaced by ...
2212 <thread>: ... this new field. All references adjusted.
2213 * gdbarch.h, gdbarch.c: Regenerate.
2214 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
2215 'thread' parameter. All implementations and callers adjusted.
2216 * gdbthread.h (thread_info) <set_running>: New method.
2217 (delete_thread, delete_thread_silent): Take a thread_info pointer
2218 instead of a ptid.
2219 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
2220 (first_thread_of_process): Delete, replaced by ...
2221 (first_thread_of_inferior): ... this new function. All callers
2222 adjusted.
2223 (any_live_thread_of_process): Delete, replaced by ...
2224 (any_live_thread_of_inferior): ... this new function. All callers
2225 adjusted.
2226 (switch_to_thread, switch_to_no_thread): Declare.
2227 (is_executing): Delete.
2228 (enable_thread_stack_temporaries): Update comment.
2229 <enable_thread_stack_temporaries>: Take a thread_info pointer
2230 instead of a ptid_t. Incref the thread.
2231 <~enable_thread_stack_temporaries>: Decref the thread.
2232 <m_ptid>: Delete
2233 <m_thr>: New.
2234 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2235 (get_last_thread_stack_temporary)
2236 (value_in_thread_stack_temporaries, can_access_registers_thread):
2237 Take a thread_info pointer instead of a ptid_t. All callers
2238 adjusted.
2239 * infcall.c (get_call_return_value): Use inferior_thread.
2240 (run_inferior_call): Work with thread pointers instead of ptid_t.
2241 (call_function_by_hand_dummy): Work with thread pointers instead
2242 of ptid_t. Use thread_info_ref.
2243 * infcmd.c (proceed_thread_callback): Access thread's state
2244 directly.
2245 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
2246 access thread's state directly.
2247 (continue_command): Use inferior_thread.
2248 (info_program_command): Use find_thread_ptid and access thread
2249 state directly.
2250 (proceed_after_attach_callback): Use thread state directly.
2251 (notice_new_inferior): Take a thread_info pointer instead of a
2252 ptid_t. All callers adjusted.
2253 (exit_inferior): Take an inferior pointer instead of a pid. All
2254 callers adjusted.
2255 (exit_inferior_silent): New.
2256 (detach_inferior): Delete.
2257 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
2258 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
2259 (detach_inferior_command, kill_inferior_command): Use
2260 find_inferior_id instead of valid_gdb_inferior_id and
2261 gdb_inferior_id_to_pid.
2262 (inferior_command): Use inferior and thread pointers.
2263 * inferior.h (struct thread_info): Forward declare.
2264 (notice_new_inferior): Take a thread_info pointer instead of a
2265 ptid_t. All callers adjusted.
2266 (detach_inferior): Delete declaration.
2267 (exit_inferior, exit_inferior_silent): Take an inferior pointer
2268 instead of a pid. All callers adjusted.
2269 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
2270 (valid_gdb_inferior_id): Delete.
2271 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
2272 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
2273 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
2274 ...
2275 <inf>: ... this new field.
2276 <step_ptid>: Delete, replaced by ...
2277 <step_thread>: ... this new field.
2278 (get_displaced_stepping_state): Take an inferior pointer instead
2279 of a pid. All callers adjusted.
2280 (displaced_step_in_progress_any_inferior): Adjust.
2281 (displaced_step_in_progress_thread): Take a thread pointer instead
2282 of a ptid_t. All callers adjusted.
2283 (displaced_step_in_progress, add_displaced_stepping_state): Take
2284 an inferior pointer instead of a pid. All callers adjusted.
2285 (get_displaced_step_closure_by_addr): Adjust.
2286 (remove_displaced_stepping_state): Take an inferior pointer
2287 instead of a pid. All callers adjusted.
2288 (displaced_step_prepare_throw, displaced_step_prepare)
2289 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
2290 All callers adjusted.
2291 (start_step_over): Adjust.
2292 (infrun_thread_ptid_changed): Remove bit updating ptids in the
2293 displaced step queue.
2294 (do_target_resume): Adjust.
2295 (fetch_inferior_event): Use inferior_thread.
2296 (context_switch, get_inferior_stop_soon): Take an
2297 execution_control_state pointer instead of a ptid_t. All callers
2298 adjusted.
2299 (switch_to_thread_cleanup): Delete.
2300 (stop_all_threads): Use scoped_restore_current_thread.
2301 * inline-frame.c: Include "gdbthread.h".
2302 (inline_state) <inline_state>: Take a thread pointer instead of a
2303 ptid_t. All callers adjusted.
2304 <ptid>: Delete, replaced by ...
2305 <thread>: ... this new field.
2306 (find_inline_frame_state): Take a thread pointer instead of a
2307 ptid_t. All callers adjusted.
2308 (skip_inline_frames, step_into_inline_frame)
2309 (inline_skipped_frames, inline_skipped_symbol): Take a thread
2310 pointer instead of a ptid_t. All callers adjusted.
2311 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
2312 (inline_skipped_frames, inline_skipped_symbol): Likewise.
2313 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
2314 pointers directly.
2315 * linux-nat.c (get_detach_signal): Likewise.
2316 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
2317 (thread_db_notice_clone): Adjust.
2318 (thread_db_find_new_threads_silently)
2319 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
2320 a thread pointer instead of a ptid_t. All callers adjusted.
2321 * mi/mi-cmd-var.c: Include "inferior.h".
2322 (mi_cmd_var_update_iter): Update to use thread pointers.
2323 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
2324 inferior directly.
2325 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
2326 out to ...
2327 (mi_output_running): ... this new function.
2328 (mi_on_resume_1): Adjust to use it.
2329 (mi_user_selected_context_changed): Adjust to use inferior_thread.
2330 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
2331 directly.
2332 (interrupt_thread_callback): : Adjust to use thread and inferior
2333 pointers.
2334 * proc-service.c: Include "gdbthread.h".
2335 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
2336 * progspace-and-thread.c: Include "inferior.h".
2337 * progspace.c: Include "inferior.h".
2338 * python/py-exitedevent.c (create_exited_event_object): Adjust to
2339 hold a reference to an inferior_object.
2340 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
2341 inferior_thread.
2342 * python/py-inferior.c (struct inferior_object): Give the type a
2343 tag name instead of a typedef.
2344 (python_on_normal_stop): No need to check if the current thread is
2345 listed.
2346 (inferior_to_inferior_object): Change return type to
2347 inferior_object. All callers adjusted.
2348 (find_thread_object): Delete, bits factored out to ...
2349 (thread_to_thread_object): ... this new function.
2350 * python/py-infthread.c (create_thread_object): Use
2351 inferior_to_inferior_object.
2352 (thpy_is_stopped): Use thread pointer directly.
2353 (gdbpy_selected_thread): Use inferior_thread.
2354 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
2355 field, replaced with ...
2356 <thread>: ... this new field. All users adjusted.
2357 (btpy_insn_or_gap_new): Drop const.
2358 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
2359 callers adjusted.
2360 * python/py-record.c: Include "gdbthread.h".
2361 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2362 a ptid_t. All callers adjusted.
2363 (gdbpy_current_recording): Use inferior_thread.
2364 * python/py-record.h (recpy_record_object) <ptid>: Delete
2365 field, replaced with ...
2366 <thread>: ... this new field. All users adjusted.
2367 (recpy_element_object) <ptid>: Delete
2368 field, replaced with ...
2369 <thread>: ... this new field. All users adjusted.
2370 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2371 a ptid_t. All callers adjusted.
2372 * python/py-threadevent.c: Include "gdbthread.h".
2373 (get_event_thread): Use thread_to_thread_object.
2374 * python/python-internal.h (struct inferior_object): Forward
2375 declare.
2376 (find_thread_object, find_inferior_object): Delete declarations.
2377 (thread_to_thread_object, inferior_to_inferior_object): New
2378 declarations.
2379 * record-btrace.c: Include "inferior.h".
2380 (require_btrace_thread): Use inferior_thread.
2381 (record_btrace_frame_sniffer)
2382 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
2383 (get_thread_current_frame): Use scoped_restore_current_thread and
2384 switch_to_thread.
2385 (get_thread_current_frame): Use thread pointer directly.
2386 (record_btrace_replay_at_breakpoint): Use thread's inferior
2387 pointer directly.
2388 * record-full.c: Include "inferior.h".
2389 * regcache.c: Include "gdbthread.h".
2390 (get_thread_arch_regcache): Use the inferior's address space
2391 directly.
2392 (get_thread_regcache, registers_changed_thread): New.
2393 * regcache.h (get_thread_regcache(thread_info *thread)): New
2394 overload.
2395 (registers_changed_thread): New.
2396 (remote_target) <remote_detach_1>: Swap order of parameters.
2397 (remote_add_thread): <remote_add_thread>: Return the new thread.
2398 (get_remote_thread_info(ptid_t)): New overload.
2399 (remote_target::remote_notice_new_inferior): Use thread pointers
2400 directly.
2401 (remote_target::process_initial_stop_replies): Use
2402 thread_info::set_running.
2403 (remote_target::remote_detach_1, remote_target::detach)
2404 (extended_remote_target::detach): Adjust.
2405 * stack.c (frame_show_address): Use inferior_thread.
2406 * target-debug.h (target_debug_print_thread_info_pp): New.
2407 * target-delegates.c: Regenerate.
2408 * target.c (default_thread_address_space): Delete.
2409 (memory_xfer_partial_1): Use current_inferior.
2410 (target_detach): Use current_inferior.
2411 (target_thread_address_space): Delete.
2412 (generic_mourn_inferior): Use current_inferior.
2413 * target.h (struct target_ops) <thread_address_space>: Delete.
2414 (target_thread_address_space): Delete.
2415 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
2416 pointers directly.
2417 (delete_thread_1, delete_thread, delete_thread_silent): Take a
2418 thread pointer instead of a ptid_t. Adjust all callers.
2419 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
2420 (first_thread_of_process): Delete, replaced by ...
2421 (first_thread_of_inferior): ... this new function. All callers
2422 adjusted.
2423 (any_thread_of_process): Rename to ...
2424 (any_thread_of_inferior): ... this, and take an inferior pointer.
2425 (any_live_thread_of_process): Rename to ...
2426 (any_live_thread_of_inferior): ... this, and take an inferior
2427 pointer.
2428 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2429 (value_in_thread_stack_temporaries)
2430 (get_last_thread_stack_temporary): Take a thread pointer instead
2431 of a ptid_t. Adjust all callers.
2432 (thread_info::set_running): New.
2433 (validate_registers_access): Use inferior_thread.
2434 (can_access_registers_ptid): Rename to ...
2435 (can_access_registers_thread): ... this, and take a thread
2436 pointer.
2437 (print_thread_info_1): Adjust to compare thread pointers instead
2438 of ptids.
2439 (switch_to_no_thread, switch_to_thread): Make extern.
2440 (scoped_restore_current_thread::~scoped_restore_current_thread):
2441 Use m_thread pointer directly.
2442 (scoped_restore_current_thread::scoped_restore_current_thread):
2443 Use inferior_thread.
2444 (thread_command): Use thread pointer directly.
2445 (thread_num_make_value_helper): Use inferior_thread.
2446 * top.c (execute_command): Use inferior_thread.
2447 * tui/tui-interp.c: Include "inferior.h".
2448 * varobj.c (varobj_create): Use inferior_thread.
2449 (value_of_root_1): Use find_thread_global_id instead of
2450 global_thread_id_to_ptid.
2451
2452 2018-06-21 Alan Hayward <alan.hayward@arm.com>
2453
2454 * regcache.c (readable_regcache::read_part): Avoid memcpy when
2455 possible.
2456 (regcache::write_part): Likewise.
2457 (readable_regcache::cooked_read_part): Update comment.
2458 (readable_regcache::cooked_write_part): Likewise.
2459 * regcache.h: (readable_regcache::read_part): Likewise.
2460 (regcache::write_part): Likewise.
2461
2462 2018-06-21 Richard Bunt <richard.bunt@arm.com>
2463 Dirk Schubert <dirk.schubert@arm.com>
2464
2465 * aarch64-linux-nat.c (post_attach): New.
2466 (aarch64_linux_nat_target::post_attach): Override post_attach to
2467 record the number of hardware debug registers.
2468
2469 2018-06-20 Tom Tromey <tom@tromey.com>
2470
2471 * python/py-param.c (add_setshow_generic): Make parameters const.
2472 (parmpy_init): Update.
2473
2474 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
2475
2476 * regcache.h (regcache_cooked_read_ftype): Rename to...
2477 (register_read_ftype): ...this, change type to function_view.
2478 (class reg_buffer) <save>: Remove src parameter.
2479 (readonly_detached_regcache) <readonly_detached_regcache>: Make
2480 parameter non-const in first overload. Remove src parameter in
2481 second overload.
2482 * regcache.c (do_cooked_read): Remove.
2483 (readonly_detached_regcache::readonly_detached_regcache): Make
2484 parameter non-const, adjust call to other constructor.
2485 (reg_buffer::save): Remove src parameter.
2486 * frame.c (do_frame_register_read): Remove.
2487 (frame_save_as_regcache): Use lambda function.
2488 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
2489 parameter to ppu2spu_data *.
2490 (ppu2spu_sniffer): Use lambda function.
2491
2492 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
2493
2494 * record-full.c (record_full_target::insert_breakpoint): Remove
2495 "struct" keyword, add const.
2496
2497 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
2498
2499 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
2500 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
2501 * configure.ac: Remove AC_PREREQ, add missing quoting.
2502 * gnulib/configure.ac: Modernize usage of
2503 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
2504 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
2505 (AUTOMAKE_VERSION): Bump to 1.15.1.
2506 * configure: Re-generate.
2507 * config.in: Re-generate.
2508 * aclocal.m4: Re-generate.
2509 * gnulib/aclocal.m4: Re-generate.
2510 * gnulib/config.in: Re-generate.
2511 * gnulib/configure: Re-generate.
2512 * gnulib/import/Makefile.in: Re-generate.
2513
2514 2018-06-19 Pedro Alves <palves@redhat.com>
2515
2516 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
2517 (lookup_minimal_symbol_by_pc_section): ... here with
2518 gdb_assert_not_reached added.
2519
2520 2018-06-19 Pedro Alves <palves@redhat.com>
2521
2522 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
2523 parameter with a block parameter. Compare location's block symbol
2524 with the frame's block instead of addresses.
2525 (skip_inline_frames): Pass the current block instead of the
2526 frame's address. Break out as soon as we determine the frame
2527 should not be skipped.
2528
2529 2018-06-18 Tom Tromey <tom@tromey.com>
2530
2531 * solib-aix.c (solib_aix_get_section_offsets): Return
2532 unique_xmalloc_ptr.
2533 (solib_aix_solib_create_inferior_hook): Update.
2534
2535 2018-06-18 Tom Tromey <tom@tromey.com>
2536
2537 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
2538
2539 2018-06-18 Tom Tromey <tom@tromey.com>
2540
2541 * solib-frv.c (frv_relocate_main_executable): Use
2542 unique_xmalloc_ptr.
2543 * solib-dsbt.c (dsbt_relocate_main_executable): Use
2544 unique_xmalloc_ptr.
2545
2546 2018-06-18 Tom Tromey <tom@tromey.com>
2547
2548 * objfiles.h (inhibit_section_map_updates): Update.
2549 (resume_section_map_updates, resume_section_map_updates_cleanup):
2550 Remove.
2551 * solib-svr4.c (svr4_handle_solib_event): Update.
2552 * objfiles.c (inhibit_section_map_updates): Return
2553 scoped_restore_tmpl<int>.
2554 (resume_section_map_updates, resume_section_map_updates_cleanup):
2555 Remove.
2556
2557 2018-06-18 Tom Tromey <tom@tromey.com>
2558
2559 * valprint.h (read_string): Update.
2560 * valprint.c (read_string): Change type of "buffer".
2561 (val_print_string): Update.
2562 * python/py-value.c (valpy_string): Update.
2563 * language.h (struct language_defn) <la_get_string>: Change
2564 type of "buffer".
2565 (default_get_string, c_get_string): Update.
2566 * language.c (default_get_string): Change type of "buffer".
2567 * guile/scm-value.c (gdbscm_value_to_string): Update.
2568 * c-lang.c (c_get_string): Change type of "buffer".
2569
2570 2018-06-18 Tom Tromey <tom@tromey.com>
2571
2572 * ser-mingw.c (struct pipe_state_destroyer): New.
2573 (pipe_state_up): New typedef.
2574 (cleanup_pipe_state): Remove.
2575 (pipe_windows_open): Use pipe_state_up. Don't release argv.
2576
2577 2018-06-18 Tom Tromey <tom@tromey.com>
2578
2579 * rust-lang.h (rust_yyerror): Don't declare.
2580 * rust-lang.c (rust_language_defn): Update.
2581 * rust-exp.y (yyerror): Now static.
2582 * parse.c (parse_exp_in_context_1): Update.
2583 * p-lang.h (p_yyerror): Don't declare.
2584 * p-lang.c (p_language_defn): Update.
2585 * p-exp.y (yyerror): Now static.
2586 * opencl-lang.c (opencl_language_defn): Update.
2587 * objc-lang.c (objc_language_defn): Update.
2588 * m2-lang.h (m2_yyerror): Don't declare.
2589 * m2-lang.c (m2_language_defn): Update.
2590 * m2-exp.y (yyerror): Now static.
2591 * language.h (struct language_defn) <la_error>: Remove.
2592 * language.c (unk_lang_error): Remove.
2593 (unknown_language_defn, auto_language_defn): Remove.
2594 * go-lang.h (go_yyerror): Don't declare.
2595 * go-lang.c (go_language_defn): Update.
2596 * go-exp.y (yyerror): Now static.
2597 * f-lang.h (f_yyerror): Don't declare.
2598 * f-lang.c (f_language_defn): Update.
2599 * f-exp.y (yyerror): Now static.
2600 * d-lang.h (d_yyerror): Don't declare.
2601 * d-lang.c (d_language_defn): Update.
2602 * d-exp.y (yyerror): Now static.
2603 * c-lang.h (c_yyerror): Don't declare.
2604 * c-lang.c (c_language_defn, cplus_language_defn)
2605 (asm_language_defn, minimal_language_defn): Update.
2606 * c-exp.y (yyerror): Now static.
2607 * ada-lang.h (ada_yyerror): Don't declare.
2608 * ada-lang.c (ada_language_defn): Update.
2609 * ada-exp.y (yyerror): Now static.
2610
2611 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2612
2613 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
2614 (store_sveregs_to_thread): Likewise.
2615 (aarch64_linux_fetch_inferior_registers): Check for SVE.
2616 (aarch64_linux_store_inferior_registers): Likewise.
2617 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
2618 function.
2619 (aarch64_sve_regs_copy_to_regcache): Likewise.
2620 (aarch64_sve_regs_copy_from_regcache): Likewise.
2621 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
2622 declaration.
2623 (aarch64_sve_regs_copy_to_regcache): Likewise.
2624 (aarch64_sve_regs_copy_from_regcache): Likewise.
2625 (sve_context): Structure from Linux headers.
2626 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
2627 (SVE_SIG_ZREG_SIZE): Likewise.
2628 (SVE_SIG_PREG_SIZE): Likewise.
2629 (SVE_SIG_FFR_SIZE): Likewise.
2630 (SVE_SIG_REGS_OFFSET): Likewise.
2631 (SVE_SIG_ZREGS_OFFSET): Likewise.
2632 (SVE_SIG_ZREG_OFFSET): Likewise.
2633 (SVE_SIG_ZREGS_SIZE): Likewise.
2634 (SVE_SIG_PREGS_OFFSET): Likewise.
2635 (SVE_SIG_PREG_OFFSET): Likewise.
2636 (SVE_SIG_PREGS_SIZE): Likewise.
2637 (SVE_SIG_FFR_OFFSET): Likewise.
2638 (SVE_SIG_REGS_SIZE): Likewise.
2639 (SVE_SIG_CONTEXT_SIZE): Likewise.
2640 (SVE_PT_REGS_MASK): Likewise.
2641 (SVE_PT_REGS_FPSIMD): Likewise.
2642 (SVE_PT_REGS_SVE): Likewise.
2643 (SVE_PT_VL_INHERIT): Likewise.
2644 (SVE_PT_VL_ONEXEC): Likewise.
2645 (SVE_PT_REGS_OFFSET): Likewise.
2646 (SVE_PT_FPSIMD_OFFSET): Likewise.
2647 (SVE_PT_FPSIMD_SIZE): Likewise.
2648 (SVE_PT_SVE_ZREG_SIZE): Likewise.
2649 (SVE_PT_SVE_PREG_SIZE): Likewise.
2650 (SVE_PT_SVE_FFR_SIZE): Likewise.
2651 (SVE_PT_SVE_FPSR_SIZE): Likewise.
2652 (SVE_PT_SVE_FPCR_SIZE): Likewise.
2653 (__SVE_SIG_TO_PT): Likewise.
2654 (SVE_PT_SVE_OFFSET): Likewise.
2655 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
2656 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
2657 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
2658 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
2659 (SVE_PT_SVE_PREG_OFFSET): Likewise.
2660 (SVE_PT_SVE_PREGS_SIZE): Likewise.
2661 (SVE_PT_SVE_FFR_OFFSET): Likewise.
2662 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
2663 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
2664 (SVE_PT_SVE_SIZE): Likewise.
2665 (SVE_PT_SIZE): Likewise.
2666 (HAS_SVE_STATE): New define.
2667
2668 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2669
2670 * nat/aarch64-sve-linux-sigcontext.h: New file.
2671 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
2672 new files.
2673 (SVE_VQ_MIN): Likewise.
2674 (SVE_VQ_MAX): Likewise.
2675 (SVE_VL_MIN): Likewise.
2676 (SVE_VL_MAX): Likewise.
2677 (SVE_NUM_ZREGS): Likewise.
2678 (SVE_NUM_PREGS): Likewise.
2679 (sve_vl_valid): Likewise.
2680 (struct user_sve_header): Likewise.
2681
2682 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
2683 Richard Bunt <Richard.Bunt@arm.com>
2684
2685 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
2686 was requested by GDB.
2687
2688 2018-06-15 Tom de Vries <tdevries@suse.de>
2689
2690 * MAINTAINERS (Write After Approval): Add Tom de Vries.
2691
2692 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
2693
2694 * gnulib/update-gnulib.sh: Print expected versions of
2695 autoconf/aclocal.
2696
2697 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
2698
2699 * arch-utils.c (default_type_align): Use type_length_units.
2700 * gdbtypes.c (type_align): Use type_length_units.
2701
2702 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2703
2704 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
2705 of 'define' command.
2706
2707 2018-06-14 Tom de Vries <tdevries@suse.de>
2708
2709 PR cli/22573
2710 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
2711 get_no_prettyformat_print_options.
2712
2713 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
2714
2715 * sparc-nat.h: Include target.h.
2716 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
2717 <fetch_registers>: Remove this argument in function call.
2718 <store_registers>: Remove this argument in function call, remove
2719 extra semicolon.
2720 <low_forget_process>: Call sparc64_forget_process instead of
2721 sparc_forget_process.
2722
2723 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2724
2725 * procfs.c (_initialize_procfs): Use add_inf_child_target.
2726 (procfs_target::make_corefile_notes): Adjust to new
2727 target_read_alloc return type.
2728
2729 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2730 Stephen Roberts <stephen.roberts@arm.com>
2731
2732 PR gdb/22882
2733 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
2734 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
2735 Move should_notify_stop local into more inner scope.
2736
2737 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2738 Stephen Roberts <stephen.roberts@arm.com>
2739
2740 PR gdb/22882
2741 * infrun.c (resume_1): Add call to mark_async_event_handler.
2742
2743 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2744
2745 * infrun.c (do_target_wait): Change old version of $pc printed.
2746
2747 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
2748
2749 * dwarf2read.c (read_index_from_section): Rename to...
2750 (read_gdb_index_from_section): ... this, update all callers.
2751 (dwarf2_read_index): Rename to...
2752 (dwarf2_read_gdb_index): ... this, update all callers.
2753
2754 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
2755
2756 * gdb/hppa-linux-nat.c
2757 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
2758 hppa_linux_nat_target::fetch_registers.
2759
2760 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2761
2762 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
2763 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
2764 (AARCH64_DWARF_SVE_FFR): Likewise.
2765 (AARCH64_DWARF_SVE_P0): Likewise.
2766 (AARCH64_DWARF_SVE_Z0): Likewise.
2767
2768 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2769
2770 * common/common-regcache.h (raw_compare): New function.
2771 * regcache.c (regcache::raw_compare): Likewise.
2772 * regcache.h (regcache::raw_compare): New declaration.
2773
2774 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2775
2776 * common/common-regcache.h (reg_buffer_common): New structure.
2777 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
2778 (reg_buffer::raw_supply): Likewise.
2779 (reg_buffer::raw_supply_integer): Likewise.
2780 (reg_buffer::raw_supply_zeroed): Likewise.
2781 (reg_buffer::raw_collect): Likewise.
2782 (reg_buffer::raw_collect_integer): Likewise.
2783 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
2784 (reg_buffer::raw_supply): Likewise.
2785 (reg_buffer::raw_supply_integer): Likewise.
2786 (reg_buffer::raw_supply_zeroed): Likewise.
2787 (reg_buffer::raw_collect): Likewise.
2788 (reg_buffer::raw_collect_integer): Likewise.
2789
2790 2018-06-10 Tom Tromey <tom@tromey.com>
2791
2792 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
2793 (class remote_state) <stop_reply_queue>: Now std::vector.
2794 (remote_state::~remote_state)
2795 (remote_target::stop_reply_queue_length): Update.
2796 (struct queue_iter_param, remove_child_of_pending_fork)
2797 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
2798 (check_pending_event_prevents_wildcard_vcont_callback)
2799 (remove_stop_reply_for_inferior)
2800 (remove_stop_reply_of_remote_state)
2801 (remote_notif_remove_once_on_match)
2802 (stop_reply_match_ptid_and_ws)
2803 (remote_kill_child_of_pending_fork): Remove.
2804 (remote_target::remove_new_fork_children)
2805 (remote_target::check_pending_events_prevent_wildcard_vcont)
2806 (remote_target::discard_pending_stop_replies)
2807 (remote_target::discard_pending_stop_replies_in_queue)
2808 (remote_target::remote_notif_remove_queued_reply)
2809 (remote_target::queued_stop_reply)
2810 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
2811 (remote_target::wait, remote_target::kill_new_fork_children)
2812 (remote_target::async): Update.
2813
2814 2018-06-10 Tom Tromey <tom@tromey.com>
2815
2816 * record-full.c (record_full_arch_list_cleanups): Remove.
2817 (record_full_message): Use try/catch.
2818 (record_full_wait_cleanups): Remove.
2819 (record_full_wait_1): Use try/catch.
2820 (record_full_restore): Likewise.
2821
2822 2018-06-10 Tom Tromey <tom@tromey.com>
2823
2824 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
2825 declare VEC. Add constructor.
2826 <in_target_beneath>: Now bool.
2827 (record_full_breakpoints): Now a std::vector, static.
2828 (record_full_sync_record_breakpoints)
2829 (record_full_init_record_breakpoints)
2830 (record_full_target::insert_breakpoint)
2831 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
2832
2833 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
2834
2835 * dwarf2read.c (process_cu_includes): Remove struct keyword.
2836 * serial.c (serial_interface_lookup): Remove struct keyword.
2837
2838 2018-06-10 Tom Tromey <tom@tromey.com>
2839
2840 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
2841 method.
2842 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
2843 a method.
2844 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
2845 method.
2846 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
2847 "beneath" as a method.
2848 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
2849 Use "beneath" as a method.
2850
2851 2018-06-10 Tom Tromey <tom@tromey.com>
2852
2853 * tracefile.c (struct trace_file_writer_deleter): New.
2854 <operator()>: Rename from trace_file_writer_xfree.
2855 (trace_file_writer_up): New typedef.
2856 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
2857
2858 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
2859
2860 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
2861 <m_registers, m_register_status>: Change type to
2862 std::unique_ptr.
2863 * regcache.c (reg_buffer::reg_buffer): Use new instead of
2864 XCNEWVEC.
2865
2866 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
2867
2868 * common/common-regcache.h (enum register_status): Add
2869 underlying type "signed char".
2870 * regcache.h (reg_buffer) <m_register_status>: Change type to
2871 register_status *.
2872 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
2873 register_status instead of signed char.
2874 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
2875 (reg_buffer::get_register_status): Remove cast.
2876 (readable_regcache::raw_read): Remove cast.
2877 (readable_regcache::cooked_read): Remove cast.
2878
2879 2018-06-09 Tom Tromey <tom@tromey.com>
2880
2881 * source.c (reverse_search_command, forward_search_command): Use
2882 scoped_fd.
2883
2884 2018-06-09 Tom Tromey <tom@tromey.com>
2885
2886 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
2887 (serial_ops_list): Now static, std::vector.
2888 (serial_interface_lookup, serial_add_interface): Update.
2889
2890 2018-06-09 Tom Tromey <tom@tromey.com>
2891
2892 * dwarf2read.c (process_cu_includes): Update.
2893 (process_full_comp_unit): Update.
2894 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
2895 std::vector.
2896
2897 2018-06-08 Paul Koning <paul_koning@dell.com>
2898
2899 PR gdb/23252
2900
2901 * python/python.c (do_start_initialization):
2902 Avoid call to internal Python API.
2903 (init__gdb_module): New function.
2904
2905 2018-06-08 Gary Benson <gbenson@redhat.com>
2906
2907 * linux-thread-db.c (valprint.h): New include.
2908 (struct check_thread_db_info): New structure.
2909 (check_thread_db_on_load, tdb_testinfo): New static globals.
2910 (check_thread_db, check_thread_db_callback): New functions.
2911 (try_thread_db_load_1): Run integrity checks if requested.
2912 (maintenance_check_libthread_db): New function.
2913 (_initialize_thread_db): Register "maint check libthread-db"
2914 and "maint set/show check-libthread-db".
2915 * NEWS: Mention the above new commands.
2916
2917 2018-06-08 Tom Tromey <tom@tromey.com>
2918
2919 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
2920 now a method.
2921
2922 2018-06-08 Tom Tromey <tom@tromey.com>
2923
2924 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
2925
2926 2018-06-08 Tom Tromey <tom@tromey.com>
2927
2928 * common/btrace-common.h (struct btrace_data): Add constructor,
2929 destructor, move assignment operator.
2930 <empty, clear, fini>: New methods.
2931 <format>: Initialize.
2932 (btrace_data_init, btrace_data_fini, btrace_data_clear)
2933 (btrace_data_empty): Don't declare.
2934 * common/btrace-common.c (btrace_data_init): Remove.
2935 (btrace_data::fini): Rename from btrace_data_fini.
2936 (btrace_data::empty): Rename from btrace_data_empty.
2937 (btrace_data::clear): Rename from btrace_data_clear. Return
2938 bool.
2939 * btrace.h (make_cleanup_btrace_data): Don't declare.
2940 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
2941 (parse_xml_btrace): Update.
2942 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
2943 (maint_btrace_clear_packet_history_cmd): Update.
2944
2945 2018-06-07 Pedro Alves <palves@redhat.com>
2946
2947 * target.h (target_ops) <beneath>: Now a method. All references
2948 updated.
2949 (class target_stack): New.
2950 * target.c (g_target_stack): New.
2951 (g_current_top_target): Delete.
2952 (current_top_target): Get the top target out of g_target_stack.
2953 (target_stack::push, target_stack::unpush): New.
2954 (push_target, unpush_target): Reimplement.
2955 (target_is_pushed): Reimplement in terms of g_target_stack.
2956 (target_ops::beneath, target_stack::find_beneath): New.
2957
2958 2018-06-07 Pedro Alves <palves@redhat.com>
2959
2960 * target.h (find_target_beneath): Delete declaration.
2961 * target.c (find_target_beneath): Delete definition.
2962 * aix-thread.c: All callers of find_target_beneath adjusted to
2963 call target_ops::beneath instead.
2964 * bsd-uthread.c: Likewise.
2965 * linux-thread-db.c: Likewise.
2966 * ravenscar-thread.c: Likewise.
2967 * sol-thread.c: Likewise.
2968 * spu-multiarch.c: Likewise.
2969
2970 2018-06-07 Pedro Alves <palves@redhat.com>
2971
2972 * target.h (target_ops) <beneath>: Now a method. All references
2973 updated.
2974 (target_ops) <m_beneath>: New.
2975 * target.c (target_ops::beneath): New.
2976 * corelow.c: Adjust all references to target_ops::beneath.
2977 * linux-thread-db.c: Likewise.
2978 * make-target-delegates: Likewise.
2979 * record-btrace.c: Likewise.
2980 * record-full.c: Likewise.
2981 * remote.c: Likewise.
2982 * target.c: Likewise.
2983 * target-delegates.c: Regenerate.
2984
2985 2018-06-07 Pedro Alves <palves@redhat.com>
2986
2987 * target.h (target_stack): Delete.
2988 (current_top_target): Declare function.
2989 * target.c (target_stack): Delete.
2990 (g_current_top_target): New.
2991 (current_top_target): New function.
2992 * auxv.c: Use current_top_target instead of target_stack
2993 throughout.
2994 * avr-tdep.c: Likewise.
2995 * breakpoint.c: Likewise.
2996 * corefile.c: Likewise.
2997 * elfread.c: Likewise.
2998 * eval.c: Likewise.
2999 * exceptions.c: Likewise.
3000 * frame.c: Likewise.
3001 * gdbarch-selftests.c: Likewise.
3002 * gnu-v3-abi.c: Likewise.
3003 * ia64-tdep.c: Likewise.
3004 * ia64-vms-tdep.c: Likewise.
3005 * infcall.c: Likewise.
3006 * infcmd.c: Likewise.
3007 * infrun.c: Likewise.
3008 * linespec.c: Likewise.
3009 * linux-tdep.c: Likewise.
3010 * minsyms.c: Likewise.
3011 * ppc-linux-nat.c: Likewise.
3012 * ppc-linux-tdep.c: Likewise.
3013 * procfs.c: Likewise.
3014 * regcache.c: Likewise.
3015 * remote.c: Likewise.
3016 * rs6000-tdep.c: Likewise.
3017 * s390-linux-nat.c: Likewise.
3018 * s390-tdep.c: Likewise.
3019 * solib-aix.c: Likewise.
3020 * solib-darwin.c: Likewise.
3021 * solib-dsbt.c: Likewise.
3022 * solib-spu.c: Likewise.
3023 * solib-svr4.c: Likewise.
3024 * solib-target.c: Likewise.
3025 * sparc-tdep.c: Likewise.
3026 * sparc64-tdep.c: Likewise.
3027 * spu-tdep.c: Likewise.
3028 * symfile.c: Likewise.
3029 * symtab.c: Likewise.
3030 * target-descriptions.c: Likewise.
3031 * target-memory.c: Likewise.
3032 * target.c: Likewise.
3033 * target.h: Likewise.
3034 * tracefile-tfile.c: Likewise.
3035 * tracepoint.c: Likewise.
3036 * valops.c: Likewise.
3037 * valprint.c: Likewise.
3038 * value.c: Likewise.
3039 * windows-tdep.c: Likewise.
3040 * mi/mi-main.c: Likewise.
3041
3042 2018-06-07 Tom Tromey <tom@tromey.com>
3043
3044 * valprint.h (build_address_symbolic): Declare.
3045 * printcmd.c (print_address_symbolic): Update.
3046 (build_address_symbolic): Change "name" and "filename" to
3047 std::string.
3048 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
3049 Update.
3050 * defs.h (build_address_symbolic): Remove declaration.
3051
3052 2018-06-07 Alan Hayward <alan.hayward@arm.com>
3053
3054 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
3055 (aarch64_vnv_type): Add function.
3056 (aarch64_pseudo_register_name): Add V regs for SVE.
3057 (aarch64_pseudo_register_type): Likewise.
3058 (aarch64_pseudo_register_reggroup_p): Likewise.
3059 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
3060 (aarch64_pseudo_read_value): Add V regs for SVE.
3061 (aarch64_pseudo_write_2): Use V0 offset for SVE
3062 (aarch64_pseudo_write): Add V regs for SVE.
3063 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
3064
3065 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
3066
3067 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
3068 (sve_vl_from_vq): Likewise.
3069
3070 2018-06-05 Tom Tromey <tom@tromey.com>
3071
3072 * cli/cli-cmds.c (show_version): Update.
3073 * top.c (print_gdb_version): Add "interactive" parameter.
3074 Update.
3075 * main.c (captured_main_1): Update.
3076 * top.h (print_gdb_version): Add "interactive" parameter and a
3077 comment.
3078
3079 2018-06-05 David Malcolm <dmalcolm@redhat.com>
3080
3081 * common/enum-flags.h: Add trailing semicolon to example in
3082 comment.
3083
3084 2018-06-05 Tom Tromey <tom@tromey.com>
3085
3086 PR cli/12326:
3087 * NEWS: Add entry about pager.
3088 * utils.c (pagination_disabled_for_command): New global.
3089 (prompt_for_continue): Allow "c" response to prompt.
3090 (reinitialize_more_filter): Clear
3091 pagination_disabled_for_command.
3092 (fputs_maybe_filtered): Check pagination_disabled_for_command.
3093
3094 2018-06-04 Tom Tromey <tom@tromey.com>
3095
3096 * ada-lang.h (ada_lookup_symbol_list): Update.
3097 * ada-lang.c (resolve_subexp): Update.
3098 (symbols_are_identical_enums): Change type of syms. Remove nsyms
3099 parameter.
3100 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
3101 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
3102 results parameter to std::vector.
3103 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
3104 Update.
3105 * ada-exp.y (block_lookup): Update.
3106 (select_possible_type_sym): Change type of syms. Remove nsyms
3107 parameter.
3108 (write_var_or_type, write_name_assoc): Update.
3109
3110 2018-06-04 Joel Brobecker <brobecker@adacore.com>
3111
3112 * windows-nat.c (windows_nat_target::xfer_partial): Return
3113 TARGET_XFER_E_IO if we need to delegate to the target beneath
3114 but BENEATH is NULL.
3115
3116 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
3117
3118 * Makefile.in (config.status): Add configure.nat as a
3119 dependency.
3120
3121 2018-06-04 Tom Tromey <tom@tromey.com>
3122
3123 * cp-name-parser.y (cpname_state): Add method declarations.
3124 (HANDLE_QUAL): Update.
3125 (cpname_state::d_grab, cpname_state::fill_comp)
3126 (cpname_state::make_operator, cpname_state::make_dtor)
3127 (cpname_state::make_builtin_type, cpname_state::make_name)
3128 (cpname_state::d_qualify, cpname_state::d_int_type)
3129 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
3130 (%union): Move earlier.
3131
3132 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3133
3134 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
3135
3136 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3137
3138 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
3139 (aarch64_pseudo_write_1): Likewise.
3140 (aarch64_pseudo_read_value): Use helper.
3141 (aarch64_pseudo_write): Likewise.
3142
3143 2018-06-04 Pedro Alves <palves@redhat.com>
3144
3145 * darwin-nat.c (darwin_ops): Delete.
3146 (darwin_attach_pid): Use get_native_target.
3147
3148 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3149
3150 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
3151 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
3152
3153 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3154
3155 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
3156 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
3157 (aarch64_gdbarch_init): Check for SVE.
3158 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
3159
3160 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3161
3162 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
3163 * aarch64-tdep.h (aarch64_read_description): Likewise.
3164 * arch/aarch64.c (aarch64_create_target_description): Likewise.
3165 * arch/aarch64.h (aarch64_create_target_description): Likewise.
3166 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
3167 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
3168 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
3169
3170 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
3171
3172 * value.c (value_fetch_lazy_bitfield): New.
3173 (value_fetch_lazy_memory): New.
3174 (value_fetch_lazy_register): New.
3175 (value_fetch_lazy): Factor out to smaller functions.
3176
3177 2018-06-01 Tom Tromey <tom@tromey.com>
3178
3179 * cp-name-parser.y (backslashable, represented): Now const.
3180
3181 2018-06-01 Tom Tromey <tom@tromey.com>
3182
3183 * cp-name-parser.y: Include parser-defs.h.
3184 (parser_fprintf): Remove declaration.
3185
3186 2018-06-01 Tom Tromey <tom@tromey.com>
3187
3188 * cp-name-parser.y: Use %pure-parser, %lex-param, and
3189 %parse-param.
3190 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
3191 (global_result): Remove globals.
3192 (struct cpname_state): New.
3193 (yyparse): Don't declare.
3194 (yylex, yyerror): Move declarations after %union.
3195 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
3196 (make_name): Add state parameter.
3197 Update all callers.
3198 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
3199 parameter.
3200 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
3201 Update.
3202 (yylex): Add lvalp, state parameters.
3203 (yyerror): Add state parameter.
3204 (cp_demangled_name_to_comp): Update.
3205
3206 2018-06-01 Tom Tromey <tom@tromey.com>
3207
3208 * cp-name-parser.y (parser_fprintf): Declare.
3209 (GDB_YY_REMAP_PREFIX): Define.
3210 Include yy-remap.h. Don't redefine yy* identifiers.
3211
3212 2018-06-01 Tom Tromey <tom@tromey.com>
3213
3214 * python/py-type.c (typy_legacy_template_argument): Update.
3215 * cp-support.h (cp_demangled_name_to_comp): Update.
3216 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
3217 parameter to be a "std::string *".
3218 (main): Update.
3219
3220 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
3221
3222 * ada-lex.l: Include "diagnostics.h" instead of
3223 "common/diagnostics.h".
3224 * unittests/environ-selftests.c: Likewise.
3225 * common/diagnostics.h: Moved to ../include.
3226
3227 2018-06-01 Joel Brobecker <brobecker@adacore.com>
3228
3229 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
3230 to language_mode_manual while calling breakpoint_re_set_one.
3231
3232 2018-06-01 Tom Tromey <tom@tromey.com>
3233
3234 * valops.c (value_cast_structs, destructor_name_p): Update.
3235 * symtab.c (gdb_mangle_name): Update.
3236 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
3237 Update.
3238 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
3239 (pascal_object_print_value_fields, pascal_object_print_value):
3240 Update.
3241 * p-typeprint.c (pascal_type_print_derivation_info): Update.
3242 * linespec.c (find_methods): Update.
3243 * gdbtypes.h (type_name_no_tag): Remove.
3244 (type_name_or_error): Rename from type_name_no_tag_or_error.
3245 * gdbtypes.c (type_name_no_tag): Remove.
3246 (type_name_or_error): Rename from type_name_no_tag_or_error.
3247 (lookup_struct_elt_type, check_typedef): Update.
3248 * expprint.c (print_subexp_standard): Update.
3249 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
3250 * d-namespace.c (d_lookup_nested_symbol): Update.
3251 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
3252 (cp_print_class_member): Update.
3253 * cp-namespace.c (cp_lookup_nested_symbol): Update.
3254 * completer.c (add_struct_fields): Update.
3255 * c-typeprint.c (cp_type_print_derivation_info)
3256 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
3257 Update.
3258 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
3259 (ada_prefer_type, ada_is_exception_sym): Update.
3260
3261 2018-06-01 Tom Tromey <tom@tromey.com>
3262
3263 * valops.c (enum_constant_from_type, value_namespace_elt)
3264 (value_maybe_namespace_elt): Update.
3265 * valarith.c (find_size_for_pointer_math): Update.
3266 * target-descriptions.c (make_gdb_type): Update.
3267 * symmisc.c (print_symbol): Update.
3268 * stabsread.c (define_symbol, read_type)
3269 (complain_about_struct_wipeout, add_undefined_type)
3270 (cleanup_undefined_types_1): Update.
3271 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
3272 (rust_range_type_p, val_print_struct, rust_print_struct_def)
3273 (rust_internal_print_type, rust_composite_type)
3274 (rust_evaluate_funcall, rust_evaluate_subexp)
3275 (rust_inclusive_range_type_p): Update.
3276 * python/py-type.c (typy_get_tag): Update.
3277 * p-typeprint.c (pascal_type_print_base): Update.
3278 * mdebugread.c (parse_symbol, parse_type): Update.
3279 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
3280 Update.
3281 * guile/scm-type.c (gdbscm_type_tag): Update.
3282 * go-lang.c (sixg_string_p): Update.
3283 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
3284 Update.
3285 * gdbtypes.h (struct main_type) <tag_name>: Remove.
3286 (TYPE_TAG_NAME): Remove.
3287 * gdbtypes.c (type_name_no_tag): Simplify.
3288 (check_typedef, check_types_equal, recursive_dump_type)
3289 (copy_type_recursive, arch_composite_type): Update.
3290 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
3291 in summary mode when needed.
3292 * eval.c (evaluate_funcall): Update.
3293 * dwarf2read.c (fixup_go_packaging, read_structure_type)
3294 (process_structure_scope, read_enumeration_type)
3295 (read_namespace_type, read_module_type, determine_prefix): Update.
3296 * cp-support.c (inspect_type): Update.
3297 * coffread.c (process_coff_symbol, decode_base_type): Update.
3298 * c-varobj.c (c_is_path_expr_parent): Update.
3299 * c-typeprint.c (c_type_print_base_struct_union): Update.
3300 (c_type_print_base_1): Update. Print struct/class/union/enum in
3301 summary when using C language.
3302 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
3303 (gen_maybe_namespace_elt): Update.
3304 * ada-lang.c (ada_type_name): Simplify.
3305 (empty_record, ada_template_to_fixed_record_type_1)
3306 (template_to_static_fixed_type)
3307 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
3308
3309 2018-06-01 Tom Tromey <tom@tromey.com>
3310
3311 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
3312 c_print_type.
3313 * c-typeprint.c (c_print_type_1): Add "language" parameter.
3314 (c_print_type): Update.
3315 (c_print_type): New overload.
3316 (c_type_print_varspec_prefix, c_type_print_args)
3317 (c_type_print_varspec_suffix, c_print_type_no_offsets)
3318 (c_type_print_base_struct_union, c_type_print_base_1)
3319 (cp_type_print_method_args): Add "language" parameter.
3320 (c_type_print_base): Update.
3321 * c-lang.h (c_print_type): Add new overload.
3322
3323 2018-06-01 Tom Tromey <tom@tromey.com>
3324
3325 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
3326 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
3327
3328 2018-06-01 Alan Hayward <alan.hayward@arm.com>
3329
3330 * aarch64-tdep.c (aarch64_sve_register_names): New const
3331 var.
3332 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
3333 (AARCH64_SVE_Z_REGS_NUM): New define.
3334 (AARCH64_SVE_P_REGS_NUM): Likewise.
3335 (AARCH64_SVE_NUM_REGS): Likewise.
3336
3337 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
3338
3339 * nat/linux-ptrace.h [__alpha__]
3340 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
3341 definitions.
3342
3343 2018-05-31 Maciej W. Rozycki <macro@mips.com>
3344
3345 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
3346 the endianness selected.
3347 * NEWS: Document `set endian auto' mode operation update.
3348
3349 2018-05-31 Alan Hayward <alan.hayward@arm.com>
3350
3351 * Makefile.in: Add new header.
3352 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
3353 (sve_vl_from_vg): Likewise.
3354 (sve_vq_from_vl): Likewise.
3355 (sve_vl_from_vq): Likewise.
3356 (sve_vq_from_vg): Likewise.
3357 (sve_vg_from_vq): Likewise.
3358 * configure.nat: Add new c file.
3359 * nat/aarch64-sve-linux-ptrace.c: New file.
3360 * nat/aarch64-sve-linux-ptrace.h: New file.
3361
3362 2018-05-31 Alan Hayward <alan.hayward@arm.com>
3363
3364 * aarch64-linux-nat.c (aarch64_linux_read_description):
3365 Add parmeter zero.
3366 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
3367 Likewise.
3368 * aarch64-tdep.c (tdesc_aarch64_list): Add.
3369 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
3370 (aarch64_gdbarch_init): Add parmeter zero.
3371 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
3372 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
3373 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
3374 parmeter.
3375 * doc/gdb.texinfo: Describe SVE feature
3376 * features/aarch64-sve.c: New file.
3377
3378 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
3379
3380 PR gdb/23210
3381 * gdbarch.sh (significant_addr_bit): Default to zero when
3382 not set by target architecture.
3383 * gdbarch.c: Re-generated.
3384 * utils.c (address_significant): Update.
3385
3386 2018-05-30 Joel Brobecker <brobecker@adacore.com>
3387
3388 * stack.c (func_command): Remove trailing newline in call to error.
3389
3390 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3391
3392 * regcache.h (regcache_raw_collect): Remove, update callers to
3393 use regcache::raw_collect.
3394 * regcache.c (regcache_raw_collect): Remove.
3395
3396 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3397
3398 * regcache.h (regcache_raw_supply): Remove, update callers to
3399 use detached_regcache::raw_supply.
3400 * regcache.c (regcache_raw_supply): Remove.
3401
3402 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3403
3404 * regcache.h (regcache_cooked_write_part): Remove, update
3405 callers to use regcache::cooked_write_part.
3406 * regcache.c (regcache_cooked_write_part): Remove.
3407
3408 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3409
3410 * regcache.h (regcache_cooked_read_part): Remove, update callers
3411 to use readable_regcache::cooked_read_part.
3412 * regcache.c (regcache_cooked_read_part): Remove.
3413
3414 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3415
3416 * regcache.h (regcache_cooked_read_value): Remove, update
3417 callers to use readable_regcache::cooked_read_value.
3418 * regcache.c (regcache_cooked_read_value): Remove.
3419
3420 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3421
3422 * regcache.h (regcache_cooked_write): Remove, update callers to
3423 use regcache::cooked_write.
3424 * regcache.c (regcache_cooked_write): Remove.
3425
3426 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3427
3428 * regcache.h (regcache_invalidate): Remove, update callers to
3429 use detached_regcache::invalidate instead.
3430 * regcache.c (regcache_invalidate): Remove.
3431
3432 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3433
3434 * regcache.h (regcache_raw_write_part): Remove, update callers
3435 to use regcache::raw_write_part instead.
3436 * regcache.c (regcache_raw_write_part): Remove.
3437
3438 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3439
3440 * regcache.h (regcache_raw_read_part): Remove, update callers to
3441 use readable_regcache::raw_read_part instead.
3442 * regcache.c (regcache_raw_read_part): Remove.
3443
3444 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3445
3446 * regcache.h (regcache_cooked_read): Remove, update callers to
3447 use readable_regcache::cooked_read instead.
3448 * regcache.c (regcache_cooked_read): Remove.
3449
3450 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3451
3452 * regcache.h (regcache_raw_write): Remove, update callers to use
3453 regcache::raw_write instead.
3454 * regcache.c (regcache_raw_write): Remove.
3455
3456 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3457
3458 * regcache.h (regcache_raw_read): Remove, update callers to use
3459 readable_regcache::raw_read instead.
3460 * regcache.c (regcache_raw_read): Remove.
3461
3462 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3463
3464 * regcache.h (regcache_raw_update): Remove, update callers to
3465 use readable_regcache::raw_update instead.
3466 * regcache.c (regcache_raw_update): Remove.
3467
3468 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3469
3470 * regcache.h (regcache_register_status): Remove, update callers
3471 to use reg_buffer::get_register_status directly instead.
3472 * regcache.c (regcache_register_status): Remove.
3473
3474 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3475
3476 * regcache.h (regcache_get_ptid): Remove, update all callers to
3477 call regcache::ptid instead.
3478 * regcache.c (regcache_get_ptid): Remove.
3479
3480 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3481
3482 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
3483
3484 2018-05-30 Pedro Alves <palves@redhat.com>
3485
3486 * common/common-exceptions.h (exception_rethrow): Use
3487 ATTRIBUTE_NORETURN.
3488
3489 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
3490
3491 * breakpoint.c (print_solib_event, check_status_catch_solib):
3492 Remove struct keyword in range-based for loops.
3493 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
3494 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
3495 Likewise.
3496 * linespec.c (find_superclass_methods, search_minsyms_for_name):
3497 Likewise.
3498 * symfile.c (addr_info_make_relative): Likewise.
3499 * thread.c (value_in_thread_stack_temporaries): Likewise.
3500
3501 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
3502
3503 PR gdb/16841
3504 * valops.c (value_struct_elt_for_reference): Call check_typedef on
3505 aggregate type to get its real type before accessing it.
3506
3507 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
3508
3509 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
3510 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
3511 * coff-pe-read.c (add_pe_forwarded_sym): Replace
3512 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
3513 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
3514 * jit.c (jit_breakpoint_re_set_internal): Likewise.
3515 * printcmd.c (info_address_command): Likewise.
3516
3517 2018-05-29 Tom Tromey <tom@tromey.com>
3518
3519 * windows-nat.c (handle_exception): Update fall-through comment.
3520
3521 2018-05-29 Tom Tromey <tom@tromey.com>
3522
3523 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
3524 (struct program_space) <added_solibs>: Now a std::vector.
3525 * breakpoint.c (print_solib_event): Update.
3526 (check_status_catch_solib): Update.
3527 * progspace.c (clear_program_space_solib_cache): Update.
3528 * solib.c (update_solib_list): Update.
3529
3530 2018-05-29 Tom Tromey <tom@tromey.com>
3531
3532 * python/py-type.c (typy_richcompare): Update.
3533 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
3534 * gdbtypes.h (types_deeply_equal): Return bool.
3535 (types_equal): Likewise.
3536 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
3537 declare VEC.
3538 (check_types_equal): Change worklist to std::vector. Return
3539 bool.
3540 (struct type_equality_entry): Add constructor.
3541 (compare_maybe_null_strings): Return bool.
3542 (check_types_worklist): Return bool. Change worklist to
3543 std::vector.
3544 (types_deeply_equal): Use std::vector.
3545 (types_equal): Return bool.
3546 (compare_maybe_null_strings): Simplify.
3547
3548 2018-05-29 Tom Tromey <tom@tromey.com>
3549
3550 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
3551
3552 2018-05-29 Tom Tromey <tom@tromey.com>
3553
3554 * objc-lang.h: Don't include cp-support.h.
3555 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
3556 declare VEC.
3557
3558 2018-05-27 Tom Tromey <tom@tromey.com>
3559
3560 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
3561
3562 2018-05-25 Tom Tromey <tom@tromey.com>
3563
3564 * value.c (value::location): Initialize.
3565
3566 2018-05-25 Tom Tromey <tom@tromey.com>
3567
3568 * dbxread.c (init_bincl_list): Remove.
3569 (bincl_list): Now a std::vector.
3570 (bincls_allocated, next_bincl): Remove.
3571 (free_bincl_list, do_free_bincl_list_cleanup)
3572 (make_cleanup_free_bincl_list): Remove.
3573 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
3574 unique_xmalloc_ptr.
3575 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
3576 (struct header_file_location): Add constructor.
3577 (add_bincl_to_list): Remove.
3578
3579 2018-05-25 Tom Tromey <tom@tromey.com>
3580
3581 * tui/tui.c (tui_enable): Update.
3582 * mi/mi-interp.c (mi_interp::init): Update.
3583 * interps.h (class interp) <name>: New method.
3584 <m_name>: Rename from name.
3585 (~scoped_restore_interp): Update.
3586 * interps.c (interp::interp): Update.
3587 (interp_add, interp_set, interp_lookup_existing)
3588 (current_interp_named_p): Update.
3589
3590 2018-05-25 Tom Tromey <tom@tromey.com>
3591
3592 * interps.c (interp_name): Remove.
3593 * mi/mi-interp.c (mi_interp::init): Update.
3594 * interps.h (interp_name): Remove.
3595 (~scoped_restore_interp): Update.
3596 * tui/tui.c (tui_enable): Update.
3597
3598 2018-05-25 Tom Tromey <tom@tromey.com>
3599
3600 * utils.c (fputs_maybe_filtered): Update.
3601 * linespec.c (decode_line_full): Update.
3602 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
3603 (mi_print_breakpoint_for_event, mi_solib_loaded)
3604 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3605 (mi_user_selected_context_changed): Update.
3606 * mi/mi-main.c (mi_execute_command): Update.
3607 * cli/cli-script.c (execute_control_command): Update.
3608 * python/python.c (execute_gdb_command): Update.
3609 * solib.c (info_sharedlibrary_command): Update.
3610 * interps.c (interp_ui_out): Remove.
3611 * interps.h (interp_ui_out): Remove.
3612
3613 2018-05-25 Tom Tromey <tom@tromey.com>
3614
3615 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
3616 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
3617 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
3618
3619 2018-05-25 Tom Tromey <tom@tromey.com>
3620
3621 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
3622 * interps.c (interp_exec): Use scoped_restore.
3623
3624 2018-05-25 Tom Tromey <tom@tromey.com>
3625
3626 * remote.c (remote_target::remote_file_get): Use
3627 gdb::byte_vector.
3628 (remote_target::remote_file_put): Likewise.
3629
3630 2018-05-25 Tom Tromey <tom@tromey.com>
3631
3632 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
3633 a std::string.
3634 (get_pe_section_index, add_pe_exported_sym): Update.
3635 (read_pe_exported_syms): Use gdb::def_vector.
3636
3637 2018-05-25 Tom Tromey <tom@tromey.com>
3638
3639 * frame.c (remove_prev_frame): Remove.
3640 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
3641
3642 2018-05-25 Maciej W. Rozycki <macro@mips.com>
3643
3644 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
3645 Remove prototypes.
3646 * mips-linux-nat.c (supply_fpregset): Always call
3647 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
3648 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
3649 `mips_fill_fpregset'.
3650 * mips-linux-tdep.c (mips_supply_fpregset)
3651 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
3652 (mips_fill_fpregset_wrapper): Remove functions.
3653 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
3654 (mips_linux_fpregset): Remove variable.
3655 (mips_linux_iterate_over_regset_sections): Use
3656 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
3657 (mips_linux_o32_sigframe_init): Remove comment.
3658
3659 2018-05-25 Pedro Alves <palves@redhat.com>
3660
3661 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
3662 (struct readahead_cache, struct packet_reg, struct
3663 remote_arch_state, class remote_state): Move higher up in the
3664 file.
3665 (remote_target::m_remote_state): Now an object instead of a pointer.
3666 (remote_target::get_remote_state): Adjust.
3667
3668 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
3669
3670 * stack.c (select_and_print_frame): Delete.
3671 (struct function_bounds): Move struct within function.
3672 (func_command): Most content moved into new function
3673 find_frame_for_function, use new function, print result, add
3674 function comment.
3675 (find_frame_for_function): New function, now returns a result.
3676
3677 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3678
3679 * stack.c (iterate_over_block_arg_vars): Fix comment.
3680 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
3681
3682 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
3683
3684 PR gdb/23203
3685 * frame.c
3686 (scoped_restore_selected_frame::scoped_restore_selected_frame):
3687 Define.
3688 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
3689 Define.
3690 * frame.h (class scoped_restore_selected_frame): New class.
3691 * stack.c (print_frame_local_vars): Remove catching and rethrowing
3692 of any exception, use scoped_restore_selected_frame to restore the
3693 frame instead.
3694
3695 2018-05-24 Pedro Alves <palves@redhat.com>
3696
3697 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
3698 override.
3699
3700 2018-05-23 Tom Tromey <tom@tromey.com>
3701
3702 * complaints.c (struct complaints): Remove.
3703 (symfile_complaint_book): Remove.
3704 (series): New global.
3705 (complaint_internal): Update.
3706 (clear_complaints): Update.
3707
3708 2018-05-23 Tom Tromey <tom@tromey.com>
3709
3710 * complaints.c (counters): New global.
3711 (struct complain): Remove.
3712 (struct complaints) <root>: Remove.
3713 (complaint_sentinel): Remove.
3714 (symfile_complaint_book): Update.
3715 (find_complaint) Remove.
3716 (complaint_internal, clear_complaints): Update.
3717
3718 2018-05-23 Tom Tromey <tom@tromey.com>
3719
3720 * complaints.c (struct complain) <file, line>: Remove.
3721 (find_complaint): Remove file, line parameters.
3722 (complaint_internal): Update.
3723
3724 2018-05-23 Tom Tromey <tom@tromey.com>
3725
3726 * complaints.c (vcomplaint): Remove.
3727 (complaint_internal) Merge in contents of vcomplaint.
3728
3729 2018-05-23 Tom Tromey <tom@tromey.com>
3730
3731 * complaints.c (struct complaints) <explanation>: Remove.
3732 (symfile_explanations): Remove.
3733 (symfile_complaint_book): Update.
3734 (vcomplaint): Update.
3735 (struct explanation): Remove.
3736
3737 2018-05-23 Tom Tromey <tom@tromey.com>
3738
3739 * complaints.c (symfile_complaints): Remove.
3740 (complaint_internal): Remove "complaints" parameter.
3741 (clear_complaints, vcomplaint): Remove "c" parameter.
3742 (get_complaints): Remove.
3743 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
3744 (dwarf2_debug_line_missing_file_complaint)
3745 (dwarf2_debug_line_missing_end_sequence_complaint)
3746 (dwarf2_complex_location_expr_complaint)
3747 (dwarf2_const_value_length_mismatch_complaint)
3748 (dwarf2_section_buffer_overflow_complaint)
3749 (dwarf2_macro_malformed_definition_complaint)
3750 (dwarf2_invalid_attrib_class_complaint)
3751 (create_addrmap_from_index, dw2_symtab_iter_next)
3752 (dw2_expand_marked_cus)
3753 (dw2_debug_names_iterator::find_vec_in_debug_names)
3754 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
3755 (create_debug_type_hash_table, init_cutu_and_read_dies)
3756 (partial_die_parent_scope, add_partial_enumeration)
3757 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
3758 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
3759 (read_import_statement, read_file_scope, create_dwo_cu_reader)
3760 (create_cus_hash_table, create_dwp_hash_table)
3761 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
3762 (dwarf2_rnglists_process, dwarf2_ranges_process)
3763 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
3764 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
3765 (handle_struct_member_die, process_structure_scope)
3766 (read_array_type, read_common_block, read_module_type)
3767 (read_tag_pointer_type, read_typedef, read_base_type)
3768 (read_subrange_type, load_partial_dies, partial_die_info::read)
3769 (partial_die_info::read, partial_die_info::read)
3770 (partial_die_info::read, read_checked_initial_length_and_offset)
3771 (dwarf2_string_attr, read_formatted_entries)
3772 (dwarf_decode_line_header)
3773 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3774 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
3775 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
3776 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3777 (get_signatured_type, get_DW_AT_signature_type)
3778 (decode_locdesc, file_file_name, consume_improper_spaces)
3779 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
3780 (dwarf_decode_macro_bytes, dwarf_decode_macros)
3781 (dwarf2_symbol_mark_computed, set_die_type)
3782 (read_attribute_value): Update.
3783 * stap-probe.c (handle_stap_probe, get_stap_base_address):
3784 Update.
3785 * dbxread.c (unknown_symtype_complaint)
3786 (lbrac_mismatch_complaint, repeated_header_complaint)
3787 (set_namestring, function_outside_compilation_unit_complaint)
3788 (read_dbx_symtab, process_one_symbol): Update.
3789 * gdbtypes.c (stub_noname_complaint): Update.
3790 * windows-nat.c (handle_unload_dll): Update.
3791 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
3792 (decode_base_type): Update.
3793 * xcoffread.c (bf_notfound_complaint, ef_complaint)
3794 (eb_complaint, record_include_begin, record_include_end)
3795 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
3796 (process_xcoff_symbol, read_symbol)
3797 (function_outside_compilation_unit_complaint)
3798 (scan_xcoff_symtab): Update.
3799 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
3800 * buildsym.c (finish_block_internal, make_blockvector)
3801 (end_symtab_get_static_block, augment_type_symtab): Update.
3802 * dtrace-probe.c (dtrace_process_dof)
3803 (dtrace_static_probe_ops::get_probes): Update.
3804 * complaints.h (struct complaint): Don't declare.
3805 (symfile_complaints): Remove.
3806 (complaint_internal): Remove "complaints" parameter.
3807 (complaint): Likewise.
3808 (clear_complaints): Likewise.
3809 * symfile.c (syms_from_objfile_1, finish_new_objfile)
3810 (reread_symbols): Update.
3811 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
3812 (dwarf2_frame_cache, decode_frame_entry): Update.
3813 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
3814 * objc-lang.c (lookup_objc_class, lookup_child_selector)
3815 (info_selectors_command): Update.
3816 * macrotab.c (macro_include, check_for_redefinition)
3817 (macro_undef): Update.
3818 * objfiles.c (filter_overlapping_sections): Update.
3819 * stabsread.c (invalid_cpp_abbrev_complaint)
3820 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
3821 (define_symbol, error_type, read_type, rs6000_builtin_type)
3822 (stabs_method_name_from_physname, read_member_functions)
3823 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
3824 (attach_fields_to_type, complain_about_struct_wipeout)
3825 (read_range_type, read_args, common_block_start)
3826 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
3827 Update.
3828 * mdebugread.c (index_complaint, unknown_ext_complaint)
3829 (basic_type_complaint, bad_tag_guess_complaint)
3830 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
3831 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
3832 (parse_procedure, parse_lines)
3833 (function_outside_compilation_unit_complaint)
3834 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
3835 (bad_tag_guess_complaint, reg_value_complaint): Update.
3836 * cp-support.c (demangled_name_complaint): Update.
3837 * macroscope.c (sal_macro_scope): Update.
3838 * dwarf-index-write.c (class debug_names): Update.
3839
3840 2018-05-23 Tom Tromey <tom@tromey.com>
3841
3842 * complaints.c (clear_complaints): Remove "noisy" parameter.
3843 * complaints.h (clear_complaints): Update.
3844 * symfile.c (syms_from_objfile_1, finish_new_objfile)
3845 (reread_symbols): Update.
3846
3847 2018-05-23 Tom Tromey <tom@tromey.com>
3848
3849 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
3850 SUBSEQUENT_MESSAGE.
3851 (vcomplaint, clear_complaints): Update.
3852 (symfile_explanations): Remove some messages.
3853
3854 2018-05-23 Tom Tromey <tom@tromey.com>
3855
3856 * complaints.c (internal_complaint): Remove.
3857 * complaints.h (internal_complaint): Remove.
3858
3859 2018-05-22 Maciej W. Rozycki <macro@mips.com>
3860
3861 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
3862
3863 2018-05-22 Pedro Alves <palves@redhat.com>
3864
3865 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
3866 (remote_fileio_badfd, remote_fileio_return_errno)
3867 (remote_fileio_return_success, remote_fileio_func_open)
3868 (remote_fileio_func_open, remote_fileio_func_close)
3869 (remote_fileio_func_read, remote_fileio_func_write)
3870 (remote_fileio_func_lseek, remote_fileio_func_rename)
3871 (remote_fileio_func_unlink, remote_fileio_func_stat)
3872 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
3873 (remote_fileio_func_isatty, remote_fileio_func_system): Add
3874 remote_target parameter.
3875 (remote_fio_func_map) <func>: Add remote_target parameter.
3876 (do_remote_fileio_request, remote_fileio_request):
3877 * remote-fileio.h (remote_fileio_request):
3878 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
3879 remote_target parameter.
3880 (remote_notif_process, handle_notification): Adjust to pass down
3881 the remote.
3882 (remote_notif_state_allocate): Add remote_target parameter. Save
3883 it.
3884 * remote-notif.h (struct remote_target): Forward declare.
3885 (struct notif_client) <parse, ack, can_get_pending_events>: Add
3886 remote_target parameter.
3887 (struct remote_notif_state) <remote>: New field.
3888 (remote_notif_ack, remote_notif_parse): Add remote_target
3889 parameter.
3890 (remote_notif_state_allocate, remote_notif_state_allocate): Add
3891 remote_target parameter.
3892 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
3893 (threads_listing_context, rmt_thread_action, protocol_feature)
3894 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
3895 (packet_result, struct threads_listing_context, remote_state):
3896 Move definitions and declarations higher up.
3897 (remote_target) <~remote_target>: Declare.
3898 (remote_download_command_source, remote_file_put, remote_file_get)
3899 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
3900 (remote_hostio_pread_vFile, remote_hostio_send_command)
3901 (remote_hostio_set_filesystem, remote_hostio_open)
3902 (remote_hostio_close, remote_hostio_unlink, remote_state)
3903 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
3904 (get_memory_write_packet_size, get_memory_read_packet_size)
3905 (append_pending_thread_resumptions, remote_detach_1)
3906 (append_resumption, remote_resume_with_vcont)
3907 (add_current_inferior_and_thread, wait_ns, wait_as)
3908 (process_stop_reply, remote_notice_new_inferior)
3909 (process_initial_stop_replies, remote_add_thread)
3910 (btrace_sync_conf, remote_btrace_maybe_reopen)
3911 (remove_new_fork_children, kill_new_fork_children)
3912 (discard_pending_stop_replies, stop_reply_queue_length)
3913 (check_pending_events_prevent_wildcard_vcont)
3914 (discard_pending_stop_replies_in_queue, stop_reply)
3915 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
3916 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
3917 (remote_interrupt_as, remote_interrupt_ns)
3918 (remote_get_noisy_reply, remote_query_attached)
3919 (remote_add_inferior, remote_current_thread, get_current_thread)
3920 (set_thread, set_general_thread, set_continue_thread)
3921 (set_general_process, write_ptid)
3922 (remote_unpack_thread_info_response, remote_get_threadinfo)
3923 (parse_threadlist_response, remote_get_threadlist)
3924 (remote_threadlist_iterator, remote_get_threads_with_ql)
3925 (remote_get_threads_with_qxfer)
3926 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
3927 (get_offsets, remote_check_symbols, remote_supported_packet)
3928 (remote_query_supported, remote_packet_size)
3929 (remote_serial_quit_handler, remote_detach_pid)
3930 (remote_vcont_probe, remote_resume_with_hc)
3931 (send_interrupt_sequence, interrupt_query)
3932 (remote_notif_get_pending_events, fetch_register_using_p)
3933 (send_g_packet, process_g_packet, fetch_registers_using_g)
3934 (store_register_using_P, store_registers_using_G)
3935 (set_remote_traceframe, check_binary_download)
3936 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
3937 (remote_xfer_live_readonly_partial, remote_read_bytes)
3938 (remote_send_printf, remote_flash_write, readchar)
3939 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
3940 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
3941 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
3942 (extended_remote_disable_randomization, extended_remote_run)
3943 (send_environment_packet, extended_remote_environment_support)
3944 (extended_remote_set_inferior_cwd, remote_write_qxfer)
3945 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
3946 (packet_command): Now methods of ...
3947 (remote_target): ... this class.
3948 (m_remote_state) <remote_target>: New field.
3949 (struct remote_state) <stop_reply_queue,
3950 remote_async_inferior_event_token, wait_forever_enabled_p>: New
3951 fields.
3952 (remote_state::remote_state): Allocate stop_reply_queue.
3953 (remote_state): Delete global.
3954 (get_remote_state_raw): Delete.
3955 (remote_target::get_remote_state): Allocate m_remote_state on
3956 demand.
3957 (get_current_remote_target): New.
3958 (remote_ops, extended_remote_ops): Delete.
3959 (wait_forever_enabled_p, remote_async_inferior_event_token):
3960 Delete, moved to struct remote_state.
3961 (remote_target::close): Delete self. Destruction bits split to
3962 ...
3963 (remote_target::~remote_target): ... this.
3964 (show_memory_packet_size): Adjust to use
3965 get_current_remote_target.
3966 (struct protocol_feature) <func>: Add remote_target parameter.
3967 All callers adjusted.
3968 (curr_quit_handler_target): New.
3969 (remote_serial_quit_handler): Reimplement.
3970 (remote_target::open_1): Adjust to use get_current_remote_target.
3971 Heap-allocate remote_target/extended_remote_target instances.
3972 (vcont_builder::vcont_builder): Add remote_target parameter, and
3973 save it in m_remote. All callers adjusted.
3974 (vcont_builder::m_remote): New field.
3975 (vcont_builder::restart, vcont_builder::flush)
3976 (vcont_builder::push_action): Use it.
3977 (remote_target::commit_resume): Use it.
3978 (struct queue_iter_param) <remote>: New field.
3979 (remote_target::remove_new_fork_children): Fill in 'remote' field.
3980 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
3981 (check_pending_event_prevents_wildcard_vcont_callback)
3982 (remote_target::check_pending_events_prevent_wildcard_vcont)
3983 (remote_target::discard_pending_stop_replies)
3984 (remote_target::discard_pending_stop_replies_in_queue)
3985 (remote_target::remote_notif_remove_queued_reply): Fill in
3986 'remote' field.
3987 (remote_notif_get_pending_events): New.
3988 (remote_target::readchar, remote_target::remote_serial_write):
3989 Save/restore curr_quit_handler_target.
3990 (putpkt): New.
3991 (kill_new_fork_children): Fill in 'remote' field.
3992 (packet_command): Use get_current_remote_target, defer to
3993 remote_target method of same name.
3994 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
3995 parameter, and save it in m_remote. All callers adjusted.
3996 (scoped_remote_fd::release): Use m_remote.
3997 (scoped_remote_fd::m_remote): New field.
3998 (remote_file_put, remote_file_get, remote_file_delete): Use
3999 get_current_remote_target, defer to remote_target method of same
4000 name.
4001 (remote_btrace_reset): Add remote_state paremeter. Update all
4002 callers.
4003 (remote_async_inferior_event_handler). Pass down 'data'.
4004 (remote_new_objfile): Use get_current_remote_target.
4005 (remote_target::vcont_r_supported): New.
4006 (set_range_stepping): Use get_current_remote_target and
4007 remote_target::vcont_r_supported.
4008 (_initialize_remote): Don't allocate 'remote_state' and
4009 'stop_reply_queue' globals.
4010 * remote.h (struct remote_target): Forward declare.
4011 (getpkt, putpkt, remote_notif_get_pending_events): Add
4012 'remote_target' parameter.
4013
4014 2018-05-22 Pedro Alves <palves@redhat.com>
4015
4016 * remote.c (vcont_builder): Now a class. Make all data members
4017 private.
4018 (vcont_builder) <vcont_builder, restart, flush, push_action>:
4019 Declare methods.
4020 (vcont_builder_restart): Rename to ...
4021 (vcont_builder::restart): ... this.
4022 (vcont_builder_flush): Rename to ...
4023 (vcont_builder::flush): ... this.
4024 (vcont_builder_push_action): Rename to ...
4025 (vcont_builder::push_action): ... this.
4026 (remote_target::commit_resume): Adjust.
4027
4028 2018-05-22 Pedro Alves <palves@redhat.com>
4029
4030 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
4031 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
4032 (get_fixed_memory_packet_size): New.
4033 (get_memory_packet_size): Use it.
4034 (set_memory_packet_size): Don't override the config size with
4035 DEFAULT_MAX_MEMORY_PACKET_SIZE.
4036 (show_memory_packet_size): Use get_fixed_memory_packet_size.
4037 Don't refer to get_memory_packet_size if not connected to a remote
4038 target. Show "(default)" if configured size is 0.
4039
4040 2018-05-22 Pedro Alves <palves@redhat.com>
4041
4042 * remote.c (remote_target::mourn_inferior): Move
4043 discard_pending_stop_replies call here from ...
4044 (_initialize_remote): ... here.
4045
4046 2018-05-22 Pedro Alves <palves@redhat.com>
4047
4048 * remote.c (compare_section_command): Remove set_general_process
4049 call.
4050
4051 2018-05-22 Pedro Alves <palves@redhat.com>
4052
4053 * remote.c (struct packet_reg, struct remote_arch_state):
4054 Move higher up in the file.
4055 (remote_state) <m_arch_states>: Store remote_arch_state values
4056 instead of remote_arch_state pointers.
4057 (remote_state::get_remote_arch_state): Adjust.
4058
4059 2018-05-22 Pedro Alves <palves@redhat.com>
4060
4061 * remote.c: Include <unordered_map>.
4062 (remote_state): Now a class.
4063 (remote_state) <get_remote_arch_state>: Declare method.
4064 <get_remote_arch_state>: New field.
4065 (remote_arch_state) <remote_arch_state>: Declare ctor.
4066 <regs>: Now a unique_ptr.
4067 (remote_gdbarch_data_handle): Delete.
4068 (get_remote_arch_state): Delete.
4069 (remote_state::get_remote_arch_state): New.
4070 (get_remote_state): Adjust to call remote_state's
4071 get_remote_arch_state method.
4072 (init_remote_state): Delete, bits factored out to ...
4073 (remote_arch_state::remote_arch_state): ... this new method.
4074 (get_remote_packet_size, get_memory_packet_size)
4075 (process_g_packet, remote_target::fetch_registers)
4076 (remote_target::prepare_to_store, store_registers_using_G)
4077 (remote_target::store_registers, remote_target::get_trace_status):
4078 Adjust to call remote_state's method.
4079 (_initialize_remote): Remove reference to
4080 remote_gdbarch_data_handle.
4081
4082 2018-05-22 Pedro Alves <palves@redhat.com>
4083
4084 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
4085 pread>: New method declarations.
4086 (remote_target::open_1): Adjust.
4087 (readahead_cache_invalidate): Rename to ...
4088 (readahead_cache::invalidate): ... this, and adjust to be a class
4089 method.
4090 (readahead_cache_invalidate_fd): Rename to ...
4091 (readahead_cache::invalidate_fd): ... this, and adjust to be a
4092 class method.
4093 (remote_hostio_pwrite): Adjust.
4094 (remote_hostio_pread_from_cache): Rename to ...
4095 (readahead_cache::pread): ... this, and adjust to be a class
4096 method.
4097 (remote_hostio_close): Adjust.
4098
4099 2018-05-22 Pedro Alves <palves@redhat.com>
4100
4101 * remote.c (remote_hostio_close_cleanup): Delete.
4102 (class scoped_remote_fd): New.
4103 (remote_file_put, remote_file_get): Use it.
4104
4105 2018-05-22 Pedro Alves <palves@redhat.com>
4106
4107 (struct vCont_action_support): Use bool and initialize all fields.
4108 (struct readahead_cache): Initialize all fields.
4109 (remote_state): Use bool and initialize all fields.
4110 (remote_state::remote_state, remote_state::~remote_state): New.
4111 (new_remote_state): Delete.
4112 (_initialize_remote): Use new to allocate remote_state.
4113
4114 2018-05-22 Pedro Alves <palves@redhat.com>
4115 張俊芝 <zjz@zjz.name>
4116
4117 PR gdb/22973
4118 * c-exp.y: Include "c-support.h".
4119 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
4120 of tolower. Use c_ident_is_alpha to scan names.
4121 * c-lang.c: Include "c-support.h".
4122 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
4123 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
4124 * c-support.h: New file, with bits factored out from ...
4125 * cp-name-parser.y: ... this file.
4126 Include "c-support.h".
4127 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
4128 c-support.h and renamed.
4129 (symbol_end, yylex): Adjust.
4130
4131 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4132
4133 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
4134 parameter type to CORE_ADDR.
4135 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
4136 parameter type in declaration to CORE_ADDR.
4137 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
4138 target_auxv_search to get AT_HWCAP and use the result to get the
4139 target description.
4140 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
4141 to CORE_ADDR. Remove the cast of the return value to unsigned
4142 long. Fix error predicate of target_auxv_search.
4143 (ppc_linux_nat_target::read_description): Change the type of the
4144 hwcap variable to CORE_ADDR.
4145
4146 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4147
4148 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
4149 if the size of fpscr is larger than 32 bits.
4150
4151 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4152
4153 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
4154 (ppc32_linux_vsxregmap): New global.
4155 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
4156 regcache_supply_regset, and regcache_collect_regset.
4157 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
4158 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
4159 (fetch_vsx_register, store_vsx_register): Remove.
4160 (fetch_vsx_registers): Add regno parameter. Get regset using
4161 ppc_linux_vsxregset. Use regset to supply registers.
4162 (store_vsx_registers): Add regno parameter. Get regset using
4163 ppc_linux_vsxregset. Use regset to collect registers.
4164 (fetch_register): Call fetch_vsx_registers instead of
4165 fetch_vsx_register.
4166 (store_register): Call store_vsx_registers instead of
4167 store_vsx_register.
4168 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
4169 new regno parameter.
4170 (store_ppc_registers): Call store_vsx_registers with -1 for the
4171 new regno parameter.
4172 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
4173 (ppc_collect_vsxregset): Remove.
4174
4175 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4176
4177 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
4178 offset fields.
4179 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
4180 for vector register offset fields.
4181 (ppc64_fbsd_reg_offsets): Likewise.
4182 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4183 to vector register offset fields.
4184 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4185 to vector register offset fields.
4186 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
4187 vector register offset fields.
4188 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
4189 initializers for vector register offset fields.
4190 (rs6000_aix64_reg_offsets): Likewise.
4191 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
4192 (ppc_supply_vrregset): Remove.
4193 (ppc_collect_vrregset): Remove.
4194 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
4195 (ppc_linux_vrregset) : New function.
4196 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
4197 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
4198 (ppc32_linux_vrregset): Remove.
4199 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
4200 and use result instead of ppc32_linux_vrregset.
4201 (ppc32_linux_reg_offsets): Remove initializers for vector register
4202 offset fields.
4203 (ppc64_linux_reg_offsets): Likewise.
4204 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
4205 * ppc-linux-nat.c: Include regset.h.
4206 (gdb_vrregset_t): Adjust comment to account for little-endian
4207 mode.
4208 (supply_vrregset, fill_vrregset): Remove.
4209 (fetch_altivec_register, store_altivec_register): Remove.
4210 (fetch_altivec_registers): Add regno parameter. Get regset using
4211 ppc_linux_vrregset. Use regset to supply registers.
4212 (store_altivec_registers): Add regno parameter. Get regset using
4213 ppc_linux_vrregset. Use regset to collect registers.
4214 (fetch_register): Call fetch_altivec_registers instead of
4215 fetch_altivec_register.
4216 (store_register): Call store_altivec_registers instead of
4217 store_altivec_register.
4218 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
4219 the new regno parameter.
4220 (store_ppc_registers): Call store_altivec_registers with -1 for
4221 the new regno parameter.
4222
4223 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4224
4225 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
4226 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
4227 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
4228 (gdb_vrregset_t): Change array type size to
4229 PPC_LINUX_SIZEOF_VRREGSET.
4230 (gdb_vsxregset_t): Change array type size to
4231 PPC_LINUX_SIZEOF_VSXREGSET.
4232 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
4233 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
4234 PPC_LINUX_SIZEOF_VSXREGSET.
4235
4236 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4237
4238 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
4239 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
4240 nat/ppc-linux.c.
4241 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
4242 ppc_linux_target_wordsize with tid.
4243 (ppc_linux_nat_target::read_description): Call ppc_linux_target
4244 wordsize with tid.
4245 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
4246 (ppc64_64bit_inferior_p): Add static and inline specifiers.
4247 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
4248 tid parameter. Remove static specifier.
4249 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
4250 (ppc_linux_target_wordsize): New declaration.
4251
4252 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4253
4254 * arch/ppc-linux-common.c: New file.
4255 * arch/ppc-linux-common.h: New file.
4256 * arch/ppc-linux-tdesc.h: New file.
4257 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
4258 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
4259 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
4260 arch/ppc-linux-tdesc.h.
4261 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
4262 arch/ppc-linux-tdesc.h.
4263 (ppc_linux_nat_target::read_description): Remove target
4264 description matching code. Fill a ppc_linux_features struct and
4265 call ppc_linux_match_description with it. Move comment about ISA
4266 2.05 to ppc-linux-common.c.
4267 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
4268 arch/ppc-linux-tdesc.h.
4269 (ppc_linux_core_read_description): Remove target description
4270 matching code. Fill a ppc_linux_features struct and call
4271 ppc_linux_match_description with it.
4272 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
4273 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
4274 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
4275 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
4276 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
4277 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
4278 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
4279 (tdesc_powerpc_e500l): Remove.
4280
4281 2018-05-22 Joel Brobecker <brobecker@adacore.com>
4282
4283 * ada-lang.c (catch_assert_command): Pass empty string instead
4284 of NULL for excep_string argument.
4285
4286 2018-05-22 Maciej W. Rozycki <macro@mips.com>
4287
4288 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
4289 the width of the requested register exceeds the width of the
4290 `ptrace' data type.
4291
4292 2018-05-21 Tom Tromey <tom@tromey.com>
4293
4294 * printcmd.c (output_command): Remove.
4295 (output_command_const): Rename to output_command.
4296 * valprint.h (output_command): Rename from output_command_const.
4297 * tracepoint.c (trace_dump_actions): Call output_command.
4298
4299 2018-05-21 Tom Tromey <tom@tromey.com>
4300
4301 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4302 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
4303 * ada-lang.h (create_ada_exception_catchpoint): Update.
4304 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
4305 std::string.
4306 (create_excep_cond_exprs, ~ada_catchpoint)
4307 (should_stop_exception, print_one_exception)
4308 (print_mention_exception, print_recreate_exception): Update.
4309 (ada_get_next_arg): Remove.
4310 (catch_ada_exception_command_split): Use std::string. Change type
4311 of "excep_string", "cond_string".
4312 (catch_ada_exception_command): Update.
4313 (create_ada_exception_catchpoint): Change type of excep_string.
4314 (ada_exception_sal): Remove excep_string parameter.
4315 (~ada_catchpoint): Remove.
4316
4317 2018-05-21 Tom Tromey <tom@tromey.com>
4318
4319 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
4320 cleanup.
4321
4322 2018-05-21 Tom Tromey <tom@tromey.com>
4323
4324 * ada-lang.c (ada_exception_message_1, ada_exception_message):
4325 Return unique_xmalloc_ptr.
4326 (print_it_exception): Update.
4327
4328 2018-05-21 Tom Tromey <tom@tromey.com>
4329
4330 * tracepoint.c (trace_dump_actions): Use std::string.
4331
4332 2018-05-21 Tom Tromey <tom@tromey.com>
4333
4334 * symfile.c (reread_symbols): Use std::string for original_name.
4335
4336 2018-05-21 Tom Tromey <tom@tromey.com>
4337
4338 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
4339 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
4340 constructor.
4341
4342 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
4343
4344 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
4345 instance to...
4346 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
4347 * objfiles.c (get_objfile_bfd_data): Allocate
4348 objfile_per_bfd_storage with obstack_new when allocating on
4349 obstack.
4350
4351 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
4352
4353 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
4354 OBSTACK_ZALLOC.
4355 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
4356 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
4357 * mdebugread.c (mdebug_build_psymtabs): Likewise.
4358 (add_pending): Likewise.
4359 (parse_symbol): Likewise.
4360 (parse_partial_symbols): Likewise.
4361 (psymtab_to_symtab_1): Likewise.
4362 (new_psymtab): Likewise.
4363 (elfmdebug_build_psymtabs): Likewise.
4364 * minsyms.c (terminate_minimal_symbol_table): Likewise.
4365 * objfiles.c (get_objfile_bfd_data): Likewise.
4366 (objfile_register_static_link): Likewise.
4367 * psymtab.c (allocate_psymtab): Likewise.
4368 * stabsread.c (read_member_functions): Likewise.
4369 * xcoffread.c (xcoff_end_psymtab): Likewise.
4370
4371 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
4372
4373 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
4374 compiler supports std::is_trivially_constructible.
4375 * common/poison.h: Include obstack.h.
4376 (IsMallocable): Define to is_trivially_constructible if the
4377 compiler supports it, define to true_type otherwise.
4378 (xobnew): New.
4379 (XOBNEW): Redefine.
4380 (xobnewvec): New.
4381 (XOBNEWVEC): Redefine.
4382 * gdb_obstack.h (obstack_zalloc): New.
4383 (OBSTACK_ZALLOC): Redefine.
4384 (obstack_calloc): New.
4385 (OBSTACK_CALLOC): Redefine.
4386 (obstack_new): New.
4387 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
4388 (gdbarch_obstack): New declaration in gdbarch.h, definition in
4389 gdbarch.c.
4390 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
4391 obstack_calloc/obstack_zalloc.
4392 (gdbarch_obstack_zalloc): Remove.
4393 * target-descriptions.c (tdesc_data_init): Use obstack_new.
4394
4395 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4396
4397 * stack.c (backtrace_command_1): Remove useless variable int i.
4398
4399 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4400
4401 * stack.c (print_frame_info): Fix comment.
4402
4403 2018-05-18 Tom Tromey <tom@tromey.com>
4404
4405 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
4406 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
4407 (~dwarf2_per_objfile): Update
4408 (dwarf2_get_dwz_file): Use new.
4409 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
4410 unique_ptr.
4411
4412 2018-05-18 Tom Tromey <tom@tromey.com>
4413
4414 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
4415 unique_ptr.
4416 * dwarf2read.c (struct dwp_file): Add constructor and
4417 initializers.
4418 (open_and_init_dwp_file): Return a unique_ptr.
4419 (dwarf2_per_objfile, create_dwp_hash_table)
4420 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
4421 (lookup_dwo_unit_in_dwp): Update.
4422 (open_and_init_dwp_file, get_dwp_file): Update.
4423
4424 2018-05-18 Tom Tromey <tom@tromey.com>
4425
4426 * dwarf2read.c (dwarf2_per_objfile): Update.
4427 (struct mapped_index): Add initializers.
4428 (dwarf2_read_index): Use new.
4429 (dw2_symtab_iter_init): Update.
4430 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
4431 unique_ptr.
4432
4433 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
4434
4435 * dwarf2read.c (mapped_index) <total_size>: Remove.
4436
4437 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
4438
4439 * unittests/format_pieces-selftests.c (test_format_specifier):
4440 Add ARI comments.
4441
4442 2018-05-18 Tom Tromey <tom@tromey.com>
4443
4444 * c-typeprint.c (maybe_print_hole): New function.
4445 (c_print_type_struct_field_offset): Update.
4446 (c_type_print_base_struct_union): Call maybe_print_hole.
4447
4448 2018-05-17 Keith Seitz <keiths@redhat.com>
4449
4450 * breakpoint.c (build_bpstat_chain): New function, moved from
4451 bpstat_stop_status.
4452 (bpstat_stop_status): Add optional parameter, `stop_chain'.
4453 If no stop chain is passed, call build_bpstat_chain to build it.
4454 * breakpoint.h (build_bpstat_chain): Declare.
4455 (bpstat_stop_status): Move documentation here from breakpoint.c.
4456 * infrun.c (handle_signal_stop): Before eliding inlined frames,
4457 build the stop chain and pass it to skip_inline_frames.
4458 Pass this stop chain to bpstat_stop_status.
4459 * inline-frame.c: Include breakpoint.h.
4460 (stopped_by_user_bp_inline_frame): New function.
4461 (skip_inline_frames): Add parameter `stop_chain'.
4462 Move documention to inline-frame.h.
4463 If non-NULL, use stopped_by_user_bp_inline_frame to determine
4464 whether the frame should be elided.
4465 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
4466 Add moved documentation and update for new parameter.
4467
4468 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
4469
4470 PR cli/14975
4471 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4472 unittests/format_pieces-selftests.c.
4473 * common/format.h (format_piece) <operator==>: New.
4474 (format_pieces) <operator[]>: Remove.
4475 * common/format.c (format_pieces::format_pieces): Handle \e.
4476 * unittests/format_pieces-selftests.c: New.
4477
4478 2018-05-17 Tom Tromey <tom@tromey.com>
4479
4480 PR symtab/23010:
4481 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
4482 (dw2_instantiate_symtab): Add skip_partial parameter.
4483 (dw2_find_last_source_symtab, dw2_map_expand_apply)
4484 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
4485 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
4486 (dw2_expand_symtabs_matching_one)
4487 (dw2_find_pc_sect_compunit_symtab)
4488 (dw2_debug_names_lookup_symbol)
4489 (dw2_debug_names_expand_symtabs_for_function): Update.
4490 (init_cutu_and_read_dies): Add skip_partial parameter.
4491 (process_psymtab_comp_unit, build_type_psymtabs_1)
4492 (process_skeletonless_type_unit, load_partial_comp_unit)
4493 (psymtab_to_symtab_1): Update.
4494 (load_full_comp_unit): Add skip_partial parameter.
4495 (process_imported_unit_die, dwarf2_read_addr_index)
4496 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
4497 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
4498 (read_signatured_type): Update.
4499
4500 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
4501
4502 * value.c (release_value): Remove unused variable.
4503 (record_latest_value): Likewise.
4504 (access_value_history): Likewise.
4505 (preserve_values): Likewise.
4506
4507 2018-05-17 Tom Tromey <tom@tromey.com>
4508
4509 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
4510 Initialize.
4511
4512 2018-05-16 Maciej W. Rozycki <macro@mips.com>
4513
4514 PR gdb/22286
4515 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
4516 Also handle registers whose width is not a multiple of
4517 PTRACE_TYPE_RET.
4518 (linux_nat_trad_target::store_register): Likewise.
4519
4520 2018-05-16 Tom Tromey <tom@tromey.com>
4521
4522 * gdbcore.h (core_bfd): Redefine.
4523 * corelow.c (core_target::close): Update.
4524 (core_target_open): Update.
4525 * progspace.h (struct program_space) <cbfd>: Now a
4526 gdb_bfd_ref_ptr.
4527
4528 2018-05-16 Tom Tromey <tom@tromey.com>
4529
4530 PR cli/19551:
4531 * symfile-add-flags.h (enum symfile_add_flags)
4532 <SYMFILE_NOT_FILENAME>: New constant.
4533 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
4534 objfile name from BFD.
4535 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
4536 * minidebug.c (find_separate_debug_file_in_section): Put
4537 ".gnu_debugdata" into BFD's file name.
4538
4539 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
4540
4541 * regcache.c (regcache_read_ftype, regcache_write_ftype):
4542 Remove.
4543
4544 2018-05-15 Tamar Christina <tamar.christina@arm.com>
4545
4546 PR binutils/21446
4547 * aarch64-tdep.c (aarch64_analyze_prologue,
4548 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
4549 Indicate not interested in errors.
4550
4551 2018-05-15 Maciej W. Rozycki <macro@mips.com>
4552
4553 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
4554 Supply the MIPS_ZERO_REGNUM register.
4555
4556 2018-05-15 Maciej W. Rozycki <macro@mips.com>
4557
4558 * mips-tdep.c (mask_address_var): Make variable static.
4559
4560 2018-05-14 Tom Tromey <tom@tromey.com>
4561
4562 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
4563
4564 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
4565
4566 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
4567 FXSAVE_ADDR for the mxcsr register.
4568
4569 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
4570
4571 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
4572
4573 2018-05-11 Pedro Alves <palves@redhat.com>
4574
4575 * corelow.c (core_target) <core_target>: No longer inline.
4576 Initialize m_core_gdbarch, m_core_vec and build the section table
4577 here.
4578 <~core_target>: New.
4579 <core_gdbarch, get_core_register_section>: New methods.
4580 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
4581 factored out from ...
4582 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
4583 (core_ops): Delete.
4584 (sniff_core_bfd): Add gdbarch parameter.
4585 (core_close): Delete, merged into ...
4586 (core_target::close): ... here. Delete self.
4587 (core_close_cleanup): Delete.
4588 (core_target_open): Allocate a core_target on the heap. Use a
4589 unique_ptr instead of a cleanup. Bits moved into the core_target
4590 ctor. Adjust to use core_target methods instead of globals.
4591 (get_core_register_section): Rename to ...
4592 (core_target::get_core_register_section): ... this and adjust.
4593 (struct get_core_registers_cb_data): New.
4594 (get_core_registers_cb): Use it. Use bool.
4595 (core_target::fetch_registers, core_target::files_info)
4596 (core_target::xfer_partial, core_target::read_description)
4597 (core_target::pid_to, core_target::thread_name): Adjust to
4598 reference class fields instead of globals.
4599 * target.h (struct target_ops_deleter, target_ops_up): New.
4600
4601 2018-05-11 Pedro Alves <palves@redhat.com>
4602
4603 * corefile.c (core_file_command): Move to corelow.c.
4604 * corelow.c (the_core_target): Delete.
4605 (core_file_command): Moved from corefile.c. Check exec_bfd
4606 instead of the_core_target. Use target_detach instead of calling
4607 into the_core_target directly.
4608 (maybe_say_no_core_file_now): New.
4609 (core_target::detach): Use it.
4610 (_initialize_corelow): Remove references to the_core_target.
4611 * gdbcore.h (the_core_target): Delete.
4612
4613 2018-05-11 Tom Tromey <tromey@redhat.com>
4614 Pedro Alves <palves@redhat.com>
4615
4616 * corefile.c (core_bfd): Remove.
4617 * gdbcore.h (core_bfd): Now a macro.
4618 * progspace.h (struct program_space) <cbfd>: New field.
4619
4620 2018-05-11 Tom Tromey <tom@tromey.com>
4621
4622 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
4623 gdb::def_vector.
4624
4625 2018-05-10 Tom Tromey <tom@tromey.com>
4626
4627 * configure: Rebuild.
4628 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
4629
4630 2018-05-10 Joel Brobecker <brobecker@adacore.com>
4631
4632 PR server/23158:
4633 * regformats/regdat.sh: Adjust script, following the addition
4634 of the new expedite_regs parameter to init_target_desc.
4635
4636 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
4637
4638 PR gdb/23127
4639 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
4640 set_gdbarch_significant_addr_bit.
4641 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
4642 set_gdbarch_significant_addr_bit.
4643 * utils.c (address_significant): Update to sign extend addr.
4644
4645 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
4646
4647 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
4648 (xtensa_linux_init_abi): Limit tdep->num_regs by
4649 tdep->num_nopriv_regs.
4650 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
4651 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
4652 not initialized.
4653
4654 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
4655
4656 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
4657
4658 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
4659
4660 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
4661 (I387_MXCSR_INIT_VAL): New constant.
4662 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
4663 buffer if it was supplied by the inferior.
4664 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
4665 (i387_xsave_get_clear_bv): New function.
4666 (i387_supply_xsave): Only read x87 control registers from the
4667 xsave buffer if the feature is enabled, and the state will have
4668 been written, otherwise, provide a suitable default.
4669 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
4670 including x87 control registers. Update control registers if they
4671 have changed from the default value, and mark features as enabled
4672 as required.
4673 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
4674
4675 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
4676
4677 * spu-tdep.c (info_spu_event_command): Fix output formatting.
4678
4679 2018-05-07 Tom Tromey <tom@tromey.com>
4680
4681 * configure: Rebuild.
4682 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
4683
4684 2018-05-07 Tom Tromey <tom@tromey.com>
4685
4686 PR tdep/20362:
4687 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
4688 bit. Use correct value for VDIV.
4689
4690 2018-05-04 Tom Tromey <tom@tromey.com>
4691
4692 * configure: Rebuild.
4693 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
4694
4695 2018-05-04 Tom Tromey <tom@tromey.com>
4696
4697 * linux-record.c (record_linux_system_call) <case
4698 RECORD_SYS_RECVFROM>: Add "break".
4699
4700 2018-05-04 Tom Tromey <tom@tromey.com>
4701
4702 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
4703 Add missing "break".
4704 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
4705 Add missing "break".
4706
4707 2018-05-04 Tom Tromey <tom@tromey.com>
4708
4709 * rs6000-tdep.c (ppc_process_record_op4)
4710 (ppc_process_record_op63): Add fall-through comment.
4711
4712 2018-05-04 Tom Tromey <tom@tromey.com>
4713
4714 * i386-tdep.c (i386_process_record): Add fall-through comment.
4715
4716 2018-05-04 Tom Tromey <tom@tromey.com>
4717
4718 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
4719 comment.
4720
4721 2018-05-04 Tom Tromey <tom@tromey.com>
4722
4723 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
4724 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
4725 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
4726 comment.
4727 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
4728 comment.
4729 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
4730 comment.
4731
4732 2018-05-04 Tom Tromey <tom@tromey.com>
4733
4734 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
4735
4736 2018-05-04 Tom Tromey <tom@tromey.com>
4737
4738 * s390-tdep.c (s390_process_record): Fix fall-through comments.
4739 * xcoffread.c (scan_xcoff_symtab): Move comment later.
4740 * symfile.c (section_is_mapped): Fix fall-through comment.
4741 * stabsread.c (define_symbol, read_member_functions): Fix
4742 fall-through comment.
4743 * s390-linux-tdep.c (s390_process_record): Fix fall-through
4744 comment.
4745 * remote.c (remote_wait_as): Fix fall-through comment.
4746 * p-exp.y (yylex): Fix fall-through comment.
4747 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
4748 comment.
4749 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
4750 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
4751 * jv-exp.y (yylex): Fix fall-through comment.
4752 * go-exp.y (lex_one_token): Fix fall-through comment.
4753 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
4754 fall-through comment.
4755 * f-exp.y (yylex): Fix fall-through comment.
4756 * dwarf2read.c (process_die): Fix fall-through comments.
4757 * dbxread.c (process_one_symbol): Fix fall-through comment.
4758 * d-exp.y (lex_one_token): Fix fall-through comment.
4759 * cp-name-parser.y (yylex): Fix fall-through comment.
4760 * coffread.c (coff_symtab_read): Fix fall-through comment.
4761 * c-exp.y (lex_one_token): Fix fall-through comment.
4762 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
4763 comment.
4764 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
4765 comment.
4766
4767 2018-05-04 Tom Tromey <tom@tromey.com>
4768
4769 PR python/22730:
4770 * NEWS: Mention gdb.execute change.
4771 * gdbcmd.h (execute_control_command): Don't declare.
4772 * python/python.c (execute_gdb_command): Use read_command_lines_1,
4773 execute_control_commands, execute_control_commands_to_string.
4774 * cli/cli-script.h (execute_control_commands)
4775 (execute_control_commands_to_string): Declare.
4776 (execute_control_command): Add from_tty parameter.
4777 * cli/cli-script.c (execute_control_commands)
4778 (execute_control_commands_to_string): New functions.
4779 (execute_user_command): Use execute_control_commands.
4780 (execute_control_command_1): Add "from_tty" parameter. Update.
4781 (execute_control_command): Likewise.
4782
4783 2018-05-04 Tom Tromey <tom@tromey.com>
4784
4785 PR python/22731:
4786 * NEWS: Mention that breakpoint commands are writable.
4787 * python/py-breakpoint.c (bppy_set_commands): New function.
4788 (breakpoint_object_getset) <"commands">: Use it.
4789
4790 2018-05-04 Tom Tromey <tom@tromey.com>
4791
4792 * tracepoint.c (actions_command): Update.
4793 * mi/mi-cmd-break.c (mi_command_line_array)
4794 (mi_command_line_array_cnt, mi_command_line_array_ptr)
4795 (mi_read_next_line): Remove.
4796 (mi_cmd_break_commands): Update.
4797 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
4798 function_view.
4799 * cli/cli-script.c (get_command_line): Update.
4800 (process_next_line): Use function_view. Constify.
4801 (recurse_read_control_structure, read_command_lines)
4802 (read_command_lines_1): Change argument types to function_view.
4803 (do_define_command, document_command): Update.
4804 * breakpoint.h (check_tracepoint_command): Don't declare.
4805 * breakpoint.c (check_tracepoint_command): Remove.
4806 (commands_command_1, create_tracepoint_from_upload): Update.
4807
4808 2018-05-04 Tom Tromey <tom@tromey.com>
4809
4810 PR gdb/11750:
4811 * cli/cli-script.h (enum command_control_type) <define_control>:
4812 New constant.
4813 * cli/cli-script.c (multi_line_command_p): Handle define_control.
4814 (build_command_line, execute_control_command_1)
4815 (process_next_line): Likewise.
4816 (do_define_command): New function, extracted from define_command.
4817 (define_command): Use it.
4818
4819 2018-05-04 Tom Tromey <tom@tromey.com>
4820
4821 * tracepoint.c (actions_command): Update.
4822 * cli/cli-script.h (read_command_lines): Update.
4823 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
4824 (MAX_TMPBUF): Remove define.
4825 (define_command): Use string_printf.
4826 (document_command): Likewise.
4827 * breakpoint.c (commands_command_1): Update.
4828
4829 2018-05-04 Tom Tromey <tom@tromey.com>
4830
4831 * top.c (execute_command): Update.
4832 * cli/cli-script.h (print_command_lines): Now varargs.
4833 * cli/cli-script.c (print_command_lines): Now varargs.
4834 (execute_control_command_1) <case while_control, case if_control>:
4835 Update.
4836
4837 2018-05-04 Tom Tromey <tom@tromey.com>
4838
4839 * tracepoint.c (all_tracepoint_actions): Rename from
4840 all_tracepoint_actions_and_cleanup. Change return type.
4841 (actions_command, encode_actions_1, encode_actions)
4842 (trace_dump_actions, tdump_command): Update.
4843 * remote.c (remote_download_command_source): Update.
4844 * python/python.c (gdbpy_eval_from_control_command)
4845 (python_command, python_interactive_command): Update.
4846 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
4847 * guile/guile.c (guile_command)
4848 (gdbscm_eval_from_control_command, guile_command): Update.
4849 * compile/compile.c (compile_code_command)
4850 (compile_print_command, compile_to_object): Update.
4851 * cli/cli-script.h (struct command_lines_deleter): New.
4852 (counted_command_line): New typedef.
4853 (struct command_line): Add constructor, destructor.
4854 <body_list>: Remove.
4855 <body_list_0, body_list_1>: New members.
4856 (command_line_up): Remove typedef.
4857 (read_command_lines, read_command_lines_1, get_command_line):
4858 Update.
4859 (copy_command_lines): Don't declare.
4860 * cli/cli-script.c (build_command_line): Use "new".
4861 (get_command_line): Return counted_command_line.
4862 (print_command_lines, execute_user_command)
4863 (execute_control_command_1, while_command, if_command): Update.
4864 (realloc_body_list): Remove.
4865 (process_next_line, recurse_read_control_structure): Update.
4866 (read_command_lines, read_command_lines_1): Return counted_command_line.
4867 (free_command_lines): Use "delete".
4868 (copy_command_lines): Remove.
4869 (define_command, document_command, show_user_1): Update.
4870 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
4871 a counted_command_line.
4872 * breakpoint.h (counted_command_line): Remove typedef.
4873 (breakpoint_set_commands): Update.
4874 * breakpoint.c (check_no_tracepoint_commands)
4875 (validate_commands_for_breakpoint): Update.
4876 (breakpoint_set_commands): Change commands to be a
4877 counted_command_line.
4878 (commands_command_1, update_dprintf_command_list)
4879 (create_tracepoint_from_upload): Update.
4880
4881 2018-05-04 Tom Tromey <tom@tromey.com>
4882
4883 * cli/cli-decode.h (cmd_list_element): New constructor.
4884 (~cmd_list_element): New destructor.
4885 (struct cmd_list_element): Add initializers.
4886 * cli/cli-decode.c (do_add_cmd): Use "new".
4887 (delete_cmd): Use "delete".
4888
4889 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
4890 Pedro Alves <palves@redhat.com>
4891
4892 PR breakpoints/19806 and support for PR external/20207.
4893 * NEWS: Mention Aarch64 watchpoint improvements.
4894 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
4895 watchpoints and PR external/20207 watchpoints.
4896 * nat/aarch64-linux-hw-point.c
4897 (kernel_supports_any_contiguous_range): New.
4898 (aarch64_watchpoint_offset): New.
4899 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
4900 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
4901 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
4902 (aarch64_align_watchpoint): New parameters aligned_offset_p and
4903 next_addr_orig_p. Support PR external/20207 watchpoints.
4904 (aarch64_downgrade_regs): New.
4905 (aarch64_dr_state_insert_one_point): New parameters offset and
4906 addr_orig.
4907 (aarch64_dr_state_remove_one_point): Likewise.
4908 (aarch64_handle_breakpoint): Update caller.
4909 (aarch64_handle_aligned_watchpoint): Likewise.
4910 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
4911 aligned_offset.
4912 (aarch64_linux_set_debug_regs): Remove const from state. Call
4913 aarch64_downgrade_regs.
4914 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
4915 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
4916 (DR_CONTROL_MASK): ... this.
4917 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
4918 (unsigned int aarch64_watchpoint_offset): New prototype.
4919 (aarch64_linux_set_debug_regs): Remove const from state.
4920 * utils.c (align_up, align_down): Move to ...
4921 * common/common-utils.c (align_up, align_down): ... here.
4922 * utils.h (align_up, align_down): Move to ...
4923 * common/common-utils.h (align_up, align_down): ... here.
4924
4925 2018-05-04 Joel Brobecker <brobecker@adacore.com>
4926
4927 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
4928 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
4929 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
4930 Re-implement to match the ABI as summarized in GCC's
4931 gcc/config/sparc/sparc.c. All callers updated.
4932 (sparc32_store_arguments): Remove assertion.
4933
4934 2018-05-04 Tom Tromey <tom@tromey.com>
4935
4936 * printcmd.c: Don't include tui.h.
4937 (decode_format): Use skip_spaces.
4938
4939 2018-05-04 Tom Tromey <tom@tromey.com>
4940
4941 PR gdb/22619:
4942 * printcmd.c (last_count): New global.
4943 (x_command): Use saved count when repeating.
4944
4945 2018-05-04 Tom Tromey <tom@tromey.com>
4946
4947 * nto-procfs.c (do_closedir_cleanup): Remove.
4948 (procfs_pidlist): Use gdb_dir_up.
4949 * procfs.c (do_closedir_cleanup): Remove.
4950 (proc_update_threads): Use gdb_dir_up.
4951 * common/filestuff.h (struct gdb_dir_deleter): New.
4952 (gdb_dir_up): New typedef.
4953
4954 2018-05-04 Tom Tromey <tom@tromey.com>
4955
4956 * ada-lang.c (print_mention_exception): Use std::string.
4957
4958 2018-05-04 Tom Tromey <tom@tromey.com>
4959
4960 * ada-lang.c (create_excep_cond_exprs): Update.
4961 (ada_exception_catchpoint_cond_string): Use std::string.
4962
4963 2018-05-04 Tom Tromey <tom@tromey.com>
4964
4965 * ada-lang.c (xget_renaming_scope): Return std::string.
4966 (old_renaming_is_invisible): Update.
4967
4968 2018-05-04 Tom Tromey <tom@tromey.com>
4969
4970 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
4971 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
4972
4973 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
4974
4975 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
4976
4977 2018-05-04 Tom Tromey <tom@tromey.com>
4978
4979 * remote.c (remote_query_supported_append): Change type.
4980 (remote_check_symbols): Update.
4981
4982 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
4983
4984 PR gdb/11420
4985 * configure.ac: Prepend libpython.
4986 * python/python-config.py: Likewise.
4987 * configure: Regenerate.
4988
4989 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
4990
4991 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
4992
4993 2018-05-03 Pedro Alves <palves@redhat.com>
4994
4995 * s390-linux-nat.c
4996 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
4997 override. Write 'true' instead of '1'.
4998 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
4999 declaration.
5000
5001 2018-05-02 Pedro Alves <palves@redhat.com>
5002
5003 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
5004 add_inf_child_target.
5005 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
5006 add_inf_child_target.
5007 * aix-thread.c (aix_thread_target_info): New.
5008 (aix_thread_target) <shortname, longname, doc>: Delete.
5009 <info>: New.
5010 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
5011 add_inf_child_target.
5012 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
5013 add_inf_child_target.
5014 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
5015 add_inf_child_target.
5016 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
5017 add_inf_child_target.
5018 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
5019 add_inf_child_target.
5020 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
5021 add_inf_child_target.
5022 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
5023 add_inf_child_target.
5024 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
5025 add_inf_child_target.
5026 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
5027 add_inf_child_target.
5028 * bfd-target.c (target_bfd_target_info): New.
5029 (target_bfd) <shortname, longname, doc>: Delete.
5030 <info>: New.
5031 * bsd-kvm.c (bsd_kvm_target_info): New.
5032 (bsd_kvm_target) <shortname, longname, doc>: Delete.
5033 <info>: New.
5034 (bsd_kvm_target::open): Rename to ...
5035 (bsd_kvm_target_open): ... this. Adjust.
5036 * bsd-uthread.c (bsd_uthread_target_info): New.
5037 (bsd_uthread_target) <shortname, longname, doc>: Delete.
5038 <info>: New.
5039 * corefile.c (core_file_command): Adjust.
5040 * corelow.c (core_target_info): New.
5041 (core_target) <shortname, longname, doc>: Delete.
5042 <info>: New.
5043 (core_target::open): Rename to ...
5044 (core_target_open): ... this. Adjust.
5045 * ctf.c (ctf_target_info): New.
5046 (ctf_target) <shortname, longname, doc>: Delete.
5047 <info>: New.
5048 (ctf_target::open): Rename to ...
5049 (ctf_target_open): ... this.
5050 (_initialize_ctf): Adjust.
5051 * exec.c (exec_target_info): New.
5052 (exec_target) <shortname, longname, doc>: Delete.
5053 <info>: New.
5054 (exec_target::open): Rename to ...
5055 (exec_target_open): ... this.
5056 * gdbcore.h (core_target_open): Declare.
5057 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
5058 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
5059 add_inf_child_target.
5060 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
5061 add_inf_child_target.
5062 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
5063 add_inf_child_target.
5064 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
5065 add_inf_child_target.
5066 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
5067 add_inf_child_target.
5068 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
5069 add_inf_child_target.
5070 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
5071 add_inf_child_target.
5072 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
5073 add_inf_child_target.
5074 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
5075 add_inf_child_target.
5076 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
5077 add_inf_child_target.
5078 * inf-child.c (inf_child_target_info): New.
5079 (inf_child_target::info): New.
5080 (inf_child_open_target): Remove 'target' parameter. Use
5081 get_native_target instead.
5082 (inf_child_target::open): Delete.
5083 (add_inf_child_target): New.
5084 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
5085 Delete.
5086 <info>: New.
5087 (add_inf_child_target): Declare.
5088 (inf_child_open_target): Declare.
5089 * linux-thread-db.c (thread_db_target_info): New.
5090 (thread_db_target) <shortname, longname, doc>: Delete.
5091 <info>: New.
5092 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
5093 add_inf_child_target.
5094 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
5095 add_inf_child_target.
5096 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
5097 add_inf_child_target.
5098 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
5099 add_inf_child_target.
5100 * make-target-delegates (print_class): Adjust.
5101 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
5102 add_inf_child_target.
5103 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
5104 add_inf_child_target.
5105 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
5106 add_inf_child_target.
5107 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
5108 add_inf_child_target.
5109 * nto-procfs.c (nto_native_target_info): New.
5110 (nto_procfs_target_native) <shortname, longname, doc>:
5111 Delete.
5112 <info>: New.
5113 (nto_procfs_target_info): New.
5114 (nto_procfs_target_procfs) <shortname, longname, doc>:
5115 Delete.
5116 <info>: New.
5117 (init_procfs_targets): Adjust.
5118 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
5119 add_inf_child_target.
5120 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
5121 add_inf_child_target.
5122 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
5123 add_inf_child_target.
5124 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
5125 add_inf_child_target.
5126 * ravenscar-thread.c (ravenscar_target_info): New.
5127 (ravenscar_thread_target) <shortname, longname, doc>:
5128 Delete.
5129 <info>: New.
5130 * record-btrace.c (record_btrace_target_info):
5131 (record_btrace_target) <shortname, longname, doc>: Delete.
5132 <info>: New.
5133 (record_btrace_target::open): Rename to ...
5134 (record_btrace_target_open): ... this. Adjust.
5135 * record-full.c (record_longname, record_doc): New.
5136 (record_full_base_target) <shortname, longname, doc>: Delete.
5137 <info>: New.
5138 (record_full_target_info): New.
5139 (record_full_target): <shortname>: Delete.
5140 <info>: New.
5141 (record_full_core_open_1, record_full_open_1): Update comments.
5142 (record_full_base_target::open): Rename to ...
5143 (record_full_open): ... this.
5144 (cmd_record_full_restore): Update.
5145 (_initialize_record_full): Update.
5146 * remote-sim.c (remote_sim_target_info): New.
5147 (gdbsim_target) <shortname, longname, doc>: Delete.
5148 <info>: New.
5149 (gdbsim_target::open): Rename to ...
5150 (gdbsim_target_open): ... this.
5151 (_initialize_remote_sim): Adjust.
5152 * remote.c (remote_doc): New.
5153 (remote_target_info): New.
5154 (remote_target) <shortname, longname, doc>: Delete.
5155 <info>: New.
5156 (extended_remote_target_info): New.
5157 (extended_remote_target) <shortname, longname, doc>: Delete.
5158 <info>: New.
5159 (remote_target::open_1): Make static. Adjust.
5160 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
5161 * s390-linux-nat.c (_initialize_s390_nat): Use
5162 add_inf_child_target.
5163 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
5164 add_inf_child_target.
5165 * sol-thread.c (thread_db_target_info): New.
5166 (sol_thread_target) <shortname, longname, doc>: Delete.
5167 <info>: New.
5168 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
5169 add_inf_child_target.
5170 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
5171 add_inf_child_target.
5172 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
5173 add_inf_child_target.
5174 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
5175 add_inf_child_target.
5176 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
5177 add_inf_child_target.
5178 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
5179 add_inf_child_target.
5180 * spu-linux-nat.c (_initialize_spu_nat): Use
5181 add_inf_child_target.
5182 * spu-multiarch.c (spu_multiarch_target_info): New.
5183 (spu_multiarch_target) <shortname, longname, doc>: Delete.
5184 <info>: New.
5185 * target-delegates.c: Regenerate.
5186 * target.c: Include <unordered_map>.
5187 (target_ops_p): Delete.
5188 (DEF_VEC_P(target_ops_p)): Delete.
5189 (target_factories): New.
5190 (test_target_info): New.
5191 (test_target_ops::info): New.
5192 (open_target): Adjust to use target_factories.
5193 (add_target_with_completer): Rename to ...
5194 (add_target): ... this. Change prototype. Register target_info
5195 and open callback in target_factories. Register target_info in
5196 command context instead of target_ops.
5197 (add_target): Delete old implementation.
5198 (add_deprecated_target_alias): Change prototype. Adjust.
5199 (the_native_target): New.
5200 (set_native_target, get_native_target): New.
5201 (find_default_run_target): Use the_native_target.
5202 (find_attach_target, find_run_target): Simplify.
5203 (target_ops::open): Delete.
5204 (dummy_target_info): New.
5205 (dummy_target::shortname, dummy_target::longname)
5206 (dummy_target::doc): Delete.
5207 (dummy_target::info): New.
5208 (debug_target::shortname, debug_target::longname)
5209 (debug_target::doc): Delete.
5210 (debug_target::info): New.
5211 * target.h (struct target_info): New.
5212 (target_ops::~target_ops): Add comment.
5213 (target_ops::info): New.
5214 (target_ops::shortname, target_ops::longname, target_ops::doc): No
5215 longer virtual. Implement in terms of target_info.
5216 (set_native_target, get_native_target): Declare.
5217 (target_open_ftype): New.
5218 (add_target, add_target_with_completer)
5219 (add_deprecated_target_alias): Change prototype.
5220 (test_target) <shortname, longname, doc>: Delete.
5221 <info>: New.
5222 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
5223 add_inf_child_target.
5224 * tracefile-tfile.c (tfile_target_info): New.
5225 (tfile_target) <shortname, longname, doc>: Delete.
5226 <info>: New.
5227 (tfile_target::open): Rename to ...
5228 (tfile_target_open): ... this.
5229 (_initialize_tracefile_tfile): Adjust.
5230 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
5231 add_inf_child_target.
5232 * windows-nat.c (_initialize_windows_nat): Use
5233 add_inf_child_target.
5234 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
5235 add_inf_child_target.
5236
5237 2018-05-02 Pedro Alves <palves@redhat.com>
5238
5239 * linux-nat.h (linux_nat_target) <low_new_thread,
5240 low_delete_thread, low_new_fork, low_forget_process,
5241 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
5242 New virtual methods.
5243 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5244 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
5245 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
5246 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5247 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
5248 Delete.
5249 * linux-fork.c (delete_fork): Adjust to call low method.
5250 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
5251 (linux_nat_new_fork, linux_nat_forget_process_hook)
5252 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
5253 (linux_nat_status_is_event):
5254 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
5255 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
5256 to call low method.
5257 (sigtrap_is_event): Rename to ...
5258 (linux_nat_target::low_status_is_event): ... this.
5259 (linux_nat_set_status_is_event): Delete.
5260 (save_stop_reason, linux_nat_wait_1)
5261 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
5262 low methods.
5263 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5264 (linux_nat_set_new_fork, linux_nat_set_forget_process)
5265 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5266 (linux_nat_set_prepare_to_resume): Delete.
5267 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
5268 low virtual methods.
5269 * amd64-linux-nat.c: Likewise.
5270 * arm-linux-nat.c: Likewise.
5271 * i386-linux-nat.c: Likewise.
5272 * ia64-linux-nat.c: Likewise.
5273 * mips-linux-nat.c: Likewise.
5274 * ppc-linux-nat.c: Likewise.
5275 * s390-linux-nat.c: Likewise.
5276 * sparc64-linux-nat.c: Likewise.
5277 * x86-linux-nat.c: Likewise.
5278 * x86-linux-nat.h: Include "nat/x86-linux.h".
5279 (x86_linux_nat_target) <low_new_fork, low_forget_process,
5280 low_prepare_to_resume, low_new_thread, low_delete_thread>:
5281 Override methods.
5282
5283 2018-05-02 Pedro Alves <palves@redhat.com>
5284
5285 * target.h (target_ops)
5286 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5287 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
5288 stopped_by_watchpoint, have_continuable_watchpoint,
5289 stopped_data_address, watchpoint_addr_within_range,
5290 can_accel_watchpoint_condition, can_run, thread_alive,
5291 has_all_memory, has_memory, has_stack, has_registers,
5292 has_execution, can_async_p, is_async_p, supports_non_stop,
5293 always_non_stop_p, can_execute_reverse, supports_multi_process,
5294 supports_enable_disable_tracepoint,
5295 supports_disable_randomization, supports_string_tracing,
5296 supports_evaluation_of_breakpoint_conditions,
5297 can_run_breakpoint_commands, filesystem_is_local,
5298 can_download_tracepoint, get_trace_state_variable_value,
5299 set_trace_notes, get_tib_address, use_agent, can_use_agent,
5300 record_is_replaying, record_will_replay,
5301 augmented_libraries_svr4_read>: Adjust to return bool.
5302 * aarch64-linux-nat.c: All implementations adjusted.
5303 * aix-thread.c: All implementations adjusted.
5304 * arm-linux-nat.c: All implementations adjusted.
5305 * breakpoint.c: All implementations adjusted.
5306 * bsd-kvm.c: All implementations adjusted.
5307 * bsd-uthread.c: All implementations adjusted.
5308 * corelow.c: All implementations adjusted.
5309 * ctf.c: All implementations adjusted.
5310 * darwin-nat.c: All implementations adjusted.
5311 * darwin-nat.h: All implementations adjusted.
5312 * exec.c: All implementations adjusted.
5313 * fbsd-nat.c: All implementations adjusted.
5314 * fbsd-nat.h: All implementations adjusted.
5315 * gnu-nat.c: All implementations adjusted.
5316 * gnu-nat.h: All implementations adjusted.
5317 * go32-nat.c: All implementations adjusted.
5318 * ia64-linux-nat.c: All implementations adjusted.
5319 * inf-child.c: All implementations adjusted.
5320 * inf-child.h: All implementations adjusted.
5321 * inf-ptrace.c: All implementations adjusted.
5322 * inf-ptrace.h: All implementations adjusted.
5323 * linux-nat.c: All implementations adjusted.
5324 * linux-nat.h: All implementations adjusted.
5325 * mips-linux-nat.c: All implementations adjusted.
5326 * nto-procfs.c: All implementations adjusted.
5327 * ppc-linux-nat.c: All implementations adjusted.
5328 * procfs.c: All implementations adjusted.
5329 * ravenscar-thread.c: All implementations adjusted.
5330 * record-btrace.c: All implementations adjusted.
5331 * record-full.c: All implementations adjusted.
5332 * remote-sim.c: All implementations adjusted.
5333 * remote.c: All implementations adjusted.
5334 * s390-linux-nat.c: All implementations adjusted.
5335 * sol-thread.c: All implementations adjusted.
5336 * spu-multiarch.c: All implementations adjusted.
5337 * target-delegates.c: All implementations adjusted.
5338 * target.c: All implementations adjusted.
5339 * target.h: All implementations adjusted.
5340 * tracefile-tfile.c: All implementations adjusted.
5341 * tracefile.c: All implementations adjusted.
5342 * tracefile.h: All implementations adjusted.
5343 * windows-nat.c: All implementations adjusted.
5344 * x86-linux-nat.h: All implementations adjusted.
5345 * x86-nat.h: All implementations adjusted.
5346
5347 2018-05-02 Pedro Alves <palves@redhat.com>
5348
5349 * make-target-delegates (scan_target_h): Don't trim lines here.
5350 Replace sequences of tabs and/or whitespace with a single
5351 whitespace.
5352 (top level, parsing methods): Trim each line before processing it
5353 here.
5354
5355 2018-05-02 Pedro Alves <palves@redhat.com>
5356 John Baldwin <jhb@freebsd.org>
5357
5358 * target.h (enum strata) <debug_stratum>: New.
5359 (struct target_ops) <all delegation methods>: Replace by C++
5360 virtual methods, and drop "to_" prefix. All references updated
5361 throughout.
5362 <to_shortname, to_longname, to_doc, to_data,
5363 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
5364 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
5365 virtual methods. All references updated throughout.
5366 <can_attach, supports_terminal_ours, can_create_inferior,
5367 get_thread_control_capabilities, attach_no_wait>: New
5368 virtual methods.
5369 <insert_breakpoint, remove_breakpoint>: Now
5370 TARGET_DEFAULT_NORETURN methods.
5371 <info_proc>: Now returns bool.
5372 <to_magic>: Delete.
5373 (OPS_MAGIC): Delete.
5374 (current_target): Delete. All references replaced by references
5375 to ...
5376 (target_stack): ... this. New.
5377 (target_shortname, target_longname): Adjust.
5378 (target_can_run): Now a function declaration.
5379 (default_child_has_all_memory, default_child_has_memory)
5380 (default_child_has_stack, default_child_has_registers)
5381 (default_child_has_execution): Remove target_ops parameter.
5382 (complete_target_initialization): Delete.
5383 (memory_breakpoint_target): New template class.
5384 (test_target_ops): Refactor as a C++ class with virtual methods.
5385 * make-target-delegates (NAME_PART): Tighten.
5386 (POINTER_PART, CP_SYMBOL): New.
5387 (SIMPLE_RETURN_PART): Reimplement.
5388 (VEC_RETURN_PART): Expect less.
5389 (RETURN_PART, VIRTUAL_PART): New.
5390 (METHOD): Adjust to C++ virtual methods.
5391 (scan_target_h): Remove reference to C99.
5392 (dname): Output "target_ops::" prefix.
5393 (write_function_header): Adjust to output a C++ class method.
5394 (write_declaration): New.
5395 (write_delegator): Adjust to output a C++ class method.
5396 (tdname): Output "dummy_target::" prefix.
5397 (write_tdefault, write_debugmethod): Adjust to output a C++ class
5398 method.
5399 (tdefault_names, debug_names): Delete.
5400 (return_types, tdefaults, styles, argtypes_array): New.
5401 (top level): All methods are delegators.
5402 (print_class): New.
5403 (top level): Print dummy_target and debug_target classes.
5404 * target-delegates.c: Regenerate.
5405 * target-debug.h (target_debug_print_enum_info_proc_what)
5406 (target_debug_print_thread_control_capabilities)
5407 (target_debug_print_thread_info_p): New.
5408 * target.c (dummy_target): Delete.
5409 (the_dummy_target, the_debug_target): New.
5410 (target_stack): Now extern.
5411 (set_targetdebug): Push/unpush debug target.
5412 (default_child_has_all_memory, default_child_has_memory)
5413 (default_child_has_stack, default_child_has_registers)
5414 (default_child_has_execution): Remove target_ops parameter.
5415 (complete_target_initialization): Delete.
5416 (add_target_with_completer): No longer call
5417 complete_target_initialization.
5418 (target_supports_terminal_ours): Use regular delegation.
5419 (update_current_target): Delete.
5420 (push_target): No longer check magic number. Don't call
5421 update_current_target.
5422 (unpush_target): Don't call update_current_target.
5423 (target_is_pushed): No longer check magic number.
5424 (target_require_runnable): Skip for all stratums over
5425 process_stratum.
5426 (target_ops::info_proc): New.
5427 (target_info_proc): Use find_target_at and
5428 find_default_run_target.
5429 (target_supports_disable_randomization): Use regular delegation.
5430 (target_get_osdata): Use find_target_at.
5431 (target_ops::open, target_ops::close, target_ops::can_attach)
5432 (target_ops::attach, target_ops::can_create_inferior)
5433 (target_ops::create_inferior, target_ops::can_run)
5434 (target_can_run): New.
5435 (default_fileio_target): Use regular delegation.
5436 (target_ops::fileio_open, target_ops::fileio_pwrite)
5437 (target_ops::fileio_pread, target_ops::fileio_fstat)
5438 (target_ops::fileio_close, target_ops::fileio_unlink)
5439 (target_ops::fileio_readlink): New.
5440 (target_fileio_open_1, target_fileio_unlink)
5441 (target_fileio_readlink): Always call the target method. Handle
5442 FILEIO_ENOSYS.
5443 (return_zero, return_zero_has_execution): Delete.
5444 (init_dummy_target): Delete.
5445 (dummy_target::dummy_target, dummy_target::shortname)
5446 (dummy_target::longname, dummy_target::doc)
5447 (debug_target::debug_target, debug_target::shortname)
5448 (debug_target::longname, debug_target::doc): New.
5449 (target_supports_delete_record): Use regular delegation.
5450 (setup_target_debug): Delete.
5451 (maintenance_print_target_stack): Skip debug_stratum.
5452 (initialize_targets): Instantiate the_dummy_target and
5453 the_debug_target.
5454 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
5455 use target_stack.
5456 (target_auxv_search, fprint_target_auxv): Adjust.
5457 (info_auxv_command): Adjust to use target_stack.
5458 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
5459 * exceptions.c (print_flush): Handle a NULL target_stack.
5460 * regcache.c (target_ops_no_register): Refactor as class with
5461 virtual methods.
5462
5463 * exec.c (exec_target): New class.
5464 (exec_ops): Now an exec_target.
5465 (exec_open, exec_close_1, exec_get_section_table)
5466 (exec_xfer_partial, exec_files_info, exec_has_memory)
5467 (exec_make_note_section): Refactor as exec_target methods.
5468 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
5469 Delete.
5470 (exec_target::find_memory_regions): New.
5471 (_initialize_exec): Don't call init_exec_ops.
5472 * gdbcore.h (exec_file_clear): Delete.
5473
5474 * corefile.c (core_target): Delete.
5475 (core_file_command): Adjust.
5476 * corelow.c (core_target): New class.
5477 (the_core_target): New.
5478 (core_close): Remove target_ops parameter.
5479 (core_close_cleanup): Adjust.
5480 (core_target::close): New.
5481 (core_open, core_detach, get_core_registers, core_files_info)
5482 (core_xfer_partial, core_thread_alive, core_read_description)
5483 (core_pid_to_str, core_thread_name, core_has_memory)
5484 (core_has_stack, core_has_registers, core_info_proc): Rework as
5485 core_target methods.
5486 (ignore, core_remove_breakpoint, init_core_ops): Delete.
5487 (_initialize_corelow): Initialize the_core_target.
5488 * gdbcore.h (core_target): Delete.
5489 (the_core_target): New.
5490
5491 * ctf.c: (ctf_target): New class.
5492 (ctf_ops): Now a ctf_target.
5493 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
5494 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
5495 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
5496 methods.
5497 (init_ctf_ops): Delete.
5498 (_initialize_ctf): Don't call it.
5499 * tracefile-tfile.c (tfile_target): New class.
5500 (tfile_ops): Now a tfile_target.
5501 (tfile_open, tfile_close, tfile_files_info)
5502 (tfile_get_tracepoint_status, tfile_trace_find)
5503 (tfile_fetch_registers, tfile_xfer_partial)
5504 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
5505 Refactor as tfile_target methods.
5506 (tfile_xfer_partial_features): Remove target_ops parameter.
5507 (init_tfile_ops): Delete.
5508 (_initialize_tracefile_tfile): Don't call it.
5509 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
5510 (tracefile_has_stack, tracefile_has_registers)
5511 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
5512 tracefile_target methods.
5513 (init_tracefile_ops): Delete.
5514 (tracefile_target::tracefile_target): New.
5515 * tracefile.h: Include "target.h".
5516 (tracefile_target): New class.
5517 (init_tracefile_ops): Delete.
5518
5519 * spu-multiarch.c (spu_multiarch_target): New class.
5520 (spu_ops): Now a spu_multiarch_target.
5521 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
5522 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
5523 (spu_search_memory, spu_mourn_inferior): Refactor as
5524 spu_multiarch_target methods.
5525 (init_spu_ops): Delete.
5526 (_initialize_spu_multiarch): Remove references to init_spu_ops,
5527 complete_target_initialization.
5528
5529 * ravenscar-thread.c (ravenscar_thread_target): New class.
5530 (ravenscar_ops): Now a ravenscar_thread_target.
5531 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
5532 (ravenscar_thread_alive, ravenscar_pid_to_str)
5533 (ravenscar_fetch_registers, ravenscar_store_registers)
5534 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
5535 (ravenscar_stopped_by_hw_breakpoint)
5536 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
5537 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
5538 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
5539 methods.
5540 (init_ravenscar_thread_ops): Delete.
5541 (_initialize_ravenscar): Remove references to
5542 init_ravenscar_thread_ops and complete_target_initialization.
5543
5544 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
5545 (bsd_uthread_target): New class.
5546 (bsd_uthread_ops): Now a bsd_uthread_target.
5547 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
5548 (bsd_uthread_close, bsd_uthread_mourn_inferior)
5549 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
5550 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
5551 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
5552 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
5553 (bsd_uthread_target): Delete function.
5554 (_initialize_bsd_uthread): Remove reference to
5555 complete_target_initialization.
5556
5557 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
5558 (target_bfd): ... this new class.
5559 (target_bfd_xfer_partial, target_bfd_get_section_table)
5560 (target_bfd_close): Refactor as target_bfd methods.
5561 (target_bfd::~target_bfd): New.
5562 (target_bfd_reopen): Adjust.
5563 (target_bfd::close): New.
5564
5565 * record-btrace.c (record_btrace_target): New class.
5566 (record_btrace_ops): Now a record_btrace_target.
5567 (record_btrace_open, record_btrace_stop_recording)
5568 (record_btrace_disconnect, record_btrace_close)
5569 (record_btrace_async, record_btrace_info)
5570 (record_btrace_insn_history, record_btrace_insn_history_range)
5571 (record_btrace_insn_history_from, record_btrace_call_history)
5572 (record_btrace_call_history_range)
5573 (record_btrace_call_history_from, record_btrace_record_method)
5574 (record_btrace_is_replaying, record_btrace_will_replay)
5575 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
5576 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
5577 (record_btrace_store_registers, record_btrace_prepare_to_store)
5578 (record_btrace_to_get_unwinder)
5579 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
5580 (record_btrace_commit_resume, record_btrace_wait)
5581 (record_btrace_stop, record_btrace_can_execute_reverse)
5582 (record_btrace_stopped_by_sw_breakpoint)
5583 (record_btrace_supports_stopped_by_sw_breakpoint)
5584 (record_btrace_stopped_by_hw_breakpoint)
5585 (record_btrace_supports_stopped_by_hw_breakpoint)
5586 (record_btrace_update_thread_list, record_btrace_thread_alive)
5587 (record_btrace_goto_begin, record_btrace_goto_end)
5588 (record_btrace_goto, record_btrace_stop_replaying_all)
5589 (record_btrace_execution_direction)
5590 (record_btrace_prepare_to_generate_core)
5591 (record_btrace_done_generating_core): Refactor as
5592 record_btrace_target methods.
5593 (init_record_btrace_ops): Delete.
5594 (_initialize_record_btrace): Remove reference to
5595 init_record_btrace_ops.
5596 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
5597 the execution_direction global.
5598 (record_full_base_target, record_full_target)
5599 (record_full_core_target): New classes.
5600 (record_full_ops): Now a record_full_target.
5601 (record_full_core_ops): Now a record_full_core_target.
5602 (record_full_target::detach, record_full_target::disconnect)
5603 (record_full_core_target::disconnect)
5604 (record_full_target::mourn_inferior, record_full_target::kill):
5605 New.
5606 (record_full_open, record_full_close, record_full_async): Refactor
5607 as methods of the record_full_base_target class.
5608 (record_full_resume, record_full_commit_resume): Refactor
5609 as methods of the record_full_target class.
5610 (record_full_wait, record_full_stopped_by_watchpoint)
5611 (record_full_stopped_data_address)
5612 (record_full_stopped_by_sw_breakpoint)
5613 (record_full_supports_stopped_by_sw_breakpoint)
5614 (record_full_stopped_by_hw_breakpoint)
5615 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
5616 methods of the record_full_base_target class.
5617 (record_full_store_registers, record_full_xfer_partial)
5618 (record_full_insert_breakpoint, record_full_remove_breakpoint):
5619 Refactor as methods of the record_full_target class.
5620 (record_full_can_execute_reverse, record_full_get_bookmark)
5621 (record_full_goto_bookmark, record_full_execution_direction)
5622 (record_full_record_method, record_full_info, record_full_delete)
5623 (record_full_is_replaying, record_full_will_replay)
5624 (record_full_goto_begin, record_full_goto_end, record_full_goto)
5625 (record_full_stop_replaying): Refactor as methods of the
5626 record_full_base_target class.
5627 (record_full_core_resume, record_full_core_kill)
5628 (record_full_core_fetch_registers)
5629 (record_full_core_prepare_to_store)
5630 (record_full_core_store_registers, record_full_core_xfer_partial)
5631 (record_full_core_insert_breakpoint)
5632 (record_full_core_remove_breakpoint)
5633 (record_full_core_has_execution): Refactor
5634 as methods of the record_full_core_target class.
5635 (record_full_base_target::supports_delete_record): New.
5636 (init_record_full_ops): Delete.
5637 (init_record_full_core_ops): Delete.
5638 (record_full_save): Refactor as method of the
5639 record_full_base_target class.
5640 (_initialize_record_full): Remove references to
5641 init_record_full_ops and init_record_full_core_ops.
5642
5643 * remote.c (remote_target, extended_remote_target): New classes.
5644 (remote_ops): Now a remote_target.
5645 (extended_remote_ops): Now an extended_remote_target.
5646 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
5647 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
5648 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
5649 (remote_pass_signals, remote_set_syscall_catchpoint)
5650 (remote_program_signals, )
5651 (remote_thread_always_alive): Remove target_ops parameter.
5652 (remote_thread_alive, remote_thread_name)
5653 (remote_update_thread_list, remote_threads_extra_info)
5654 (remote_static_tracepoint_marker_at)
5655 (remote_static_tracepoint_markers_by_strid)
5656 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
5657 (remote_open): Refactor as methods of remote_target.
5658 (extended_remote_open, extended_remote_detach)
5659 (extended_remote_attach, extended_remote_post_attach):
5660 (extended_remote_supports_disable_randomization)
5661 (extended_remote_create_inferior): : Refactor as method of
5662 extended_remote_target.
5663 (remote_set_permissions, remote_open_1, remote_detach)
5664 (remote_follow_fork, remote_follow_exec, remote_disconnect)
5665 (remote_resume, remote_commit_resume, remote_stop)
5666 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
5667 (remote_terminal_ours, remote_wait, remote_fetch_registers)
5668 (remote_prepare_to_store, remote_store_registers)
5669 (remote_flash_erase, remote_flash_done, remote_files_info)
5670 (remote_kill, remote_mourn, remote_insert_breakpoint)
5671 (remote_remove_breakpoint, remote_insert_watchpoint)
5672 (remote_watchpoint_addr_within_range)
5673 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
5674 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
5675 (remote_supports_stopped_by_sw_breakpoint)
5676 (remote_stopped_by_hw_breakpoint)
5677 (remote_supports_stopped_by_hw_breakpoint)
5678 (remote_stopped_by_watchpoint, remote_stopped_data_address)
5679 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
5680 (remote_verify_memory): Refactor as methods of remote_target.
5681 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
5682 parameter.
5683 (remote_xfer_partial, remote_get_memory_xfer_limit)
5684 (remote_search_memory, remote_rcmd, remote_memory_map)
5685 (remote_pid_to_str, remote_get_thread_local_address)
5686 (remote_get_tib_address, remote_read_description): Refactor as
5687 methods of remote_target.
5688 (remote_target::fileio_open, remote_target::fileio_pwrite)
5689 (remote_target::fileio_pread, remote_target::fileio_close): New.
5690 (remote_hostio_readlink, remote_hostio_fstat)
5691 (remote_filesystem_is_local, remote_can_execute_reverse)
5692 (remote_supports_non_stop, remote_supports_disable_randomization)
5693 (remote_supports_multi_process, remote_supports_cond_breakpoints)
5694 (remote_supports_enable_disable_tracepoint)
5695 (remote_supports_string_tracing)
5696 (remote_can_run_breakpoint_commands, remote_trace_init)
5697 (remote_download_tracepoint, remote_can_download_tracepoint)
5698 (remote_download_trace_state_variable, remote_enable_tracepoint)
5699 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
5700 (remote_trace_start, remote_get_trace_status)
5701 (remote_get_tracepoint_status, remote_trace_stop)
5702 (remote_trace_find, remote_get_trace_state_variable_value)
5703 (remote_save_trace_data, remote_get_raw_trace_data)
5704 (remote_set_disconnected_tracing, remote_core_of_thread)
5705 (remote_set_circular_trace_buffer, remote_traceframe_info)
5706 (remote_get_min_fast_tracepoint_insn_len)
5707 (remote_set_trace_buffer_size, remote_set_trace_notes)
5708 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
5709 (remote_disable_btrace, remote_teardown_btrace)
5710 (remote_read_btrace, remote_btrace_conf)
5711 (remote_augmented_libraries_svr4_read, remote_load)
5712 (remote_pid_to_exec_file, remote_can_do_single_step)
5713 (remote_execution_direction, remote_thread_handle_to_thread_info):
5714 Refactor as methods of remote_target.
5715 (init_remote_ops, init_extended_remote_ops): Delete.
5716 (remote_can_async_p, remote_is_async_p, remote_async)
5717 (remote_thread_events, remote_upload_tracepoints)
5718 (remote_upload_trace_state_variables): Refactor as methods of
5719 remote_target.
5720 (_initialize_remote): Remove references to init_remote_ops and
5721 init_extended_remote_ops.
5722
5723 * remote-sim.c (gdbsim_target): New class.
5724 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
5725 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
5726 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
5727 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
5728 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
5729 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
5730 Refactor as methods of gdbsim_target.
5731 (gdbsim_ops): Now a gdbsim_target.
5732 (init_gdbsim_ops): Delete.
5733 (gdbsim_cntrl_c): Adjust.
5734 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
5735
5736 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
5737 (the_amd64_linux_nat_target): New.
5738 (amd64_linux_fetch_inferior_registers)
5739 (amd64_linux_store_inferior_registers): Refactor as methods of
5740 amd64_linux_nat_target.
5741 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
5742 * i386-linux-nat.c: Don't include "linux-nat.h".
5743 (i386_linux_nat_target): New class.
5744 (the_i386_linux_nat_target): New.
5745 (i386_linux_fetch_inferior_registers)
5746 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
5747 as methods of i386_linux_nat_target.
5748 (_initialize_i386_linux_nat): Adjust. Set linux_target.
5749 * inf-child.c (inf_child_ops): Delete.
5750 (inf_child_fetch_inferior_registers)
5751 (inf_child_store_inferior_registers): Delete.
5752 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
5753 methods of inf_child_target.
5754 (inf_child_target::supports_terminal_ours)
5755 (inf_child_target::terminal_init)
5756 (inf_child_target::terminal_inferior)
5757 (inf_child_target::terminal_ours_for_output)
5758 (inf_child_target::terminal_ours, inf_child_target::interrupt)
5759 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
5760 New.
5761 (inf_child_open, inf_child_disconnect, inf_child_close)
5762 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
5763 (inf_child_post_startup_inferior, inf_child_can_run)
5764 (inf_child_pid_to_exec_file): Refactor as methods of
5765 inf_child_target.
5766 (inf_child_follow_fork): Delete.
5767 (inf_child_target::can_create_inferior)
5768 (inf_child_target::can_attach): New.
5769 (inf_child_target::has_all_memory, inf_child_target::has_memory)
5770 (inf_child_target::has_stack, inf_child_target::has_registers)
5771 (inf_child_target::has_execution): New.
5772 (inf_child_fileio_open, inf_child_fileio_pwrite)
5773 (inf_child_fileio_pread, inf_child_fileio_fstat)
5774 (inf_child_fileio_close, inf_child_fileio_unlink)
5775 (inf_child_fileio_readlink, inf_child_use_agent)
5776 (inf_child_can_use_agent): Refactor as methods of
5777 inf_child_target.
5778 (return_zero, inf_child_target): Delete.
5779 (inf_child_target::inf_child_target): New.
5780 * inf-child.h: Include "target.h".
5781 (inf_child_target): Delete function prototype.
5782 (inf_child_target): New class.
5783 (inf_child_open_target, inf_child_mourn_inferior)
5784 (inf_child_maybe_unpush_target): Delete.
5785 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
5786 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
5787 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
5788 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
5789 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
5790 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
5791 (inf_ptrace_wait, inf_ptrace_xfer_partial)
5792 (inf_ptrace_thread_alive, inf_ptrace_files_info)
5793 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
5794 methods of inf_ptrace_target.
5795 (inf_ptrace_target): Delete function.
5796 * inf-ptrace.h: Include "inf-child.h".
5797 (inf_ptrace_target): Delete function declaration.
5798 (inf_ptrace_target): New class.
5799 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
5800 * linux-nat.c (linux_target): New.
5801 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
5802 (linux_nat_target::~linux_nat_target): New.
5803 (linux_child_post_attach, linux_child_post_startup_inferior)
5804 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
5805 (linux_child_remove_fork_catchpoint)
5806 (linux_child_insert_vfork_catchpoint)
5807 (linux_child_remove_vfork_catchpoint)
5808 (linux_child_insert_exec_catchpoint)
5809 (linux_child_remove_exec_catchpoint)
5810 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
5811 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
5812 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
5813 (linux_nat_stopped_data_address)
5814 (linux_nat_stopped_by_sw_breakpoint)
5815 (linux_nat_supports_stopped_by_sw_breakpoint)
5816 (linux_nat_stopped_by_hw_breakpoint)
5817 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
5818 (linux_nat_kill, linux_nat_mourn_inferior)
5819 (linux_nat_xfer_partial, linux_nat_thread_alive)
5820 (linux_nat_update_thread_list, linux_nat_pid_to_str)
5821 (linux_nat_thread_name, linux_child_pid_to_exec_file)
5822 (linux_child_static_tracepoint_markers_by_strid)
5823 (linux_nat_is_async_p, linux_nat_can_async_p)
5824 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
5825 (linux_nat_supports_multi_process)
5826 (linux_nat_supports_disable_randomization, linux_nat_async)
5827 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
5828 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
5829 (linux_nat_fileio_open, linux_nat_fileio_readlink)
5830 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
5831 methods of linux_nat_target.
5832 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
5833 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
5834 parameter.
5835 (check_stopped_by_watchpoint): Adjust.
5836 (linux_xfer_partial): Delete.
5837 (linux_target_install_ops, linux_target, linux_nat_add_target):
5838 Delete.
5839 (linux_nat_target::linux_nat_target): New.
5840 * linux-nat.h: Include "inf-ptrace.h".
5841 (linux_nat_target): New.
5842 (linux_target, linux_target_install_ops, linux_nat_add_target):
5843 Delete function declarations.
5844 (linux_target): Declare global.
5845 * linux-thread-db.c (thread_db_target): New.
5846 (thread_db_target::thread_db_target): New.
5847 (thread_db_ops): Delete.
5848 (the_thread_db_target): New.
5849 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
5850 (thread_db_update_thread_list, thread_db_pid_to_str)
5851 (thread_db_extra_thread_info)
5852 (thread_db_thread_handle_to_thread_info)
5853 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
5854 (thread_db_resume): Refactor as methods of thread_db_target.
5855 (init_thread_db_ops): Delete.
5856 (_initialize_thread_db): Remove reference to init_thread_db_ops.
5857 * x86-linux-nat.c: Don't include "linux-nat.h".
5858 (super_post_startup_inferior): Delete.
5859 (x86_linux_nat_target::~x86_linux_nat_target): New.
5860 (x86_linux_child_post_startup_inferior)
5861 (x86_linux_read_description, x86_linux_enable_btrace)
5862 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
5863 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
5864 methods of x86_linux_nat_target.
5865 (x86_linux_create_target): Delete. Bits folded ...
5866 (x86_linux_add_target): ... here. Now takes a linux_nat_target
5867 pointer.
5868 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
5869 (x86_linux_nat_target): New class.
5870 (x86_linux_create_target): Delete.
5871 (x86_linux_add_target): Now takes a linux_nat_target pointer.
5872 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
5873 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
5874 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
5875 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
5876 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
5877 make extern.
5878 (x86_use_watchpoints): Delete.
5879 * x86-nat.h: Include "breakpoint.h" and "target.h".
5880 (x86_use_watchpoints): Delete.
5881 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
5882 (x86_stopped_by_watchpoint, x86_stopped_data_address)
5883 (x86_insert_watchpoint, x86_remove_watchpoint)
5884 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
5885 (x86_stopped_by_hw_breakpoint): New declarations.
5886 (x86_nat_target): New template class.
5887
5888 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
5889 (the_ppc_linux_nat_target): New.
5890 (ppc_linux_fetch_inferior_registers)
5891 (ppc_linux_can_use_hw_breakpoint)
5892 (ppc_linux_region_ok_for_hw_watchpoint)
5893 (ppc_linux_ranged_break_num_registers)
5894 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
5895 (ppc_linux_insert_mask_watchpoint)
5896 (ppc_linux_remove_mask_watchpoint)
5897 (ppc_linux_can_accel_watchpoint_condition)
5898 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
5899 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
5900 (ppc_linux_watchpoint_addr_within_range)
5901 (ppc_linux_masked_watch_num_registers)
5902 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
5903 (ppc_linux_read_description): Refactor as methods of
5904 ppc_linux_nat_target.
5905 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
5906
5907 * procfs.c (procfs_xfer_partial): Delete forward declaration.
5908 (procfs_target): New class.
5909 (the_procfs_target): New.
5910 (procfs_target): Delete function.
5911 (procfs_auxv_parse, procfs_attach, procfs_detach)
5912 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
5913 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
5914 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
5915 (procfs_create_inferior, procfs_update_thread_list)
5916 (procfs_thread_alive, procfs_pid_to_str)
5917 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
5918 (procfs_stopped_data_address, procfs_insert_watchpoint)
5919 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
5920 (proc_find_memory_regions, procfs_info_proc)
5921 (procfs_make_note_section): Refactor as methods of procfs_target.
5922 (_initialize_procfs): Adjust.
5923 * sol-thread.c (sol_thread_target): New class.
5924 (sol_thread_ops): Now a sol_thread_target.
5925 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
5926 (sol_thread_fetch_registers, sol_thread_store_registers)
5927 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
5928 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
5929 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
5930 (init_sol_thread_ops): Delete.
5931 (_initialize_sol_thread): Adjust. Remove references to
5932 init_sol_thread_ops and complete_target_initialization.
5933
5934 * windows-nat.c (windows_nat_target): New class.
5935 (windows_fetch_inferior_registers)
5936 (windows_store_inferior_registers, windows_resume, windows_wait)
5937 (windows_attach, windows_detach, windows_pid_to_exec_file)
5938 (windows_files_info, windows_create_inferior)
5939 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
5940 (windows_close, windows_pid_to_str, windows_xfer_partial)
5941 (windows_get_tib_address, windows_get_ada_task_ptid)
5942 (windows_thread_name, windows_thread_alive): Refactor as
5943 windows_nat_target methods.
5944 (do_initial_windows_stuff): Adjust.
5945 (windows_target): Delete function.
5946 (_initialize_windows_nat): Adjust.
5947
5948 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
5949 (darwin_mourn_inferior, darwin_kill_inferior)
5950 (darwin_create_inferior, darwin_attach, darwin_detach)
5951 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
5952 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
5953 (darwin_supports_multi_process): Refactor as darwin_nat_target
5954 methods.
5955 (darwin_resume_to, darwin_files_info): Delete.
5956 (_initialize_darwin_inferior): Rename to ...
5957 (_initialize_darwin_nat): ... this. Adjust to C++ification.
5958 * darwin-nat.h: Include "inf-child.h".
5959 (darwin_nat_target): New class.
5960 (darwin_complete_target): Delete.
5961 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
5962 (darwin_target): New.
5963 (i386_darwin_fetch_inferior_registers)
5964 (i386_darwin_store_inferior_registers): Refactor as methods of
5965 darwin_nat_target.
5966 (darwin_complete_target): Delete, with ...
5967 (_initialize_i386_darwin_nat): ... bits factored out here.
5968
5969 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
5970 (the_alpha_linux_nat_target): New.
5971 (alpha_linux_register_u_offset): Refactor as
5972 alpha_linux_nat_target method.
5973 (_initialize_alpha_linux_nat): Adjust.
5974 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
5975 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
5976 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
5977 methods of linux_nat_trad_target.
5978 (linux_trad_target): Delete.
5979 * linux-nat-trad.h (linux_trad_target): Delete function.
5980 (linux_nat_trad_target): New class.
5981 * mips-linux-nat.c (mips_linux_nat_target): New class.
5982 (super_fetch_registers, super_store_registers, super_close):
5983 Delete.
5984 (the_mips_linux_nat_target): New.
5985 (mips64_linux_regsets_fetch_registers)
5986 (mips64_linux_regsets_store_registers)
5987 (mips64_linux_fetch_registers, mips64_linux_store_registers)
5988 (mips_linux_register_u_offset, mips_linux_read_description)
5989 (mips_linux_can_use_hw_breakpoint)
5990 (mips_linux_stopped_by_watchpoint)
5991 (mips_linux_stopped_data_address)
5992 (mips_linux_region_ok_for_hw_watchpoint)
5993 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
5994 (mips_linux_close): Refactor as methods of mips_linux_nat.
5995 (_initialize_mips_linux_nat): Adjust to C++ification.
5996
5997 * aix-thread.c (aix_thread_target): New class.
5998 (aix_thread_ops): Now an aix_thread_target.
5999 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
6000 (aix_thread_fetch_registers, aix_thread_store_registers)
6001 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
6002 (aix_thread_thread_alive, aix_thread_pid_to_str)
6003 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
6004 Refactor as methods of aix_thread_target.
6005 (init_aix_thread_ops): Delete.
6006 (_initialize_aix_thread): Remove references to init_aix_thread_ops
6007 and complete_target_initialization.
6008 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
6009 (rs6000_nat_target): New class.
6010 (the_rs6000_nat_target): New.
6011 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
6012 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
6013 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
6014 (super_create_inferior): Delete.
6015 (_initialize_rs6000_nat): Adjust to C++ification.
6016
6017 * arm-linux-nat.c (arm_linux_nat_target): New class.
6018 (the_arm_linux_nat_target): New.
6019 (arm_linux_fetch_inferior_registers)
6020 (arm_linux_store_inferior_registers, arm_linux_read_description)
6021 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
6022 (arm_linux_remove_hw_breakpoint)
6023 (arm_linux_region_ok_for_hw_watchpoint)
6024 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
6025 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
6026 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
6027 arm_linux_nat_target.
6028 (_initialize_arm_linux_nat): Adjust to C++ification.
6029
6030 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
6031 (the_aarch64_linux_nat_target): New.
6032 (aarch64_linux_fetch_inferior_registers)
6033 (aarch64_linux_store_inferior_registers)
6034 (aarch64_linux_child_post_startup_inferior)
6035 (aarch64_linux_read_description)
6036 (aarch64_linux_can_use_hw_breakpoint)
6037 (aarch64_linux_insert_hw_breakpoint)
6038 (aarch64_linux_remove_hw_breakpoint)
6039 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
6040 (aarch64_linux_region_ok_for_hw_watchpoint)
6041 (aarch64_linux_stopped_data_address)
6042 (aarch64_linux_stopped_by_watchpoint)
6043 (aarch64_linux_watchpoint_addr_within_range)
6044 (aarch64_linux_can_do_single_step): Refactor as methods of
6045 aarch64_linux_nat_target.
6046 (super_post_startup_inferior): Delete.
6047 (_initialize_aarch64_linux_nat): Adjust to C++ification.
6048
6049 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
6050 (the_hppa_linux_nat_target): New.
6051 (hppa_linux_fetch_inferior_registers)
6052 (hppa_linux_store_inferior_registers): Refactor as methods of
6053 hppa_linux_nat_target.
6054 (_initialize_hppa_linux_nat): Adjust to C++ification.
6055
6056 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
6057 (the_ia64_linux_nat_target): New.
6058 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
6059 (ia64_linux_stopped_data_address)
6060 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
6061 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
6062 ia64_linux_nat_target methods.
6063 (super_xfer_partial): Delete.
6064 (_initialize_ia64_linux_nat): Adjust to C++ification.
6065
6066 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
6067 (the_m32r_linux_nat_target): New.
6068 (m32r_linux_fetch_inferior_registers)
6069 (m32r_linux_store_inferior_registers): Refactor as
6070 m32r_linux_nat_target methods.
6071 (_initialize_m32r_linux_nat): Adjust to C++ification.
6072
6073 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
6074 (the_m68k_linux_nat_target): New.
6075 (m68k_linux_fetch_inferior_registers)
6076 (m68k_linux_store_inferior_registers): Refactor as
6077 m68k_linux_nat_target methods.
6078 (_initialize_m68k_linux_nat): Adjust to C++ification.
6079
6080 * s390-linux-nat.c (s390_linux_nat_target): New class.
6081 (the_s390_linux_nat_target): New.
6082 (s390_linux_fetch_inferior_registers)
6083 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
6084 (s390_insert_watchpoint, s390_remove_watchpoint)
6085 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
6086 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
6087 (s390_auxv_parse, s390_read_description): Refactor as methods of
6088 s390_linux_nat_target.
6089 (_initialize_s390_nat): Adjust to C++ification.
6090
6091 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
6092 (the_sparc_linux_nat_target): New.
6093 (_initialize_sparc_linux_nat): Adjust to C++ification.
6094 * sparc-nat.c (sparc_fetch_inferior_registers)
6095 (sparc_store_inferior_registers): Remove target_ops parameter.
6096 * sparc-nat.h (sparc_fetch_inferior_registers)
6097 (sparc_store_inferior_registers): Remove target_ops parameter.
6098 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
6099 (the_sparc64_linux_nat_target): New.
6100 (_initialize_sparc64_linux_nat): Adjust to C++ification.
6101
6102 * spu-linux-nat.c (spu_linux_nat_target): New class.
6103 (the_spu_linux_nat_target): New.
6104 (spu_child_post_startup_inferior, spu_child_post_attach)
6105 (spu_child_wait, spu_fetch_inferior_registers)
6106 (spu_store_inferior_registers, spu_xfer_partial)
6107 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
6108 methods.
6109 (_initialize_spu_nat): Adjust to C++ification.
6110
6111 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
6112 (the_tilegx_linux_nat_target): New.
6113 (fetch_inferior_registers, store_inferior_registers):
6114 Refactor as methods.
6115 (_initialize_tile_linux_nat): Adjust to C++ification.
6116
6117 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
6118 (the_xtensa_linux_nat_target): New.
6119 (xtensa_linux_fetch_inferior_registers)
6120 (xtensa_linux_store_inferior_registers): Refactor as
6121 xtensa_linux_nat_target methods.
6122 (_initialize_xtensa_linux_nat): Adjust to C++ification.
6123
6124 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
6125 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
6126 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
6127 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
6128 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
6129 (fbsd_stopped_by_sw_breakpoint)
6130 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
6131 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
6132 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
6133 (fbsd_post_startup_inferior, fbsd_post_attach)
6134 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
6135 (fbsd_set_syscall_catchpoint)
6136 (super_xfer_partial, super_resume, super_wait)
6137 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
6138 (fbsd_handle_debug_trap): Remove target_ops parameter.
6139 (fbsd_nat_add_target): Delete.
6140 * fbsd-nat.h: Include "inf-ptrace.h".
6141 (fbsd_nat_add_target): Delete.
6142 (USE_SIGTRAP_SIGINFO): Define.
6143 (fbsd_nat_target): New class.
6144
6145 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
6146 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
6147 (amd64bsd_target): Delete.
6148 * amd64-bsd-nat.h: New file.
6149 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
6150 "x86-bsd-nat.h".
6151 (amd64_fbsd_nat_target): New class.
6152 (the_amd64_fbsd_nat_target): New.
6153 (amd64fbsd_read_description): Refactor as method of
6154 amd64_fbsd_nat_target.
6155 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6156 (_initialize_amd64fbsd_nat): Adjust to C++ification.
6157 * amd64-nat.h (amd64bsd_target): Delete function declaration.
6158 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
6159 (i386bsd_store_inferior_registers): Remove target_ops parameter.
6160 (i386bsd_target): Delete.
6161 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
6162 (i386bsd_fetch_inferior_registers)
6163 (i386bsd_store_inferior_registers): Declare.
6164 (i386_bsd_nat_target): New class.
6165 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
6166 (the_i386_fbsd_nat_target): New.
6167 (i386fbsd_resume, i386fbsd_read_description): Refactor as
6168 i386_fbsd_nat_target methods.
6169 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6170 (_initialize_i386fbsd_nat): Adjust to C++ification.
6171 * x86-bsd-nat.c (super_mourn_inferior): Delete.
6172 (x86bsd_mourn_inferior, x86bsd_target): Delete.
6173 (_initialize_x86_bsd_nat): Adjust to C++ification.
6174 * x86-bsd-nat.h: Include "x86-nat.h".
6175 (x86bsd_target): Delete declaration.
6176 (x86bsd_nat_target): New class.
6177
6178 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
6179 (the_aarch64_fbsd_nat_target): New.
6180 (aarch64_fbsd_fetch_inferior_registers)
6181 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
6182 aarch64_fbsd_nat_target.
6183 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
6184 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
6185 (the_alpha_bsd_nat_target): New.
6186 (alphabsd_fetch_inferior_registers)
6187 (alphabsd_store_inferior_registers): Refactor as
6188 alpha_bsd_nat_target methods.
6189 (_initialize_alphabsd_nat): Refactor as methods of
6190 alpha_bsd_nat_target.
6191 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
6192 (the_amd64_nbsd_nat_target): New.
6193 (_initialize_amd64nbsd_nat): Adjust to C++ification.
6194 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
6195 (the_amd64_obsd_nat_target): New.
6196 (_initialize_amd64obsd_nat): Adjust to C++ification.
6197 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
6198 (the_arm_fbsd_nat_target): New.
6199 (arm_fbsd_fetch_inferior_registers)
6200 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
6201 (_initialize_arm_fbsd_nat): Refactor as methods of
6202 arm_fbsd_nat_target.
6203 (_initialize_arm_fbsd_nat): Adjust to C++ification.
6204 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
6205 (the_arm_netbsd_nat_target): New.
6206 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
6207 arm_netbsd_nat_target.
6208 (_initialize_arm_netbsd_nat): Adjust to C++ification.
6209 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
6210 (the_hppa_nbsd_nat_target): New.
6211 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
6212 hppa_nbsd_nat_target methods.
6213 (_initialize_hppanbsd_nat): Adjust to C++ification.
6214 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
6215 (the_hppa_obsd_nat_target): New.
6216 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
6217 methods of hppa_obsd_nat_target.
6218 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
6219 add_target.
6220 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
6221 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
6222 add_target.
6223 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
6224 (_initialize_i386obsd_nat): Use add_target.
6225 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
6226 (the_m68k_bsd_nat_target): New.
6227 (m68kbsd_fetch_inferior_registers)
6228 (m68kbsd_store_inferior_registers): Refactor as methods of
6229 m68k_bsd_nat_target.
6230 (_initialize_m68kbsd_nat): Adjust to C++ification.
6231 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
6232 (the_mips_fbsd_nat_target): New.
6233 (mips_fbsd_fetch_inferior_registers)
6234 (mips_fbsd_store_inferior_registers): Refactor as methods of
6235 mips_fbsd_nat_target.
6236 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
6237 add_target.
6238 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
6239 (the_mips_nbsd_nat_target): New.
6240 (mipsnbsd_fetch_inferior_registers)
6241 (mipsnbsd_store_inferior_registers): Refactor as methods of
6242 mips_nbsd_nat_target.
6243 (_initialize_mipsnbsd_nat): Adjust to C++ification.
6244 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
6245 (the_mips64_obsd_nat_target): New.
6246 (mips64obsd_fetch_inferior_registers)
6247 (mips64obsd_store_inferior_registers): Refactor as methods of
6248 mips64_obsd_nat_target.
6249 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
6250 add_target.
6251 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
6252 nbsd_nat_target.
6253 * nbsd-nat.h: Include "inf-ptrace.h".
6254 (nbsd_nat_target): New class.
6255 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
6256 (obsd_wait): Refactor as methods of obsd_nat_target.
6257 (obsd_add_target): Delete.
6258 * obsd-nat.h: Include "inf-ptrace.h".
6259 (obsd_nat_target): New class.
6260 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
6261 (the_ppc_fbsd_nat_target): New.
6262 (ppcfbsd_fetch_inferior_registers)
6263 (ppcfbsd_store_inferior_registers): Refactor as methods of
6264 ppc_fbsd_nat_target.
6265 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
6266 add_target.
6267 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
6268 (the_ppc_nbsd_nat_target): New.
6269 (ppcnbsd_fetch_inferior_registers)
6270 (ppcnbsd_store_inferior_registers): Refactor as methods of
6271 ppc_nbsd_nat_target.
6272 (_initialize_ppcnbsd_nat): Adjust to C++ification.
6273 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
6274 (the_ppc_obsd_nat_target): New.
6275 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
6276 methods of ppc_obsd_nat_target.
6277 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
6278 add_target.
6279 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
6280 (the_sh_nbsd_nat_target): New.
6281 (shnbsd_fetch_inferior_registers)
6282 (shnbsd_store_inferior_registers): Refactor as methods of
6283 sh_nbsd_nat_target.
6284 (_initialize_shnbsd_nat): Adjust to C++ification.
6285 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
6286 (inf_ptrace_xfer_partial): Delete.
6287 (sparc_xfer_partial, sparc_target): Delete.
6288 * sparc-nat.h (sparc_fetch_inferior_registers)
6289 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
6290 (sparc_target): Delete function declaration.
6291 (sparc_target): New template class.
6292 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
6293 (_initialize_sparcnbsd_nat): Adjust to C++ification.
6294 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
6295 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
6296 add_target.
6297 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
6298 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
6299 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
6300 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
6301 add_target.
6302 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
6303 (the_vax_bsd_nat_target): New.
6304 (vaxbsd_fetch_inferior_registers)
6305 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
6306 methods.
6307 (_initialize_vaxbsd_nat): Adjust to C++ification.
6308
6309 * bsd-kvm.c (bsd_kvm_target): New class.
6310 (bsd_kvm_ops): Now a bsd_kvm_target.
6311 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
6312 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
6313 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
6314 bsd_kvm_target.
6315 (bsd_kvm_return_one): Delete.
6316 (bsd_kvm_add_target): Adjust to C++ification.
6317
6318 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
6319 (nto_procfs_target_procfs): New classes.
6320 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
6321 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
6322 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
6323 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
6324 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
6325 (procfs_remove_hw_breakpoint, procfs_resume)
6326 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
6327 (procfs_kill_inferior, procfs_store_registers)
6328 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
6329 as methods of nto_procfs_target.
6330 (nto_procfs_ops): Now an nto_procfs_target_procfs.
6331 (nto_native_ops): Delete.
6332 (procfs_open, procfs_native_open): Delete.
6333 (nto_native_ops): Now an nto_procfs_target_native.
6334 (init_procfs_targets): Adjust to C++ification.
6335 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
6336 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
6337 Refactor as methods of nto_procfs_target.
6338
6339 * go32-nat.c (go32_nat_target): New class.
6340 (the_go32_nat_target): New.
6341 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
6342 (go32_store_registers, go32_xfer_partial, go32_files_info)
6343 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
6344 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
6345 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
6346 (go32_pid_to_str): Refactor as methods of go32_nat_target.
6347 (go32_target): Delete.
6348 (_initialize_go32_nat): Adjust to C++ification.
6349
6350 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
6351 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
6352 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
6353 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
6354 gnu_nat_target.
6355 (gnu_target): Delete.
6356 * gnu-nat.h (gnu_target): Delete.
6357 (gnu_nat_target): New class.
6358 * i386-gnu-nat.c (gnu_base_target): New.
6359 (i386_gnu_nat_target): New class.
6360 (the_i386_gnu_nat_target): New.
6361 (_initialize_i386gnu_nat): Adjust to C++ification.
6362
6363 2018-05-02 Pedro Alves <palves@redhat.com>
6364
6365 * bfd-target.c (target_bfd_xclose): Rename to ...
6366 (target_bfd_close): ... this.
6367 (target_bfd_reopen): Adjust.
6368 * target.c (target_close): Remove references to to_xclose.
6369 * target.h (target_ops::to_xclose): Delete.
6370 (target_ops::to_close): Update comments.
6371
6372 2018-05-02 Pedro Alves <palves@redhat.com>
6373
6374 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
6375 "linux-nat.h".
6376 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
6377 * inf-ptrace.c (inf_ptrace_register_u_offset)
6378 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6379 (inf_ptrace_store_register, inf_ptrace_store_registers)
6380 (inf_ptrace_trad_target): Move to ...
6381 * linux-nat-trad.c: ... this new file.
6382 * linux-nat-trad.h: New file.
6383 * linux-nat.c (linux_target_install_ops): Make extern.
6384 (linux_trad_target): Delete.
6385 * linux-nat.h (linux_trad_target): Delete declaration.
6386 (linux_target_install_ops): Declare.
6387 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
6388 "linux-nat.h".
6389
6390 2018-05-02 Pedro Alves <palves@redhat.com>
6391
6392 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6393 procfs_target/add_target here.
6394 * procfs.c (procfs_target): Make static.
6395 (_initialize_procfs): Call add_target here.
6396 * procfs.h (struct target_ops): Remove forward declaration.
6397 (procfs_target): Remove declaration.
6398 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
6399
6400 2018-05-02 Pedro Alves <palves@redhat.com>
6401
6402 * procfs.c (procfs_stopped_by_watchpoint)
6403 (procfs_insert_watchpoint, procfs_remove_watchpoint)
6404 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
6405 Forward declare.
6406 (procfs_use_watchpoints): Delete, move contents...
6407 (procfs_target): ... here.
6408 * procfs.h (procfs_use_watchpoints): Delete declaration.
6409 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6410 procfs_use_watchpoints.
6411 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
6412 procfs_use_watchpoints.
6413
6414 2018-05-02 Tom Tromey <tom@tromey.com>
6415
6416 PR python/20084:
6417 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
6418 and var_zuinteger_unlimited.
6419 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
6420 and PARAM_ZUINTEGER_UNLIMITED.
6421 (set_parameter_value): Handle var_zuinteger and
6422 var_zuinteger_unlimited.
6423 (add_setshow_generic): Likewise.
6424 (parmpy_init): Likewise.
6425
6426 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
6427
6428 PR rust/23124
6429 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
6430 pointer is not null before dereferencing it.
6431
6432 2018-04-30 Tom Tromey <tom@tromey.com>
6433
6434 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
6435 is_mi_like_p.
6436
6437 2018-04-30 Tom Tromey <tom@tromey.com>
6438
6439 * breakpoint.c (mention): Remove use of is_mi_like_p.
6440 (print_mention_ranged_breakpoint): Likewise.
6441 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
6442 of is_mi_like_p.
6443
6444 2018-04-30 Tom Tromey <tom@tromey.com>
6445
6446 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
6447
6448 2018-04-30 Tom Tromey <tom@tromey.com>
6449
6450 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
6451 (info_spu_event_command): Remove some uses of is_mi_like_p.
6452
6453 2018-04-30 Tom Tromey <tom@tromey.com>
6454
6455 * python/py-framefilter.c (py_print_single_arg)
6456 (enumerate_locals, py_print_args, py_print_frame): Remove some
6457 uses of is_mi_like_p.
6458
6459 2018-04-30 Tom Tromey <tom@tromey.com>
6460
6461 * ui-out.c: Update.
6462 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
6463 * ui-out.h (ui_out::is_mi_like_p): Now const.
6464 (ui_out::do_is_mi_like_p): Now const.
6465 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
6466
6467 2018-04-30 Tom Tromey <tom@tromey.com>
6468
6469 * varobj.c (varobj_set_visualizer): Use new_reference.
6470 * python/python.c (gdbpy_decode_line): Use new_reference.
6471 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
6472 new_reference.
6473
6474 2018-04-30 Tom Tromey <tom@tromey.com>
6475
6476 * varobj.c (install_new_value): Use new_reference.
6477 * value.h (value_incref): Return void. Swap intro comment with
6478 value_decref.
6479 * value.c (set_value_parent): Use new_reference.
6480 (value_incref): Return void. Update intro comment.
6481 (release_value): Use new_reference.
6482 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
6483
6484 2018-04-30 Tom Tromey <tom@tromey.com>
6485
6486 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
6487 * gdb_bfd.h (new_bfd_ref): Remove.
6488 (gdb_bfd_open): Update comment.
6489 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
6490 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
6491 (gdb_bfd_fdopenr): Use new_reference.
6492 * exec.c (exec_file_attach): Use new_reference.
6493
6494 2018-04-30 Tom Tromey <tom@tromey.com>
6495
6496 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
6497 method.
6498
6499 2018-04-30 Tom Tromey <tom@tromey.com>
6500
6501 * jit.c (jit_read_code_entry): Use type_align.
6502 * i386-tdep.c (i386_gdbarch_init): Don't call
6503 set_gdbarch_long_long_align_bit.
6504 * gdbarch.sh: Remove long_long_align_bit.
6505 * gdbarch.c, gdbarch.h: Rebuild.
6506 * arc-tdep.c (arc_type_align): New function.
6507 (arc_gdbarch_init): Use arc_type_align. Don't call
6508 set_gdbarch_long_long_align_bit.
6509
6510 2018-04-30 Tom Tromey <tom@tromey.com>
6511
6512 * rust-lang.c (rust_type_alignment): Remove.
6513 (rust_composite_type): Use type_align.
6514
6515 2018-04-30 Tom Tromey <tom@tromey.com>
6516
6517 * NEWS: Mention Type.align.
6518 * python/py-type.c (typy_get_alignof): New function.
6519 (type_object_getset): Add "alignof".
6520
6521 2018-04-30 Tom Tromey <tom@tromey.com>
6522
6523 PR exp/17095:
6524 * NEWS: Update.
6525 * std-operator.def (UNOP_ALIGNOF): New operator.
6526 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
6527 New.
6528 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
6529 * c-lang.c (c_op_print_tab): Add alignof.
6530 * c-exp.y (ALIGNOF): New token.
6531 (exp): Add "ALIGNOF" production.
6532 (ident_tokens): Add _Alignof and alignof.
6533
6534 2018-04-30 Tom Tromey <tom@tromey.com>
6535
6536 * i386-tdep.c (i386_type_align): New function.
6537 (i386_gdbarch_init): Update.
6538 * gdbarch.sh (type_align): New method.
6539 * gdbarch.c, gdbarch.h: Rebuild.
6540 * arch-utils.h (default_type_align): Declare.
6541 * arch-utils.c (default_type_align): New function.
6542 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
6543 (struct type) <align_log2>: New field.
6544 <instance_flags>: Now a bitfield.
6545 (TYPE_RAW_ALIGN): New macro.
6546 (type_align, type_raw_align, set_type_align): Declare.
6547 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
6548 functions.
6549 * dwarf2read.c (quirk_rust_enum): Set type alignment.
6550 (get_alignment, maybe_set_alignment): New functions.
6551 (read_structure_type, read_enumeration_type, read_array_type)
6552 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
6553 (read_subrange_type, read_base_type): Set type alignment.
6554
6555 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
6556
6557 * dwarf2read.c (read_index_from_section): Use bool.
6558
6559 2018-04-29 Fabian Groffen <grobian@gentoo.org>
6560
6561 PR gdb/22950
6562 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
6563 with #ifdef.
6564
6565 2018-04-29 John Reiser <jreiser@BitWagon.com>
6566
6567 PR build/22873
6568 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
6569 last step, and do it atomically.
6570
6571 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
6572
6573 * compile/compile-c-types.c (convert_int, convert_float):
6574 Update for C FE v1.
6575
6576 2018-04-27 Tom Tromey <tom@tromey.com>
6577
6578 PR rust/22545:
6579 * rust-lang.c (rust_inclusive_range_type_p): New function.
6580 (rust_range): Handle inclusive ranges.
6581 (rust_compute_range): Likewise.
6582 * rust-exp.y (struct rust_op) <inclusive>: New field.
6583 (DOTDOTEQ): New constant.
6584 (range_expr): Add "..=" productions.
6585 (operator_tokens): Add "..=" token.
6586 (ast_range): Add "inclusive" parameter.
6587 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
6588 ranges.
6589 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
6590 bounds values.
6591 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
6592 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
6593 Update comments.
6594 * expprint.c (print_subexp_standard): Handle new bounds values.
6595 (dump_subexp_body_standard): Likewise.
6596
6597 2018-04-27 Tom Tromey <tom@tromey.com>
6598
6599 * configure: Rebuild.
6600 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
6601 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
6602 "OVERRIDE".
6603 (class symbol_needs_eval_context): Likewise.
6604 * dwarf2read.c (mock_mapped_index::symbol_name_count)
6605 (mock_mapped_index::symbol_name_at): Use "override". Remove
6606 "virtual".
6607 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
6608 "override".
6609 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
6610 * aarch64-tdep.c (instruction_reader::read): Use "override".
6611 (instruction_reader_test::read): Likewise.
6612 * arm-tdep.c (instruction_reader::read): Use "override".
6613 (instruction_reader_thumb::read): Likewise.
6614
6615 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
6616
6617 PR remote/9665
6618 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
6619 instead of remote_send.
6620 (remote_send): Remove.
6621
6622 2018-04-26 Pedro Alves <palves@redhat.com>
6623
6624 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
6625 find_function_start_sal instead of find_pc_line.
6626
6627 2018-04-26 Pedro Alves <palves@redhat.com>
6628
6629 * breakpoint.c (set_breakpoint_location_function): Handle
6630 mst_data_gnu_ifunc.
6631 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
6632 * elfread.c (elf_symtab_read): Give data symbols with
6633 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
6634 (elf_rel_plt_read): Update comment.
6635 * linespec.c (convert_linespec_to_sals): Handle
6636 mst_data_gnu_ifunc.
6637 (minsym_found): Handle mst_data_gnu_ifunc.
6638 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
6639 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
6640 * parse.c (find_minsym_type_and_address): Handle
6641 mst_data_gnu_ifunc.
6642 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
6643 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
6644 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
6645 comment.
6646 <mst_data_gnu_ifunc>: New enumerator.
6647
6648 2018-04-26 Pedro Alves <palves@redhat.com>
6649
6650 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
6651 (lookup_minimal_symbol_by_pc_section): ... this. Replace
6652 'want_trampoline' parameter by a lookup_msym_prefer parameter.
6653 Handle it.
6654 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
6655 (lookup_minimal_symbol_by_pc): Adjust.
6656 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
6657 (lookup_solib_trampoline_symbol_by_pc): Adjust.
6658 * minsyms.h (lookup_msym_prefer): New enum.
6659 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
6660 parameter by a lookup_msym_prefer parameter.
6661
6662 2018-04-26 Pedro Alves <palves@redhat.com>
6663
6664 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
6665 ends in "@plt" instead of looking at the symbol's section.
6666
6667 2018-04-26 Pedro Alves <palves@redhat.com>
6668
6669 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
6670 all references.
6671 (find_pc_partial_function_gnu_ifunc): Rename to ...
6672 (find_pc_partial_function): ... this, and remove references to
6673 'is_gnu_ifunc_p'.
6674 (find_pc_partial_function): Delete old implementation.
6675 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
6676
6677 2018-04-26 Pedro Alves <palves@redhat.com>
6678
6679 * linespec.c (struct bound_minimal_symbol_search_key): New.
6680 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
6681 skip first line if we found a GNU ifunc minimal symbol by name.
6682 (compare_msymbols): Change parameters to work with a destructured
6683 lhs minsym.
6684 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
6685 functions.
6686
6687 2018-04-26 Pedro Alves <palves@redhat.com>
6688
6689 * breakpoint.c (set_breakpoint_location_function): Don't resolve
6690 ifunc targets here. Instead, if we have an ifunc minsym, use its
6691 address/name.
6692 (add_location_to_breakpoint): Store the minsym and the objfile in
6693 the breakpoint location.
6694 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
6695 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
6696 Record the minsym in the sal.
6697 * symtab.h (symtab_and_line) <msymbol>: New field.
6698
6699 2018-04-26 Pedro Alves <palves@redhat.com>
6700
6701 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
6702 unless we actually resolved the ifunc.
6703
6704 2018-04-26 Pedro Alves <palves@redhat.com>
6705
6706 * c-exp.y (variable production): Prefer ifunc minsyms over
6707 regular function symbols.
6708 * symtab.c (find_gnu_ifunc): New function.
6709 * minsyms.h (lookup_msym_prefer): New enum.
6710 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
6711 parameter by a lookup_msym_prefer parameter.
6712 * symtab.h (find_gnu_ifunc): New declaration.
6713
6714 2018-04-26 Pedro Alves <palves@redhat.com>
6715
6716 * blockframe.c (find_gnu_ifunc_target_type): New function.
6717 (find_function_type): New.
6718 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
6719 return a value with a memory address.
6720 (eval_call): For calls to GNU ifunc functions, try to find the
6721 type of the target function from the type that the resolver
6722 returns.
6723 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
6724 symbols.
6725 * infcall.c (find_function_return_type): Delete.
6726 (find_function_addr): Add 'function_type' parameter. For calls to
6727 GNU ifunc functions, try to find the type of the target function
6728 from the type that the resolver returns, and return it via
6729 FUNCTION_TYPE.
6730 (call_function_by_hand_dummy): Adjust to use the function type
6731 returned by find_function_addr.
6732 (find_function_addr): Add 'function_type' parameter and move
6733 description here.
6734 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
6735 declarations.
6736
6737 2018-04-26 Pedro Alves <palves@redhat.com>
6738
6739 * c-exp.y (variable production): Skip finding an alias for ifunc
6740 symbols.
6741
6742 2018-04-26 Pedro Alves <palves@redhat.com>
6743
6744 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
6745
6746 2018-04-25 Pedro Alves <palves@redhat.com>
6747
6748 * infcmd.c (kill_command): Print the pid as string, not the whole
6749 thread's ptid. Add comment. s/has been killed/killed/ in output
6750 message.
6751 * remote.c (remote_detach_1): Print the pid as string, not the
6752 whole thread's ptid.
6753
6754 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6755 Sergio Durigan Junior <sergiodj@redhat.com>
6756 Pedro Alves <palves@redhat.com>
6757
6758 * infcmd.c (kill_command): Print message when inferior has
6759 been killed.
6760 * inferior.c (print_inferior_events): Remove 'static'. Set as
6761 '1'.
6762 (add_inferior): Improve message printed when
6763 'print_inferior_events' is on.
6764 (exit_inferior): Remove message printed when
6765 'print_inferior_events' is on.
6766 (detach_inferior): Improve message printed when
6767 'print_inferior_events' is on.
6768 (initialize_inferiors): Use 'add_inferior_silent' to set
6769 'current_inferior_'.
6770 * inferior.h (print_inferior_events): Declare here as
6771 'extern'.
6772 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
6773 '[Detaching...]' messages when 'print_inferior_events' is on.
6774 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
6775 as prefix/suffix for messages. Remove periods. Fix erroneous
6776 'Detaching after fork from child...', replace it by '... from
6777 parent...'.
6778 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
6779 prefix/suffix when printing 'Detaching...' messages. Print
6780 them when 'print_inferior_events' is on.
6781 * remote.c (remote_detach_1): Print message when detaching
6782 from inferior and '!is_fork_parent'.
6783
6784 2018-04-24 Tom Tromey <tom@tromey.com>
6785
6786 * cli-out.h: Reindent.
6787
6788 2018-04-24 Tom Tromey <tom@tromey.com>
6789
6790 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
6791 (cli_ui_out::do_field_string): Use fputs_filtered.
6792 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
6793
6794 2018-04-23 Tom Tromey <tom@tromey.com>
6795
6796 * guile/scm-frame.c (gdbscm_frame_read_var): Use
6797 gdb::unique_xmalloc_ptr.
6798
6799 2018-04-23 Tom Tromey <tom@tromey.com>
6800
6801 * configure: Rebuild.
6802
6803 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
6804
6805 PR gdb/23095
6806 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
6807 prepare_for_testing. Set normal_bp to r_debug_state if target
6808 is bsd.
6809
6810 2018-04-21 Pedro Alves <palves@redhat.com>
6811 Rajendra SY <rajendra.sy@gmail.com>
6812
6813 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
6814 * remote.c (extended_remote_attach): In all-stop mode, mark the
6815 thread as executing.
6816
6817 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6818
6819 * thread.c (thread_apply_all_command): Fix comment.
6820 (thread_command): Fix comment.
6821
6822 2018-04-10 Alan Hayward <alan.hayward@arm.com>
6823
6824 * common/tdesc.h (tdesc_create_feature): Remove xml filename
6825 parameter.
6826 * features/aarch64-core.c (create_feature_aarch64_core):
6827 Regenerate.
6828 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
6829 Likewise.
6830 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
6831 Likewise.
6832 * features/i386/32bit-avx512.c
6833 (create_feature_i386_32bit_avx512): Likewise.
6834 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
6835 Likewise.
6836 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
6837 Likewise.
6838 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
6839 Likewise.
6840 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
6841 Likewise.
6842 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
6843 Likewise.
6844 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
6845 Likewise.
6846 * features/i386/64bit-avx512.c
6847 (create_feature_i386_64bit_avx512): Likewise.
6848 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
6849 Likewise.
6850 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
6851 Likewise.
6852 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
6853 Likewise.
6854 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
6855 Likewise.
6856 * features/i386/64bit-segments.c
6857 (create_feature_i386_64bit_segments): Likewise.
6858 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
6859 Likewise.
6860 * features/i386/x32-core.c
6861 (create_feature_i386_x32_core): Likewise.
6862 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
6863 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
6864 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
6865 * target-descriptions.c: In generated code, don't pass xml
6866 filename.
6867
6868 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6869
6870 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
6871 (print_xml_feature::visit_post): Likewise.
6872 (print_xml_feature::visit): Likewise.
6873 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
6874 (print_xml_feature): Add new class.
6875 * regformats/regdat.sh: Null xmltarget on feature targets.
6876 * target-descriptions.c (struct target_desc): Add xmltarget.
6877 (maintenance_check_tdesc_xml_convert): Add unittest function.
6878 (tdesc_get_features_xml): Add function to get xml.
6879 (maintenance_check_xml_descriptions): Test xml generation.
6880 * xml-tdesc.c (string_read_description_xml): Add function.
6881 * xml-tdesc.h (string_read_description_xml): Add declaration.
6882
6883 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6884
6885 * features/Makefile: Add feature marker to targets with new style
6886 target descriptions.
6887 * regformats/aarch64.dat: Regenerate.
6888 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
6889 * regformats/i386/amd64-avx-linux.dat: Likewise.
6890 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
6891 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
6892 * regformats/i386/amd64-linux.dat: Likewise.
6893 * regformats/i386/amd64-mpx-linux.dat: Likewise.
6894 * regformats/i386/amd64.dat: Likewise.
6895 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
6896 * regformats/i386/i386-avx-linux.dat: Likewise.
6897 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
6898 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
6899 * regformats/i386/i386-linux.dat: Likewise.
6900 * regformats/i386/i386-mmx-linux.dat: Likewise.
6901 * regformats/i386/i386-mpx-linux.dat: Likewise.
6902 * regformats/i386/i386.dat: Likewise.
6903 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
6904 * regformats/i386/x32-avx-linux.dat: Likewise.
6905 * regformats/i386/x32-linux.dat: Likewise.
6906 * regformats/tic6x-c62x-linux.dat: Likewise.
6907 * regformats/tic6x-c64x-linux.dat: Likewise.
6908 * regformats/tic6x-c64xp-linux.dat: Likewise.
6909 * regformats/regdat.sh: Parse feature marker.
6910
6911 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6912
6913 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
6914 (tdesc_osabi_name): Likewise.
6915 * target-descriptions.c (tdesc_architecture_name): Add new
6916 function.
6917 (tdesc_osabi_name): Likewise.
6918
6919 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6920
6921 * common/tdesc.c (tdesc_predefined_type): Move to here.
6922 (tdesc_named_type): Likewise.
6923 (tdesc_create_vector): Likewise.
6924 (tdesc_create_struct): Likewise.
6925 (tdesc_set_struct_size): Likewise.
6926 (tdesc_create_union): Likewise.
6927 (tdesc_create_flags): Likewise.
6928 (tdesc_create_enum): Likewise.
6929 (tdesc_add_field): Likewise.
6930 (tdesc_add_typed_bitfield): Likewise.
6931 (tdesc_add_bitfield): Likewise.
6932 (tdesc_add_flag): Likewise.
6933 (tdesc_add_enum_value): Likewise.
6934 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
6935 (struct tdesc_type_vector): Likewise.
6936 (struct tdesc_type_field): Likewise.
6937 (struct tdesc_type_with_fields): Likewise.
6938 (tdesc_create_enum): Add declaration.
6939 (tdesc_add_typed_bitfield): Likewise.
6940 (tdesc_add_enum_value): Likewise.
6941 * target-descriptions.c (tdesc_type_field): Move from here.
6942 (tdesc_type_builtin): Likewise.
6943 (tdesc_type_vector): Likewise.
6944 (tdesc_type_with_fields): Likewise.
6945 (tdesc_predefined_types): Likewise.
6946 (tdesc_named_type): Likewise.
6947 (tdesc_create_vector): Likewise.
6948 (tdesc_create_struct): Likewise.
6949 (tdesc_set_struct_size): Likewise.
6950 (tdesc_create_union): Likewise.
6951 (tdesc_create_flags): Likewise.
6952 (tdesc_create_enum): Likewise.
6953 (tdesc_add_field): Likewise.
6954 (tdesc_add_typed_bitfield): Likewise.
6955 (tdesc_add_bitfield): Likewise.
6956 (tdesc_add_flag): Likewise.
6957 (tdesc_add_enum_value): Likewise.
6958 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
6959 (tdesc_add_typed_bitfield): Likewise.
6960 (tdesc_add_enum_value): Likewise.
6961
6962 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6963
6964 * common/tdesc.c (tdesc_feature::accept): Move to here.
6965 (tdesc_feature::operator==): Likewise.
6966 (tdesc_create_reg): Likewise.
6967 * common/tdesc.h (tdesc_type_kind): Likewise.
6968 (struct tdesc_type): Likewise.
6969 (struct tdesc_feature): Likewise.
6970 * regformats/regdat.sh: Create a feature.
6971 * target-descriptions.c (tdesc_type_kind): Move from here.
6972 (tdesc_type): Likewise.
6973 (tdesc_type_up): Likewise.
6974 (tdesc_feature): Likewise.
6975 (tdesc_create_reg): Likewise.
6976
6977 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6978
6979 * Makefile.in: Add arch/tdesc.c
6980 * common/tdesc.c: New file.
6981 * common/tdesc.h (tdesc_element_visitor): Move to here.
6982 (tdesc_element): Likewise.
6983 (tdesc_reg): Likewise.
6984 (tdesc_reg_up): Likewise.
6985 * regformats/regdef.h (reg): Add offset to constructors.
6986 * target-descriptions.c (tdesc_element_visitor): Move from here.
6987 (tdesc_element): Likewise.
6988 (tdesc_reg): Likewise.
6989 (tdesc_reg_up): Likewise.
6990
6991 2018-04-17 Tom Tromey <tom@tromey.com>
6992
6993 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
6994 discriminant field.
6995
6996 2018-04-17 Tom Tromey <tom@tromey.com>
6997
6998 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
6999
7000 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
7001
7002 * symtab.c (print_symbol_info): Skip printing filename and line
7003 number when `last' is NULL.
7004 (symtab_symbol_info): Use empty string instead of NULL for first
7005 invocation of print_symbol_info.
7006 (rbreak_command): Pass NULL to `last' parameter of
7007 print_symbol_info.
7008
7009 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
7010
7011 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
7012 instead of nullptr.
7013
7014 2018-04-16 Pedro Alves <palves@redhat.com>
7015
7016 * MAINTAINERS (sh): Remove.
7017 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
7018 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
7019 (ALLDEPFILES): Remove sh64-tdep.c.
7020 * NEWS: Mentions that support for SH-5/SH64 is removed.
7021 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
7022 (sh*-*-openbsd*): Ditto.
7023 (sh64-*-elf*): Remove.
7024 (sh*): Remove.
7025 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
7026 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
7027 * sh-tdep.c: No longer include "sh64-tdep.h".
7028 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
7029 * sh64-tdep.c, sh64-tdep.h: Remove files.
7030
7031 2018-04-16 Pedro Alves <palves@redhat.com>
7032
7033 * MAINTAINERS: Remove m88k.
7034 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
7035 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
7036 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
7037 * NEWS: Mention that support for m88k was removed.
7038 * configure.host (m88*-*-*): Remove support.
7039 * configure.nat (m88k-*-*): Remove support.
7040 * configure.tgt (m88*-*-openbsd*): Remove.
7041 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
7042
7043 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
7044
7045 * configure.tgt (x86_tobjs): New variable.
7046 (amd64_tobjs, i386_tobjs): Use it.
7047
7048 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7049
7050 * symtab.c (print_symbol_info): Precede the symbol definition by
7051 the line number when available.
7052 * NEWS: Advertise this enhancement.
7053
7054 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7055
7056 * NEWS (New options): announce set/show record btrace cpu.
7057 * btrace.c: Include record-btrace.h.
7058 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
7059 the vendor is unknown.
7060 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
7061 Maybe overwrite the btrace configuration's cpu.
7062 (btrace_compute_ftrace): Add cpu parameter. Update callers.
7063 (btrace_fetch): Add cpu parameter. Update callers.
7064 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
7065 Maybe overwrite the btrace configuration's cpu. Skip enabling
7066 errata workarounds if the vendor is unknown.
7067 * python/py-record-btrace.c: Include record-btrace.h.
7068 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
7069 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
7070 * record-btrace.c (record_btrace_cpu_state_kind): New.
7071 (record_btrace_cpu): New.
7072 (set_record_btrace_cpu_cmdlist): New.
7073 (record_btrace_get_cpu): New.
7074 (require_btrace_thread, record_btrace_info)
7075 (record_btrace_resume_thread): Call record_btrace_get_cpu.
7076 (cmd_set_record_btrace_cpu_none): New.
7077 (cmd_set_record_btrace_cpu_auto): New.
7078 (cmd_set_record_btrace_cpu): New.
7079 (cmd_show_record_btrace_cpu): New.
7080 (_initialize_record_btrace): Initialize set/show record btrace cpu
7081 commands.
7082 * record-btrace.h (record_btrace_get_cpu): New.
7083
7084 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7085
7086 * record.c (set_record_command): Fix typo in message.
7087
7088 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7089
7090 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
7091
7092 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7093
7094 * infrun.c (process_event_stop_test): Call
7095 gdbarch_in_indirect_branch_thunk.
7096 * gdbarch.sh (in_indirect_branch_thunk): New.
7097 * gdbarch.c: Regenerated.
7098 * gdbarch.h: Regenerated.
7099 * x86-tdep.h: New.
7100 * x86-tdep.c: New.
7101 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
7102 (HFILES_NO_SRCDIR): Add x86-tdep.h.
7103 (ALLDEPFILES): Add x86-tdep.c.
7104 * arch-utils.h (default_in_indirect_branch_thunk): New.
7105 * arch-utils.c (default_in_indirect_branch_thunk): New.
7106 * i386-tdep: Include x86-tdep.h.
7107 (i386_in_indirect_branch_thunk): New.
7108 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
7109 function.
7110 * amd64-tdep: Include x86-tdep.h.
7111 (amd64_in_indirect_branch_thunk): New.
7112 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
7113
7114 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
7115
7116 PR gdb/23053
7117 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
7118 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
7119 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
7120 regression.
7121
7122 2018-04-12 Tom Tromey <tom@tromey.com>
7123
7124 * rust-lang.c (rust_print_struct_def): Remove univariant code.
7125 (rust_evaluate_subexp): Likewise.
7126
7127 2018-04-12 Pedro Alves <palves@redhat.com>
7128
7129 * procfs.c (procfs_detach): Make forward declaration's prototype
7130 match definition's protototype.
7131 (proc_get_LDT_entry): Remove stale do_cleanups call.
7132
7133 2018-04-12 Pedro Alves <palves@redhat.com>
7134
7135 * target.h (target_ops::to_has_exited): Delete.
7136 (target_has_exited): Delete.
7137 * target-delegates.c: Regenerate.
7138
7139 2018-04-11 Pedro Alves <palves@redhat.com>
7140
7141 * target.c (fileio_fh_t::t): Add comment.
7142 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7143 (target_fileio_close): Handle a NULL target.
7144 (invalidate_fileio_fh): New.
7145 (target_close): Call it.
7146 * remote.c (remote_hostio_send_command): No longer check whether
7147 remote_desc is open.
7148
7149 2018-04-11 Pedro Alves <palves@redhat.com>
7150
7151 * target.c (fileio_fh_t): Make it a named struct instead of a
7152 typedef.
7153 (fileio_fh_t::is_closed): New method.
7154 (DEF_VEC_O (fileio_fh_t)): Remove.
7155 (fileio_fhandles): Now a std::vector.
7156 (is_closed_fileio_fh): Delete.
7157 (acquire_fileio_fd): Adjust. Rename parameters.
7158 (release_fileio_fd): Adjust.
7159 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
7160 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7161 (target_fileio_close): Adjust.
7162
7163 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
7164
7165 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
7166 index.
7167
7168 2018-04-10 Pedro Alves <palves@redhat.com>
7169
7170 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
7171 (scoped_finish_thread_state): New class.
7172 * infcmd.c (run_command_1): Use it instead of finish_thread_state
7173 cleanup.
7174 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
7175 (fetch_inferior_event, normal_stop): Likewise.
7176 * thread.c (finish_thread_state_cleanup): Delete.
7177
7178 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7179 Pedro Alves <palves@redhat.com>
7180
7181 * value.c: Include "selftest.h" and "common/array-view.h".
7182 (struct range) <operator ==>: New.
7183 (test_ranges_contain): New.
7184 (check_ranges_vector): New.
7185 (test_insert_into_bit_range_vector): New.
7186 (_initialize_values): Register selftests.
7187 * common/array-view.h (operator==, operator!=): New.
7188
7189 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7190
7191 * common/gdb_vecs.h (unordered_remove): Add overload that takes
7192 an iterator.
7193 * inline-frame.c: Include <algorithm>.
7194 (struct inline_state): Add constructor.
7195 (inline_state_s): Remove.
7196 (DEF_VEC_O(inline_state_s)): Remove.
7197 (inline_states): Change type to std::vector.
7198 (find_inline_frame_state): Adjust to std::vector.
7199 (allocate_inline_frame_state): Remove.
7200 (clear_inline_frame_state): Adjust to std::vector.
7201 (skip_inline_frames): Adjust to std::vector.
7202
7203 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7204
7205 * tracepoint.h (struct trace_state_variable): Add constructor.
7206 <name>: Change type to std::string.
7207 * tracepoint.c (tsv_s): Remove.
7208 (DEF_VEC_O(tsv_s)): Remove.
7209 (tvariables): Change to std::vector.
7210 (create_trace_state_variable): Adjust to std::vector.
7211 (find_trace_state_variable): Likewise.
7212 (find_trace_state_variable_by_number): Likewise.
7213 (delete_trace_state_variable): Likewise.
7214 (trace_variable_command): Adjust to std::string.
7215 (delete_trace_variable_command): Likewise.
7216 (tvariables_info_1): Adjust to std::vector.
7217 (save_trace_state_variables): Likewise.
7218 (start_tracing): Likewise.
7219 (merge_uploaded_trace_state_variables): Adjust to std::vector
7220 and std::string.
7221 * target.h (struct target_ops)
7222 <to_download_trace_state_variable>: Pass reference to
7223 trace_state_variable.
7224 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
7225 * target-delegates.c: Re-generate.
7226 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
7227 (mi_tsv_deleted): Likewise.
7228 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
7229 * remote.c (remote_download_trace_state_variable): Change
7230 pointer to reference and adjust.
7231 * make-target-delegates (parse_argtypes): Handle references.
7232 (write_function_header): Likewise.
7233 (munge_type): Likewise.
7234
7235 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7236
7237 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7238 string_view-selftests.c.
7239 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
7240 testsuite.
7241 * unittests/basic_string_view/cons/char/1.cc: Likewise.
7242 * unittests/basic_string_view/cons/char/2.cc: Likewise.
7243 * unittests/basic_string_view/cons/char/3.cc: Likewise.
7244 * unittests/basic_string_view/element_access/char/1.cc:
7245 Likewise.
7246 * unittests/basic_string_view/element_access/char/empty.cc:
7247 Likewise.
7248 * unittests/basic_string_view/element_access/char/front_back.cc:
7249 Likewise.
7250 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
7251 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
7252 Likewise.
7253 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
7254 Likewise.
7255 * unittests/basic_string_view/modifiers/swap/char/1.cc:
7256 Likewise.
7257 * unittests/basic_string_view/operations/compare/char/1.cc:
7258 Likewise.
7259 * unittests/basic_string_view/operations/compare/char/13650.cc:
7260 Likewise.
7261 * unittests/basic_string_view/operations/copy/char/1.cc:
7262 Likewise.
7263 * unittests/basic_string_view/operations/data/char/1.cc:
7264 Likewise.
7265 * unittests/basic_string_view/operations/find/char/1.cc:
7266 Likewise.
7267 * unittests/basic_string_view/operations/find/char/2.cc:
7268 Likewise.
7269 * unittests/basic_string_view/operations/find/char/3.cc:
7270 Likewise.
7271 * unittests/basic_string_view/operations/find/char/4.cc:
7272 Likewise.
7273 * unittests/basic_string_view/operations/rfind/char/1.cc:
7274 Likewise.
7275 * unittests/basic_string_view/operations/rfind/char/2.cc:
7276 Likewise.
7277 * unittests/basic_string_view/operations/rfind/char/3.cc:
7278 Likewise.
7279 * unittests/basic_string_view/operations/substr/char/1.cc:
7280 Likewise.
7281 * unittests/basic_string_view/operators/char/2.cc: Likewise.
7282 * unittests/string_view-selftests.c: New file.
7283
7284 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7285
7286 * unittests/basic_string_view/capacity/1.cc: New file.
7287 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
7288 * unittests/basic_string_view/cons/char/1.cc: New file.
7289 * unittests/basic_string_view/cons/char/2.cc: New file.
7290 * unittests/basic_string_view/cons/char/3.cc: New file.
7291 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
7292 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
7293 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
7294 * unittests/basic_string_view/element_access/char/1.cc: New file.
7295 * unittests/basic_string_view/element_access/char/2.cc: New file.
7296 * unittests/basic_string_view/element_access/char/empty.cc: New file.
7297 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
7298 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
7299 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
7300 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
7301 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
7302 * unittests/basic_string_view/include.cc: New file.
7303 * unittests/basic_string_view/inserters/char/1.cc: New file.
7304 * unittests/basic_string_view/inserters/char/2.cc: New file.
7305 * unittests/basic_string_view/inserters/char/3.cc: New file.
7306 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
7307 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
7308 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
7309 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
7310 * unittests/basic_string_view/literals/types.cc: New file.
7311 * unittests/basic_string_view/literals/values.cc: New file.
7312 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
7313 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
7314 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
7315 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
7316 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
7317 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
7318 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
7319 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
7320 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
7321 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
7322 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
7323 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
7324 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
7325 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
7326 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
7327 * unittests/basic_string_view/operations/data/char/1.cc: New file.
7328 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
7329 * unittests/basic_string_view/operations/find/char/1.cc: New file.
7330 * unittests/basic_string_view/operations/find/char/2.cc: New file.
7331 * unittests/basic_string_view/operations/find/char/3.cc: New file.
7332 * unittests/basic_string_view/operations/find/char/4.cc: New file.
7333 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
7334 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
7335 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
7336 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
7337 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
7338 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
7339 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
7340 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
7341 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
7342 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
7343 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
7344 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
7345 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
7346 * unittests/basic_string_view/operators/char/2.cc: New file.
7347 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
7348 * unittests/basic_string_view/range_access/char/1.cc: New file.
7349 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
7350 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
7351 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
7352 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
7353 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
7354 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
7355 * unittests/basic_string_view/requirements/typedefs.cc: New file.
7356 * unittests/basic_string_view/typedefs.cc: New file.
7357 * unittests/basic_string_view/types/1.cc: New file.
7358
7359 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7360
7361 * common/gdb_string_view.h: Remove libstdc++ implementation
7362 details, adjust to gdb reality.
7363 * common/gdb_string_view.tcc: Likewise.
7364 * cli/cli-script.c (struct string_view): Remove.
7365 (user_args) <m_args>: Change element type to gdb::string_view.
7366 (user_args::insert_args): Adjust.
7367
7368 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7369
7370 * common/gdb_string_view.h: New file.
7371 * common/gdb_string_view.tcc: New file.
7372
7373 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7374
7375 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
7376 * configure: Re-generate.
7377
7378 2018-04-09 Pedro Alves <palves@redhat.com>
7379
7380 * gdbarch.sh: Include "observable.h" instead of "observer.h".
7381 (set_target_gdbarch): Call
7382 gdb::observers::architecture_changed.notify instead of
7383 observer_notify_architecture_changed.
7384
7385 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7386
7387 * tracepoint.c (struct current_traceframe_cleanup): Remove.
7388 (do_restore_current_traceframe_cleanup): Remove.
7389 (restore_current_traceframe_cleanup_dtor): Remove.
7390 (make_cleanup_restore_current_traceframe): Remove.
7391 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
7392 New.
7393 * tracepoint.h (struct scoped_restore_current_traceframe): New.
7394 * infrun.c (fetch_inferior_event): Use
7395 scoped_restore_current_traceframe.
7396
7397 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7398
7399 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
7400 Remove.
7401 <n_allocated_type_units>: Remove.
7402 <all_type_units>: Change to std::vector.
7403 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7404 to std::vector change.
7405 (dwarf2_per_objfile::get_cutu): Likewise.
7406 (dwarf2_per_objfile::get_tu): Likewise.
7407 (create_signatured_type_table_from_index): Likewise.
7408 (create_signatured_type_table_from_debug_names): Likewise.
7409 (dw2_symtab_iter_next): Likewise.
7410 (dw2_print_stats): Likewise.
7411 (dw2_expand_all_symtabs): Likewise.
7412 (dw2_expand_marked_cus): Likewise.
7413 (dw2_debug_names_iterator::next): Likewise.
7414 (dwarf2_initialize_objfile): Likewise.
7415 (add_signatured_type_cu_to_table): Likewise.
7416 (create_all_type_units): Likewise.
7417 (add_type_unit): Likewise.
7418 (struct tu_abbrev_offset): Add constructor.
7419 (build_type_psymtabs_1): Adjust to std::vector change.
7420 (print_tu_stats): Likewise.
7421 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7422 (write_debug_names): Likewise.
7423
7424 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7425
7426 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
7427 Make an std::vector.
7428 <n_comp_units>: Remove.
7429 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7430 to std::vector change.
7431 (dwarf2_per_objfile::get_cutu): Likewise.
7432 (dwarf2_per_objfile::get_cu): Likewise.
7433 (create_cus_from_index): Likewise.
7434 (create_addrmap_from_index): Likewise.
7435 (create_addrmap_from_aranges): Likewise.
7436 (dwarf2_read_index): Likewise.
7437 (dw2_find_last_source_symtab): Likewise.
7438 (dw2_map_symtabs_matching_filename): Likewise.
7439 (dw2_symtab_iter_next): Likewise.
7440 (dw2_print_stats): Likewise.
7441 (dw2_expand_all_symtabs): Likewise.
7442 (dw2_expand_symtabs_with_fullname): Likewise.
7443 (dw2_expand_marked_cus): Likewise.
7444 (dw2_map_symbol_filenames): Likewise.
7445 (create_cus_from_debug_names): Likewise.
7446 (dwarf2_read_debug_names): Likewise.
7447 (dw2_debug_names_iterator::next): Likewise.
7448 (dwarf2_initialize_objfile): Likewise.
7449 (set_partial_user): Likewise.
7450 (dwarf2_build_psymtabs_hard): Likewise.
7451 (read_comp_units_from_section): Remove arguments, adjust to
7452 std::vector change.
7453 (create_all_comp_units): Adjust to std::vector and
7454 read_comp_units_from_section changes.
7455 (dwarf2_find_containing_comp_unit): Adjust to std::vector
7456 change.
7457 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7458 (psyms_seen_size): Likewise.
7459 (write_gdbindex): Likewise.
7460 (write_debug_names): Likewise.
7461
7462 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7463
7464 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
7465 with dwarf2_per_objfile.
7466 (create_cus_from_index): Likewise.
7467 (create_signatured_type_table_from_index): Likewise.
7468 (dwarf2_read_index): Likewise.
7469 (dwarf2_initialize_objfile): Likewise.
7470 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
7471 per_cu rather than get_dwarf2_per_objfile.
7472
7473 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7474
7475 * dwarf2read.h (struct signatured_type): Forward declare.
7476 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
7477 New methods.
7478 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
7479 (dw2_get_cutu): ...this.
7480 (dwarf2_per_objfile::get_cu): Rename from...
7481 (dw2_get_cu): ...this.
7482 (dwarf2_per_objfile::get_tu): New.
7483 (create_addrmap_from_index): Adjust.
7484 (create_addrmap_from_aranges): Adjust.
7485 (dw2_find_last_source_symtab): Adjust.
7486 (dw2_map_symtabs_matching_filename): Adjust.
7487 (dw2_symtab_iter_next): Adjust.
7488 (dw2_print_stats): Adjust.
7489 (dw2_expand_all_symtabs): Adjust.
7490 (dw2_expand_symtabs_with_fullname): Adjust.
7491 (dw2_expand_marked_cus): Adjust.
7492 (dw_expand_symtabs_matching_file_matcher): Adjust.
7493 (dw2_map_symbol_filenames): Adjust.
7494 (dw2_debug_names_iterator::next): Adjust.
7495 (dwarf2_initialize_objfile): Adjust.
7496 (set_partial_user): Adjust.
7497 (dwarf2_build_psymtabs_hard): Adjust.
7498
7499 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7500
7501 * dwarf2read.c (create_signatured_type_table_from_debug_names):
7502 Remove unused variables.
7503 (dw2_map_symtabs_matching_filename): Likewise.
7504 (dwarf2_record_block_ranges): Likewise.
7505 (dwarf2_read_addr_index): Likewise.
7506 (follow_die_offset): Likewise.
7507
7508 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7509
7510 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
7511 to symbol_file_add_main.
7512
7513 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7514
7515 PR mi/22299
7516 * mi/mi-console.c (do_fputc_async_safe): New.
7517 (mi_console_file::write_async_safe): New.
7518 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
7519 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
7520 New.
7521 * ui-file.c (ui_file::putstrn): Adjust call to
7522 fputstrn_unfiltered.
7523 * utils.c (printchar): Replace do_fputs and do_fprintf
7524 parameters by do_fputc.
7525 (fputstr_filtered): Adjust call to printchar.
7526 (fputstr_unfiltered): Likewise.
7527 (fputstrn_filtered): Likewise.
7528 (fputstrn_unfiltered): Add do_fputc parameter, pass to
7529 printchar.
7530 * utils.h (do_fputc_ftype): New typedef.
7531 (fputstrn_unfiltered): Add do_fputc parameter.
7532
7533 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7534
7535 * regformats/i386/i386-avx.dat: Remove.
7536
7537 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7538
7539 PR gdb/22979
7540 * amd64-tdep.c (amd64_none_init_abi): New function.
7541 (amd64_x32_none_init_abi): New function.
7542 (_initialize_amd64_tdep): Register handlers for x86-64 and
7543 x64_32 with GDB_OSABI_NONE.
7544 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
7545 GDB_OSABI_NONE osabi.
7546
7547 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7548
7549 PR gdb/22980
7550 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
7551 GDB_OSABI_NONE.
7552 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
7553 * osabi.c (gdb_osabi_names): Add "unknown" entry.
7554
7555 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7556
7557 * common/byte-vector.h (char_vector): New type.
7558 * target.h (target_read_alloc): Return
7559 gdb::optional<byte_vector>.
7560 (target_read_stralloc): Return gdb::optional<char_vector>.
7561 (target_get_osdata): Return gdb::optional<char_vector>.
7562 * target.c (target_read_alloc_1): Templatize. Replacement
7563 manual memory management with vector.
7564 (target_read_alloc): Change return type, adjust.
7565 (target_read_stralloc): Change return type, adjust.
7566 (target_get_osdata): Change return type, adjust.
7567 * auxv.c (struct auxv_info) <length>: Remove.
7568 <data>: Change type to gdb::optional<byte_vector>.
7569 (auxv_inferior_data_cleanup): Free auxv_info with delete.
7570 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
7571 (target_auxv_search): Adjust.
7572 (fprint_target_auxv): Adjust.
7573 * avr-tdep.c (avr_io_reg_read_command): Adjust.
7574 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
7575 (linux_make_corefile_notes): Adjust.
7576 * osdata.c (get_osdata): Adjust.
7577 * remote.c (remote_get_threads_with_qxfer): Adjust.
7578 (remote_memory_map): Adjust.
7579 (remote_traceframe_info): Adjust.
7580 (btrace_read_config): Adjust.
7581 (remote_read_btrace): Adjust.
7582 (remote_pid_to_exec_file): Adjust.
7583 * solib-aix.c (solib_aix_get_library_list): Adjust.
7584 * solib-dsbt.c (decode_loadmap): Don't free buf.
7585 (dsbt_get_initial_loadmaps): Adjust.
7586 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
7587 * solib-target.c (solib_target_current_sos): Adjust.
7588 * tracepoint.c (sdata_make_value): Adjust.
7589 * xml-support.c (xinclude_start_include): Adjust.
7590 (xml_fetch_content_from_file): Adjust.
7591 * xml-support.h (xml_fetch_another): Change return type.
7592 (xml_fetch_content_from_file): Change return type.
7593 * xml-syscall.c (xml_init_syscalls_info): Adjust.
7594 * xml-tdesc.c (file_read_description_xml): Adjust.
7595 (fetch_available_features_from_target): Change return type.
7596 (target_fetch_description_xml): Adjust.
7597 (target_read_description_xml): Adjust.
7598
7599 2018-04-06 Tom Tromey <tom@tromey.com>
7600
7601 * value.c (~value): Update.
7602 (struct value) <contents>: Now unique_xmalloc_ptr.
7603 (value_contents_bits_eq, allocate_value_contents)
7604 (value_contents_raw, value_contents_all_raw)
7605 (value_contents_for_printing, value_contents_for_printing_const)
7606 (set_value_enclosing_type): Update.
7607
7608 2018-04-06 Tom Tromey <tom@tromey.com>
7609
7610 * value.c (range_s): Remove typedef, VEC.
7611 (struct range): Add operator<.
7612 (range_lessthan): Remove.
7613 (ranges_contain): Change type.
7614 (~value): Update.
7615 (struct value) <unavailable, optimized_out>: Now std::vector.
7616 (value_entirely_available)
7617 (value_entirely_covered_by_range_vector)
7618 (value_entirely_unavailable, value_entirely_optimized_out):
7619 Update.
7620 (insert_into_bit_range_vector): Change argument type.
7621 (find_first_range_overlap): Likewise.
7622 (struct ranges_and_idx, value_contents_bits_eq)
7623 (require_not_optimized_out, require_available): Update.
7624 (ranges_copy_adjusted): Change argument types.
7625 (value_optimized_out, value_copy, value_fetch_lazy): Update.
7626
7627 2018-04-06 Tom Tromey <tom@tromey.com>
7628
7629 * value.c (~value): Update.
7630 (struct value) <parent>: Now a value_ref_ptr.
7631 (value_parent, set_value_parent, value_address, value_copy):
7632 Update.
7633
7634 2018-04-06 Tom Tromey <tom@tromey.com>
7635
7636 * value.c (struct value): Add constructor, destructor, and member
7637 initializers.
7638 (allocate_value_lazy, value_decref): Update.
7639
7640 2018-04-06 Tom Tromey <tom@tromey.com>
7641
7642 * value.c (struct value) <released, next>: Remove.
7643 (all_values): Now a std::vector.
7644 (allocate_value_lazy): Update.
7645 (value_next): Remove.
7646 (value_mark, value_free_to_mark, release_value)
7647 (value_release_to_mark): Update.
7648
7649 2018-04-06 Tom Tromey <tom@tromey.com>
7650
7651 * value.h (fetch_subexp_value, value_release_to_mark): Update.
7652 (free_value_chain): Remove.
7653 * value.c (free_value_chain): Remove.
7654 (value_release_to_mark): Return a std::vector.
7655 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
7656 std::vector.
7657 (check_condition): Update.
7658 * eval.c (fetch_subexp_value): Change "val_chain" to a
7659 std::vector.
7660 * breakpoint.c (update_watchpoint): Update.
7661 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
7662
7663 2018-04-06 Tom Tromey <tom@tromey.com>
7664
7665 * value.h (free_all_values): Remove.
7666 * value.c (free_all_values): Remove.
7667
7668 2018-04-06 Tom Tromey <tom@tromey.com>
7669
7670 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
7671 (value_history_chain, value_history_count): Remove.
7672 (value_history): New global.
7673 (record_latest_value, access_value_history, show_values)
7674 (preserve_values): Update.
7675
7676 2018-04-06 Tom Tromey <tom@tromey.com>
7677
7678 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
7679 * varobj.c (varobj_set_display_format, varobj_set_value)
7680 (install_default_visualizer, construct_visualizer)
7681 (install_new_value, ~varobj, varobj_get_value_type)
7682 (my_value_of_variable, varobj_editable_p): Update.
7683 * c-varobj.c (c_describe_child, c_value_of_variable)
7684 (cplus_number_of_children, cplus_describe_child): Update.
7685 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
7686 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
7687 (ada_value_of_variable, ada_value_is_changeable_p): Update.
7688
7689 2018-04-06 Tom Tromey <tom@tromey.com>
7690
7691 * printcmd.c (last_examine_address): Change type to
7692 value_ref_ptr.
7693 (do_examine, x_command): Update.
7694
7695 2018-04-06 Tom Tromey <tom@tromey.com>
7696
7697 * value.c (release_value): Update.
7698 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
7699 (struct bpstats) <val>: Now a value_ref_ptr.
7700 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7701 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7702 (~watchpoint, print_it_watchpoint, watch_command_1)
7703 (invalidate_bp_value_on_memory_change): Update.
7704
7705 2018-04-06 Tom Tromey <tom@tromey.com>
7706
7707 * varobj.c (varobj_clear_saved_item)
7708 (update_dynamic_varobj_children, install_new_value, ~varobj):
7709 Update.
7710 * value.h (value_incref): Move declaration earlier.
7711 (value_decref): Rename from value_free.
7712 (struct value_ref_policy): New.
7713 (value_ref_ptr): New typedef.
7714 (struct value_deleter): Remove.
7715 (gdb_value_up): Remove typedef.
7716 (release_value): Change return type.
7717 (release_value_or_incref): Remove.
7718 * value.c (set_value_parent): Update.
7719 (value_incref): Change return type.
7720 (value_decref): Rename from value_free.
7721 (value_free_to_mark, free_all_values, free_value_chain): Update.
7722 (release_value): Return value_ref_ptr.
7723 (release_value_or_incref): Remove.
7724 (record_latest_value, set_internalvar, clear_internalvar):
7725 Update.
7726 * stack.c (info_frame_command): Don't call value_free.
7727 * python/py-value.c (valpy_dealloc, valpy_new)
7728 (value_to_value_object): Update.
7729 * printcmd.c (do_examine): Update.
7730 * opencl-lang.c (lval_func_free_closure): Update.
7731 * mi/mi-main.c (register_changed_p): Don't call value_free.
7732 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
7733 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
7734 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
7735 value_free.
7736 * guile/scm-value.c (vlscm_free_value_smob)
7737 (vlscm_scm_from_value): Update.
7738 * frame.c (frame_register_unwind, frame_unwind_register_signed)
7739 (frame_unwind_register_unsigned, get_frame_register_bytes)
7740 (put_frame_register_bytes): Don't call value_free.
7741 * findvar.c (address_from_register): Don't call value_free.
7742 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
7743 * dwarf2loc.c (entry_data_value_free_closure)
7744 (value_of_dwarf_reg_entry, free_pieced_value_closure)
7745 (dwarf2_evaluate_loc_desc_full): Update.
7746 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7747 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7748 (~watchpoint, watch_command_1)
7749 (invalidate_bp_value_on_memory_change): Update.
7750 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
7751
7752 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
7753
7754 PR gdb/23022
7755 * warning.m4: Add -Wno-error=deprecated-register.
7756 * configure: Re-generate.
7757
7758 2018-04-05 Tom Tromey <tom@tromey.com>
7759
7760 * linespec.h: Remove include of "vec.h".
7761
7762 2018-04-05 Tom Tromey <tom@tromey.com>
7763
7764 * linespec.c (typep): Remove typedef.
7765 (find_methods, find_superclass_methods): Take a std::vector.
7766 (find_method): Use std::vector.
7767
7768 2018-04-05 Tom Tromey <tom@tromey.com>
7769
7770 * utils.c (compare_strings): Remove.
7771 * utils.h (compare_strings): Remove.
7772 * objc-lang.h (find_imps): Update.
7773 * objc-lang.c (find_methods): Take a std::vector.
7774 (uniquify_strings, find_imps): Likewise.
7775 * linespec.c (find_methods): Take a std::vector.
7776 (decode_objc): Use std::vector.
7777 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
7778 a std::vector.
7779 (find_method, find_function_symbols): Use std::vector.
7780
7781 2018-04-05 Tom Tromey <tom@tromey.com>
7782
7783 * completer.c (completion_tracker::completion_tracker): Remove
7784 cast.
7785 (completion_tracker::discard_completions): Likewise.
7786 * breakpoint.c (ambiguous_names_p): Remove cast.
7787 * ada-lang.c (_initialize_ada_language): Remove cast.
7788 * utils.h (streq): Update.
7789 (streq_hash): Add new declaration.
7790 * utils.c (streq): Return bool.
7791 (streq_hash): New function.
7792
7793 2018-04-05 Tom Tromey <tom@tromey.com>
7794
7795 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
7796 Remove a string copy.
7797
7798 2018-04-05 Tom Tromey <tom@tromey.com>
7799
7800 * linespec.c (filter_results): Use std::vector.
7801 (decode_line_2, decode_line_full): Update.
7802
7803 2018-04-05 Tom Tromey <tom@tromey.com>
7804
7805 * linespec.c (canonical_to_fullform): Return std::string.
7806 (filter_results): Update.
7807 (struct decode_line_2_item): Add constructor.
7808 <fullform, displayform>: Now std::string.
7809 (decode_line_2_compare_items): Now a std::sort comparator.
7810 (decode_line_2): Update.
7811
7812 2018-04-05 Tom Tromey <tom@tromey.com>
7813
7814 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
7815 (unexpected_linespec_error): Update.
7816 (linespec_parse_basic, parse_linespec): Update.
7817
7818 2018-04-05 Tom Tromey <tom@tromey.com>
7819
7820 * linespec.c (linespec_parse_basic): Reindent.
7821
7822 2018-04-05 Tom Tromey <tom@tromey.com>
7823
7824 * minsyms.h (iterate_over_minimal_symbols): Update.
7825 * minsyms.c (iterate_over_minimal_symbols): Take a
7826 gdb::function_view.
7827 * linespec.c (struct collect_minsyms): Remove.
7828 (compare_msyms): Now a std::sort comparator.
7829 (add_minsym): Add parameters.
7830 (search_minsyms_for_name): Update. Use std::vector.
7831
7832 2018-04-03 Tom Tromey <tom@tromey.com>
7833
7834 * mipsread.c (read_alphacoff_dynamic_symtab): Use
7835 gdb::byte_vector.
7836
7837 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
7838
7839 * MAINTAINERS (Write After Approval): Add Weimin Pan.
7840
7841 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
7842
7843 PR gdb/16959
7844 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
7845 printing static type.
7846
7847 2018-04-01 Tom Tromey <tom@tromey.com>
7848
7849 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
7850 (rs6000_xfer_shared_libraries): Update.
7851
7852 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
7853
7854 * common/gdb_vecs.h (char_ptr): Remove.
7855 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
7856
7857 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
7858
7859 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
7860 with std::vector.
7861 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
7862
7863 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
7864
7865 * tracepoint.h (struct uploaded_tp): Initialize fields.
7866 <actions, step_actions, cmd_strings>: Change type to
7867 std::vector<char *>.
7868 * tracepoint.c (get_uploaded_tp): Allocate with new.
7869 (free_uploaded_tps): Free with delete.
7870 (parse_tracepoint_definition): Adjust to std::vector change.
7871 * breakpoint.c (read_uploaded_action): Likewise.
7872 (create_tracepoint_from_upload): Likewise.
7873 * ctf.c (ctf_write_uploaded_tp): Likewise.
7874 (SET_ARRAY_FIELD): Likewise.
7875 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
7876
7877 2018-03-30 Tom Tromey <tom@tromey.com>
7878
7879 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
7880 std::unique_ptr.
7881 (svr4_keep_data_in_core): Update.
7882 (svr4_read_so_list): Update.
7883
7884 2018-03-30 Tom Tromey <tom@tromey.com>
7885
7886 * windows-nat.c (handle_output_debug_string, handle_exception):
7887 Update.
7888 * target.h (target_read_string): Update.
7889 * target.c (target_read_string): Change "string" to
7890 unique_xmalloc_ptr.
7891 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
7892 Update.
7893 * solib-frv.c (frv_current_sos): Update.
7894 * solib-dsbt.c (dsbt_current_sos): Update.
7895 * solib-darwin.c (darwin_current_sos): Update.
7896 * linux-thread-db.c (inferior_has_bug): Update.
7897 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
7898 Update. Remove alloca.
7899 * ada-lang.c (ada_main_name): Update.
7900
7901 2018-03-30 Tom Tromey <tom@tromey.com>
7902
7903 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
7904 (struct dwo_file_deleter): New.
7905 (dwo_file_up): New typedef.
7906 (open_and_init_dwo_file): Use dwo_file_up.
7907 (free_dwo_file_cleanup): Remove.
7908
7909 2018-03-30 Tom Tromey <tom@tromey.com>
7910
7911 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
7912 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
7913
7914 2018-03-30 Tom Tromey <tom@tromey.com>
7915
7916 * dwarf2read.c (class free_cached_comp_units): New class.
7917 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
7918 (free_cached_comp_units): Remove function.
7919
7920 2018-03-30 Tom Tromey <tom@tromey.com>
7921
7922 * utils.h (make_cleanup_unpush_target): Remove.
7923 * inf-ptrace.c (struct target_unpusher): New.
7924 (target_unpush_up) New typedef.
7925 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
7926 target_unpush_up.
7927 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
7928
7929 2018-03-27 Tom Tromey <tom@tromey.com>
7930
7931 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
7932
7933 2018-03-27 Pedro Alves <palves@redhat.com>
7934 Tom Tromey <tom@tromey.com>
7935
7936 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
7937 destructor. Now a class.
7938 (gdb_readline_wrapper_cleanup): Remove function.
7939 (gdb_readline_wrapper): Remove cleanups.
7940
7941 2018-03-27 Tom Tromey <tom@tromey.com>
7942
7943 * typeprint.h (struct type_print_options) <local_typedefs,
7944 global_typedefs>: Remove "struct" keyword.
7945 (class typedef_hash_table): New class.
7946 (recursively_update_typedef_hash, add_template_parameters)
7947 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
7948 (find_typedef_in_hash): Don't declare.
7949 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
7950 (typedef_hash_table::recursively_update): Rename from
7951 recursively_update_typedef_hash. Now a member.
7952 (typedef_hash_table::add_template_parameters): Rename from
7953 add_template_parameters. Now a member.
7954 (typedef_hash_table::typedef_hash_table): Now a constructor;
7955 rename from create_typedef_hash.
7956 (typedef_hash_table::~typedef_hash_table): Now a destructor;
7957 rename from free_typedef_hash.
7958 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
7959 (do_free_global_table): Remove.
7960 (typedef_hash_table::typedef_hash_table): New constructor; renamed
7961 from copy_type_recursive.
7962 (create_global_typedef_table): Remove.
7963 (typedef_hash_table::find_global_typedef): Now a member of
7964 typedef_hash_table.
7965 (typedef_hash_table::find_typedef): Rename from
7966 find_typedef_in_hash; now a member.
7967 (whatis_exp): Update.
7968 * extension.h (struct ext_lang_type_printers): Add constructor and
7969 destructor.
7970 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
7971 declare.
7972 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
7973 Now a constructor; rename from start_ext_lang_type_printers.
7974 (ext_lang_type_printers): Now a destructor; rename from
7975 free_ext_lang_type_printers.
7976 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
7977 Update.
7978 (c_type_print_base_struct_union): Update. Remove cleanups.
7979
7980 2018-03-27 Tom Tromey <tom@tromey.com>
7981
7982 * dwarf-index-write.c: Include <cmath>.
7983
7984 2018-03-27 Joel Brobecker <brobecker@adacore.com>
7985
7986 * NEWS: Add entry describing new "set|show varsize-limit" command.
7987 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
7988 command.
7989 * printcmd.c (_initialize_printcmd): Add "set var" alias of
7990 "set variable".
7991
7992 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
7993
7994 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
7995 dwarf-index-write.c
7996 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
7997 * dwarf-index-common.c: New file.
7998 * dwarf-index-common.h: New file.
7999 * dwarf-index-write.c: New file.
8000 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
8001 (struct dwarf2_section_info): Move from here.
8002 (dwarf2_section_info_def): Likewise.
8003 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
8004 (offset_type): Likewise.
8005 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
8006 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
8007 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
8008 (byte_swap): Likewise.
8009 (MAYBE_SWAP): Likewise.
8010 (dwarf2_per_cu_ptr): Likewise.
8011 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
8012 (struct tu_stats): Likewise.
8013 (struct dwarf2_per_objfile): Likewise.
8014 (struct dwarf2_per_cu_data): Likewise.
8015 (struct signatured_type): Likewise.
8016 (sig_type_ptr): Likewise.
8017 (DEF_VEC_P (sig_type_ptr)): Likewise.
8018 (INDEX4_SUFFIX): Likewise.
8019 (INDEX5_SUFFIX): Likewise.
8020 (DEBUG_STR_SUFFIX): Likewise.
8021 (dwarf2_read_section): Make non-static.
8022 (mapped_index_string_hash): Move from here.
8023 (dwarf5_djb_hash): Likewise.
8024 (file_write): Likewise.
8025 (class data_buf): Likewise.
8026 (struct symtab_index_entry): Likewise.
8027 (struct mapped_symtab): Likewise.
8028 (find_slot): Likewise.
8029 (hash_expand): Likewise.
8030 (add_index_entry): Likewise.
8031 (uniquify_cu_indices): Likewise.
8032 (class c_str_view): Likewise.
8033 (class c_str_view_hasher): Likewise.
8034 (class vector_hasher): Likewise.
8035 (write_hash_table): Likewise.
8036 (psym_index_map): Likewise.
8037 (struct addrmap_index_data): Likewise.
8038 (add_address_entry): Likewise.
8039 (add_address_entry_worker): Likewise.
8040 (write_address_map): Likewise.
8041 (symbol_kind): Likewise.
8042 (write_psymbols): Likewise.
8043 (struct signatured_type_index_data): Likewise.
8044 (write_one_signatured_type): Likewise.
8045 (recursively_count_psymbols): Likewise.
8046 (recursively_write_psymbols): Likewise.
8047 (class debug_names): Likewise.
8048 (check_dwarf64_offsets): Likewise.
8049 (psyms_seen_size): Likewise.
8050 (write_gdbindex): Likewise.
8051 (write_debug_names): Likewise.
8052 (assert_file_size): Likewise.
8053 (write_psymtabs_to_index): Likewise.
8054 (save_gdb_index_command): Likewise.
8055 (_initialize_dwarf2_read): Don't register the "save gdb-index"
8056 command.
8057 * dwarf2read.h: New file.
8058
8059 2018-03-27 Joel Brobecker <brobecker@adacore.com>
8060
8061 PR gdb/22670
8062 * dwarf2read.c (dwarf2_physname): Do not return the demangled
8063 symbol name if the CU's language stores symbol names in linkage
8064 format.
8065 * language.h (struct language_defn)
8066 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
8067 all instances of this struct.
8068
8069 2018-03-26 Tom Tromey <tom@tromey.com>
8070
8071 * stack.c (backtrace_command_1): Remove verbose code.
8072
8073 2018-03-26 Tom Tromey <tom@tromey.com>
8074
8075 * python/py-framefilter.c (py_print_type): Don't catch
8076 exceptions. Return void.
8077 (py_print_value): Likewise.
8078 (py_print_single_arg): Likewise.
8079 (enumerate_args): Don't catch exceptions.
8080 (py_print_args): Likewise.
8081 (py_print_frame): Likewise.
8082 (gdbpy_apply_frame_filter): Catch exceptions here.
8083
8084 2018-03-26 Tom Tromey <tom@tromey.com>
8085
8086 * stack.c (_initialize_stack): Remove trailing newlines from help
8087 text. Add "Usage" line to "backtrace" help.
8088
8089 2018-03-26 Tom Tromey <tom@tromey.com>
8090
8091 PR python/16486:
8092 * python/py-framefilter.c (py_print_args): Call wrap_hint.
8093
8094 2018-03-26 Tom Tromey <tom@tromey.com>
8095
8096 * python/py-framefilter.c (py_print_single_arg): Return
8097 EXT_LANG_BT_ERROR from catch.
8098
8099 2018-03-26 Tom Tromey <tom@tromey.com>
8100
8101 PR backtrace/15584:
8102 * stack.c (backtrace_command_1): Move some code into no-filters
8103 "if".
8104
8105 2018-03-26 Tom Tromey <tom@tromey.com>
8106
8107 * python/py-framefilter.c (throw_quit_or_print_exception): New
8108 function.
8109 (gdbpy_apply_frame_filter): Use it.
8110
8111 2018-03-26 Tom Tromey <tom@tromey.com>
8112
8113 PR cli/17716:
8114 * python/py-framefilter.c (py_print_type, py_print_value)
8115 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
8116 RETURN_MASK_ERROR.
8117
8118 2018-03-26 Tom Tromey <tom@tromey.com>
8119
8120 * python/py-framefilter.c (enumerate_args): Use
8121 gdb::unique_xmalloc_ptr.
8122
8123 2018-03-26 Tom Tromey <tom@tromey.com>
8124
8125 * python/py-framefilter.c (py_print_frame): Return
8126 EXT_LANG_BT_OK.
8127 (gdbpy_apply_frame_filter): Update comment.
8128 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
8129 Remove.
8130 <EXT_LANG_BT_NO_FILTERS>: Change value.
8131
8132 2018-03-26 Tom Tromey <tom@tromey.com>
8133
8134 PR backtrace/15582:
8135 * stack.c (backtrace_command): Parse "hide" argument.
8136 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
8137 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
8138 constant.
8139
8140 2018-03-26 Tom Tromey <tom@tromey.com>
8141
8142 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
8143 add "flags".
8144 (backtrace_command): Remove "fulltrace", add "flags".
8145
8146 2018-03-26 Tom Tromey <tom@tromey.com>
8147
8148 * stack.c (backtrace_command): Rewrite command line parsing.
8149
8150 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
8151
8152 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
8153
8154 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
8155
8156 * filename-seen-cache.h: Add include guard.
8157
8158 2018-03-26 Keith Seitz <keiths@redhat.com>
8159
8160 * symfile.c (place_section): Remove "struct" from section_addr_info
8161 in comment.
8162 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
8163 "struct" keyword from section_addr_info.
8164
8165 2018-03-26 Alan Hayward <alan.hayward@arm.com>
8166
8167 * regformats/regdef.h (reg): Add constructors.
8168
8169 2018-03-25 Pedro Alves <palves@redhat.com>
8170
8171 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
8172 if then/else bodies in var_func_name extraction.
8173
8174 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
8175
8176 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
8177 lookup_minimal_symbol() to find symbol entry.
8178 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
8179
8180 2018-03-23 Keith Seitz <keiths@redhat.com>
8181
8182 PR c++/22968
8183 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
8184 nested type definitions for C++, too.
8185
8186 2018-03-23 Tom Tromey <tom@tromey.com>
8187
8188 * machoread.c (struct oso_el): Add a constructor. Don't define as
8189 a typedef.
8190 (macho_register_oso): Remove.
8191 (macho_symtab_read): Take a std::vector.
8192 (oso_el_compare_name): Now a std::sort comparator.
8193 (macho_symfile_read_all_oso): Take a std::vector.
8194 (macho_symfile_read): Use std::vector. Remove cleanups.
8195
8196 2018-03-22 Tom Tromey <tom@tromey.com>
8197
8198 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
8199 (record_full_goto_bookmark): Use std::string.
8200
8201 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8202
8203 PR tdep/18295
8204 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
8205 a single mask.
8206
8207 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8208
8209 * rs6000-tdep.c (store_insn_p): New function.
8210 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
8211 and cr_reg to their unshifted values. Use store_insn_p to
8212 match LR saves using either R1 or fdata->alloca_reg. Use
8213 store_insn_p to match CR saves. Set alloca_reg_offset
8214 when alloca_reg and framep are set. Remove lr_reg shift
8215 when assigning to fdata->lr_register.
8216
8217 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
8218
8219 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
8220 command line args instead of emitting a warning.
8221
8222 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8223
8224 * tracepoint.h (struct static_tracepoint_marker): Initialize
8225 fields, define default constructor, move constructor and move
8226 assignment, disable the rest.
8227 <str_id, extra>: Make std::string.
8228 (release_static_tracepoint_marker): Remove.
8229 (free_current_marker): Remove.
8230 * tracepoint.c (free_current_marker): Remove.
8231 (parse_static_tracepoint_marker_definition): Adjust to
8232 std::string, use new hex2str overload.
8233 (release_static_tracepoint_marker): Remove.
8234 (print_one_static_tracepoint_marker): Get marker by reference
8235 and adjust to std::string.
8236 (info_static_tracepoint_markers_command): Adjust to std::vector
8237 changes
8238 * target.h (static_tracepoint_marker_p): Remove typedef.
8239 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
8240 (struct target_ops) <to_static_tracepoint_marker_at>: Return
8241 bool.
8242 <to_static_tracepoint_markers_by_strid>: Return std::vector.
8243 * target-debug.h
8244 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
8245 (target_debug_print_std_vector_static_tracepoint_marker): New.
8246 (target_debug_print_struct_static_tracepoint_marker_p): Rename
8247 to...
8248 (target_debug_print_static_tracepoint_marker_p): ... this.
8249 * target-delegates.c: Re-generate.
8250 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
8251 Make std::string.
8252 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
8253 (decode_static_tracepoint_spec): Adjust to std::vector.
8254 (tracepoint_print_one_detail): Adjust to std::string.
8255 (strace_marker_decode_location): Adjust to std::string.
8256 (update_static_tracepoint): Adjust to std::string, remove call
8257 to release_static_tracepoint_marker.
8258 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
8259 Adjust to std::vector.
8260 * remote.c (remote_static_tracepoint_marker_at): Return bool.
8261 (remote_static_tracepoint_markers_by_strid): Adjust to
8262 std::vector.
8263 * common/rsp-low.h (hex2str): New overload with explicit count
8264 of bytes.
8265 * common/rsp-low.c (hex2str): New overload with explicit count
8266 of bytes.
8267 * unittests/rsp-low-selftests.c (test_hex2str): New function.
8268 (_initialize_rsp_low_selftests): Add test_hex2str test.
8269 * unittests/tracepoint-selftests.c
8270 (test_parse_static_tracepoint_marker_definition): Adjust to
8271 std::string.
8272
8273 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8274
8275 * tracepoint.c (parse_static_tracepoint_marker_definition):
8276 Consider case where the definition is followed by more
8277 definitions.
8278 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8279 tracepoint-selftests.c.
8280 * unittests/tracepoint-selftests.c: New.
8281
8282 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8283
8284 * MAINTAINERS (Write After Approval): Add Pedro Franco de
8285 Carvalho.
8286
8287 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
8288
8289 * symtab.c (find_pc_sect_line): fixed indentation.
8290
8291 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
8292
8293 * symtab.c (find_pc_sect_line): now uses binary search.
8294
8295 2018-03-19 Tom Tromey <tom@tromey.com>
8296
8297 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
8298 "IDENT" production.
8299
8300 2018-03-19 Pedro Alves <palves@redhat.com>
8301 Tom Tromey <tom@tromey.com>
8302
8303 * unittests/observable-selftests.c: New file.
8304 * common/observable.h: New file.
8305 * observable.h: New file.
8306 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
8307 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
8308 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
8309 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
8310 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
8311 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
8312 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
8313 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
8314 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
8315 python/py-breakpoint.c, python/py-finishbreakpoint.c,
8316 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
8317 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
8318 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
8319 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
8320 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
8321 tui/tui-interp.c, valops.c: Update all users.
8322 * tui/tui-hooks.c (tui_bp_created_observer)
8323 (tui_bp_deleted_observer, tui_bp_modified_observer)
8324 (tui_inferior_exit_observer, tui_before_prompt_observer)
8325 (tui_normal_stop_observer, tui_register_changed_observer):
8326 Remove.
8327 (tui_observers_token): New global.
8328 (attach_or_detach, tui_attach_detach_observers): New functions.
8329 (tui_install_hooks, tui_remove_hooks): Use
8330 tui_attach_detach_observers.
8331 * record-btrace.c (record_btrace_thread_observer): Remove.
8332 (record_btrace_thread_observer_token): New global.
8333 * observer.sh: Remove.
8334 * observer.c: Rename to observable.c.
8335 * observable.c (namespace gdb_observers): Define new objects.
8336 (observer_debug): Move into gdb_observers namespace.
8337 (struct observer, struct observer_list, xalloc_observer_list_node)
8338 (xfree_observer_list_node, generic_observer_attach)
8339 (generic_observer_detach, generic_observer_notify): Remove.
8340 (_initialize_observer): Update.
8341 Don't include observer.inc.
8342 * Makefile.in (generated_files): Remove observer.h, observer.inc.
8343 (clean mostlyclean): Likewise.
8344 (observer.h, observer.inc): Remove targets.
8345 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
8346 (COMMON_SFILES): Use observable.c, not observer.c.
8347 * .gitignore: Remove observer.h.
8348
8349 2018-03-18 Tom Tromey <tom@tromey.com>
8350
8351 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
8352 gdb::def_vector.
8353 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
8354
8355 2018-03-17 Tom Tromey <tom@tromey.com>
8356
8357 * auto-load.c (auto_load_objfile_script_1): Use std::string.
8358
8359 2018-03-17 Tom Tromey <tom@tromey.com>
8360
8361 * target.c (class scoped_target_fd): New.
8362 (target_fileio_close_cleanup): Remove.
8363 (target_fileio_read_alloc_1): Use scoped_target_fd.
8364
8365 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
8366
8367 * silent-rules.mk: New.
8368 * Makefile.in: Include silent-rules.mk
8369 (srcdir, VPATH, top_srcdir): Move up.
8370 (COMPILE): Add ECHO_CXX.
8371 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
8372 (init.c): Add ECHO_INIT_C.
8373 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
8374 (version.c): Add ECHO_GEN.
8375 (printcmd.o): Add ECHO_CXX.
8376 (target-float.o): Add ECHO_CXX.
8377 (ada-exp.o): Add ECHO_CXX.
8378 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
8379 (insight$(EXEEXT)): Add ECHO_CXXLD.
8380 * gnulib/configure.ac: Add AM_SILENT_RULES.
8381 * gnulib/aclocal.m4: Re-generate.
8382 * gnulib/configure: Re-generate.
8383 * gnulib/import/Makefile.in: Re-generate.
8384
8385 2018-03-16 Tom Tromey <tom@tromey.com>
8386
8387 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
8388 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
8389 * utils.c (do_free_section_addr_info)
8390 (make_cleanup_free_section_addr_info): Remove.
8391 * symfile.h (struct other_sections): Add constructor.
8392 (struct section_addr_info): Remove.
8393 (section_addr_info): New typedef.
8394 (struct sym_fns) <sym_offsets>: Change type of parameter.
8395 (build_section_addr_info_from_objfile)
8396 (relative_addr_info_to_section_offsets, addr_info_make_relative)
8397 (default_symfile_offsets, symbol_file_add)
8398 (symbol_file_add_from_bfd)
8399 (build_section_addr_info_from_section_table): Update.
8400 (alloc_section_addr_info, free_section_addr_info): Don't declare.
8401 * symfile.c (alloc_section_addr_info): Remove.
8402 (build_section_addr_info_from_section_table): Change return type.
8403 Update.
8404 (build_section_addr_info_from_bfd)
8405 (build_section_addr_info_from_objfile): Likewise.
8406 (free_section_addr_info): Remove.
8407 (relative_addr_info_to_section_offsets): Change type of "addrs".
8408 (addrs_section_compar): Now a std::sort comparator.
8409 (addrs_section_sort): Change return type.
8410 (addr_info_make_relative): Change type of "addrs". Update.
8411 (default_symfile_offsets, syms_from_objfile_1)
8412 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
8413 (symbol_file_add_separate): Update.
8414 (symbol_file_add): Change type of "addrs". Update.
8415 (add_symbol_file_command): Update. Remove cleanups.
8416 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
8417 cleanups.
8418 * symfile-debug.c (debug_sym_offsets): Change type of "info".
8419 * solib.c (solib_read_symbols): Update.
8420 * objfiles.c (objfile_relocate): Update. Remove cleanups.
8421 * machoread.c (macho_symfile_offsets): Update.
8422 * jit.c (jit_bfd_try_read_symtab): Update.
8423
8424 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
8425
8426 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8427 unittests/utils-selftests.c.
8428 * unittests/utils-selftests.c: New file.
8429
8430 2018-03-14 Tom Tromey <tom@tromey.com>
8431
8432 PR cli/14977:
8433 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
8434 for NULL.
8435
8436 2018-03-14 Tom Tromey <tom@tromey.com>
8437
8438 PR cli/19918:
8439 * printcmd.c (printf_pointer): Allow "-" in format.
8440
8441 2018-03-14 Tom Tromey <tom@tromey.com>
8442
8443 * printcmd.c (_initialize_printcmd): Add usage to printf.
8444
8445 2018-03-14 Yao Qi <qiyao@sourceware.org>
8446
8447 * MAINTAINERS: Update my email address.
8448
8449 2018-03-13 Tom Tromey <tom@tromey.com>
8450
8451 * machoread.c (macho_check_dsym): Change filenamep to a
8452 std::string*.
8453 (macho_symfile_read): Update.
8454 * symfile.c (load_command): Use std::string.
8455
8456 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
8457
8458 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
8459 to error message string.
8460 (riscv_register_name): Use xsnprintf instead of sprintf.
8461 (riscv_insn::fetch_instruction): Use gdb_assert instead of
8462 internal_error.
8463 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
8464 error.
8465 (riscv_push_dummy_call): Likewise.
8466
8467 2018-03-12 Tom Tromey <tom@tromey.com>
8468
8469 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
8470 Use gdb::byte_vector.
8471 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
8472
8473 2018-03-12 Yao Qi <yao.qi@linaro.org>
8474
8475 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
8476 parameter type to readable_regcache.
8477 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
8478 the declaration.
8479
8480 2018-03-11 Tom Tromey <tom@tromey.com>
8481
8482 * dwarf2read.c (struct nextfield): Add initializers.
8483 (struct nextfnfield): Remove.
8484 (struct fnfieldlist): Add initializers. Remove "length" and
8485 "head", use std::vector.
8486 (struct decl_field_list): Remove.
8487 (struct field_info): Add initializers.
8488 <fields, baseclasses>: Now std::vector.
8489 <nbaseclasses, nfnfields, typedef_field_list_count,
8490 nested_types_list_count>: Remove.
8491 (dwarf2_add_field, dwarf2_add_type_defn)
8492 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
8493 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
8494 (process_structure_scope): Update.
8495
8496 2018-03-11 Tom Tromey <tom@tromey.com>
8497
8498 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
8499 for use by std::sort.
8500 (build_type_psymtabs_1): Use std::vector.
8501
8502 2018-03-09 Eli Zaretskii <eliz@gnu.org>
8503
8504 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
8505 and LIBMPFR in the printed configuration.
8506
8507 2018-03-08 Tom Tromey <tom@tromey.com>
8508
8509 * source.c (get_filename_and_charpos): Use scoped_fd.
8510 * nto-procfs.c (procfs_open_1): Use scoped_fd.
8511 (procfs_pidlist): Likewise.
8512 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
8513 (iterate_over_mappings): Likewise.
8514
8515 2018-03-08 Tom Tromey <tom@tromey.com>
8516
8517 * infcall.c (struct call_return_meta_info)
8518 <stack_temporaries_enabled>: Remove.
8519 (get_call_return_value, call_function_by_hand_dummy): Update.
8520 * thread.c (disable_thread_stack_temporaries): Remove.
8521 (enable_thread_stack_temporaries): Remove.
8522 (thread_stack_temporaries_enabled_p): Return bool.
8523 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
8524 (get_last_thread_stack_temporary): Update.
8525 * eval.c (evaluate_subexp): Update.
8526 * gdbthread.h (class enable_thread_stack_temporaries): Now a
8527 class, not a function.
8528 (value_ptr, value_vec): Remove typedefs.
8529 (class thread_info) <stack_temporaries_enabled>: Now bool.
8530 <stack_temporaries>: Now a std::vector.
8531 (thread_stack_temporaries_enabled_p)
8532 (value_in_thread_stack_temporaries): Return bool.
8533
8534 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
8535
8536 * remote.c (putpkt_binary): Fix omitted bytes reporting.
8537 (getpkt_or_notif_sane_1): Likewise.
8538
8539 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8540
8541 * build-id.c (build_id_to_debug_bfd): Use std::string.
8542
8543 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8544
8545 * build-id.c (find_separate_debug_file_by_buildid): Return
8546 std::string.
8547 * build-id.h (find_separate_debug_file_by_buildid): Return
8548 std::string.
8549 * coffread.c (coff_symfile_read): Adjust to std::string.
8550 * elfread.c (elf_symfile_read): Adjust to std::string.
8551 * symfile.c (separate_debug_file_exists): Change parameter to
8552 std::string.
8553 (find_separate_debug_file): Return std::string.
8554 (find_separate_debug_file_by_debuglink): Return std::string.
8555 * symfile.h (find_separate_debug_file_by_debuglink): Return
8556 std::string.
8557
8558 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8559
8560 * common/xml-utils.c (xml_escape_text): Move code to...
8561 (xml_escape_text_append): ... this new function.
8562 * common/xml-utils.h (xml_escape_text_append): New declaration.
8563 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
8564 New function.
8565 (_initialize_xml_utils): register test_xml_escape_text_append as
8566 a selftest.
8567
8568 2018-03-07 Alan Hayward <alan.hayward@arm.com>
8569
8570 * defs.h: Remove MAX_REGISTER_SIZE.
8571 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
8572 asserts.
8573 * python/py-unwind.c (pyuw_sniffer): Likewise.
8574
8575 2018-03-07 Tom Tromey <tom@tromey.com>
8576
8577 * linux-tdep.c (linux_info_proc): Update.
8578 * target.h (struct target_ops) <to_fileio_readlink>: Return
8579 optional<string>.
8580 (target_fileio_readlink): Return optional<string>.
8581 * remote.c (remote_hostio_readlink): Return optional<string>.
8582 * inf-child.c (inf_child_fileio_readlink): Return
8583 optional<string>.
8584 * target.c (target_fileio_readlink): Return optional<string>.
8585
8586 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
8587
8588 * regcache.c (cooked_read_test): Add riscv to the list of
8589 architectures that have a save_reggroup.
8590
8591 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
8592
8593 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
8594 value is not a dynamic class object.
8595
8596 2018-03-06 Tom Tromey <tom@tromey.com>
8597
8598 * rust-exp.y: Formatting fixes.
8599
8600 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8601
8602 * riscv-tdep.c (riscv_register_name): Remove target description
8603 support.
8604 (riscv_gdbarch_init): Remove target description check.
8605
8606 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8607
8608 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
8609 comment.
8610 * riscv-tdep.h: Likewise.
8611
8612 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8613
8614 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
8615 (riscv_pseudo_register_write): Delete.
8616 (riscv_gdbarch_init): Remove all use of pseudo registers.
8617
8618 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8619
8620 * record-btrace.c (btrace_print_lines): Replace cleanup
8621 parameter with RAII equivalents.
8622 (btrace_insn_history): Replace cleanup with RAII equivalents.
8623 * ui-out.h (make_cleanup_ui_out_list_begin_end,
8624 make_cleanup_ui_out_tuple_begin_end): Remove.
8625 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
8626 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
8627 make_cleanup_ui_out_list_begin_end): Remove.
8628
8629 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8630
8631 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
8632 parameter types to std::vector. Use bool.
8633 (record_btrace_wait): Replace VEC(tp_t) with
8634 std::vector<thread_info *>.
8635 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
8636
8637 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8638
8639 * record-btrace.c (record_btrace_disable_callback): Remove.
8640 (struct scoped_btrace_disable): New.
8641 (record_btrace_open): Use scoped_btrace_disable.
8642
8643 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8644
8645 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
8646 reading values from registers.
8647
8648 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8649
8650 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
8651 where appropriate.
8652
8653 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8654
8655 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
8656 change parameter type. Use GDB's print functions, and use
8657 core_addr_to_string where appropriate.
8658 (riscv_push_dummy_call): Use core_addr_to_string where
8659 appropriate, update call to riscv_print_arg_location, and reindent
8660 a few lines.
8661 (riscv_return_value): Update call to riscv_print_arg_location.
8662
8663 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8664 Tim Newsome <tim@sifive.com>
8665 Albert Ou <a0u@eecs.berkeley.edu>
8666 Darius Rad <darius@bluespec.com>
8667
8668 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
8669 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
8670 (ALLDEPFILES): Add riscv-tdep.c
8671 * configure.tgt: Add riscv support.
8672 * riscv-tdep.c: New file.
8673 * riscv-tdep.h: New file.
8674 * NEWS: Mention new target.
8675 * MAINTAINERS: Add entry for riscv.
8676
8677 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8678
8679 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
8680 fields within aggregates.
8681
8682 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
8683
8684 * record-btrace.c (btrace_print_lines): Change type of flags to
8685 gdb_disassembly_flags.
8686
8687 2018-03-04 John Baldwin <jhb@FreeBSD.org>
8688
8689 * fbsd-nat.c: Include "inf-ptrace.h".
8690 (USE_SIGTRAP_SIGINFO): Conditionally define.
8691 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
8692 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
8693 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
8694 function.
8695 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
8696 Likewise.
8697 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
8698 Likewise.
8699 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
8700 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
8701 "supports_stopped_by_hw_breakpoint" target methods.
8702
8703 2018-03-04 John Baldwin <jhb@FreeBSD.org>
8704
8705 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
8706 * fbsd-nat.c (debug_fbsd_nat): New variable.
8707 (show_fbsd_nat_debug): New function.
8708 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
8709 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
8710
8711 2018-03-04 John Baldwin <jhb@FreeBSD.org>
8712
8713 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
8714 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
8715 prototype.
8716 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
8717 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
8718 method.
8719
8720 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8721
8722 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
8723 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
8724
8725 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8726
8727 * charset.c (struct charset_vector): New.
8728 (charsets): Change type to charset_vector.
8729 (find_charset_names): Adjust.
8730 (add_one): Adjust.
8731 (_initialize_charset): Adjust.
8732
8733 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8734
8735 * progspace.h (struct program_space) <deleted_solibs>: Change
8736 type to std::vector<std::string>.
8737 * progspace.c (clear_program_space_solib_cache): Adjust.
8738 * breakpoint.c (print_solib_event): Adjust.
8739 (check_status_catch_solib): Adjust.
8740 * solib.c (update_solib_list): Adjust.
8741 * ui-out.h (class ui_out) <field_string>: New overload.
8742 * ui-out.c (ui_out::field_string): New overload.
8743
8744 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8745
8746 * progspace.h (struct program_space): Add constructor and
8747 destructor, initialize fields.
8748 (add_program_space): Remove.
8749 * progspace.c (add_program_space): Rename to...
8750 (program_space::program_space): ... this.
8751 (release_program_space): Rename to...
8752 (program_space::~program_space): ... this.
8753 (delete_program_space): Use delete to delete program_space.
8754 (initialize_progspace): Use new to allocate program_space.
8755 * inferior.c (add_inferior_with_spaces): Likewise.
8756 (clone_inferior_command): Likewise.
8757 * infrun.c (follow_fork_inferior): Likewise.
8758 (handle_vfork_child_exec_or_exit): Likewise.
8759
8760 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8761
8762 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
8763 (delim_string_to_char_ptr_vec): Return std::vector of
8764 gdb::unique_xmalloc_ptr.
8765 (dirnames_to_char_ptr_vec_append): Take std::vector of
8766 gdb::unique_xmalloc_ptr.
8767 (dirnames_to_char_ptr_vec): Return std::vector of
8768 gdb::unique_xmalloc_ptr.
8769 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
8770 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
8771 (delim_string_to_char_ptr_vec): Return an std::vector of
8772 gdb::unique_xmalloc_ptr, adjust the code.
8773 (dirnames_to_char_ptr_vec_append): Take an std::vector of
8774 gdb::unique_xmalloc_ptr, adjust the code.
8775 (dirnames_to_char_ptr_vec): Return an std::vector of
8776 gdb::unique_xmalloc_ptr, adjust the code.
8777 * auto-load.c (auto_load_safe_path_vec): Change type to
8778 std::vector of gdb::unique_xmalloc_ptr.
8779 (auto_load_expand_dir_vars): Return an std::vector of
8780 gdb::unique_xmalloc_ptr, adjust the code.
8781 (auto_load_safe_path_vec_update): Adjust.
8782 (filename_is_in_auto_load_safe_path_vec): Adjust.
8783 (auto_load_objfile_script_1): Adjust.
8784 * build-id.c (build_id_to_debug_bfd): Adjust.
8785 * linux-thread-db.c (thread_db_load_search): Adjust.
8786 * source.c (add_path): Adjust.
8787 (openp): Adjust.
8788 * symfile.c (find_separate_debug_file): Adjust.
8789 * utils.c (do_free_char_ptr_vec): Remove.
8790 (make_cleanup_free_char_ptr_vec): Remove.
8791
8792 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
8793
8794 PR gdb/22907
8795 * common/pathstuff.c: Conditionally include "<windows.h>".
8796
8797 2018-03-01 Georg Sauthoff <mail@georg.so>
8798
8799 PR gdb/22888
8800 * gcore.in: Quote variables and switch interpreter to bash.
8801
8802 2018-03-01 Tom Tromey <tom@tromey.com>
8803
8804 * dwarf2read.c (alloc_discriminant_info): Fix default_index
8805 assertion. Add assertion for discriminant_index.
8806 (quirk_rust_enum): Use correct base type name in univariant case.
8807
8808 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
8809
8810 * record.c (get_call_history_modifiers): Return a
8811 record_print_flags.
8812 (cmd_record_call_history): Adjust.
8813 * record-btrace.c (record_btrace_call_history): Adjust.
8814 (record_btrace_call_history_range): Adjust.
8815 (record_btrace_call_history_from): Adjust.
8816 * target-debug.h (target_debug_print_record_print_flags): New.
8817 * target-delegates.c: Re-generate.
8818 * target.c (target_call_history): Change flags type.
8819 (target_call_history_from): Likewise.
8820 (target_call_history_range): Likewise.
8821 * target.h (struct target_ops) <target_call_history>: Likewise.
8822 (target_call_history_from): Likewise.
8823 (target_call_history_range): Likewise.
8824
8825 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
8826 Simon Marchi <simon.marchi@polymtl.ca>
8827
8828 * common/common-utils.c: Include "sys/stat.h".
8829 (is_regular_file): Move here from "source.c"; change return
8830 type to "bool".
8831 * common/common-utils.h (is_regular_file): New prototype.
8832 * common/pathstuff.c (contains_dir_separator): New function.
8833 * common/pathstuff.h (contains_dir_separator): New prototype.
8834 * source.c: Don't include "sys/stat.h".
8835 (is_regular_file): Move to "common/common-utils.c".
8836
8837 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
8838
8839 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
8840 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
8841 * auto-load.c: Include "common/pathstuff.h".
8842 * common/common-def.h (current_directory): Move here.
8843 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
8844 function.
8845 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
8846 prototype.
8847 * common/pathstuff.c: New file.
8848 * common/pathstuff.h: New file.
8849 * compile/compile.c: Include "common/pathstuff.h".
8850 * defs.h (current_directory): Move to "common/common-defs.h".
8851 * dwarf2read.c: Include "common/pathstuff.h".
8852 * exec.c: Likewise.
8853 * guile/scm-safe-call.c: Likewise.
8854 * linux-thread-db.c: Likewise.
8855 * main.c: Likewise.
8856 * nto-tdep.c: Likewise.
8857 * objfiles.c: Likewise.
8858 * source.c: Likewise.
8859 * symtab.c: Likewise.
8860 * utils.c: Include "common/pathstuff.h".
8861 (gdb_realpath): Move to "common/pathstuff.c".
8862 (gdb_realpath_keepfile): Likewise.
8863 (gdb_abspath): Likewise.
8864 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
8865 (gdb_realpath_keepfile): Likewise.
8866 (gdb_abspath): Likewise.
8867
8868 2018-02-28 John Baldwin <jhb@FreeBSD.org>
8869
8870 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
8871 wildcard process pid for super_resume for kernels with a
8872 specific bug.
8873
8874 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
8875
8876 * compile/compile.c (get_args): Add additional comments
8877 explaining function.
8878
8879 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
8880 Tom Tromey <tom@tromey.com>
8881
8882 * target.h (memory_write_request_s): Remove typedef. Don't define
8883 VEC.
8884 (target_write_memory_blocks): Change argument to std::vector.
8885 (struct memory_write_request): Add constructor.
8886 * target-memory.c (compare_block_starting_address): Return bool.
8887 Change argument types.
8888 (claim_memory): Change arguments to use std::vector.
8889 (split_regular_and_flash_blocks, blocks_to_erase)
8890 (compute_garbled_blocks): Likewise.
8891 (cleanup_request_data, cleanup_write_requests_vector): Remove.
8892 (target_write_memory_blocks): Change argument to std::vector.
8893 * symfile.c (struct load_section_data): Add constructor and
8894 destructor. Use std::vector for "requests".
8895 (struct load_progress_data): Add initializers.
8896 (load_section_callback): Update. Use "new".
8897 (clear_memory_write_data): Remove.
8898 (generic_load): Update.
8899
8900 2018-02-27 Alan Hayward <alan.hayward@arm.com>
8901
8902 * arch/aarch64.h: Use common/tdesc.h.
8903
8904 2018-02-26 Maciej W. Rozycki <macro@mips.com>
8905
8906 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
8907 architecture with a 64-bit ABI.
8908
8909 2018-02-26 Maciej W. Rozycki <macro@mips.com>
8910
8911 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
8912 ahead of target description loading.
8913
8914 2018-02-26 Tom Tromey <tom@tromey.com>
8915
8916 * stack.c (backtrace_command_1): Update.
8917 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
8918 of "flags".
8919 * python/py-framefilter.c (py_print_frame)
8920 (gdbpy_apply_frame_filter): Change type of "flags".
8921 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
8922 of "flags".
8923 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
8924 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
8925 * extension.h (enum frame_filter_flag): Rename from
8926 frame_filter_flags.
8927 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
8928 (apply_ext_lang_frame_filter): Change type of "flags".
8929 * extension.c (apply_ext_lang_frame_filter): Change type of
8930 "flags".
8931 * extension-priv.h (struct extension_language_ops)
8932 <apply_frame_filter>: Change type of "flags".
8933
8934 2018-02-26 Tom Tromey <tom@tromey.com>
8935
8936 PR python/16497:
8937 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
8938 off-by-one in py_end computation.
8939 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
8940 PRINT_MORE_FRAMES.
8941 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
8942 constant.
8943
8944 2018-02-26 Tom Tromey <tom@tromey.com>
8945
8946 * dwarf2read.c (struct variant_field): New.
8947 (struct nextfield) <variant>: New field.
8948 (dwarf2_add_field): Handle DW_TAG_variant_part.
8949 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
8950 discriminated union.
8951 (read_structure_type): Handle DW_TAG_variant_part.
8952 (handle_struct_member_die): New function, extracted from
8953 process_structure_scope. Handle DW_TAG_variant.
8954 (process_structure_scope): Handle discriminated unions. Call
8955 handle_struct_member_die.
8956
8957 2018-02-26 Tom Tromey <tom@tromey.com>
8958
8959 * rust-lang.h (rust_last_path_segment): Declare.
8960 * rust-lang.c (rust_last_path_segment): Now public. Change
8961 contract.
8962 (struct disr_info): Remove.
8963 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
8964 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
8965 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
8966 (rust_enum_p, rust_enum_variant): New function.
8967 (rust_underscore_fields): Remove "offset" parameter.
8968 (rust_print_enum): New function.
8969 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
8970 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
8971 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
8972 enums.
8973 (rust_internal_print_type): New function, from rust_print_type.
8974 Remove enum code.
8975 (rust_print_type): Call rust_internal_print_type.
8976 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
8977 Update enum handling.
8978 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
8979 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
8980 (rust_union_quirks): New functions.
8981 (process_full_comp_unit, process_full_type_unit): Call
8982 rust_union_quirks.
8983 (process_structure_scope): Update rust_unions if necessary.
8984
8985 2018-02-26 Tom Tromey <tom@tromey.com>
8986
8987 * value.h (value_union_variant): Declare.
8988 * valops.c (value_union_variant): New function.
8989 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
8990 (struct discriminant_info): New.
8991 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
8992 enumerator.
8993 (struct main_type) <flag_discriminated_union>: New field.
8994
8995 2018-02-26 Tom Tromey <tom@tromey.com>
8996
8997 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8998 unittests/unpack-selftests.c.
8999 * unittests/unpack-selftests.c: New file.
9000 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
9001
9002 2018-02-26 Yao Qi <yao.qi@linaro.org>
9003
9004 * dwarf2read.c (struct partial_die_info) <read>: New method.
9005 (read_partial_die): Remove the declaration.
9006 (load_partial_dies): Update.
9007 (partial_die_info::partial_die_info):
9008 (read_partial_die): Change it to partial_die_info::read.
9009
9010 2018-02-26 Yao Qi <yao.qi@linaro.org>
9011
9012 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
9013 (fixup_partial_die): Remove declaration.
9014 (scan_partial_symbols): Update.
9015 (partial_die_parent_scope): Likewise.
9016 (partial_die_full_name): Likewise.
9017 (fixup_partial_die): Change it to partial_die_info::fixup.
9018
9019 2018-02-26 Yao Qi <yao.qi@linaro.org>
9020
9021 * dwarf2read.c (read_partial_die): Update the declaration.
9022 (load_partial_dies): Caller update.
9023 (read_partial_die): Remove one argument abbrev_len.
9024
9025 2018-02-26 Yao Qi <yao.qi@linaro.org>
9026
9027 * dwarf2read.c (struct partial_die_info): Add ctor, delete
9028 assignment operator.
9029 (load_partial_dies): Use ctor and copy ctor.
9030 (read_partial_die): Update.
9031 (dwarf2_cu::find_partial_die): Use ctor.
9032
9033 2018-02-26 Yao Qi <yao.qi@linaro.org>
9034
9035 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
9036 (find_partial_die_in_comp_unit): Change it to
9037 dwarf2_cu::find_partial_die.
9038 (find_partial_die): Update.
9039
9040 2018-02-26 Yao Qi <yao.qi@linaro.org>
9041
9042 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
9043 is NULL.
9044
9045 2018-02-26 Yao Qi <yao.qi@linaro.org>
9046
9047 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
9048
9049 2018-02-26 Alan Hayward <alan.hayward@arm.com>
9050
9051 * arch/amd64.h: Use common/tdesc.h.
9052 * arch/i386.c: Likewise.
9053 * arch/i386.h: Likewise.
9054 * arch/tic6x.c: Likewise.
9055 * arch/tdesc.h: Move file from here...
9056 * common/tdesc.h: ...to here.
9057 * features/aarch64-core.c: Regenerate.
9058 * features/aarch64-fpu.c: Regenerate.
9059 * features/i386/32bit-avx.c: Regenerate.
9060 * features/i386/32bit-avx512.c: Regenerate.
9061 * features/i386/32bit-core.c: Regenerate.
9062 * features/i386/32bit-linux.c: Regenerate.
9063 * features/i386/32bit-mpx.c: Regenerate.
9064 * features/i386/32bit-pkeys.c: Regenerate.
9065 * features/i386/32bit-sse.c: Regenerate.
9066 * features/i386/64bit-avx.c: Regenerate.
9067 * features/i386/64bit-avx512.c: Regenerate.
9068 * features/i386/64bit-core.c: Regenerate.
9069 * features/i386/64bit-linux.c: Regenerate.
9070 * features/i386/64bit-mpx.c: Regenerate.
9071 * features/i386/64bit-pkeys.c: Regenerate.
9072 * features/i386/64bit-segments.c: Regenerate.
9073 * features/i386/64bit-sse.c: Regenerate.
9074 * features/i386/x32-core.c: Regenerate.
9075 * features/tic6x-c6xp.c: Regenerate.
9076 * features/tic6x-core.c: Regenerate.
9077 * features/tic6x-gp.c: Regenerate.
9078 * target-descriptions.c: Use common/tdesc.h.
9079 * target-descriptions.h: Likewise.
9080
9081 2018-02-24 Tom Tromey <tom@tromey.com>
9082
9083 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
9084 (try_thread_db_load_from_dir, thread_db_load_search): Use
9085 std::string.
9086 (info_auto_load_libthread_db_compare): Return bool. Change
9087 argument types.
9088 (info_auto_load_libthread_db): Use std::vector, std::string.
9089 Remove cleanups.
9090
9091 2018-02-24 Tom Tromey <tom@tromey.com>
9092
9093 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
9094 std::string.
9095 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
9096 std::string*.
9097 * gdbarch.c: Rebuild.
9098 * gdbarch.h: Rebuild.
9099 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
9100 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
9101 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
9102 std::string*.
9103
9104 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
9105
9106 * gdbtypes.h (sect_offset): Change type to uint64_t.
9107 (sect_offset_str): New function.
9108 * dwarf2read.c (create_addrmap_from_aranges): Use
9109 sect_offset_str.
9110 (error_check_comp_unit_head): Likewise.
9111 (create_debug_type_hash_table): Likewise.
9112 (read_cutu_die_from_dwo): Likewise.
9113 (init_cutu_and_read_dies): Likewise.
9114 (init_cutu_and_read_dies_no_follow): Likewise.
9115 (process_psymtab_comp_unit_reader): Likewise.
9116 (partial_die_parent_scope): Likewise.
9117 (peek_die_abbrev): Likewise.
9118 (process_queue): Likewise.
9119 (dwarf2_physname): Likewise.
9120 (read_namespace_alias): Likewise.
9121 (read_import_statement): Likewise.
9122 (create_dwo_cu_reader): Likewise.
9123 (create_cus_hash_table): Likewise.
9124 (lookup_dwo_cutu): Likewise.
9125 (inherit_abstract_dies): Likewise.
9126 (read_func_scope): Likewise.
9127 (read_call_site_scope): Likewise.
9128 (dwarf2_add_member_fn): Likewise.
9129 (read_common_block): Likewise.
9130 (read_module_type): Likewise.
9131 (read_typedef): Likewise.
9132 (read_subrange_type): Likewise.
9133 (load_partial_dies): Likewise.
9134 (read_partial_die): Likewise.
9135 (find_partial_die): Likewise.
9136 (read_str_index): Likewise.
9137 (dwarf2_string_attr): Likewise.
9138 (build_error_marker_type): Likewise.
9139 (lookup_die_type): Likewise.
9140 (dump_die_shallow): Likewise.
9141 (follow_die_ref): Likewise.
9142 (dwarf2_fetch_die_loc_sect_off): Likewise.
9143 (dwarf2_fetch_constant_bytes): Likewise.
9144 (follow_die_sig): Likewise.
9145 (get_signatured_type): Likewise.
9146 (get_DW_AT_signature_type): Likewise.
9147 (dwarf2_find_containing_comp_unit): Likewise.
9148 (set_die_type): Likewise.
9149
9150 2018-02-21 John Baldwin <jhb@FreeBSD.org>
9151
9152 * arch/aarch64.c: Include "common-defs.h".
9153 * arch/amd64.c: Likewise.
9154 * arch/i386.c: Likewise.
9155
9156 2018-02-21 Tom Tromey <tom@tromey.com>
9157
9158 * value.h: (extract_field_op): Update.
9159 * eval.c (extract_field_op): Return a const char *.
9160 * expression.h (parse_expression_for_completion): Update.
9161 * completer.c (complete_expression): Update.
9162 (add_struct_fields): Make fieldname const.
9163 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
9164 (mark_completion_tag, parse_exp_in_context_1): Update.
9165 (parse_expression_for_completion): Change "name" to
9166 unique_xmalloc_ptr*.
9167
9168 2018-02-21 Tom Tromey <tom@tromey.com>
9169
9170 * infcall.c (call_function_by_hand_dummy): Use std::vector.
9171
9172 2018-02-21 Yao Qi <yao.qi@linaro.org>
9173
9174 * avr-tdep.c (avr_read_pc): Change parameter type to
9175 readable_regcache.
9176 * gdbarch.sh (read_pc): Likewise.
9177 * gdbarch.c: Re-generated.
9178 * gdbarch.h: Re-generated.
9179 * hppa-tdep.c (hppa_read_pc): Change parameter type to
9180 readable_regcache.
9181 * ia64-tdep.c (ia64_read_pc): Likewise.
9182 * mips-tdep.c (mips_read_pc): Likewise.
9183 * spu-tdep.c (spu_read_pc): Likewise.
9184
9185 2018-02-21 Yao Qi <yao.qi@linaro.org>
9186
9187 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
9188 * regcache-dump.c: New file.
9189 * regcache.c: Move register_dump to regcache-dump.c.
9190 (maintenance_print_registers): Likewise.
9191 (maintenance_print_raw_registers): Likewise.
9192 (maintenance_print_cooked_registers): Likewise.
9193 (maintenance_print_register_groups): Likewise.
9194 (maintenance_print_remote_registers): Likewise.
9195 (_initialize_regcache): Likewise.
9196 * regcache.h (register_dump): Moved from regcache.c.
9197
9198 2018-02-21 Yao Qi <yao.qi@linaro.org>
9199
9200 * regcache.c (regcache::regcache): Update.
9201 (regcache::invalidate): Move it to detached_regcache::invalidate.
9202 (get_thread_arch_aspace_regcache): Update.
9203 (regcache::raw_update): Update.
9204 (regcache::cooked_read): Remove some code.
9205 (regcache::cooked_read_value): Likewise.
9206 (regcache::raw_write): Remove assert on m_readonly_p.
9207 (regcache::raw_supply_integer): Move it to
9208 detached_regcache::raw_supply_integer.
9209 (regcache::raw_supply_zeroed): Likewise.
9210 * regcache.h (detached_regcache) <raw_supply_integer>: New
9211 declaration.
9212 <raw_supply_zeroed, invalidate>: Likewise.
9213 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
9214 <invalidate>: Likewise.
9215 <m_readonly_p>: Removed.
9216
9217 2018-02-21 Yao Qi <yao.qi@linaro.org>
9218
9219 * infcmd.c (get_return_value): Let stop_regs point to
9220 get_current_regcache.
9221 * regcache.c (regcache::regcache): Remove.
9222 (register_dump_reg_buffer): New class.
9223 (regcache_print): Adjust.
9224 * regcache.h (regcache): Remove constructors.
9225
9226 2018-02-21 Yao Qi <yao.qi@linaro.org>
9227
9228 * regcache.c (class register_dump): New class.
9229 (register_dump_regcache, register_dump_none): New class.
9230 (register_dump_remote, register_dump_groups): New class.
9231 (regcache_print): Update.
9232 * regcache.h (regcache_dump_what): Move it to regcache.c.
9233 (regcache) <dump>: Remove.
9234
9235 2018-02-21 Yao Qi <yao.qi@linaro.org>
9236
9237 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
9238 reg_buffer_rw *.
9239 (jit_unwind_reg_set_impl): Call raw_supply.
9240 (jit_frame_sniffer): Use reg_buffer_rw.
9241 * record-full.c (record_full_core_regbuf): Change its type.
9242 (record_full_core_open_1): Use reg_buffer_rw.
9243 (record_full_close): Likewise.
9244 (record_full_core_fetch_registers): Use regcache->raw_supply.
9245 (record_full_core_store_registers): Likewise.
9246 * regcache.c (regcache::get_register_status): Move it to
9247 reg_buffer.
9248 (regcache_raw_set_cached_value): Remove.
9249 (regcache::raw_set_cached_value): Remove.
9250 (regcache::raw_write): Call raw_supply.
9251 (regcache::raw_supply): Move it to reg_buffer_rw.
9252 * regcache.h (regcache_raw_set_cached_value): Remove.
9253 (reg_buffer_rw): New class.
9254
9255 2018-02-21 Yao Qi <yao.qi@linaro.org>
9256
9257 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
9258 readonly_detached_regcache.
9259 (dummy_frame_prev_register): Use regcache->cooked_read.
9260 * frame.c (frame_save_as_regcache): Change return type.
9261 (frame_pop): Update.
9262 * frame.h (frame_save_as_regcache): Update declaration.
9263 * inferior.h (get_infcall_suspend_state_regcache): Update
9264 declaration.
9265 * infrun.c (infcall_suspend_state) <registers>: use
9266 readonly_detached_regcache.
9267 (save_infcall_suspend_state): Don't use regcache_dup.
9268 (get_infcall_suspend_state_regcache): Change return type.
9269 * linux-fork.c (struct fork_info) <savedregs>: Change to
9270 readonly_detached_regcache.
9271 <pc>: New field.
9272 (fork_save_infrun_state): Don't use regcache_dup.
9273 (info_checkpoints_command): Adjust.
9274 * mi/mi-main.c (register_changed_p): Update declaration.
9275 (mi_cmd_data_list_changed_registers): Use
9276 readonly_detached_regcache.
9277 (register_changed_p): Change parameter type to
9278 readonly_detached_regcache.
9279 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
9280 readonly_detached_regcache.
9281 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
9282 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
9283 New.
9284 (regcache::save): Move it to reg_buffer.
9285 (regcache::restore): Change parameter type.
9286 (regcache_dup): Remove.
9287 * regcache.h (reg_buffer) <save>: New method.
9288 (readonly_detached_regcache): New class.
9289 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
9290 readonly_detached_regcache.
9291 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
9292
9293 2018-02-21 Yao Qi <yao.qi@linaro.org>
9294
9295 * frame.c (frame_save_as_regcache): Use regcache method save.
9296 (frame_pop): Use regcache method restore.
9297 * infrun.c (restore_infcall_suspend_state): Likewise.
9298 * linux-fork.c (fork_load_infrun_state): Likewise.
9299 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
9300 save.
9301 * regcache.c (regcache_save): Remove.
9302 (regcache::restore): More asserts.
9303 (regcache_cpy): Remove.
9304 * regcache.h (regcache_save): Remove the declaration.
9305 (regcache::restore): Move from private to public.
9306 Remove the friend declaration of regcache_cpy.
9307 (regcache_cpy): Remove declaration.
9308
9309 2018-02-21 Yao Qi <yao.qi@linaro.org>
9310
9311 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
9312 parameter type to 'readable_regcache *'.
9313 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9314 * arm-tdep.c (arm_neon_quad_read): Likewise.
9315 (arm_pseudo_read): Likewise.
9316 * avr-tdep.c (avr_pseudo_register_read): Likewise.
9317 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9318 * frv-tdep.c (frv_pseudo_register_read): Likewise.
9319 * gdbarch.c: Re-generated.
9320 * gdbarch.h: Re-generated.
9321 * gdbarch.sh (pseudo_register_read): Change parameter type to
9322 'readable_regcache *'.
9323 (pseudo_register_read_value): Likewise.
9324 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
9325 (h8300_pseudo_register_read): Likewise.
9326 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
9327 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9328 (i386_pseudo_register_read_into_value): Likewise.
9329 (i386_pseudo_register_read_value): Likewise.
9330 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
9331 declaration.
9332 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
9333 * m32c-tdep.c (m32c_raw_read): Likewise.
9334 (m32c_read_flg): Likewise.
9335 (m32c_banked_register): Likewise.
9336 (m32c_banked_read): Likewise.
9337 (m32c_sb_read): Likewise.
9338 (m32c_part_read): Likewise.
9339 (m32c_cat_read): Likewise.
9340 (m32c_r3r2r1r0_read): Likewise.
9341 (m32c_pseudo_register_read): Likewise.
9342 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9343 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9344 (mep_pseudo_cr64_read): Likewise.
9345 (mep_pseudo_register_read): Likewise.
9346 * mips-tdep.c (mips_pseudo_register_read): Likewise.
9347 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9348 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9349 * regcache.c (regcache::raw_read): Move it to readable_regcache.
9350 (regcache::cooked_read): Likewise.
9351 (regcache::cooked_read_value): Likewise.
9352 (regcache_cooked_read_signed):
9353 (regcache::cooked_read): Likewise.
9354 * regcache.h (readable_regcache): New class.
9355 (regcache): Inherit readable_regcache. Move some methods to
9356 readable_regcache.
9357 * rl78-tdep.c (rl78_pseudo_register_read): Change
9358 parameter type to 'readable_regcache *'.
9359 * rs6000-tdep.c (do_regcache_raw_read): Remove.
9360 (e500_pseudo_register_read): Change parameter type to
9361 'readable_regcache *'.
9362 (dfp_pseudo_register_read): Likewise.
9363 (vsx_pseudo_register_read): Likewise.
9364 (efpr_pseudo_register_read): Likewise.
9365 * s390-tdep.c (s390_pseudo_register_read): Likewise.
9366 * sh-tdep.c (sh_pseudo_register_read): Likewise.
9367 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
9368 (sh64_pseudo_register_read): Likewise.
9369 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9370 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9371 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9372 (spu_pseudo_register_read): Likewise.
9373 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9374 (xtensa_pseudo_register_read): Likewise.
9375
9376 2018-02-21 Yao Qi <yao.qi@linaro.org>
9377
9378 * regcache.c (regcache::regcache): Call reg_buffer ctor.
9379 (regcache::arch): Move it to reg_buffer::arch.
9380 (regcache::register_buffer): Likewise.
9381 (regcache::assert_regnum): Likewise.
9382 (regcache::num_raw_registers): Likewise.
9383 * regcache.h (reg_buffer): New class.
9384 (regcache): Inherit reg_buffer.
9385
9386 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
9387
9388 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
9389 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
9390
9391 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
9392
9393 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
9394
9395 2018-02-19 Alan Hayward <alan.hayward@arm.com>
9396
9397 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
9398 (SFILES): Remove common/*.c files.
9399 (COMMON_OBS): Remove some *.o files built from common/*.c files.
9400 * common/common.host: Add common reference.
9401 * configure.ac: Likewise.
9402 * configure: Regenerate.
9403
9404 2018-02-16 Yao Qi <yao.qi@linaro.org>
9405
9406 * block.c (block_namespace_info): Inherit allocate_on_obstack.
9407 (block_initialize_namespace): Use new.
9408 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
9409 (dwarf2_free_objfile): Use delete.
9410 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
9411 (copy_type_recursive): Use new.
9412 * gdb_obstack.h (allocate_on_obstack): New.
9413
9414 2018-02-15 Yao Qi <yao.qi@linaro.org>
9415
9416 PR gdb/22849
9417 * inferior.c (exit_inferior_1): Reset inf->control.
9418
9419 2018-02-15 Joel Brobecker <brobecker@adacore.com>
9420
9421 * ada-lang.c (ada_to_fixed_value_create): Delete advance
9422 declaration.
9423
9424 2018-02-14 Pedro Alves <palves@redhat.com>
9425
9426 * frame-unwind.c (frame_unwind_try_unwinder): Always call
9427 frame_cleanup_after_sniffer on exception.
9428
9429 2018-02-14 Tom Tromey <tom@tromey.com>
9430
9431 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
9432 const.
9433 (solib_bfd_open): Make pathname const.
9434 * solib.c (solib_bfd_open): Make pathname const.
9435 * solib-spu.c (spu_bfd_fopen): Make name const.
9436 (spu_bfd_open): Make pathname const.
9437 * solib-darwin.c (darwin_bfd_open): Make pathname const.
9438 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
9439
9440 2018-02-14 Tom Tromey <tom@tromey.com>
9441
9442 * symfile.c (symfile_bfd_open): Update.
9443 * source.h (openp, source_full_path_of, find_and_open_source):
9444 Change argument type to unique_xmalloc_ptr.
9445 * source.c (openp): Take a unique_xmalloc_ptr.
9446 (source_full_path_of, find_and_open_source): Likewise.
9447 (open_source_file, symtab_to_fullname): Update.
9448 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
9449 unique_xmalloc_ptr.
9450 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
9451 (exec_file_find): Update.
9452 * psymtab.c (psymtab_to_fullname): Update.
9453 * nto-tdep.h (nto_find_and_open_solib): Update.
9454 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
9455 unique_xmalloc_ptr.
9456 * exec.c (exec_file_attach): Update.
9457 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
9458 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
9459
9460 2018-02-14 Tom Tromey <tom@tromey.com>
9461
9462 * solib.c: Include source.h.
9463 * nto-tdep.c: Include source.h.
9464 * mi/mi-cmd-env.c: Include source.h.
9465 * infcmd.c: Include source.h.
9466 * exec.c: Include source.h.
9467 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
9468 (add_path, directory_switch, source_path, init_source_path): Move
9469 declarations...
9470 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
9471 (add_path, directory_switch, source_path, init_source_path):
9472 ...here.
9473
9474 2018-02-14 Tom Tromey <tom@tromey.com>
9475
9476 * solist.h (exec_file_find, solib_find): Return
9477 unique_xmalloc_ptr.
9478 (solib_bfd_fopen): Take a const char *.
9479 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
9480 (exec_file_find, solib_find): Likewise.
9481 (solib_bfd_fopen): Do not take ownership of "pathname".
9482 (solib_bfd_open): Use unique_xmalloc_ptr.
9483 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
9484 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
9485 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
9486 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
9487
9488 2018-02-14 Joel Brobecker <brobecker@adacore.com>
9489
9490 * ada-lang.c (name_match_type_from_name): Remove reference to
9491 ada_name_for_lookup in function's documentation.
9492 * ada-lang.h (ada_name_for_lookup): Delete declaration.
9493
9494 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
9495
9496 * defs.h (enum openp_flags): New enum.
9497 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
9498 Move to enum openp_flags.
9499 (openp_flags): New enum flags.
9500 (openp): Change parameter type to openp_flags.
9501 * source.c (openp): Change parameter type to openp_flags.
9502 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
9503 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
9504
9505 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
9506
9507 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
9508 per-command.
9509
9510 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
9511
9512 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
9513 into...
9514 (class dwarf2_queue_guard): ...the destructor of this new class.
9515 (dw2_do_instantiate_symtab): Create instance of the new class
9516 dwarf2_queue_guard, remove cleanup.
9517
9518 2018-02-09 Tom Tromey <tom@tromey.com>
9519
9520 * source.c (find_source_lines): Don't reference past the end of
9521 the vector.
9522
9523 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9524
9525 * remote.c (remote_btrace_maybe_reopen): Change error message.
9526 * btrace.c (btrace_enable): Likewise.
9527 (parse_xml_btrace): Likewise.
9528 (parse_xml_btrace_conf): Likewise.
9529
9530 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9531
9532 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
9533 (linux_enable_pt, linux_enable_bts): Call
9534 diagnose_perf_event_open_fail.
9535
9536 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9537
9538 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
9539 Remove parameter and change return type. Update callers. Move it.
9540 (linux_enable_bts, linux_enable_pt): Improve error message.
9541 (linux_enable_pt): Remove zero buffer size check.
9542 (linux_enable_btrace): Improve error messages. Remove NULL return
9543 check.
9544
9545 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9546
9547 * btrace.c (btrace_enable): Remove target_supports_btrace call.
9548 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
9549 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
9550 (linux_supports_pt, linux_supports_btrace): Remove.
9551 (linux_enable_bts): Call cpu_supports_bts.
9552 * nat/linux-btrace.h (linux_supports_btrace): Remove.
9553 * remote.c (remote_supports_btrace): Remove.
9554 (init_remote_ops): Remove remote_supports_btrace.
9555 * target-delegates.c: Regenerated.
9556 * target.c (target_supports_btrace): Remove.
9557 * target.h (target_ops) <to_supports_btrace>: Remove
9558 (target_supports_btrace): Remove.
9559 * x86-linux-nat.c (x86_linux_create_target): Remove
9560 linux_supports_btrace.
9561
9562 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9563
9564 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
9565 btrace failed.
9566 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
9567 exception and use message in own exception.
9568
9569 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9570
9571 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
9572 (perf_event_pt_event_type): Use gdb_file_up.
9573 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
9574 scoped_fd, and scoped_mmap.
9575
9576 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9577
9578 * common/scoped_mmap.h: New.
9579 * unittests/scoped_mmap-selftest.c: New.
9580 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9581 unittests/scoped_mmap-selftest.c.
9582
9583 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9584
9585 * common/scoped_fd.h: New.
9586 * unittests/scoped_fd-selftest.c: New.
9587 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9588 unittests/scoped_fd-selftest.c.
9589
9590 2018-02-09 Tom Tromey <tom@tromey.com>
9591
9592 * auto-load.c (auto_load_section_scripts): Use
9593 gdb::unique_xmalloc_ptr.
9594
9595 2018-02-09 Tom Tromey <tom@tromey.com>
9596
9597 * auto-load.c (execute_script_contents): Use std::string.
9598
9599 2018-02-09 Joel Brobecker <brobecker@adacore.com>
9600
9601 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
9602 Python function, rather than a new command.
9603
9604 2018-02-08 Tom Tromey <tom@tromey.com>
9605
9606 * solib.c (solib_find_1): Use std::string.
9607 (solib_bfd_fopen): Use unique_xmalloc_ptr.
9608
9609 2018-02-08 Tom Tromey <tom@tromey.com>
9610
9611 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
9612
9613 2018-02-08 Tom Tromey <tom@tromey.com>
9614
9615 * source.c (find_source_lines): Use gdb::def_vector.
9616
9617 2018-02-08 Tom Tromey <tom@tromey.com>
9618
9619 * macrocmd.c (struct temporary_macro_definition): New.
9620 (macro_define_command): Use temporary_macro_definition. Remove
9621 cleanups.
9622 (free_macro_definition_ptr): Remove.
9623
9624 2018-02-08 Tom Tromey <tom@tromey.com>
9625
9626 * macroexp.c (maybe_expand): Use std::string.
9627
9628 2018-02-08 Tom Tromey <tom@tromey.com>
9629
9630 * macroexp.c (struct macro_buffer): Add initializers for some
9631 members.
9632 (init_buffer, init_shared_buffer, free_buffer)
9633 (free_buffer_return_text): Remove.
9634 (macro_buffer): New constructors.
9635 (~macro_buffer): New destructor.
9636 (macro_buffer::set_shared): New method.
9637 (macro_buffer::resize_buffer, macro_buffer::appendc)
9638 (macro_buffer::appendmem): Now methods, not free functions.
9639 (set_token, append_tokens_without_splicing, stringify)
9640 (macro_stringify): Update.
9641 (gather_arguments): Change return type. Remove argc_p argument,
9642 add args_ptr argument. Use std::vector.
9643 (substitute_args): Remove argc argument. Accept std::vector.
9644 (expand): Update. Use std::vector.
9645 (scan, macro_expand, macro_expand_next): Update.
9646
9647 2018-02-08 Tom Tromey <tom@tromey.com>
9648
9649 * symtab.c (default_collect_symbol_completion_matches_break_on):
9650 Use unique_xmalloc_ptr.
9651 * macroscope.h: (sal_macro_scope, user_macro_scope)
9652 (default_macro_scope): Return unique_xmalloc_ptr.
9653 * macroscope.c (sal_macro_scope, user_macro_scope)
9654 (default_macro_scope): Return unique_xmalloc_ptr.
9655 * macroexp.h (macro_expand, macro_expand_once): Return
9656 unique_xmalloc_ptr.
9657 * macroexp.c (macro_expand, macro_expand_once): Return
9658 unique_xmalloc_ptr.
9659 * macrocmd.c (macro_expand_command, macro_expand_once_command)
9660 (info_macro_command, info_macros_command): Use
9661 unique_xmalloc_ptr.
9662 * compile/compile-c-support.c (write_macro_definitions): Use
9663 unique_xmalloc_ptr.
9664 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
9665
9666 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
9667
9668 * value.c (value_static_field): Assign field type instead of
9669 containing type when returning an optimized out value.
9670
9671 2018-02-06 Yao Qi <yao.qi@linaro.org>
9672
9673 * ft32-tdep.c (ft32_read_pc): Remove.
9674 (ft32_write_pc): Remove.
9675 (ft32_gdbarch_init): Update.
9676 * m32r-tdep.c (m32r_read_pc): Remove.
9677 (m32r_gdbarch_init): Update.
9678 * mep-tdep.c (mep_read_pc): Remove.
9679 (mep_gdbarch_init): Update.
9680 * microblaze-tdep.c (microblaze_write_pc): Remove.
9681 (microblaze_gdbarch_init): Update.
9682 * mn10300-tdep.c (mn10300_read_pc): Remove.
9683 (mn10300_write_pc): Remove.
9684 (mn10300_gdbarch_init): Update.
9685 * moxie-tdep.c (moxie_read_pc): Remove.
9686 (moxie_write_pc): Remove.
9687 (moxie_gdbarch_init): Update.
9688
9689 2018-02-06 Yao Qi <yao.qi@linaro.org>
9690
9691 * expprint.c (print_subexp_standard): Handle
9692 OP_F77_UNDETERMINED_ARGLIST.
9693 (dump_subexp_body_standard): Likewise.
9694
9695 2018-02-05 Alan Hayward <alan.hayward@arm.com>
9696
9697 * target-descriptions.c (tdesc_element_visitor) Add empty
9698 implementations.
9699 (tdesc_type): Move make_gdb_type from here.
9700 (tdesc_type_builtin): Likewise.
9701 (tdesc_type_vector): Likewise.
9702 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
9703 (make_gdb_type_struct): Move from tdesc_type_with_fields.
9704 (make_gdb_type_union): Likewise.
9705 (make_gdb_type_flags): Likewise.
9706 (make_gdb_type_enum): Likewise.
9707 (make_gdb_type): New function.
9708 (tdesc_register_type): Use static make_gdb_type.
9709
9710 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
9711
9712 * infcmd.c (default_print_one_register_info): Align natural-format
9713 column values consistently one under another.
9714 (pad_to_column): New function.
9715
9716 2018-02-05 Joel Brobecker <brobecker@adacore.com>
9717
9718 * dwarf2read.c (dwarf2_physname): Move commment.
9719
9720 2018-02-01 Leszek Swirski <leszeks@google.com>
9721
9722 * varobj.c (varobj_formatted_print_options): Allow recursive
9723 pretty printing if pretty printing is enabled.
9724
9725 2018-02-01 Leszek Swirski <leszeks@google.com>
9726
9727 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
9728 names after a structop as a filename.
9729
9730 2018-02-01 Yao Qi <yao.qi@linaro.org>
9731
9732 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
9733 (arm_record_coproc_data_proc): Likewise.
9734
9735 2018-02-01 Yao Qi <yao.qi@linaro.org>
9736
9737 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
9738
9739 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
9740
9741 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
9742 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
9743
9744 2018-01-31 Pedro Alves <palves@redhat.com>
9745
9746 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
9747 * inflow.c (child_terminal_save_inferior): Wrap reference to
9748 tcgetpgrp in HAVE_TERMIOS_H.
9749 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
9750 _WIN32.
9751 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
9752 always iterate over all inferiors.
9753 (gdbsim_cntrl_c): Adjust.
9754 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
9755
9756 2018-01-31 Joel Brobecker <brobecker@adacore.com>
9757
9758 * gdbtypes.c (lookup_array_range_type): Make sure the array's
9759 index type is objfile-owned if the element type is as well.
9760
9761 2018-01-31 Joel Brobecker <brobecker@adacore.com>
9762
9763 GDB 8.1 released.
9764
9765 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
9766
9767 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
9768 "features/s390x-linux64.c".
9769 (_initialize_s390_linux_tdep): Remove initialization of tdescs
9770 s390_linux32 and s390x_linux64.
9771 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
9772 default tdesc.
9773 * s390-tdep.c: Include "features/s390-linux32.c" and
9774 "features/s390x-linux64.c".
9775 (s390_tdesc_valid): Add check for tdesc_has_registers.
9776 (s390_gdbarch_init): Make sure there is always a valid tdesc.
9777 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
9778 tdesc_s390x_linux64.
9779 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
9780 tdesc_s390x_linux64 to...
9781 * s390-tdep.h: ...here.
9782
9783 2018-01-30 Pedro Alves <palves@redhat.com>
9784
9785 PR gdb/13211
9786 * config.in, configure: Regenerate.
9787 * configure.ac: Check for getpgid.
9788 * go32-nat.c (go32_pass_ctrlc): New.
9789 (go32_target): Install it.
9790 * inf-child.c (inf_child_target): Install
9791 child_terminal_save_inferior, child_pass_ctrlc and
9792 child_interrupt.
9793 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
9794 (inf_ptrace_target): No longer install it.
9795 * infcmd.c (interrupt_target_1): Adjust.
9796 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
9797 (child_interrupt): Declare.
9798 (inferior::terminal_state): New.
9799 * inflow.c (struct terminal_info): Update comments.
9800 (inferior_process_group): Delete.
9801 (terminal_is_ours): Delete.
9802 (gdb_tty_state): New.
9803 (child_terminal_init): Adjust.
9804 (is_gdb_terminal, sharing_input_terminal_1)
9805 (sharing_input_terminal): New functions.
9806 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
9807 Set the process's actual process group in the foreground if
9808 possible. Handle is_ours_for_output/is_ours distinction. Don't
9809 mark terminal as the inferior's if not sharing GDB's terminal.
9810 Don't check attach_flag.
9811 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
9812 pass down a target_terminal_state.
9813 (child_terminal_save_inferior): New, factored out from ...
9814 (child_terminal_ours_1): ... this. Handle
9815 target_terminal_state::is_ours_for_output.
9816 (child_interrupt, child_pass_ctrlc): New.
9817 (inflow_inferior_exit): Clear the inferior's terminal_state.
9818 (copy_terminal_info): Copy the inferior's terminal state.
9819 (_initialize_inflow): Remove reference to terminal_is_ours.
9820 * inflow.h (inferior_process_group): Delete.
9821 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
9822 * procfs.c (procfs_target): Don't install procfs_interrupt.
9823 (procfs_interrupt): Delete.
9824 * remote.c (remote_serial_quit_handler): Adjust.
9825 (remote_interrupt): Remove ptid parameter. Adjust.
9826 * target-delegates.c: Regenerate.
9827 * target.c: Include "terminal.h".
9828 (target_terminal::terminal_state): Rename to ...
9829 (target_terminal::m_terminal_state): ... this.
9830 (target_terminal::init): Adjust.
9831 (target_terminal::inferior): Adjust to per-inferior
9832 terminal_state.
9833 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
9834 (target_terminal::ours, target_terminal::ours_for_output): Use
9835 target_terminal_is_ours_kind.
9836 (target_interrupt): Remove ptid parameter. Adjust.
9837 (default_target_pass_ctrlc): Adjust.
9838 * target.h (target_ops::to_terminal_save_inferior): New field.
9839 (target_ops::to_interrupt): Remove ptid_t parameter.
9840 (target_interrupt): Remove ptid_t parameter. Update comment.
9841 (target_pass_ctrlc): Update comment.
9842 * target/target.h (target_terminal_state): New scoped enum,
9843 factored out of ...
9844 (target_terminal::terminal_state): ... here.
9845 (target_terminal::inferior): Update comments.
9846 (target_terminal::restore_inferior): New.
9847 (target_terminal::is_inferior, target_terminal::is_ours)
9848 (target_terminal::is_ours_for_output): Adjust.
9849 (target_terminal::scoped_restore_terminal_state): Adjust to
9850 rename, and call restore_inferior() instead of inferior().
9851 (target_terminal::scoped_restore_terminal_state::m_state): Change
9852 type.
9853 (target_terminal::terminal_state): Rename to ...
9854 (target_terminal::m_terminal_state): ... this and change type.
9855
9856 2018-01-30 Pedro Alves <palves@redhat.com>
9857
9858 * linux-nat.c (wait_for_signal): New function.
9859 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
9860 directly.
9861 (async_terminal_is_ours)
9862 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
9863 (linux_nat_add_target): Don't override
9864 to_terminal_inferior/to_terminal_ours.
9865
9866 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
9867
9868 * remote.c (remote_follow_fork): Don't call "detach_inferior".
9869
9870 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
9871
9872 * dwarf2read.c (free_dwo_files): Add forward-declaration.
9873 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
9874 dwarf2_per_objfile_free here.
9875 (dwarf2_per_objfile_free): Remove.
9876 (_initialize_dwarf2_read): Don't register
9877 dwarf2_per_objfile_free as a registry cleanup.
9878
9879 2018-01-27 Eli Zaretskii <eliz@gnu.org>
9880
9881 Avoid compilation errors in MinGW native builds
9882
9883 The error is triggered by including python-internal.h, and the
9884 error message is:
9885
9886 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
9887 from build-gnulib/import/math.h:27,
9888 from d:/usr/Python26/include/pyport.h:235,
9889 from d:/usr/Python26/include/Python.h:58,
9890 from python/python-internal.h:94,
9891 from python/py-arch.c:24:
9892 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
9893 using ::hypot;
9894 ^~~~~
9895
9896 This happens because Python headers define 'hypot' to expand t
9897 '_hypot' in the Windows builds.
9898 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
9899 'hypoth'. This avoids a compilation error.
9900
9901 2018-01-26 Alan Hayward <alan.hayward@arm.com>
9902
9903 * MAINTAINERS (Write After Approval): Fix ordering.
9904
9905 2018-01-26 Alan Hayward <alan.hayward@arm.com>
9906
9907 * MAINTAINERS (Write After Approval): Add Alan Hayward.
9908
9909 2018-01-26 Alan Modra <amodra@gmail.com>
9910
9911 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
9912 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
9913 Remove nop. Make const. Comment.
9914 (powerpc32_plt_stub_so_2): New.
9915 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
9916 Correct count. Update uses.
9917 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
9918 Move common code reading PLT entry word. Correct
9919 powerpc32_plt_stub PLT address calculation.
9920 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
9921 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
9922 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
9923 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
9924 (ppc64_standard_linkage8): Likewise.
9925 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
9926 Correct insns description.
9927 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
9928
9929 2018-01-24 Pedro Alves <palves@redhat.com>
9930
9931 GCC PR libstdc++/83906
9932 * gdbtypes.c (operator==(const dynamic_prop &,
9933 const dynamic_prop &)): New.
9934 (operator==(const range_bounds &, const range_bounds &)): New.
9935 (check_types_equal): Use them instead of memcmp.
9936 * gdbtypes.h (operator==(const dynamic_prop &,
9937 const dynamic_prop &)): Declare.
9938 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
9939 (operator==(const range_bounds &, const range_bounds &)): Declare.
9940 (operator!=(const range_bounds &, const range_bounds &)): Declare.
9941
9942 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9943
9944 * s390-linux-tdep.c (s390_record_address_mask)
9945 (s390_record_calc_disp_common, s390_record_calc_disp)
9946 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
9947 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
9948 (s390_process_record): Move to s390-tdep.c.
9949 (s390_linux_init_abi_any): Adjust.
9950 * s390-tdep.c (s390_record_address_mask)
9951 (s390_record_calc_disp_common, s390_record_calc_disp)
9952 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
9953 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
9954 (s390_process_record): Moved from s390-linux-tdep.c
9955 (s390_gdbarch_init): Adjust.
9956
9957 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9958
9959 * s390-linux-nat.c (s390-tdep.h): New include.
9960 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
9961 (HFILES_NO_SRCDIR): Add s390-tdep.h.
9962 (ALLDEPFILES): Add s390-tdep.c.
9963 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
9964 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
9965 * s390-tdep.h: ...this. New file.
9966 * s390-linux-tdep.c (s390-tdep.h): New include.
9967 (_initialize_s390_tdep): Rename to...
9968 (_initialize_s390_linux_tdep): ...this and adjust.
9969 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
9970 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
9971 s390-tdep.h.
9972 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
9973 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
9974 (s390_is_partial_instruction, s390_software_single_step)
9975 (is_non_branch_ril, s390_displaced_step_copy_insn)
9976 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
9977 (s390_prologue_data, s390_addr, s390_store, s390_load)
9978 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
9979 (s390_register_call_saved, s390_guess_tracepoint_registers)
9980 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
9981 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
9982 (s390_pseudo_register_name, s390_pseudo_register_type)
9983 (s390_pseudo_register_read, s390_pseudo_register_write)
9984 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
9985 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
9986 (s390_addr_bits_remove, s390_address_class_type_flags)
9987 (s390_address_class_type_flags_to_name)
9988 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
9989 (s390_function_arg_float, s390_function_arg_vector)
9990 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
9991 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
9992 (s390_frame_align, s390_register_return_value, s390_return_value)
9993 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
9994 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
9995 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
9996 (s390_trad_frame_prev_register, s390_unwind_cache)
9997 (s390_prologue_frame_unwind_cache)
9998 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
9999 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
10000 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
10001 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
10002 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
10003 (s390_frame_base_address, s390_local_base_address)
10004 (s390_frame_base, s390_gcc_target_options)
10005 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
10006 (s390_validate_reg_range, s390_tdesc_valid)
10007 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
10008 * s390-tdep.c: ...this. New file.
10009
10010 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10011
10012 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
10013 (s390_process_record, s390_gdbarch_tdep_alloc)
10014 (s390_linux_init_abi_any): Use/set new hook.
10015
10016 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10017
10018 * s390-linux-tdep.c (osabi.h): New include.
10019 (s390_linux_init_abi_31, s390_linux_init_abi_64)
10020 (s390_linux_init_abi_any): New functions.
10021 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
10022
10023 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10024
10025 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
10026 tdesc_has_registers check
10027
10028 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10029
10030 * s390-linux-tdep.c (s390_tdesc_valid): New function.
10031 (s390_validate_reg_range): New macro.
10032 (s390_gdbarch_init): Adjust.
10033
10034 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10035
10036 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
10037 (s390_gdbarch_tdep_alloc): Adjust.
10038 (s390_gdbarch_init): Adjust.
10039
10040 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10041
10042 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
10043 <have_tdb>: Change type to bool.
10044 (s390_gdbarch_tdep_alloc): Adjust.
10045 (s390_gdbarch_init): Adjust.
10046
10047 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10048
10049 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
10050 (gdbarch_tdep) <have_upper, have_vx>: New fields.
10051 (s390_gdbarch_tdep_alloc): New function.
10052 (s390_gdbarch_init): Allocate tdep at start and use its fields
10053 instead of separate variables.
10054
10055 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10056
10057 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
10058 when looking for cached gdbarch and add comment for remaining.
10059
10060 2018-01-22 Pedro Alves <palves@redhat.com>
10061 Sergio Durigan Junior <sergiodj@redhat.com>
10062
10063 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
10064 case.
10065
10066 2018-01-22 Maciej W. Rozycki <macro@mips.com>
10067
10068 * MAINTAINERS: Update my company e-mail address.
10069
10070 2018-01-22 Yao Qi <yao.qi@linaro.org>
10071
10072 * regcache.c (cooked_write_test): New function.
10073 (_initialize_regcache): Register the test.
10074
10075 2018-01-22 Yao Qi <yao.qi@linaro.org>
10076
10077 * ia64-tdep.c (ia64_pseudo_register_read): Call
10078 regcache->cooked_read instead of regcache_cooked_read_unsigned.
10079 * m32c-tdep.c (m32c_cat_read): Likewise.
10080 (m32c_r3r2r1r0_read): Likewise.
10081 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10082 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10083
10084 2018-01-22 Yao Qi <yao.qi@linaro.org>
10085
10086 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
10087 method raw_read instead of regcache_raw_read.
10088 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10089 * arm-tdep.c (arm_neon_quad_read): Likewise.
10090 * avr-tdep.c (avr_pseudo_register_read): Likewise.
10091 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10092 * frv-tdep.c (frv_pseudo_register_read): Likewise.
10093 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
10094 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10095 (i386_pseudo_register_read_into_value): Likewise.
10096 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10097 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10098 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10099 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
10100 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
10101 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10102 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10103 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10104 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
10105
10106 2018-01-22 Yao Qi <yao.qi@linaro.org>
10107
10108 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
10109 * configure.tgt: Remove target mt.
10110 * mt-tdep.c: Remove.
10111 * regcache.c (cooked_read_test): Remove the check for mt.
10112
10113 2018-01-22 Yao Qi <yao.qi@linaro.org>
10114
10115 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
10116 instead of gdbarch_pseudo_register_read_value.
10117
10118 2018-01-22 Joel Brobecker <brobecker@adacore.com>
10119
10120 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
10121 language is Ada.
10122
10123 2018-01-22 Joel Brobecker <brobecker@adacore.com>
10124
10125 * linespec.c (create_sals_line_offset): Remove code that preserved
10126 the symtab_and_line's line number.
10127
10128 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10129
10130 * varobj.c (varobj_create): Don't set valid_block when creating a
10131 floating varobj.
10132
10133 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10134
10135 * varobj.c (varobj_create): Remove out of date comment.
10136
10137 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10138
10139 PR mi/20395
10140 * ada-exp.y (write_var_from_sym): Pass extra parameter when
10141 updating innermost block.
10142 * parse.c (innermost_block_tracker::update): Take extra type
10143 parameter, and check types match before updating innermost block.
10144 (write_dollar_variable): Update innermost block for registers.
10145 * parser-defs.h (enum innermost_block_tracker_type): New enum.
10146 (innermost_block_tracker::innermost_block_tracker): Initialise
10147 m_types member.
10148 (innermost_block_tracker::reset): Take type parameter.
10149 (innermost_block_tracker::update): Take type parameter, and pass
10150 type through as needed.
10151 (innermost_block_tracker::m_types): New member.
10152 * varobj.c (varobj_create): Pass type when reseting innermost
10153 block.
10154
10155 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10156
10157 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
10158 * ada-lang.c (resolve_subexp): Likewise.
10159 * breakpoint.c (set_breakpoint_condition) Likewise.
10160 (watch_command_1) Likewise.
10161 * c-exp.y (variable): Likewise.
10162 * d-exp.y (PrimaryExpression): Likewise.
10163 * f-exp.y (variable): Likewise.
10164 * go-exp.y (variable): Likewise.
10165 * m2-exp.y (variable): Likewise.
10166 * objfiles.c (objfile::~objfile): Likewise.
10167 * p-exp.y (variable): Likewise.
10168 * parse.c (innermost_block): Change type.
10169 * parser-defs.h (class innermost_block_tracker): New.
10170 (innermost_block): Change to innermost_block_tracker.
10171 * printcmd.c (display_command): Switch to innermost_block API.
10172 (do_one_display): Likewise.
10173 * rust-exp.y (do_one_display): Likewise.
10174 * symfile.c (clear_symtab_users): Likewise.
10175 * varobj.c (varobj_create): Switch to innermost_block API, replace
10176 use of innermost_block with block stored on varobj object.
10177
10178 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10179
10180 * expression.h (innermost_block): Remove declaration.
10181 * varobj.c: Add 'parser-defs.h' include.
10182
10183 2018-01-19 Tom Tromey <tom@tromey.com>
10184
10185 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
10186 symbols in the static and global blocks.
10187
10188 2018-01-19 James Clarke <jrtc27@jrtc27.com>
10189
10190 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
10191 gdb_ptrace.h, and move including gdb_wait.h ...
10192 * nat/linux-ptrace.h: ... to here.
10193
10194 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10195
10196 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
10197 inf_ptrace_detach_success.
10198 (inf_ptrace_detach_success): Add inferior parameter, use it
10199 instead of inferior_ptid, pass it to detach_inferior.
10200 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
10201 parameter.
10202 * inferior.c (detach_inferior): Add overload that takes an
10203 inferior object.
10204 * inferior.h (detach_inferior): Likewise.
10205 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
10206 use inferior_ptid, adjust call to inf_ptrace_detach_success.
10207 * linux-thread-db.c (thread_db_detach): Use inf parameter.
10208
10209 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10210
10211 * target.h (struct target_ops) <to_detach>: Add inferior
10212 parameter.
10213 (target_detach): Likewise.
10214 * target.c (dispose_inferior): Pass inferior down.
10215 (target_detach): Pass inferior down. Assert that it is equal to
10216 the current inferior.
10217 * aix-thread.c (aix_thread_detach): Pass inferior down.
10218 * corefile.c (core_file_command): Pass current_inferior() down.
10219 * corelow.c (core_detach): Add inferior parameter.
10220 * darwin-nat.c (darwin_detach): Likewise.
10221 * gnu-nat.c (gnu_detach): Likewise.
10222 * inf-ptrace.c (inf_ptrace_detach): Likewise.
10223 * infcmd.c (detach_command): Pass current_inferior() down to
10224 target_detach.
10225 * infrun.c (follow_fork_inferior): Pass parent_inf to
10226 target_detach.
10227 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
10228 target_detach.
10229 * linux-nat.c (linux_nat_detach): Add inferior parameter.
10230 * linux-thread-db.c (thread_db_detach): Likewise.
10231 * nto-procfs.c (procfs_detach): Likewise.
10232 * procfs.c (procfs_detach): Likewise.
10233 * record.c (record_detach): Likewise.
10234 * record.h (struct inferior): Forward-declare.
10235 (record_detach): Add inferior parameter.
10236 * remote-sim.c (gdbsim_detach): Likewise.
10237 * remote.c (remote_detach_1): Likewise.
10238 (remote_detach): Likewise.
10239 (extended_remote_detach): Likewise.
10240 * sol-thread.c (sol_thread_detach): Likewise.
10241 * target-debug.h (target_debug_print_inferior_p): New macro.
10242 * target-delegates.c: Re-generate.
10243 * top.c (kill_or_detach): Pass inferior down to target_detach.
10244 * windows-nat.c (windows_detach): Add inferior parameter.
10245
10246 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10247
10248 * target.h (struct target_ops) <to_detach>: Remove args
10249 parameter.
10250 (target_detach): Likewise.
10251 * target.c (dispose_inferior): Adjust.
10252 (target_detach): Remove args parameter, adjust.
10253 * aix-thread.c (aix_thread_detach): Adjust.
10254 * corefile.c (core_file_command): Adjust.
10255 * corelow.c (core_detach): Adjust.
10256 * darwin-nat.c (darwin_detach): Adjust.
10257 * gnu-nat.c (gnu_detach): Adjust.
10258 * inf-ptrace.c (inf_ptrace_detach): Adjust.
10259 * infcmd.c (detach_command): Adjust
10260 * infrun.c (follow_fork_inferior): Adjust.
10261 (handle_vfork_child_exec_or_exit): Adjust.
10262 * linux-fork.c (linux_fork_detach): Remove args parameter.
10263 * linux-fork.h (linux_fork_detach): Likewise.
10264 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
10265 * linux-thread-db.c (thread_db_detach): Likewise.
10266 * nto-procfs.c (procfs_detach): Likewise.
10267 * procfs.c (procfs_detach): Likewise.
10268 (do_detach): Remove signo parameter.
10269 * record.c (record_detach): Remove args parameter.
10270 * record.h (record_detach): Likewise.
10271 * remote-sim.c (gdbsim_detach): Likewise.
10272 * remote.c (remote_detach_1): Likewise.
10273 (remote_detach): Likewise.
10274 (extended_remote_detach): Likewise.
10275 * sol-thread.c (sol_thread_detach): Likewise.
10276 * target-delegates.c: Re-generate.
10277 * top.c (struct qt_args) <args>: Remove field.
10278 (kill_or_detach): Don't pass args.
10279 (quit_force): Don't set args.
10280 * windows-nat.c (windows_detach): Remove args parameter.
10281
10282 2018-01-19 Yao Qi <yao.qi@linaro.org>
10283
10284 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
10285 (arm_linux_init_abi): Install it.
10286
10287 2018-01-19 Yao Qi <yao.qi@linaro.org>
10288
10289 * osabi.c (gdb_osabi_names): Extend the regexp for
10290 arm-linux-gnueabihf.
10291
10292 2018-01-18 Yao Qi <yao.qi@linaro.org>
10293
10294 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
10295 m_abbrevs.
10296 (abbrev_table::add_abbrev): Update.
10297 (abbrev_table::lookup_abbrev): Update.
10298
10299 2018-01-18 Yao Qi <yao.qi@linaro.org>
10300
10301 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
10302
10303 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
10304
10305 * compile/compile.c (compile_to_object): Convert "triplet_rx"
10306 to "std::string".
10307
10308 2018-01-17 Tom Tromey <tom@tromey.com>
10309
10310 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
10311
10312 2018-01-17 Tom Tromey <tom@tromey.com>
10313
10314 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
10315 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
10316 (create_array_type_with_stride): Update.
10317 * dwarf2read.c (set_die_type): Update.
10318
10319 2018-01-17 Tom Tromey <tom@tromey.com>
10320
10321 * dwarf2read.c (delayed_method_info): Remove typedef.
10322 (dwarf2_cu::method_info): Now a std::vector.
10323 (add_to_method_list): Update.
10324 (free_delayed_list): Remove.
10325 (compute_delayed_physnames): Update.
10326 (process_full_comp_unit, process_full_type_unit): Clear the method
10327 list. Remove cleanups.
10328 (psymtab_include_file_name): Add name_holder parameter. Use
10329 unique_xmalloc_ptr.
10330 (dwarf_decode_lines): Update.
10331
10332 2018-01-17 Tom Tromey <tom@tromey.com>
10333 Simon Marchi <simon.marchi@ericsson.com>
10334
10335 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
10336 (dwarf2_per_objfile::free_cached_comp_units)
10337 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10338 (init_cutu_and_read_dies_no_follow): Update.
10339 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
10340 (dwarf2_cu::~dwarf2_cu): New.
10341 (free_heap_comp_unit, free_stack_comp_unit): Remove.
10342 (age_cached_comp_units, free_one_cached_comp_unit): Update.
10343
10344 2018-01-17 Tom Tromey <tom@tromey.com>
10345 Simon Marchi <simon.marchi@ericsson.com>
10346
10347 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
10348 (struct die_reader_specs) <abbrev_table>: New member.
10349 (struct abbrev_table): Add constructor.
10350 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
10351 <abbrev_obstack>: Now an auto_obstack.
10352 (abbrev_table_up): New typedef.
10353 (init_cu_die_reader): Add abbrev_table parameter.
10354 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
10355 Add result_dwo_abbrev_table.
10356 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10357 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
10358 Update.
10359 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
10360 parameter.
10361 (skip_children): Update.
10362 (abbrev_table::alloc_abbrev): Rename from
10363 abbrev_table_alloc_abbrev.
10364 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
10365 (abbrev_table::lookup_abbrev): Rename from
10366 abbrev_table_lookup_abbrev.
10367 (abbrev_table_read_table): Return abbrev_table_up.
10368 (abbrev_table_free, abbrev_table_free_cleanup)
10369 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
10370 (load_partial_dies): Update.
10371
10372 2018-01-17 Tom Tromey <tom@tromey.com>
10373
10374 * dwarf2read.c (dwarf2_compute_name): Update comment.
10375 (read_func_scope, read_variable): Update.
10376 (new_symbol): Remove.
10377 (new_symbol_full): Rename to new_symbol.
10378
10379 2018-01-17 Mike Gulick <mgulick@mathworks.com>
10380
10381 PR gdb/16577
10382 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
10383 a warning instead of throwing an error, set section size to 0 and return
10384 NULL.
10385 * gdb_bfd.h (gdb_bfd_map_section): Update description.
10386
10387 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
10388
10389 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
10390 std::string.
10391 (linux_ptrace_attach_fail_reason_string): Likewise.
10392 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
10393 Likewise.
10394 (linux_ptrace_attach_fail_reason_string): Likewise.
10395 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
10396
10397 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
10398
10399 * linux-nat.c (linux_nat_attach): Remove xstrdup.
10400
10401 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
10402
10403 PR gdb/21559
10404 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
10405 checking for fs_base/gs_base fields in struct user_regs_struct.
10406 * configure: Regenerate.
10407
10408 2018-01-17 Yao Qi <yao.qi@linaro.org>
10409
10410 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
10411 function.
10412 (aarch64_linux_init_abi): Install it to gdbarch hook
10413 gcc_target_options.
10414
10415 2018-01-15 Pedro Alves <palves@redhat.com>
10416
10417 * common/signals-state-save-restore.c
10418 (save_original_signals_state): Fix typos.
10419
10420 2017-01-12 Tom Tromey <tom@tromey.com>
10421 Sergio Durigan Junior <sergiodj@redhat.com>
10422
10423 * Makefile.in (install-only): Install gdb-add-index.
10424
10425 2018-01-12 John Baldwin <jhb@FreeBSD.org>
10426
10427 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
10428
10429 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
10430
10431 * infrun.c (keep_going_pass_signal): Clear step-over info when
10432 insert_breakpoints fails.
10433
10434 2018-01-11 Pedro Alves <palves@redhat.com>
10435
10436 PR gdb/22583
10437 * infrun.c (resume): Rename to ...
10438 (resume_1): ... this.
10439 (resume): Reimplement as wrapper around resume_1.
10440
10441 2018-01-11 Pedro Alves <palves@redhat.com>
10442
10443 PR remote/22597
10444 * remote.c (remote_parse_stop_reply): Default to the last-set
10445 general thread instead of to 'magic_null_ptid'.
10446
10447 2018-01-10 Pedro Alves <palves@redhat.com>
10448
10449 * language.h (language_get_symbol_name_matcher): Rename ...
10450 (get_symbol_name_matcher): ... this.
10451 * language.c (language_get_symbol_name_matcher): Ditto.
10452 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
10453 callers adjusted.
10454
10455 2018-01-10 Pedro Alves <palves@redhat.com>
10456
10457 PR gdb/22670
10458 * dwarf2read.c
10459 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
10460 Adjust to use language_get_symbol_name_matcher instead of
10461 language_defn::la_get_symbol_name_matcher.
10462 * language.c (language_get_symbol_name_matcher): If in Ada mode
10463 and the lookup name is a verbatim match, return Ada's matcher.
10464 * language.h (language_get_symbol_name_matcher): Adjust comment.
10465 (ada_lookup_name_info::verbatim_p):: New method.
10466
10467 2018-01-10 Pedro Alves <palves@redhat.com>
10468
10469 PR gdb/22670
10470 * ada-lang.c (ada_collect_symbol_completion_matches): If the
10471 minsym's language is language_auto or language_cplus, pass down
10472 language_ada instead.
10473 * symtab.c (compare_symbol_name): Don't frob symbol language here.
10474
10475 2018-01-10 Pedro Alves <palves@redhat.com>
10476
10477 PR gdb/22670
10478 * minsyms.c (linkage_name_str): New function.
10479 (iterate_over_minimal_symbols): Use it.
10480
10481 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10482
10483 * NEWS: Document that 'info proc' now works on FreeBSD.
10484
10485 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10486
10487 * configure.ac: Check for kinfo_getfile in libutil.
10488 * configure: Regenerate.
10489 * config.in: Regenerate.
10490 * fbsd-nat.c: Include "fbsd-tdep.h".
10491 (fbsd_fetch_cmdline): New.
10492 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
10493 rather than calling error.
10494 (fbsd_info_proc): New.
10495 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
10496 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
10497 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
10498
10499 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10500
10501 * fbsd-nat.c (struct free_deleter): Remove.
10502 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
10503
10504 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10505
10506 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
10507 NULL for an empty pathname.
10508
10509 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10510
10511 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
10512 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
10513 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
10514 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
10515 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
10516 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
10517 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
10518 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
10519 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
10520 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
10521 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
10522 (fbsd_core_fetch_timeval, fbsd_print_sigset)
10523 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
10524 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
10525 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
10526
10527 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
10528
10529 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
10530 (gnu_xfer_auxv): New function.
10531 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
10532 TARGET_OBJECT_AUXV.
10533
10534 2018-01-08 Yao Qi <yao.qi@linaro.org>
10535 Simon Marchi <simon.marchi@ericsson.com>
10536
10537 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
10538 common/selftest.c.
10539 (COMMON_OBS): Remove selftest.o.
10540 * configure.ac: Append selftest-arch.c and common/selftest.c to
10541 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
10542 * configure: Re-generated.
10543 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
10544 GDB_SELF_TEST.
10545 (maintenance_info_selftests): Likewise.
10546
10547 2018-01-08 Xavier Roirand <roirand@adacore.com>
10548
10549 * ada-valprint.c (val_print_packed_array_elements): Use
10550 proper number of elements when printing an array indexed
10551 by an enumeration type.
10552
10553 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10554
10555 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
10556 (dw2_get_file_names_reader): Adjust.
10557 (lookup_dwo_signatured_type): Adjust.
10558 (lookup_dwp_signatured_type): Adjust.
10559 (lookup_signatured_type): Adjust.
10560 (create_type_unit_group): Adjust.
10561 (get_type_unit_group): Adjust.
10562 (process_psymtab_comp_unit_reader): Adjust.
10563 (build_type_psymtabs_reader): Adjust.
10564 (scan_partial_symbols): Adjust.
10565 (add_partial_symbol): Adjust.
10566 (add_partial_subprogram): Adjust.
10567 (peek_die_abbrev): Adjust.
10568 (fixup_go_packaging): Adjust.
10569 (process_imported_unit_die): Adjust.
10570 (dwarf2_compute_name): Adjust.
10571 (dwarf2_physname): Adjust.
10572 (read_import_statement): Adjust.
10573 (handle_DW_AT_stmt_list): Adjust.
10574 (read_file_scope): Adjust.
10575 (read_func_scope): Adjust.
10576 (read_lexical_block_scope): Adjust.
10577 (read_call_site_scope): Adjust.
10578 (read_variable): Adjust.
10579 (dwarf2_rnglists_process): Adjust.
10580 (dwarf2_ranges_process): Adjust.
10581 (dwarf2_ranges_read): Adjust.
10582 (dwarf2_get_pc_bounds): Adjust.
10583 (dwarf2_record_block_ranges): Adjust.
10584 (dwarf2_add_field): Adjust.
10585 (dwarf2_add_member_fn): Adjust.
10586 (read_structure_type): Adjust.
10587 (process_structure_scope): Adjust.
10588 (read_enumeration_type): Adjust.
10589 (read_array_type): Adjust.
10590 (mark_common_block_symbol_computed): Adjust.
10591 (read_common_block): Adjust.
10592 (read_namespace_type): Adjust.
10593 (read_namespace): Adjust.
10594 (read_module_type): Adjust.
10595 (read_tag_pointer_type): Adjust.
10596 (read_tag_ptr_to_member_type): Adjust.
10597 (read_tag_string_type): Adjust.
10598 (read_subroutine_type): Adjust.
10599 (read_typedef): Adjust.
10600 (read_base_type): Adjust.
10601 (attr_to_dynamic_prop): Adjust.
10602 (read_subrange_type): Adjust.
10603 (read_unspecified_type): Adjust.
10604 (dwarf2_read_abbrevs): Adjust.
10605 (load_partial_dies): Adjust.
10606 (read_partial_die): Adjust.
10607 (find_partial_die): Adjust.
10608 (guess_partial_die_structure_name): Adjust.
10609 (fixup_partial_die): Adjust.
10610 (read_attribute_value): Adjust.
10611 (read_addr_index): Adjust.
10612 (read_addr_index_from_leb128): Adjust.
10613 (read_str_index): Adjust.
10614 (dwarf2_string_attr): Adjust.
10615 (get_debug_line_section): Adjust.
10616 (dwarf_decode_line_header): Adjust.
10617 (lnp_state_machine::check_line_address): Adjust.
10618 (dwarf_decode_lines_1): Adjust.
10619 (dwarf_decode_lines): Adjust.
10620 (dwarf2_start_symtab): Adjust.
10621 (var_decode_location): Adjust.
10622 (new_symbol_full): Adjust.
10623 (dwarf2_const_value_data): Adjust.
10624 (dwarf2_const_value_attr): Adjust.
10625 (dwarf2_const_value): Adjust.
10626 (die_type): Adjust.
10627 (die_containing_type): Adjust.
10628 (build_error_marker_type): Adjust.
10629 (lookup_die_type): Adjust.
10630 (guess_full_die_structure_name): Adjust.
10631 (anonymous_struct_prefix): Adjust.
10632 (determine_prefix): Adjust.
10633 (dwarf2_name): Adjust.
10634 (follow_die_ref_or_sig): Adjust.
10635 (follow_die_offset): Adjust.
10636 (follow_die_ref): Adjust.
10637 (follow_die_sig_1): Adjust.
10638 (follow_die_sig): Adjust.
10639 (get_signatured_type): Adjust.
10640 (get_DW_AT_signature_type): Adjust.
10641 (decode_locdesc): Adjust.
10642 (dwarf_decode_macros): Adjust.
10643 (cu_debug_loc_section): Adjust.
10644 (fill_in_loclist_baton): Adjust.
10645 (dwarf2_symbol_mark_computed): Adjust.
10646 (init_one_comp_unit): Don't assign
10647 dwarf2_cu::dwarf2_per_objfile.
10648 (set_die_type): Adjust.
10649
10650 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
10651
10652 * dwarf2read.c (struct mapped_debug_names): Add constructor.
10653 <dwarf2_per_objfile>: New field.
10654 (dwarf2_per_objfile): Remove global.
10655 (get_dwarf2_per_objfile): New function.
10656 (set_dwarf2_per_objfile): New function.
10657 (dwarf2_build_psymtabs_hard): Change objfile parameter to
10658 dwarf2_per_objfile.
10659 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
10660 (read_abbrev_offset): Likewise.
10661 (read_indirect_string): Likewise.
10662 (read_indirect_line_string): Likewise.
10663 (read_indirect_string_at_offset): Likewise.
10664 (read_indirect_string_from_dwz): Likewise.
10665 (dwarf2_find_containing_comp_unit): Change objfile parameter to
10666 dwarf2_per_objfile.
10667 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
10668 (create_all_comp_units): Change objfile parameter to
10669 dwarf2_per_objfile.
10670 (create_all_type_units): Likewise.
10671 (process_queue): Add dwarf2_per_objfile parameter.
10672 (read_and_check_comp_unit_head): Likewise.
10673 (lookup_dwo_unit_in_dwp): Likewise.
10674 (get_dwp_file): Likewise.
10675 (process_cu_includes): Likewise.
10676 (struct free_dwo_file_cleanup_data): New struct.
10677 (dwarf2_has_info): Use get_dwarf2_per_objfile and
10678 set_dwarf2_per_objfile.
10679 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
10680 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
10681 context, adjust calls.
10682 (dw2_instantiate_symtab): Likewise.
10683 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
10684 (dw2_get_cu): Likewise.
10685 (create_cu_from_index_list): Change objfile parameter to
10686 dwarf2_per_objfile.
10687 (create_cus_from_index_list): Get dwarf2_per_objfile from
10688 context, adjust calls.
10689 (create_cus_from_index): Likewise.
10690 (create_signatured_type_table_from_index): Change objfile
10691 parameter to dwarf2_per_objfile.
10692 (create_signatured_type_table_from_debug_names): Change objfile
10693 parameter to dwarf2_per_objfile.
10694 (create_addrmap_from_index): Likewise.
10695 (create_addrmap_from_aranges): Likewise.
10696 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
10697 (dw2_setup): Remove.
10698 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
10699 context.
10700 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
10701 get_dwarf2_per_objfile.
10702 (dw2_forget_cached_source_info): Likewise.
10703 (dw2_map_symtabs_matching_filename): Likewise.
10704 (struct dw2_symtab_iterator) <index>: Remove.
10705 <dwarf2_per_objfile>: New field.
10706 (dw2_symtab_iter_init): Replace index parameter with
10707 dwarf2_per_objfile.
10708 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
10709 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
10710 (dw2_print_stats): Likewise.
10711 (dw2_dump): Likewise.
10712 (dw2_expand_symtabs_for_function): Likewise.
10713 (dw2_expand_all_symtabs): Likewise.
10714 (dw2_expand_symtabs_with_fullname): Likewise.
10715 (dw2_expand_marked_cus): Replace index and objfile parameters
10716 with dwarf2_per_objfile.
10717 (dw_expand_symtabs_matching_file_matcher): Add
10718 dwarf2_per_objfile parameter and adjust calls.
10719 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
10720 adjust calls.
10721 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
10722 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
10723 adjust calls.
10724 (create_cus_from_debug_names_list): Replace objfile parameter
10725 with dwarf2_per_objfile and adjust calls.
10726 (create_cus_from_debug_names): Likewise.
10727 (dwarf2_read_debug_names): Likewise.
10728 (mapped_debug_names::namei_to_name): Adjust call.
10729 (dw2_debug_names_iterator::next): Likewise.
10730 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
10731 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
10732 (dw2_debug_names_dump): Likewise.
10733 (dw2_debug_names_expand_symtabs_for_function): Likewise.
10734 (dw2_debug_names_expand_symtabs_matching): Likewise.
10735 (dwarf2_initialize_objfile): Likewise.
10736 (dwarf2_build_psymtabs): Likewise.
10737 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
10738 this_cu.
10739 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
10740 (read_and_check_comp_unit_head): Likewise.
10741 (read_abbrev_offset): Likewise.
10742 (create_debug_type_hash_table): Likewise.
10743 (create_debug_types_hash_table): Likewise.
10744 (create_all_type_units): Replace objfile parameter with
10745 dwarf2_per_objfile.
10746 (add_type_unit): Add dwarf2_per_objfile parameter.
10747 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
10748 with dwarf2_per_objfile.
10749 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
10750 (lookup_dwp_signatured_type): Likewise.
10751 (lookup_signatured_type): Likewise.
10752 (read_cutu_die_from_dwo): Likewise.
10753 (init_tu_and_read_dwo_dies): Likewise.
10754 (init_cutu_and_read_dies): Likewise.
10755 (init_cutu_and_read_dies_no_follow): Likewise.
10756 (allocate_type_unit_groups_table): Add objfile parameter.
10757 (create_type_unit_group): Use dwarf2_per_objfile from cu.
10758 (get_type_unit_group): Likewise.
10759 (process_psymtab_comp_unit): Update call.
10760 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
10761 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
10762 (print_tu_stats): Likewise.
10763 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
10764 in void* parameter.
10765 (build_type_psymtabs): Change objfile parameter to
10766 dwarf2_per_objfile.
10767 (process_skeletonless_type_unit): Use dwarf2_per_objfile
10768 passed in void* parameter.
10769 (process_skeletonless_type_units): Change objfile parameter to
10770 dwarf2_per_objfile.
10771 (set_partial_user): Likewise.
10772 (dwarf2_build_psymtabs_hard): Likewise.
10773 (read_comp_units_from_section): Likewise.
10774 (create_all_comp_units): Likewise.
10775 (scan_partial_symbols): Update calls.
10776 (add_partial_symbol): Likewise.
10777 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
10778 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
10779 (process_queue): Add dwarf2_per_objfile parameter.
10780 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
10781 (compute_compunit_symtab_includes): Likewise.
10782 (process_cu_includes): Add dwarf2_per_objfile parameter.
10783 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
10784 (process_full_type_unit): Likewise.
10785 (process_imported_unit_die): Update call.
10786 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
10787 (read_file_scope): Likewise.
10788 (allocate_dwo_file_hash_table): Add objfile parameter.
10789 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
10790 (create_cus_hash_table): Likewise.
10791 (create_dwp_hash_table): Likewise.
10792 (create_dwo_unit_in_dwp_v1): Likewise.
10793 (create_dwp_v2_section): Likewise.
10794 (create_dwo_unit_in_dwp_v2): Likewise.
10795 (lookup_dwo_unit_in_dwp): Likewise.
10796 (try_open_dwop_file): Likewise.
10797 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
10798 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
10799 cleanup to include a reference to dwarf2_per_objfile.
10800 (open_dwp_file): Add dwarf2_per_objfile parameter.
10801 (open_and_init_dwp_file): Likewise.
10802 (get_dwp_file): Likewise.
10803 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
10804 (queue_and_load_all_dwo_tus): Update call.
10805 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
10806 data.
10807 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
10808 (dwarf2_ranges_process): Likewise.
10809 (dwarf2_get_pc_bounds): Likewise.
10810 (mark_common_block_symbol_computed): Likewise.
10811 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
10812 (dwarf2_read_abbrevs): Update call.
10813 (read_partial_die): Use dwarf2_per_objfile from cu.
10814 (find_partial_die): Likewise.
10815 (fixup_partial_die): Likewise.
10816 (read_attribute_value): Likewise.
10817 (read_indirect_string_at_offset_from): Add objfile parameter.
10818 (read_indirect_string_at_offset): Add dwarf2_per_objfile
10819 parameter.
10820 (read_indirect_string_from_dwz): Add objfile parameter.
10821 (read_indirect_string): Add objfile parameter.
10822 (read_addr_index_1): Add dwarf2_per_objfile parameter.
10823 (read_addr_index): Use dwarf2_per_objfile from cu.
10824 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
10825 call dw2_setup.
10826 (read_str_index): Use dwarf2_per_objfile from cu.
10827 (get_debug_line_section): Likewise.
10828 (read_formatted_entries): Add dwarf2_per_objfile parameter.
10829 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
10830 (new_symbol_full): Use dwarf2_per_objfile from cu.
10831 (build_error_marker_type): Likewise.
10832 (lookup_die_type): Likewise.
10833 (determine_prefix): Likewise.
10834 (follow_die_offset): Likewise.
10835 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
10836 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
10837 (dwarf2_fetch_die_type_sect_off): Likewise.
10838 (dwarf2_get_die_type): Likewise.
10839 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
10840 (get_signatured_type): Likewise.
10841 (get_DW_AT_signature_type): Likewise.
10842 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
10843 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
10844 (cu_debug_loc_section): Likewise.
10845 (fill_in_loclist_baton): Likewise.
10846 (dwarf2_symbol_mark_computed): Likewise.
10847 (dwarf2_find_containing_comp_unit): Change objfile parameter to
10848 dwarf2_per_objfile.
10849 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
10850 parameter.
10851 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
10852 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
10853 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
10854 (set_die_type): Use dwarf2_free_objfile from cu.
10855 (get_die_type_at_offset): Likewise.
10856 (dwarf2_per_objfile_free): Don't assign global variable.
10857 (debug_names) <constructor>: Add dwarf2_per_objfile
10858 parameter, update m_debugstrlookup construction.
10859 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
10860 parameter.
10861 <m_dwarf2_per_objfile>: New field.
10862 <lookup>: Use m_dwarf2_per_objfile.
10863 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
10864 (psyms_seen_size): Likewise.
10865 (write_gdbindex): Replace objfile parameter with
10866 dwarf2_per_objfile.
10867 (write_debug_names): Likewise.
10868 (write_psymtabs_to_index): Likewise.
10869 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
10870 calls.
10871
10872 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
10873
10874 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
10875 <dwarf2_per_objfile>: New field.
10876 (struct dwarf2_per_cu_data) <objfile>: Remove.
10877 <dwarf2_per_objfile>: New field.
10878 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
10879 of objfile.
10880 (create_signatured_type_table_from_index): Likewise.
10881 (create_debug_type_hash_table): Likewise.
10882 (fill_in_sig_entry_from_dwo_entry): Likewise.
10883 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
10884 (create_type_unit_group): Assign dwarf2_per_objfile instead of
10885 objfile.
10886 (create_partial_symtab): Access objfile through
10887 dwarf2_per_objfile.
10888 (process_psymtab_comp_unit_reader): Likewise.
10889 (read_comp_units_from_section): Likewise.
10890 (scan_partial_symbols): Likewise.
10891 (add_partial_symbol): Likewise.
10892 (add_partial_subprogram): Likewise.
10893 (peek_die_abbrev): Likewise.
10894 (fixup_go_packaging): Likewise.
10895 (process_full_comp_unit): Likewise.
10896 (process_full_type_unit): Likewise.
10897 (process_imported_unit_die): Likewise.
10898 (dwarf2_compute_name): Likewise.
10899 (dwarf2_physname): Likewise.
10900 (read_import_statement): Likewise.
10901 (create_cus_hash_table): Assign dwarf2_physname instead of
10902 objfile.
10903 (read_func_scope): Access objfile through dwarf2_per_objfile.
10904 (read_lexical_block_scope): Likewise.
10905 (read_call_site_scope): Likewise.
10906 (read_variable): Likewise.
10907 (dwarf2_rnglists_process): Likewise.
10908 (dwarf2_ranges_process): Likewise.
10909 (dwarf2_ranges_read): Likewise.
10910 (dwarf2_record_block_ranges): Likewise.
10911 (dwarf2_add_field): Likewise.
10912 (dwarf2_add_member_fn): Likewise.
10913 (read_structure_type): Likewise.
10914 (process_structure_scope): Likewise.
10915 (read_enumeration_type): Likewise.
10916 (read_array_type): Likewise.
10917 (read_common_block): Likewise.
10918 (read_namespace_type): Likewise.
10919 (read_namespace): Likewise.
10920 (read_module_type): Likewise.
10921 (read_tag_pointer_type): Likewise.
10922 (read_tag_ptr_to_member_type): Likewise.
10923 (read_tag_string_type): Likewise.
10924 (read_subroutine_type): Likewise.
10925 (read_typedef): Likewise.
10926 (read_base_type): Likewise.
10927 (attr_to_dynamic_prop): Likewise.
10928 (read_subrange_type): Likewise.
10929 (read_unspecified_type): Likewise.
10930 (load_partial_dies): Likewise.
10931 (read_partial_die): Likewise.
10932 (find_partial_die): Likewise.
10933 (guess_partial_die_structure_name): Likewise.
10934 (fixup_partial_die): Likewise.
10935 (read_attribute_value): Likewise.
10936 (read_addr_index_from_leb128): Likewise.
10937 (dwarf2_read_addr_index): Likewise.
10938 (dwarf2_string_attr): Likewise.
10939 (lnp_state_machine::check_line_address): Likewise.
10940 (dwarf_decode_lines_1): Likewise.
10941 (dwarf_decode_lines): Likewise.
10942 (dwarf2_start_symtab): Likewise.
10943 (var_decode_location): Likewise.
10944 (new_symbol_full): Likewise.
10945 (dwarf2_const_value_data): Likewise.
10946 (dwarf2_const_value_attr): Likewise.
10947 (dwarf2_const_value): Likewise.
10948 (die_type): Likewise.
10949 (die_containing_type): Likewise.
10950 (lookup_die_type): Likewise.
10951 (guess_full_die_structure_name): Likewise.
10952 (anonymous_struct_prefix): Likewise.
10953 (dwarf2_name): Likewise.
10954 (follow_die_ref_or_sig): Likewise.
10955 (follow_die_offset): Likewise.
10956 (follow_die_ref): Likewise.
10957 (dwarf2_fetch_die_loc_sect_off): Likewise.
10958 (dwarf2_fetch_constant_bytes): Likewise.
10959 (dwarf2_fetch_die_type_sect_off): Likewise.
10960 (dwarf2_get_die_type): Likewise.
10961 (follow_die_sig): Likewise.
10962 (decode_locdesc): Likewise.
10963 (dwarf2_per_cu_objfile): Likewise.
10964 (dwarf2_per_cu_text_offset): Likewise.
10965 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
10966 objfile.
10967 (set_die_type): Access objfile through
10968 dwarf2_per_objfile.
10969
10970 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
10971
10972 * valprint.c (converted_character_d): Remove typedef.
10973 (DEF_VEC_O (converted_character_d)): Remove.
10974 (count_next_character): Use std::vector.
10975 (print_converted_chars_to_obstack): Likewise.
10976 (generic_printstr): Likewise.
10977
10978 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10979
10980 * xml-support.h (struct gdb_xml_value): Add constructor.
10981 <value>: Change type to unique_xmalloc_ptr.
10982 (gdb_xml_value_s): Remove typedef.
10983 (DEF_VEC_O (gdb_xml_value_s)): Remove.
10984 (gdb_xml_element_start_handler): Change parameter type to
10985 std::vector.
10986 (xml_find_attribute): Likewise.
10987 * xml-support.c (xml_find_attribute): Change parameter type to
10988 std::vector and adjust.
10989 (gdb_xml_values_cleanup): Remove.
10990 (gdb_xml_parser::start_element): Adjust to std::vector.
10991 (xinclude_start_include): Change paraeter type to std::vector
10992 and adjust.
10993 * btrace.c (check_xml_btrace_version): Likewise.
10994 (parse_xml_btrace_block): Likewise.
10995 (parse_xml_btrace_pt_config_cpu): Likewise.
10996 (parse_xml_btrace_pt): Likewise.
10997 (parse_xml_btrace_conf_bts): Likewise.
10998 (parse_xml_btrace_conf_pt): Likewise.
10999 * memory-map.c (memory_map_start_memory): Likewise.
11000 (memory_map_start_property): Likewise.
11001 * osdata.c (osdata_start_osdata): Likewise.
11002 (osdata_start_item): Likewise.
11003 (osdata_start_column): Likewise.
11004 * remote.c (start_thread): Likewise.
11005 * solib-aix.c (library_list_start_library): Likewise.
11006 (library_list_start_list): Likewise.
11007 * solib-svr4.c (library_list_start_library): Likewise.
11008 (svr4_library_list_start_list): Likewise.
11009 * solib-target.c (library_list_start_segment): Likewise.
11010 (library_list_start_section): Likewise.
11011 (library_list_start_library): Likewise.
11012 (library_list_start_list): Likewise.
11013 * tracepoint.c (traceframe_info_start_memory): Likewise.
11014 (traceframe_info_start_tvar): Likewise.
11015 * xml-syscall.c (syscall_start_syscall): Likewise.
11016 * xml-tdesc.c (tdesc_start_target): Likewise.
11017 (tdesc_start_feature): Likewise.
11018 (tdesc_start_reg): Likewise.
11019 (tdesc_start_union): Likewise.
11020 (tdesc_start_struct): Likewise.
11021 (tdesc_start_flags): Likewise.
11022 (tdesc_start_enum): Likewise.
11023 (tdesc_start_field): Likewise.
11024 (tdesc_start_enum_value): Likewise.
11025 (tdesc_start_vector): Likewise.
11026
11027 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11028
11029 * extension.h (struct xmethod_worker) <clone>: Remove.
11030 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
11031 Remove.
11032 (python_xmethod_worker::clone): Remove.
11033 * valops.c (find_overload_match): Use std::move instead of
11034 clone.
11035
11036 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11037
11038 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
11039 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
11040 <free_xmethod_worker_data>: Remove.
11041 <get_matching_xmethod_workers>: Chance VEC to std::vector.
11042 <get_xmethod_arg_types>: Remove.
11043 <get_xmethod_result_type>: Remove.
11044 <invoke_xmethod>: Remove.
11045 * extension.c (new_xmethod_worker): Remove.
11046 (clone_xmethod_worker): Remove.
11047 (get_matching_xmethod_workers): Return void, pass std::vector by
11048 pointer.
11049 (get_xmethod_arg_types): Rename to...
11050 (xmethod_worker::get_arg_types): ... this, and adjust.
11051 (get_xmethod_result_type): Rename to...
11052 (xmethod_worker::get_result_type): ... this, and adjust.
11053 (invoke_xmethod): Remove.
11054 (free_xmethod_worker): Remove.
11055 (free_xmethod_worker_vec): Remove.
11056 * extension.h (enum ext_lang_rc): Move here from
11057 extension-priv.h.
11058 (struct xmethod_worker): Add constructor and destructor.
11059 <data>: Remove.
11060 <value>: Remove.
11061 <invoke, clone, do_get_result_type, do_get_arg_types>: New
11062 virtual pure methods.
11063 <get_arg_types, get_result_type>: New methods.
11064 (xmethod_worker_ptr): Remove typedef.
11065 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
11066 (xmethod_worker_vec): Remove typedef.
11067 (xmethod_worker_up): New typedef.
11068 (invoke_xmethod): Remove.
11069 (clone_xmethod_worker): Remove.
11070 (free_xmethod_worker): Remove.
11071 (free_xmethod_worker_vec): Remove.
11072 (get_xmethod_arg_types): Remove.
11073 (get_xmethod_result_type): Remove.
11074 * valops.c (find_method_list): Use std::vector, don't use
11075 intermediate vector.
11076 (value_find_oload_method_list): Use std::vector.
11077 (find_overload_match): Use std::vector.
11078 (find_oload_champ): Use std::vector.
11079 * value.c (value_free): Use operator delete.
11080 (value_of_xmethod): Rename to...
11081 (value_from_xmethod): ... this. Don't assign
11082 xmethod_worker::value, take rvalue-reference.
11083 (result_type_of_xmethod): Adjust.
11084 (call_xmethod): Adjust.
11085 * value.h: Include extension.h.
11086 (struct xmethod_worker): Don't forward-declare.
11087 (value_of_xmethod): Rename to...
11088 (value_from_xmethod): ... this, take rvalue-reference.
11089 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
11090 (struct python_xmethod_worker): ... this, add constructor and
11091 destructor.
11092 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
11093 (gdbpy_free_xmethod_worker_data): Rename to...
11094 (python_xmethod_worker::~python_xmethod_worker): ... this and
11095 adjust.
11096 (gdbpy_clone_xmethod_worker_data): Rename to...
11097 (python_xmethod_worker::clone): ... this and adjust.
11098 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
11099 temporary vector.
11100 (gdbpy_get_xmethod_arg_types): Rename to...
11101 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
11102 (gdbpy_get_xmethod_result_type): Rename to...
11103 (python_xmethod_worker::do_get_result_type): ... this and
11104 adjust.
11105 (gdbpy_invoke_xmethod): Rename to...
11106 (python_xmethod_worker::invoke): ... this and adjust.
11107 (new_python_xmethod_worker): Rename to...
11108 (python_xmethod_worker::python_xmethod_worker): ... this and
11109 adjust.
11110 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
11111 Remove.
11112 (gdbpy_free_xmethod_worker_data): Remove.
11113 (gdbpy_get_matching_xmethod_workers): Use std::vector.
11114 (gdbpy_get_xmethod_arg_types): Remove.
11115 (gdbpy_get_xmethod_result_type): Remove.
11116 (gdbpy_invoke_xmethod): Remove.
11117 * python/python.c (python_extension_ops): Remove obsolete
11118 callbacks.
11119
11120 2018-01-05 Pedro Alves <palves@redhat.com>
11121
11122 PR gdb/18653
11123 * common/signals-state-save-restore.c
11124 (save_original_signals_state): New parameter 'quiet'. Warn if we
11125 find a custom handler preinstalled, instead of internal erroring.
11126 But only warn if !quiet.
11127 * common/signals-state-save-restore.h
11128 (save_original_signals_state): New parameter 'quiet'.
11129 * main.c (captured_main_1): Move save_original_signals_state call
11130 after option handling, and pass QUIET.
11131
11132 2018-01-05 Pedro Alves <palves@redhat.com>
11133
11134 * spu-tdep.c (spu_catch_start): Pass
11135 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
11136
11137 2018-01-05 Pedro Alves <palves@redhat.com>
11138
11139 PR gdb/22670
11140 * ada-lang.c (literal_symbol_name_matcher): New function.
11141 (ada_get_symbol_name_matcher): Use it for
11142 symbol_name_match_type::SEARCH_NAME.
11143 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
11144 it down instead of assuming symbol_name_match_type::FULL.
11145 * block.h (block_lookup_symbol): New parameter 'match_type'.
11146 * c-valprint.c (print_unpacked_pointer): Use
11147 lookup_symbol_search_name instead of lookup_symbol.
11148 * compile/compile-object-load.c (get_out_value_type): Pass down
11149 symbol_name_match_type::SEARCH_NAME.
11150 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
11151 symbol_name_match_type::FULL.
11152 * cp-support.c (cp_get_symbol_name_matcher): Handle
11153 symbol_name_match_type::SEARCH_NAME.
11154 * infrun.c (insert_exception_resume_breakpoint): Use
11155 lookup_symbol_search_name.
11156 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
11157 * psymtab.c (maintenance_check_psymtabs): Use
11158 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
11159 * stack.c (print_frame_args): Use lookup_symbol_search_name and
11160 SYMBOL_SEARCH_NAME.
11161 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
11162 if symbol_name_match_type::SEARCH_NAME.
11163 (lookup_symbol_in_language): Pass down
11164 symbol_name_match_type::FULL.
11165 (lookup_symbol_search_name): New.
11166 (lookup_language_this): Pass down
11167 symbol_name_match_type::SEARCH_NAME.
11168 (lookup_symbol_aux, lookup_local_symbol): New parameter
11169 'match_type'. Pass it down.
11170 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
11171 (lookup_symbol_search_name): New declaration.
11172 (lookup_symbol_in_block): New 'match_type' parameter.
11173
11174 2018-01-05 Pedro Alves <palves@redhat.com>
11175
11176 PR gdb/22670
11177 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
11178 ada_lookup_symbol.
11179 (ada_lookup_symbol): Reimplement in terms of
11180 ada_lookup_symbol_list, bits factored out from
11181 ada_lookup_encoded_symbol.
11182
11183 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11184
11185 * ada-exp.y (write_object_renaming): When subscripting an array
11186 using a symbol as the index, pass the block in call to
11187 ada_lookup_encoded_symbol when looking that symbol up.
11188
11189 2018-01-05 Jerome Guitton <guitton@adacore.com>
11190
11191 * ada-lang.c (ada_array_length): Use ada_index_type instead of
11192 TYPE_INDEX_TYPE.
11193
11194 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11195
11196 * ada-lang.c (ada_to_fixed_value_create): Add handling of
11197 the case where VALUE_LVAL (val0) is not lval_memory.
11198
11199 2018-01-05 Xavier Roirand <roirand@adacore.com>
11200
11201 * ada-valprint.c (print_optional_low_bound): Handle
11202 character-indexed array printing like boolean-indexed array
11203 printing.
11204
11205 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11206
11207 * NEWS: Create a new section for the next release branch.
11208 Rename the section of the current branch, now that it has
11209 been cut.
11210
11211 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11212
11213 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
11214 * version.in: Bump version to 8.1.50.DATE-git.
11215
11216 2018-01-03 Xavier Roirand <roirand@adacore.com>
11217
11218 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
11219 Add field.
11220 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
11221 Add field.
11222 (default_exception_support_info) <catch_handlers_sym>: Add field.
11223 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
11224 (ada_exception_name_addr_1): Add "catch handlers" handling.
11225 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
11226 Update all callers.
11227 (create_excep_cond_exprs) <ex>: Add parameter.
11228 (re_set_exception): Update create_excep_cond_exprs call.
11229 (print_it_exception, print_one_exception, print_mention_exception)
11230 (print_recreate_exception): Add "catch handler" handling.
11231 (allocate_location_catch_handlers, re_set_catch_handlers)
11232 (check_status_catch_handlers, print_it_catch_handlers)
11233 (print_one_catch_handlers, print_mention_catch_handlers)
11234 (print_recreate_catch_handlers): New function.
11235 (catch_handlers_breakpoint_ops): New variable.
11236 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
11237 Add parameter. Add "catch handler" handling.
11238 (ada_exception_sym_name, ada_exception_breakpoint_ops):
11239 Add "catch handler" handling.
11240 (ada_exception_catchpoint_cond_string): Add "catch handler"
11241 handling.
11242 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
11243 call.
11244 (catch_ada_handlers_command): New function.
11245 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
11246 operations structure.
11247 (_initialize_ada_language): Add "catch handlers" command entry.
11248 * NEWS: Document "catch handlers" feature.
11249
11250 2018-01-02 Joel Brobecker <brobecker@adacore.com>
11251
11252 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
11253 account when creating the array type of the slice.
11254 (ada_value_slice): Likewise.
11255
11256 2018-01-02 Joel Brobecker <brobecker@adacore.com>
11257
11258 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
11259 New enum value.
11260 (create_array_type_with_stride): Add byte_stride_prop parameter.
11261 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
11262 New parameter. Update all callers in this file.
11263 (array_type_has_dynamic_stride): New function.
11264 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
11265 of arrays with dynamic byte strides.
11266 * dwarf2read.c (read_array_type): Add support for dynamic
11267 DW_AT_byte_stride attributes.
11268
11269 2018-01-02 Joel Brobecker <brobecker@adacore.com>
11270
11271 * dwarf2read.c (read_unspecified_type): Treat
11272 DW_TAG_enumeration_type DIEs from Ada units as stubs.
11273
11274 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11275
11276 Update copyright year range in all GDB files.
11277
11278 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11279
11280 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
11281 and gdb/testsuite/gdb.base/step-line.c.
11282
11283 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11284
11285 * copyright.py (main): Dump the contents of
11286 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
11287 even if BY_HAND is empty.
11288
11289 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11290
11291 * top.c (print_gdb_version): Update Copyright year in version
11292 message.
11293
11294 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11295
11296 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
11297
11298 For older changes see ChangeLog-2017.
11299 \f
11300 Local Variables:
11301 mode: change-log
11302 left-margin: 8
11303 fill-column: 74
11304 version-control: never
11305 coding: utf-8
11306 End:
This page took 0.245094 seconds and 5 git commands to generate.