Improve objcopy's ability to merge build notes.
[deliverable/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
3e1d3d8c
TT
12018-08-02 Tom Tromey <tom@tromey.com>
2
3 PR symtab/16842.
4 * dwarf2read.c (read_func_scope): Set symtab on template parameter
5 symbols.
6 (process_structure_scope): Likewise.
7
15843549
XR
82018-08-02 Xavier Roirand <roirand@adacore.com>
9
10 PR gdb/22629:
11 * darwin-nat.c (darwin_kill_inferior): Fix handling of
12 kill inferior.
13
b5bddbbb
TT
142018-08-02 Tom Tromey <tom@tromey.com>
15
16 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
17 (darwin_suspend_inferior, darwin_resume_inferior)
18 (darwin_decode_notify_message, darwin_resume_inferior_threads)
19 (darwin_check_new_threads): Check result of get_darwin_inferior.
20
f61cfa07
JB
212018-07-31 Joel Brobecker <brobecker@adacore.com>
22
23 GDB 8.1.1 released.
24
5abe0f0c
JV
252018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
26
27 * varobj.c (varobj_get_path_expr_parent): Report an error if
28 parent is a dynamic varobj.
29
472fa5ee
SM
302018-07-31 Simon Marchi <simon.marchi@ericsson.com>
31
32 * gnulib/aclocal.m4: Re-generate.
33 * gnulib/config.in: Re-generate.
34 * gnulib/configure: Re-generate.
35 * gnulib/import/Makefile.in: Re-generate.
36 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
37 * gnulib/import/m4/onceonly.m4: Re-generate.
38
1c28969e
SM
392018-07-31 Simon Marchi <simon.marchi@ericsson.com>
40
41 * target-descriptions.c (struct xml_test_tdesc): New.
42 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
43 (record_xml_tdesc): Update.
44 (maintenance_check_xml_descriptions): Update.
45 * target-descriptions.h (record_xml_tdesc): Update comment.
46
c8f2dc0d
AB
472018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
48
49 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
50 checking array bounds are defined.
51
463c08d1
TT
522018-07-30 Tom Tromey <tom@tromey.com>
53
54 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
55 irreflexivity violation.
56
dba7455e
TT
572018-07-30 Tom Tromey <tom@tromey.com>
58
59 * cli/cli-decode.c (lookup_cmd): Remove lint code.
60 * value.c (unpack_long): Remove lint code.
61 * valops.c (value_ind): Remove lint code.
62 * valarith.c (value_x_binop, value_x_unop, value_equal)
63 (value_pos): Remove lint code.
64
37cc0cae
TV
652018-07-28 Tom de Vries <tdevries@suse.de>
66
67 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
68 with undefined upper bound as <optimized out>.
69
129eb0f1
SDJ
702018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
71
72 * gcore.in: Rename variable "name" to "prefix". Expand
73 "usage" text.
74
6af79d7b
JT
752018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
76
77 * windows-nat.c (windows_nat_target::create_inferior): Update to
78 call close() in global namespace.
79
79748972
TT
802018-07-26 Tom Tromey <tom@tromey.com>
81
82 * dwarf-index-write.c (add_address_entry): Don't add objfile
83 offsets.
84 * dbxread.c (find_stab_function): Rename from
85 find_stab_function_addr. Return a bound_minimal_symbol.
86 (read_dbx_symtab): Use raw_text_low, raw_text_high.
87 Don't add objfile offsets.
88 (end_psymtab): Use raw_text_low, raw_text_high,
89 MSYMBOL_VALUE_RAW_ADDRESS.
90 (read_ofile_symtab): Update.
91 (process_one_symbol): Update.
92 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
93 offsets.
94 (dw2_relocate): Remove.
95 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
96 searching addrmap.
97 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
98 Update.
99 (process_psymtab_comp_unit_reader, add_partial_symbol)
100 (add_partial_subprogram, dwarf2_ranges_read): Update.
101 (load_partial_dies): Update.
102 (add_address_entry): Don't add objfile offsets.
103 (dwarf2_build_include_psymtabs): Update.
104 (create_addrmap_from_aranges): Don't add objfile offsets.
105 (dw2_find_pc_sect_compunit_symtab): Update.
106 * mdebugread.c (parse_symbol): Don't add objfile offsets.
107 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
108 Update.
109 (parse_partial_symbols): Don't add objfile offsets. Use
110 raw_text_low, raw_text_high. Update.
111 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
112 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
113 or call 'relocate' quick function. Clear psymbol_map.
114 * psympriv.h (struct partial_symbol) <address>: Add section
115 offset.
116 <set_unrelocated_address>: Rename from set_address.
117 <raw_text_low, raw_text_high>: New methods.
118 <text_low, text_high>: Add objfile parameter.
119 (add_psymbol_to_bcache): Add 'section' parameter. Call
120 set_unrelocated_address.
121 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
122 (find_pc_psymbol): Update.
123 (fixup_psymbol_section, relocate_psymtabs): Remove.
124 (dump_psymtab, psym_functions): Update.
125 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
126 parameter.
127 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
128 (start_psymtab_common): Update.
129 * symfile-debug.c (debug_qf_relocate): Remove.
130 (debug_sym_quick_functions): Update.
131 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
132 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
133 Update.
134
52948f01
TT
1352018-07-26 Tom Tromey <tromey@redhat.com>
136
137 * dbxread.c (end_psymtab): Use text_high_valid and
138 text_low_valid.
139 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
140 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
141 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
142 Update comment.
143 <text_low_valid, text_high_valid>: New fields.
144 <set_text_low, set_text_high>: Update.
145 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
146
4ae976d1
TT
1472018-07-26 Tom Tromey <tom@tromey.com>
148
149 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
150 Update.
151 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
152 textlow and texthigh fields.
153 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
154 Update.
155 * mdebugread.c (parse_lines, parse_partial_symbols)
156 (psymtab_to_symtab_1): Update.
157 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
158 Rename fields. Update comment. Now private.
159 <text_low, text_high, set_text_low, set_text_high>: New methods.
160 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
161 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
162 (start_psymtab_common, maintenance_info_psymtabs)
163 (maintenance_check_psymtabs): Update.
164 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
165 texthigh fields.
166 (scan_xcoff_symtab): Update.
167
02e9e7f7
TT
1682018-07-26 Tom Tromey <tromey@redhat.com>
169
170 * psympriv.h (struct partial_symbol) <unrelocated_address,
171 address, set_address>: New methods.
172 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
173 (fixup_psymbol_section, relocate_psymtabs): Update.
174 (print_partial_symbols): Add 'objfile' parameter. Update.
175 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
176 Update.
177
8a6d4234
TT
1782018-07-26 Tom Tromey <tom@tromey.com>
179
180 * dwarf-index-write.c (write_psymbols, debug_names::insert)
181 (debug_names::write_psymbols): Update.
182 * psympriv.h (struct partial_symbol): Derive from
183 general_symbol_info.
184 <obj_section>: New method.
185 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
186 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
187 (find_pc_sect_psymbol, fixup_psymbol_section)
188 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
189 (print_partial_symbols, recursively_search_psymtabs)
190 (compare_psymbols, psymbol_hash, psymbol_compare)
191 (add_psymbol_to_bcache, maintenance_check_psymtabs)
192 (psymbol_name_matches, psym_fill_psymbol_map): Update.
193
08994e1d
TT
1942018-07-26 Tom Tromey <tromey@redhat.com>
195
196 * dbxread.c (end_psymtab): Remove dead code.
197
3c3bb058
AB
1982018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
199
200 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
201 DWARF unwinders are disabled.
202 * dwarf2-frame.c: Add dwarf2read.h include.
203 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
204 disabled.
205 (dwarf2_frame_unwinders_enabled_p): Define.
206 (show_dwarf_unwinders_enabled_p): New function.
207 (_initialize_dwarf2_frame): Register switch to control DWARF
208 unwinder use.
209 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
210 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
211 (show_dwarf_cmdlist): Remove static keyword.
212 * dwarf2read.h (set_dwarf_cmdlist): Declare.
213 (show_dwarf_cmdlist): Declare.
214 * NEWS: Document new feature.
215
9e7f3bbb
TV
2162018-07-26 Tom de Vries <tdevries@suse.de>
217
218 PR breakpoints/23366
219 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
220
506f5c41
TV
2212018-07-26 Tom de Vries <tdevries@suse.de>
222
223 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
224 DW_AT_count can't be translated to a dynamic prop.
225
16f808ec
TV
2262018-07-25 Tom de Vries <tdevries@suse.de>
227
228 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
229 try/catch.
230
d7154a8d
JV
2312018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
232
233 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
234
a45389f6
JB
2352018-07-25 Joel Brobecker <brobecker@adacore.com>
236
237 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
238
380618d6
KS
2392018-07-24 Keith Seitz <keiths@redhat.comt
240
241 PR symtab/23010
242 * dwarf2read.c (dw2_add_symbol_to_list): New function.
243 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
244 instead of add_symbol_to_list.
245 (read_file_scope): Call prepare_one_comp_unit before reading
246 any other DIEs.
247
4b17aefe
SM
2482018-07-24 Simon Marchi <simon.marchi@ericsson.com>
249
250 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
251
29d17e47
TT
2522018-07-24 Tom Tromey <tom@tromey.com>
253
254 * utils.c (malloc, realloc, free): Don't declare.
255 * configure, config.in: Rebuild.
256 * configure.ac: Don't check for declarations of free, malloc, or
257 realloc.
258
cf4088a9
SM
2592018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
260
261 * aarch64-linux-nat.c
262 (aarch64_linux_nat_target::stopped_data_address): Remove unused
263 variable.
264 * arm-linux-nat.c (fetch_regs): Likewise.
265 (store_regs): Likewise.
266 (fetch_vfp_regs): Likewise.
267 (store_vfp_regs): Likewise.
268 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
269 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
270 (arm_linux_nat_target::insert_watchpoint): Likewise.
271 (arm_linux_nat_target::remove_watchpoint): Likewise.
272 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
273 Likewise.
274 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
275 Likewise.
276 * ppc-linux-nat.c (fetch_register): Likewise.
277 (fetch_all_gp_regs): Likewise.
278 (fetch_ppc_registers): Likewise.
279 (store_all_gp_regs): Likewise.
280 (store_ppc_registers): Likewise.
281 (hwdebug_insert_point): Likewise.
282 (can_use_watchpoint_cond_accel): Likewise.
283 * remote-sim.c (gdb_os_write_stdout): Likewise.
284
a0de763e
TT
2852018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
286 Tom Tromey <tom@tromey.com>
287
288 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
289 test for it.
290 * configure: Rebuild.
291
3b20124b
TT
2922018-07-22 Tom Tromey <tom@tromey.com>
293
294 * regformats/regdat.sh: Define xmltarget_${name} inside
295 #ifndef IN_PROCESS_AGENT.
296
8c8807f4
TT
2972018-07-22 Tom Tromey <tom@tromey.com>
298
299 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
300
c486b610
TT
3012018-07-22 Tom Tromey <tom@tromey.com>
302
303 * symfile.c (reread_symbols): Notify iter, not objfile.
304
494f80a9
TT
3052018-07-22 Tom Tromey <tom@tromey.com>
306
307 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
308 Use arch_ops.
309 (ravenscar_thread_target::prepare_to_store): Likewise.
310
c51f6a54
TT
3112018-07-22 Tom Tromey <tom@tromey.com>
312
313 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
314 unused variable. Call value_fetch_lazy when needed.
315 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
316 Remove unused variable. Call value_fetch_lazy when needed.
317
374fd1fd
TT
3182018-07-22 Tom Tromey <tom@tromey.com>
319
320 * m32c-tdep.c (mark_dma): Return void.
321 (make_regs): Remove unused declarations.
322
d5e9a511
TT
3232018-07-22 Tom Tromey <tom@tromey.com>
324
325 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
326 cmdscm_get_valid_command_smob_arg_unsafe for effect.
327 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
328 bkscm_get_valid_block_smob_arg_unsafe for effect.
329
996d693a
TT
3302018-07-22 Tom Tromey <tom@tromey.com>
331
332 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
333 value_type.
334
15766370
TT
3352018-07-22 Tom Tromey <tom@tromey.com>
336
337 * windows-nat.c (saved_context): Conditionally define.
338 * remote.c (remote_target::remote_btrace_maybe_reopen):
339 Conditionally declare "warned".
340 * inflow.c (sigquit_ours): Conditionally define.
341 (new_tty): Move "tty" declaration inside #if.
342 * guile/guile.c (guile_datadir): Conditionally define.
343 * charset.c (set_be_le_names): Move some declarations inside #if.
344 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
345 #if.
346 (parse_xml_btrace_conf): Likewise.
347
f4e80e13
TT
3482018-07-22 Tom Tromey <tom@tromey.com>
349
350 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
351
8d49165d
TT
3522018-07-22 Tom Tromey <tom@tromey.com>
353
354 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
355 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
356 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
357 * buildsym-legacy.c (get_macro_table): Remove unused variable.
358 * stack.c (frame_apply_level_command): Remove unused variable.
359 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
360 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
361 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
362 unused variable.
363 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
364 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
365 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
366 variable.
367 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
368 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
369 variable.
370 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
371 Remove unused variable.
372 * cli/cli-script.c (recurse_read_control_structure): Remove unused
373 variable.
374 * common/tdesc.c (print_xml_feature::visit): Remove unused
375 variable.
376 * compile/compile-object-load.c (store_regs): Remove unused
377 variables.
378 * complaints.c (clear_complaints): Remove unused variable.
379 * corelow.c (core_target_open): Remove unused variable.
380 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
381 variable.
382 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
383 variable.
384 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
385 variable.
386 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
387 variable.
388 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
389 variable.
390 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
391 variable.
392 * ia64-tdep.c (examine_prologue): Remove unused variable.
393 * infcall.c (run_inferior_call): Remove unused variable.
394 * inferior.c (exit_inferior): Remove unused variable.
395 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
396 * linespec.c (decode_line_2): Remove unused variable.
397 * linux-nat.c (super_close): Remove.
398 * linux-tdep.c (linux_info_proc): Remove unused variable.
399 * mi/mi-main.c (mi_execute_command): Remove unused variable.
400 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
401 Remove unused variable.
402 * parse.c (find_minsym_type_and_address): Remove unused variable.
403 * printcmd.c (info_symbol_command, printf_floating): Remove unused
404 variable.
405 * python/py-breakpoint.c (bppy_set_commands): Remove unused
406 variable.
407 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
408 variables.
409 * record-btrace.c (record_btrace_target::store_registers): Remove
410 unused variable.
411 (cmd_show_record_btrace_cpu): Remove unused variable.
412 * riscv-tdep.c (riscv_register_reggroup_p)
413 (riscv_push_dummy_call, riscv_return_value): Remove unused
414 variable.
415 * rust-exp.y (literal): Remove unused variable.
416 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
417 unused variable.
418 <STRUCTOP_ANONYMOUS>: Likewise.
419 * s390-linux-tdep.c (s390_linux_init_abi_31)
420 (s390_linux_init_abi_64): Remove unused variable.
421 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
422 (file_select_thread, net_windows_open, _initialize_ser_windows):
423 Remove unused variables.
424 * symtab.c (find_pc_sect_line): Remove unused variable.
425 * target-memory.c (compute_garbled_blocks): Remove unused
426 variable.
427 (target_write_memory_blocks): Remove unused variable.
428 * target.c (target_stack::unpush): Remove unused variables.
429 * tracepoint.c (start_tracing, all_tracepoint_actions)
430 (merge_uploaded_trace_state_variables)
431 (print_one_static_tracepoint_marker): Remove unused variable.
432 * unittests/basic_string_view/element_access/char/1.cc (test01):
433 Remove unused variable.
434 * windows-nat.c (windows_continue, windows_add_all_dlls)
435 (do_initial_windows_stuff, windows_nat_target::create_inferior):
436 Remove unused variables.
437
17cbafdb
SM
4382018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
439
440 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
441 attr_profile in HAVE_ELF.
442 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
443 HAVE_ELF.
444
0ee6c332
SM
4452018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
446
447 * frame.c (frame_register_unwind): Change parameter name.
448 (frame_unwind_register): Likewise.
449 (frame_unwind_register_value): Likewise.
450 (frame_unwind_register_signed): Likewise.
451 (frame_unwind_register_unsigned): Likewise.
452 * frame.h (frame_register_unwind): Likewise.
453 (frame_unwind_register): Likewise.
454 (frame_unwind_register_value): Likewise.
455 (frame_unwind_register_signed): Likewise.
456 (frame_unwind_register_unsigned): Likewise.
457 (frame_unwind_arch): Likewise.
458
e2e31f10
MR
4592018-07-20 Maciej W. Rozycki <macro@mips.com>
460
461 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
462 ISA maintenance.
463
2d389915
MR
4642018-07-20 Maciej W. Rozycki <macro@mips.com>
465
466 * mips-linux-nat.c (mips_linux_nat_target::read_description):
467 Call `get_ptrace_pid' rather than extracting the ptrace PID by
468 hand.
469
cbb09508
KS
4702018-07-20 Keith Seitz <keiths@redhat.com>
471
472 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
473 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
474 m_compunit_symtab, m_language>: Add "m_" prefix.
475 Update all uses.
476 * buildsym.c: Update all uses.
477
bfe2e011
TT
4782018-07-20 Tom Tromey <tom@tromey.com>
479
480 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
481 * buildsym.h (record_line_ftype): Remove typedef.
482
0e6f3061
TT
4832018-07-20 Tom Tromey <tom@tromey.com>
484
485 * buildsym-legacy.h (augment_type_symtab): Don't declare.
486 (end_expandable_symtab): Likewise.
487 (end_symtab_get_static_block): Likewise.
488 (end_symtab_from_static_block): Likewise.
489 * buildsym-legacy.c (augment_type_symtab): Remove.
490 (end_expandable_symtab): Remove.
491 (end_symtab_get_static_block): Remove.
492 (end_symtab_from_static_block): Remove.
493
804d2729
TT
4942018-07-20 Tom Tromey <tom@tromey.com>
495
496 * dwarf2read.c: Include buildsym.h.
497 (struct dwarf2_cu) <builder>: New method.
498 (fixup_go_packaging): Update.
499 (process_full_comp_unit, process_full_type_unit): Update. Don't
500 use scoped_free_pendings.
501 (using_directives): Add "cu" parameter, remove "language".
502 (read_import_statement, setup_type_unit_groups, )
503 (read_func_scope, read_lexical_block_scope)
504 (dwarf2_record_block_ranges, read_namespace): Update.
505 (lnp_state_machine::lnp_state_machine): Add cu parameter.
506 (lnp_state_machine::handle_end_sequence): Update.
507 (class lnp_state_machine) <m_cu>: New member.
508 <m_record_line_callback>: Remove.
509 <m_currently_recording_lines>: New member.
510 (lnp_state_machine::handle_set_file): Update.
511 (noop_record_line): Remove.
512 (dwarf_record_line_p): Add cu parameter.
513 (dwarf_record_line_1, dwarf_finish_line): Likewise.
514 (lnp_state_machine::record_line)
515 (lnp_state_machine::lnp_state_machine)
516 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
517 (dwarf_decode_lines): Update.
518 (dwarf2_start_subfile): Add cu parameter.
519 (dwarf2_start_symtab, new_symbol): Update.
520 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
521 Remove dwarf2_per_objfile parameter.
522 (dwarf_decode_macros): Update.
523
80e649fc
TT
5242018-07-20 Tom Tromey <tom@tromey.com>
525
526 * stabsread.c (define_symbol): Update.
527 * buildsym-legacy.h (get_buildsym_compunit): Declare.
528 * dwarf2read.c (new_symbol): Update.
529 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
530 * cp-namespace.c: Include buildsym.h.
531 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
532 * buildsym-legacy.c (get_buildsym_compunit): New function.
533
0baae8db
TT
5342018-07-20 Tom Tromey <tom@tromey.com>
535
536 * xcoffread.c: Include buildsym-legacy.h.
537 * windows-nat.c: Include buildsym-legacy.h.
538 * stabsread.c: Include buildsym-legacy.h.
539 * mdebugread.c: Include buildsym-legacy.h.
540 * buildsym-legacy.h: New file.
541 * buildsym-legacy.c: New file, from buildsym.c.
542 * go32-nat.c: Include buildsym-legacy.h.
543 * dwarf2read.c: Include buildsym-legacy.h.
544 * dbxread.c: Include buildsym-legacy.h.
545 * cp-namespace.c: Include buildsym-legacy.h.
546 * coffread.c: Include buildsym-legacy.h.
547 * buildsym.h: Move some contents to buildsym-legacy.h.
548 * buildsym.c: Include buildsym-legacy.h. Move many functions to
549 buildsym-legacy.c.
550 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
551
ab209f6f
TT
5522018-07-20 Tom Tromey <tom@tromey.com>
553
554 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
555 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
556 (buildsym_compunit::buildsym_compunit)
557 (buildsym_compunit::~buildsym_compunit)
558 (buildsym_compunit::get_macro_table): Define.
559
74c72eac
TT
5602018-07-20 Tom Tromey <tom@tromey.com>
561
562 * buildsym.c (reset_symtab_globals): Remove.
563 (buildsym_compunit::end_symtab_from_static_block): Update.
564 (buildsym_compunit::augment_type_symtab): Update.
565 (end_symtab_from_static_block): Call free_buildsym_compunit.
566 (augment_type_symtab, end_symtab, end_expandable_symtab):
567 Likewise.
568
da6580e5
TT
5692018-07-20 Tom Tromey <tom@tromey.com>
570
571 * arch-utils.c: Do not include buildsym.h.
572 * mipsread.c: Do not include buildsym.h.
573 * machoread.c: Do not include buildsym.h.
574 * elfread.c: Do not include buildsym.h.
575
4a2125f5
TT
5762018-07-20 Tom Tromey <tom@tromey.com>
577
578 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
579 initialization.
580 (buildsym_compunit): Add new constructor.
581 (struct buildsym_compunit) <get_last_source_file, finish_block,
582 record_block_range, start_subfile, patch_subfile_names,
583 push_subfile, pop_subfile, record_line, get_compunit_symtab,
584 set_last_source_start_addr, get_last_source_start_addr,
585 get_local_using_directives, set_local_using_directives,
586 get_global_using_directives, outermost_context_p,
587 get_current_context_stack, get_context_stack_depth,
588 get_current_subfile, get_local_symbols, get_file_symbols,
589 get_global_symbols, record_debugformat, record_producer,
590 push_context, pop_context, end_symtab_get_static_block,
591 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
592 New public methods.
593 <record_pending_block, finish_block_internal, make_blockvector,
594 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
595 private methods.
596 Update all users.
597
5982018-05-22 Tom Tromey <tom@tromey.com>
599
600 * buildsym.c (record_pending_block): Move earlier. Remove objfile
601 parameter.
602 (finish_block_internal): Update.
603
6b213a47
TT
6042018-07-20 Tom Tromey <tom@tromey.com>
605
606 * buildsym.c (record_pending_block): Move earlier. Remove objfile
607 parameter.
608 (finish_block_internal): Update.
609
b80a981d
TT
6102018-07-20 Tom Tromey <tom@tromey.com>
611
612 * buildsym.h (EXTERN): Don't define or undef.
613 * buildsym.c (EXTERN): Don't define.
614
ddb70602
TT
6152018-07-20 Tom Tromey <tom@tromey.com>
616
617 * buildsym.c: Remove TODO comment.
618
b37dd3bc
TT
6192018-07-20 Tom Tromey <tom@tromey.com>
620
621 * coffread.c (coff_symtab_read): Update.
622 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
623 (xcoff_new_init): Update.
624 * mipsread.c (mipscoff_new_init): Update.
625 * mdebugread.c (mdebug_build_psymtabs): Update.
626 * elfread.c (elf_new_init): Update.
627 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
628 Update.
629 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
630 (coffstab_build_psymtabs, elfstab_build_psymtabs)
631 (stabsect_build_psymtabs): Update.
632 * buildsym.h (buildsym_init): Don't declare.
633 * buildsym.c: Update comment.
634 (prepare_for_building): Remove.
635 (start_symtab, restart_symtab): Update.
636 (reset_symtab_globals): Update comment.
637 (buildsym_init): Remove.
638
e148f09d
TT
6392018-07-20 Tom Tromey <tom@tromey.com>
640
641 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
642 * stabsread.c (patch_block_stabs, define_symbol, read_type)
643 (read_enum_type, common_block_start, common_block_end)
644 (cleanup_undefined_types_1, finish_global_stabs): Update.
645 * mdebugread.c (psymtab_to_symtab_1): Update.
646 * dwarf2read.c (fixup_go_packaging, read_func_scope)
647 (read_lexical_block_scope, new_symbol): Update.
648 * dbxread.c (process_one_symbol): Update.
649 * coffread.c (coff_symtab_read, process_coff_symbol)
650 (coff_read_enum_type): Update.
651 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
652 declare.
653 (get_local_symbols, get_file_symbols, get_global_symbols): New
654 functions.
655 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
656 m_global_symbols.
657 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
658 (~scoped_free_pendings): Update.
659 (finish_block, prepare_for_building, reset_symtab_globals)
660 (end_symtab_get_static_block, end_symtab_with_blockvector)
661 (augment_type_symtab, push_context): Update.
662 (get_local_symbols, get_file_symbols, get_global_symbols): New
663 functions.
664 (buildsym_init): Update.
665
93b8bea4
TT
6662018-07-20 Tom Tromey <tom@tromey.com>
667
668 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
669 (process_full_type_unit): Likewise.
670 (dwarf2_start_symtab): Set list_in_scope.
671
f62f6af5
TT
6722018-07-20 Tom Tromey <tom@tromey.com>
673
674 * dwarf2read.c (process_psymtab_comp_unit_reader)
675 (build_type_psymtabs_reader): Do not set list_in_scope.
676
1d376700
TT
6772018-07-20 Tom Tromey <tom@tromey.com>
678
679 * buildsym.c (free_pendings): Remove.
680 (add_symbol_to_list, scoped_free_pendings)
681 (finish_block_internal, buildsym_init): Update.
682
c233e9c6
TT
6832018-07-20 Tom Tromey <tom@tromey.com>
684
685 * xcoffread.c (read_xcoff_symtab): Update.
686 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
687 Update.
688 * dbxread.c (process_one_symbol): Update.
689 * coffread.c (coff_symtab_read): Update.
690 * buildsym.h (finish_block): Update.
691 * buildsym.c (finish_block): Remove "listhead" argument.
692 (end_symtab_get_static_block): Update.
693
5ac04550
TT
6942018-07-20 Tom Tromey <tom@tromey.com>
695
696 * buildsym.h (class scoped_free_pendings): Remove constructor.
697 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
698 method.
699 <m_pending_block_obstack, m_pending_blocks>: New members.
700 (pending_block_obstack, pending_blocks): Remove.
701 (scoped_free_pendings::scoped_free_pendings): Default.
702 (~scoped_free_pendings): Update.
703 (free_pending_blocks): Remove.
704 (finish_block_internal, record_pending_block, make_blockvector)
705 (end_symtab_get_static_block, augment_type_symtab, push_context)
706 (buildsym_init): Update.
707
7ea05a7b
TT
7082018-07-20 Tom Tromey <tom@tromey.com>
709
710 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
711 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
712 members.
713 (pending_addrmap, pending_addrmap_obstack)
714 (pending_addrmap_interesting): Remove.
715 (scoped_free_pendings, record_block_range, make_blockvector)
716 (prepare_for_building, reset_symtab_globals, buildsym_init):
717 Update.
718
3c65e5b3
TT
7192018-07-20 Tom Tromey <tom@tromey.com>
720
721 * xcoffread.c (process_linenos): Update.
722 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
723 * mdebugread.c (psymtab_to_symtab_1): Update.
724 * dwarf2read.c (setup_type_unit_groups)
725 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
726 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
727 * dbxread.c (process_one_symbol): Update.
728 * coffread.c (coff_symtab_read, enter_linenos)
729 (process_coff_symbol): Update.
730 * buildsym.h (current_subfile): Don't declare.
731 (get_current_subfile): Declare.
732 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
733 member.
734 (start_subfile, free_buildsym_compunit, push_subfile)
735 (prepare_for_building, start_symtab): Update.
736 (get_current_subfile): New function.
737
a60f3166
TT
7382018-07-20 Tom Tromey <tom@tromey.com>
739
740 * coffread.c (coff_symtab_read): Update.
741 * xcoffread.c (read_xcoff_symtab): Update.
742 * dwarf2read.c (new_symbol): Update.
743 (read_func_scope, read_lexical_block_scope): Update.
744 * dbxread.c (process_one_symbol): Update.
745 * buildsym.h (context_stack, context_stack_depth): Don't declare.
746 (outermost_context_p): Remove macro.
747 (outermost_context_p, get_current_context_stack)
748 (get_context_stack_depth): Declare.
749 (pop_context): Return struct context_stack.
750 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
751 member.
752 (context_stack_size): Remove.
753 (INITIAL_CONTEXT_STACK_SIZE): Remove.
754 (prepare_for_building, end_symtab_get_static_block)
755 (augment_type_symtab, push_context): Update.
756 (pop_context): Return struct context_stack.
757 (outermost_context_p, get_current_context_stack)
758 (get_context_stack_depth): New functions.
759 (buildsym_init): Update.
760
56ba65a0
TT
7612018-07-20 Tom Tromey <tom@tromey.com>
762
763 * rust-exp.y: Now a pure parser. Update all rules.
764 (%union): Move earlier.
765 (current_parser, work_obstack): Remove globals.
766 (rust_parser, ~rust_parser): Update.
767 (class rust_parser) <copy_name, concat3, crate_name, super_name,
768 lex_character, lex_number, lex_string, lex_identifier,
769 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
770 convert_name, convert_params_to_expression,
771 convert_ast_to_expression, ast_basic_type, ast_operation,
772 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
773 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
774 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
775 ast_array_type, ast_slice_type, ast_reference_type,
776 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
777 (rust_parse): Update.
778 (rustyyerror, rustyylex): Add parser parameter.
779 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
780 (rust_lex_stringish_test, rust_lex_test_sequence)
781 (rust_lex_test_trailing_dot, rust_lex_test_completion)
782 (rust_lex_test_push_back, rust_lex_tests): Update.
783
4c693332
PA
7842018-07-19 Pedro Alves <palves@redhat.com>
785
786 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
787 gdb::unique_xmalloc_ptr.
788 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
789 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
790 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
791 copy-initialization.
792 * guile/scm-pretty-print.c (ppscm_print_children): Use
793 gdb::unique_xmalloc_ptr instead of cleanups.
794 (gdbscm_apply_val_pretty_printer): Remove cleanups.
795 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
796 gdb::unique_xmalloc_ptr.
797 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
798 Adjust to use gdb::unique_xmalloc_ptr.
799 * guile/scm-utils.c (extract_arg): Adjust.
800 * guile/scm-value.c (gdbscm_value_field): Adjust to use
801 gdb::unique_xmalloc_ptr instead of a cleanup.
802
4581dc82
TT
8032018-07-19 Tom Tromey <tom@tromey.com>
804
805 * utils.c (do_value_free_to_mark)
806 (make_cleanup_value_free_to_mark): Remove.
807 * utils.h (make_cleanup_value_free_to_mark): Remove.
808
43cc6c3a
PA
8092018-07-19 Pedro Alves <palves@redhat.com>
810
811 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
812 forwarding reference.
813
3a5f2a48
PA
8142018-07-18 Pedro Alves <palves@redhat.com>
815
816 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
817 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
818 cleanup.
819
557e56be
PA
8202018-07-18 Pedro Alves <palves@redhat.com>
821
822 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
823 exceptions.
824 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
825 (gdbscm_wrap): New.
826 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
827 directly instead of a cleanup.
828 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
829 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
830 (vlscm_binop_gdbthrow): New, factored out from ...
831 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
832 (vlscm_rich_compare): Use gdbscm_wrap.
833 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
834 instead of a cleanup.
835 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
836 cleanup.
837 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
838 Use xfree directly instead of a cleanup.
839 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
840 Adjust to use gdbscm_wrap and scoped_value_mark.
841 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
842 (gdbscm_value_address, gdbscm_value_dereference)
843 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
844 scoped_value_mark.
845 (gdbscm_value_dynamic_type): Use scoped_value_mark.
846 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
847 scoped_value_mark.
848 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
849 gdbscm_wrap and scoped_value_mark.
850 (gdbscm_value_to_string): Use xfree directly instead of a
851 cleanup. Move 'buffer' unique_ptr to TRY scope.
852 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
853 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
854 scoped_value_mark.
855 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
856 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
857 scoped_value_mark.
858 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
859 gdbscm_wrap.
860
42dc7699
TV
8612018-07-18 Tom de Vries <tdevries@suse.de>
862
863 * findvar.c (default_read_var_value): Also resolve dynamic type for
864 LOC_OPTIMIZED_OUT vars.
865
6592ceed
MR
8662018-07-18 Maciej W. Rozycki <macro@mips.com>
867
868 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
869 decoding.
870
c6c6149a
TT
8712018-07-17 Tom Tromey <tom@tromey.com>
872
873 * guile/scm-param.c (pascm_set_func, pascm_show_func)
874 (compute_enum_list, pascm_set_param_value_x)
875 (gdbscm_parameter_value): Update.
876 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
877 (gdbscm_scm_to_host_string): Update.
878 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
879 Update.
880 * guile/scm-cmd.c (cmdscm_add_completion): Update.
881 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
882 * guile/scm-string.c (gdbscm_scm_to_string): Return
883 unique_xmalloc_ptr.
884 (gdbscm_scm_to_host_string): Likewise.
885
a1a31cb8
TT
8862018-07-17 Tom Tromey <tom@tromey.com>
887
888 * guile/guile.c (gdbscm_eval_from_control_command): Update.
889 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
890 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
891 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
892 unique_xmalloc_ptr.
893
15bf3002
TT
8942018-07-17 Tom Tromey <tom@tromey.com>
895
896 * guile/scm-param.c (pascm_signal_setshow_error): Update.
897 * guile/guile-internal.h (gdbscm_exception_message_to_string):
898 Update.
899 * guile/scm-cmd.c (cmdscm_function): Update.
900 * guile/scm-pretty-print.c
901 (ppscm_print_exception_unless_memory_error): Update.
902 * guile/scm-exception.c (gdbscm_exception_message_to_string):
903 Return unique_xmalloc_ptr.
904
7eb1a66c
TT
9052018-07-17 Tom Tromey <tom@tromey.com>
906
907 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
908 Use string_printf.
909
ce73f310
JW
9102018-07-17 Jim Wilson <jimw@sifive.com>
911
27724bad
JW
912 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
913 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
914 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
915 unecessary braces after EF_RISCV_RVC test. Delete call to
916 set_gdbarch_decr_pc_after_break.
917
ce73f310
JW
918 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
919 RISCV_LAST_FP_REGNUM + 1.
920 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
921
056dec39
TT
9222018-07-17 Tom Tromey <tom@tromey.com>
923
924 * configure.ac: Remove --disable-gdbcli.
925 * configure: Rebuild.
926 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
927 (SUBDIR_CLI_CFLAGS): Remove.
928 (SFILES): Use SUBDIR_CLI_SRCS.
929 (COMMON_OBS): Use SUBDIR_CLI_OBS.
930
4735f0ed
TT
9312018-07-17 Tom Tromey <tom@tromey.com>
932
933 PR gdb/18624:
934 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
935
117a0e99
JW
9362018-07-16 Jim Wilson <jimw@sifive.com>
937
938 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
939
8a67aaa8
SM
9402018-07-16 Simon Marchi <simon.marchi@ericsson.com>
941
942 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
943 variable.
944 (libunwind_frame_sniffer): Likewise.
945 (libunwind_frame_prev_register): Likewise.
946 (libunwind_sigtramp_frame_sniffer): Likewise.
947 * ia64-tdep.c (ia64_access_reg): Likewise.
948 (ia64_access_rse_reg): Likewise.
949 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
950 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
951
ec74dcd8
SM
9522018-07-16 Simon Marchi <simon.marchi@ericsson.com>
953
954 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
955
a700e753
SM
9562018-07-16 Simon Marchi <simon.marchi@ericsson.com>
957
958 * remote-sim.c (gdbsim_target::close,
959 gdbsim_target::mourn_inferior): Remove unused variables.
960
8b411ff8
SM
9612018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
962
963 * ia64-tdep.c (ktab_buf): New global.
964 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
965 (get_kernel_table): Adjust.
966
edb0470b
TT
9672018-07-16 Tom Tromey <tom@tromey.com>
968
969 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
970 * dwarf2read.c (using_directives, new_symbol): Use
971 outermost_context_p.
972 * dbxread.c (process_one_symbol): Use outermost_context_p.
973 * coffread.c (coff_symtab_read): Use outermost_context_p.
974
6cccc9a8
TT
9752018-07-16 Tom Tromey <tom@tromey.com>
976
977 * dwarf2read.c (using_directives, read_func_scope)
978 (read_lexical_block_scope): Update.
979 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
980 * buildsym.h (local_using_directives, global_using_directives):
981 Don't declare.
982 (get_local_using_directives, set_local_using_directives)
983 (get_global_using_directives): Declare.
984 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
985 m_global_using_directives>: New members.
986 (finish_block_internal, prepare_for_building)
987 (reset_symtab_globals, end_symtab_get_static_block)
988 (push_context): Update.
989 (get_local_using_directives, set_local_using_directives)
990 (get_global_using_directives): New functions.
991 (buildsym_init): Update.
992
652788a7
TT
9932018-07-16 Tom Tromey <tom@tromey.com>
994
995 * xcoffread.c (xcoff_initial_scan): Don't call
996 free_pending_blocks.
997 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
998 * buildsym.h (class scoped_free_pendings): Add constructor.
999 (free_pending_blocks): Don't declare.
1000 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
1001 (free_pending_blocks): Now static.
1002
8419ee53
TT
10032018-07-16 Tom Tromey <tom@tromey.com>
1004
1005 * buildsym.h (push_subfile, pop_subfile): Update declarations.
1006 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
1007 member.
1008 (struct subfile_stack): Remove.
1009 (subfile_stack): Remove.
1010 (push_subfile, pop_subfile, buildsym_init): Update.
1011
ccdac490
TT
10122018-07-16 Tom Tromey <tom@tromey.com>
1013
1014 * buildsym.c (push_subfile): Use gdb_assert.
1015 (pop_subfile): Use gdb_assert.
1016
43130d6f
TT
10172018-07-16 Tom Tromey <tom@tromey.com>
1018
1019 * buildsym.h (merge_symbol_lists): Remove.
1020 * buildsym.c (merge_symbol_lists): Remove.
1021
77d6f1aa
TT
10222018-07-16 Tom Tromey <tom@tromey.com>
1023
1024 * stabsread.c (scan_file_globals): Update comment.
1025 * stabsread.h (scan_file_globals): Move from buildsym.h.
1026 * buildsym.h (scan_file_globals): Move to stabsread.h.
1027
2c722d18
TT
10282018-07-16 Tom Tromey <tom@tromey.com>
1029
1030 * xcoffread.c (xcoff_new_init): Update.
1031 * mipsread.c (mipscoff_new_init): Update.
1032 * mdebugread.c (mdebug_build_psymtabs): Update.
1033 * elfread.c (elf_new_init): Update.
1034 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
1035 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
1036 * buildsym.h (buildsym_new_init): Don't declare.
1037 * buildsym.c (buildsym_new_init): Remove.
1038
5985ac61
TT
10392018-07-16 Tom Tromey <tom@tromey.com>
1040
1041 * stabsread.h (within_function): Move from buildsym.h.
1042 * stabsread.c (start_stabs): Clear within_function.
1043 * coffread.c (coff_start_symtab): Clear within_function.
1044 * buildsym.h (within_function): Move to stabsread.h.
1045 * buildsym.c (prepare_for_building): Update.
1046
6b84eeb2
TT
10472018-07-16 Tom Tromey <tom@tromey.com>
1048
1049 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
1050 * dwarf2read.c (dwarf2_start_symtab): Don't set
1051 processing_gcc_compilation.
1052 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
1053
2150c3ef
TT
10542018-07-16 Tom Tromey <tom@tromey.com>
1055
1056 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
1057 (next_symbol_text_func): Move from buildsym.h.
1058 * stabsread.c (hashname): Move from buildsym.c.
1059 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
1060 (next_symbol_text_func, hashname): Move to stabsread.h.
1061 * buildsym.c: Don't include bcache.h
1062 (hashname): Move to stasbread.c.
1063
0ec44fc0
TT
10642018-07-16 Tom Tromey <tom@tromey.com>
1065
1066 * buildsym.h (context_stack_size): Don't declare.
1067 * buildsym.c (context_stack_size): New global.
1068
81cc346d
TT
10692018-07-16 Tom Tromey <tom@tromey.com>
1070
1071 * dbxread.c (processing_acc_compilation): New global.
1072 * buildsym.h (processing_acc_compilation): Don't declare.
1073
2c99ee5c
TT
10742018-07-16 Tom Tromey <tom@tromey.com>
1075
1076 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
1077 * dbxread.c (read_ofile_symtab): Update.
1078 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
1079 * buildsym.h (last_source_start_addr): Remove.
1080 (set_last_source_start_addr, get_last_source_start_addr):
1081 Declare.
1082 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
1083 parameter.
1084 (struct buildsym_compunit) <m_last_source_start_addr>: New
1085 member.
1086 (prepare_for_building): Remove start_addr parameter.
1087 (start_symtab, restart_symtab, end_symtab_get_static_block)
1088 (end_symtab_with_blockvector): Update.
1089 (set_last_source_start_addr, get_last_source_start_addr): New
1090 functions.
1091
530fedbc
TT
10922018-07-16 Tom Tromey <tom@tromey.com>
1093
1094 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
1095 member.
1096 (have_line_numbers): Remove.
1097 (record_line, prepare_for_building, end_symtab_get_static_block)
1098 (augment_type_symtab): Update.
1099
6a976300
TT
11002018-07-16 Tom Tromey <tom@tromey.com>
1101
1102 * buildsym.c (~buildsym_compunit): Free the macro table.
1103 (struct buildsym_compunit) <get_macro_table, release_macros>: New
1104 methods.
1105 <m_pending_macros>: New member.
1106 (pending_macros): Remove.
1107 (~scoped_free_pendings, get_macro_table, prepare_for_building)
1108 (reset_symtab_globals, end_symtab_get_static_block)
1109 (end_symtab_with_blockvector, augment_type_symtab)
1110 (buildsym_init): Update.
1111
c0015d44
TT
11122018-07-16 Tom Tromey <tom@tromey.com>
1113
1114 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
1115 parameter.
1116 (buildsym_compunit::set_last_source_file): New method.
1117 <m_last_source_file>: New member.
1118 (prepare_for_building): Remove "name" parameter.
1119 (start_symtab, restart_symtab, reset_symtab_globals): Update.
1120 (last_source_file): Remove.
1121 (set_last_source_file, get_last_source_file): Update.
1122
e62cca7c
TT
11232018-07-16 Tom Tromey <tom@tromey.com>
1124
1125 * buildsym.c (prepare_for_building): Add assert.
1126
905eb0e2
TT
11272018-07-16 Tom Tromey <tom@tromey.com>
1128
1129 * buildsym.c (~buildsym_compunit): Update.
1130 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
1131 (start_subfile, patch_subfile_names)
1132 (end_symtab_with_blockvector): Update.
1133
b248663f
TT
11342018-07-16 Tom Tromey <tom@tromey.com>
1135
1136 * buildsym.c (struct buildsym_compunit): Add constructor,
1137 destructor, initializers.
1138 (start_buildsym_compunit): Remove.
1139 (free_buildsym_compunit): Use "delete".
1140 (start_symtab, restart_symtab): Use "new".
1141
ff27d073
SM
11422018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
1143
1144 * symfile.c (set_objfile_default_section_offset): Remove struct
1145 keyword.
1146
6a15ecf5
SH
11472018-07-14 Stafford Horne <shorne@gmail.com>
1148
1149 * (Responsible Maintainers): Add myself as or1k maintainer.
1150
027a4c30
TT
11512018-07-13 Tom Tromey <tom@tromey.com>
1152
1153 * symfile.c (set_objfile_default_section_offset): Use extra braces
1154 around initializer.
1155
5c1eda30
AA
11562018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1157
1158 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
1159 non-branching basr.
1160
bc7b042b
PW
11612018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1162
1163 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1164 unittests/cli-utils-selftests.c
1165 * unittests/cli-utils-selftests.c: New file.
1166
a14c4daa
PW
11672018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1168
1169 * NEWS: Mention new commands. Mention change to 'thread apply'.
1170
1fe75df7
PW
11712018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1172
1173 * thread.c (thr_try_catch_cmd): New function.
1174 (thread_apply_all_command): Handle qcs flags.
1175 (thread_apply_command): Handle qcs flags.
1176 (taas_command): New function.
1177 (tfaas_command): New function.
1178 (_initialize_thread): Update to setup the new commands 'taas
1179 and 'tfaas'. Change doc string for 'thread apply'.
1180
6a70eb7d
PW
11812018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1182
1183 * stack.c: (trailing_outermost_frame): New function, mostly
1184 extracted from backtrace_command_1.
1185 (leading_innermost_frame): New function.
1186 (backtrace_command_1): Update to call trailing_outermost_frame.
1187 (frame_apply_command_count): New function.
1188 (frame_apply_level_command): New function.
1189 (frame_apply_all_command): New function.
1190 (frame_apply_command): New function.
1191 (faas_command): New function.
1192 (frame_cmd_list): New variable.
1193 (_initialize_stack): Update to setup the new commands 'frame apply'
1194 and 'faas'.
1195
529c08b2
PW
11962018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1197
1198 * cli-utils.c (number_or_range_parser::get_number): Only handle
1199 numbers or convenience var as numbers.
1200 (parse_flags): New function.
1201 (parse_flags_qcs): New function.
1202 (number_or_range_parser::finished): Ensure parsing end is detected
1203 before end of string.
1204 * cli-utils.h (parse_flags): New function.
1205 (parse_flags_qcs): New function.
1206 (number_or_range_parser): Remove m_finished bool.
1207 (number_or_range_parser::skip_range): Set m_in_range to false.
1208
64b58472
SDJ
12092018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
1210
1211 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
1212 on Windows.
1213
c7ab0aef
SDJ
12142018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1215 Jan Kratochvil <jan.kratochvil@redhat.com>
1216 Paul Fertser <fercerpav@gmail.com>
1217 Tsutomu Seki <sekiriki@gmail.com>
1218 Pedro Alves <palves@redhat.com>
1219
1220 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1221 'unittests/parse-connection-spec-selftests.c'.
1222 (COMMON_SFILES): Add 'common/netstuff.c'.
1223 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
1224 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
1225 * common/netstuff.c: New file.
1226 * common/netstuff.h: New file.
1227 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
1228 (wait_for_connect): Update comment. New parameter
1229 'gdb::optional<int> sock' instead of 'struct serial *scb'.
1230 Use 'sock' directly instead of 'scb->fd'.
1231 (try_connect): New function, with code from 'net_open'.
1232 (net_open): Rewrite main loop to deal with multiple
1233 sockets/addresses. Handle IPv6-style hostnames; implement
1234 support for IPv6 connections.
1235 * unittests/parse-connection-spec-selftests.c: New file.
1236
4c7333b3
PA
12372018-07-11 Pedro Alves <palves@redhat.com>
1238
1239 PR gdb/23377
1240 * remote.c (remote_target::remote_detach_pid): Call
1241 set_current_process.
1242
a6f88f6e
PA
12432018-07-11 Pedro Alves <palves@redhat.com>
1244
1245 * h8300-tdep.c (h8300_gdbarch_init): Remove
1246 set_gdbarch_ecoff_reg_to_regnum calls.
1247
16ff70dd
SDJ
12482018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1249
1250 PR c++/23373
1251 * c-typeprint.c (c_type_print_base_struct_union): Don't print
1252 offsets/sizes for static members of a class/struct.
1253
12863263
AH
12542018-07-11 Alan Hayward <alan.hayward@arm.com>
1255
1256 * target-descriptions.c (tdesc_register_bitsize): Rename.
1257 * target-descriptions.h (tdesc_register_bitsize): Likewise.
1258 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
1259 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
1260
1123588c
TT
12612018-07-10 Tom Tromey <tom@tromey.com>
1262
1263 * breakpoint.c (moribund_locations): Now static and a
1264 std::vector.
1265 (breakpoint_init_inferior, moribund_breakpoint_here_p)
1266 (build_bpstat_chain, update_global_location_list)
1267 (breakpoint_retire_moribund): Update.
1268 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
1269 VEC.
1270
8c49aa89
AB
12712018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
1272
1273 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
1274 (riscv_register_reggroup_p): Use new function, remove unneeded
1275 parenthesis.
1276 (riscv_push_dummy_call): Extend assert to compare against xlen or
1277 flen based on register type.
1278
42ecac17
AB
12792018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
1280
1281 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
1282
055303e2
AB
12832018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
1284
1285 * remote.c (show_hardware_watchpoint_limit): New function.
1286 (show_hardware_watchpoint_length_limit): New function.
1287 (show_hardware_breakpoint_limit): New function.
1288 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
1289 where appropriate, update help text.
1290
8fd32c1c
TT
12912018-07-09 Tom Tromey <tom@tromey.com>
1292
1293 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
1294 (CLIBS): Don't mention NAT_CLIBS.
1295
31278b51
TT
12962018-07-09 Tom Tromey <tom@tromey.com>
1297
1298 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
1299 (LIBGDB_OBS, clean mostlyclean): Update.
1300 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
1301
e5fd1493
TT
13022018-07-09 Tom Tromey <tom@tromey.com>
1303
1304 * Makefile.in (%.c: %.y): Use ECHO_YACC.
1305 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
1306 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
1307
981e0c0c
TT
13082018-07-09 Tom Tromey <tom@tromey.com>
1309
1310 * Makefile.in (ALLDEPFILES): Remove exec.c.
1311 (COMMON_OBS): Remove exec.o.
1312 (COMMON_SFILES): Add exec.c.
1313
14ccceb2
TT
13142018-07-09 Tom Tromey <tom@tromey.com>
1315
1316 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
1317
5d3c3a68
TT
13182018-07-09 Tom Tromey <tom@tromey.com>
1319
1320 * Makefile.in (clean mostlyclean): Remove stamp-version.
1321 (version.c): Depend on stamp-version.
1322 (stamp-version): New rule, from version.c rule.
1323
1998086d
TT
13242018-07-09 Tom Tromey <tom@tromey.com>
1325
1326 * Makefile.in (init.c): Depend on stamp-init.
1327 (stamp-init): New rule, from init.c rule.
1328 (clean mostlyclean): Remove stamp-init.
1329
4c754949
TT
13302018-07-09 Tom Tromey <tom@tromey.com>
1331
1332 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
1333 SUBDIR_GCC_COMPILE_SRCS.
1334
6497f1dd
TT
13352018-07-09 Tom Tromey <tom@tromey.com>
1336
1337 * Makefile.in (init.c): Remove some unused sed rules.
1338
97a34db9
TT
13392018-07-09 Tom Tromey <tom@tromey.com>
1340
1341 * Makefile.in (TSOBS): Remove.
1342 (INIT_FILES): Update.
1343 (LIBGDB_OBS): Update.
1344 (COMMON_SFILES): Add inflow.c.
1345 (SFILES): Remove inflow.c.
1346
25289ac1
JK
13472018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1348
1349 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
1350
e83f4d97
SM
13512018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
1352
4869c585
SM
1353 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
1354 get_saveloc_name, is_signal_frame_name, step_name,
1355 init_remote_name, create_addr_space_name,
1356 destroy_addr_space_name, search_unwind_table_name,
1357 find_dyn_list_name): Constify.
e83f4d97 1358
6821842f
SM
13592018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
1360
1361 * darwin-nat.c (darwin_pthread_kill): New function.
1362 (darwin_resume_thread): Use darwin_pthread_kill.
1363
c530603c
TV
13642018-07-05 Tom de Vries <tdevries@suse.de>
1365
1366 * macroexp.c (macro_buffer) <operator=>: New member function.
1367
a7d0f0f0
TT
13682018-07-04 Tom Tromey <tom@tromey.com>
1369
1370 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
1371
6242c6a6
SM
13722018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
1373
1374 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
1375 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
1376 * maint.c: Likewise.
1377 * top.c: Likewise.
1378
4e5b2f89
JB
13792018-07-04 Joel Brobecker <brobecker@adacore.com>
1380
1381 * NEWS: Create a new section for the next release branch.
1382 Rename the section of the current branch, now that it has
1383 been cut.
1384
538ccc4a
JB
13852018-07-04 Joel Brobecker <brobecker@adacore.com>
1386
1387 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
1388 * version.in: Bump version to 8.2.50.DATE-git.
1389
1b919490
VB
13902018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1391 Pedro Alves <palves@redhat.com>
1392
1393 * linux-nat.c (linux_init_ptrace): Rename to ...
1394 (linux_init_ptrace_procfs): ... this. Call
1395 linux_proc_init_warnings.
1396 (linux_nat_target::post_attach)
1397 (linux_nat_target::post_startup_inferior): Adjust.
1398 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
1399 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
1400
1ea5da02
TV
14012018-07-04 Tom de Vries <tdevries@suse.de>
1402
1403 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
1404 check ...
1405 (read_comp_unit_head): ... here.
1406
f51e0e20
TT
14072018-07-03 Tom Tromey <tom@tromey.com>
1408
1409 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
1410 (stop_tracing, tstatus_command)
1411 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
1412 (print_one_static_tracepoint_marker): Update.
1413 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
1414 std::vector.
1415 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
1416 VEC.
1417 (all_tracepoints, static_tracepoints_here): Return std::vector.
1418
d7e15655
TT
14192018-07-03 Tom Tromey <tom@tromey.com>
1420
1421 * common/ptid.c (ptid_equal): Remove.
1422 * common/ptid.h (ptid_equal): Don't declare.
1423 * ada-tasks.c: Update.
1424 * breakpoint.c: Update.
1425 * common/agent.c: Update.
1426 * corelow.c: Update.
1427 * darwin-nat-info.c: Update.
1428 * darwin-nat.c: Update.
1429 * dcache.c: Update.
1430 * dtrace-probe.c: Update.
1431 * dummy-frame.c: Update.
1432 * fbsd-nat.c: Update.
1433 * frame.c: Update.
1434 * gdbthread.h: Update.
1435 * gnu-nat.c: Update.
1436 * go32-nat.c: Update.
1437 * inf-loop.c: Update.
1438 * inf-ptrace.c: Update.
1439 * infcall.c: Update.
1440 * infcmd.c: Update.
1441 * inflow.c: Update.
1442 * infrun.c: Update.
1443 * linux-fork.c: Update.
1444 * linux-nat.c: Update.
1445 * linux-thread-db.c: Update.
1446 * mi/mi-cmd-var.c: Update.
1447 * mi/mi-interp.c: Update.
1448 * mi/mi-main.c: Update.
1449 * nto-procfs.c: Update.
1450 * ppc-linux-tdep.c: Update.
1451 * procfs.c: Update.
1452 * python/py-inferior.c: Update.
1453 * python/py-record-btrace.c: Update.
1454 * python/py-record.c: Update.
1455 * ravenscar-thread.c: Update.
1456 * regcache.c: Update.
1457 * remote-sim.c: Update.
1458 * remote.c: Update.
1459 * sol-thread.c: Update.
1460 * solib.c: Update.
1461 * target.c: Update.
1462 * tui/tui-stack.c: Update.
1463 * varobj.c: Update.
1464 * windows-nat.c: Update.
1465 * windows-tdep.c: Update.
1466
26a57c92
TT
14672018-07-03 Tom Tromey <tom@tromey.com>
1468
1469 * common/ptid.c (ptid_match): Remove.
1470 * common/ptid.h (ptid_match): Don't declare.
1471 * fbsd-nat.c: Update.
1472 * infcmd.c: Update.
1473 * infrun.c: Update.
1474 * linux-nat.c: Update.
1475 * record-btrace.c: Update.
1476 * regcache.c: Update.
1477 * remote.c: Update.
1478
d2a107e3
TT
14792018-07-03 Tom Tromey <tom@tromey.com>
1480
1481 * common/ptid.c (ptid_tid_p): Remove.
1482 * common/ptid.h (ptid_tid_p): Don't declare.
1483 * sol-thread.c: Update.
1484
15a9e13e
TT
14852018-07-03 Tom Tromey <tom@tromey.com>
1486
1487 * common/ptid.c (ptid_lwp_p): Remove.
1488 * common/ptid.h (ptid_lwp_p): Don't declare.
1489 * fbsd-nat.c: Update.
1490 * linux-nat.c: Update.
1491 * nat/linux-procfs.c: Update.
1492 * nat/x86-linux-dregs.c: Update.
1493 * sol-thread.c: Update.
1494
0e998d96
TT
14952018-07-03 Tom Tromey <tom@tromey.com>
1496
1497 * common/ptid.c (ptid_is_pid): Remove.
1498 * common/ptid.h (ptid_is_pid): Don't declare.
1499 * infrun.c: Update.
1500 * linux-nat.c: Update.
1501 * mi/mi-interp.c: Update.
1502 * remote.c: Update.
1503 * thread.c: Update.
1504
cc6bcb54
TT
15052018-07-03 Tom Tromey <tom@tromey.com>
1506
1507 * common/ptid.c (ptid_get_tid): Remove.
1508 * common/ptid.h (ptid_get_tid): Don't declare.
1509 * ada-tasks.c: Update.
1510 * aix-thread.c: Update.
1511 * bsd-uthread.c: Update.
1512 * darwin-nat.c: Update.
1513 * fbsd-nat.c: Update.
1514 * i386-darwin-nat.c: Update.
1515 * infrun.c: Update.
1516 * linux-tdep.c: Update.
1517 * nto-procfs.c: Update.
1518 * ppc-ravenscar-thread.c: Update.
1519 * python/py-infthread.c: Update.
1520 * ravenscar-thread.c: Update.
1521 * sol-thread.c: Update.
1522 * sparc-ravenscar-thread.c: Update.
1523 * windows-nat.c: Update.
1524
e38504b3
TT
15252018-07-03 Tom Tromey <tom@tromey.com>
1526
1527 * common/ptid.c (ptid_get_lwp): Remove.
1528 * common/ptid.h (ptid_get_lwp): Don't declare.
1529 * aarch64-linux-nat.c: Update.
1530 * ada-tasks.c: Update.
1531 * aix-thread.c: Update.
1532 * amd64-linux-nat.c: Update.
1533 * arm-linux-nat.c: Update.
1534 * corelow.c: Update.
1535 * fbsd-nat.c: Update.
1536 * fbsd-tdep.c: Update.
1537 * gnu-nat.c: Update.
1538 * i386-cygwin-tdep.c: Update.
1539 * i386-gnu-nat.c: Update.
1540 * i386-linux-nat.c: Update.
1541 * ia64-linux-nat.c: Update.
1542 * inf-ptrace.c: Update.
1543 * infrun.c: Update.
1544 * linux-fork.c: Update.
1545 * linux-nat.c: Update.
1546 * linux-tdep.c: Update.
1547 * linux-thread-db.c: Update.
1548 * mips-linux-nat.c: Update.
1549 * nat/aarch64-linux-hw-point.c: Update.
1550 * nat/aarch64-linux.c: Update.
1551 * nat/linux-btrace.c: Update.
1552 * nat/linux-osdata.c: Update.
1553 * nat/linux-procfs.c: Update.
1554 * nat/x86-linux-dregs.c: Update.
1555 * obsd-nat.c: Update.
1556 * ppc-fbsd-nat.c: Update.
1557 * ppc-linux-nat.c: Update.
1558 * procfs.c: Update.
1559 * python/py-infthread.c: Update.
1560 * ravenscar-thread.c: Update.
1561 * remote.c: Update.
1562 * s390-linux-nat.c: Update.
1563 * sol-thread.c: Update.
1564 * sol2-tdep.c: Update.
1565 * spu-linux-nat.c: Update.
1566 * x86-linux-nat.c: Update.
1567 * xtensa-linux-nat.c: Update.
1568
e99b03dc
TT
15692018-07-03 Tom Tromey <tom@tromey.com>
1570
1571 * common/ptid.c (ptid_get_pid): Remove.
1572 * common/ptid.h (ptid_get_pid): Don't declare.
1573 * aarch64-linux-nat.c: Update.
1574 * ada-lang.c: Update.
1575 * aix-thread.c: Update.
1576 * alpha-bsd-nat.c: Update.
1577 * amd64-fbsd-nat.c: Update.
1578 * amd64-linux-nat.c: Update.
1579 * arm-linux-nat.c: Update.
1580 * arm-nbsd-nat.c: Update.
1581 * auxv.c: Update.
1582 * break-catch-syscall.c: Update.
1583 * breakpoint.c: Update.
1584 * bsd-uthread.c: Update.
1585 * corelow.c: Update.
1586 * ctf.c: Update.
1587 * darwin-nat.c: Update.
1588 * fbsd-nat.c: Update.
1589 * fbsd-tdep.c: Update.
1590 * gcore.c: Update.
1591 * gnu-nat.c: Update.
1592 * hppa-nbsd-nat.c: Update.
1593 * hppa-obsd-nat.c: Update.
1594 * i386-fbsd-nat.c: Update.
1595 * ia64-linux-nat.c: Update.
1596 * inf-ptrace.c: Update.
1597 * infcmd.c: Update.
1598 * inferior.c: Update.
1599 * inferior.h: Update.
1600 * inflow.c: Update.
1601 * infrun.c: Update.
1602 * linux-fork.c: Update.
1603 * linux-nat.c: Update.
1604 * linux-tdep.c: Update.
1605 * linux-thread-db.c: Update.
1606 * m68k-bsd-nat.c: Update.
1607 * mi/mi-interp.c: Update.
1608 * mi/mi-main.c: Update.
1609 * mips-linux-nat.c: Update.
1610 * mips-nbsd-nat.c: Update.
1611 * mips64-obsd-nat.c: Update.
1612 * nat/aarch64-linux-hw-point.c: Update.
1613 * nat/aarch64-linux.c: Update.
1614 * nat/linux-btrace.c: Update.
1615 * nat/linux-osdata.c: Update.
1616 * nat/linux-procfs.c: Update.
1617 * nat/x86-linux-dregs.c: Update.
1618 * nto-procfs.c: Update.
1619 * obsd-nat.c: Update.
1620 * ppc-linux-nat.c: Update.
1621 * ppc-nbsd-nat.c: Update.
1622 * ppc-obsd-nat.c: Update.
1623 * proc-service.c: Update.
1624 * procfs.c: Update.
1625 * python/py-inferior.c: Update.
1626 * python/py-infthread.c: Update.
1627 * ravenscar-thread.c: Update.
1628 * record.c: Update.
1629 * remote-sim.c: Update.
1630 * remote.c: Update.
1631 * rs6000-nat.c: Update.
1632 * s390-linux-nat.c: Update.
1633 * sh-nbsd-nat.c: Update.
1634 * sol-thread.c: Update.
1635 * sparc-nat.c: Update.
1636 * sparc64-tdep.c: Update.
1637 * spu-linux-nat.c: Update.
1638 * spu-tdep.c: Update.
1639 * target-debug.h: Update.
1640 * target.c: Update.
1641 * thread.c: Update.
1642 * tid-parse.c: Update.
1643 * tracefile-tfile.c: Update.
1644 * vax-bsd-nat.c: Update.
1645 * windows-nat.c: Update.
1646 * x86-linux-nat.c: Update.
1647 * x86-nat.c: Update.
1648
f2907e49
TT
16492018-07-03 Tom Tromey <tom@tromey.com>
1650
1651 * common/ptid.c (pid_to_ptid): Remove.
1652 * common/ptid.h (pid_to_ptid): Don't declare.
1653 * aix-thread.c: Update.
1654 * arm-linux-nat.c: Update.
1655 * common/ptid.c: Update.
1656 * common/ptid.h: Update.
1657 * corelow.c: Update.
1658 * ctf.c: Update.
1659 * darwin-nat.c: Update.
1660 * fbsd-nat.c: Update.
1661 * fork-child.c: Update.
1662 * gnu-nat.c: Update.
1663 * go32-nat.c: Update.
1664 * inf-ptrace.c: Update.
1665 * infcmd.c: Update.
1666 * inferior.c: Update.
1667 * infrun.c: Update.
1668 * linux-fork.c: Update.
1669 * linux-nat.c: Update.
1670 * nat/aarch64-linux-hw-point.c: Update.
1671 * nat/fork-inferior.c: Update.
1672 * nat/x86-linux-dregs.c: Update.
1673 * nto-procfs.c: Update.
1674 * obsd-nat.c: Update.
1675 * procfs.c: Update.
1676 * progspace.c: Update.
1677 * remote.c: Update.
1678 * rs6000-nat.c: Update.
1679 * s390-linux-nat.c: Update.
1680 * sol-thread.c: Update.
1681 * spu-linux-nat.c: Update.
1682 * target.c: Update.
1683 * top.c: Update.
1684 * tracefile-tfile.c: Update.
1685 * windows-nat.c: Update.
1686
fd79271b
TT
16872018-07-03 Tom Tromey <tom@tromey.com>
1688
1689 * common/ptid.h (ptid_build): Don't declare.
1690 * common/ptid.c (ptid_build): Remove.
1691 * aix-thread.c: Update.
1692 * bsd-kvm.c: Update.
1693 * bsd-uthread.c: Update.
1694 * common/agent.c: Update.
1695 * common/ptid.c: Update.
1696 * common/ptid.h: Update.
1697 * corelow.c: Update.
1698 * darwin-nat.c: Update.
1699 * fbsd-nat.c: Update.
1700 * gnu-nat.c: Update.
1701 * linux-fork.c: Update.
1702 * linux-nat.c: Update.
1703 * linux-thread-db.c: Update.
1704 * nat/linux-osdata.c: Update.
1705 * nat/linux-procfs.c: Update.
1706 * nto-procfs.c: Update.
1707 * obsd-nat.c: Update.
1708 * proc-service.c: Update.
1709 * procfs.c: Update.
1710 * ravenscar-thread.c: Update.
1711 * remote-sim.c: Update.
1712 * remote.c: Update.
1713 * sol-thread.c: Update.
1714 * target.c: Update.
1715 * windows-nat.c: Update.
1716
057302ce
TT
17172018-07-03 Tom Tromey <tom@tromey.com>
1718
1719 * infrun.c (follow_exec): Use exit_inferior_silent.
1720 * inferior.c (exit_inferior_num_silent): Remove.
1721 * inferior.h (exit_inferior_num_silent): Don't declare.
1722
a50c11c6
TT
17232018-07-03 Tom Tromey <tom@tromey.com>
1724
1725 PR cli/23340:
1726 * darwin-nat.c (darwin_attach_pid): Reset inferior and
1727 inferior_ptid on error.
1728
471b9d15
MR
17292018-07-02 Maciej W. Rozycki <macro@mips.com>
1730 Simon Marchi <simon.marchi@polymtl.ca>
1731
1732 PR tdep/8282
1733 * disasm.h (gdb_disassembler): Add
1734 `m_disassembler_options_holder'. member
1735 * disasm.c (get_all_disassembler_options): New function.
1736 (gdb_disassembler::gdb_disassembler): Use it.
1737 (gdb_buffered_insn_length_init_dis): Likewise.
1738 (gdb_buffered_insn_length): Adjust accordingly.
1739 (set_disassembler_options): Handle options with arguments.
1740 (show_disassembler_options_sfunc): Likewise. Add a leading new
1741 line if showing options with descriptions.
1742 (disassembler_options_completer): Adapt to using the
1743 `disasm_options_and_args_t' structure.
1744 * mips-tdep.c (mips_disassembler_options): New variable.
1745 (mips_disassembler_options_o32): Likewise.
1746 (mips_disassembler_options_n32): Likewise.
1747 (mips_disassembler_options_n64): Likewise.
1748 (gdb_print_insn_mips): Don't set `disassembler_options'.
1749 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
1750 functions.
1751 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
1752 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
1753 `gdbarch_disassembler_options_implicit' and
1754 `gdbarch_valid_disassembler_options'.
1755 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
1756 `disasm_options_and_args_t' structure.
1757 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
1758 method.
1759 (valid_disassembler_options): Switch from `disasm_options_t' to
1760 the `disasm_options_and_args_t' structure.
1761 * NEWS: Document `set disassembler-options' support for the MIPS
1762 target.
1763 * gdbarch.h: Regenerate.
1764 * gdbarch.c: Regenerate.
1765
41823f29
SH
17662018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
1767
1768 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
1769
41206e32
JB
17702018-06-29 Joel Brobecker <brobecker@adacore.com>
1771
1772 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
1773 parameter in call to amd64_target_description.
1774 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
1775 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
1776 (amd64fbsd_init_abi): Likewise.
1777 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
1778 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
1779 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
1780 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
1781
de52b960
PA
17822018-06-29 Pedro Alves <palves@redhat.com>
1783
1784 * gdb/amd64-tdep.h (amd64_create_target_description): Add
1785 "segments" parameter.
1786 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
1787 (_initialize_amd64_tdep): Update call to
1788 amd64_create_target_description.
1789 (amd64_target_description): Add "segments" parameter. Adjust
1790 the implementation to use it.
1791 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
1792 call to amd64_create_target_description.
1793 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
1794 * gdb/arch/amd64.h (amd64_create_target_description): Add
1795 "segments" register.
1796 * gdb/arch/amd64.c (amd64_create_target_description): Add
1797 "segments" parameter. Call create_feature_i386_64bit_segments
1798 only if SEGMENTS is true.
1799 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
1800 call to amd64_create_target_description.
1801
75acb486
PA
18022018-06-29 Pedro Alves <palves@redhat.com>
1803
1804 * thread.c (thread_target_id_str): New, factored out from ...
1805 (print_thread_info_1): ... here. Use it to compute the max
1806 "Target Id" column width.
1807
c76a8ea3
PA
18082018-06-29 Pedro Alves <palves@redhat.com>
1809
1810 * remote.c (remote_target::extra_thread_info): Delete
1811 'display_buf' and 'n' locals. from the cache, regardless of
1812 packet mechanims is in use. Use cache for qThreadExtra and qP
1813 methods too.
1814
cd2bb709
PA
18152018-06-29 Pedro Alves <palves@redhat.com>
1816
1817 * blockframe.c (find_pc_sect_containing_function): New function.
1818 * breakpoint.c (print_breakpoint_location): Don't call
1819 find_pc_sect_function.
1820 * linespec.c (create_sals_line_offset): Record the location's
1821 symbol in the sal.
1822 * linespec.c (convert_address_location_to_sals): Fill in sal's
1823 symbol with find_pc_sect_containing_function.
1824 * symtab.c (find_function_start_sal): Rename to ...
1825 (find_function_start_sal_1): ... this.
1826 (find_function_start_sal): Reimplement as wrapper around
1827 find_function_start_sal_1, and use
1828 find_pc_sect_containing_function to fill in the sal's symbol.
1829 (find_function_start_sal(symbol*, bool)): Adjust.
1830 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
1831 comments.
1832 (find_pc_sect_containing_function): Declare.
1833
991ff292
PA
18342018-06-29 Pedro Alves <palves@redhat.com>
1835
1836 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
1837 true if the the location has no symbol.
1838
44cee4fd
TT
18392018-06-28 Tom Tromey <tom@tromey.com>
1840
1841 * NEWS: Mention --enable-codesign.
1842 * silent-rules.mk (ECHO_SIGN): New variable.
1843 * configure.ac: Add --enable-codesign.
1844 * configure: Rebuild.
1845 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
1846 (gdb$(EXEEXT)): Optionally invoke codesign.
1847
f2ffa92b
PA
18482018-06-28 Pedro Alves <palves@redhat.com>
1849
1850 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
1851 comments.
1852 (switch_to_thread_no_regs): Adjust comment.
1853 * infcmd.c (stop_pc): Delete.
1854 (post_create_inferior, info_program_command): Replace references
1855 to stop_pc with references to thread_info->suspend.stop_pc.
1856 * inferior.h (stop_pc): Delete declaration.
1857 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
1858 (handle_inferior_event_1, handle_signal_stop)
1859 (process_event_stop_test, keep_going_stepped_thread)
1860 (handle_step_into_function, handle_step_into_function_backward)
1861 (print_stop_location): Replace references to stop_pc with
1862 references to thread_info->suspend.stop_pc.
1863 (struct infcall_suspend_state) <stop_pc>: Delete field.
1864 (save_infcall_suspend_state, restore_infcall_suspend_state):
1865 Remove references to inf_stat->stop_pc.
1866 * linux-fork.c (fork_load_infrun_state): Likewise.
1867 * record-btrace.c (record_btrace_set_replay): Likewise.
1868 * record-full.c (record_full_goto_entry): Likewise.
1869 * remote.c (print_one_stopped_thread): Likewise.
1870 * target.c (target_resume): Extend comment.
1871 * thread.c (set_executing_thread): New.
1872 (set_executing): Use it.
1873 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
1874 Remove references to stop_pc.
1875
ecdc3a72
PA
18762018-06-28 Pedro Alves <palves@redhat.com>
1877
1878 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
1879 Moving fetching stop_pc until after ecs->event_thread is refreshed.
1880
d95d3aef
TT
18812018-06-28 Tom Tromey <tom@tromey.com>
1882
1883 * coffread.c (coff_symfile_finish): Update.
1884 * xcoffread.c (xcoff_symfile_finish): Update.
1885 * elfread.c (elf_symfile_finish): Update.
1886 * symfile.h (dwarf2_free_objfile): Don't declare.
1887 * dwarf2read.c (_initialize_dwarf2_read): Use
1888 register_objfile_data_with_cleanup.
1889 (dwarf2_free_objfile): Now static. Change signature.
1890
291f9a96
PT
18912018-06-28 Petr Tesarik <ptesarik@suse.cz>
1892
1893 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
1894 option "-o" to add-symbol-file-load to add an offset to each
1895 section's load address.
1896 * symfile.c (set_objfile_default_section_offset): New function.
1897
d81a3eaf
PT
18982018-06-28 Petr Tesarik <ptesarik@suse.cz>
1899
1900 * symfile.c (add_symbol_file_command): Make sure that sections
1901 with the same name are sorted in the same order.
1902
ed6dfe51
PT
19032018-06-28 Petr Tesarik <ptesarik@suse.cz>
1904
1905 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
1906 require the second argument. If omitted, load sections at the
1907 addresses specified in the file.
1908
d4d429d5
PT
19092018-06-28 Petr Tesarik <ptesarik@suse.cz>
1910
1911 * symfile.c (symbol_file_command, symbol_file_add_main_1)
1912 (_initialize_symfile): Add option "-o" to symbol-file to add an
1913 offset to each section of the symbol file.
1914
39b27ab6
PT
19152018-06-28 Petr Tesarik <ptesarik@suse.cz>
1916
1917 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
1918
41827fc3
TT
19192018-06-27 Tom Tromey <tom@tromey.com>
1920
1921 * stack.c (_initialize_stack): Update "func" help text.
1922
0c6aef22
TT
19232018-06-27 Tom Tromey <tom@tromey.com>
1924
1925 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
1926 std::vector.
1927 (unwind_infopy_str, pyuw_create_unwind_info)
1928 (unwind_infopy_add_saved_register, pyuw_sniffer)
1929 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
1930 Update.
1931 (struct saved_reg): Add constructor.
1932 <value>: Now a gdbpy_ref<>.
1933
63177289
TT
19342018-06-27 Tom Tromey <tom@tromey.com>
1935
1936 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
1937
e76f78a0
SM
19382018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1939
1940 * gdb-gdb.py.in: Format using autopep8.
1941
9a14af7b
SM
19422018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1943
1944 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
1945 (type_lookup_function): Recognize CORE_ADDR values.
1946
189366cd
SM
19472018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1948
1949 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
1950 print tag_name.
1951
68ad5fb9
SM
19522018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1953
1954 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
1955 <__lt__>: Add.
1956
141ec9f6
SM
19572018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1958
1959 * gdb-gdb.py: Move to...
1960 * gdb-gdb.py.in: ... here.
1961 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
1962 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
1963 dependencies.
1964 (distclean): Remove gdb-gdb.py when cleaning.
1965 (gdb-gdb.py, gdb-gdb.gdb): New rules.
1966 * configure: Re-generate.
1967
4c4e7ad4
PA
19682018-06-27 Pedro Alves <palves@redhat.com>
1969
1970 * proc-service.c (get_ps_regcache): New.
1971 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1972 (ps_lsetfpregs): Use it.
1973
7ab6656f
OJ
19742018-06-27 Omair Javaid <omair.javaid@linaro.org>
1975
1976 PR gdb/21695
1977 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
1978 (dwarf_decode_lines_1): Adjust.
1979
bd583225
SM
19802018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1981
1982 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
1983 override.
1984 <info_proc>: Likewise.
1985
9a325b7b
JB
19862018-06-26 Joel Brobecker <brobecker@adacore.com>
1987
1988 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
1989 to windows_fetch_one_register, and only handle the case of
1990 fetching one register. Move the code that reloads the context
1991 and iterates over all registers if R is negative to...
1992 (windows_nat_target::fetch_registers): ... here.
1993 (do_windows_store_inferior_registers): Rename to
1994 windows_store_one_register, and only handle the case of storing
1995 one register. Move the code that handles the case where r is
1996 negative to...
1997 (windows_nat_target::store_registers) ... here.
1998
a33ccfc7
TT
19992018-06-26 Tom Tromey <tom@tromey.com>
2000
2001 PR rust/22574:
2002 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
2003 * rust-lang.c (rust_print_struct_def): Add podata parameter.
2004 Update.
2005 (rust_internal_print_type): Add podata parameter.
2006 (rust_print_type): Update.
2007
e0c547d1
TT
20082018-06-26 Tom Tromey <tom@tromey.com>
2009
2010 * typeprint.h (struct print_offset_data) <update, finish,
2011 maybe_print_hole>: New methods.
2012 <indentation>: New constant.
2013 * typeprint.c (print_offset_data::indentation): Define.
2014 (print_offset_data::maybe_print_hole, print_offset_data::update)
2015 (print_offset_data::finish): Move from c-typeprint.c and rename.
2016 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
2017 (print_spaces_filtered_with_print_options): Update.
2018 (c_print_type_union_field_offset, maybe_print_hole)
2019 (c_print_type_struct_field_offset): Move to typeprint.c and
2020 rename.
2021 (c_type_print_base_struct_union): Update.
2022
75cbc781
PA
20232018-06-25 Pedro Alves <palves@redhat.com>
2024
2025 * gdbthread.h (thread_info_ref, delete_thread)
2026 (delete_thread_silent, first_thread_of_inferior)
2027 (any_thread_of_inferior, switch_to_thread)
2028 (enable_thread_stack_temporaries)
2029 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2030 (get_last_thread_stack_temporary)
2031 (value_in_thread_stack_temporaries, can_access_registers_thread):
2032 Spell out "struct thread_info" instead of just "thread_info".
2033 * inferior.h (notice_new_inferior): Likewise.
2034
b7a08269
PA
20352018-06-25 Pedro Alves <palves@redhat.com>
2036
2037 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2038 pass thread_info pointer to delete_thread.
2039 (windows_nat_target::detach): Pass inferior pointer to
2040 detach_inferior.
2041 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
2042 delete_thread.
2043 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
2044 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
2045 and pass a thread_info pointer to delete_thread.
2046 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
2047 pass thread_info pointer to delete_thread.
2048 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
2049 delete_thread_silent call.
2050 * procfs.c (procfs_target::detach): Pass inferior pointer to
2051 detach_inferior.
2052 (procfs_target::wait): Pass thread_info pointer to delete_thread.
2053 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
2054 delete_thread_silent call.
2055 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2056 pass thread_info pointer to delete_thread.
2057 (windows_nat_target::detach): Pass inferior pointer to
2058 delete_inferior.
2059
8e7767e3
AH
20602018-06-22 Alan Hayward <alan.hayward@arm.com>
2061
2062 * regcache.c (readable_regcache::read_part): Fix asserts.
2063 (reg_buffer::raw_collect_part): New function.
2064 (regcache::write_part): Fix asserts.
2065 (reg_buffer::raw_supply_part): New function.
2066 (regcache::transfer_regset_register): New helper function.
2067 (regcache::transfer_regset): Call new functions.
2068 (regcache_supply_regset): Use gdb_byte*.
2069 (regcache::supply_regset): Likewise.
2070 (regcache_collect_regset): Likewise.
2071 (regcache::collect_regset): Likewise.
2072 * regcache.h (reg_buffer::raw_collect_part): New declaration.
2073 (reg_buffer::raw_supply_part): Likewise.
2074 (regcache::transfer_regset_register): Likewise.
2075 (regcache::transfer_regset): Use gdb_byte*.
2076
bfd60e34
AH
20772018-06-22 Alan Hayward <alan.hayward@arm.com>
2078
2079 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
2080
00431a78
PA
20812018-06-21 Pedro Alves <palves@redhat.com>
2082
2083 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
2084 instead of a ptid_t. All callers adjusted.
2085 * ada-tasks.c (ada_get_task_number): Likewise. All callers
2086 adjusted.
2087 (print_ada_task_info, display_current_task_id, task_command_1):
2088 Adjust.
2089 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
2090 inferior_thread.
2091 (breakpoint_kind): Adjust.
2092 (remove_breakpoints_pid): Rename to ...
2093 (remove_breakpoints_inf): ... this. Adjust to take an inferior
2094 pointer. All callers adjusted.
2095 (bpstat_clear_actions): Use inferior_thread.
2096 (get_bpstat_thread): New.
2097 (bpstat_do_actions): Use it.
2098 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
2099 to take a thread_info pointer. All callers adjusted.
2100 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
2101 (breakpoint_re_set_thread): Use inferior_thread.
2102 * breakpoint.h (struct inferior): Forward declare.
2103 (bpstat_stop_status): Update.
2104 (remove_breakpoints_pid): Delete.
2105 (remove_breakpoints_inf): New.
2106 * bsd-uthread.c (bsd_uthread_target::wait)
2107 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
2108 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
2109 (maint_btrace_packet_history_cmd)
2110 (maint_btrace_clear_packet_history_cmd): Adjust.
2111 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
2112 inferior_thread.
2113 * cli/cli-interp.c: Include "inferior.h".
2114 * common/refcounted-object.h (struct
2115 refcounted_object_ref_policy): New.
2116 * compile/compile-object-load.c: Include gdbthread.h.
2117 (store_regs): Use inferior_thread.
2118 * corelow.c (core_target::close): Use current_inferior.
2119 (core_target_open): Adjust to use first_thread_of_inferior and use
2120 the current inferior.
2121 * ctf.c (ctf_target::close): Adjust to use current_inferior.
2122 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
2123 <thread>: ... this new field. All references adjusted.
2124 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
2125 Take a thread_info pointer instead of a ptid_t.
2126 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
2127 (dummy_frame_discard, register_dummy_frame_dtor): Take a
2128 thread_info pointer instead of a ptid_t.
2129 * elfread.c: Include "inferior.h".
2130 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
2131 Use inferior_thread.
2132 * eval.c (evaluate_subexp): Likewise.
2133 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
2134 inferior_thread.
2135 * gdb_proc_service.h (struct thread_info): Forward declare.
2136 (struct ps_prochandle) <ptid>: Delete, replaced by ...
2137 <thread>: ... this new field. All references adjusted.
2138 * gdbarch.h, gdbarch.c: Regenerate.
2139 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
2140 'thread' parameter. All implementations and callers adjusted.
2141 * gdbthread.h (thread_info) <set_running>: New method.
2142 (delete_thread, delete_thread_silent): Take a thread_info pointer
2143 instead of a ptid.
2144 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
2145 (first_thread_of_process): Delete, replaced by ...
2146 (first_thread_of_inferior): ... this new function. All callers
2147 adjusted.
2148 (any_live_thread_of_process): Delete, replaced by ...
2149 (any_live_thread_of_inferior): ... this new function. All callers
2150 adjusted.
2151 (switch_to_thread, switch_to_no_thread): Declare.
2152 (is_executing): Delete.
2153 (enable_thread_stack_temporaries): Update comment.
2154 <enable_thread_stack_temporaries>: Take a thread_info pointer
2155 instead of a ptid_t. Incref the thread.
2156 <~enable_thread_stack_temporaries>: Decref the thread.
2157 <m_ptid>: Delete
2158 <m_thr>: New.
2159 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2160 (get_last_thread_stack_temporary)
2161 (value_in_thread_stack_temporaries, can_access_registers_thread):
2162 Take a thread_info pointer instead of a ptid_t. All callers
2163 adjusted.
2164 * infcall.c (get_call_return_value): Use inferior_thread.
2165 (run_inferior_call): Work with thread pointers instead of ptid_t.
2166 (call_function_by_hand_dummy): Work with thread pointers instead
2167 of ptid_t. Use thread_info_ref.
2168 * infcmd.c (proceed_thread_callback): Access thread's state
2169 directly.
2170 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
2171 access thread's state directly.
2172 (continue_command): Use inferior_thread.
2173 (info_program_command): Use find_thread_ptid and access thread
2174 state directly.
2175 (proceed_after_attach_callback): Use thread state directly.
2176 (notice_new_inferior): Take a thread_info pointer instead of a
2177 ptid_t. All callers adjusted.
2178 (exit_inferior): Take an inferior pointer instead of a pid. All
2179 callers adjusted.
2180 (exit_inferior_silent): New.
2181 (detach_inferior): Delete.
2182 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
2183 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
2184 (detach_inferior_command, kill_inferior_command): Use
2185 find_inferior_id instead of valid_gdb_inferior_id and
2186 gdb_inferior_id_to_pid.
2187 (inferior_command): Use inferior and thread pointers.
2188 * inferior.h (struct thread_info): Forward declare.
2189 (notice_new_inferior): Take a thread_info pointer instead of a
2190 ptid_t. All callers adjusted.
2191 (detach_inferior): Delete declaration.
2192 (exit_inferior, exit_inferior_silent): Take an inferior pointer
2193 instead of a pid. All callers adjusted.
2194 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
2195 (valid_gdb_inferior_id): Delete.
2196 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
2197 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
2198 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
2199 ...
2200 <inf>: ... this new field.
2201 <step_ptid>: Delete, replaced by ...
2202 <step_thread>: ... this new field.
2203 (get_displaced_stepping_state): Take an inferior pointer instead
2204 of a pid. All callers adjusted.
2205 (displaced_step_in_progress_any_inferior): Adjust.
2206 (displaced_step_in_progress_thread): Take a thread pointer instead
2207 of a ptid_t. All callers adjusted.
2208 (displaced_step_in_progress, add_displaced_stepping_state): Take
2209 an inferior pointer instead of a pid. All callers adjusted.
2210 (get_displaced_step_closure_by_addr): Adjust.
2211 (remove_displaced_stepping_state): Take an inferior pointer
2212 instead of a pid. All callers adjusted.
2213 (displaced_step_prepare_throw, displaced_step_prepare)
2214 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
2215 All callers adjusted.
2216 (start_step_over): Adjust.
2217 (infrun_thread_ptid_changed): Remove bit updating ptids in the
2218 displaced step queue.
2219 (do_target_resume): Adjust.
2220 (fetch_inferior_event): Use inferior_thread.
2221 (context_switch, get_inferior_stop_soon): Take an
2222 execution_control_state pointer instead of a ptid_t. All callers
2223 adjusted.
2224 (switch_to_thread_cleanup): Delete.
2225 (stop_all_threads): Use scoped_restore_current_thread.
2226 * inline-frame.c: Include "gdbthread.h".
2227 (inline_state) <inline_state>: Take a thread pointer instead of a
2228 ptid_t. All callers adjusted.
2229 <ptid>: Delete, replaced by ...
2230 <thread>: ... this new field.
2231 (find_inline_frame_state): Take a thread pointer instead of a
2232 ptid_t. All callers adjusted.
2233 (skip_inline_frames, step_into_inline_frame)
2234 (inline_skipped_frames, inline_skipped_symbol): Take a thread
2235 pointer instead of a ptid_t. All callers adjusted.
2236 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
2237 (inline_skipped_frames, inline_skipped_symbol): Likewise.
2238 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
2239 pointers directly.
2240 * linux-nat.c (get_detach_signal): Likewise.
2241 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
2242 (thread_db_notice_clone): Adjust.
2243 (thread_db_find_new_threads_silently)
2244 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
2245 a thread pointer instead of a ptid_t. All callers adjusted.
2246 * mi/mi-cmd-var.c: Include "inferior.h".
2247 (mi_cmd_var_update_iter): Update to use thread pointers.
2248 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
2249 inferior directly.
2250 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
2251 out to ...
2252 (mi_output_running): ... this new function.
2253 (mi_on_resume_1): Adjust to use it.
2254 (mi_user_selected_context_changed): Adjust to use inferior_thread.
2255 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
2256 directly.
2257 (interrupt_thread_callback): : Adjust to use thread and inferior
2258 pointers.
2259 * proc-service.c: Include "gdbthread.h".
2260 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
2261 * progspace-and-thread.c: Include "inferior.h".
2262 * progspace.c: Include "inferior.h".
2263 * python/py-exitedevent.c (create_exited_event_object): Adjust to
2264 hold a reference to an inferior_object.
2265 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
2266 inferior_thread.
2267 * python/py-inferior.c (struct inferior_object): Give the type a
2268 tag name instead of a typedef.
2269 (python_on_normal_stop): No need to check if the current thread is
2270 listed.
2271 (inferior_to_inferior_object): Change return type to
2272 inferior_object. All callers adjusted.
2273 (find_thread_object): Delete, bits factored out to ...
2274 (thread_to_thread_object): ... this new function.
2275 * python/py-infthread.c (create_thread_object): Use
2276 inferior_to_inferior_object.
2277 (thpy_is_stopped): Use thread pointer directly.
2278 (gdbpy_selected_thread): Use inferior_thread.
2279 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
2280 field, replaced with ...
2281 <thread>: ... this new field. All users adjusted.
2282 (btpy_insn_or_gap_new): Drop const.
2283 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
2284 callers adjusted.
2285 * python/py-record.c: Include "gdbthread.h".
2286 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2287 a ptid_t. All callers adjusted.
2288 (gdbpy_current_recording): Use inferior_thread.
2289 * python/py-record.h (recpy_record_object) <ptid>: Delete
2290 field, replaced with ...
2291 <thread>: ... this new field. All users adjusted.
2292 (recpy_element_object) <ptid>: Delete
2293 field, replaced with ...
2294 <thread>: ... this new field. All users adjusted.
2295 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2296 a ptid_t. All callers adjusted.
2297 * python/py-threadevent.c: Include "gdbthread.h".
2298 (get_event_thread): Use thread_to_thread_object.
2299 * python/python-internal.h (struct inferior_object): Forward
2300 declare.
2301 (find_thread_object, find_inferior_object): Delete declarations.
2302 (thread_to_thread_object, inferior_to_inferior_object): New
2303 declarations.
2304 * record-btrace.c: Include "inferior.h".
2305 (require_btrace_thread): Use inferior_thread.
2306 (record_btrace_frame_sniffer)
2307 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
2308 (get_thread_current_frame): Use scoped_restore_current_thread and
2309 switch_to_thread.
2310 (get_thread_current_frame): Use thread pointer directly.
2311 (record_btrace_replay_at_breakpoint): Use thread's inferior
2312 pointer directly.
2313 * record-full.c: Include "inferior.h".
2314 * regcache.c: Include "gdbthread.h".
2315 (get_thread_arch_regcache): Use the inferior's address space
2316 directly.
2317 (get_thread_regcache, registers_changed_thread): New.
2318 * regcache.h (get_thread_regcache(thread_info *thread)): New
2319 overload.
2320 (registers_changed_thread): New.
2321 (remote_target) <remote_detach_1>: Swap order of parameters.
2322 (remote_add_thread): <remote_add_thread>: Return the new thread.
2323 (get_remote_thread_info(ptid_t)): New overload.
2324 (remote_target::remote_notice_new_inferior): Use thread pointers
2325 directly.
2326 (remote_target::process_initial_stop_replies): Use
2327 thread_info::set_running.
2328 (remote_target::remote_detach_1, remote_target::detach)
2329 (extended_remote_target::detach): Adjust.
2330 * stack.c (frame_show_address): Use inferior_thread.
2331 * target-debug.h (target_debug_print_thread_info_pp): New.
2332 * target-delegates.c: Regenerate.
2333 * target.c (default_thread_address_space): Delete.
2334 (memory_xfer_partial_1): Use current_inferior.
2335 (target_detach): Use current_inferior.
2336 (target_thread_address_space): Delete.
2337 (generic_mourn_inferior): Use current_inferior.
2338 * target.h (struct target_ops) <thread_address_space>: Delete.
2339 (target_thread_address_space): Delete.
2340 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
2341 pointers directly.
2342 (delete_thread_1, delete_thread, delete_thread_silent): Take a
2343 thread pointer instead of a ptid_t. Adjust all callers.
2344 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
2345 (first_thread_of_process): Delete, replaced by ...
2346 (first_thread_of_inferior): ... this new function. All callers
2347 adjusted.
2348 (any_thread_of_process): Rename to ...
2349 (any_thread_of_inferior): ... this, and take an inferior pointer.
2350 (any_live_thread_of_process): Rename to ...
2351 (any_live_thread_of_inferior): ... this, and take an inferior
2352 pointer.
2353 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2354 (value_in_thread_stack_temporaries)
2355 (get_last_thread_stack_temporary): Take a thread pointer instead
2356 of a ptid_t. Adjust all callers.
2357 (thread_info::set_running): New.
2358 (validate_registers_access): Use inferior_thread.
2359 (can_access_registers_ptid): Rename to ...
2360 (can_access_registers_thread): ... this, and take a thread
2361 pointer.
2362 (print_thread_info_1): Adjust to compare thread pointers instead
2363 of ptids.
2364 (switch_to_no_thread, switch_to_thread): Make extern.
2365 (scoped_restore_current_thread::~scoped_restore_current_thread):
2366 Use m_thread pointer directly.
2367 (scoped_restore_current_thread::scoped_restore_current_thread):
2368 Use inferior_thread.
2369 (thread_command): Use thread pointer directly.
2370 (thread_num_make_value_helper): Use inferior_thread.
2371 * top.c (execute_command): Use inferior_thread.
2372 * tui/tui-interp.c: Include "inferior.h".
2373 * varobj.c (varobj_create): Use inferior_thread.
2374 (value_of_root_1): Use find_thread_global_id instead of
2375 global_thread_id_to_ptid.
2376
33bab475
AH
23772018-06-21 Alan Hayward <alan.hayward@arm.com>
2378
2379 * regcache.c (readable_regcache::read_part): Avoid memcpy when
2380 possible.
2381 (regcache::write_part): Likewise.
2382 (readable_regcache::cooked_read_part): Update comment.
2383 (readable_regcache::cooked_write_part): Likewise.
2384 * regcache.h: (readable_regcache::read_part): Likewise.
2385 (regcache::write_part): Likewise.
2386
8363f9d5
RB
23872018-06-21 Richard Bunt <richard.bunt@arm.com>
2388 Dirk Schubert <dirk.schubert@arm.com>
2389
2390 * aarch64-linux-nat.c (post_attach): New.
2391 (aarch64_linux_nat_target::post_attach): Override post_attach to
2392 record the number of hardware debug registers.
2393
0d0b0ea2
TT
23942018-06-20 Tom Tromey <tom@tromey.com>
2395
2396 * python/py-param.c (add_setshow_generic): Make parameters const.
2397 (parmpy_init): Update.
2398
302abd6e
SM
23992018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
2400
2401 * regcache.h (regcache_cooked_read_ftype): Rename to...
2402 (register_read_ftype): ...this, change type to function_view.
2403 (class reg_buffer) <save>: Remove src parameter.
2404 (readonly_detached_regcache) <readonly_detached_regcache>: Make
2405 parameter non-const in first overload. Remove src parameter in
2406 second overload.
2407 * regcache.c (do_cooked_read): Remove.
2408 (readonly_detached_regcache::readonly_detached_regcache): Make
2409 parameter non-const, adjust call to other constructor.
2410 (reg_buffer::save): Remove src parameter.
2411 * frame.c (do_frame_register_read): Remove.
2412 (frame_save_as_regcache): Use lambda function.
2413 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
2414 parameter to ppu2spu_data *.
2415 (ppu2spu_sniffer): Use lambda function.
2416
19f3f25f
SM
24172018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
2418
2419 * record-full.c (record_full_target::insert_breakpoint): Remove
2420 "struct" keyword, add const.
2421
d0ac1c44
SM
24222018-06-19 Simon Marchi <simon.marchi@ericsson.com>
2423
2424 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
2425 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
2426 * configure.ac: Remove AC_PREREQ, add missing quoting.
2427 * gnulib/configure.ac: Modernize usage of
2428 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
2429 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
2430 (AUTOMAKE_VERSION): Bump to 1.15.1.
2431 * configure: Re-generate.
2432 * config.in: Re-generate.
2433 * aclocal.m4: Re-generate.
2434 * gnulib/aclocal.m4: Re-generate.
2435 * gnulib/config.in: Re-generate.
2436 * gnulib/configure: Re-generate.
2437 * gnulib/import/Makefile.in: Re-generate.
2438
6ae50267
PA
24392018-06-19 Pedro Alves <palves@redhat.com>
2440
2441 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
2442 (lookup_minimal_symbol_by_pc_section): ... here with
2443 gdb_assert_not_reached added.
2444
61b04dd0
PA
24452018-06-19 Pedro Alves <palves@redhat.com>
2446
2447 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
2448 parameter with a block parameter. Compare location's block symbol
2449 with the frame's block instead of addresses.
2450 (skip_inline_frames): Pass the current block instead of the
2451 frame's address. Break out as soon as we determine the frame
2452 should not be skipped.
2453
f709fabb
TT
24542018-06-18 Tom Tromey <tom@tromey.com>
2455
2456 * solib-aix.c (solib_aix_get_section_offsets): Return
2457 unique_xmalloc_ptr.
2458 (solib_aix_solib_create_inferior_hook): Update.
2459
668eb2f0
TT
24602018-06-18 Tom Tromey <tom@tromey.com>
2461
2462 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
2463
309822ca
TT
24642018-06-18 Tom Tromey <tom@tromey.com>
2465
2466 * solib-frv.c (frv_relocate_main_executable): Use
2467 unique_xmalloc_ptr.
2468 * solib-dsbt.c (dsbt_relocate_main_executable): Use
2469 unique_xmalloc_ptr.
2470
06424eac
TT
24712018-06-18 Tom Tromey <tom@tromey.com>
2472
2473 * objfiles.h (inhibit_section_map_updates): Update.
2474 (resume_section_map_updates, resume_section_map_updates_cleanup):
2475 Remove.
2476 * solib-svr4.c (svr4_handle_solib_event): Update.
2477 * objfiles.c (inhibit_section_map_updates): Return
2478 scoped_restore_tmpl<int>.
2479 (resume_section_map_updates, resume_section_map_updates_cleanup):
2480 Remove.
2481
b4be9fad
TT
24822018-06-18 Tom Tromey <tom@tromey.com>
2483
2484 * valprint.h (read_string): Update.
2485 * valprint.c (read_string): Change type of "buffer".
2486 (val_print_string): Update.
2487 * python/py-value.c (valpy_string): Update.
2488 * language.h (struct language_defn) <la_get_string>: Change
2489 type of "buffer".
2490 (default_get_string, c_get_string): Update.
2491 * language.c (default_get_string): Change type of "buffer".
2492 * guile/scm-value.c (gdbscm_value_to_string): Update.
2493 * c-lang.c (c_get_string): Change type of "buffer".
2494
3f0dbd67
TT
24952018-06-18 Tom Tromey <tom@tromey.com>
2496
2497 * ser-mingw.c (struct pipe_state_destroyer): New.
2498 (pipe_state_up): New typedef.
2499 (cleanup_pipe_state): Remove.
2500 (pipe_windows_open): Use pipe_state_up. Don't release argv.
2501
69d340c6
TT
25022018-06-18 Tom Tromey <tom@tromey.com>
2503
2504 * rust-lang.h (rust_yyerror): Don't declare.
2505 * rust-lang.c (rust_language_defn): Update.
2506 * rust-exp.y (yyerror): Now static.
2507 * parse.c (parse_exp_in_context_1): Update.
2508 * p-lang.h (p_yyerror): Don't declare.
2509 * p-lang.c (p_language_defn): Update.
2510 * p-exp.y (yyerror): Now static.
2511 * opencl-lang.c (opencl_language_defn): Update.
2512 * objc-lang.c (objc_language_defn): Update.
2513 * m2-lang.h (m2_yyerror): Don't declare.
2514 * m2-lang.c (m2_language_defn): Update.
2515 * m2-exp.y (yyerror): Now static.
2516 * language.h (struct language_defn) <la_error>: Remove.
2517 * language.c (unk_lang_error): Remove.
2518 (unknown_language_defn, auto_language_defn): Remove.
2519 * go-lang.h (go_yyerror): Don't declare.
2520 * go-lang.c (go_language_defn): Update.
2521 * go-exp.y (yyerror): Now static.
2522 * f-lang.h (f_yyerror): Don't declare.
2523 * f-lang.c (f_language_defn): Update.
2524 * f-exp.y (yyerror): Now static.
2525 * d-lang.h (d_yyerror): Don't declare.
2526 * d-lang.c (d_language_defn): Update.
2527 * d-exp.y (yyerror): Now static.
2528 * c-lang.h (c_yyerror): Don't declare.
2529 * c-lang.c (c_language_defn, cplus_language_defn)
2530 (asm_language_defn, minimal_language_defn): Update.
2531 * c-exp.y (yyerror): Now static.
2532 * ada-lang.h (ada_yyerror): Don't declare.
2533 * ada-lang.c (ada_language_defn): Update.
2534 * ada-exp.y (yyerror): Now static.
2535
e9902bfc
AH
25362018-06-18 Alan Hayward <alan.hayward@arm.com>
2537
2538 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
2539 (store_sveregs_to_thread): Likewise.
2540 (aarch64_linux_fetch_inferior_registers): Check for SVE.
2541 (aarch64_linux_store_inferior_registers): Likewise.
2542 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
2543 function.
2544 (aarch64_sve_regs_copy_to_regcache): Likewise.
2545 (aarch64_sve_regs_copy_from_regcache): Likewise.
2546 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
2547 declaration.
2548 (aarch64_sve_regs_copy_to_regcache): Likewise.
2549 (aarch64_sve_regs_copy_from_regcache): Likewise.
2550 (sve_context): Structure from Linux headers.
2551 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
2552 (SVE_SIG_ZREG_SIZE): Likewise.
2553 (SVE_SIG_PREG_SIZE): Likewise.
2554 (SVE_SIG_FFR_SIZE): Likewise.
2555 (SVE_SIG_REGS_OFFSET): Likewise.
2556 (SVE_SIG_ZREGS_OFFSET): Likewise.
2557 (SVE_SIG_ZREG_OFFSET): Likewise.
2558 (SVE_SIG_ZREGS_SIZE): Likewise.
2559 (SVE_SIG_PREGS_OFFSET): Likewise.
2560 (SVE_SIG_PREG_OFFSET): Likewise.
2561 (SVE_SIG_PREGS_SIZE): Likewise.
2562 (SVE_SIG_FFR_OFFSET): Likewise.
2563 (SVE_SIG_REGS_SIZE): Likewise.
2564 (SVE_SIG_CONTEXT_SIZE): Likewise.
2565 (SVE_PT_REGS_MASK): Likewise.
2566 (SVE_PT_REGS_FPSIMD): Likewise.
2567 (SVE_PT_REGS_SVE): Likewise.
2568 (SVE_PT_VL_INHERIT): Likewise.
2569 (SVE_PT_VL_ONEXEC): Likewise.
2570 (SVE_PT_REGS_OFFSET): Likewise.
2571 (SVE_PT_FPSIMD_OFFSET): Likewise.
2572 (SVE_PT_FPSIMD_SIZE): Likewise.
2573 (SVE_PT_SVE_ZREG_SIZE): Likewise.
2574 (SVE_PT_SVE_PREG_SIZE): Likewise.
2575 (SVE_PT_SVE_FFR_SIZE): Likewise.
2576 (SVE_PT_SVE_FPSR_SIZE): Likewise.
2577 (SVE_PT_SVE_FPCR_SIZE): Likewise.
2578 (__SVE_SIG_TO_PT): Likewise.
2579 (SVE_PT_SVE_OFFSET): Likewise.
2580 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
2581 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
2582 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
2583 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
2584 (SVE_PT_SVE_PREG_OFFSET): Likewise.
2585 (SVE_PT_SVE_PREGS_SIZE): Likewise.
2586 (SVE_PT_SVE_FFR_OFFSET): Likewise.
2587 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
2588 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
2589 (SVE_PT_SVE_SIZE): Likewise.
2590 (SVE_PT_SIZE): Likewise.
2591 (HAS_SVE_STATE): New define.
2592
17a1cc89
AH
25932018-06-18 Alan Hayward <alan.hayward@arm.com>
2594
2595 * nat/aarch64-sve-linux-sigcontext.h: New file.
2596 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
2597 new files.
2598 (SVE_VQ_MIN): Likewise.
2599 (SVE_VQ_MAX): Likewise.
2600 (SVE_VL_MIN): Likewise.
2601 (SVE_VL_MAX): Likewise.
2602 (SVE_NUM_ZREGS): Likewise.
2603 (SVE_NUM_PREGS): Likewise.
2604 (sve_vl_valid): Likewise.
2605 (struct user_sve_header): Likewise.
2606
7010835a
AB
26072018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
2608 Richard Bunt <Richard.Bunt@arm.com>
2609
2610 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
2611 was requested by GDB.
2612
479b3ef4
TV
26132018-06-15 Tom de Vries <tdevries@suse.de>
2614
2615 * MAINTAINERS (Write After Approval): Add Tom de Vries.
2616
8199b8f4
SM
26172018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
2618
2619 * gnulib/update-gnulib.sh: Print expected versions of
2620 autoconf/aclocal.
2621
55c748a1
SM
26222018-06-14 Simon Marchi <simon.marchi@ericsson.com>
2623
2624 * arch-utils.c (default_type_align): Use type_length_units.
2625 * gdbtypes.c (type_align): Use type_length_units.
2626
87a8eca7
PW
26272018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2628
2629 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
2630 of 'define' command.
2631
5d9a0608
TV
26322018-06-14 Tom de Vries <tdevries@suse.de>
2633
2634 PR cli/22573
2635 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
2636 get_no_prettyformat_print_options.
2637
ab89b5a5
SM
26382018-06-13 Simon Marchi <simon.marchi@ericsson.com>
2639
2640 * sparc-nat.h: Include target.h.
2641 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
2642 <fetch_registers>: Remove this argument in function call.
2643 <store_registers>: Remove this argument in function call, remove
2644 extra semicolon.
2645 <low_forget_process>: Call sparc64_forget_process instead of
2646 sparc_forget_process.
2647
62c808ae
RO
26482018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2649
2650 * procfs.c (_initialize_procfs): Use add_inf_child_target.
2651 (procfs_target::make_corefile_notes): Adjust to new
2652 target_read_alloc return type.
2653
1840d81a
AB
26542018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2655 Stephen Roberts <stephen.roberts@arm.com>
2656
2657 PR gdb/22882
2658 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
2659 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
2660 Move should_notify_stop local into more inner scope.
2661
9516f85a
AB
26622018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2663 Stephen Roberts <stephen.roberts@arm.com>
2664
2665 PR gdb/22882
2666 * infrun.c (resume_1): Add call to mark_async_event_handler.
2667
defd2172
AB
26682018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2669
2670 * infrun.c (do_target_wait): Change old version of $pc printed.
2671
7b23e087
SM
26722018-06-11 Simon Marchi <simon.marchi@ericsson.com>
2673
2674 * dwarf2read.c (read_index_from_section): Rename to...
2675 (read_gdb_index_from_section): ... this, update all callers.
2676 (dwarf2_read_index): Rename to...
2677 (dwarf2_read_gdb_index): ... this, update all callers.
2678
69c67a0b
JDA
26792018-06-11 John David Anglin <danglin@gcc.gnu.org>
2680
2681 * gdb/hppa-linux-nat.c
2682 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
2683 hppa_linux_nat_target::fetch_registers.
2684
65d4cada
AH
26852018-06-11 Alan Hayward <alan.hayward@arm.com>
2686
2687 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
2688 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
2689 (AARCH64_DWARF_SVE_FFR): Likewise.
2690 (AARCH64_DWARF_SVE_P0): Likewise.
2691 (AARCH64_DWARF_SVE_Z0): Likewise.
2692
f868386e
AH
26932018-06-11 Alan Hayward <alan.hayward@arm.com>
2694
2695 * common/common-regcache.h (raw_compare): New function.
2696 * regcache.c (regcache::raw_compare): Likewise.
2697 * regcache.h (regcache::raw_compare): New declaration.
2698
9c861883
AH
26992018-06-11 Alan Hayward <alan.hayward@arm.com>
2700
2701 * common/common-regcache.h (reg_buffer_common): New structure.
2702 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
2703 (reg_buffer::raw_supply): Likewise.
2704 (reg_buffer::raw_supply_integer): Likewise.
2705 (reg_buffer::raw_supply_zeroed): Likewise.
2706 (reg_buffer::raw_collect): Likewise.
2707 (reg_buffer::raw_collect_integer): Likewise.
2708 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
2709 (reg_buffer::raw_supply): Likewise.
2710 (reg_buffer::raw_supply_integer): Likewise.
2711 (reg_buffer::raw_supply_zeroed): Likewise.
2712 (reg_buffer::raw_collect): Likewise.
2713 (reg_buffer::raw_collect_integer): Likewise.
2714
953edf2b
TT
27152018-06-10 Tom Tromey <tom@tromey.com>
2716
2717 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
2718 (class remote_state) <stop_reply_queue>: Now std::vector.
2719 (remote_state::~remote_state)
2720 (remote_target::stop_reply_queue_length): Update.
2721 (struct queue_iter_param, remove_child_of_pending_fork)
2722 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
2723 (check_pending_event_prevents_wildcard_vcont_callback)
2724 (remove_stop_reply_for_inferior)
2725 (remove_stop_reply_of_remote_state)
2726 (remote_notif_remove_once_on_match)
2727 (stop_reply_match_ptid_and_ws)
2728 (remote_kill_child_of_pending_fork): Remove.
2729 (remote_target::remove_new_fork_children)
2730 (remote_target::check_pending_events_prevent_wildcard_vcont)
2731 (remote_target::discard_pending_stop_replies)
2732 (remote_target::discard_pending_stop_replies_in_queue)
2733 (remote_target::remote_notif_remove_queued_reply)
2734 (remote_target::queued_stop_reply)
2735 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
2736 (remote_target::wait, remote_target::kill_new_fork_children)
2737 (remote_target::async): Update.
2738
1ddbba9d
TT
27392018-06-10 Tom Tromey <tom@tromey.com>
2740
2741 * record-full.c (record_full_arch_list_cleanups): Remove.
2742 (record_full_message): Use try/catch.
2743 (record_full_wait_cleanups): Remove.
2744 (record_full_wait_1): Use try/catch.
2745 (record_full_restore): Likewise.
2746
219605fd
TT
27472018-06-10 Tom Tromey <tom@tromey.com>
2748
2749 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
2750 declare VEC. Add constructor.
2751 <in_target_beneath>: Now bool.
2752 (record_full_breakpoints): Now a std::vector, static.
2753 (record_full_sync_record_breakpoints)
2754 (record_full_init_record_breakpoints)
2755 (record_full_target::insert_breakpoint)
2756 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
2757
71b73764
SM
27582018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
2759
2760 * dwarf2read.c (process_cu_includes): Remove struct keyword.
2761 * serial.c (serial_interface_lookup): Remove struct keyword.
2762
4360561f
TT
27632018-06-10 Tom Tromey <tom@tromey.com>
2764
2765 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
2766 method.
2767 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
2768 a method.
2769 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
2770 method.
2771 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
2772 "beneath" as a method.
2773 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
2774 Use "beneath" as a method.
2775
d14b92bf
TT
27762018-06-10 Tom Tromey <tom@tromey.com>
2777
2778 * tracefile.c (struct trace_file_writer_deleter): New.
2779 <operator()>: Rename from trace_file_writer_xfree.
2780 (trace_file_writer_up): New typedef.
2781 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
2782
835dcf92
SM
27832018-06-09 Simon Marchi <simon.marchi@ericsson.com>
2784
2785 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
2786 <m_registers, m_register_status>: Change type to
2787 std::unique_ptr.
2788 * regcache.c (reg_buffer::reg_buffer): Use new instead of
2789 XCNEWVEC.
2790
aac0d564
SM
27912018-06-09 Simon Marchi <simon.marchi@ericsson.com>
2792
2793 * common/common-regcache.h (enum register_status): Add
2794 underlying type "signed char".
2795 * regcache.h (reg_buffer) <m_register_status>: Change type to
2796 register_status *.
2797 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
2798 register_status instead of signed char.
2799 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
2800 (reg_buffer::get_register_status): Remove cast.
2801 (readable_regcache::raw_read): Remove cast.
2802 (readable_regcache::cooked_read): Remove cast.
2803
77ad7394
TT
28042018-06-09 Tom Tromey <tom@tromey.com>
2805
2806 * source.c (reverse_search_command, forward_search_command): Use
2807 scoped_fd.
2808
191cca63
TT
28092018-06-09 Tom Tromey <tom@tromey.com>
2810
2811 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
2812 (serial_ops_list): Now static, std::vector.
2813 (serial_interface_lookup, serial_add_interface): Update.
2814
c5d0225d
TT
28152018-06-09 Tom Tromey <tom@tromey.com>
2816
2817 * dwarf2read.c (process_cu_includes): Update.
2818 (process_full_comp_unit): Update.
2819 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
2820 std::vector.
2821
aeab5128
PK
28222018-06-08 Paul Koning <paul_koning@dell.com>
2823
2824 PR gdb/23252
2825
2826 * python/python.c (do_start_initialization):
2827 Avoid call to internal Python API.
2828 (init__gdb_module): New function.
2829
5045b3d7
GB
28302018-06-08 Gary Benson <gbenson@redhat.com>
2831
2832 * linux-thread-db.c (valprint.h): New include.
2833 (struct check_thread_db_info): New structure.
2834 (check_thread_db_on_load, tdb_testinfo): New static globals.
2835 (check_thread_db, check_thread_db_callback): New functions.
2836 (try_thread_db_load_1): Run integrity checks if requested.
2837 (maintenance_check_libthread_db): New function.
2838 (_initialize_thread_db): Register "maint check libthread-db"
2839 and "maint set/show check-libthread-db".
2840 * NEWS: Mention the above new commands.
2841
2f4f025f
TT
28422018-06-08 Tom Tromey <tom@tromey.com>
2843
2844 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
2845 now a method.
2846
343b0027
TT
28472018-06-08 Tom Tromey <tom@tromey.com>
2848
2849 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
2850
8dcc53b3
TT
28512018-06-08 Tom Tromey <tom@tromey.com>
2852
2853 * common/btrace-common.h (struct btrace_data): Add constructor,
2854 destructor, move assignment operator.
2855 <empty, clear, fini>: New methods.
2856 <format>: Initialize.
2857 (btrace_data_init, btrace_data_fini, btrace_data_clear)
2858 (btrace_data_empty): Don't declare.
2859 * common/btrace-common.c (btrace_data_init): Remove.
2860 (btrace_data::fini): Rename from btrace_data_fini.
2861 (btrace_data::empty): Rename from btrace_data_empty.
2862 (btrace_data::clear): Rename from btrace_data_clear. Return
2863 bool.
2864 * btrace.h (make_cleanup_btrace_data): Don't declare.
2865 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
2866 (parse_xml_btrace): Update.
2867 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
2868 (maint_btrace_clear_packet_history_cmd): Update.
2869
a1740ee1
PA
28702018-06-07 Pedro Alves <palves@redhat.com>
2871
2872 * target.h (target_ops) <beneath>: Now a method. All references
2873 updated.
2874 (class target_stack): New.
2875 * target.c (g_target_stack): New.
2876 (g_current_top_target): Delete.
2877 (current_top_target): Get the top target out of g_target_stack.
2878 (target_stack::push, target_stack::unpush): New.
2879 (push_target, unpush_target): Reimplement.
2880 (target_is_pushed): Reimplement in terms of g_target_stack.
2881 (target_ops::beneath, target_stack::find_beneath): New.
2882
d6ca69cd
PA
28832018-06-07 Pedro Alves <palves@redhat.com>
2884
2885 * target.h (find_target_beneath): Delete declaration.
2886 * target.c (find_target_beneath): Delete definition.
2887 * aix-thread.c: All callers of find_target_beneath adjusted to
2888 call target_ops::beneath instead.
2889 * bsd-uthread.c: Likewise.
2890 * linux-thread-db.c: Likewise.
2891 * ravenscar-thread.c: Likewise.
2892 * sol-thread.c: Likewise.
2893 * spu-multiarch.c: Likewise.
2894
b6a8c27b
PA
28952018-06-07 Pedro Alves <palves@redhat.com>
2896
2897 * target.h (target_ops) <beneath>: Now a method. All references
2898 updated.
2899 (target_ops) <m_beneath>: New.
2900 * target.c (target_ops::beneath): New.
2901 * corelow.c: Adjust all references to target_ops::beneath.
2902 * linux-thread-db.c: Likewise.
2903 * make-target-delegates: Likewise.
2904 * record-btrace.c: Likewise.
2905 * record-full.c: Likewise.
2906 * remote.c: Likewise.
2907 * target.c: Likewise.
2908 * target-delegates.c: Regenerate.
2909
8b88a78e
PA
29102018-06-07 Pedro Alves <palves@redhat.com>
2911
2912 * target.h (target_stack): Delete.
2913 (current_top_target): Declare function.
2914 * target.c (target_stack): Delete.
2915 (g_current_top_target): New.
2916 (current_top_target): New function.
2917 * auxv.c: Use current_top_target instead of target_stack
2918 throughout.
2919 * avr-tdep.c: Likewise.
2920 * breakpoint.c: Likewise.
2921 * corefile.c: Likewise.
2922 * elfread.c: Likewise.
2923 * eval.c: Likewise.
2924 * exceptions.c: Likewise.
2925 * frame.c: Likewise.
2926 * gdbarch-selftests.c: Likewise.
2927 * gnu-v3-abi.c: Likewise.
2928 * ia64-tdep.c: Likewise.
2929 * ia64-vms-tdep.c: Likewise.
2930 * infcall.c: Likewise.
2931 * infcmd.c: Likewise.
2932 * infrun.c: Likewise.
2933 * linespec.c: Likewise.
2934 * linux-tdep.c: Likewise.
2935 * minsyms.c: Likewise.
2936 * ppc-linux-nat.c: Likewise.
2937 * ppc-linux-tdep.c: Likewise.
2938 * procfs.c: Likewise.
2939 * regcache.c: Likewise.
2940 * remote.c: Likewise.
2941 * rs6000-tdep.c: Likewise.
2942 * s390-linux-nat.c: Likewise.
2943 * s390-tdep.c: Likewise.
2944 * solib-aix.c: Likewise.
2945 * solib-darwin.c: Likewise.
2946 * solib-dsbt.c: Likewise.
2947 * solib-spu.c: Likewise.
2948 * solib-svr4.c: Likewise.
2949 * solib-target.c: Likewise.
2950 * sparc-tdep.c: Likewise.
2951 * sparc64-tdep.c: Likewise.
2952 * spu-tdep.c: Likewise.
2953 * symfile.c: Likewise.
2954 * symtab.c: Likewise.
2955 * target-descriptions.c: Likewise.
2956 * target-memory.c: Likewise.
2957 * target.c: Likewise.
2958 * target.h: Likewise.
2959 * tracefile-tfile.c: Likewise.
2960 * tracepoint.c: Likewise.
2961 * valops.c: Likewise.
2962 * valprint.c: Likewise.
2963 * value.c: Likewise.
2964 * windows-tdep.c: Likewise.
2965 * mi/mi-main.c: Likewise.
2966
c7110220
TT
29672018-06-07 Tom Tromey <tom@tromey.com>
2968
2969 * valprint.h (build_address_symbolic): Declare.
2970 * printcmd.c (print_address_symbolic): Update.
2971 (build_address_symbolic): Change "name" and "filename" to
2972 std::string.
2973 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
2974 Update.
2975 * defs.h (build_address_symbolic): Remove declaration.
2976
63bad7b6
AH
29772018-06-07 Alan Hayward <alan.hayward@arm.com>
2978
2979 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
2980 (aarch64_vnv_type): Add function.
2981 (aarch64_pseudo_register_name): Add V regs for SVE.
2982 (aarch64_pseudo_register_type): Likewise.
2983 (aarch64_pseudo_register_reggroup_p): Likewise.
2984 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
2985 (aarch64_pseudo_read_value): Add V regs for SVE.
2986 (aarch64_pseudo_write_2): Use V0 offset for SVE
2987 (aarch64_pseudo_write): Add V regs for SVE.
2988 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
2989
13e3c608
SDJ
29902018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
2991
2992 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
2993 (sve_vl_from_vq): Likewise.
2994
c61b06a1
TT
29952018-06-05 Tom Tromey <tom@tromey.com>
2996
2997 * cli/cli-cmds.c (show_version): Update.
2998 * top.c (print_gdb_version): Add "interactive" parameter.
2999 Update.
3000 * main.c (captured_main_1): Update.
3001 * top.h (print_gdb_version): Add "interactive" parameter and a
3002 comment.
3003
115f7325
DM
30042018-06-05 David Malcolm <dmalcolm@redhat.com>
3005
3006 * common/enum-flags.h: Add trailing semicolon to example in
3007 comment.
3008
eb6af809
TT
30092018-06-05 Tom Tromey <tom@tromey.com>
3010
3011 PR cli/12326:
3012 * NEWS: Add entry about pager.
3013 * utils.c (pagination_disabled_for_command): New global.
3014 (prompt_for_continue): Allow "c" response to prompt.
3015 (reinitialize_more_filter): Clear
3016 pagination_disabled_for_command.
3017 (fputs_maybe_filtered): Check pagination_disabled_for_command.
3018
54d343a2
TT
30192018-06-04 Tom Tromey <tom@tromey.com>
3020
3021 * ada-lang.h (ada_lookup_symbol_list): Update.
3022 * ada-lang.c (resolve_subexp): Update.
3023 (symbols_are_identical_enums): Change type of syms. Remove nsyms
3024 parameter.
3025 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
3026 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
3027 results parameter to std::vector.
3028 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
3029 Update.
3030 * ada-exp.y (block_lookup): Update.
3031 (select_possible_type_sym): Change type of syms. Remove nsyms
3032 parameter.
3033 (write_var_or_type, write_name_assoc): Update.
3034
178d6a63
JB
30352018-06-04 Joel Brobecker <brobecker@adacore.com>
3036
3037 * windows-nat.c (windows_nat_target::xfer_partial): Return
3038 TARGET_XFER_E_IO if we need to delegate to the target beneath
3039 but BENEATH is NULL.
3040
baf00c2d
SM
30412018-06-04 Simon Marchi <simon.marchi@ericsson.com>
3042
3043 * Makefile.in (config.status): Add configure.nat as a
3044 dependency.
3045
214b073c
TT
30462018-06-04 Tom Tromey <tom@tromey.com>
3047
3048 * cp-name-parser.y (cpname_state): Add method declarations.
3049 (HANDLE_QUAL): Update.
3050 (cpname_state::d_grab, cpname_state::fill_comp)
3051 (cpname_state::make_operator, cpname_state::make_dtor)
3052 (cpname_state::make_builtin_type, cpname_state::make_name)
3053 (cpname_state::d_qualify, cpname_state::d_int_type)
3054 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
3055 (%union): Move earlier.
3056
62b74cb8
AH
30572018-06-04 Alan Hayward <alan.hayward@arm.com>
3058
3059 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
3060
3c5cd5c3
AH
30612018-06-04 Alan Hayward <alan.hayward@arm.com>
3062
3063 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
3064 (aarch64_pseudo_write_1): Likewise.
3065 (aarch64_pseudo_read_value): Use helper.
3066 (aarch64_pseudo_write): Likewise.
3067
59f413d5
PA
30682018-06-04 Pedro Alves <palves@redhat.com>
3069
3070 * darwin-nat.c (darwin_ops): Delete.
3071 (darwin_attach_pid): Use get_native_target.
3072
1332a140
AH
30732018-06-04 Alan Hayward <alan.hayward@arm.com>
3074
3075 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
3076 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
3077
ba2d2bb2
AH
30782018-06-04 Alan Hayward <alan.hayward@arm.com>
3079
3080 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
3081 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
3082 (aarch64_gdbarch_init): Check for SVE.
3083 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
3084
30852018-06-04 Alan Hayward <alan.hayward@arm.com>
39bfb937
AH
3086
3087 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
3088 * aarch64-tdep.h (aarch64_read_description): Likewise.
3089 * arch/aarch64.c (aarch64_create_target_description): Likewise.
3090 * arch/aarch64.h (aarch64_create_target_description): Likewise.
3091 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
3092 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
3093 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
3094
41c60b4b
SM
30952018-06-02 Simon Marchi <simon.marchi@ericsson.com>
3096
3097 * value.c (value_fetch_lazy_bitfield): New.
3098 (value_fetch_lazy_memory): New.
3099 (value_fetch_lazy_register): New.
3100 (value_fetch_lazy): Factor out to smaller functions.
3101
7b640f72
TT
31022018-06-01 Tom Tromey <tom@tromey.com>
3103
3104 * cp-name-parser.y (backslashable, represented): Now const.
3105
98e69eb3
TT
31062018-06-01 Tom Tromey <tom@tromey.com>
3107
3108 * cp-name-parser.y: Include parser-defs.h.
3109 (parser_fprintf): Remove declaration.
3110
49265499
TT
31112018-06-01 Tom Tromey <tom@tromey.com>
3112
3113 * cp-name-parser.y: Use %pure-parser, %lex-param, and
3114 %parse-param.
3115 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
3116 (global_result): Remove globals.
3117 (struct cpname_state): New.
3118 (yyparse): Don't declare.
3119 (yylex, yyerror): Move declarations after %union.
3120 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
3121 (make_name): Add state parameter.
3122 Update all callers.
3123 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
3124 parameter.
3125 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
3126 Update.
3127 (yylex): Add lvalp, state parameters.
3128 (yyerror): Add state parameter.
3129 (cp_demangled_name_to_comp): Update.
3130
55b6c984
TT
31312018-06-01 Tom Tromey <tom@tromey.com>
3132
3133 * cp-name-parser.y (parser_fprintf): Declare.
3134 (GDB_YY_REMAP_PREFIX): Define.
3135 Include yy-remap.h. Don't redefine yy* identifiers.
3136
3513a6bb
TT
31372018-06-01 Tom Tromey <tom@tromey.com>
3138
3139 * python/py-type.c (typy_legacy_template_argument): Update.
3140 * cp-support.h (cp_demangled_name_to_comp): Update.
3141 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
3142 parameter to be a "std::string *".
3143 (main): Update.
3144
e9cb46ab
L
31452018-06-01 H.J. Lu <hongjiu.lu@intel.com>
3146
3147 * ada-lex.l: Include "diagnostics.h" instead of
3148 "common/diagnostics.h".
3149 * unittests/environ-selftests.c: Likewise.
3150 * common/diagnostics.h: Moved to ../include.
3151
8e817061
JB
31522018-06-01 Joel Brobecker <brobecker@adacore.com>
3153
3154 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
3155 to language_mode_manual while calling breakpoint_re_set_one.
3156
a737d952
TT
31572018-06-01 Tom Tromey <tom@tromey.com>
3158
3159 * valops.c (value_cast_structs, destructor_name_p): Update.
3160 * symtab.c (gdb_mangle_name): Update.
3161 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
3162 Update.
3163 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
3164 (pascal_object_print_value_fields, pascal_object_print_value):
3165 Update.
3166 * p-typeprint.c (pascal_type_print_derivation_info): Update.
3167 * linespec.c (find_methods): Update.
3168 * gdbtypes.h (type_name_no_tag): Remove.
3169 (type_name_or_error): Rename from type_name_no_tag_or_error.
3170 * gdbtypes.c (type_name_no_tag): Remove.
3171 (type_name_or_error): Rename from type_name_no_tag_or_error.
3172 (lookup_struct_elt_type, check_typedef): Update.
3173 * expprint.c (print_subexp_standard): Update.
3174 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
3175 * d-namespace.c (d_lookup_nested_symbol): Update.
3176 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
3177 (cp_print_class_member): Update.
3178 * cp-namespace.c (cp_lookup_nested_symbol): Update.
3179 * completer.c (add_struct_fields): Update.
3180 * c-typeprint.c (cp_type_print_derivation_info)
3181 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
3182 Update.
3183 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
3184 (ada_prefer_type, ada_is_exception_sym): Update.
3185
e86ca25f
TT
31862018-06-01 Tom Tromey <tom@tromey.com>
3187
3188 * valops.c (enum_constant_from_type, value_namespace_elt)
3189 (value_maybe_namespace_elt): Update.
3190 * valarith.c (find_size_for_pointer_math): Update.
3191 * target-descriptions.c (make_gdb_type): Update.
3192 * symmisc.c (print_symbol): Update.
3193 * stabsread.c (define_symbol, read_type)
3194 (complain_about_struct_wipeout, add_undefined_type)
3195 (cleanup_undefined_types_1): Update.
3196 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
3197 (rust_range_type_p, val_print_struct, rust_print_struct_def)
3198 (rust_internal_print_type, rust_composite_type)
3199 (rust_evaluate_funcall, rust_evaluate_subexp)
3200 (rust_inclusive_range_type_p): Update.
3201 * python/py-type.c (typy_get_tag): Update.
3202 * p-typeprint.c (pascal_type_print_base): Update.
3203 * mdebugread.c (parse_symbol, parse_type): Update.
3204 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
3205 Update.
3206 * guile/scm-type.c (gdbscm_type_tag): Update.
3207 * go-lang.c (sixg_string_p): Update.
3208 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
3209 Update.
3210 * gdbtypes.h (struct main_type) <tag_name>: Remove.
3211 (TYPE_TAG_NAME): Remove.
3212 * gdbtypes.c (type_name_no_tag): Simplify.
3213 (check_typedef, check_types_equal, recursive_dump_type)
3214 (copy_type_recursive, arch_composite_type): Update.
3215 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
3216 in summary mode when needed.
3217 * eval.c (evaluate_funcall): Update.
3218 * dwarf2read.c (fixup_go_packaging, read_structure_type)
3219 (process_structure_scope, read_enumeration_type)
3220 (read_namespace_type, read_module_type, determine_prefix): Update.
3221 * cp-support.c (inspect_type): Update.
3222 * coffread.c (process_coff_symbol, decode_base_type): Update.
3223 * c-varobj.c (c_is_path_expr_parent): Update.
3224 * c-typeprint.c (c_type_print_base_struct_union): Update.
3225 (c_type_print_base_1): Update. Print struct/class/union/enum in
3226 summary when using C language.
3227 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
3228 (gen_maybe_namespace_elt): Update.
3229 * ada-lang.c (ada_type_name): Simplify.
3230 (empty_record, ada_template_to_fixed_record_type_1)
3231 (template_to_static_fixed_type)
3232 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
3233
c1ec8cea
TT
32342018-06-01 Tom Tromey <tom@tromey.com>
3235
3236 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
3237 c_print_type.
3238 * c-typeprint.c (c_print_type_1): Add "language" parameter.
3239 (c_print_type): Update.
3240 (c_print_type): New overload.
3241 (c_type_print_varspec_prefix, c_type_print_args)
3242 (c_type_print_varspec_suffix, c_print_type_no_offsets)
3243 (c_type_print_base_struct_union, c_type_print_base_1)
3244 (cp_type_print_method_args): Add "language" parameter.
3245 (c_type_print_base): Update.
3246 * c-lang.h (c_print_type): Add new overload.
3247
bc8453a7
TT
32482018-06-01 Tom Tromey <tom@tromey.com>
3249
3250 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
3251 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
3252
739e8682
AH
32532018-06-01 Alan Hayward <alan.hayward@arm.com>
3254
3255 * aarch64-tdep.c (aarch64_sve_register_names): New const
3256 var.
3257 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
3258 (AARCH64_SVE_Z_REGS_NUM): New define.
3259 (AARCH64_SVE_P_REGS_NUM): Likewise.
3260 (AARCH64_SVE_NUM_REGS): Likewise.
3261
8a60efe7
UB
32622018-05-31 Uros Bizjak <ubizjak@gmail.com>
3263
3264 * nat/linux-ptrace.h [__alpha__]
3265 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
3266 definitions.
3267
4b2dfa9d
MR
32682018-05-31 Maciej W. Rozycki <macro@mips.com>
3269
3270 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
3271 the endianness selected.
3272 * NEWS: Document `set endian auto' mode operation update.
3273
122394f1
AH
32742018-05-31 Alan Hayward <alan.hayward@arm.com>
3275
3276 * Makefile.in: Add new header.
3277 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
3278 (sve_vl_from_vg): Likewise.
3279 (sve_vq_from_vl): Likewise.
3280 (sve_vl_from_vq): Likewise.
3281 (sve_vq_from_vg): Likewise.
3282 (sve_vg_from_vq): Likewise.
3283 * configure.nat: Add new c file.
3284 * nat/aarch64-sve-linux-ptrace.c: New file.
3285 * nat/aarch64-sve-linux-ptrace.h: New file.
3286
95228a0d
AH
32872018-05-31 Alan Hayward <alan.hayward@arm.com>
3288
3289 * aarch64-linux-nat.c (aarch64_linux_read_description):
3290 Add parmeter zero.
3291 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
3292 Likewise.
3293 * aarch64-tdep.c (tdesc_aarch64_list): Add.
3294 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
3295 (aarch64_gdbarch_init): Add parmeter zero.
3296 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
3297 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
3298 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
3299 parmeter.
3300 * doc/gdb.texinfo: Describe SVE feature
3301 * features/aarch64-sve.c: New file.
3302
5969f0db
OJ
33032018-05-31 Omair Javaid <omair.javaid@linaro.org>
3304
3305 PR gdb/23210
3306 * gdbarch.sh (significant_addr_bit): Default to zero when
3307 not set by target architecture.
3308 * gdbarch.c: Re-generated.
3309 * utils.c (address_significant): Update.
3310
61367c61
JB
33112018-05-30 Joel Brobecker <brobecker@adacore.com>
3312
3313 * stack.c (func_command): Remove trailing newline in call to error.
3314
34a79281
SM
33152018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3316
3317 * regcache.h (regcache_raw_collect): Remove, update callers to
3318 use regcache::raw_collect.
3319 * regcache.c (regcache_raw_collect): Remove.
3320
73e1c03f
SM
33212018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3322
3323 * regcache.h (regcache_raw_supply): Remove, update callers to
3324 use detached_regcache::raw_supply.
3325 * regcache.c (regcache_raw_supply): Remove.
3326
e4c4a59b
SM
33272018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3328
3329 * regcache.h (regcache_cooked_write_part): Remove, update
3330 callers to use regcache::cooked_write_part.
3331 * regcache.c (regcache_cooked_write_part): Remove.
3332
73bb0000
SM
33332018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3334
3335 * regcache.h (regcache_cooked_read_part): Remove, update callers
3336 to use readable_regcache::cooked_read_part.
3337 * regcache.c (regcache_cooked_read_part): Remove.
3338
46a45e9d
SM
33392018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3340
3341 * regcache.h (regcache_cooked_read_value): Remove, update
3342 callers to use readable_regcache::cooked_read_value.
3343 * regcache.c (regcache_cooked_read_value): Remove.
3344
b66f5587
SM
33452018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3346
3347 * regcache.h (regcache_cooked_write): Remove, update callers to
3348 use regcache::cooked_write.
3349 * regcache.c (regcache_cooked_write): Remove.
3350
6aa7d724
SM
33512018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3352
3353 * regcache.h (regcache_invalidate): Remove, update callers to
3354 use detached_regcache::invalidate instead.
3355 * regcache.c (regcache_invalidate): Remove.
3356
4f0420fd
SM
33572018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3358
3359 * regcache.h (regcache_raw_write_part): Remove, update callers
3360 to use regcache::raw_write_part instead.
3361 * regcache.c (regcache_raw_write_part): Remove.
3362
502fe83e
SM
33632018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3364
3365 * regcache.h (regcache_raw_read_part): Remove, update callers to
3366 use readable_regcache::raw_read_part instead.
3367 * regcache.c (regcache_raw_read_part): Remove.
3368
dca08e1f
SM
33692018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3370
3371 * regcache.h (regcache_cooked_read): Remove, update callers to
3372 use readable_regcache::cooked_read instead.
3373 * regcache.c (regcache_cooked_read): Remove.
3374
10eaee5f
SM
33752018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3376
3377 * regcache.h (regcache_raw_write): Remove, update callers to use
3378 regcache::raw_write instead.
3379 * regcache.c (regcache_raw_write): Remove.
3380
0b883586
SM
33812018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3382
3383 * regcache.h (regcache_raw_read): Remove, update callers to use
3384 readable_regcache::raw_read instead.
3385 * regcache.c (regcache_raw_read): Remove.
3386
0b47d985
SM
33872018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3388
3389 * regcache.h (regcache_raw_update): Remove, update callers to
3390 use readable_regcache::raw_update instead.
3391 * regcache.c (regcache_raw_update): Remove.
3392
0ec9f114
SM
33932018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3394
3395 * regcache.h (regcache_register_status): Remove, update callers
3396 to use reg_buffer::get_register_status directly instead.
3397 * regcache.c (regcache_register_status): Remove.
3398
222312d3
SM
33992018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3400
3401 * regcache.h (regcache_get_ptid): Remove, update all callers to
3402 call regcache::ptid instead.
3403 * regcache.c (regcache_get_ptid): Remove.
3404
fdbe37e3
SM
34052018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3406
3407 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
3408
f7c6f423
PA
34092018-05-30 Pedro Alves <palves@redhat.com>
3410
3411 * common/common-exceptions.h (exception_rethrow): Use
3412 ATTRIBUTE_NORETURN.
3413
52941706
SM
34142018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
3415
3416 * breakpoint.c (print_solib_event, check_status_catch_solib):
3417 Remove struct keyword in range-based for loops.
3418 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
3419 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
3420 Likewise.
3421 * linespec.c (find_superclass_methods, search_minsyms_for_name):
3422 Likewise.
3423 * symfile.c (addr_info_make_relative): Likewise.
3424 * thread.c (value_in_thread_stack_temporaries): Likewise.
3425
bf2977b5
WP
34262018-06-12 Weimin Pan <weimin.pan@oracle.com>
3427
3428 PR gdb/16841
3429 * valops.c (value_struct_elt_for_reference): Call check_typedef on
3430 aggregate type to get its real type before accessing it.
3431
64cc34d8
WP
34322018-05-29 Weimin Pan <weimin.pan@oracle.com>
3433
3434 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
3435 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
3436 * coff-pe-read.c (add_pe_forwarded_sym): Replace
3437 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
3438 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
3439 * jit.c (jit_breakpoint_re_set_internal): Likewise.
3440 * printcmd.c (info_address_command): Likewise.
3441
e7ec8713
TT
34422018-05-29 Tom Tromey <tom@tromey.com>
3443
3444 * windows-nat.c (handle_exception): Update fall-through comment.
3445
bcb430e4
TT
34462018-05-29 Tom Tromey <tom@tromey.com>
3447
3448 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
3449 (struct program_space) <added_solibs>: Now a std::vector.
3450 * breakpoint.c (print_solib_event): Update.
3451 (check_status_catch_solib): Update.
3452 * progspace.c (clear_program_space_solib_cache): Update.
3453 * solib.c (update_solib_list): Update.
3454
894882e3
TT
34552018-05-29 Tom Tromey <tom@tromey.com>
3456
3457 * python/py-type.c (typy_richcompare): Update.
3458 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
3459 * gdbtypes.h (types_deeply_equal): Return bool.
3460 (types_equal): Likewise.
3461 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
3462 declare VEC.
3463 (check_types_equal): Change worklist to std::vector. Return
3464 bool.
3465 (struct type_equality_entry): Add constructor.
3466 (compare_maybe_null_strings): Return bool.
3467 (check_types_worklist): Return bool. Change worklist to
3468 std::vector.
3469 (types_deeply_equal): Use std::vector.
3470 (types_equal): Return bool.
3471 (compare_maybe_null_strings): Simplify.
3472
10b2ded4
TT
34732018-05-29 Tom Tromey <tom@tromey.com>
3474
3475 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
3476
4f7deebe
TT
34772018-05-29 Tom Tromey <tom@tromey.com>
3478
3479 * objc-lang.h: Don't include cp-support.h.
3480 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
3481 declare VEC.
3482
b8283aea
TT
34832018-05-27 Tom Tromey <tom@tromey.com>
3484
3485 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
3486
41a883c8
TT
34872018-05-25 Tom Tromey <tom@tromey.com>
3488
3489 * value.c (value::location): Initialize.
3490
bf259e25
TT
34912018-05-25 Tom Tromey <tom@tromey.com>
3492
3493 * dbxread.c (init_bincl_list): Remove.
3494 (bincl_list): Now a std::vector.
3495 (bincls_allocated, next_bincl): Remove.
3496 (free_bincl_list, do_free_bincl_list_cleanup)
3497 (make_cleanup_free_bincl_list): Remove.
3498 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
3499 unique_xmalloc_ptr.
3500 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
3501 (struct header_file_location): Add constructor.
3502 (add_bincl_to_list): Remove.
3503
d525a99b
TT
35042018-05-25 Tom Tromey <tom@tromey.com>
3505
3506 * tui/tui.c (tui_enable): Update.
3507 * mi/mi-interp.c (mi_interp::init): Update.
3508 * interps.h (class interp) <name>: New method.
3509 <m_name>: Rename from name.
3510 (~scoped_restore_interp): Update.
3511 * interps.c (interp::interp): Update.
3512 (interp_add, interp_set, interp_lookup_existing)
3513 (current_interp_named_p): Update.
3514
da505cff
TT
35152018-05-25 Tom Tromey <tom@tromey.com>
3516
3517 * interps.c (interp_name): Remove.
3518 * mi/mi-interp.c (mi_interp::init): Update.
3519 * interps.h (interp_name): Remove.
3520 (~scoped_restore_interp): Update.
3521 * tui/tui.c (tui_enable): Update.
3522
29f94340
TT
35232018-05-25 Tom Tromey <tom@tromey.com>
3524
3525 * utils.c (fputs_maybe_filtered): Update.
3526 * linespec.c (decode_line_full): Update.
3527 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
3528 (mi_print_breakpoint_for_event, mi_solib_loaded)
3529 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3530 (mi_user_selected_context_changed): Update.
3531 * mi/mi-main.c (mi_execute_command): Update.
3532 * cli/cli-script.c (execute_control_command): Update.
3533 * python/python.c (execute_gdb_command): Update.
3534 * solib.c (info_sharedlibrary_command): Update.
3535 * interps.c (interp_ui_out): Remove.
3536 * interps.h (interp_ui_out): Remove.
3537
716b8bc5
TT
35382018-05-25 Tom Tromey <tom@tromey.com>
3539
3540 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
3541 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
3542 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
3543
753ff9bd
TT
35442018-05-25 Tom Tromey <tom@tromey.com>
3545
3546 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
3547 * interps.c (interp_exec): Use scoped_restore.
3548
5ca3b260
TT
35492018-05-25 Tom Tromey <tom@tromey.com>
3550
3551 * remote.c (remote_target::remote_file_get): Use
3552 gdb::byte_vector.
3553 (remote_target::remote_file_put): Likewise.
3554
3173aa2f
TT
35552018-05-25 Tom Tromey <tom@tromey.com>
3556
3557 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
3558 a std::string.
3559 (get_pe_section_index, add_pe_exported_sym): Update.
3560 (read_pe_exported_syms): Use gdb::def_vector.
3561
09a5e1b5
TT
35622018-05-25 Tom Tromey <tom@tromey.com>
3563
3564 * frame.c (remove_prev_frame): Remove.
3565 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
3566
d8dab6c3
MR
35672018-05-25 Maciej W. Rozycki <macro@mips.com>
3568
3569 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
3570 Remove prototypes.
3571 * mips-linux-nat.c (supply_fpregset): Always call
3572 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
3573 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
3574 `mips_fill_fpregset'.
3575 * mips-linux-tdep.c (mips_supply_fpregset)
3576 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
3577 (mips_fill_fpregset_wrapper): Remove functions.
3578 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
3579 (mips_linux_fpregset): Remove variable.
3580 (mips_linux_iterate_over_regset_sections): Use
3581 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
3582 (mips_linux_o32_sigframe_init): Remove comment.
3583
3c69da40
PA
35842018-05-25 Pedro Alves <palves@redhat.com>
3585
3586 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
3587 (struct readahead_cache, struct packet_reg, struct
3588 remote_arch_state, class remote_state): Move higher up in the
3589 file.
3590 (remote_target::m_remote_state): Now an object instead of a pointer.
3591 (remote_target::get_remote_state): Adjust.
3592
39f0c204
AB
35932018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
3594
3595 * stack.c (select_and_print_frame): Delete.
3596 (struct function_bounds): Move struct within function.
3597 (func_command): Most content moved into new function
3598 find_frame_for_function, use new function, print result, add
3599 function comment.
3600 (find_frame_for_function): New function, now returns a result.
3601
d392224a
PW
36022018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3603
3604 * stack.c (iterate_over_block_arg_vars): Fix comment.
3605 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
3606
45f25d6c
AB
36072018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
3608
3609 PR gdb/23203
3610 * frame.c
3611 (scoped_restore_selected_frame::scoped_restore_selected_frame):
3612 Define.
3613 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
3614 Define.
3615 * frame.h (class scoped_restore_selected_frame): New class.
3616 * stack.c (print_frame_local_vars): Remove catching and rethrowing
3617 of any exception, use scoped_restore_selected_frame to restore the
3618 frame instead.
3619
da05d921
PA
36202018-05-24 Pedro Alves <palves@redhat.com>
3621
3622 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
3623 override.
3624
a8be540e
TT
36252018-05-23 Tom Tromey <tom@tromey.com>
3626
3627 * complaints.c (struct complaints): Remove.
3628 (symfile_complaint_book): Remove.
3629 (series): New global.
3630 (complaint_internal): Update.
3631 (clear_complaints): Update.
3632
ff1cf532
TT
36332018-05-23 Tom Tromey <tom@tromey.com>
3634
3635 * complaints.c (counters): New global.
3636 (struct complain): Remove.
3637 (struct complaints) <root>: Remove.
3638 (complaint_sentinel): Remove.
3639 (symfile_complaint_book): Update.
3640 (find_complaint) Remove.
3641 (complaint_internal, clear_complaints): Update.
3642
7ff88174
TT
36432018-05-23 Tom Tromey <tom@tromey.com>
3644
3645 * complaints.c (struct complain) <file, line>: Remove.
3646 (find_complaint): Remove file, line parameters.
3647 (complaint_internal): Update.
3648
de54e1a5
TT
36492018-05-23 Tom Tromey <tom@tromey.com>
3650
3651 * complaints.c (vcomplaint): Remove.
3652 (complaint_internal) Merge in contents of vcomplaint.
3653
2ac237e5
TT
36542018-05-23 Tom Tromey <tom@tromey.com>
3655
3656 * complaints.c (struct complaints) <explanation>: Remove.
3657 (symfile_explanations): Remove.
3658 (symfile_complaint_book): Update.
3659 (vcomplaint): Update.
3660 (struct explanation): Remove.
3661
b98664d3
TT
36622018-05-23 Tom Tromey <tom@tromey.com>
3663
3664 * complaints.c (symfile_complaints): Remove.
3665 (complaint_internal): Remove "complaints" parameter.
3666 (clear_complaints, vcomplaint): Remove "c" parameter.
3667 (get_complaints): Remove.
3668 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
3669 (dwarf2_debug_line_missing_file_complaint)
3670 (dwarf2_debug_line_missing_end_sequence_complaint)
3671 (dwarf2_complex_location_expr_complaint)
3672 (dwarf2_const_value_length_mismatch_complaint)
3673 (dwarf2_section_buffer_overflow_complaint)
3674 (dwarf2_macro_malformed_definition_complaint)
3675 (dwarf2_invalid_attrib_class_complaint)
3676 (create_addrmap_from_index, dw2_symtab_iter_next)
3677 (dw2_expand_marked_cus)
3678 (dw2_debug_names_iterator::find_vec_in_debug_names)
3679 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
3680 (create_debug_type_hash_table, init_cutu_and_read_dies)
3681 (partial_die_parent_scope, add_partial_enumeration)
3682 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
3683 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
3684 (read_import_statement, read_file_scope, create_dwo_cu_reader)
3685 (create_cus_hash_table, create_dwp_hash_table)
3686 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
3687 (dwarf2_rnglists_process, dwarf2_ranges_process)
3688 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
3689 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
3690 (handle_struct_member_die, process_structure_scope)
3691 (read_array_type, read_common_block, read_module_type)
3692 (read_tag_pointer_type, read_typedef, read_base_type)
3693 (read_subrange_type, load_partial_dies, partial_die_info::read)
3694 (partial_die_info::read, partial_die_info::read)
3695 (partial_die_info::read, read_checked_initial_length_and_offset)
3696 (dwarf2_string_attr, read_formatted_entries)
3697 (dwarf_decode_line_header)
3698 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3699 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
3700 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
3701 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3702 (get_signatured_type, get_DW_AT_signature_type)
3703 (decode_locdesc, file_file_name, consume_improper_spaces)
3704 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
3705 (dwarf_decode_macro_bytes, dwarf_decode_macros)
3706 (dwarf2_symbol_mark_computed, set_die_type)
3707 (read_attribute_value): Update.
3708 * stap-probe.c (handle_stap_probe, get_stap_base_address):
3709 Update.
3710 * dbxread.c (unknown_symtype_complaint)
3711 (lbrac_mismatch_complaint, repeated_header_complaint)
3712 (set_namestring, function_outside_compilation_unit_complaint)
3713 (read_dbx_symtab, process_one_symbol): Update.
3714 * gdbtypes.c (stub_noname_complaint): Update.
3715 * windows-nat.c (handle_unload_dll): Update.
3716 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
3717 (decode_base_type): Update.
3718 * xcoffread.c (bf_notfound_complaint, ef_complaint)
3719 (eb_complaint, record_include_begin, record_include_end)
3720 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
3721 (process_xcoff_symbol, read_symbol)
3722 (function_outside_compilation_unit_complaint)
3723 (scan_xcoff_symtab): Update.
3724 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
3725 * buildsym.c (finish_block_internal, make_blockvector)
3726 (end_symtab_get_static_block, augment_type_symtab): Update.
3727 * dtrace-probe.c (dtrace_process_dof)
3728 (dtrace_static_probe_ops::get_probes): Update.
3729 * complaints.h (struct complaint): Don't declare.
3730 (symfile_complaints): Remove.
3731 (complaint_internal): Remove "complaints" parameter.
3732 (complaint): Likewise.
3733 (clear_complaints): Likewise.
3734 * symfile.c (syms_from_objfile_1, finish_new_objfile)
3735 (reread_symbols): Update.
3736 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
3737 (dwarf2_frame_cache, decode_frame_entry): Update.
3738 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
3739 * objc-lang.c (lookup_objc_class, lookup_child_selector)
3740 (info_selectors_command): Update.
3741 * macrotab.c (macro_include, check_for_redefinition)
3742 (macro_undef): Update.
3743 * objfiles.c (filter_overlapping_sections): Update.
3744 * stabsread.c (invalid_cpp_abbrev_complaint)
3745 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
3746 (define_symbol, error_type, read_type, rs6000_builtin_type)
3747 (stabs_method_name_from_physname, read_member_functions)
3748 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
3749 (attach_fields_to_type, complain_about_struct_wipeout)
3750 (read_range_type, read_args, common_block_start)
3751 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
3752 Update.
3753 * mdebugread.c (index_complaint, unknown_ext_complaint)
3754 (basic_type_complaint, bad_tag_guess_complaint)
3755 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
3756 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
3757 (parse_procedure, parse_lines)
3758 (function_outside_compilation_unit_complaint)
3759 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
3760 (bad_tag_guess_complaint, reg_value_complaint): Update.
3761 * cp-support.c (demangled_name_complaint): Update.
3762 * macroscope.c (sal_macro_scope): Update.
3763 * dwarf-index-write.c (class debug_names): Update.
3764
4e9668d0
TT
37652018-05-23 Tom Tromey <tom@tromey.com>
3766
3767 * complaints.c (clear_complaints): Remove "noisy" parameter.
3768 * complaints.h (clear_complaints): Update.
3769 * symfile.c (syms_from_objfile_1, finish_new_objfile)
3770 (reread_symbols): Update.
3771
43ba33c7
TT
37722018-05-23 Tom Tromey <tom@tromey.com>
3773
3774 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
3775 SUBSEQUENT_MESSAGE.
3776 (vcomplaint, clear_complaints): Update.
3777 (symfile_explanations): Remove some messages.
3778
2b9496b2
TT
37792018-05-23 Tom Tromey <tom@tromey.com>
3780
3781 * complaints.c (internal_complaint): Remove.
3782 * complaints.h (internal_complaint): Remove.
3783
35f1fea3
MR
37842018-05-22 Maciej W. Rozycki <macro@mips.com>
3785
3786 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
3787
6b8edb51
PA
37882018-05-22 Pedro Alves <palves@redhat.com>
3789
3790 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
3791 (remote_fileio_badfd, remote_fileio_return_errno)
3792 (remote_fileio_return_success, remote_fileio_func_open)
3793 (remote_fileio_func_open, remote_fileio_func_close)
3794 (remote_fileio_func_read, remote_fileio_func_write)
3795 (remote_fileio_func_lseek, remote_fileio_func_rename)
3796 (remote_fileio_func_unlink, remote_fileio_func_stat)
3797 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
3798 (remote_fileio_func_isatty, remote_fileio_func_system): Add
3799 remote_target parameter.
3800 (remote_fio_func_map) <func>: Add remote_target parameter.
3801 (do_remote_fileio_request, remote_fileio_request):
3802 * remote-fileio.h (remote_fileio_request):
3803 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
3804 remote_target parameter.
3805 (remote_notif_process, handle_notification): Adjust to pass down
3806 the remote.
3807 (remote_notif_state_allocate): Add remote_target parameter. Save
3808 it.
3809 * remote-notif.h (struct remote_target): Forward declare.
3810 (struct notif_client) <parse, ack, can_get_pending_events>: Add
3811 remote_target parameter.
3812 (struct remote_notif_state) <remote>: New field.
3813 (remote_notif_ack, remote_notif_parse): Add remote_target
3814 parameter.
3815 (remote_notif_state_allocate, remote_notif_state_allocate): Add
3816 remote_target parameter.
3817 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
3818 (threads_listing_context, rmt_thread_action, protocol_feature)
3819 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
3820 (packet_result, struct threads_listing_context, remote_state):
3821 Move definitions and declarations higher up.
3822 (remote_target) <~remote_target>: Declare.
3823 (remote_download_command_source, remote_file_put, remote_file_get)
3824 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
3825 (remote_hostio_pread_vFile, remote_hostio_send_command)
3826 (remote_hostio_set_filesystem, remote_hostio_open)
3827 (remote_hostio_close, remote_hostio_unlink, remote_state)
3828 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
3829 (get_memory_write_packet_size, get_memory_read_packet_size)
3830 (append_pending_thread_resumptions, remote_detach_1)
3831 (append_resumption, remote_resume_with_vcont)
3832 (add_current_inferior_and_thread, wait_ns, wait_as)
3833 (process_stop_reply, remote_notice_new_inferior)
3834 (process_initial_stop_replies, remote_add_thread)
3835 (btrace_sync_conf, remote_btrace_maybe_reopen)
3836 (remove_new_fork_children, kill_new_fork_children)
3837 (discard_pending_stop_replies, stop_reply_queue_length)
3838 (check_pending_events_prevent_wildcard_vcont)
3839 (discard_pending_stop_replies_in_queue, stop_reply)
3840 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
3841 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
3842 (remote_interrupt_as, remote_interrupt_ns)
3843 (remote_get_noisy_reply, remote_query_attached)
3844 (remote_add_inferior, remote_current_thread, get_current_thread)
3845 (set_thread, set_general_thread, set_continue_thread)
3846 (set_general_process, write_ptid)
3847 (remote_unpack_thread_info_response, remote_get_threadinfo)
3848 (parse_threadlist_response, remote_get_threadlist)
3849 (remote_threadlist_iterator, remote_get_threads_with_ql)
3850 (remote_get_threads_with_qxfer)
3851 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
3852 (get_offsets, remote_check_symbols, remote_supported_packet)
3853 (remote_query_supported, remote_packet_size)
3854 (remote_serial_quit_handler, remote_detach_pid)
3855 (remote_vcont_probe, remote_resume_with_hc)
3856 (send_interrupt_sequence, interrupt_query)
3857 (remote_notif_get_pending_events, fetch_register_using_p)
3858 (send_g_packet, process_g_packet, fetch_registers_using_g)
3859 (store_register_using_P, store_registers_using_G)
3860 (set_remote_traceframe, check_binary_download)
3861 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
3862 (remote_xfer_live_readonly_partial, remote_read_bytes)
3863 (remote_send_printf, remote_flash_write, readchar)
3864 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
3865 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
3866 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
3867 (extended_remote_disable_randomization, extended_remote_run)
3868 (send_environment_packet, extended_remote_environment_support)
3869 (extended_remote_set_inferior_cwd, remote_write_qxfer)
3870 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
3871 (packet_command): Now methods of ...
3872 (remote_target): ... this class.
3873 (m_remote_state) <remote_target>: New field.
3874 (struct remote_state) <stop_reply_queue,
3875 remote_async_inferior_event_token, wait_forever_enabled_p>: New
3876 fields.
3877 (remote_state::remote_state): Allocate stop_reply_queue.
3878 (remote_state): Delete global.
3879 (get_remote_state_raw): Delete.
3880 (remote_target::get_remote_state): Allocate m_remote_state on
3881 demand.
3882 (get_current_remote_target): New.
3883 (remote_ops, extended_remote_ops): Delete.
3884 (wait_forever_enabled_p, remote_async_inferior_event_token):
3885 Delete, moved to struct remote_state.
3886 (remote_target::close): Delete self. Destruction bits split to
3887 ...
3888 (remote_target::~remote_target): ... this.
3889 (show_memory_packet_size): Adjust to use
3890 get_current_remote_target.
3891 (struct protocol_feature) <func>: Add remote_target parameter.
3892 All callers adjusted.
3893 (curr_quit_handler_target): New.
3894 (remote_serial_quit_handler): Reimplement.
3895 (remote_target::open_1): Adjust to use get_current_remote_target.
3896 Heap-allocate remote_target/extended_remote_target instances.
3897 (vcont_builder::vcont_builder): Add remote_target parameter, and
3898 save it in m_remote. All callers adjusted.
3899 (vcont_builder::m_remote): New field.
3900 (vcont_builder::restart, vcont_builder::flush)
3901 (vcont_builder::push_action): Use it.
3902 (remote_target::commit_resume): Use it.
3903 (struct queue_iter_param) <remote>: New field.
3904 (remote_target::remove_new_fork_children): Fill in 'remote' field.
3905 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
3906 (check_pending_event_prevents_wildcard_vcont_callback)
3907 (remote_target::check_pending_events_prevent_wildcard_vcont)
3908 (remote_target::discard_pending_stop_replies)
3909 (remote_target::discard_pending_stop_replies_in_queue)
3910 (remote_target::remote_notif_remove_queued_reply): Fill in
3911 'remote' field.
3912 (remote_notif_get_pending_events): New.
3913 (remote_target::readchar, remote_target::remote_serial_write):
3914 Save/restore curr_quit_handler_target.
3915 (putpkt): New.
3916 (kill_new_fork_children): Fill in 'remote' field.
3917 (packet_command): Use get_current_remote_target, defer to
3918 remote_target method of same name.
3919 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
3920 parameter, and save it in m_remote. All callers adjusted.
3921 (scoped_remote_fd::release): Use m_remote.
3922 (scoped_remote_fd::m_remote): New field.
3923 (remote_file_put, remote_file_get, remote_file_delete): Use
3924 get_current_remote_target, defer to remote_target method of same
3925 name.
3926 (remote_btrace_reset): Add remote_state paremeter. Update all
3927 callers.
3928 (remote_async_inferior_event_handler). Pass down 'data'.
3929 (remote_new_objfile): Use get_current_remote_target.
3930 (remote_target::vcont_r_supported): New.
3931 (set_range_stepping): Use get_current_remote_target and
3932 remote_target::vcont_r_supported.
3933 (_initialize_remote): Don't allocate 'remote_state' and
3934 'stop_reply_queue' globals.
3935 * remote.h (struct remote_target): Forward declare.
3936 (getpkt, putpkt, remote_notif_get_pending_events): Add
3937 'remote_target' parameter.
3938
f5db4863
PA
39392018-05-22 Pedro Alves <palves@redhat.com>
3940
3941 * remote.c (vcont_builder): Now a class. Make all data members
3942 private.
3943 (vcont_builder) <vcont_builder, restart, flush, push_action>:
3944 Declare methods.
3945 (vcont_builder_restart): Rename to ...
3946 (vcont_builder::restart): ... this.
3947 (vcont_builder_flush): Rename to ...
3948 (vcont_builder::flush): ... this.
3949 (vcont_builder_push_action): Rename to ...
3950 (vcont_builder::push_action): ... this.
3951 (remote_target::commit_resume): Adjust.
3952
cc0be08f
PA
39532018-05-22 Pedro Alves <palves@redhat.com>
3954
3955 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
3956 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
3957 (get_fixed_memory_packet_size): New.
3958 (get_memory_packet_size): Use it.
3959 (set_memory_packet_size): Don't override the config size with
3960 DEFAULT_MAX_MEMORY_PACKET_SIZE.
3961 (show_memory_packet_size): Use get_fixed_memory_packet_size.
3962 Don't refer to get_memory_packet_size if not connected to a remote
3963 target. Show "(default)" if configured size is 0.
3964
9607784a
PA
39652018-05-22 Pedro Alves <palves@redhat.com>
3966
3967 * remote.c (remote_target::mourn_inferior): Move
3968 discard_pending_stop_replies call here from ...
3969 (_initialize_remote): ... here.
3970
0e9a6b2f
PA
39712018-05-22 Pedro Alves <palves@redhat.com>
3972
3973 * remote.c (compare_section_command): Remove set_general_process
3974 call.
3975
43c3a0e4
PA
39762018-05-22 Pedro Alves <palves@redhat.com>
3977
3978 * remote.c (struct packet_reg, struct remote_arch_state):
3979 Move higher up in the file.
3980 (remote_state) <m_arch_states>: Store remote_arch_state values
3981 instead of remote_arch_state pointers.
3982 (remote_state::get_remote_arch_state): Adjust.
3983
9d6eea31
PA
39842018-05-22 Pedro Alves <palves@redhat.com>
3985
3986 * remote.c: Include <unordered_map>.
3987 (remote_state): Now a class.
3988 (remote_state) <get_remote_arch_state>: Declare method.
3989 <get_remote_arch_state>: New field.
3990 (remote_arch_state) <remote_arch_state>: Declare ctor.
3991 <regs>: Now a unique_ptr.
3992 (remote_gdbarch_data_handle): Delete.
3993 (get_remote_arch_state): Delete.
3994 (remote_state::get_remote_arch_state): New.
3995 (get_remote_state): Adjust to call remote_state's
3996 get_remote_arch_state method.
3997 (init_remote_state): Delete, bits factored out to ...
3998 (remote_arch_state::remote_arch_state): ... this new method.
3999 (get_remote_packet_size, get_memory_packet_size)
4000 (process_g_packet, remote_target::fetch_registers)
4001 (remote_target::prepare_to_store, store_registers_using_G)
4002 (remote_target::store_registers, remote_target::get_trace_status):
4003 Adjust to call remote_state's method.
4004 (_initialize_remote): Remove reference to
4005 remote_gdbarch_data_handle.
4006
dd194f6b
PA
40072018-05-22 Pedro Alves <palves@redhat.com>
4008
4009 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
4010 pread>: New method declarations.
4011 (remote_target::open_1): Adjust.
4012 (readahead_cache_invalidate): Rename to ...
4013 (readahead_cache::invalidate): ... this, and adjust to be a class
4014 method.
4015 (readahead_cache_invalidate_fd): Rename to ...
4016 (readahead_cache::invalidate_fd): ... this, and adjust to be a
4017 class method.
4018 (remote_hostio_pwrite): Adjust.
4019 (remote_hostio_pread_from_cache): Rename to ...
4020 (readahead_cache::pread): ... this, and adjust to be a class
4021 method.
4022 (remote_hostio_close): Adjust.
4023
440b7aec
PA
40242018-05-22 Pedro Alves <palves@redhat.com>
4025
4026 * remote.c (remote_hostio_close_cleanup): Delete.
4027 (class scoped_remote_fd): New.
4028 (remote_file_put, remote_file_get): Use it.
4029
de44f5a7
PA
40302018-05-22 Pedro Alves <palves@redhat.com>
4031
4032 (struct vCont_action_support): Use bool and initialize all fields.
4033 (struct readahead_cache): Initialize all fields.
4034 (remote_state): Use bool and initialize all fields.
4035 (remote_state::remote_state, remote_state::~remote_state): New.
4036 (new_remote_state): Delete.
4037 (_initialize_remote): Use new to allocate remote_state.
4038
b1b60145
PA
40392018-05-22 Pedro Alves <palves@redhat.com>
4040 張俊芝 <zjz@zjz.name>
4041
4042 PR gdb/22973
4043 * c-exp.y: Include "c-support.h".
4044 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
4045 of tolower. Use c_ident_is_alpha to scan names.
4046 * c-lang.c: Include "c-support.h".
4047 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
4048 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
4049 * c-support.h: New file, with bits factored out from ...
4050 * cp-name-parser.y: ... this file.
4051 Include "c-support.h".
4052 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
4053 c-support.h and renamed.
4054 (symbol_end, yylex): Adjust.
4055
0ec848ad
PFC
40562018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4057
4058 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
4059 parameter type to CORE_ADDR.
4060 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
4061 parameter type in declaration to CORE_ADDR.
4062 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
4063 target_auxv_search to get AT_HWCAP and use the result to get the
4064 target description.
4065 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
4066 to CORE_ADDR. Remove the cast of the return value to unsigned
4067 long. Fix error predicate of target_auxv_search.
4068 (ppc_linux_nat_target::read_description): Change the type of the
4069 hwcap variable to CORE_ADDR.
4070
0fb2aaa1
PFC
40712018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4072
4073 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
4074 if the size of fpscr is larger than 32 bits.
4075
2c3305f6
PFC
40762018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4077
4078 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
4079 (ppc32_linux_vsxregmap): New global.
4080 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
4081 regcache_supply_regset, and regcache_collect_regset.
4082 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
4083 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
4084 (fetch_vsx_register, store_vsx_register): Remove.
4085 (fetch_vsx_registers): Add regno parameter. Get regset using
4086 ppc_linux_vsxregset. Use regset to supply registers.
4087 (store_vsx_registers): Add regno parameter. Get regset using
4088 ppc_linux_vsxregset. Use regset to collect registers.
4089 (fetch_register): Call fetch_vsx_registers instead of
4090 fetch_vsx_register.
4091 (store_register): Call store_vsx_registers instead of
4092 store_vsx_register.
4093 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
4094 new regno parameter.
4095 (store_ppc_registers): Call store_vsx_registers with -1 for the
4096 new regno parameter.
4097 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
4098 (ppc_collect_vsxregset): Remove.
4099
1d75a658
PFC
41002018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4101
4102 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
4103 offset fields.
4104 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
4105 for vector register offset fields.
4106 (ppc64_fbsd_reg_offsets): Likewise.
4107 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4108 to vector register offset fields.
4109 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4110 to vector register offset fields.
4111 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
4112 vector register offset fields.
4113 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
4114 initializers for vector register offset fields.
4115 (rs6000_aix64_reg_offsets): Likewise.
4116 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
4117 (ppc_supply_vrregset): Remove.
4118 (ppc_collect_vrregset): Remove.
4119 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
4120 (ppc_linux_vrregset) : New function.
4121 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
4122 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
4123 (ppc32_linux_vrregset): Remove.
4124 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
4125 and use result instead of ppc32_linux_vrregset.
4126 (ppc32_linux_reg_offsets): Remove initializers for vector register
4127 offset fields.
4128 (ppc64_linux_reg_offsets): Likewise.
4129 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
4130 * ppc-linux-nat.c: Include regset.h.
4131 (gdb_vrregset_t): Adjust comment to account for little-endian
4132 mode.
4133 (supply_vrregset, fill_vrregset): Remove.
4134 (fetch_altivec_register, store_altivec_register): Remove.
4135 (fetch_altivec_registers): Add regno parameter. Get regset using
4136 ppc_linux_vrregset. Use regset to supply registers.
4137 (store_altivec_registers): Add regno parameter. Get regset using
4138 ppc_linux_vrregset. Use regset to collect registers.
4139 (fetch_register): Call fetch_altivec_registers instead of
4140 fetch_altivec_register.
4141 (store_register): Call store_altivec_registers instead of
4142 store_altivec_register.
4143 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
4144 the new regno parameter.
4145 (store_ppc_registers): Call store_altivec_registers with -1 for
4146 the new regno parameter.
4147
d078308a
PFC
41482018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4149
4150 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
4151 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
4152 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
4153 (gdb_vrregset_t): Change array type size to
4154 PPC_LINUX_SIZEOF_VRREGSET.
4155 (gdb_vsxregset_t): Change array type size to
4156 PPC_LINUX_SIZEOF_VSXREGSET.
4157 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
4158 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
4159 PPC_LINUX_SIZEOF_VSXREGSET.
4160
2e077f5e
PFC
41612018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4162
4163 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
4164 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
4165 nat/ppc-linux.c.
4166 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
4167 ppc_linux_target_wordsize with tid.
4168 (ppc_linux_nat_target::read_description): Call ppc_linux_target
4169 wordsize with tid.
4170 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
4171 (ppc64_64bit_inferior_p): Add static and inline specifiers.
4172 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
4173 tid parameter. Remove static specifier.
4174 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
4175 (ppc_linux_target_wordsize): New declaration.
4176
bd64614e
PFC
41772018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4178
4179 * arch/ppc-linux-common.c: New file.
4180 * arch/ppc-linux-common.h: New file.
4181 * arch/ppc-linux-tdesc.h: New file.
4182 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
4183 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
4184 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
4185 arch/ppc-linux-tdesc.h.
4186 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
4187 arch/ppc-linux-tdesc.h.
4188 (ppc_linux_nat_target::read_description): Remove target
4189 description matching code. Fill a ppc_linux_features struct and
4190 call ppc_linux_match_description with it. Move comment about ISA
4191 2.05 to ppc-linux-common.c.
4192 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
4193 arch/ppc-linux-tdesc.h.
4194 (ppc_linux_core_read_description): Remove target description
4195 matching code. Fill a ppc_linux_features struct and call
4196 ppc_linux_match_description with it.
4197 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
4198 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
4199 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
4200 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
4201 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
4202 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
4203 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
4204 (tdesc_powerpc_e500l): Remove.
4205
241db429
JB
42062018-05-22 Joel Brobecker <brobecker@adacore.com>
4207
4208 * ada-lang.c (catch_assert_command): Pass empty string instead
4209 of NULL for excep_string argument.
4210
75d74cca
MR
42112018-05-22 Maciej W. Rozycki <macro@mips.com>
4212
4213 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
4214 the width of the requested register exceeds the width of the
4215 `ptrace' data type.
4216
122b53ea
TT
42172018-05-21 Tom Tromey <tom@tromey.com>
4218
4219 * printcmd.c (output_command): Remove.
4220 (output_command_const): Rename to output_command.
4221 * valprint.h (output_command): Rename from output_command_const.
4222 * tracepoint.c (trace_dump_actions): Call output_command.
4223
bc18fbb5
TT
42242018-05-21 Tom Tromey <tom@tromey.com>
4225
4226 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4227 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
4228 * ada-lang.h (create_ada_exception_catchpoint): Update.
4229 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
4230 std::string.
4231 (create_excep_cond_exprs, ~ada_catchpoint)
4232 (should_stop_exception, print_one_exception)
4233 (print_mention_exception, print_recreate_exception): Update.
4234 (ada_get_next_arg): Remove.
4235 (catch_ada_exception_command_split): Use std::string. Change type
4236 of "excep_string", "cond_string".
4237 (catch_ada_exception_command): Update.
4238 (create_ada_exception_catchpoint): Change type of excep_string.
4239 (ada_exception_sal): Remove excep_string parameter.
4240 (~ada_catchpoint): Remove.
4241
790217f6
TT
42422018-05-21 Tom Tromey <tom@tromey.com>
4243
4244 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
4245 cleanup.
4246
6f46ac85
TT
42472018-05-21 Tom Tromey <tom@tromey.com>
4248
4249 * ada-lang.c (ada_exception_message_1, ada_exception_message):
4250 Return unique_xmalloc_ptr.
4251 (print_it_exception): Update.
4252
15b6611c
TT
42532018-05-21 Tom Tromey <tom@tromey.com>
4254
4255 * tracepoint.c (trace_dump_actions): Use std::string.
4256
c0c9f665
TT
42572018-05-21 Tom Tromey <tom@tromey.com>
4258
4259 * symfile.c (reread_symbols): Use std::string for original_name.
4260
22ca247e
TT
42612018-05-21 Tom Tromey <tom@tromey.com>
4262
4263 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
4264 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
4265 constructor.
4266
184cde75
SM
42672018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
4268
4269 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
4270 instance to...
4271 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
4272 * objfiles.c (get_objfile_bfd_data): Allocate
4273 objfile_per_bfd_storage with obstack_new when allocating on
4274 obstack.
4275
e39db4db
SM
42762018-05-20 Simon Marchi <simon.marchi@ericsson.com>
4277
4278 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
4279 OBSTACK_ZALLOC.
4280 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
4281 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
4282 * mdebugread.c (mdebug_build_psymtabs): Likewise.
4283 (add_pending): Likewise.
4284 (parse_symbol): Likewise.
4285 (parse_partial_symbols): Likewise.
4286 (psymtab_to_symtab_1): Likewise.
4287 (new_psymtab): Likewise.
4288 (elfmdebug_build_psymtabs): Likewise.
4289 * minsyms.c (terminate_minimal_symbol_table): Likewise.
4290 * objfiles.c (get_objfile_bfd_data): Likewise.
4291 (objfile_register_static_link): Likewise.
4292 * psymtab.c (allocate_psymtab): Likewise.
4293 * stabsread.c (read_member_functions): Likewise.
4294 * xcoffread.c (xcoff_end_psymtab): Likewise.
4295
284a0e3c
SM
42962018-05-20 Simon Marchi <simon.marchi@ericsson.com>
4297
4298 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
4299 compiler supports std::is_trivially_constructible.
4300 * common/poison.h: Include obstack.h.
4301 (IsMallocable): Define to is_trivially_constructible if the
4302 compiler supports it, define to true_type otherwise.
4303 (xobnew): New.
4304 (XOBNEW): Redefine.
4305 (xobnewvec): New.
4306 (XOBNEWVEC): Redefine.
4307 * gdb_obstack.h (obstack_zalloc): New.
4308 (OBSTACK_ZALLOC): Redefine.
4309 (obstack_calloc): New.
4310 (OBSTACK_CALLOC): Redefine.
4311 (obstack_new): New.
4312 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
4313 (gdbarch_obstack): New declaration in gdbarch.h, definition in
4314 gdbarch.c.
4315 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
4316 obstack_calloc/obstack_zalloc.
4317 (gdbarch_obstack_zalloc): Remove.
4318 * target-descriptions.c (tdesc_data_init): Use obstack_new.
4319
59f66be3
PW
43202018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4321
4322 * stack.c (backtrace_command_1): Remove useless variable int i.
4323
50c65c2d
PW
43242018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4325
4326 * stack.c (print_frame_info): Fix comment.
4327
7ff8cb8c
TT
43282018-05-18 Tom Tromey <tom@tromey.com>
4329
4330 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
4331 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
4332 (~dwarf2_per_objfile): Update
4333 (dwarf2_get_dwz_file): Use new.
4334 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
4335 unique_ptr.
4336
400174b1
TT
43372018-05-18 Tom Tromey <tom@tromey.com>
4338
4339 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
4340 unique_ptr.
4341 * dwarf2read.c (struct dwp_file): Add constructor and
4342 initializers.
4343 (open_and_init_dwp_file): Return a unique_ptr.
4344 (dwarf2_per_objfile, create_dwp_hash_table)
4345 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
4346 (lookup_dwo_unit_in_dwp): Update.
4347 (open_and_init_dwp_file, get_dwp_file): Update.
4348
3063847f
TT
43492018-05-18 Tom Tromey <tom@tromey.com>
4350
4351 * dwarf2read.c (dwarf2_per_objfile): Update.
4352 (struct mapped_index): Add initializers.
4353 (dwarf2_read_index): Use new.
4354 (dw2_symtab_iter_init): Update.
4355 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
4356 unique_ptr.
4357
d3d02dee
SM
43582018-05-18 Simon Marchi <simon.marchi@ericsson.com>
4359
4360 * dwarf2read.c (mapped_index) <total_size>: Remove.
4361
1d143c36
SM
43622018-05-18 Simon Marchi <simon.marchi@ericsson.com>
4363
4364 * unittests/format_pieces-selftests.c (test_format_specifier):
4365 Add ARI comments.
4366
ce1e8424
TT
43672018-05-18 Tom Tromey <tom@tromey.com>
4368
4369 * c-typeprint.c (maybe_print_hole): New function.
4370 (c_print_type_struct_field_offset): Update.
4371 (c_type_print_base_struct_union): Call maybe_print_hole.
4372
ddfe970e
KS
43732018-05-17 Keith Seitz <keiths@redhat.com>
4374
4375 * breakpoint.c (build_bpstat_chain): New function, moved from
4376 bpstat_stop_status.
4377 (bpstat_stop_status): Add optional parameter, `stop_chain'.
4378 If no stop chain is passed, call build_bpstat_chain to build it.
4379 * breakpoint.h (build_bpstat_chain): Declare.
4380 (bpstat_stop_status): Move documentation here from breakpoint.c.
4381 * infrun.c (handle_signal_stop): Before eliding inlined frames,
4382 build the stop chain and pass it to skip_inline_frames.
4383 Pass this stop chain to bpstat_stop_status.
4384 * inline-frame.c: Include breakpoint.h.
4385 (stopped_by_user_bp_inline_frame): New function.
4386 (skip_inline_frames): Add parameter `stop_chain'.
4387 Move documention to inline-frame.h.
4388 If non-NULL, use stopped_by_user_bp_inline_frame to determine
4389 whether the frame should be elided.
4390 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
4391 Add moved documentation and update for new parameter.
4392
b17992c1
SM
43932018-05-17 Simon Marchi <simon.marchi@ericsson.com>
4394
4395 PR cli/14975
4396 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4397 unittests/format_pieces-selftests.c.
4398 * common/format.h (format_piece) <operator==>: New.
4399 (format_pieces) <operator[]>: Remove.
4400 * common/format.c (format_pieces::format_pieces): Handle \e.
4401 * unittests/format_pieces-selftests.c: New.
4402
58f0c718
TT
44032018-05-17 Tom Tromey <tom@tromey.com>
4404
4405 PR symtab/23010:
4406 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
4407 (dw2_instantiate_symtab): Add skip_partial parameter.
4408 (dw2_find_last_source_symtab, dw2_map_expand_apply)
4409 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
4410 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
4411 (dw2_expand_symtabs_matching_one)
4412 (dw2_find_pc_sect_compunit_symtab)
4413 (dw2_debug_names_lookup_symbol)
4414 (dw2_debug_names_expand_symtabs_for_function): Update.
4415 (init_cutu_and_read_dies): Add skip_partial parameter.
4416 (process_psymtab_comp_unit, build_type_psymtabs_1)
4417 (process_skeletonless_type_unit, load_partial_comp_unit)
4418 (psymtab_to_symtab_1): Update.
4419 (load_full_comp_unit): Add skip_partial parameter.
4420 (process_imported_unit_die, dwarf2_read_addr_index)
4421 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
4422 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
4423 (read_signatured_type): Update.
4424
3e618834
SM
44252018-05-17 Simon Marchi <simon.marchi@ericsson.com>
4426
4427 * value.c (release_value): Remove unused variable.
4428 (record_latest_value): Likewise.
4429 (access_value_history): Likewise.
4430 (preserve_values): Likewise.
4431
fe10fe31
TT
44322018-05-17 Tom Tromey <tom@tromey.com>
4433
4434 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
4435 Initialize.
4436
1d761124
MR
44372018-05-16 Maciej W. Rozycki <macro@mips.com>
4438
4439 PR gdb/22286
4440 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
4441 Also handle registers whose width is not a multiple of
4442 PTRACE_TYPE_RET.
4443 (linux_nat_trad_target::store_register): Likewise.
4444
06333fea
TT
44452018-05-16 Tom Tromey <tom@tromey.com>
4446
4447 * gdbcore.h (core_bfd): Redefine.
4448 * corelow.c (core_target::close): Update.
4449 (core_target_open): Update.
4450 * progspace.h (struct program_space) <cbfd>: Now a
4451 gdb_bfd_ref_ptr.
4452
921222e2
TT
44532018-05-16 Tom Tromey <tom@tromey.com>
4454
4455 PR cli/19551:
4456 * symfile-add-flags.h (enum symfile_add_flags)
4457 <SYMFILE_NOT_FILENAME>: New constant.
4458 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
4459 objfile name from BFD.
4460 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
4461 * minidebug.c (find_separate_debug_file_in_section): Put
4462 ".gnu_debugdata" into BFD's file name.
4463
3acb7083
SM
44642018-05-16 Simon Marchi <simon.marchi@ericsson.com>
4465
4466 * regcache.c (regcache_read_ftype, regcache_write_ftype):
4467 Remove.
4468
561a72d4
TC
44692018-05-15 Tamar Christina <tamar.christina@arm.com>
4470
4471 PR binutils/21446
4472 * aarch64-tdep.c (aarch64_analyze_prologue,
4473 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
4474 Indicate not interested in errors.
4475
4e6ff0e1
MR
44762018-05-15 Maciej W. Rozycki <macro@mips.com>
4477
4478 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
4479 Supply the MIPS_ZERO_REGNUM register.
4480
ea33cd92
MR
44812018-05-15 Maciej W. Rozycki <macro@mips.com>
4482
4483 * mips-tdep.c (mask_address_var): Make variable static.
4484
2d79090e
TT
44852018-05-14 Tom Tromey <tom@tromey.com>
4486
4487 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
4488
cf4912ae
AB
44892018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
4490
4491 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
4492 FXSAVE_ADDR for the mxcsr register.
4493
67e6f569
MF
44942018-05-11 Max Filippov <jcmvbkbc@gmail.com>
4495
4496 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
4497
15244507
PA
44982018-05-11 Pedro Alves <palves@redhat.com>
4499
4500 * corelow.c (core_target) <core_target>: No longer inline.
4501 Initialize m_core_gdbarch, m_core_vec and build the section table
4502 here.
4503 <~core_target>: New.
4504 <core_gdbarch, get_core_register_section>: New methods.
4505 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
4506 factored out from ...
4507 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
4508 (core_ops): Delete.
4509 (sniff_core_bfd): Add gdbarch parameter.
4510 (core_close): Delete, merged into ...
4511 (core_target::close): ... here. Delete self.
4512 (core_close_cleanup): Delete.
4513 (core_target_open): Allocate a core_target on the heap. Use a
4514 unique_ptr instead of a cleanup. Bits moved into the core_target
4515 ctor. Adjust to use core_target methods instead of globals.
4516 (get_core_register_section): Rename to ...
4517 (core_target::get_core_register_section): ... this and adjust.
4518 (struct get_core_registers_cb_data): New.
4519 (get_core_registers_cb): Use it. Use bool.
4520 (core_target::fetch_registers, core_target::files_info)
4521 (core_target::xfer_partial, core_target::read_description)
4522 (core_target::pid_to, core_target::thread_name): Adjust to
4523 reference class fields instead of globals.
4524 * target.h (struct target_ops_deleter, target_ops_up): New.
4525
451953fa
PA
45262018-05-11 Pedro Alves <palves@redhat.com>
4527
4528 * corefile.c (core_file_command): Move to corelow.c.
4529 * corelow.c (the_core_target): Delete.
4530 (core_file_command): Moved from corefile.c. Check exec_bfd
4531 instead of the_core_target. Use target_detach instead of calling
4532 into the_core_target directly.
4533 (maybe_say_no_core_file_now): New.
4534 (core_target::detach): Use it.
4535 (_initialize_corelow): Remove references to the_core_target.
4536 * gdbcore.h (the_core_target): Delete.
4537
e540a5a2 45382018-05-11 Tom Tromey <tromey@redhat.com>
3afc23a6 4539 Pedro Alves <palves@redhat.com>
e540a5a2
TT
4540
4541 * corefile.c (core_bfd): Remove.
4542 * gdbcore.h (core_bfd): Now a macro.
4543 * progspace.h (struct program_space) <cbfd>: New field.
4544
633cf254
TT
45452018-05-11 Tom Tromey <tom@tromey.com>
4546
4547 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
4548 gdb::def_vector.
4549
1a34f210
TT
45502018-05-10 Tom Tromey <tom@tromey.com>
4551
4552 * configure: Rebuild.
4553 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
4554
190852c8
JB
45552018-05-10 Joel Brobecker <brobecker@adacore.com>
4556
4557 PR server/23158:
4558 * regformats/regdat.sh: Adjust script, following the addition
4559 of the new expedite_regs parameter to init_target_desc.
4560
8727de56
OJ
45612018-05-10 Omair Javaid <omair.javaid@linaro.org>
4562
4563 PR gdb/23127
4564 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
4565 set_gdbarch_significant_addr_bit.
4566 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
4567 set_gdbarch_significant_addr_bit.
4568 * utils.c (address_significant): Update to sign extend addr.
4569
37d9e062
MF
45702018-05-09 Max Filippov <jcmvbkbc@gmail.com>
4571
4572 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
4573 (xtensa_linux_init_abi): Limit tdep->num_regs by
4574 tdep->num_nopriv_regs.
4575 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
4576 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
4577 not initialized.
4578
7402fbca
SM
45792018-05-08 Simon Marchi <simon.marchi@ericsson.com>
4580
4581 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
4582
8ee22052
AB
45832018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
4584
4585 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
4586 (I387_MXCSR_INIT_VAL): New constant.
4587 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
4588 buffer if it was supplied by the inferior.
4589 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
4590 (i387_xsave_get_clear_bv): New function.
4591 (i387_supply_xsave): Only read x87 control registers from the
4592 xsave buffer if the feature is enabled, and the state will have
4593 been written, otherwise, provide a suitable default.
4594 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
4595 including x87 control registers. Update control registers if they
4596 have changed from the default value, and mark features as enabled
4597 as required.
4598 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
4599
968ae51b
UW
46002018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
4601
4602 * spu-tdep.c (info_spu_event_command): Fix output formatting.
4603
aff689d3
TT
46042018-05-07 Tom Tromey <tom@tromey.com>
4605
4606 * configure: Rebuild.
4607 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
4608
ce887586
TT
46092018-05-07 Tom Tromey <tom@tromey.com>
4610
4611 PR tdep/20362:
4612 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
4613 bit. Use correct value for VDIV.
4614
85e26832
TT
46152018-05-04 Tom Tromey <tom@tromey.com>
4616
4617 * configure: Rebuild.
4618 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
4619
449b1ac7
TT
46202018-05-04 Tom Tromey <tom@tromey.com>
4621
4622 * linux-record.c (record_linux_system_call) <case
4623 RECORD_SYS_RECVFROM>: Add "break".
4624
15c9ffd6
TT
46252018-05-04 Tom Tromey <tom@tromey.com>
4626
4627 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
4628 Add missing "break".
4629 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
4630 Add missing "break".
4631
e3829d13
TT
46322018-05-04 Tom Tromey <tom@tromey.com>
4633
4634 * rs6000-tdep.c (ppc_process_record_op4)
4635 (ppc_process_record_op63): Add fall-through comment.
4636
da0e1563
TT
46372018-05-04 Tom Tromey <tom@tromey.com>
4638
4639 * i386-tdep.c (i386_process_record): Add fall-through comment.
4640
0019cd49
TT
46412018-05-04 Tom Tromey <tom@tromey.com>
4642
4643 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
4644 comment.
4645
565e0eda
TT
46462018-05-04 Tom Tromey <tom@tromey.com>
4647
4648 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
4649 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
4650 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
4651 comment.
4652 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
4653 comment.
4654 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
4655 comment.
4656
621846f4
TT
46572018-05-04 Tom Tromey <tom@tromey.com>
4658
4659 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
4660
86a73007
TT
46612018-05-04 Tom Tromey <tom@tromey.com>
4662
4663 * s390-tdep.c (s390_process_record): Fix fall-through comments.
4664 * xcoffread.c (scan_xcoff_symtab): Move comment later.
4665 * symfile.c (section_is_mapped): Fix fall-through comment.
4666 * stabsread.c (define_symbol, read_member_functions): Fix
4667 fall-through comment.
4668 * s390-linux-tdep.c (s390_process_record): Fix fall-through
4669 comment.
4670 * remote.c (remote_wait_as): Fix fall-through comment.
4671 * p-exp.y (yylex): Fix fall-through comment.
4672 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
4673 comment.
4674 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
4675 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
4676 * jv-exp.y (yylex): Fix fall-through comment.
4677 * go-exp.y (lex_one_token): Fix fall-through comment.
4678 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
4679 fall-through comment.
4680 * f-exp.y (yylex): Fix fall-through comment.
4681 * dwarf2read.c (process_die): Fix fall-through comments.
4682 * dbxread.c (process_one_symbol): Fix fall-through comment.
4683 * d-exp.y (lex_one_token): Fix fall-through comment.
4684 * cp-name-parser.y (yylex): Fix fall-through comment.
4685 * coffread.c (coff_symtab_read): Fix fall-through comment.
4686 * c-exp.y (lex_one_token): Fix fall-through comment.
4687 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
4688 comment.
4689 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
4690 comment.
4691
56bcdbea
TT
46922018-05-04 Tom Tromey <tom@tromey.com>
4693
4694 PR python/22730:
4695 * NEWS: Mention gdb.execute change.
4696 * gdbcmd.h (execute_control_command): Don't declare.
4697 * python/python.c (execute_gdb_command): Use read_command_lines_1,
4698 execute_control_commands, execute_control_commands_to_string.
4699 * cli/cli-script.h (execute_control_commands)
4700 (execute_control_commands_to_string): Declare.
4701 (execute_control_command): Add from_tty parameter.
4702 * cli/cli-script.c (execute_control_commands)
4703 (execute_control_commands_to_string): New functions.
4704 (execute_user_command): Use execute_control_commands.
4705 (execute_control_command_1): Add "from_tty" parameter. Update.
4706 (execute_control_command): Likewise.
4707
a913fffb
TT
47082018-05-04 Tom Tromey <tom@tromey.com>
4709
4710 PR python/22731:
4711 * NEWS: Mention that breakpoint commands are writable.
4712 * python/py-breakpoint.c (bppy_set_commands): New function.
4713 (breakpoint_object_getset) <"commands">: Use it.
4714
60b3cef2
TT
47152018-05-04 Tom Tromey <tom@tromey.com>
4716
4717 * tracepoint.c (actions_command): Update.
4718 * mi/mi-cmd-break.c (mi_command_line_array)
4719 (mi_command_line_array_cnt, mi_command_line_array_ptr)
4720 (mi_read_next_line): Remove.
4721 (mi_cmd_break_commands): Update.
4722 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
4723 function_view.
4724 * cli/cli-script.c (get_command_line): Update.
4725 (process_next_line): Use function_view. Constify.
4726 (recurse_read_control_structure, read_command_lines)
4727 (read_command_lines_1): Change argument types to function_view.
4728 (do_define_command, document_command): Update.
4729 * breakpoint.h (check_tracepoint_command): Don't declare.
4730 * breakpoint.c (check_tracepoint_command): Remove.
4731 (commands_command_1, create_tracepoint_from_upload): Update.
4732
7a2c85f2
TT
47332018-05-04 Tom Tromey <tom@tromey.com>
4734
4735 PR gdb/11750:
4736 * cli/cli-script.h (enum command_control_type) <define_control>:
4737 New constant.
4738 * cli/cli-script.c (multi_line_command_p): Handle define_control.
4739 (build_command_line, execute_control_command_1)
4740 (process_next_line): Likewise.
4741 (do_define_command): New function, extracted from define_command.
4742 (define_command): Use it.
4743
295dc222
TT
47442018-05-04 Tom Tromey <tom@tromey.com>
4745
4746 * tracepoint.c (actions_command): Update.
4747 * cli/cli-script.h (read_command_lines): Update.
4748 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
4749 (MAX_TMPBUF): Remove define.
4750 (define_command): Use string_printf.
4751 (document_command): Likewise.
4752 * breakpoint.c (commands_command_1): Update.
4753
1263a9d5
TT
47542018-05-04 Tom Tromey <tom@tromey.com>
4755
4756 * top.c (execute_command): Update.
4757 * cli/cli-script.h (print_command_lines): Now varargs.
4758 * cli/cli-script.c (print_command_lines): Now varargs.
4759 (execute_control_command_1) <case while_control, case if_control>:
4760 Update.
4761
12973681
TT
47622018-05-04 Tom Tromey <tom@tromey.com>
4763
4764 * tracepoint.c (all_tracepoint_actions): Rename from
4765 all_tracepoint_actions_and_cleanup. Change return type.
4766 (actions_command, encode_actions_1, encode_actions)
4767 (trace_dump_actions, tdump_command): Update.
4768 * remote.c (remote_download_command_source): Update.
4769 * python/python.c (gdbpy_eval_from_control_command)
4770 (python_command, python_interactive_command): Update.
4771 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
4772 * guile/guile.c (guile_command)
4773 (gdbscm_eval_from_control_command, guile_command): Update.
4774 * compile/compile.c (compile_code_command)
4775 (compile_print_command, compile_to_object): Update.
4776 * cli/cli-script.h (struct command_lines_deleter): New.
4777 (counted_command_line): New typedef.
4778 (struct command_line): Add constructor, destructor.
4779 <body_list>: Remove.
4780 <body_list_0, body_list_1>: New members.
4781 (command_line_up): Remove typedef.
4782 (read_command_lines, read_command_lines_1, get_command_line):
4783 Update.
4784 (copy_command_lines): Don't declare.
4785 * cli/cli-script.c (build_command_line): Use "new".
4786 (get_command_line): Return counted_command_line.
4787 (print_command_lines, execute_user_command)
4788 (execute_control_command_1, while_command, if_command): Update.
4789 (realloc_body_list): Remove.
4790 (process_next_line, recurse_read_control_structure): Update.
4791 (read_command_lines, read_command_lines_1): Return counted_command_line.
4792 (free_command_lines): Use "delete".
4793 (copy_command_lines): Remove.
4794 (define_command, document_command, show_user_1): Update.
4795 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
4796 a counted_command_line.
4797 * breakpoint.h (counted_command_line): Remove typedef.
4798 (breakpoint_set_commands): Update.
4799 * breakpoint.c (check_no_tracepoint_commands)
4800 (validate_commands_for_breakpoint): Update.
4801 (breakpoint_set_commands): Change commands to be a
4802 counted_command_line.
4803 (commands_command_1, update_dprintf_command_list)
4804 (create_tracepoint_from_upload): Update.
4805
e2fc72e2
TT
48062018-05-04 Tom Tromey <tom@tromey.com>
4807
4808 * cli/cli-decode.h (cmd_list_element): New constructor.
4809 (~cmd_list_element): New destructor.
4810 (struct cmd_list_element): Add initializers.
4811 * cli/cli-decode.c (do_add_cmd): Use "new".
4812 (delete_cmd): Use "delete".
4813
a3b60e45
JK
48142018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
4815 Pedro Alves <palves@redhat.com>
4816
4817 PR breakpoints/19806 and support for PR external/20207.
4818 * NEWS: Mention Aarch64 watchpoint improvements.
4819 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
4820 watchpoints and PR external/20207 watchpoints.
4821 * nat/aarch64-linux-hw-point.c
4822 (kernel_supports_any_contiguous_range): New.
4823 (aarch64_watchpoint_offset): New.
4824 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
4825 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
4826 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
4827 (aarch64_align_watchpoint): New parameters aligned_offset_p and
4828 next_addr_orig_p. Support PR external/20207 watchpoints.
4829 (aarch64_downgrade_regs): New.
4830 (aarch64_dr_state_insert_one_point): New parameters offset and
4831 addr_orig.
4832 (aarch64_dr_state_remove_one_point): Likewise.
4833 (aarch64_handle_breakpoint): Update caller.
4834 (aarch64_handle_aligned_watchpoint): Likewise.
4835 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
4836 aligned_offset.
4837 (aarch64_linux_set_debug_regs): Remove const from state. Call
4838 aarch64_downgrade_regs.
4839 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
4840 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
4841 (DR_CONTROL_MASK): ... this.
4842 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
4843 (unsigned int aarch64_watchpoint_offset): New prototype.
4844 (aarch64_linux_set_debug_regs): Remove const from state.
4845 * utils.c (align_up, align_down): Move to ...
4846 * common/common-utils.c (align_up, align_down): ... here.
4847 * utils.h (align_up, align_down): Move to ...
4848 * common/common-utils.h (align_up, align_down): ... here.
4849
05bc7456
JB
48502018-05-04 Joel Brobecker <brobecker@adacore.com>
4851
4852 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
4853 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
4854 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
4855 Re-implement to match the ABI as summarized in GCC's
4856 gcc/config/sparc/sparc.c. All callers updated.
4857 (sparc32_store_arguments): Remove assertion.
4858
2f433492
TT
48592018-05-04 Tom Tromey <tom@tromey.com>
4860
4861 * printcmd.c: Don't include tui.h.
4862 (decode_format): Use skip_spaces.
4863
9be2ae8f
TT
48642018-05-04 Tom Tromey <tom@tromey.com>
4865
4866 PR gdb/22619:
4867 * printcmd.c (last_count): New global.
4868 (x_command): Use saved count when repeating.
4869
f0b3976b
TT
48702018-05-04 Tom Tromey <tom@tromey.com>
4871
4872 * nto-procfs.c (do_closedir_cleanup): Remove.
4873 (procfs_pidlist): Use gdb_dir_up.
4874 * procfs.c (do_closedir_cleanup): Remove.
4875 (proc_update_threads): Use gdb_dir_up.
4876 * common/filestuff.h (struct gdb_dir_deleter): New.
4877 (gdb_dir_up): New typedef.
4878
862d101a
TT
48792018-05-04 Tom Tromey <tom@tromey.com>
4880
4881 * ada-lang.c (print_mention_exception): Use std::string.
4882
cb7de75e
TT
48832018-05-04 Tom Tromey <tom@tromey.com>
4884
4885 * ada-lang.c (create_excep_cond_exprs): Update.
4886 (ada_exception_catchpoint_cond_string): Use std::string.
4887
49d83361
TT
48882018-05-04 Tom Tromey <tom@tromey.com>
4889
4890 * ada-lang.c (xget_renaming_scope): Return std::string.
4891 (old_renaming_is_invisible): Update.
4892
ade72a34
TT
48932018-05-04 Tom Tromey <tom@tromey.com>
4894
4895 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
4896 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
4897
2be4d7f0
UW
48982018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
4899
4900 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
4901
69b6ecb0
TT
49022018-05-04 Tom Tromey <tom@tromey.com>
4903
4904 * remote.c (remote_query_supported_append): Change type.
4905 (remote_check_symbols): Update.
4906
bf27f0e2
PP
49072018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
4908
4909 PR gdb/11420
4910 * configure.ac: Prepend libpython.
4911 * python/python-config.py: Likewise.
4912 * configure: Regenerate.
4913
4ea17de8
SM
49142018-05-03 Simon Marchi <simon.marchi@ericsson.com>
4915
4916 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
4917
bd732259
PA
49182018-05-03 Pedro Alves <palves@redhat.com>
4919
4920 * s390-linux-nat.c
4921 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
4922 override. Write 'true' instead of '1'.
4923 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
4924 declaration.
4925
d9f719f1
PA
49262018-05-02 Pedro Alves <palves@redhat.com>
4927
4928 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
4929 add_inf_child_target.
4930 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
4931 add_inf_child_target.
4932 * aix-thread.c (aix_thread_target_info): New.
4933 (aix_thread_target) <shortname, longname, doc>: Delete.
4934 <info>: New.
4935 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
4936 add_inf_child_target.
4937 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
4938 add_inf_child_target.
4939 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
4940 add_inf_child_target.
4941 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
4942 add_inf_child_target.
4943 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
4944 add_inf_child_target.
4945 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
4946 add_inf_child_target.
4947 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
4948 add_inf_child_target.
4949 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
4950 add_inf_child_target.
4951 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
4952 add_inf_child_target.
4953 * bfd-target.c (target_bfd_target_info): New.
4954 (target_bfd) <shortname, longname, doc>: Delete.
4955 <info>: New.
4956 * bsd-kvm.c (bsd_kvm_target_info): New.
4957 (bsd_kvm_target) <shortname, longname, doc>: Delete.
4958 <info>: New.
4959 (bsd_kvm_target::open): Rename to ...
4960 (bsd_kvm_target_open): ... this. Adjust.
4961 * bsd-uthread.c (bsd_uthread_target_info): New.
4962 (bsd_uthread_target) <shortname, longname, doc>: Delete.
4963 <info>: New.
4964 * corefile.c (core_file_command): Adjust.
4965 * corelow.c (core_target_info): New.
4966 (core_target) <shortname, longname, doc>: Delete.
4967 <info>: New.
4968 (core_target::open): Rename to ...
4969 (core_target_open): ... this. Adjust.
4970 * ctf.c (ctf_target_info): New.
4971 (ctf_target) <shortname, longname, doc>: Delete.
4972 <info>: New.
4973 (ctf_target::open): Rename to ...
4974 (ctf_target_open): ... this.
4975 (_initialize_ctf): Adjust.
4976 * exec.c (exec_target_info): New.
4977 (exec_target) <shortname, longname, doc>: Delete.
4978 <info>: New.
4979 (exec_target::open): Rename to ...
4980 (exec_target_open): ... this.
4981 * gdbcore.h (core_target_open): Declare.
4982 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
4983 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
4984 add_inf_child_target.
4985 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
4986 add_inf_child_target.
4987 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
4988 add_inf_child_target.
4989 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
4990 add_inf_child_target.
4991 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
4992 add_inf_child_target.
4993 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
4994 add_inf_child_target.
4995 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
4996 add_inf_child_target.
4997 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
4998 add_inf_child_target.
4999 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
5000 add_inf_child_target.
5001 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
5002 add_inf_child_target.
5003 * inf-child.c (inf_child_target_info): New.
5004 (inf_child_target::info): New.
5005 (inf_child_open_target): Remove 'target' parameter. Use
5006 get_native_target instead.
5007 (inf_child_target::open): Delete.
5008 (add_inf_child_target): New.
5009 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
5010 Delete.
5011 <info>: New.
5012 (add_inf_child_target): Declare.
5013 (inf_child_open_target): Declare.
5014 * linux-thread-db.c (thread_db_target_info): New.
5015 (thread_db_target) <shortname, longname, doc>: Delete.
5016 <info>: New.
5017 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
5018 add_inf_child_target.
5019 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
5020 add_inf_child_target.
5021 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
5022 add_inf_child_target.
5023 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
5024 add_inf_child_target.
5025 * make-target-delegates (print_class): Adjust.
5026 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
5027 add_inf_child_target.
5028 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
5029 add_inf_child_target.
5030 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
5031 add_inf_child_target.
5032 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
5033 add_inf_child_target.
5034 * nto-procfs.c (nto_native_target_info): New.
5035 (nto_procfs_target_native) <shortname, longname, doc>:
5036 Delete.
5037 <info>: New.
5038 (nto_procfs_target_info): New.
5039 (nto_procfs_target_procfs) <shortname, longname, doc>:
5040 Delete.
5041 <info>: New.
5042 (init_procfs_targets): Adjust.
5043 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
5044 add_inf_child_target.
5045 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
5046 add_inf_child_target.
5047 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
5048 add_inf_child_target.
5049 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
5050 add_inf_child_target.
5051 * ravenscar-thread.c (ravenscar_target_info): New.
5052 (ravenscar_thread_target) <shortname, longname, doc>:
5053 Delete.
5054 <info>: New.
5055 * record-btrace.c (record_btrace_target_info):
5056 (record_btrace_target) <shortname, longname, doc>: Delete.
5057 <info>: New.
5058 (record_btrace_target::open): Rename to ...
5059 (record_btrace_target_open): ... this. Adjust.
5060 * record-full.c (record_longname, record_doc): New.
5061 (record_full_base_target) <shortname, longname, doc>: Delete.
5062 <info>: New.
5063 (record_full_target_info): New.
5064 (record_full_target): <shortname>: Delete.
5065 <info>: New.
5066 (record_full_core_open_1, record_full_open_1): Update comments.
5067 (record_full_base_target::open): Rename to ...
5068 (record_full_open): ... this.
5069 (cmd_record_full_restore): Update.
5070 (_initialize_record_full): Update.
5071 * remote-sim.c (remote_sim_target_info): New.
5072 (gdbsim_target) <shortname, longname, doc>: Delete.
5073 <info>: New.
5074 (gdbsim_target::open): Rename to ...
5075 (gdbsim_target_open): ... this.
5076 (_initialize_remote_sim): Adjust.
5077 * remote.c (remote_doc): New.
5078 (remote_target_info): New.
5079 (remote_target) <shortname, longname, doc>: Delete.
5080 <info>: New.
5081 (extended_remote_target_info): New.
5082 (extended_remote_target) <shortname, longname, doc>: Delete.
5083 <info>: New.
5084 (remote_target::open_1): Make static. Adjust.
5085 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
5086 * s390-linux-nat.c (_initialize_s390_nat): Use
5087 add_inf_child_target.
5088 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
5089 add_inf_child_target.
5090 * sol-thread.c (thread_db_target_info): New.
5091 (sol_thread_target) <shortname, longname, doc>: Delete.
5092 <info>: New.
5093 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
5094 add_inf_child_target.
5095 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
5096 add_inf_child_target.
5097 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
5098 add_inf_child_target.
5099 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
5100 add_inf_child_target.
5101 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
5102 add_inf_child_target.
5103 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
5104 add_inf_child_target.
5105 * spu-linux-nat.c (_initialize_spu_nat): Use
5106 add_inf_child_target.
5107 * spu-multiarch.c (spu_multiarch_target_info): New.
5108 (spu_multiarch_target) <shortname, longname, doc>: Delete.
5109 <info>: New.
5110 * target-delegates.c: Regenerate.
5111 * target.c: Include <unordered_map>.
5112 (target_ops_p): Delete.
5113 (DEF_VEC_P(target_ops_p)): Delete.
5114 (target_factories): New.
5115 (test_target_info): New.
5116 (test_target_ops::info): New.
5117 (open_target): Adjust to use target_factories.
5118 (add_target_with_completer): Rename to ...
5119 (add_target): ... this. Change prototype. Register target_info
5120 and open callback in target_factories. Register target_info in
5121 command context instead of target_ops.
5122 (add_target): Delete old implementation.
5123 (add_deprecated_target_alias): Change prototype. Adjust.
5124 (the_native_target): New.
5125 (set_native_target, get_native_target): New.
5126 (find_default_run_target): Use the_native_target.
5127 (find_attach_target, find_run_target): Simplify.
5128 (target_ops::open): Delete.
5129 (dummy_target_info): New.
5130 (dummy_target::shortname, dummy_target::longname)
5131 (dummy_target::doc): Delete.
5132 (dummy_target::info): New.
5133 (debug_target::shortname, debug_target::longname)
5134 (debug_target::doc): Delete.
5135 (debug_target::info): New.
5136 * target.h (struct target_info): New.
5137 (target_ops::~target_ops): Add comment.
5138 (target_ops::info): New.
5139 (target_ops::shortname, target_ops::longname, target_ops::doc): No
5140 longer virtual. Implement in terms of target_info.
5141 (set_native_target, get_native_target): Declare.
5142 (target_open_ftype): New.
5143 (add_target, add_target_with_completer)
5144 (add_deprecated_target_alias): Change prototype.
5145 (test_target) <shortname, longname, doc>: Delete.
5146 <info>: New.
5147 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
5148 add_inf_child_target.
5149 * tracefile-tfile.c (tfile_target_info): New.
5150 (tfile_target) <shortname, longname, doc>: Delete.
5151 <info>: New.
5152 (tfile_target::open): Rename to ...
5153 (tfile_target_open): ... this.
5154 (_initialize_tracefile_tfile): Adjust.
5155 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
5156 add_inf_child_target.
5157 * windows-nat.c (_initialize_windows_nat): Use
5158 add_inf_child_target.
5159 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
5160 add_inf_child_target.
5161
135340af
PA
51622018-05-02 Pedro Alves <palves@redhat.com>
5163
5164 * linux-nat.h (linux_nat_target) <low_new_thread,
5165 low_delete_thread, low_new_fork, low_forget_process,
5166 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
5167 New virtual methods.
5168 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5169 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
5170 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
5171 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5172 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
5173 Delete.
5174 * linux-fork.c (delete_fork): Adjust to call low method.
5175 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
5176 (linux_nat_new_fork, linux_nat_forget_process_hook)
5177 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
5178 (linux_nat_status_is_event):
5179 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
5180 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
5181 to call low method.
5182 (sigtrap_is_event): Rename to ...
5183 (linux_nat_target::low_status_is_event): ... this.
5184 (linux_nat_set_status_is_event): Delete.
5185 (save_stop_reason, linux_nat_wait_1)
5186 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
5187 low methods.
5188 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5189 (linux_nat_set_new_fork, linux_nat_set_forget_process)
5190 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5191 (linux_nat_set_prepare_to_resume): Delete.
5192 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
5193 low virtual methods.
5194 * amd64-linux-nat.c: Likewise.
5195 * arm-linux-nat.c: Likewise.
5196 * i386-linux-nat.c: Likewise.
5197 * ia64-linux-nat.c: Likewise.
5198 * mips-linux-nat.c: Likewise.
5199 * ppc-linux-nat.c: Likewise.
5200 * s390-linux-nat.c: Likewise.
5201 * sparc64-linux-nat.c: Likewise.
5202 * x86-linux-nat.c: Likewise.
5203 * x86-linux-nat.h: Include "nat/x86-linux.h".
5204 (x86_linux_nat_target) <low_new_fork, low_forget_process,
5205 low_prepare_to_resume, low_new_thread, low_delete_thread>:
5206 Override methods.
5207
57810aa7
PA
52082018-05-02 Pedro Alves <palves@redhat.com>
5209
5210 * target.h (target_ops)
5211 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5212 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
5213 stopped_by_watchpoint, have_continuable_watchpoint,
5214 stopped_data_address, watchpoint_addr_within_range,
5215 can_accel_watchpoint_condition, can_run, thread_alive,
5216 has_all_memory, has_memory, has_stack, has_registers,
5217 has_execution, can_async_p, is_async_p, supports_non_stop,
5218 always_non_stop_p, can_execute_reverse, supports_multi_process,
5219 supports_enable_disable_tracepoint,
5220 supports_disable_randomization, supports_string_tracing,
5221 supports_evaluation_of_breakpoint_conditions,
5222 can_run_breakpoint_commands, filesystem_is_local,
5223 can_download_tracepoint, get_trace_state_variable_value,
5224 set_trace_notes, get_tib_address, use_agent, can_use_agent,
5225 record_is_replaying, record_will_replay,
5226 augmented_libraries_svr4_read>: Adjust to return bool.
5227 * aarch64-linux-nat.c: All implementations adjusted.
5228 * aix-thread.c: All implementations adjusted.
5229 * arm-linux-nat.c: All implementations adjusted.
5230 * breakpoint.c: All implementations adjusted.
5231 * bsd-kvm.c: All implementations adjusted.
5232 * bsd-uthread.c: All implementations adjusted.
5233 * corelow.c: All implementations adjusted.
5234 * ctf.c: All implementations adjusted.
5235 * darwin-nat.c: All implementations adjusted.
5236 * darwin-nat.h: All implementations adjusted.
5237 * exec.c: All implementations adjusted.
5238 * fbsd-nat.c: All implementations adjusted.
5239 * fbsd-nat.h: All implementations adjusted.
5240 * gnu-nat.c: All implementations adjusted.
5241 * gnu-nat.h: All implementations adjusted.
5242 * go32-nat.c: All implementations adjusted.
5243 * ia64-linux-nat.c: All implementations adjusted.
5244 * inf-child.c: All implementations adjusted.
5245 * inf-child.h: All implementations adjusted.
5246 * inf-ptrace.c: All implementations adjusted.
5247 * inf-ptrace.h: All implementations adjusted.
5248 * linux-nat.c: All implementations adjusted.
5249 * linux-nat.h: All implementations adjusted.
5250 * mips-linux-nat.c: All implementations adjusted.
5251 * nto-procfs.c: All implementations adjusted.
5252 * ppc-linux-nat.c: All implementations adjusted.
5253 * procfs.c: All implementations adjusted.
5254 * ravenscar-thread.c: All implementations adjusted.
5255 * record-btrace.c: All implementations adjusted.
5256 * record-full.c: All implementations adjusted.
5257 * remote-sim.c: All implementations adjusted.
5258 * remote.c: All implementations adjusted.
5259 * s390-linux-nat.c: All implementations adjusted.
5260 * sol-thread.c: All implementations adjusted.
5261 * spu-multiarch.c: All implementations adjusted.
5262 * target-delegates.c: All implementations adjusted.
5263 * target.c: All implementations adjusted.
5264 * target.h: All implementations adjusted.
5265 * tracefile-tfile.c: All implementations adjusted.
5266 * tracefile.c: All implementations adjusted.
5267 * tracefile.h: All implementations adjusted.
5268 * windows-nat.c: All implementations adjusted.
5269 * x86-linux-nat.h: All implementations adjusted.
5270 * x86-nat.h: All implementations adjusted.
5271
ad6a4e2d
PA
52722018-05-02 Pedro Alves <palves@redhat.com>
5273
5274 * make-target-delegates (scan_target_h): Don't trim lines here.
5275 Replace sequences of tabs and/or whitespace with a single
5276 whitespace.
5277 (top level, parsing methods): Trim each line before processing it
5278 here.
5279
f6ac5f3d
PA
52802018-05-02 Pedro Alves <palves@redhat.com>
5281 John Baldwin <jhb@freebsd.org>
5282
5283 * target.h (enum strata) <debug_stratum>: New.
5284 (struct target_ops) <all delegation methods>: Replace by C++
5285 virtual methods, and drop "to_" prefix. All references updated
5286 throughout.
5287 <to_shortname, to_longname, to_doc, to_data,
5288 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
5289 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
5290 virtual methods. All references updated throughout.
5291 <can_attach, supports_terminal_ours, can_create_inferior,
5292 get_thread_control_capabilities, attach_no_wait>: New
5293 virtual methods.
5294 <insert_breakpoint, remove_breakpoint>: Now
5295 TARGET_DEFAULT_NORETURN methods.
5296 <info_proc>: Now returns bool.
5297 <to_magic>: Delete.
5298 (OPS_MAGIC): Delete.
5299 (current_target): Delete. All references replaced by references
5300 to ...
5301 (target_stack): ... this. New.
5302 (target_shortname, target_longname): Adjust.
5303 (target_can_run): Now a function declaration.
5304 (default_child_has_all_memory, default_child_has_memory)
5305 (default_child_has_stack, default_child_has_registers)
5306 (default_child_has_execution): Remove target_ops parameter.
5307 (complete_target_initialization): Delete.
5308 (memory_breakpoint_target): New template class.
5309 (test_target_ops): Refactor as a C++ class with virtual methods.
5310 * make-target-delegates (NAME_PART): Tighten.
5311 (POINTER_PART, CP_SYMBOL): New.
5312 (SIMPLE_RETURN_PART): Reimplement.
5313 (VEC_RETURN_PART): Expect less.
5314 (RETURN_PART, VIRTUAL_PART): New.
5315 (METHOD): Adjust to C++ virtual methods.
5316 (scan_target_h): Remove reference to C99.
5317 (dname): Output "target_ops::" prefix.
5318 (write_function_header): Adjust to output a C++ class method.
5319 (write_declaration): New.
5320 (write_delegator): Adjust to output a C++ class method.
5321 (tdname): Output "dummy_target::" prefix.
5322 (write_tdefault, write_debugmethod): Adjust to output a C++ class
5323 method.
5324 (tdefault_names, debug_names): Delete.
5325 (return_types, tdefaults, styles, argtypes_array): New.
5326 (top level): All methods are delegators.
5327 (print_class): New.
5328 (top level): Print dummy_target and debug_target classes.
5329 * target-delegates.c: Regenerate.
5330 * target-debug.h (target_debug_print_enum_info_proc_what)
5331 (target_debug_print_thread_control_capabilities)
5332 (target_debug_print_thread_info_p): New.
5333 * target.c (dummy_target): Delete.
5334 (the_dummy_target, the_debug_target): New.
5335 (target_stack): Now extern.
5336 (set_targetdebug): Push/unpush debug target.
5337 (default_child_has_all_memory, default_child_has_memory)
5338 (default_child_has_stack, default_child_has_registers)
5339 (default_child_has_execution): Remove target_ops parameter.
5340 (complete_target_initialization): Delete.
5341 (add_target_with_completer): No longer call
5342 complete_target_initialization.
5343 (target_supports_terminal_ours): Use regular delegation.
5344 (update_current_target): Delete.
5345 (push_target): No longer check magic number. Don't call
5346 update_current_target.
5347 (unpush_target): Don't call update_current_target.
5348 (target_is_pushed): No longer check magic number.
5349 (target_require_runnable): Skip for all stratums over
5350 process_stratum.
5351 (target_ops::info_proc): New.
5352 (target_info_proc): Use find_target_at and
5353 find_default_run_target.
5354 (target_supports_disable_randomization): Use regular delegation.
5355 (target_get_osdata): Use find_target_at.
5356 (target_ops::open, target_ops::close, target_ops::can_attach)
5357 (target_ops::attach, target_ops::can_create_inferior)
5358 (target_ops::create_inferior, target_ops::can_run)
5359 (target_can_run): New.
5360 (default_fileio_target): Use regular delegation.
5361 (target_ops::fileio_open, target_ops::fileio_pwrite)
5362 (target_ops::fileio_pread, target_ops::fileio_fstat)
5363 (target_ops::fileio_close, target_ops::fileio_unlink)
5364 (target_ops::fileio_readlink): New.
5365 (target_fileio_open_1, target_fileio_unlink)
5366 (target_fileio_readlink): Always call the target method. Handle
5367 FILEIO_ENOSYS.
5368 (return_zero, return_zero_has_execution): Delete.
5369 (init_dummy_target): Delete.
5370 (dummy_target::dummy_target, dummy_target::shortname)
5371 (dummy_target::longname, dummy_target::doc)
5372 (debug_target::debug_target, debug_target::shortname)
5373 (debug_target::longname, debug_target::doc): New.
5374 (target_supports_delete_record): Use regular delegation.
5375 (setup_target_debug): Delete.
5376 (maintenance_print_target_stack): Skip debug_stratum.
5377 (initialize_targets): Instantiate the_dummy_target and
5378 the_debug_target.
5379 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
5380 use target_stack.
5381 (target_auxv_search, fprint_target_auxv): Adjust.
5382 (info_auxv_command): Adjust to use target_stack.
5383 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
5384 * exceptions.c (print_flush): Handle a NULL target_stack.
5385 * regcache.c (target_ops_no_register): Refactor as class with
5386 virtual methods.
5387
5388 * exec.c (exec_target): New class.
5389 (exec_ops): Now an exec_target.
5390 (exec_open, exec_close_1, exec_get_section_table)
5391 (exec_xfer_partial, exec_files_info, exec_has_memory)
5392 (exec_make_note_section): Refactor as exec_target methods.
5393 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
5394 Delete.
5395 (exec_target::find_memory_regions): New.
5396 (_initialize_exec): Don't call init_exec_ops.
5397 * gdbcore.h (exec_file_clear): Delete.
5398
5399 * corefile.c (core_target): Delete.
5400 (core_file_command): Adjust.
5401 * corelow.c (core_target): New class.
5402 (the_core_target): New.
5403 (core_close): Remove target_ops parameter.
5404 (core_close_cleanup): Adjust.
5405 (core_target::close): New.
5406 (core_open, core_detach, get_core_registers, core_files_info)
5407 (core_xfer_partial, core_thread_alive, core_read_description)
5408 (core_pid_to_str, core_thread_name, core_has_memory)
5409 (core_has_stack, core_has_registers, core_info_proc): Rework as
5410 core_target methods.
5411 (ignore, core_remove_breakpoint, init_core_ops): Delete.
5412 (_initialize_corelow): Initialize the_core_target.
5413 * gdbcore.h (core_target): Delete.
5414 (the_core_target): New.
5415
5416 * ctf.c: (ctf_target): New class.
5417 (ctf_ops): Now a ctf_target.
5418 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
5419 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
5420 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
5421 methods.
5422 (init_ctf_ops): Delete.
5423 (_initialize_ctf): Don't call it.
5424 * tracefile-tfile.c (tfile_target): New class.
5425 (tfile_ops): Now a tfile_target.
5426 (tfile_open, tfile_close, tfile_files_info)
5427 (tfile_get_tracepoint_status, tfile_trace_find)
5428 (tfile_fetch_registers, tfile_xfer_partial)
5429 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
5430 Refactor as tfile_target methods.
5431 (tfile_xfer_partial_features): Remove target_ops parameter.
5432 (init_tfile_ops): Delete.
5433 (_initialize_tracefile_tfile): Don't call it.
5434 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
5435 (tracefile_has_stack, tracefile_has_registers)
5436 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
5437 tracefile_target methods.
5438 (init_tracefile_ops): Delete.
5439 (tracefile_target::tracefile_target): New.
5440 * tracefile.h: Include "target.h".
5441 (tracefile_target): New class.
5442 (init_tracefile_ops): Delete.
5443
5444 * spu-multiarch.c (spu_multiarch_target): New class.
5445 (spu_ops): Now a spu_multiarch_target.
5446 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
5447 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
5448 (spu_search_memory, spu_mourn_inferior): Refactor as
5449 spu_multiarch_target methods.
5450 (init_spu_ops): Delete.
5451 (_initialize_spu_multiarch): Remove references to init_spu_ops,
5452 complete_target_initialization.
5453
5454 * ravenscar-thread.c (ravenscar_thread_target): New class.
5455 (ravenscar_ops): Now a ravenscar_thread_target.
5456 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
5457 (ravenscar_thread_alive, ravenscar_pid_to_str)
5458 (ravenscar_fetch_registers, ravenscar_store_registers)
5459 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
5460 (ravenscar_stopped_by_hw_breakpoint)
5461 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
5462 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
5463 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
5464 methods.
5465 (init_ravenscar_thread_ops): Delete.
5466 (_initialize_ravenscar): Remove references to
5467 init_ravenscar_thread_ops and complete_target_initialization.
5468
5469 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
5470 (bsd_uthread_target): New class.
5471 (bsd_uthread_ops): Now a bsd_uthread_target.
5472 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
5473 (bsd_uthread_close, bsd_uthread_mourn_inferior)
5474 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
5475 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
5476 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
5477 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
5478 (bsd_uthread_target): Delete function.
5479 (_initialize_bsd_uthread): Remove reference to
5480 complete_target_initialization.
5481
5482 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
5483 (target_bfd): ... this new class.
5484 (target_bfd_xfer_partial, target_bfd_get_section_table)
5485 (target_bfd_close): Refactor as target_bfd methods.
5486 (target_bfd::~target_bfd): New.
5487 (target_bfd_reopen): Adjust.
5488 (target_bfd::close): New.
5489
5490 * record-btrace.c (record_btrace_target): New class.
5491 (record_btrace_ops): Now a record_btrace_target.
5492 (record_btrace_open, record_btrace_stop_recording)
5493 (record_btrace_disconnect, record_btrace_close)
5494 (record_btrace_async, record_btrace_info)
5495 (record_btrace_insn_history, record_btrace_insn_history_range)
5496 (record_btrace_insn_history_from, record_btrace_call_history)
5497 (record_btrace_call_history_range)
5498 (record_btrace_call_history_from, record_btrace_record_method)
5499 (record_btrace_is_replaying, record_btrace_will_replay)
5500 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
5501 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
5502 (record_btrace_store_registers, record_btrace_prepare_to_store)
5503 (record_btrace_to_get_unwinder)
5504 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
5505 (record_btrace_commit_resume, record_btrace_wait)
5506 (record_btrace_stop, record_btrace_can_execute_reverse)
5507 (record_btrace_stopped_by_sw_breakpoint)
5508 (record_btrace_supports_stopped_by_sw_breakpoint)
5509 (record_btrace_stopped_by_hw_breakpoint)
5510 (record_btrace_supports_stopped_by_hw_breakpoint)
5511 (record_btrace_update_thread_list, record_btrace_thread_alive)
5512 (record_btrace_goto_begin, record_btrace_goto_end)
5513 (record_btrace_goto, record_btrace_stop_replaying_all)
5514 (record_btrace_execution_direction)
5515 (record_btrace_prepare_to_generate_core)
5516 (record_btrace_done_generating_core): Refactor as
5517 record_btrace_target methods.
5518 (init_record_btrace_ops): Delete.
5519 (_initialize_record_btrace): Remove reference to
5520 init_record_btrace_ops.
5521 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
5522 the execution_direction global.
5523 (record_full_base_target, record_full_target)
5524 (record_full_core_target): New classes.
5525 (record_full_ops): Now a record_full_target.
5526 (record_full_core_ops): Now a record_full_core_target.
5527 (record_full_target::detach, record_full_target::disconnect)
5528 (record_full_core_target::disconnect)
5529 (record_full_target::mourn_inferior, record_full_target::kill):
5530 New.
5531 (record_full_open, record_full_close, record_full_async): Refactor
5532 as methods of the record_full_base_target class.
5533 (record_full_resume, record_full_commit_resume): Refactor
5534 as methods of the record_full_target class.
5535 (record_full_wait, record_full_stopped_by_watchpoint)
5536 (record_full_stopped_data_address)
5537 (record_full_stopped_by_sw_breakpoint)
5538 (record_full_supports_stopped_by_sw_breakpoint)
5539 (record_full_stopped_by_hw_breakpoint)
5540 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
5541 methods of the record_full_base_target class.
5542 (record_full_store_registers, record_full_xfer_partial)
5543 (record_full_insert_breakpoint, record_full_remove_breakpoint):
5544 Refactor as methods of the record_full_target class.
5545 (record_full_can_execute_reverse, record_full_get_bookmark)
5546 (record_full_goto_bookmark, record_full_execution_direction)
5547 (record_full_record_method, record_full_info, record_full_delete)
5548 (record_full_is_replaying, record_full_will_replay)
5549 (record_full_goto_begin, record_full_goto_end, record_full_goto)
5550 (record_full_stop_replaying): Refactor as methods of the
5551 record_full_base_target class.
5552 (record_full_core_resume, record_full_core_kill)
5553 (record_full_core_fetch_registers)
5554 (record_full_core_prepare_to_store)
5555 (record_full_core_store_registers, record_full_core_xfer_partial)
5556 (record_full_core_insert_breakpoint)
5557 (record_full_core_remove_breakpoint)
5558 (record_full_core_has_execution): Refactor
5559 as methods of the record_full_core_target class.
5560 (record_full_base_target::supports_delete_record): New.
5561 (init_record_full_ops): Delete.
5562 (init_record_full_core_ops): Delete.
5563 (record_full_save): Refactor as method of the
5564 record_full_base_target class.
5565 (_initialize_record_full): Remove references to
5566 init_record_full_ops and init_record_full_core_ops.
5567
5568 * remote.c (remote_target, extended_remote_target): New classes.
5569 (remote_ops): Now a remote_target.
5570 (extended_remote_ops): Now an extended_remote_target.
5571 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
5572 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
5573 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
5574 (remote_pass_signals, remote_set_syscall_catchpoint)
5575 (remote_program_signals, )
5576 (remote_thread_always_alive): Remove target_ops parameter.
5577 (remote_thread_alive, remote_thread_name)
5578 (remote_update_thread_list, remote_threads_extra_info)
5579 (remote_static_tracepoint_marker_at)
5580 (remote_static_tracepoint_markers_by_strid)
5581 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
5582 (remote_open): Refactor as methods of remote_target.
5583 (extended_remote_open, extended_remote_detach)
5584 (extended_remote_attach, extended_remote_post_attach):
5585 (extended_remote_supports_disable_randomization)
5586 (extended_remote_create_inferior): : Refactor as method of
5587 extended_remote_target.
5588 (remote_set_permissions, remote_open_1, remote_detach)
5589 (remote_follow_fork, remote_follow_exec, remote_disconnect)
5590 (remote_resume, remote_commit_resume, remote_stop)
5591 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
5592 (remote_terminal_ours, remote_wait, remote_fetch_registers)
5593 (remote_prepare_to_store, remote_store_registers)
5594 (remote_flash_erase, remote_flash_done, remote_files_info)
5595 (remote_kill, remote_mourn, remote_insert_breakpoint)
5596 (remote_remove_breakpoint, remote_insert_watchpoint)
5597 (remote_watchpoint_addr_within_range)
5598 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
5599 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
5600 (remote_supports_stopped_by_sw_breakpoint)
5601 (remote_stopped_by_hw_breakpoint)
5602 (remote_supports_stopped_by_hw_breakpoint)
5603 (remote_stopped_by_watchpoint, remote_stopped_data_address)
5604 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
5605 (remote_verify_memory): Refactor as methods of remote_target.
5606 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
5607 parameter.
5608 (remote_xfer_partial, remote_get_memory_xfer_limit)
5609 (remote_search_memory, remote_rcmd, remote_memory_map)
5610 (remote_pid_to_str, remote_get_thread_local_address)
5611 (remote_get_tib_address, remote_read_description): Refactor as
5612 methods of remote_target.
5613 (remote_target::fileio_open, remote_target::fileio_pwrite)
5614 (remote_target::fileio_pread, remote_target::fileio_close): New.
5615 (remote_hostio_readlink, remote_hostio_fstat)
5616 (remote_filesystem_is_local, remote_can_execute_reverse)
5617 (remote_supports_non_stop, remote_supports_disable_randomization)
5618 (remote_supports_multi_process, remote_supports_cond_breakpoints)
5619 (remote_supports_enable_disable_tracepoint)
5620 (remote_supports_string_tracing)
5621 (remote_can_run_breakpoint_commands, remote_trace_init)
5622 (remote_download_tracepoint, remote_can_download_tracepoint)
5623 (remote_download_trace_state_variable, remote_enable_tracepoint)
5624 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
5625 (remote_trace_start, remote_get_trace_status)
5626 (remote_get_tracepoint_status, remote_trace_stop)
5627 (remote_trace_find, remote_get_trace_state_variable_value)
5628 (remote_save_trace_data, remote_get_raw_trace_data)
5629 (remote_set_disconnected_tracing, remote_core_of_thread)
5630 (remote_set_circular_trace_buffer, remote_traceframe_info)
5631 (remote_get_min_fast_tracepoint_insn_len)
5632 (remote_set_trace_buffer_size, remote_set_trace_notes)
5633 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
5634 (remote_disable_btrace, remote_teardown_btrace)
5635 (remote_read_btrace, remote_btrace_conf)
5636 (remote_augmented_libraries_svr4_read, remote_load)
5637 (remote_pid_to_exec_file, remote_can_do_single_step)
5638 (remote_execution_direction, remote_thread_handle_to_thread_info):
5639 Refactor as methods of remote_target.
5640 (init_remote_ops, init_extended_remote_ops): Delete.
5641 (remote_can_async_p, remote_is_async_p, remote_async)
5642 (remote_thread_events, remote_upload_tracepoints)
5643 (remote_upload_trace_state_variables): Refactor as methods of
5644 remote_target.
5645 (_initialize_remote): Remove references to init_remote_ops and
5646 init_extended_remote_ops.
5647
5648 * remote-sim.c (gdbsim_target): New class.
5649 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
5650 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
5651 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
5652 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
5653 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
5654 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
5655 Refactor as methods of gdbsim_target.
5656 (gdbsim_ops): Now a gdbsim_target.
5657 (init_gdbsim_ops): Delete.
5658 (gdbsim_cntrl_c): Adjust.
5659 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
5660
5661 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
5662 (the_amd64_linux_nat_target): New.
5663 (amd64_linux_fetch_inferior_registers)
5664 (amd64_linux_store_inferior_registers): Refactor as methods of
5665 amd64_linux_nat_target.
5666 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
5667 * i386-linux-nat.c: Don't include "linux-nat.h".
5668 (i386_linux_nat_target): New class.
5669 (the_i386_linux_nat_target): New.
5670 (i386_linux_fetch_inferior_registers)
5671 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
5672 as methods of i386_linux_nat_target.
5673 (_initialize_i386_linux_nat): Adjust. Set linux_target.
5674 * inf-child.c (inf_child_ops): Delete.
5675 (inf_child_fetch_inferior_registers)
5676 (inf_child_store_inferior_registers): Delete.
5677 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
5678 methods of inf_child_target.
5679 (inf_child_target::supports_terminal_ours)
5680 (inf_child_target::terminal_init)
5681 (inf_child_target::terminal_inferior)
5682 (inf_child_target::terminal_ours_for_output)
5683 (inf_child_target::terminal_ours, inf_child_target::interrupt)
5684 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
5685 New.
5686 (inf_child_open, inf_child_disconnect, inf_child_close)
5687 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
5688 (inf_child_post_startup_inferior, inf_child_can_run)
5689 (inf_child_pid_to_exec_file): Refactor as methods of
5690 inf_child_target.
5691 (inf_child_follow_fork): Delete.
5692 (inf_child_target::can_create_inferior)
5693 (inf_child_target::can_attach): New.
5694 (inf_child_target::has_all_memory, inf_child_target::has_memory)
5695 (inf_child_target::has_stack, inf_child_target::has_registers)
5696 (inf_child_target::has_execution): New.
5697 (inf_child_fileio_open, inf_child_fileio_pwrite)
5698 (inf_child_fileio_pread, inf_child_fileio_fstat)
5699 (inf_child_fileio_close, inf_child_fileio_unlink)
5700 (inf_child_fileio_readlink, inf_child_use_agent)
5701 (inf_child_can_use_agent): Refactor as methods of
5702 inf_child_target.
5703 (return_zero, inf_child_target): Delete.
5704 (inf_child_target::inf_child_target): New.
5705 * inf-child.h: Include "target.h".
5706 (inf_child_target): Delete function prototype.
5707 (inf_child_target): New class.
5708 (inf_child_open_target, inf_child_mourn_inferior)
5709 (inf_child_maybe_unpush_target): Delete.
5710 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
5711 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
5712 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
5713 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
5714 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
5715 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
5716 (inf_ptrace_wait, inf_ptrace_xfer_partial)
5717 (inf_ptrace_thread_alive, inf_ptrace_files_info)
5718 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
5719 methods of inf_ptrace_target.
5720 (inf_ptrace_target): Delete function.
5721 * inf-ptrace.h: Include "inf-child.h".
5722 (inf_ptrace_target): Delete function declaration.
5723 (inf_ptrace_target): New class.
5724 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
5725 * linux-nat.c (linux_target): New.
5726 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
5727 (linux_nat_target::~linux_nat_target): New.
5728 (linux_child_post_attach, linux_child_post_startup_inferior)
5729 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
5730 (linux_child_remove_fork_catchpoint)
5731 (linux_child_insert_vfork_catchpoint)
5732 (linux_child_remove_vfork_catchpoint)
5733 (linux_child_insert_exec_catchpoint)
5734 (linux_child_remove_exec_catchpoint)
5735 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
5736 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
5737 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
5738 (linux_nat_stopped_data_address)
5739 (linux_nat_stopped_by_sw_breakpoint)
5740 (linux_nat_supports_stopped_by_sw_breakpoint)
5741 (linux_nat_stopped_by_hw_breakpoint)
5742 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
5743 (linux_nat_kill, linux_nat_mourn_inferior)
5744 (linux_nat_xfer_partial, linux_nat_thread_alive)
5745 (linux_nat_update_thread_list, linux_nat_pid_to_str)
5746 (linux_nat_thread_name, linux_child_pid_to_exec_file)
5747 (linux_child_static_tracepoint_markers_by_strid)
5748 (linux_nat_is_async_p, linux_nat_can_async_p)
5749 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
5750 (linux_nat_supports_multi_process)
5751 (linux_nat_supports_disable_randomization, linux_nat_async)
5752 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
5753 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
5754 (linux_nat_fileio_open, linux_nat_fileio_readlink)
5755 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
5756 methods of linux_nat_target.
5757 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
5758 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
5759 parameter.
5760 (check_stopped_by_watchpoint): Adjust.
5761 (linux_xfer_partial): Delete.
5762 (linux_target_install_ops, linux_target, linux_nat_add_target):
5763 Delete.
5764 (linux_nat_target::linux_nat_target): New.
5765 * linux-nat.h: Include "inf-ptrace.h".
5766 (linux_nat_target): New.
5767 (linux_target, linux_target_install_ops, linux_nat_add_target):
5768 Delete function declarations.
5769 (linux_target): Declare global.
5770 * linux-thread-db.c (thread_db_target): New.
5771 (thread_db_target::thread_db_target): New.
5772 (thread_db_ops): Delete.
5773 (the_thread_db_target): New.
5774 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
5775 (thread_db_update_thread_list, thread_db_pid_to_str)
5776 (thread_db_extra_thread_info)
5777 (thread_db_thread_handle_to_thread_info)
5778 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
5779 (thread_db_resume): Refactor as methods of thread_db_target.
5780 (init_thread_db_ops): Delete.
5781 (_initialize_thread_db): Remove reference to init_thread_db_ops.
5782 * x86-linux-nat.c: Don't include "linux-nat.h".
5783 (super_post_startup_inferior): Delete.
5784 (x86_linux_nat_target::~x86_linux_nat_target): New.
5785 (x86_linux_child_post_startup_inferior)
5786 (x86_linux_read_description, x86_linux_enable_btrace)
5787 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
5788 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
5789 methods of x86_linux_nat_target.
5790 (x86_linux_create_target): Delete. Bits folded ...
5791 (x86_linux_add_target): ... here. Now takes a linux_nat_target
5792 pointer.
5793 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
5794 (x86_linux_nat_target): New class.
5795 (x86_linux_create_target): Delete.
5796 (x86_linux_add_target): Now takes a linux_nat_target pointer.
5797 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
5798 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
5799 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
5800 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
5801 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
5802 make extern.
5803 (x86_use_watchpoints): Delete.
5804 * x86-nat.h: Include "breakpoint.h" and "target.h".
5805 (x86_use_watchpoints): Delete.
5806 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
5807 (x86_stopped_by_watchpoint, x86_stopped_data_address)
5808 (x86_insert_watchpoint, x86_remove_watchpoint)
5809 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
5810 (x86_stopped_by_hw_breakpoint): New declarations.
5811 (x86_nat_target): New template class.
5812
5813 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
5814 (the_ppc_linux_nat_target): New.
5815 (ppc_linux_fetch_inferior_registers)
5816 (ppc_linux_can_use_hw_breakpoint)
5817 (ppc_linux_region_ok_for_hw_watchpoint)
5818 (ppc_linux_ranged_break_num_registers)
5819 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
5820 (ppc_linux_insert_mask_watchpoint)
5821 (ppc_linux_remove_mask_watchpoint)
5822 (ppc_linux_can_accel_watchpoint_condition)
5823 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
5824 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
5825 (ppc_linux_watchpoint_addr_within_range)
5826 (ppc_linux_masked_watch_num_registers)
5827 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
5828 (ppc_linux_read_description): Refactor as methods of
5829 ppc_linux_nat_target.
5830 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
5831
5832 * procfs.c (procfs_xfer_partial): Delete forward declaration.
5833 (procfs_target): New class.
5834 (the_procfs_target): New.
5835 (procfs_target): Delete function.
5836 (procfs_auxv_parse, procfs_attach, procfs_detach)
5837 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
5838 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
5839 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
5840 (procfs_create_inferior, procfs_update_thread_list)
5841 (procfs_thread_alive, procfs_pid_to_str)
5842 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
5843 (procfs_stopped_data_address, procfs_insert_watchpoint)
5844 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
5845 (proc_find_memory_regions, procfs_info_proc)
5846 (procfs_make_note_section): Refactor as methods of procfs_target.
5847 (_initialize_procfs): Adjust.
5848 * sol-thread.c (sol_thread_target): New class.
5849 (sol_thread_ops): Now a sol_thread_target.
5850 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
5851 (sol_thread_fetch_registers, sol_thread_store_registers)
5852 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
5853 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
5854 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
5855 (init_sol_thread_ops): Delete.
5856 (_initialize_sol_thread): Adjust. Remove references to
5857 init_sol_thread_ops and complete_target_initialization.
5858
5859 * windows-nat.c (windows_nat_target): New class.
5860 (windows_fetch_inferior_registers)
5861 (windows_store_inferior_registers, windows_resume, windows_wait)
5862 (windows_attach, windows_detach, windows_pid_to_exec_file)
5863 (windows_files_info, windows_create_inferior)
5864 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
5865 (windows_close, windows_pid_to_str, windows_xfer_partial)
5866 (windows_get_tib_address, windows_get_ada_task_ptid)
5867 (windows_thread_name, windows_thread_alive): Refactor as
5868 windows_nat_target methods.
5869 (do_initial_windows_stuff): Adjust.
5870 (windows_target): Delete function.
5871 (_initialize_windows_nat): Adjust.
5872
5873 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
5874 (darwin_mourn_inferior, darwin_kill_inferior)
5875 (darwin_create_inferior, darwin_attach, darwin_detach)
5876 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
5877 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
5878 (darwin_supports_multi_process): Refactor as darwin_nat_target
5879 methods.
5880 (darwin_resume_to, darwin_files_info): Delete.
5881 (_initialize_darwin_inferior): Rename to ...
5882 (_initialize_darwin_nat): ... this. Adjust to C++ification.
5883 * darwin-nat.h: Include "inf-child.h".
5884 (darwin_nat_target): New class.
5885 (darwin_complete_target): Delete.
5886 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
5887 (darwin_target): New.
5888 (i386_darwin_fetch_inferior_registers)
5889 (i386_darwin_store_inferior_registers): Refactor as methods of
5890 darwin_nat_target.
5891 (darwin_complete_target): Delete, with ...
5892 (_initialize_i386_darwin_nat): ... bits factored out here.
5893
5894 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
5895 (the_alpha_linux_nat_target): New.
5896 (alpha_linux_register_u_offset): Refactor as
5897 alpha_linux_nat_target method.
5898 (_initialize_alpha_linux_nat): Adjust.
5899 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
5900 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
5901 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
5902 methods of linux_nat_trad_target.
5903 (linux_trad_target): Delete.
5904 * linux-nat-trad.h (linux_trad_target): Delete function.
5905 (linux_nat_trad_target): New class.
5906 * mips-linux-nat.c (mips_linux_nat_target): New class.
5907 (super_fetch_registers, super_store_registers, super_close):
5908 Delete.
5909 (the_mips_linux_nat_target): New.
5910 (mips64_linux_regsets_fetch_registers)
5911 (mips64_linux_regsets_store_registers)
5912 (mips64_linux_fetch_registers, mips64_linux_store_registers)
5913 (mips_linux_register_u_offset, mips_linux_read_description)
5914 (mips_linux_can_use_hw_breakpoint)
5915 (mips_linux_stopped_by_watchpoint)
5916 (mips_linux_stopped_data_address)
5917 (mips_linux_region_ok_for_hw_watchpoint)
5918 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
5919 (mips_linux_close): Refactor as methods of mips_linux_nat.
5920 (_initialize_mips_linux_nat): Adjust to C++ification.
5921
5922 * aix-thread.c (aix_thread_target): New class.
5923 (aix_thread_ops): Now an aix_thread_target.
5924 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
5925 (aix_thread_fetch_registers, aix_thread_store_registers)
5926 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
5927 (aix_thread_thread_alive, aix_thread_pid_to_str)
5928 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
5929 Refactor as methods of aix_thread_target.
5930 (init_aix_thread_ops): Delete.
5931 (_initialize_aix_thread): Remove references to init_aix_thread_ops
5932 and complete_target_initialization.
5933 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
5934 (rs6000_nat_target): New class.
5935 (the_rs6000_nat_target): New.
5936 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
5937 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
5938 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
5939 (super_create_inferior): Delete.
5940 (_initialize_rs6000_nat): Adjust to C++ification.
5941
5942 * arm-linux-nat.c (arm_linux_nat_target): New class.
5943 (the_arm_linux_nat_target): New.
5944 (arm_linux_fetch_inferior_registers)
5945 (arm_linux_store_inferior_registers, arm_linux_read_description)
5946 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
5947 (arm_linux_remove_hw_breakpoint)
5948 (arm_linux_region_ok_for_hw_watchpoint)
5949 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
5950 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
5951 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
5952 arm_linux_nat_target.
5953 (_initialize_arm_linux_nat): Adjust to C++ification.
5954
5955 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
5956 (the_aarch64_linux_nat_target): New.
5957 (aarch64_linux_fetch_inferior_registers)
5958 (aarch64_linux_store_inferior_registers)
5959 (aarch64_linux_child_post_startup_inferior)
5960 (aarch64_linux_read_description)
5961 (aarch64_linux_can_use_hw_breakpoint)
5962 (aarch64_linux_insert_hw_breakpoint)
5963 (aarch64_linux_remove_hw_breakpoint)
5964 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
5965 (aarch64_linux_region_ok_for_hw_watchpoint)
5966 (aarch64_linux_stopped_data_address)
5967 (aarch64_linux_stopped_by_watchpoint)
5968 (aarch64_linux_watchpoint_addr_within_range)
5969 (aarch64_linux_can_do_single_step): Refactor as methods of
5970 aarch64_linux_nat_target.
5971 (super_post_startup_inferior): Delete.
5972 (_initialize_aarch64_linux_nat): Adjust to C++ification.
5973
5974 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
5975 (the_hppa_linux_nat_target): New.
5976 (hppa_linux_fetch_inferior_registers)
5977 (hppa_linux_store_inferior_registers): Refactor as methods of
5978 hppa_linux_nat_target.
5979 (_initialize_hppa_linux_nat): Adjust to C++ification.
5980
5981 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
5982 (the_ia64_linux_nat_target): New.
5983 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
5984 (ia64_linux_stopped_data_address)
5985 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
5986 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
5987 ia64_linux_nat_target methods.
5988 (super_xfer_partial): Delete.
5989 (_initialize_ia64_linux_nat): Adjust to C++ification.
5990
5991 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
5992 (the_m32r_linux_nat_target): New.
5993 (m32r_linux_fetch_inferior_registers)
5994 (m32r_linux_store_inferior_registers): Refactor as
5995 m32r_linux_nat_target methods.
5996 (_initialize_m32r_linux_nat): Adjust to C++ification.
5997
5998 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
5999 (the_m68k_linux_nat_target): New.
6000 (m68k_linux_fetch_inferior_registers)
6001 (m68k_linux_store_inferior_registers): Refactor as
6002 m68k_linux_nat_target methods.
6003 (_initialize_m68k_linux_nat): Adjust to C++ification.
6004
6005 * s390-linux-nat.c (s390_linux_nat_target): New class.
6006 (the_s390_linux_nat_target): New.
6007 (s390_linux_fetch_inferior_registers)
6008 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
6009 (s390_insert_watchpoint, s390_remove_watchpoint)
6010 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
6011 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
6012 (s390_auxv_parse, s390_read_description): Refactor as methods of
6013 s390_linux_nat_target.
6014 (_initialize_s390_nat): Adjust to C++ification.
6015
6016 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
6017 (the_sparc_linux_nat_target): New.
6018 (_initialize_sparc_linux_nat): Adjust to C++ification.
6019 * sparc-nat.c (sparc_fetch_inferior_registers)
6020 (sparc_store_inferior_registers): Remove target_ops parameter.
6021 * sparc-nat.h (sparc_fetch_inferior_registers)
6022 (sparc_store_inferior_registers): Remove target_ops parameter.
6023 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
6024 (the_sparc64_linux_nat_target): New.
6025 (_initialize_sparc64_linux_nat): Adjust to C++ification.
6026
6027 * spu-linux-nat.c (spu_linux_nat_target): New class.
6028 (the_spu_linux_nat_target): New.
6029 (spu_child_post_startup_inferior, spu_child_post_attach)
6030 (spu_child_wait, spu_fetch_inferior_registers)
6031 (spu_store_inferior_registers, spu_xfer_partial)
6032 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
6033 methods.
6034 (_initialize_spu_nat): Adjust to C++ification.
6035
6036 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
6037 (the_tilegx_linux_nat_target): New.
6038 (fetch_inferior_registers, store_inferior_registers):
6039 Refactor as methods.
6040 (_initialize_tile_linux_nat): Adjust to C++ification.
6041
6042 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
6043 (the_xtensa_linux_nat_target): New.
6044 (xtensa_linux_fetch_inferior_registers)
6045 (xtensa_linux_store_inferior_registers): Refactor as
6046 xtensa_linux_nat_target methods.
6047 (_initialize_xtensa_linux_nat): Adjust to C++ification.
6048
6049 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
6050 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
6051 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
6052 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
6053 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
6054 (fbsd_stopped_by_sw_breakpoint)
6055 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
6056 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
6057 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
6058 (fbsd_post_startup_inferior, fbsd_post_attach)
6059 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
6060 (fbsd_set_syscall_catchpoint)
6061 (super_xfer_partial, super_resume, super_wait)
6062 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
6063 (fbsd_handle_debug_trap): Remove target_ops parameter.
6064 (fbsd_nat_add_target): Delete.
6065 * fbsd-nat.h: Include "inf-ptrace.h".
6066 (fbsd_nat_add_target): Delete.
6067 (USE_SIGTRAP_SIGINFO): Define.
6068 (fbsd_nat_target): New class.
6069
6070 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
6071 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
6072 (amd64bsd_target): Delete.
6073 * amd64-bsd-nat.h: New file.
6074 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
6075 "x86-bsd-nat.h".
6076 (amd64_fbsd_nat_target): New class.
6077 (the_amd64_fbsd_nat_target): New.
6078 (amd64fbsd_read_description): Refactor as method of
6079 amd64_fbsd_nat_target.
6080 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6081 (_initialize_amd64fbsd_nat): Adjust to C++ification.
6082 * amd64-nat.h (amd64bsd_target): Delete function declaration.
6083 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
6084 (i386bsd_store_inferior_registers): Remove target_ops parameter.
6085 (i386bsd_target): Delete.
6086 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
6087 (i386bsd_fetch_inferior_registers)
6088 (i386bsd_store_inferior_registers): Declare.
6089 (i386_bsd_nat_target): New class.
6090 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
6091 (the_i386_fbsd_nat_target): New.
6092 (i386fbsd_resume, i386fbsd_read_description): Refactor as
6093 i386_fbsd_nat_target methods.
6094 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6095 (_initialize_i386fbsd_nat): Adjust to C++ification.
6096 * x86-bsd-nat.c (super_mourn_inferior): Delete.
6097 (x86bsd_mourn_inferior, x86bsd_target): Delete.
6098 (_initialize_x86_bsd_nat): Adjust to C++ification.
6099 * x86-bsd-nat.h: Include "x86-nat.h".
6100 (x86bsd_target): Delete declaration.
6101 (x86bsd_nat_target): New class.
6102
6103 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
6104 (the_aarch64_fbsd_nat_target): New.
6105 (aarch64_fbsd_fetch_inferior_registers)
6106 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
6107 aarch64_fbsd_nat_target.
6108 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
6109 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
6110 (the_alpha_bsd_nat_target): New.
6111 (alphabsd_fetch_inferior_registers)
6112 (alphabsd_store_inferior_registers): Refactor as
6113 alpha_bsd_nat_target methods.
6114 (_initialize_alphabsd_nat): Refactor as methods of
6115 alpha_bsd_nat_target.
6116 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
6117 (the_amd64_nbsd_nat_target): New.
6118 (_initialize_amd64nbsd_nat): Adjust to C++ification.
6119 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
6120 (the_amd64_obsd_nat_target): New.
6121 (_initialize_amd64obsd_nat): Adjust to C++ification.
6122 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
6123 (the_arm_fbsd_nat_target): New.
6124 (arm_fbsd_fetch_inferior_registers)
6125 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
6126 (_initialize_arm_fbsd_nat): Refactor as methods of
6127 arm_fbsd_nat_target.
6128 (_initialize_arm_fbsd_nat): Adjust to C++ification.
6129 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
6130 (the_arm_netbsd_nat_target): New.
6131 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
6132 arm_netbsd_nat_target.
6133 (_initialize_arm_netbsd_nat): Adjust to C++ification.
6134 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
6135 (the_hppa_nbsd_nat_target): New.
6136 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
6137 hppa_nbsd_nat_target methods.
6138 (_initialize_hppanbsd_nat): Adjust to C++ification.
6139 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
6140 (the_hppa_obsd_nat_target): New.
6141 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
6142 methods of hppa_obsd_nat_target.
6143 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
6144 add_target.
6145 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
6146 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
6147 add_target.
6148 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
6149 (_initialize_i386obsd_nat): Use add_target.
6150 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
6151 (the_m68k_bsd_nat_target): New.
6152 (m68kbsd_fetch_inferior_registers)
6153 (m68kbsd_store_inferior_registers): Refactor as methods of
6154 m68k_bsd_nat_target.
6155 (_initialize_m68kbsd_nat): Adjust to C++ification.
6156 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
6157 (the_mips_fbsd_nat_target): New.
6158 (mips_fbsd_fetch_inferior_registers)
6159 (mips_fbsd_store_inferior_registers): Refactor as methods of
6160 mips_fbsd_nat_target.
6161 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
6162 add_target.
6163 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
6164 (the_mips_nbsd_nat_target): New.
6165 (mipsnbsd_fetch_inferior_registers)
6166 (mipsnbsd_store_inferior_registers): Refactor as methods of
6167 mips_nbsd_nat_target.
6168 (_initialize_mipsnbsd_nat): Adjust to C++ification.
6169 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
6170 (the_mips64_obsd_nat_target): New.
6171 (mips64obsd_fetch_inferior_registers)
6172 (mips64obsd_store_inferior_registers): Refactor as methods of
6173 mips64_obsd_nat_target.
6174 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
6175 add_target.
6176 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
6177 nbsd_nat_target.
6178 * nbsd-nat.h: Include "inf-ptrace.h".
6179 (nbsd_nat_target): New class.
6180 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
6181 (obsd_wait): Refactor as methods of obsd_nat_target.
6182 (obsd_add_target): Delete.
6183 * obsd-nat.h: Include "inf-ptrace.h".
6184 (obsd_nat_target): New class.
6185 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
6186 (the_ppc_fbsd_nat_target): New.
6187 (ppcfbsd_fetch_inferior_registers)
6188 (ppcfbsd_store_inferior_registers): Refactor as methods of
6189 ppc_fbsd_nat_target.
6190 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
6191 add_target.
6192 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
6193 (the_ppc_nbsd_nat_target): New.
6194 (ppcnbsd_fetch_inferior_registers)
6195 (ppcnbsd_store_inferior_registers): Refactor as methods of
6196 ppc_nbsd_nat_target.
6197 (_initialize_ppcnbsd_nat): Adjust to C++ification.
6198 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
6199 (the_ppc_obsd_nat_target): New.
6200 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
6201 methods of ppc_obsd_nat_target.
6202 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
6203 add_target.
6204 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
6205 (the_sh_nbsd_nat_target): New.
6206 (shnbsd_fetch_inferior_registers)
6207 (shnbsd_store_inferior_registers): Refactor as methods of
6208 sh_nbsd_nat_target.
6209 (_initialize_shnbsd_nat): Adjust to C++ification.
6210 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
6211 (inf_ptrace_xfer_partial): Delete.
6212 (sparc_xfer_partial, sparc_target): Delete.
6213 * sparc-nat.h (sparc_fetch_inferior_registers)
6214 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
6215 (sparc_target): Delete function declaration.
6216 (sparc_target): New template class.
6217 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
6218 (_initialize_sparcnbsd_nat): Adjust to C++ification.
6219 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
6220 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
6221 add_target.
6222 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
6223 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
6224 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
6225 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
6226 add_target.
6227 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
6228 (the_vax_bsd_nat_target): New.
6229 (vaxbsd_fetch_inferior_registers)
6230 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
6231 methods.
6232 (_initialize_vaxbsd_nat): Adjust to C++ification.
6233
6234 * bsd-kvm.c (bsd_kvm_target): New class.
6235 (bsd_kvm_ops): Now a bsd_kvm_target.
6236 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
6237 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
6238 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
6239 bsd_kvm_target.
6240 (bsd_kvm_return_one): Delete.
6241 (bsd_kvm_add_target): Adjust to C++ification.
6242
6243 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
6244 (nto_procfs_target_procfs): New classes.
6245 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
6246 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
6247 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
6248 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
6249 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
6250 (procfs_remove_hw_breakpoint, procfs_resume)
6251 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
6252 (procfs_kill_inferior, procfs_store_registers)
6253 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
6254 as methods of nto_procfs_target.
6255 (nto_procfs_ops): Now an nto_procfs_target_procfs.
6256 (nto_native_ops): Delete.
6257 (procfs_open, procfs_native_open): Delete.
6258 (nto_native_ops): Now an nto_procfs_target_native.
6259 (init_procfs_targets): Adjust to C++ification.
6260 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
6261 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
6262 Refactor as methods of nto_procfs_target.
6263
6264 * go32-nat.c (go32_nat_target): New class.
6265 (the_go32_nat_target): New.
6266 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
6267 (go32_store_registers, go32_xfer_partial, go32_files_info)
6268 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
6269 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
6270 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
6271 (go32_pid_to_str): Refactor as methods of go32_nat_target.
6272 (go32_target): Delete.
6273 (_initialize_go32_nat): Adjust to C++ification.
6274
6275 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
6276 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
6277 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
6278 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
6279 gnu_nat_target.
6280 (gnu_target): Delete.
6281 * gnu-nat.h (gnu_target): Delete.
6282 (gnu_nat_target): New class.
6283 * i386-gnu-nat.c (gnu_base_target): New.
6284 (i386_gnu_nat_target): New class.
6285 (the_i386_gnu_nat_target): New.
6286 (_initialize_i386gnu_nat): Adjust to C++ification.
6287
3fffc070
PA
62882018-05-02 Pedro Alves <palves@redhat.com>
6289
6290 * bfd-target.c (target_bfd_xclose): Rename to ...
6291 (target_bfd_close): ... this.
6292 (target_bfd_reopen): Adjust.
6293 * target.c (target_close): Remove references to to_xclose.
6294 * target.h (target_ops::to_xclose): Delete.
6295 (target_ops::to_close): Update comments.
6296
6798487f
PA
62972018-05-02 Pedro Alves <palves@redhat.com>
6298
6299 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
6300 "linux-nat.h".
6301 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
6302 * inf-ptrace.c (inf_ptrace_register_u_offset)
6303 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6304 (inf_ptrace_store_register, inf_ptrace_store_registers)
6305 (inf_ptrace_trad_target): Move to ...
6306 * linux-nat-trad.c: ... this new file.
6307 * linux-nat-trad.h: New file.
6308 * linux-nat.c (linux_target_install_ops): Make extern.
6309 (linux_trad_target): Delete.
6310 * linux-nat.h (linux_trad_target): Delete declaration.
6311 (linux_target_install_ops): Declare.
6312 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
6313 "linux-nat.h".
6314
c1955e17
PA
63152018-05-02 Pedro Alves <palves@redhat.com>
6316
6317 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6318 procfs_target/add_target here.
6319 * procfs.c (procfs_target): Make static.
6320 (_initialize_procfs): Call add_target here.
6321 * procfs.h (struct target_ops): Remove forward declaration.
6322 (procfs_target): Remove declaration.
6323 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
6324
b5c8fcb1
PA
63252018-05-02 Pedro Alves <palves@redhat.com>
6326
6327 * procfs.c (procfs_stopped_by_watchpoint)
6328 (procfs_insert_watchpoint, procfs_remove_watchpoint)
6329 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
6330 Forward declare.
6331 (procfs_use_watchpoints): Delete, move contents...
6332 (procfs_target): ... here.
6333 * procfs.h (procfs_use_watchpoints): Delete declaration.
6334 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6335 procfs_use_watchpoints.
6336 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
6337 procfs_use_watchpoints.
6338
0489430a
TT
63392018-05-02 Tom Tromey <tom@tromey.com>
6340
6341 PR python/20084:
6342 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
6343 and var_zuinteger_unlimited.
6344 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
6345 and PARAM_ZUINTEGER_UNLIMITED.
6346 (set_parameter_value): Handle var_zuinteger and
6347 var_zuinteger_unlimited.
6348 (add_setshow_generic): Likewise.
6349 (parmpy_init): Likewise.
6350
1632f8ba
DR
63512018-04-28 Dan Robertson <danlrobertson89@gmail.com>
6352
6353 PR rust/23124
6354 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
6355 pointer is not null before dereferencing it.
6356
76761936
TT
63572018-04-30 Tom Tromey <tom@tromey.com>
6358
6359 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
6360 is_mi_like_p.
6361
2d33446d
TT
63622018-04-30 Tom Tromey <tom@tromey.com>
6363
6364 * breakpoint.c (mention): Remove use of is_mi_like_p.
6365 (print_mention_ranged_breakpoint): Likewise.
6366 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
6367 of is_mi_like_p.
6368
f3c6abab
TT
63692018-04-30 Tom Tromey <tom@tromey.com>
6370
6371 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
6372
40c03530
TT
63732018-04-30 Tom Tromey <tom@tromey.com>
6374
6375 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
6376 (info_spu_event_command): Remove some uses of is_mi_like_p.
6377
2038b7fd
TT
63782018-04-30 Tom Tromey <tom@tromey.com>
6379
6380 * python/py-framefilter.c (py_print_single_arg)
6381 (enumerate_locals, py_print_args, py_print_frame): Remove some
6382 uses of is_mi_like_p.
6383
4904c3c6
TT
63842018-04-30 Tom Tromey <tom@tromey.com>
6385
6386 * ui-out.c: Update.
6387 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
6388 * ui-out.h (ui_out::is_mi_like_p): Now const.
6389 (ui_out::do_is_mi_like_p): Now const.
6390 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
6391
7c66fffc
TT
63922018-04-30 Tom Tromey <tom@tromey.com>
6393
6394 * varobj.c (varobj_set_visualizer): Use new_reference.
6395 * python/python.c (gdbpy_decode_line): Use new_reference.
6396 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
6397 new_reference.
6398
bbfa6f00
TT
63992018-04-30 Tom Tromey <tom@tromey.com>
6400
6401 * varobj.c (install_new_value): Use new_reference.
6402 * value.h (value_incref): Return void. Swap intro comment with
6403 value_decref.
6404 * value.c (set_value_parent): Use new_reference.
6405 (value_incref): Return void. Update intro comment.
6406 (release_value): Use new_reference.
6407 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
6408
1831a9f9
TT
64092018-04-30 Tom Tromey <tom@tromey.com>
6410
6411 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
6412 * gdb_bfd.h (new_bfd_ref): Remove.
6413 (gdb_bfd_open): Update comment.
6414 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
6415 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
6416 (gdb_bfd_fdopenr): Use new_reference.
6417 * exec.c (exec_file_attach): Use new_reference.
6418
7c1b5f3d
TT
64192018-04-30 Tom Tromey <tom@tromey.com>
6420
6421 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
6422 method.
6423
e11fb955
TT
64242018-04-30 Tom Tromey <tom@tromey.com>
6425
6426 * jit.c (jit_read_code_entry): Use type_align.
6427 * i386-tdep.c (i386_gdbarch_init): Don't call
6428 set_gdbarch_long_long_align_bit.
6429 * gdbarch.sh: Remove long_long_align_bit.
6430 * gdbarch.c, gdbarch.h: Rebuild.
6431 * arc-tdep.c (arc_type_align): New function.
6432 (arc_gdbarch_init): Use arc_type_align. Don't call
6433 set_gdbarch_long_long_align_bit.
6434
2fff16dd
TT
64352018-04-30 Tom Tromey <tom@tromey.com>
6436
6437 * rust-lang.c (rust_type_alignment): Remove.
6438 (rust_composite_type): Use type_align.
6439
6d7bb824
TT
64402018-04-30 Tom Tromey <tom@tromey.com>
6441
6442 * NEWS: Mention Type.align.
6443 * python/py-type.c (typy_get_alignof): New function.
6444 (type_object_getset): Add "alignof".
6445
007e1530
TT
64462018-04-30 Tom Tromey <tom@tromey.com>
6447
6448 PR exp/17095:
6449 * NEWS: Update.
6450 * std-operator.def (UNOP_ALIGNOF): New operator.
6451 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
6452 New.
6453 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
6454 * c-lang.c (c_op_print_tab): Add alignof.
6455 * c-exp.y (ALIGNOF): New token.
6456 (exp): Add "ALIGNOF" production.
6457 (ident_tokens): Add _Alignof and alignof.
6458
2b4424c3
TT
64592018-04-30 Tom Tromey <tom@tromey.com>
6460
6461 * i386-tdep.c (i386_type_align): New function.
6462 (i386_gdbarch_init): Update.
6463 * gdbarch.sh (type_align): New method.
6464 * gdbarch.c, gdbarch.h: Rebuild.
6465 * arch-utils.h (default_type_align): Declare.
6466 * arch-utils.c (default_type_align): New function.
6467 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
6468 (struct type) <align_log2>: New field.
6469 <instance_flags>: Now a bitfield.
6470 (TYPE_RAW_ALIGN): New macro.
6471 (type_align, type_raw_align, set_type_align): Declare.
6472 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
6473 functions.
6474 * dwarf2read.c (quirk_rust_enum): Set type alignment.
6475 (get_alignment, maybe_set_alignment): New functions.
6476 (read_structure_type, read_enumeration_type, read_array_type)
6477 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
6478 (read_subrange_type, read_base_type): Set type alignment.
6479
d33bc52e
SM
64802018-04-30 Simon Marchi <simon.marchi@ericsson.com>
6481
6482 * dwarf2read.c (read_index_from_section): Use bool.
6483
e28b63a9
FG
64842018-04-29 Fabian Groffen <grobian@gentoo.org>
6485
6486 PR gdb/22950
6487 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
6488 with #ifdef.
6489
cd8c76e4
JR
64902018-04-29 John Reiser <jreiser@BitWagon.com>
6491
6492 PR build/22873
6493 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
6494 last step, and do it atomically.
6495
476d250e
AO
64962018-04-27 Alexandre Oliva <aoliva@redhat.com>
6497
6498 * compile/compile-c-types.c (convert_int, convert_float):
6499 Update for C FE v1.
6500
6873858b
TT
65012018-04-27 Tom Tromey <tom@tromey.com>
6502
6503 PR rust/22545:
6504 * rust-lang.c (rust_inclusive_range_type_p): New function.
6505 (rust_range): Handle inclusive ranges.
6506 (rust_compute_range): Likewise.
6507 * rust-exp.y (struct rust_op) <inclusive>: New field.
6508 (DOTDOTEQ): New constant.
6509 (range_expr): Add "..=" productions.
6510 (operator_tokens): Add "..=" token.
6511 (ast_range): Add "inclusive" parameter.
6512 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
6513 ranges.
6514 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
6515 bounds values.
6516 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
6517 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
6518 Update comments.
6519 * expprint.c (print_subexp_standard): Handle new bounds values.
6520 (dump_subexp_body_standard): Likewise.
6521
632e107b
TT
65222018-04-27 Tom Tromey <tom@tromey.com>
6523
6524 * configure: Rebuild.
6525 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
6526 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
6527 "OVERRIDE".
6528 (class symbol_needs_eval_context): Likewise.
6529 * dwarf2read.c (mock_mapped_index::symbol_name_count)
6530 (mock_mapped_index::symbol_name_at): Use "override". Remove
6531 "virtual".
6532 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
6533 "override".
6534 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
6535 * aarch64-tdep.c (instruction_reader::read): Use "override".
6536 (instruction_reader_test::read): Likewise.
6537 * arm-tdep.c (instruction_reader::read): Use "override".
6538 (instruction_reader_thumb::read): Likewise.
6539
b75abf5b
AK
65402018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
6541
6542 PR remote/9665
6543 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
6544 instead of remote_send.
6545 (remote_send): Remove.
6546
79188d8d
PA
65472018-04-26 Pedro Alves <palves@redhat.com>
6548
6549 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
6550 find_function_start_sal instead of find_pc_line.
6551
f50776aa
PA
65522018-04-26 Pedro Alves <palves@redhat.com>
6553
6554 * breakpoint.c (set_breakpoint_location_function): Handle
6555 mst_data_gnu_ifunc.
6556 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
6557 * elfread.c (elf_symtab_read): Give data symbols with
6558 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
6559 (elf_rel_plt_read): Update comment.
6560 * linespec.c (convert_linespec_to_sals): Handle
6561 mst_data_gnu_ifunc.
6562 (minsym_found): Handle mst_data_gnu_ifunc.
6563 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
6564 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
6565 * parse.c (find_minsym_type_and_address): Handle
6566 mst_data_gnu_ifunc.
6567 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
6568 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
6569 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
6570 comment.
6571 <mst_data_gnu_ifunc>: New enumerator.
6572
20944a6e
PA
65732018-04-26 Pedro Alves <palves@redhat.com>
6574
6575 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
6576 (lookup_minimal_symbol_by_pc_section): ... this. Replace
6577 'want_trampoline' parameter by a lookup_msym_prefer parameter.
6578 Handle it.
6579 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
6580 (lookup_minimal_symbol_by_pc): Adjust.
6581 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
6582 (lookup_solib_trampoline_symbol_by_pc): Adjust.
6583 * minsyms.h (lookup_msym_prefer): New enum.
6584 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
6585 parameter by a lookup_msym_prefer parameter.
6586
1adeb822
PA
65872018-04-26 Pedro Alves <palves@redhat.com>
6588
6589 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
6590 ends in "@plt" instead of looking at the symbol's section.
6591
a0aca7b0
PA
65922018-04-26 Pedro Alves <palves@redhat.com>
6593
6594 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
6595 all references.
6596 (find_pc_partial_function_gnu_ifunc): Rename to ...
6597 (find_pc_partial_function): ... this, and remove references to
6598 'is_gnu_ifunc_p'.
6599 (find_pc_partial_function): Delete old implementation.
6600 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
6601
76af0f26
PA
66022018-04-26 Pedro Alves <palves@redhat.com>
6603
6604 * linespec.c (struct bound_minimal_symbol_search_key): New.
6605 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
6606 skip first line if we found a GNU ifunc minimal symbol by name.
6607 (compare_msymbols): Change parameters to work with a destructured
6608 lhs minsym.
6609 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
6610 functions.
6611
3467ec66
PA
66122018-04-26 Pedro Alves <palves@redhat.com>
6613
6614 * breakpoint.c (set_breakpoint_location_function): Don't resolve
6615 ifunc targets here. Instead, if we have an ifunc minsym, use its
6616 address/name.
6617 (add_location_to_breakpoint): Store the minsym and the objfile in
6618 the breakpoint location.
6619 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
6620 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
6621 Record the minsym in the sal.
6622 * symtab.h (symtab_and_line) <msymbol>: New field.
6623
28f4fa4d
PA
66242018-04-26 Pedro Alves <palves@redhat.com>
6625
6626 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
6627 unless we actually resolved the ifunc.
6628
ca31ab1d
PA
66292018-04-26 Pedro Alves <palves@redhat.com>
6630
6631 * c-exp.y (variable production): Prefer ifunc minsyms over
6632 regular function symbols.
6633 * symtab.c (find_gnu_ifunc): New function.
6634 * minsyms.h (lookup_msym_prefer): New enum.
6635 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
6636 parameter by a lookup_msym_prefer parameter.
6637 * symtab.h (find_gnu_ifunc): New declaration.
6638
8388016d
PA
66392018-04-26 Pedro Alves <palves@redhat.com>
6640
6641 * blockframe.c (find_gnu_ifunc_target_type): New function.
6642 (find_function_type): New.
6643 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
6644 return a value with a memory address.
6645 (eval_call): For calls to GNU ifunc functions, try to find the
6646 type of the target function from the type that the resolver
6647 returns.
6648 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
6649 symbols.
6650 * infcall.c (find_function_return_type): Delete.
6651 (find_function_addr): Add 'function_type' parameter. For calls to
6652 GNU ifunc functions, try to find the type of the target function
6653 from the type that the resolver returns, and return it via
6654 FUNCTION_TYPE.
6655 (call_function_by_hand_dummy): Adjust to use the function type
6656 returned by find_function_addr.
6657 (find_function_addr): Add 'function_type' parameter and move
6658 description here.
6659 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
6660 declarations.
6661
a376e11d
PA
66622018-04-26 Pedro Alves <palves@redhat.com>
6663
6664 * c-exp.y (variable production): Skip finding an alias for ifunc
6665 symbols.
6666
02e169e2
PA
66672018-04-26 Pedro Alves <palves@redhat.com>
6668
6669 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
6670
249b5733
PA
66712018-04-25 Pedro Alves <palves@redhat.com>
6672
6673 * infcmd.c (kill_command): Print the pid as string, not the whole
6674 thread's ptid. Add comment. s/has been killed/killed/ in output
6675 message.
6676 * remote.c (remote_detach_1): Print the pid as string, not the
6677 whole thread's ptid.
6678
f67c0c91
SDJ
66792018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6680 Sergio Durigan Junior <sergiodj@redhat.com>
6681 Pedro Alves <palves@redhat.com>
6682
6683 * infcmd.c (kill_command): Print message when inferior has
6684 been killed.
6685 * inferior.c (print_inferior_events): Remove 'static'. Set as
6686 '1'.
6687 (add_inferior): Improve message printed when
6688 'print_inferior_events' is on.
6689 (exit_inferior): Remove message printed when
6690 'print_inferior_events' is on.
6691 (detach_inferior): Improve message printed when
6692 'print_inferior_events' is on.
6693 (initialize_inferiors): Use 'add_inferior_silent' to set
6694 'current_inferior_'.
6695 * inferior.h (print_inferior_events): Declare here as
6696 'extern'.
6697 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
6698 '[Detaching...]' messages when 'print_inferior_events' is on.
6699 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
6700 as prefix/suffix for messages. Remove periods. Fix erroneous
6701 'Detaching after fork from child...', replace it by '... from
6702 parent...'.
6703 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
6704 prefix/suffix when printing 'Detaching...' messages. Print
6705 them when 'print_inferior_events' is on.
6706 * remote.c (remote_detach_1): Print message when detaching
6707 from inferior and '!is_fork_parent'.
6708
e427af18
TT
67092018-04-24 Tom Tromey <tom@tromey.com>
6710
6711 * cli-out.h: Reindent.
6712
05b1d8d6
TT
67132018-04-24 Tom Tromey <tom@tromey.com>
6714
6715 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
6716 (cli_ui_out::do_field_string): Use fputs_filtered.
6717 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
6718
a95c7dab
TT
67192018-04-23 Tom Tromey <tom@tromey.com>
6720
6721 * guile/scm-frame.c (gdbscm_frame_read_var): Use
6722 gdb::unique_xmalloc_ptr.
6723
458412c3
TT
67242018-04-23 Tom Tromey <tom@tromey.com>
6725
6726 * configure: Rebuild.
6727
db86b02b
RS
67282018-04-22 Rajendra SY <rajendra.sy@gmail.com>
6729
6730 PR gdb/23095
6731 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
6732 prepare_for_testing. Set normal_bp to r_debug_state if target
6733 is bsd.
6734
00aecdcf
PA
67352018-04-21 Pedro Alves <palves@redhat.com>
6736 Rajendra SY <rajendra.sy@gmail.com>
6737
6738 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
6739 * remote.c (extended_remote_attach): In all-stop mode, mark the
6740 thread as executing.
6741
224608c3
PW
67422018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6743
6744 * thread.c (thread_apply_all_command): Fix comment.
6745 (thread_command): Fix comment.
6746
3b74854b
AH
67472018-04-10 Alan Hayward <alan.hayward@arm.com>
6748
6749 * common/tdesc.h (tdesc_create_feature): Remove xml filename
6750 parameter.
6751 * features/aarch64-core.c (create_feature_aarch64_core):
6752 Regenerate.
6753 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
6754 Likewise.
6755 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
6756 Likewise.
6757 * features/i386/32bit-avx512.c
6758 (create_feature_i386_32bit_avx512): Likewise.
6759 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
6760 Likewise.
6761 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
6762 Likewise.
6763 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
6764 Likewise.
6765 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
6766 Likewise.
6767 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
6768 Likewise.
6769 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
6770 Likewise.
6771 * features/i386/64bit-avx512.c
6772 (create_feature_i386_64bit_avx512): Likewise.
6773 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
6774 Likewise.
6775 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
6776 Likewise.
6777 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
6778 Likewise.
6779 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
6780 Likewise.
6781 * features/i386/64bit-segments.c
6782 (create_feature_i386_64bit_segments): Likewise.
6783 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
6784 Likewise.
6785 * features/i386/x32-core.c
6786 (create_feature_i386_x32_core): Likewise.
6787 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
6788 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
6789 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
6790 * target-descriptions.c: In generated code, don't pass xml
6791 filename.
6792
e98577a9
AH
67932018-04-18 Alan Hayward <alan.hayward@arm.com>
6794
6795 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
6796 (print_xml_feature::visit_post): Likewise.
6797 (print_xml_feature::visit): Likewise.
6798 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
6799 (print_xml_feature): Add new class.
6800 * regformats/regdat.sh: Null xmltarget on feature targets.
6801 * target-descriptions.c (struct target_desc): Add xmltarget.
6802 (maintenance_check_tdesc_xml_convert): Add unittest function.
6803 (tdesc_get_features_xml): Add function to get xml.
6804 (maintenance_check_xml_descriptions): Test xml generation.
6805 * xml-tdesc.c (string_read_description_xml): Add function.
6806 * xml-tdesc.h (string_read_description_xml): Add declaration.
6807
ad7fc756
AH
68082018-04-18 Alan Hayward <alan.hayward@arm.com>
6809
6810 * features/Makefile: Add feature marker to targets with new style
6811 target descriptions.
6812 * regformats/aarch64.dat: Regenerate.
6813 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
6814 * regformats/i386/amd64-avx-linux.dat: Likewise.
6815 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
6816 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
6817 * regformats/i386/amd64-linux.dat: Likewise.
6818 * regformats/i386/amd64-mpx-linux.dat: Likewise.
6819 * regformats/i386/amd64.dat: Likewise.
6820 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
6821 * regformats/i386/i386-avx-linux.dat: Likewise.
6822 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
6823 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
6824 * regformats/i386/i386-linux.dat: Likewise.
6825 * regformats/i386/i386-mmx-linux.dat: Likewise.
6826 * regformats/i386/i386-mpx-linux.dat: Likewise.
6827 * regformats/i386/i386.dat: Likewise.
6828 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
6829 * regformats/i386/x32-avx-linux.dat: Likewise.
6830 * regformats/i386/x32-linux.dat: Likewise.
6831 * regformats/tic6x-c62x-linux.dat: Likewise.
6832 * regformats/tic6x-c64x-linux.dat: Likewise.
6833 * regformats/tic6x-c64xp-linux.dat: Likewise.
6834 * regformats/regdat.sh: Parse feature marker.
6835
d278f585
AH
68362018-04-18 Alan Hayward <alan.hayward@arm.com>
6837
6838 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
6839 (tdesc_osabi_name): Likewise.
6840 * target-descriptions.c (tdesc_architecture_name): Add new
6841 function.
6842 (tdesc_osabi_name): Likewise.
6843
eee8a18d
AH
68442018-04-18 Alan Hayward <alan.hayward@arm.com>
6845
6846 * common/tdesc.c (tdesc_predefined_type): Move to here.
6847 (tdesc_named_type): Likewise.
6848 (tdesc_create_vector): Likewise.
6849 (tdesc_create_struct): Likewise.
6850 (tdesc_set_struct_size): Likewise.
6851 (tdesc_create_union): Likewise.
6852 (tdesc_create_flags): Likewise.
6853 (tdesc_create_enum): Likewise.
6854 (tdesc_add_field): Likewise.
6855 (tdesc_add_typed_bitfield): Likewise.
6856 (tdesc_add_bitfield): Likewise.
6857 (tdesc_add_flag): Likewise.
6858 (tdesc_add_enum_value): Likewise.
6859 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
6860 (struct tdesc_type_vector): Likewise.
6861 (struct tdesc_type_field): Likewise.
6862 (struct tdesc_type_with_fields): Likewise.
6863 (tdesc_create_enum): Add declaration.
6864 (tdesc_add_typed_bitfield): Likewise.
6865 (tdesc_add_enum_value): Likewise.
6866 * target-descriptions.c (tdesc_type_field): Move from here.
6867 (tdesc_type_builtin): Likewise.
6868 (tdesc_type_vector): Likewise.
6869 (tdesc_type_with_fields): Likewise.
6870 (tdesc_predefined_types): Likewise.
6871 (tdesc_named_type): Likewise.
6872 (tdesc_create_vector): Likewise.
6873 (tdesc_create_struct): Likewise.
6874 (tdesc_set_struct_size): Likewise.
6875 (tdesc_create_union): Likewise.
6876 (tdesc_create_flags): Likewise.
6877 (tdesc_create_enum): Likewise.
6878 (tdesc_add_field): Likewise.
6879 (tdesc_add_typed_bitfield): Likewise.
6880 (tdesc_add_bitfield): Likewise.
6881 (tdesc_add_flag): Likewise.
6882 (tdesc_add_enum_value): Likewise.
6883 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
6884 (tdesc_add_typed_bitfield): Likewise.
6885 (tdesc_add_enum_value): Likewise.
6886
82ec9bc7
AH
68872018-04-18 Alan Hayward <alan.hayward@arm.com>
6888
6889 * common/tdesc.c (tdesc_feature::accept): Move to here.
6890 (tdesc_feature::operator==): Likewise.
6891 (tdesc_create_reg): Likewise.
6892 * common/tdesc.h (tdesc_type_kind): Likewise.
6893 (struct tdesc_type): Likewise.
6894 (struct tdesc_feature): Likewise.
6895 * regformats/regdat.sh: Create a feature.
6896 * target-descriptions.c (tdesc_type_kind): Move from here.
6897 (tdesc_type): Likewise.
6898 (tdesc_type_up): Likewise.
6899 (tdesc_feature): Likewise.
6900 (tdesc_create_reg): Likewise.
6901
ea3e7d71
AH
69022018-04-18 Alan Hayward <alan.hayward@arm.com>
6903
6904 * Makefile.in: Add arch/tdesc.c
6905 * common/tdesc.c: New file.
6906 * common/tdesc.h (tdesc_element_visitor): Move to here.
6907 (tdesc_element): Likewise.
6908 (tdesc_reg): Likewise.
6909 (tdesc_reg_up): Likewise.
6910 * regformats/regdef.h (reg): Add offset to constructors.
6911 * target-descriptions.c (tdesc_element_visitor): Move from here.
6912 (tdesc_element): Likewise.
6913 (tdesc_reg): Likewise.
6914 (tdesc_reg_up): Likewise.
6915
bedda9ac
TT
69162018-04-17 Tom Tromey <tom@tromey.com>
6917
6918 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
6919 discriminant field.
6920
a037790e
TT
69212018-04-17 Tom Tromey <tom@tromey.com>
6922
6923 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
6924
c7dcbf88
AA
69252018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
6926
6927 * symtab.c (print_symbol_info): Skip printing filename and line
6928 number when `last' is NULL.
6929 (symtab_symbol_info): Use empty string instead of NULL for first
6930 invocation of print_symbol_info.
6931 (rbreak_command): Pass NULL to `last' parameter of
6932 print_symbol_info.
6933
07d28c77
SM
69342018-04-16 Simon Marchi <simon.marchi@ericsson.com>
6935
6936 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
6937 instead of nullptr.
6938
8a3de5e1
PA
69392018-04-16 Pedro Alves <palves@redhat.com>
6940
6941 * MAINTAINERS (sh): Remove.
6942 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
6943 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
6944 (ALLDEPFILES): Remove sh64-tdep.c.
6945 * NEWS: Mentions that support for SH-5/SH64 is removed.
6946 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
6947 (sh*-*-openbsd*): Ditto.
6948 (sh64-*-elf*): Remove.
6949 (sh*): Remove.
6950 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
6951 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
6952 * sh-tdep.c: No longer include "sh64-tdep.h".
6953 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
6954 * sh64-tdep.c, sh64-tdep.h: Remove files.
6955
a2a79012
PA
69562018-04-16 Pedro Alves <palves@redhat.com>
6957
6958 * MAINTAINERS: Remove m88k.
6959 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
6960 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
6961 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
6962 * NEWS: Mention that support for m88k was removed.
6963 * configure.host (m88*-*-*): Remove support.
6964 * configure.nat (m88k-*-*): Remove support.
6965 * configure.tgt (m88*-*-openbsd*): Remove.
6966 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
6967
eda4efb1
SM
69682018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
6969
6970 * configure.tgt (x86_tobjs): New variable.
6971 (amd64_tobjs, i386_tobjs): Use it.
6972
b744723f
AA
69732018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6974
6975 * symtab.c (print_symbol_info): Precede the symbol definition by
6976 the line number when available.
6977 * NEWS: Advertise this enhancement.
6978
4a4495d6
MM
69792018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6980
6981 * NEWS (New options): announce set/show record btrace cpu.
6982 * btrace.c: Include record-btrace.h.
6983 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
6984 the vendor is unknown.
6985 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
6986 Maybe overwrite the btrace configuration's cpu.
6987 (btrace_compute_ftrace): Add cpu parameter. Update callers.
6988 (btrace_fetch): Add cpu parameter. Update callers.
6989 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
6990 Maybe overwrite the btrace configuration's cpu. Skip enabling
6991 errata workarounds if the vendor is unknown.
6992 * python/py-record-btrace.c: Include record-btrace.h.
6993 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
6994 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
6995 * record-btrace.c (record_btrace_cpu_state_kind): New.
6996 (record_btrace_cpu): New.
6997 (set_record_btrace_cpu_cmdlist): New.
6998 (record_btrace_get_cpu): New.
6999 (require_btrace_thread, record_btrace_info)
7000 (record_btrace_resume_thread): Call record_btrace_get_cpu.
7001 (cmd_set_record_btrace_cpu_none): New.
7002 (cmd_set_record_btrace_cpu_auto): New.
7003 (cmd_set_record_btrace_cpu): New.
7004 (cmd_show_record_btrace_cpu): New.
7005 (_initialize_record_btrace): Initialize set/show record btrace cpu
7006 commands.
7007 * record-btrace.h (record_btrace_get_cpu): New.
7008
69f90c75
MM
70092018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7010
7011 * record.c (set_record_command): Fix typo in message.
7012
b85310e1
MM
70132018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7014
7015 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
7016
1d509aa6
MM
70172018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7018
7019 * infrun.c (process_event_stop_test): Call
7020 gdbarch_in_indirect_branch_thunk.
7021 * gdbarch.sh (in_indirect_branch_thunk): New.
7022 * gdbarch.c: Regenerated.
7023 * gdbarch.h: Regenerated.
7024 * x86-tdep.h: New.
7025 * x86-tdep.c: New.
7026 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
7027 (HFILES_NO_SRCDIR): Add x86-tdep.h.
7028 (ALLDEPFILES): Add x86-tdep.c.
7029 * arch-utils.h (default_in_indirect_branch_thunk): New.
7030 * arch-utils.c (default_in_indirect_branch_thunk): New.
7031 * i386-tdep: Include x86-tdep.h.
7032 (i386_in_indirect_branch_thunk): New.
7033 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
7034 function.
7035 * amd64-tdep: Include x86-tdep.h.
7036 (amd64_in_indirect_branch_thunk): New.
7037 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
7038
b4be9bfd
JK
70392018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
7040
7041 PR gdb/23053
7042 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
7043 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
7044 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
7045 regression.
7046
53d7df28
TT
70472018-04-12 Tom Tromey <tom@tromey.com>
7048
7049 * rust-lang.c (rust_print_struct_def): Remove univariant code.
7050 (rust_evaluate_subexp): Likewise.
7051
70b33f19
PA
70522018-04-12 Pedro Alves <palves@redhat.com>
7053
7054 * procfs.c (procfs_detach): Make forward declaration's prototype
7055 match definition's protototype.
7056 (proc_get_LDT_entry): Remove stale do_cleanups call.
7057
436411b1
PA
70582018-04-12 Pedro Alves <palves@redhat.com>
7059
7060 * target.h (target_ops::to_has_exited): Delete.
7061 (target_has_exited): Delete.
7062 * target-delegates.c: Regenerate.
7063
20db9c52
PA
70642018-04-11 Pedro Alves <palves@redhat.com>
7065
7066 * target.c (fileio_fh_t::t): Add comment.
7067 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7068 (target_fileio_close): Handle a NULL target.
7069 (invalidate_fileio_fh): New.
7070 (target_close): Call it.
7071 * remote.c (remote_hostio_send_command): No longer check whether
7072 remote_desc is open.
7073
5ff79300
PA
70742018-04-11 Pedro Alves <palves@redhat.com>
7075
7076 * target.c (fileio_fh_t): Make it a named struct instead of a
7077 typedef.
7078 (fileio_fh_t::is_closed): New method.
7079 (DEF_VEC_O (fileio_fh_t)): Remove.
7080 (fileio_fhandles): Now a std::vector.
7081 (is_closed_fileio_fh): Delete.
7082 (acquire_fileio_fd): Adjust. Rename parameters.
7083 (release_fileio_fd): Adjust.
7084 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
7085 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7086 (target_fileio_close): Adjust.
7087
6e22e10d
SM
70882018-04-10 Simon Marchi <simon.marchi@ericsson.com>
7089
7090 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
7091 index.
7092
731f534f
PA
70932018-04-10 Pedro Alves <palves@redhat.com>
7094
7095 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
7096 (scoped_finish_thread_state): New class.
7097 * infcmd.c (run_command_1): Use it instead of finish_thread_state
7098 cleanup.
7099 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
7100 (fetch_inferior_event, normal_stop): Likewise.
7101 * thread.c (finish_thread_state_cleanup): Delete.
7102
d5f4488f
SM
71032018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7104 Pedro Alves <palves@redhat.com>
7105
7106 * value.c: Include "selftest.h" and "common/array-view.h".
7107 (struct range) <operator ==>: New.
7108 (test_ranges_contain): New.
7109 (check_ranges_vector): New.
7110 (test_insert_into_bit_range_vector): New.
7111 (_initialize_values): Register selftests.
7112 * common/array-view.h (operator==, operator!=): New.
7113
b24531ed
SM
71142018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7115
7116 * common/gdb_vecs.h (unordered_remove): Add overload that takes
7117 an iterator.
7118 * inline-frame.c: Include <algorithm>.
7119 (struct inline_state): Add constructor.
7120 (inline_state_s): Remove.
7121 (DEF_VEC_O(inline_state_s)): Remove.
7122 (inline_states): Change type to std::vector.
7123 (find_inline_frame_state): Adjust to std::vector.
7124 (allocate_inline_frame_state): Remove.
7125 (clear_inline_frame_state): Adjust to std::vector.
7126 (skip_inline_frames): Adjust to std::vector.
7127
c252925c
SM
71282018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7129
7130 * tracepoint.h (struct trace_state_variable): Add constructor.
7131 <name>: Change type to std::string.
7132 * tracepoint.c (tsv_s): Remove.
7133 (DEF_VEC_O(tsv_s)): Remove.
7134 (tvariables): Change to std::vector.
7135 (create_trace_state_variable): Adjust to std::vector.
7136 (find_trace_state_variable): Likewise.
7137 (find_trace_state_variable_by_number): Likewise.
7138 (delete_trace_state_variable): Likewise.
7139 (trace_variable_command): Adjust to std::string.
7140 (delete_trace_variable_command): Likewise.
7141 (tvariables_info_1): Adjust to std::vector.
7142 (save_trace_state_variables): Likewise.
7143 (start_tracing): Likewise.
7144 (merge_uploaded_trace_state_variables): Adjust to std::vector
7145 and std::string.
7146 * target.h (struct target_ops)
7147 <to_download_trace_state_variable>: Pass reference to
7148 trace_state_variable.
7149 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
7150 * target-delegates.c: Re-generate.
7151 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
7152 (mi_tsv_deleted): Likewise.
7153 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
7154 * remote.c (remote_download_trace_state_variable): Change
7155 pointer to reference and adjust.
7156 * make-target-delegates (parse_argtypes): Handle references.
7157 (write_function_header): Likewise.
7158 (munge_type): Likewise.
7159
c9638d26
SM
71602018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7161
7162 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7163 string_view-selftests.c.
7164 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
7165 testsuite.
7166 * unittests/basic_string_view/cons/char/1.cc: Likewise.
7167 * unittests/basic_string_view/cons/char/2.cc: Likewise.
7168 * unittests/basic_string_view/cons/char/3.cc: Likewise.
7169 * unittests/basic_string_view/element_access/char/1.cc:
7170 Likewise.
7171 * unittests/basic_string_view/element_access/char/empty.cc:
7172 Likewise.
7173 * unittests/basic_string_view/element_access/char/front_back.cc:
7174 Likewise.
7175 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
7176 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
7177 Likewise.
7178 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
7179 Likewise.
7180 * unittests/basic_string_view/modifiers/swap/char/1.cc:
7181 Likewise.
7182 * unittests/basic_string_view/operations/compare/char/1.cc:
7183 Likewise.
7184 * unittests/basic_string_view/operations/compare/char/13650.cc:
7185 Likewise.
7186 * unittests/basic_string_view/operations/copy/char/1.cc:
7187 Likewise.
7188 * unittests/basic_string_view/operations/data/char/1.cc:
7189 Likewise.
7190 * unittests/basic_string_view/operations/find/char/1.cc:
7191 Likewise.
7192 * unittests/basic_string_view/operations/find/char/2.cc:
7193 Likewise.
7194 * unittests/basic_string_view/operations/find/char/3.cc:
7195 Likewise.
7196 * unittests/basic_string_view/operations/find/char/4.cc:
7197 Likewise.
7198 * unittests/basic_string_view/operations/rfind/char/1.cc:
7199 Likewise.
7200 * unittests/basic_string_view/operations/rfind/char/2.cc:
7201 Likewise.
7202 * unittests/basic_string_view/operations/rfind/char/3.cc:
7203 Likewise.
7204 * unittests/basic_string_view/operations/substr/char/1.cc:
7205 Likewise.
7206 * unittests/basic_string_view/operators/char/2.cc: Likewise.
7207 * unittests/string_view-selftests.c: New file.
7208
fdc11678
SM
72092018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7210
7211 * unittests/basic_string_view/capacity/1.cc: New file.
7212 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
7213 * unittests/basic_string_view/cons/char/1.cc: New file.
7214 * unittests/basic_string_view/cons/char/2.cc: New file.
7215 * unittests/basic_string_view/cons/char/3.cc: New file.
7216 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
7217 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
7218 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
7219 * unittests/basic_string_view/element_access/char/1.cc: New file.
7220 * unittests/basic_string_view/element_access/char/2.cc: New file.
7221 * unittests/basic_string_view/element_access/char/empty.cc: New file.
7222 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
7223 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
7224 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
7225 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
7226 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
7227 * unittests/basic_string_view/include.cc: New file.
7228 * unittests/basic_string_view/inserters/char/1.cc: New file.
7229 * unittests/basic_string_view/inserters/char/2.cc: New file.
7230 * unittests/basic_string_view/inserters/char/3.cc: New file.
7231 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
7232 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
7233 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
7234 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
7235 * unittests/basic_string_view/literals/types.cc: New file.
7236 * unittests/basic_string_view/literals/values.cc: New file.
7237 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
7238 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
7239 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
7240 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
7241 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
7242 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
7243 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
7244 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
7245 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
7246 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
7247 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
7248 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
7249 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
7250 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
7251 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
7252 * unittests/basic_string_view/operations/data/char/1.cc: New file.
7253 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
7254 * unittests/basic_string_view/operations/find/char/1.cc: New file.
7255 * unittests/basic_string_view/operations/find/char/2.cc: New file.
7256 * unittests/basic_string_view/operations/find/char/3.cc: New file.
7257 * unittests/basic_string_view/operations/find/char/4.cc: New file.
7258 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
7259 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
7260 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
7261 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
7262 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
7263 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
7264 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
7265 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
7266 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
7267 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
7268 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
7269 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
7270 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
7271 * unittests/basic_string_view/operators/char/2.cc: New file.
7272 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
7273 * unittests/basic_string_view/range_access/char/1.cc: New file.
7274 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
7275 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
7276 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
7277 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
7278 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
7279 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
7280 * unittests/basic_string_view/requirements/typedefs.cc: New file.
7281 * unittests/basic_string_view/typedefs.cc: New file.
7282 * unittests/basic_string_view/types/1.cc: New file.
7283
8345c4a2
SM
72842018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7285
7286 * common/gdb_string_view.h: Remove libstdc++ implementation
7287 details, adjust to gdb reality.
7288 * common/gdb_string_view.tcc: Likewise.
7289 * cli/cli-script.c (struct string_view): Remove.
7290 (user_args) <m_args>: Change element type to gdb::string_view.
7291 (user_args::insert_args): Adjust.
7292
7adcdf08
SM
72932018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7294
7295 * common/gdb_string_view.h: New file.
7296 * common/gdb_string_view.tcc: New file.
7297
41260ac2
SM
72982018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7299
7300 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
7301 * configure: Re-generate.
7302
0bee6dd4
PA
73032018-04-09 Pedro Alves <palves@redhat.com>
7304
7305 * gdbarch.sh: Include "observable.h" instead of "observer.h".
7306 (set_target_gdbarch): Call
7307 gdb::observers::architecture_changed.notify instead of
7308 observer_notify_architecture_changed.
7309
6f14adc5
SM
73102018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7311
7312 * tracepoint.c (struct current_traceframe_cleanup): Remove.
7313 (do_restore_current_traceframe_cleanup): Remove.
7314 (restore_current_traceframe_cleanup_dtor): Remove.
7315 (make_cleanup_restore_current_traceframe): Remove.
7316 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
7317 New.
7318 * tracepoint.h (struct scoped_restore_current_traceframe): New.
7319 * infrun.c (fetch_inferior_event): Use
7320 scoped_restore_current_traceframe.
7321
b2bdb8cf
SM
73222018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7323
7324 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
7325 Remove.
7326 <n_allocated_type_units>: Remove.
7327 <all_type_units>: Change to std::vector.
7328 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7329 to std::vector change.
7330 (dwarf2_per_objfile::get_cutu): Likewise.
7331 (dwarf2_per_objfile::get_tu): Likewise.
7332 (create_signatured_type_table_from_index): Likewise.
7333 (create_signatured_type_table_from_debug_names): Likewise.
7334 (dw2_symtab_iter_next): Likewise.
7335 (dw2_print_stats): Likewise.
7336 (dw2_expand_all_symtabs): Likewise.
7337 (dw2_expand_marked_cus): Likewise.
7338 (dw2_debug_names_iterator::next): Likewise.
7339 (dwarf2_initialize_objfile): Likewise.
7340 (add_signatured_type_cu_to_table): Likewise.
7341 (create_all_type_units): Likewise.
7342 (add_type_unit): Likewise.
7343 (struct tu_abbrev_offset): Add constructor.
7344 (build_type_psymtabs_1): Adjust to std::vector change.
7345 (print_tu_stats): Likewise.
7346 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7347 (write_debug_names): Likewise.
7348
b76e467d
SM
73492018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7350
7351 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
7352 Make an std::vector.
7353 <n_comp_units>: Remove.
7354 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7355 to std::vector change.
7356 (dwarf2_per_objfile::get_cutu): Likewise.
7357 (dwarf2_per_objfile::get_cu): Likewise.
7358 (create_cus_from_index): Likewise.
7359 (create_addrmap_from_index): Likewise.
7360 (create_addrmap_from_aranges): Likewise.
7361 (dwarf2_read_index): Likewise.
7362 (dw2_find_last_source_symtab): Likewise.
7363 (dw2_map_symtabs_matching_filename): Likewise.
7364 (dw2_symtab_iter_next): Likewise.
7365 (dw2_print_stats): Likewise.
7366 (dw2_expand_all_symtabs): Likewise.
7367 (dw2_expand_symtabs_with_fullname): Likewise.
7368 (dw2_expand_marked_cus): Likewise.
7369 (dw2_map_symbol_filenames): Likewise.
7370 (create_cus_from_debug_names): Likewise.
7371 (dwarf2_read_debug_names): Likewise.
7372 (dw2_debug_names_iterator::next): Likewise.
7373 (dwarf2_initialize_objfile): Likewise.
7374 (set_partial_user): Likewise.
7375 (dwarf2_build_psymtabs_hard): Likewise.
7376 (read_comp_units_from_section): Remove arguments, adjust to
7377 std::vector change.
7378 (create_all_comp_units): Adjust to std::vector and
7379 read_comp_units_from_section changes.
7380 (dwarf2_find_containing_comp_unit): Adjust to std::vector
7381 change.
7382 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7383 (psyms_seen_size): Likewise.
7384 (write_gdbindex): Likewise.
7385 (write_debug_names): Likewise.
7386
12359b5e
SM
73872018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7388
7389 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
7390 with dwarf2_per_objfile.
7391 (create_cus_from_index): Likewise.
7392 (create_signatured_type_table_from_index): Likewise.
7393 (dwarf2_read_index): Likewise.
7394 (dwarf2_initialize_objfile): Likewise.
7395 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
7396 per_cu rather than get_dwarf2_per_objfile.
7397
ff4c9fec
SM
73982018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7399
7400 * dwarf2read.h (struct signatured_type): Forward declare.
7401 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
7402 New methods.
7403 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
7404 (dw2_get_cutu): ...this.
7405 (dwarf2_per_objfile::get_cu): Rename from...
7406 (dw2_get_cu): ...this.
7407 (dwarf2_per_objfile::get_tu): New.
7408 (create_addrmap_from_index): Adjust.
7409 (create_addrmap_from_aranges): Adjust.
7410 (dw2_find_last_source_symtab): Adjust.
7411 (dw2_map_symtabs_matching_filename): Adjust.
7412 (dw2_symtab_iter_next): Adjust.
7413 (dw2_print_stats): Adjust.
7414 (dw2_expand_all_symtabs): Adjust.
7415 (dw2_expand_symtabs_with_fullname): Adjust.
7416 (dw2_expand_marked_cus): Adjust.
7417 (dw_expand_symtabs_matching_file_matcher): Adjust.
7418 (dw2_map_symbol_filenames): Adjust.
7419 (dw2_debug_names_iterator::next): Adjust.
7420 (dwarf2_initialize_objfile): Adjust.
7421 (set_partial_user): Adjust.
7422 (dwarf2_build_psymtabs_hard): Adjust.
7423
5ca3fcb6
SM
74242018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7425
7426 * dwarf2read.c (create_signatured_type_table_from_debug_names):
7427 Remove unused variables.
7428 (dw2_map_symtabs_matching_filename): Likewise.
7429 (dwarf2_record_block_ranges): Likewise.
7430 (dwarf2_read_addr_index): Likewise.
7431 (follow_die_offset): Likewise.
7432
b2e586e8
SM
74332018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7434
7435 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
7436 to symbol_file_add_main.
7437
7c4e78cf
SM
74382018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7439
7440 PR mi/22299
7441 * mi/mi-console.c (do_fputc_async_safe): New.
7442 (mi_console_file::write_async_safe): New.
7443 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
7444 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
7445 New.
7446 * ui-file.c (ui_file::putstrn): Adjust call to
7447 fputstrn_unfiltered.
7448 * utils.c (printchar): Replace do_fputs and do_fprintf
7449 parameters by do_fputc.
7450 (fputstr_filtered): Adjust call to printchar.
7451 (fputstr_unfiltered): Likewise.
7452 (fputstrn_filtered): Likewise.
7453 (fputstrn_unfiltered): Add do_fputc parameter, pass to
7454 printchar.
7455 * utils.h (do_fputc_ftype): New typedef.
7456 (fputstrn_unfiltered): Add do_fputc parameter.
7457
5dc026d3
SM
74582018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7459
7460 * regformats/i386/i386-avx.dat: Remove.
7461
c912f608
SM
74622018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7463
7464 PR gdb/22979
7465 * amd64-tdep.c (amd64_none_init_abi): New function.
7466 (amd64_x32_none_init_abi): New function.
7467 (_initialize_amd64_tdep): Register handlers for x86-64 and
7468 x64_32 with GDB_OSABI_NONE.
7469 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
7470 GDB_OSABI_NONE osabi.
7471
26540402
SM
74722018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7473
7474 PR gdb/22980
7475 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
7476 GDB_OSABI_NONE.
7477 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
7478 * osabi.c (gdb_osabi_names): Add "unknown" entry.
7479
9018be22
SM
74802018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7481
7482 * common/byte-vector.h (char_vector): New type.
7483 * target.h (target_read_alloc): Return
7484 gdb::optional<byte_vector>.
7485 (target_read_stralloc): Return gdb::optional<char_vector>.
7486 (target_get_osdata): Return gdb::optional<char_vector>.
7487 * target.c (target_read_alloc_1): Templatize. Replacement
7488 manual memory management with vector.
7489 (target_read_alloc): Change return type, adjust.
7490 (target_read_stralloc): Change return type, adjust.
7491 (target_get_osdata): Change return type, adjust.
7492 * auxv.c (struct auxv_info) <length>: Remove.
7493 <data>: Change type to gdb::optional<byte_vector>.
7494 (auxv_inferior_data_cleanup): Free auxv_info with delete.
7495 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
7496 (target_auxv_search): Adjust.
7497 (fprint_target_auxv): Adjust.
7498 * avr-tdep.c (avr_io_reg_read_command): Adjust.
7499 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
7500 (linux_make_corefile_notes): Adjust.
7501 * osdata.c (get_osdata): Adjust.
7502 * remote.c (remote_get_threads_with_qxfer): Adjust.
7503 (remote_memory_map): Adjust.
7504 (remote_traceframe_info): Adjust.
7505 (btrace_read_config): Adjust.
7506 (remote_read_btrace): Adjust.
7507 (remote_pid_to_exec_file): Adjust.
7508 * solib-aix.c (solib_aix_get_library_list): Adjust.
7509 * solib-dsbt.c (decode_loadmap): Don't free buf.
7510 (dsbt_get_initial_loadmaps): Adjust.
7511 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
7512 * solib-target.c (solib_target_current_sos): Adjust.
7513 * tracepoint.c (sdata_make_value): Adjust.
7514 * xml-support.c (xinclude_start_include): Adjust.
7515 (xml_fetch_content_from_file): Adjust.
7516 * xml-support.h (xml_fetch_another): Change return type.
7517 (xml_fetch_content_from_file): Change return type.
7518 * xml-syscall.c (xml_init_syscalls_info): Adjust.
7519 * xml-tdesc.c (file_read_description_xml): Adjust.
7520 (fetch_available_features_from_target): Change return type.
7521 (target_fetch_description_xml): Adjust.
7522 (target_read_description_xml): Adjust.
7523
14c88955
TT
75242018-04-06 Tom Tromey <tom@tromey.com>
7525
7526 * value.c (~value): Update.
7527 (struct value) <contents>: Now unique_xmalloc_ptr.
7528 (value_contents_bits_eq, allocate_value_contents)
7529 (value_contents_raw, value_contents_all_raw)
7530 (value_contents_for_printing, value_contents_for_printing_const)
7531 (set_value_enclosing_type): Update.
7532
0c7e6dd8
TT
75332018-04-06 Tom Tromey <tom@tromey.com>
7534
7535 * value.c (range_s): Remove typedef, VEC.
7536 (struct range): Add operator<.
7537 (range_lessthan): Remove.
7538 (ranges_contain): Change type.
7539 (~value): Update.
7540 (struct value) <unavailable, optimized_out>: Now std::vector.
7541 (value_entirely_available)
7542 (value_entirely_covered_by_range_vector)
7543 (value_entirely_unavailable, value_entirely_optimized_out):
7544 Update.
7545 (insert_into_bit_range_vector): Change argument type.
7546 (find_first_range_overlap): Likewise.
7547 (struct ranges_and_idx, value_contents_bits_eq)
7548 (require_not_optimized_out, require_available): Update.
7549 (ranges_copy_adjusted): Change argument types.
7550 (value_optimized_out, value_copy, value_fetch_lazy): Update.
7551
2c8331b9
TT
75522018-04-06 Tom Tromey <tom@tromey.com>
7553
7554 * value.c (~value): Update.
7555 (struct value) <parent>: Now a value_ref_ptr.
7556 (value_parent, set_value_parent, value_address, value_copy):
7557 Update.
7558
466ce3ae
TT
75592018-04-06 Tom Tromey <tom@tromey.com>
7560
7561 * value.c (struct value): Add constructor, destructor, and member
7562 initializers.
7563 (allocate_value_lazy, value_decref): Update.
7564
062d818d
TT
75652018-04-06 Tom Tromey <tom@tromey.com>
7566
7567 * value.c (struct value) <released, next>: Remove.
7568 (all_values): Now a std::vector.
7569 (allocate_value_lazy): Update.
7570 (value_next): Remove.
7571 (value_mark, value_free_to_mark, release_value)
7572 (value_release_to_mark): Update.
7573
a6535de1
TT
75742018-04-06 Tom Tromey <tom@tromey.com>
7575
7576 * value.h (fetch_subexp_value, value_release_to_mark): Update.
7577 (free_value_chain): Remove.
7578 * value.c (free_value_chain): Remove.
7579 (value_release_to_mark): Return a std::vector.
7580 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
7581 std::vector.
7582 (check_condition): Update.
7583 * eval.c (fetch_subexp_value): Change "val_chain" to a
7584 std::vector.
7585 * breakpoint.c (update_watchpoint): Update.
7586 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
7587
b5621201
TT
75882018-04-06 Tom Tromey <tom@tromey.com>
7589
7590 * value.h (free_all_values): Remove.
7591 * value.c (free_all_values): Remove.
7592
4d0266a0
TT
75932018-04-06 Tom Tromey <tom@tromey.com>
7594
7595 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
7596 (value_history_chain, value_history_count): Remove.
7597 (value_history): New global.
7598 (record_latest_value, access_value_history, show_values)
7599 (preserve_values): Update.
7600
b4d61099
TT
76012018-04-06 Tom Tromey <tom@tromey.com>
7602
7603 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
7604 * varobj.c (varobj_set_display_format, varobj_set_value)
7605 (install_default_visualizer, construct_visualizer)
7606 (install_new_value, ~varobj, varobj_get_value_type)
7607 (my_value_of_variable, varobj_editable_p): Update.
7608 * c-varobj.c (c_describe_child, c_value_of_variable)
7609 (cplus_number_of_children, cplus_describe_child): Update.
7610 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
7611 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
7612 (ada_value_of_variable, ada_value_is_changeable_p): Update.
7613
9b558729
TT
76142018-04-06 Tom Tromey <tom@tromey.com>
7615
7616 * printcmd.c (last_examine_address): Change type to
7617 value_ref_ptr.
7618 (do_examine, x_command): Update.
7619
850645cf
TT
76202018-04-06 Tom Tromey <tom@tromey.com>
7621
7622 * value.c (release_value): Update.
7623 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
7624 (struct bpstats) <val>: Now a value_ref_ptr.
7625 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7626 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7627 (~watchpoint, print_it_watchpoint, watch_command_1)
7628 (invalidate_bp_value_on_memory_change): Update.
7629
22bc8444
TT
76302018-04-06 Tom Tromey <tom@tromey.com>
7631
7632 * varobj.c (varobj_clear_saved_item)
7633 (update_dynamic_varobj_children, install_new_value, ~varobj):
7634 Update.
7635 * value.h (value_incref): Move declaration earlier.
7636 (value_decref): Rename from value_free.
7637 (struct value_ref_policy): New.
7638 (value_ref_ptr): New typedef.
7639 (struct value_deleter): Remove.
7640 (gdb_value_up): Remove typedef.
7641 (release_value): Change return type.
7642 (release_value_or_incref): Remove.
7643 * value.c (set_value_parent): Update.
7644 (value_incref): Change return type.
7645 (value_decref): Rename from value_free.
7646 (value_free_to_mark, free_all_values, free_value_chain): Update.
7647 (release_value): Return value_ref_ptr.
7648 (release_value_or_incref): Remove.
7649 (record_latest_value, set_internalvar, clear_internalvar):
7650 Update.
7651 * stack.c (info_frame_command): Don't call value_free.
7652 * python/py-value.c (valpy_dealloc, valpy_new)
7653 (value_to_value_object): Update.
7654 * printcmd.c (do_examine): Update.
7655 * opencl-lang.c (lval_func_free_closure): Update.
7656 * mi/mi-main.c (register_changed_p): Don't call value_free.
7657 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
7658 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
7659 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
7660 value_free.
7661 * guile/scm-value.c (vlscm_free_value_smob)
7662 (vlscm_scm_from_value): Update.
7663 * frame.c (frame_register_unwind, frame_unwind_register_signed)
7664 (frame_unwind_register_unsigned, get_frame_register_bytes)
7665 (put_frame_register_bytes): Don't call value_free.
7666 * findvar.c (address_from_register): Don't call value_free.
7667 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
7668 * dwarf2loc.c (entry_data_value_free_closure)
7669 (value_of_dwarf_reg_entry, free_pieced_value_closure)
7670 (dwarf2_evaluate_loc_desc_full): Update.
7671 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7672 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7673 (~watchpoint, watch_command_1)
7674 (invalidate_bp_value_on_memory_change): Update.
7675 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
7676
7f8a5d38
SM
76772018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
7678
7679 PR gdb/23022
7680 * warning.m4: Add -Wno-error=deprecated-register.
7681 * configure: Re-generate.
7682
8a76bd3b
TT
76832018-04-05 Tom Tromey <tom@tromey.com>
7684
7685 * linespec.h: Remove include of "vec.h".
7686
8e8d776e
TT
76872018-04-05 Tom Tromey <tom@tromey.com>
7688
7689 * linespec.c (typep): Remove typedef.
7690 (find_methods, find_superclass_methods): Take a std::vector.
7691 (find_method): Use std::vector.
7692
9b2f8581
TT
76932018-04-05 Tom Tromey <tom@tromey.com>
7694
7695 * utils.c (compare_strings): Remove.
7696 * utils.h (compare_strings): Remove.
7697 * objc-lang.h (find_imps): Update.
7698 * objc-lang.c (find_methods): Take a std::vector.
7699 (uniquify_strings, find_imps): Likewise.
7700 * linespec.c (find_methods): Take a std::vector.
7701 (decode_objc): Use std::vector.
7702 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
7703 a std::vector.
7704 (find_method, find_function_symbols): Use std::vector.
7705
459a2e4c
TT
77062018-04-05 Tom Tromey <tom@tromey.com>
7707
7708 * completer.c (completion_tracker::completion_tracker): Remove
7709 cast.
7710 (completion_tracker::discard_completions): Likewise.
7711 * breakpoint.c (ambiguous_names_p): Remove cast.
7712 * ada-lang.c (_initialize_ada_language): Remove cast.
7713 * utils.h (streq): Update.
7714 (streq_hash): Add new declaration.
7715 * utils.c (streq): Return bool.
7716 (streq_hash): New function.
7717
9be2c17a
TT
77182018-04-05 Tom Tromey <tom@tromey.com>
7719
7720 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
7721 Remove a string copy.
7722
f73c6ece
TT
77232018-04-05 Tom Tromey <tom@tromey.com>
7724
7725 * linespec.c (filter_results): Use std::vector.
7726 (decode_line_2, decode_line_full): Update.
7727
53a0f8a2
TT
77282018-04-05 Tom Tromey <tom@tromey.com>
7729
7730 * linespec.c (canonical_to_fullform): Return std::string.
7731 (filter_results): Update.
7732 (struct decode_line_2_item): Add constructor.
7733 <fullform, displayform>: Now std::string.
7734 (decode_line_2_compare_items): Now a std::sort comparator.
7735 (decode_line_2): Update.
7736
a5b5adf5
TT
77372018-04-05 Tom Tromey <tom@tromey.com>
7738
7739 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
7740 (unexpected_linespec_error): Update.
7741 (linespec_parse_basic, parse_linespec): Update.
7742
6a307fc5
TT
77432018-04-05 Tom Tromey <tom@tromey.com>
7744
7745 * linespec.c (linespec_parse_basic): Reindent.
7746
41c1efc6
TT
77472018-04-05 Tom Tromey <tom@tromey.com>
7748
7749 * minsyms.h (iterate_over_minimal_symbols): Update.
7750 * minsyms.c (iterate_over_minimal_symbols): Take a
7751 gdb::function_view.
7752 * linespec.c (struct collect_minsyms): Remove.
7753 (compare_msyms): Now a std::sort comparator.
7754 (add_minsym): Add parameters.
7755 (search_minsyms_for_name): Update. Use std::vector.
7756
c5edbf3d
TT
77572018-04-03 Tom Tromey <tom@tromey.com>
7758
7759 * mipsread.c (read_alphacoff_dynamic_symtab): Use
7760 gdb::byte_vector.
7761
b39efc48
WP
77622018-04-02 Weimin Pan <weimin.pan@oracle.com>
7763
7764 * MAINTAINERS (Write After Approval): Add Weimin Pan.
7765
121ad66c 77662018-04-02 Weimin Pan <weimin.pan@oracle.com>
79f18731
WP
7767
7768 PR gdb/16959
7769 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
7770 printing static type.
7771
09473be8
TT
77722018-04-01 Tom Tromey <tom@tromey.com>
7773
7774 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
7775 (rs6000_xfer_shared_libraries): Update.
7776
ec1f2d91
SM
77772018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
7778
7779 * common/gdb_vecs.h (char_ptr): Remove.
7780 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
7781
d8611974
SM
77822018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
7783
7784 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
7785 with std::vector.
7786 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
7787
a18ba4e4
SM
77882018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
7789
7790 * tracepoint.h (struct uploaded_tp): Initialize fields.
7791 <actions, step_actions, cmd_strings>: Change type to
7792 std::vector<char *>.
7793 * tracepoint.c (get_uploaded_tp): Allocate with new.
7794 (free_uploaded_tps): Free with delete.
7795 (parse_tracepoint_definition): Adjust to std::vector change.
7796 * breakpoint.c (read_uploaded_action): Likewise.
7797 (create_tracepoint_from_upload): Likewise.
7798 * ctf.c (ctf_write_uploaded_tp): Likewise.
7799 (SET_ARRAY_FIELD): Likewise.
7800 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
7801
a7961323
TT
78022018-03-30 Tom Tromey <tom@tromey.com>
7803
7804 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
7805 std::unique_ptr.
7806 (svr4_keep_data_in_core): Update.
7807 (svr4_read_so_list): Update.
7808
e83e4e24
TT
78092018-03-30 Tom Tromey <tom@tromey.com>
7810
7811 * windows-nat.c (handle_output_debug_string, handle_exception):
7812 Update.
7813 * target.h (target_read_string): Update.
7814 * target.c (target_read_string): Change "string" to
7815 unique_xmalloc_ptr.
7816 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
7817 Update.
7818 * solib-frv.c (frv_current_sos): Update.
7819 * solib-dsbt.c (dsbt_current_sos): Update.
7820 * solib-darwin.c (darwin_current_sos): Update.
7821 * linux-thread-db.c (inferior_has_bug): Update.
7822 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
7823 Update. Remove alloca.
7824 * ada-lang.c (ada_main_name): Update.
7825
263db9a1
TT
78262018-03-30 Tom Tromey <tom@tromey.com>
7827
7828 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
7829 (struct dwo_file_deleter): New.
7830 (dwo_file_up): New typedef.
7831 (open_and_init_dwo_file): Use dwo_file_up.
7832 (free_dwo_file_cleanup): Remove.
7833
5dafb3d1
TT
78342018-03-30 Tom Tromey <tom@tromey.com>
7835
7836 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
7837 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
7838
11ed8cad
TT
78392018-03-30 Tom Tromey <tom@tromey.com>
7840
7841 * dwarf2read.c (class free_cached_comp_units): New class.
7842 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
7843 (free_cached_comp_units): Remove function.
7844
9ae79dac
TT
78452018-03-30 Tom Tromey <tom@tromey.com>
7846
7847 * utils.h (make_cleanup_unpush_target): Remove.
7848 * inf-ptrace.c (struct target_unpusher): New.
7849 (target_unpush_up) New typedef.
7850 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
7851 target_unpush_up.
7852 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
7853
5aa89276
TT
78542018-03-27 Tom Tromey <tom@tromey.com>
7855
7856 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
7857
1dbeed45
TT
78582018-03-27 Pedro Alves <palves@redhat.com>
7859 Tom Tromey <tom@tromey.com>
7860
7861 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
7862 destructor. Now a class.
7863 (gdb_readline_wrapper_cleanup): Remove function.
7864 (gdb_readline_wrapper): Remove cleanups.
7865
c819b2c0
TT
78662018-03-27 Tom Tromey <tom@tromey.com>
7867
7868 * typeprint.h (struct type_print_options) <local_typedefs,
7869 global_typedefs>: Remove "struct" keyword.
7870 (class typedef_hash_table): New class.
7871 (recursively_update_typedef_hash, add_template_parameters)
7872 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
7873 (find_typedef_in_hash): Don't declare.
7874 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
7875 (typedef_hash_table::recursively_update): Rename from
7876 recursively_update_typedef_hash. Now a member.
7877 (typedef_hash_table::add_template_parameters): Rename from
7878 add_template_parameters. Now a member.
7879 (typedef_hash_table::typedef_hash_table): Now a constructor;
7880 rename from create_typedef_hash.
7881 (typedef_hash_table::~typedef_hash_table): Now a destructor;
7882 rename from free_typedef_hash.
7883 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
7884 (do_free_global_table): Remove.
7885 (typedef_hash_table::typedef_hash_table): New constructor; renamed
7886 from copy_type_recursive.
7887 (create_global_typedef_table): Remove.
7888 (typedef_hash_table::find_global_typedef): Now a member of
7889 typedef_hash_table.
7890 (typedef_hash_table::find_typedef): Rename from
7891 find_typedef_in_hash; now a member.
7892 (whatis_exp): Update.
7893 * extension.h (struct ext_lang_type_printers): Add constructor and
7894 destructor.
7895 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
7896 declare.
7897 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
7898 Now a constructor; rename from start_ext_lang_type_printers.
7899 (ext_lang_type_printers): Now a destructor; rename from
7900 free_ext_lang_type_printers.
7901 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
7902 Update.
7903 (c_type_print_base_struct_union): Update. Remove cleanups.
7904
608219fb
TT
79052018-03-27 Tom Tromey <tom@tromey.com>
7906
7907 * dwarf-index-write.c: Include <cmath>.
7908
3fcded8f
JB
79092018-03-27 Joel Brobecker <brobecker@adacore.com>
7910
7911 * NEWS: Add entry describing new "set|show varsize-limit" command.
7912 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
7913 command.
7914 * printcmd.c (_initialize_printcmd): Add "set var" alias of
7915 "set variable".
7916
cd4fb1b2
SM
79172018-03-27 Simon Marchi <simon.marchi@ericsson.com>
7918
7919 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
7920 dwarf-index-write.c
7921 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
7922 * dwarf-index-common.c: New file.
7923 * dwarf-index-common.h: New file.
7924 * dwarf-index-write.c: New file.
7925 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
7926 (struct dwarf2_section_info): Move from here.
7927 (dwarf2_section_info_def): Likewise.
7928 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
7929 (offset_type): Likewise.
7930 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
7931 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
7932 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
7933 (byte_swap): Likewise.
7934 (MAYBE_SWAP): Likewise.
7935 (dwarf2_per_cu_ptr): Likewise.
7936 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
7937 (struct tu_stats): Likewise.
7938 (struct dwarf2_per_objfile): Likewise.
7939 (struct dwarf2_per_cu_data): Likewise.
7940 (struct signatured_type): Likewise.
7941 (sig_type_ptr): Likewise.
7942 (DEF_VEC_P (sig_type_ptr)): Likewise.
7943 (INDEX4_SUFFIX): Likewise.
7944 (INDEX5_SUFFIX): Likewise.
7945 (DEBUG_STR_SUFFIX): Likewise.
7946 (dwarf2_read_section): Make non-static.
7947 (mapped_index_string_hash): Move from here.
7948 (dwarf5_djb_hash): Likewise.
7949 (file_write): Likewise.
7950 (class data_buf): Likewise.
7951 (struct symtab_index_entry): Likewise.
7952 (struct mapped_symtab): Likewise.
7953 (find_slot): Likewise.
7954 (hash_expand): Likewise.
7955 (add_index_entry): Likewise.
7956 (uniquify_cu_indices): Likewise.
7957 (class c_str_view): Likewise.
7958 (class c_str_view_hasher): Likewise.
7959 (class vector_hasher): Likewise.
7960 (write_hash_table): Likewise.
7961 (psym_index_map): Likewise.
7962 (struct addrmap_index_data): Likewise.
7963 (add_address_entry): Likewise.
7964 (add_address_entry_worker): Likewise.
7965 (write_address_map): Likewise.
7966 (symbol_kind): Likewise.
7967 (write_psymbols): Likewise.
7968 (struct signatured_type_index_data): Likewise.
7969 (write_one_signatured_type): Likewise.
7970 (recursively_count_psymbols): Likewise.
7971 (recursively_write_psymbols): Likewise.
7972 (class debug_names): Likewise.
7973 (check_dwarf64_offsets): Likewise.
7974 (psyms_seen_size): Likewise.
7975 (write_gdbindex): Likewise.
7976 (write_debug_names): Likewise.
7977 (assert_file_size): Likewise.
7978 (write_psymtabs_to_index): Likewise.
7979 (save_gdb_index_command): Likewise.
7980 (_initialize_dwarf2_read): Don't register the "save gdb-index"
7981 command.
7982 * dwarf2read.h: New file.
7983
59cc4834
JB
79842018-03-27 Joel Brobecker <brobecker@adacore.com>
7985
7986 PR gdb/22670
7987 * dwarf2read.c (dwarf2_physname): Do not return the demangled
7988 symbol name if the CU's language stores symbol names in linkage
7989 format.
7990 * language.h (struct language_defn)
7991 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
7992 all instances of this struct.
7993
67501539
TT
79942018-03-26 Tom Tromey <tom@tromey.com>
7995
7996 * stack.c (backtrace_command_1): Remove verbose code.
7997
76c939ac
TT
79982018-03-26 Tom Tromey <tom@tromey.com>
7999
8000 * python/py-framefilter.c (py_print_type): Don't catch
8001 exceptions. Return void.
8002 (py_print_value): Likewise.
8003 (py_print_single_arg): Likewise.
8004 (enumerate_args): Don't catch exceptions.
8005 (py_print_args): Likewise.
8006 (py_print_frame): Likewise.
8007 (gdbpy_apply_frame_filter): Catch exceptions here.
8008
9507b29c
TT
80092018-03-26 Tom Tromey <tom@tromey.com>
8010
8011 * stack.c (_initialize_stack): Remove trailing newlines from help
8012 text. Add "Usage" line to "backtrace" help.
8013
eb68e487
TT
80142018-03-26 Tom Tromey <tom@tromey.com>
8015
8016 PR python/16486:
8017 * python/py-framefilter.c (py_print_args): Call wrap_hint.
8018
1f111921
TT
80192018-03-26 Tom Tromey <tom@tromey.com>
8020
8021 * python/py-framefilter.c (py_print_single_arg): Return
8022 EXT_LANG_BT_ERROR from catch.
8023
fb7eb8b5
TT
80242018-03-26 Tom Tromey <tom@tromey.com>
8025
8026 PR backtrace/15584:
8027 * stack.c (backtrace_command_1): Move some code into no-filters
8028 "if".
8029
4ca59a9f
TT
80302018-03-26 Tom Tromey <tom@tromey.com>
8031
8032 * python/py-framefilter.c (throw_quit_or_print_exception): New
8033 function.
8034 (gdbpy_apply_frame_filter): Use it.
8035
92256134
TT
80362018-03-26 Tom Tromey <tom@tromey.com>
8037
8038 PR cli/17716:
8039 * python/py-framefilter.c (py_print_type, py_print_value)
8040 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
8041 RETURN_MASK_ERROR.
8042
7a630bc2
TT
80432018-03-26 Tom Tromey <tom@tromey.com>
8044
8045 * python/py-framefilter.c (enumerate_args): Use
8046 gdb::unique_xmalloc_ptr.
8047
63283d4a
TT
80482018-03-26 Tom Tromey <tom@tromey.com>
8049
8050 * python/py-framefilter.c (py_print_frame): Return
8051 EXT_LANG_BT_OK.
8052 (gdbpy_apply_frame_filter): Update comment.
8053 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
8054 Remove.
8055 <EXT_LANG_BT_NO_FILTERS>: Change value.
8056
978d6c75
TT
80572018-03-26 Tom Tromey <tom@tromey.com>
8058
8059 PR backtrace/15582:
8060 * stack.c (backtrace_command): Parse "hide" argument.
8061 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
8062 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
8063 constant.
8064
1cf7e640
TT
80652018-03-26 Tom Tromey <tom@tromey.com>
8066
8067 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
8068 add "flags".
8069 (backtrace_command): Remove "fulltrace", add "flags".
8070
ea3b0687
TT
80712018-03-26 Tom Tromey <tom@tromey.com>
8072
8073 * stack.c (backtrace_command): Rewrite command line parsing.
8074
9f034d75
SM
80752018-03-26 Simon Marchi <simon.marchi@ericsson.com>
8076
8077 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
8078
ce1459e5
SM
80792018-03-26 Simon Marchi <simon.marchi@ericsson.com>
8080
8081 * filename-seen-cache.h: Add include guard.
8082
4f7ae6f5
KS
80832018-03-26 Keith Seitz <keiths@redhat.com>
8084
8085 * symfile.c (place_section): Remove "struct" from section_addr_info
8086 in comment.
8087 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
8088 "struct" keyword from section_addr_info.
8089
5cd3e386
AH
80902018-03-26 Alan Hayward <alan.hayward@arm.com>
8091
8092 * regformats/regdef.h (reg): Add constructors.
8093
3e5ef9a4
PA
80942018-03-25 Pedro Alves <palves@redhat.com>
8095
8096 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
8097 if then/else bodies in var_func_name extraction.
8098
c88d2fcc 80992018-03-23 Weimin Pan <weimin.pan@oracle.com>
bce02d88
WP
8100
8101 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
8102 lookup_minimal_symbol() to find symbol entry.
8103 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
8104
b7fee5a3
KS
81052018-03-23 Keith Seitz <keiths@redhat.com>
8106
8107 PR c++/22968
8108 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
8109 nested type definitions for C++, too.
8110
2cc9b304
TT
81112018-03-23 Tom Tromey <tom@tromey.com>
8112
8113 * machoread.c (struct oso_el): Add a constructor. Don't define as
8114 a typedef.
8115 (macho_register_oso): Remove.
8116 (macho_symtab_read): Take a std::vector.
8117 (oso_el_compare_name): Now a std::sort comparator.
8118 (macho_symfile_read_all_oso): Take a std::vector.
8119 (macho_symfile_read): Use std::vector. Remove cleanups.
8120
a2b2bc12
TT
81212018-03-22 Tom Tromey <tom@tromey.com>
8122
8123 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
8124 (record_full_goto_bookmark): Use std::string.
8125
7a8f494c
PFC
81262018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8127
8128 PR tdep/18295
8129 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
8130 a single mask.
8131
dd6d677f
PFC
81322018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8133
8134 * rs6000-tdep.c (store_insn_p): New function.
8135 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
8136 and cr_reg to their unshifted values. Use store_insn_p to
8137 match LR saves using either R1 or fdata->alloca_reg. Use
8138 store_insn_p to match CR saves. Set alloca_reg_offset
8139 when alloca_reg and framep are set. Remove lr_reg shift
8140 when assigning to fdata->lr_register.
8141
26d6cec4
AA
81422018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
8143
8144 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
8145 command line args instead of emitting a warning.
8146
5d9310c4
SM
81472018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8148
8149 * tracepoint.h (struct static_tracepoint_marker): Initialize
8150 fields, define default constructor, move constructor and move
8151 assignment, disable the rest.
8152 <str_id, extra>: Make std::string.
8153 (release_static_tracepoint_marker): Remove.
8154 (free_current_marker): Remove.
8155 * tracepoint.c (free_current_marker): Remove.
8156 (parse_static_tracepoint_marker_definition): Adjust to
8157 std::string, use new hex2str overload.
8158 (release_static_tracepoint_marker): Remove.
8159 (print_one_static_tracepoint_marker): Get marker by reference
8160 and adjust to std::string.
8161 (info_static_tracepoint_markers_command): Adjust to std::vector
8162 changes
8163 * target.h (static_tracepoint_marker_p): Remove typedef.
8164 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
8165 (struct target_ops) <to_static_tracepoint_marker_at>: Return
8166 bool.
8167 <to_static_tracepoint_markers_by_strid>: Return std::vector.
8168 * target-debug.h
8169 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
8170 (target_debug_print_std_vector_static_tracepoint_marker): New.
8171 (target_debug_print_struct_static_tracepoint_marker_p): Rename
8172 to...
8173 (target_debug_print_static_tracepoint_marker_p): ... this.
8174 * target-delegates.c: Re-generate.
8175 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
8176 Make std::string.
8177 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
8178 (decode_static_tracepoint_spec): Adjust to std::vector.
8179 (tracepoint_print_one_detail): Adjust to std::string.
8180 (strace_marker_decode_location): Adjust to std::string.
8181 (update_static_tracepoint): Adjust to std::string, remove call
8182 to release_static_tracepoint_marker.
8183 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
8184 Adjust to std::vector.
8185 * remote.c (remote_static_tracepoint_marker_at): Return bool.
8186 (remote_static_tracepoint_markers_by_strid): Adjust to
8187 std::vector.
8188 * common/rsp-low.h (hex2str): New overload with explicit count
8189 of bytes.
8190 * common/rsp-low.c (hex2str): New overload with explicit count
8191 of bytes.
8192 * unittests/rsp-low-selftests.c (test_hex2str): New function.
8193 (_initialize_rsp_low_selftests): Add test_hex2str test.
8194 * unittests/tracepoint-selftests.c
8195 (test_parse_static_tracepoint_marker_definition): Adjust to
8196 std::string.
8197
62c222b6
SM
81982018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8199
8200 * tracepoint.c (parse_static_tracepoint_marker_definition):
8201 Consider case where the definition is followed by more
8202 definitions.
8203 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8204 tracepoint-selftests.c.
8205 * unittests/tracepoint-selftests.c: New.
8206
7eb2418f
PFC
82072018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8208
8209 * MAINTAINERS (Write After Approval): Add Pedro Franco de
8210 Carvalho.
8211
7cbe16e9
SR
82122018-03-20 Stephen Roberts <stephen.roberts@arm.com>
8213
3d6b3b82 8214 * symtab.c (find_pc_sect_line): fixed indentation.
7cbe16e9 8215
4ee89e90
SR
82162018-03-20 Stephen Roberts <stephen.roberts@arm.com>
8217
3d6b3b82 8218 * symtab.c (find_pc_sect_line): now uses binary search.
4ee89e90 8219
92630041
TT
82202018-03-19 Tom Tromey <tom@tromey.com>
8221
8222 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
8223 "IDENT" production.
8224
76727919
TT
82252018-03-19 Pedro Alves <palves@redhat.com>
8226 Tom Tromey <tom@tromey.com>
8227
8228 * unittests/observable-selftests.c: New file.
8229 * common/observable.h: New file.
8230 * observable.h: New file.
8231 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
8232 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
8233 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
8234 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
8235 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
8236 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
8237 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
8238 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
8239 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
8240 python/py-breakpoint.c, python/py-finishbreakpoint.c,
8241 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
8242 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
8243 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
8244 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
8245 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
8246 tui/tui-interp.c, valops.c: Update all users.
8247 * tui/tui-hooks.c (tui_bp_created_observer)
8248 (tui_bp_deleted_observer, tui_bp_modified_observer)
8249 (tui_inferior_exit_observer, tui_before_prompt_observer)
8250 (tui_normal_stop_observer, tui_register_changed_observer):
8251 Remove.
8252 (tui_observers_token): New global.
8253 (attach_or_detach, tui_attach_detach_observers): New functions.
8254 (tui_install_hooks, tui_remove_hooks): Use
8255 tui_attach_detach_observers.
8256 * record-btrace.c (record_btrace_thread_observer): Remove.
8257 (record_btrace_thread_observer_token): New global.
8258 * observer.sh: Remove.
8259 * observer.c: Rename to observable.c.
8260 * observable.c (namespace gdb_observers): Define new objects.
8261 (observer_debug): Move into gdb_observers namespace.
8262 (struct observer, struct observer_list, xalloc_observer_list_node)
8263 (xfree_observer_list_node, generic_observer_attach)
8264 (generic_observer_detach, generic_observer_notify): Remove.
8265 (_initialize_observer): Update.
8266 Don't include observer.inc.
8267 * Makefile.in (generated_files): Remove observer.h, observer.inc.
8268 (clean mostlyclean): Likewise.
8269 (observer.h, observer.inc): Remove targets.
8270 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
8271 (COMMON_SFILES): Use observable.c, not observer.c.
8272 * .gitignore: Remove observer.h.
8273
1cb1f3da
TT
82742018-03-18 Tom Tromey <tom@tromey.com>
8275
8276 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
8277 gdb::def_vector.
8278 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
8279
a06ab151
TT
82802018-03-17 Tom Tromey <tom@tromey.com>
8281
8282 * auto-load.c (auto_load_objfile_script_1): Use std::string.
8283
770623f7
TT
82842018-03-17 Tom Tromey <tom@tromey.com>
8285
8286 * target.c (class scoped_target_fd): New.
8287 (target_fileio_close_cleanup): Remove.
8288 (target_fileio_read_alloc_1): Use scoped_target_fd.
8289
39be3c7e
SM
82902018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
8291
8292 * silent-rules.mk: New.
8293 * Makefile.in: Include silent-rules.mk
8294 (srcdir, VPATH, top_srcdir): Move up.
8295 (COMPILE): Add ECHO_CXX.
8296 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
8297 (init.c): Add ECHO_INIT_C.
8298 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
8299 (version.c): Add ECHO_GEN.
8300 (printcmd.o): Add ECHO_CXX.
8301 (target-float.o): Add ECHO_CXX.
8302 (ada-exp.o): Add ECHO_CXX.
8303 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
8304 (insight$(EXEEXT)): Add ECHO_CXXLD.
8305 * gnulib/configure.ac: Add AM_SILENT_RULES.
8306 * gnulib/aclocal.m4: Re-generate.
8307 * gnulib/configure: Re-generate.
8308 * gnulib/import/Makefile.in: Re-generate.
8309
37e136b1
TT
83102018-03-16 Tom Tromey <tom@tromey.com>
8311
8312 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
8313 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
8314 * utils.c (do_free_section_addr_info)
8315 (make_cleanup_free_section_addr_info): Remove.
8316 * symfile.h (struct other_sections): Add constructor.
8317 (struct section_addr_info): Remove.
8318 (section_addr_info): New typedef.
8319 (struct sym_fns) <sym_offsets>: Change type of parameter.
8320 (build_section_addr_info_from_objfile)
8321 (relative_addr_info_to_section_offsets, addr_info_make_relative)
8322 (default_symfile_offsets, symbol_file_add)
8323 (symbol_file_add_from_bfd)
8324 (build_section_addr_info_from_section_table): Update.
8325 (alloc_section_addr_info, free_section_addr_info): Don't declare.
8326 * symfile.c (alloc_section_addr_info): Remove.
8327 (build_section_addr_info_from_section_table): Change return type.
8328 Update.
8329 (build_section_addr_info_from_bfd)
8330 (build_section_addr_info_from_objfile): Likewise.
8331 (free_section_addr_info): Remove.
8332 (relative_addr_info_to_section_offsets): Change type of "addrs".
8333 (addrs_section_compar): Now a std::sort comparator.
8334 (addrs_section_sort): Change return type.
8335 (addr_info_make_relative): Change type of "addrs". Update.
8336 (default_symfile_offsets, syms_from_objfile_1)
8337 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
8338 (symbol_file_add_separate): Update.
8339 (symbol_file_add): Change type of "addrs". Update.
8340 (add_symbol_file_command): Update. Remove cleanups.
8341 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
8342 cleanups.
8343 * symfile-debug.c (debug_sym_offsets): Change type of "info".
8344 * solib.c (solib_read_symbols): Update.
8345 * objfiles.c (objfile_relocate): Update. Remove cleanups.
8346 * machoread.c (macho_symfile_offsets): Update.
8347 * jit.c (jit_bfd_try_read_symtab): Update.
8348
03afa6ef
SM
83492018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
8350
8351 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8352 unittests/utils-selftests.c.
8353 * unittests/utils-selftests.c: New file.
8354
3ae9ce5d
TT
83552018-03-14 Tom Tromey <tom@tromey.com>
8356
8357 PR cli/14977:
8358 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
8359 for NULL.
8360
b8c2339b
TT
83612018-03-14 Tom Tromey <tom@tromey.com>
8362
8363 PR cli/19918:
8364 * printcmd.c (printf_pointer): Allow "-" in format.
8365
80ae639d
TT
83662018-03-14 Tom Tromey <tom@tromey.com>
8367
8368 * printcmd.c (_initialize_printcmd): Add usage to printf.
8369
0d671d99
YQ
83702018-03-14 Yao Qi <qiyao@sourceware.org>
8371
8372 * MAINTAINERS: Update my email address.
8373
b577b6af
TT
83742018-03-13 Tom Tromey <tom@tromey.com>
8375
8376 * machoread.c (macho_check_dsym): Change filenamep to a
8377 std::string*.
8378 (macho_symfile_read): Update.
8379 * symfile.c (load_command): Use std::string.
8380
89a3b63e
AB
83812018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
8382
8383 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
8384 to error message string.
8385 (riscv_register_name): Use xsnprintf instead of sprintf.
8386 (riscv_insn::fetch_instruction): Use gdb_assert instead of
8387 internal_error.
8388 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
8389 error.
8390 (riscv_push_dummy_call): Likewise.
8391
984c7238
TT
83922018-03-12 Tom Tromey <tom@tromey.com>
8393
8394 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
8395 Use gdb::byte_vector.
8396 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
8397
933522d1
YQ
83982018-03-12 Yao Qi <yao.qi@linaro.org>
8399
8400 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
8401 parameter type to readable_regcache.
8402 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
8403 the declaration.
8404
be2daae6
TT
84052018-03-11 Tom Tromey <tom@tromey.com>
8406
8407 * dwarf2read.c (struct nextfield): Add initializers.
8408 (struct nextfnfield): Remove.
8409 (struct fnfieldlist): Add initializers. Remove "length" and
8410 "head", use std::vector.
8411 (struct decl_field_list): Remove.
8412 (struct field_info): Add initializers.
8413 <fields, baseclasses>: Now std::vector.
8414 <nbaseclasses, nfnfields, typedef_field_list_count,
8415 nested_types_list_count>: Remove.
8416 (dwarf2_add_field, dwarf2_add_type_defn)
8417 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
8418 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
8419 (process_structure_scope): Update.
8420
484cf504
TT
84212018-03-11 Tom Tromey <tom@tromey.com>
8422
8423 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
8424 for use by std::sort.
8425 (build_type_psymtabs_1): Use std::vector.
8426
9bd8e0b0
EZ
84272018-03-09 Eli Zaretskii <eliz@gnu.org>
8428
8429 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
8430 and LIBMPFR in the printed configuration.
8431
5dc1a704
TT
84322018-03-08 Tom Tromey <tom@tromey.com>
8433
8434 * source.c (get_filename_and_charpos): Use scoped_fd.
8435 * nto-procfs.c (procfs_open_1): Use scoped_fd.
8436 (procfs_pidlist): Likewise.
8437 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
8438 (iterate_over_mappings): Likewise.
8439
fdf07f3a
TT
84402018-03-08 Tom Tromey <tom@tromey.com>
8441
8442 * infcall.c (struct call_return_meta_info)
8443 <stack_temporaries_enabled>: Remove.
8444 (get_call_return_value, call_function_by_hand_dummy): Update.
8445 * thread.c (disable_thread_stack_temporaries): Remove.
8446 (enable_thread_stack_temporaries): Remove.
8447 (thread_stack_temporaries_enabled_p): Return bool.
8448 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
8449 (get_last_thread_stack_temporary): Update.
8450 * eval.c (evaluate_subexp): Update.
8451 * gdbthread.h (class enable_thread_stack_temporaries): Now a
8452 class, not a function.
8453 (value_ptr, value_vec): Remove typedefs.
8454 (class thread_info) <stack_temporaries_enabled>: Now bool.
8455 <stack_temporaries>: Now a std::vector.
8456 (thread_stack_temporaries_enabled_p)
8457 (value_in_thread_stack_temporaries): Return bool.
8458
567a3e54
SM
84592018-03-08 Simon Marchi <simon.marchi@ericsson.com>
8460
8461 * remote.c (putpkt_binary): Fix omitted bytes reporting.
8462 (getpkt_or_notif_sane_1): Likewise.
8463
00b40057
SM
84642018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8465
8466 * build-id.c (build_id_to_debug_bfd): Use std::string.
8467
a8dbfd58
SM
84682018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8469
8470 * build-id.c (find_separate_debug_file_by_buildid): Return
8471 std::string.
8472 * build-id.h (find_separate_debug_file_by_buildid): Return
8473 std::string.
8474 * coffread.c (coff_symfile_read): Adjust to std::string.
8475 * elfread.c (elf_symfile_read): Adjust to std::string.
8476 * symfile.c (separate_debug_file_exists): Change parameter to
8477 std::string.
8478 (find_separate_debug_file): Return std::string.
8479 (find_separate_debug_file_by_debuglink): Return std::string.
8480 * symfile.h (find_separate_debug_file_by_debuglink): Return
8481 std::string.
8482
e6a58aa8
SM
84832018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8484
8485 * common/xml-utils.c (xml_escape_text): Move code to...
8486 (xml_escape_text_append): ... this new function.
8487 * common/xml-utils.h (xml_escape_text_append): New declaration.
8488 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
8489 New function.
8490 (_initialize_xml_utils): register test_xml_escape_text_append as
8491 a selftest.
8492
4ef0bef6
AH
84932018-03-07 Alan Hayward <alan.hayward@arm.com>
8494
8495 * defs.h: Remove MAX_REGISTER_SIZE.
8496 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
8497 asserts.
8498 * python/py-unwind.c (pyuw_sniffer): Likewise.
8499
e0d3522b
TT
85002018-03-07 Tom Tromey <tom@tromey.com>
8501
8502 * linux-tdep.c (linux_info_proc): Update.
8503 * target.h (struct target_ops) <to_fileio_readlink>: Return
8504 optional<string>.
8505 (target_fileio_readlink): Return optional<string>.
8506 * remote.c (remote_hostio_readlink): Return optional<string>.
8507 * inf-child.c (inf_child_fileio_readlink): Return
8508 optional<string>.
8509 * target.c (target_fileio_readlink): Return optional<string>.
8510
ea005f31
AB
85112018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
8512
8513 * regcache.c (cooked_read_test): Add riscv to the list of
8514 architectures that have a save_reggroup.
8515
e95a97d4
AA
85162018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
8517
8518 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
8519 value is not a dynamic class object.
8520
d8344f3d
TT
85212018-03-06 Tom Tromey <tom@tromey.com>
8522
8523 * rust-exp.y: Formatting fixes.
8524
9add17f2
AB
85252018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8526
8527 * riscv-tdep.c (riscv_register_name): Remove target description
8528 support.
8529 (riscv_gdbarch_init): Remove target description check.
8530
c9486dfe
AB
85312018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8532
8533 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
8534 comment.
8535 * riscv-tdep.h: Likewise.
8536
d74aff3d
AB
85372018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8538
8539 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
8540 (riscv_pseudo_register_write): Delete.
8541 (riscv_gdbarch_init): Remove all use of pseudo registers.
8542
7ea78b59
SM
85432018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8544
8545 * record-btrace.c (btrace_print_lines): Replace cleanup
8546 parameter with RAII equivalents.
8547 (btrace_insn_history): Replace cleanup with RAII equivalents.
8548 * ui-out.h (make_cleanup_ui_out_list_begin_end,
8549 make_cleanup_ui_out_tuple_begin_end): Remove.
8550 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
8551 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
8552 make_cleanup_ui_out_list_begin_end): Remove.
8553
53127008
SM
85542018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8555
8556 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
8557 parameter types to std::vector. Use bool.
8558 (record_btrace_wait): Replace VEC(tp_t) with
8559 std::vector<thread_info *>.
8560 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
8561
228f1508
SM
85622018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8563
8564 * record-btrace.c (record_btrace_disable_callback): Remove.
8565 (struct scoped_btrace_disable): New.
8566 (record_btrace_open): Use scoped_btrace_disable.
8567
b2970c23
AB
85682018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8569
8570 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
8571 reading values from registers.
8572
fb294655
AB
85732018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8574
8575 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
8576 where appropriate.
8577
cab5bb9d
AB
85782018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8579
8580 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
8581 change parameter type. Use GDB's print functions, and use
8582 core_addr_to_string where appropriate.
8583 (riscv_push_dummy_call): Use core_addr_to_string where
8584 appropriate, update call to riscv_print_arg_location, and reindent
8585 a few lines.
8586 (riscv_return_value): Update call to riscv_print_arg_location.
8587
dbbb1059
AB
85882018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8589 Tim Newsome <tim@sifive.com>
8590 Albert Ou <a0u@eecs.berkeley.edu>
8591 Darius Rad <darius@bluespec.com>
8592
8593 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
8594 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
8595 (ALLDEPFILES): Add riscv-tdep.c
8596 * configure.tgt: Add riscv support.
8597 * riscv-tdep.c: New file.
8598 * riscv-tdep.h: New file.
8599 * NEWS: Mention new target.
8600 * MAINTAINERS: Add entry for riscv.
8601
5dc43913
AB
86022018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8603
8604 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
8605 fields within aggregates.
8606
3dea1ef7
SM
86072018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
8608
8609 * record-btrace.c (btrace_print_lines): Change type of flags to
8610 gdb_disassembly_flags.
8611
7efba073
JB
86122018-03-04 John Baldwin <jhb@FreeBSD.org>
8613
8614 * fbsd-nat.c: Include "inf-ptrace.h".
8615 (USE_SIGTRAP_SIGINFO): Conditionally define.
8616 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
8617 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
8618 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
8619 function.
8620 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
8621 Likewise.
8622 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
8623 Likewise.
8624 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
8625 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
8626 "supports_stopped_by_hw_breakpoint" target methods.
8627
386a8676
JB
86282018-03-04 John Baldwin <jhb@FreeBSD.org>
8629
8630 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
8631 * fbsd-nat.c (debug_fbsd_nat): New variable.
8632 (show_fbsd_nat_debug): New function.
8633 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
8634 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
8635
12279366
JB
86362018-03-04 John Baldwin <jhb@FreeBSD.org>
8637
8638 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
8639 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
8640 prototype.
8641 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
8642 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
8643 method.
8644
54693cf5
SM
86452018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8646
8647 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
8648 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
8649
ccb2231c
SM
86502018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8651
8652 * charset.c (struct charset_vector): New.
8653 (charsets): Change type to charset_vector.
8654 (find_charset_names): Adjust.
8655 (add_one): Adjust.
8656 (_initialize_charset): Adjust.
8657
6fb16ce6
SM
86582018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8659
8660 * progspace.h (struct program_space) <deleted_solibs>: Change
8661 type to std::vector<std::string>.
8662 * progspace.c (clear_program_space_solib_cache): Adjust.
8663 * breakpoint.c (print_solib_event): Adjust.
8664 (check_status_catch_solib): Adjust.
8665 * solib.c (update_solib_list): Adjust.
8666 * ui-out.h (class ui_out) <field_string>: New overload.
8667 * ui-out.c (ui_out::field_string): New overload.
8668
564b1e3f
SM
86692018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8670
8671 * progspace.h (struct program_space): Add constructor and
8672 destructor, initialize fields.
8673 (add_program_space): Remove.
8674 * progspace.c (add_program_space): Rename to...
8675 (program_space::program_space): ... this.
8676 (release_program_space): Rename to...
8677 (program_space::~program_space): ... this.
8678 (delete_program_space): Use delete to delete program_space.
8679 (initialize_progspace): Use new to allocate program_space.
8680 * inferior.c (add_inferior_with_spaces): Likewise.
8681 (clone_inferior_command): Likewise.
8682 * infrun.c (follow_fork_inferior): Likewise.
8683 (handle_vfork_child_exec_or_exit): Likewise.
8684
e80aaf61
SM
86852018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8686
8687 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
8688 (delim_string_to_char_ptr_vec): Return std::vector of
8689 gdb::unique_xmalloc_ptr.
8690 (dirnames_to_char_ptr_vec_append): Take std::vector of
8691 gdb::unique_xmalloc_ptr.
8692 (dirnames_to_char_ptr_vec): Return std::vector of
8693 gdb::unique_xmalloc_ptr.
8694 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
8695 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
8696 (delim_string_to_char_ptr_vec): Return an std::vector of
8697 gdb::unique_xmalloc_ptr, adjust the code.
8698 (dirnames_to_char_ptr_vec_append): Take an std::vector of
8699 gdb::unique_xmalloc_ptr, adjust the code.
8700 (dirnames_to_char_ptr_vec): Return an std::vector of
8701 gdb::unique_xmalloc_ptr, adjust the code.
8702 * auto-load.c (auto_load_safe_path_vec): Change type to
8703 std::vector of gdb::unique_xmalloc_ptr.
8704 (auto_load_expand_dir_vars): Return an std::vector of
8705 gdb::unique_xmalloc_ptr, adjust the code.
8706 (auto_load_safe_path_vec_update): Adjust.
8707 (filename_is_in_auto_load_safe_path_vec): Adjust.
8708 (auto_load_objfile_script_1): Adjust.
8709 * build-id.c (build_id_to_debug_bfd): Adjust.
8710 * linux-thread-db.c (thread_db_load_search): Adjust.
8711 * source.c (add_path): Adjust.
8712 (openp): Adjust.
8713 * symfile.c (find_separate_debug_file): Adjust.
8714 * utils.c (do_free_char_ptr_vec): Remove.
8715 (make_cleanup_free_char_ptr_vec): Remove.
8716
ab818ade
SDJ
87172018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
8718
8719 PR gdb/22907
8720 * common/pathstuff.c: Conditionally include "<windows.h>".
8721
e1e6f073
GS
87222018-03-01 Georg Sauthoff <mail@georg.so>
8723
8724 PR gdb/22888
8725 * gcore.in: Quote variables and switch interpreter to bash.
8726
c7b15a66
TT
87272018-03-01 Tom Tromey <tom@tromey.com>
8728
8729 * dwarf2read.c (alloc_discriminant_info): Fix default_index
8730 assertion. Add assertion for discriminant_index.
8731 (quirk_rust_enum): Use correct base type name in univariant case.
8732
0cb7c7b0
SM
87332018-03-01 Simon Marchi <simon.marchi@ericsson.com>
8734
8735 * record.c (get_call_history_modifiers): Return a
8736 record_print_flags.
8737 (cmd_record_call_history): Adjust.
8738 * record-btrace.c (record_btrace_call_history): Adjust.
8739 (record_btrace_call_history_range): Adjust.
8740 (record_btrace_call_history_from): Adjust.
8741 * target-debug.h (target_debug_print_record_print_flags): New.
8742 * target-delegates.c: Re-generate.
8743 * target.c (target_call_history): Change flags type.
8744 (target_call_history_from): Likewise.
8745 (target_call_history_range): Likewise.
8746 * target.h (struct target_ops) <target_call_history>: Likewise.
8747 (target_call_history_from): Likewise.
8748 (target_call_history_range): Likewise.
8749
25e3c82c
SDJ
87502018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
8751 Simon Marchi <simon.marchi@polymtl.ca>
8752
8753 * common/common-utils.c: Include "sys/stat.h".
8754 (is_regular_file): Move here from "source.c"; change return
8755 type to "bool".
8756 * common/common-utils.h (is_regular_file): New prototype.
8757 * common/pathstuff.c (contains_dir_separator): New function.
8758 * common/pathstuff.h (contains_dir_separator): New prototype.
8759 * source.c: Don't include "sys/stat.h".
8760 (is_regular_file): Move to "common/common-utils.c".
8761
b4987c95
SDJ
87622018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
8763
8764 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
8765 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
8766 * auto-load.c: Include "common/pathstuff.h".
8767 * common/common-def.h (current_directory): Move here.
8768 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
8769 function.
8770 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
8771 prototype.
8772 * common/pathstuff.c: New file.
8773 * common/pathstuff.h: New file.
8774 * compile/compile.c: Include "common/pathstuff.h".
8775 * defs.h (current_directory): Move to "common/common-defs.h".
8776 * dwarf2read.c: Include "common/pathstuff.h".
8777 * exec.c: Likewise.
8778 * guile/scm-safe-call.c: Likewise.
8779 * linux-thread-db.c: Likewise.
8780 * main.c: Likewise.
8781 * nto-tdep.c: Likewise.
8782 * objfiles.c: Likewise.
8783 * source.c: Likewise.
8784 * symtab.c: Likewise.
8785 * utils.c: Include "common/pathstuff.h".
8786 (gdb_realpath): Move to "common/pathstuff.c".
8787 (gdb_realpath_keepfile): Likewise.
8788 (gdb_abspath): Likewise.
8789 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
8790 (gdb_realpath_keepfile): Likewise.
8791 (gdb_abspath): Likewise.
8792
f169cfdc
JB
87932018-02-28 John Baldwin <jhb@FreeBSD.org>
8794
8795 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
8796 wildcard process pid for super_resume for kernels with a
8797 specific bug.
8798
e05cac70
PM
87992018-02-27 Phil Muldoon <pmuldoon@redhat.com>
8800
8801 * compile/compile.c (get_args): Add additional comments
8802 explaining function.
8803
55089490
TT
88042018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
8805 Tom Tromey <tom@tromey.com>
8806
8807 * target.h (memory_write_request_s): Remove typedef. Don't define
8808 VEC.
8809 (target_write_memory_blocks): Change argument to std::vector.
8810 (struct memory_write_request): Add constructor.
8811 * target-memory.c (compare_block_starting_address): Return bool.
8812 Change argument types.
8813 (claim_memory): Change arguments to use std::vector.
8814 (split_regular_and_flash_blocks, blocks_to_erase)
8815 (compute_garbled_blocks): Likewise.
8816 (cleanup_request_data, cleanup_write_requests_vector): Remove.
8817 (target_write_memory_blocks): Change argument to std::vector.
8818 * symfile.c (struct load_section_data): Add constructor and
8819 destructor. Use std::vector for "requests".
8820 (struct load_progress_data): Add initializers.
8821 (load_section_callback): Update. Use "new".
8822 (clear_memory_write_data): Remove.
8823 (generic_load): Update.
8824
0c305b61
AH
88252018-02-27 Alan Hayward <alan.hayward@arm.com>
8826
8827 * arch/aarch64.h: Use common/tdesc.h.
8828
c5196c92
MR
88292018-02-26 Maciej W. Rozycki <macro@mips.com>
8830
8831 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
8832 architecture with a 64-bit ABI.
8833
37c33887
MR
88342018-02-26 Maciej W. Rozycki <macro@mips.com>
8835
8836 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
8837 ahead of target description loading.
8838
d4dd3282
TT
88392018-02-26 Tom Tromey <tom@tromey.com>
8840
8841 * stack.c (backtrace_command_1): Update.
8842 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
8843 of "flags".
8844 * python/py-framefilter.c (py_print_frame)
8845 (gdbpy_apply_frame_filter): Change type of "flags".
8846 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
8847 of "flags".
8848 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
8849 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
8850 * extension.h (enum frame_filter_flag): Rename from
8851 frame_filter_flags.
8852 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
8853 (apply_ext_lang_frame_filter): Change type of "flags".
8854 * extension.c (apply_ext_lang_frame_filter): Change type of
8855 "flags".
8856 * extension-priv.h (struct extension_language_ops)
8857 <apply_frame_filter>: Change type of "flags".
8858
6893c19a
TT
88592018-02-26 Tom Tromey <tom@tromey.com>
8860
8861 PR python/16497:
8862 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
8863 off-by-one in py_end computation.
8864 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
8865 PRINT_MORE_FRAMES.
8866 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
8867 constant.
8868
2ddeaf8a
TT
88692018-02-26 Tom Tromey <tom@tromey.com>
8870
8871 * dwarf2read.c (struct variant_field): New.
8872 (struct nextfield) <variant>: New field.
8873 (dwarf2_add_field): Handle DW_TAG_variant_part.
8874 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
8875 discriminated union.
8876 (read_structure_type): Handle DW_TAG_variant_part.
8877 (handle_struct_member_die): New function, extracted from
8878 process_structure_scope. Handle DW_TAG_variant.
8879 (process_structure_scope): Handle discriminated unions. Call
8880 handle_struct_member_die.
8881
c9317f21
TT
88822018-02-26 Tom Tromey <tom@tromey.com>
8883
8884 * rust-lang.h (rust_last_path_segment): Declare.
8885 * rust-lang.c (rust_last_path_segment): Now public. Change
8886 contract.
8887 (struct disr_info): Remove.
8888 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
8889 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
8890 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
8891 (rust_enum_p, rust_enum_variant): New function.
8892 (rust_underscore_fields): Remove "offset" parameter.
8893 (rust_print_enum): New function.
8894 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
8895 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
8896 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
8897 enums.
8898 (rust_internal_print_type): New function, from rust_print_type.
8899 Remove enum code.
8900 (rust_print_type): Call rust_internal_print_type.
8901 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
8902 Update enum handling.
8903 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
8904 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
8905 (rust_union_quirks): New functions.
8906 (process_full_comp_unit, process_full_type_unit): Call
8907 rust_union_quirks.
8908 (process_structure_scope): Update rust_unions if necessary.
8909
7c22600a
TT
89102018-02-26 Tom Tromey <tom@tromey.com>
8911
8912 * value.h (value_union_variant): Declare.
8913 * valops.c (value_union_variant): New function.
8914 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
8915 (struct discriminant_info): New.
8916 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
8917 enumerator.
8918 (struct main_type) <flag_discriminated_union>: New field.
8919
15ce8941
TT
89202018-02-26 Tom Tromey <tom@tromey.com>
8921
8922 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8923 unittests/unpack-selftests.c.
8924 * unittests/unpack-selftests.c: New file.
8925 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
8926
48fbe735
YQ
89272018-02-26 Yao Qi <yao.qi@linaro.org>
8928
8929 * dwarf2read.c (struct partial_die_info) <read>: New method.
8930 (read_partial_die): Remove the declaration.
8931 (load_partial_dies): Update.
8932 (partial_die_info::partial_die_info):
8933 (read_partial_die): Change it to partial_die_info::read.
8934
52356b79
YQ
89352018-02-26 Yao Qi <yao.qi@linaro.org>
8936
8937 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
8938 (fixup_partial_die): Remove declaration.
8939 (scan_partial_symbols): Update.
8940 (partial_die_parent_scope): Likewise.
8941 (partial_die_full_name): Likewise.
8942 (fixup_partial_die): Change it to partial_die_info::fixup.
8943
35cc7ed7
YQ
89442018-02-26 Yao Qi <yao.qi@linaro.org>
8945
8946 * dwarf2read.c (read_partial_die): Update the declaration.
8947 (load_partial_dies): Caller update.
8948 (read_partial_die): Remove one argument abbrev_len.
8949
6f06d47b
YQ
89502018-02-26 Yao Qi <yao.qi@linaro.org>
8951
8952 * dwarf2read.c (struct partial_die_info): Add ctor, delete
8953 assignment operator.
8954 (load_partial_dies): Use ctor and copy ctor.
8955 (read_partial_die): Update.
8956 (dwarf2_cu::find_partial_die): Use ctor.
8957
d590ff25
YQ
89582018-02-26 Yao Qi <yao.qi@linaro.org>
8959
8960 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
8961 (find_partial_die_in_comp_unit): Change it to
8962 dwarf2_cu::find_partial_die.
8963 (find_partial_die): Update.
8964
fd0a254f
YQ
89652018-02-26 Yao Qi <yao.qi@linaro.org>
8966
8967 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
8968 is NULL.
8969
cd9983dd
YQ
89702018-02-26 Yao Qi <yao.qi@linaro.org>
8971
8972 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
8973
f46cd62a
AH
89742018-02-26 Alan Hayward <alan.hayward@arm.com>
8975
8976 * arch/amd64.h: Use common/tdesc.h.
8977 * arch/i386.c: Likewise.
8978 * arch/i386.h: Likewise.
8979 * arch/tic6x.c: Likewise.
8980 * arch/tdesc.h: Move file from here...
8981 * common/tdesc.h: ...to here.
8982 * features/aarch64-core.c: Regenerate.
8983 * features/aarch64-fpu.c: Regenerate.
8984 * features/i386/32bit-avx.c: Regenerate.
8985 * features/i386/32bit-avx512.c: Regenerate.
8986 * features/i386/32bit-core.c: Regenerate.
8987 * features/i386/32bit-linux.c: Regenerate.
8988 * features/i386/32bit-mpx.c: Regenerate.
8989 * features/i386/32bit-pkeys.c: Regenerate.
8990 * features/i386/32bit-sse.c: Regenerate.
8991 * features/i386/64bit-avx.c: Regenerate.
8992 * features/i386/64bit-avx512.c: Regenerate.
8993 * features/i386/64bit-core.c: Regenerate.
8994 * features/i386/64bit-linux.c: Regenerate.
8995 * features/i386/64bit-mpx.c: Regenerate.
8996 * features/i386/64bit-pkeys.c: Regenerate.
8997 * features/i386/64bit-segments.c: Regenerate.
8998 * features/i386/64bit-sse.c: Regenerate.
8999 * features/i386/x32-core.c: Regenerate.
9000 * features/tic6x-c6xp.c: Regenerate.
9001 * features/tic6x-core.c: Regenerate.
9002 * features/tic6x-gp.c: Regenerate.
9003 * target-descriptions.c: Use common/tdesc.h.
9004 * target-descriptions.h: Likewise.
9005
9b292f68
TT
90062018-02-24 Tom Tromey <tom@tromey.com>
9007
9008 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
9009 (try_thread_db_load_from_dir, thread_db_load_search): Use
9010 std::string.
9011 (info_auto_load_libthread_db_compare): Return bool. Change
9012 argument types.
9013 (info_auto_load_libthread_db): Use std::vector, std::string.
9014 Remove cleanups.
9015
281d762b
TT
90162018-02-24 Tom Tromey <tom@tromey.com>
9017
9018 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
9019 std::string.
9020 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
9021 std::string*.
9022 * gdbarch.c: Rebuild.
9023 * gdbarch.h: Rebuild.
9024 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
9025 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
9026 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
9027 std::string*.
9028
9d8780f0
SM
90292018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
9030
9031 * gdbtypes.h (sect_offset): Change type to uint64_t.
9032 (sect_offset_str): New function.
9033 * dwarf2read.c (create_addrmap_from_aranges): Use
9034 sect_offset_str.
9035 (error_check_comp_unit_head): Likewise.
9036 (create_debug_type_hash_table): Likewise.
9037 (read_cutu_die_from_dwo): Likewise.
9038 (init_cutu_and_read_dies): Likewise.
9039 (init_cutu_and_read_dies_no_follow): Likewise.
9040 (process_psymtab_comp_unit_reader): Likewise.
9041 (partial_die_parent_scope): Likewise.
9042 (peek_die_abbrev): Likewise.
9043 (process_queue): Likewise.
9044 (dwarf2_physname): Likewise.
9045 (read_namespace_alias): Likewise.
9046 (read_import_statement): Likewise.
9047 (create_dwo_cu_reader): Likewise.
9048 (create_cus_hash_table): Likewise.
9049 (lookup_dwo_cutu): Likewise.
9050 (inherit_abstract_dies): Likewise.
9051 (read_func_scope): Likewise.
9052 (read_call_site_scope): Likewise.
9053 (dwarf2_add_member_fn): Likewise.
9054 (read_common_block): Likewise.
9055 (read_module_type): Likewise.
9056 (read_typedef): Likewise.
9057 (read_subrange_type): Likewise.
9058 (load_partial_dies): Likewise.
9059 (read_partial_die): Likewise.
9060 (find_partial_die): Likewise.
9061 (read_str_index): Likewise.
9062 (dwarf2_string_attr): Likewise.
9063 (build_error_marker_type): Likewise.
9064 (lookup_die_type): Likewise.
9065 (dump_die_shallow): Likewise.
9066 (follow_die_ref): Likewise.
9067 (dwarf2_fetch_die_loc_sect_off): Likewise.
9068 (dwarf2_fetch_constant_bytes): Likewise.
9069 (follow_die_sig): Likewise.
9070 (get_signatured_type): Likewise.
9071 (get_DW_AT_signature_type): Likewise.
9072 (dwarf2_find_containing_comp_unit): Likewise.
9073 (set_die_type): Likewise.
9074
8ec57239
JB
90752018-02-21 John Baldwin <jhb@FreeBSD.org>
9076
9077 * arch/aarch64.c: Include "common-defs.h".
9078 * arch/amd64.c: Likewise.
9079 * arch/i386.c: Likewise.
9080
3eac2b65
TT
90812018-02-21 Tom Tromey <tom@tromey.com>
9082
9083 * value.h: (extract_field_op): Update.
9084 * eval.c (extract_field_op): Return a const char *.
9085 * expression.h (parse_expression_for_completion): Update.
9086 * completer.c (complete_expression): Update.
9087 (add_struct_fields): Make fieldname const.
9088 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
9089 (mark_completion_tag, parse_exp_in_context_1): Update.
9090 (parse_expression_for_completion): Change "name" to
9091 unique_xmalloc_ptr*.
9092
6ccb583f
TT
90932018-02-21 Tom Tromey <tom@tromey.com>
9094
9095 * infcall.c (call_function_by_hand_dummy): Use std::vector.
9096
c113ed0c
YQ
90972018-02-21 Yao Qi <yao.qi@linaro.org>
9098
9099 * avr-tdep.c (avr_read_pc): Change parameter type to
9100 readable_regcache.
9101 * gdbarch.sh (read_pc): Likewise.
9102 * gdbarch.c: Re-generated.
9103 * gdbarch.h: Re-generated.
9104 * hppa-tdep.c (hppa_read_pc): Change parameter type to
9105 readable_regcache.
9106 * ia64-tdep.c (ia64_read_pc): Likewise.
9107 * mips-tdep.c (mips_read_pc): Likewise.
9108 * spu-tdep.c (spu_read_pc): Likewise.
9109
4c74fe6b
YQ
91102018-02-21 Yao Qi <yao.qi@linaro.org>
9111
9112 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
9113 * regcache-dump.c: New file.
9114 * regcache.c: Move register_dump to regcache-dump.c.
9115 (maintenance_print_registers): Likewise.
9116 (maintenance_print_raw_registers): Likewise.
9117 (maintenance_print_cooked_registers): Likewise.
9118 (maintenance_print_register_groups): Likewise.
9119 (maintenance_print_remote_registers): Likewise.
9120 (_initialize_regcache): Likewise.
9121 * regcache.h (register_dump): Moved from regcache.c.
9122
796bb026
YQ
91232018-02-21 Yao Qi <yao.qi@linaro.org>
9124
9125 * regcache.c (regcache::regcache): Update.
9126 (regcache::invalidate): Move it to detached_regcache::invalidate.
9127 (get_thread_arch_aspace_regcache): Update.
9128 (regcache::raw_update): Update.
9129 (regcache::cooked_read): Remove some code.
9130 (regcache::cooked_read_value): Likewise.
9131 (regcache::raw_write): Remove assert on m_readonly_p.
9132 (regcache::raw_supply_integer): Move it to
9133 detached_regcache::raw_supply_integer.
9134 (regcache::raw_supply_zeroed): Likewise.
9135 * regcache.h (detached_regcache) <raw_supply_integer>: New
9136 declaration.
9137 <raw_supply_zeroed, invalidate>: Likewise.
9138 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
9139 <invalidate>: Likewise.
9140 <m_readonly_p>: Removed.
9141
215c69dc
YQ
91422018-02-21 Yao Qi <yao.qi@linaro.org>
9143
9144 * infcmd.c (get_return_value): Let stop_regs point to
9145 get_current_regcache.
9146 * regcache.c (regcache::regcache): Remove.
9147 (register_dump_reg_buffer): New class.
9148 (regcache_print): Adjust.
9149 * regcache.h (regcache): Remove constructors.
9150
f3384e66
YQ
91512018-02-21 Yao Qi <yao.qi@linaro.org>
9152
9153 * regcache.c (class register_dump): New class.
9154 (register_dump_regcache, register_dump_none): New class.
9155 (register_dump_remote, register_dump_groups): New class.
9156 (regcache_print): Update.
9157 * regcache.h (regcache_dump_what): Move it to regcache.c.
9158 (regcache) <dump>: Remove.
9159
c8ec2f33
YQ
91602018-02-21 Yao Qi <yao.qi@linaro.org>
9161
9162 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
9163 reg_buffer_rw *.
9164 (jit_unwind_reg_set_impl): Call raw_supply.
9165 (jit_frame_sniffer): Use reg_buffer_rw.
9166 * record-full.c (record_full_core_regbuf): Change its type.
9167 (record_full_core_open_1): Use reg_buffer_rw.
9168 (record_full_close): Likewise.
9169 (record_full_core_fetch_registers): Use regcache->raw_supply.
9170 (record_full_core_store_registers): Likewise.
9171 * regcache.c (regcache::get_register_status): Move it to
9172 reg_buffer.
9173 (regcache_raw_set_cached_value): Remove.
9174 (regcache::raw_set_cached_value): Remove.
9175 (regcache::raw_write): Call raw_supply.
9176 (regcache::raw_supply): Move it to reg_buffer_rw.
9177 * regcache.h (regcache_raw_set_cached_value): Remove.
9178 (reg_buffer_rw): New class.
9179
daf6667d
YQ
91802018-02-21 Yao Qi <yao.qi@linaro.org>
9181
9182 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
9183 readonly_detached_regcache.
9184 (dummy_frame_prev_register): Use regcache->cooked_read.
9185 * frame.c (frame_save_as_regcache): Change return type.
9186 (frame_pop): Update.
9187 * frame.h (frame_save_as_regcache): Update declaration.
9188 * inferior.h (get_infcall_suspend_state_regcache): Update
9189 declaration.
9190 * infrun.c (infcall_suspend_state) <registers>: use
9191 readonly_detached_regcache.
9192 (save_infcall_suspend_state): Don't use regcache_dup.
9193 (get_infcall_suspend_state_regcache): Change return type.
9194 * linux-fork.c (struct fork_info) <savedregs>: Change to
9195 readonly_detached_regcache.
9196 <pc>: New field.
9197 (fork_save_infrun_state): Don't use regcache_dup.
9198 (info_checkpoints_command): Adjust.
9199 * mi/mi-main.c (register_changed_p): Update declaration.
9200 (mi_cmd_data_list_changed_registers): Use
9201 readonly_detached_regcache.
9202 (register_changed_p): Change parameter type to
9203 readonly_detached_regcache.
9204 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
9205 readonly_detached_regcache.
9206 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
9207 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
9208 New.
9209 (regcache::save): Move it to reg_buffer.
9210 (regcache::restore): Change parameter type.
9211 (regcache_dup): Remove.
9212 * regcache.h (reg_buffer) <save>: New method.
9213 (readonly_detached_regcache): New class.
9214 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
9215 readonly_detached_regcache.
9216 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
9217
fc5b8736
YQ
92182018-02-21 Yao Qi <yao.qi@linaro.org>
9219
9220 * frame.c (frame_save_as_regcache): Use regcache method save.
9221 (frame_pop): Use regcache method restore.
9222 * infrun.c (restore_infcall_suspend_state): Likewise.
9223 * linux-fork.c (fork_load_infrun_state): Likewise.
9224 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
9225 save.
9226 * regcache.c (regcache_save): Remove.
9227 (regcache::restore): More asserts.
9228 (regcache_cpy): Remove.
9229 * regcache.h (regcache_save): Remove the declaration.
9230 (regcache::restore): Move from private to public.
9231 Remove the friend declaration of regcache_cpy.
9232 (regcache_cpy): Remove declaration.
9233
849d0ba8
YQ
92342018-02-21 Yao Qi <yao.qi@linaro.org>
9235
9236 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
9237 parameter type to 'readable_regcache *'.
9238 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9239 * arm-tdep.c (arm_neon_quad_read): Likewise.
9240 (arm_pseudo_read): Likewise.
9241 * avr-tdep.c (avr_pseudo_register_read): Likewise.
9242 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9243 * frv-tdep.c (frv_pseudo_register_read): Likewise.
9244 * gdbarch.c: Re-generated.
9245 * gdbarch.h: Re-generated.
9246 * gdbarch.sh (pseudo_register_read): Change parameter type to
9247 'readable_regcache *'.
9248 (pseudo_register_read_value): Likewise.
9249 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
9250 (h8300_pseudo_register_read): Likewise.
9251 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
9252 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9253 (i386_pseudo_register_read_into_value): Likewise.
9254 (i386_pseudo_register_read_value): Likewise.
9255 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
9256 declaration.
9257 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
9258 * m32c-tdep.c (m32c_raw_read): Likewise.
9259 (m32c_read_flg): Likewise.
9260 (m32c_banked_register): Likewise.
9261 (m32c_banked_read): Likewise.
9262 (m32c_sb_read): Likewise.
9263 (m32c_part_read): Likewise.
9264 (m32c_cat_read): Likewise.
9265 (m32c_r3r2r1r0_read): Likewise.
9266 (m32c_pseudo_register_read): Likewise.
9267 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9268 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9269 (mep_pseudo_cr64_read): Likewise.
9270 (mep_pseudo_register_read): Likewise.
9271 * mips-tdep.c (mips_pseudo_register_read): Likewise.
9272 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9273 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9274 * regcache.c (regcache::raw_read): Move it to readable_regcache.
9275 (regcache::cooked_read): Likewise.
9276 (regcache::cooked_read_value): Likewise.
9277 (regcache_cooked_read_signed):
9278 (regcache::cooked_read): Likewise.
9279 * regcache.h (readable_regcache): New class.
9280 (regcache): Inherit readable_regcache. Move some methods to
9281 readable_regcache.
9282 * rl78-tdep.c (rl78_pseudo_register_read): Change
9283 parameter type to 'readable_regcache *'.
9284 * rs6000-tdep.c (do_regcache_raw_read): Remove.
9285 (e500_pseudo_register_read): Change parameter type to
9286 'readable_regcache *'.
9287 (dfp_pseudo_register_read): Likewise.
9288 (vsx_pseudo_register_read): Likewise.
9289 (efpr_pseudo_register_read): Likewise.
9290 * s390-tdep.c (s390_pseudo_register_read): Likewise.
9291 * sh-tdep.c (sh_pseudo_register_read): Likewise.
9292 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
9293 (sh64_pseudo_register_read): Likewise.
9294 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9295 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9296 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9297 (spu_pseudo_register_read): Likewise.
9298 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9299 (xtensa_pseudo_register_read): Likewise.
9300
31716595
YQ
93012018-02-21 Yao Qi <yao.qi@linaro.org>
9302
9303 * regcache.c (regcache::regcache): Call reg_buffer ctor.
9304 (regcache::arch): Move it to reg_buffer::arch.
9305 (regcache::register_buffer): Likewise.
9306 (regcache::assert_regnum): Likewise.
9307 (regcache::num_raw_registers): Likewise.
9308 * regcache.h (reg_buffer): New class.
9309 (regcache): Inherit reg_buffer.
9310
7104e59b
SM
93112018-02-20 Simon Marchi <simon.marchi@ericsson.com>
9312
9313 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
9314 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
9315
2d8adcbd
MM
93162018-02-20 Markus Metzger <markus.t.metzger@intel.com>
9317
9318 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
9319
b5884fa7
AH
93202018-02-19 Alan Hayward <alan.hayward@arm.com>
9321
9322 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
9323 (SFILES): Remove common/*.c files.
9324 (COMMON_OBS): Remove some *.o files built from common/*.c files.
9325 * common/common.host: Add common reference.
9326 * configure.ac: Likewise.
9327 * configure: Regenerate.
9328
fd90ace4
YQ
93292018-02-16 Yao Qi <yao.qi@linaro.org>
9330
9331 * block.c (block_namespace_info): Inherit allocate_on_obstack.
9332 (block_initialize_namespace): Use new.
9333 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
9334 (dwarf2_free_objfile): Use delete.
9335 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
9336 (copy_type_recursive): Use new.
9337 * gdb_obstack.h (allocate_on_obstack): New.
9338
85046ae2
YQ
93392018-02-15 Yao Qi <yao.qi@linaro.org>
9340
9341 PR gdb/22849
9342 * inferior.c (exit_inferior_1): Reset inf->control.
9343
355c559b
JB
93442018-02-15 Joel Brobecker <brobecker@adacore.com>
9345
9346 * ada-lang.c (ada_to_fixed_value_create): Delete advance
9347 declaration.
9348
980548fd
PA
93492018-02-14 Pedro Alves <palves@redhat.com>
9350
9351 * frame-unwind.c (frame_unwind_try_unwinder): Always call
9352 frame_cleanup_after_sniffer on exception.
9353
692d6f97
TT
93542018-02-14 Tom Tromey <tom@tromey.com>
9355
9356 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
9357 const.
9358 (solib_bfd_open): Make pathname const.
9359 * solib.c (solib_bfd_open): Make pathname const.
9360 * solib-spu.c (spu_bfd_fopen): Make name const.
9361 (spu_bfd_open): Make pathname const.
9362 * solib-darwin.c (darwin_bfd_open): Make pathname const.
9363 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
9364
e0cc99a6
TT
93652018-02-14 Tom Tromey <tom@tromey.com>
9366
9367 * symfile.c (symfile_bfd_open): Update.
9368 * source.h (openp, source_full_path_of, find_and_open_source):
9369 Change argument type to unique_xmalloc_ptr.
9370 * source.c (openp): Take a unique_xmalloc_ptr.
9371 (source_full_path_of, find_and_open_source): Likewise.
9372 (open_source_file, symtab_to_fullname): Update.
9373 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
9374 unique_xmalloc_ptr.
9375 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
9376 (exec_file_find): Update.
9377 * psymtab.c (psymtab_to_fullname): Update.
9378 * nto-tdep.h (nto_find_and_open_solib): Update.
9379 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
9380 unique_xmalloc_ptr.
9381 * exec.c (exec_file_attach): Update.
9382 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
9383 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
9384
b46a8d7c
TT
93852018-02-14 Tom Tromey <tom@tromey.com>
9386
9387 * solib.c: Include source.h.
9388 * nto-tdep.c: Include source.h.
9389 * mi/mi-cmd-env.c: Include source.h.
9390 * infcmd.c: Include source.h.
9391 * exec.c: Include source.h.
9392 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
9393 (add_path, directory_switch, source_path, init_source_path): Move
9394 declarations...
9395 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
9396 (add_path, directory_switch, source_path, init_source_path):
9397 ...here.
9398
797bc1cb
TT
93992018-02-14 Tom Tromey <tom@tromey.com>
9400
9401 * solist.h (exec_file_find, solib_find): Return
9402 unique_xmalloc_ptr.
9403 (solib_bfd_fopen): Take a const char *.
9404 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
9405 (exec_file_find, solib_find): Likewise.
9406 (solib_bfd_fopen): Do not take ownership of "pathname".
9407 (solib_bfd_open): Use unique_xmalloc_ptr.
9408 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
9409 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
9410 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
9411 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
9412
f98b2e33
JB
94132018-02-14 Joel Brobecker <brobecker@adacore.com>
9414
9415 * ada-lang.c (name_match_type_from_name): Remove reference to
9416 ada_name_for_lookup in function's documentation.
9417 * ada-lang.h (ada_name_for_lookup): Delete declaration.
9418
24b9144d
SM
94192018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
9420
9421 * defs.h (enum openp_flags): New enum.
9422 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
9423 Move to enum openp_flags.
9424 (openp_flags): New enum flags.
9425 (openp): Change parameter type to openp_flags.
9426 * source.c (openp): Change parameter type to openp_flags.
9427 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
9428 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
9429
387cd15b
SM
94302018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
9431
9432 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
9433 per-command.
9434
b303c6f6
AB
94352018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
9436
9437 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
9438 into...
9439 (class dwarf2_queue_guard): ...the destructor of this new class.
9440 (dw2_do_instantiate_symtab): Create instance of the new class
9441 dwarf2_queue_guard, remove cleanup.
9442
9c3630e9
TT
94432018-02-09 Tom Tromey <tom@tromey.com>
9444
9445 * source.c (find_source_lines): Don't reference past the end of
9446 the vector.
9447
c4e12631
MM
94482018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9449
9450 * remote.c (remote_btrace_maybe_reopen): Change error message.
9451 * btrace.c (btrace_enable): Likewise.
9452 (parse_xml_btrace): Likewise.
9453 (parse_xml_btrace_conf): Likewise.
9454
88711fbf
MM
94552018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9456
9457 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
9458 (linux_enable_pt, linux_enable_bts): Call
9459 diagnose_perf_event_open_fail.
9460
17ad2a4f
MM
94612018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9462
9463 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
9464 Remove parameter and change return type. Update callers. Move it.
9465 (linux_enable_bts, linux_enable_pt): Improve error message.
9466 (linux_enable_pt): Remove zero buffer size check.
9467 (linux_enable_btrace): Improve error messages. Remove NULL return
9468 check.
9469
de6242d3
MM
94702018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9471
9472 * btrace.c (btrace_enable): Remove target_supports_btrace call.
9473 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
9474 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
9475 (linux_supports_pt, linux_supports_btrace): Remove.
9476 (linux_enable_bts): Call cpu_supports_bts.
9477 * nat/linux-btrace.h (linux_supports_btrace): Remove.
9478 * remote.c (remote_supports_btrace): Remove.
9479 (init_remote_ops): Remove remote_supports_btrace.
9480 * target-delegates.c: Regenerated.
9481 * target.c (target_supports_btrace): Remove.
9482 * target.h (target_ops) <to_supports_btrace>: Remove
9483 (target_supports_btrace): Remove.
9484 * x86-linux-nat.c (x86_linux_create_target): Remove
9485 linux_supports_btrace.
9486
9ee23a85
MM
94872018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9488
9489 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
9490 btrace failed.
9491 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
9492 exception and use message in own exception.
9493
5c3284c1
MM
94942018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9495
9496 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
9497 (perf_event_pt_event_type): Use gdb_file_up.
9498 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
9499 scoped_fd, and scoped_mmap.
9500
84696f37
MM
95012018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9502
9503 * common/scoped_mmap.h: New.
9504 * unittests/scoped_mmap-selftest.c: New.
9505 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9506 unittests/scoped_mmap-selftest.c.
9507
ea4a0888
MM
95082018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9509
9510 * common/scoped_fd.h: New.
9511 * unittests/scoped_fd-selftest.c: New.
9512 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9513 unittests/scoped_fd-selftest.c.
9514
869e8290
TT
95152018-02-09 Tom Tromey <tom@tromey.com>
9516
9517 * auto-load.c (auto_load_section_scripts): Use
9518 gdb::unique_xmalloc_ptr.
9519
a37a2ae7
TT
95202018-02-09 Tom Tromey <tom@tromey.com>
9521
9522 * auto-load.c (execute_script_contents): Use std::string.
9523
4e725347
JB
95242018-02-09 Joel Brobecker <brobecker@adacore.com>
9525
9526 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
9527 Python function, rather than a new command.
9528
9a897d43
TT
95292018-02-08 Tom Tromey <tom@tromey.com>
9530
9531 * solib.c (solib_find_1): Use std::string.
9532 (solib_bfd_fopen): Use unique_xmalloc_ptr.
9533
58ef3771
TT
95342018-02-08 Tom Tromey <tom@tromey.com>
9535
9536 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
9537
a9abc434
TT
95382018-02-08 Tom Tromey <tom@tromey.com>
9539
9540 * source.c (find_source_lines): Use gdb::def_vector.
9541
84f27c6f
TT
95422018-02-08 Tom Tromey <tom@tromey.com>
9543
9544 * macrocmd.c (struct temporary_macro_definition): New.
9545 (macro_define_command): Use temporary_macro_definition. Remove
9546 cleanups.
9547 (free_macro_definition_ptr): Remove.
9548
0354904b
TT
95492018-02-08 Tom Tromey <tom@tromey.com>
9550
9551 * macroexp.c (maybe_expand): Use std::string.
9552
1739cf24
TT
95532018-02-08 Tom Tromey <tom@tromey.com>
9554
9555 * macroexp.c (struct macro_buffer): Add initializers for some
9556 members.
9557 (init_buffer, init_shared_buffer, free_buffer)
9558 (free_buffer_return_text): Remove.
9559 (macro_buffer): New constructors.
9560 (~macro_buffer): New destructor.
9561 (macro_buffer::set_shared): New method.
9562 (macro_buffer::resize_buffer, macro_buffer::appendc)
9563 (macro_buffer::appendmem): Now methods, not free functions.
9564 (set_token, append_tokens_without_splicing, stringify)
9565 (macro_stringify): Update.
9566 (gather_arguments): Change return type. Remove argc_p argument,
9567 add args_ptr argument. Use std::vector.
9568 (substitute_args): Remove argc argument. Accept std::vector.
9569 (expand): Update. Use std::vector.
9570 (scan, macro_expand, macro_expand_next): Update.
9571
f6c2623e
TT
95722018-02-08 Tom Tromey <tom@tromey.com>
9573
9574 * symtab.c (default_collect_symbol_completion_matches_break_on):
9575 Use unique_xmalloc_ptr.
9576 * macroscope.h: (sal_macro_scope, user_macro_scope)
9577 (default_macro_scope): Return unique_xmalloc_ptr.
9578 * macroscope.c (sal_macro_scope, user_macro_scope)
9579 (default_macro_scope): Return unique_xmalloc_ptr.
9580 * macroexp.h (macro_expand, macro_expand_once): Return
9581 unique_xmalloc_ptr.
9582 * macroexp.c (macro_expand, macro_expand_once): Return
9583 unique_xmalloc_ptr.
9584 * macrocmd.c (macro_expand_command, macro_expand_once_command)
9585 (info_macro_command, info_macros_command): Use
9586 unique_xmalloc_ptr.
9587 * compile/compile-c-support.c (write_macro_definitions): Use
9588 unique_xmalloc_ptr.
9589 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
9590
c2e0e465
SM
95912018-02-07 Simon Marchi <simon.marchi@ericsson.com>
9592
9593 * value.c (value_static_field): Assign field type instead of
9594 containing type when returning an optimized out value.
9595
3f8c94b4
YQ
95962018-02-06 Yao Qi <yao.qi@linaro.org>
9597
9598 * ft32-tdep.c (ft32_read_pc): Remove.
9599 (ft32_write_pc): Remove.
9600 (ft32_gdbarch_init): Update.
9601 * m32r-tdep.c (m32r_read_pc): Remove.
9602 (m32r_gdbarch_init): Update.
9603 * mep-tdep.c (mep_read_pc): Remove.
9604 (mep_gdbarch_init): Update.
9605 * microblaze-tdep.c (microblaze_write_pc): Remove.
9606 (microblaze_gdbarch_init): Update.
9607 * mn10300-tdep.c (mn10300_read_pc): Remove.
9608 (mn10300_write_pc): Remove.
9609 (mn10300_gdbarch_init): Update.
9610 * moxie-tdep.c (moxie_read_pc): Remove.
9611 (moxie_write_pc): Remove.
9612 (moxie_gdbarch_init): Update.
9613
bca65a23
YQ
96142018-02-06 Yao Qi <yao.qi@linaro.org>
9615
9616 * expprint.c (print_subexp_standard): Handle
9617 OP_F77_UNDETERMINED_ARGLIST.
9618 (dump_subexp_body_standard): Likewise.
9619
583e3f90 96202018-02-05 Alan Hayward <alan.hayward@arm.com>
b8df6ca7 9621
583e3f90
YQ
9622 * target-descriptions.c (tdesc_element_visitor) Add empty
9623 implementations.
b8df6ca7
AH
9624 (tdesc_type): Move make_gdb_type from here.
9625 (tdesc_type_builtin): Likewise.
9626 (tdesc_type_vector): Likewise.
9627 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
9628 (make_gdb_type_struct): Move from tdesc_type_with_fields.
9629 (make_gdb_type_union): Likewise.
9630 (make_gdb_type_flags): Likewise.
9631 (make_gdb_type_enum): Likewise.
9632 (make_gdb_type): New function.
9633 (tdesc_register_type): Use static make_gdb_type.
9634
e813d34a
RK
96352018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
9636
9637 * infcmd.c (default_print_one_register_info): Align natural-format
9638 column values consistently one under another.
9639 (pad_to_column): New function.
9640
0eb876f5
JB
96412018-02-05 Joel Brobecker <brobecker@adacore.com>
9642
9643 * dwarf2read.c (dwarf2_physname): Move commment.
9644
0625771b
LS
96452018-02-01 Leszek Swirski <leszeks@google.com>
9646
9647 * varobj.c (varobj_formatted_print_options): Allow recursive
9648 pretty printing if pretty printing is enabled.
9649
59498c30
LS
96502018-02-01 Leszek Swirski <leszeks@google.com>
9651
9652 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
9653 names after a structop as a filename.
9654
2d9e6acb
YQ
96552018-02-01 Yao Qi <yao.qi@linaro.org>
9656
9657 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
9658 (arm_record_coproc_data_proc): Likewise.
9659
df95a9cf
YQ
96602018-02-01 Yao Qi <yao.qi@linaro.org>
9661
9662 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
9663
07e5f5cf
NP
96642018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
9665
9666 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
9667 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
9668
3045b475
PA
96692018-01-31 Pedro Alves <palves@redhat.com>
9670
9671 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
9672 * inflow.c (child_terminal_save_inferior): Wrap reference to
9673 tcgetpgrp in HAVE_TERMIOS_H.
9674 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
9675 _WIN32.
9676 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
9677 always iterate over all inferiors.
9678 (gdbsim_cntrl_c): Adjust.
9679 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
9680
929b5ad4
JB
96812018-01-31 Joel Brobecker <brobecker@adacore.com>
9682
9683 * gdbtypes.c (lookup_array_range_type): Make sure the array's
9684 index type is objfile-owned if the element type is as well.
9685
29236ca2
JB
96862018-01-31 Joel Brobecker <brobecker@adacore.com>
9687
9688 GDB 8.1 released.
9689
c81e8879
PR
96902018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
9691
9692 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
9693 "features/s390x-linux64.c".
9694 (_initialize_s390_linux_tdep): Remove initialization of tdescs
9695 s390_linux32 and s390x_linux64.
9696 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
9697 default tdesc.
9698 * s390-tdep.c: Include "features/s390-linux32.c" and
9699 "features/s390x-linux64.c".
9700 (s390_tdesc_valid): Add check for tdesc_has_registers.
9701 (s390_gdbarch_init): Make sure there is always a valid tdesc.
9702 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
9703 tdesc_s390x_linux64.
9704 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
9705 tdesc_s390x_linux64 to...
9706 * s390-tdep.h: ...here.
9707
e671cd59
PA
97082018-01-30 Pedro Alves <palves@redhat.com>
9709
9710 PR gdb/13211
9711 * config.in, configure: Regenerate.
9712 * configure.ac: Check for getpgid.
9713 * go32-nat.c (go32_pass_ctrlc): New.
9714 (go32_target): Install it.
9715 * inf-child.c (inf_child_target): Install
9716 child_terminal_save_inferior, child_pass_ctrlc and
9717 child_interrupt.
9718 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
9719 (inf_ptrace_target): No longer install it.
9720 * infcmd.c (interrupt_target_1): Adjust.
9721 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
9722 (child_interrupt): Declare.
9723 (inferior::terminal_state): New.
9724 * inflow.c (struct terminal_info): Update comments.
9725 (inferior_process_group): Delete.
9726 (terminal_is_ours): Delete.
9727 (gdb_tty_state): New.
9728 (child_terminal_init): Adjust.
9729 (is_gdb_terminal, sharing_input_terminal_1)
9730 (sharing_input_terminal): New functions.
9731 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
9732 Set the process's actual process group in the foreground if
9733 possible. Handle is_ours_for_output/is_ours distinction. Don't
9734 mark terminal as the inferior's if not sharing GDB's terminal.
9735 Don't check attach_flag.
9736 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
9737 pass down a target_terminal_state.
9738 (child_terminal_save_inferior): New, factored out from ...
9739 (child_terminal_ours_1): ... this. Handle
9740 target_terminal_state::is_ours_for_output.
9741 (child_interrupt, child_pass_ctrlc): New.
9742 (inflow_inferior_exit): Clear the inferior's terminal_state.
9743 (copy_terminal_info): Copy the inferior's terminal state.
9744 (_initialize_inflow): Remove reference to terminal_is_ours.
9745 * inflow.h (inferior_process_group): Delete.
9746 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
9747 * procfs.c (procfs_target): Don't install procfs_interrupt.
9748 (procfs_interrupt): Delete.
9749 * remote.c (remote_serial_quit_handler): Adjust.
9750 (remote_interrupt): Remove ptid parameter. Adjust.
9751 * target-delegates.c: Regenerate.
9752 * target.c: Include "terminal.h".
9753 (target_terminal::terminal_state): Rename to ...
9754 (target_terminal::m_terminal_state): ... this.
9755 (target_terminal::init): Adjust.
9756 (target_terminal::inferior): Adjust to per-inferior
9757 terminal_state.
9758 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
9759 (target_terminal::ours, target_terminal::ours_for_output): Use
9760 target_terminal_is_ours_kind.
9761 (target_interrupt): Remove ptid parameter. Adjust.
9762 (default_target_pass_ctrlc): Adjust.
9763 * target.h (target_ops::to_terminal_save_inferior): New field.
9764 (target_ops::to_interrupt): Remove ptid_t parameter.
9765 (target_interrupt): Remove ptid_t parameter. Update comment.
9766 (target_pass_ctrlc): Update comment.
9767 * target/target.h (target_terminal_state): New scoped enum,
9768 factored out of ...
9769 (target_terminal::terminal_state): ... here.
9770 (target_terminal::inferior): Update comments.
9771 (target_terminal::restore_inferior): New.
9772 (target_terminal::is_inferior, target_terminal::is_ours)
9773 (target_terminal::is_ours_for_output): Adjust.
9774 (target_terminal::scoped_restore_terminal_state): Adjust to
9775 rename, and call restore_inferior() instead of inferior().
9776 (target_terminal::scoped_restore_terminal_state::m_state): Change
9777 type.
9778 (target_terminal::terminal_state): Rename to ...
9779 (target_terminal::m_terminal_state): ... this and change type.
9780
9c3a5d93
PA
97812018-01-30 Pedro Alves <palves@redhat.com>
9782
9783 * linux-nat.c (wait_for_signal): New function.
9784 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
9785 directly.
9786 (async_terminal_is_ours)
9787 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
9788 (linux_nat_add_target): Don't override
9789 to_terminal_inferior/to_terminal_ours.
9790
69ab5edb
SDJ
97912018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
9792
9793 * remote.c (remote_follow_fork): Don't call "detach_inferior".
9794
fc8e7e75
SM
97952018-01-28 Simon Marchi <simon.marchi@ericsson.com>
9796
9797 * dwarf2read.c (free_dwo_files): Add forward-declaration.
9798 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
9799 dwarf2_per_objfile_free here.
9800 (dwarf2_per_objfile_free): Remove.
9801 (_initialize_dwarf2_read): Don't register
9802 dwarf2_per_objfile_free as a registry cleanup.
9803
b2a426e2
EZ
98042018-01-27 Eli Zaretskii <eliz@gnu.org>
9805
9806 Avoid compilation errors in MinGW native builds
9807
9808 The error is triggered by including python-internal.h, and the
9809 error message is:
9810
9811 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
9812 from build-gnulib/import/math.h:27,
9813 from d:/usr/Python26/include/pyport.h:235,
9814 from d:/usr/Python26/include/Python.h:58,
9815 from python/python-internal.h:94,
9816 from python/py-arch.c:24:
9817 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
9818 using ::hypot;
9819 ^~~~~
9820
9821 This happens because Python headers define 'hypot' to expand t
9822 '_hypot' in the Windows builds.
9823 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
9824 'hypoth'. This avoids a compilation error.
9825
0bdd8eac
AH
98262018-01-26 Alan Hayward <alan.hayward@arm.com>
9827
9828 * MAINTAINERS (Write After Approval): Fix ordering.
9829
56ae9dc3
AH
98302018-01-26 Alan Hayward <alan.hayward@arm.com>
9831
9832 * MAINTAINERS (Write After Approval): Add Alan Hayward.
9833
7433498b
AM
98342018-01-26 Alan Modra <amodra@gmail.com>
9835
9836 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
9837 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
9838 Remove nop. Make const. Comment.
9839 (powerpc32_plt_stub_so_2): New.
9840 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
9841 Correct count. Update uses.
9842 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
9843 Move common code reading PLT entry word. Correct
9844 powerpc32_plt_stub PLT address calculation.
9845 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
9846 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
9847 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
9848 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
9849 (ppc64_standard_linkage8): Likewise.
9850 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
9851 Correct insns description.
9852 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
9853
0f59d5fc
PA
98542018-01-24 Pedro Alves <palves@redhat.com>
9855
9856 GCC PR libstdc++/83906
9857 * gdbtypes.c (operator==(const dynamic_prop &,
9858 const dynamic_prop &)): New.
9859 (operator==(const range_bounds &, const range_bounds &)): New.
9860 (check_types_equal): Use them instead of memcmp.
9861 * gdbtypes.h (operator==(const dynamic_prop &,
9862 const dynamic_prop &)): Declare.
9863 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
9864 (operator==(const range_bounds &, const range_bounds &)): Declare.
9865 (operator!=(const range_bounds &, const range_bounds &)): Declare.
9866
ef8914a4
PR
98672018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9868
9869 * s390-linux-tdep.c (s390_record_address_mask)
9870 (s390_record_calc_disp_common, s390_record_calc_disp)
9871 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
9872 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
9873 (s390_process_record): Move to s390-tdep.c.
9874 (s390_linux_init_abi_any): Adjust.
9875 * s390-tdep.c (s390_record_address_mask)
9876 (s390_record_calc_disp_common, s390_record_calc_disp)
9877 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
9878 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
9879 (s390_process_record): Moved from s390-linux-tdep.c
9880 (s390_gdbarch_init): Adjust.
9881
d6e58945
PR
98822018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9883
9884 * s390-linux-nat.c (s390-tdep.h): New include.
9885 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
9886 (HFILES_NO_SRCDIR): Add s390-tdep.h.
9887 (ALLDEPFILES): Add s390-tdep.c.
9888 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
9889 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
9890 * s390-tdep.h: ...this. New file.
9891 * s390-linux-tdep.c (s390-tdep.h): New include.
9892 (_initialize_s390_tdep): Rename to...
9893 (_initialize_s390_linux_tdep): ...this and adjust.
9894 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
9895 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
9896 s390-tdep.h.
9897 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
9898 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
9899 (s390_is_partial_instruction, s390_software_single_step)
9900 (is_non_branch_ril, s390_displaced_step_copy_insn)
9901 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
9902 (s390_prologue_data, s390_addr, s390_store, s390_load)
9903 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
9904 (s390_register_call_saved, s390_guess_tracepoint_registers)
9905 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
9906 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
9907 (s390_pseudo_register_name, s390_pseudo_register_type)
9908 (s390_pseudo_register_read, s390_pseudo_register_write)
9909 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
9910 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
9911 (s390_addr_bits_remove, s390_address_class_type_flags)
9912 (s390_address_class_type_flags_to_name)
9913 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
9914 (s390_function_arg_float, s390_function_arg_vector)
9915 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
9916 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
9917 (s390_frame_align, s390_register_return_value, s390_return_value)
9918 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
9919 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
9920 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
9921 (s390_trad_frame_prev_register, s390_unwind_cache)
9922 (s390_prologue_frame_unwind_cache)
9923 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
9924 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
9925 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
9926 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
9927 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
9928 (s390_frame_base_address, s390_local_base_address)
9929 (s390_frame_base, s390_gcc_target_options)
9930 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
9931 (s390_validate_reg_range, s390_tdesc_valid)
9932 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
9933 * s390-tdep.c: ...this. New file.
9934
9c0b896e
PR
99352018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9936
9937 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
9938 (s390_process_record, s390_gdbarch_tdep_alloc)
9939 (s390_linux_init_abi_any): Use/set new hook.
9940
7042632b
PR
99412018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9942
9943 * s390-linux-tdep.c (osabi.h): New include.
9944 (s390_linux_init_abi_31, s390_linux_init_abi_64)
9945 (s390_linux_init_abi_any): New functions.
9946 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
9947
650f5e13
PR
99482018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9949
9950 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
9951 tdesc_has_registers check
9952
47c9317e
PR
99532018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9954
9955 * s390-linux-tdep.c (s390_tdesc_valid): New function.
9956 (s390_validate_reg_range): New macro.
9957 (s390_gdbarch_init): Adjust.
9958
095085d8
PR
99592018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9960
9961 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
9962 (s390_gdbarch_tdep_alloc): Adjust.
9963 (s390_gdbarch_init): Adjust.
9964
ab9bcc67
PR
99652018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9966
9967 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
9968 <have_tdb>: Change type to bool.
9969 (s390_gdbarch_tdep_alloc): Adjust.
9970 (s390_gdbarch_init): Adjust.
9971
21f6f5ff
PR
99722018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9973
9974 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
9975 (gdbarch_tdep) <have_upper, have_vx>: New fields.
9976 (s390_gdbarch_tdep_alloc): New function.
9977 (s390_gdbarch_init): Allocate tdep at start and use its fields
9978 instead of separate variables.
9979
0eb97953
PR
99802018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9981
9982 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
9983 when looking for cached gdbarch and add comment for remaining.
9984
5c319bb2
PA
99852018-01-22 Pedro Alves <palves@redhat.com>
9986 Sergio Durigan Junior <sergiodj@redhat.com>
9987
9988 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
9989 case.
9990
d65ce302
MR
99912018-01-22 Maciej W. Rozycki <macro@mips.com>
9992
9993 * MAINTAINERS: Update my company e-mail address.
9994
ec7a5fcb
YQ
99952018-01-22 Yao Qi <yao.qi@linaro.org>
9996
9997 * regcache.c (cooked_write_test): New function.
9998 (_initialize_regcache): Register the test.
9999
11f57cb6
YQ
100002018-01-22 Yao Qi <yao.qi@linaro.org>
10001
10002 * ia64-tdep.c (ia64_pseudo_register_read): Call
10003 regcache->cooked_read instead of regcache_cooked_read_unsigned.
10004 * m32c-tdep.c (m32c_cat_read): Likewise.
10005 (m32c_r3r2r1r0_read): Likewise.
10006 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10007 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10008
03f50fc8
YQ
100092018-01-22 Yao Qi <yao.qi@linaro.org>
10010
10011 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
10012 method raw_read instead of regcache_raw_read.
10013 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10014 * arm-tdep.c (arm_neon_quad_read): Likewise.
10015 * avr-tdep.c (avr_pseudo_register_read): Likewise.
10016 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10017 * frv-tdep.c (frv_pseudo_register_read): Likewise.
10018 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
10019 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10020 (i386_pseudo_register_read_into_value): Likewise.
10021 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10022 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10023 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10024 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
10025 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
10026 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10027 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10028 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10029 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
10030
dc711524
YQ
100312018-01-22 Yao Qi <yao.qi@linaro.org>
10032
10033 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
10034 * configure.tgt: Remove target mt.
10035 * mt-tdep.c: Remove.
10036 * regcache.c (cooked_read_test): Remove the check for mt.
10037
3f5a868b
YQ
100382018-01-22 Yao Qi <yao.qi@linaro.org>
10039
10040 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
10041 instead of gdbarch_pseudo_register_read_value.
10042
de4cb04a
JB
100432018-01-22 Joel Brobecker <brobecker@adacore.com>
10044
10045 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
10046 language is Ada.
10047
a9e40818
JB
100482018-01-22 Joel Brobecker <brobecker@adacore.com>
10049
10050 * linespec.c (create_sals_line_offset): Remove code that preserved
10051 the symtab_and_line's line number.
10052
e707fc44
AB
100532018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10054
10055 * varobj.c (varobj_create): Don't set valid_block when creating a
10056 floating varobj.
10057
03d0bf7b
AB
100582018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10059
10060 * varobj.c (varobj_create): Remove out of date comment.
10061
ae451627
AB
100622018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10063
10064 PR mi/20395
10065 * ada-exp.y (write_var_from_sym): Pass extra parameter when
10066 updating innermost block.
10067 * parse.c (innermost_block_tracker::update): Take extra type
10068 parameter, and check types match before updating innermost block.
10069 (write_dollar_variable): Update innermost block for registers.
10070 * parser-defs.h (enum innermost_block_tracker_type): New enum.
10071 (innermost_block_tracker::innermost_block_tracker): Initialise
10072 m_types member.
10073 (innermost_block_tracker::reset): Take type parameter.
10074 (innermost_block_tracker::update): Take type parameter, and pass
10075 type through as needed.
10076 (innermost_block_tracker::m_types): New member.
10077 * varobj.c (varobj_create): Pass type when reseting innermost
10078 block.
10079
aee1fcdf
AB
100802018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10081
10082 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
10083 * ada-lang.c (resolve_subexp): Likewise.
10084 * breakpoint.c (set_breakpoint_condition) Likewise.
10085 (watch_command_1) Likewise.
10086 * c-exp.y (variable): Likewise.
10087 * d-exp.y (PrimaryExpression): Likewise.
10088 * f-exp.y (variable): Likewise.
10089 * go-exp.y (variable): Likewise.
10090 * m2-exp.y (variable): Likewise.
10091 * objfiles.c (objfile::~objfile): Likewise.
10092 * p-exp.y (variable): Likewise.
10093 * parse.c (innermost_block): Change type.
10094 * parser-defs.h (class innermost_block_tracker): New.
10095 (innermost_block): Change to innermost_block_tracker.
10096 * printcmd.c (display_command): Switch to innermost_block API.
10097 (do_one_display): Likewise.
10098 * rust-exp.y (do_one_display): Likewise.
10099 * symfile.c (clear_symtab_users): Likewise.
10100 * varobj.c (varobj_create): Switch to innermost_block API, replace
10101 use of innermost_block with block stored on varobj object.
10102
396af9a1
AB
101032018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10104
10105 * expression.h (innermost_block): Remove declaration.
10106 * varobj.c: Add 'parser-defs.h' include.
10107
fcfcc376
TT
101082018-01-19 Tom Tromey <tom@tromey.com>
10109
10110 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
10111 symbols in the static and global blocks.
10112
5a6c3296
JC
101132018-01-19 James Clarke <jrtc27@jrtc27.com>
10114
10115 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
10116 gdb_ptrace.h, and move including gdb_wait.h ...
10117 * nat/linux-ptrace.h: ... to here.
10118
bc09b0c1
SM
101192018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10120
10121 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
10122 inf_ptrace_detach_success.
10123 (inf_ptrace_detach_success): Add inferior parameter, use it
10124 instead of inferior_ptid, pass it to detach_inferior.
10125 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
10126 parameter.
10127 * inferior.c (detach_inferior): Add overload that takes an
10128 inferior object.
10129 * inferior.h (detach_inferior): Likewise.
10130 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
10131 use inferior_ptid, adjust call to inf_ptrace_detach_success.
10132 * linux-thread-db.c (thread_db_detach): Use inf parameter.
10133
6e1e1966
SM
101342018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10135
10136 * target.h (struct target_ops) <to_detach>: Add inferior
10137 parameter.
10138 (target_detach): Likewise.
10139 * target.c (dispose_inferior): Pass inferior down.
10140 (target_detach): Pass inferior down. Assert that it is equal to
10141 the current inferior.
10142 * aix-thread.c (aix_thread_detach): Pass inferior down.
10143 * corefile.c (core_file_command): Pass current_inferior() down.
10144 * corelow.c (core_detach): Add inferior parameter.
10145 * darwin-nat.c (darwin_detach): Likewise.
10146 * gnu-nat.c (gnu_detach): Likewise.
10147 * inf-ptrace.c (inf_ptrace_detach): Likewise.
10148 * infcmd.c (detach_command): Pass current_inferior() down to
10149 target_detach.
10150 * infrun.c (follow_fork_inferior): Pass parent_inf to
10151 target_detach.
10152 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
10153 target_detach.
10154 * linux-nat.c (linux_nat_detach): Add inferior parameter.
10155 * linux-thread-db.c (thread_db_detach): Likewise.
10156 * nto-procfs.c (procfs_detach): Likewise.
10157 * procfs.c (procfs_detach): Likewise.
10158 * record.c (record_detach): Likewise.
10159 * record.h (struct inferior): Forward-declare.
10160 (record_detach): Add inferior parameter.
10161 * remote-sim.c (gdbsim_detach): Likewise.
10162 * remote.c (remote_detach_1): Likewise.
10163 (remote_detach): Likewise.
10164 (extended_remote_detach): Likewise.
10165 * sol-thread.c (sol_thread_detach): Likewise.
10166 * target-debug.h (target_debug_print_inferior_p): New macro.
10167 * target-delegates.c: Re-generate.
10168 * top.c (kill_or_detach): Pass inferior down to target_detach.
10169 * windows-nat.c (windows_detach): Add inferior parameter.
10170
6bd6f3b6
SM
101712018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10172
10173 * target.h (struct target_ops) <to_detach>: Remove args
10174 parameter.
10175 (target_detach): Likewise.
10176 * target.c (dispose_inferior): Adjust.
10177 (target_detach): Remove args parameter, adjust.
10178 * aix-thread.c (aix_thread_detach): Adjust.
10179 * corefile.c (core_file_command): Adjust.
10180 * corelow.c (core_detach): Adjust.
10181 * darwin-nat.c (darwin_detach): Adjust.
10182 * gnu-nat.c (gnu_detach): Adjust.
10183 * inf-ptrace.c (inf_ptrace_detach): Adjust.
10184 * infcmd.c (detach_command): Adjust
10185 * infrun.c (follow_fork_inferior): Adjust.
10186 (handle_vfork_child_exec_or_exit): Adjust.
10187 * linux-fork.c (linux_fork_detach): Remove args parameter.
10188 * linux-fork.h (linux_fork_detach): Likewise.
10189 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
10190 * linux-thread-db.c (thread_db_detach): Likewise.
10191 * nto-procfs.c (procfs_detach): Likewise.
10192 * procfs.c (procfs_detach): Likewise.
10193 (do_detach): Remove signo parameter.
10194 * record.c (record_detach): Remove args parameter.
10195 * record.h (record_detach): Likewise.
10196 * remote-sim.c (gdbsim_detach): Likewise.
10197 * remote.c (remote_detach_1): Likewise.
10198 (remote_detach): Likewise.
10199 (extended_remote_detach): Likewise.
10200 * sol-thread.c (sol_thread_detach): Likewise.
10201 * target-delegates.c: Re-generate.
10202 * top.c (struct qt_args) <args>: Remove field.
10203 (kill_or_detach): Don't pass args.
10204 (quit_force): Don't set args.
10205 * windows-nat.c (windows_detach): Remove args parameter.
10206
88af8ea8
YQ
102072018-01-19 Yao Qi <yao.qi@linaro.org>
10208
10209 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
10210 (arm_linux_init_abi): Install it.
10211
dea445b9
YQ
102122018-01-19 Yao Qi <yao.qi@linaro.org>
10213
10214 * osabi.c (gdb_osabi_names): Extend the regexp for
10215 arm-linux-gnueabihf.
10216
4a17f768
YQ
102172018-01-18 Yao Qi <yao.qi@linaro.org>
10218
10219 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
10220 m_abbrevs.
10221 (abbrev_table::add_abbrev): Update.
10222 (abbrev_table::lookup_abbrev): Update.
10223
d679c21a
YQ
102242018-01-18 Yao Qi <yao.qi@linaro.org>
10225
10226 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
10227
7d937cad
SDJ
102282018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
10229
10230 * compile/compile.c (compile_to_object): Convert "triplet_rx"
10231 to "std::string".
10232
9e14690d
TT
102332018-01-17 Tom Tromey <tom@tromey.com>
10234
10235 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
10236
50a82047
TT
102372018-01-17 Tom Tromey <tom@tromey.com>
10238
10239 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
10240 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
10241 (create_array_type_with_stride): Update.
10242 * dwarf2read.c (set_die_type): Update.
10243
c89b44cd
TT
102442018-01-17 Tom Tromey <tom@tromey.com>
10245
10246 * dwarf2read.c (delayed_method_info): Remove typedef.
10247 (dwarf2_cu::method_info): Now a std::vector.
10248 (add_to_method_list): Update.
10249 (free_delayed_list): Remove.
10250 (compute_delayed_physnames): Update.
10251 (process_full_comp_unit, process_full_type_unit): Clear the method
10252 list. Remove cleanups.
10253 (psymtab_include_file_name): Add name_holder parameter. Use
10254 unique_xmalloc_ptr.
10255 (dwarf_decode_lines): Update.
10256
fcd3b13d
SM
102572018-01-17 Tom Tromey <tom@tromey.com>
10258 Simon Marchi <simon.marchi@ericsson.com>
10259
10260 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
10261 (dwarf2_per_objfile::free_cached_comp_units)
10262 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10263 (init_cutu_and_read_dies_no_follow): Update.
10264 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
10265 (dwarf2_cu::~dwarf2_cu): New.
10266 (free_heap_comp_unit, free_stack_comp_unit): Remove.
10267 (age_cached_comp_units, free_one_cached_comp_unit): Update.
10268
685af9cd
TT
102692018-01-17 Tom Tromey <tom@tromey.com>
10270 Simon Marchi <simon.marchi@ericsson.com>
10271
10272 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
10273 (struct die_reader_specs) <abbrev_table>: New member.
10274 (struct abbrev_table): Add constructor.
10275 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
10276 <abbrev_obstack>: Now an auto_obstack.
10277 (abbrev_table_up): New typedef.
10278 (init_cu_die_reader): Add abbrev_table parameter.
10279 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
10280 Add result_dwo_abbrev_table.
10281 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10282 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
10283 Update.
10284 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
10285 parameter.
10286 (skip_children): Update.
10287 (abbrev_table::alloc_abbrev): Rename from
10288 abbrev_table_alloc_abbrev.
10289 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
10290 (abbrev_table::lookup_abbrev): Rename from
10291 abbrev_table_lookup_abbrev.
10292 (abbrev_table_read_table): Return abbrev_table_up.
10293 (abbrev_table_free, abbrev_table_free_cleanup)
10294 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
10295 (load_partial_dies): Update.
10296
5e2db402
TT
102972018-01-17 Tom Tromey <tom@tromey.com>
10298
10299 * dwarf2read.c (dwarf2_compute_name): Update comment.
10300 (read_func_scope, read_variable): Update.
10301 (new_symbol): Remove.
10302 (new_symbol_full): Rename to new_symbol.
10303
ee7f689e 103042018-01-17 Mike Gulick <mgulick@mathworks.com>
41667530
MG
10305
10306 PR gdb/16577
10307 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
10308 a warning instead of throwing an error, set section size to 0 and return
10309 NULL.
10310 * gdb_bfd.h (gdb_bfd_map_section): Update description.
10311
4d9b86e1
SM
103122018-01-17 Simon Marchi <simon.marchi@ericsson.com>
10313
10314 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
10315 std::string.
10316 (linux_ptrace_attach_fail_reason_string): Likewise.
10317 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
10318 Likewise.
10319 (linux_ptrace_attach_fail_reason_string): Likewise.
10320 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
10321
a7b2d0fb
SM
103222018-01-17 Simon Marchi <simon.marchi@ericsson.com>
10323
10324 * linux-nat.c (linux_nat_attach): Remove xstrdup.
10325
f517c180
EA
103262018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
10327
10328 PR gdb/21559
10329 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
10330 checking for fs_base/gs_base fields in struct user_regs_struct.
10331 * configure: Regenerate.
10332
7045b1ca
YQ
103332018-01-17 Yao Qi <yao.qi@linaro.org>
10334
10335 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
10336 function.
10337 (aarch64_linux_init_abi): Install it to gdbarch hook
10338 gcc_target_options.
10339
db422fb2
PA
103402018-01-15 Pedro Alves <palves@redhat.com>
10341
10342 * common/signals-state-save-restore.c
10343 (save_original_signals_state): Fix typos.
10344
ba643918
SDJ
103452017-01-12 Tom Tromey <tom@tromey.com>
10346 Sergio Durigan Junior <sergiodj@redhat.com>
10347
10348 * Makefile.in (install-only): Install gdb-add-index.
10349
906b4aac
JB
103502018-01-12 John Baldwin <jhb@FreeBSD.org>
10351
10352 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
10353
bdf2a94a
AA
103542018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
10355
10356 * infrun.c (keep_going_pass_signal): Clear step-over info when
10357 insert_breakpoints fails.
10358
71d378ae
PA
103592018-01-11 Pedro Alves <palves@redhat.com>
10360
10361 PR gdb/22583
10362 * infrun.c (resume): Rename to ...
10363 (resume_1): ... this.
10364 (resume): Reimplement as wrapper around resume_1.
10365
3cada740
PA
103662018-01-11 Pedro Alves <palves@redhat.com>
10367
10368 PR remote/22597
10369 * remote.c (remote_parse_stop_reply): Default to the last-set
10370 general thread instead of to 'magic_null_ptid'.
10371
618daa93
PA
103722018-01-10 Pedro Alves <palves@redhat.com>
10373
10374 * language.h (language_get_symbol_name_matcher): Rename ...
10375 (get_symbol_name_matcher): ... this.
10376 * language.c (language_get_symbol_name_matcher): Ditto.
10377 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
10378 callers adjusted.
10379
c63d3e8d
PA
103802018-01-10 Pedro Alves <palves@redhat.com>
10381
10382 PR gdb/22670
10383 * dwarf2read.c
10384 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
10385 Adjust to use language_get_symbol_name_matcher instead of
10386 language_defn::la_get_symbol_name_matcher.
10387 * language.c (language_get_symbol_name_matcher): If in Ada mode
10388 and the lookup name is a verbatim match, return Ada's matcher.
10389 * language.h (language_get_symbol_name_matcher): Adjust comment.
10390 (ada_lookup_name_info::verbatim_p):: New method.
10391
d4c2a405
PA
103922018-01-10 Pedro Alves <palves@redhat.com>
10393
10394 PR gdb/22670
10395 * ada-lang.c (ada_collect_symbol_completion_matches): If the
10396 minsym's language is language_auto or language_cplus, pass down
10397 language_ada instead.
10398 * symtab.c (compare_symbol_name): Don't frob symbol language here.
10399
8825213e
PA
104002018-01-10 Pedro Alves <palves@redhat.com>
10401
10402 PR gdb/22670
10403 * minsyms.c (linkage_name_str): New function.
10404 (iterate_over_minimal_symbols): Use it.
10405
2d97a5d9
JB
104062018-01-09 John Baldwin <jhb@FreeBSD.org>
10407
10408 * NEWS: Document that 'info proc' now works on FreeBSD.
10409
92fce24d
JB
104102018-01-09 John Baldwin <jhb@FreeBSD.org>
10411
10412 * configure.ac: Check for kinfo_getfile in libutil.
10413 * configure: Regenerate.
10414 * config.in: Regenerate.
10415 * fbsd-nat.c: Include "fbsd-tdep.h".
10416 (fbsd_fetch_cmdline): New.
10417 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
10418 rather than calling error.
10419 (fbsd_info_proc): New.
10420 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
10421 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
10422 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
10423
262f62f5
JB
104242018-01-09 John Baldwin <jhb@FreeBSD.org>
10425
10426 * fbsd-nat.c (struct free_deleter): Remove.
10427 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
10428
b999e203
JB
104292018-01-09 John Baldwin <jhb@FreeBSD.org>
10430
10431 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
10432 NULL for an empty pathname.
10433
d2176225
JB
104342018-01-09 John Baldwin <jhb@FreeBSD.org>
10435
10436 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
10437 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
10438 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
10439 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
10440 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
10441 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
10442 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
10443 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
10444 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
10445 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
10446 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
10447 (fbsd_core_fetch_timeval, fbsd_print_sigset)
10448 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
10449 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
10450 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
10451
9c4ac400
ST
104522018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
10453
10454 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
10455 (gnu_xfer_auxv): New function.
10456 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
10457 TARGET_OBJECT_AUXV.
10458
1e5ded6c
YQ
104592018-01-08 Yao Qi <yao.qi@linaro.org>
10460 Simon Marchi <simon.marchi@ericsson.com>
10461
10462 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
10463 common/selftest.c.
10464 (COMMON_OBS): Remove selftest.o.
10465 * configure.ac: Append selftest-arch.c and common/selftest.c to
10466 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
10467 * configure: Re-generated.
10468 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
10469 GDB_SELF_TEST.
10470 (maintenance_info_selftests): Likewise.
10471
04bafb1e
XR
104722018-01-08 Xavier Roirand <roirand@adacore.com>
10473
10474 * ada-valprint.c (val_print_packed_array_elements): Use
10475 proper number of elements when printing an array indexed
10476 by an enumeration type.
10477
518817b3
SM
104782018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10479
10480 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
10481 (dw2_get_file_names_reader): Adjust.
10482 (lookup_dwo_signatured_type): Adjust.
10483 (lookup_dwp_signatured_type): Adjust.
10484 (lookup_signatured_type): Adjust.
10485 (create_type_unit_group): Adjust.
10486 (get_type_unit_group): Adjust.
10487 (process_psymtab_comp_unit_reader): Adjust.
10488 (build_type_psymtabs_reader): Adjust.
10489 (scan_partial_symbols): Adjust.
10490 (add_partial_symbol): Adjust.
10491 (add_partial_subprogram): Adjust.
10492 (peek_die_abbrev): Adjust.
10493 (fixup_go_packaging): Adjust.
10494 (process_imported_unit_die): Adjust.
10495 (dwarf2_compute_name): Adjust.
10496 (dwarf2_physname): Adjust.
10497 (read_import_statement): Adjust.
10498 (handle_DW_AT_stmt_list): Adjust.
10499 (read_file_scope): Adjust.
10500 (read_func_scope): Adjust.
10501 (read_lexical_block_scope): Adjust.
10502 (read_call_site_scope): Adjust.
10503 (read_variable): Adjust.
10504 (dwarf2_rnglists_process): Adjust.
10505 (dwarf2_ranges_process): Adjust.
10506 (dwarf2_ranges_read): Adjust.
10507 (dwarf2_get_pc_bounds): Adjust.
10508 (dwarf2_record_block_ranges): Adjust.
10509 (dwarf2_add_field): Adjust.
10510 (dwarf2_add_member_fn): Adjust.
10511 (read_structure_type): Adjust.
10512 (process_structure_scope): Adjust.
10513 (read_enumeration_type): Adjust.
10514 (read_array_type): Adjust.
10515 (mark_common_block_symbol_computed): Adjust.
10516 (read_common_block): Adjust.
10517 (read_namespace_type): Adjust.
10518 (read_namespace): Adjust.
10519 (read_module_type): Adjust.
10520 (read_tag_pointer_type): Adjust.
10521 (read_tag_ptr_to_member_type): Adjust.
10522 (read_tag_string_type): Adjust.
10523 (read_subroutine_type): Adjust.
10524 (read_typedef): Adjust.
10525 (read_base_type): Adjust.
10526 (attr_to_dynamic_prop): Adjust.
10527 (read_subrange_type): Adjust.
10528 (read_unspecified_type): Adjust.
10529 (dwarf2_read_abbrevs): Adjust.
10530 (load_partial_dies): Adjust.
10531 (read_partial_die): Adjust.
10532 (find_partial_die): Adjust.
10533 (guess_partial_die_structure_name): Adjust.
10534 (fixup_partial_die): Adjust.
10535 (read_attribute_value): Adjust.
10536 (read_addr_index): Adjust.
10537 (read_addr_index_from_leb128): Adjust.
10538 (read_str_index): Adjust.
10539 (dwarf2_string_attr): Adjust.
10540 (get_debug_line_section): Adjust.
10541 (dwarf_decode_line_header): Adjust.
10542 (lnp_state_machine::check_line_address): Adjust.
10543 (dwarf_decode_lines_1): Adjust.
10544 (dwarf_decode_lines): Adjust.
10545 (dwarf2_start_symtab): Adjust.
10546 (var_decode_location): Adjust.
10547 (new_symbol_full): Adjust.
10548 (dwarf2_const_value_data): Adjust.
10549 (dwarf2_const_value_attr): Adjust.
10550 (dwarf2_const_value): Adjust.
10551 (die_type): Adjust.
10552 (die_containing_type): Adjust.
10553 (build_error_marker_type): Adjust.
10554 (lookup_die_type): Adjust.
10555 (guess_full_die_structure_name): Adjust.
10556 (anonymous_struct_prefix): Adjust.
10557 (determine_prefix): Adjust.
10558 (dwarf2_name): Adjust.
10559 (follow_die_ref_or_sig): Adjust.
10560 (follow_die_offset): Adjust.
10561 (follow_die_ref): Adjust.
10562 (follow_die_sig_1): Adjust.
10563 (follow_die_sig): Adjust.
10564 (get_signatured_type): Adjust.
10565 (get_DW_AT_signature_type): Adjust.
10566 (decode_locdesc): Adjust.
10567 (dwarf_decode_macros): Adjust.
10568 (cu_debug_loc_section): Adjust.
10569 (fill_in_loclist_baton): Adjust.
10570 (dwarf2_symbol_mark_computed): Adjust.
10571 (init_one_comp_unit): Don't assign
10572 dwarf2_cu::dwarf2_per_objfile.
10573 (set_die_type): Adjust.
10574
ed2dc618
SM
105752018-01-07 Simon Marchi <simon.marchi@ericsson.com>
10576
10577 * dwarf2read.c (struct mapped_debug_names): Add constructor.
10578 <dwarf2_per_objfile>: New field.
10579 (dwarf2_per_objfile): Remove global.
10580 (get_dwarf2_per_objfile): New function.
10581 (set_dwarf2_per_objfile): New function.
10582 (dwarf2_build_psymtabs_hard): Change objfile parameter to
10583 dwarf2_per_objfile.
10584 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
10585 (read_abbrev_offset): Likewise.
10586 (read_indirect_string): Likewise.
10587 (read_indirect_line_string): Likewise.
10588 (read_indirect_string_at_offset): Likewise.
10589 (read_indirect_string_from_dwz): Likewise.
10590 (dwarf2_find_containing_comp_unit): Change objfile parameter to
10591 dwarf2_per_objfile.
10592 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
10593 (create_all_comp_units): Change objfile parameter to
10594 dwarf2_per_objfile.
10595 (create_all_type_units): Likewise.
10596 (process_queue): Add dwarf2_per_objfile parameter.
10597 (read_and_check_comp_unit_head): Likewise.
10598 (lookup_dwo_unit_in_dwp): Likewise.
10599 (get_dwp_file): Likewise.
10600 (process_cu_includes): Likewise.
10601 (struct free_dwo_file_cleanup_data): New struct.
10602 (dwarf2_has_info): Use get_dwarf2_per_objfile and
10603 set_dwarf2_per_objfile.
10604 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
10605 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
10606 context, adjust calls.
10607 (dw2_instantiate_symtab): Likewise.
10608 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
10609 (dw2_get_cu): Likewise.
10610 (create_cu_from_index_list): Change objfile parameter to
10611 dwarf2_per_objfile.
10612 (create_cus_from_index_list): Get dwarf2_per_objfile from
10613 context, adjust calls.
10614 (create_cus_from_index): Likewise.
10615 (create_signatured_type_table_from_index): Change objfile
10616 parameter to dwarf2_per_objfile.
10617 (create_signatured_type_table_from_debug_names): Change objfile
10618 parameter to dwarf2_per_objfile.
10619 (create_addrmap_from_index): Likewise.
10620 (create_addrmap_from_aranges): Likewise.
10621 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
10622 (dw2_setup): Remove.
10623 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
10624 context.
10625 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
10626 get_dwarf2_per_objfile.
10627 (dw2_forget_cached_source_info): Likewise.
10628 (dw2_map_symtabs_matching_filename): Likewise.
10629 (struct dw2_symtab_iterator) <index>: Remove.
10630 <dwarf2_per_objfile>: New field.
10631 (dw2_symtab_iter_init): Replace index parameter with
10632 dwarf2_per_objfile.
10633 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
10634 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
10635 (dw2_print_stats): Likewise.
10636 (dw2_dump): Likewise.
10637 (dw2_expand_symtabs_for_function): Likewise.
10638 (dw2_expand_all_symtabs): Likewise.
10639 (dw2_expand_symtabs_with_fullname): Likewise.
10640 (dw2_expand_marked_cus): Replace index and objfile parameters
10641 with dwarf2_per_objfile.
10642 (dw_expand_symtabs_matching_file_matcher): Add
10643 dwarf2_per_objfile parameter and adjust calls.
10644 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
10645 adjust calls.
10646 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
10647 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
10648 adjust calls.
10649 (create_cus_from_debug_names_list): Replace objfile parameter
10650 with dwarf2_per_objfile and adjust calls.
10651 (create_cus_from_debug_names): Likewise.
10652 (dwarf2_read_debug_names): Likewise.
10653 (mapped_debug_names::namei_to_name): Adjust call.
10654 (dw2_debug_names_iterator::next): Likewise.
10655 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
10656 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
10657 (dw2_debug_names_dump): Likewise.
10658 (dw2_debug_names_expand_symtabs_for_function): Likewise.
10659 (dw2_debug_names_expand_symtabs_matching): Likewise.
10660 (dwarf2_initialize_objfile): Likewise.
10661 (dwarf2_build_psymtabs): Likewise.
10662 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
10663 this_cu.
10664 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
10665 (read_and_check_comp_unit_head): Likewise.
10666 (read_abbrev_offset): Likewise.
10667 (create_debug_type_hash_table): Likewise.
10668 (create_debug_types_hash_table): Likewise.
10669 (create_all_type_units): Replace objfile parameter with
10670 dwarf2_per_objfile.
10671 (add_type_unit): Add dwarf2_per_objfile parameter.
10672 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
10673 with dwarf2_per_objfile.
10674 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
10675 (lookup_dwp_signatured_type): Likewise.
10676 (lookup_signatured_type): Likewise.
10677 (read_cutu_die_from_dwo): Likewise.
10678 (init_tu_and_read_dwo_dies): Likewise.
10679 (init_cutu_and_read_dies): Likewise.
10680 (init_cutu_and_read_dies_no_follow): Likewise.
10681 (allocate_type_unit_groups_table): Add objfile parameter.
10682 (create_type_unit_group): Use dwarf2_per_objfile from cu.
10683 (get_type_unit_group): Likewise.
10684 (process_psymtab_comp_unit): Update call.
10685 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
10686 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
10687 (print_tu_stats): Likewise.
10688 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
10689 in void* parameter.
10690 (build_type_psymtabs): Change objfile parameter to
10691 dwarf2_per_objfile.
10692 (process_skeletonless_type_unit): Use dwarf2_per_objfile
10693 passed in void* parameter.
10694 (process_skeletonless_type_units): Change objfile parameter to
10695 dwarf2_per_objfile.
10696 (set_partial_user): Likewise.
10697 (dwarf2_build_psymtabs_hard): Likewise.
10698 (read_comp_units_from_section): Likewise.
10699 (create_all_comp_units): Likewise.
10700 (scan_partial_symbols): Update calls.
10701 (add_partial_symbol): Likewise.
10702 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
10703 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
10704 (process_queue): Add dwarf2_per_objfile parameter.
10705 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
10706 (compute_compunit_symtab_includes): Likewise.
10707 (process_cu_includes): Add dwarf2_per_objfile parameter.
10708 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
10709 (process_full_type_unit): Likewise.
10710 (process_imported_unit_die): Update call.
10711 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
10712 (read_file_scope): Likewise.
10713 (allocate_dwo_file_hash_table): Add objfile parameter.
10714 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
10715 (create_cus_hash_table): Likewise.
10716 (create_dwp_hash_table): Likewise.
10717 (create_dwo_unit_in_dwp_v1): Likewise.
10718 (create_dwp_v2_section): Likewise.
10719 (create_dwo_unit_in_dwp_v2): Likewise.
10720 (lookup_dwo_unit_in_dwp): Likewise.
10721 (try_open_dwop_file): Likewise.
10722 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
10723 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
10724 cleanup to include a reference to dwarf2_per_objfile.
10725 (open_dwp_file): Add dwarf2_per_objfile parameter.
10726 (open_and_init_dwp_file): Likewise.
10727 (get_dwp_file): Likewise.
10728 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
10729 (queue_and_load_all_dwo_tus): Update call.
10730 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
10731 data.
10732 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
10733 (dwarf2_ranges_process): Likewise.
10734 (dwarf2_get_pc_bounds): Likewise.
10735 (mark_common_block_symbol_computed): Likewise.
10736 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
10737 (dwarf2_read_abbrevs): Update call.
10738 (read_partial_die): Use dwarf2_per_objfile from cu.
10739 (find_partial_die): Likewise.
10740 (fixup_partial_die): Likewise.
10741 (read_attribute_value): Likewise.
10742 (read_indirect_string_at_offset_from): Add objfile parameter.
10743 (read_indirect_string_at_offset): Add dwarf2_per_objfile
10744 parameter.
10745 (read_indirect_string_from_dwz): Add objfile parameter.
10746 (read_indirect_string): Add objfile parameter.
10747 (read_addr_index_1): Add dwarf2_per_objfile parameter.
10748 (read_addr_index): Use dwarf2_per_objfile from cu.
10749 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
10750 call dw2_setup.
10751 (read_str_index): Use dwarf2_per_objfile from cu.
10752 (get_debug_line_section): Likewise.
10753 (read_formatted_entries): Add dwarf2_per_objfile parameter.
10754 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
10755 (new_symbol_full): Use dwarf2_per_objfile from cu.
10756 (build_error_marker_type): Likewise.
10757 (lookup_die_type): Likewise.
10758 (determine_prefix): Likewise.
10759 (follow_die_offset): Likewise.
10760 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
10761 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
10762 (dwarf2_fetch_die_type_sect_off): Likewise.
10763 (dwarf2_get_die_type): Likewise.
10764 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
10765 (get_signatured_type): Likewise.
10766 (get_DW_AT_signature_type): Likewise.
10767 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
10768 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
10769 (cu_debug_loc_section): Likewise.
10770 (fill_in_loclist_baton): Likewise.
10771 (dwarf2_symbol_mark_computed): Likewise.
10772 (dwarf2_find_containing_comp_unit): Change objfile parameter to
10773 dwarf2_per_objfile.
10774 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
10775 parameter.
10776 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
10777 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
10778 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
10779 (set_die_type): Use dwarf2_free_objfile from cu.
10780 (get_die_type_at_offset): Likewise.
10781 (dwarf2_per_objfile_free): Don't assign global variable.
10782 (debug_names) <constructor>: Add dwarf2_per_objfile
10783 parameter, update m_debugstrlookup construction.
10784 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
10785 parameter.
10786 <m_dwarf2_per_objfile>: New field.
10787 <lookup>: Use m_dwarf2_per_objfile.
10788 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
10789 (psyms_seen_size): Likewise.
10790 (write_gdbindex): Replace objfile parameter with
10791 dwarf2_per_objfile.
10792 (write_debug_names): Likewise.
10793 (write_psymtabs_to_index): Likewise.
10794 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
10795 calls.
10796
e3b94546
SM
107972018-01-07 Simon Marchi <simon.marchi@ericsson.com>
10798
10799 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
10800 <dwarf2_per_objfile>: New field.
10801 (struct dwarf2_per_cu_data) <objfile>: Remove.
10802 <dwarf2_per_objfile>: New field.
10803 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
10804 of objfile.
10805 (create_signatured_type_table_from_index): Likewise.
10806 (create_debug_type_hash_table): Likewise.
10807 (fill_in_sig_entry_from_dwo_entry): Likewise.
10808 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
10809 (create_type_unit_group): Assign dwarf2_per_objfile instead of
10810 objfile.
10811 (create_partial_symtab): Access objfile through
10812 dwarf2_per_objfile.
10813 (process_psymtab_comp_unit_reader): Likewise.
10814 (read_comp_units_from_section): Likewise.
10815 (scan_partial_symbols): Likewise.
10816 (add_partial_symbol): Likewise.
10817 (add_partial_subprogram): Likewise.
10818 (peek_die_abbrev): Likewise.
10819 (fixup_go_packaging): Likewise.
10820 (process_full_comp_unit): Likewise.
10821 (process_full_type_unit): Likewise.
10822 (process_imported_unit_die): Likewise.
10823 (dwarf2_compute_name): Likewise.
10824 (dwarf2_physname): Likewise.
10825 (read_import_statement): Likewise.
10826 (create_cus_hash_table): Assign dwarf2_physname instead of
10827 objfile.
10828 (read_func_scope): Access objfile through dwarf2_per_objfile.
10829 (read_lexical_block_scope): Likewise.
10830 (read_call_site_scope): Likewise.
10831 (read_variable): Likewise.
10832 (dwarf2_rnglists_process): Likewise.
10833 (dwarf2_ranges_process): Likewise.
10834 (dwarf2_ranges_read): Likewise.
10835 (dwarf2_record_block_ranges): Likewise.
10836 (dwarf2_add_field): Likewise.
10837 (dwarf2_add_member_fn): Likewise.
10838 (read_structure_type): Likewise.
10839 (process_structure_scope): Likewise.
10840 (read_enumeration_type): Likewise.
10841 (read_array_type): Likewise.
10842 (read_common_block): Likewise.
10843 (read_namespace_type): Likewise.
10844 (read_namespace): Likewise.
10845 (read_module_type): Likewise.
10846 (read_tag_pointer_type): Likewise.
10847 (read_tag_ptr_to_member_type): Likewise.
10848 (read_tag_string_type): Likewise.
10849 (read_subroutine_type): Likewise.
10850 (read_typedef): Likewise.
10851 (read_base_type): Likewise.
10852 (attr_to_dynamic_prop): Likewise.
10853 (read_subrange_type): Likewise.
10854 (read_unspecified_type): Likewise.
10855 (load_partial_dies): Likewise.
10856 (read_partial_die): Likewise.
10857 (find_partial_die): Likewise.
10858 (guess_partial_die_structure_name): Likewise.
10859 (fixup_partial_die): Likewise.
10860 (read_attribute_value): Likewise.
10861 (read_addr_index_from_leb128): Likewise.
10862 (dwarf2_read_addr_index): Likewise.
10863 (dwarf2_string_attr): Likewise.
10864 (lnp_state_machine::check_line_address): Likewise.
10865 (dwarf_decode_lines_1): Likewise.
10866 (dwarf_decode_lines): Likewise.
10867 (dwarf2_start_symtab): Likewise.
10868 (var_decode_location): Likewise.
10869 (new_symbol_full): Likewise.
10870 (dwarf2_const_value_data): Likewise.
10871 (dwarf2_const_value_attr): Likewise.
10872 (dwarf2_const_value): Likewise.
10873 (die_type): Likewise.
10874 (die_containing_type): Likewise.
10875 (lookup_die_type): Likewise.
10876 (guess_full_die_structure_name): Likewise.
10877 (anonymous_struct_prefix): Likewise.
10878 (dwarf2_name): Likewise.
10879 (follow_die_ref_or_sig): Likewise.
10880 (follow_die_offset): Likewise.
10881 (follow_die_ref): Likewise.
10882 (dwarf2_fetch_die_loc_sect_off): Likewise.
10883 (dwarf2_fetch_constant_bytes): Likewise.
10884 (dwarf2_fetch_die_type_sect_off): Likewise.
10885 (dwarf2_get_die_type): Likewise.
10886 (follow_die_sig): Likewise.
10887 (decode_locdesc): Likewise.
10888 (dwarf2_per_cu_objfile): Likewise.
10889 (dwarf2_per_cu_text_offset): Likewise.
10890 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
10891 objfile.
10892 (set_die_type): Access objfile through
10893 dwarf2_per_objfile.
10894
b01ba14d
SM
108952018-01-07 Simon Marchi <simon.marchi@ericsson.com>
10896
10897 * valprint.c (converted_character_d): Remove typedef.
10898 (DEF_VEC_O (converted_character_d)): Remove.
10899 (count_next_character): Use std::vector.
10900 (print_converted_chars_to_obstack): Likewise.
10901 (generic_printstr): Likewise.
10902
4d0fdd9b
SM
109032018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10904
10905 * xml-support.h (struct gdb_xml_value): Add constructor.
10906 <value>: Change type to unique_xmalloc_ptr.
10907 (gdb_xml_value_s): Remove typedef.
10908 (DEF_VEC_O (gdb_xml_value_s)): Remove.
10909 (gdb_xml_element_start_handler): Change parameter type to
10910 std::vector.
10911 (xml_find_attribute): Likewise.
10912 * xml-support.c (xml_find_attribute): Change parameter type to
10913 std::vector and adjust.
10914 (gdb_xml_values_cleanup): Remove.
10915 (gdb_xml_parser::start_element): Adjust to std::vector.
10916 (xinclude_start_include): Change paraeter type to std::vector
10917 and adjust.
10918 * btrace.c (check_xml_btrace_version): Likewise.
10919 (parse_xml_btrace_block): Likewise.
10920 (parse_xml_btrace_pt_config_cpu): Likewise.
10921 (parse_xml_btrace_pt): Likewise.
10922 (parse_xml_btrace_conf_bts): Likewise.
10923 (parse_xml_btrace_conf_pt): Likewise.
10924 * memory-map.c (memory_map_start_memory): Likewise.
10925 (memory_map_start_property): Likewise.
10926 * osdata.c (osdata_start_osdata): Likewise.
10927 (osdata_start_item): Likewise.
10928 (osdata_start_column): Likewise.
10929 * remote.c (start_thread): Likewise.
10930 * solib-aix.c (library_list_start_library): Likewise.
10931 (library_list_start_list): Likewise.
10932 * solib-svr4.c (library_list_start_library): Likewise.
10933 (svr4_library_list_start_list): Likewise.
10934 * solib-target.c (library_list_start_segment): Likewise.
10935 (library_list_start_section): Likewise.
10936 (library_list_start_library): Likewise.
10937 (library_list_start_list): Likewise.
10938 * tracepoint.c (traceframe_info_start_memory): Likewise.
10939 (traceframe_info_start_tvar): Likewise.
10940 * xml-syscall.c (syscall_start_syscall): Likewise.
10941 * xml-tdesc.c (tdesc_start_target): Likewise.
10942 (tdesc_start_feature): Likewise.
10943 (tdesc_start_reg): Likewise.
10944 (tdesc_start_union): Likewise.
10945 (tdesc_start_struct): Likewise.
10946 (tdesc_start_flags): Likewise.
10947 (tdesc_start_enum): Likewise.
10948 (tdesc_start_field): Likewise.
10949 (tdesc_start_enum_value): Likewise.
10950 (tdesc_start_vector): Likewise.
10951
f979c73f
SM
109522018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10953
10954 * extension.h (struct xmethod_worker) <clone>: Remove.
10955 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
10956 Remove.
10957 (python_xmethod_worker::clone): Remove.
10958 * valops.c (find_overload_match): Use std::move instead of
10959 clone.
10960
ba18742c
SM
109612018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10962
10963 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
10964 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
10965 <free_xmethod_worker_data>: Remove.
10966 <get_matching_xmethod_workers>: Chance VEC to std::vector.
10967 <get_xmethod_arg_types>: Remove.
10968 <get_xmethod_result_type>: Remove.
10969 <invoke_xmethod>: Remove.
10970 * extension.c (new_xmethod_worker): Remove.
10971 (clone_xmethod_worker): Remove.
10972 (get_matching_xmethod_workers): Return void, pass std::vector by
10973 pointer.
10974 (get_xmethod_arg_types): Rename to...
10975 (xmethod_worker::get_arg_types): ... this, and adjust.
10976 (get_xmethod_result_type): Rename to...
10977 (xmethod_worker::get_result_type): ... this, and adjust.
10978 (invoke_xmethod): Remove.
10979 (free_xmethod_worker): Remove.
10980 (free_xmethod_worker_vec): Remove.
10981 * extension.h (enum ext_lang_rc): Move here from
10982 extension-priv.h.
10983 (struct xmethod_worker): Add constructor and destructor.
10984 <data>: Remove.
10985 <value>: Remove.
10986 <invoke, clone, do_get_result_type, do_get_arg_types>: New
10987 virtual pure methods.
10988 <get_arg_types, get_result_type>: New methods.
10989 (xmethod_worker_ptr): Remove typedef.
10990 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
10991 (xmethod_worker_vec): Remove typedef.
10992 (xmethod_worker_up): New typedef.
10993 (invoke_xmethod): Remove.
10994 (clone_xmethod_worker): Remove.
10995 (free_xmethod_worker): Remove.
10996 (free_xmethod_worker_vec): Remove.
10997 (get_xmethod_arg_types): Remove.
10998 (get_xmethod_result_type): Remove.
10999 * valops.c (find_method_list): Use std::vector, don't use
11000 intermediate vector.
11001 (value_find_oload_method_list): Use std::vector.
11002 (find_overload_match): Use std::vector.
11003 (find_oload_champ): Use std::vector.
11004 * value.c (value_free): Use operator delete.
11005 (value_of_xmethod): Rename to...
11006 (value_from_xmethod): ... this. Don't assign
11007 xmethod_worker::value, take rvalue-reference.
11008 (result_type_of_xmethod): Adjust.
11009 (call_xmethod): Adjust.
11010 * value.h: Include extension.h.
11011 (struct xmethod_worker): Don't forward-declare.
11012 (value_of_xmethod): Rename to...
11013 (value_from_xmethod): ... this, take rvalue-reference.
11014 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
11015 (struct python_xmethod_worker): ... this, add constructor and
11016 destructor.
11017 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
11018 (gdbpy_free_xmethod_worker_data): Rename to...
11019 (python_xmethod_worker::~python_xmethod_worker): ... this and
11020 adjust.
11021 (gdbpy_clone_xmethod_worker_data): Rename to...
11022 (python_xmethod_worker::clone): ... this and adjust.
11023 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
11024 temporary vector.
11025 (gdbpy_get_xmethod_arg_types): Rename to...
11026 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
11027 (gdbpy_get_xmethod_result_type): Rename to...
11028 (python_xmethod_worker::do_get_result_type): ... this and
11029 adjust.
11030 (gdbpy_invoke_xmethod): Rename to...
11031 (python_xmethod_worker::invoke): ... this and adjust.
11032 (new_python_xmethod_worker): Rename to...
11033 (python_xmethod_worker::python_xmethod_worker): ... this and
11034 adjust.
11035 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
11036 Remove.
11037 (gdbpy_free_xmethod_worker_data): Remove.
11038 (gdbpy_get_matching_xmethod_workers): Use std::vector.
11039 (gdbpy_get_xmethod_arg_types): Remove.
11040 (gdbpy_get_xmethod_result_type): Remove.
11041 (gdbpy_invoke_xmethod): Remove.
11042 * python/python.c (python_extension_ops): Remove obsolete
11043 callbacks.
11044
e379cee6
PA
110452018-01-05 Pedro Alves <palves@redhat.com>
11046
11047 PR gdb/18653
11048 * common/signals-state-save-restore.c
11049 (save_original_signals_state): New parameter 'quiet'. Warn if we
11050 find a custom handler preinstalled, instead of internal erroring.
11051 But only warn if !quiet.
11052 * common/signals-state-save-restore.h
11053 (save_original_signals_state): New parameter 'quiet'.
11054 * main.c (captured_main_1): Move save_original_signals_state call
11055 after option handling, and pass QUIET.
11056
a655456c
PA
110572018-01-05 Pedro Alves <palves@redhat.com>
11058
11059 * spu-tdep.c (spu_catch_start): Pass
11060 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
11061
de63c46b
PA
110622018-01-05 Pedro Alves <palves@redhat.com>
11063
11064 PR gdb/22670
11065 * ada-lang.c (literal_symbol_name_matcher): New function.
11066 (ada_get_symbol_name_matcher): Use it for
11067 symbol_name_match_type::SEARCH_NAME.
11068 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
11069 it down instead of assuming symbol_name_match_type::FULL.
11070 * block.h (block_lookup_symbol): New parameter 'match_type'.
11071 * c-valprint.c (print_unpacked_pointer): Use
11072 lookup_symbol_search_name instead of lookup_symbol.
11073 * compile/compile-object-load.c (get_out_value_type): Pass down
11074 symbol_name_match_type::SEARCH_NAME.
11075 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
11076 symbol_name_match_type::FULL.
11077 * cp-support.c (cp_get_symbol_name_matcher): Handle
11078 symbol_name_match_type::SEARCH_NAME.
11079 * infrun.c (insert_exception_resume_breakpoint): Use
11080 lookup_symbol_search_name.
11081 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
11082 * psymtab.c (maintenance_check_psymtabs): Use
11083 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
11084 * stack.c (print_frame_args): Use lookup_symbol_search_name and
11085 SYMBOL_SEARCH_NAME.
11086 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
11087 if symbol_name_match_type::SEARCH_NAME.
11088 (lookup_symbol_in_language): Pass down
11089 symbol_name_match_type::FULL.
11090 (lookup_symbol_search_name): New.
11091 (lookup_language_this): Pass down
11092 symbol_name_match_type::SEARCH_NAME.
11093 (lookup_symbol_aux, lookup_local_symbol): New parameter
11094 'match_type'. Pass it down.
11095 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
11096 (lookup_symbol_search_name): New declaration.
11097 (lookup_symbol_in_block): New 'match_type' parameter.
11098
f98fc17b
PA
110992018-01-05 Pedro Alves <palves@redhat.com>
11100
11101 PR gdb/22670
11102 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
11103 ada_lookup_symbol.
11104 (ada_lookup_symbol): Reimplement in terms of
11105 ada_lookup_symbol_list, bits factored out from
11106 ada_lookup_encoded_symbol.
11107
342f8240
JB
111082018-01-05 Joel Brobecker <brobecker@adacore.com>
11109
11110 * ada-exp.y (write_object_renaming): When subscripting an array
11111 using a symbol as the index, pass the block in call to
11112 ada_lookup_encoded_symbol when looking that symbol up.
11113
7150d33c
JG
111142018-01-05 Jerome Guitton <guitton@adacore.com>
11115
11116 * ada-lang.c (ada_array_length): Use ada_index_type instead of
11117 TYPE_INDEX_TYPE.
11118
cc0e770c
JB
111192018-01-05 Joel Brobecker <brobecker@adacore.com>
11120
11121 * ada-lang.c (ada_to_fixed_value_create): Add handling of
11122 the case where VALUE_LVAL (val0) is not lval_memory.
11123
f79da888 111242018-01-05 Xavier Roirand <roirand@adacore.com>
e3861a03
XR
11125
11126 * ada-valprint.c (print_optional_low_bound): Handle
11127 character-indexed array printing like boolean-indexed array
11128 printing.
11129
cd385f94
JB
111302018-01-05 Joel Brobecker <brobecker@adacore.com>
11131
11132 * NEWS: Create a new section for the next release branch.
11133 Rename the section of the current branch, now that it has
11134 been cut.
11135
09aca949
JB
111362018-01-05 Joel Brobecker <brobecker@adacore.com>
11137
11138 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
11139 * version.in: Bump version to 8.1.50.DATE-git.
11140
9f757bf7
XR
111412018-01-03 Xavier Roirand <roirand@adacore.com>
11142
11143 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
11144 Add field.
11145 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
11146 Add field.
11147 (default_exception_support_info) <catch_handlers_sym>: Add field.
11148 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
11149 (ada_exception_name_addr_1): Add "catch handlers" handling.
11150 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
11151 Update all callers.
11152 (create_excep_cond_exprs) <ex>: Add parameter.
11153 (re_set_exception): Update create_excep_cond_exprs call.
11154 (print_it_exception, print_one_exception, print_mention_exception)
11155 (print_recreate_exception): Add "catch handler" handling.
11156 (allocate_location_catch_handlers, re_set_catch_handlers)
11157 (check_status_catch_handlers, print_it_catch_handlers)
11158 (print_one_catch_handlers, print_mention_catch_handlers)
11159 (print_recreate_catch_handlers): New function.
11160 (catch_handlers_breakpoint_ops): New variable.
11161 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
11162 Add parameter. Add "catch handler" handling.
11163 (ada_exception_sym_name, ada_exception_breakpoint_ops):
11164 Add "catch handler" handling.
11165 (ada_exception_catchpoint_cond_string): Add "catch handler"
11166 handling.
11167 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
11168 call.
11169 (catch_ada_handlers_command): New function.
11170 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
11171 operations structure.
11172 (_initialize_ada_language): Add "catch handlers" command entry.
11173 * NEWS: Document "catch handlers" feature.
11174
9fe561ab
JB
111752018-01-02 Joel Brobecker <brobecker@adacore.com>
11176
11177 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
11178 account when creating the array type of the slice.
11179 (ada_value_slice): Likewise.
11180
a405673c
JB
111812018-01-02 Joel Brobecker <brobecker@adacore.com>
11182
11183 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
11184 New enum value.
11185 (create_array_type_with_stride): Add byte_stride_prop parameter.
11186 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
11187 New parameter. Update all callers in this file.
11188 (array_type_has_dynamic_stride): New function.
11189 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
11190 of arrays with dynamic byte strides.
11191 * dwarf2read.c (read_array_type): Add support for dynamic
11192 DW_AT_byte_stride attributes.
11193
74a2f8ff
JB
111942018-01-02 Joel Brobecker <brobecker@adacore.com>
11195
11196 * dwarf2read.c (read_unspecified_type): Treat
11197 DW_TAG_enumeration_type DIEs from Ada units as stubs.
11198
e2882c85
JB
111992018-01-01 Joel Brobecker <brobecker@adacore.com>
11200
11201 Update copyright year range in all GDB files.
11202
1690bb24
JB
112032018-01-01 Joel Brobecker <brobecker@adacore.com>
11204
11205 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
11206 and gdb/testsuite/gdb.base/step-line.c.
11207
0f0c98a8
JB
112082018-01-01 Joel Brobecker <brobecker@adacore.com>
11209
11210 * copyright.py (main): Dump the contents of
11211 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
11212 even if BY_HAND is empty.
11213
82e1e79a
JB
112142018-01-01 Joel Brobecker <brobecker@adacore.com>
11215
11216 * top.c (print_gdb_version): Update Copyright year in version
11217 message.
11218
053f54e5 112192018-01-01 Joel Brobecker <brobecker@adacore.com>
47fea877 11220
053f54e5 11221 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
47fea877 11222
053f54e5 11223For older changes see ChangeLog-2017.
c906108c
SS
11224\f
11225Local Variables:
11226mode: change-log
11227left-margin: 8
11228fill-column: 74
11229version-control: never
57da7796 11230coding: utf-8
c906108c 11231End:
This page took 3.639387 seconds and 4 git commands to generate.